diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-08-18 01:22:41 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-08-18 01:22:41 +0200 |
commit | 9eea0332e091ebd49b25c1289fbb3572b3f4bc2c (patch) | |
tree | 40beaa81a24a4d6dfb8476fc114439ffdbb98ede /sw | |
parent | a38f4e61b5611850f3b4f56cc5f6d9a6cb400d2e (diff) |
String to OUString
Change-Id: I5dbb39e429ee35c47b492dc29bf172879bc32b1e
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/fmtruby.hxx | 19 | ||||
-rw-r--r-- | sw/source/core/doc/docruby.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/txtnode/fmtatr2.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/txtatr2.cxx | 2 |
4 files changed, 13 insertions, 14 deletions
diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx index ed8edfe4fac0..1371cd9d9f6a 100644 --- a/sw/inc/fmtruby.hxx +++ b/sw/inc/fmtruby.hxx @@ -16,11 +16,10 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef _FMTRUBY_HXX -#define _FMTRUBY_HXX +#ifndef FMTRUBY_HXX +#define FMTRUBY_HXX -#include <tools/string.hxx> #include <svl/poolitem.hxx> class SwTxtRuby; @@ -29,15 +28,15 @@ class SW_DLLPUBLIC SwFmtRuby : public SfxPoolItem { friend class SwTxtRuby; - String sRubyTxt; ///< The ruby txt. - String sCharFmtName; ///< Name of the charformat. + OUString sRubyTxt; ///< The ruby txt. + OUString sCharFmtName; ///< Name of the charformat. SwTxtRuby* pTxtAttr; ///< The TextAttribute. sal_uInt16 nCharFmtId; ///< PoolId of the charformat. sal_uInt16 nPosition; ///< Position of the Ruby-character. sal_uInt16 nAdjustment; ///< Specific adjustment of the Ruby-ch. public: - SwFmtRuby( const String& rRubyTxt ); + SwFmtRuby( const OUString& rRubyTxt ); SwFmtRuby( const SwFmtRuby& rAttr ); virtual ~SwFmtRuby(); @@ -62,11 +61,11 @@ public: const SwTxtRuby* GetTxtRuby() const { return pTxtAttr; } SwTxtRuby* GetTxtRuby() { return pTxtAttr; } - const String& GetText() const { return sRubyTxt; } - void SetText( const String& rTxt ) { sRubyTxt = rTxt; } + OUString GetText() const { return sRubyTxt; } + void SetText( const OUString& rTxt ) { sRubyTxt = rTxt; } - const String& GetCharFmtName() const { return sCharFmtName; } - void SetCharFmtName( const String& rNm ) { sCharFmtName = rNm; } + OUString GetCharFmtName() const { return sCharFmtName; } + void SetCharFmtName( const OUString& rNm ) { sCharFmtName = rNm; } sal_uInt16 GetCharFmtId() const { return nCharFmtId; } void SetCharFmtId( sal_uInt16 nNew ) { nCharFmtId = nNew; } diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx index 138645c37ebe..1760bf5e41e2 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -124,7 +124,7 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList, if( aCheckEntry.GetRubyAttr() != pEntry->GetRubyAttr() ) { // set/reset the attribut - if( pEntry->GetRubyAttr().GetText().Len() ) + if( !pEntry->GetRubyAttr().GetText().isEmpty() ) { InsertPoolItem( aPam, pEntry->GetRubyAttr(), 0 ); } @@ -155,7 +155,7 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList, const SwRubyListEntry* pEntry = &rList[ nListEntry++ ]; // set/reset the attribut - if( pEntry->GetRubyAttr().GetText().Len() && + if( !pEntry->GetRubyAttr().GetText().isEmpty() && pEntry->GetText().Len() ) { InsertString( aPam, pEntry->GetText() ); diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index b2fa6d1be065..841ac42e561e 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -421,7 +421,7 @@ bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) |* class SwFmtRuby *************************************************************************/ -SwFmtRuby::SwFmtRuby( const String& rRubyTxt ) +SwFmtRuby::SwFmtRuby( const OUString& rRubyTxt ) : SfxPoolItem( RES_TXTATR_CJK_RUBY ), sRubyTxt( rRubyTxt ), pTxtAttr( 0 ), diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx index 351fdee5274b..e5464dcf4105 100644 --- a/sw/source/core/txtnode/txtatr2.cxx +++ b/sw/source/core/txtnode/txtatr2.cxx @@ -255,7 +255,7 @@ SwCharFmt* SwTxtRuby::GetCharFmt() const SwFmtRuby& rFmt = SwTxtAttrEnd::GetRuby(); SwCharFmt* pRet = 0; - if( rFmt.GetText().Len() ) + if( !rFmt.GetText().isEmpty() ) { const SwDoc* pDoc = GetTxtNode().GetDoc(); const String& rStr = rFmt.GetCharFmtName(); |