summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/xmlimp.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-04 11:31:33 +0200
committerNoel Grandin <noel@peralex.com>2016-05-09 10:17:13 +0200
commitbcb41235deaf4b7ca90522bda3ba21a686819e6e (patch)
tree29f397deeb5c776b290b782847a4f9ec8487adb2 /sw/source/filter/xml/xmlimp.hxx
parentb55b7a057f19521ad88fc6a274fcf071b798eb3e (diff)
convert SfxStyleFamily to scoped enum
and update the RSC compiler to accept such In the process fix some confusion in SD where it was confusing SfxStyleFamily and the index of the relevant family (which other parts of the code in SVL use) Change-Id: I1efc9f85fbed8ab76eafe8f6e1ada411753ae5f9
Diffstat (limited to 'sw/source/filter/xml/xmlimp.hxx')
-rw-r--r--sw/source/filter/xml/xmlimp.hxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index 1f5cf7e41218..a3d335f84a95 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -32,6 +32,7 @@
#include <xmloff/xmlimp.hxx>
#include "xmlitmap.hxx"
+#include <o3tl/typed_flags_set.hxx>
class SwDoc;
class SvXMLUnitConverter;
@@ -42,6 +43,7 @@ class SwNodeIndex;
class XMLTextImportHelper;
class SvXMLGraphicHelper;
class SvXMLEmbeddedObjectHelper;
+enum class SfxStyleFamily;
// define, how many steps ( = paragraphs ) the progress bar should advance
// for styles, autostyles and settings + meta
@@ -51,6 +53,12 @@ namespace SwImport {
SwDoc* GetDocFromXMLImport( SvXMLImport& );
}
+// we only need this scoped enum to be flags here, in sw
+namespace o3tl
+{
+ template<> struct typed_flags<SfxStyleFamily> : is_typed_flags<SfxStyleFamily, 0xffff> {};
+}
+
class SwXMLImport: public SvXMLImport
{
std::unique_ptr<SwNodeIndex> m_pSttNdIdx;
@@ -70,7 +78,7 @@ class SwXMLImport: public SvXMLImport
css::uno::Reference< css::container::XNameContainer >
m_xLateInitSettings;
- sal_uInt16 m_nStyleFamilyMask;// Mask of styles to load
+ SfxStyleFamily m_nStyleFamilyMask;// Mask of styles to load
bool m_bLoadDoc : 1; // Load doc or styles only
bool m_bInsert : 1; // Insert mode. If styles are
// loaded only false means that
@@ -90,7 +98,7 @@ class SwXMLImport: public SvXMLImport
void setTextInsertMode(
const css::uno::Reference< css::text::XTextRange > & rInsertPos );
- void setStyleInsertMode( sal_uInt16 nFamilies,
+ void setStyleInsertMode( SfxStyleFamily nFamilies,
bool bOverwrite );
void setBlockMode();
void setOrganizerMode();
@@ -149,7 +157,7 @@ public:
const OUString& rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList );
SvXMLImportContext *CreateBodyContentContext( const OUString& rLocalName );
- sal_uInt16 GetStyleFamilyMask() const { return m_nStyleFamilyMask; }
+ SfxStyleFamily GetStyleFamilyMask() const { return m_nStyleFamilyMask; }
bool IsInsertMode() const { return m_bInsert; }
bool IsStylesOnlyMode() const { return !m_bLoadDoc; }
bool IsBlockMode() const { return m_bBlock; }