diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-11-29 18:22:38 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-11-30 01:13:22 +0100 |
commit | e4a9632f383fe731c4d721aeabe779efd830105c (patch) | |
tree | 381a082470343a0f3106f6983a3d4bb72352b352 /sc/source/filter | |
parent | e429686c7797ce6e219dd8cd2dbbb1b59f8909da (diff) |
don't call XLSX methods in XLS export, related fdo#59762
This should fix a huge number of our xls export crashes. I just picked
my test document for the commit message. I suppose that nearly all
reported XLS export crashes are the same issue.
At the same time this should improve the performance of our XLS and XLSX
export a bit.
Change-Id: Id19e2515e75e10527d3af62d671377bec23f99e8
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/excel/xecontent.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index b7d5f3675bac..521d1a95f81e 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -1582,17 +1582,21 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) : 2) List is taken from A1 -> formula is =A1 -> writes tRefNR token Formula compiler supports this by offering two different functions CreateDataValFormula() and CreateListValFormula(). */ - mxTokArr1 = rFmlaComp.CreateFormula( EXC_FMLATYPE_LISTVAL, *xScTokArr ); - msFormula1 = XclXmlUtils::ToOUString( GetCompileFormulaContext(), pValData->GetSrcPos(), + if(GetOutput() == EXC_OUTPUT_BINARY) + mxTokArr1 = rFmlaComp.CreateFormula( EXC_FMLATYPE_LISTVAL, *xScTokArr ); + else + msFormula1 = XclXmlUtils::ToOUString( GetCompileFormulaContext(), pValData->GetSrcPos(), xScTokArr.get()); } } else { // no list validation -> convert the formula - mxTokArr1 = rFmlaComp.CreateFormula( EXC_FMLATYPE_DATAVAL, *xScTokArr ); - msFormula1 = XclXmlUtils::ToOUString( GetCompileFormulaContext(), pValData->GetSrcPos(), - xScTokArr.get()); + if(GetOutput() == EXC_OUTPUT_BINARY) + mxTokArr1 = rFmlaComp.CreateFormula( EXC_FMLATYPE_DATAVAL, *xScTokArr ); + else + msFormula1 = XclXmlUtils::ToOUString( GetCompileFormulaContext(), pValData->GetSrcPos(), + xScTokArr.get()); } } @@ -1600,9 +1604,11 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) : xScTokArr.reset( pValData->CreateTokenArry( 1 ) ); if( xScTokArr.get() ) { - mxTokArr2 = rFmlaComp.CreateFormula( EXC_FMLATYPE_DATAVAL, *xScTokArr ); - msFormula2 = XclXmlUtils::ToOUString( GetCompileFormulaContext(), pValData->GetSrcPos(), - xScTokArr.get()); + if(GetOutput() == EXC_OUTPUT_BINARY) + mxTokArr2 = rFmlaComp.CreateFormula( EXC_FMLATYPE_DATAVAL, *xScTokArr ); + else + msFormula2 = XclXmlUtils::ToOUString( GetCompileFormulaContext(), pValData->GetSrcPos(), + xScTokArr.get()); } } else |