summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2018-09-23 11:37:33 +0200
committerXisco Faulí <xiscofauli@libreoffice.org>2018-09-23 14:12:21 +0200
commit14ce6a88e3fc299af1f643edfc2230ace5d614c1 (patch)
tree29646cf1377eaff5687fbeaa108cad4cb31299cb
parent1aa37aa6bee19099b57555a6d839992b054aa405 (diff)
ŧdf#120069: Do not crash changing background color in draw
Regression from c57f10b67fceef47d304d74dce93be7389a7720c, where I disabled the master background in Impress but not in Draw, and both share some common code. Besides, disable master background in draw as well. Follow-up of bug tdf#111306 Change-Id: I772382b5ed8eff3a35d001ea498810613137d172 Reviewed-on: https://gerrit.libreoffice.org/60913 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
-rw-r--r--sd/source/ui/sidebar/SlideBackground.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index f4e4d045e174..b3b54bfde71d 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -279,6 +279,17 @@ void SlideBackground::HandleContextChange(
else if ( IsDraw() )
{
mpMasterLabel->SetText(SdResId(STR_MASTERPAGE_LABEL));
+
+ if (maContext == maDrawOtherContext)
+ {
+ mpFillStyle->Show();
+ mpBackgroundLabel->Show();
+ }
+ else if (maContext == maDrawMasterContext)
+ {
+ mpFillStyle->Hide();
+ mpBackgroundLabel->Hide();
+ }
}
}
@@ -286,7 +297,7 @@ void SlideBackground::Update()
{
eFillStyle nPos = static_cast<eFillStyle>(mpFillStyle->GetSelectedEntryPos());
- if(maContext != maImpressOtherContext)
+ if(maContext != maImpressOtherContext && maContext != maDrawOtherContext)
nPos = NONE;
SfxObjectShell* pSh = SfxObjectShell::Current();