editeng/source/editeng/impedit.hxx | 2 +- editeng/source/editeng/impedit3.cxx | 13 +++++++++---- include/svx/svdotext.hxx | 1 - svx/source/svdraw/svdoutl.cxx | 4 ---- 4 files changed, 10 insertions(+), 10 deletions(-)
New commits: commit bf62e62597ccda8c3e026a14e9d670d70348b634 Author: Pranam Lashkari <[email protected]> AuthorDate: Fri Jan 2 02:45:48 2026 +0530 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Jan 23 10:06:55 2026 +0100 Revert "svx: fixed textbox text always black on dark theme" This reverts commit c52f139b4f7140033144dde29f70a39ebedb6aa0. these changes are not needed after b1a6bc7a Change-Id: Id71c57d383703c182dec790b66e96563ed8fbac2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196404 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197886 diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index c69cfee4c4d6..a9c91ad51d8d 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -133,7 +133,6 @@ private: friend class TextChain; friend class TextChainFlow; friend class EditingTextChainFlow; - friend class SdrOutliner; // CustomShapeproperties need to access the "mbTextFrame" member: friend class sdr::properties::CustomShapeProperties; diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx index 2002b5f05392..8198c260e344 100644 --- a/svx/source/svdraw/svdoutl.cxx +++ b/svx/source/svdraw/svdoutl.cxx @@ -26,7 +26,6 @@ #include <editeng/editstat.hxx> #include <svl/itempool.hxx> #include <editeng/editview.hxx> -#include <editeng/editeng.hxx> SdrOutliner::SdrOutliner( SfxItemPool* pItemPool, OutlinerMode nMode ) @@ -63,9 +62,6 @@ void SdrOutliner::SetTextObj( const SdrTextObj* pObj ) SetPaperSize( aMaxSize ); SetTextColumns(pObj->GetTextColumnsNumber(), pObj->GetTextColumnsSpacing()); ClearPolygon(); - - if (pObj->GetTextEditOutliner()) - SetBackgroundColor(pObj->GetTextEditOutliner()->GetEditEngine().GetBackgroundColor()); } mxWeakTextObj = const_cast< SdrTextObj* >(pObj); commit dd149eb03ced47633e528ffd7a743e43ed07e343 Author: Pranam Lashkari <[email protected]> AuthorDate: Fri Jan 2 02:43:25 2026 +0530 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Jan 23 10:06:42 2026 +0100 editeng: for automatic font color also check char background problem: in automatic color we only check doc color and background color(i.e: cell color) text can also have highlight color which also should be taken in cosideration when chosing automatic color Change-Id: I3689baa5cc95bc8d3b855251ae92c91a82102db3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196403 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Tested-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197885 diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 4bdcdaa6eefd..b650083ea3f5 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -820,7 +820,7 @@ private: tools::Long CalcVertLineSpacing(Point& rStartPos) const; - Color GetAutoColor() const; + Color GetAutoColor(const SvxFont* pFonts = nullptr) const; void EnableAutoColor( bool b ) { mbUseAutoColor = b; } bool IsAutoColorEnabled() const { return mbUseAutoColor; } void ForceAutoColor( bool b ) { mbForceAutoColor = b; } diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 2b2a9aa4565b..e122bba3e06e 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2995,7 +2995,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo if ( IsAutoColorEnabled() && !bPrinting && !bPDFExporting) { // Never use WindowTextColor on the printer - rFont.SetColor( GetAutoColor() ); + rFont.SetColor(GetAutoColor(&rFont)); } else { @@ -4775,16 +4775,21 @@ Reference < i18n::XExtendedInputSequenceChecker > const & ImpEditEngine::ImplGet return mxISC; } -Color ImpEditEngine::GetAutoColor() const +Color ImpEditEngine::GetAutoColor(const SvxFont* pFont) const { Color aColor; const SfxViewShell* pKitSh = comphelper::LibreOfficeKit::isActive() ? SfxViewShell::Current() : nullptr; if (pKitSh) { - Color aBackgroundColor = GetBackgroundColor(); - if (aBackgroundColor == COL_AUTO) + Color aBackgroundColor; + if (pFont) //check for char backgound color + aBackgroundColor = pFont->GetFillColor(); + if (aBackgroundColor == COL_AUTO) // check for aother backgound (i.e: cell color) + aBackgroundColor = GetBackgroundColor(); + if (aBackgroundColor == COL_AUTO) // if everything is auto/transperent then use doc color aBackgroundColor = pKitSh->GetColorConfigColor(svtools::DOCCOLOR); + if (aBackgroundColor.IsDark()) aColor = COL_WHITE; else
