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;
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();
......
......@@ -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;
......
......@@ -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
......
......@@ -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 );
......
......@@ -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);
......
......@@ -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 );
......
......@@ -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;
}
......
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