summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo/undoblk3.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-02-12 01:58:23 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2017-02-13 21:37:48 +0000
commit36ef9f8d077afe2c605e9d22588dc3f698440d89 (patch)
treef355d82d3c83a5c3c26be94ce4d1115c73c997b4 /sc/source/ui/undo/undoblk3.cxx
parentf9ead4c6612b3e36b56f2cb83602f019ccaf1dc4 (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/undo/undoblk3.cxx')
-rw-r--r--sc/source/ui/undo/undoblk3.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 226e15dcc44a..7a6038bed0ba 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -875,7 +875,7 @@ void ScUndoAutoFormat::Redo()
rDoc.SetRowFlags( nRow, nTab, nOld & ~CRFlags::ManualSize );
}
- rDoc.SetOptimalHeight(aCxt, nStartY, nEndY, nTab);
+ bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartY, nEndY, nTab);
for (SCCOL nCol=nStartX; nCol<=nEndX; nCol++)
if (!rDoc.ColHidden(nCol, nTab))
@@ -886,6 +886,10 @@ void ScUndoAutoFormat::Redo()
rDoc.SetColWidth( nCol, nTab, nThisSize );
rDoc.ShowCol( nCol, nTab, true );
}
+
+ // tdf#76183: recalculate objects' positions
+ if (bChanged)
+ rDoc.SetDrawPageSize(nTab);
}
pDocShell->PostPaint( 0, 0, nStartZ,