summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-08 22:47:55 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-09 06:33:18 +0200
commit7bc0c2bd9edac11d17d2483ec79b845854db3da4 (patch)
treef37f60e373e1a87654807b5dfdfa74c7dc9a02aa /sc
parentee93051d46db4332f779bac9cb2b75850afc98b0 (diff)
handle all kinds of condition entries correctly in the dialog
Change-Id: Ibad8d9000db20819b906e9d97002e1043794adcf
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index e9234e696601..92af3cebb630 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -71,7 +71,19 @@ ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocum
size_t nCount = pFormat->size();
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
{
- maEntries.push_back(new ScConditionFrmtEntry( this, mpDoc, maPos, static_cast<const ScCondFormatEntry*>(pFormat->GetEntry(nIndex) ) ) );
+ const ScFormatEntry* pEntry = pFormat->GetEntry(nIndex);
+ switch(pEntry->GetType())
+ {
+ case condformat::CONDITION:
+ maEntries.push_back(new ScConditionFrmtEntry( this, mpDoc, maPos, static_cast<const ScCondFormatEntry*>( pEntry ) ) );
+ break;
+ case condformat::COLORSCALE:
+ maEntries.push_back(new ScColorScaleFrmtEntry( this, mpDoc, maPos, static_cast<const ScColorScaleFormat*>( pEntry ) ) );
+ break;
+ case condformat::DATABAR:
+ maEntries.push_back(new ScDataBarFrmtEntry( this, mpDoc, maPos, static_cast<const ScDataBarFormat*>( pEntry ) ) );
+ break;
+ }
}
}
else