summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2018-07-14 20:37:56 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2018-08-13 11:24:20 +0200
commit955eb9d196bdb626f876f02b3961aac79cce3849 (patch)
treedfe479d0586d897ffbb83573e8a51568d7e5c1e6
parent789d2791c7c0f32f23dd96af44c1421a9c13a753 (diff)
tdf#111306: Hide background widget in sidebar in master and notes view
Background is lost if it's changed from the sidebar in master or notes view, thus hide the widget for now, until the real issue is fixed. Keep the insert image button visible as it works. The background can be changed from the page properties dialog Change-Id: Ic3f6116cb0997024096343cb20ec40ac07307918 Reviewed-on: https://gerrit.libreoffice.org/57440 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit c57f10b67fceef47d304d74dce93be7389a7720c) Reviewed-on: https://gerrit.libreoffice.org/58184 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
-rw-r--r--sd/source/ui/sidebar/SlideBackground.cxx20
1 files changed, 5 insertions, 15 deletions
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index 7ce4bb4e6aa7..4e9a7a1bee04 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -243,11 +243,11 @@ void SlideBackground::HandleContextChange(
mpMasterSlide->Disable();
mpDspMasterBackground->Disable();
mpDspMasterObjects->Disable();
- mpFillStyle->Show();
- mpBackgroundLabel->Show();
+ mpFillStyle->Hide();
+ mpBackgroundLabel->Hide();
mpInsertImage->Show();
}
- else if ( maContext == maImpressHandoutContext )
+ else if ( maContext == maImpressHandoutContext || maContext == maImpressNotesContext )
{
mpCloseMaster->Hide();
mpEditMaster->Hide();
@@ -269,17 +269,7 @@ void SlideBackground::HandleContextChange(
mpBackgroundLabel->Show();
mpInsertImage->Show();
}
- else if (maContext == maImpressNotesContext)
- {
- mpCloseMaster->Hide();
- mpEditMaster->Hide();
- mpMasterSlide->Disable();
- mpDspMasterBackground->Disable();
- mpDspMasterObjects->Disable();
- mpFillStyle->Show();
- mpBackgroundLabel->Show();
- mpInsertImage->Hide();
- }
+
// Need to do a relayouting, otherwise the panel size is not updated after show / hide controls
sfx2::sidebar::Panel* pPanel = dynamic_cast<sfx2::sidebar::Panel*>(GetParent());
if(pPanel)
@@ -295,7 +285,7 @@ void SlideBackground::Update()
{
eFillStyle nPos = static_cast<eFillStyle>(mpFillStyle->GetSelectedEntryPos());
- if(maContext == maImpressHandoutContext)
+ if(maContext != maImpressOtherContext)
nPos = NONE;
SfxObjectShell* pSh = SfxObjectShell::Current();