sc/inc/document.hxx | 5 sc/source/core/data/document.cxx | 5 sc/source/filter/xml/XMLStylesExportHelper.cxx | 219 +++++-------------------- sc/source/filter/xml/XMLStylesExportHelper.hxx | 14 - sc/source/filter/xml/xmlexprt.cxx | 22 -- sc/source/filter/xml/xmlexprt.hxx | 2 sw/inc/unomap.hxx | 8 sw/source/core/unocore/unomap.cxx | 6 8 files changed, 55 insertions(+), 226 deletions(-)
New commits: commit 7dd4555fef48665351b94f5956b3932ea19cbe54 Author: Matúš Kukan <[email protected]> Date: Thu Oct 24 16:55:31 2013 +0200 remove unused class SwItemPropertySet Change-Id: I6913d5ac9ce5082a8050da26c77a4b3bcb40a699 diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx index 1b938bc..dce014f 100644 --- a/sw/inc/unomap.hxx +++ b/sw/inc/unomap.hxx @@ -306,14 +306,6 @@ #define WID_TXTCOL_AUTO_DISTANCE 6 #define WID_TXTCOL_LINE_STYLE 7 -class SwItemPropertySet : public SfxItemPropertySet -{ -protected: - virtual sal_Bool FillItem(SfxItemSet& rSet, sal_uInt16 nWhich, sal_Bool bGetProperty) const; -public: - SwItemPropertySet( const SfxItemPropertyMapEntry *pMap ) : - SfxItemPropertySet( pMap ){} -}; class SwUnoPropertyMapProvider { SfxItemPropertyMapEntry* aMapEntriesArr[PROPERTY_MAP_END]; diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index 7df9865..f63b85a 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -3120,10 +3120,4 @@ const SfxItemPropertySet* SwUnoPropertyMapProvider::GetPropertySet( sal_uInt16 return aPropertySetArr[nPropertyId]; } -sal_Bool SwItemPropertySet::FillItem(SfxItemSet& /*rSet*/, sal_uInt16 /*nWhich*/, sal_Bool /*bGetProperty*/) const -{ - sal_Bool bRet = sal_False; - return bRet; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 793ec02cc3cd53916e20e5e981662a989eff8a48 Author: Matúš Kukan <[email protected]> Date: Thu Oct 24 12:14:10 2013 +0200 remove now unused ScDocument::GetRowDefault Change-Id: I35b0a1cd86d1da9f11a9b8d3990eaa1509983243 diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 752984d..840ecf0 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1550,10 +1550,9 @@ public: // the row heights are always compared. SCROW GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCareManualSize = true) const; - // returns whether to export a Default style for this col/row or not - // nDefault is setted to one possition in the current row/col where the Default style is + // returns whether to export a Default style for this col or not + // nDefault is setted to one possition in the current row where the Default style is bool GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault); - bool GetRowDefault( SCTAB nTab, SCROW nRow, SCCOL nLastCol, SCCOL& nDefault); bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow ); bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow ); diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index ccf7d32..15e7ee5 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -4386,11 +4386,6 @@ bool ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& n return bRet; } -bool ScDocument::GetRowDefault( SCTAB /* nTab */, SCROW /* nRow */, SCCOL /* nLastCol */, SCCOL& /* nDefault */ ) -{ - return false; -} - void ScDocument::StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab ) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) commit 38d13e7066e288b727587756f45ab6a599ca6f91 Author: Matúš Kukan <[email protected]> Date: Thu Oct 24 09:16:38 2013 +0200 remove now unused ScMyDefaultStyles.maRowDefaults Also adapt to GetColDefault() being always true. Change-Id: I4701f02c540591b3d9f5095b22de82623c22c0db diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx index 4a50779..7917e82 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.cxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx @@ -454,121 +454,59 @@ const OUString& ScMyValidationsContainer::GetValidationName(const sal_Int32 nInd sal_Int32 ScMyDefaultStyles::GetStyleNameIndex(const ScFormatRangeStyles* pCellStyles, const sal_Int32 nTable, const sal_Int32 nPos, - const sal_Int32 i, const bool bRow, bool& bIsAutoStyle) + const sal_Int32 i, bool& bIsAutoStyle) { - if (bRow) - return pCellStyles->GetStyleNameIndex(nTable, nPos, i, - bIsAutoStyle); - else - return pCellStyles->GetStyleNameIndex(nTable, i, nPos, - bIsAutoStyle); + return pCellStyles->GetStyleNameIndex(nTable, i, nPos, bIsAutoStyle); } void ScMyDefaultStyles::FillDefaultStyles(const sal_Int32 nTable, const sal_Int32 nLastRow, const sal_Int32 nLastCol, - const ScFormatRangeStyles* pCellStyles, ScDocument* pDoc, - const bool bRow) + const ScFormatRangeStyles* pCellStyles, ScDocument* pDoc) { - if (pDoc) + maColDefaults.clear(); + maColDefaults.resize(nLastCol + 1); + if (!pDoc) + return ; + + SCTAB nTab = static_cast<SCTAB>(nTable); + sal_Int32 nPos; + ScMyDefaultStyleList* pDefaults = &maColDefaults; + bool bPrevAutoStyle(false); + bool bIsAutoStyle; + sal_Int32 nPrevIndex(0); + sal_Int32 nRepeat(0); + for (sal_Int32 i = nLastCol; i >= 0; --i) { - SCTAB nTab = static_cast<SCTAB>(nTable); - sal_Int32 nPos; - sal_Int32 nLast; - ScMyDefaultStyleList* pDefaults; - if (bRow) + pDoc->GetColDefault(nTab, static_cast<SCCOL>(i), static_cast<SCROW>(nLastRow), nPos); + if (!nRepeat) { - pDefaults = &maRowDefaults; - nLast = nLastRow; + nPrevIndex = GetStyleNameIndex(pCellStyles, nTab, nPos, i, bPrevAutoStyle); + (*pDefaults)[i].nIndex = nPrevIndex; + (*pDefaults)[i].bIsAutoStyle = bPrevAutoStyle; + nRepeat = 1; } else { - pDefaults = &maColDefaults; - nLast = nLastCol; - } - bool bPrevAutoStyle(false); - bool bIsAutoStyle; - bool bResult; - sal_Int32 nPrevIndex(0); - sal_Int32 nIndex; - sal_Int32 nRepeat(0); - sal_Int32 nEmptyRepeat(0); - for (sal_Int32 i = nLast; i >= 0; --i) - { - if (bRow) - { - SCCOL nCol; - bResult = pDoc->GetRowDefault(nTab, - static_cast<SCROW>(i), static_cast<SCCOL>(nLastCol), nCol); - nPos = static_cast<sal_Int32>(nCol); - } - else + sal_Int32 nIndex = GetStyleNameIndex(pCellStyles, nTab, nPos, i, bIsAutoStyle); + if ((nIndex != nPrevIndex) || (bIsAutoStyle != bPrevAutoStyle)) { - SCROW nRow; - bResult = pDoc->GetColDefault(nTab, - static_cast<SCCOL>(i), static_cast<SCROW>(nLastRow), nRow); - nPos = static_cast<sal_Int32>(nRow); - } - if (bResult) - { - nEmptyRepeat = 0; - if (!nRepeat) - { - nPrevIndex = GetStyleNameIndex(pCellStyles, nTab, nPos, i, - bRow, bPrevAutoStyle); - (*pDefaults)[i].nIndex = nPrevIndex; - (*pDefaults)[i].bIsAutoStyle = bPrevAutoStyle; - nRepeat = 1; - } - else - { - nIndex = GetStyleNameIndex(pCellStyles, nTab, nPos, i, - bRow, bIsAutoStyle); - if ((nIndex != nPrevIndex) || (bIsAutoStyle != bPrevAutoStyle)) - { - nRepeat = 1; - nPrevIndex = GetStyleNameIndex(pCellStyles, nTab, nPos, i, - bRow, bPrevAutoStyle); - (*pDefaults)[i].nIndex = nPrevIndex; - (*pDefaults)[i].bIsAutoStyle = bPrevAutoStyle; - } - else - { - (*pDefaults)[i].nIndex = nPrevIndex; - (*pDefaults)[i].bIsAutoStyle = bPrevAutoStyle; - ++nRepeat; - if (nRepeat > 1) - (*pDefaults)[i].nRepeat = nRepeat; - } - } + nRepeat = 1; + nPrevIndex = GetStyleNameIndex(pCellStyles, nTab, nPos, i, bPrevAutoStyle); + (*pDefaults)[i].nIndex = nPrevIndex; + (*pDefaults)[i].bIsAutoStyle = bPrevAutoStyle; } else { - nRepeat = 0; - if (!nEmptyRepeat) - nEmptyRepeat = 1; - else - { - ++nEmptyRepeat; - if (nEmptyRepeat > 1) - (*pDefaults)[i].nRepeat = nEmptyRepeat; - } + (*pDefaults)[i].nIndex = nPrevIndex; + (*pDefaults)[i].bIsAutoStyle = bPrevAutoStyle; + ++nRepeat; + if (nRepeat > 1) + (*pDefaults)[i].nRepeat = nRepeat; } } } } -void ScMyDefaultStyles::FillDefaultStyles(const sal_Int32 nTable, - const sal_Int32 nLastRow, const sal_Int32 nLastCol, - const ScFormatRangeStyles* pCellStyles, ScDocument* pDoc) -{ - maRowDefaults.clear(); - maRowDefaults.resize(nLastRow + 1); - FillDefaultStyles(nTable, nLastRow, nLastCol, pCellStyles, pDoc, true); - maColDefaults.clear(); - maColDefaults.resize(nLastCol + 1); - FillDefaultStyles(nTable, nLastRow, nLastCol, pCellStyles, pDoc, false); -} - ScMyRowFormatRange::ScMyRowFormatRange() : nStartColumn(0), nRepeatColumns(0), diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx index d48907b..cdb618e 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.hxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx @@ -115,23 +115,17 @@ class ScFormatRangeStyles; class ScMyDefaultStyles { - ScMyDefaultStyleList maRowDefaults; ScMyDefaultStyleList maColDefaults; sal_Int32 GetStyleNameIndex(const ScFormatRangeStyles* pCellStyles, const sal_Int32 nTable, const sal_Int32 nPos, - const sal_Int32 i, const bool bRow, bool& bIsAutoStyle); - void FillDefaultStyles(const sal_Int32 nTable, - const sal_Int32 nLastRow, const sal_Int32 nLastCol, - const ScFormatRangeStyles* pCellStyles, ScDocument* pDoc, - const bool bRow); + const sal_Int32 i, bool& bIsAutoStyle); public: void FillDefaultStyles(const sal_Int32 nTable, const sal_Int32 nLastRow, const sal_Int32 nLastCol, const ScFormatRangeStyles* pCellStyles, ScDocument* pDoc); - const ScMyDefaultStyleList* GetRowDefaults() const { return &maRowDefaults; } const ScMyDefaultStyleList* GetColDefaults() const { return &maColDefaults; } }; diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 3430419..8bc1cda 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1440,7 +1440,7 @@ void ScXMLExport::WriteRowContent() } void ScXMLExport::WriteRowStartTag( - sal_Int32 nRow, const sal_Int32 nIndex, const sal_Int32 nEqualRows, + const sal_Int32 nIndex, const sal_Int32 nEqualRows, bool bHidden, bool bFiltered) { AddAttribute(sAttrStyleName, *pRowStyles->GetStyleNameByIndex(nIndex)); @@ -1458,18 +1458,6 @@ void ScXMLExport::WriteRowStartTag( AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_ROWS_REPEATED, aBuf.makeStringAndClear()); } - const ScMyDefaultStyleList& rRowDefaults = *pDefaults->GetRowDefaults(); - if ( nRow >= sal::static_int_cast<sal_Int32>( rRowDefaults.size() ) ) - { - // used to happen with detective operations - if there are more cases, use the last row's style - OSL_FAIL("WriteRowStartTag: not enough defaults"); - nRow = rRowDefaults.size() - 1; - } - sal_Int32 nCellStyleIndex(rRowDefaults[nRow].nIndex); - if (nCellStyleIndex != -1) - AddAttribute(XML_NAMESPACE_TABLE, XML_DEFAULT_CELL_STYLE_NAME, - *pCellStyles->GetStyleNameByIndex(nCellStyleIndex, - (*pDefaults->GetRowDefaults())[nRow].bIsAutoStyle)); StartElement( sElemRow, true); } @@ -1506,17 +1494,17 @@ void ScXMLExport::OpenNewRow( nEquals = aRowHeaderRange.EndRow - nStartRow + 1; else nEquals = nEqualRows; - WriteRowStartTag(nStartRow, nIndex, nEquals, bHidden, bFiltered); + WriteRowStartTag(nIndex, nEquals, bHidden, bFiltered); nOpenRow = nStartRow + nEquals - 1; if (nEquals < nEqualRows) { CloseRow(nStartRow + nEquals - 1); - WriteRowStartTag(nStartRow, nIndex, nEqualRows - nEquals, bHidden, bFiltered); + WriteRowStartTag(nIndex, nEqualRows - nEquals, bHidden, bFiltered); nOpenRow = nStartRow + nEqualRows - 1; } } else - WriteRowStartTag(nStartRow, nIndex, nEqualRows, bHidden, bFiltered); + WriteRowStartTag(nIndex, nEqualRows, bHidden, bFiltered); } void ScXMLExport::OpenAndCloseRow( diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx index ad5e2b9..cc649bd 100644 --- a/sc/source/filter/xml/xmlexprt.hxx +++ b/sc/source/filter/xml/xmlexprt.hxx @@ -158,7 +158,7 @@ class ScXMLExport : public SvXMLExport void ExportFormatRanges(const sal_Int32 nStartCol, const sal_Int32 nStartRow, const sal_Int32 nEndCol, const sal_Int32 nEndRow, const sal_Int32 nSheet); void WriteRowContent(); - void WriteRowStartTag(sal_Int32 nRow, const sal_Int32 nIndex, const sal_Int32 nEmptyRows, bool bHidden, bool bFiltered); + void WriteRowStartTag(const sal_Int32 nIndex, const sal_Int32 nEmptyRows, bool bHidden, bool bFiltered); void OpenHeaderRows(); void CloseHeaderRows(); void OpenNewRow(const sal_Int32 nIndex, const sal_Int32 nStartRow, const sal_Int32 nEmptyRows, commit ad737687a5de397245518826211210fd08a48a4f Author: Matúš Kukan <[email protected]> Date: Wed Oct 23 21:34:09 2013 +0200 remove pRowDefaults; it was full of default values It's because ScDocument::GetRowDefault() is constant false. Change-Id: I66d688e09dadc392c27e32bcd5243273c7be02e8 diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx index a9d59ad..4a50779 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.cxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx @@ -586,7 +586,6 @@ bool ScMyRowFormatRange::operator< (const ScMyRowFormatRange& rRange) const ScRowFormatRanges::ScRowFormatRanges() : aRowFormatRanges(), - pRowDefaults(NULL), pColDefaults(NULL), nSize(0) { @@ -594,7 +593,6 @@ ScRowFormatRanges::ScRowFormatRanges() ScRowFormatRanges::ScRowFormatRanges(const ScRowFormatRanges* pRanges) : aRowFormatRanges(pRanges->aRowFormatRanges), - pRowDefaults(pRanges->pRowDefaults), pColDefaults(pRanges->pColDefaults), nSize(pRanges->nSize) { @@ -650,54 +648,13 @@ void ScRowFormatRanges::AddRange(const sal_Int32 nPrevStartCol, const sal_Int32 } } -void ScRowFormatRanges::AddRange(ScMyRowFormatRange& rFormatRange, - const sal_Int32 nRow) +void ScRowFormatRanges::AddRange(ScMyRowFormatRange& rFormatRange) { - OSL_ENSURE(pRowDefaults, "no row defaults"); - if (!pRowDefaults) - return; OSL_ENSURE(pColDefaults, "no column defaults"); if (!pColDefaults) return; - sal_Int32 nPrevIndex; - bool bPrevAutoStyle; - OSL_ENSURE( static_cast<size_t>(nRow) < pRowDefaults->size(), "nRow out of bounds"); - if (!(static_cast<size_t>(nRow) < pRowDefaults->size())) - { - /* This is only to prevent out-of-bounds accesses, once reached here - * there's something else going wrong, so FIXME there! */ - if (pRowDefaults->empty()) - { - nPrevIndex = -1; - bPrevAutoStyle = false; - } - else - { - nPrevIndex = (*pRowDefaults)[pRowDefaults->size()-1].nIndex; - bPrevAutoStyle = (*pRowDefaults)[pRowDefaults->size()-1].bIsAutoStyle; - } - } - else - { - nPrevIndex = (*pRowDefaults)[nRow].nIndex; - bPrevAutoStyle = (*pRowDefaults)[nRow].bIsAutoStyle; - } - sal_uInt32 nEnd (rFormatRange.nRepeatRows + nRow - 1); - sal_uInt32 i(nRow + 1); - bool bReady(false); - while ((i < nEnd) && !bReady && (i < pRowDefaults->size())) - { - if ((nPrevIndex != (*pRowDefaults)[i].nIndex) || - (bPrevAutoStyle != (*pRowDefaults)[i].bIsAutoStyle)) - bReady = true; - else - i += (*pRowDefaults)[i].nRepeat; - } - if (i > nEnd) - i = nEnd; - if (bReady) - rFormatRange.nRepeatRows = i - nRow + 1; - if (nPrevIndex == -1) + sal_Int32 nPrevIndex = -1; + bool bPrevAutoStyle = true; { sal_uInt32 nPrevStartCol(rFormatRange.nStartColumn); OSL_ENSURE( static_cast<size_t>(nPrevStartCol) < pColDefaults->size(), "nPrevStartCol out of bounds"); @@ -725,8 +682,8 @@ void ScRowFormatRanges::AddRange(ScMyRowFormatRange& rFormatRange, bPrevAutoStyle = (*pColDefaults)[pColDefaults->size()-1].bIsAutoStyle; } } - nEnd = nPrevStartCol + rFormatRange.nRepeatColumns; - for(i = nPrevStartCol + nRepeat; i < nEnd && i < pColDefaults->size(); i += (*pColDefaults)[i].nRepeat) + sal_uInt32 nEnd = nPrevStartCol + rFormatRange.nRepeatColumns; + for(sal_uInt32 i = nPrevStartCol + nRepeat; i < nEnd && i < pColDefaults->size(); i += (*pColDefaults)[i].nRepeat) { OSL_ENSURE(sal_uInt32(nPrevStartCol + nRepeat) <= nEnd, "something wents wrong"); if ((nPrevIndex != (*pColDefaults)[i].nIndex) || @@ -745,13 +702,6 @@ void ScRowFormatRanges::AddRange(ScMyRowFormatRange& rFormatRange, nRepeat = nEnd - nPrevStartCol; AddRange(nPrevStartCol, nRepeat, nPrevIndex, bPrevAutoStyle, rFormatRange); } - else if ((nPrevIndex == rFormatRange.nIndex) && - (bPrevAutoStyle == rFormatRange.bIsAutoStyle)) - { - rFormatRange.nIndex = -1; - aRowFormatRanges.push_back(rFormatRange); - ++nSize; - } } bool ScRowFormatRanges::GetNext(ScMyRowFormatRange& aFormatRange) @@ -821,7 +771,6 @@ ScFormatRangeStyles::ScFormatRangeStyles() : aTables(), aStyleNames(), aAutoStyleNames(), - pRowDefaults(0), pColDefaults(0) { } @@ -987,28 +936,14 @@ sal_Int32 ScFormatRangeStyles::GetStyleNameIndex(const sal_Int32 nTable, const s bIsAutoStyle = aItr->bIsAutoStyle; nValidationIndex = aItr->nValidationIndex; nNumberFormat = aItr->nNumberFormat; - /* out-of-bounds is an error elsewhere, so FIXME there! */ - OSL_ENSURE( static_cast<size_t>(nRow) < pRowDefaults->size(), "nRow out of bounds"); - if (static_cast<size_t>(nRow) < pRowDefaults->size() && - ((*pRowDefaults)[nRow].nIndex != -1)) - { - if (((*pRowDefaults)[nRow].nIndex == (*aItr).nStyleNameIndex) && - ((*pRowDefaults)[nRow].bIsAutoStyle == (*aItr).bIsAutoStyle)) - return -1; - else - return (*aItr).nStyleNameIndex; - } + OSL_ENSURE( static_cast<size_t>(nColumn) < pColDefaults->size(), "nColumn out of bounds"); + if (static_cast<size_t>(nColumn) < pColDefaults->size() && + ((*pColDefaults)[nColumn].nIndex != -1) && + ((*pColDefaults)[nColumn].nIndex == (*aItr).nStyleNameIndex) && + ((*pColDefaults)[nColumn].bIsAutoStyle == (*aItr).bIsAutoStyle)) + return -1; else - { - OSL_ENSURE( static_cast<size_t>(nColumn) < pColDefaults->size(), "nColumn out of bounds"); - if (static_cast<size_t>(nColumn) < pColDefaults->size() && - ((*pColDefaults)[nColumn].nIndex != -1) && - ((*pColDefaults)[nColumn].nIndex == (*aItr).nStyleNameIndex) && - ((*pColDefaults)[nColumn].bIsAutoStyle == (*aItr).bIsAutoStyle)) - return -1; - else - return (*aItr).nStyleNameIndex; - } + return (*aItr).nStyleNameIndex; } else { @@ -1072,7 +1007,7 @@ void ScFormatRangeStyles::GetFormatRanges(const sal_Int32 nStartColumn, const sa aRange.nStartColumn = aItr->aRangeAddress.StartColumn; } aRange.nRepeatRows = aItr->aRangeAddress.EndRow - nRow + 1; - pRowFormatRanges->AddRange(aRange, nRow); + pRowFormatRanges->AddRange(aRange); nColumns += aRange.nRepeatColumns; } ++aItr; diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx index 1a841a4..d48907b 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.hxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx @@ -152,7 +152,6 @@ class ScRowFormatRanges { typedef std::list<ScMyRowFormatRange> ScMyRowFormatRangesList; ScMyRowFormatRangesList aRowFormatRanges; - const ScMyDefaultStyleList* pRowDefaults; const ScMyDefaultStyleList* pColDefaults; sal_uInt32 nSize; @@ -164,10 +163,9 @@ public: ScRowFormatRanges(const ScRowFormatRanges* pRanges); ~ScRowFormatRanges(); - void SetRowDefaults(const ScMyDefaultStyleList* pDefaults) { pRowDefaults = pDefaults; } void SetColDefaults(const ScMyDefaultStyleList* pDefaults) { pColDefaults = pDefaults; } void Clear(); - void AddRange(ScMyRowFormatRange& rFormatRange, const sal_Int32 nStartRow); + void AddRange(ScMyRowFormatRange& rFormatRange); bool GetNext(ScMyRowFormatRange& rFormatRange); sal_Int32 GetMaxRows() const; sal_Int32 GetSize() const; @@ -196,14 +194,12 @@ class ScFormatRangeStyles ScMyFormatRangeListVec aTables; ScMyOUStringVec aStyleNames; ScMyOUStringVec aAutoStyleNames; - const ScMyDefaultStyleList* pRowDefaults; const ScMyDefaultStyleList* pColDefaults; public: ScFormatRangeStyles(); ~ScFormatRangeStyles(); - void SetRowDefaults(const ScMyDefaultStyleList* pDefaults) { pRowDefaults = pDefaults; } void SetColDefaults(const ScMyDefaultStyleList* pDefaults) { pColDefaults = pDefaults; } void AddNewTable(const sal_Int32 nTable); bool AddStyleName(OUString* pString, sal_Int32& rIndex, const bool bIsAutoStyle = true); diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 9dc411d..3430419 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -2988,9 +2988,7 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const Reference<sheet::XSpreadshe pSharedData->SetLastRow(nTable, aRowHeaderRange.EndRow); pDefaults->FillDefaultStyles(nTable, pSharedData->GetLastRow(nTable), pSharedData->GetLastColumn(nTable), pCellStyles, pDoc); - pRowFormatRanges->SetRowDefaults(pDefaults->GetRowDefaults()); pRowFormatRanges->SetColDefaults(pDefaults->GetColDefaults()); - pCellStyles->SetRowDefaults(pDefaults->GetRowDefaults()); pCellStyles->SetColDefaults(pDefaults->GetColDefaults()); ExportColumns(nTable, aColumnHeaderRange, bHasColumnHeader); bool bIsFirst(true);
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
