diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-02-12 01:58:23 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-02-13 21:37:48 +0000 |
commit | 36ef9f8d077afe2c605e9d22588dc3f698440d89 (patch) | |
tree | f355d82d3c83a5c3c26be94ce4d1115c73c997b4 /sc/source/ui/view | |
parent | f9ead4c6612b3e36b56f2cb83602f019ccaf1dc4 (diff) |
tdf#76183: refresh objects' positions on optimal height recalc
Since commit b10833d4db6046f2d32ea44a60cb19a626d80447, it's required
to detect when objects' placement should be adjusted, and call
SetDrawPageSize manually.
Unit test included
Change-Id: I933ba4802b212400cc47ed0fb7e1f8f44049bb81
Reviewed-on: https://gerrit.libreoffice.org/34165
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index fb1e85918d3b..0965e89b8b2b 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -148,6 +148,9 @@ bool ScViewFunc::AdjustBlockHeight( bool bPaint, ScMarkData* pMarkData ) bAnyChanged = bChanged = true; } } + // tdf#76183: recalculate objects' positions + if (bChanged) + rDoc.SetDrawPageSize(nTab); if ( bPaint && bChanged ) pDocSh->PostPaint( 0, nPaintY, nTab, MAXCOL, MAXROW, nTab, PaintPartFlags::Grid | PaintPartFlags::Left ); @@ -182,6 +185,10 @@ bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow ) sc::RowHeightContext aCxt(nPPTX, nPPTY, aZoomX, aZoomY, aProv.GetDevice()); bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartRow, nEndRow, nTab); + // tdf#76183: recalculate objects' positions + if (bChanged) + rDoc.SetDrawPageSize(nTab); + if (bChanged && ( nStartRow == nEndRow )) { sal_uInt16 nNewPixel = (sal_uInt16) (rDoc.GetRowHeight(nStartRow,nTab) * nPPTY); |