[Libreoffice-commits] core.git: include/svx svx/source

Sumit Chauhan (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 8 09:49:47 UTC 2019


 include/svx/sidebar/AreaPropertyPanelBase.hxx     |    2 ++
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |   18 ++++++++++++++++++
 2 files changed, 20 insertions(+)

New commits:
commit 347afce3a997291313fd88843ba248ccbbcb3990
Author:     Sumit Chauhan <sumitcn25 at gmail.com>
AuthorDate: Sat Feb 9 13:16:50 2019 +0530
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Jul 8 11:49:00 2019 +0200

    tdf#120495 Providing self adapting height to the Area section of Sidebar
    
    This problem comes when we switch between different fill tabs in area sidebar and
    this patch solves the issue.
    
    Change-Id: I09936e600214394d26a27d26d47be3ef9942b65f
    Reviewed-on: https://gerrit.libreoffice.org/67577
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 1614077bbb55..0f568600563d 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -39,6 +39,7 @@
 #include <vcl/vclptr.hxx>
 #include <svl/intitem.hxx>
 #include <svx/svxdllapi.h>
+#include <sfx2/sidebar/Panel.hxx>
 
 class XFillFloatTransparenceItem;
 class XFillTransparenceItem;
@@ -146,6 +147,7 @@ protected:
     Image                                               maImgLinear;
 
     VclPtr<AreaTransparencyGradientPopup>           mxTrGrPopup;
+    VclPtr<sfx2::sidebar::Panel>                    mpPanel;
 
     std::unique_ptr< XFillFloatTransparenceItem >   mpFloatTransparenceItem;
     std::unique_ptr< SfxUInt16Item >                mpTransparanceItem;
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 93d2881820a8..6298b6f9d7f0 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -105,6 +105,7 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
     get(mpLbFillGradTo, "fillgrad2");
     get(mpGradientStyle, "gradientstyle");
     get(mpBmpImport, "bmpimport");
+    mpPanel = dynamic_cast<sfx2::sidebar::Panel*>(pParent);
 
     Initialize();
 }
@@ -131,6 +132,7 @@ void AreaPropertyPanelBase::dispose()
     mpLbFillGradTo.clear();
     mpGradientStyle.clear();
     mpBmpImport.clear();
+    mpPanel.clear();
 
     PanelLayout::dispose();
 }
@@ -441,6 +443,8 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox&, void)
     {
         mpLbFillType->Selected();
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillColorHdl, SvxColorListBox&, void)
@@ -603,6 +607,8 @@ void AreaPropertyPanelBase::SelectFillAttrHdl_Impl()
             break;
         }
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::ImpUpdateTransparencies()
@@ -858,6 +864,8 @@ void AreaPropertyPanelBase::updateFillStyle(bool bDisabled, bool bDefaultOrSet,
     mpToolBoxColor->Hide();
     meLastXFS = static_cast<sal_uInt16>(-1);
     mpStyleItem.reset();
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillGradient(bool bDisabled, bool bDefaultOrSet, const SfxPoolItem* pState)
@@ -897,6 +905,8 @@ void AreaPropertyPanelBase::updateFillGradient(bool bDisabled, bool bDefaultOrSe
             mpLbFillGradTo->SetNoSelection();
         }
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool bDefaultOrSet, const SfxPoolItem* pState)
@@ -928,6 +938,8 @@ void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool bDefaultOrSet,
             mpLbFillAttr->SetNoSelection();
         }
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillColor(bool bDefaultOrSet, const SfxPoolItem* pState)
@@ -945,6 +957,8 @@ void AreaPropertyPanelBase::updateFillColor(bool bDefaultOrSet, const SfxPoolIte
         mpLbFillType->SelectEntryPos(SOLID);
         Update();
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillBitmap(bool bDisabled, bool bDefaultOrSet, const SfxPoolItem* pState)
@@ -978,6 +992,8 @@ void AreaPropertyPanelBase::updateFillBitmap(bool bDisabled, bool bDefaultOrSet,
             mpLbFillAttr->SetNoSelection();
         }
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::NotifyItemUpdate(
@@ -1244,6 +1260,8 @@ void AreaPropertyPanelBase::Update()
                 OSL_ENSURE(false, "Non supported FillType (!)");
             break;
         }
+        if(mpPanel)
+            mpPanel->TriggerDeckLayouting();
 }
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, ModifyTransSliderHdl, Slider*, void)


More information about the Libreoffice-commits mailing list