summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kuznetsov <antilibreoffice@gmail.com>2018-10-23 22:47:11 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-11-10 09:39:20 +0100
commitb907fe59a819aaba75518dc1534eb71d9e378b74 (patch)
tree34c983f4f28fe241113bbaaaa8b7317a820be052
parente3560f4770487c8d38463fb4a9a63325abc385f9 (diff)
tdf#117719: add Minimum and Maximum labels to color bar CF
Change-Id: I38d02cb771363f5012a18f41c5bf5c6fe728bd49 Reviewed-on: https://gerrit.libreoffice.org/62261 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx21
-rw-r--r--sc/source/ui/inc/condformatdlgentry.hxx9
-rw-r--r--sc/uiconfig/scalc/ui/conditionalentry.ui55
3 files changed, 69 insertions, 16 deletions
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index f22bc754c47f..2483ebe29d7f 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -739,6 +739,11 @@ ScColorScale2FrmtEntry::ScColorScale2FrmtEntry( vcl::Window* pParent, ScDocument
get(maEdMax, "edcolscalemax");
get(maLbColMin, "lbcolmin");
get(maLbColMax, "lbcolmax");
+ get(maFtMin, "Label_minimum");
+ get(maFtMax, "Label_maximum");
+
+ maFtMin->Show();
+ maFtMax->Show();
// remove the automatic entry from color scales
maLbEntryTypeMin->RemoveEntry(0);
@@ -780,6 +785,8 @@ void ScColorScale2FrmtEntry::dispose()
maEdMax.clear();
maLbColMin.clear();
maLbColMax.clear();
+ maFtMin.clear();
+ maFtMax.clear();
ScCondFrmtEntry::dispose();
}
@@ -878,6 +885,11 @@ ScColorScale3FrmtEntry::ScColorScale3FrmtEntry( vcl::Window* pParent, ScDocument
get(maLbColMin, "lbcolmin");
get(maLbColMiddle, "lbcolmiddle");
get(maLbColMax, "lbcolmax");
+ get(maFtMin, "Label_minimum");
+ get(maFtMax, "Label_maximum");
+
+ maFtMin->Show();
+ maFtMax->Show();
// remove the automatic entry from color scales
maLbEntryTypeMin->RemoveEntry(0);
@@ -929,6 +941,8 @@ void ScColorScale3FrmtEntry::dispose()
maLbColMin.clear();
maLbColMiddle.clear();
maLbColMax.clear();
+ maFtMin.clear();
+ maFtMax.clear();
ScCondFrmtEntry::dispose();
}
@@ -1090,6 +1104,11 @@ ScDataBarFrmtEntry::ScDataBarFrmtEntry( vcl::Window* pParent, ScDocument* pDoc,
get(maEdDataBarMin, "edcolscalemin");
get(maEdDataBarMax, "edcolscalemax");
get(maBtOptions, "options");
+ get(maFtMin, "Label_minimum");
+ get(maFtMax, "Label_maximum");
+
+ maFtMin->Show();
+ maFtMax->Show();
maLbColorFormat->SelectEntryPos(2);
maLbType->SelectEntryPos(0);
@@ -1124,6 +1143,8 @@ void ScDataBarFrmtEntry::dispose()
maEdDataBarMin.clear();
maEdDataBarMax.clear();
maBtOptions.clear();
+ maFtMin.clear();
+ maFtMax.clear();
ScCondFrmtEntry::dispose();
}
diff --git a/sc/source/ui/inc/condformatdlgentry.hxx b/sc/source/ui/inc/condformatdlgentry.hxx
index 0f9773039c9b..f949b0c15b38 100644
--- a/sc/source/ui/inc/condformatdlgentry.hxx
+++ b/sc/source/ui/inc/condformatdlgentry.hxx
@@ -180,6 +180,9 @@ class ScColorScale2FrmtEntry : public ScCondFrmtEntry
VclPtr<SvxColorListBox> maLbColMin;
VclPtr<SvxColorListBox> maLbColMax;
+ VclPtr<FixedText> maFtMin;
+ VclPtr<FixedText> maFtMax;
+
ScFormatEntry* createColorscaleEntry() const;
virtual OUString GetExpressionString() override;
@@ -215,6 +218,9 @@ class ScColorScale3FrmtEntry : public ScCondFrmtEntry
VclPtr<SvxColorListBox> maLbColMiddle;
VclPtr<SvxColorListBox> maLbColMax;
+ VclPtr<FixedText> maFtMin;
+ VclPtr<FixedText> maFtMax;
+
ScFormatEntry* createColorscaleEntry() const;
virtual OUString GetExpressionString() override;
@@ -244,6 +250,9 @@ class ScDataBarFrmtEntry : public ScCondFrmtEntry
VclPtr<PushButton> maBtOptions;
+ VclPtr<FixedText> maFtMin;
+ VclPtr<FixedText> maFtMax;
+
std::unique_ptr<ScDataBarFormatData> mpDataBarData;
ScFormatEntry* createDatabarEntry() const;
diff --git a/sc/uiconfig/scalc/ui/conditionalentry.ui b/sc/uiconfig/scalc/ui/conditionalentry.ui
index 46509e5d6274..7d440ed77ea7 100644
--- a/sc/uiconfig/scalc/ui/conditionalentry.ui
+++ b/sc/uiconfig/scalc/ui/conditionalentry.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sc">
<requires lib="gtk+" version="3.18"/>
<requires lib="LibreOffice" version="1.0"/>
@@ -76,7 +76,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -88,7 +88,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -99,7 +99,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">4</property>
<property name="width">3</property>
</packing>
</child>
@@ -109,7 +109,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">5</property>
</packing>
</child>
<child>
@@ -118,7 +118,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">5</property>
</packing>
</child>
<child>
@@ -127,7 +127,7 @@
</object>
<packing>
<property name="left_attach">2</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">5</property>
</packing>
</child>
<child>
@@ -136,7 +136,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">6</property>
</packing>
</child>
<child>
@@ -145,7 +145,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">6</property>
</packing>
</child>
<child>
@@ -154,7 +154,7 @@
</object>
<packing>
<property name="left_attach">2</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">6</property>
</packing>
</child>
<child>
@@ -165,7 +165,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">6</property>
+ <property name="top_attach">7</property>
</packing>
</child>
<child>
@@ -183,7 +183,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -201,7 +201,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -219,7 +219,7 @@
</object>
<packing>
<property name="left_attach">2</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -230,7 +230,7 @@
</object>
<packing>
<property name="left_attach">2</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -419,11 +419,34 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">7</property>
+ <property name="top_attach">8</property>
<property name="width">3</property>
</packing>
</child>
<child>
+ <object class="GtkLabel" id="Label_minimum">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="conditionalentry|Label_minimum">Minimum</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="Label_maximum">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="conditionalentry|Label_maximum">Maximum</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
<placeholder/>
</child>
<child>