diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-08 14:15:04 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-10 09:19:00 +0200 |
commit | 5da5b52634d3452c16b733394bffb03cecd4cdd6 (patch) | |
tree | 909f47bda563bfb13802960de74f15064692962f | |
parent | 2d5ba868d16661221075b4fc919174ab97dbfb80 (diff) |
convert sw/source/ui/inc/ui*.hxx from String to OUString
Change-Id: I2c9844d1a31d058fadc81c8ff935ce2d75f25ad1
-rw-r--r-- | sw/source/ui/config/uinums.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/inc/uinums.hxx | 20 | ||||
-rw-r--r-- | sw/source/ui/inc/uitool.hxx | 4 | ||||
-rw-r--r-- | sw/source/ui/inc/uivwimp.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/outline.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/uiview/uivwimp.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/utlui/uitool.cxx | 7 |
7 files changed, 23 insertions, 24 deletions
diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx index a09a8384f931..b2c98d5a7005 100644 --- a/sw/source/ui/config/uinums.cxx +++ b/sw/source/ui/config/uinums.cxx @@ -58,7 +58,7 @@ using namespace ::com::sun::star; An old rule at that position will be overwritten. ------------------------------------------------------------------------*/ -SwBaseNumRules::SwBaseNumRules( const String& rFileName ) +SwBaseNumRules::SwBaseNumRules( const OUString& rFileName ) : sFileName( rFileName ), nVersion(0), @@ -175,7 +175,7 @@ void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt1 } SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy, - const String &rName ) + const OUString &rName ) : maName(rName) { for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) @@ -532,7 +532,7 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh, SwNumFmt& rNew ) const { SwCharFmt* pFmt = 0; - if( sCharFmtName.Len() ) + if( !sCharFmtName.isEmpty() ) { // at first, look for the name sal_uInt16 nArrLen = rSh.GetCharFmtCount(); diff --git a/sw/source/ui/inc/uinums.hxx b/sw/source/ui/inc/uinums.hxx index 44502b4d9dd2..9fff6c099db0 100644 --- a/sw/source/ui/inc/uinums.hxx +++ b/sw/source/ui/inc/uinums.hxx @@ -33,13 +33,13 @@ typedef boost::ptr_vector<SfxPoolItem> _SwNumFmtsAttrs; class SW_DLLPUBLIC SwNumRulesWithName { - String maName; + OUString maName; // the NumRule's formats _have_ to be independent of a document // (They should always be there!) class SW_DLLPRIVATE _SwNumFmtGlobal { SwNumFmt aFmt; - String sCharFmtName; + OUString sCharFmtName; sal_uInt16 nCharPoolId; _SwNumFmtsAttrs aItems; @@ -58,17 +58,17 @@ class SW_DLLPUBLIC SwNumRulesWithName _SwNumFmtGlobal* aFmts[ MAXLEVEL ]; protected: - void SetName(const String& rSet) {maName = rSet;} + void SetName(const OUString& rSet) {maName = rSet;} public: - SwNumRulesWithName(const SwNumRule &, const String &); + SwNumRulesWithName(const SwNumRule &, const OUString &); SwNumRulesWithName( const SwNumRulesWithName & ); SwNumRulesWithName(SvStream &, sal_uInt16 nVersion); ~SwNumRulesWithName(); const SwNumRulesWithName &operator=(const SwNumRulesWithName &); - const String& GetName() const { return maName; } + const OUString& GetName() const { return maName; } void MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const; void Store( SvStream& ); @@ -79,10 +79,10 @@ class SwBaseNumRules public: enum { nMaxRules = MAX_NUM_RULES }; // currently 9 defined forms protected: - SwNumRulesWithName *pNumRules[ MAX_NUM_RULES ]; - String sFileName; - sal_uInt16 nVersion; - sal_Bool bModified; + SwNumRulesWithName *pNumRules[ MAX_NUM_RULES ]; + OUString sFileName; + sal_uInt16 nVersion; + sal_Bool bModified; virtual int Load(SvStream&); virtual sal_Bool Store(SvStream&); @@ -90,7 +90,7 @@ protected: void Init(); public: - SwBaseNumRules(const String& rFileName); + SwBaseNumRules(const OUString& rFileName); virtual ~SwBaseNumRules(); inline const SwNumRulesWithName* GetRules(sal_uInt16 nIdx) const; diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx index f4a0484381f3..9a1b3b8371cf 100644 --- a/sw/source/ui/inc/uitool.hxx +++ b/sw/source/ui/inc/uitool.hxx @@ -92,13 +92,13 @@ void SetApplyCharUnit(sal_Bool bApplyChar, sal_Bool bWeb); SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted = false, bool bWithDefault = false); //inserts a string sorted into a ListBox, -SW_DLLPUBLIC sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset); +SW_DLLPUBLIC sal_uInt16 InsertStringSorted(const OUString& rEntry, ListBox& rToFill, sal_uInt16 nOffset); // Get table width and alignement SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent, SwWrtShell* pSh ); -String GetAppLangDateTimeString( const DateTime& ); +OUString GetAppLangDateTimeString( const DateTime& ); // search for a command string withing the menu structure and execute it // at the dispatcher if there is one, if executed return true diff --git a/sw/source/ui/inc/uivwimp.hxx b/sw/source/ui/inc/uivwimp.hxx index f9a1794af7ef..1466a809668c 100644 --- a/sw/source/ui/inc/uivwimp.hxx +++ b/sw/source/ui/inc/uivwimp.hxx @@ -160,7 +160,7 @@ public: } - void StartDocumentInserter( const String& rFactory, const Link& rEndDialogHdl ); + void StartDocumentInserter( const OUString& rFactory, const Link& rEndDialogHdl ); SfxMedium* CreateMedium(); void InitRequest( const SfxRequest& rRequest ); diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 3fafc63e6385..070e86d485bf 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -69,7 +69,7 @@ class SwNumNamesDlg : public ModalDialog public: SwNumNamesDlg(Window *pParent); - void SetUserNames(const String *pList[]); + void SetUserNames(const OUString *pList[]); String GetName() const { return m_pFormEdit->GetText(); } sal_uInt16 GetCurEntryPos() const { return m_pFormBox->GetSelectEntryPos(); } }; @@ -87,7 +87,7 @@ IMPL_LINK_INLINE_END( SwNumNamesDlg, SelectHdl, ListBox *, pBox ) * * @param pList list of user defined names; unknown positions for the user are 0. */ -void SwNumNamesDlg::SetUserNames(const String *pList[]) +void SwNumNamesDlg::SetUserNames(const OUString *pList[]) { sal_uInt16 nSelect = 0; for(sal_uInt16 i = 0; i < SwBaseNumRules::nMaxRules; ++i) @@ -265,7 +265,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu ) else if (sIdent == "saveas") { SwNumNamesDlg *pDlg = new SwNumNamesDlg(this); - const String *aStrArr[SwChapterNumRules::nMaxRules]; + const OUString *aStrArr[SwChapterNumRules::nMaxRules]; for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i) { const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i); diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx index 4332fcbbfd10..c365a805190a 100644 --- a/sw/source/ui/uiview/uivwimp.cxx +++ b/sw/source/ui/uiview/uivwimp.cxx @@ -232,7 +232,7 @@ void SwView_Impl::AddTransferable(SwTransferable& rTransferable) rTransferable.m_refCount--; } -void SwView_Impl::StartDocumentInserter( const String& rFactory, const Link& rEndDialogHdl ) +void SwView_Impl::StartDocumentInserter( const OUString& rFactory, const Link& rEndDialogHdl ) { delete m_pDocInserter; m_pDocInserter = new ::sfx2::DocumentInserter( rFactory ); diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx index 5409b2f9da5c..13e344a59248 100644 --- a/sw/source/ui/utlui/uitool.cxx +++ b/sw/source/ui/utlui/uitool.cxx @@ -662,7 +662,7 @@ void SetDfltMetric( FieldUnit eMetric, sal_Bool bWeb ) SW_MOD()->ApplyUserMetric(eMetric, bWeb); } -sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset ) +sal_uInt16 InsertStringSorted(const OUString& rEntry, ListBox& rToFill, sal_uInt16 nOffset ) { sal_uInt16 i = nOffset; CollatorWrapper& rCaseColl = ::GetAppCaseCollator(); @@ -759,12 +759,11 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent, return nWidth; } -String GetAppLangDateTimeString( const DateTime& rDT ) +OUString GetAppLangDateTimeString( const DateTime& rDT ) { const SvtSysLocale aSysLocale; const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData(); - String sRet( rAppLclData.getDate( rDT )); - ( sRet += ' ' ) += rAppLclData.getTime( rDT, sal_False, sal_False ); + OUString sRet = rAppLclData.getDate( rDT ) + " " + rAppLclData.getTime( rDT, sal_False, sal_False ); return sRet; } |