summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-07-15 18:07:52 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-07-16 08:15:19 +0200
commit209f0824338e7e1882373116d052d1a701fac6e6 (patch)
tree7aa45e940d80edf69e87d79b7a1c00c4838909a0 /chart2
parentc296eec2927cb2eb5959f6de0ceee66cc4295e83 (diff)
disable Z axis boxes for non-3D charts
Change-Id: I0a651dbed939be572e06e3389fa024cafc214854
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/sidebar/ChartElementsPanel.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 4cfccf7c19c6..3e3aed5eee68 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -37,6 +37,7 @@
#include "TitleHelper.hxx"
#include "ChartModelHelper.hxx"
#include "AxisHelper.hxx"
+#include "DiagramHelper.hxx"
#include "ChartModel.hxx"
@@ -287,6 +288,8 @@ void ChartElementsPanel::Initialize()
void ChartElementsPanel::updateData()
{
+ Reference< chart2::XDiagram > xDiagram(ChartModelHelper::findDiagram(mxModel));
+ sal_Int32 nDimension = DiagramHelper::getDimension(xDiagram);
SolarMutexGuard aGuard;
mpCBLegend->Check(isLegendVisible(mxModel));
@@ -304,6 +307,12 @@ void ChartElementsPanel::updateData()
mpCBZAxis->Check(isAxisVisible(mxModel, AxisType::Z_MAIN));
mpCB2ndXAxis->Check(isAxisVisible(mxModel, AxisType::X_SECOND));
mpCB2ndYAxis->Check(isAxisVisible(mxModel, AxisType::Y_SECOND));
+
+ if (nDimension != 3)
+ {
+ mpCBZAxis->Disable();
+ mpCBZAxisTitle->Disable();
+ }
}
VclPtr<vcl::Window> ChartElementsPanel::Create (