diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-06-24 22:11:41 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-06-25 00:48:01 +0200 |
commit | adc4c53082c2fa1634897bd279afd6b5ba2e16da (patch) | |
tree | f0c445e11d63340044d259249ceb5058ac81d672 | |
parent | 9a906437fc4f1c20a1420009cfa5d9fceacc51a4 (diff) |
only show dialog elements if entry is not collapsed
Change-Id: Id85e7b2360c2630c894ce7e4e9ee505810cefe76
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 75a955f3b29a..f0f677cb5f59 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -459,6 +459,10 @@ void ScCondFrmtEntry::SwitchToType( ScCondFormatEntryType eType ) maCondText.append(getExpression(maLbCondType.GetSelectEntryPos())); maFtCondition.SetText(maCondText.makeStringAndClear()); maFtCondition.Show(); + maLbType.Hide(); + HideCondElements(); + HideColorScaleElements(); + HideDataBarElements(); } break; default: @@ -466,6 +470,7 @@ void ScCondFrmtEntry::SwitchToType( ScCondFormatEntryType eType ) maLbType.Show(); maFtCondition.SetText(rtl::OUString("")); maFtCondition.Hide(); + maLbType.Show(); break; } } @@ -609,6 +614,21 @@ void ScCondFrmtEntry::SetFormulaType() void ScCondFrmtEntry::Select() { SetControlForeground(Color(COL_RED)); + switch(meType) + { + case CONDITION: + SetCondType(); + break; + case COLORSCALE: + SetColorScaleType(); + break; + case DATABAR: + SetDataBarType(); + break; + case FORMULA: + SetFormulaType(); + break; + } SwitchToType(meType); mbActive = true; SetHeight(); @@ -1045,6 +1065,10 @@ IMPL_LINK_NOARG( ScCondFormatList, AddBtnHdl ) { ScCondFrmtEntry* pNewEntry = new ScCondFrmtEntry(this, mpDoc); maEntries.push_back( pNewEntry ); + for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) + { + itr->Deselect(); + } pNewEntry->Select(); RecalcAll(); return 0; |