diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-12 13:40:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-13 11:20:23 +0100 |
commit | 6191fa0847ac5b27083efe1a8c6cd84d080a638c (patch) | |
tree | b107ce00125d0d204e5c32f6c472e70c73182bb2 /vcl | |
parent | 2e16eaf31c7a4849110020aebd5fbc97a1ab3e99 (diff) |
reduce use of UniString ctor from null-terminated unicodearray
Change-Id: I98361309ada084d8f78517ce88f210d785f59cc0
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/font.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/font.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/helper/strhelper.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/app/i18n_status.cxx | 2 |
6 files changed, 8 insertions, 10 deletions
diff --git a/vcl/inc/vcl/font.hxx b/vcl/inc/vcl/font.hxx index 8ca4ba5bbb87..1197d1fd0af9 100644 --- a/vcl/inc/vcl/font.hxx +++ b/vcl/inc/vcl/font.hxx @@ -70,7 +70,7 @@ public: void SetAlign( FontAlign ); FontAlign GetAlign() const; - void SetName( const String& rFamilyName ); + void SetName( const rtl::OUString& rFamilyName ); const String& GetName() const; void SetStyleName( const String& rStyleName ); const String& GetStyleName() const; diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index a80c4c7e3bdc..ca625fbf20ca 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -376,7 +376,7 @@ void Font::SetAlign( FontAlign eAlign ) // ----------------------------------------------------------------------- -void Font::SetName( const String& rFamilyName ) +void Font::SetName( const rtl::OUString& rFamilyName ) { DBG_CHKTHIS( Font, NULL ); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index e26907b153c7..627cd7d1d778 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -1673,10 +1673,10 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference ) MetaTextLineAction* pAct = (MetaTextLineAction*) pAction; // measure a test string to get ascend and descent right static const sal_Unicode pStr[] = { 0xc4, 0x67, 0 }; - String aStr( pStr ); + rtl::OUString aStr( pStr ); Rectangle aRect; - aMapVDev.GetTextBoundRect( aRect, aStr, 0, 0, aStr.Len(), 0, NULL ); + aMapVDev.GetTextBoundRect( aRect, aStr, 0, 0, aStr.getLength(), 0, NULL ); Point aPt( pAct->GetStartPoint() ); aRect.Move( aPt.X(), aPt.Y() ); aRect.Right() = aRect.Left() + pAct->GetWidth(); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 9c1e6bb34d17..72201bab2fa1 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2350,7 +2350,7 @@ public: const PDFWriterImpl::BuiltinFont&, long nPixelPerEM, int nOrientation ); - void SetText( const String& rText ) { maOrigText = rText; } + void SetText( const rtl::OUString& rText ) { maOrigText = rText; } virtual bool LayoutText( ImplLayoutArgs& ); virtual void InitFont() const; virtual void DrawText( SalGraphics& ) const; diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx index 0515fab7b6b7..452cc6835c13 100644 --- a/vcl/source/helper/strhelper.cxx +++ b/vcl/source/helper/strhelper.cxx @@ -167,8 +167,7 @@ String GetCommandLineToken( int nToken, const String& rLine ) *pLeap = 0; - String aRet( pBuffer ); - return aRet; + return rtl::OUString(pBuffer); } rtl::OString GetCommandLineToken(int nToken, const rtl::OString& rLine) @@ -324,8 +323,7 @@ String WhitespaceToSpace( const String& rLine, sal_Bool bProtect ) if( *pLeap == ' ' ) *pLeap = 0; - String aRet( *pBuffer == ' ' ? pBuffer+1 : pBuffer ); - return aRet; + return rtl::OUString(*pBuffer == ' ' ? pBuffer+1 : pBuffer); } rtl::OString WhitespaceToSpace(const rtl::OString& rLine, sal_Bool bProtect) diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx index 6c4b6a284a13..002995339f50 100644 --- a/vcl/unx/generic/app/i18n_status.cxx +++ b/vcl/unx/generic/app/i18n_status.cxx @@ -606,7 +606,7 @@ void I18NStatus::setStatusText( const String& rText ) else pBuffer[i] = pCopy[i]; } - String aText( pBuffer ); + rtl::OUString aText( pBuffer ); m_pStatusWindow->setText( aText ); m_pStatusWindow->setPosition( m_pParent ); |