From 851a92bd022c48c5cc5e2f9943ce550167be124b Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sun, 13 May 2012 08:30:17 +0200 Subject: [PATCH] correctly export formulas in conditional formats to xlsx Change-Id: I534fb55b735f47124cd9820ba0a986315e263112 --- sc/source/filter/excel/xecontent.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index d8a839177c93..9bf323e7cd1d 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -821,6 +821,7 @@ const char* GetOperatorString(ScConditionMode eMode, bool& bFrmla2) pRet = "uniqueValues"; break; case SC_COND_DIRECT: + pRet = "expression"; case SC_COND_NONE: default: pRet = ""; @@ -850,9 +851,13 @@ void XclExpCFImpl::SaveXml( XclExpXmlStream& rStrm ) FSEND ); rWorksheet->startElement( XML_formula, FSEND ); rWorksheet->write(XclXmlUtils::ToOUString( GetRoot().GetDoc(), mrFormatEntry.GetValidSrcPos(), mrFormatEntry.CreateTokenArry( 0 ) )); - if (bFmla2) - rWorksheet->write(XclXmlUtils::ToOUString( GetRoot().GetDoc(), mrFormatEntry.GetValidSrcPos(), mrFormatEntry.CreateTokenArry( 1 ) )); rWorksheet->endElement( XML_formula ); + if (bFmla2) + { + rWorksheet->startElement( XML_formula, FSEND ); + rWorksheet->write(XclXmlUtils::ToOUString( GetRoot().GetDoc(), mrFormatEntry.GetValidSrcPos(), mrFormatEntry.CreateTokenArry( 1 ) )); + rWorksheet->endElement( XML_formula ); + } // OOXTODO: XML_extLst rWorksheet->endElement( XML_cfRule ); }