[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

merttumer (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 19 05:53:01 UTC 2021


 svx/source/table/svdotable.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit a20fee0312bd3bcf41e88cdb8a84d0ee10de901f
Author:     merttumer <mert.tumer at collabora.com>
AuthorDate: Thu Apr 15 11:27:08 2021 +0300
Commit:     Mert Tumer <mert.tumer at collabora.com>
CommitDate: Mon Apr 19 07:52:31 2021 +0200

    Fix Row size change is not updated
    
    Row size is not taken into account when there is a change
    Only if column size/position changes, it starts updating
    
    Change-Id: I99f3aa9fe0e7f3428234062a2520ca8a61984067
    Signed-off-by: merttumer <mert.tumer at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114130
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 77dc10165480..18e94d7a9bae 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -245,6 +245,7 @@ private:
     static sal_Int32 lastRowCount;
     static sal_Int32 lastColCount;
     static std::vector<sal_Int32> lastColWidths;
+    static bool rowSizeChanged;
 };
 
 SdrTableObjImpl* SdrTableObjImpl::lastLayoutTable = nullptr;
@@ -255,6 +256,7 @@ bool SdrTableObjImpl::lastLayoutFitHeight;
 WritingMode SdrTableObjImpl::lastLayoutMode;
 sal_Int32 SdrTableObjImpl::lastRowCount;
 sal_Int32 SdrTableObjImpl::lastColCount;
+bool SdrTableObjImpl::rowSizeChanged = false;
 std::vector<sal_Int32> SdrTableObjImpl::lastColWidths;
 
 SdrTableObjImpl::SdrTableObjImpl()
@@ -599,6 +601,7 @@ void SdrTableObjImpl::DragEdge( bool mbHorizontal, int nEdge, sal_Int32 nOffset
                 Reference< XIndexAccess > xRows( mxTable->getRows(), UNO_QUERY_THROW );
                 Reference< XPropertySet > xRowSet( xRows->getByIndex( (!nEdge)?nEdge:(nEdge-1) ), UNO_QUERY_THROW );
                 xRowSet->setPropertyValue( sSize, Any( nHeight ) );
+                rowSizeChanged = true;
             }
         }
         else
@@ -801,7 +804,8 @@ void SdrTableObjImpl::LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool
             || lastLayoutMode != writingMode
             || lastRowCount != getRowCount()
             || lastColCount != getColumnCount()
-            || lastColWidths != getColumnWidths() )
+            || lastColWidths != getColumnWidths()
+            || rowSizeChanged )
         {
             lastLayoutTable = this;
             lastLayoutInputRectangle = rArea;
@@ -816,6 +820,7 @@ void SdrTableObjImpl::LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool
             TableModelNotifyGuard aGuard( mxTable.get() );
             mpLayouter->LayoutTable( rArea, bFitWidth, bFitHeight );
             lastLayoutResultRectangle = rArea;
+            rowSizeChanged = false;
         }
         else
         {


More information about the Libreoffice-commits mailing list