summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-03-12 13:49:19 +0000
committerPetr Mladek <pmladek@suse.cz>2013-03-18 13:52:46 +0000
commitdf77710e8137b2e4ddb60b4ca6919fd37ebe9654 (patch)
treeae219eb530a7e5a1ceeaaa9f16a56a9f741dfc5f
parent9a3b6c579f92b5e10ce1b61aafbe2d8d10333c88 (diff)
fix for fdo#62111 - don't count non-default empty rows as rows to repeat
Change-Id: I075310ef63ab4eb666da2092d4be1c6f8d989b75 Reviewed-on: https://gerrit.libreoffice.org/2681 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org> (cherry picked from commit 6d2a17be89e98c6a7d8c172832c9491ce6c50506) Reviewed-on: https://gerrit.libreoffice.org/2700 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz>
-rw-r--r--sc/source/filter/excel/xetable.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index c44b32c1dcfa..4f5d2e4069e4 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -2052,12 +2052,15 @@ void XclExpRowBuffer::Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt
}
if ( pPrev )
{
- sal_uInt32 nRpt = rRow->GetXclRow() - pPrev->GetXclRow();
- pPrev->SetXclRowRpt( nRpt );
- if ( nRpt > 1 )
- aRepeated.push_back( pPrev );
if ( pPrev->IsDefaultable())
{
+ // if the previous row we processed is not
+ // defaultable then afaict the rows inbetween are
+ // not used ( and not repeatable )
+ sal_uInt32 nRpt = rRow->GetXclRow() - pPrev->GetXclRow();
+ if ( nRpt > 1 )
+ aRepeated.push_back( pPrev );
+ pPrev->SetXclRowRpt( nRpt );
XclExpDefaultRowData aDefData( *pPrev );
size_t& rnDefCount = aDefRowMap[ aDefData ];
rnDefCount += ( pPrev->GetXclRowRpt() - 1 );