summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-29 09:16:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-29 11:20:32 +0100
commit9e0cbe5eb3f4785d8db26f87ce0208823c87c5ad (patch)
tree139e2a2af31e5ba6a1549cf93c12e951b8ad570b /vcl/source
parent6c759da0442f5123a4a4355e8dc9c926a49d25d7 (diff)
some pesky XubStrings
Change-Id: Ib4095dee416cab6d954e1612d2e3f6e2d4464f48
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx11
-rw-r--r--vcl/source/window/msgbox.cxx2
-rw-r--r--vcl/source/window/window.cxx2
3 files changed, 5 insertions, 10 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.