summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-01-26 16:58:23 +0000
committerMiklos Vajna <vmiklos@collabora.com>2024-02-01 13:47:58 +0100
commit53655a310737c6653ba8350d57104d0df8890976 (patch)
tree115e8dd8dedc5b83fa739803a389602309de1c8f /svx
parent7e4f6df850ffb9488eff7aa5f3e548052ae57062 (diff)
restore original Outliner background after getting transferrable
Inserting a chart into a dark mode writer will initially incorrectly show auto color text as dark while is is in edit mode, then once you leave edit mode the auto text is correctly white. But it looks like that apparently correct white color is itself a bug from the copy clipboard transferrable setting a good background and then not restoring it afterwards. Change-Id: Ib019eb494b623bdda22019d587210db2c39987f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162566 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit be2ea4ebe3f969ee9ac4c8da40cdbe6d8f011e58) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162851 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 66af82d6baac..ba54e45acef5 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -603,7 +603,8 @@ bool GraphicExporter::GetGraphic( ExportSettings const & rSettings, Graphic& aGr
SdrOutliner& rOutl=mpDoc->GetDrawOutliner();
maOldCalcFieldValueHdl = rOutl.GetCalcFieldValueHdl();
rOutl.SetCalcFieldValueHdl( LINK(this, GraphicExporter, CalcFieldValueHdl) );
- rOutl.SetBackgroundColor( pPage->GetPageBackgroundColor() );
+ ::Color aOldBackColor(rOutl.GetBackgroundColor());
+ rOutl.SetBackgroundColor(pPage->GetPageBackgroundColor());
// #i102251#
const EEControlBits nOldCntrl(rOutl.GetControlWord());
@@ -994,6 +995,8 @@ bool GraphicExporter::GetGraphic( ExportSettings const & rSettings, Graphic& aGr
// #i102251#
rOutl.SetControlWord(nOldCntrl);
+ rOutl.SetBackgroundColor(aOldBackColor);
+
return bRet;
}