[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - include/svx svx/source

Sumit Chauhan (via logerrit) logerrit at kemper.freedesktop.org
Sun Jul 14 23:17:05 UTC 2019


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

New commits:
commit 6d3dfe83c82860c0688fd8c8dcc250402df53c74
Author:     Sumit Chauhan <sumitcn25 at gmail.com>
AuthorDate: Sat Feb 9 13:16:50 2019 +0530
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Mon Jul 15 01:16:24 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>
    (cherry picked from commit 347afce3a997291313fd88843ba248ccbbcb3990)
    Reviewed-on: https://gerrit.libreoffice.org/75483
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index b24281efea5f..d24803b3e9ce 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -44,6 +44,7 @@
 #include <svl/intitem.hxx>
 #include <com/sun/star/ui/XUIElement.hpp>
 #include <svx/svxdllapi.h>
+#include <sfx2/sidebar/Panel.hxx>
 
 class XFillFloatTransparenceItem;
 class XFillTransparenceItem;
@@ -151,6 +152,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 4c7a15c9f9a9..348babec99d8 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -104,6 +104,7 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
     get(mpLbFillGradTo, "fillgrad2");
     get(mpGradientStyle, "gradientstyle");
     get(mpBmpImport, "bmpimport");
+    mpPanel = dynamic_cast<sfx2::sidebar::Panel*>(pParent);
 
     Initialize();
 }
@@ -130,6 +131,7 @@ void AreaPropertyPanelBase::dispose()
     mpLbFillGradTo.clear();
     mpGradientStyle.clear();
     mpBmpImport.clear();
+    mpPanel.clear();
 
     PanelLayout::dispose();
 }
@@ -440,6 +442,8 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox&, void)
     {
         mpLbFillType->Selected();
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillColorHdl, SvxColorListBox&, void)
@@ -602,6 +606,8 @@ void AreaPropertyPanelBase::SelectFillAttrHdl_Impl()
             break;
         }
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::ImpUpdateTransparencies()
@@ -857,6 +863,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)
@@ -896,6 +904,8 @@ void AreaPropertyPanelBase::updateFillGradient(bool bDisabled, bool bDefaultOrSe
             mpLbFillGradTo->SetNoSelection();
         }
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool bDefaultOrSet, const SfxPoolItem* pState)
@@ -927,6 +937,8 @@ void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool bDefaultOrSet,
             mpLbFillAttr->SetNoSelection();
         }
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillColor(bool bDefaultOrSet, const SfxPoolItem* pState)
@@ -944,6 +956,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)
@@ -977,6 +991,8 @@ void AreaPropertyPanelBase::updateFillBitmap(bool bDisabled, bool bDefaultOrSet,
             mpLbFillAttr->SetNoSelection();
         }
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::NotifyItemUpdate(
@@ -1243,6 +1259,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