summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlrowi.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2016-02-09 04:26:49 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-02-15 02:59:23 +0000
commita8232b30687879f31768b89f4ff0bcf9457a7e77 (patch)
treeeea598741d8b543303b861e2bb8f5f99f7823aca /sc/source/filter/xml/xmlrowi.cxx
parent8c125eca7f8a0dd2d59678cff2574bbccc70e536 (diff)
tdf#94858, avoid O(n^2) algorithm during outline import
The old code set called the outline visibility code for each row. Now we are just calling it once at the end of the import. Change-Id: Ie19f8bd538495cb50a7618156aed8de832885c2a Reviewed-on: https://gerrit.libreoffice.org/22239 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/filter/xml/xmlrowi.cxx')
-rw-r--r--sc/source/filter/xml/xmlrowi.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index 521209bf077a..2de0899e8443 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -26,6 +26,7 @@
#include "docuno.hxx"
#include "olinetab.hxx"
#include "sheetdata.hxx"
+#include "documentimport.hxx"
#include <xmloff/xmltkmap.hxx>
#include <xmloff/nmspmap.hxx>
@@ -39,7 +40,6 @@
#include <com/sun/star/table/CellAddress.hpp>
-#define SC_ISVISIBLE "IsVisible"
#define SC_ISFILTERED "IsFiltered"
using namespace com::sun::star;
@@ -200,7 +200,9 @@ void ScXMLTableRowContext::EndElement()
bFiltered = true;
}
if (!bVisible)
- xRowProperties->setPropertyValue(SC_ISVISIBLE, uno::makeAny(bVisible));
+ {
+ rXMLImport.GetDoc().setRowsVisible(nSheet, nFirstRow, nCurrentRow, false);
+ }
if (bFiltered)
xRowProperties->setPropertyValue(SC_ISFILTERED, uno::makeAny(bFiltered));
}