sd/source/ui/sidebar/SlideBackground.cxx | 16 ++++++++++++---- sd/source/ui/sidebar/SlideBackground.hxx | 1 + 2 files changed, 13 insertions(+), 4 deletions(-)
New commits: commit b1309cb3bc4b1719b6c99d49baea51f4e96136cd Author: Xisco Fauli <aniste...@gmail.com> Date: Thu Nov 9 18:58:41 2017 +0100 tdf#112627: Set 'Master Slide' when Context is changed Change-Id: Iba9a99d3819ddc5462ea969a3529481ddab2f4dc Reviewed-on: https://gerrit.libreoffice.org/44566 Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> Tested-by: Xisco Faulà <xiscofa...@libreoffice.org> diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index 694e90049b58..6ce4eaa39d13 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -172,6 +172,12 @@ SlideBackground::~SlideBackground() disposeOnce(); } +bool SlideBackground::IsDraw() +{ + return ( maContext == maDrawMasterContext || + maContext == maDrawOtherContext ); +} + bool SlideBackground::IsImpress() { return ( maContext == maImpressMasterContext || @@ -231,6 +237,7 @@ void SlideBackground::HandleContextChange( if ( IsImpress() ) { + mpMasterLabel->SetText(SdResId(STR_MASTERSLIDE_NAME)); mpMarginSelectBox->Hide(); if ( maContext == maImpressMasterContext ) @@ -271,7 +278,10 @@ void SlideBackground::HandleContextChange( if(pPanel) pPanel->TriggerDeckLayouting(); } - // else Draw or something else, do nothing + else if ( IsDraw() ) + { + mpMasterLabel->SetText(SdResId(STR_MASTERPAGE_NAME)); + } } void SlideBackground::Update() @@ -515,9 +525,8 @@ IMPL_LINK(SlideBackground, EventMultiplexerListener, { if(!mbTitle) { - if(maContext == maDrawOtherContext || maContext == maDrawMasterContext) + if( IsDraw() ) { - mpMasterLabel->SetText(SdResId(STR_MASTERPAGE_NAME)); mpCloseMaster->Hide(); mpEditMaster->Hide(); if( maContext == maDrawMasterContext) @@ -527,7 +536,6 @@ IMPL_LINK(SlideBackground, EventMultiplexerListener, } else if ( maContext == maImpressOtherContext || maContext == maImpressMasterContext ) { - mpMasterLabel->SetText(SdResId(STR_MASTERSLIDE_NAME)); if( maContext == maImpressMasterContext ) SetPanelTitle(SdResId(STR_MASTERSLIDE_NAME)); else diff --git a/sd/source/ui/sidebar/SlideBackground.hxx b/sd/source/ui/sidebar/SlideBackground.hxx index af7b72d5ed05..3c7ff070f87c 100644 --- a/sd/source/ui/sidebar/SlideBackground.hxx +++ b/sd/source/ui/sidebar/SlideBackground.hxx @@ -163,6 +163,7 @@ private: const OUString GetHatchingSetOrDefault(); const OUString GetBitmapSetOrDefault(); const OUString GetPatternSetOrDefault(); + bool IsDraw(); bool IsImpress(); void addListener(); void removeListener();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits