summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2015-07-28 17:34:20 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2015-07-29 15:46:11 +0000
commit2d4223e32628d12b9b256b532819e6cced79178e (patch)
tree870d9b70e66c473d7e0c89d36b96573e34b9597b /chart2/source
parent93d301a287141013c28556570d67ffc9d3286b2a (diff)
Some (mostly HIG) tweaks to chart data series panel
Additional tweak: use 'Data series %1' as frame label, substitute %1 by real series name Change-Id: Id5bee4c2e52ccd98fa40649ec539b3efdee55962 Reviewed-on: https://gerrit.libreoffice.org/17387 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/controller/sidebar/ChartSeriesPanel.cxx10
-rw-r--r--chart2/source/controller/sidebar/ChartSeriesPanel.hxx3
2 files changed, 11 insertions, 2 deletions
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 644766d4ac69..85336ff5cb59 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -302,9 +302,11 @@ ChartSeriesPanel::ChartSeriesPanel(
get(mpRBPrimaryAxis, "radiobutton_primary_axis");
get(mpRBSecondaryAxis, "radiobutton_secondary_axis");
+ get(mpBoxLabelPlacement, "datalabel_box");
get(mpLBLabelPlacement, "comboboxtext_label");
get(mpFTSeriesName, "label_series_name");
+ get(mpFTSeriesTemplate, "label_series_tmpl");
Initialize();
}
@@ -330,9 +332,11 @@ void ChartSeriesPanel::dispose()
mpRBPrimaryAxis.clear();
mpRBSecondaryAxis.clear();
+ mpBoxLabelPlacement.clear();
mpLBLabelPlacement.clear();
mpFTSeriesName.clear();
+ mpFTSeriesTemplate.clear();
PanelLayout::dispose();
}
@@ -374,10 +378,12 @@ void ChartSeriesPanel::updateData()
mpRBPrimaryAxis->Check(bPrimaryAxis);
mpRBSecondaryAxis->Check(!bPrimaryAxis);
- mpLBLabelPlacement->Enable(bLabelVisible);
+ mpBoxLabelPlacement->Enable(bLabelVisible);
mpLBLabelPlacement->SelectEntryPos(getDataLabelPlacement(mxModel, aCID));
- mpFTSeriesName->SetText(getSeriesLabel(mxModel, aCID));
+ OUString aFrameLabel = mpFTSeriesTemplate->GetText();
+ aFrameLabel = aFrameLabel.replaceFirst("%1", getSeriesLabel(mxModel, aCID));
+ mpFTSeriesName->SetText(aFrameLabel);
}
VclPtr<vcl::Window> ChartSeriesPanel::Create (
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
index 156bbc779bd0..d125c2faa351 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -23,6 +23,7 @@
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
#include <sfx2/sidebar/SidebarModelUpdate.hxx>
#include <svx/sidebar/PanelLayout.hxx>
+#include <vcl/layout.hxx>
#include "ChartSidebarModifyListener.hxx"
#include "ChartSidebarSelectionListener.hxx"
@@ -91,9 +92,11 @@ private:
VclPtr<RadioButton> mpRBPrimaryAxis;
VclPtr<RadioButton> mpRBSecondaryAxis;
+ VclPtr<VclHBox> mpBoxLabelPlacement;
VclPtr<ListBox> mpLBLabelPlacement;
VclPtr<FixedText> mpFTSeriesName;
+ VclPtr<FixedText> mpFTSeriesTemplate;
css::uno::Reference<css::frame::XFrame> mxFrame;