sd/source/ui/tools/SlideshowLayerRenderer.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 8d9a82899e9d29510c46a298e3a5da6ac23f6407
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Mon Dec 9 15:55:57 2024 +0900
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Apr 1 16:16:13 2025 +0200

    slideshow: need to set the page background color to the outliner
    
    This is needed or else we don't correctly determine and set what
    the auto color is for a particular page, which has the result that
    sometimes we set the text color to white where it should be black
    and probably also vice-versa.
    
    Change-Id: If17a008a49fbdd87e6bbb5299fe8efe506165a1b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183590
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sd/source/ui/tools/SlideshowLayerRenderer.cxx 
b/sd/source/ui/tools/SlideshowLayerRenderer.cxx
index a297ed2dc590..eb8105f6b56d 100644
--- a/sd/source/ui/tools/SlideshowLayerRenderer.cxx
+++ b/sd/source/ui/tools/SlideshowLayerRenderer.cxx
@@ -57,6 +57,7 @@ private:
     SdrModel& mrModel;
 
     EEControlBits mnSavedControlBits;
+    Color maSavedBackgroundColor;
 
 public:
     ScopedVclPtrInstance<VirtualDevice> maVirtualDevice;
@@ -66,8 +67,13 @@ public:
         : mrModel(rModel)
         , maVirtualDevice(DeviceFormat::WITHOUT_ALPHA)
     {
-        // Turn off spelling
         SdrOutliner& rOutliner = mrModel.GetDrawOutliner();
+
+        // Set the background color
+        maSavedBackgroundColor = rOutliner.GetBackgroundColor();
+        rOutliner.SetBackgroundColor(rPage.GetPageBackgroundColor());
+
+        // Turn off spelling
         mnSavedControlBits = rOutliner.GetControlWord();
         rOutliner.SetControlWord(mnSavedControlBits & 
~EEControlBits::ONLINESPELLING);
 
@@ -94,6 +100,7 @@ public:
         // Restore spelling
         SdrOutliner& rOutliner = mrModel.GetDrawOutliner();
         rOutliner.SetControlWord(mnSavedControlBits);
+        rOutliner.SetBackgroundColor(maSavedBackgroundColor);
     }
 };
 

Reply via email to