summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-02-14 16:53:39 +0200
committerJan Holesovsky <kendy@collabora.com>2021-01-07 16:32:55 +0100
commitfdb94a92ffcee585cc059223ab2cb354eb475d51 (patch)
tree517c904f6a2c072f2fa22c751ee66935132ca8a7 /sc
parent00aad6a4887642879fb3b7be9a87414655fbc94f (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.hxx3
-rw-r--r--sc/source/filter/xml/sheetdata.cxx4
-rw-r--r--sc/source/filter/xml/xmlannoi.cxx2
-rw-r--r--sc/source/filter/xml/xmlannoi.hxx11
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx2
-rw-r--r--sc/source/filter/xml/xmlcoli.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx78
-rw-r--r--sc/source/filter/xml/xmlexternaltabi.cxx2
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx4
-rw-r--r--sc/source/filter/xml/xmlrowi.cxx2
-rw-r--r--sc/source/filter/xml/xmlstyle.cxx10
-rw-r--r--sc/source/filter/xml/xmlstyle.hxx4
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx96
-rw-r--r--sc/source/filter/xml/xmlstyli.hxx18
-rw-r--r--sc/source/filter/xml/xmlsubti.cxx2
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 9df714e244f5..63ed53260983 100644
--- a/sc/source/filter/xml/xmlannoi.cxx
+++ b/sc/source/filter/xml/xmlannoi.cxx
@@ -176,7 +176,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 21368afdda52..e2951ecf5bc1 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -353,7 +353,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 1d4d0966d707..bd90e9877216 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 b90a4b4022fb..2105a4fcaa03 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -376,13 +376,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) )
@@ -391,7 +391,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));
@@ -902,7 +902,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);
}
@@ -1263,7 +1263,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);
}
}
@@ -1844,7 +1844,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);
}
}
@@ -1973,7 +1973,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);
}
@@ -2054,9 +2054,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);
}
@@ -2073,13 +2073,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);
}
@@ -2140,9 +2140,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);
}
@@ -2150,7 +2150,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);
}
@@ -2169,9 +2169,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);
}
@@ -2179,7 +2179,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);
}
@@ -2313,8 +2313,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);
}
}
}
@@ -2347,16 +2347,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);
}
}
}
@@ -2387,8 +2387,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);
}
}
}
@@ -2420,8 +2420,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);
}
}
}
@@ -2461,8 +2461,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;
}
@@ -2493,7 +2493,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);
}
}
@@ -2616,11 +2616,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( );
@@ -3098,7 +3098,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);
}
}
@@ -5225,7 +5225,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 5515fd835ba5..b4f893a998a3 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 f97b06884261..132b9e0da6b3 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1342,7 +1342,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);
@@ -1375,7 +1375,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 9f28b2bacad0..284e9d434d43 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -168,7 +168,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 ba69cf8e7ada..1cb5fb26591e 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -610,7 +610,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,
@@ -618,7 +618,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)
{
@@ -645,7 +645,7 @@ void ScXMLAutoStylePoolP::exportStyleAttributes(
}
}
}
- else if (nFamily == XML_STYLE_FAMILY_TABLE_TABLE)
+ else if (nFamily == XmlStyleFamily::TABLE_TABLE)
{
for(const auto& rProperty : rProperties)
{
@@ -672,7 +672,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,
@@ -680,7 +680,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 0980d62de2ac..bff6767bf51a 100644
--- a/sc/source/filter/xml/xmlstyle.hxx
+++ b/sc/source/filter/xml/xmlstyle.hxx
@@ -184,7 +184,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,
@@ -193,7 +193,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 4ccf11710e97..728b920edee5 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -364,7 +364,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;
}
@@ -418,7 +418,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),
@@ -521,21 +521,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);
@@ -543,7 +543,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())
@@ -592,14 +592,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");
@@ -612,12 +612,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
@@ -628,13 +628,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;
}
}
@@ -642,7 +643,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,
@@ -652,14 +653,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;
}
}
@@ -700,7 +702,7 @@ void XMLTableStylesContext::EndElement()
rtl::Reference < SvXMLImportPropertyMapper >
XMLTableStylesContext::GetImportPropertyMapper(
- sal_uInt16 nFamily ) const
+ XmlStyleFamily nFamily ) const
{
rtl::Reference < SvXMLImportPropertyMapper > xMapper(SvXMLStylesContext::GetImportPropertyMapper(nFamily));
@@ -708,7 +710,7 @@ rtl::Reference < SvXMLImportPropertyMapper >
{
switch( nFamily )
{
- case XML_STYLE_FAMILY_TABLE_CELL:
+ case XmlStyleFamily::TABLE_CELL:
{
if( !xCellImpPropMapper.is() )
{
@@ -719,7 +721,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 =
@@ -727,7 +729,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 =
@@ -735,7 +737,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 =
@@ -743,6 +745,7 @@ rtl::Reference < SvXMLImportPropertyMapper >
xMapper = xTableImpPropMapper;
}
break;
+ default: break;
}
}
@@ -750,7 +753,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())
@@ -758,7 +761,7 @@ uno::Reference < XNameContainer >
OUString sName;
switch( nFamily )
{
- case XML_STYLE_FAMILY_TABLE_TABLE:
+ case XmlStyleFamily::TABLE_TABLE:
{
if( xTableStyles.is() )
xStyles.set(xTableStyles);
@@ -766,7 +769,7 @@ uno::Reference < XNameContainer >
sName = "TableStyles";
}
break;
- case XML_STYLE_FAMILY_TABLE_CELL:
+ case XmlStyleFamily::TABLE_CELL:
{
if( xCellStyles.is() )
xStyles.set(xCellStyles);
@@ -774,7 +777,7 @@ uno::Reference < XNameContainer >
sName = "CellStyles";
}
break;
- case XML_STYLE_FAMILY_TABLE_COLUMN:
+ case XmlStyleFamily::TABLE_COLUMN:
{
if( xColumnStyles.is() )
xStyles.set(xColumnStyles);
@@ -782,7 +785,7 @@ uno::Reference < XNameContainer >
sName = "ColumnStyles";
}
break;
- case XML_STYLE_FAMILY_TABLE_ROW:
+ case XmlStyleFamily::TABLE_ROW:
{
if( xRowStyles.is() )
xStyles.set(xRowStyles);
@@ -790,6 +793,7 @@ uno::Reference < XNameContainer >
sName = "RowStyles";
}
break;
+ default: break;
}
if( !xStyles.is() && !sName.isEmpty() && GetScImport().GetModel().is() )
{
@@ -811,18 +815,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;
}
}
}
@@ -831,25 +836,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;
@@ -861,28 +867,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
@@ -890,7 +896,7 @@ sal_Int32 XMLTableStylesContext::GetIndex(const sal_Int16 nContextID)
}
-bool ScXMLMasterStylesContext::InsertStyleFamily( sal_uInt16 ) const
+bool ScXMLMasterStylesContext::InsertStyleFamily( XmlStyleFamily ) const
{
return true;
}
@@ -916,7 +922,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() );
@@ -927,7 +933,7 @@ SvXMLStyleContext *ScXMLMasterStylesContext::CreateStyleChildContext(
}
SvXMLStyleContext *ScXMLMasterStylesContext::CreateStyleStyleChildContext(
- sal_uInt16 /* nFamily */,
+ XmlStyleFamily /* nFamily */,
sal_uInt16 /* nPrefix */,
const OUString& /* rLocalName */,
const uno::Reference< XAttributeList > & /* xAttrList */ )
@@ -1008,7 +1014,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 21e2ae976ed4..70d786bd4036 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;
@@ -161,10 +161,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);
};
@@ -176,11 +176,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:
@@ -230,7 +230,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 9d0e55bfbbe4..d472656b24b2 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);