summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlimprt.cxx
diff options
context:
space:
mode:
authorVasily Melenchuk <Vasily.Melenchuk@cib.de>2018-04-06 20:19:10 +0300
committerKatarina Behrens <Katarina.Behrens@cib.de>2018-10-22 23:30:23 +0200
commit693953dd4699887bd3f5bca2c3582b5fae1d6992 (patch)
tree2091b2fe8d997ef84f149ace1e6a1f00fd8e08fe /sc/source/filter/xml/xmlimprt.cxx
parentfad764c02c7a9cd210bfa44ea0ce1ac5354d6427 (diff)
tdf#62268: allow row height recalculation on document load
During document load rows with style:use-optimal-row-height="true" should recalculate it's height. * includes: Row height tolerance level increase for unittest * tdf#118086: calc: invalid row autoheight fixed Change-Id: Ib38b5b753d9ff8352116d77851d228c5d77bd530 Reviewed-on: https://gerrit.libreoffice.org/52521 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 1e55a47e89a9d9d6cf9cb3993484022aaf2c097b) Reviewed-on: https://gerrit.libreoffice.org/61898 Tested-by: Jenkins
Diffstat (limited to 'sc/source/filter/xml/xmlimprt.cxx')
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index ca24d77523b5..3be69b5ae4f0 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -76,6 +76,7 @@
#include "pivotsource.hxx"
#include <unonames.hxx>
#include <numformat.hxx>
+#include <sizedev.hxx>
#include <comphelper/base64.hxx>
#include <comphelper/extract.hxx>
@@ -1809,6 +1810,26 @@ void SAL_CALL ScXMLImport::endDocument()
pDoc->SetStreamValid( nTab, true );
}
}
+
+ // There are rows with optimal height which need to be updated
+ if (!maRecalcRowRanges.empty())
+ {
+ bool bLockHeight = pDoc->IsAdjustHeightLocked();
+ if (bLockHeight)
+ {
+ pDoc->UnlockAdjustHeight();
+ }
+
+ ScSizeDeviceProvider aProv(static_cast<ScDocShell*>(pDoc->GetDocumentShell()));
+ ScDocRowHeightUpdater aUpdater(*pDoc, aProv.GetDevice(), aProv.GetPPTX(), aProv.GetPPTY(), &maRecalcRowRanges);
+ aUpdater.update();
+
+ if (bLockHeight)
+ {
+ pDoc->LockAdjustHeight();
+ }
+ }
+
aTables.FixupOLEs();
}
if (GetModel().is())