summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-04-13 01:43:59 +0200
committerEike Rathke <erack@redhat.com>2012-04-13 01:43:59 +0200
commit9f77876a96911a7138aa2081077a03abd34a9cf4 (patch)
tree6c52179daeaf4df2640646d2726c6e907a6b98e2
parent2a2d04dff73b85185f7da59fea173a8bffb7c190 (diff)
two additional places to raise data truncated error for fdo#48516
-rw-r--r--sc/source/ui/docshell/impex.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 6227c3aa7631..f33a0d7f5499 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -606,7 +606,7 @@ enum DoubledQuoteMode
};
static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString,
- sal_Unicode cStr, DoubledQuoteMode eMode )
+ sal_Unicode cStr, DoubledQuoteMode eMode, bool& rbOverflowCell )
{
p++; //! jump over opening quote
bool bCont;
@@ -637,9 +637,7 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString,
{
// first part
if (!lcl_appendLineData( rString, p0, p-1))
- {
- /* TODO: warning at UI, data truncated */
- }
+ rbOverflowCell = true;
}
p0 = ++p; // text of next part starts here
break;
@@ -656,9 +654,7 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString,
if ( p0 < p )
{
if (!lcl_appendLineData( rString, p0, ((*p || *(p-1) == cStr) ? p-1 : p)))
- {
- /* TODO: warning at UI, data truncated */
- }
+ rbOverflowCell = true;
}
} while ( bCont );
return p;
@@ -847,7 +843,7 @@ bool ScImportExport::Text2Doc( SvStream& rStrm )
aCell.Erase();
if( *p == cStr )
{
- p = lcl_ScanString( p, aCell, cStr, DQM_KEEP );
+ p = lcl_ScanString( p, aCell, cStr, DQM_KEEP, bOverflowCell );
while( *p && *p != cSep )
p++;
if( *p )
@@ -1449,7 +1445,7 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p
{
rbIsQuoted = true;
const sal_Unicode* p1;
- p1 = p = lcl_ScanString( p, rField, cStr, DQM_ESCAPE );
+ p1 = p = lcl_ScanString( p, rField, cStr, DQM_ESCAPE, rbOverflowCell );
while ( *p && !ScGlobal::UnicodeStrChr( pSeps, *p ) )
p++;
// Append remaining unquoted and undelimited data (dirty, dirty) to