diff options
Diffstat (limited to 'sc/source/filter/xml')
-rw-r--r-- | sc/source/filter/xml/XMLColumnRowGroupExport.cxx | 7 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLColumnRowGroupExport.hxx | 1 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 23 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcelli.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 16 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.hxx | 2 |
6 files changed, 11 insertions, 40 deletions
diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx index c5bc808a120d..6ccf3cac4bc0 100644 --- a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx +++ b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx @@ -132,11 +132,6 @@ bool ScMyOpenCloseColumnRowGroup::IsGroupEnd(const sal_Int32 nField) return bGroupEnd; } -void ScMyOpenCloseColumnRowGroup::CloseGroup() -{ - rExport.EndElement( rName, true ); -} - void ScMyOpenCloseColumnRowGroup::CloseGroups(const sal_Int32 nField) { ScMyFieldGroupVec::iterator aItr(aTableEnd.begin()); @@ -145,7 +140,7 @@ void ScMyOpenCloseColumnRowGroup::CloseGroups(const sal_Int32 nField) { if (*aItr == nField) { - CloseGroup(); + rExport.EndElement( rName, true ); aItr = aTableEnd.erase(aItr); } else diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.hxx b/sc/source/filter/xml/XMLColumnRowGroupExport.hxx index 007e8a61df70..103843f6bb91 100644 --- a/sc/source/filter/xml/XMLColumnRowGroupExport.hxx +++ b/sc/source/filter/xml/XMLColumnRowGroupExport.hxx @@ -47,7 +47,6 @@ class ScMyOpenCloseColumnRowGroup ScMyFieldGroupVec aTableEnd; void OpenGroup(const ScMyColumnRowGroup& rGroup); - void CloseGroup(); public: ScMyOpenCloseColumnRowGroup(ScXMLExport& rExport, sal_uInt32 nToken); ~ScMyOpenCloseColumnRowGroup(); diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 4633eb71daa6..42780fdfac98 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -331,15 +331,6 @@ void ScXMLTableRowCellContext::LockSolarMutex() } } -void ScXMLTableRowCellContext::UnlockSolarMutex() -{ - if (bSolarMutexLocked) - { - GetScImport().UnlockSolarMutex(); - bSolarMutexLocked = false; - } -} - namespace { bool cellExists( const ScAddress& rCellPos ) @@ -1278,11 +1269,6 @@ void ScXMLTableRowCellContext::AddTextAndValueCell( const ScAddress& rCellPos, } } -bool ScXMLTableRowCellContext::HasSpecialContent() const -{ - return (mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource); -} - bool ScXMLTableRowCellContext::CellsAreRepeated() const { return ( (nColsRepeated > 1) || (nRepeatedRows > 1) ); @@ -1340,7 +1326,7 @@ void ScXMLTableRowCellContext::AddNonFormulaCell( const ScAddress& rCellPos ) } ScAddress aCurrentPos( rCellPos ); - if( HasSpecialContent() ) + if( mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource ) // has special content bIsEmpty = false; AddTextAndValueCell( rCellPos, pOUText, aCurrentPos ); @@ -1526,7 +1512,12 @@ void ScXMLTableRowCellContext::EndElement() else AddNonFormulaCell(aCellPos); - UnlockSolarMutex(); //if LockSolarMutex got used, we presumably need to ensure an UnlockSolarMutex + //if LockSolarMutex got used, we presumably need to ensure an UnlockSolarMutex + if (bSolarMutexLocked) + { + GetScImport().UnlockSolarMutex(); + bSolarMutexLocked = false; + } bIsMerged = false; nMergedCols = 1; diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx index 21a9f21b3bc6..b84be0a45a2e 100644 --- a/sc/source/filter/xml/xmlcelli.hxx +++ b/sc/source/filter/xml/xmlcelli.hxx @@ -103,9 +103,7 @@ class ScXMLTableRowCellContext : public ScXMLImportContext void SetContentValidation( const ScAddress& rScCellPos ); void LockSolarMutex(); - void UnlockSolarMutex(); - bool HasSpecialContent() const; bool CellsAreRepeated() const; void SetFormulaCell ( ScFormulaCell* pFCell ) const; diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 77d0364eda05..2e33e84ed9fe 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -508,7 +508,7 @@ void ScXMLExport::CollectSharedData(SCTAB& nTableCount, sal_Int32& nShapesCount) nTableCount = xIndex->getCount(); if (!pSharedData) - CreateSharedData(nTableCount); + pSharedData = new ScMySharedData(nTableCount); pCellStyles->AddNewTable(nTableCount - 1); @@ -3742,11 +3742,6 @@ void ScXMLExport::SetRepeatAttribute(sal_Int32 nEqualCellCount, bool bIncProgres } } -bool ScXMLExport::IsCellTypeEqual (const ScMyCell& aCell1, const ScMyCell& aCell2) -{ - return (aCell1.nType == aCell2.nType); -} - bool ScXMLExport::IsEditCell(ScMyCell& rCell) { return rCell.maBaseCell.meType == CELLTYPE_EDIT; @@ -3774,8 +3769,8 @@ bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2) { if ((((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.bIsAutoStyle == aCell2.bIsAutoStyle)) || ((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.nStyleIndex == -1))) && - (aCell1.nValidationIndex == aCell2.nValidationIndex) && - IsCellTypeEqual(aCell1, aCell2)) + aCell1.nValidationIndex == aCell2.nValidationIndex && + aCell1.nType == aCell2.nType) { switch ( aCell1.nType ) { @@ -4941,11 +4936,6 @@ XMLShapeExport* ScXMLExport::CreateShapeExport() return new ScXMLShapeExport(*this); } -void ScXMLExport::CreateSharedData(const sal_Int32 nTableCount) -{ - pSharedData = new ScMySharedData(nTableCount); -} - XMLNumberFormatAttributesExportHelper* ScXMLExport::GetNumberFormatAttributesExportHelper() { if (!pNumberFormatAttributesExportHelper) diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx index 0e3392deab00..7c56d4efc5ee 100644 --- a/sc/source/filter/xml/xmlexprt.hxx +++ b/sc/source/filter/xml/xmlexprt.hxx @@ -189,7 +189,6 @@ class ScXMLExport : public SvXMLExport void WriteTableShapes(); void SetRepeatAttribute(sal_Int32 nEqualCellCount, bool bIncProgress); - static bool IsCellTypeEqual (const ScMyCell& aCell1, const ScMyCell& aCell2); static bool IsEditCell(ScMyCell& rCell); bool IsCellEqual(ScMyCell& aCell1, ScMyCell& aCell2); @@ -253,7 +252,6 @@ public: virtual void exportAnnotationMeta( const css::uno::Reference < css::drawing::XShape >& xShape) override; - void CreateSharedData(const sal_Int32 nTableCount); void SetSharedData(ScMySharedData* pTemp) { pSharedData = pTemp; } ScMySharedData* GetSharedData() { return pSharedData; } XMLNumberFormatAttributesExportHelper* GetNumberFormatAttributesExportHelper(); |