summaryrefslogtreecommitdiff
path: root/sc/source/core/data/cellvalue.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-05-15 13:13:31 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-05-16 12:34:51 +0200
commit6f810e3d7dafcd7d0101173a501786226f4d8886 (patch)
tree17b048023c746f719b754505b4cd0ff8bcccea10 /sc/source/core/data/cellvalue.cxx
parentace16e500c92797bb47ad580cf535de0702137bd (diff)
optimize ScHTMLExport::WriteTables() with large columns
Again, unless given a hint, mdds always starts a search from the beginning of the container, so iterating over a column becomes quadratic. Shows when selecting (the title of) a large column with different value types, e.g. in tdf#120558, which triggers setting the selection from VclQt5Clipboard::setContents(), which calls this. Change-Id: Ida009c5ddf18ccdc8dff88c15530cc7e33ce80e7 Reviewed-on: https://gerrit.libreoffice.org/72366 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/source/core/data/cellvalue.cxx')
-rw-r--r--sc/source/core/data/cellvalue.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx
index 7fffc669ee6c..ef662c4818f7 100644
--- a/sc/source/core/data/cellvalue.cxx
+++ b/sc/source/core/data/cellvalue.cxx
@@ -567,6 +567,11 @@ ScRefCellValue::ScRefCellValue( ScDocument& rDoc, const ScAddress& rPos )
assign( rDoc, rPos);
}
+ScRefCellValue::ScRefCellValue( ScDocument& rDoc, const ScAddress& rPos, sc::ColumnBlockPosition& rBlockPos )
+{
+ assign( rDoc, rPos, rBlockPos );
+}
+
void ScRefCellValue::clear()
{
// Reset to empty value.
@@ -579,6 +584,11 @@ void ScRefCellValue::assign( ScDocument& rDoc, const ScAddress& rPos )
*this = rDoc.GetRefCellValue(rPos);
}
+void ScRefCellValue::assign( ScDocument& rDoc, const ScAddress& rPos, sc::ColumnBlockPosition& rBlockPos )
+{
+ *this = rDoc.GetRefCellValue(rPos, rBlockPos);
+}
+
void ScRefCellValue::commit( ScDocument& rDoc, const ScAddress& rPos ) const
{
switch (meType)