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 /svtools | |
parent | 2e16eaf31c7a4849110020aebd5fbc97a1ab3e99 (diff) |
reduce use of UniString ctor from null-terminated unicodearray
Change-Id: I98361309ada084d8f78517ce88f210d785f59cc0
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/dialogs/insdlg.cxx | 2 | ||||
-rw-r--r-- | svtools/source/edit/svmedit.cxx | 12 | ||||
-rw-r--r-- | svtools/source/filter/wmf/enhwmf.cxx | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 9f3f70b020ae..d657893d51ea 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -193,7 +193,7 @@ void SvObjectServerList::FillInsertObjects() { if( !Get( aClassName ) ) // noch nicht eingetragen - aObjectServerList.push_back( SvObjectServer( aClassName, String( aUIName.getStr() ) ) ); + aObjectServerList.push_back( SvObjectServer( aClassName, aUIName ) ); } } } diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx index fca8fc477956..8dd65023fda9 100644 --- a/svtools/source/edit/svmedit.cxx +++ b/svtools/source/edit/svmedit.cxx @@ -315,12 +315,12 @@ void ImpSvMEdit::ImpSetScrollBarRanges() void ImpSvMEdit::ImpInitScrollBars() { - static const sal_Unicode sampleText[] = { 'x', '\0' }; + static const sal_Unicode sampleChar = { 'x' }; if ( mpHScrollBar || mpVScrollBar ) { ImpSetScrollBarRanges(); Size aCharBox; - aCharBox.Width() = mpTextWindow->GetTextWidth( sampleText ); + aCharBox.Width() = mpTextWindow->GetTextWidth( rtl::OUString(sampleChar) ); aCharBox.Height() = mpTextWindow->GetTextHeight(); Size aOutSz = mpTextWindow->GetOutputSizePixel(); if ( mpHScrollBar ) @@ -673,11 +673,11 @@ Size ImpSvMEdit::CalcMinimumSize() const Size ImpSvMEdit::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const { - static const sal_Unicode sampleText[] = { 'X', '\0' }; + static const sal_Unicode sampleChar = 'X'; Size aSz; Size aCharSz; - aCharSz.Width() = mpTextWindow->GetTextWidth( sampleText ); + aCharSz.Width() = mpTextWindow->GetTextWidth( rtl::OUString(sampleChar) ); aCharSz.Height() = mpTextWindow->GetTextHeight(); if ( nLines ) @@ -700,9 +700,9 @@ Size ImpSvMEdit::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const void ImpSvMEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const { - static const sal_Unicode sampleText[] = { 'x', '\0' }; + static const sal_Unicode sampleChar = { 'x' }; Size aOutSz = mpTextWindow->GetOutputSizePixel(); - Size aCharSz( mpTextWindow->GetTextWidth( sampleText ), mpTextWindow->GetTextHeight() ); + Size aCharSz( mpTextWindow->GetTextWidth( rtl::OUString(sampleChar) ), mpTextWindow->GetTextHeight() ); rnCols = (sal_uInt16) (aOutSz.Width()/aCharSz.Width()); rnLines = (sal_uInt16) (aOutSz.Height()/aCharSz.Height()); } diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx index b81d973aa9c7..cadb5e2cea98 100644 --- a/svtools/source/filter/wmf/enhwmf.cxx +++ b/svtools/source/filter/wmf/enhwmf.cxx @@ -1095,7 +1095,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() *pWMF >> nChar; lfFaceName[ i ] = nChar; } - aLogFont.alfFaceName = UniString( lfFaceName ); + aLogFont.alfFaceName = rtl::OUString( lfFaceName ); pOut->CreateObject( nIndex, GDI_FONT, new WinMtfFontStyle( aLogFont ) ); } } |