summaryrefslogtreecommitdiff
path: root/sc/source/core/data/rowheightcontext.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-08-04 02:41:14 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-08-04 12:58:00 +0000
commitef3ca1da6b6d994ea8c39f28a49a599f5cf67915 (patch)
tree8ae61c2ff4e712af9f04835db50b575bcaebc30e /sc/source/core/data/rowheightcontext.cxx
parenteee24c0ee31714ede45d17f6f1f6c1df5aefaeb4 (diff)
save about 50% of the import time for nearly empty ods documents
It seems that currently most of the time is spent iterating through all the cells to get the optimal row height. We can easily optimize by using mdds::flat_segment_tree. Now we don't need to iterate through all cells and instead can work on whole blocks. Change-Id: Id9a0686490b0e91ad6552b428c38a9f6635a7938 Reviewed-on: https://gerrit.libreoffice.org/27856 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/core/data/rowheightcontext.cxx')
-rw-r--r--sc/source/core/data/rowheightcontext.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/data/rowheightcontext.cxx b/sc/source/core/data/rowheightcontext.cxx
index 46f3c6dad9ca..4cba0b9d9f17 100644
--- a/sc/source/core/data/rowheightcontext.cxx
+++ b/sc/source/core/data/rowheightcontext.cxx
@@ -14,6 +14,7 @@ namespace sc {
RowHeightContext::RowHeightContext(
double fPPTX, double fPPTY, const Fraction& rZoomX, const Fraction& rZoomY,
OutputDevice* pOutDev ) :
+ maHeights(0),
mfPPTX(fPPTX), mfPPTY(fPPTY),
maZoomX(rZoomX), maZoomY(rZoomY),
mpOutDev(pOutDev),
@@ -32,7 +33,7 @@ void RowHeightContext::setForceAutoSize( bool b )
mbForceAutoSize = b;
}
-std::vector<sal_uInt16>& RowHeightContext::getHeightArray()
+ScFlatUInt16RowSegments& RowHeightContext::getHeightArray()
{
return maHeights;
}