sd/source/ui/tools/SlideshowLayerRenderer.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit fa838c5405ebeb1e367ad1a7c0ceab8e70019f85 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Mon Dec 9 15:55:57 2024 +0900 Commit: Marco Cecchetti <marco.cecche...@collabora.com> CommitDate: Mon Dec 9 11:52:07 2024 +0100 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/+/178122 Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sd/source/ui/tools/SlideshowLayerRenderer.cxx b/sd/source/ui/tools/SlideshowLayerRenderer.cxx index 82566df8828c..bf15654013b0 100644 --- a/sd/source/ui/tools/SlideshowLayerRenderer.cxx +++ b/sd/source/ui/tools/SlideshowLayerRenderer.cxx @@ -58,6 +58,7 @@ private: SdrPage& mrPage; EEControlBits mnSavedControlBits; + Color maSavedBackgroundColor; public: ScopedVclPtrInstance<VirtualDevice> maVirtualDevice; @@ -67,8 +68,13 @@ public: , mrPage(rPage) , maVirtualDevice(DeviceFormat::WITHOUT_ALPHA) { - // Turn off spelling SdrOutliner& rOutliner = mrModel.GetDrawOutliner(); + + // Set the background color + maSavedBackgroundColor = rOutliner.GetBackgroundColor(); + rOutliner.SetBackgroundColor(mrPage.GetPageBackgroundColor()); + + // Turn off spelling mnSavedControlBits = rOutliner.GetControlWord(); rOutliner.SetControlWord(mnSavedControlBits & ~EEControlBits::ONLINESPELLING); @@ -95,6 +101,7 @@ public: // Restore spelling SdrOutliner& rOutliner = mrModel.GetDrawOutliner(); rOutliner.SetControlWord(mnSavedControlBits); + rOutliner.SetBackgroundColor(maSavedBackgroundColor); } };