diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2017-05-01 20:28:59 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2017-05-01 22:25:32 +0200 |
commit | d02d52887678cd3d518c19a235bc443c292b3041 (patch) | |
tree | 3fdee17138c0e0d944e4681ab13af1b0e49b9fbb /chart2 | |
parent | a33201662c7b7b7350d23eb07f5a3d76fd67e8e1 (diff) |
tdf#107145 display applied filters for page field in pivot chart
Add field output description which shows the description of the
filtered output, which can be either "- all -" when nothing is
filtered, "- multiple -" when multiple values are outputted or
the specific value - the only value remaining.
Change-Id: I8fca6050dabba9878e9f3a31e4be7a03e3b87467
Reviewed-on: https://gerrit.libreoffice.org/37125
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index b0f99831c090..ccaa3f868444 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2498,7 +2498,8 @@ void lcl_createButtons(const uno::Reference<drawing::XShapes>& xPageShapes, return; uno::Reference<beans::XPropertySet> xModelPage(rModel.getPageBackground()); - awt::Size aSize(3000, 700); // size of the button + + awt::Size aSize(4000, 700); // size of the button long x = 0; @@ -2511,8 +2512,10 @@ void lcl_createButtons(const uno::Reference<drawing::XShapes>& xPageShapes, std::unique_ptr<VButton> pButton(new VButton); pButton->init(xPageShapes, xShapeFactory); awt::Point aNewPosition = awt::Point(rRemainingSpace.X + x + 100, rRemainingSpace.Y + 100); - pButton->setLabel(rPageFieldEntry.Name); - pButton->setCID("FieldButton.Page." + OUString::number(rPageFieldEntry.DimensionIndex)); + sal_Int32 nDimensionIndex = rPageFieldEntry.DimensionIndex; + OUString aFieldOutputDescription = xPivotTableDataProvider->getFieldOutputDescription(nDimensionIndex); + pButton->setLabel(rPageFieldEntry.Name + " | " + aFieldOutputDescription); + pButton->setCID("FieldButton.Page." + OUString::number(nDimensionIndex)); pButton->setPosition(aNewPosition); pButton->setSize(aSize); if (rPageFieldEntry.HasHiddenMembers) @@ -2525,6 +2528,8 @@ void lcl_createButtons(const uno::Reference<drawing::XShapes>& xPageShapes, rRemainingSpace.Height -= (aSize.Height + 100 + 100); } + aSize = awt::Size(3000, 700); // size of the button + if (xPivotTableDataProvider->getRowFields().hasElements()) { x = 200; |