include/tools/color.hxx              |    7 +++++--
 sd/qa/unit/data/xml/tdf92001_0.xml   |    2 +-
 sd/source/ui/table/tablefunction.cxx |    8 +-------
 3 files changed, 7 insertions(+), 10 deletions(-)

New commits:
commit 8ff7d75c1929876743b01d9651ea30928673433f
Author:     Heiko Tietze <heiko.tie...@documentfoundation.org>
AuthorDate: Mon Oct 16 12:37:00 2023 +0200
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Mon Oct 16 15:35:23 2023 +0200

    Revert "Resolves tdf#156685 - "Object without fill" style for tables"
    
    This reverts commit 86eb7ad2b4488dcd29c21ae3fc525056b681e199.
    
    Reason for revert: More generic solution in 
I1ca8cfe539a662100f6c581fd633ab1ebd5c6bfb
    
    Change-Id: Ie2769a90f776602e38fc2795e08d591f9ae8d618
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158035
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/sd/source/ui/table/tablefunction.cxx 
b/sd/source/ui/table/tablefunction.cxx
index b28f89c896e2..67196e864b39 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -44,8 +44,6 @@
 #include <Window.hxx>
 #include <drawview.hxx>
 #include <sdmod.hxx>
-#include <strings.hrc>
-#include <sdresid.hxx>
 
 #include <memory>
 
@@ -149,11 +147,7 @@ static void InsertTableImpl(const DrawViewShell* pShell,
         aRect,
         nColumns,
         nRows);
-    //tables must not use default background tango sky blue tdf#156685
-    SfxStyleSheet* pStyleSheet = static_cast<SfxStyleSheet*>(
-        pShell->GetDoc()->GetStyleSheetPool()->Find(
-            SdResId(STR_POOLSHEET_OBJWITHOUTFILL), SfxStyleFamily::Para));
-    pObj->NbcSetStyleSheet( pStyleSheet, true );
+    pObj->NbcSetStyleSheet( pShell->GetDoc()->GetDefaultStyleSheet(), true );
     apply_table_style( pObj.get(), pShell->GetDoc(), sTableStyle );
     SdrPageView* pPV = pView->GetSdrPageView();
 
commit f07d47fff571c4446988715f3c21362b9eed4265
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Mon Oct 16 11:34:56 2023 +0200
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Mon Oct 16 15:35:10 2023 +0200

    Related tdf#156182 - Keep legacy contrast for default background
    
    Band aid for follow-up issues, eg. tdf#157706, tdf#157706...
    
    Change-Id: I1ca8cfe539a662100f6c581fd633ab1ebd5c6bfb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158024
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index c3bbb5bf0e2b..8ab35445893f 100644
--- a/include/tools/color.hxx
+++ b/include/tools/color.hxx
@@ -311,8 +311,11 @@ public:
       */
     bool IsDark() const
     {
-        // tdf#156182 
-        return GetLuminance() <= 156;
+        // tdf#156182, and band aid for follow-up issues
+        if (mValue == 0x729fcf) // COL_DEFAULT_SHAPE_FILLING
+            return GetLuminance() <= 62;
+        else
+            return GetLuminance() <= 156;
     }
 
     /** Comparison with luminance thresholds.
diff --git a/sd/qa/unit/data/xml/tdf92001_0.xml 
b/sd/qa/unit/data/xml/tdf92001_0.xml
index 234f751a9c23..d67952eb1fe5 100644
--- a/sd/qa/unit/data/xml/tdf92001_0.xml
+++ b/sd/qa/unit/data/xml/tdf92001_0.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <XShapes>
- <XShape positionX="4826" positionY="4826" sizeX="19557" sizeY="12953" 
type="com.sun.star.drawing.CustomShape" fontHeight="18.000000" 
fontColor="ffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="325" textRightDistance="325" 
textUpperDistance="200" textLowerDistance="200" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="SOLID" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="4826" positionY="4826" sizeX="19557" sizeY="12953" 
type="com.sun.star.drawing.CustomShape" fontHeight="18.000000" 
fontColor="000000" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="325" textRightDistance="325" 
textUpperDistance="200" textLowerDistance="200" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="SOLID" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
   <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
   <FillGradient style="LINEAR" startColor="3465a4" endColor="ffffff" angle="0" 
border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" 
stepCount="0"/>
   <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>

Reply via email to