[Libreoffice-commits] core.git: chart2/source solenv/clang-format

Muhammet Kara (via logerrit) logerrit at kemper.freedesktop.org
Tue Nov 12 20:08:20 UTC 2019


 chart2/source/controller/dialogs/ChangingResource.cxx          |    2 
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx |    2 
 chart2/source/controller/dialogs/ChartTypeDialogController.hxx |  298 --------
 chart2/source/controller/dialogs/dlg_CreationWizard.cxx        |    2 
 chart2/source/controller/dialogs/dlg_DataSource.cxx            |    2 
 chart2/source/controller/dialogs/tp_ChartType.hxx              |    4 
 chart2/source/controller/dialogs/tp_DataSource.cxx             |    2 
 chart2/source/controller/dialogs/tp_RangeChooser.cxx           |    2 
 chart2/source/inc/ChangingResource.hxx                         |    3 
 chart2/source/inc/ChartTypeDialogController.hxx                |  363 ++++++++++
 chart2/source/inc/ChartTypeTemplateProvider.hxx                |   17 
 solenv/clang-format/blacklist                                  |    3 
 12 files changed, 386 insertions(+), 314 deletions(-)

New commits:
commit e63fdaa0d6eed45ad677c36e4a8301f606c603f5
Author:     Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Mon Nov 11 20:04:30 2019 +0300
Commit:     Muhammet Kara <muhammet.kara at collabora.com>
CommitDate: Tue Nov 12 21:06:53 2019 +0100

    chart2: Move some headers to inc
    
    So that they will be accessible from
    inside the sidebar dir.
    
    Change-Id: Iaf7b1a800a3b35a5c497d8122f68c97c8cdc9eff
    Reviewed-on: https://gerrit.libreoffice.org/80922
    Reviewed-by: Muhammet Kara <muhammet.kara at collabora.com>
    Tested-by: Muhammet Kara <muhammet.kara at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/82461
    Tested-by: Jenkins

diff --git a/chart2/source/controller/dialogs/ChangingResource.cxx b/chart2/source/controller/dialogs/ChangingResource.cxx
index 6e1ba1c67274..c50f274dadd4 100644
--- a/chart2/source/controller/dialogs/ChangingResource.cxx
+++ b/chart2/source/controller/dialogs/ChangingResource.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "ChangingResource.hxx"
+#include <ChangingResource.hxx>
 
 namespace chart
 {
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 541236e4fa40..bbbd5a882f24 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "ChartTypeDialogController.hxx"
+#include <ChartTypeDialogController.hxx>
 #include <ResId.hxx>
 #include <strings.hrc>
 #include <bitmaps.hlst>
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
deleted file mode 100644
index 35953980578d..000000000000
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
+++ /dev/null
@@ -1,298 +0,0 @@
-/* -*- 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_DIALOGS_CHARTTYPEDIALOGCONTROLLER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_CHARTTYPEDIALOGCONTROLLER_HXX
-
-#include <sal/config.h>
-
-#include <map>
-
-#include "ChangingResource.hxx"
-#include <ThreeDHelper.hxx>
-
-#include <com/sun/star/chart2/CurveStyle.hpp>
-#include <vcl/weld.hxx>
-
-namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
-namespace com { namespace sun { namespace star { namespace chart2 { class XChartDocument; } } } }
-namespace com { namespace sun { namespace star { namespace chart2 { class XChartTypeTemplate; } } } }
-namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } }
-
-class SvtValueSet;
-
-namespace chart
-{
-
-enum GlobalStackMode
-{
-    GlobalStackMode_NONE,
-    GlobalStackMode_STACK_Y,
-    GlobalStackMode_STACK_Y_PERCENT,
-    GlobalStackMode_STACK_Z
-};
-
-class ChartTypeParameter
-{
-public:
-    ChartTypeParameter( sal_Int32 nSubTypeIndex, bool bXAxisWithValues=false
-                    ,  bool b3DLook=false,  GlobalStackMode eStackMode=GlobalStackMode_NONE
-                    ,  bool _bSymbols = true, bool _bLines = true
-                    , css::chart2::CurveStyle eCurveStyle = css::chart2::CurveStyle_LINES );
-    ChartTypeParameter();
-
-    bool mapsToSameService( const ChartTypeParameter& rParameter ) const;
-    bool mapsToSimilarService( const ChartTypeParameter& rParameter, sal_Int32 nTheHigherTheLess ) const;
-
-    sal_Int32       nSubTypeIndex;//starting with 1
-
-    bool            bXAxisWithValues;
-    bool            b3DLook;
-    bool            bSymbols;
-    bool            bLines;
-
-    GlobalStackMode eStackMode;
-    css::chart2::CurveStyle      eCurveStyle;
-
-    sal_Int32       nCurveResolution;
-    sal_Int32       nSplineOrder;
-
-    sal_Int32       nGeometry3D;
-
-    ThreeDLookScheme    eThreeDLookScheme;
-    bool                bSortByXValues;
-
-    bool mbRoundedEdge;
-};
-
-typedef std::map< OUString, ChartTypeParameter > tTemplateServiceChartTypeParameterMap;
-
-class ChartTypeDialogController : public ChangingResource
-{
-public:
-    ChartTypeDialogController();
-    virtual ~ChartTypeDialogController() override;
-
-    virtual OUString getName()=0;
-    virtual OUString getImage()=0;
-    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const = 0;
-    virtual void fillSubTypeList( SvtValueSet& rSubTypeList, const ChartTypeParameter& rParameter );
-
-    virtual bool    shouldShow_3DLookControl() const;
-    virtual bool    shouldShow_StackingControl() const;
-    virtual bool    shouldShow_SplineControl() const;
-    virtual bool    shouldShow_GeometryControl() const;
-    virtual bool    shouldShow_SortByXValuesResourceGroup() const;
-
-    virtual void    showExtraControls(weld::Builder* pBuilder);
-    virtual void    hideExtraControls() const;
-    virtual void    fillExtraControls( const css::uno::Reference< css::chart2::XChartDocument >& xChartModel
-                                     , const css::uno::Reference< css::beans::XPropertySet >& xTemplateProps ) const;
-    /// @throws css::uno::RuntimeException
-    virtual void    setTemplateProperties( const css::uno::Reference< css::beans::XPropertySet >& xTemplateProps ) const;
-
-    bool                isSubType( const OUString& rServiceName );
-    ChartTypeParameter  getChartTypeParameterForService( const OUString& rServiceName, const css::uno::Reference<
-                                                                css::beans::XPropertySet >& xTemplateProps );
-    virtual void        adjustSubTypeAndEnableControls( ChartTypeParameter& rParameter );//if you have different counts of subtypes you may need to adjust the index
-    virtual void        adjustParameterToSubType( ChartTypeParameter& rParameter );
-    virtual void        adjustParameterToMainType( ChartTypeParameter& rParameter );
-    OUString            getServiceNameForParameter( const ChartTypeParameter& rParameter ) const;
-    void                commitToModel( const ChartTypeParameter& rParameter
-                                     , const css::uno::Reference< css::chart2::XChartDocument >& xChartModel );
-    css::uno::Reference<
-                css::chart2::XChartTypeTemplate > getCurrentTemplate( const ChartTypeParameter& rParameter
-                , const css::uno::Reference< css::lang::XMultiServiceFactory >& xTemplateManager ) const;
-
-protected:
-    bool bSupportsXAxisWithValues;
-    bool bSupports3D;
-};
-
-class ColumnOrBarChartDialogController_Base : public ChartTypeDialogController
-{
-public:
-    ColumnOrBarChartDialogController_Base();
-    virtual ~ColumnOrBarChartDialogController_Base() override;
-
-    virtual bool    shouldShow_3DLookControl() const override;
-    virtual bool    shouldShow_GeometryControl() const override;
-
-    virtual void    adjustSubTypeAndEnableControls( ChartTypeParameter& rParameter ) override;
-};
-
-class ColumnChartDialogController : public ColumnOrBarChartDialogController_Base
-{
-public:
-    ColumnChartDialogController();
-    virtual ~ColumnChartDialogController() override;
-
-    virtual OUString getName() override;
-    virtual OUString getImage() override;
-    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
-    virtual void fillSubTypeList( SvtValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) override;
-};
-
-class BarChartDialogController : public ColumnOrBarChartDialogController_Base
-{
-public:
-    BarChartDialogController();
-    virtual ~BarChartDialogController() override;
-
-    virtual OUString getName() override;
-    virtual OUString getImage() override;
-    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
-    virtual void fillSubTypeList( SvtValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) override;
-};
-
-class PieChartDialogController : public ChartTypeDialogController
-{
-public:
-    PieChartDialogController();
-    virtual ~PieChartDialogController() override;
-
-    virtual OUString getName() override;
-    virtual OUString getImage() override;
-    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
-    virtual void fillSubTypeList( SvtValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) override;
-    virtual void adjustParameterToSubType( ChartTypeParameter& rParameter ) override;
-
-    virtual bool    shouldShow_3DLookControl() const override;
-};
-
-class LineChartDialogController : public ChartTypeDialogController
-{
-public:
-    LineChartDialogController();
-    virtual ~LineChartDialogController() override;
-
-    virtual OUString getName() override;
-    virtual OUString getImage() override;
-    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
-    virtual void fillSubTypeList( SvtValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) override;
-    virtual void adjustParameterToSubType( ChartTypeParameter& rParameter ) override;
-    virtual void adjustParameterToMainType( ChartTypeParameter& rParameter ) override;
-
-    virtual bool    shouldShow_StackingControl() const override;
-    virtual bool    shouldShow_SplineControl() const override;
-};
-
-class XYChartDialogController : public ChartTypeDialogController
-{
-public:
-    XYChartDialogController();
-    virtual ~XYChartDialogController() override;
-
-    virtual OUString getName() override;
-    virtual OUString getImage() override;
-    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
-    virtual void fillSubTypeList( SvtValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) override;
-    virtual void adjustParameterToSubType( ChartTypeParameter& rParameter ) override;
-
-    virtual bool    shouldShow_SplineControl() const override;
-    virtual bool    shouldShow_SortByXValuesResourceGroup() const override;
-};
-
-class AreaChartDialogController : public ChartTypeDialogController
-{
-public:
-    AreaChartDialogController();
-    virtual ~AreaChartDialogController() override;
-
-    virtual OUString getName() override;
-    virtual OUString getImage() override;
-    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
-    virtual void fillSubTypeList( SvtValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) override;
-    virtual void adjustParameterToSubType( ChartTypeParameter& rParameter ) override;
-    virtual void adjustParameterToMainType( ChartTypeParameter& rParameter ) override;
-
-    virtual bool    shouldShow_3DLookControl() const override;
-};
-
-class NetChartDialogController : public ChartTypeDialogController
-{
-public:
-    NetChartDialogController();
-    virtual ~NetChartDialogController() override;
-
-    virtual OUString getName() override;
-    virtual OUString getImage() override;
-    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
-    virtual void fillSubTypeList( SvtValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) override;
-    virtual void adjustParameterToSubType( ChartTypeParameter& rParameter ) override;
-
-    virtual bool    shouldShow_StackingControl() const override;
-};
-
-class StockChartDialogController : public ChartTypeDialogController
-{
-public:
-    StockChartDialogController();
-    virtual ~StockChartDialogController() override;
-
-    virtual OUString getName() override;
-    virtual OUString getImage() override;
-    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
-    virtual void fillSubTypeList( SvtValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) override;
-    virtual void adjustParameterToSubType( ChartTypeParameter& rParameter ) override;
-};
-
-class CombiColumnLineChartDialogController : public ChartTypeDialogController
-{
-public:
-    CombiColumnLineChartDialogController();
-
-    virtual OUString getName() override;
-    virtual OUString getImage() override;
-    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
-    virtual void fillSubTypeList( SvtValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) override;
-    virtual void adjustParameterToSubType( ChartTypeParameter& rParameter ) override;
-
-    virtual void    showExtraControls(weld::Builder* pBuilder) override;
-    virtual void    hideExtraControls() const override;
-    virtual void    fillExtraControls( const css::uno::Reference< css::chart2::XChartDocument >& xChartModel
-                                     , const css::uno::Reference< css::beans::XPropertySet >& xTemplateProps ) const override;
-
-    virtual void    setTemplateProperties( const css::uno::Reference< css::beans::XPropertySet >& xTemplateProps ) const override;
-
-private:
-    DECL_LINK(ChangeLineCountHdl, weld::SpinButton&, void);
-
-private:
-    std::unique_ptr<weld::Label> m_xFT_NumberOfLines;
-    std::unique_ptr<weld::SpinButton> m_xMF_NumberOfLines;
-};
-
-class BubbleChartDialogController : public ChartTypeDialogController
-{
-public:
-    BubbleChartDialogController();
-    virtual ~BubbleChartDialogController() override;
-
-    virtual OUString getName() override;
-    virtual OUString getImage() override;
-    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
-    virtual void fillSubTypeList( SvtValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) override;
-    virtual void adjustParameterToSubType( ChartTypeParameter& rParameter ) override;
-};
-
-} //namespace chart
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index 89f60fa929d2..ccf2cdc5221f 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -28,7 +28,7 @@
 #include "tp_RangeChooser.hxx"
 #include "tp_Wizard_TitlesAndObjects.hxx"
 #include "tp_DataSource.hxx"
-#include "ChartTypeTemplateProvider.hxx"
+#include <ChartTypeTemplateProvider.hxx>
 #include "DialogModel.hxx"
 
 using namespace css;
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx
index 39f1d5eae6c0..283357686553 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx
@@ -21,7 +21,7 @@
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 
 #include <dlg_DataSource.hxx>
-#include "ChartTypeTemplateProvider.hxx"
+#include <ChartTypeTemplateProvider.hxx>
 #include <DiagramHelper.hxx>
 #include "DialogModel.hxx"
 
diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx
index a9a15cb2f7c0..e5587afba4fd 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.hxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.hxx
@@ -22,8 +22,8 @@
 
 #include <vector>
 
-#include "ChartTypeDialogController.hxx"
-#include "ChartTypeTemplateProvider.hxx"
+#include <ChartTypeDialogController.hxx>
+#include <ChartTypeTemplateProvider.hxx>
 #include <TimerTriggeredControllerLock.hxx>
 
 #include <vcl/wizardmachine.hxx>
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 4c1285a81163..b4cad889bb7e 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -20,7 +20,7 @@
 #include "tp_DataSource.hxx"
 #include <strings.hrc>
 #include <ResId.hxx>
-#include "ChartTypeTemplateProvider.hxx"
+#include <ChartTypeTemplateProvider.hxx>
 #include <RangeSelectionHelper.hxx>
 #include <DataSeriesHelper.hxx>
 #include <ControllerLockGuard.hxx>
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 77dc2145178f..29b4e179ffd9 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -19,7 +19,7 @@
 
 #include "tp_RangeChooser.hxx"
 #include <DataSourceHelper.hxx>
-#include "ChartTypeTemplateProvider.hxx"
+#include <ChartTypeTemplateProvider.hxx>
 #include "DialogModel.hxx"
 #include <RangeSelectionHelper.hxx>
 #include <TabPageNotifiable.hxx>
diff --git a/chart2/source/controller/dialogs/ChangingResource.hxx b/chart2/source/inc/ChangingResource.hxx
similarity index 95%
rename from chart2/source/controller/dialogs/ChangingResource.hxx
rename to chart2/source/inc/ChangingResource.hxx
index 90f3033ceebd..ca39d92b873d 100644
--- a/chart2/source/controller/dialogs/ChangingResource.hxx
+++ b/chart2/source/inc/ChangingResource.hxx
@@ -22,7 +22,6 @@
 
 namespace chart
 {
-
 class ChangingResource;
 class ResourceChangeListener
 {
@@ -37,7 +36,7 @@ public:
     ChangingResource();
     virtual ~ChangingResource();
 
-    void setChangeListener( ResourceChangeListener* pListener );
+    void setChangeListener(ResourceChangeListener* pListener);
 
 protected:
     ResourceChangeListener* m_pChangeListener;
diff --git a/chart2/source/inc/ChartTypeDialogController.hxx b/chart2/source/inc/ChartTypeDialogController.hxx
new file mode 100644
index 000000000000..c3efe736ffc9
--- /dev/null
+++ b/chart2/source/inc/ChartTypeDialogController.hxx
@@ -0,0 +1,363 @@
+/* -*- 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_DIALOGS_CHARTTYPEDIALOGCONTROLLER_HXX
+#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_CHARTTYPEDIALOGCONTROLLER_HXX
+
+#include <sal/config.h>
+
+#include <map>
+
+#include "ChangingResource.hxx"
+#include "ThreeDHelper.hxx"
+
+#include <com/sun/star/chart2/CurveStyle.hpp>
+#include <vcl/weld.hxx>
+
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace beans
+{
+class XPropertySet;
+}
+}
+}
+}
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace chart2
+{
+class XChartDocument;
+}
+}
+}
+}
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace chart2
+{
+class XChartTypeTemplate;
+}
+}
+}
+}
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace lang
+{
+class XMultiServiceFactory;
+}
+}
+}
+}
+
+class SvtValueSet;
+
+namespace chart
+{
+enum GlobalStackMode
+{
+    GlobalStackMode_NONE,
+    GlobalStackMode_STACK_Y,
+    GlobalStackMode_STACK_Y_PERCENT,
+    GlobalStackMode_STACK_Z
+};
+
+class ChartTypeParameter
+{
+public:
+    ChartTypeParameter(sal_Int32 nSubTypeIndex, bool bXAxisWithValues = false, bool b3DLook = false,
+                       GlobalStackMode eStackMode = GlobalStackMode_NONE, bool _bSymbols = true,
+                       bool _bLines = true,
+                       css::chart2::CurveStyle eCurveStyle = css::chart2::CurveStyle_LINES);
+    ChartTypeParameter();
+
+    bool mapsToSameService(const ChartTypeParameter& rParameter) const;
+    bool mapsToSimilarService(const ChartTypeParameter& rParameter,
+                              sal_Int32 nTheHigherTheLess) const;
+
+    sal_Int32 nSubTypeIndex; //starting with 1
+
+    bool bXAxisWithValues;
+    bool b3DLook;
+    bool bSymbols;
+    bool bLines;
+
+    GlobalStackMode eStackMode;
+    css::chart2::CurveStyle eCurveStyle;
+
+    sal_Int32 nCurveResolution;
+    sal_Int32 nSplineOrder;
+
+    sal_Int32 nGeometry3D;
+
+    ThreeDLookScheme eThreeDLookScheme;
+    bool bSortByXValues;
+
+    bool mbRoundedEdge;
+};
+
+typedef std::map<OUString, ChartTypeParameter> tTemplateServiceChartTypeParameterMap;
+
+class ChartTypeDialogController : public ChangingResource
+{
+public:
+    ChartTypeDialogController();
+    virtual ~ChartTypeDialogController() override;
+
+    virtual OUString getName() = 0;
+    virtual OUString getImage() = 0;
+    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const = 0;
+    virtual void fillSubTypeList(SvtValueSet& rSubTypeList, const ChartTypeParameter& rParameter);
+
+    virtual bool shouldShow_3DLookControl() const;
+    virtual bool shouldShow_StackingControl() const;
+    virtual bool shouldShow_SplineControl() const;
+    virtual bool shouldShow_GeometryControl() const;
+    virtual bool shouldShow_SortByXValuesResourceGroup() const;
+
+    virtual void showExtraControls(weld::Builder* pBuilder);
+    virtual void hideExtraControls() const;
+    virtual void
+    fillExtraControls(const css::uno::Reference<css::chart2::XChartDocument>& xChartModel,
+                      const css::uno::Reference<css::beans::XPropertySet>& xTemplateProps) const;
+    /// @throws css::uno::RuntimeException
+    virtual void setTemplateProperties(
+        const css::uno::Reference<css::beans::XPropertySet>& xTemplateProps) const;
+
+    bool isSubType(const OUString& rServiceName);
+    ChartTypeParameter getChartTypeParameterForService(
+        const OUString& rServiceName,
+        const css::uno::Reference<css::beans::XPropertySet>& xTemplateProps);
+    virtual void adjustSubTypeAndEnableControls(
+        ChartTypeParameter&
+            rParameter); //if you have different counts of subtypes you may need to adjust the index
+    virtual void adjustParameterToSubType(ChartTypeParameter& rParameter);
+    virtual void adjustParameterToMainType(ChartTypeParameter& rParameter);
+    OUString getServiceNameForParameter(const ChartTypeParameter& rParameter) const;
+    void commitToModel(const ChartTypeParameter& rParameter,
+                       const css::uno::Reference<css::chart2::XChartDocument>& xChartModel);
+    css::uno::Reference<css::chart2::XChartTypeTemplate> getCurrentTemplate(
+        const ChartTypeParameter& rParameter,
+        const css::uno::Reference<css::lang::XMultiServiceFactory>& xTemplateManager) const;
+
+protected:
+    bool bSupportsXAxisWithValues;
+    bool bSupports3D;
+};
+
+class ColumnOrBarChartDialogController_Base : public ChartTypeDialogController
+{
+public:
+    ColumnOrBarChartDialogController_Base();
+    virtual ~ColumnOrBarChartDialogController_Base() override;
+
+    virtual bool shouldShow_3DLookControl() const override;
+    virtual bool shouldShow_GeometryControl() const override;
+
+    virtual void adjustSubTypeAndEnableControls(ChartTypeParameter& rParameter) override;
+};
+
+class ColumnChartDialogController : public ColumnOrBarChartDialogController_Base
+{
+public:
+    ColumnChartDialogController();
+    virtual ~ColumnChartDialogController() override;
+
+    virtual OUString getName() override;
+    virtual OUString getImage() override;
+    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
+    virtual void fillSubTypeList(SvtValueSet& rSubTypeList,
+                                 const ChartTypeParameter& rParameter) override;
+};
+
+class BarChartDialogController : public ColumnOrBarChartDialogController_Base
+{
+public:
+    BarChartDialogController();
+    virtual ~BarChartDialogController() override;
+
+    virtual OUString getName() override;
+    virtual OUString getImage() override;
+    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
+    virtual void fillSubTypeList(SvtValueSet& rSubTypeList,
+                                 const ChartTypeParameter& rParameter) override;
+};
+
+class PieChartDialogController : public ChartTypeDialogController
+{
+public:
+    PieChartDialogController();
+    virtual ~PieChartDialogController() override;
+
+    virtual OUString getName() override;
+    virtual OUString getImage() override;
+    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
+    virtual void fillSubTypeList(SvtValueSet& rSubTypeList,
+                                 const ChartTypeParameter& rParameter) override;
+    virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
+
+    virtual bool shouldShow_3DLookControl() const override;
+};
+
+class LineChartDialogController : public ChartTypeDialogController
+{
+public:
+    LineChartDialogController();
+    virtual ~LineChartDialogController() override;
+
+    virtual OUString getName() override;
+    virtual OUString getImage() override;
+    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
+    virtual void fillSubTypeList(SvtValueSet& rSubTypeList,
+                                 const ChartTypeParameter& rParameter) override;
+    virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
+    virtual void adjustParameterToMainType(ChartTypeParameter& rParameter) override;
+
+    virtual bool shouldShow_StackingControl() const override;
+    virtual bool shouldShow_SplineControl() const override;
+};
+
+class XYChartDialogController : public ChartTypeDialogController
+{
+public:
+    XYChartDialogController();
+    virtual ~XYChartDialogController() override;
+
+    virtual OUString getName() override;
+    virtual OUString getImage() override;
+    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
+    virtual void fillSubTypeList(SvtValueSet& rSubTypeList,
+                                 const ChartTypeParameter& rParameter) override;
+    virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
+
+    virtual bool shouldShow_SplineControl() const override;
+    virtual bool shouldShow_SortByXValuesResourceGroup() const override;
+};
+
+class AreaChartDialogController : public ChartTypeDialogController
+{
+public:
+    AreaChartDialogController();
+    virtual ~AreaChartDialogController() override;
+
+    virtual OUString getName() override;
+    virtual OUString getImage() override;
+    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
+    virtual void fillSubTypeList(SvtValueSet& rSubTypeList,
+                                 const ChartTypeParameter& rParameter) override;
+    virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
+    virtual void adjustParameterToMainType(ChartTypeParameter& rParameter) override;
+
+    virtual bool shouldShow_3DLookControl() const override;
+};
+
+class NetChartDialogController : public ChartTypeDialogController
+{
+public:
+    NetChartDialogController();
+    virtual ~NetChartDialogController() override;
+
+    virtual OUString getName() override;
+    virtual OUString getImage() override;
+    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
+    virtual void fillSubTypeList(SvtValueSet& rSubTypeList,
+                                 const ChartTypeParameter& rParameter) override;
+    virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
+
+    virtual bool shouldShow_StackingControl() const override;
+};
+
+class StockChartDialogController : public ChartTypeDialogController
+{
+public:
+    StockChartDialogController();
+    virtual ~StockChartDialogController() override;
+
+    virtual OUString getName() override;
+    virtual OUString getImage() override;
+    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
+    virtual void fillSubTypeList(SvtValueSet& rSubTypeList,
+                                 const ChartTypeParameter& rParameter) override;
+    virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
+};
+
+class CombiColumnLineChartDialogController : public ChartTypeDialogController
+{
+public:
+    CombiColumnLineChartDialogController();
+
+    virtual OUString getName() override;
+    virtual OUString getImage() override;
+    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
+    virtual void fillSubTypeList(SvtValueSet& rSubTypeList,
+                                 const ChartTypeParameter& rParameter) override;
+    virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
+
+    virtual void showExtraControls(weld::Builder* pBuilder) override;
+    virtual void hideExtraControls() const override;
+    virtual void fillExtraControls(
+        const css::uno::Reference<css::chart2::XChartDocument>& xChartModel,
+        const css::uno::Reference<css::beans::XPropertySet>& xTemplateProps) const override;
+
+    virtual void setTemplateProperties(
+        const css::uno::Reference<css::beans::XPropertySet>& xTemplateProps) const override;
+
+private:
+    DECL_LINK(ChangeLineCountHdl, weld::SpinButton&, void);
+
+private:
+    std::unique_ptr<weld::Label> m_xFT_NumberOfLines;
+    std::unique_ptr<weld::SpinButton> m_xMF_NumberOfLines;
+};
+
+class BubbleChartDialogController : public ChartTypeDialogController
+{
+public:
+    BubbleChartDialogController();
+    virtual ~BubbleChartDialogController() override;
+
+    virtual OUString getName() override;
+    virtual OUString getImage() override;
+    virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
+    virtual void fillSubTypeList(SvtValueSet& rSubTypeList,
+                                 const ChartTypeParameter& rParameter) override;
+    virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
+};
+
+} //namespace chart
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/ChartTypeTemplateProvider.hxx b/chart2/source/inc/ChartTypeTemplateProvider.hxx
similarity index 86%
rename from chart2/source/controller/dialogs/ChartTypeTemplateProvider.hxx
rename to chart2/source/inc/ChartTypeTemplateProvider.hxx
index bc04dbbe3cae..fc4517d1bc4e 100644
--- a/chart2/source/controller/dialogs/ChartTypeTemplateProvider.hxx
+++ b/chart2/source/inc/ChartTypeTemplateProvider.hxx
@@ -22,15 +22,26 @@
 
 #include <com/sun/star/uno/Reference.hxx>
 
-namespace com { namespace sun { namespace star { namespace chart2 { class XChartTypeTemplate; } } } }
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace chart2
+{
+class XChartTypeTemplate;
+}
+}
+}
+}
 
 namespace chart
 {
-
 class ChartTypeTemplateProvider
 {
 public:
-    virtual css::uno::Reference< css::chart2::XChartTypeTemplate > getCurrentTemplate() const =0;
+    virtual css::uno::Reference<css::chart2::XChartTypeTemplate> getCurrentTemplate() const = 0;
     virtual ~ChartTypeTemplateProvider() {}
 };
 
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index d3dae671bc87..68ab06669bb2 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -923,10 +923,7 @@ chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.hxx
 chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.cxx
 chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty.hxx
 chart2/source/controller/dialogs/ChangingResource.cxx
-chart2/source/controller/dialogs/ChangingResource.hxx
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx
-chart2/source/controller/dialogs/ChartTypeDialogController.hxx
-chart2/source/controller/dialogs/ChartTypeTemplateProvider.hxx
 chart2/source/controller/dialogs/DataBrowser.cxx
 chart2/source/controller/dialogs/DataBrowser.hxx
 chart2/source/controller/dialogs/DataBrowserModel.cxx


More information about the Libreoffice-commits mailing list