diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-07-14 15:21:18 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-16 13:55:41 +0000 |
commit | 263153842741d7ce21cc0bf1c5296a55a1138024 (patch) | |
tree | 6fd3dd47fe08b5caa18e894cd4cb3a55576ff4a6 /sw/inc | |
parent | 6ef38bf1c04de2a0733e5bfd88c483416541d098 (diff) |
String to OUString
Change-Id: I64f31d8a0bb02a2ecd8fcc993c90ca76923b35fb
Reviewed-on: https://gerrit.libreoffice.org/4924
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/authfld.hxx | 34 | ||||
-rw-r--r-- | sw/inc/chpfld.hxx | 15 | ||||
-rw-r--r-- | sw/inc/dbfld.hxx | 44 | ||||
-rw-r--r-- | sw/inc/ddefld.hxx | 18 | ||||
-rw-r--r-- | sw/inc/docufld.hxx | 170 | ||||
-rw-r--r-- | sw/inc/expfld.hxx | 106 | ||||
-rw-r--r-- | sw/inc/fldbas.hxx | 47 | ||||
-rw-r--r-- | sw/inc/flddat.hxx | 4 | ||||
-rw-r--r-- | sw/inc/flddropdown.hxx | 12 | ||||
-rw-r--r-- | sw/inc/reffld.hxx | 22 | ||||
-rw-r--r-- | sw/inc/usrfld.hxx | 18 |
11 files changed, 247 insertions, 243 deletions
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx index 7df89db5f97f..516120b0b4ef 100644 --- a/sw/inc/authfld.hxx +++ b/sw/inc/authfld.hxx @@ -27,16 +27,16 @@ class SwAuthEntry { - String aAuthFields[AUTH_FIELD_END]; + OUString aAuthFields[AUTH_FIELD_END]; sal_uInt16 nRefCount; public: SwAuthEntry() : nRefCount(0){} SwAuthEntry( const SwAuthEntry& rCopy ); sal_Bool operator==(const SwAuthEntry& rComp); - inline const String& GetAuthorField(ToxAuthorityField ePos)const; + inline OUString GetAuthorField(ToxAuthorityField ePos) const; inline void SetAuthorField(ToxAuthorityField ePos, - const String& rField); + const OUString& rField); void AddRef() { ++nRefCount; } void RemoveRef() { --nRefCount; } @@ -67,7 +67,7 @@ class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType sal_Bool m_bIsSequence :1; sal_Bool m_bSortByDocument :1; LanguageType m_eLanguage; - String m_sSortAlgorithm; + OUString m_sSortAlgorithm; protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ); @@ -84,7 +84,7 @@ public: inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; } SwDoc* GetDoc(){ return m_pDoc; } void RemoveField(sal_IntPtr nHandle); - sal_IntPtr AddField(const String& rFieldContents); + sal_IntPtr AddField(const OUString& rFieldContents); sal_Bool AddField(sal_IntPtr nHandle); void DelSequenceArray() { @@ -93,8 +93,8 @@ public: const SwAuthEntry* GetEntryByHandle(sal_IntPtr nHandle) const; - void GetAllEntryIdentifiers( std::vector<String>& rToFill )const; - const SwAuthEntry* GetEntryByIdentifier(const String& rIdentifier)const; + void GetAllEntryIdentifiers( std::vector<OUString>& rToFill ) const; + const SwAuthEntry* GetEntryByIdentifier(const OUString& rIdentifier) const; bool ChangeEntryContent(const SwAuthEntry* pNewEntry); // import interface @@ -130,14 +130,14 @@ public: void SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey nKeys[]); //initui.cxx - static const String& GetAuthFieldName(ToxAuthorityField eType); - static const String& GetAuthTypeName(ToxAuthorityType eType); + static OUString GetAuthFieldName(ToxAuthorityField eType); + static OUString GetAuthTypeName(ToxAuthorityType eType); LanguageType GetLanguage() const {return m_eLanguage;} void SetLanguage(LanguageType nLang) {m_eLanguage = nLang;} - const String& GetSortAlgorithm()const {return m_sSortAlgorithm;} - void SetSortAlgorithm(const String& rSet) {m_sSortAlgorithm = rSet;} + OUString GetSortAlgorithm() const {return m_sSortAlgorithm;} + void SetSortAlgorithm(const OUString& rSet) {m_sSortAlgorithm = rSet;} }; @@ -146,15 +146,15 @@ class SwAuthorityField : public SwField sal_IntPtr m_nHandle; mutable sal_IntPtr m_nTempSequencePos; - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; public: - SwAuthorityField(SwAuthorityFieldType* pType, const String& rFieldContents); + SwAuthorityField(SwAuthorityFieldType* pType, const OUString& rFieldContents); SwAuthorityField(SwAuthorityFieldType* pType, sal_IntPtr nHandle); ~SwAuthorityField(); - const String& GetFieldText(ToxAuthorityField eField) const; + OUString GetFieldText(ToxAuthorityField eField) const; virtual void SetPar1(const OUString& rStr); virtual SwFieldType* ChgTyp( SwFieldType* ); @@ -164,16 +164,16 @@ public: sal_IntPtr GetHandle() const { return m_nHandle; } - virtual String GetDescription() const; + virtual OUString GetDescription() const; }; // --- inlines ----------------------------------------------------------- -inline const String& SwAuthEntry::GetAuthorField(ToxAuthorityField ePos)const +inline OUString SwAuthEntry::GetAuthorField(ToxAuthorityField ePos) const { OSL_ENSURE(AUTH_FIELD_END > ePos, "wrong index"); return aAuthFields[ePos]; } -inline void SwAuthEntry::SetAuthorField(ToxAuthorityField ePos, const String& rField) +inline void SwAuthEntry::SetAuthorField(ToxAuthorityField ePos, const OUString& rField) { OSL_ENSURE(AUTH_FIELD_END > ePos, "wrong index"); if(AUTH_FIELD_END > ePos) diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx index 25935787440b..1a87f43e888b 100644 --- a/sw/inc/chpfld.hxx +++ b/sw/inc/chpfld.hxx @@ -51,9 +51,12 @@ class SW_DLLPUBLIC SwChapterField : public SwField { friend class SwChapterFieldType; sal_uInt8 nLevel; - String sTitle, sNumber, sPre, sPost; + OUString sTitle; + OUString sNumber; + OUString sPre; + OUString sPost; - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; public: @@ -68,16 +71,16 @@ public: inline sal_uInt8 GetLevel() const; inline void SetLevel(sal_uInt8); - inline const String& GetNumber() const; - inline const String& GetTitle() const; + inline OUString GetNumber() const; + inline OUString GetTitle() 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 ); }; inline sal_uInt8 SwChapterField::GetLevel() const { return nLevel; } inline void SwChapterField::SetLevel(sal_uInt8 nLev) { nLevel = nLev; } -inline const String& SwChapterField::GetNumber() const { return sNumber; } -inline const String& SwChapterField::GetTitle() const { return sTitle; } +inline OUString SwChapterField::GetNumber() const { return sNumber; } +inline OUString SwChapterField::GetTitle() const { return sTitle; } #endif // SW_CHPFLD_HXX diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx index b4f55a9ee3d7..20d62890c8d2 100644 --- a/sw/inc/dbfld.hxx +++ b/sw/inc/dbfld.hxx @@ -35,21 +35,21 @@ class SW_DLLPUBLIC SwDBFieldType : public SwValueFieldType { SwDBData aDBData; // OUString sName; ///< only used in ::GetName() ! - String sColumn; + OUString sColumn; long nRefCnt; public: - SwDBFieldType(SwDoc* pDocPtr, const String& rColumnName, const SwDBData& rDBData); + SwDBFieldType(SwDoc* pDocPtr, const OUString& rColumnName, const SwDBData& rDBData); ~SwDBFieldType(); - virtual const OUString& GetName() const; + virtual OUString GetName() const; virtual SwFieldType* Copy() const; inline void AddRef() { nRefCnt++; } void ReleaseRef(); - const String& GetColumnName() const {return sColumn;} + OUString GetColumnName() const {return sColumn;} const SwDBData& GetDBData() const {return aDBData;} virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; @@ -70,7 +70,7 @@ class SW_DLLPUBLIC SwDBField : public SwValueField bool bValidValue : 1; bool bInitialized : 1; - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; public: @@ -80,12 +80,12 @@ public: virtual SwFieldType* ChgTyp( SwFieldType* ); /// Current text. - inline void SetExpansion(const String& rStr); + inline void SetExpansion(const OUString& rStr); virtual sal_uInt16 GetSubType() const; virtual void SetSubType(sal_uInt16 nType); - virtual String GetFieldName() const; + virtual OUString GetFieldName() const; /// For calculations in expressions. void ChgValue( double d, bool bVal ); @@ -96,7 +96,7 @@ public: /// Evaluation for header and footer. void ChangeExpansion( const SwFrm*, const SwTxtFld* ); void InitContent(); - void InitContent(const String& rExpansion); + void InitContent(const OUString& rExpansion); inline void ChgBodyTxtFlag( bool bIsInBody ); @@ -105,10 +105,10 @@ public: inline void SetInitialized() { bInitialized = true; } /// Get name. - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; /// access to the command string - const OUString& GetFieldCode() const { return sFieldCode;} + OUString GetFieldCode() const { return sFieldCode;} void SetFieldCode(const OUString& rStr) { sFieldCode = rStr; } /// DBName @@ -117,7 +117,7 @@ public: virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); }; -inline void SwDBField::SetExpansion(const String& rStr) +inline void SwDBField::SetExpansion(const OUString& rStr) { aContent = rStr; } /// set from UpdateExpFlds (the Node-Position is known there) @@ -146,7 +146,7 @@ public: SwDBData GetDBData(SwDoc* pDoc); void SetDBData(const SwDBData& rDBData); - virtual String GetFieldName() const; + virtual OUString GetFieldName() 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 ); @@ -177,9 +177,9 @@ class SW_DLLPUBLIC SwDBNextSetField : public SwDBNameInfField public: SwDBNextSetField( SwDBNextSetFieldType*, - const String& rCond, const String& rDummy, const SwDBData& rDBData); + const OUString& rCond, const OUString& rDummy, const SwDBData& rDBData); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; void Evaluate(SwDoc*); @@ -187,7 +187,7 @@ public: inline bool IsCondValid() const; // Condition - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; virtual void SetPar1(const OUString& rStr); 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 ); @@ -219,13 +219,13 @@ public: class SwDBNumSetField : public SwDBNameInfField { OUString aCond; - String aPar2; + OUString aPar2; bool bCondValid; public: - SwDBNumSetField(SwDBNumSetFieldType*, const String& rCond, const String& rDBNum, const SwDBData& rDBData); + SwDBNumSetField(SwDBNumSetFieldType*, const OUString& rCond, const OUString& rDBNum, const SwDBData& rDBData); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; inline bool IsCondValid() const; @@ -233,7 +233,7 @@ public: void Evaluate(SwDoc*); // Condition - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; virtual void SetPar1(const OUString& rStr); // Number of data record. @@ -261,7 +261,7 @@ class SwDBNameFieldType : public SwFieldType public: SwDBNameFieldType(SwDoc*); - String Expand(sal_uLong) const; + OUString Expand(sal_uLong) const; virtual SwFieldType* Copy() const; }; @@ -274,7 +274,7 @@ class SW_DLLPUBLIC SwDBNameField : public SwDBNameInfField public: SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData, sal_uLong nFmt = 0); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() 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 ); @@ -303,7 +303,7 @@ class SW_DLLPUBLIC SwDBSetNumberField : public SwDBNameInfField public: SwDBSetNumberField(SwDBSetNumberFieldType*, const SwDBData& rDBData, sal_uLong nFmt = 0); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; void Evaluate(SwDoc*); diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx index 327766077f2b..917d90fbe641 100644 --- a/sw/inc/ddefld.hxx +++ b/sw/inc/ddefld.hxx @@ -32,7 +32,7 @@ class SwDoc; class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType { OUString aName; - String aExpansion; + OUString aExpansion; ::sfx2::SvBaseLinkRef refLink; SwDoc* pDoc; @@ -44,22 +44,22 @@ class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType SW_DLLPRIVATE void _RefCntChgd(); public: - SwDDEFieldType( const String& rName, const String& rCmd, + SwDDEFieldType( const OUString& rName, const OUString& rCmd, sal_uInt16 = sfx2::LINKUPDATE_ONCALL ); ~SwDDEFieldType(); - const String& GetExpansion() const { return aExpansion; } - void SetExpansion( const String& rStr ) { aExpansion = rStr, + OUString GetExpansion() const { return aExpansion; } + void SetExpansion( const OUString& rStr ) { aExpansion = rStr; bCRLFFlag = sal_False; } virtual SwFieldType* Copy() const; - virtual const OUString& GetName() const; + virtual OUString GetName() 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 ); - String GetCmd() const; - void SetCmd( const String& rStr ); + OUString GetCmd() const; + void SetCmd( OUString aStr ); sal_uInt16 GetType() const { return refLink->GetUpdateMode(); } void SetType( sal_uInt16 nType ) { refLink->SetUpdateMode( nType ); } @@ -90,7 +90,7 @@ public: class SwDDEField : public SwField { private: - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; public: @@ -99,7 +99,7 @@ public: /** Get parameter via types. Name cannot be changed. */ - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; // Command virtual OUString GetPar2() const; diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index 272a6d3bb1c5..529bf14ea8f7 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -148,8 +148,8 @@ class SwPageNumberFieldType : public SwFieldType public: SwPageNumberFieldType(); - String& Expand( sal_uInt32 nFmt, short nOff, sal_uInt16 const nPageNumber, - sal_uInt16 const nMaxPage, const String&, String& rRet ) const; + OUString Expand( sal_uInt32 nFmt, short nOff, sal_uInt16 const nPageNumber, + sal_uInt16 const nMaxPage, const OUString& ) const; void ChangeExpansion( SwDoc* pDoc, sal_Bool bVirtPageNum, const sal_Int16* pNumFmt = 0 ); virtual SwFieldType* Copy() const; @@ -161,7 +161,7 @@ public: class SW_DLLPUBLIC SwPageNumberField : public SwField { - String sUserStr; + OUString sUserStr; sal_uInt16 nSubType; short nOffset; // fdo#58074 store page number in SwField, not SwFieldType @@ -177,7 +177,7 @@ public: void ChangeExpansion(sal_uInt16 const nPageNumber, sal_uInt16 const nMaxPage); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; virtual OUString GetPar2() const; @@ -187,8 +187,8 @@ 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 ); - const String& GetUserString() const { return sUserStr; } - void SetUserString( const String& rS ) { sUserStr = rS; } + OUString GetUserString() const { return sUserStr; } + void SetUserString( const OUString& rS ) { sUserStr = rS; } }; /*-------------------------------------------------------------------- @@ -200,7 +200,7 @@ class SwAuthorFieldType : public SwFieldType public: SwAuthorFieldType(); - String Expand(sal_uLong) const; + OUString Expand(sal_uLong) const; virtual SwFieldType* Copy() const; }; @@ -210,16 +210,16 @@ public: class SwAuthorField : public SwField { - String aContent; + OUString aContent; public: SwAuthorField(SwAuthorFieldType*, sal_uInt32 nFmt = 0); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; - inline void SetExpansion(const String& rStr) { aContent = rStr; } - inline const String& GetContent() const { return aContent; } + inline void SetExpansion(const OUString& rStr) { aContent = rStr; } + inline OUString GetContent() const { return aContent; } 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 ); @@ -235,7 +235,7 @@ class SwFileNameFieldType : public SwFieldType public: SwFileNameFieldType(SwDoc*); - String Expand(sal_uLong) const; + OUString Expand(sal_uLong) const; virtual SwFieldType* Copy() const; }; @@ -245,16 +245,16 @@ public: class SW_DLLPUBLIC SwFileNameField : public SwField { - String aContent; + OUString aContent; public: SwFileNameField(SwFileNameFieldType*, sal_uInt32 nFmt = 0); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; - inline void SetExpansion(const String& rStr) { aContent = rStr; } - inline const String& GetContent() const { return aContent; } + inline void SetExpansion(const OUString& rStr) { aContent = rStr; } + inline OUString GetContent() const { return aContent; } 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 ); @@ -270,7 +270,7 @@ class SwTemplNameFieldType : public SwFieldType public: SwTemplNameFieldType(SwDoc*); - String Expand(sal_uLong) const; + OUString Expand(sal_uLong) const; virtual SwFieldType* Copy() const; }; @@ -283,7 +283,7 @@ class SW_DLLPUBLIC SwTemplNameField : public SwField public: SwTemplNameField(SwTemplNameFieldType*, sal_uInt32 nFmt = 0); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() 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 ); @@ -301,7 +301,7 @@ class SwDocStatFieldType : public SwFieldType public: SwDocStatFieldType(SwDoc*); - String Expand(sal_uInt16 nSubType, sal_uInt32 nFmt) const; + OUString Expand(sal_uInt16 nSubType, sal_uInt32 nFmt) const; virtual SwFieldType* Copy() const; inline void SetNumFormat( sal_Int16 eFmt ) { nNumberingType = eFmt; } @@ -321,7 +321,7 @@ public: void ChangeExpansion( const SwFrm* pFrm ); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; virtual sal_uInt16 GetSubType() const; @@ -363,34 +363,34 @@ class SwHiddenTxtField : public SwField sal_Bool bIsHidden : 1; ///< Is it not visible? sal_Bool bValid : 1; ///< Is DB-field evaluated? - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; public: SwHiddenTxtField( SwHiddenTxtFieldType*, sal_Bool bConditional, - const String& rCond, - const String& rTxt, + const OUString& rCond, + const OUString& rTxt, sal_Bool bHidden = sal_False, sal_uInt16 nSubType = TYP_HIDDENTXTFLD); SwHiddenTxtField( SwHiddenTxtFieldType*, - const String& rCond, - const String& rTrue, - const String& rFalse, + const OUString& rCond, + const OUString& rTrue, + const OUString& rFalse, sal_uInt16 nSubType = TYP_HIDDENTXTFLD); - virtual String GetFieldName() const; + virtual OUString GetFieldName() const; void Evaluate(SwDoc*); inline void SetValue(sal_Bool bHidden) { bIsHidden = bHidden; } - String GetColumnName(const String& rName); - String GetDBName(const String& rName, SwDoc *pDoc); + OUString GetColumnName(const OUString& rName); + OUString GetDBName(const OUString& rName, SwDoc *pDoc); /// Condition virtual void SetPar1(const OUString& rStr); - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; /// True/False - String virtual void SetPar2(const OUString& rStr); @@ -425,16 +425,16 @@ class SwHiddenParaField : public SwField sal_Bool bIsHidden:1; public: /// Direct input, delete old value. - SwHiddenParaField(SwHiddenParaFieldType*, const String& rCond); + SwHiddenParaField(SwHiddenParaFieldType*, const OUString& rCond); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; void SetHidden(sal_Bool bHidden) { bIsHidden = bHidden; } sal_Bool IsHidden() const { return bIsHidden; } /// Query, set condition. - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; virtual void SetPar1(const OUString& rStr); 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 ); @@ -464,24 +464,24 @@ class SW_DLLPUBLIC SwMacroField : public SwField OUString aText; sal_Bool bIsScriptURL; - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; public: /// Direct input, delete old value. - SwMacroField( SwMacroFieldType*, const String& rLibAndName, - const String& rTxt); + SwMacroField( SwMacroFieldType*, const OUString& rLibAndName, + const OUString& rTxt); - inline const OUString& GetMacro() const { return aMacro; } - String GetLibName() const; - String GetMacroName() const; + inline OUString GetMacro() const { return aMacro; } + OUString GetLibName() const; + OUString GetMacroName() const; SvxMacro GetSvxMacro() const; - virtual String GetFieldName() const; + virtual OUString GetFieldName() const; /// Library and FileName - virtual const OUString& GetPar1() const; - virtual void SetPar1(const OUString& rStr); + virtual OUString GetPar1() const; + virtual void SetPar1(const OUString& rStr); /// Macrotext virtual OUString GetPar2() const; @@ -490,10 +490,10 @@ public: virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); static void CreateMacroString( OUString& rMacro, - const String& rMacroName, - const String& rLibraryName ); + const OUString& rMacroName, + const OUString& rLibraryName ); - static sal_Bool isScriptURL( const String& str ); + static sal_Bool isScriptURL( const OUString& str ); }; @@ -528,13 +528,17 @@ class SW_DLLPUBLIC SwPostItField : public SwField public: SwPostItField( SwPostItFieldType*, - const String& rAuthor, const String& rTxt, const String& rInitials, const String& rName, const DateTime& rDate); + const OUString& rAuthor, + const OUString& rTxt, + const OUString& rInitials, + const OUString& rName, + const DateTime& rDate); ~SwPostItField(); /// Looks up a field identified by its unique name (used to get the postit field of a comment fieldmark) static const SwFmtFld* GetByName(SwDoc* pDoc, const OUString& rName); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; inline const DateTime GetDateTime() const { return aDateTime; } @@ -542,16 +546,16 @@ public: inline const Time GetTime() const { return aDateTime.GetTime(); } /// Author - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; virtual void SetPar1(const OUString& rStr); /// Text virtual OUString GetPar2() const; virtual void SetPar2(const OUString& rStr); - const OUString& GetTxt() const { return sTxt; } - const OUString& GetInitials() const; + OUString GetTxt() const { return sTxt; } + OUString GetInitials() const; void SetName(const OUString& rStr); - const OUString& GetName() const; + OUString GetName() const; const OutlinerParaObject* GetTextObject() const; void SetTextObject( OutlinerParaObject* pText ); @@ -560,7 +564,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 ); - virtual String GetDescription() const; + virtual OUString GetDescription() const; }; /*-------------------------------------------------------------------- @@ -572,30 +576,30 @@ class SwDocInfoFieldType : public SwValueFieldType public: SwDocInfoFieldType(SwDoc* pDc); - String Expand(sal_uInt16 nSubType, sal_uInt32 nFormat, sal_uInt16 nLang, const String& rName) const; + OUString Expand(sal_uInt16 nSubType, sal_uInt32 nFormat, sal_uInt16 nLang, const OUString& rName) const; virtual SwFieldType* Copy() const; }; class SW_DLLPUBLIC SwDocInfoField : public SwValueField { sal_uInt16 nSubType; - String aContent; - String aName; + OUString aContent; + OUString aName; - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; public: - SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, sal_uInt32 nFmt=0); - SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0); + SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const OUString& rName, sal_uInt32 nFmt=0); + SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const OUString& rName, const OUString& rValue, sal_uInt32 nFmt=0); virtual void SetSubType(sal_uInt16); virtual sal_uInt16 GetSubType() const; virtual void SetLanguage(sal_uInt16 nLng); - virtual String GetFieldName() const; - String GetName() const { return aName; } - void SetName( const String& rName ) { aName = rName; } - inline void SetExpansion(const String& rStr) { aContent = rStr; } + virtual OUString GetFieldName() const; + OUString GetName() const { return aName; } + void SetName( const OUString& rName ) { aName = rName; } + inline void SetExpansion(const OUString& rStr) { aContent = rStr; } 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 ); }; @@ -607,31 +611,31 @@ public: class SwExtUserFieldType : public SwFieldType { - String aData; + OUString aData; public: SwExtUserFieldType(); - inline void SetData(const String& rStr) { aData = rStr; } + inline void SetData(const OUString& rStr) { aData = rStr; } - String Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) const; + OUString Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) const; virtual SwFieldType* Copy() const; }; class SwExtUserField : public SwField { - String aContent; + OUString aContent; sal_uInt16 nType; public: SwExtUserField(SwExtUserFieldType*, sal_uInt16 nSub, sal_uInt32 nFmt=0); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; virtual sal_uInt16 GetSubType() const; virtual void SetSubType(sal_uInt16 nSub); - inline void SetExpansion(const String& rStr) { aContent = rStr; } + inline void SetExpansion(const OUString& rStr) { aContent = rStr; } 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 ); @@ -667,7 +671,7 @@ public: SwRefPageSetField( SwRefPageSetFieldType*, short nOff = 0, sal_Bool bOn = sal_True ); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; virtual OUString GetPar2() const; @@ -707,14 +711,14 @@ public: class SwRefPageGetField : public SwField { - String sTxt; + OUString sTxt; public: SwRefPageGetField( SwRefPageGetFieldType*, sal_uInt32 nFmt ); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; - void SetText( const String& rTxt ) { sTxt = rTxt; } + void SetText( const OUString& rTxt ) { sTxt = rTxt; } void ChangeExpansion( const SwFrm* pFrm, const SwTxtFld* pFld ); virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; @@ -742,13 +746,13 @@ class SwJumpEditField : public SwField OUString sTxt, sHelp; public: SwJumpEditField( SwJumpEditFieldType*, sal_uInt32 nFormat, - const String& sText, const String& sHelp ); + const OUString& sText, const OUString& sHelp ); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; /// Placeholder-Text - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; virtual void SetPar1(const OUString& rStr); /// Hint-Text @@ -787,16 +791,16 @@ class SwScriptField : public SwField sal_Bool bCodeURL; ///< Code contains URL of a script. public: - SwScriptField( SwScriptFieldType*, const String& rType, - const String& rCode, sal_Bool bURL=sal_False ); + SwScriptField( SwScriptFieldType*, const OUString& rType, + const OUString& rCode, sal_Bool bURL=sal_False ); - virtual String GetDescription() const; + virtual OUString GetDescription() const; - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; /// Type - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; virtual void SetPar1(const OUString& rStr); /// Text virtual OUString GetPar2() const; @@ -831,13 +835,13 @@ class SW_DLLPUBLIC SwCombinedCharField : public SwField OUString sCharacters; ///< combine these characters public: - SwCombinedCharField( SwCombinedCharFieldType*, const String& rChars ); + SwCombinedCharField( SwCombinedCharFieldType*, const OUString& rChars ); - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; /// Characters - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; virtual void SetPar1(const OUString& rStr); virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx index 8ac6e48fa17c..bca2b0bf19a3 100644 --- a/sw/inc/expfld.hxx +++ b/sw/inc/expfld.hxx @@ -39,14 +39,14 @@ class SwEditShell; const SwTxtNode* GetBodyTxtNode( const SwDoc& pDoc, SwPosition& rPos, const SwFrm& rFrm ); -void ReplacePoint(String& sTmpName, bool bWithCommandType = false); +OUString ReplacePoint(OUString sTmpName, bool bWithCommandType = false); struct _SeqFldLstElem { - String sDlgEntry; + OUString sDlgEntry; sal_uInt16 nSeqNo; - _SeqFldLstElem( const String& rStr, sal_uInt16 nNo ) + _SeqFldLstElem( const OUString& rStr, sal_uInt16 nNo ) : sDlgEntry( rStr ), nSeqNo( nNo ) {} }; @@ -84,24 +84,24 @@ protected: class SW_DLLPUBLIC SwGetExpField : public SwFormulaField { - String sExpand; + OUString sExpand; bool bIsInBodyTxt; sal_uInt16 nSubType; bool bLateInitialization; // #i82544# - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; public: - SwGetExpField( SwGetExpFieldType*, const String& rFormel, + SwGetExpField( SwGetExpFieldType*, const OUString& rFormel, sal_uInt16 nSubType = nsSwGetSetExpType::GSE_EXPR, sal_uLong nFmt = 0); virtual void SetValue( const double& rVal ); virtual void SetLanguage(sal_uInt16 nLng); - inline const String& GetExpStr() const; - inline void ChgExpStr(const String& rExpand); + inline OUString GetExpStr() const; + inline void ChgExpStr(const OUString& rExpand); /// Called by formating. inline bool IsInBodyTxt() const; @@ -113,7 +113,7 @@ public: Only called by formating!! */ void ChangeExpansion( const SwFrm&, const SwTxtFld& ); - virtual String GetFieldName() const; + virtual OUString GetFieldName() const; /// Change formula. virtual OUString GetPar2() const; @@ -129,10 +129,10 @@ public: void SetLateInitialization() { bLateInitialization = true;} }; -inline void SwGetExpField::ChgExpStr(const String& rExpand) +inline void SwGetExpField::ChgExpStr(const OUString& rExpand) { sExpand = rExpand;} -inline const String& SwGetExpField::GetExpStr() const +inline OUString SwGetExpField::GetExpStr() const { return sExpand; } /// Called by formating. @@ -149,7 +149,7 @@ class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType { OUString sName; const SwNode* pOutlChgNd; - String sDelim; + OUString sDelim; sal_uInt16 nType; sal_uInt8 nLevel; sal_Bool bDeleted; @@ -158,10 +158,10 @@ protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ); public: - SwSetExpFieldType( SwDoc* pDoc, const String& rName, + SwSetExpFieldType( SwDoc* pDoc, const OUString& rName, sal_uInt16 nType = nsSwGetSetExpType::GSE_EXPR ); virtual SwFieldType* Copy() const; - virtual const OUString& GetName() const; + virtual OUString GetName() const; inline void SetType(sal_uInt16 nTyp); inline sal_uInt16 GetType() const; @@ -173,16 +173,16 @@ public: void SetDeleted( sal_Bool b ) { bDeleted = b; } /// Overlay, because set-field takes care for its being updated by itself. - inline const OUString& GetSetRefName() const; + inline OUString GetSetRefName() const; sal_uInt16 SetSeqRefNo( SwSetExpField& rFld ); sal_uInt16 GetSeqFldList( SwSeqFldList& rList ); - String MakeSeqName( sal_uInt16 nSeqNo ); + OUString MakeSeqName( sal_uInt16 nSeqNo ); /// Number sequence fields chapterwise if required. - const String& GetDelimiter() const { return sDelim; } - void SetDelimiter( const String& s ) { sDelim = s; } + OUString GetDelimiter() const { return sDelim; } + void SetDelimiter( const OUString& s ) { sDelim = s; } sal_uInt8 GetOutlineLvl() const { return nLevel; } void SetOutlineLvl( sal_uInt8 n ) { nLevel = n; } void SetChapter( SwSetExpField& rFld, const SwNode& rNd ); @@ -205,38 +205,38 @@ inline void SwSetExpFieldType::SetType( sal_uInt16 nTyp ) inline sal_uInt16 SwSetExpFieldType::GetType() const { return nType; } -inline const OUString& SwSetExpFieldType::GetSetRefName() const +inline OUString SwSetExpFieldType::GetSetRefName() const { return sName; } class SW_DLLPUBLIC SwSetExpField : public SwFormulaField { - String sExpand; - String aPText; - String aSeqText; + OUString sExpand; + OUString aPText; + OUString aSeqText; sal_Bool bInput; sal_uInt16 nSeqNo; sal_uInt16 nSubType; - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; public: - SwSetExpField(SwSetExpFieldType*, const String& rFormel, sal_uLong nFmt = 0); + SwSetExpField(SwSetExpFieldType*, const OUString& rFormel, sal_uLong nFmt = 0); virtual void SetValue( const double& rVal ); - inline const String& GetExpStr() const; + inline OUString GetExpStr() const; - inline void ChgExpStr( const String& rExpand ); + inline void ChgExpStr( const OUString& rExpand ); - inline void SetPromptText(const String& rStr); - inline const String& GetPromptText() const; + inline void SetPromptText(const OUString& rStr); + inline OUString GetPromptText() const; inline void SetInputFlag(sal_Bool bInp); inline sal_Bool GetInputFlag() const; - virtual String GetFieldName() const; + virtual OUString GetFieldName() const; virtual sal_uInt16 GetSubType() const; virtual void SetSubType(sal_uInt16 nType); @@ -248,7 +248,7 @@ public: inline sal_uInt16 GetSeqNumber() const { return nSeqNo; } /// Query name only. - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; /// Query formula. virtual OUString GetPar2() const; @@ -257,16 +257,16 @@ public: virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); }; -inline const String& SwSetExpField::GetExpStr() const +inline OUString SwSetExpField::GetExpStr() const { return sExpand; } -inline void SwSetExpField::ChgExpStr( const String& rExpand ) +inline void SwSetExpField::ChgExpStr( const OUString& rExpand ) { sExpand = rExpand; } -inline void SwSetExpField::SetPromptText(const String& rStr) +inline void SwSetExpField::SetPromptText(const OUString& rStr) { aPText = rStr; } -inline const String& SwSetExpField::GetPromptText() const +inline OUString SwSetExpField::GetPromptText() const { return aPText; } inline void SwSetExpField::SetInputFlag(sal_Bool bInp) @@ -294,35 +294,35 @@ public: class SW_DLLPUBLIC SwInputField : public SwField { OUString aContent; - String aPText; - String aHelp; - String aToolTip; + OUString aPText; + OUString aHelp; + OUString aToolTip; sal_uInt16 nSubType; - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; public: /// Direct input via dialog; delete old value. - SwInputField(SwInputFieldType*, const String& rContent , - const String& rPrompt, sal_uInt16 nSubType = 0, + SwInputField(SwInputFieldType*, const OUString& rContent, + const OUString& rPrompt, sal_uInt16 nSubType = 0, sal_uLong nFmt = 0); - virtual String GetFieldName() const; + virtual OUString GetFieldName() const; /// Content - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; virtual void SetPar1(const OUString& rStr); /// aPromptText virtual OUString GetPar2() const; virtual void SetPar2(const OUString& rStr); - virtual String GetHelp() const; - virtual void SetHelp(const String & rStr); + virtual OUString GetHelp() const; + virtual void SetHelp(const OUString & rStr); - virtual String GetToolTip() const; - virtual void SetToolTip(const String & rStr); + virtual OUString GetToolTip() const; + virtual void SetToolTip(const OUString & rStr); virtual sal_Bool isFormField() const; @@ -373,31 +373,31 @@ public: class SwTblField : public SwValueField, public SwTableFormula { - String sExpand; + OUString sExpand; sal_uInt16 nSubType; - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; /// Search TextNode containing the field. virtual const SwNode* GetNodeOfFormula() const; - String GetCommand(); + OUString GetCommand(); public: - SwTblField( SwTblFieldType*, const String& rFormel, + SwTblField( SwTblFieldType*, const OUString& rFormel, sal_uInt16 nSubType = 0, sal_uLong nFmt = 0); virtual void SetValue( const double& rVal ); virtual sal_uInt16 GetSubType() const; virtual void SetSubType(sal_uInt16 nType); - const String& GetExpStr() const { return sExpand; } - void ChgExpStr(const String& rStr) { sExpand = rStr; } + OUString GetExpStr() const { return sExpand; } + void ChgExpStr(const OUString& rStr) { sExpand = rStr; } void CalcField( SwTblCalcPara& rCalcPara ); - virtual String GetFieldName() const; + virtual OUString GetFieldName() const; /// The formula. virtual OUString GetPar2() const; diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index 057f9171c87b..e90d81317455 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -20,7 +20,6 @@ #define SW_FLDBAS_HXX #include <i18nlangtag/lang.h> -#include <tools/string.hxx> #include "swdllapi.h" #include <calbck.hxx> #include <com/sun/star/beans/XPropertySet.hpp> @@ -219,9 +218,9 @@ enum SwDateTimeSubType /// General tools. -String GetResult(double nVal, sal_uInt32 nNumFmt, sal_uInt16 nLang = LANGUAGE_SYSTEM); -void SetErrorStr(const String& rStr); -String FormatNumber(sal_uInt32 nNum, sal_uInt32 nFormat); +OUString GetResult(double nVal, sal_uInt32 nNumFmt, sal_uInt16 nLang = LANGUAGE_SYSTEM); +void SetErrorStr(const OUString& rStr); +OUString FormatNumber(sal_uInt32 nNum, sal_uInt32 nFormat); /** Instances of SwFields and those derived from it occur 0 to n times. For each class there is one instance of the associated type class. @@ -235,7 +234,7 @@ class SW_DLLPUBLIC SwFieldType : public SwModify sal_uInt16 nWhich; friend void _FinitUI(); ///< In order to delete pointer! - static std::vector<String>* pFldNames; + static std::vector<OUString>* pFldNames; static void _GetFldName(); ///< Sets up FldNames; fldmgr.cxx! @@ -252,10 +251,10 @@ public: ::com::sun::star::beans::XPropertySet> const& xFieldMaster) { m_wXFieldMaster = xFieldMaster; } - static const String& GetTypeStr( sal_uInt16 nTypeId ); + static OUString GetTypeStr( sal_uInt16 nTypeId ); /// Only in derived classes. - virtual const OUString& GetName() const; + virtual OUString GetName() const; virtual SwFieldType* Copy() const = 0; 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 ); @@ -276,14 +275,14 @@ inline void SwFieldType::UpdateFlds() const class SW_DLLPUBLIC SwField { private: - mutable String m_Cache; ///< Cached expansion (for clipboard). + mutable OUString m_Cache; ///< Cached expansion (for clipboard). sal_uInt16 nLang; ///< Always change via SetLanguage! sal_Bool bIsAutomaticLanguage; sal_uInt32 nFormat; SwFieldType* pType; - virtual String Expand() const = 0; + virtual OUString Expand() const = 0; virtual SwField* Copy() const = 0; protected: @@ -307,10 +306,10 @@ public: SwTxtFormatter::NewFldPortion() sets things up properly. @return the generated text (suitable for display) */ - String ExpandField(bool const bCached) const; + OUString ExpandField(bool const bCached) const; /// @return name or content. - virtual String GetFieldName() const; + virtual OUString GetFieldName() const; SwField * CopyField() const; @@ -333,10 +332,10 @@ public: /// Query parameters for dialog and for BASIC. inline sal_uInt32 GetFormat() const; - virtual const OUString& GetPar1() const; - virtual OUString GetPar2() const; + virtual OUString GetPar1() const; + virtual OUString GetPar2() const; - virtual String GetFormula() const; + virtual OUString GetFormula() const; virtual void ChangeFormat(sal_uInt32 n); virtual void SetPar1(const OUString& rStr); @@ -352,7 +351,7 @@ public: sal_Bool IsAutomaticLanguage() const { return bIsAutomaticLanguage;} void SetAutomaticLanguage(sal_Bool bSet){bIsAutomaticLanguage = bSet;} - virtual String GetDescription() const; + virtual OUString GetDescription() const; /// Is this field clickable? bool IsClickable() const; }; @@ -384,9 +383,9 @@ public: inline sal_Bool UseFormat() const { return bUseFormat; } inline void EnableFormat(sal_Bool bFormat = sal_True) { bUseFormat = bFormat; } - String ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const; - String DoubleToString(const double &rVal, LanguageType eLng) const; - String DoubleToString(const double &rVal, sal_uInt32 nFmt) const; + OUString ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const; + OUString DoubleToString(const double &rVal, LanguageType eLng) const; + OUString DoubleToString(const double &rVal, sal_uInt32 nFmt) const; }; class SW_DLLPUBLIC SwValueField : public SwField @@ -408,7 +407,7 @@ public: virtual double GetValue() const; virtual void SetValue( const double& rVal ); - inline String ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const + inline OUString ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const { return ((SwValueFieldType*)GetTyp())->ExpandValue(rVal, nFmt, nLng); } static sal_uInt32 GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt); @@ -416,18 +415,18 @@ public: class SW_DLLPUBLIC SwFormulaField : public SwValueField { - String sFormula; + OUString sFormula; protected: SwFormulaField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, const double fVal = 0.0 ); SwFormulaField( const SwFormulaField& rFld ); public: - virtual String GetFormula() const; - void SetFormula(const String& rStr); + virtual OUString GetFormula() const; + void SetFormula(const OUString& rStr); - void SetExpandedFormula(const String& rStr); - String GetExpandedFormula() const; + void SetExpandedFormula(const OUString& rStr); + OUString GetExpandedFormula() const; }; #endif // SW_FLDBAS_HXX diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx index ccf8885a0f00..ea2c2cfaeb63 100644 --- a/sw/inc/flddat.hxx +++ b/sw/inc/flddat.hxx @@ -20,8 +20,6 @@ #ifndef SW_FLDDAT_HXX #define SW_FLDDAT_HXX -#include <tools/string.hxx> - #include "fldbas.hxx" class DateTime; @@ -98,7 +96,7 @@ class SW_DLLPUBLIC SwDateTimeField : public SwValueField sal_uInt16 nSubType; long nOffset; // Offset in minutes. - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; public: diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx index 57d4ee25d5e2..bf943a169502 100644 --- a/sw/inc/flddropdown.hxx +++ b/sw/inc/flddropdown.hxx @@ -90,7 +90,7 @@ class SW_DLLPUBLIC SwDropDownField : public SwField @return the expanded value of the field */ - virtual String Expand() const; + virtual OUString Expand() const; /** Creates a copy of this field. @@ -126,7 +126,7 @@ public: @return the selected value */ - virtual const OUString & GetPar1() const; + virtual OUString GetPar1() const; /** Returns the name of the field. @@ -181,28 +181,28 @@ public: @return the selected item */ - const OUString & GetSelectedItem() const; + OUString GetSelectedItem() const; /** Returns the name of the field. @return the name of the field */ - const OUString & GetName() const; + OUString GetName() const; /** Returns the help text of the field. @return the help text of the field */ - const OUString & GetHelp() const; + OUString GetHelp() const; /** Returns the tool tip of the field. @return the tool tip of the field */ - const OUString & GetToolTip() const; + OUString GetToolTip() const; /** Sets the selected item. diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx index 9550de42539c..620190782307 100644 --- a/sw/inc/reffld.hxx +++ b/sw/inc/reffld.hxx @@ -72,7 +72,7 @@ public: void MergeWithOtherDoc( SwDoc& rDestDoc ); - static SwTxtNode* FindAnchor( SwDoc* pDoc, const String& rRefMark, + static SwTxtNode* FindAnchor( SwDoc* pDoc, const OUString& rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uInt16* pStt, sal_uInt16* pEnd = 0 ); }; @@ -82,27 +82,27 @@ class SW_DLLPUBLIC SwGetRefField : public SwField { private: OUString sSetRefName; - String sTxt; + OUString sTxt; sal_uInt16 nSubType; sal_uInt16 nSeqNo; - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; // #i81002# - String MakeRefNumStr( const SwTxtNode& rTxtNodeOfField, + OUString MakeRefNumStr( const SwTxtNode& rTxtNodeOfField, const SwTxtNode& rTxtNodeOfReferencedItem, const sal_uInt32 nRefNumFormat ) const; public: - SwGetRefField( SwGetRefFieldType*, const String& rSetRef, + SwGetRefField( SwGetRefFieldType*, const OUString& rSetRef, sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uLong nFmt ); virtual ~SwGetRefField(); - virtual String GetFieldName() const; + virtual OUString GetFieldName() const; - const OUString& GetSetRefName() const { return sSetRefName; } + OUString GetSetRefName() const { return sSetRefName; } // #i81002# /** The <SwTxtFld> instance, which represents the text attribute for the @@ -113,7 +113,7 @@ public: no update for these reference format types. */ void UpdateField( const SwTxtFld* pFldTxtAttr ); - void SetExpand( const String& rStr ) { sTxt = rStr; } + void SetExpand( const OUString& rStr ) { sTxt = rStr; } /// Get/set sub type. virtual sal_uInt16 GetSubType() const; @@ -124,7 +124,7 @@ public: bool IsRefToNumItemCrossRefBookmark() const; const SwTxtNode* GetReferencedTxtNode() const; // #i85090# - String GetExpandedTxtOfReferencedTxtNode() const; + OUString GetExpandedTxtOfReferencedTxtNode() const; /// Get/set SequenceNo (of interest only for REF_SEQUENCEFLD). @@ -132,7 +132,7 @@ public: void SetSeqNo( sal_uInt16 n ) { nSeqNo = n; } // Name of reference. - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; virtual void SetPar1(const OUString& rStr); virtual OUString GetPar2() const; @@ -141,7 +141,7 @@ public: void ConvertProgrammaticToUIName(); - virtual String GetDescription() const; + virtual OUString GetDescription() const; }; diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx index 85fe469775a7..f529c32f2b2c 100644 --- a/sw/inc/usrfld.hxx +++ b/sw/inc/usrfld.hxx @@ -33,19 +33,19 @@ class SW_DLLPUBLIC SwUserFieldType : public SwValueFieldType bool bDeleted : 1; double nValue; OUString aName; - String aContent; + OUString aContent; sal_uInt16 nType; public: - SwUserFieldType( SwDoc* pDocPtr, const String& ); + SwUserFieldType( SwDoc* pDocPtr, const OUString& ); - virtual const OUString& GetName() const; + virtual OUString GetName() const; virtual SwFieldType* Copy() const; - String Expand(sal_uInt32 nFmt, sal_uInt16 nSubType, sal_uInt16 nLng); + OUString Expand(sal_uInt32 nFmt, sal_uInt16 nSubType, sal_uInt16 nLng); - String GetContent( sal_uInt32 nFmt = 0 ); - void SetContent( const String& rStr, sal_uInt32 nFmt = 0 ); + OUString GetContent( sal_uInt32 nFmt = 0 ); + void SetContent( const OUString& rStr, sal_uInt32 nFmt = 0 ); inline bool IsValid() const; inline void ChgValid( bool bNew ); @@ -93,7 +93,7 @@ class SW_DLLPUBLIC SwUserField : public SwValueField { sal_uInt16 nSubType; - virtual String Expand() const; + virtual OUString Expand() const; virtual SwField* Copy() const; public: @@ -105,10 +105,10 @@ public: virtual double GetValue() const; virtual void SetValue( const double& rVal ); - virtual String GetFieldName() const; + virtual OUString GetFieldName() const; // Name cannot be changed. - virtual const OUString& GetPar1() const; + virtual OUString GetPar1() const; // Content. virtual OUString GetPar2() const; |