summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-11-21 16:46:57 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-11-22 09:07:22 -0500
commit24ff564bda7921f4b8f0e4e77adcc0d6458274da (patch)
tree129c866dd10ba51d67310d2e46533df00e4c635e /sc/source/filter
parent37b741e1eb6025d2e3637c69c31acf807a61bb05 (diff)
Set default cell style directly, without UNO API.
This also avoids unnecessary row height adjustments. Change-Id: Icfecf0a5fdf7ef18db368ebadcf9d0b8700c0b65
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/oox/worksheethelper.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index 6d0ea85cbc40..e3a4c897abe6 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -70,6 +70,8 @@
#include "tokenarray.hxx"
#include "tablebuffer.hxx"
#include "documentimport.hxx"
+#include "stlsheet.hxx"
+#include "stlpool.hxx"
#include <svl/stritem.hxx>
#include <editeng/editobj.hxx>
@@ -938,8 +940,14 @@ void WorksheetGlobals::setRowModel( const RowModel& rModel )
void WorksheetGlobals::initializeWorksheetImport()
{
// set default cell style for unused cells
- PropertySet aPropSet( mxSheet );
- aPropSet.setProperty( PROP_CellStyle, getStyles().getDefaultStyleName() );
+ ScDocumentImport& rDoc = getDocImport();
+
+ ScStyleSheet* pStyleSheet =
+ static_cast<ScStyleSheet*>(rDoc.getDoc().GetStyleSheetPool()->Find(
+ getStyles().getDefaultStyleName(), SFX_STYLE_FAMILY_PARA));
+
+ if (pStyleSheet)
+ rDoc.setCellStyleToSheet(getSheetIndex(), *pStyleSheet);
/* Remember the current sheet index in global data, needed by global
objects, e.g. the chart converter. */