From 52a6d6f5c9af1e5ad0a884eb221a5429a954d887 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sat, 3 Nov 2012 21:56:05 +0100 Subject: add (no) error cond format import from ooxml Change-Id: I668a9b843cf281a167ca87d24b717c782bbc1e1b --- sc/source/filter/oox/condformatbuffer.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sc') diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 9068ec1b2adb..b37fc07deeb8 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -735,10 +735,10 @@ void CondFormatRule::finalizeImport() aReplaceFormula = "LEN(TRIM(#B))>0"; break; case XML_containsErrors: - aReplaceFormula = "ISERROR(#B)"; + eOperator = SC_COND_ERROR; break; case XML_notContainsErrors: - aReplaceFormula = "NOT(ISERROR(#B))"; + eOperator = SC_COND_NOERROR; break; case XML_top10: if(maModel.mbPercent) @@ -861,6 +861,13 @@ void CondFormatRule::finalizeImport() ScCondFormatEntry* pNewEntry = new ScCondFormatEntry( eOperator, &aTokenArrayEqual, &aTokenArrayDev, &rDoc, aPos, aStyleName ); mpFormat->AddEntry(pNewEntry); } + else if( eOperator == SC_COND_ERROR || eOperator == SC_COND_NOERROR ) + { + ScDocument& rDoc = getScDocument(); + OUString aStyleName = getStyles().createDxfStyle( maModel.mnDxfId ); + ScCondFormatEntry* pNewEntry = new ScCondFormatEntry( eOperator, NULL, NULL, &rDoc, aPos, aStyleName ); + mpFormat->AddEntry(pNewEntry); + } else if( eOperator == SC_COND_DUPLICATE || eOperator == SC_COND_NOTDUPLICATE ) { ScDocument& rDoc = getScDocument(); -- cgit