sc/source/ui/unoobj/docuno.cxx                 |   11 ++---------
 sd/source/ui/unoidl/unomodel.cxx               |   10 ++--------
 svtools/source/config/colorcfg.cxx             |    4 ++--
 sw/qa/extras/tiledrendering/tiledrendering.cxx |    8 +-------
 sw/source/uibase/uno/unotxdoc.cxx              |   10 ++--------
 5 files changed, 9 insertions(+), 34 deletions(-)

New commits:
commit 005f592aa6007eca55edd6277714e44f716faeac
Author:     Sahil Gautam <[email protected]>
AuthorDate: Fri Mar 21 02:11:13 2025 +0100
Commit:     Sahil Gautam <[email protected]>
CommitDate: Mon Jan 26 09:55:06 2026 +0100

    Revert "tdf#165803 use COL_WHITE for DOCCOLOR for both light and dark modes"
    
    This reverts commit ddfce993c3d833171b92980476b11c985fb7693d.
    
    Reason for revert: revert in favour of 'per module customization', a better 
solution for the problem
    
    Change-Id: I746e001bda8ae73f9219fa281a057ed42784bfbd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183187
    Tested-by: Jenkins
    Reviewed-by: Sahil Gautam <[email protected]>
    (cherry picked from commit 057c74f7963c78d6038d280facf3133339a766b1)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198090
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Sahil Gautam <[email protected]>

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index a72ff7acd2f7..3a7545db4f60 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -513,15 +513,8 @@ static OString getTabViewRenderState(ScTabViewShell& 
rTabViewShell)
 
     if (rTabViewShell.IsAutoSpell())
         aState.append('S');
-
-    // NOTE: DOCCOLOR:dark was changed to COL_WHITE for 25.2.2, please read 
tdf#165803 for the reasons.
-    // TODO: Change-Id: Ib1ff7f2ca14110270baa8d6790d76696fd268183 (this patch) 
is a temporary fix for 25.2.2.
-    //       looking for/working towards better solutions.
-    //
-    // document color canot be used to determine which theme is being used 
(light/dark), as they both use white
-    // document background color.
-    // if (rViewRenderingOptions.GetDocColor() == 
svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 1))
-    //     aState.append('D');
+    if (rViewRenderingOptions.GetDocColor() == 
svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 1))
+        aState.append('D');
 
     aState.append(';');
 
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 0a94925e256e..3153b61c0b67 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -3974,14 +3974,8 @@ OString 
SdXImpressDocument::getViewRenderState(SfxViewShell* pViewShell)
         const SdViewOptions& pVOpt = pView->GetViewOptions();
         if (mpDoc && mpDoc->GetOnlineSpell())
             aState.append('S');
-        // NOTE: DOCCOLOR:dark was changed to COL_WHITE for 25.2.2, please 
read tdf#165803 for the reasons.
-        // TODO: Change-Id: Ib1ff7f2ca14110270baa8d6790d76696fd268183 (this 
patch) is a temporary fix for 25.2.2.
-        //       looking for/working towards better solutions
-        //
-        // document color canot be used to determine which theme is being used 
(light/dark), as they both use white
-        // document background color.
-        // if (pVOpt.mnDocBackgroundColor == 
svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 1))
-        //     aState.append('D');
+        if (pVOpt.mnDocBackgroundColor == 
svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 1))
+            aState.append('D');
         aState.append(';');
 
         OString aThemeName = OUStringToOString(pVOpt.msColorSchemeName, 
RTL_TEXTENCODING_UTF8);
diff --git a/svtools/source/config/colorcfg.cxx 
b/svtools/source/config/colorcfg.cxx
index df6ccfb47c6f..c49a33f65426 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -619,7 +619,7 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry eEntry, 
int nMod)
 
     static const Color cAutoColors[][nColorTypes] =
     {
-        { COL_WHITE,        COL_WHITE       }, // DOCCOLOR
+        { COL_WHITE,        Color(0x1C1C1C) }, // DOCCOLOR
         { COL_LIGHTGRAY,    Color(0x808080) }, // DOCBOUNDARIES
         { Color(0xDFDFDE),  Color(0x333333) }, // APPBACKGROUND
         { COL_LIGHTGRAY,    Color(0x808080) }, // TABLEBOUNDARIES
@@ -643,7 +643,7 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry eEntry, 
int nMod)
         { COL_LIGHTGREEN,   COL_LIGHTGREEN  }, // HTMLCOMMENT
         { COL_LIGHTRED,     COL_LIGHTRED    }, // HTMLKEYWORD
         { COL_GRAY,         COL_GRAY        }, // HTMLUNKNOWN
-        { COL_GRAY3,        COL_GRAY3       }, // CALCGRID
+        { COL_GRAY3,        COL_GRAY7       }, // CALCGRID
         { COL_LIGHTBLUE,    COL_LIGHTBLUE   }, // CALCCELLFOCUS
         { COL_LIGHTGRAYBLUE, COL_LIGHTGRAYBLUE }, // CALCDBFOCUS
         { COL_BLUE,         COL_BLUE        }, // CALCPAGEBREAK
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 71baeb99bb7e..35a84bdb3d7f 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -1394,13 +1394,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testThemeViewSeparation)
 // Test that changing the theme in one view doesn't change it in the other view
 CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testInvertBackgroundViewSeparation)
 {
-    // NOTE: DOCCOLOR:dark was changed to COL_WHITE for 25.2.2, please read 
tdf#165803 for the reasons.
-    // TODO: Change-Id: Ib1ff7f2ca14110270baa8d6790d76696fd268183 (this patch) 
is a temporary fix for 25.2.2.
-    //       looking for/working towards better solutions
-    //
-    // document color canot be used to determine which theme is being used 
(light/dark), as they both use white
-    // document background color.
-    Color aDarkColor(COL_WHITE);
+    Color aDarkColor(0x1c, 0x1c, 0x1c);
     addDarkLightThemes(aDarkColor, COL_WHITE);
     SwXTextDocument* pXTextDocument = createDoc();
     int nFirstViewId = SfxLokHelper::getCurrentView();
diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index b64ff29aa3a8..4ce2e4d87a3b 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3629,14 +3629,8 @@ OString 
SwXTextDocument::getViewRenderState(SfxViewShell* pViewShell)
                 aState.append('P');
             if (pVOpt->IsOnlineSpell())
                 aState.append('S');
-            // NOTE: DOCCOLOR:dark was changed to COL_WHITE for 25.2.2, please 
read tdf#165803 for the reasons.
-            // TODO: Change-Id: Ib1ff7f2ca14110270baa8d6790d76696fd268183 
(this patch) is a temporary fix for 25.2.2.
-            //       looking for/working towards better solutions.
-            //
-            // document color canot be used to determine which theme is being 
used (light/dark), as they both use white
-            // document background color.
-            // if (pVOpt->GetDocColor() == 
svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 1))
-            //     aState.append('D');
+            if (pVOpt->GetDocColor() == 
svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 1))
+                aState.append('D');
 
             if (pView->IsSpotlightParaStyles() || 
pView->IsSpotlightCharStyles())
             {

Reply via email to