svx/source/table/svdotable.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 179e4e6901bdaf6577bad92817578c3b33a8514d Author: merttumer <[email protected]> AuthorDate: Thu Apr 15 11:27:08 2021 +0300 Commit: Andras Timar <[email protected]> CommitDate: Tue Jun 15 09:18:28 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 <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114130 Reviewed-by: Jan Holesovsky <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117190 Reviewed-by: Andras Timar <[email protected]> diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 45d184403c56..18ac30472a7b 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -243,6 +243,7 @@ private: static sal_Int32 lastRowCount; static sal_Int32 lastColCount; static std::vector<sal_Int32> lastColWidths; + static bool rowSizeChanged; }; SdrTableObjImpl* SdrTableObjImpl::lastLayoutTable = nullptr; @@ -253,6 +254,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() @@ -594,6 +596,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 @@ -798,7 +801,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; @@ -813,6 +817,7 @@ void SdrTableObjImpl::LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool TableModelNotifyGuard aGuard( mxTable.get() ); mpLayouter->LayoutTable( rArea, bFitWidth, bFitHeight ); lastLayoutResultRectangle = rArea; + rowSizeChanged = false; } else { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
