diff options
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/IDocumentFieldsAccess.hxx | 5 | ||||
-rw-r--r-- | sw/inc/crsrsh.hxx | 2 | ||||
-rw-r--r-- | sw/inc/editsh.hxx | 8 | ||||
-rw-r--r-- | sw/inc/fldbas.hxx | 99 |
4 files changed, 57 insertions, 57 deletions
diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx index 83d65b5ca109..c78e5a249b3b 100644 --- a/sw/inc/IDocumentFieldsAccess.hxx +++ b/sw/inc/IDocumentFieldsAccess.hxx @@ -36,6 +36,7 @@ class DateTime; class SetGetExpField; struct SwHash; class SwNode; +enum class SwFieldIds : sal_uInt16; namespace rtl { class OUString; } using rtl::OUString; @@ -50,9 +51,9 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } } virtual SwFieldType *InsertFieldType(const SwFieldType &) = 0; - virtual SwFieldType *GetSysFieldType( const sal_uInt16 eWhich ) const = 0; + virtual SwFieldType *GetSysFieldType( const SwFieldIds eWhich ) const = 0; - virtual SwFieldType* GetFieldType(sal_uInt16 nResId, const OUString& rName, bool bDbFieldMatching) const = 0; + virtual SwFieldType* GetFieldType(SwFieldIds nResId, const OUString& rName, bool bDbFieldMatching) const = 0; virtual void RemoveFieldType(size_t nField) = 0; diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 554a6c37c919..064990b927c0 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -685,7 +685,7 @@ public: bool MoveFieldType( const SwFieldType* pFieldType, const bool bNext, - const sal_uInt16 nResType = USHRT_MAX, + const SwFieldIds nResType = SwFieldIds::Unknown, const bool bAddSetExpressionFieldsToInputFields = true ); bool GotoFormatField( const SwFormatField& rField ); diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 4fede714eed3..cf8f91d96bc6 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -370,12 +370,12 @@ public: void UpdateFields( SwField & ); ///< One single field. - size_t GetFieldTypeCount(sal_uInt16 nResId = USHRT_MAX) const; - SwFieldType* GetFieldType(size_t nField, sal_uInt16 nResId = USHRT_MAX) const; - SwFieldType* GetFieldType(sal_uInt16 nResId, const OUString& rName) const; + size_t GetFieldTypeCount(SwFieldIds nResId = SwFieldIds::Unknown) const; + SwFieldType* GetFieldType(size_t nField, SwFieldIds nResId = SwFieldIds::Unknown) const; + SwFieldType* GetFieldType(SwFieldIds nResId, const OUString& rName) const; void RemoveFieldType(size_t nField); - void RemoveFieldType(sal_uInt16 nResId, const OUString& rName); + void RemoveFieldType(SwFieldIds nResId, const OUString& rName); void FieldToText( SwFieldType* pType ); diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index ed520543f4a3..59bd4b00b05b 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -32,50 +32,51 @@ class SwDoc; class SvNumberFormatter; -enum RES_FIELDS { +enum class SwFieldIds : sal_uInt16 { /// For old documents the Field-Which IDs must be preserved !!! - RES_FIELDS_BEGIN, - RES_DBFLD = RES_FIELDS_BEGIN, - RES_USERFLD, - RES_FILENAMEFLD, - RES_DBNAMEFLD, - RES_DATEFLD, - RES_TIMEFLD, - RES_PAGENUMBERFLD, - RES_AUTHORFLD, - RES_CHAPTERFLD, - RES_DOCSTATFLD, - RES_GETEXPFLD, - RES_SETEXPFLD, - RES_GETREFFLD, - RES_HIDDENTXTFLD, - RES_POSTITFLD, - RES_FIXDATEFLD, - RES_FIXTIMEFLD, - RES_REGFLD, - RES_VARREGFLD, - RES_SETREFFLD, - RES_INPUTFLD, - RES_MACROFLD, - RES_DDEFLD, - RES_TABLEFLD, - RES_HIDDENPARAFLD, - RES_DOCINFOFLD, - RES_TEMPLNAMEFLD, - RES_DBNEXTSETFLD, - RES_DBNUMSETFLD, - RES_DBSETNUMBERFLD, - RES_EXTUSERFLD, - RES_REFPAGESETFLD, - RES_REFPAGEGETFLD, - RES_INTERNETFLD, - RES_JUMPEDITFLD, - RES_SCRIPTFLD, - RES_DATETIMEFLD, - RES_AUTHORITY, ///< Table of authorities - RES_COMBINED_CHARS, - RES_DROPDOWN, - RES_FIELDS_END + Database, + User, + Filename, + DatabaseName, + Date, + Time, + PageNumber, + Author, + Chapter, + DocStat, + GetExp, + SetExp, + GetRef, + HiddenText, + Postit, + FixDate, + FixTime, + Reg, + VarReg, + SetRef, + Input, + Macro, + Dde, + Table, + HiddenPara, + DocInfo, + TemplateName, + DbNextSet, + DbNumSet, + DbSetNumber, + ExtUser, + RefPageSet, + RefPageGet, + Internet, + JumpEdit, + Script, + DateTime, + TableOfAuthorities, + CombinedChars, + Dropdown, + LAST = Dropdown, + + Unknown = USHRT_MAX, // used as default value in some method calls }; /// List of FieldTypes at UI. @@ -228,7 +229,7 @@ class SW_DLLPUBLIC SwFieldType : public SwModify { css::uno::WeakReference<css::beans::XPropertySet> m_wXFieldMaster; - sal_uInt16 m_nWhich; + SwFieldIds m_nWhich; friend void FinitUI(); ///< In order to delete pointer! static std::vector<OUString>* s_pFieldNames; @@ -237,7 +238,7 @@ class SW_DLLPUBLIC SwFieldType : public SwModify protected: /// Single argument ctors shall be explicit. - explicit SwFieldType( sal_uInt16 nWhichId ); + explicit SwFieldType( SwFieldIds nWhichId ); public: @@ -256,9 +257,7 @@ public: virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ); - sal_uInt16 Which() const { - return m_nWhich; - } + SwFieldIds Which() const { return m_nWhich; } inline void UpdateFields() const; }; @@ -318,7 +317,7 @@ public: SwField * CopyField() const; /// ResId - sal_uInt16 Which() const + SwFieldIds Which() const #ifdef DBG_UTIL ; // implemented in fldbas.cxx #else @@ -390,7 +389,7 @@ private: bool m_bUseFormat; ///< Use number formatter. protected: - SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId ); + SwValueFieldType( SwDoc* pDocPtr, SwFieldIds nWhichId ); SwValueFieldType( const SwValueFieldType& rTyp ); public: |