sc/source/filter/inc/stylesbuffer.hxx | 3 ++- sc/source/filter/oox/sheetdatabuffer.cxx | 5 +++-- sc/source/filter/oox/stylesbuffer.cxx | 7 +++++-- 3 files changed, 10 insertions(+), 5 deletions(-)
New commits: commit 1be6c440c645e441af0e04ba7711e4b2d80aad63 Author: Markus Mohrhard <[email protected]> Date: Tue Apr 19 01:47:52 2016 +0200 use the column style for as default, tdf#71897 Change-Id: I583235c28957a203df843d65887b4ca05f2a81ae Reviewed-on: https://gerrit.libreoffice.org/24230 Reviewed-by: Markus Mohrhard <[email protected]> Tested-by: Markus Mohrhard <[email protected]> diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx index dcad8cd..1b54809 100644 --- a/sc/source/filter/inc/stylesbuffer.hxx +++ b/sc/source/filter/inc/stylesbuffer.hxx @@ -624,8 +624,9 @@ public: { std::list<ScAttrEntry> maAttrs; bool mbLatinNumFmtOnly; + const ScPatternAttr* mpDefPattern; - AttrList(); + AttrList(const ScPatternAttr* pDefPatternAttr); }; explicit Xf( const WorkbookHelper& rHelper ); diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx index 06768e3..3909e38 100644 --- a/sc/source/filter/oox/sheetdatabuffer.cxx +++ b/sc/source/filter/oox/sheetdatabuffer.cxx @@ -501,8 +501,9 @@ void SheetDataBuffer::finalizeImport() for ( ColStyles::iterator col = maStylesPerColumn.begin(), col_end = maStylesPerColumn.end(); col != col_end; ++col ) { RowStyles& rRowStyles = col->second; - Xf::AttrList aAttrs; SCCOL nScCol = static_cast< SCCOL >( col->first ); + const ScPatternAttr* pDefPattern = rDoc.getDoc().GetPattern(nScCol, 0, getSheetIndex()); + Xf::AttrList aAttrs(pDefPattern); for ( RowStyles::iterator rRows = rRowStyles.begin(), rRows_end = rRowStyles.end(); rRows != rRows_end; ++rRows ) { Xf* pXf = rStyles.getCellXf( rRows->mnNumFmt.first ).get(); @@ -514,7 +515,7 @@ void SheetDataBuffer::finalizeImport() { ScAttrEntry aEntry; aEntry.nRow = MAXROW; - aEntry.pPattern = rDoc.getDoc().GetPattern(nScCol, 0, getSheetIndex()); + aEntry.pPattern = pDefPattern; rDoc.getDoc().GetPool()->Put(*aEntry.pPattern); aAttrs.maAttrs.push_back(aEntry); diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index 1e48469..4ebe396 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -2051,7 +2051,10 @@ XfModel::XfModel() : { } -Xf::AttrList::AttrList() : mbLatinNumFmtOnly(true) {} +Xf::AttrList::AttrList(const ScPatternAttr* pDefPattern): + mbLatinNumFmtOnly(true), + mpDefPattern(pDefPattern) +{} Xf::Xf( const WorkbookHelper& rHelper ) : WorkbookHelper( rHelper ), @@ -2181,7 +2184,7 @@ void Xf::applyPatternToAttrList( AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal // Fill this gap with the default pattern. ScAttrEntry aEntry; aEntry.nRow = nRow1 - 1; - aEntry.pPattern = rDoc.GetDefPattern(); + aEntry.pPattern = static_cast<const ScPatternAttr*>(&rDoc.GetPool()->Put(*rAttrs.mpDefPattern)); rAttrs.maAttrs.push_back(aEntry); // Check if the default pattern is 'General'. _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
