summaryrefslogtreecommitdiff
path: root/io/source/TextInputStream/TextInputStream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'io/source/TextInputStream/TextInputStream.cxx')
-rw-r--r--io/source/TextInputStream/TextInputStream.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/io/source/TextInputStream/TextInputStream.cxx b/io/source/TextInputStream/TextInputStream.cxx
index c1ae805571f6..d90f30976ec8 100644
--- a/io/source/TextInputStream/TextInputStream.cxx
+++ b/io/source/TextInputStream/TextInputStream.cxx
@@ -19,6 +19,7 @@
#include <string.h>
+#include <comphelper/sequence.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -167,8 +168,6 @@ OUString OTextInputStream::implReadString( const Sequence< sal_Unicode >& Delimi
bool bFound = false;
bool bFoundFirstLineEndChar = false;
sal_Unicode cFirstLineEndChar = 0;
- const sal_Unicode* pDelims = Delimiters.getConstArray();
- const sal_Int32 nDelimCount = Delimiters.getLength();
while( !bFound )
{
// Still characters available?
@@ -213,18 +212,12 @@ OUString OTextInputStream::implReadString( const Sequence< sal_Unicode >& Delimi
cFirstLineEndChar = c;
}
}
- else
+ else if( comphelper::findValue(Delimiters, c) != -1 )
{
- for( sal_Int32 i = 0 ; i < nDelimCount ; i++ )
- {
- if( c == pDelims[ i ] )
- {
- bFound = true;
- nCopyLen = nBufferReadPos;
- if( bRemoveDelimiter )
- nCopyLen--;
- }
- }
+ bFound = true;
+ nCopyLen = nBufferReadPos;
+ if( bRemoveDelimiter )
+ nCopyLen--;
}
}