diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-06-08 07:16:37 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-06-11 08:01:25 +0200 |
commit | 3d193574ef0143f07eed2df4235f390c747327a4 (patch) | |
tree | 2eef2cd0dd6bac10b619cf0c6ff3d3b6ce9283fa | |
parent | 76f5ca40207448dfb5a7c87ba2c27076e024a50f (diff) |
add data bar ui elements
Change-Id: I3ba7ac39e5339dc42850a15df9b95adf474f8e3a
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 25 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatdlg.hrc | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/condformatdlg.hxx | 7 | ||||
-rw-r--r-- | sc/source/ui/src/condformatdlg.src | 5 |
4 files changed, 37 insertions, 1 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 8d2d634c38d5..2f4675409058 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -109,6 +109,11 @@ ScCondFrmtEntry::ScCondFrmtEntry(Window* pParent, ScDocument* pDoc): maLbColMin( this, ScResId( LB_COL) ), maLbColMiddle( this, ScResId( LB_COL) ), maLbColMax( this, ScResId( LB_COL) ), + maLbDataBarMinType( this, ScResId( LB_TYPE_COL_SCALE ) ), + maLbDataBarMaxType( this, ScResId( LB_TYPE_COL_SCALE ) ), + maEdDataBarMin( this, ScResId( ED_COL_SCALE ) ), + maEdDataBarMax( this, ScResId( ED_COL_SCALE ) ), + maBtOptions( this, ScResId( BTN_OPTIONS ) ), mpDoc(pDoc) { SetControlBackground(GetSettings().GetStyleSettings().GetDialogColor()); @@ -260,13 +265,16 @@ void ScCondFrmtEntry::Init() Point aPointLb = maLbEntryTypeMiddle.GetPosPixel(); Point aPointEd = maEdMiddle.GetPosPixel(); Point aPointCol = maLbColMiddle.GetPosPixel(); + Point aPointEdDataBar = maEdDataBarMin.GetPosPixel(); const long nMovePos = 150; aPointLb.X() += nMovePos; aPointEd.X() += nMovePos; aPointCol.X() += nMovePos; + aPointEdDataBar.X() += 1.5*nMovePos; maLbEntryTypeMiddle.SetPosPixel(aPointLb); maEdMiddle.SetPosPixel(aPointEd); maLbColMiddle.SetPosPixel(aPointCol); + maEdDataBarMin.SetPosPixel(aPointEdDataBar); aPointLb.X() += nMovePos; aPointEd.X() += nMovePos; aPointCol.X() += nMovePos; @@ -485,6 +493,11 @@ void ScCondFrmtEntry::SetColorScaleType() void ScCondFrmtEntry::HideDataBarElements() { maLbColorFormat.Hide(); + maLbDataBarMinType.Hide(); + maLbDataBarMaxType.Hide(); + maEdDataBarMin.Hide(); + maEdDataBarMax.Hide(); + maBtOptions.Hide(); } void ScCondFrmtEntry::SetDataBarType() @@ -493,6 +506,11 @@ void ScCondFrmtEntry::SetDataBarType() HideCondElements(); HideColorScaleElements(); maLbColorFormat.Show(); + maLbDataBarMinType.Show(); + maLbDataBarMaxType.Show(); + maEdDataBarMin.Show(); + maEdDataBarMax.Show(); + maBtOptions.Show(); } void ScCondFrmtEntry::Select() @@ -733,6 +751,13 @@ IMPL_LINK_NOARG(ScCondFrmtEntry, StyleSelectHdl) return 0; } +IMPL_LINK_NOARG( ScCondFrmtEntry, OptionBtnHdl ) +{ + ScDataBarSettingsDlg* pDlg = new ScDataBarSettingsDlg(this); + pDlg->Execute(); + return 0; +} + ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocument* pDoc): Control(pParent, rResId), mbHasScrollBar(false), diff --git a/sc/source/ui/inc/condformatdlg.hrc b/sc/source/ui/inc/condformatdlg.hrc index 27aa1b2b2d44..87f8944243a0 100644 --- a/sc/source/ui/inc/condformatdlg.hrc +++ b/sc/source/ui/inc/condformatdlg.hrc @@ -52,5 +52,6 @@ #define ED_COL_SCALE 28 #define WD_PREVIEW 26 #define LB_COL 27 +#define BTN_OPTIONS 28 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 44b03623c26c..f44e6c875099 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -93,7 +93,12 @@ private: ColorListBox maLbColMax; //data bar ui elements - // + ListBox maLbDataBarMinType; + ListBox maLbDataBarMaxType; + Edit maEdDataBarMin; + Edit maEdDataBarMax; + Button maBtOptions; + // void SwitchToType(ScCondFormatEntryType eType); void SetCondType(); diff --git a/sc/source/ui/src/condformatdlg.src b/sc/source/ui/src/condformatdlg.src index f69b445dfaee..ecac52bf2694 100644 --- a/sc/source/ui/src/condformatdlg.src +++ b/sc/source/ui/src/condformatdlg.src @@ -215,6 +215,11 @@ Control RID_COND_ENTRY DropDown = TRUE; DDExtraWidth = TRUE; }; + Button BTN_OPTIONS + { + Pos = MAP_APPFONT( 120 , 62 ); + Size = MAP_APPFONT( 60, 14 ); + }; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |