Kaydet (Commit) e2f062ef authored tarafından Caolán McNamara's avatar Caolán McNamara

force users of horrific ReadUniOrByteStringLine to provide the charset

üst b2b318cc
......@@ -452,7 +452,7 @@ bool DifParser::ReadNextLine( String& rStr )
{
if( aLookAheadLine.Len() == 0 )
{
return rIn.ReadUniOrByteStringLine( rStr );
return rIn.ReadUniOrByteStringLine( rStr, rIn.GetStreamCharSet() );
}
else
{
......@@ -470,7 +470,7 @@ bool DifParser::LookAhead()
bool bValidStructure = false;
OSL_ENSURE( aLookAheadLine.Len() == 0, "*DifParser::LookAhead(): LookAhead called twice in a row" );
rIn.ReadUniOrByteStringLine( aLookAheadLine );
rIn.ReadUniOrByteStringLine( aLookAheadLine, rIn.GetStreamCharSet() );
pAktBuffer = aLookAheadLine.GetBuffer();
......
......@@ -788,7 +788,7 @@ sal_Bool ScImportExport::Text2Doc( SvStream& rStrm )
rStrm.Seek( nOldPos );
for( ;; )
{
rStrm.ReadUniOrByteStringLine( aLine );
rStrm.ReadUniOrByteStringLine( aLine, rStrm.GetStreamCharSet() );
if( rStrm.IsEof() )
break;
SCCOL nCol = nStartCol;
......
......@@ -416,8 +416,6 @@ public:
/// Read a line of Unicode if eSrcCharSet==RTL_TEXTENCODING_UNICODE,
/// otherwise read a line of Bytecode and convert from eSrcCharSet
sal_Bool ReadUniOrByteStringLine( String& rStr, rtl_TextEncoding eSrcCharSet );
sal_Bool ReadUniOrByteStringLine( String& rStr )
{ return ReadUniOrByteStringLine( rStr, GetStreamCharSet() ); }
/// Write a sequence of Unicode characters
sal_Bool WriteUnicodeText( const String& rStr );
/// Write a sequence of Unicode characters if eDestCharSet==RTL_TEXTENCODING_UNICODE,
......
......@@ -1041,7 +1041,7 @@ sal_Bool SvStream::ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak,
const String& rFieldSeparators, sal_Unicode cFieldQuote,
sal_Bool bAllowBackslashEscape)
{
ReadUniOrByteStringLine( rStr);
ReadUniOrByteStringLine(rStr, GetStreamCharSet());
if (bEmbeddedLineBreak)
{
......@@ -1096,7 +1096,7 @@ sal_Bool SvStream::ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak,
{
nLastOffset = rStr.Len();
String aNext;
ReadUniOrByteStringLine( aNext);
ReadUniOrByteStringLine(aNext, GetStreamCharSet());
rStr += sal_Unicode(_LF);
rStr += aNext;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment