summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-25 12:29:02 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-25 12:30:55 +0200
commit66ea6d9801ea8e214f39a70251e5ccc5f47c315a (patch)
treea40dc07d23496a2ca8d12fd95451eb681b5964a9 /sc
parentee7404c81903896515d5248a0dc4543989f6023c (diff)
only export the supported number of rows/columns, fdo#49582
Change-Id: I51fc4d0a6d9cc09c82268351ad069467bf8acc31
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xetable.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 5656b716199d..150c730f5169 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -2210,6 +2210,12 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot& rRoot ) :
SCROW nLastUsedScRow;
rDoc.GetFormattedAndUsedArea( nScTab, nLastUsedScCol, nLastUsedScRow );
+ if(nLastUsedScCol > nMaxScCol)
+ nLastUsedScCol = nMaxScCol;
+
+ if(nLastUsedScRow > nMaxScRow)
+ nLastUsedScRow = nMaxScRow;
+
ScRange aUsedRange( 0, 0, nScTab, nLastUsedScCol, nLastUsedScRow, nScTab );
GetAddressConverter().ValidateRange( aUsedRange, true );
nLastUsedScCol = aUsedRange.aEnd.Col();