Lines Matching refs:seq
41 sal_Int32 XMLFile2UTFConverter::readAndConvert( Sequence<sal_Int8> &seq , sal_Int32 nMaxToRead ) in readAndConvert() argument
59 nRead = m_in->readSomeBytes( seq , nMaxToRead ); in readAndConvert()
70 sal_Int32 nLength = seq.getLength(); in readAndConvert()
71 seq.realloc( seqStart.getLength() + nLength ); in readAndConvert()
73 memmove (seq.getArray() + seqStart.getLength(), in readAndConvert()
74 seq.getConstArray(), in readAndConvert()
76 memcpy (seq.getArray(), in readAndConvert()
82 if( ! isEncodingRecognizable( seq ) ) in readAndConvert()
85 seqStart = seq; in readAndConvert()
90 if( scanForEncoding( seq ) || m_sEncoding.getLength() ) { in readAndConvert()
94 nRead = seq.getLength(); in readAndConvert()
102 Sequence<sal_Unicode> seqUnicode = m_pText2Unicode->convert( seq ); in readAndConvert()
103 seq = m_pUnicode2Text->convert( seqUnicode.getConstArray(), seqUnicode.getLength() ); in readAndConvert()
113 removeEncoding( seq ); in readAndConvert()
115 nRead = seq.getLength(); in readAndConvert()
133 void XMLFile2UTFConverter::removeEncoding( Sequence<sal_Int8> &seq ) in removeEncoding() argument
135 const sal_Int8 *pSource = seq.getArray(); in removeEncoding()
140 OString str( (sal_Char * ) pSource , seq.getLength() ); in removeEncoding()
167 memmove( &( seq.getArray()[nFound] ) , in removeEncoding()
168 &( seq.getArray()[nStop+1]) , in removeEncoding()
169 seq.getLength() - nStop -1); in removeEncoding()
170 seq.realloc( seq.getLength() - ( nStop+1 - nFound ) ); in removeEncoding()
178 sal_Bool XMLFile2UTFConverter::isEncodingRecognizable( const Sequence< sal_Int8 > &seq) in isEncodingRecognizable() argument
180 const sal_Int8 *pSource = seq.getConstArray(); in isEncodingRecognizable()
183 if( seq.getLength() < 8 ) { in isEncodingRecognizable()
207 for( sal_Int32 i = 0; i < seq.getLength() ; i ++ ) in isEncodingRecognizable()
222 sal_Bool XMLFile2UTFConverter::scanForEncoding( Sequence< sal_Int8 > &seq ) in scanForEncoding() argument
224 const sal_uInt8 *pSource = reinterpret_cast<const sal_uInt8*>( seq.getConstArray() ); in scanForEncoding()
227 if( seq.getLength() < 4 ) { in scanForEncoding()
236 OString str( (const sal_Char *) pSource , seq.getLength() ); in scanForEncoding()
283 seq.realloc( seq.getLength() + 2 ); in scanForEncoding()
284 memmove( &( seq.getArray()[2] ) , seq.getArray() , seq.getLength() - 2 ); in scanForEncoding()
285 ((sal_uInt8*)seq.getArray())[0] = 0xFE; in scanForEncoding()
286 ((sal_uInt8*)seq.getArray())[1] = 0xFF; in scanForEncoding()
294 seq.realloc( seq.getLength() + 2 ); in scanForEncoding()
295 memmove( &( seq.getArray()[2] ) , seq.getArray() , seq.getLength() - 2 ); in scanForEncoding()
296 ((sal_uInt8*)seq.getArray())[0] = 0xFF; in scanForEncoding()
297 ((sal_uInt8*)seq.getArray())[1] = 0xFE; in scanForEncoding()
307 memmove( seq.getArray(), &( seq.getArray()[3] ), seq.getLength()-3 ); in scanForEncoding()
308 seq.realloc( seq.getLength() - 3 ); in scanForEncoding()