diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-04 11:31:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-09 10:17:13 +0200 |
commit | bcb41235deaf4b7ca90522bda3ba21a686819e6e (patch) | |
tree | 29f397deeb5c776b290b782847a4f9ec8487adb2 /sw/source/filter/xml/xmlimp.cxx | |
parent | b55b7a057f19521ad88fc6a274fcf071b798eb3e (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.cxx')
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index e749b3a3d2c2..8ee58ceb6bfc 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -344,7 +344,7 @@ void SwXMLDocStylesContext_Impl::EndElement() // are imported and finished. SwXMLImport& rSwImport = dynamic_cast<SwXMLImport&>( GetImport()); GetImport().GetTextImport()->SetOutlineStyles( - (rSwImport.GetStyleFamilyMask() & SFX_STYLE_FAMILY_PARA ) != 0); + bool(rSwImport.GetStyleFamilyMask() & SfxStyleFamily::Para)); } const SvXMLTokenMap& SwXMLImport::GetDocElemTokenMap() @@ -404,7 +404,7 @@ SwXMLImport::SwXMLImport( m_pTableCellAttrTokenMap( nullptr ), m_pGraphicResolver( nullptr ), m_pEmbeddedResolver( nullptr ), - m_nStyleFamilyMask( SFX_STYLE_FAMILY_ALL ), + m_nStyleFamilyMask( SfxStyleFamily::All ), m_bLoadDoc( true ), m_bInsert( false ), m_bBlock( false ), @@ -437,7 +437,7 @@ void SwXMLImport::setTextInsertMode( GetTextImport()->SetCursor( xTextCursor ); } -void SwXMLImport::setStyleInsertMode( sal_uInt16 nFamilies, +void SwXMLImport::setStyleInsertMode( SfxStyleFamily nFamilies, bool bOverwrite ) { m_bInsert = !bOverwrite; @@ -519,22 +519,22 @@ void SwXMLImport::startDocument() Sequence< OUString> aFamiliesSeq; if( aAny >>= aFamiliesSeq ) { - sal_uInt16 nFamilyMask = 0U; + SfxStyleFamily nFamilyMask = SfxStyleFamily::None; sal_Int32 nCount = aFamiliesSeq.getLength(); const OUString *pSeq = aFamiliesSeq.getConstArray(); for( sal_Int32 i=0; i < nCount; i++ ) { const OUString& rFamily = pSeq[i]; if( rFamily=="FrameStyles" ) - nFamilyMask |= SFX_STYLE_FAMILY_FRAME; + nFamilyMask |= SfxStyleFamily::Frame; else if( rFamily=="PageStyles" ) - nFamilyMask |= SFX_STYLE_FAMILY_PAGE; + nFamilyMask |= SfxStyleFamily::Page; else if( rFamily=="CharacterStyles" ) - nFamilyMask |= SFX_STYLE_FAMILY_CHAR; + nFamilyMask |= SfxStyleFamily::Char; else if( rFamily=="ParagraphStyles" ) - nFamilyMask |= SFX_STYLE_FAMILY_PARA; + nFamilyMask |= SfxStyleFamily::Para; else if( rFamily=="NumberingStyles" ) - nFamilyMask |= SFX_STYLE_FAMILY_PSEUDO; + nFamilyMask |= SfxStyleFamily::Pseudo; } bool bOverwrite = false; |