diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-14 16:53:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-15 07:02:36 +0100 |
commit | aa58c380894dd384f6ce1efc62b3932136f2f477 (patch) | |
tree | ca6af6905afd398da0541c71733393540ab8be2e /sc | |
parent | 0cb4f304abf6f8dd6b40eb800788d2fe80581813 (diff) |
convert XML_STYLE_FAMILY to scoped enum
Change-Id: I5335b0190a2f5a8111993c0c9c224c8a6a8f0cfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88723
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/sheetdata.hxx | 3 | ||||
-rw-r--r-- | sc/source/filter/xml/sheetdata.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlannoi.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlannoi.hxx | 11 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcoli.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 78 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexternaltabi.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlrowi.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlstyle.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlstyle.hxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlstyli.cxx | 96 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlstyli.hxx | 18 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlsubti.cxx | 2 |
15 files changed, 124 insertions, 116 deletions
diff --git a/sc/inc/sheetdata.hxx b/sc/inc/sheetdata.hxx index 5b2265c1d5a1..9d36ee9b52c7 100644 --- a/sc/inc/sheetdata.hxx +++ b/sc/inc/sheetdata.hxx @@ -28,6 +28,7 @@ #include "address.hxx" class SvXMLNamespaceMap; +enum class XmlStyleFamily; struct ScStreamEntry { @@ -134,7 +135,7 @@ public: void AddTableStyle( const OUString& rName, const ScAddress& rCellPos ); void HandleNoteStyles( const OUString& rStyleName, const OUString& rTextName, const ScAddress& rCellPos ); - void AddNoteContentStyle( sal_uInt16 nFamily, const OUString& rName, const ScAddress& rCellPos, const ESelection& rSelection ); + void AddNoteContentStyle( XmlStyleFamily nFamily, const OUString& rName, const ScAddress& rCellPos, const ESelection& rSelection ); void AddTextStyle( const OUString& rName, const ScAddress& rCellPos, const ESelection& rSelection ); diff --git a/sc/source/filter/xml/sheetdata.cxx b/sc/source/filter/xml/sheetdata.cxx index c8796d9f691a..98f91eae5811 100644 --- a/sc/source/filter/xml/sheetdata.cxx +++ b/sc/source/filter/xml/sheetdata.cxx @@ -74,9 +74,9 @@ void ScSheetSaveData::HandleNoteStyles( const OUString& rStyleName, const OUStri maNoteStyles.push_back( aNewEntry ); } -void ScSheetSaveData::AddNoteContentStyle( sal_uInt16 nFamily, const OUString& rName, const ScAddress& rCellPos, const ESelection& rSelection ) +void ScSheetSaveData::AddNoteContentStyle( XmlStyleFamily nFamily, const OUString& rName, const ScAddress& rCellPos, const ESelection& rSelection ) { - if ( nFamily == XML_STYLE_FAMILY_TEXT_PARAGRAPH ) + if ( nFamily == XmlStyleFamily::TEXT_PARAGRAPH ) maNoteParaStyles.emplace_back( rName, rCellPos, rSelection ); else maNoteTextStyles.emplace_back( rName, rCellPos, rSelection ); diff --git a/sc/source/filter/xml/xmlannoi.cxx b/sc/source/filter/xml/xmlannoi.cxx index d84b297b5084..55b6df72510c 100644 --- a/sc/source/filter/xml/xmlannoi.cxx +++ b/sc/source/filter/xml/xmlannoi.cxx @@ -173,7 +173,7 @@ void ScXMLAnnotationContext::SetShape( const uno::Reference< drawing::XShape >& mrAnnotationData.maTextStyle = rTextStyle; } -void ScXMLAnnotationContext::AddContentStyle( sal_uInt16 nFamily, const OUString& rName, const ESelection& rSelection ) +void ScXMLAnnotationContext::AddContentStyle( XmlStyleFamily nFamily, const OUString& rName, const ESelection& rSelection ) { mrAnnotationData.maContentStyles.emplace_back( nFamily, rName, rSelection ); } diff --git a/sc/source/filter/xml/xmlannoi.hxx b/sc/source/filter/xml/xmlannoi.hxx index 22f8576d2b3f..55fd7f8a909a 100644 --- a/sc/source/filter/xml/xmlannoi.hxx +++ b/sc/source/filter/xml/xmlannoi.hxx @@ -27,16 +27,17 @@ #include <vector> class ScXMLImport; +enum class XmlStyleFamily; namespace com { namespace sun { namespace star { namespace drawing { class XShape; } } } } namespace com { namespace sun { namespace star { namespace drawing { class XShapes; } } } } struct ScXMLAnnotationStyleEntry { - sal_uInt16 const mnFamily; - OUString const maName; - ESelection const maSelection; + XmlStyleFamily mnFamily; + OUString maName; + ESelection maSelection; - ScXMLAnnotationStyleEntry( sal_uInt16 nFam, const OUString& rNam, const ESelection& rSel ) : + ScXMLAnnotationStyleEntry( XmlStyleFamily nFam, const OUString& rNam, const ESelection& rSel ) : mnFamily( nFam ), maName( rNam ), maSelection( rSel ) @@ -89,7 +90,7 @@ public: const css::uno::Reference< css::drawing::XShapes >& rxShapes, const OUString& rStyleName, const OUString& rTextStyle ); - void AddContentStyle( sal_uInt16 nFamily, const OUString& rName, const ESelection& rSelection ); + void AddContentStyle( XmlStyleFamily nFamily, const OUString& rName, const ESelection& rSelection ); private: ScXMLAnnotationData& mrAnnotationData; diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 918a103158e8..7baff729c77b 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -352,7 +352,7 @@ void ScXMLTableRowCellContext::PushFormat(sal_Int32 nBegin, sal_Int32 nEnd, cons // Style name for text span corresponds with the name of an automatic style. const XMLPropStyleContext* pStyle = dynamic_cast<const XMLPropStyleContext*>( - pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TEXT_TEXT, rStyleName)); + pAutoStyles->FindStyleChildContext(XmlStyleFamily::TEXT_TEXT, rStyleName)); if (!pStyle) // No style by that name found. diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx index 96af8cd7f39a..8e372b2ae7f3 100644 --- a/sc/source/filter/xml/xmlcoli.cxx +++ b/sc/source/filter/xml/xmlcoli.cxx @@ -111,7 +111,7 @@ void SAL_CALL ScXMLTableColContext::endFastElement( sal_Int32 /*nElement*/ ) if ( pStyles ) { XMLTableStyleContext* pStyle = const_cast<XMLTableStyleContext*>(static_cast<const XMLTableStyleContext *>(pStyles->FindStyleChildContext( - XML_STYLE_FAMILY_TABLE_COLUMN, sStyleName, true))); + XmlStyleFamily::TABLE_COLUMN, sStyleName, true))); if (pStyle) { pStyle->FillPropertySet(xColumnProperties); diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 4049cdb4a244..59e8088d4acf 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -379,13 +379,13 @@ ScXMLExport::ScXMLExport( xRowStylesExportPropertySetMapper = new ScXMLRowExportPropertyMapper(xRowStylesPropertySetMapper); xTableStylesExportPropertySetMapper = new ScXMLTableExportPropertyMapper(xTableStylesPropertySetMapper); - GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_CELL, XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME, + GetAutoStylePool()->AddFamily(XmlStyleFamily::TABLE_CELL, XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME, xCellStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX); - GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_COLUMN, XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME, + GetAutoStylePool()->AddFamily(XmlStyleFamily::TABLE_COLUMN, XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME, xColumnStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX); - GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_ROW, XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME, + GetAutoStylePool()->AddFamily(XmlStyleFamily::TABLE_ROW, XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME, xRowStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX); - GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_TABLE, XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME, + GetAutoStylePool()->AddFamily(XmlStyleFamily::TABLE_TABLE, XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME, xTableStylesExportPropertySetMapper, XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX); if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) ) @@ -394,7 +394,7 @@ ScXMLExport::ScXMLExport( // should not conflict with user-defined styles since this name is // used for a table style which is not available in the UI. sExternalRefTabStyleName = "ta_extref"; - GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TABLE_TABLE, sExternalRefTabStyleName); + GetAutoStylePool()->RegisterName(XmlStyleFamily::TABLE_TABLE, sExternalRefTabStyleName); sAttrName = GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TABLE, GetXMLToken(XML_NAME)); sAttrStyleName = GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TABLE, GetXMLToken(XML_STYLE_NAME)); @@ -905,7 +905,7 @@ void ScXMLExport::ExportExternalRefCacheStyles() OUString aName; sal_Int32 nIndex; - if (GetAutoStylePool()->Add(aName, XML_STYLE_FAMILY_TABLE_CELL, aDefaultStyle, aProps)) + if (GetAutoStylePool()->Add(aName, XmlStyleFamily::TABLE_CELL, aDefaultStyle, aProps)) { pCellStyles->AddStyleName(aName, nIndex); } @@ -1266,7 +1266,7 @@ void ScXMLExport::ExportCellTextAutoStyles(sal_Int32 nTable) std::vector<XMLPropertyState> aPropStates; toXMLPropertyStates(aPropStates, rSecAttrs, xMapper, rAttrMap); if (!aPropStates.empty()) - xStylePool->Add(XML_STYLE_FAMILY_TEXT_TEXT, OUString(), aPropStates); + xStylePool->Add(XmlStyleFamily::TEXT_TEXT, OUString(), aPropStates); } } @@ -1847,7 +1847,7 @@ void ScXMLExport::RegisterDefinedStyleNames( const uno::Reference< css::sheet::X auto xAutoStylePool = GetAutoStylePool(); for (const auto& rFormatInfo : pFormatData->maIDToName) { - xAutoStylePool->RegisterDefinedName(XML_STYLE_FAMILY_TABLE_CELL, rFormatInfo.second); + xAutoStylePool->RegisterDefinedName(XmlStyleFamily::TABLE_CELL, rFormatInfo.second); } } @@ -1998,7 +1998,7 @@ void ScXMLExport::ExportStyles_( bool bUsed ) exportDataStyles(); aStylesExp->exportStyleFamily(OUString("CellStyles"), - OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME), xCellStylesExportPropertySetMapper, false, XML_STYLE_FAMILY_TABLE_CELL); + OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME), xCellStylesExportPropertySetMapper, false, XmlStyleFamily::TABLE_CELL); SvXMLExport::ExportStyles_(bUsed); } @@ -2079,9 +2079,9 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x sal_Int32 nIndex; if (pOldName) { - if (GetAutoStylePool()->AddNamed(*pOldName, XML_STYLE_FAMILY_TABLE_CELL, sStyleName, aPropStates)) + if (GetAutoStylePool()->AddNamed(*pOldName, XmlStyleFamily::TABLE_CELL, sStyleName, aPropStates)) { - GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TABLE_CELL, *pOldName); + GetAutoStylePool()->RegisterName(XmlStyleFamily::TABLE_CELL, *pOldName); // add to pCellStyles, so the name is found for normal sheets pCellStyles->AddStyleName(*pOldName, nIndex); } @@ -2098,13 +2098,13 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x if (itr != pFormatData->maIDToName.end()) { sName = itr->second; - bAdded = GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TABLE_CELL, sStyleName, aPropStates); + bAdded = GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::TABLE_CELL, sStyleName, aPropStates); if (bAdded) - GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TABLE_CELL, sName); + GetAutoStylePool()->RegisterName(XmlStyleFamily::TABLE_CELL, sName); } } bool bIsAutoStyle(true); - if (bAdded || GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_CELL, sStyleName, aPropStates)) + if (bAdded || GetAutoStylePool()->Add(sName, XmlStyleFamily::TABLE_CELL, sStyleName, aPropStates)) { pCellStyles->AddStyleName(sName, nIndex); } @@ -2165,9 +2165,9 @@ void ScXMLExport::AddStyleFromColumn(const uno::Reference<beans::XPropertySet>& OUString sParent; if (pOldName) { - if (GetAutoStylePool()->AddNamed(*pOldName, XML_STYLE_FAMILY_TABLE_COLUMN, sParent, aPropStates)) + if (GetAutoStylePool()->AddNamed(*pOldName, XmlStyleFamily::TABLE_COLUMN, sParent, aPropStates)) { - GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TABLE_COLUMN, *pOldName); + GetAutoStylePool()->RegisterName(XmlStyleFamily::TABLE_COLUMN, *pOldName); // add to pColumnStyles, so the name is found for normal sheets rIndex = pColumnStyles->AddStyleName(*pOldName); } @@ -2175,7 +2175,7 @@ void ScXMLExport::AddStyleFromColumn(const uno::Reference<beans::XPropertySet>& else { OUString sName; - if (GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_COLUMN, sParent, aPropStates)) + if (GetAutoStylePool()->Add(sName, XmlStyleFamily::TABLE_COLUMN, sParent, aPropStates)) { rIndex = pColumnStyles->AddStyleName(sName); } @@ -2194,9 +2194,9 @@ void ScXMLExport::AddStyleFromRow(const uno::Reference<beans::XPropertySet>& xRo OUString sParent; if (pOldName) { - if (GetAutoStylePool()->AddNamed(*pOldName, XML_STYLE_FAMILY_TABLE_ROW, sParent, aPropStates)) + if (GetAutoStylePool()->AddNamed(*pOldName, XmlStyleFamily::TABLE_ROW, sParent, aPropStates)) { - GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TABLE_ROW, *pOldName); + GetAutoStylePool()->RegisterName(XmlStyleFamily::TABLE_ROW, *pOldName); // add to pRowStyles, so the name is found for normal sheets rIndex = pRowStyles->AddStyleName(*pOldName); } @@ -2204,7 +2204,7 @@ void ScXMLExport::AddStyleFromRow(const uno::Reference<beans::XPropertySet>& xRo else { OUString sName; - if (GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_ROW, sParent, aPropStates)) + if (GetAutoStylePool()->Add(sName, XmlStyleFamily::TABLE_ROW, sParent, aPropStates)) { rIndex = pRowStyles->AddStyleName(sName); } @@ -2338,8 +2338,8 @@ void ScXMLExport::collectAutoStyles() { std::vector<XMLPropertyState> aPropStates(xTableStylesExportPropertySetMapper->Filter(xTableProperties)); OUString sName( rTableEntry.maName ); - GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TABLE_TABLE, OUString(), aPropStates); - GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TABLE_TABLE, sName); + GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::TABLE_TABLE, OUString(), aPropStates); + GetAutoStylePool()->RegisterName(XmlStyleFamily::TABLE_TABLE, sName); } } } @@ -2372,16 +2372,16 @@ void ScXMLExport::collectAutoStyles() { std::vector<XMLPropertyState> aPropStates(xShapeMapper->Filter(xShapeProperties)); OUString sName( rNoteEntry.maStyleName ); - GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_SD_GRAPHICS_ID, OUString(), aPropStates); - GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_SD_GRAPHICS_ID, sName); + GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::SD_GRAPHICS_ID, OUString(), aPropStates); + GetAutoStylePool()->RegisterName(XmlStyleFamily::SD_GRAPHICS_ID, sName); } if ( !rNoteEntry.maTextStyle.isEmpty() ) { std::vector<XMLPropertyState> aPropStates( GetTextParagraphExport()->GetParagraphPropertyMapper()->Filter(xShapeProperties)); OUString sName( rNoteEntry.maTextStyle ); - GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_PARAGRAPH, OUString(), aPropStates); - GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TEXT_PARAGRAPH, sName); + GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::TEXT_PARAGRAPH, OUString(), aPropStates); + GetAutoStylePool()->RegisterName(XmlStyleFamily::TEXT_PARAGRAPH, sName); } } } @@ -2412,8 +2412,8 @@ void ScXMLExport::collectAutoStyles() { std::vector<XMLPropertyState> aPropStates(xParaPropMapper->Filter(xParaProp)); OUString sName( rNoteParaEntry.maName ); - GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_PARAGRAPH, OUString(), aPropStates); - GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TEXT_PARAGRAPH, sName); + GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::TEXT_PARAGRAPH, OUString(), aPropStates); + GetAutoStylePool()->RegisterName(XmlStyleFamily::TEXT_PARAGRAPH, sName); } } } @@ -2445,8 +2445,8 @@ void ScXMLExport::collectAutoStyles() std::vector<XMLPropertyState> aPropStates(xTextPropMapper->Filter(xCursorProp)); OUString sName( rNoteTextEntry.maName ); - GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_TEXT, OUString(), aPropStates); - GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TEXT_TEXT, sName); + GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::TEXT_TEXT, OUString(), aPropStates); + GetAutoStylePool()->RegisterName(XmlStyleFamily::TEXT_TEXT, sName); } } } @@ -2486,8 +2486,8 @@ void ScXMLExport::collectAutoStyles() std::vector<XMLPropertyState> aPropStates(xTextPropMapper->Filter(xCursorProp)); OUString sName( rTextEntry.maName ); - GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_TEXT, OUString(), aPropStates); - GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TEXT_TEXT, sName); + GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::TEXT_TEXT, OUString(), aPropStates); + GetAutoStylePool()->RegisterName(XmlStyleFamily::TEXT_TEXT, sName); xPrevCursorProp = xCursorProp; aPrevPos = aPos; } @@ -2518,7 +2518,7 @@ void ScXMLExport::collectAutoStyles() if(!aPropStates.empty()) { OUString sName; - GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_TABLE, OUString(), aPropStates); + GetAutoStylePool()->Add(sName, XmlStyleFamily::TABLE_TABLE, OUString(), aPropStates); aTableStyles.push_back(sName); } } @@ -2641,11 +2641,11 @@ void ScXMLExport::ExportAutoStyles_() if (getExportFlags() & SvXMLExportFlags::CONTENT) { - GetAutoStylePool()->exportXML(XML_STYLE_FAMILY_TABLE_COLUMN); - GetAutoStylePool()->exportXML(XML_STYLE_FAMILY_TABLE_ROW); - GetAutoStylePool()->exportXML(XML_STYLE_FAMILY_TABLE_TABLE); + GetAutoStylePool()->exportXML(XmlStyleFamily::TABLE_COLUMN); + GetAutoStylePool()->exportXML(XmlStyleFamily::TABLE_ROW); + GetAutoStylePool()->exportXML(XmlStyleFamily::TABLE_TABLE); exportAutoDataStyles(); - GetAutoStylePool()->exportXML(XML_STYLE_FAMILY_TABLE_CELL); + GetAutoStylePool()->exportXML(XmlStyleFamily::TABLE_CELL); GetShapeExport()->exportAutoStyles(); GetFormExport()->exportAutoStyles( ); @@ -3123,7 +3123,7 @@ void flushParagraph( std::vector<XMLPropertyState> aPropStates; const SvxFieldData* pField = toXMLPropertyStates(aPropStates, rSec.maAttributes, xMapper, rAttrMap); - OUString aStyleName = xStylePool->Find(XML_STYLE_FAMILY_TEXT_TEXT, OUString(), aPropStates); + OUString aStyleName = xStylePool->Find(XmlStyleFamily::TEXT_TEXT, OUString(), aPropStates); writeContent(rExport, aStyleName, aContent, pField); } } @@ -5250,7 +5250,7 @@ ErrCode ScXMLExport::exportDoc( enum XMLTokenEnum eClass ) { xRowStylesPropertySetMapper = new XMLPropertySetMapper(aXMLScFromXLSRowStylesProperties, xScPropHdlFactory, true); xRowStylesExportPropertySetMapper = new ScXMLRowExportPropertyMapper(xRowStylesPropertySetMapper); - GetAutoStylePool()->SetFamilyPropSetMapper( XML_STYLE_FAMILY_TABLE_ROW, + GetAutoStylePool()->SetFamilyPropSetMapper( XmlStyleFamily::TABLE_ROW, xRowStylesExportPropertySetMapper ); } } diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx b/sc/source/filter/xml/xmlexternaltabi.cxx index a442f1418dc2..c8748eb7cf0e 100644 --- a/sc/source/filter/xml/xmlexternaltabi.cxx +++ b/sc/source/filter/xml/xmlexternaltabi.cxx @@ -246,7 +246,7 @@ ScXMLExternalRefCellContext::ScXMLExternalRefCellContext( { XMLTableStylesContext* pStyles = static_cast<XMLTableStylesContext*>(mrScImport.GetAutoStyles()); const XMLTableStyleContext* pStyle = static_cast<const XMLTableStyleContext*>( - pStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_CELL, it.toString(), true)); + pStyles->FindStyleChildContext(XmlStyleFamily::TABLE_CELL, it.toString(), true)); if (pStyle) mnNumberFormat = const_cast<XMLTableStyleContext*>(pStyle)->GetNumberFormat(); } diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 4fda0e3c5583..6d751eaa1313 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -1288,7 +1288,7 @@ void ScXMLImport::SetStyleToRanges() XMLTableStyleContext* pStyle = nullptr; if ( pStyles ) pStyle = const_cast<XMLTableStyleContext*>(static_cast<const XMLTableStyleContext *>(pStyles->FindStyleChildContext( - XML_STYLE_FAMILY_TABLE_CELL, sPrevStyleName, true))); + XmlStyleFamily::TABLE_CELL, sPrevStyleName, true))); if (pStyle) { pStyle->FillPropertySet(xProperties); @@ -1321,7 +1321,7 @@ void ScXMLImport::SetStyleToRanges() } else { - xProperties->setPropertyValue(gsCellStyle, uno::makeAny(GetStyleDisplayName( XML_STYLE_FAMILY_TABLE_CELL, sPrevStyleName ))); + xProperties->setPropertyValue(gsCellStyle, uno::makeAny(GetStyleDisplayName( XmlStyleFamily::TABLE_CELL, sPrevStyleName ))); sal_Int32 nNumberFormat(GetStyleNumberFormats()->GetStyleNumberFormat(sPrevStyleName)); bool bInsert(nNumberFormat == -1); SetType(xProperties, nNumberFormat, nPrevCellType, sPrevCurrency); diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx index e4d364f40d44..b5edafe287d9 100644 --- a/sc/source/filter/xml/xmlrowi.cxx +++ b/sc/source/filter/xml/xmlrowi.cxx @@ -165,7 +165,7 @@ void SAL_CALL ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/) if ( pStyles ) { XMLTableStyleContext* pStyle(const_cast<XMLTableStyleContext*>(static_cast<const XMLTableStyleContext *>(pStyles->FindStyleChildContext( - XML_STYLE_FAMILY_TABLE_ROW, sStyleName, true)))); + XmlStyleFamily::TABLE_ROW, sStyleName, true)))); if (pStyle) { pStyle->FillPropertySet(xRowProperties); diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx index a8ca7bbdce59..5283b97f24a7 100644 --- a/sc/source/filter/xml/xmlstyle.cxx +++ b/sc/source/filter/xml/xmlstyle.cxx @@ -605,7 +605,7 @@ void ScXMLTableExportPropertyMapper::handleSpecialItem( void ScXMLAutoStylePoolP::exportStyleAttributes( SvXMLAttributeList& rAttrList, - sal_Int32 nFamily, + XmlStyleFamily nFamily, const ::std::vector< XMLPropertyState >& rProperties, const SvXMLExportPropertyMapper& rPropExp , const SvXMLUnitConverter& rUnitConverter, @@ -613,7 +613,7 @@ void ScXMLAutoStylePoolP::exportStyleAttributes( ) const { SvXMLAutoStylePoolP::exportStyleAttributes( rAttrList, nFamily, rProperties, rPropExp, rUnitConverter, rNamespaceMap ); - if (nFamily == XML_STYLE_FAMILY_TABLE_CELL) + if (nFamily == XmlStyleFamily::TABLE_CELL) { for(const auto& rProperty : rProperties) { @@ -640,7 +640,7 @@ void ScXMLAutoStylePoolP::exportStyleAttributes( } } } - else if (nFamily == XML_STYLE_FAMILY_TABLE_TABLE) + else if (nFamily == XmlStyleFamily::TABLE_TABLE) { for(const auto& rProperty : rProperties) { @@ -667,7 +667,7 @@ void ScXMLAutoStylePoolP::exportStyleAttributes( void ScXMLAutoStylePoolP::exportStyleContent( const css::uno::Reference< css::xml::sax::XDocumentHandler > & rHandler, - sal_Int32 nFamily, + XmlStyleFamily nFamily, const std::vector< XMLPropertyState >& rProperties, const SvXMLExportPropertyMapper& rPropExp , const SvXMLUnitConverter& rUnitConverter, @@ -675,7 +675,7 @@ void ScXMLAutoStylePoolP::exportStyleContent( ) const { SvXMLAutoStylePoolP::exportStyleContent( rHandler, nFamily, rProperties, rPropExp, rUnitConverter, rNamespaceMap ); - if (nFamily == XML_STYLE_FAMILY_TABLE_CELL) + if (nFamily == XmlStyleFamily::TABLE_CELL) { for(const auto& rProperty : rProperties) { diff --git a/sc/source/filter/xml/xmlstyle.hxx b/sc/source/filter/xml/xmlstyle.hxx index 36a42737cf24..3ddb5e9c215a 100644 --- a/sc/source/filter/xml/xmlstyle.hxx +++ b/sc/source/filter/xml/xmlstyle.hxx @@ -185,7 +185,7 @@ class ScXMLAutoStylePoolP : public SvXMLAutoStylePoolP virtual void exportStyleAttributes( SvXMLAttributeList& rAttrList, - sal_Int32 nFamily, + XmlStyleFamily nFamily, const ::std::vector< XMLPropertyState >& rProperties, const SvXMLExportPropertyMapper& rPropExp, const SvXMLUnitConverter& rUnitConverter, @@ -194,7 +194,7 @@ class ScXMLAutoStylePoolP : public SvXMLAutoStylePoolP virtual void exportStyleContent( const css::uno::Reference< css::xml::sax::XDocumentHandler > & rHandler, - sal_Int32 nFamily, + XmlStyleFamily nFamily, const ::std::vector< XMLPropertyState >& rProperties, const SvXMLExportPropertyMapper& rPropExp , const SvXMLUnitConverter& rUnitConverter, diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 1d7656083233..7baf38fae5d1 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -372,7 +372,7 @@ ScXMLMapContext::ScXMLMapContext(SvXMLImport& rImport, sal_uInt16 nPrfx, if( IsXMLToken(aLocalName, XML_CONDITION ) ) msCondition = rValue; else if( IsXMLToken(aLocalName, XML_APPLY_STYLE_NAME ) ) - msApplyStyle = GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TABLE_CELL, rValue); + msApplyStyle = GetImport().GetStyleDisplayName( XmlStyleFamily::TABLE_CELL, rValue); else if ( IsXMLToken(aLocalName, XML_BASE_CELL_ADDRESS ) ) msBaseCell = rValue; } @@ -426,7 +426,7 @@ void XMLTableStyleContext::SetAttribute( sal_uInt16 nPrefixKey, XMLTableStyleContext::XMLTableStyleContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XAttributeList > & xAttrList, - SvXMLStylesContext& rStyles, sal_uInt16 nFamily, bool bDefaultStyle ) : + SvXMLStylesContext& rStyles, XmlStyleFamily nFamily, bool bDefaultStyle ) : XMLPropStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily, bDefaultStyle ), sDataStyleName(), pStyles(&rStyles), @@ -529,21 +529,21 @@ void XMLTableStyleContext::FillPropertySet( { if (!IsDefaultStyle()) { - if (GetFamily() == XML_STYLE_FAMILY_TABLE_CELL) + if (GetFamily() == XmlStyleFamily::TABLE_CELL) { if (!bParentSet) { - AddProperty(CTF_SC_CELLSTYLE, uno::makeAny(GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TABLE_CELL, GetParentName() ))); + AddProperty(CTF_SC_CELLSTYLE, uno::makeAny(GetImport().GetStyleDisplayName( XmlStyleFamily::TABLE_CELL, GetParentName() ))); bParentSet = true; } sal_Int32 nNumFmt = GetNumberFormat(); if (nNumFmt >= 0) AddProperty(CTF_SC_NUMBERFORMAT, uno::makeAny(nNumFmt)); } - else if (GetFamily() == XML_STYLE_FAMILY_TABLE_TABLE) + else if (GetFamily() == XmlStyleFamily::TABLE_TABLE) { if (!sPageStyle.isEmpty()) - AddProperty(CTF_SC_MASTERPAGENAME, uno::makeAny(GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_MASTER_PAGE, sPageStyle ))); + AddProperty(CTF_SC_MASTERPAGENAME, uno::makeAny(GetImport().GetStyleDisplayName( XmlStyleFamily::MASTER_PAGE, sPageStyle ))); } } XMLPropStyleContext::FillPropertySet(rPropSet); @@ -551,7 +551,7 @@ void XMLTableStyleContext::FillPropertySet( void XMLTableStyleContext::SetDefaults() { - if ((GetFamily() == XML_STYLE_FAMILY_TABLE_CELL) && GetImport().GetModel().is()) + if ((GetFamily() == XmlStyleFamily::TABLE_CELL) && GetImport().GetModel().is()) { uno::Reference <lang::XMultiServiceFactory> xMultiServiceFactory(GetImport().GetModel(), uno::UNO_QUERY); if (xMultiServiceFactory.is()) @@ -600,14 +600,14 @@ sal_Int32 XMLTableStyleContext::GetNumberFormat() if (nNumberFormat < 0 && !sDataStyleName.isEmpty()) { const SvXMLNumFormatContext* pStyle = static_cast<const SvXMLNumFormatContext*>( - pStyles->FindStyleChildContext(XML_STYLE_FAMILY_DATA_STYLE, sDataStyleName, true)); + pStyles->FindStyleChildContext(XmlStyleFamily::DATA_STYLE, sDataStyleName, true)); if (!pStyle) { XMLTableStylesContext* pMyStyles = static_cast<XMLTableStylesContext*>(GetScImport().GetStyles()); if (pMyStyles) pStyle = static_cast<const SvXMLNumFormatContext*>( - pMyStyles->FindStyleChildContext(XML_STYLE_FAMILY_DATA_STYLE, sDataStyleName, true)); + pMyStyles->FindStyleChildContext(XmlStyleFamily::DATA_STYLE, sDataStyleName, true)); else { OSL_FAIL("not possible to get style"); @@ -620,12 +620,12 @@ sal_Int32 XMLTableStyleContext::GetNumberFormat() } SvXMLStyleContext *XMLTableStylesContext::CreateStyleStyleChildContext( - sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName, + XmlStyleFamily nFamily, sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { SvXMLStyleContext *pStyle; // use own wrapper for text and paragraph, to record style usage - if (nFamily == XML_STYLE_FAMILY_TEXT_PARAGRAPH || nFamily == XML_STYLE_FAMILY_TEXT_TEXT) + if (nFamily == XmlStyleFamily::TEXT_PARAGRAPH || nFamily == XmlStyleFamily::TEXT_TEXT) pStyle = new ScCellTextStyleContext( GetImport(), nPrefix, rLocalName, xAttrList, *this, nFamily ); else @@ -636,13 +636,14 @@ SvXMLStyleContext *XMLTableStylesContext::CreateStyleStyleChildContext( { switch( nFamily ) { - case XML_STYLE_FAMILY_TABLE_CELL: - case XML_STYLE_FAMILY_TABLE_COLUMN: - case XML_STYLE_FAMILY_TABLE_ROW: - case XML_STYLE_FAMILY_TABLE_TABLE: + case XmlStyleFamily::TABLE_CELL: + case XmlStyleFamily::TABLE_COLUMN: + case XmlStyleFamily::TABLE_ROW: + case XmlStyleFamily::TABLE_TABLE: pStyle = new XMLTableStyleContext( GetScImport(), nPrefix, rLocalName, xAttrList, *this, nFamily ); break; + default: break; } } @@ -650,7 +651,7 @@ SvXMLStyleContext *XMLTableStylesContext::CreateStyleStyleChildContext( } SvXMLStyleContext *XMLTableStylesContext::CreateDefaultStyleStyleChildContext( - sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName, + XmlStyleFamily nFamily, sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { SvXMLStyleContext *pStyle(SvXMLStylesContext::CreateDefaultStyleStyleChildContext( nFamily, nPrefix, @@ -660,14 +661,15 @@ SvXMLStyleContext *XMLTableStylesContext::CreateDefaultStyleStyleChildContext( { switch( nFamily ) { - case XML_STYLE_FAMILY_TABLE_CELL: + case XmlStyleFamily::TABLE_CELL: pStyle = new XMLTableStyleContext( GetScImport(), nPrefix, rLocalName, xAttrList, *this, nFamily, true); break; - case XML_STYLE_FAMILY_SD_GRAPHICS_ID: + case XmlStyleFamily::SD_GRAPHICS_ID: pStyle = new XMLGraphicsDefaultStyle( GetScImport(), nPrefix, rLocalName, xAttrList, *this); break; + default: break; } } @@ -705,7 +707,7 @@ void XMLTableStylesContext::EndElement() rtl::Reference < SvXMLImportPropertyMapper > XMLTableStylesContext::GetImportPropertyMapper( - sal_uInt16 nFamily ) const + XmlStyleFamily nFamily ) const { rtl::Reference < SvXMLImportPropertyMapper > xMapper(SvXMLStylesContext::GetImportPropertyMapper(nFamily)); @@ -713,7 +715,7 @@ rtl::Reference < SvXMLImportPropertyMapper > { switch( nFamily ) { - case XML_STYLE_FAMILY_TABLE_CELL: + case XmlStyleFamily::TABLE_CELL: { if( !xCellImpPropMapper.is() ) { @@ -724,7 +726,7 @@ rtl::Reference < SvXMLImportPropertyMapper > xMapper = xCellImpPropMapper; } break; - case XML_STYLE_FAMILY_TABLE_COLUMN: + case XmlStyleFamily::TABLE_COLUMN: { if( !xColumnImpPropMapper.is() ) const_cast<XMLTableStylesContext *>(this)->xColumnImpPropMapper = @@ -732,7 +734,7 @@ rtl::Reference < SvXMLImportPropertyMapper > xMapper = xColumnImpPropMapper; } break; - case XML_STYLE_FAMILY_TABLE_ROW: + case XmlStyleFamily::TABLE_ROW: { if( !xRowImpPropMapper.is() ) const_cast<XMLTableStylesContext *>(this)->xRowImpPropMapper = @@ -740,7 +742,7 @@ rtl::Reference < SvXMLImportPropertyMapper > xMapper = xRowImpPropMapper; } break; - case XML_STYLE_FAMILY_TABLE_TABLE: + case XmlStyleFamily::TABLE_TABLE: { if( !xTableImpPropMapper.is() ) const_cast<XMLTableStylesContext *>(this)->xTableImpPropMapper = @@ -748,6 +750,7 @@ rtl::Reference < SvXMLImportPropertyMapper > xMapper = xTableImpPropMapper; } break; + default: break; } } @@ -755,7 +758,7 @@ rtl::Reference < SvXMLImportPropertyMapper > } uno::Reference < XNameContainer > - XMLTableStylesContext::GetStylesContainer( sal_uInt16 nFamily ) const + XMLTableStylesContext::GetStylesContainer( XmlStyleFamily nFamily ) const { uno::Reference < XNameContainer > xStyles(SvXMLStylesContext::GetStylesContainer(nFamily)); if (!xStyles.is()) @@ -763,7 +766,7 @@ uno::Reference < XNameContainer > OUString sName; switch( nFamily ) { - case XML_STYLE_FAMILY_TABLE_TABLE: + case XmlStyleFamily::TABLE_TABLE: { if( xTableStyles.is() ) xStyles.set(xTableStyles); @@ -771,7 +774,7 @@ uno::Reference < XNameContainer > sName = "TableStyles"; } break; - case XML_STYLE_FAMILY_TABLE_CELL: + case XmlStyleFamily::TABLE_CELL: { if( xCellStyles.is() ) xStyles.set(xCellStyles); @@ -779,7 +782,7 @@ uno::Reference < XNameContainer > sName = "CellStyles"; } break; - case XML_STYLE_FAMILY_TABLE_COLUMN: + case XmlStyleFamily::TABLE_COLUMN: { if( xColumnStyles.is() ) xStyles.set(xColumnStyles); @@ -787,7 +790,7 @@ uno::Reference < XNameContainer > sName = "ColumnStyles"; } break; - case XML_STYLE_FAMILY_TABLE_ROW: + case XmlStyleFamily::TABLE_ROW: { if( xRowStyles.is() ) xStyles.set(xRowStyles); @@ -795,6 +798,7 @@ uno::Reference < XNameContainer > sName = "RowStyles"; } break; + default: break; } if( !xStyles.is() && !sName.isEmpty() && GetScImport().GetModel().is() ) { @@ -816,18 +820,19 @@ uno::Reference < XNameContainer > } switch( nFamily ) { - case XML_STYLE_FAMILY_TABLE_TABLE: + case XmlStyleFamily::TABLE_TABLE: const_cast<XMLTableStylesContext *>(this)->xTableStyles.set(xStyles); break; - case XML_STYLE_FAMILY_TABLE_CELL: + case XmlStyleFamily::TABLE_CELL: const_cast<XMLTableStylesContext *>(this)->xCellStyles.set(xStyles); break; - case XML_STYLE_FAMILY_TABLE_COLUMN: + case XmlStyleFamily::TABLE_COLUMN: const_cast<XMLTableStylesContext *>(this)->xColumnStyles.set(xStyles); break; - case XML_STYLE_FAMILY_TABLE_ROW: + case XmlStyleFamily::TABLE_ROW: const_cast<XMLTableStylesContext *>(this)->xRowStyles.set(xStyles); break; + default: break; } } } @@ -836,25 +841,26 @@ uno::Reference < XNameContainer > return xStyles; } -OUString XMLTableStylesContext::GetServiceName( sal_uInt16 nFamily ) const +OUString XMLTableStylesContext::GetServiceName( XmlStyleFamily nFamily ) const { OUString sServiceName(SvXMLStylesContext::GetServiceName(nFamily)); if (sServiceName.isEmpty()) { switch( nFamily ) { - case XML_STYLE_FAMILY_TABLE_COLUMN: + case XmlStyleFamily::TABLE_COLUMN: sServiceName = gsColumnStyleServiceName; break; - case XML_STYLE_FAMILY_TABLE_ROW: + case XmlStyleFamily::TABLE_ROW: sServiceName = gsRowStyleServiceName; break; - case XML_STYLE_FAMILY_TABLE_CELL: + case XmlStyleFamily::TABLE_CELL: sServiceName = gsCellStyleServiceName; break; - case XML_STYLE_FAMILY_TABLE_TABLE: + case XmlStyleFamily::TABLE_TABLE: sServiceName = gsTableStyleServiceName; break; + default: break; } } return sServiceName; @@ -866,28 +872,28 @@ sal_Int32 XMLTableStylesContext::GetIndex(const sal_Int16 nContextID) { if (nCellStyleIndex == -1) nCellStyleIndex = - GetImportPropertyMapper(XML_STYLE_FAMILY_TABLE_CELL)->getPropertySetMapper()->FindEntryIndex(nContextID); + GetImportPropertyMapper(XmlStyleFamily::TABLE_CELL)->getPropertySetMapper()->FindEntryIndex(nContextID); return nCellStyleIndex; } else if (nContextID == CTF_SC_NUMBERFORMAT) { if (nNumberFormatIndex == -1) nNumberFormatIndex = - GetImportPropertyMapper(XML_STYLE_FAMILY_TABLE_CELL)->getPropertySetMapper()->FindEntryIndex(nContextID); + GetImportPropertyMapper(XmlStyleFamily::TABLE_CELL)->getPropertySetMapper()->FindEntryIndex(nContextID); return nNumberFormatIndex; } else if (nContextID == CTF_SC_IMPORT_MAP) { if (nConditionalFormatIndex == -1) nConditionalFormatIndex = - GetImportPropertyMapper(XML_STYLE_FAMILY_TABLE_CELL)->getPropertySetMapper()->FindEntryIndex(nContextID); + GetImportPropertyMapper(XmlStyleFamily::TABLE_CELL)->getPropertySetMapper()->FindEntryIndex(nContextID); return nConditionalFormatIndex; } else if (nContextID == CTF_SC_MASTERPAGENAME) { if (nMasterPageNameIndex == -1) nMasterPageNameIndex = - GetImportPropertyMapper(XML_STYLE_FAMILY_TABLE_TABLE)->getPropertySetMapper()->FindEntryIndex(nContextID); + GetImportPropertyMapper(XmlStyleFamily::TABLE_TABLE)->getPropertySetMapper()->FindEntryIndex(nContextID); return nMasterPageNameIndex; } else @@ -895,7 +901,7 @@ sal_Int32 XMLTableStylesContext::GetIndex(const sal_Int16 nContextID) } -bool ScXMLMasterStylesContext::InsertStyleFamily( sal_uInt16 ) const +bool ScXMLMasterStylesContext::InsertStyleFamily( XmlStyleFamily ) const { return true; } @@ -918,7 +924,7 @@ SvXMLStyleContext *ScXMLMasterStylesContext::CreateStyleChildContext( if( (XML_NAMESPACE_STYLE == nPrefix) && IsXMLToken(rLocalName, XML_MASTER_PAGE) && - InsertStyleFamily( XML_STYLE_FAMILY_MASTER_PAGE ) ) + InsertStyleFamily( XmlStyleFamily::MASTER_PAGE ) ) pContext = new ScMasterPageContext( GetImport(), nPrefix, rLocalName, xAttrList, !GetImport().GetTextImport()->IsInsertMode() ); @@ -929,7 +935,7 @@ SvXMLStyleContext *ScXMLMasterStylesContext::CreateStyleChildContext( } SvXMLStyleContext *ScXMLMasterStylesContext::CreateStyleStyleChildContext( - sal_uInt16 /* nFamily */, + XmlStyleFamily /* nFamily */, sal_uInt16 /* nPrefix */, const OUString& /* rLocalName */, const uno::Reference< XAttributeList > & /* xAttrList */ ) @@ -1010,7 +1016,7 @@ void ScMasterPageContext::Finish( bool bOverwrite ) ScCellTextStyleContext::ScCellTextStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference<xml::sax::XAttributeList> & xAttrList, - SvXMLStylesContext& rStyles, sal_uInt16 nFamily ) : + SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ) : XMLTextStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily, false/*bDefaultStyle*/ ), nLastSheet(-1) { diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx index efd463d5713d..8031e5f90ad0 100644 --- a/sc/source/filter/xml/xmlstyli.hxx +++ b/sc/source/filter/xml/xmlstyli.hxx @@ -89,7 +89,7 @@ public: XMLTableStyleContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList, - SvXMLStylesContext& rStyles, sal_uInt16 nFamily, bool bDefaultStyle = false ); + SvXMLStylesContext& rStyles, XmlStyleFamily nFamily, bool bDefaultStyle = false ); virtual ~XMLTableStyleContext() override; virtual SvXMLImportContextRef CreateChildContext( @@ -140,13 +140,13 @@ protected: // Create a style context. virtual SvXMLStyleContext *CreateStyleStyleChildContext( - sal_uInt16 nFamily, + XmlStyleFamily nFamily, sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; virtual SvXMLStyleContext *CreateDefaultStyleStyleChildContext( - sal_uInt16 nFamily, sal_uInt16 nPrefix, + XmlStyleFamily nFamily, sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; @@ -158,10 +158,10 @@ public: virtual void EndElement() override; virtual rtl::Reference < SvXMLImportPropertyMapper > GetImportPropertyMapper( - sal_uInt16 nFamily ) const override; + XmlStyleFamily nFamily ) const override; virtual css::uno::Reference< css::container::XNameContainer > - GetStylesContainer( sal_uInt16 nFamily ) const override; - virtual OUString GetServiceName( sal_uInt16 nFamily ) const override; + GetStylesContainer( XmlStyleFamily nFamily ) const override; + virtual OUString GetServiceName( XmlStyleFamily nFamily ) const override; sal_Int32 GetIndex(const sal_Int16 nContextID); }; @@ -173,11 +173,11 @@ protected: const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; - virtual SvXMLStyleContext *CreateStyleStyleChildContext( sal_uInt16 nFamily, + virtual SvXMLStyleContext *CreateStyleStyleChildContext( XmlStyleFamily nFamily, sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; - virtual bool InsertStyleFamily( sal_uInt16 nFamily ) const override; + virtual bool InsertStyleFamily( XmlStyleFamily nFamily ) const override; public: @@ -225,7 +225,7 @@ public: ScCellTextStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList, - SvXMLStylesContext& rStyles, sal_uInt16 nFamily ); + SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ); virtual ~ScCellTextStyleContext() override; // override FillPropertySet to store style information diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx index 0402cc89a481..b2f1013816f8 100644 --- a/sc/source/filter/xml/xmlsubti.cxx +++ b/sc/source/filter/xml/xmlsubti.cxx @@ -147,7 +147,7 @@ void ScMyTables::SetTableStyle(const OUString& sStyleName) if ( pStyles ) { XMLTableStyleContext* pStyle = const_cast<XMLTableStyleContext*>(static_cast<const XMLTableStyleContext *>(pStyles->FindStyleChildContext( - XML_STYLE_FAMILY_TABLE_TABLE, sStyleName, true))); + XmlStyleFamily::TABLE_TABLE, sStyleName, true))); if ( pStyle ) { pStyle->FillPropertySet(xProperties); |