Resolves: tdf#151053 Body text with dark bg not visible in Notes view
this is a similar case to:
commit 76a0b3170664b19c3eb66edc8fccb04dc5485387
Author: Caolán McNamara <caolanm@redhat.com>
Date: Fri Jan 10 16:49:19 2014 +0000
Resolves: fdo#35779 set the bg color of the editeng from the text shape
Change-Id: Ib7ca42426397346e5d7473b93e60f853e646a423
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140995
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 220a854..0c89288 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -759,6 +759,10 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
rOutliner.SetMinAutoPaperSize(aNullSize);
rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000));
// That color needs to be restored on leaving this method
Color aOriginalBackColor(rOutliner.GetBackgroundColor());
setSuitableOutlinerBg(rOutliner);
// add one to range sizes to get back to the old Rectangle and outliner measurements
const sal_uInt32 nAnchorTextWidth(FRound(aAnchorTextRange.getWidth() + 1));
const sal_uInt32 nAnchorTextHeight(FRound(aAnchorTextRange.getHeight() + 1));
@@ -861,6 +865,7 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
aConverter.decomposeBlockTextPrimitive(aNewTransformA, aNewTransformB, aClipRange);
// cleanup outliner
rOutliner.SetBackgroundColor(aOriginalBackColor);
rOutliner.Clear();
rOutliner.setVisualizedPage(nullptr);
rOutliner.SetControlWord(nOriginalControlWord);