Kaydet (Commit) 5da5b526 authored tarafından Noel Grandin's avatar Noel Grandin

convert sw/source/ui/inc/ui*.hxx from String to OUString

Change-Id: I2c9844d1a31d058fadc81c8ff935ce2d75f25ad1
üst 2d5ba868
...@@ -58,7 +58,7 @@ using namespace ::com::sun::star; ...@@ -58,7 +58,7 @@ using namespace ::com::sun::star;
An old rule at that position will be overwritten. An old rule at that position will be overwritten.
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
SwBaseNumRules::SwBaseNumRules( const String& rFileName ) SwBaseNumRules::SwBaseNumRules( const OUString& rFileName )
: :
sFileName( rFileName ), sFileName( rFileName ),
nVersion(0), nVersion(0),
...@@ -175,7 +175,7 @@ void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt1 ...@@ -175,7 +175,7 @@ void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt1
} }
SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy, SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy,
const String &rName ) const OUString &rName )
: maName(rName) : maName(rName)
{ {
for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
...@@ -532,7 +532,7 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh, ...@@ -532,7 +532,7 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh,
SwNumFmt& rNew ) const SwNumFmt& rNew ) const
{ {
SwCharFmt* pFmt = 0; SwCharFmt* pFmt = 0;
if( sCharFmtName.Len() ) if( !sCharFmtName.isEmpty() )
{ {
// at first, look for the name // at first, look for the name
sal_uInt16 nArrLen = rSh.GetCharFmtCount(); sal_uInt16 nArrLen = rSh.GetCharFmtCount();
......
...@@ -33,13 +33,13 @@ typedef boost::ptr_vector<SfxPoolItem> _SwNumFmtsAttrs; ...@@ -33,13 +33,13 @@ typedef boost::ptr_vector<SfxPoolItem> _SwNumFmtsAttrs;
class SW_DLLPUBLIC SwNumRulesWithName class SW_DLLPUBLIC SwNumRulesWithName
{ {
String maName; OUString maName;
// the NumRule's formats _have_ to be independent of a document // the NumRule's formats _have_ to be independent of a document
// (They should always be there!) // (They should always be there!)
class SW_DLLPRIVATE _SwNumFmtGlobal class SW_DLLPRIVATE _SwNumFmtGlobal
{ {
SwNumFmt aFmt; SwNumFmt aFmt;
String sCharFmtName; OUString sCharFmtName;
sal_uInt16 nCharPoolId; sal_uInt16 nCharPoolId;
_SwNumFmtsAttrs aItems; _SwNumFmtsAttrs aItems;
...@@ -58,17 +58,17 @@ class SW_DLLPUBLIC SwNumRulesWithName ...@@ -58,17 +58,17 @@ class SW_DLLPUBLIC SwNumRulesWithName
_SwNumFmtGlobal* aFmts[ MAXLEVEL ]; _SwNumFmtGlobal* aFmts[ MAXLEVEL ];
protected: protected:
void SetName(const String& rSet) {maName = rSet;} void SetName(const OUString& rSet) {maName = rSet;}
public: public:
SwNumRulesWithName(const SwNumRule &, const String &); SwNumRulesWithName(const SwNumRule &, const OUString &);
SwNumRulesWithName( const SwNumRulesWithName & ); SwNumRulesWithName( const SwNumRulesWithName & );
SwNumRulesWithName(SvStream &, sal_uInt16 nVersion); SwNumRulesWithName(SvStream &, sal_uInt16 nVersion);
~SwNumRulesWithName(); ~SwNumRulesWithName();
const SwNumRulesWithName &operator=(const 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 MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const;
void Store( SvStream& ); void Store( SvStream& );
...@@ -79,10 +79,10 @@ class SwBaseNumRules ...@@ -79,10 +79,10 @@ class SwBaseNumRules
public: public:
enum { nMaxRules = MAX_NUM_RULES }; // currently 9 defined forms enum { nMaxRules = MAX_NUM_RULES }; // currently 9 defined forms
protected: protected:
SwNumRulesWithName *pNumRules[ MAX_NUM_RULES ]; SwNumRulesWithName *pNumRules[ MAX_NUM_RULES ];
String sFileName; OUString sFileName;
sal_uInt16 nVersion; sal_uInt16 nVersion;
sal_Bool bModified; sal_Bool bModified;
virtual int Load(SvStream&); virtual int Load(SvStream&);
virtual sal_Bool Store(SvStream&); virtual sal_Bool Store(SvStream&);
...@@ -90,7 +90,7 @@ protected: ...@@ -90,7 +90,7 @@ protected:
void Init(); void Init();
public: public:
SwBaseNumRules(const String& rFileName); SwBaseNumRules(const OUString& rFileName);
virtual ~SwBaseNumRules(); virtual ~SwBaseNumRules();
inline const SwNumRulesWithName* GetRules(sal_uInt16 nIdx) const; inline const SwNumRulesWithName* GetRules(sal_uInt16 nIdx) const;
......
...@@ -92,13 +92,13 @@ void SetApplyCharUnit(sal_Bool bApplyChar, sal_Bool bWeb); ...@@ -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); SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted = false, bool bWithDefault = false);
//inserts a string sorted into a ListBox, //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 // Get table width and alignement
SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent, SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
SwWrtShell* pSh ); SwWrtShell* pSh );
String GetAppLangDateTimeString( const DateTime& ); OUString GetAppLangDateTimeString( const DateTime& );
// search for a command string withing the menu structure and execute it // search for a command string withing the menu structure and execute it
// at the dispatcher if there is one, if executed return true // at the dispatcher if there is one, if executed return true
......
...@@ -160,7 +160,7 @@ public: ...@@ -160,7 +160,7 @@ public:
} }
void StartDocumentInserter( const String& rFactory, const Link& rEndDialogHdl ); void StartDocumentInserter( const OUString& rFactory, const Link& rEndDialogHdl );
SfxMedium* CreateMedium(); SfxMedium* CreateMedium();
void InitRequest( const SfxRequest& rRequest ); void InitRequest( const SfxRequest& rRequest );
......
...@@ -69,7 +69,7 @@ class SwNumNamesDlg : public ModalDialog ...@@ -69,7 +69,7 @@ class SwNumNamesDlg : public ModalDialog
public: public:
SwNumNamesDlg(Window *pParent); SwNumNamesDlg(Window *pParent);
void SetUserNames(const String *pList[]); void SetUserNames(const OUString *pList[]);
String GetName() const { return m_pFormEdit->GetText(); } String GetName() const { return m_pFormEdit->GetText(); }
sal_uInt16 GetCurEntryPos() const { return m_pFormBox->GetSelectEntryPos(); } sal_uInt16 GetCurEntryPos() const { return m_pFormBox->GetSelectEntryPos(); }
}; };
...@@ -87,7 +87,7 @@ IMPL_LINK_INLINE_END( SwNumNamesDlg, SelectHdl, ListBox *, pBox ) ...@@ -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. * @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; sal_uInt16 nSelect = 0;
for(sal_uInt16 i = 0; i < SwBaseNumRules::nMaxRules; ++i) for(sal_uInt16 i = 0; i < SwBaseNumRules::nMaxRules; ++i)
...@@ -265,7 +265,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu ) ...@@ -265,7 +265,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
else if (sIdent == "saveas") else if (sIdent == "saveas")
{ {
SwNumNamesDlg *pDlg = new SwNumNamesDlg(this); SwNumNamesDlg *pDlg = new SwNumNamesDlg(this);
const String *aStrArr[SwChapterNumRules::nMaxRules]; const OUString *aStrArr[SwChapterNumRules::nMaxRules];
for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i) for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i)
{ {
const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i); const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i);
......
...@@ -232,7 +232,7 @@ void SwView_Impl::AddTransferable(SwTransferable& rTransferable) ...@@ -232,7 +232,7 @@ void SwView_Impl::AddTransferable(SwTransferable& rTransferable)
rTransferable.m_refCount--; 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; delete m_pDocInserter;
m_pDocInserter = new ::sfx2::DocumentInserter( rFactory ); m_pDocInserter = new ::sfx2::DocumentInserter( rFactory );
......
...@@ -662,7 +662,7 @@ void SetDfltMetric( FieldUnit eMetric, sal_Bool bWeb ) ...@@ -662,7 +662,7 @@ void SetDfltMetric( FieldUnit eMetric, sal_Bool bWeb )
SW_MOD()->ApplyUserMetric(eMetric, 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; sal_uInt16 i = nOffset;
CollatorWrapper& rCaseColl = ::GetAppCaseCollator(); CollatorWrapper& rCaseColl = ::GetAppCaseCollator();
...@@ -759,12 +759,11 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent, ...@@ -759,12 +759,11 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
return nWidth; return nWidth;
} }
String GetAppLangDateTimeString( const DateTime& rDT ) OUString GetAppLangDateTimeString( const DateTime& rDT )
{ {
const SvtSysLocale aSysLocale; const SvtSysLocale aSysLocale;
const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData(); const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData();
String sRet( rAppLclData.getDate( rDT )); OUString sRet = rAppLclData.getDate( rDT ) + " " + rAppLclData.getTime( rDT, sal_False, sal_False );
( sRet += ' ' ) += rAppLclData.getTime( rDT, sal_False, sal_False );
return sRet; return sRet;
} }
......
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