diff options
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 12 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index ffd140cc56f3..573b472eb9cf 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -4710,7 +4710,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, { sal_Int32 nBreakPos = nPos; - while ( ( nBreakPos < nLen ) && ( rStr[ nBreakPos ] != _CR ) && ( rStr[ nBreakPos ] != _LF ) ) + while ( ( nBreakPos < nLen ) && ( rStr[ nBreakPos ] != '\r' ) && ( rStr[ nBreakPos ] != '\n' ) ) nBreakPos++; long nLineWidth = _rLayout.GetTextWidth( rStr, nPos, nBreakPos-nPos ); @@ -4859,11 +4859,11 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, nBreakPos++; nPos = nBreakPos; - if ( ( rStr[ nPos ] == _CR ) || ( rStr[ nPos ] == _LF ) ) + if ( ( rStr[ nPos ] == '\r' ) || ( rStr[ nPos ] == '\n' ) ) { nPos++; // CR/LF? - if ( ( nPos < nLen ) && ( rStr[ nPos ] == _LF ) && ( rStr[ nPos-1 ] == _CR ) ) + if ( ( nPos < nLen ) && ( rStr[ nPos ] == '\n' ) && ( rStr[ nPos-1 ] == '\r' ) ) nPos++; } } @@ -4873,8 +4873,8 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, { ImplTextLineInfo* pLine = rLineInfo.GetLine( nL ); String aLine( rStr, pLine->GetIndex(), pLine->GetLen() ); - DBG_ASSERT( aLine.Search( _CR ) == STRING_NOTFOUND, "ImplGetTextLines - Found CR!" ); - DBG_ASSERT( aLine.Search( _LF ) == STRING_NOTFOUND, "ImplGetTextLines - Found LF!" ); + DBG_ASSERT( aLine.Search( '\r' ) == STRING_NOTFOUND, "ImplGetTextLines - Found CR!" ); + DBG_ASSERT( aLine.Search( '\n' ) == STRING_NOTFOUND, "ImplGetTextLines - Found LF!" ); } #endif @@ -6253,7 +6253,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r xub_StrLen nLastLineLen = aLastLine.Len(); for ( i = 0; i < nLastLineLen; i++ ) { - if ( aLastLine.GetChar( i ) == _LF ) + if ( aLastLine.GetChar( i ) == '\n' ) aLastLine.SetChar( i, ' ' ); } aLastLine = ImplGetEllipsisString( rTargetDevice, aLastLine, nWidth, nStyle, _rLayout ); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 6eefa3c1b5f7..20e6a5b8474e 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -8134,7 +8134,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 - aLastLine = aLastLine.replace(_LF, ' '); + aLastLine = aLastLine.replace('\n', ' '); aLastLine = m_pReferenceDevice->GetEllipsisString( aLastLine, nWidth, nStyle ); nStyle &= ~(TEXT_DRAW_VCENTER | TEXT_DRAW_BOTTOM); nStyle |= TEXT_DRAW_TOP; |