sw/inc/pagedesc.hxx | 21 ++++++++++----------- sw/source/core/layout/pagedesc.cxx | 4 ++-- sw/source/core/unocore/unoobj.cxx | 5 ++--- 3 files changed, 14 insertions(+), 16 deletions(-)
New commits: commit 077c80b9d2ed863d881627a1e14ae5b6f84277b8 Author: Matteo Casalin <matteo.casa...@yahoo.com> Date: Sat Aug 17 01:16:25 2013 +0200 String to OUString Change-Id: Idaf974536036d40d60a43b32a7104e2ead075b48 Reviewed-on: https://gerrit.libreoffice.org/5466 Reviewed-by: Matteo Casalin <matteo.casa...@yahoo.com> Tested-by: Matteo Casalin <matteo.casa...@yahoo.com> diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 45ca5df..a132378 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 33aecbf..79410e7 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 f898d1c..c049ddd 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) ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits