diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-29 09:16:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-29 11:20:32 +0100 |
commit | 9e0cbe5eb3f4785d8db26f87ce0208823c87c5ad (patch) | |
tree | 139e2a2af31e5ba6a1549cf93c12e951b8ad570b /vcl | |
parent | 6c759da0442f5123a4a4355e8dc9c926a49d25d7 (diff) |
some pesky XubStrings
Change-Id: Ib4095dee416cab6d954e1612d2e3f6e2d4464f48
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 11 | ||||
-rw-r--r-- | vcl/source/window/msgbox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 2 | ||||
-rw-r--r-- | vcl/test/canvasbitmaptest.cxx | 2 | ||||
-rw-r--r-- | vcl/test/dndtest.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/svdem.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/svpclient.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/svptest.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 2 |
9 files changed, 11 insertions, 16 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 07af72728f1d..6d73e91356b2 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -7796,7 +7796,7 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, sa // multiline text if ( nStyle & TEXT_DRAW_MULTILINE ) { - XubString aLastLine; + rtl::OUString aLastLine; ImplMultiTextLineInfo aMultiLineInfo; ImplTextLineInfo* pLineInfo; xub_StrLen i; @@ -7821,12 +7821,7 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, sa pLineInfo = aMultiLineInfo.GetLine( nFormatLines ); aLastLine = convertLineEnd(aStr.Copy(pLineInfo->GetIndex()), LINEEND_LF); // replace line feed by space - xub_StrLen nLastLineLen = aLastLine.Len(); - for ( i = 0; i < nLastLineLen; i++ ) - { - if ( aLastLine.GetChar( i ) == _LF ) - aLastLine.SetChar( i, ' ' ); - } + aLastLine = aLastLine.replace(_LF, ' '); aLastLine = m_pReferenceDevice->GetEllipsisString( aLastLine, nWidth, nStyle ); nStyle &= ~(TEXT_DRAW_VCENTER | TEXT_DRAW_BOTTOM); nStyle |= TEXT_DRAW_TOP; @@ -7858,7 +7853,7 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, sa // output last line left adjusted since it was shortened - if ( aLastLine.Len() ) + if (!aLastLine.isEmpty()) drawText( aPos, aLastLine, 0, STRING_LEN, bTextLines ); } } diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 6863d2e81507..8f3e296fa567 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -262,7 +262,7 @@ void MessBox::ImplPosControls() // Message-Text um Tabs bereinigen - XubString aTabStr( RTL_CONSTASCII_USTRINGPARAM( " " ) ); + rtl::OUString aTabStr(" "); sal_uInt16 nIndex = 0; while ( nIndex != STRING_NOTFOUND ) nIndex = aMessText.SearchAndReplace( '\t', aTabStr, nIndex ); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 8cb1a5213e12..9c45e8bf814c 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -217,7 +217,7 @@ void Window::ImplInitAppFontData( Window* pWindow ) { ImplSVData* pSVData = ImplGetSVData(); long nTextHeight = pWindow->GetTextHeight(); - long nTextWidth = pWindow->GetTextWidth( XubString( "aemnnxEM" ) ); + long nTextWidth = pWindow->GetTextWidth(rtl::OUString("aemnnxEM")); long nSymHeight = nTextHeight*4; // Make the basis wider if the font is too narrow // such that the dialog looks symmetrical and does not become too narrow. diff --git a/vcl/test/canvasbitmaptest.cxx b/vcl/test/canvasbitmaptest.cxx index d65ddeb10f21..576810afc96e 100644 --- a/vcl/test/canvasbitmaptest.cxx +++ b/vcl/test/canvasbitmaptest.cxx @@ -1033,7 +1033,7 @@ void Main() { TestWindow aWindow; aWindow.Execute(); - aWindow.SetText( XubString( "VCL - canvasbitmaptest" ) ); + aWindow.SetText( rtl::OUString( "VCL - canvasbitmaptest" ) ); Application::Execute(); } diff --git a/vcl/test/dndtest.cxx b/vcl/test/dndtest.cxx index d35e673fdc6e..28f2518cb15c 100644 --- a/vcl/test/dndtest.cxx +++ b/vcl/test/dndtest.cxx @@ -190,7 +190,7 @@ void MyApp::Main() MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); - aMainWin.SetText( XubString( "Drag And Drop - Workbench" ) ); + aMainWin.SetText( rtl::OUString( "Drag And Drop - Workbench" ) ); aMainWin.Show(); // test the clipboard code diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx index 0bbb30978eb5..cbdea98c5f98 100644 --- a/vcl/workben/svdem.cxx +++ b/vcl/workben/svdem.cxx @@ -75,7 +75,7 @@ public: void Main() { MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); - aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "VCL - Workbench" ) ) ); + aMainWin.SetText(rtl::OUString("VCL - Workbench")); aMainWin.Show(); Application::Execute(); diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx index a059735ae8cb..4b07940eccf4 100644 --- a/vcl/workben/svpclient.cxx +++ b/vcl/workben/svpclient.cxx @@ -162,7 +162,7 @@ public: void Main() { MyWin aMainWin( NULL, WB_STDWORK ); - aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "SvpClient" ) ) ); + aMainWin.SetText( rtl::OUString( "SvpClient" ) ); aMainWin.Show(); Application::Execute(); diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index 2c1dd59a8174..6e08dc1e2831 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -95,7 +95,7 @@ public: void Main() { MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); - aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "VCL - Workbench" ) ) ); + aMainWin.SetText( rtl::OUString( "VCL - Workbench" ) ); aMainWin.Show(); Application::Execute(); diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 7df524a81599..b5fbb89089b0 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -87,7 +87,7 @@ public: void Main() { MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); - aMainWin.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "VCLDemo - VCL Workbench" ) ) ); + aMainWin.SetText( rtl::OUString( "VCLDemo - VCL Workbench" ) ); aMainWin.Show(); /* |