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

New commits:
commit c3997a03d41b5bd92b52cfc852dac56c6175c735
Author:     Sumit Chauhan <sumitc...@gmail.com>
AuthorDate: Sat Feb 9 13:16:50 2019 +0530
Commit:     Aron Budea <aron.bu...@collabora.com>
CommitDate: Wed Sep 23 12:59:19 2020 +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.mehrbr...@cib.de>
    (cherry picked from commit 347afce3a997291313fd88843ba248ccbbcb3990)
    Reviewed-on: https://gerrit.libreoffice.org/75483
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
    (cherry picked from commit 6d3dfe83c82860c0688fd8c8dcc250402df53c74)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103231
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Aron Budea <aron.bu...@collabora.com>

diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx 
b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 5736617080f8..eb02b7a33823 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;
@@ -155,6 +156,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 0e911e47b1e9..f84f38fdec59 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -106,6 +106,7 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
     get(mpLbFillGradTo, "fillgrad2");
     get(mpGradientStyle, "gradientstyle");
     get(mpBmpImport, "bmpimport");
+    mpPanel = dynamic_cast<sfx2::sidebar::Panel*>(pParent);
 
     Initialize();
 }
@@ -132,6 +133,7 @@ void AreaPropertyPanelBase::dispose()
     mpLbFillGradTo.clear();
     mpGradientStyle.clear();
     mpBmpImport.clear();
+    mpPanel.clear();
 
     PanelLayout::dispose();
 }
@@ -443,6 +445,8 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, 
ListBox&, void)
     {
         mpLbFillType->Selected();
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillColorHdl, SvxColorListBox&, 
void)
@@ -605,6 +609,8 @@ void AreaPropertyPanelBase::SelectFillAttrHdl_Impl()
             break;
         }
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::ImpUpdateTransparencies()
@@ -860,6 +866,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)
@@ -899,6 +907,8 @@ void AreaPropertyPanelBase::updateFillGradient(bool 
bDisabled, bool bDefaultOrSe
             mpLbFillGradTo->SetNoSelection();
         }
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool 
bDefaultOrSet, const SfxPoolItem* pState)
@@ -930,6 +940,8 @@ void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, 
bool bDefaultOrSet,
             mpLbFillAttr->SetNoSelection();
         }
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillColor(bool bDefaultOrSet, const 
SfxPoolItem* pState)
@@ -947,6 +959,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)
@@ -980,6 +994,8 @@ void AreaPropertyPanelBase::updateFillBitmap(bool 
bDisabled, bool bDefaultOrSet,
             mpLbFillAttr->SetNoSelection();
         }
     }
+    if(mpPanel)
+        mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::NotifyItemUpdate(
@@ -1247,6 +1263,8 @@ void AreaPropertyPanelBase::Update()
                 OSL_ENSURE(false, "Non supported FillType (!)");
             break;
         }
+        if(mpPanel)
+            mpPanel->TriggerDeckLayouting();
 }
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, ModifyTransSliderHdl, Slider*, void)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to