summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2018-09-23 11:37:33 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2018-09-23 22:58:55 +0200
commitdd7fd51a053be6e664a1a358501dd27e0118f221 (patch)
tree2bb5859912a4e58c45fc98c65a3e964328d24d9a /sd
parent12b3395330953384bb80904fee489389db1e0cfc (diff)
tdf#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/60914 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sd')
-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 4e9a7a1bee04..cf5fea5e708e 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -278,6 +278,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();
+ }
}
}
@@ -285,7 +296,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();