diff options
author | Eike Rathke <erack@redhat.com> | 2012-04-10 18:30:07 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-04-10 19:32:09 +0200 |
commit | 8cd05e9cf1152b21528c6f1a5bda3d949dc49791 (patch) | |
tree | 0f37b5ff5447c3d6088b64a01d75e4801cdab847 /sc/source/ui/dbgui/asciiopt.cxx | |
parent | bf0629e09d176555aaa10f60061b206103cc0295 (diff) |
resolved fdo#48501 enable line size >64k in SvStream::Read*Line()
CSV and other text formats may come with line sizes >64k that so far were
truncated due to limitations in ByteString/UniString/String, even if one line
consists of several fields that each are <64k.
Introduced additional SvStream methods that read into rtl::OString and
rtl::OUString and let SvStream::ReadUniOrByteStringLine() fill solely an
rtl::OUString.
Made Calc CSV import use those.
Diffstat (limited to 'sc/source/ui/dbgui/asciiopt.cxx')
-rw-r--r-- | sc/source/ui/dbgui/asciiopt.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx index 60e0db4c185a..0b6ce50e4527 100644 --- a/sc/source/ui/dbgui/asciiopt.cxx +++ b/sc/source/ui/dbgui/asciiopt.cxx @@ -81,7 +81,7 @@ ScAsciiOptions::ScAsciiOptions(const ScAsciiOptions& rOpt) : { if (nInfoCount) { - pColStart = new xub_StrLen[nInfoCount]; + pColStart = new sal_Int32[nInfoCount]; pColFormat = new sal_uInt8[nInfoCount]; for (sal_uInt16 i=0; i<nInfoCount; i++) { @@ -104,7 +104,7 @@ ScAsciiOptions::~ScAsciiOptions() } -void ScAsciiOptions::SetColInfo( sal_uInt16 nCount, const xub_StrLen* pStart, const sal_uInt8* pFormat ) +void ScAsciiOptions::SetColInfo( sal_uInt16 nCount, const sal_Int32* pStart, const sal_uInt8* pFormat ) { delete[] pColStart; delete[] pColFormat; @@ -113,7 +113,7 @@ void ScAsciiOptions::SetColInfo( sal_uInt16 nCount, const xub_StrLen* pStart, co if (nInfoCount) { - pColStart = new xub_StrLen[nInfoCount]; + pColStart = new sal_Int32[nInfoCount]; pColFormat = new sal_uInt8[nInfoCount]; for (sal_uInt16 i=0; i<nInfoCount; i++) { @@ -139,7 +139,7 @@ void ScAsciiOptions::SetColumnInfo( const ScCsvExpDataVec& rDataVec ) nInfoCount = static_cast< sal_uInt16 >( rDataVec.size() ); if( nInfoCount ) { - pColStart = new xub_StrLen[ nInfoCount ]; + pColStart = new sal_Int32[ nInfoCount ]; pColFormat = new sal_uInt8[ nInfoCount ]; for( sal_uInt16 nIx = 0; nIx < nInfoCount; ++nIx ) { @@ -276,11 +276,11 @@ void ScAsciiOptions::ReadFromString( const String& rString ) nInfoCount = nSub / 2; if (nInfoCount) { - pColStart = new xub_StrLen[nInfoCount]; + pColStart = new sal_Int32[nInfoCount]; pColFormat = new sal_uInt8[nInfoCount]; for (sal_uInt16 nInfo=0; nInfo<nInfoCount; nInfo++) { - pColStart[nInfo] = (xub_StrLen) aToken.GetToken( 2*nInfo, '/' ).ToInt32(); + pColStart[nInfo] = (sal_Int32) aToken.GetToken( 2*nInfo, '/' ).ToInt32(); pColFormat[nInfo] = (sal_uInt8) aToken.GetToken( 2*nInfo+1, '/' ).ToInt32(); } } |