From 7ae4abd2936c707eda8c151c8223ff1d5bae3943 Mon Sep 17 00:00:00 2001 From: Christina Rossmanith Date: Wed, 29 Jun 2011 22:56:28 +0200 Subject: [PATCH] Added SvStream::ReadLine( rtl::OString& ) --- tools/inc/tools/stream.hxx | 2 ++ tools/source/stream/stream.cxx | 10 ++++++++++ 2 files changed, 12 insertions(+) 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 #include #include +#include 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 + #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];