[Libreoffice-commits] core.git: include/tools sc/source svl/source svtools/source sw/source tools/source vcl/source

Marcos Paulo de Souza marcos.souza.org at gmail.com
Thu May 9 02:49:35 PDT 2013


 include/tools/solar.h                 |    3 --
 sc/source/core/tool/formularesult.cxx |    2 -
 sc/source/filter/html/htmlexp.cxx     |    4 +--
 sc/source/ui/docshell/docsh.cxx       |    2 -
 sc/source/ui/docshell/impex.cxx       |   26 +++++++++++------------
 svl/source/items/slstitm.cxx          |    2 -
 svtools/source/svhtml/parhtml.cxx     |    4 +--
 sw/source/filter/html/htmlform.cxx    |    4 +--
 sw/source/filter/html/swhtml.cxx      |    4 +--
 sw/source/ui/misc/redlndlg.cxx        |    6 ++---
 tools/source/generic/config.cxx       |    8 +++----
 tools/source/stream/stream.cxx        |   37 ++++++++++++++++------------------
 vcl/source/app/dbggui.cxx             |    6 ++---
 vcl/source/control/edit.cxx           |    4 +--
 vcl/source/gdi/outdev3.cxx            |   12 +++++------
 vcl/source/gdi/pdfwriter_impl.cxx     |    2 -
 vcl/source/window/status.cxx          |    2 -
 17 files changed, 62 insertions(+), 66 deletions(-)

New commits:
commit 86b73eeef4350f0bf29c8ff3c71abb86fc1f6572
Author: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Date:   Thu May 2 08:22:00 2013 -0300

    fdo#63154: Remove _CL and _LF from solar.h
    
    And use RTL_CHAR_{CR,LF} from rtl/string.h
    
    Conflicts:
    
    	vcl/source/app/dbggui.cxx
    
    Change-Id: I05b0325006845e48eb5483485a9042aa7b0cd22a
    Reviewed-on: https://gerrit.libreoffice.org/3740
    Reviewed-by: Andras Timar <atimar at suse.com>
    Tested-by: Andras Timar <atimar at suse.com>

diff --git a/include/tools/solar.h b/include/tools/solar.h
index 7ef683f..0645a61 100644
--- a/include/tools/solar.h
+++ b/include/tools/solar.h
@@ -107,9 +107,6 @@ inline void     DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[7
 #endif
 #endif
 
-#define _LF     ((char)0x0A)
-#define _CR     ((char)0x0D)
-
 // pragmas
 
 #if defined _MSC_VER
diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx
index c044ec1..e0ca0be 100644
--- a/sc/source/core/tool/formularesult.cxx
+++ b/sc/source/core/tool/formularesult.cxx
@@ -261,7 +261,7 @@ bool ScFormulaResult::IsMultiline() const
     if (meMultiline == MULTILINE_UNKNOWN)
     {
         const String& rStr = GetString();
-        if (rStr.Len() && rStr.Search( _LF ) != STRING_NOTFOUND)
+        if (rStr.Len() && rStr.Search( '\n' ) != STRING_NOTFOUND)
             const_cast<ScFormulaResult*>(this)->meMultiline = MULTILINE_TRUE;
         else
             const_cast<ScFormulaResult*>(this)->meMultiline = MULTILINE_FALSE;
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 889c56c..9cf0b3e 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1159,7 +1159,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
         else
         {
             String aStr = aStrOut;
-            xub_StrLen nPos = aStr.Search( _LF );
+            xub_StrLen nPos = aStr.Search( '\n' );
             if ( nPos == STRING_NOTFOUND )
             {
                 OUT_STR( aStrOut );
@@ -1174,7 +1174,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
                     TAG_ON( OOO_STRING_SVTOOLS_HTML_linebreak );
                     nStartPos = nPos + 1;
                 }
-                while( ( nPos = aStr.Search( _LF, nStartPos ) ) != STRING_NOTFOUND );
+                while( ( nPos = aStr.Search( '\n', nStartPos ) ) != STRING_NOTFOUND );
                 String aSingleLine( aStr, nStartPos, aStr.Len() - nStartPos );
                 OUT_STR( aSingleLine );
             }
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 4c5fcdc..d09294f 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1759,7 +1759,7 @@ sal_Int32 getTextSepPos(
     sal_Int32 nPos = rStr.indexOf(rTextSep);
     rNeedQuotes = rAsciiOpt.bQuoteAllText || (nPos >= 0) ||
         (rStr.indexOf(rFieldSep) >= 0) ||
-        (rStr.indexOf(sal_Unicode(_LF)) >= 0);
+        (rStr.indexOf(sal_Unicode('\n')) >= 0);
     return nPos;
 }
 
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index b6c4869..434a447 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -528,13 +528,13 @@ void ScImportExport::WriteUnicodeOrByteEndl( SvStream& rStrm )
         switch ( rStrm.GetLineDelimiter() )
         {
             case LINEEND_CR :
-                rStrm << sal_Unicode(_CR);
+                rStrm << sal_Unicode('\r');
             break;
             case LINEEND_LF :
-                rStrm << sal_Unicode(_LF);
+                rStrm << sal_Unicode('\n');
             break;
             default:
-                rStrm << sal_Unicode(_CR) << sal_Unicode(_LF);
+                rStrm << sal_Unicode('\r') << sal_Unicode('\n');
         }
     }
     else
@@ -727,7 +727,7 @@ static void lcl_UnescapeSylk( String & rString, SylkVersion eVersion )
     else
         rString.SearchAndReplaceAll( OUString(DOUBLE_DOUBLEQUOTE), OUString('"') );
 
-    rString.SearchAndReplaceAll( OUString(SYLK_LF), OUString(_LF) );
+    rString.SearchAndReplaceAll( OUString(SYLK_LF), OUString('\n') );
 }
 
 static const sal_Unicode* lcl_ScanSylkString( const sal_Unicode* p,
@@ -1196,7 +1196,7 @@ static bool lcl_PutString(
     }
 
     // Standard or date not determined -> SetString / EditCell
-    if( rStr.Search( _LF ) == STRING_NOTFOUND )
+    if( rStr.Search( '\n' ) == STRING_NOTFOUND )
     {
         ScSetStringParam aParam;
         aParam.mpNumFormatter = pFormatter;
@@ -1571,8 +1571,8 @@ bool hasLineBreaksOrSeps( const String& rStr, sal_Unicode cSep )
 
         switch (c)
         {
-            case _LF:
-            case _CR:
+            case '\n':
+            case '\r':
                 // line break found.
                 return true;
             default:
@@ -1626,11 +1626,11 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
                         {
                             aCell = pDoc->GetString(nCol, nRow, nStartTab);
 
-                            bool bMultiLineText = ( aCell.Search( _LF ) != STRING_NOTFOUND );
+                            bool bMultiLineText = ( aCell.Search( '\n' ) != STRING_NOTFOUND );
                             if( bMultiLineText )
                             {
                                 if( mExportTextOptions.meNewlineConversion == ScExportTextOptions::ToSpace )
-                                    aCell.SearchAndReplaceAll( _LF, ' ' );
+                                    aCell.SearchAndReplaceAll( '\n', ' ' );
                                 else if ( mExportTextOptions.meNewlineConversion == ScExportTextOptions::ToSystem && bConvertLF )
                                     aCell = convertLineEnd(aCell, GetSystemLineEnd());
                             }
@@ -1658,11 +1658,11 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
                     {
                         aCell = pDoc->GetString(nCol, nRow, nStartTab);
 
-                        bool bMultiLineText = ( aCell.Search( _LF ) != STRING_NOTFOUND );
+                        bool bMultiLineText = ( aCell.Search( '\n' ) != STRING_NOTFOUND );
                         if( bMultiLineText )
                         {
                             if( mExportTextOptions.meNewlineConversion == ScExportTextOptions::ToSpace )
-                                aCell.SearchAndReplaceAll( _LF, ' ' );
+                                aCell.SearchAndReplaceAll( '\n', ' ' );
                             else if ( mExportTextOptions.meNewlineConversion == ScExportTextOptions::ToSystem && bConvertLF )
                                 aCell = convertLineEnd(aCell, GetSystemLineEnd());
                         }
@@ -2003,7 +2003,7 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm )
                 case CELLTYPE_EDIT:
                 hasstring:
                     aCellStr = pDoc->GetString(nCol, nRow, aRange.aStart.Tab());
-                    aCellStr.SearchAndReplaceAll( OUString(_LF), OUString(SYLK_LF) );
+                    aCellStr.SearchAndReplaceAll( OUString('\n'), OUString(SYLK_LF) );
 
                     aBufStr.AssignAscii(RTL_CONSTASCII_STRINGPARAM( "C;X" ));
                     aBufStr += OUString::number( c );
@@ -2397,7 +2397,7 @@ OUString ReadCsvLine( SvStream &rStream, bool bEmbeddedLineBreak,
                 nLastOffset = aStr.getLength();
                 OUString aNext;
                 rStream.ReadUniOrByteStringLine(aNext, rStream.GetStreamCharSet(), nArbitraryLineLengthLimit);
-                aStr += OUString( sal_Unicode(_LF));
+                aStr += OUString( sal_Unicode('\n'));
                 aStr += aNext;
             }
         }
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index 7e7ab2e..88abad2 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -227,7 +227,7 @@ void SfxStringListItem::SetString( const XubString& rStr )
     XubString aStr(convertLineEnd(rStr, LINEEND_CR));
     do
     {
-        nDelimPos = aStr.Search( _CR, nStart );
+        nDelimPos = aStr.Search( '\r', nStart );
         xub_StrLen nLen;
         if ( nDelimPos == STRING_NOTFOUND )
             nLen = 0xffff;
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index d8d5080..6e2fce3 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -2107,8 +2107,8 @@ bool HTMLParser::ParseMetaOptionsImpl(
     if ( bHTTPEquiv || HTML_META_DESCRIPTION != nAction )
     {
         // if it is not a Description, remove CRs and LFs from CONTENT
-        aContent = comphelper::string::remove(aContent, _CR);
-        aContent = comphelper::string::remove(aContent, _LF);
+        aContent = comphelper::string::remove(aContent, '\r');
+        aContent = comphelper::string::remove(aContent, '\n');
     }
     else
     {
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 093d58b..ec85ccc 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1680,8 +1680,8 @@ void SwHTMLParser::InsertInput()
     // geloescht werden.
     if( !bKeepCRLFInValue )
     {
-        sText = comphelper::string::remove(sText, _CR);
-        sText = comphelper::string::remove(sText, _LF);
+        sText = comphelper::string::remove(sText, '\r');
+        sText = comphelper::string::remove(sText, '\n');
     }
 
     const uno::Reference< XMultiServiceFactory > & rServiceFactory =
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index dc08ad5..3f0f679 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -5422,8 +5422,8 @@ void SwHTMLParser::ParseMoreMetaOptions()
         aName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_content_script_type ) )
         return;
 
-    aContent = comphelper::string::remove(aContent, _CR);
-    aContent = comphelper::string::remove(aContent, _LF);
+    aContent = comphelper::string::remove(aContent, '\r');
+    aContent = comphelper::string::remove(aContent, '\n');
 
     if( aName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_sdendnote ) )
     {
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index cf9ff24..7885bb4 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -434,7 +434,7 @@ void SwRedlineAcceptDlg::Activate()
             {
                 // update only comment
                 String sComment(rRedln.GetComment());
-                sComment.SearchAndReplaceAll((sal_Unicode)_LF,(sal_Unicode)' ');
+                sComment.SearchAndReplaceAll((sal_Unicode)'\n',(sal_Unicode)' ');
                 pTable->SetEntryText(sComment, pParent->pTLBParent, 3);
             }
             pParent->sComment = rRedln.GetComment();
@@ -721,7 +721,7 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
         pRedlineParent->pData    = pRedlineData;
         pRedlineParent->pNext    = 0;
         String sComment(rRedln.GetComment());
-        sComment.SearchAndReplaceAll((sal_Unicode)_LF,(sal_Unicode)' ');
+        sComment.SearchAndReplaceAll((sal_Unicode)'\n',(sal_Unicode)' ');
         pRedlineParent->sComment = sComment;
         aRedlineParents.insert(aRedlineParents.begin() + i, pRedlineParent);
 
@@ -1108,7 +1108,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl)
 
                             // insert / change comment
                             pSh->SetRedlineComment(sMsg);
-                            sMsg.SearchAndReplaceAll((sal_Unicode)_LF,(sal_Unicode)' ');
+                            sMsg.SearchAndReplaceAll((sal_Unicode)'\n',(sal_Unicode)' ');
                             pTable->SetEntryText(sMsg, pEntry, 3);
                         }
 
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 854136e..317fe1d 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -376,18 +376,18 @@ static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uIntPtr&
 
     if ( pData->meLineEnd == LINEEND_CR )
     {
-        aLineEndBuf[0] = _CR;
+        aLineEndBuf[0] = '\r';
         nLineEndLen = 1;
     }
     else if ( pData->meLineEnd == LINEEND_LF )
     {
-        aLineEndBuf[0] = _LF;
+        aLineEndBuf[0] = '\n';
         nLineEndLen = 1;
     }
     else
     {
-        aLineEndBuf[0] = _CR;
-        aLineEndBuf[1] = _LF;
+        aLineEndBuf[0] = '\r';
+        aLineEndBuf[1] = '\n';
         nLineEndLen = 2;
     }
 
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 6d58253..e802566 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -28,7 +28,6 @@
 
 #include "boost/static_assert.hpp"
 
-#include <tools/solar.h>
 #include <osl/endian.h>
 
 #include <comphelper/string.hxx>
@@ -1641,11 +1640,11 @@ SvStream& endl( SvStream& rStr )
 {
     LineEnd eDelim = rStr.GetLineDelimiter();
     if ( eDelim == LINEEND_CR )
-        rStr << _CR;
+        rStr << '\r';
     else if( eDelim == LINEEND_LF )
-        rStr << _LF;
+        rStr << '\n';
     else
-        rStr << _CR << _LF;
+        rStr << '\r' << '\n';
     return rStr;
 }
 
@@ -1654,13 +1653,13 @@ SvStream& endlu( SvStream& rStrm )
     switch ( rStrm.GetLineDelimiter() )
     {
         case LINEEND_CR :
-            rStrm << sal_Unicode(_CR);
+            rStrm << sal_Unicode('\r');
         break;
         case LINEEND_LF :
-            rStrm << sal_Unicode(_LF);
+            rStrm << sal_Unicode('\n');
         break;
         default:
-            rStrm << sal_Unicode(_CR) << sal_Unicode(_LF);
+            rStrm << sal_Unicode('\r') << sal_Unicode('\n');
     }
     return rStrm;
 }
@@ -2035,7 +2034,7 @@ namespace
         while (i < nStrLen)
         {
             // \r or \n causes linebreak
-            if ( (rIn[i] == _CR) || (rIn[i] == _LF) )
+            if ( (rIn[i] == '\r') || (rIn[i] == '\n') )
             {
                 nLen = nLen + nLineEndLen;
 
@@ -2043,17 +2042,17 @@ namespace
                 if ( !bConvert )
                 {
                     // Muessen wir Konvertieren
-                    if ( ((eLineEnd != LINEEND_LF) && (rIn[i] == _LF)) ||
-                         ((eLineEnd == LINEEND_CRLF) && (rIn[i+1] != _LF)) ||
+                    if ( ((eLineEnd != LINEEND_LF) && (rIn[i] == '\n')) ||
+                         ((eLineEnd == LINEEND_CRLF) && (rIn[i+1] != '\n')) ||
                          ((eLineEnd == LINEEND_LF) &&
-                          ((rIn[i] == _CR) || (rIn[i+1] == _CR))) ||
+                          ((rIn[i] == '\r') || (rIn[i+1] == '\r'))) ||
                          ((eLineEnd == LINEEND_CR) &&
-                          ((rIn[i] == _LF) || (rIn[i+1] == _LF))) )
+                          ((rIn[i] == '\n') || (rIn[i+1] == '\n'))) )
                         bConvert = true;
                 }
 
                 // skip char if \r\n oder \n\r
-                if ( ((rIn[i+1] == _CR) || (rIn[i+1] == _LF)) &&
+                if ( ((rIn[i+1] == '\r') || (rIn[i+1] == '\n')) &&
                      (rIn[i] != rIn[i+1]) )
                     ++i;
             }
@@ -2071,22 +2070,22 @@ namespace
         while (i < nStrLen)
         {
             // \r or \n causes linebreak
-            if ( (rIn[i] == _CR) || (rIn[i] == _LF) )
+            if ( (rIn[i] == '\r') || (rIn[i] == '\n') )
             {
                 if ( eLineEnd == LINEEND_CRLF )
                 {
-                    aNewData.append(_CR);
-                    aNewData.append(_LF);
+                    aNewData.append('\r');
+                    aNewData.append('\n');
                 }
                 else
                 {
                     if ( eLineEnd == LINEEND_CR )
-                        aNewData.append(_CR);
+                        aNewData.append('\r');
                     else
-                        aNewData.append(_LF);
+                        aNewData.append('\n');
                 }
 
-                if ( ((rIn[i+1] == _CR) || (rIn[i+1] == _LF)) &&
+                if ( ((rIn[i+1] == '\r') || (rIn[i+1] == '\n')) &&
                      (rIn[i] != rIn[i+1]) )
                     ++i;
             }
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index a61cdea..1180180 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -618,7 +618,7 @@ long DbgWindow::PreNotify( NotifyEvent& rNEvt )
 void DbgWindow::InsertLine( const OUString& rLine )
 {
     OUString   aStr = convertLineEnd(rLine, LINEEND_LF);
-    sal_Int32  nPos = aStr.indexOf( _LF );
+    sal_Int32  nPos = aStr.indexOf( '\n' );
     bool       bFirstEntry = true;
     while ( nPos != -1 )
     {
@@ -631,7 +631,7 @@ void DbgWindow::InsertLine( const OUString& rLine )
         bFirstEntry = false;
 
         aStr = aStr.replaceAt( 0, nPos+1, "" );
-        nPos = aStr.indexOf( _LF );
+        nPos = aStr.indexOf( '\n' );
     }
     if ( maLstBox.GetEntryCount() >= DBGWIN_MAXLINES )
         maLstBox.RemoveEntry( 0 );
@@ -1144,7 +1144,7 @@ void DbgInfoDialog::SetInfoText( const OUString& rStr )
     sal_Int32 nFoundIndex;
     do
     {
-        nFoundIndex = aStr.indexOf( _LF, nStrIndex );
+        nFoundIndex = aStr.indexOf( '\n', nStrIndex );
         OUString aTextParagraph = aStr.copy( nStrIndex, nFoundIndex-nStrIndex );
         if ( mbHelpText )
         {
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index db44060..69d9e17 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -809,8 +809,8 @@ void Edit::ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uI
 OUString Edit::ImplGetValidString( const OUString& rString ) const
 {
     OUString aValidString( rString );
-    aValidString = comphelper::string::remove(aValidString, _LF);
-    aValidString = comphelper::string::remove(aValidString, _CR);
+    aValidString = comphelper::string::remove(aValidString, '\n');
+    aValidString = comphelper::string::remove(aValidString, '\r');
     aValidString = aValidString.replace('\t', ' ');
     return aValidString;
 }
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index ffd140c..573b472 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 6eefa3c..20e6a5b 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;
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index cb82af6..2daf441 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -364,7 +364,7 @@ void StatusBar::ImplDrawText( sal_Bool bOffScreen, long nOldTextWidth )
     {
         // Position ermitteln
         XubString aStr = GetText();
-        sal_uInt16 nPos = aStr.Search( _LF );
+        sal_uInt16 nPos = aStr.Search( '\n' );
         if ( nPos != STRING_NOTFOUND )
             aStr.Erase( nPos );
 


More information about the Libreoffice-commits mailing list