sc/source/core/data/document10.cxx | 7 +++++-- sc/source/filter/excel/xecontent.cxx | 22 ++++++++++++++-------- 2 files changed, 19 insertions(+), 10 deletions(-)
New commits: commit e4a9632f383fe731c4d721aeabe779efd830105c Author: Markus Mohrhard <[email protected]> Date: Sat Nov 29 18:22:38 2014 +0100 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 diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index b7d5f36..521d1a9 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 commit e429686c7797ce6e219dd8cd2dbbb1b59f8909da Author: Markus Mohrhard <[email protected]> Date: Sat Nov 29 20:51:31 2014 +0100 we need to copy the condition format cell for cell, fdo#86253 Change-Id: Ic090e1b9d13780e7e895a85901d3329cc5703688 diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx index c01b264..0ddfbd1 100644 --- a/sc/source/core/data/document10.cxx +++ b/sc/source/core/data/document10.cxx @@ -115,8 +115,11 @@ bool ScDocument::CopyOneCellFromClip( { maTabs[i]->CopyOneCellFromClip(rCxt, nCol1, nRow1, nCol2, nRow2); if (rCxt.getInsertFlag() & IDF_ATTRIB) - maTabs[i]->CopyConditionalFormat(nCol1, nRow1, nCol2, nRow2, nCol1 - aClipRange.aStart.Col(), - nRow1 - aClipRange.aStart.Row(), pSrcTab); + for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow) + { + maTabs[i]->CopyConditionalFormat(nCol1, nRow, nCol2, nRow, nCol1 - aClipRange.aStart.Col(), + nRow - aClipRange.aStart.Row(), pSrcTab); + } } return true; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
