diff options
-rw-r--r-- | sc/source/filter/oox/condformatbuffer.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index b37fc07deeb8..eb0f1dc77d6a 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -823,7 +823,15 @@ void CondFormatRule::finalizeImport() CellAddress aBaseAddr = mrCondFormat.getRanges().getBaseAddress(); ScAddress aPos; ScUnoConversion::FillScAddress( aPos, aBaseAddr ); - if( (eOperator != SC_COND_NONE) && !maModel.maFormulas.empty() ) + + 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_NONE) && !maModel.maFormulas.empty() ) { ScDocument& rDoc = getScDocument(); boost::scoped_ptr<ScTokenArray> pTokenArray2; @@ -861,13 +869,6 @@ 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(); |