From 6318254d63ef5c62bbd504c063791c611d6bd1e5 Mon Sep 17 00:00:00 2001 From: Katarina Machalkova Date: Wed, 23 Mar 2011 13:22:51 +0100 Subject: Calc xlsx export row limit++ (bnc#504623, fdo#32106) re-introducing the ability to export sheets with more than 65k rows which disappeared with shared bin+OOXML filter transition --- sc/source/filter/excel/xestream.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sc/source/filter/excel/xestream.cxx') diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 89eca3871186..b54b3bfe4bd2 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -810,8 +810,9 @@ static ScAddress lcl_ToAddress( const XclAddress& rAddress ) // For some reason, ScRange::Format() returns omits row numbers if // the row is >= MAXROW or the column is >= MAXCOL, and Excel doesn't // like "A:IV" (i.e. no row numbers). Prevent this. - aAddress.SetRow( std::min( rAddress.mnRow, MAXROW-1 ) ); - aAddress.SetCol( static_cast(std::min( rAddress.mnCol, MAXCOL-1 )) ); + // KOHEI: Find out if the above comment is still true. + aAddress.SetRow( std::min( rAddress.mnRow, MAXROW ) ); + aAddress.SetCol( static_cast(std::min( rAddress.mnCol, MAXCOL )) ); return aAddress; } @@ -1120,6 +1121,11 @@ bool XclExpXmlStream::exportDocument() throw() XclExpRootData aData( EXC_BIFF8, *pShell->GetMedium (), rStorage, *pDoc, RTL_TEXTENCODING_DONTKNOW ); aData.meOutput = EXC_OUTPUT_XML_2007; + aData.maXclMaxPos.Set( EXC_MAXCOL_XML_2007, EXC_MAXROW_XML_2007, EXC_MAXTAB_XML_2007 ); + aData.maMaxPos.SetCol( ::std::min( aData.maScMaxPos.Col(), aData.maXclMaxPos.Col() ) ); + aData.maMaxPos.SetRow( ::std::min( aData.maScMaxPos.Row(), aData.maXclMaxPos.Row() ) ); + aData.maMaxPos.SetTab( ::std::min( aData.maScMaxPos.Tab(), aData.maXclMaxPos.Tab() ) ); + XclExpRoot aRoot( aData ); mpRoot = &aRoot; -- cgit