summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-11-29 18:22:38 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-11-30 01:13:22 +0100
commite4a9632f383fe731c4d721aeabe779efd830105c (patch)
tree381a082470343a0f3106f6983a3d4bb72352b352 /sc/source
parente429686c7797ce6e219dd8cd2dbbb1b59f8909da (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')
-rw-r--r--sc/source/filter/excel/xecontent.cxx22
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