summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-11-03 21:56:05 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-11-04 00:27:22 +0100
commit52a6d6f5c9af1e5ad0a884eb221a5429a954d887 (patch)
tree0d94c5e6b583e14a2bab92533c6350c864daacb0
parent947003702ecdf8d093f37a43f669a6b7aee95bbf (diff)
add (no) error cond format import from ooxml
Change-Id: I668a9b843cf281a167ca87d24b717c782bbc1e1b
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx11
1 files changed, 9 insertions, 2 deletions
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();