[Libreoffice-commits] core.git: 2 commits - sc/source sc/uiconfig
Katarina Behrens
bubli at bubli.org
Tue Feb 3 03:04:25 PST 2015
sc/source/filter/excel/xeextlst.cxx | 3 +++
sc/source/filter/inc/xeextlst.hxx | 1 +
sc/source/ui/condformat/colorformat.cxx | 4 +++-
sc/source/ui/inc/colorformat.hxx | 1 +
sc/uiconfig/scalc/ui/databaroptions.ui | 29 +++++++++++++++++++++++++++++
5 files changed, 37 insertions(+), 1 deletion(-)
New commits:
commit d52ac7508ca87f5acb16dc0539d1814915847925
Author: Katarina Behrens <bubli at bubli.org>
Date: Mon Feb 2 21:38:32 2015 +0100
Related tdf#87356: export data bar [non-]gradient to OOXML
Change-Id: Ibdbad2f8b5471698337fb7838dadd6188b1add7d
diff --git a/sc/source/filter/excel/xeextlst.cxx b/sc/source/filter/excel/xeextlst.cxx
index bb96e27..9015672 100644
--- a/sc/source/filter/excel/xeextlst.cxx
+++ b/sc/source/filter/excel/xeextlst.cxx
@@ -14,6 +14,7 @@
#include "xename.hxx"
#include "xecontent.hxx"
#include "tokenarray.hxx"
+#include <oox/export/utils.hxx>
using namespace ::oox;
@@ -122,6 +123,7 @@ XclExpExtDataBar::XclExpExtDataBar( const XclExpRoot& rRoot, const ScDataBarForm
mpAxisColor.reset( new XclExpExtAxisColor( rFormatData.maAxisColor ) );
meAxisPosition = rFormatData.meAxisPosition;
+ mbGradient = rFormatData.mbGradient;
}
namespace {
@@ -149,6 +151,7 @@ void XclExpExtDataBar::SaveXml( XclExpXmlStream& rStrm )
XML_minLength, OString::number(0).getStr(),
XML_maxLength, OString::number(100).getStr(),
XML_axisPosition, getAxisPosition(meAxisPosition),
+ XML_gradient, BS(mbGradient),
FSEND );
mpLowerLimit->SaveXml( rStrm );
diff --git a/sc/source/filter/inc/xeextlst.hxx b/sc/source/filter/inc/xeextlst.hxx
index da1b9a4..dcf09c1 100644
--- a/sc/source/filter/inc/xeextlst.hxx
+++ b/sc/source/filter/inc/xeextlst.hxx
@@ -77,6 +77,7 @@ public:
private:
databar::ScAxisPosition meAxisPosition;
+ bool mbGradient;
boost::scoped_ptr<XclExpExtCfvo> mpLowerLimit;
boost::scoped_ptr<XclExpExtCfvo> mpUpperLimit;
commit 552f754ab9d9f0fedd73d5328618315ec774d3d6
Author: Katarina Behrens <bubli at bubli.org>
Date: Mon Feb 2 21:31:03 2015 +0100
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
diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx
index 623c994..8b02134 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 f5c1c15..23f036c 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 3a617f5..e653d1e 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>
More information about the Libreoffice-commits
mailing list