[Libreoffice-commits] core.git: 11 commits - chart2/Library_chartcontroller.mk chart2/source chart2/uiconfig chart2/UIConfig_chart2.mk include/sfx2 officecfg/registry sfx2/source

Markus Mohrhard markus.mohrhard at googlemail.com
Thu Jul 16 13:21:34 PDT 2015


 chart2/Library_chartcontroller.mk                               |    2 
 chart2/UIConfig_chart2.mk                                       |    1 
 chart2/source/controller/inc/ChartController.hxx                |    2 
 chart2/source/controller/main/ChartController.cxx               |   30 -
 chart2/source/controller/sidebar/Chart2PanelFactory.cxx         |    3 
 chart2/source/controller/sidebar/ChartElementsPanel.cxx         |   37 -
 chart2/source/controller/sidebar/ChartElementsPanel.hxx         |    7 
 chart2/source/controller/sidebar/ChartSeriesPanel.cxx           |  295 ++++++++++
 chart2/source/controller/sidebar/ChartSeriesPanel.hxx           |   99 +++
 chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx |   42 +
 chart2/source/controller/sidebar/ChartSidebarModifyListener.hxx |   50 +
 chart2/uiconfig/ui/sidebarelements.ui                           |   40 -
 chart2/uiconfig/ui/sidebarseries.ui                             |  156 +++++
 include/sfx2/sidebar/EnumContext.hxx                            |    3 
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu    |  101 ++-
 officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs  |    6 
 sfx2/source/sidebar/EnumContext.cxx                             |    3 
 17 files changed, 781 insertions(+), 96 deletions(-)

New commits:
commit 857bc3094eafaaf69c607222ec9f90e84da07916
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 16 22:12:03 2015 +0200

    handle error bars in series panel
    
    Change-Id: I29558530f775d1fab3dd2fca2e6c03c4717af769

diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index c6f1a9b..b318f59 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -22,6 +22,7 @@
 #include <sfx2/sidebar/ControlFactory.hxx>
 
 #include <com/sun/star/chart2/DataPointLabel.hpp>
+#include <com/sun/star/chart/ErrorBarStyle.hpp>
 
 #include "ChartSeriesPanel.hxx"
 #include "ChartController.hxx"
@@ -39,6 +40,7 @@
 #include "ChartModel.hxx"
 #include "DataSeriesHelper.hxx"
 #include "RegressionCurveHelper.hxx"
+#include "StatisticsHelper.hxx"
 
 using namespace css;
 using namespace css::uno;
@@ -109,6 +111,39 @@ void setTrendlineVisible(css::uno::Reference<css::frame::XModel>
 
 }
 
+bool isErrorBarVisible(css::uno::Reference<css::frame::XModel>
+        xModel, const OUString& rCID, bool bYError)
+{
+    css::uno::Reference< css::chart2::XDataSeries > xSeries(
+        ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+    if (!xSeries.is())
+        return false;
+
+    return StatisticsHelper::hasErrorBars(xSeries, bYError);
+}
+
+void setErrorBarVisible(css::uno::Reference<css::frame::XModel>
+        xModel, const OUString& rCID, bool bYError, bool bVisible)
+{
+    css::uno::Reference< css::chart2::XDataSeries > xSeries(
+        ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+    if (!xSeries.is())
+        return;
+
+    if (bVisible)
+    {
+                StatisticsHelper::addErrorBars( xSeries, comphelper::getProcessComponentContext(),
+                    css::chart::ErrorBarStyle::STANDARD_DEVIATION,
+                    bYError);
+    }
+    else
+    {
+        StatisticsHelper::removeErrorBars( xSeries, bYError );
+    }
+}
+
 }
 
 ChartSeriesPanel::ChartSeriesPanel(
@@ -181,6 +216,8 @@ void ChartSeriesPanel::updateData()
     SolarMutexGuard aGuard;
     mpCBLabel->Check(isDataLabelVisible(mxModel, aCID));
     mpCBTrendline->Check(isTrendlineVisible(mxModel, aCID));
+    mpCBXError->Check(isErrorBarVisible(mxModel, aCID, false));
+    mpCBYError->Check(isErrorBarVisible(mxModel, aCID, true));
 }
 
 VclPtr<vcl::Window> ChartSeriesPanel::Create (
@@ -245,6 +282,10 @@ IMPL_LINK(ChartSeriesPanel, CheckBoxHdl, CheckBox*, pCheckBox)
         setDataLabelVisible(mxModel, aCID, bChecked);
     else if (pCheckBox == mpCBTrendline.get())
         setTrendlineVisible(mxModel, aCID, bChecked);
+    else if (pCheckBox == mpCBXError.get())
+        setErrorBarVisible(mxModel, aCID, false, bChecked);
+    else if (pCheckBox == mpCBYError.get())
+        setErrorBarVisible(mxModel, aCID, true, bChecked);
 
     return 0;
 }
commit c3ad5c110a83e25e9ff00e56d612075755136e3e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 16 22:02:30 2015 +0200

    always update the data when we change selection
    
    Change-Id: Iae62f84401c23415a05fa2c5d1a541b239252aea

diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 054f338..c6f1a9b 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -208,12 +208,6 @@ void ChartSeriesPanel::DataChanged(
 void ChartSeriesPanel::HandleContextChange(
     const ::sfx2::sidebar::EnumContext& rContext)
 {
-    if(maContext == rContext)
-    {
-        // Nothing to do.
-        return;
-    }
-
     maContext = rContext;
     updateData();
 }
commit 4038d2eb47f03e981a61c7de37c2b15da532f9fc
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 16 22:01:57 2015 +0200

    dispose child elements
    
    Change-Id: Ic74e2bb8bf84c7de19ca31b2c7195b96e0eaa230

diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index e93fd06..054f338 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -141,6 +141,11 @@ void ChartSeriesPanel::dispose()
     css::uno::Reference<css::util::XModifyBroadcaster> xBroadcaster(mxModel, css::uno::UNO_QUERY_THROW);
     xBroadcaster->removeModifyListener(mxListener);
 
+    mpCBLabel.clear();
+    mpCBTrendline.clear();
+    mpCBXError.clear();
+    mpCBYError.clear();
+
     PanelLayout::dispose();
 }
 
commit cdddbb70830d399de9bb388f45aeab34210338da
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 16 22:00:26 2015 +0200

    let the series panel also listen to chart changes
    
    Change-Id: I875398d1b020c821319c9c8d9f9b183d49a5004a

diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 598c1d1..e93fd06 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -120,7 +120,8 @@ ChartSeriesPanel::ChartSeriesPanel(
     mxFrame(rxFrame),
     maContext(),
     mpBindings(pBindings),
-    mxModel(pController->getModel())
+    mxModel(pController->getModel()),
+    mxListener(new ChartSidebarModifyListener(this))
 {
     get(mpCBLabel, "checkbutton_label");
     get(mpCBTrendline, "checkbutton_trendline");
@@ -137,12 +138,17 @@ ChartSeriesPanel::~ChartSeriesPanel()
 
 void ChartSeriesPanel::dispose()
 {
+    css::uno::Reference<css::util::XModifyBroadcaster> xBroadcaster(mxModel, css::uno::UNO_QUERY_THROW);
+    xBroadcaster->removeModifyListener(mxListener);
 
     PanelLayout::dispose();
 }
 
 void ChartSeriesPanel::Initialize()
 {
+    css::uno::Reference<css::util::XModifyBroadcaster> xBroadcaster(mxModel, css::uno::UNO_QUERY_THROW);
+    xBroadcaster->addModifyListener(mxListener);
+
     updateData();
 
     Link<> aLink = LINK(this, ChartSeriesPanel, CheckBoxHdl);
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
index f38aa9e..7594e28 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -23,6 +23,8 @@
 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
 #include <svx/sidebar/PanelLayout.hxx>
 
+#include "ChartSidebarModifyListener.hxx"
+
 #include <com/sun/star/util/XModifyListener.hpp>
 
 class FixedText;
@@ -37,7 +39,8 @@ namespace sidebar {
 
 class ChartSeriesPanel : public PanelLayout,
     public ::sfx2::sidebar::IContextChangeReceiver,
-    public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+    public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface,
+    public ChartSidebarModifyListenerParent
 {
 public:
     static VclPtr<vcl::Window> Create(
@@ -67,8 +70,8 @@ public:
     virtual ~ChartSeriesPanel();
     virtual void dispose() SAL_OVERRIDE;
 
-    void updateData();
-    void modelInvalid();
+    virtual void updateData() SAL_OVERRIDE;
+    virtual void modelInvalid() SAL_OVERRIDE;
 
 private:
     //ui controls
commit 0ae9523012269ee2d093f35ecbf58da1d7f13f53
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 16 21:29:20 2015 +0200

    extract the modify listener
    
    Change-Id: Ie191e47b009afc5e3d4655d9b83189540e280dca

diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk
index facaf66..f2d4b28 100644
--- a/chart2/Library_chartcontroller.mk
+++ b/chart2/Library_chartcontroller.mk
@@ -190,6 +190,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
     chart2/source/controller/sidebar/Chart2PanelFactory \
     chart2/source/controller/sidebar/ChartElementsPanel \
     chart2/source/controller/sidebar/ChartSeriesPanel \
+    chart2/source/controller/sidebar/ChartSidebarModifyListener \
 ))
 
 # Runtime dependency for unit-tests
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 42f88db..2dadc78 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -44,6 +44,7 @@
 
 #include "ChartModel.hxx"
 
+
 using namespace css;
 using namespace css::uno;
 using ::sfx2::sidebar::Theme;
@@ -69,42 +70,6 @@ enum class AxisType
     Y_SECOND
 };
 
-class ChartSidebarModifyListener : public cppu::WeakImplHelper1<css::util::XModifyListener>
-{
-public:
-
-    ChartSidebarModifyListener(ChartElementsPanel* pParent);
-    virtual ~ChartSidebarModifyListener();
-
-    virtual void SAL_CALL modified(const css::lang::EventObject& rEvent)
-        throw (::css::uno::RuntimeException, ::std::exception) SAL_OVERRIDE;
-
-    virtual void SAL_CALL disposing(const css::lang::EventObject& rEvent)
-        throw (::css::uno::RuntimeException, ::std::exception) SAL_OVERRIDE;
-
-private:
-    VclPtr<ChartElementsPanel> mpParent;
-};
-
-ChartSidebarModifyListener::ChartSidebarModifyListener(ChartElementsPanel* pParent):
-    mpParent(pParent)
-{
-}
-
-ChartSidebarModifyListener::~ChartSidebarModifyListener()
-{
-}
-
-void ChartSidebarModifyListener::modified(const css::lang::EventObject& /*rEvent*/)
-        throw (::css::uno::RuntimeException, ::std::exception)
-{
-    mpParent->updateData();
-}
-
-void ChartSidebarModifyListener::disposing(const css::lang::EventObject& /*rEvent*/)
-        throw (::css::uno::RuntimeException, ::std::exception)
-{}
-
 ChartModel* getChartModel(css::uno::Reference<css::frame::XModel> xModel)
 {
     ChartModel* pModel = dynamic_cast<ChartModel*>(xModel.get());
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.hxx b/chart2/source/controller/sidebar/ChartElementsPanel.hxx
index 51e7e49..358a8be 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.hxx
@@ -22,6 +22,7 @@
 #include <sfx2/sidebar/ControllerItem.hxx>
 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
 #include <svx/sidebar/PanelLayout.hxx>
+#include "ChartSidebarModifyListener.hxx"
 
 #include <com/sun/star/util/XModifyListener.hpp>
 
@@ -37,7 +38,8 @@ namespace sidebar {
 
 class ChartElementsPanel : public PanelLayout,
     public ::sfx2::sidebar::IContextChangeReceiver,
-    public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+    public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface,
+    public ChartSidebarModifyListenerParent
 {
 public:
     static VclPtr<vcl::Window> Create(
@@ -67,7 +69,8 @@ public:
     virtual ~ChartElementsPanel();
     virtual void dispose() SAL_OVERRIDE;
 
-    void updateData();
+    virtual void updateData() SAL_OVERRIDE;
+    virtual void modelInvalid() SAL_OVERRIDE;
 
 private:
     //ui controls
diff --git a/chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx b/chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx
new file mode 100644
index 0000000..fdf2dc1
--- /dev/null
+++ b/chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ChartSidebarModifyListener.hxx"
+
+namespace chart {
+namespace sidebar {
+
+ChartSidebarModifyListenerParent::~ChartSidebarModifyListenerParent()
+{
+}
+
+ChartSidebarModifyListener::ChartSidebarModifyListener(ChartSidebarModifyListenerParent* pParent):
+    mpParent(pParent)
+{
+}
+
+ChartSidebarModifyListener::~ChartSidebarModifyListener()
+{
+}
+
+void ChartSidebarModifyListener::modified(const css::lang::EventObject& /*rEvent*/)
+        throw (::css::uno::RuntimeException, ::std::exception)
+{
+    mpParent->updateData();
+}
+
+void ChartSidebarModifyListener::disposing(const css::lang::EventObject& /*rEvent*/)
+        throw (::css::uno::RuntimeException, ::std::exception)
+{
+    mpParent->modelInvalid();
+}
+
+} }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/sidebar/ChartSidebarModifyListener.hxx b/chart2/source/controller/sidebar/ChartSidebarModifyListener.hxx
new file mode 100644
index 0000000..5db469e
--- /dev/null
+++ b/chart2/source/controller/sidebar/ChartSidebarModifyListener.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTSIDEBAR_MODIFYLISTENER_HXX
+#define INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTSIDEBAR_MODIFYLISTENER_HXX
+
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <cppuhelper/implbase1.hxx>
+
+namespace chart {
+namespace sidebar {
+
+class ChartSidebarModifyListenerParent
+{
+public:
+    virtual ~ChartSidebarModifyListenerParent();
+
+    virtual void updateData() = 0;
+
+    virtual void modelInvalid() = 0;
+};
+
+class ChartSidebarModifyListener : public cppu::WeakImplHelper1<css::util::XModifyListener>
+{
+public:
+
+    ChartSidebarModifyListener(ChartSidebarModifyListenerParent* pParent);
+    virtual ~ChartSidebarModifyListener();
+
+    virtual void SAL_CALL modified(const css::lang::EventObject& rEvent)
+        throw (::css::uno::RuntimeException, ::std::exception) SAL_OVERRIDE;
+
+    virtual void SAL_CALL disposing(const css::lang::EventObject& rEvent)
+        throw (::css::uno::RuntimeException, ::std::exception) SAL_OVERRIDE;
+
+private:
+    ChartSidebarModifyListenerParent* mpParent;
+};
+
+} }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 329818a7a1e064675b7f840d8455c963d2a773b2
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 16 21:15:31 2015 +0200

    handle trendline checkbox in series panel
    
    Change-Id: I4fc0634ed35c645d2080c667e8ffb90d606612a2

diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 1d21425..598c1d1 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -38,6 +38,7 @@
 
 #include "ChartModel.hxx"
 #include "DataSeriesHelper.hxx"
+#include "RegressionCurveHelper.hxx"
 
 using namespace css;
 using namespace css::uno;
@@ -72,6 +73,42 @@ void setDataLabelVisible(css::uno::Reference<css::frame::XModel> xModel, const O
         DataSeriesHelper::deleteDataLabelsFromSeriesAndAllPoints(xSeries);
 }
 
+bool isTrendlineVisible(css::uno::Reference<css::frame::XModel> xModel,
+        const OUString& rCID)
+{
+    css::uno::Reference< css::chart2::XRegressionCurveContainer > xRegressionCurveContainer(
+        ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+    if (!xRegressionCurveContainer.is())
+        return false;
+
+    return xRegressionCurveContainer->getRegressionCurves().getLength() != 0;
+}
+
+void setTrendlineVisible(css::uno::Reference<css::frame::XModel>
+        xModel, const OUString& rCID, bool bVisible)
+{
+    css::uno::Reference< css::chart2::XRegressionCurveContainer > xRegressionCurveContainer(
+        ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+    if (!xRegressionCurveContainer.is())
+        return;
+
+    if (bVisible)
+    {
+        /* code */
+        uno::Reference< chart2::XRegressionCurve > xCurve =
+            RegressionCurveHelper::addRegressionCurve(
+                    CHREGRESS_LINEAR,
+                    xRegressionCurveContainer,
+                    comphelper::getProcessComponentContext());
+    }
+    else
+        RegressionCurveHelper::removeAllExceptMeanValueLine(
+                xRegressionCurveContainer );
+
+}
+
 }
 
 ChartSeriesPanel::ChartSeriesPanel(
@@ -132,6 +169,7 @@ void ChartSeriesPanel::updateData()
 #endif
     SolarMutexGuard aGuard;
     mpCBLabel->Check(isDataLabelVisible(mxModel, aCID));
+    mpCBTrendline->Check(isTrendlineVisible(mxModel, aCID));
 }
 
 VclPtr<vcl::Window> ChartSeriesPanel::Create (
@@ -200,6 +238,8 @@ IMPL_LINK(ChartSeriesPanel, CheckBoxHdl, CheckBox*, pCheckBox)
 #endif
     if (pCheckBox == mpCBLabel.get())
         setDataLabelVisible(mxModel, aCID, bChecked);
+    else if (pCheckBox == mpCBTrendline.get())
+        setTrendlineVisible(mxModel, aCID, bChecked);
 
     return 0;
 }
commit 71c6ee42d3311b31896e5a408d8f83f4e5d7726e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 16 20:17:37 2015 +0200

    first parts in data series panel
    
    Change-Id: Ia25460e6f57ff6d3c44bae1ddb33a36845ffcdd2

diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 732aefc..1d21425 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -21,6 +21,8 @@
 #include <sfx2/sidebar/Theme.hxx>
 #include <sfx2/sidebar/ControlFactory.hxx>
 
+#include <com/sun/star/chart2/DataPointLabel.hpp>
+
 #include "ChartSeriesPanel.hxx"
 #include "ChartController.hxx"
 #include <sfx2/bindings.hxx>
@@ -35,6 +37,7 @@
 #include <comphelper/processfactory.hxx>
 
 #include "ChartModel.hxx"
+#include "DataSeriesHelper.hxx"
 
 using namespace css;
 using namespace css::uno;
@@ -42,6 +45,35 @@ using ::sfx2::sidebar::Theme;
 
 namespace chart { namespace sidebar {
 
+namespace {
+
+bool isDataLabelVisible(css::uno::Reference<css::frame::XModel> xModel, const OUString& rCID)
+{
+    css::uno::Reference< css::chart2::XDataSeries > xSeries(
+        ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+    if (!xSeries.is())
+        return false;
+
+    return DataSeriesHelper::hasDataLabelsAtSeries(xSeries);
+}
+
+void setDataLabelVisible(css::uno::Reference<css::frame::XModel> xModel, const OUString& rCID, bool bVisible)
+{
+    css::uno::Reference< css::chart2::XDataSeries > xSeries(
+        ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+    if (!xSeries.is())
+        return;
+
+    if (bVisible)
+        DataSeriesHelper::insertDataLabelsToSeriesAndAllPoints(xSeries);
+    else
+        DataSeriesHelper::deleteDataLabelsFromSeriesAndAllPoints(xSeries);
+}
+
+}
+
 ChartSeriesPanel::ChartSeriesPanel(
     vcl::Window* pParent,
     const css::uno::Reference<css::frame::XFrame>& rxFrame,
@@ -53,6 +85,11 @@ ChartSeriesPanel::ChartSeriesPanel(
     mpBindings(pBindings),
     mxModel(pController->getModel())
 {
+    get(mpCBLabel, "checkbutton_label");
+    get(mpCBTrendline, "checkbutton_trendline");
+    get(mpCBXError, "checkbutton_x_error");
+    get(mpCBYError, "checkbutton_y_error");
+
     Initialize();
 }
 
@@ -69,11 +106,32 @@ void ChartSeriesPanel::dispose()
 
 void ChartSeriesPanel::Initialize()
 {
+    updateData();
+
+    Link<> aLink = LINK(this, ChartSeriesPanel, CheckBoxHdl);
+    mpCBLabel->SetClickHdl(aLink);
+    mpCBTrendline->SetClickHdl(aLink);
+    mpCBXError->SetClickHdl(aLink);
+    mpCBYError->SetClickHdl(aLink);
 }
 
 void ChartSeriesPanel::updateData()
 {
+    css::uno::Reference<css::frame::XController> xController(mxModel->getCurrentController());
+    css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(xController, css::uno::UNO_QUERY);
+    if (!xSelectionSupplier.is())
+        return;
+
+    uno::Any aAny = xSelectionSupplier->getSelection();
+    assert(aAny.hasValue());
+    OUString aCID;
+    aAny >>= aCID;
+#ifdef DBG_UTIL
+    ObjectType eType = ObjectIdentifier::getObjectType(aCID);
+    assert(eType == OBJECTTYPE_DATA_SERIES);
+#endif
     SolarMutexGuard aGuard;
+    mpCBLabel->Check(isDataLabelVisible(mxModel, aCID));
 }
 
 VclPtr<vcl::Window> ChartSeriesPanel::Create (
@@ -124,6 +182,28 @@ void ChartSeriesPanel::modelInvalid()
 
 }
 
+IMPL_LINK(ChartSeriesPanel, CheckBoxHdl, CheckBox*, pCheckBox)
+{
+    bool bChecked = pCheckBox->IsChecked();
+    css::uno::Reference<css::frame::XController> xController(mxModel->getCurrentController());
+    css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(xController, css::uno::UNO_QUERY);
+    if (!xSelectionSupplier.is())
+        return 0;
+
+    uno::Any aAny = xSelectionSupplier->getSelection();
+    assert(aAny.hasValue());
+    OUString aCID;
+    aAny >>= aCID;
+#ifdef DBG_UTIL
+    ObjectType eType = ObjectIdentifier::getObjectType(aCID);
+    assert(eType == OBJECTTYPE_DATA_SERIES);
+#endif
+    if (pCheckBox == mpCBLabel.get())
+        setDataLabelVisible(mxModel, aCID, bChecked);
+
+    return 0;
+}
+
 }} // end of namespace ::chart::sidebar
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
index 6fa61e3..f38aa9e 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -72,6 +72,10 @@ public:
 
 private:
     //ui controls
+    VclPtr<CheckBox> mpCBLabel;
+    VclPtr<CheckBox> mpCBTrendline;
+    VclPtr<CheckBox> mpCBXError;
+    VclPtr<CheckBox> mpCBYError;
 
     css::uno::Reference<css::frame::XFrame> mxFrame;
     ::sfx2::sidebar::EnumContext            maContext;
@@ -81,6 +85,8 @@ private:
     css::uno::Reference<css::util::XModifyListener> mxListener;
 
     void Initialize();
+
+    DECL_LINK(CheckBoxHdl, CheckBox*);
 };
 
 } } // end of namespace ::chart::sidebar
commit 75d50b7189bf9fb37d3024fa5765dfb22ca6fce6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 16 18:44:23 2015 +0200

    generate correct sidebar context strings for charts
    
    Change-Id: I92adf79c461f3536475da318e03b60f2e1adc08f

diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx
index e15f8c6..00d297b 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -153,7 +153,7 @@ public:
                ::com::sun::star::uno::XComponentContext > const & xContext);
     virtual ~ChartController();
 
-    static OUString GetContextName();
+    OUString GetContextName();
 
     // ::com::sun::star::lang::XServiceInfo
     virtual OUString SAL_CALL getImplementationName()
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index a7a92f1..056e721 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -73,6 +73,8 @@
 #include <com/sun/star/frame/XLayoutManager.hpp>
 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
 
+#include <boost/bind.hpp>
+
 // this is needed to properly destroy the unique_ptr to the AcceleratorExecute
 // object in the DTOR
 #include <svtools/acceleratorexecute.hxx>
@@ -114,8 +116,8 @@ ChartController::ChartController(uno::Reference<uno::XComponentContext> const &
     m_aDispatchContainer( m_xCC, this ),
     m_eDrawMode( CHARTDRAW_SELECT ),
     mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler(
-                &ChartController::GetContextName, this,
-                sfx2::sidebar::EnumContext::Context_Cell))
+            ::boost::bind(&ChartController::GetContextName, this),
+                this, sfx2::sidebar::EnumContext::Context_Cell))
 {
     m_aDoubleClickTimer.SetTimeoutHdl( LINK( this, ChartController, DoubleClickWaitingHdl ) );
 }
@@ -296,6 +298,30 @@ bool ChartController::TheModelRef::is() const
 
 OUString ChartController::GetContextName()
 {
+    uno::Any aAny = getSelection();
+    if (!aAny.hasValue())
+        return OUString("Chart");
+
+    OUString aCID;
+    aAny >>= aCID;
+
+    if (aCID.isEmpty())
+        return OUString("Chart");
+
+    ObjectType eObjectID = ObjectIdentifier::getObjectType(aCID);
+    switch (eObjectID)
+    {
+        case OBJECTTYPE_DATA_SERIES:
+            return OUString("Series");
+        break;
+        case OBJECTTYPE_DATA_ERRORS_X:
+        case OBJECTTYPE_DATA_ERRORS_Y:
+        case OBJECTTYPE_DATA_ERRORS_Z:
+            return OUString("ErrorBar");
+        default:
+        break;
+    }
+
     return OUString("Chart");
 }
 
commit d4d56067b7e0d654701912a3fd54cf2b452a8d28
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 16 18:44:01 2015 +0200

    add skeleton for chart series panel
    
    Change-Id: Ib1e5da270812aa909a6e773abbd9716256f4d5f4

diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk
index 1b2b46d..facaf66 100644
--- a/chart2/Library_chartcontroller.mk
+++ b/chart2/Library_chartcontroller.mk
@@ -189,6 +189,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
     chart2/source/controller/main/UndoGuard \
     chart2/source/controller/sidebar/Chart2PanelFactory \
     chart2/source/controller/sidebar/ChartElementsPanel \
+    chart2/source/controller/sidebar/ChartSeriesPanel \
 ))
 
 # Runtime dependency for unit-tests
diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk
index ab8ce34..d2e8408 100644
--- a/chart2/UIConfig_chart2.mk
+++ b/chart2/UIConfig_chart2.mk
@@ -43,6 +43,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
 	chart2/uiconfig/ui/inserttitledlg \
 	chart2/uiconfig/ui/paradialog \
 	chart2/uiconfig/ui/sidebarelements \
+	chart2/uiconfig/ui/sidebarseries \
 	chart2/uiconfig/ui/smoothlinesdlg \
 	chart2/uiconfig/ui/steppedlinesdlg \
 	chart2/uiconfig/ui/titlerotationtabpage \
diff --git a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
index 29ea916..61e1677 100644
--- a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
+++ b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
@@ -30,6 +30,7 @@
 #include <cppuhelper/supportsservice.hxx>
 
 #include "ChartElementsPanel.hxx"
+#include "ChartSeriesPanel.hxx"
 #include "ChartController.hxx"
 
 using namespace css::uno;
@@ -93,6 +94,8 @@ Reference<css::ui::XUIElement> SAL_CALL ChartPanelFactory::createUIElement (
         VclPtr<vcl::Window> pPanel;
         if (rsResourceURL.endsWith("/ElementsPanel"))
             pPanel = ChartElementsPanel::Create( pParentWindow, xFrame, pBindings, pController );
+        else if (rsResourceURL.endsWith("/SeriesPanel"))
+            pPanel = ChartSeriesPanel::Create(pParentWindow, xFrame, pBindings, pController);
         /*
         else if (rsResourceURL.endsWith("/CellAppearancePropertyPanel"))
             pPanel = CellAppearancePropertyPanel::Create( pParentWindow, xFrame, pBindings );
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
new file mode 100644
index 0000000..732aefc
--- /dev/null
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -0,0 +1,129 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
+#include <sfx2/sidebar/Theme.hxx>
+#include <sfx2/sidebar/ControlFactory.hxx>
+
+#include "ChartSeriesPanel.hxx"
+#include "ChartController.hxx"
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/imagemgr.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/field.hxx>
+#include <vcl/toolbox.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
+#include <comphelper/processfactory.hxx>
+
+#include "ChartModel.hxx"
+
+using namespace css;
+using namespace css::uno;
+using ::sfx2::sidebar::Theme;
+
+namespace chart { namespace sidebar {
+
+ChartSeriesPanel::ChartSeriesPanel(
+    vcl::Window* pParent,
+    const css::uno::Reference<css::frame::XFrame>& rxFrame,
+    SfxBindings* pBindings,
+    ChartController* pController)
+  : PanelLayout(pParent, "ChartSeriesPanel", "modules/schart/ui/sidebarseries.ui", rxFrame),
+    mxFrame(rxFrame),
+    maContext(),
+    mpBindings(pBindings),
+    mxModel(pController->getModel())
+{
+    Initialize();
+}
+
+ChartSeriesPanel::~ChartSeriesPanel()
+{
+    disposeOnce();
+}
+
+void ChartSeriesPanel::dispose()
+{
+
+    PanelLayout::dispose();
+}
+
+void ChartSeriesPanel::Initialize()
+{
+}
+
+void ChartSeriesPanel::updateData()
+{
+    SolarMutexGuard aGuard;
+}
+
+VclPtr<vcl::Window> ChartSeriesPanel::Create (
+    vcl::Window* pParent,
+    const css::uno::Reference<css::frame::XFrame>& rxFrame,
+    SfxBindings* pBindings, ChartController* pController)
+{
+    if (pParent == NULL)
+        throw lang::IllegalArgumentException("no parent Window given to ChartSeriesPanel::Create", NULL, 0);
+    if ( ! rxFrame.is())
+        throw lang::IllegalArgumentException("no XFrame given to ChartSeriesPanel::Create", NULL, 1);
+    if (pBindings == NULL)
+        throw lang::IllegalArgumentException("no SfxBindings given to ChartSeriesPanel::Create", NULL, 2);
+
+    return  VclPtr<ChartSeriesPanel>::Create(
+                        pParent, rxFrame, pBindings, pController);
+}
+
+void ChartSeriesPanel::DataChanged(
+    const DataChangedEvent& )
+{
+    updateData();
+}
+
+void ChartSeriesPanel::HandleContextChange(
+    const ::sfx2::sidebar::EnumContext& rContext)
+{
+    if(maContext == rContext)
+    {
+        // Nothing to do.
+        return;
+    }
+
+    maContext = rContext;
+    updateData();
+}
+
+void ChartSeriesPanel::NotifyItemUpdate(
+    sal_uInt16 /*nSID*/,
+    SfxItemState /*eState*/,
+    const SfxPoolItem* /*pState*/,
+    const bool )
+{
+}
+
+void ChartSeriesPanel::modelInvalid()
+{
+
+}
+
+}} // end of namespace ::chart::sidebar
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
new file mode 100644
index 0000000..6fa61e3
--- /dev/null
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTSERIESPANEL_HXX
+#define INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTSERIESPANEL_HXX
+
+#include <sfx2/sidebar/ControllerItem.hxx>
+#include <sfx2/sidebar/IContextChangeReceiver.hxx>
+#include <svx/sidebar/PanelLayout.hxx>
+
+#include <com/sun/star/util/XModifyListener.hpp>
+
+class FixedText;
+class ListBox;
+class NumericField;
+
+namespace chart {
+
+class ChartController;
+
+namespace sidebar {
+
+class ChartSeriesPanel : public PanelLayout,
+    public ::sfx2::sidebar::IContextChangeReceiver,
+    public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+{
+public:
+    static VclPtr<vcl::Window> Create(
+        vcl::Window* pParent,
+        const css::uno::Reference<css::frame::XFrame>& rxFrame,
+        SfxBindings* pBindings, ChartController* pController);
+
+    virtual void DataChanged(
+        const DataChangedEvent& rEvent) SAL_OVERRIDE;
+
+    virtual void HandleContextChange(
+        const ::sfx2::sidebar::EnumContext& rContext) SAL_OVERRIDE;
+
+    virtual void NotifyItemUpdate(
+        const sal_uInt16 nSId,
+        const SfxItemState eState,
+        const SfxPoolItem* pState,
+        const bool bIsEnabled) SAL_OVERRIDE;
+
+    SfxBindings* GetBindings() { return mpBindings;}
+
+    // constructor/destuctor
+    ChartSeriesPanel(
+        vcl::Window* pParent,
+        const css::uno::Reference<css::frame::XFrame>& rxFrame,
+        SfxBindings* pBindings, ChartController* pController);
+    virtual ~ChartSeriesPanel();
+    virtual void dispose() SAL_OVERRIDE;
+
+    void updateData();
+    void modelInvalid();
+
+private:
+    //ui controls
+
+    css::uno::Reference<css::frame::XFrame> mxFrame;
+    ::sfx2::sidebar::EnumContext            maContext;
+    SfxBindings*                            mpBindings;
+
+    css::uno::Reference<css::frame::XModel> mxModel;
+    css::uno::Reference<css::util::XModifyListener> mxListener;
+
+    void Initialize();
+};
+
+} } // end of namespace ::chart::sidebar
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/uiconfig/ui/sidebarseries.ui b/chart2/uiconfig/ui/sidebarseries.ui
new file mode 100644
index 0000000..afcc7a9
--- /dev/null
+++ b/chart2/uiconfig/ui/sidebarseries.ui
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
+<interface>
+  <requires lib="gtk+" version="3.12"/>
+  <object class="GtkGrid" id="DataSeriesPanel">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkGrid" id="grid2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkLabel" id="label_series_name">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">label</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkCheckButton" id="checkbutton_label">
+            <property name="label" translatable="yes">Show data label</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="xalign">0</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkCheckButton" id="checkbutton_trendline">
+            <property name="label" translatable="yes">Trendline</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="xalign">0</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Axis:</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioButton" id="radiobutton_primary_axis">
+            <property name="label" translatable="yes">Primary Y-Axis</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="xalign">0</property>
+            <property name="active">True</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkRadioButton" id="radiobutton_secondary_axis">
+            <property name="label" translatable="yes">Secondary Y-Axis</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">0.49000000953674316</property>
+            <property name="active">True</property>
+            <property name="draw_indicator">True</property>
+            <property name="group">radiobutton_primary_axis</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkCheckButton" id="checkbutton_y_error">
+            <property name="label" translatable="yes">Y Error Bars</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="xalign">0</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">5</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkCheckButton" id="checkbutton_x_error">
+            <property name="label" translatable="yes">X Error Bars</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="xalign">0</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">5</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkComboBoxText" id="comboboxtext_label">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <items>
+              <item translatable="yes">Above</item>
+              <item translatable="yes">Below</item>
+              <item translatable="yes">Center</item>
+              <item translatable="yes">Outside</item>
+              <item translatable="yes">Inside</item>
+              <item translatable="yes">Near origin</item>
+            </items>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+      </packing>
+    </child>
+  </object>
+</interface>
commit 5d6d11a6d21e81feb0ba3422a3a3cad9d96ec3b6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 16 18:42:55 2015 +0200

    add more chart sidebar contexts
    
    Change-Id: Icce69a0f5662ba06a3b57da089889aac5028de30

diff --git a/include/sfx2/sidebar/EnumContext.hxx b/include/sfx2/sidebar/EnumContext.hxx
index b77c977..785e6eff 100644
--- a/include/sfx2/sidebar/EnumContext.hxx
+++ b/include/sfx2/sidebar/EnumContext.hxx
@@ -74,6 +74,7 @@ public:
         Context_DrawPage,
         Context_DrawText,
         Context_EditCell,
+        Context_ErrorBar,
         Context_Form,
         Context_Frame,
         Context_Graphic,
@@ -85,10 +86,12 @@ public:
         Context_OLE,
         Context_OutlineText,
         Context_Pivot,
+        Context_Series,
         Context_SlidesorterPage,
         Context_Table,
         Context_Text,
         Context_TextObject,
+        Context_Trendline,
 
         // Default context of an application.  Do we need this?
         Context_Default,
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index a6ce71c..da8c01f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -1162,69 +1162,69 @@
         </prop>
       </node>
 
-      <node oor:name="ChartAreaPanel" oor:op="replace">
+      <node oor:name="ChartSeriesPanel" oor:op="replace">
         <prop oor:name="Title" oor:type="xs:string">
-          <value xml:lang="en-US">Area</value>
+          <value xml:lang="en-US">Data Series</value>
         </prop>
         <prop oor:name="Id" oor:type="xs:string">
-          <value>ChartAreaPanel</value>
+          <value>SeriesPanel</value>
         </prop>
         <prop oor:name="DeckId" oor:type="xs:string">
           <value>ChartDeck</value>
         </prop>
         <prop oor:name="ContextList">
           <value oor:separator=";">
-            Chart, any, visible ;
+            Chart, Series, visible ;
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
-          <value>private:resource/toolpanel/ChartPanelFactory/AreaPanel</value>
+          <value>private:resource/toolpanel/ChartPanelFactory/SeriesPanel</value>
         </prop>
         <prop oor:name="OrderIndex" oor:type="xs:int">
           <value>2</value>
         </prop>
       </node>
 
-      <node oor:name="ChartLinePanel" oor:op="replace">
+      <node oor:name="ChartTrendlinePanel" oor:op="replace">
         <prop oor:name="Title" oor:type="xs:string">
-          <value xml:lang="en-US">Line</value>
+          <value xml:lang="en-US">Trnedline</value>
         </prop>
         <prop oor:name="Id" oor:type="xs:string">
-          <value>ChartLinePanel</value>
+          <value>ChartTrendlinePanel</value>
         </prop>
         <prop oor:name="DeckId" oor:type="xs:string">
           <value>ChartDeck</value>
         </prop>
         <prop oor:name="ContextList">
           <value oor:separator=";">
-            Chart, any, visible ;
+            Chart, Trendline, visible ;
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
-          <value>private:resource/toolpanel/ChartPanelFactory/LinePanel</value>
+          <value>private:resource/toolpanel/ChartPanelFactory/TrendlinePanel</value>
         </prop>
         <prop oor:name="OrderIndex" oor:type="xs:int">
           <value>3</value>
         </prop>
       </node>
 
-      <node oor:name="ChartCharacterPanel" oor:op="replace">
+      <node oor:name="ChartErrorBarPanel" oor:op="replace">
         <prop oor:name="Title" oor:type="xs:string">
-          <value xml:lang="en-US">Character</value>
+          <value xml:lang="en-US">Error Bar</value>
         </prop>
         <prop oor:name="Id" oor:type="xs:string">
-          <value>ChartCharacterPanel</value>
+          <value>ChartErrorBarPanel</value>
         </prop>
         <prop oor:name="DeckId" oor:type="xs:string">
           <value>ChartDeck</value>
         </prop>
         <prop oor:name="ContextList">
           <value oor:separator=";">
-            Chart, any, visible ;
+            Chart, ErrorBar, visible ;
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
-          <value>private:resource/toolpanel/ChartPanelFactory/CharacterPanel</value>
+          <value>private:resource/toolpanel/ChartPanelFactory/ErrorBarPanel</value>
         </prop>
         <prop oor:name="OrderIndex" oor:type="xs:int">
           <value>4</value>
@@ -1243,7 +1243,7 @@
         </prop>
         <prop oor:name="ContextList">
           <value oor:separator=";">
-            Chart, any, visible ;
+            Chart, Axis, visible ;
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
@@ -1254,6 +1254,75 @@
         </prop>
       </node>
 
+      <node oor:name="ChartAreaPanel" oor:op="replace">
+        <prop oor:name="Title" oor:type="xs:string">
+          <value xml:lang="en-US">Area</value>
+        </prop>
+        <prop oor:name="Id" oor:type="xs:string">
+          <value>ChartAreaPanel</value>
+        </prop>
+        <prop oor:name="DeckId" oor:type="xs:string">
+          <value>ChartDeck</value>
+        </prop>
+        <prop oor:name="ContextList">
+          <value oor:separator=";">
+            Chart, any, visible ;
+          </value>
+        </prop>
+        <prop oor:name="ImplementationURL" oor:type="xs:string">
+          <value>private:resource/toolpanel/ChartPanelFactory/AreaPanel</value>
+        </prop>
+        <prop oor:name="OrderIndex" oor:type="xs:int">
+          <value>6</value>
+        </prop>
+      </node>
+
+      <node oor:name="ChartLinePanel" oor:op="replace">
+        <prop oor:name="Title" oor:type="xs:string">
+          <value xml:lang="en-US">Line</value>
+        </prop>
+        <prop oor:name="Id" oor:type="xs:string">
+          <value>ChartLinePanel</value>
+        </prop>
+        <prop oor:name="DeckId" oor:type="xs:string">
+          <value>ChartDeck</value>
+        </prop>
+        <prop oor:name="ContextList">
+          <value oor:separator=";">
+            Chart, any, visible ;
+          </value>
+        </prop>
+        <prop oor:name="ImplementationURL" oor:type="xs:string">
+          <value>private:resource/toolpanel/ChartPanelFactory/LinePanel</value>
+        </prop>
+        <prop oor:name="OrderIndex" oor:type="xs:int">
+          <value>7</value>
+        </prop>
+      </node>
+
+      <node oor:name="ChartCharacterPanel" oor:op="replace">
+        <prop oor:name="Title" oor:type="xs:string">
+          <value xml:lang="en-US">Character</value>
+        </prop>
+        <prop oor:name="Id" oor:type="xs:string">
+          <value>ChartCharacterPanel</value>
+        </prop>
+        <prop oor:name="DeckId" oor:type="xs:string">
+          <value>ChartDeck</value>
+        </prop>
+        <prop oor:name="ContextList">
+          <value oor:separator=";">
+            Chart, any, visible ;
+          </value>
+        </prop>
+        <prop oor:name="ImplementationURL" oor:type="xs:string">
+          <value>private:resource/toolpanel/ChartPanelFactory/CharacterPanel</value>
+        </prop>
+        <prop oor:name="OrderIndex" oor:type="xs:int">
+          <value>8</value>
+        </prop>
+      </node>
+
     </node>
   </node>
 </oor:component-data>
diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
index 1e6234a..8177251 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
@@ -107,9 +107,9 @@
                  none
 
           2  Context name
-              Know context names are 3DObject, Annotation, Auditing, Cell, Chart, Draw, DrawPage, DrawText,
-              EditCell, Form, Frame, Graphic, HandoutPage, MasterPage, Media, Multiobj, OLE, OutlineText,
-              Pivot, SlidesorterPage, Table, Text, TextObject,
+              Know context names are 3DObject, Annotation, Auditing, Axis, Cell, Chart, Draw, DrawPage, DrawText,
+              EditCell, ErrorBar, Form, Frame, Graphic, HandoutPage, MasterPage, Media, Multiobj, OLE, OutlineText,
+              Pivot, Series, SlidesorterPage, Table, Text, TextObject, Trendline
               default
 
              Special values:
diff --git a/sfx2/source/sidebar/EnumContext.cxx b/sfx2/source/sidebar/EnumContext.cxx
index f7db2ed..e84ce1c 100644
--- a/sfx2/source/sidebar/EnumContext.cxx
+++ b/sfx2/source/sidebar/EnumContext.cxx
@@ -184,6 +184,7 @@ void EnumContext::ProvideContextContainers()
         AddContext(DrawPage);
         AddContext(DrawText);
         AddContext(EditCell);
+        AddContext(ErrorBar);
         AddContext(Form);
         AddContext(Frame);
         AddContext(Graphic);
@@ -195,10 +196,12 @@ void EnumContext::ProvideContextContainers()
         AddContext(OLE);
         AddContext(OutlineText);
         AddContext(Pivot);
+        AddContext(Series);
         AddContext(SlidesorterPage);
         AddContext(Table);
         AddContext(Text);
         AddContext(TextObject);
+        AddContext(Trendline);
 #undef AddContext
     }
 }
commit 6d82ebb3443bfb09a16338ebd9bc7ce50a30963d
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 16 16:22:40 2015 +0200

    remove unused labels
    
    Change-Id: I6b16fcd7ee48d782c9b25b1f90f3ff25c103633d

diff --git a/chart2/uiconfig/ui/sidebarelements.ui b/chart2/uiconfig/ui/sidebarelements.ui
index 868be9a..94d1ff0 100644
--- a/chart2/uiconfig/ui/sidebarelements.ui
+++ b/chart2/uiconfig/ui/sidebarelements.ui
@@ -321,48 +321,16 @@
           </packing>
         </child>
         <child>
-          <object class="GtkLabel" id="label1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label" translatable="yes">label</property>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">10</property>
-          </packing>
+          <placeholder/>
         </child>
         <child>
-          <object class="GtkLabel" id="label2">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label" translatable="yes">label</property>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">8</property>
-          </packing>
+          <placeholder/>
         </child>
         <child>
-          <object class="GtkLabel" id="label3">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label" translatable="yes">label</property>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">2</property>
-          </packing>
+          <placeholder/>
         </child>
         <child>
-          <object class="GtkLabel" id="label4">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label" translatable="yes">label</property>
-          </object>
-          <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">0</property>
-          </packing>
+          <placeholder/>
         </child>
       </object>
       <packing>


More information about the Libreoffice-commits mailing list