summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2013-08-17 01:16:25 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2013-08-17 00:09:09 +0000
commit077c80b9d2ed863d881627a1e14ae5b6f84277b8 (patch)
tree0972677451b3d511577935b1f9c2dfec41c79aed /sw
parent92eaf78fd4485037f8721cba04affc947dd92a71 (diff)
String to OUString
Change-Id: Idaf974536036d40d60a43b32a7104e2ead075b48 Reviewed-on: https://gerrit.libreoffice.org/5466 Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com> Tested-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/pagedesc.hxx21
-rw-r--r--sw/source/core/layout/pagedesc.cxx4
-rw-r--r--sw/source/core/unocore/unoobj.cxx5
3 files changed, 14 insertions, 16 deletions
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 45ca5dfa2167..a132378ad349 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -16,12 +16,11 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef _PAGEDESC_HXX
-#define _PAGEDESC_HXX
+#ifndef PAGEDESC_HXX
+#define PAGEDESC_HXX
#include <tools/fract.hxx>
#include <tools/color.hxx>
-#include <tools/string.hxx>
#include "swdllapi.h"
#include <swtypes.hxx> ///< For SwTwips.
#include <frmfmt.hxx>
@@ -132,7 +131,7 @@ class SW_DLLPUBLIC SwPageDesc : public SwModify
{
friend class SwDoc;
- String aDescName;
+ OUString aDescName;
SvxNumberType aNumType;
SwFrmFmt aMaster;
SwFrmFmt aLeft;
@@ -154,14 +153,14 @@ class SW_DLLPUBLIC SwPageDesc : public SwModify
SW_DLLPRIVATE void ResetAllAttr( sal_Bool bLeft );
- SW_DLLPRIVATE SwPageDesc(const String&, SwFrmFmt*, SwDoc *pDc );
+ SW_DLLPRIVATE SwPageDesc(const OUString&, SwFrmFmt*, SwDoc *pDc );
protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue );
public:
- const String &GetName() const { return aDescName; }
- void SetName( const String& rNewName ) { aDescName = rNewName; }
+ OUString GetName() const { return aDescName; }
+ void SetName( const OUString& rNewName ) { aDescName = rNewName; }
sal_Bool GetLandscape() const { return bLandscape; }
void SetLandscape( sal_Bool bNew ) { bLandscape = bNew; }
@@ -316,7 +315,7 @@ class SwPageDescExt
{
SwPageDesc aPageDesc;
SwDoc * pDoc;
- String sFollow;
+ OUString sFollow;
void SetPageDesc(const SwPageDesc & aPageDesc);
@@ -328,14 +327,14 @@ public:
SwPageDescExt & operator = (const SwPageDescExt & rSrc);
SwPageDescExt & operator = (const SwPageDesc & rSrc);
- const String & GetName() const;
+ OUString GetName() const;
operator SwPageDesc() const; // #i7983#
};
-SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName);
+SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const OUString& rName);
-#endif //_PAGEDESC_HXX
+#endif //PAGEDESC_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index 33aecbff3536..79410e753c18 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -44,7 +44,7 @@ using namespace ::com::sun::star;
-SwPageDesc::SwPageDesc( const String& rName, SwFrmFmt *pFmt, SwDoc *pDc ) :
+SwPageDesc::SwPageDesc( const OUString& rName, SwFrmFmt *pFmt, SwDoc *pDc ) :
SwModify( 0 ),
aDescName( rName ),
aMaster( pDc->GetAttrPool(), rName, pFmt ),
@@ -463,7 +463,7 @@ SwPageDescExt::~SwPageDescExt()
{
}
-const String & SwPageDescExt::GetName() const
+OUString SwPageDescExt::GetName() const
{
return aPageDesc.GetName();
}
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index f898d1c86499..c049ddde014a 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -668,7 +668,7 @@ SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional)
/* --------------------------------------------------
* Hilfsfunktion fuer PageDesc
* --------------------------------------------------*/
-SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName)
+SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const OUString& rName)
{
SwPageDesc* pRet = 0;
sal_uInt16 nDCount = rDoc.GetPageDescCnt();
@@ -687,8 +687,7 @@ SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName)
{
for(i = RC_POOLPAGEDESC_BEGIN; i <= STR_POOLPAGE_LANDSCAPE; ++i)
{
- const String aFmtName(SW_RES(i));
- if(aFmtName == rName)
+ if (rName==SW_RESSTR(i))
{
pRet = rDoc.GetPageDescFromPool( static_cast< sal_uInt16 >(
RES_POOLPAGE_BEGIN + i - RC_POOLPAGEDESC_BEGIN) );