summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlrowi.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/xmlrowi.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/xmlrowi.cxx')
-rw-r--r--sc/source/filter/xml/xmlrowi.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index 7f958d459f4d..3093c33f0a8e 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -27,6 +27,7 @@
#include <olinetab.hxx>
#include <sheetdata.hxx>
#include <documentimport.hxx>
+#include <unonames.hxx>
#include <xmloff/xmltkmap.hxx>
#include <xmloff/nmspmap.hxx>
@@ -198,6 +199,21 @@ void SAL_CALL ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/)
}
if (bFiltered)
xRowProperties->setPropertyValue(SC_ISFILTERED, uno::makeAny(bFiltered));
+
+ uno::Any any = xRowProperties->getPropertyValue(SC_UNONAME_OHEIGHT);
+ bool bOptionalHeight = false;
+ any >>= bOptionalHeight;
+ if (bOptionalHeight)
+ {
+ // Save this row for later height update
+ std::vector<ScDocRowHeightUpdater::TabRanges>& rRecalcRanges = rXMLImport.GetRecalcRowRanges();
+ while (static_cast<SCTAB>(rRecalcRanges.size()) <= nSheet)
+ {
+ rRecalcRanges.emplace_back(0);
+ }
+ rRecalcRanges.at(nSheet).mnTab = nSheet;
+ rRecalcRanges.at(nSheet).mpRanges->setTrue(nFirstRow, nCurrentRow);
+ }
}
}
}