diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-12 23:26:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-13 09:06:00 +0000 |
commit | 20b750064598697c022974e07a7a9bf0452cfd95 (patch) | |
tree | a35403bd0ee6f52429625833ee08186c6a3bdbbe /tools | |
parent | 5ac8641b12055ac612b81edc0699b5b546606d67 (diff) |
noone checks the return value of ReadCsvLine
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/stream.hxx | 5 | ||||
-rw-r--r-- | tools/source/stream/stream.cxx | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index 2accc440a1c7..df9491085dbd 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -464,8 +464,7 @@ public: field may also be escaped with a preceding backslash. Normally, quotes are escaped by doubling them. - @return - sal_True if no stream error. + check Stream::good() to detect IO problems during read @ATTENTION Note that the string returned may be truncated even inside @@ -483,7 +482,7 @@ public: characters will be spoiled, and a subsequent ReadCsvLine() may start under false preconditions. */ - sal_Bool ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak, + void ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak, const String& rFieldSeparators, sal_Unicode cFieldQuote, sal_Bool bAllowBackslashEscape = sal_False); diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 0fb9ca0b4ab9..8c0efb66c6f2 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1037,7 +1037,7 @@ inline const sal_Unicode* lcl_UnicodeStrChr( const sal_Unicode* pStr, return 0; } -sal_Bool SvStream::ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak, +void SvStream::ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak, const String& rFieldSeparators, sal_Unicode cFieldQuote, sal_Bool bAllowBackslashEscape) { @@ -1102,7 +1102,6 @@ sal_Bool SvStream::ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak, } } } - return nError == SVSTREAM_OK; } /************************************************************************* |