summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-11-04 00:24:35 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-11-04 00:27:23 +0100
commit13b44426ce1035b2a64ef2b51b9ecaa246e8666d (patch)
tree0902e76860a4e85de2e3b9259a94a4eb8c5f5f94
parent3a6b23a36bbc0fdbfc8cc609c6344dd98e3d3fe5 (diff)
fix ooxml (no) error cond format import
Change-Id: Icb04a12a9db082e1cc64565cb8d31b50963b799e
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx17
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();