[PATCH] Added SvStream::ReadLine( rtl::OString& )
Christina Rossmanith
ChrRossmanith at web.de
Wed Jun 29 13:56:28 PDT 2011
---
tools/inc/tools/stream.hxx | 2 ++
tools/source/stream/stream.cxx | 10 ++++++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 4273583..b83b6f2 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -34,6 +34,7 @@
#include <tools/errinf.hxx>
#include <tools/ref.hxx>
#include <tools/rtti.hxx>
+#include <rtl/string.hxx>
class FileCopier;
class StreamData;
@@ -445,6 +446,7 @@ public:
sal_Bool ReadCString( String& rStr ) { return ReadCString( rStr, GetStreamCharSet()); }
sal_Bool ReadLine( ByteString& rStr );
+ sal_Bool ReadLine( rtl::OString& rStr );
sal_Bool WriteLine( const ByteString& rStr );
sal_Bool WriteLines( const ByteString& rStr );
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 11a1cb3..041c0b1 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -43,6 +43,7 @@
#include <tools/solar.h>
+
#define SWAPNIBBLES(c) \
unsigned char nSwapTmp=c; \
nSwapTmp <<= 4; \
@@ -733,6 +734,15 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
return bEnd;
}
+sal_Bool SvStream::ReadLine( rtl::OString& rStr )
+{
+ ByteString aFoo;
+ sal_Bool ret;
+ ret = ReadLine(aFoo);
+ rStr = aFoo;
+ return ret;
+}
+
sal_Bool SvStream::ReadUniStringLine( String& rStr )
{
sal_Unicode buf[256+1];
--
1.7.4.1
--------------030000040803000805020609--
More information about the LibreOffice
mailing list