summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-16 11:47:20 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-08-28 15:50:48 +0200
commit0655121bebd976a0c651b3c4f6f85e3bf76c89d6 (patch)
tree0e5e23942703d36e43bf2f8659f176f7b43ca3f8 /sd
parent5be8cbdb874621111cb157a98013e254de3b269c (diff)
tdf#119284 bg for automatic not set while editing
refactor and reuse fdo#35779 solution for this case Change-Id: I0631cd2560aa2acc2310f95b5c4dea36a2845a58 Reviewed-on: https://gerrit.libreoffice.org/59167 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/sdview.cxx20
1 files changed, 7 insertions, 13 deletions
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 3409123b788b..835474e79a0f 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -712,30 +712,24 @@ bool View::SdrBeginTextEdit(
}
}
- if (bReturn)
+ if (::Outliner* pOL = bReturn ? GetTextEditOutliner() : nullptr)
{
- ::Outliner* pOL = GetTextEditOutliner();
-
- if( pObj && pObj->GetPage() )
+ if (pObj)
{
- Color aBackground;
if( pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_TABLE )
{
+ Color aBackground;
aBackground = GetTextEditBackgroundColor(*this);
+ pOL->SetBackgroundColor( aBackground );
}
else
{
- aBackground = pObj->GetPage()->GetPageBackgroundColor(pPV);
+ pObj->setSuitableOutlinerBg(*pOL);
}
- if (pOL != nullptr)
- pOL->SetBackgroundColor( aBackground );
}
- if (pOL != nullptr)
- {
- pOL->SetParaInsertedHdl(LINK(this, View, OnParagraphInsertedHdl));
- pOL->SetParaRemovingHdl(LINK(this, View, OnParagraphRemovingHdl));
- }
+ pOL->SetParaInsertedHdl(LINK(this, View, OnParagraphInsertedHdl));
+ pOL->SetParaRemovingHdl(LINK(this, View, OnParagraphRemovingHdl));
}
if (bMasterPage && bReturn && pOutl)