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
::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;
};
......
......@@ -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)
{
}
......
......@@ -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 ));
}
}
......
......@@ -155,7 +155,7 @@ void _FinitUI()
DELETEZ(pGlossaries);
delete SwFieldType::pFldNames;
delete SwFieldType::s_pFldNames;
ClearStringCache();
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