summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Behrens <bubli@bubli.org>2015-02-02 21:31:03 +0100
committerKatarina Behrens <bubli@bubli.org>2015-02-03 12:02:56 +0100
commit552f754ab9d9f0fedd73d5328618315ec774d3d6 (patch)
treee35c0c8514f1eddf88b8d39e6705d4c2c7045fa0
parentdbe269df9c7d48b59c42b1a2c246d6dbc4b77dc6 (diff)
tdf#87356: Enable switching between gradient and solid fill data bar
Could use a checkbox instead of listbox here, since our LB has only 2 values, but with listbox it'll be easier to add more fill types in the future Change-Id: I67cd94b9b49b06434e4a22788b032425c3728e7f
-rw-r--r--sc/source/ui/condformat/colorformat.cxx4
-rw-r--r--sc/source/ui/inc/colorformat.hxx1
-rw-r--r--sc/uiconfig/scalc/ui/databaroptions.ui29
3 files changed, 33 insertions, 1 deletions
diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx
index 623c994ccb39..8b02134f072d 100644
--- a/sc/source/ui/condformat/colorformat.cxx
+++ b/sc/source/ui/condformat/colorformat.cxx
@@ -70,6 +70,7 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(vcl::Window* pWindow, const ScDataBar
get( mpBtnCancel, "cancel" );
get( mpLbPos, "positive_colour" );
get( mpLbNeg, "negative_colour" );
+ get( mpLbFillType, "fill_type" );
get( mpLbTypeMin, "min" );
get( mpLbTypeMax, "max" );
get( mpLbAxisPos, "axis_pos" );
@@ -82,6 +83,7 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(vcl::Window* pWindow, const ScDataBar
Init();
mpLbPos->SelectEntry( rData.maPositiveColor );
+ mpLbFillType->SelectEntryPos( rData.mbGradient ? 1 : 0 );
if(rData.mpNegativeColor)
mpLbNeg->SelectEntry( *rData.mpNegativeColor );
@@ -176,7 +178,7 @@ ScDataBarFormatData* ScDataBarSettingsDlg::GetData()
ScDataBarFormatData* pData = new ScDataBarFormatData();
pData->maPositiveColor = mpLbPos->GetSelectEntryColor();
pData->mpNegativeColor.reset(new Color(mpLbNeg->GetSelectEntryColor()));
- pData->mbGradient = true; //FIXME
+ pData->mbGradient = ( mpLbFillType->GetSelectEntryPos() == 1 );
pData->mpUpperLimit.reset(new ScColorScaleEntry());
pData->mpLowerLimit.reset(new ScColorScaleEntry());
pData->maAxisColor = mpLbAxisCol->GetSelectEntryColor();
diff --git a/sc/source/ui/inc/colorformat.hxx b/sc/source/ui/inc/colorformat.hxx
index f5c1c159877a..23f036c280c9 100644
--- a/sc/source/ui/inc/colorformat.hxx
+++ b/sc/source/ui/inc/colorformat.hxx
@@ -32,6 +32,7 @@ private:
ListBox* mpLbTypeMin;
ListBox* mpLbTypeMax;
+ ListBox* mpLbFillType;
ListBox* mpLbAxisPos;
Edit* mpEdMin;
diff --git a/sc/uiconfig/scalc/ui/databaroptions.ui b/sc/uiconfig/scalc/ui/databaroptions.ui
index 3a617f5ccf04..e653d1ec47a9 100644
--- a/sc/uiconfig/scalc/ui/databaroptions.ui
+++ b/sc/uiconfig/scalc/ui/databaroptions.ui
@@ -281,6 +281,35 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Fill:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="fill_type">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <items>
+ <item translatable="yes">Color</item>
+ <item translatable="yes">Gradient</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
</object>
</child>
</object>