diff options
author | merttumer <mert.tumer@collabora.com> | 2021-04-15 11:27:08 +0300 |
---|---|---|
committer | Mert Tumer <mert.tumer@collabora.com> | 2021-05-03 06:52:06 +0200 |
commit | 4603627360eae1bd42d3dda5348abe11d79b261d (patch) | |
tree | 4f6f257d9bf392129d11831a9e8328a38981255b /svx | |
parent | 45602eb63bcea8e0fe084690144b6aba45f0a56a (diff) |
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@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114130
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114645
Tested-by: Jenkins
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/table/svdotable.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 9acef67c552f..05e8dda38e21 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -248,6 +248,7 @@ private: static sal_Int32 lastRowCount; static sal_Int32 lastColCount; static std::vector<sal_Int32> lastColWidths; + static bool rowSizeChanged; }; SdrTableObjImpl* SdrTableObjImpl::lastLayoutTable = nullptr; @@ -258,6 +259,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() @@ -604,6 +606,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 @@ -807,7 +810,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; @@ -822,6 +826,7 @@ void SdrTableObjImpl::LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool TableModelNotifyGuard aGuard( mxTable.get() ); mpLayouter->LayoutTable( rArea, bFitWidth, bFitHeight ); lastLayoutResultRectangle = rArea; + rowSizeChanged = false; } else { |