summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/xmloff/PageMasterStyleMap.hxx2
-rw-r--r--include/xmloff/SchXMLImportHelper.hxx2
-rw-r--r--include/xmloff/XMLDrawingPageStyleContext.hxx4
-rw-r--r--include/xmloff/XMLShapeStyleContext.hxx2
-rw-r--r--include/xmloff/XMLTextMasterPageContext.hxx2
-rw-r--r--include/xmloff/XMLTextMasterStylesContext.hxx4
-rw-r--r--include/xmloff/XMLTextShapeStyleContext.hxx2
-rw-r--r--include/xmloff/families.hxx107
-rw-r--r--include/xmloff/prstylei.hxx2
-rw-r--r--include/xmloff/shapeexport.hxx4
-rw-r--r--include/xmloff/styleexp.hxx5
-rw-r--r--include/xmloff/txtparae.hxx6
-rw-r--r--include/xmloff/txtstyli.hxx2
-rw-r--r--include/xmloff/xmlaustp.hxx27
-rw-r--r--include/xmloff/xmlimp.hxx4
-rw-r--r--include/xmloff/xmlstyle.hxx29
16 files changed, 106 insertions, 98 deletions
diff --git a/include/xmloff/PageMasterStyleMap.hxx b/include/xmloff/PageMasterStyleMap.hxx
index 93ec45b52362..d6b85657a974 100644
--- a/include/xmloff/PageMasterStyleMap.hxx
+++ b/include/xmloff/PageMasterStyleMap.hxx
@@ -88,7 +88,7 @@
// Need own entries for PageMasterStyleMap since these get *filtered*
// at export time using CTF_PM_FLAGMASK and XML_PM_CTF_START as detector
// to find the first entry for header/footer (!), see
-// SvXMLAutoStylePoolP_Impl::exportXML, look for XML_STYLE_FAMILY_PAGE_MASTER
+// SvXMLAutoStylePoolP_Impl::exportXML, look for XmlStyleFamily::PAGE_MASTER
#define CTF_PM_REPEAT_OFFSET_X (XML_PM_CTF_START + 0x0037)
#define CTF_PM_REPEAT_OFFSET_Y (XML_PM_CTF_START + 0x0038)
#define CTF_PM_FILLGRADIENTNAME (XML_PM_CTF_START + 0x0039)
diff --git a/include/xmloff/SchXMLImportHelper.hxx b/include/xmloff/SchXMLImportHelper.hxx
index 9cdb3f0566ee..7d6fa466880f 100644
--- a/include/xmloff/SchXMLImportHelper.hxx
+++ b/include/xmloff/SchXMLImportHelper.hxx
@@ -112,7 +112,7 @@ public:
const SvXMLTokenMap& GetSeriesAttrTokenMap();
const SvXMLTokenMap& GetRegEquationAttrTokenMap();
- static sal_uInt16 GetChartFamilyID() { return XML_STYLE_FAMILY_SCH_CHART_ID; }
+ static XmlStyleFamily GetChartFamilyID() { return XmlStyleFamily::SCH_CHART_ID; }
/** @param bPushLastChartType If </sal_False>, in case a new chart type has to
be added (because it does not exist yet), it is appended at the
diff --git a/include/xmloff/XMLDrawingPageStyleContext.hxx b/include/xmloff/XMLDrawingPageStyleContext.hxx
index d0593b408976..ffc0a62998a5 100644
--- a/include/xmloff/XMLDrawingPageStyleContext.hxx
+++ b/include/xmloff/XMLDrawingPageStyleContext.hxx
@@ -31,14 +31,14 @@ public:
css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrList,
SvXMLStylesContext& rStyles,
ContextID_Index_Pair const pContextIDs[],
- sal_uInt16 const pFamilies[]);
+ XmlStyleFamily const pFamilies[]);
virtual void
FillPropertySet(css::uno::Reference<css::beans::XPropertySet> const& rPropSet) override;
private:
std::unique_ptr<ContextID_Index_Pair[]> m_pContextIDs;
- sal_uInt16 const* const m_pFamilies;
+ XmlStyleFamily const* const m_pFamilies;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/xmloff/XMLShapeStyleContext.hxx b/include/xmloff/XMLShapeStyleContext.hxx
index 15f754d04db9..96ae15ce8cde 100644
--- a/include/xmloff/XMLShapeStyleContext.hxx
+++ b/include/xmloff/XMLShapeStyleContext.hxx
@@ -48,7 +48,7 @@ public:
const OUString& rLName,
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
SvXMLStylesContext& rStyles,
- sal_uInt16 nFamily);
+ XmlStyleFamily nFamily);
virtual ~XMLShapeStyleContext() override;
SvXMLImportContextRef CreateChildContext(
diff --git a/include/xmloff/XMLTextMasterPageContext.hxx b/include/xmloff/XMLTextMasterPageContext.hxx
index 659ac703ab8f..92839c63d83b 100644
--- a/include/xmloff/XMLTextMasterPageContext.hxx
+++ b/include/xmloff/XMLTextMasterPageContext.hxx
@@ -77,7 +77,7 @@ public:
struct ContextID_Index_Pair;
XMLOFF_DLLPUBLIC extern ContextID_Index_Pair const g_MasterPageContextIDs[];
-XMLOFF_DLLPUBLIC extern sal_uInt16 const g_MasterPageFamilies[];
+XMLOFF_DLLPUBLIC extern XmlStyleFamily const g_MasterPageFamilies[];
#endif
diff --git a/include/xmloff/XMLTextMasterStylesContext.hxx b/include/xmloff/XMLTextMasterStylesContext.hxx
index 035812e653b9..3a19d3334329 100644
--- a/include/xmloff/XMLTextMasterStylesContext.hxx
+++ b/include/xmloff/XMLTextMasterStylesContext.hxx
@@ -31,12 +31,12 @@ 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:
diff --git a/include/xmloff/XMLTextShapeStyleContext.hxx b/include/xmloff/XMLTextShapeStyleContext.hxx
index f44449e1a41b..cf5d5ca24e90 100644
--- a/include/xmloff/XMLTextShapeStyleContext.hxx
+++ b/include/xmloff/XMLTextShapeStyleContext.hxx
@@ -39,7 +39,7 @@ public:
XMLTextShapeStyleContext( 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 ~XMLTextShapeStyleContext() override;
virtual SvXMLImportContextRef CreateChildContext(
diff --git a/include/xmloff/families.hxx b/include/xmloff/families.hxx
index 5f88b0f471c4..13aee189e44e 100644
--- a/include/xmloff/families.hxx
+++ b/include/xmloff/families.hxx
@@ -23,76 +23,80 @@
used in the SvXMLAutoStylePoolP.
*/
-// Misc (Pool)
-// reserved: 0..99
-#define XML_STYLE_FAMILY_DATA_STYLE 0
-#define XML_STYLE_FAMILY_PAGE_MASTER 1
#define XML_STYLE_FAMILY_PAGE_MASTER_NAME "page-layout"
#define XML_STYLE_FAMILY_PAGE_MASTER_PREFIX "pm"
-#define XML_STYLE_FAMILY_MASTER_PAGE 2
-
-// Text
-// reserved: 100..199
-#define XML_STYLE_FAMILY_TEXT_PARAGRAPH 100
-#define XML_STYLE_FAMILY_TEXT_TEXT 101
-#define XML_STYLE_FAMILY_TEXT_LIST 102
-#define XML_STYLE_FAMILY_TEXT_OUTLINE 103
-#define XML_STYLE_FAMILY_TEXT_FOOTNOTECONFIG 105
-#define XML_STYLE_FAMILY_TEXT_ENDNOTECONFIG 106
-#define XML_STYLE_FAMILY_TEXT_SECTION 107
-#define XML_STYLE_FAMILY_TEXT_FRAME 108 // export only
-#define XML_STYLE_FAMILY_TEXT_RUBY 109
-#define XML_STYLE_FAMILY_TEXT_BIBLIOGRAPHYCONFIG 110
-#define XML_STYLE_FAMILY_TEXT_LINENUMBERINGCONFIG 111
-
-// Table
-// reserved: 200..299
-#define XML_STYLE_FAMILY_TABLE_TABLE 200
#define XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME "table"
#define XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX "ta"
-#define XML_STYLE_FAMILY_TABLE_COLUMN 202
#define XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME "table-column"
#define XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX "co"
-#define XML_STYLE_FAMILY_TABLE_ROW 203
#define XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME "table-row"
#define XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX "ro"
-#define XML_STYLE_FAMILY_TABLE_CELL 204
#define XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME "table-cell"
#define XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX "ce"
-#define XML_STYLE_FAMILY_TABLE_TEMPLATE_ID 205
-
-// Impress/Draw
-// reserved: 300..399
-#define XML_STYLE_FAMILY_SD_GRAPHICS_ID 300
#define XML_STYLE_FAMILY_SD_GRAPHICS_NAME "graphic"
#define XML_STYLE_FAMILY_SD_GRAPHICS_PREFIX "gr"
-
-#define XML_STYLE_FAMILY_SD_PRESENTATION_ID 301
#define XML_STYLE_FAMILY_SD_PRESENTATION_NAME "presentation"
#define XML_STYLE_FAMILY_SD_PRESENTATION_PREFIX "pr"
-// families for derived from SvXMLStyleContext
-#define XML_STYLE_FAMILY_SD_PAGEMASTERCONEXT_ID 302
-#define XML_STYLE_FAMILY_SD_PAGEMASTERSTYLECONEXT_ID 306
-#define XML_STYLE_FAMILY_SD_PRESENTATIONPAGELAYOUT_ID 303
-// family for draw pool
-#define XML_STYLE_FAMILY_SD_POOL_ID 304
#define XML_STYLE_FAMILY_SD_POOL_NAME "default"
-// family for presentation drawpage properties
-#define XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID 305
#define XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME "drawing-page"
#define XML_STYLE_FAMILY_SD_DRAWINGPAGE_PREFIX "dp"
+#define XML_STYLE_FAMILY_SCH_CHART_NAME "chart"
+#define XML_STYLE_FAMILY_SCH_CHART_PREFIX "ch"
+#define XML_STYLE_FAMILY_CONTROL_PREFIX "ctrl"
+
+enum class XmlStyleFamily
+{
+// Misc (Pool)
+// reserved: 0..99
+ DATA_STYLE = 0,
+ PAGE_MASTER = 1,
+ MASTER_PAGE = 2,
+
+// Text
+// reserved: 100..199
+ TEXT_PARAGRAPH = 100,
+ TEXT_TEXT = 101,
+ TEXT_LIST = 102,
+ TEXT_OUTLINE = 103,
+ TEXT_FOOTNOTECONFIG = 105,
+ TEXT_ENDNOTECONFIG = 106,
+ TEXT_SECTION = 107,
+ TEXT_FRAME = 108, // export only
+ TEXT_RUBY = 109,
+ TEXT_BIBLIOGRAPHYCONFIG = 110,
+ TEXT_LINENUMBERINGCONFIG = 111,
-#define XML_STYLE_FAMILY_SD_GRADIENT_ID 306
-#define XML_STYLE_FAMILY_SD_HATCH_ID 307
-#define XML_STYLE_FAMILY_SD_FILL_IMAGE_ID 308
-#define XML_STYLE_FAMILY_SD_MARKER_ID 309
-#define XML_STYLE_FAMILY_SD_STROKE_DASH_ID 310
+// Table
+// reserved: 200..299
+ TABLE_TABLE = 200,
+ TABLE_COLUMN = 202,
+ TABLE_ROW = 203,
+ TABLE_CELL = 204,
+ TABLE_TEMPLATE_ID = 205,
+
+// Impress/Draw
+// reserved: 300..399
+ SD_GRAPHICS_ID = 300,
+
+ SD_PRESENTATION_ID = 301,
+// families for derived from SvXMLStyleContext
+ SD_PAGEMASTERCONEXT_ID = 302,
+ SD_PAGEMASTERSTYLECONEXT_ID = 306,
+ SD_PRESENTATIONPAGELAYOUT_ID = 303,
+// family for draw pool
+ SD_POOL_ID = 304,
+// family for presentation drawpage properties
+ SD_DRAWINGPAGE_ID = 305,
+
+ SD_GRADIENT_ID = 306,
+ SD_HATCH_ID = 307,
+ SD_FILL_IMAGE_ID = 308,
+ SD_MARKER_ID = 309,
+ SD_STROKE_DASH_ID = 310,
// Chart
// reserved: 400..499
-#define XML_STYLE_FAMILY_SCH_CHART_ID 400
-#define XML_STYLE_FAMILY_SCH_CHART_NAME "chart"
-#define XML_STYLE_FAMILY_SCH_CHART_PREFIX "ch"
+ SCH_CHART_ID = 400,
// Math
// reserved: 500..599
@@ -100,8 +104,9 @@
// Forms/Controls
// reserved 600..649
-#define XML_STYLE_FAMILY_CONTROL_ID 600
-#define XML_STYLE_FAMILY_CONTROL_PREFIX "ctrl"
+ CONTROL_ID = 600,
+
+};
#endif // INCLUDED_XMLOFF_FAMILIES_HXX
diff --git a/include/xmloff/prstylei.hxx b/include/xmloff/prstylei.hxx
index 65a2aa2eea6b..d0885eee6845 100644
--- a/include/xmloff/prstylei.hxx
+++ b/include/xmloff/prstylei.hxx
@@ -91,7 +91,7 @@ public:
XMLPropStyleContext( 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,
bool bDefaultStyle=false );
virtual ~XMLPropStyleContext() override;
diff --git a/include/xmloff/shapeexport.hxx b/include/xmloff/shapeexport.hxx
index 67a57899f30c..e91ff36ec071 100644
--- a/include/xmloff/shapeexport.hxx
+++ b/include/xmloff/shapeexport.hxx
@@ -130,12 +130,12 @@ struct ImplXMLShapeExportInfo
{
OUString msStyleName;
OUString msTextStyleName;
- sal_Int32 mnFamily;
+ XmlStyleFamily mnFamily;
XmlShapeType meShapeType;
css::uno::Reference< css::drawing::XShape > xCustomShapeReplacement;
- ImplXMLShapeExportInfo() : mnFamily( XML_STYLE_FAMILY_SD_GRAPHICS_ID ), meShapeType( XmlShapeTypeNotYetSet ) {}
+ ImplXMLShapeExportInfo() : mnFamily( XmlStyleFamily::SD_GRAPHICS_ID ), meShapeType( XmlShapeTypeNotYetSet ) {}
};
/** a vector for shape style and type cache information */
diff --git a/include/xmloff/styleexp.hxx b/include/xmloff/styleexp.hxx
index 84f687713911..a0c611531b48 100644
--- a/include/xmloff/styleexp.hxx
+++ b/include/xmloff/styleexp.hxx
@@ -48,6 +48,7 @@ namespace com { namespace sun { namespace star
class SvXMLExportPropertyMapper;
class SvXMLAutoStylePoolP;
class SvXMLExport;
+enum class XmlStyleFamily;
class XMLOFF_DLLPUBLIC XMLStyleExport : public salhelper::SimpleReferenceObject
{
@@ -96,13 +97,13 @@ public:
void exportStyleFamily(
const OUString& rFamily, const OUString& rXMLFamily,
const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper,
- bool bUsed, sal_uInt16 nFamily,
+ bool bUsed, XmlStyleFamily nFamily,
const OUString* pPrefix = nullptr);
void exportStyleFamily(
const sal_Char *pFamily, const OUString& rXMLFamily,
const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper,
- bool bUsed, sal_uInt16 nFamily,
+ bool bUsed, XmlStyleFamily nFamily,
const OUString* pPrefix = nullptr);
};
diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index c01c03eea4d3..62f481fcde33 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -379,17 +379,17 @@ public:
/// add autostyle for specified family
void Add(
- sal_uInt16 nFamily,
+ XmlStyleFamily nFamily,
MultiPropertySetHelper& rPropSetHelper,
const css::uno::Reference< css::beans::XPropertySet > & rPropSet );
void Add(
- sal_uInt16 nFamily,
+ XmlStyleFamily nFamily,
const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
const XMLPropertyState** pAddState = nullptr, bool bDontSeek = false );
/// find style name for specified family and parent
OUString Find(
- sal_uInt16 nFamily,
+ XmlStyleFamily nFamily,
const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
const OUString& rParent,
const XMLPropertyState** pAddState = nullptr ) const;
diff --git a/include/xmloff/txtstyli.hxx b/include/xmloff/txtstyli.hxx
index 5ac0f410d005..e1704e1e4a4a 100644
--- a/include/xmloff/txtstyli.hxx
+++ b/include/xmloff/txtstyli.hxx
@@ -57,7 +57,7 @@ public:
XMLTextStyleContext( 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,
bool bDefaultStyle = false );
~XMLTextStyleContext() override;
diff --git a/include/xmloff/xmlaustp.hxx b/include/xmloff/xmlaustp.hxx
index 6902dd9aa106..4f754c170f25 100644
--- a/include/xmloff/xmlaustp.hxx
+++ b/include/xmloff/xmlaustp.hxx
@@ -34,6 +34,7 @@ class SvXMLAttributeList;
class SvXMLExport;
class SvXMLUnitConverter;
struct XMLPropertyState;
+enum class XmlStyleFamily;
namespace com { namespace sun { namespace star { namespace uno
{ template<typename A> class Sequence; }
@@ -56,7 +57,7 @@ protected:
virtual void exportStyleAttributes(
SvXMLAttributeList& rAttrList,
- sal_Int32 nFamily,
+ XmlStyleFamily nFamily,
const ::std::vector< XMLPropertyState >& rProperties,
const SvXMLExportPropertyMapper& rPropExp,
const SvXMLUnitConverter& rUnitConverter,
@@ -66,7 +67,7 @@ protected:
// this method is executed after Properties Export, so you can e.g. export a map or so on
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,
@@ -86,18 +87,18 @@ public:
for family numbers see families.hxx
*/
// TODO: Remove this ugly method as soon as possible
- void AddFamily( sal_Int32 nFamily, const OUString& rStrName, SvXMLExportPropertyMapper* pMapper, const OUString& aStrPrefix );
- void AddFamily( sal_Int32 nFamily, const OUString& rStrName,
+ void AddFamily( XmlStyleFamily nFamily, const OUString& rStrName, SvXMLExportPropertyMapper* pMapper, const OUString& aStrPrefix );
+ void AddFamily( XmlStyleFamily nFamily, const OUString& rStrName,
const rtl::Reference< SvXMLExportPropertyMapper >& rMapper,
const OUString& rStrPrefix, bool bAsFamily = true );
- void SetFamilyPropSetMapper( sal_Int32 nFamily,
+ void SetFamilyPropSetMapper( XmlStyleFamily nFamily,
const rtl::Reference< SvXMLExportPropertyMapper >& rMapper );
/// Register a name that must not be used as a generated name.
- void RegisterName( sal_Int32 nFamily, const OUString& rName );
+ void RegisterName( XmlStyleFamily nFamily, const OUString& rName );
/// Register a name that may only be used through AddNamed
- void RegisterDefinedName(sal_Int32 nFamily, const OUString& rName);
+ void RegisterDefinedName(XmlStyleFamily nFamily, const OUString& rName);
/// retrieve the registered names (names + families)
void GetRegisteredNames(
@@ -110,19 +111,19 @@ public:
css::uno::Sequence<OUString> const & aNames );
/// Add an item set to the pool and return its generated name.
- OUString Add( sal_Int32 nFamily, const ::std::vector< XMLPropertyState >& rProperties );
- OUString Add( sal_Int32 nFamily, const OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties, bool bDontSeek = false );
- bool Add( OUString& rName, sal_Int32 nFamily, const OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties );
+ OUString Add( XmlStyleFamily nFamily, const ::std::vector< XMLPropertyState >& rProperties );
+ OUString Add( XmlStyleFamily nFamily, const OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties, bool bDontSeek = false );
+ bool Add( OUString& rName, XmlStyleFamily nFamily, const OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties );
/// Add an item set with a pre-defined name (needed for saving sheets separately in Calc).
- bool AddNamed( const OUString& rName, sal_Int32 nFamily, const OUString& rParent,
+ bool AddNamed( const OUString& rName, XmlStyleFamily nFamily, const OUString& rParent,
const ::std::vector< XMLPropertyState >& rProperties );
/// Find an item set's name.
- OUString Find( sal_Int32 nFamily, const OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties ) const;
+ OUString Find( XmlStyleFamily nFamily, const OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties ) const;
/** Export all item sets ofs a certain class in the order in that they have been added. */
- void exportXML( sal_Int32 nFamily ) const;
+ void exportXML( XmlStyleFamily nFamily ) const;
void ClearEntries();
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 6d0dda96596a..93c986f9f5bd 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -422,10 +422,10 @@ public:
css::uno::Reference< css::embed::XStorage > const &
GetSourceStorage() const;
- void AddStyleDisplayName( sal_uInt16 nFamily,
+ void AddStyleDisplayName( XmlStyleFamily nFamily,
const OUString& rName,
const OUString& rDisplayName );
- OUString GetStyleDisplayName( sal_uInt16 nFamily,
+ OUString GetStyleDisplayName( XmlStyleFamily nFamily,
const OUString& rName ) const;
ProgressBarHelper* GetProgressBarHelper();
diff --git a/include/xmloff/xmlstyle.hxx b/include/xmloff/xmlstyle.hxx
index bf0e77098ced..c6120d9c79a6 100644
--- a/include/xmloff/xmlstyle.hxx
+++ b/include/xmloff/xmlstyle.hxx
@@ -25,6 +25,7 @@
#include <xmloff/dllapi.h>
#include <sal/types.h>
#include <xmloff/xmlictxt.hxx>
+#include <xmloff/families.hxx>
#include <memory>
class SvXMLStylesContext_Impl;
@@ -64,7 +65,7 @@ class XMLOFF_DLLPUBLIC SvXMLStyleContext : public SvXMLImportContext
OUString maFollow; // Will be moved to XMLPropStyle soon!!!!
bool mbHidden;
- sal_uInt16 mnFamily;
+ XmlStyleFamily mnFamily;
bool mbValid : 1; // Set this to false in CreateAndInsert
// if the style shouldn't be processed
@@ -79,7 +80,7 @@ protected:
const OUString& rLocalName,
const OUString& rValue );
- void SetFamily( sal_uInt16 nSet ) { mnFamily = nSet; }
+ void SetFamily( XmlStyleFamily nSet ) { mnFamily = nSet; }
void SetAutoName( const OUString& rName ) { maAutoName = rName; }
public:
@@ -88,13 +89,13 @@ public:
SvXMLStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
- sal_uInt16 nFamily=0,
+ XmlStyleFamily nFamily=XmlStyleFamily::DATA_STYLE,
bool bDefaultStyle = false );
SvXMLStyleContext( SvXMLImport& rImport,
sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList,
- sal_uInt16 nFamily=0,
+ XmlStyleFamily nFamily=XmlStyleFamily::DATA_STYLE,
bool bDefaultStyle = false );
virtual ~SvXMLStyleContext() override;
@@ -112,7 +113,7 @@ public:
const OUString& GetParentName() const { return maParentName; }
const OUString& GetFollow() const { return maFollow; }
- sal_uInt16 GetFamily() const { return mnFamily; }
+ XmlStyleFamily GetFamily() const { return mnFamily; }
bool IsValid() const { return mbValid; }
void SetValid( bool b ) { mbValid = b; }
@@ -185,16 +186,16 @@ protected:
const OUString& rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList );
- 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 );
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 );
- virtual bool InsertStyleFamily( sal_uInt16 nFamily ) const;
+ virtual bool InsertStyleFamily( XmlStyleFamily nFamily ) const;
public:
@@ -217,19 +218,19 @@ public:
void AddStyle(SvXMLStyleContext& rNew);
const SvXMLStyleContext *FindStyleChildContext(
- sal_uInt16 nFamily,
+ XmlStyleFamily nFamily,
const OUString& rName,
bool bCreateIndex = false ) const;
- static sal_uInt16 GetFamily( const OUString& rFamily );
+ static XmlStyleFamily GetFamily( const OUString& rFamily );
virtual rtl::Reference < SvXMLImportPropertyMapper > GetImportPropertyMapper(
- sal_uInt16 nFamily ) const;
+ XmlStyleFamily nFamily ) const;
virtual css::uno::Reference< css::container::XNameContainer >
- GetStylesContainer( sal_uInt16 nFamily ) const;
- virtual OUString GetServiceName( sal_uInt16 nFamily ) const;
+ GetStylesContainer( XmlStyleFamily nFamily ) const;
+ virtual OUString GetServiceName( XmlStyleFamily nFamily ) const;
css::uno::Reference< css::style::XAutoStyleFamily >
- GetAutoStyles( sal_uInt16 nFamily ) const;
+ GetAutoStyles( XmlStyleFamily nFamily ) const;
void CopyAutoStylesToDoc();
void CopyStylesToDoc( bool bOverwrite, bool bFinish = true );
void FinishStyles( bool bOverwrite );