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
diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx
index 2123056..00b5d5a 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 )