summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-04-21 17:23:34 +0200
committerMichael Stahl <mstahl@redhat.com>2015-04-21 20:36:26 +0200
commit84a6758609fc9472c7cb5a2e449860bcc554ed58 (patch)
tree26a6ab2af38879d6230328b3ae38e3a59d234d46
parent7d42346ba77c9c4df241ea40eaf550993ca18783 (diff)
sw: prefix members of SwFieldType
Change-Id: Ib07a3c15cb48998d0acb5bfae4e902a2d729b648
-rw-r--r--sw/inc/fldbas.hxx6
-rw-r--r--sw/source/core/fields/fldbas.cxx12
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx6
-rw-r--r--sw/source/uibase/utlui/initui.cxx2
4 files changed, 13 insertions, 13 deletions
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index c5967c691e09..61cf2b54b20b 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -237,10 +237,10 @@ class SW_DLLPUBLIC SwFieldType : public SwModify
::com::sun::star::uno::WeakReference<
::com::sun::star::beans::XPropertySet> m_wXFieldMaster;
- sal_uInt16 nWhich;
+ sal_uInt16 m_nWhich;
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!
@@ -265,7 +265,7 @@ public:
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 );
- sal_uInt16 Which() const { return nWhich; }
+ sal_uInt16 Which() const { return m_nWhich; }
inline void UpdateFlds() const;
};
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index dc0e6d57cdc3..beec78f63cd2 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -73,7 +73,7 @@ static sal_uInt16 lcl_GetLanguageOfFormat( sal_uInt16 nLng, sal_uLong nFmt,
// Globals
/// field names
-std::vector<OUString>* SwFieldType::pFldNames = 0;
+std::vector<OUString>* SwFieldType::s_pFldNames = nullptr;
namespace
{
@@ -125,18 +125,18 @@ namespace
OUString SwFieldType::GetTypeStr(sal_uInt16 nTypeId)
{
- if( !pFldNames )
+ if (!s_pFldNames)
_GetFldName();
- if( nTypeId < SwFieldType::pFldNames->size() )
- return (*SwFieldType::pFldNames)[nTypeId];
+ if (nTypeId < SwFieldType::s_pFldNames->size())
+ return (*SwFieldType::s_pFldNames)[nTypeId];
return OUString();
}
// each field refences a field type that is unique for each document
SwFieldType::SwFieldType( sal_uInt16 nWhichId )
- : SwModify(0),
- nWhich( nWhichId )
+ : SwModify(nullptr)
+ , m_nWhich(nWhichId)
{
}
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index 18483c6fb05a..7d4420a0d025 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -1604,12 +1604,12 @@ void SwFieldType::_GetFldName()
};
// insert infos for fields
- SwFieldType::pFldNames = new std::vector<OUString>;
- SwFieldType::pFldNames->reserve(SAL_N_ELEMENTS(coFldNms));
+ SwFieldType::s_pFldNames = new std::vector<OUString>;
+ SwFieldType::s_pFldNames->reserve(SAL_N_ELEMENTS(coFldNms));
for( sal_uInt16 nIdx = 0; nIdx < SAL_N_ELEMENTS(coFldNms); ++nIdx )
{
const OUString aTmp(SW_RES( coFldNms[ nIdx ] ));
- SwFieldType::pFldNames->push_back(MnemonicGenerator::EraseAllMnemonicChars( aTmp ));
+ SwFieldType::s_pFldNames->push_back(MnemonicGenerator::EraseAllMnemonicChars( aTmp ));
}
}
diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx
index 94d7a8d76263..18744550338d 100644
--- a/sw/source/uibase/utlui/initui.cxx
+++ b/sw/source/uibase/utlui/initui.cxx
@@ -155,7 +155,7 @@ void _FinitUI()
DELETEZ(pGlossaries);
- delete SwFieldType::pFldNames;
+ delete SwFieldType::s_pFldNames;
ClearStringCache();
delete pGlossaryList;