summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-05-02 08:22:00 -0300
committerAndras Timar <atimar@suse.com>2013-05-09 09:49:15 +0000
commit86b73eeef4350f0bf29c8ff3c71abb86fc1f6572 (patch)
tree12d4f449ef82eaa27cef064a7d2aee95d5588bb0 /tools/source
parent596c3b459d2e1976ac4ac4e10f152c6353e79e36 (diff)
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@suse.com> Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/generic/config.cxx8
-rw-r--r--tools/source/stream/stream.cxx37
2 files changed, 22 insertions, 23 deletions
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 854136ef284f..317fe1da8b42 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 6d5825330c3c..e80256652e40 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;
}