summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-09-30 00:04:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-09-30 09:09:27 +0100
commit11cc59815a3eb72fe1d2a50ad4e27d8716cc5642 (patch)
treec5a7437918a3b3634e5bae51494862abbc8cfdce /sc
parentd64707589f8165acd63028af0d6d7d684640666f (diff)
use read_uInt8s_AsOString instead of hand-crafted loop
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 4d3de3b2b568..3e97c5549cda 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -705,15 +705,8 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream )
// get file header
rStr.Seek( 0 );
- const int nTrySize = 80;
- ByteString aHeader;
- for ( int j = 0; j < nTrySize && !rStr.IsEof(); j++ )
- {
- sal_Char c;
- rStr >> c;
- aHeader += c;
- }
- aHeader += '\0';
+ const sal_Size nTrySize = 80;
+ ByteString aHeader = read_uInt8s_AsOString(rStr, nTrySize);
if ( HTMLParser::IsHTMLFormat( aHeader.GetBuffer() ) )
{