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 000591bdd5e42117dc2e4fe5a8f5df9526b62ae1
Author:     Pranam Lashkari <[email protected]>
AuthorDate: Fri Jan 2 02:45:48 2026 +0530
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Jan 6 15:07:29 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/+/196605
    Tested-by: Jenkins

diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index 872474fc0cef..06f365f5d480 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -128,7 +128,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 da7bafc506c7..52cbc9862f9a 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>
 #include <drawinglayer/primitive2d/textlayoutdevice.hxx>
 
 
@@ -64,9 +63,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 c1e5d16513b663b86d62a3eeceda2c0c6cf0b23c
Author:     Pranam Lashkari <[email protected]>
AuthorDate: Fri Jan 2 02:43:25 2026 +0530
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Jan 6 15:07:22 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/+/196604

diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index aba08ab2f2ba..cd381cadc6f9 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -832,7 +832,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 fca52b933676..6b087304c6fa 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3036,7 +3036,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
         {
@@ -4742,16 +4742,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

Reply via email to