summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChristina Rossmanith <ChrRossmanith@web.de>2011-06-29 22:56:28 +0200
committerChristina Rossmanith <ChrRossmanith@web.de>2011-07-05 21:57:25 +0200
commit7ae4abd2936c707eda8c151c8223ff1d5bae3943 (patch)
treee7aea68558d4c4e69217a5c154f810918a4e584a /tools
parent1123974f67b317ee14d426b45afc74b73b98310b (diff)
Added SvStream::ReadLine( rtl::OString& )
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/stream.hxx2
-rw-r--r--tools/source/stream/stream.cxx10
2 files changed, 12 insertions, 0 deletions
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 0e5094561734..fc1a96c2285f 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;
@@ -403,6 +404,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 bf0c2f49b24c..0cd38bf90365 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; \
@@ -719,6 +720,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];