summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-05-08 14:31:54 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-05-09 13:34:35 -0400
commit4259df774a5785b3af7bbc92dee42ecc753b12e4 (patch)
tree827444952269c06fbd190767aba55b198809a168 /sc
parent1f083d2d288c74ffb2ae6395d163828b2a9ce4d9 (diff)
Set page style name to the sheet directly via ScDocument, not UNO API.
This alone saves about 20 or more seconds during import of large xlsx document. Change-Id: I267236afbd0284f56d4fd079042a71936db0c3e3
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/oox/pagesettings.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx
index 2123056fbc69..00b5d5a2d2f2 100644
--- a/sc/source/filter/oox/pagesettings.cxx
+++ b/sc/source/filter/oox/pagesettings.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/text/XTextCursor.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
+#include <sax/tools/converter.hxx>
#include "oox/core/xmlfilterbase.hxx"
#include "oox/helper/attributelist.hxx"
#include "oox/helper/graphichelper.hxx"
@@ -40,7 +41,7 @@
#include "excelhandlers.hxx"
#include "stylesbuffer.hxx"
#include "unitconverter.hxx"
-#include <sax/tools/converter.hxx>
+#include "document.hxx"
namespace oox {
namespace xls {
@@ -329,8 +330,9 @@ void PageSettings::finalizeImport()
PropertySet aStyleProps( xStyle );
getPageSettingsConverter().writePageSettingsProperties( aStyleProps, maModel, getSheetType() );
- PropertySet aSheetProps( getSheet() );
- aSheetProps.setProperty( PROP_PageStyle, aStyleName );
+ // Set page style name to the sheet.
+ SCTAB nTab = getSheetIndex();
+ getScDocument().SetPageStyle(nTab, aStyleName);
}
void PageSettings::importPictureData( const Relations& rRelations, const OUString& rRelId )