diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-12 09:59:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-12 10:11:19 +0200 |
commit | ed3a4fcc878e8f3ce720520d60448bc962da0754 (patch) | |
tree | 107d2e30caf6b88fb80fb6589bed1e50ae282771 /sw | |
parent | 5549160d97392d649bc3f7a490c161e77c1fd94a (diff) |
convert GET_POOLID constants to scoped enum
Change-Id: Ifc54789d12d0b024ed28f13ec78b5c10afa902de
Diffstat (limited to 'sw')
42 files changed, 202 insertions, 205 deletions
diff --git a/sw/inc/SwGetPoolIdFromName.hxx b/sw/inc/SwGetPoolIdFromName.hxx index 57e28028c384..820d864bd2ee 100644 --- a/sw/inc/SwGetPoolIdFromName.hxx +++ b/sw/inc/SwGetPoolIdFromName.hxx @@ -22,18 +22,15 @@ /* When using the NameMapper to translate pool ids to UI or programmatic * names, this enum is used to define which family is required */ -typedef sal_uInt16 SwGetPoolIdFromName; - -namespace nsSwGetPoolIdFromName -{ - const SwGetPoolIdFromName GET_POOLID_TXTCOLL = 0x01; - const SwGetPoolIdFromName GET_POOLID_CHRFMT = 0x02; - const SwGetPoolIdFromName GET_POOLID_FRMFMT = 0x04; - const SwGetPoolIdFromName GET_POOLID_PAGEDESC = 0x08; - const SwGetPoolIdFromName GET_POOLID_NUMRULE = 0x10; - const SwGetPoolIdFromName GET_POOLID_TABSTYLE = 0x20; - const SwGetPoolIdFromName GET_POOLID_CELLSTYLE= 0x40; -} +enum class SwGetPoolIdFromName : sal_uInt16 { + TxtColl = 0x01, + ChrFmt = 0x02, + FrmFmt = 0x04, + PageDesc = 0x08, + NumRule = 0x10, + TabStyle = 0x20, + CellStyle= 0x40 +}; #endif diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx index cd2cc841f1e2..dcbc55556fe7 100644 --- a/sw/inc/docstyle.hxx +++ b/sw/inc/docstyle.hxx @@ -38,6 +38,7 @@ class SwFrameFormat; class SwNumRule; class SwTableAutoFormat; class SwBoxAutoFormat; +enum class SwGetPoolIdFromName : sal_uInt16; // Temporary StyleSheet. class SW_DLLPUBLIC SwDocStyleSheet : public SfxStyleSheetBase @@ -170,7 +171,7 @@ class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener bool bUsed, bool bTestHidden, bool bOnlyHidden, - sal_uInt16 nSection, + SwGetPoolIdFromName nSection, char cType); public: diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 47d61ba6d5d6..f12fd3b0e7cd 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -1298,7 +1298,7 @@ namespace //local functions originally from docfmt.cxx false, reinterpret_cast<const SfxPoolItem**>(&pRule) ) && !pDoc->FindNumRulePtr( pRule->GetValue() ) && USHRT_MAX != (nPoolId = SwStyleNameMapper::GetPoolIdFromUIName ( pRule->GetValue(), - nsSwGetPoolIdFromName::GET_POOLID_NUMRULE )) ) + SwGetPoolIdFromName::NumRule )) ) pDoc->getIDocumentStylePoolAccess().GetNumRuleFromPool( nPoolId ); } } diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx index 2850fec0512e..87444aa878ed 100644 --- a/sw/source/core/doc/SwStyleNameMapper.cxx +++ b/sw/source/core/doc/SwStyleNameMapper.cxx @@ -460,7 +460,7 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag switch ( eFlags ) { - case nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL: + case SwGetPoolIdFromName::TxtColl: { pHashPointer = bProgName ? &m_pParaProgMap : &m_pParaUIMap; vIndexes.push_back( std::make_tuple(RES_POOLCOLL_TEXT_BEGIN, RES_POOLCOLL_TEXT_END, bProgName ? &GetTextProgNameArray : &GetTextUINameArray) ); @@ -471,38 +471,38 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag vIndexes.push_back( std::make_tuple(RES_POOLCOLL_HTML_BEGIN, RES_POOLCOLL_HTML_END, bProgName ? &GetHTMLProgNameArray : &GetHTMLUINameArray) ); } break; - case nsSwGetPoolIdFromName::GET_POOLID_CHRFMT: + case SwGetPoolIdFromName::ChrFmt: { pHashPointer = bProgName ? &m_pCharProgMap : &m_pCharUIMap; vIndexes.push_back( std::make_tuple(RES_POOLCHR_NORMAL_BEGIN, RES_POOLCHR_NORMAL_END, bProgName ? &GetChrFormatProgNameArray : &GetChrFormatUINameArray) ); vIndexes.push_back( std::make_tuple(RES_POOLCHR_HTML_BEGIN, RES_POOLCHR_HTML_END, bProgName ? &GetHTMLChrFormatProgNameArray : &GetHTMLChrFormatUINameArray) ); } break; - case nsSwGetPoolIdFromName::GET_POOLID_FRMFMT: + case SwGetPoolIdFromName::FrmFmt: { pHashPointer = bProgName ? &m_pFrameProgMap : &m_pFrameUIMap; vIndexes.push_back( std::make_tuple(RES_POOLFRM_BEGIN, RES_POOLFRM_END, bProgName ? &GetFrameFormatProgNameArray : &GetFrameFormatUINameArray) ); } break; - case nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC: + case SwGetPoolIdFromName::PageDesc: { pHashPointer = bProgName ? &m_pPageProgMap : &m_pPageUIMap; vIndexes.push_back( std::make_tuple(RES_POOLPAGE_BEGIN, RES_POOLPAGE_END, bProgName ? &GetPageDescProgNameArray : &GetPageDescUINameArray) ); } break; - case nsSwGetPoolIdFromName::GET_POOLID_NUMRULE: + case SwGetPoolIdFromName::NumRule: { pHashPointer = bProgName ? &m_pNumRuleProgMap : &m_pNumRuleUIMap; vIndexes.push_back( std::make_tuple(RES_POOLNUMRULE_BEGIN, RES_POOLNUMRULE_END, bProgName ? &GetNumRuleProgNameArray : &GetNumRuleUINameArray) ); } break; - case nsSwGetPoolIdFromName::GET_POOLID_TABSTYLE: + case SwGetPoolIdFromName::TabStyle: { pHashPointer = bProgName ? &m_pTableStyleProgMap : &m_pTableStyleUIMap; vIndexes.push_back( std::make_tuple(RES_POOLTABSTYLE_BEGIN, RES_POOLTABSTYLE_END, bProgName ? &GetTableStyleProgNameArray : &GetTableStyleUINameArray) ); } break; - case nsSwGetPoolIdFromName::GET_POOLID_CELLSTYLE: + case SwGetPoolIdFromName::CellStyle: { pHashPointer = bProgName ? &m_pCellStyleProgMap : &m_pCellStyleUIMap; vIndexes.push_back( std::make_tuple(RES_POOLCELLSTYLE_BEGIN, RES_POOLCELLSTYLE_END, bProgName ? &GetCellStyleProgNameArray : &GetCellStyleUINameArray) ); @@ -542,17 +542,17 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag { bTested = true; - testNameTable( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, RES_POOLCOLL_TEXT_BEGIN, RES_POOLCOLL_TEXT_END ); - testNameTable( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, RES_POOLCOLL_LISTS_BEGIN, RES_POOLCOLL_LISTS_END ); - testNameTable( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, RES_POOLCOLL_EXTRA_BEGIN, RES_POOLCOLL_EXTRA_END ); - testNameTable( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, RES_POOLCOLL_REGISTER_BEGIN, RES_POOLCOLL_REGISTER_END ); - testNameTable( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, RES_POOLCOLL_DOC_BEGIN, RES_POOLCOLL_DOC_END ); - testNameTable( nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, RES_POOLCOLL_HTML_BEGIN, RES_POOLCOLL_HTML_END ); - testNameTable( nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, RES_POOLCHR_NORMAL_BEGIN, RES_POOLCHR_NORMAL_END ); - testNameTable( nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, RES_POOLCHR_HTML_BEGIN, RES_POOLCHR_HTML_END ); - testNameTable( nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, RES_POOLFRM_BEGIN, RES_POOLFRM_END ); - testNameTable( nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, RES_POOLPAGE_BEGIN, RES_POOLPAGE_END ); - testNameTable( nsSwGetPoolIdFromName::GET_POOLID_NUMRULE, RES_POOLNUMRULE_BEGIN, RES_POOLNUMRULE_END ); + testNameTable( SwGetPoolIdFromName::TxtColl, RES_POOLCOLL_TEXT_BEGIN, RES_POOLCOLL_TEXT_END ); + testNameTable( SwGetPoolIdFromName::TxtColl, RES_POOLCOLL_LISTS_BEGIN, RES_POOLCOLL_LISTS_END ); + testNameTable( SwGetPoolIdFromName::TxtColl, RES_POOLCOLL_EXTRA_BEGIN, RES_POOLCOLL_EXTRA_END ); + testNameTable( SwGetPoolIdFromName::TxtColl, RES_POOLCOLL_REGISTER_BEGIN, RES_POOLCOLL_REGISTER_END ); + testNameTable( SwGetPoolIdFromName::TxtColl, RES_POOLCOLL_DOC_BEGIN, RES_POOLCOLL_DOC_END ); + testNameTable( SwGetPoolIdFromName::TxtColl, RES_POOLCOLL_HTML_BEGIN, RES_POOLCOLL_HTML_END ); + testNameTable( SwGetPoolIdFromName::ChrFmt, RES_POOLCHR_NORMAL_BEGIN, RES_POOLCHR_NORMAL_END ); + testNameTable( SwGetPoolIdFromName::ChrFmt, RES_POOLCHR_HTML_BEGIN, RES_POOLCHR_HTML_END ); + testNameTable( SwGetPoolIdFromName::FrmFmt, RES_POOLFRM_BEGIN, RES_POOLFRM_END ); + testNameTable( SwGetPoolIdFromName::PageDesc, RES_POOLPAGE_BEGIN, RES_POOLPAGE_END ); + testNameTable( SwGetPoolIdFromName::NumRule, RES_POOLNUMRULE_BEGIN, RES_POOLNUMRULE_END ); } #endif return **pHashPointer; diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 7619199b2904..44b7e79696e1 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -922,7 +922,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, SwCharFormat* pCharFormat = rDoc.FindCharFormatByName(rCharacterStyle); if( !pCharFormat ) { - const sal_uInt16 nMyId = SwStyleNameMapper::GetPoolIdFromUIName(rCharacterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + const sal_uInt16 nMyId = SwStyleNameMapper::GetPoolIdFromUIName(rCharacterStyle, SwGetPoolIdFromName::ChrFmt); pCharFormat = rDoc.getIDocumentStylePoolAccess().GetCharFormatFromPool( nMyId ); } if (pCharFormat) @@ -1214,7 +1214,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable SwCharFormat * pCharFormat = rDoc.FindCharFormatByName(rCharacterStyle); if ( !pCharFormat ) { - const sal_uInt16 nMyId = SwStyleNameMapper::GetPoolIdFromUIName( rCharacterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + const sal_uInt16 nMyId = SwStyleNameMapper::GetPoolIdFromUIName( rCharacterStyle, SwGetPoolIdFromName::ChrFmt ); pCharFormat = rDoc.getIDocumentStylePoolAccess().GetCharFormatFromPool( nMyId ); } if ( pCharFormat ) diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index ffffb4fc16bf..b3462b761a41 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -1786,7 +1786,7 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd, // search by name SwDoc* pDoc = pNd->GetDoc(); - sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( GetMainEntryCharStyle(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( GetMainEntryCharStyle(), SwGetPoolIdFromName::ChrFmt ); SwCharFormat* pCharFormat = nullptr; if(USHRT_MAX != nPoolId) pCharFormat = pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool(nPoolId); diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 217fb83eb8d5..f46c7f83310c 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -209,7 +209,7 @@ SwNumFormat::SwNumFormat(const SvxNumberFormat& rNumFormat, SwDoc* pDoc) if( !pCFormat ) { sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rCharStyleName, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + SwGetPoolIdFromName::ChrFmt ); pCFormat = nId != USHRT_MAX ? pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( nId ) : pDoc->MakeCharFormat( rCharStyleName, nullptr ); diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx index ba17a92b0b0f..5ff587ef6b7f 100644 --- a/sw/source/core/docnode/ndnotxt.cxx +++ b/sw/source/core/docnode/ndnotxt.cxx @@ -66,7 +66,7 @@ void SwNoTextNode::NewAttrSet( SwAttrPool& rPool ) // put names of parent style and conditional style: const SwFormatColl* pFormatColl = GetFormatColl(); OUString sVal; - SwStyleNameMapper::FillProgName( pFormatColl->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillProgName( pFormatColl->GetName(), sVal, SwGetPoolIdFromName::TxtColl, true ); SfxStringItem aFormatColl( RES_FRMATR_STYLE_NAME, sVal ); aNewAttrSet.Put( aFormatColl ); diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 19e210998de7..c9bdc8bd17c1 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -117,12 +117,12 @@ void SetParent( std::shared_ptr<const SfxItemSet>& rpAttrSet, if ( pParentFormat ) { - SwStyleNameMapper::FillProgName( pParentFormat->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillProgName( pParentFormat->GetName(), sVal, SwGetPoolIdFromName::TxtColl, true ); const SfxStringItem aAnyFormatColl( RES_FRMATR_STYLE_NAME, sVal ); aNewSet.Put( aAnyFormatColl ); if ( pConditionalFormat != pParentFormat ) - SwStyleNameMapper::FillProgName( pConditionalFormat->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillProgName( pConditionalFormat->GetName(), sVal, SwGetPoolIdFromName::TxtColl, true ); const SfxStringItem aFormatColl( RES_FRMATR_CONDITIONAL_STYLE_NAME, sVal ); aNewSet.Put( aFormatColl ); diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index ce0af72573c4..20109a7ef014 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -1002,7 +1002,7 @@ bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { OUString sTmp; rAny >>= sTmp; - SetPar1( SwStyleNameMapper::GetUIName( sTmp, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ) ); + SetPar1( SwStyleNameMapper::GetUIName( sTmp, SwGetPoolIdFromName::TxtColl ) ); } break; case FIELD_PROP_PAR2: @@ -1070,7 +1070,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const rAny <<= (sal_Int16)nSeqNo; break; case FIELD_PROP_PAR1: - rAny <<= OUString ( SwStyleNameMapper::GetProgName(GetPar1(), nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ) ); + rAny <<= OUString ( SwStyleNameMapper::GetProgName(GetPar1(), SwGetPoolIdFromName::TxtColl ) ); break; case FIELD_PROP_PAR2: { diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index bd1d359e3658..11920dd9d907 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -643,7 +643,7 @@ bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const OUString sTmp(GetPar1()); if(REF_SEQUENCEFLD == nSubType) { - sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sTmp, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sTmp, SwGetPoolIdFromName::TxtColl ); switch( nPoolId ) { case RES_POOLCOLL_LABEL_ABB: @@ -755,7 +755,7 @@ void SwGetRefField::ConvertProgrammaticToUIName() // don't convert when the name points to an existing field type if(!pDoc->getIDocumentFieldsAccess().GetFieldType(RES_SETEXPFLD, rPar1, false)) { - sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromProgName( rPar1, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromProgName( rPar1, SwGetPoolIdFromName::TxtColl ); sal_uInt16 nResId = USHRT_MAX; switch( nPoolId ) { diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx index 072c0b2f0ea8..67ca83dc91a6 100644 --- a/sw/source/core/frmedt/fedesc.cxx +++ b/sw/source/core/frmedt/fedesc.cxx @@ -129,7 +129,7 @@ SwPageDesc* SwFEShell::FindPageDescByName( const OUString& rName, SwPageDesc* pDesc = GetDoc()->FindPageDesc(rName, pPos); if( !pDesc && bGetFromPool ) { - sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC ); + sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( rName, SwGetPoolIdFromName::PageDesc ); if( USHRT_MAX != nPoolId && nullptr != (pDesc = GetDoc()->getIDocumentStylePoolAccess().GetPageDescFromPool( nPoolId )) && pPos ) diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 6a58900fee1a..f8eb4a5505f2 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -712,7 +712,7 @@ bool SwFormatPageDesc::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const if( pDesc ) { OUString aString; - SwStyleNameMapper::FillProgName(pDesc->GetName(), aString, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true ); + SwStyleNameMapper::FillProgName(pDesc->GetName(), aString, SwGetPoolIdFromName::PageDesc, true ); rVal <<= aString; } else diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx index 6c79db7b3f31..54a84683e1bb 100644 --- a/sw/source/core/para/paratr.cxx +++ b/sw/source/core/para/paratr.cxx @@ -145,7 +145,7 @@ bool SwFormatDrop::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const OUString sName; if(GetCharFormat()) sName = SwStyleNameMapper::GetProgName( - GetCharFormat()->GetName(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + GetCharFormat()->GetName(), SwGetPoolIdFromName::ChrFmt ); rVal <<= sName; } break; @@ -223,7 +223,7 @@ bool SwNumRuleItem::operator==( const SfxPoolItem& rAttr ) const bool SwNumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 ) const { - OUString sRet = SwStyleNameMapper::GetProgName(GetValue(), nsSwGetPoolIdFromName::GET_POOLID_NUMRULE ); + OUString sRet = SwStyleNameMapper::GetProgName(GetValue(), SwGetPoolIdFromName::NumRule ); rVal <<= sRet; return true; } @@ -232,7 +232,7 @@ bool SwNumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 ) { OUString uName; rVal >>= uName; - SetValue(SwStyleNameMapper::GetUIName(uName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE)); + SetValue(SwStyleNameMapper::GetUIName(uName, SwGetPoolIdFromName::NumRule)); return true; } diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index c091114a7e33..77803217ca84 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -172,7 +172,7 @@ bool lcl_IsHeadlineCell( const SwCellFrame& rCellFrame ) const SwFormat* pTextFormat = pTextNode->GetFormatColl(); OUString sStyleName; - SwStyleNameMapper::FillProgName( pTextFormat->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillProgName( pTextFormat->GetName(), sStyleName, SwGetPoolIdFromName::TxtColl, true ); bRet = sStyleName == aTableHeadingName; } @@ -1067,9 +1067,9 @@ void SwTaggedPDFHelper::BeginBlockStructureElements() OUString sParentStyleName; if ( pTextFormat) - SwStyleNameMapper::FillProgName( pTextFormat->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillProgName( pTextFormat->GetName(), sStyleName, SwGetPoolIdFromName::TxtColl, true ); if ( pParentTextFormat) - SwStyleNameMapper::FillProgName( pParentTextFormat->GetName(), sParentStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillProgName( pParentTextFormat->GetName(), sParentStyleName, SwGetPoolIdFromName::TxtColl, true ); // This is the default. If the paragraph could not be mapped to // any of the standard pdf tags, we write a user defined tag @@ -1352,7 +1352,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() const SwCharFormat* pCharFormat = (charAttrs.size()) ? (*charAttrs.begin())->GetCharFormat().GetCharFormat() : nullptr; if ( pCharFormat ) - SwStyleNameMapper::FillProgName( pCharFormat->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillProgName( pCharFormat->GetName(), sStyleName, SwGetPoolIdFromName::TxtColl, true ); } // Check for Link: diff --git a/sw/source/core/tox/ToxLinkProcessor.cxx b/sw/source/core/tox/ToxLinkProcessor.cxx index 1ef40d271625..cf0b24a631c1 100644 --- a/sw/source/core/tox/ToxLinkProcessor.cxx +++ b/sw/source/core/tox/ToxLinkProcessor.cxx @@ -58,7 +58,7 @@ ToxLinkProcessor::ObtainPoolId(const OUString& characterStyle) const return USHRT_MAX; } else { - return SwStyleNameMapper::GetPoolIdFromUIName(characterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + return SwStyleNameMapper::GetPoolIdFromUIName(characterStyle, SwGetPoolIdFromName::ChrFmt); } } diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 4e43a76a392d..53cd81afd46e 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -101,7 +101,7 @@ bool SwFormatCharFormat::QueryValue( uno::Any& rVal, sal_uInt8 ) const { OUString sCharFormatName; if(GetCharFormat()) - SwStyleNameMapper::FillProgName(GetCharFormat()->GetName(), sCharFormatName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + SwStyleNameMapper::FillProgName(GetCharFormat()->GetName(), sCharFormatName, SwGetPoolIdFromName::ChrFmt, true ); rVal <<= sCharFormatName; return true; } @@ -293,7 +293,7 @@ bool SwFormatINetFormat::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const SwStyleNameMapper::FillUIName(mnVisitedFormatId, sVal); if (!sVal.isEmpty()) SwStyleNameMapper::FillProgName(sVal, sVal, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true); + SwGetPoolIdFromName::ChrFmt, true); rVal <<= sVal; } break; @@ -304,7 +304,7 @@ bool SwFormatINetFormat::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const SwStyleNameMapper::FillUIName(mnINetFormatId, sVal); if (!sVal.isEmpty()) SwStyleNameMapper::FillProgName(sVal, sVal, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true); + SwGetPoolIdFromName::ChrFmt, true); rVal <<= sVal; } break; @@ -375,10 +375,10 @@ bool SwFormatINetFormat::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) OUString sVal; rVal >>= sVal; OUString aString; - SwStyleNameMapper::FillUIName( sVal, aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + SwStyleNameMapper::FillUIName( sVal, aString, SwGetPoolIdFromName::ChrFmt, true ); msVisitedFormatName = aString; mnVisitedFormatId = SwStyleNameMapper::GetPoolIdFromUIName( msVisitedFormatName, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + SwGetPoolIdFromName::ChrFmt ); } break; case MID_URL_UNVISITED_FMT: @@ -386,9 +386,9 @@ bool SwFormatINetFormat::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) OUString sVal; rVal >>= sVal; OUString aString; - SwStyleNameMapper::FillUIName( sVal, aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + SwStyleNameMapper::FillUIName( sVal, aString, SwGetPoolIdFromName::ChrFmt, true ); msINetFormatName = aString; - mnINetFormatId = SwStyleNameMapper::GetPoolIdFromUIName( msINetFormatName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + mnINetFormatId = SwStyleNameMapper::GetPoolIdFromUIName( msINetFormatName, SwGetPoolIdFromName::ChrFmt ); } break; default: @@ -461,7 +461,7 @@ bool SwFormatRuby::QueryValue( uno::Any& rVal, case MID_RUBY_CHARSTYLE: { OUString aString; - SwStyleNameMapper::FillProgName(sCharFormatName, aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + SwStyleNameMapper::FillProgName(sCharFormatName, aString, SwGetPoolIdFromName::ChrFmt, true ); rVal <<= aString; } break; @@ -514,7 +514,7 @@ bool SwFormatRuby::PutValue( const uno::Any& rVal, OUString sTmp; bRet = rVal >>= sTmp; if(bRet) - sCharFormatName = SwStyleNameMapper::GetUIName(sTmp, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + sCharFormatName = SwStyleNameMapper::GetUIName(sTmp, SwGetPoolIdFromName::ChrFmt ); } break; default: diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index f833f7e1849d..bc7f3014f8b5 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -828,10 +828,10 @@ void SwTextNode::NewAttrSet( SwAttrPool& rPool ) const SwFormatColl* pAnyFormatColl = &GetAnyFormatColl(); const SwFormatColl* pFormatColl = GetFormatColl(); OUString sVal; - SwStyleNameMapper::FillProgName( pAnyFormatColl->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillProgName( pAnyFormatColl->GetName(), sVal, SwGetPoolIdFromName::TxtColl, true ); SfxStringItem aAnyFormatColl( RES_FRMATR_STYLE_NAME, sVal ); if ( pFormatColl != pAnyFormatColl ) - SwStyleNameMapper::FillProgName( pFormatColl->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillProgName( pFormatColl->GetName(), sVal, SwGetPoolIdFromName::TxtColl, true ); SfxStringItem aFormatColl( RES_FRMATR_CONDITIONAL_STYLE_NAME, sVal ); aNewAttrSet.Put( aAnyFormatColl ); aNewAttrSet.Put( aFormatColl ); diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx index 7897e2ff7622..4aa4c012ad41 100644 --- a/sw/source/core/unocore/SwXTextDefaults.cxx +++ b/sw/source/core/unocore/SwXTextDefaults.cxx @@ -86,7 +86,7 @@ void SAL_CALL SwXTextDefaults::setPropertyValue( const OUString& rPropertyName, if(aValue >>= uStyle) { OUString sStyle; - SwStyleNameMapper::FillUIName(uStyle, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + SwStyleNameMapper::FillUIName(uStyle, sStyle, SwGetPoolIdFromName::ChrFmt, true ); SwDocStyleSheet* pStyle = static_cast<SwDocStyleSheet*>(m_pDoc->GetDocShell()->GetStyleSheetPool()->Find(sStyle, SfxStyleFamily::Char)); SwFormatDrop* pDrop = nullptr; diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 88dd4943496c..8de8c1e12b65 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -378,7 +378,7 @@ bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry if( pAny ) { OUString sVal; - SwStyleNameMapper::FillProgName(pFormat->GetName(), sVal, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillProgName(pFormat->GetName(), sVal, SwGetPoolIdFromName::TxtColl, true ); *pAny <<= sVal; } } @@ -705,7 +705,7 @@ bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry OSL_ENSURE(pAttr->GetCharFormat().GetCharFormat(), "no character format set"); aCharStyles.getArray()[aCharStyles.getLength() - 1] = SwStyleNameMapper::GetProgName( - pAttr->GetCharFormat().GetCharFormat()->GetName(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + pAttr->GetCharFormat().GetCharFormat()->GetName(), SwGetPoolIdFromName::ChrFmt); } } @@ -903,7 +903,7 @@ void GetCurPageStyle(SwPaM& rPaM, OUString &rString) if(pPage) { SwStyleNameMapper::FillProgName(pPage->GetPageDesc()->GetName(), - rString, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true); + rString, SwGetPoolIdFromName::PageDesc, true); } } } diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index d5cbedbd7990..d29b6853d189 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -1051,7 +1051,7 @@ OUString SwXFieldMaster::GetProgrammaticName(const SwFieldType& rType, SwDoc& rD { if((*pTypes)[i] == &rType) { - return SwStyleNameMapper::GetProgName( sName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + return SwStyleNameMapper::GetProgName( sName, SwGetPoolIdFromName::TxtColl ); } } } @@ -1065,7 +1065,7 @@ OUString SwXFieldMaster::LocalizeFormula( { const OUString sTypeName(rField.GetTyp()->GetName()); const OUString sProgName( - SwStyleNameMapper::GetProgName(sTypeName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL )); + SwStyleNameMapper::GetProgName(sTypeName, SwGetPoolIdFromName::TxtColl )); if(sProgName != sTypeName) { const OUString sSource = bQuery ? sTypeName : sProgName; diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index dda5d70eeef7..5734c6de05ff 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -987,7 +987,7 @@ bool SwFrameProperties_Impl::AnyToItemSet(SwDoc *pDoc, SfxItemSet& rSet, SfxItem { OUString sStyle; *pStyleName >>= sStyle; - SwStyleNameMapper::FillUIName(sStyle, sStyle, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, true); + SwStyleNameMapper::FillUIName(sStyle, sStyle, SwGetPoolIdFromName::FrmFmt, true); pStyle = static_cast<SwDocStyleSheet*>(pDoc->GetDocShell()->GetStyleSheetPool()->Find(sStyle, SfxStyleFamily::Frame)); } @@ -1061,7 +1061,7 @@ bool SwGraphicProperties_Impl::AnyToItemSet( { OUString sStyle; *pStyleName >>= sStyle; - SwStyleNameMapper::FillUIName(sStyle, sStyle, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, true); + SwStyleNameMapper::FillUIName(sStyle, sStyle, SwGetPoolIdFromName::FrmFmt, true); pStyle = static_cast<SwDocStyleSheet*>(pDoc->GetDocShell()->GetStyleSheetPool()->Find(sStyle, SfxStyleFamily::Frame)); } @@ -1394,7 +1394,7 @@ static SwFrameFormat *lcl_GetFrameFormat( const ::uno::Any& rValue, SwDoc *pDoc rValue >>= uTemp; OUString sStyle; SwStyleNameMapper::FillUIName(uTemp, sStyle, - nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, true); + SwGetPoolIdFromName::FrmFmt, true); SwDocStyleSheet* pStyle = static_cast<SwDocStyleSheet*>(pDocSh->GetStyleSheetPool()->Find(sStyle, SfxStyleFamily::Frame)); @@ -2140,7 +2140,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) } else if(FN_UNO_FRAME_STYLE_NAME == pEntry->nWID) { - aAny <<= OUString(SwStyleNameMapper::GetProgName(pFormat->DerivedFrom()->GetName(), nsSwGetPoolIdFromName::GET_POOLID_FRMFMT ) ); + aAny <<= OUString(SwStyleNameMapper::GetProgName(pFormat->DerivedFrom()->GetName(), SwGetPoolIdFromName::FrmFmt ) ); } // #i73249# else if( FN_UNO_TITLE == pEntry->nWID ) diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index d0462aeb4265..62d4b882d849 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -770,7 +770,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, { OUString aString; SwStyleNameMapper::FillUIName(lcl_AnyToString(rValue), - aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true); + aString, SwGetPoolIdFromName::ChrFmt, true); rTOXBase.SetMainEntryCharStyle( aString ); } break; @@ -806,7 +806,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, { OUString aString; SwStyleNameMapper::FillUIName( lcl_AnyToString(rValue), - aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true); + aString, SwGetPoolIdFromName::TxtColl, true); bForm = true; // Header is on Pos 0 aForm.SetTemplate( 0, aString ); @@ -821,7 +821,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, OUString aString; bForm = true; SwStyleNameMapper::FillUIName( lcl_AnyToString(rValue), - aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true); + aString, SwGetPoolIdFromName::TxtColl, true); aForm.SetTemplate( 1, aString ); } break; @@ -845,7 +845,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, const sal_uInt16 nLPos = rTOXBase.GetType() == TOX_INDEX ? 2 : 1; OUString aString; SwStyleNameMapper::FillUIName( lcl_AnyToString(rValue), - aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true); + aString, SwGetPoolIdFromName::TxtColl, true); aForm.SetTemplate(nLPos + pEntry->nWID - WID_PARA_LEV1, aString ); } break; @@ -1102,7 +1102,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, SwStyleNameMapper::FillProgName( pTOXBase->GetMainEntryCharStyle(), aString, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, + SwGetPoolIdFromName::ChrFmt, true); aRet <<= aString; } @@ -1143,7 +1143,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, //Header steht an Pos 0 OUString aString; SwStyleNameMapper::FillProgName(rForm.GetTemplate( 0 ), aString, - nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwGetPoolIdFromName::TxtColl, true ); aRet <<= aString; } break; @@ -1153,7 +1153,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, SwStyleNameMapper::FillProgName( rForm.GetTemplate( 1 ), aString, - nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, + SwGetPoolIdFromName::TxtColl, true); aRet <<= aString; } @@ -1175,7 +1175,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, SwStyleNameMapper::FillProgName( rForm.GetTemplate(nLPos + pEntry->nWID - WID_PARA_LEV1), aString, - nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, + SwGetPoolIdFromName::TxtColl, true); aRet <<= aString; } @@ -2693,7 +2693,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, sSetStyles += OUStringLiteral1(TOX_STYLE_DELIMITER); } SwStyleNameMapper::FillUIName(pStyles[i], aString, - nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true); + SwGetPoolIdFromName::TxtColl, true); sSetStyles += aString; } rTOXBase.SetStyleNames(sSetStyles, static_cast<sal_uInt16>(nIndex)); @@ -2731,7 +2731,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, SwStyleNameMapper::FillProgName( rStyles.getToken(0, TOX_STYLE_DELIMITER, nPos), aString, - nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, + SwGetPoolIdFromName::TxtColl, true); pStyles[i] = aString; } @@ -2861,11 +2861,11 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, SwStyleNameMapper::FillUIName( lcl_AnyToString(pProperties[j].Value), sCharStyleName, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, + SwGetPoolIdFromName::ChrFmt, true); aToken.sCharStyleName = sCharStyleName; aToken.nPoolId = SwStyleNameMapper::GetPoolIdFromUIName ( - sCharStyleName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + sCharStyleName, SwGetPoolIdFromName::ChrFmt ); } else if ( pProperties[j].Name == "TabStopRightAligned" ) { @@ -3034,7 +3034,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, SwStyleNameMapper::FillProgName( aToken.sCharStyleName, aProgCharStyle, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, + SwGetPoolIdFromName::ChrFmt, true ); switch(aToken.eTokenType) { diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index e7515fc93da7..c3b1300aa31c 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -220,7 +220,7 @@ lcl_setCharStyle(SwDoc *const pDoc, const uno::Any & rValue, SfxItemSet & rSet) } OUString sStyle; SwStyleNameMapper::FillUIName(uStyle, sStyle, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true); + SwGetPoolIdFromName::ChrFmt, true); SwDocStyleSheet *const pStyle = static_cast<SwDocStyleSheet*>( pDocSh->GetStyleSheetPool()->Find(sStyle, SfxStyleFamily::Char)); if (!pStyle) @@ -271,7 +271,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) rAny >>= uStyle; OUString sStyle; SwStyleNameMapper::FillUIName(uStyle, sStyle, - nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwGetPoolIdFromName::TxtColl, true ); SwDocStyleSheet *const pStyle = static_cast<SwDocStyleSheet*>( pDocSh->GetStyleSheetPool()->Find(sStyle, SfxStyleFamily::Para)); if (!pStyle) @@ -312,7 +312,7 @@ SwUnoCursorHelper::SetPageDesc( } OUString sDescName; SwStyleNameMapper::FillUIName(uDescName, sDescName, - nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true); + SwGetPoolIdFromName::PageDesc, true); if (!pNewDesc->GetPageDesc() || (pNewDesc->GetPageDesc()->GetName() != sDescName)) { @@ -408,7 +408,7 @@ lcl_setDropcapCharStyle(SwPaM & rPam, SfxItemSet & rItemSet, } OUString sStyle; SwStyleNameMapper::FillUIName(uStyle, sStyle, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true); + SwGetPoolIdFromName::ChrFmt, true); SwDoc *const pDoc = rPam.GetDoc(); //default character style must not be set as default format SwDocStyleSheet *const pStyle = static_cast<SwDocStyleSheet*>( @@ -458,13 +458,13 @@ lcl_setRubyCharstyle(SfxItemSet & rItemSet, uno::Any const& rValue) } OUString sStyle; SwStyleNameMapper::FillUIName(sTmp, sStyle, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + SwGetPoolIdFromName::ChrFmt, true ); pRuby->SetCharFormatName(sStyle); pRuby->SetCharFormatId(0); if (!sStyle.isEmpty()) { const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( - sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + sStyle, SwGetPoolIdFromName::ChrFmt); pRuby->SetCharFormatId(nId); } rItemSet.Put(*pRuby); diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index b5a3b54e09bd..716ab9da1d10 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -191,14 +191,14 @@ static SwCharFormat* lcl_getCharFormat(SwDoc* pDoc, const uno::Any& aValue) OUString uTmp; aValue >>= uTmp; OUString sCharFormat; - SwStyleNameMapper::FillUIName(uTmp, sCharFormat, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true); + SwStyleNameMapper::FillUIName(uTmp, sCharFormat, SwGetPoolIdFromName::ChrFmt, true); if (sCharFormat != SW_RESSTR(STR_POOLCOLL_STANDARD)) { pRet = pDoc->FindCharFormatByName( sCharFormat ); } if(!pRet) { - const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(sCharFormat, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(sCharFormat, SwGetPoolIdFromName::ChrFmt); if(USHRT_MAX != nId) pRet = pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( nId ); } @@ -210,11 +210,11 @@ static SwTextFormatColl* lcl_GetParaStyle(SwDoc* pDoc, const uno::Any& aValue) OUString uTmp; aValue >>= uTmp; OUString sParaStyle; - SwStyleNameMapper::FillUIName(uTmp, sParaStyle, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillUIName(uTmp, sParaStyle, SwGetPoolIdFromName::TxtColl, true ); SwTextFormatColl* pRet = pDoc->FindTextFormatCollByName( sParaStyle ); if( !pRet ) { - const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sParaStyle, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sParaStyle, SwGetPoolIdFromName::TxtColl ); if( USHRT_MAX != nId ) pRet = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( nId ); } @@ -226,11 +226,11 @@ static SwPageDesc* lcl_GetPageDesc(SwDoc* pDoc, const uno::Any& aValue) OUString uTmp; aValue >>= uTmp; OUString sPageDesc; - SwStyleNameMapper::FillUIName(uTmp, sPageDesc, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true ); + SwStyleNameMapper::FillUIName(uTmp, sPageDesc, SwGetPoolIdFromName::PageDesc, true ); SwPageDesc* pRet = pDoc->FindPageDesc( sPageDesc ); if(!pRet) { - const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(sPageDesc, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC); + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(sPageDesc, SwGetPoolIdFromName::PageDesc); if(USHRT_MAX != nId) pRet = pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool( nId ); } @@ -469,7 +469,7 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName) OUString aString; if(pColl) aString = pColl->GetName(); - SwStyleNameMapper::FillProgName(aString, aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true); + SwStyleNameMapper::FillProgName(aString, aString, SwGetPoolIdFromName::TxtColl, true); aRet <<= aString; } break; @@ -481,7 +481,7 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName) SwStyleNameMapper::FillProgName( rFootnoteInfo.GetPageDesc( *pDoc )->GetName(), aString, - nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, + SwGetPoolIdFromName::PageDesc, true); } aRet <<= aString; @@ -507,7 +507,7 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName) SwStyleNameMapper::FillProgName( pCharFormat->GetName(), aString, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, + SwGetPoolIdFromName::ChrFmt, true); } aRet <<= aString; @@ -704,7 +704,7 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName) SwStyleNameMapper::FillProgName( aString, aString, - nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, + SwGetPoolIdFromName::TxtColl, true); aRet <<= aString; @@ -718,7 +718,7 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName) SwStyleNameMapper::FillProgName( rEndInfo.GetPageDesc( *pDoc )->GetName(), aString, - nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, + SwGetPoolIdFromName::PageDesc, true ); } aRet <<= aString; @@ -744,7 +744,7 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName) SwStyleNameMapper::FillProgName( pCharFormat->GetName(), aString, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, + SwGetPoolIdFromName::ChrFmt, true ); } aRet <<= aString; @@ -962,7 +962,7 @@ Any SwXLineNumberingProperties::getPropertyValue(const OUString& rPropertyName) SwStyleNameMapper::FillProgName( rInfo.GetCharFormat(pDoc->getIDocumentStylePoolAccess())->GetName(), aString, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, + SwGetPoolIdFromName::ChrFmt, true); } aRet <<= aString; @@ -1339,7 +1339,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex( sValue.clear(); } } - SwStyleNameMapper::FillProgName(sValue, aUString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true); + SwStyleNameMapper::FillProgName(sValue, aUString, SwGetPoolIdFromName::TxtColl, true); } return GetPropertiesForNumFormat(rFormat, CharStyleName, (pDocShell) ? & aUString : nullptr); @@ -1376,7 +1376,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat //char style name aUString.clear(); - SwStyleNameMapper::FillProgName( rCharFormatName, aUString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + SwStyleNameMapper::FillProgName( rCharFormatName, aUString, SwGetPoolIdFromName::ChrFmt, true ); aPropertyValues.push_back(comphelper::makePropertyValue("CharStyleName", aUString)); //startvalue @@ -1715,7 +1715,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat( OUString uTmp; pProp->Value >>= uTmp; OUString sCharFormatName; - SwStyleNameMapper::FillUIName( uTmp, sCharFormatName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + SwStyleNameMapper::FillUIName( uTmp, sCharFormatName, SwGetPoolIdFromName::ChrFmt, true ); if (sCharFormatName == UNO_NAME_CHARACTER_FORMAT_NONE) { rCharStyleName = aInvalidStyle; @@ -1882,7 +1882,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat( OUString uTmp; pProp->Value >>= uTmp; OUString sStyleName; - SwStyleNameMapper::FillUIName(uTmp, sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillUIName(uTmp, sStyleName, SwGetPoolIdFromName::TxtColl, true ); *pParagraphStyleName = sStyleName; } } @@ -2037,7 +2037,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat( OUString uTmp; pProp->Value >>= uTmp; OUString sStyleName; - SwStyleNameMapper::FillUIName(uTmp, sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true ); + SwStyleNameMapper::FillUIName(uTmp, sStyleName, SwGetPoolIdFromName::TxtColl, true ); *pHeadingStyleName = sStyleName; } } @@ -2241,7 +2241,7 @@ OUString SwXNumberingRules::getName() throw( RuntimeException, std::exception ) if(pNumRule) { OUString aString; - SwStyleNameMapper::FillProgName(pNumRule->GetName(), aString, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE, true ); + SwStyleNameMapper::FillProgName(pNumRule->GetName(), aString, SwGetPoolIdFromName::NumRule, true ); return aString; } // consider chapter numbering <SwXNumberingRules> @@ -2249,7 +2249,7 @@ OUString SwXNumberingRules::getName() throw( RuntimeException, std::exception ) { OUString aString; SwStyleNameMapper::FillProgName( pDocShell->GetDoc()->GetOutlineNumRule()->GetName(), - aString, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE, true ); + aString, SwGetPoolIdFromName::NumRule, true ); return aString; } return m_sCreatedNumRuleName; diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index b8c92c32cf4c..9ac1673f5d58 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -905,7 +905,7 @@ void XStyleFamily::insertByName(const OUString& rName, const uno::Any& rElement) throw container::ElementExistException(); if(rElement.getValueType().getTypeClass() != uno::TypeClass_INTERFACE) throw lang::IllegalArgumentException(); - if (nsSwGetPoolIdFromName::GET_POOLID_CELLSTYLE == m_rEntry.m_aPoolId) + if (SwGetPoolIdFromName::CellStyle == m_rEntry.m_aPoolId) { // handle cell style uno::Reference<style::XStyle> xStyle = rElement.get<uno::Reference<style::XStyle>>(); @@ -917,7 +917,7 @@ void XStyleFamily::insertByName(const OUString& rName, const uno::Any& rElement) m_pDocShell->GetDoc()->GetCellStyles().AddBoxFormat(*pNewStyle->GetBoxFormat(), sStyleName); pNewStyle->SetPhysical(); } - else if (nsSwGetPoolIdFromName::GET_POOLID_TABSTYLE == m_rEntry.m_aPoolId) + else if (SwGetPoolIdFromName::TabStyle == m_rEntry.m_aPoolId) { // handle table style uno::Reference<style::XStyle> xStyle = rElement.get<uno::Reference<style::XStyle>>(); @@ -973,7 +973,7 @@ void XStyleFamily::replaceByName(const OUString& rName, const uno::Any& rElement // replacements only for userdefined styles if(!pBase) throw container::NoSuchElementException(); - if (nsSwGetPoolIdFromName::GET_POOLID_CELLSTYLE == m_rEntry.m_aPoolId) + if (SwGetPoolIdFromName::CellStyle == m_rEntry.m_aPoolId) { // handle cell styles, don't call on assigned cell styles (TableStyle child) OUString sParent; @@ -990,7 +990,7 @@ void XStyleFamily::replaceByName(const OUString& rName, const uno::Any& rElement pStyleToReplaceWith->SetPhysical(); } } - else if (nsSwGetPoolIdFromName::GET_POOLID_TABSTYLE == m_rEntry.m_aPoolId) + else if (SwGetPoolIdFromName::TabStyle == m_rEntry.m_aPoolId) { // handle table styles SwTableAutoFormat* pTableAutoFormat = SwXTextTableStyle::GetTableAutoFormat(m_pDocShell, rName); @@ -1038,12 +1038,12 @@ void XStyleFamily::removeByName(const OUString& rName) throw( container::NoSuchE SfxStyleSheetBase* pBase = m_pBasePool->Find( sName ); if(!pBase) throw container::NoSuchElementException(); - if (nsSwGetPoolIdFromName::GET_POOLID_CELLSTYLE == m_rEntry.m_aPoolId) + if (SwGetPoolIdFromName::CellStyle == m_rEntry.m_aPoolId) { // handle cell style m_pDocShell->GetDoc()->GetCellStyles().RemoveBoxFormat(rName); } - else if (nsSwGetPoolIdFromName::GET_POOLID_TABSTYLE == m_rEntry.m_aPoolId) + else if (SwGetPoolIdFromName::TabStyle == m_rEntry.m_aPoolId) { // handle table style m_pDocShell->GetDoc()->GetTableStyles().EraseAutoFormat(rName); @@ -1079,13 +1079,13 @@ static const std::vector<StyleFamilyEntry>* lcl_GetStyleFamilyEntries() if(!our_pStyleFamilyEntries) { our_pStyleFamilyEntries = new std::vector<StyleFamilyEntry>{ - { SfxStyleFamily::Char, PROPERTY_MAP_CHAR_STYLE, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, "CharacterStyles", STR_STYLE_FAMILY_CHARACTER, &lcl_GetCountOrName<SfxStyleFamily::Char>, &lcl_CreateStyle<SfxStyleFamily::Char>, &lcl_TranslateIndex<SfxStyleFamily::Char> }, - { SfxStyleFamily::Para, PROPERTY_MAP_PARA_STYLE, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, "ParagraphStyles", STR_STYLE_FAMILY_PARAGRAPH, &lcl_GetCountOrName<SfxStyleFamily::Para>, &lcl_CreateStyle<SfxStyleFamily::Para>, &lcl_TranslateIndex<SfxStyleFamily::Para> }, - { SfxStyleFamily::Page, PROPERTY_MAP_PAGE_STYLE, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, "PageStyles", STR_STYLE_FAMILY_PAGE, &lcl_GetCountOrName<SfxStyleFamily::Page>, &lcl_CreateStyle<SfxStyleFamily::Page>, &lcl_TranslateIndexRange<RES_POOLPAGE_BEGIN, nPoolPageRange> }, - { SfxStyleFamily::Frame, PROPERTY_MAP_FRAME_STYLE, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, "FrameStyles", STR_STYLE_FAMILY_FRAME, &lcl_GetCountOrName<SfxStyleFamily::Frame>, &lcl_CreateStyle<SfxStyleFamily::Frame>, &lcl_TranslateIndexRange<RES_POOLFRM_BEGIN, nPoolFrameRange> }, - { SfxStyleFamily::Pseudo, PROPERTY_MAP_NUM_STYLE, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE, "NumberingStyles", STR_STYLE_FAMILY_NUMBERING, &lcl_GetCountOrName<SfxStyleFamily::Pseudo>, &lcl_CreateStyle<SfxStyleFamily::Pseudo>, &lcl_TranslateIndexRange<RES_POOLNUMRULE_BEGIN, nPoolNumRange> }, - { SfxStyleFamily::Table, PROPERTY_MAP_TABLE_STYLE, nsSwGetPoolIdFromName::GET_POOLID_TABSTYLE, "TableStyles", STR_STYLE_FAMILY_TABLE, &lcl_GetCountOrName<SfxStyleFamily::Table>, &lcl_CreateStyle<SfxStyleFamily::Table>, &lcl_TranslateIndex<SfxStyleFamily::Table> }, - { SfxStyleFamily::Cell, PROPERTY_MAP_CELL_STYLE, nsSwGetPoolIdFromName::GET_POOLID_CELLSTYLE,"CellStyles", STR_STYLE_FAMILY_CELL, &lcl_GetCountOrName<SfxStyleFamily::Cell>, &lcl_CreateStyle<SfxStyleFamily::Cell>, &lcl_TranslateIndex<SfxStyleFamily::Cell> } + { SfxStyleFamily::Char, PROPERTY_MAP_CHAR_STYLE, SwGetPoolIdFromName::ChrFmt, "CharacterStyles", STR_STYLE_FAMILY_CHARACTER, &lcl_GetCountOrName<SfxStyleFamily::Char>, &lcl_CreateStyle<SfxStyleFamily::Char>, &lcl_TranslateIndex<SfxStyleFamily::Char> }, + { SfxStyleFamily::Para, PROPERTY_MAP_PARA_STYLE, SwGetPoolIdFromName::TxtColl, "ParagraphStyles", STR_STYLE_FAMILY_PARAGRAPH, &lcl_GetCountOrName<SfxStyleFamily::Para>, &lcl_CreateStyle<SfxStyleFamily::Para>, &lcl_TranslateIndex<SfxStyleFamily::Para> }, + { SfxStyleFamily::Page, PROPERTY_MAP_PAGE_STYLE, SwGetPoolIdFromName::PageDesc, "PageStyles", STR_STYLE_FAMILY_PAGE, &lcl_GetCountOrName<SfxStyleFamily::Page>, &lcl_CreateStyle<SfxStyleFamily::Page>, &lcl_TranslateIndexRange<RES_POOLPAGE_BEGIN, nPoolPageRange> }, + { SfxStyleFamily::Frame, PROPERTY_MAP_FRAME_STYLE, SwGetPoolIdFromName::FrmFmt, "FrameStyles", STR_STYLE_FAMILY_FRAME, &lcl_GetCountOrName<SfxStyleFamily::Frame>, &lcl_CreateStyle<SfxStyleFamily::Frame>, &lcl_TranslateIndexRange<RES_POOLFRM_BEGIN, nPoolFrameRange> }, + { SfxStyleFamily::Pseudo, PROPERTY_MAP_NUM_STYLE, SwGetPoolIdFromName::NumRule, "NumberingStyles", STR_STYLE_FAMILY_NUMBERING, &lcl_GetCountOrName<SfxStyleFamily::Pseudo>, &lcl_CreateStyle<SfxStyleFamily::Pseudo>, &lcl_TranslateIndexRange<RES_POOLNUMRULE_BEGIN, nPoolNumRange> }, + { SfxStyleFamily::Table, PROPERTY_MAP_TABLE_STYLE, SwGetPoolIdFromName::TabStyle, "TableStyles", STR_STYLE_FAMILY_TABLE, &lcl_GetCountOrName<SfxStyleFamily::Table>, &lcl_CreateStyle<SfxStyleFamily::Table>, &lcl_TranslateIndex<SfxStyleFamily::Table> }, + { SfxStyleFamily::Cell, PROPERTY_MAP_CELL_STYLE, SwGetPoolIdFromName::CellStyle,"CellStyles", STR_STYLE_FAMILY_CELL, &lcl_GetCountOrName<SfxStyleFamily::Cell>, &lcl_CreateStyle<SfxStyleFamily::Cell>, &lcl_TranslateIndex<SfxStyleFamily::Cell> } }; } return our_pStyleFamilyEntries; @@ -1171,7 +1171,7 @@ static SwGetPoolIdFromName lcl_GetSwEnumFromSfxEnum(SfxStyleFamily eFamily) if(pEntry != pEntries->end()) return pEntry->m_aPoolId; SAL_WARN("sw.uno", "someone asking for all styles in unostyle.cxx!" ); - return nsSwGetPoolIdFromName::GET_POOLID_CHRFMT; + return SwGetPoolIdFromName::ChrFmt; } namespace @@ -1276,7 +1276,7 @@ static bool lcl_InitConditional(SfxStyleSheetBasePool* pBasePool, const SfxStyle SAL_WARN_IF(!pBase, "sw.uno", "where is the style?" ); if(!pBase) return false; - const sal_uInt16 nId(SwStyleNameMapper::GetPoolIdFromUIName(rStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL)); + const sal_uInt16 nId(SwStyleNameMapper::GetPoolIdFromUIName(rStyleName, SwGetPoolIdFromName::TxtColl)); if(nId != USHRT_MAX) return ::IsConditionalByPoolId(nId); return RES_CONDTXTFMTCOLL == static_cast<SwDocStyleSheet*>(pBase)->GetCollection()->Which(); @@ -1785,7 +1785,7 @@ void SwXStyle::SetPropertyValue<RES_PAGEDESC>(const SfxItemPropertySimpleEntry& pNewDesc.reset(new SwFormatPageDesc); const auto sValue(rValue.get<OUString>()); OUString sDescName; - SwStyleNameMapper::FillUIName(sValue, sDescName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true); + SwStyleNameMapper::FillUIName(sValue, sDescName, SwGetPoolIdFromName::PageDesc, true); if(pNewDesc->GetPageDesc() && pNewDesc->GetPageDesc()->GetName() == sDescName) return; if(sDescName.isEmpty()) @@ -1885,7 +1885,7 @@ void SwXStyle::SetPropertyValue<SID_SWREGISTER_COLLECTION>(const SfxItemProperty aReg.SetWhich(SID_SWREGISTER_MODE); o_rStyleBase.GetItemSet().Put(aReg); OUString aString; - SwStyleNameMapper::FillUIName(sName, aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true); + SwStyleNameMapper::FillUIName(sName, aString, SwGetPoolIdFromName::TxtColl, true); o_rStyleBase.GetItemSet().Put(SfxStringItem(SID_SWREGISTER_COLLECTION, aString ) ); } template<> @@ -1904,12 +1904,12 @@ void SwXStyle::SetPropertyValue<RES_TXTATR_CJK_RUBY>(const SfxItemPropertySimple else pRuby.reset(new SwFormatRuby(OUString())); OUString sStyle; - SwStyleNameMapper::FillUIName(sValue, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true); + SwStyleNameMapper::FillUIName(sValue, sStyle, SwGetPoolIdFromName::ChrFmt, true); pRuby->SetCharFormatName(sValue); pRuby->SetCharFormatId(0); if(!sValue.isEmpty()) { - const sal_uInt16 nId(SwStyleNameMapper::GetPoolIdFromUIName(sValue, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT)); + const sal_uInt16 nId(SwStyleNameMapper::GetPoolIdFromUIName(sValue, SwGetPoolIdFromName::ChrFmt)); pRuby->SetCharFormatId(nId); } rStyleSet.Put(*pRuby); @@ -1931,7 +1931,7 @@ void SwXStyle::SetPropertyValue<RES_PARATR_DROP>(const SfxItemPropertySimpleEntr pDrop.reset(new SwFormatDrop); const auto sValue(rValue.get<OUString>()); OUString sStyle; - SwStyleNameMapper::FillUIName(sValue, sStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true); + SwStyleNameMapper::FillUIName(sValue, sStyle, SwGetPoolIdFromName::ChrFmt, true); auto pStyle(static_cast<SwDocStyleSheet*>(m_pDoc->GetDocShell()->GetStyleSheetPool()->Find(sStyle, SfxStyleFamily::Char))); if(!pStyle) throw lang::IllegalArgumentException(); @@ -2174,7 +2174,7 @@ uno::Any SwXStyle::GetStyleProperty<RES_PAGEDESC>(const SfxItemPropertySimpleEnt if(!pDesc) return uno::Any(); OUString aString; - SwStyleNameMapper::FillProgName(pDesc->GetName(), aString, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true); + SwStyleNameMapper::FillProgName(pDesc->GetName(), aString, SwGetPoolIdFromName::PageDesc, true); return uno::makeAny(aString); } template<> @@ -2253,7 +2253,7 @@ uno::Any SwXStyle::GetStyleProperty<SID_SWREGISTER_COLLECTION>(const SfxItemProp if(!pCol) return uno::makeAny(OUString()); OUString aName; - SwStyleNameMapper::FillProgName(pCol->GetName(), aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true); + SwStyleNameMapper::FillProgName(pCol->GetName(), aName, SwGetPoolIdFromName::TxtColl, true); return uno::makeAny(aName); } template<> @@ -4523,7 +4523,7 @@ OUString SAL_CALL SwXTextTableStyle::getName() throw(uno::RuntimeException, std: { SolarMutexGuard aGuard; OUString sProgName; - SwStyleNameMapper::FillProgName(m_pTableAutoFormat->GetName(), sProgName, nsSwGetPoolIdFromName::GET_POOLID_TABSTYLE, true); + SwStyleNameMapper::FillProgName(m_pTableAutoFormat->GetName(), sProgName, SwGetPoolIdFromName::TabStyle, true); return sProgName; } @@ -4866,7 +4866,7 @@ OUString SAL_CALL SwXTextCellStyle::getName() throw(css::uno::RuntimeException, if (m_bPhysical) { OUString sParentStyle; - SwStyleNameMapper::FillUIName(m_sParentStyle, sParentStyle, nsSwGetPoolIdFromName::GET_POOLID_TABSTYLE, true); + SwStyleNameMapper::FillUIName(m_sParentStyle, sParentStyle, SwGetPoolIdFromName::TabStyle, true); SwTableAutoFormat* pTableFormat = m_pDocShell->GetDoc()->GetTableStyles().FindAutoFormat(sParentStyle); if (!pTableFormat) { diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 4e92529ff215..43b3b7ed2e86 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -278,7 +278,7 @@ static void lcl_SetSpecialProperty(SwFrameFormat* pFormat, const SwPageDesc* pDesc = nullptr; if (!sPageStyle.isEmpty()) { - SwStyleNameMapper::FillUIName(sPageStyle, sPageStyle, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true ); + SwStyleNameMapper::FillUIName(sPageStyle, sPageStyle, SwGetPoolIdFromName::PageDesc, true ); pDesc = SwPageDesc::GetByName(*pFormat->GetDoc(), sPageStyle); } SwFormatPageDesc aDesc( pDesc ); @@ -328,7 +328,7 @@ static uno::Any lcl_GetSpecialProperty(SwFrameFormat* pFormat, const SfxItemProp { const SwPageDesc* pDsc = static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc(); if(pDsc) - return uno::makeAny<OUString>(SwStyleNameMapper::GetProgName(pDsc->GetName(), nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC )); + return uno::makeAny<OUString>(SwStyleNameMapper::GetProgName(pDsc->GetName(), SwGetPoolIdFromName::PageDesc )); } return uno::makeAny(OUString()); } @@ -1886,7 +1886,7 @@ void SwTableProperties_Impl::ApplyTableAttr(const SwTable& rTable, SwDoc& rDoc) OUString sPageStyle = pPage->get<OUString>(); if(!sPageStyle.isEmpty()) { - SwStyleNameMapper::FillUIName(sPageStyle, sPageStyle, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, true); + SwStyleNameMapper::FillUIName(sPageStyle, sPageStyle, SwGetPoolIdFromName::PageDesc, true); const SwPageDesc* pDesc = SwPageDesc::GetByName(rDoc, sPageStyle); if(pDesc) { diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 4de75bc3f9d6..1d47d51daa83 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -54,7 +54,6 @@ #include <IDocumentStylePoolAccess.hxx> using namespace com::sun::star; -using namespace nsSwGetPoolIdFromName; namespace { @@ -491,7 +490,7 @@ namespace sw { // Collection not found, try in Pool ? sal_uInt16 n = SwStyleNameMapper::GetPoolIdFromUIName(rName, - nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); + SwGetPoolIdFromName::TxtColl); if (n != SAL_MAX_UINT16) // found or standard pColl = rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool(n, false); } @@ -505,7 +504,7 @@ namespace sw { // Collection not found, try in Pool ? sal_uInt16 n = SwStyleNameMapper::GetPoolIdFromUIName(rName, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + SwGetPoolIdFromName::ChrFmt); if (n != SAL_MAX_UINT16) // found or standard pFormat = rDoc.getIDocumentStylePoolAccess().GetCharFormatFromPool(n); } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 503f83ef11b4..486845083f0f 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2154,7 +2154,7 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr ) SwFormatINetFormat aURL( sURL, sTarget ); const OUString sLinkStyle("Index Link"); const sal_uInt16 nPoolId = - SwStyleNameMapper::GetPoolIdFromUIName( sLinkStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + SwStyleNameMapper::GetPoolIdFromUIName( sLinkStyle, SwGetPoolIdFromName::ChrFmt ); aURL.SetVisitedFormatAndId( sLinkStyle, nPoolId); aURL.SetINetFormatAndId( sLinkStyle, nPoolId ); m_pCtrlStck->NewAttr( *m_pPaM->GetPoint(), aURL ); @@ -3507,7 +3507,7 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, OUString& rStr { OUString sLinkStyle("Index Link"); sal_uInt16 nPoolId = - SwStyleNameMapper::GetPoolIdFromUIName( sLinkStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + SwStyleNameMapper::GetPoolIdFromUIName( sLinkStyle, SwGetPoolIdFromName::ChrFmt ); aURL.SetVisitedFormatAndId( sLinkStyle, nPoolId ); aURL.SetINetFormatAndId( sLinkStyle, nPoolId ); } diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index 64c87c62a1c2..5440a19e1ef8 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -554,14 +554,14 @@ void SwXMLItemSetStyleContext_Impl::ConnectPageDesc() GetMasterPageName() ); SwStyleNameMapper::FillUIName( sName, sName, - nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, + SwGetPoolIdFromName::PageDesc, true); SwPageDesc *pPageDesc = pDoc->FindPageDesc(sName); if( !pPageDesc ) { // If the page style is a pool style, then we maybe have to create it // first if it hasn't been used by now. - const sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC ); + const sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sName, SwGetPoolIdFromName::PageDesc ); if( USHRT_MAX != nPoolId ) pPageDesc = pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool( nPoolId, false ); } diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx index 33a6e0ad0aba..6717b2c61afc 100644 --- a/sw/source/filter/xml/xmlfmte.cxx +++ b/sw/source/filter/xml/xmlfmte.cxx @@ -92,7 +92,7 @@ void SwXMLExport::ExportFormat( const SwFormat& rFormat, enum XMLTokenEnum eFami SwStyleNameMapper::FillProgName( pPageDesc->GetName(), sName, - nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, + SwGetPoolIdFromName::PageDesc, true); AddAttribute( XML_NAMESPACE_STYLE, XML_MASTER_PAGE_NAME, EncodeStyleName( sName ) ); diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index d3da603cf675..3d37b43c8248 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -268,11 +268,11 @@ bool SwCharURLPage::FillItemSet(SfxItemSet* rSet) // set valid settings first OUString sEntry = m_pVisitedLB->GetSelectEntry(); - sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, SwGetPoolIdFromName::ChrFmt); aINetFormat.SetVisitedFormatAndId( sEntry, nId ); sEntry = m_pNotVisitedLB->GetSelectEntry(); - nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, SwGetPoolIdFromName::ChrFmt); aINetFormat.SetINetFormatAndId( sEntry, nId ); if( pINetItem && !pINetItem->GetMacroTable().empty() ) diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index acf15d512482..aa7b23d349f7 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -1231,7 +1231,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, if( !pColl ) { const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( - sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + sTmplNm, SwGetPoolIdFromName::TxtColl ); if( USHRT_MAX != nId ) pColl = rSh.GetTextCollFromPool( nId ); else diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index cf34f85c11a1..b440533e24b2 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -526,7 +526,7 @@ bool SwMultiTOXTabDialog::IsNoNum(SwWrtShell& rSh, const OUString& rName) return true; const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( - rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); + rName, SwGetPoolIdFromName::TxtColl); if(nId != USHRT_MAX && ! rSh.GetTextCollFromPool(nId)->IsAssignedToListLevelOfOutlineStyle()) return true; diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 0d2e8ccb7648..bd551ffdc74b 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -684,7 +684,7 @@ sal_uInt16 SwDocShell::Edit( SwTextFormatColl* pColl = m_pWrtShell->FindTextFormatCollByName( rParent ); if(!pColl) { - sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, SwGetPoolIdFromName::TxtColl); if(USHRT_MAX != nId) pColl = m_pWrtShell->GetTextCollFromPool( nId ); } @@ -718,7 +718,7 @@ sal_uInt16 SwDocShell::Edit( SwCharFormat* pCFormat = m_pWrtShell->FindCharFormatByName(rParent); if(!pCFormat) { - sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, SwGetPoolIdFromName::ChrFmt); if(USHRT_MAX != nId) pCFormat = m_pWrtShell->GetCharFormatFromPool( nId ); } @@ -742,7 +742,7 @@ sal_uInt16 SwDocShell::Edit( SwFrameFormat* pFFormat = m_pWrtShell->GetDoc()->FindFrameFormatByName( rParent ); if(!pFFormat) { - sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, SwGetPoolIdFromName::FrmFmt); if(USHRT_MAX != nId) pFFormat = m_pWrtShell->GetFrameFormatFromPool( nId ); } diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 52f1737b7fe9..aa999ea4894e 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -141,7 +141,7 @@ static SwCharFormat* lcl_FindCharFormat( SwDoc& rDoc, if( !pFormat && bCreate ) { // explore Pool - const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, SwGetPoolIdFromName::ChrFmt); if(nId != USHRT_MAX) pFormat = rDoc.getIDocumentStylePoolAccess().GetCharFormatFromPool(nId); } @@ -177,7 +177,7 @@ static SwTextFormatColl* lcl_FindParaFormat( SwDoc& rDoc, pColl = rDoc.FindTextFormatCollByName( rName ); if( !pColl && bCreate ) { // explore Pool - const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, SwGetPoolIdFromName::TxtColl); if(nId != USHRT_MAX) pColl = rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool(nId); } @@ -214,7 +214,7 @@ static SwFrameFormat* lcl_FindFrameFormat( SwDoc& rDoc, pFormat = rDoc.FindFrameFormatByName( rName ); if( !pFormat && bCreate ) { // explore Pool - const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT); + const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, SwGetPoolIdFromName::FrmFmt); if(nId != USHRT_MAX) pFormat = rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool(nId); } @@ -249,7 +249,7 @@ static const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc, pDesc = rDoc.FindPageDesc(rName); if( !pDesc && bCreate ) { - sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, SwGetPoolIdFromName::PageDesc); if(nId != USHRT_MAX) pDesc = rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool(nId); } @@ -283,7 +283,7 @@ static const SwNumRule* lcl_FindNumRule( SwDoc& rDoc, pRule = rDoc.FindNumRulePtr( rName ); if( !pRule && bCreate ) { - sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, SwGetPoolIdFromName::NumRule); if(nId != USHRT_MAX) pRule = rDoc.getIDocumentStylePoolAccess().GetNumRuleFromPool(nId); } @@ -345,7 +345,7 @@ static const SwBoxAutoFormat* lcl_FindCellStyle(SwDoc& rDoc, const OUString& rNa const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat]; const SwBoxAutoFormat& rBoxFormat = rTableStyle.GetBoxFormat(nBoxIndex); OUString sBoxFormatName; - SwStyleNameMapper::FillProgName(rTableStyle.GetName(), sBoxFormatName, nsSwGetPoolIdFromName::GET_POOLID_CELLSTYLE, true); + SwStyleNameMapper::FillProgName(rTableStyle.GetName(), sBoxFormatName, SwGetPoolIdFromName::CellStyle, true); sBoxFormatName += rTableStyle.GetTableTemplateCellSubName(rBoxFormat); if (rName == sBoxFormatName) pFormat = &rBoxFormat; @@ -740,17 +740,17 @@ const OUString& SwDocStyleSheet::GetParent() const { case SfxStyleFamily::Char: pFormat = rDoc.FindCharFormatByName( aName ); - eGetType = nsSwGetPoolIdFromName::GET_POOLID_CHRFMT; + eGetType = SwGetPoolIdFromName::ChrFmt; break; case SfxStyleFamily::Para: pFormat = rDoc.FindTextFormatCollByName( aName ); - eGetType = nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL; + eGetType = SwGetPoolIdFromName::TxtColl; break; case SfxStyleFamily::Frame: pFormat = rDoc.FindFrameFormatByName( aName ); - eGetType = nsSwGetPoolIdFromName::GET_POOLID_FRMFMT; + eGetType = SwGetPoolIdFromName::FrmFmt; break; case SfxStyleFamily::Page: @@ -1563,7 +1563,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, SwNumRule* pRule = rDoc.FindNumRulePtr( sNumRule ); if( !pRule ) { // Numbering rule not in use yet. - sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE ); + sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, SwGetPoolIdFromName::NumRule ); if( USHRT_MAX != nPoolId ) // It's a standard numbering rule { rDoc.getIDocumentStylePoolAccess().GetNumRuleFromPool( nPoolId ); // Create numbering rule (physical) @@ -1897,7 +1897,7 @@ bool SwDocStyleSheet::FillStyleSheet( RES_POOLCOLL_TEXT_BEGIN ] ) nPoolId = 0; else - nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, SwGetPoolIdFromName::ChrFmt ); } bRet = nullptr != pCharFormat || USHRT_MAX != nPoolId; @@ -1922,7 +1922,7 @@ bool SwDocStyleSheet::FillStyleSheet( if( pColl ) PresetFollow( pColl->GetNextTextFormatColl().GetName() ); else if( !bCreate ) - nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, SwGetPoolIdFromName::TxtColl ); bRet = nullptr != pColl || USHRT_MAX != nPoolId; @@ -1943,7 +1943,7 @@ bool SwDocStyleSheet::FillStyleSheet( } pFormat = pFrameFormat; if( !bCreate && !pFormat ) - nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT ); + nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, SwGetPoolIdFromName::FrmFmt ); bRet = nullptr != pFrameFormat || USHRT_MAX != nPoolId; @@ -1972,7 +1972,7 @@ bool SwDocStyleSheet::FillStyleSheet( aHelpFile.clear(); } else if( !bCreate ) - nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC ); + nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, SwGetPoolIdFromName::PageDesc ); SetMask( (USER_FMT & nPoolId) ? SFXSTYLEBIT_USERDEF : 0 ); bRet = nullptr != pDesc || USHRT_MAX != nPoolId; @@ -2001,7 +2001,7 @@ bool SwDocStyleSheet::FillStyleSheet( aHelpFile.clear(); } else if( !bCreate ) - nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE ); + nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, SwGetPoolIdFromName::NumRule ); SetMask( (USER_FMT & nPoolId) ? SFXSTYLEBIT_USERDEF : 0 ); bRet = nullptr != pNumRule || USHRT_MAX != nPoolId; @@ -2284,7 +2284,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile ) if( !pCharFormat && nullptr == (pCharFormat = lcl_FindCharFormat( rDoc, aName, nullptr, false )) ) { - nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, SwGetPoolIdFromName::ChrFmt ); return USHRT_MAX == nId ? 0 : nId; } pTmpFormat = pCharFormat; @@ -2294,7 +2294,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile ) if( !pColl && nullptr == ( pColl = lcl_FindParaFormat( rDoc, aName, nullptr, false )) ) { - nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, SwGetPoolIdFromName::TxtColl ); return USHRT_MAX == nId ? 0 : nId; } pTmpFormat = pColl; @@ -2304,7 +2304,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile ) if( !pFrameFormat && nullptr == ( pFrameFormat = lcl_FindFrameFormat( rDoc, aName, nullptr, false ) ) ) { - nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT ); + nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, SwGetPoolIdFromName::FrmFmt ); return USHRT_MAX == nId ? 0 : nId; } pTmpFormat = pFrameFormat; @@ -2314,7 +2314,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile ) if( !pDesc && nullptr == ( pDesc = lcl_FindPageDesc( rDoc, aName, nullptr, false ) ) ) { - nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC ); + nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, SwGetPoolIdFromName::PageDesc ); return USHRT_MAX == nId ? 0 : nId; } @@ -2327,7 +2327,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile ) if( !pNumRule && nullptr == ( pNumRule = lcl_FindNumRule( rDoc, aName, nullptr, false ) ) ) { - nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE ); + nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, SwGetPoolIdFromName::NumRule ); return USHRT_MAX == nId ? 0 : nId; } @@ -2756,7 +2756,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( ! rDoc.getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) ) AppendStyleList(SwStyleNameMapper::GetChrFormatUINameArray(), bIsSearchUsed, bSearchHidden, bOnlyHidden, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, cCHAR); + SwGetPoolIdFromName::ChrFmt, cCHAR); else { aLst.Append( cCHAR, SwStyleNameMapper::GetChrFormatUINameArray()[ @@ -2770,7 +2770,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() } AppendStyleList(SwStyleNameMapper::GetHTMLChrFormatUINameArray(), bIsSearchUsed, bSearchHidden, bOnlyHidden, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, cCHAR); + SwGetPoolIdFromName::ChrFmt, cCHAR); } } @@ -2873,19 +2873,19 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() bAll = ( nSMask & SFXSTYLEBIT_ALL_VISIBLE ) == SFXSTYLEBIT_ALL_VISIBLE; if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_TEXT ) AppendStyleList(SwStyleNameMapper::GetTextUINameArray(), - bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA ); + bIsSearchUsed, bSearchHidden, bOnlyHidden, SwGetPoolIdFromName::TxtColl, cPARA ); if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_CHAPTER ) AppendStyleList(SwStyleNameMapper::GetDocUINameArray(), - bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA ) ; + bIsSearchUsed, bSearchHidden, bOnlyHidden, SwGetPoolIdFromName::TxtColl, cPARA ) ; if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_LIST ) AppendStyleList(SwStyleNameMapper::GetListsUINameArray(), - bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA ) ; + bIsSearchUsed, bSearchHidden, bOnlyHidden, SwGetPoolIdFromName::TxtColl, cPARA ) ; if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_IDX ) AppendStyleList(SwStyleNameMapper::GetRegisterUINameArray(), - bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA ) ; + bIsSearchUsed, bSearchHidden, bOnlyHidden, SwGetPoolIdFromName::TxtColl, cPARA ) ; if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_EXTRA ) AppendStyleList(SwStyleNameMapper::GetExtraUINameArray(), - bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA ) ; + bIsSearchUsed, bSearchHidden, bOnlyHidden, SwGetPoolIdFromName::TxtColl, cPARA ) ; if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_CONDCOLL ) { if( !bIsSearchUsed || @@ -2899,7 +2899,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() (SWSTYLEBIT_HTML | SFXSTYLEBIT_USERDEF) ) { AppendStyleList(SwStyleNameMapper::GetHTMLUINameArray(), - bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA ) ; + bIsSearchUsed, bSearchHidden, bOnlyHidden, SwGetPoolIdFromName::TxtColl, cPARA ) ; if( !bAll ) { // then also the ones, that we are mapping: @@ -2967,7 +2967,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() // PoolFormate if ( bAll ) AppendStyleList(SwStyleNameMapper::GetFrameFormatUINameArray(), - bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, cFRAME); + bIsSearchUsed, bSearchHidden, bOnlyHidden, SwGetPoolIdFromName::FrmFmt, cFRAME); } if( nSearchFamily == SfxStyleFamily::Page || @@ -2996,7 +2996,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() } if ( bAll ) AppendStyleList(SwStyleNameMapper::GetPageDescUINameArray(), - bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, cPAGE); + bIsSearchUsed, bSearchHidden, bOnlyHidden, SwGetPoolIdFromName::PageDesc, cPAGE); } if( nSearchFamily == SfxStyleFamily::Pseudo || @@ -3027,7 +3027,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() } if ( bAll ) AppendStyleList(SwStyleNameMapper::GetNumRuleUINameArray(), - bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE, cNUMRULE); + bIsSearchUsed, bSearchHidden, bOnlyHidden, SwGetPoolIdFromName::NumRule, cNUMRULE); } if( nSearchFamily == SfxStyleFamily::Table || @@ -3069,7 +3069,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat]; const SwBoxAutoFormat& rBoxFormat = rTableStyle.GetBoxFormat(nBoxIndex); OUString sBoxFormatName; - SwStyleNameMapper::FillProgName(rTableStyle.GetName(), sBoxFormatName, nsSwGetPoolIdFromName::GET_POOLID_CELLSTYLE, true); + SwStyleNameMapper::FillProgName(rTableStyle.GetName(), sBoxFormatName, SwGetPoolIdFromName::CellStyle, true); sBoxFormatName += rTableStyle.GetTableTemplateCellSubName(rBoxFormat); aLst.Append( cCELLSTYLE, sBoxFormatName ); } @@ -3129,45 +3129,45 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find(const OUString& rName) void SwStyleSheetIterator::AppendStyleList(const std::vector<OUString>& rList, bool bTestUsed, bool bTestHidden, bool bOnlyHidden, - sal_uInt16 nSection, char cType ) + SwGetPoolIdFromName nSection, char cType ) { SwDoc& rDoc = static_cast<SwDocStyleSheetPool*>(pBasePool)->GetDoc(); bool bUsed = false; for (const auto & i : rList) { bool bHidden = false; - sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(i, (SwGetPoolIdFromName)nSection); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(i, nSection); switch ( nSection ) { - case nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL: + case SwGetPoolIdFromName::TxtColl: { bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolTextCollUsed( nId ); SwFormat* pFormat = rDoc.FindTextFormatCollByName( i ); bHidden = pFormat && pFormat->IsHidden( ); } break; - case nsSwGetPoolIdFromName::GET_POOLID_CHRFMT: + case SwGetPoolIdFromName::ChrFmt: { bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolFormatUsed( nId ); SwFormat* pFormat = rDoc.FindCharFormatByName( i ); bHidden = pFormat && pFormat->IsHidden( ); } break; - case nsSwGetPoolIdFromName::GET_POOLID_FRMFMT: + case SwGetPoolIdFromName::FrmFmt: { bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolFormatUsed( nId ); SwFormat* pFormat = rDoc.FindFrameFormatByName( i ); bHidden = pFormat && pFormat->IsHidden( ); } break; - case nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC: + case SwGetPoolIdFromName::PageDesc: { bUsed = rDoc.getIDocumentStylePoolAccess().IsPoolPageDescUsed( nId ); SwPageDesc* pPgDesc = rDoc.FindPageDesc(i); bHidden = pPgDesc && pPgDesc->IsHidden( ); } break; - case nsSwGetPoolIdFromName::GET_POOLID_NUMRULE: + case SwGetPoolIdFromName::NumRule: { SwNumRule* pRule = rDoc.FindNumRulePtr( i ); bUsed = pRule && SwDoc::IsUsed( *pRule ); diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx index 17b3df9a6fca..2b60c501445b 100644 --- a/sw/source/uibase/shells/txtattr.cxx +++ b/sw/source/uibase/shells/txtattr.cxx @@ -226,14 +226,14 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) OSL_ENSURE( false, "<SwTextShell::ExecCharAttrArgs(..)> - unexpected visited character format ID at hyperlink attribute" ); aINetFormat.SetVisitedFormatAndId( aINetFormat.GetVisitedFormat(), - SwStyleNameMapper::GetPoolIdFromUIName( aINetFormat.GetVisitedFormat(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ) ); + SwStyleNameMapper::GetPoolIdFromUIName( aINetFormat.GetVisitedFormat(), SwGetPoolIdFromName::ChrFmt ) ); } if ( USHRT_MAX == aINetFormat.GetINetFormatId() ) { OSL_ENSURE( false, "<SwTextShell::ExecCharAttrArgs(..)> - unexpected unvisited character format ID at hyperlink attribute" ); aINetFormat.SetINetFormatAndId( aINetFormat.GetINetFormat(), - SwStyleNameMapper::GetPoolIdFromUIName( aINetFormat.GetINetFormat(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ) ); + SwStyleNameMapper::GetPoolIdFromUIName( aINetFormat.GetINetFormat(), SwGetPoolIdFromName::ChrFmt ) ); } if ( pColl ) diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx index 545303262c4f..82adfbe5082a 100644 --- a/sw/source/uibase/uiview/viewdlg2.cxx +++ b/sw/source/uibase/uiview/viewdlg2.cxx @@ -102,7 +102,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt) SwWrtShell &rSh = GetWrtShell(); if(!rName.isEmpty()) { - sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); + sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, SwGetPoolIdFromName::TxtColl); if( USHRT_MAX != nPoolId ) rSh.GetTextCollFromPool(nPoolId); // Pool template does not exist: Does it exist on the document? diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index ecc6e4f32d08..9a968d4b6143 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -233,7 +233,7 @@ static SwTextFormatColl *lcl_GetParaStyle(const OUString& rCollName, SwDoc* pDoc if( !pColl ) { const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( - rCollName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + rCollName, SwGetPoolIdFromName::TxtColl ); if( USHRT_MAX != nId ) pColl = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( nId ); } diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 1d0c04182fe6..a1ff9557a078 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -555,7 +555,7 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto pValues[1].Name = UNO_NAME_RUBY_TEXT; pValues[1].Value <<= rAttr.GetText(); pValues[2].Name = UNO_NAME_RUBY_CHAR_STYLE_NAME; - SwStyleNameMapper::FillProgName(rAttr.GetCharFormatName(), aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + SwStyleNameMapper::FillProgName(rAttr.GetCharFormatName(), aString, SwGetPoolIdFromName::ChrFmt, true ); pValues[2].Value <<= aString; pValues[3].Name = UNO_NAME_RUBY_ADJUST; pValues[3].Value <<= (sal_Int16)rAttr.GetAdjustment(); @@ -606,10 +606,10 @@ void SAL_CALL SwXTextView::setRubyList( if((pProperties[nProp].Value >>= sTmp)) { OUString sName; - SwStyleNameMapper::FillUIName(sTmp, sName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, true ); + SwStyleNameMapper::FillUIName(sTmp, sName, SwGetPoolIdFromName::ChrFmt, true ); const sal_uInt16 nPoolId = sName.isEmpty() ? 0 : SwStyleNameMapper::GetPoolIdFromUIName(sName, - nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + SwGetPoolIdFromName::ChrFmt ); pEntry->GetRubyAttr().SetCharFormatName( sName ); pEntry->GetRubyAttr().SetCharFormatId( nPoolId ); diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 823e6d501986..173fa4ffd309 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -397,7 +397,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) if( !pColl ) { const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( - rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + rColl, SwGetPoolIdFromName::TxtColl ); if( USHRT_MAX != nId ) pColl = rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( nId ); else @@ -718,7 +718,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted, bo const sal_Int32 nPos = bSorted ? InsertStringSorted(pBase->GetName(), rToFill, nOffset ) : rToFill.InsertEntry(pBase->GetName()); - sal_IntPtr nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( pBase->GetName(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + sal_IntPtr nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( pBase->GetName(), SwGetPoolIdFromName::ChrFmt ); rToFill.SetEntryData( nPos, reinterpret_cast<void*>(nPoolId)); } pBase = pPool->Next(); diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 0b9bc15f19e2..54fdfd64665c 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1453,7 +1453,7 @@ SwTextFormatColl *SwWrtShell::GetParaStyle(const OUString &rCollName, GetStyle e SwTextFormatColl* pColl = FindTextFormatCollByName( rCollName ); if( !pColl && GETSTYLE_NOCREATE != eCreate ) { - sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rCollName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rCollName, SwGetPoolIdFromName::TxtColl ); if( USHRT_MAX != nId || GETSTYLE_CREATEANY == eCreate ) pColl = GetTextCollFromPool( nId ); } @@ -1470,7 +1470,7 @@ SwCharFormat *SwWrtShell::GetCharStyle(const OUString &rFormatName, GetStyle eCr SwCharFormat* pFormat = FindCharFormatByName( rFormatName ); if( !pFormat && GETSTYLE_NOCREATE != eCreate ) { - sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rFormatName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); + sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rFormatName, SwGetPoolIdFromName::ChrFmt ); if( USHRT_MAX != nId || GETSTYLE_CREATEANY == eCreate ) pFormat = static_cast<SwCharFormat*>(GetFormatFromPool( nId )); } |