Kaydet (Commit) 84a67586 authored tarafından Michael Stahl's avatar Michael Stahl

sw: prefix members of SwFieldType

Change-Id: Ib07a3c15cb48998d0acb5bfae4e902a2d729b648
üst 7d42346b
...@@ -237,10 +237,10 @@ class SW_DLLPUBLIC SwFieldType : public SwModify ...@@ -237,10 +237,10 @@ class SW_DLLPUBLIC SwFieldType : public SwModify
::com::sun::star::uno::WeakReference< ::com::sun::star::uno::WeakReference<
::com::sun::star::beans::XPropertySet> m_wXFieldMaster; ::com::sun::star::beans::XPropertySet> m_wXFieldMaster;
sal_uInt16 nWhich; sal_uInt16 m_nWhich;
friend void _FinitUI(); ///< In order to delete pointer! friend void _FinitUI(); ///< In order to delete pointer!
static std::vector<OUString>* pFldNames; static std::vector<OUString>* s_pFldNames;
static void _GetFldName(); ///< Sets up FldNames; fldmgr.cxx! static void _GetFldName(); ///< Sets up FldNames; fldmgr.cxx!
...@@ -265,7 +265,7 @@ public: ...@@ -265,7 +265,7 @@ public:
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
sal_uInt16 Which() const { return nWhich; } sal_uInt16 Which() const { return m_nWhich; }
inline void UpdateFlds() const; inline void UpdateFlds() const;
}; };
......
...@@ -73,7 +73,7 @@ static sal_uInt16 lcl_GetLanguageOfFormat( sal_uInt16 nLng, sal_uLong nFmt, ...@@ -73,7 +73,7 @@ static sal_uInt16 lcl_GetLanguageOfFormat( sal_uInt16 nLng, sal_uLong nFmt,
// Globals // Globals
/// field names /// field names
std::vector<OUString>* SwFieldType::pFldNames = 0; std::vector<OUString>* SwFieldType::s_pFldNames = nullptr;
namespace namespace
{ {
...@@ -125,18 +125,18 @@ namespace ...@@ -125,18 +125,18 @@ namespace
OUString SwFieldType::GetTypeStr(sal_uInt16 nTypeId) OUString SwFieldType::GetTypeStr(sal_uInt16 nTypeId)
{ {
if( !pFldNames ) if (!s_pFldNames)
_GetFldName(); _GetFldName();
if( nTypeId < SwFieldType::pFldNames->size() ) if (nTypeId < SwFieldType::s_pFldNames->size())
return (*SwFieldType::pFldNames)[nTypeId]; return (*SwFieldType::s_pFldNames)[nTypeId];
return OUString(); return OUString();
} }
// each field refences a field type that is unique for each document // each field refences a field type that is unique for each document
SwFieldType::SwFieldType( sal_uInt16 nWhichId ) SwFieldType::SwFieldType( sal_uInt16 nWhichId )
: SwModify(0), : SwModify(nullptr)
nWhich( nWhichId ) , m_nWhich(nWhichId)
{ {
} }
......
...@@ -1604,12 +1604,12 @@ void SwFieldType::_GetFldName() ...@@ -1604,12 +1604,12 @@ void SwFieldType::_GetFldName()
}; };
// insert infos for fields // insert infos for fields
SwFieldType::pFldNames = new std::vector<OUString>; SwFieldType::s_pFldNames = new std::vector<OUString>;
SwFieldType::pFldNames->reserve(SAL_N_ELEMENTS(coFldNms)); SwFieldType::s_pFldNames->reserve(SAL_N_ELEMENTS(coFldNms));
for( sal_uInt16 nIdx = 0; nIdx < SAL_N_ELEMENTS(coFldNms); ++nIdx ) for( sal_uInt16 nIdx = 0; nIdx < SAL_N_ELEMENTS(coFldNms); ++nIdx )
{ {
const OUString aTmp(SW_RES( coFldNms[ nIdx ] )); const OUString aTmp(SW_RES( coFldNms[ nIdx ] ));
SwFieldType::pFldNames->push_back(MnemonicGenerator::EraseAllMnemonicChars( aTmp )); SwFieldType::s_pFldNames->push_back(MnemonicGenerator::EraseAllMnemonicChars( aTmp ));
} }
} }
......
...@@ -155,7 +155,7 @@ void _FinitUI() ...@@ -155,7 +155,7 @@ void _FinitUI()
DELETEZ(pGlossaries); DELETEZ(pGlossaries);
delete SwFieldType::pFldNames; delete SwFieldType::s_pFldNames;
ClearStringCache(); ClearStringCache();
delete pGlossaryList; delete pGlossaryList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment