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 057c74f7963c78d6038d280facf3133339a766b1
Author:     Sahil Gautam <sahil.gautam.ext...@allotropia.de>
AuthorDate: Fri Mar 21 02:11:13 2025 +0100
Commit:     Sahil Gautam <sahil.gautam.ext...@allotropia.de>
CommitDate: Fri Mar 21 09:31:41 2025 +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 <sahil.gautam.ext...@allotropia.de>

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index dc05cd55ee71..f15a8c02bbe9 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -510,15 +510,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 2fd2b79ea65d..a2fff3370033 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -3857,14 +3857,8 @@ OString 
SdXImpressDocument::getViewRenderState(SfxViewShell* pViewShell)
         const SdViewOptions& pVOpt = pView->GetViewOptions();
         if (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 e0befa9d1cb1..c1a973af27a4 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -611,7 +611,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
@@ -635,7 +635,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_BLUE,         COL_BLUE        }, // CALCPAGEBREAK
         { Color(0x2300dc),  Color(0x2300DC) }, // CALCPAGEBREAKMANUAL
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index d6fa5ed7eaed..8b9387d2afb1 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -1396,13 +1396,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::getView();
diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index a1d3aaa9d1d7..964a7983ee9d 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3636,14 +3636,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