diff options
author | Xisco Fauli <anistenis@gmail.com> | 2017-11-09 18:58:41 +0100 |
---|---|---|
committer | Xisco FaulĂ <xiscofauli@libreoffice.org> | 2017-11-11 11:44:31 +0100 |
commit | b1309cb3bc4b1719b6c99d49baea51f4e96136cd (patch) | |
tree | 6d79eddef5447c58c27d0fcab3d20a6b65bf9b39 | |
parent | 66b26b03cbfe9e72d64eef6875a6eec11bf13bf5 (diff) |
tdf#112627: Set 'Master Slide' when Context is changed
Change-Id: Iba9a99d3819ddc5462ea969a3529481ddab2f4dc
Reviewed-on: https://gerrit.libreoffice.org/44566
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
-rw-r--r-- | sd/source/ui/sidebar/SlideBackground.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/sidebar/SlideBackground.hxx | 1 |
2 files changed, 13 insertions, 4 deletions
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(); |