[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sd/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Sep 23 20:59:15 UTC 2018


 sd/source/ui/sidebar/SlideBackground.cxx |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit dd7fd51a053be6e664a1a358501dd27e0118f221
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sun Sep 23 11:37:33 2018 +0200
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Sun Sep 23 22:58:55 2018 +0200

    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 at ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

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();


More information about the Libreoffice-commits mailing list