summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.co.uk>2017-07-07 16:07:28 +0530
committerTomaž Vajngerl <quikee@gmail.com>2017-07-10 15:39:48 +0200
commitc86be45d343635f2e137b8ea710d87e1a612101d (patch)
tree322906867ff8bd6de635a858e4fe94b688928a33 /chart2/source
parent18909d45977a897cbd921d76d1dde4bf3a466271 (diff)
tdf#108986 : no arrow for "Data" button on pivot chart
Also changed the fill color of "Data" button to a lighter shade to distiguish it from other buttons, for both row and column fields. Added matching testcase in chart2dump.cxx Change-Id: I2ae5da6c3552372f606da41055f1e0663b6f0802 Reviewed-on: https://gerrit.libreoffice.org/39687 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/view/main/ChartView.cxx7
-rw-r--r--chart2/source/view/main/VButton.cxx3
-rw-r--r--chart2/source/view/main/VButton.hxx5
-rw-r--r--chart2/source/view/main/VLegend.cxx3
4 files changed, 16 insertions, 2 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 2629e998f0f9..e6d1b6711ddf 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2540,7 +2540,12 @@ void lcl_createButtons(const uno::Reference<drawing::XShapes>& xPageShapes,
pButton->setCID("FieldButton.Row." + OUString::number(rRowFieldEntry.DimensionIndex));
pButton->setPosition(aNewPosition);
pButton->setSize(aSize);
- if (rRowFieldEntry.HasHiddenMembers)
+ if ( rRowFieldEntry.Name == "Data" )
+ {
+ pButton->setBGColor( 0x00F6F6F6 );
+ pButton->showArrow( false );
+ }
+ else if (rRowFieldEntry.HasHiddenMembers)
pButton->setArrowColor(0x0000FF);
pButton->createShapes(xModelPage);
x += aSize.Width + 100;
diff --git a/chart2/source/view/main/VButton.cxx b/chart2/source/view/main/VButton.cxx
index a8854ac4a951..dfa2f6a19a92 100644
--- a/chart2/source/view/main/VButton.cxx
+++ b/chart2/source/view/main/VButton.cxx
@@ -33,6 +33,7 @@ VButton::VButton()
, m_xShape(nullptr)
, m_bShowArrow(true)
, m_nArrowColor(0x00000000)
+ , m_nBGColor(0x00E6E6E6)
{
}
@@ -109,7 +110,7 @@ void VButton::createShapes(const uno::Reference<beans::XPropertySet>& xTextProp)
tPropertyNameValueMap aTextValueMap;
aTextValueMap["CharHeight"] <<= 10.0f;
- aTextValueMap["FillColor"] <<= sal_Int32(0xe6e6e6);
+ aTextValueMap["FillColor"] <<= m_nBGColor;
aTextValueMap["FillStyle"] <<= drawing::FillStyle_SOLID;
aTextValueMap["LineColor"] <<= sal_Int32(0xcccccc);
aTextValueMap["LineStyle"] <<= drawing::LineStyle_SOLID;
diff --git a/chart2/source/view/main/VButton.hxx b/chart2/source/view/main/VButton.hxx
index e64a1049e726..9af9318cb1f6 100644
--- a/chart2/source/view/main/VButton.hxx
+++ b/chart2/source/view/main/VButton.hxx
@@ -29,6 +29,7 @@ private:
css::awt::Size m_aSize;
bool m_bShowArrow;
sal_Int32 m_nArrowColor;
+ sal_Int32 m_nBGColor;
css::uno::Reference<css::drawing::XShape>
createTriangle(css::awt::Size aSize);
@@ -49,6 +50,10 @@ public:
{
m_nArrowColor = nArrowColor;
}
+ void setBGColor(sal_Int32 nBGColor)
+ {
+ m_nBGColor = nBGColor;
+ }
void setLabel(OUString const & rLabel)
{
m_sLabel = rLabel;
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 98925974aec6..1244fcf66796 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -803,7 +803,10 @@ std::vector<std::shared_ptr<VButton>> lcl_createButtons(
pButton->setPosition(aNewPosition);
pButton->setSize(aSize);
if (sColumnFieldEntry.Name == "Data")
+ {
pButton->showArrow(false);
+ pButton->setBGColor(0x00F6F6F6);
+ }
if (sColumnFieldEntry.HasHiddenMembers)
pButton->setArrowColor(0x0000FF);