summaryrefslogtreecommitdiffstats
path: root/chart2/source/model/inc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
commit940b4d1848e8c70ab7642901a68594e8016caffc (patch)
treeeb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /chart2/source/model/inc
parentInitial commit. (diff)
downloadlibreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.tar.xz
libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.zip
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'chart2/source/model/inc')
-rw-r--r--chart2/source/model/inc/BaseCoordinateSystem.hxx129
-rw-r--r--chart2/source/model/inc/CartesianCoordinateSystem.hxx76
-rw-r--r--chart2/source/model/inc/ChartTypeManager.hxx74
-rw-r--r--chart2/source/model/inc/DataSeries.hxx172
-rw-r--r--chart2/source/model/inc/Diagram.hxx186
-rw-r--r--chart2/source/model/inc/PolarCoordinateSystem.hxx76
-rw-r--r--chart2/source/model/inc/StockBar.hxx96
-rw-r--r--chart2/source/model/inc/XMLFilter.hxx171
8 files changed, 980 insertions, 0 deletions
diff --git a/chart2/source/model/inc/BaseCoordinateSystem.hxx b/chart2/source/model/inc/BaseCoordinateSystem.hxx
new file mode 100644
index 000000000..1f20e83a0
--- /dev/null
+++ b/chart2/source/model/inc/BaseCoordinateSystem.hxx
@@ -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 .
+ */
+#ifndef INCLUDED_CHART2_SOURCE_MODEL_INC_BASECOORDINATESYSTEM_HXX
+#define INCLUDED_CHART2_SOURCE_MODEL_INC_BASECOORDINATESYSTEM_HXX
+
+#include <OPropertySet.hxx>
+#include <MutexContainer.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/chart2/XCoordinateSystem.hpp>
+#include <com/sun/star/chart2/XChartTypeContainer.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+
+#include <vector>
+
+namespace chart
+{
+
+namespace impl
+{
+typedef ::cppu::WeakImplHelper
+ < css::lang::XServiceInfo,
+ css::chart2::XCoordinateSystem,
+ css::chart2::XChartTypeContainer,
+ css::util::XCloneable,
+ css::util::XModifyBroadcaster,
+ css::util::XModifyListener >
+ BaseCoordinateSystem_Base;
+}
+
+class BaseCoordinateSystem :
+ public impl::BaseCoordinateSystem_Base,
+ public MutexContainer,
+ public ::property::OPropertySet
+{
+public:
+ BaseCoordinateSystem( sal_Int32 nDimensionCount );
+ explicit BaseCoordinateSystem( const BaseCoordinateSystem & rSource );
+ virtual ~BaseCoordinateSystem() override;
+
+ // ____ OPropertySet ____
+ virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+
+ // ____ XPropertySet ____
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() override;
+
+ /// merge XInterface implementations
+ DECLARE_XINTERFACE()
+ /// merge XTypeProvider implementations
+ DECLARE_XTYPEPROVIDER()
+
+protected:
+ // ____ XCoordinateSystem ____
+ virtual ::sal_Int32 SAL_CALL getDimension() override;
+ virtual void SAL_CALL setAxisByDimension(
+ ::sal_Int32 nDimension,
+ const css::uno::Reference< css::chart2::XAxis >& xAxis,
+ ::sal_Int32 nIndex ) override;
+ virtual css::uno::Reference< css::chart2::XAxis > SAL_CALL getAxisByDimension(
+ ::sal_Int32 nDimension, ::sal_Int32 nIndex ) override;
+ virtual ::sal_Int32 SAL_CALL getMaximumAxisIndexByDimension( ::sal_Int32 nDimension ) override;
+
+ // ____ XChartTypeContainer ____
+ virtual void SAL_CALL addChartType(
+ const css::uno::Reference< css::chart2::XChartType >& aChartType ) override;
+ virtual void SAL_CALL removeChartType(
+ const css::uno::Reference< css::chart2::XChartType >& aChartType ) override;
+ virtual css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > > SAL_CALL getChartTypes() override;
+ virtual void SAL_CALL setChartTypes(
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aChartTypes ) override;
+
+ // ____ XModifyBroadcaster ____
+ virtual void SAL_CALL addModifyListener(
+ const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+ virtual void SAL_CALL removeModifyListener(
+ const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+
+ // ____ XModifyListener ____
+ virtual void SAL_CALL modified(
+ const css::lang::EventObject& aEvent ) override;
+
+ // ____ XEventListener (base of XModifyListener) ____
+ virtual void SAL_CALL disposing(
+ const css::lang::EventObject& Source ) override;
+
+ // ____ OPropertySet ____
+ virtual void firePropertyChangeEvent() override;
+ using OPropertySet::disposing;
+
+ void fireModifyEvent();
+
+protected:
+ css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
+
+private:
+ sal_Int32 m_nDimensionCount;
+ typedef std::vector< std::vector< css::uno::Reference< css::chart2::XAxis > > > tAxisVecVecType;
+ tAxisVecVecType m_aAllAxis; //outer sequence is the dimension; inner sequence is the axis index that indicates main or secondary axis
+ std::vector< css::uno::Reference< css::chart2::XChartType > > m_aChartTypes;
+};
+
+} // namespace chart
+
+// INCLUDED_CHART2_SOURCE_MODEL_INC_BASECOORDINATESYSTEM_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/inc/CartesianCoordinateSystem.hxx b/chart2/source/model/inc/CartesianCoordinateSystem.hxx
new file mode 100644
index 000000000..7b2847cd8
--- /dev/null
+++ b/chart2/source/model/inc/CartesianCoordinateSystem.hxx
@@ -0,0 +1,76 @@
+/* -*- 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_MODEL_INC_CARTESIANCOORDINATESYSTEM_HXX
+#define INCLUDED_CHART2_SOURCE_MODEL_INC_CARTESIANCOORDINATESYSTEM_HXX
+
+#include "BaseCoordinateSystem.hxx"
+
+namespace chart
+{
+
+class CartesianCoordinateSystem : public BaseCoordinateSystem
+{
+public:
+ explicit CartesianCoordinateSystem( sal_Int32 nDimensionCount );
+ explicit CartesianCoordinateSystem( const CartesianCoordinateSystem & rSource );
+ virtual ~CartesianCoordinateSystem() override;
+
+ // ____ XCoordinateSystem ____
+ virtual OUString SAL_CALL getCoordinateSystemType() override;
+ virtual OUString SAL_CALL getViewServiceName() override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
+
+ // ____ XServiceInfo ____
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+};
+
+class CartesianCoordinateSystem2d : public CartesianCoordinateSystem
+{
+public:
+ explicit CartesianCoordinateSystem2d();
+ virtual ~CartesianCoordinateSystem2d() override;
+
+ // ____ XServiceInfo ____
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+};
+
+class CartesianCoordinateSystem3d : public CartesianCoordinateSystem
+{
+public:
+ explicit CartesianCoordinateSystem3d();
+ virtual ~CartesianCoordinateSystem3d() override;
+
+ // ____ XServiceInfo ____
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+};
+
+} // namespace chart
+
+// INCLUDED_CHART2_SOURCE_MODEL_INC_CARTESIANCOORDINATESYSTEM_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/inc/ChartTypeManager.hxx b/chart2/source/model/inc/ChartTypeManager.hxx
new file mode 100644
index 000000000..176681564
--- /dev/null
+++ b/chart2/source/model/inc/ChartTypeManager.hxx
@@ -0,0 +1,74 @@
+/* -*- 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_MODEL_INC_CHARTTYPEMANAGER_HXX
+#define INCLUDED_CHART2_SOURCE_MODEL_INC_CHARTTYPEMANAGER_HXX
+
+#include <cppuhelper/implbase.hxx>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/chart2/XChartTypeManager.hpp>
+
+namespace com::sun::star::uno { class XComponentContext; }
+
+namespace chart
+{
+
+class ChartTypeManager :
+ public ::cppu::WeakImplHelper<
+ css::lang::XServiceInfo,
+ css::lang::XMultiServiceFactory,
+ css::chart2::XChartTypeManager >
+{
+public:
+ explicit ChartTypeManager(
+ css::uno::Reference< css::uno::XComponentContext > const & xContext );
+ virtual ~ChartTypeManager() override;
+
+ virtual OUString SAL_CALL
+ getImplementationName()
+ override;
+ virtual sal_Bool SAL_CALL
+ supportsService( const OUString& ServiceName )
+ override;
+ virtual css::uno::Sequence< OUString > SAL_CALL
+ getSupportedServiceNames()
+ override;
+
+protected:
+ // ____ XMultiServiceFactory ____
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) override;
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(
+ const OUString& ServiceSpecifier,
+ const css::uno::Sequence< css::uno::Any >& Arguments ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override;
+
+ // ____ XChartTypeManager ____
+ // currently empty
+
+private:
+ css::uno::Reference< css::uno::XComponentContext >
+ m_xContext;
+};
+
+} // namespace chart
+
+// INCLUDED_CHART2_SOURCE_MODEL_INC_CHARTTYPEMANAGER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/inc/DataSeries.hxx b/chart2/source/model/inc/DataSeries.hxx
new file mode 100644
index 000000000..7a571f1eb
--- /dev/null
+++ b/chart2/source/model/inc/DataSeries.hxx
@@ -0,0 +1,172 @@
+/* -*- 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_MODEL_INC_DATASERIES_HXX
+#define INCLUDED_CHART2_SOURCE_MODEL_INC_DATASERIES_HXX
+
+// UNO types
+#include <com/sun/star/chart2/XDataSeries.hpp>
+#include <com/sun/star/chart2/data/XDataSink.hpp>
+#include <com/sun/star/chart2/data/XDataSource.hpp>
+#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+
+// helper classes
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+
+// STL
+#include <vector>
+#include <map>
+
+#include <MutexContainer.hxx>
+#include <OPropertySet.hxx>
+
+namespace com::sun::star::beans { class XPropertySet; }
+
+namespace chart
+{
+
+namespace impl
+{
+typedef ::cppu::WeakImplHelper<
+ css::chart2::XDataSeries,
+ css::chart2::data::XDataSink,
+ css::chart2::data::XDataSource,
+ css::lang::XServiceInfo,
+ css::chart2::XRegressionCurveContainer,
+ css::util::XCloneable,
+ css::util::XModifyBroadcaster,
+ css::util::XModifyListener >
+ DataSeries_Base;
+}
+
+class DataSeries final :
+ public MutexContainer,
+ public impl::DataSeries_Base,
+ public ::property::OPropertySet
+{
+public:
+ explicit DataSeries();
+ virtual ~DataSeries() override;
+
+ /// XServiceInfo declarations
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
+ /// merge XInterface implementations
+ DECLARE_XINTERFACE()
+ /// merge XTypeProvider implementations
+ DECLARE_XTYPEPROVIDER()
+
+private:
+ explicit DataSeries( const DataSeries & rOther );
+
+ // late initialization to call after copy-constructing
+ void Init( const DataSeries & rOther );
+
+ // ____ XDataSeries ____
+ /// @see css::chart2::XDataSeries
+ virtual css::uno::Reference< css::beans::XPropertySet >
+ SAL_CALL getDataPointByIndex( sal_Int32 nIndex ) override;
+ virtual void SAL_CALL resetDataPoint( sal_Int32 nIndex ) override;
+ virtual void SAL_CALL resetAllDataPoints() override;
+
+ // ____ XDataSink ____
+ /// @see css::chart2::data::XDataSink
+ virtual void SAL_CALL setData( const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >& aData ) override;
+
+ // ____ XDataSource ____
+ /// @see css::chart2::data::XDataSource
+ virtual css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences() override;
+
+ // ____ OPropertySet ____
+ virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+ virtual void SAL_CALL getFastPropertyValue( css::uno::Any& rValue, sal_Int32 nHandle ) const override;
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast
+ ( sal_Int32 nHandle,
+ const css::uno::Any& rValue ) override;
+
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+
+ // ____ XPropertySet ____
+ /// @see css::beans::XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() override;
+
+ /// make original interface function visible again
+ using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue;
+
+ // ____ XRegressionCurveContainer ____
+ /// @see css::chart2::XRegressionCurveContainer
+ virtual void SAL_CALL addRegressionCurve(
+ const css::uno::Reference< css::chart2::XRegressionCurve >& aRegressionCurve ) override;
+ virtual void SAL_CALL removeRegressionCurve(
+ const css::uno::Reference< css::chart2::XRegressionCurve >& aRegressionCurve ) override;
+ virtual css::uno::Sequence< css::uno::Reference< css::chart2::XRegressionCurve > > SAL_CALL getRegressionCurves() override;
+ virtual void SAL_CALL setRegressionCurves(
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XRegressionCurve > >& aRegressionCurves ) override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
+
+ // ____ XModifyBroadcaster ____
+ virtual void SAL_CALL addModifyListener(
+ const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+ virtual void SAL_CALL removeModifyListener(
+ const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+
+ // ____ XModifyListener ____
+ virtual void SAL_CALL modified(
+ const css::lang::EventObject& aEvent ) override;
+
+ // ____ XEventListener (base of XModifyListener) ____
+ virtual void SAL_CALL disposing(
+ const css::lang::EventObject& Source ) override;
+
+ // ____ OPropertySet ____
+ virtual void firePropertyChangeEvent() override;
+ using OPropertySet::disposing;
+
+ void fireModifyEvent();
+
+ typedef std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tDataSequenceContainer;
+ tDataSequenceContainer m_aDataSequences;
+
+ typedef std::map< sal_Int32,
+ css::uno::Reference< css::beans::XPropertySet > > tDataPointAttributeContainer;
+ tDataPointAttributeContainer m_aAttributedDataPoints;
+
+ typedef
+ std::vector< css::uno::Reference< css::chart2::XRegressionCurve > >
+ tRegressionCurveContainerType;
+ tRegressionCurveContainerType m_aRegressionCurves;
+
+ css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
+};
+
+} // namespace chart
+
+// INCLUDED_CHART2_SOURCE_MODEL_INC_DATASERIES_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/inc/Diagram.hxx b/chart2/source/model/inc/Diagram.hxx
new file mode 100644
index 000000000..c909f183f
--- /dev/null
+++ b/chart2/source/model/inc/Diagram.hxx
@@ -0,0 +1,186 @@
+/* -*- 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_MODEL_INC_DIAGRAM_HXX
+#define INCLUDED_CHART2_SOURCE_MODEL_INC_DIAGRAM_HXX
+
+#include <OPropertySet.hxx>
+#include <MutexContainer.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+#include <com/sun/star/chart2/XDiagram.hpp>
+#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
+#include <com/sun/star/chart2/XTitled.hpp>
+#include <com/sun/star/chart/X3DDefaultSetter.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+
+#include <vector>
+
+namespace com::sun::star::beans { struct PropertyValue; }
+namespace com::sun::star::chart2::data { class XDataSource; }
+namespace com::sun::star::uno { class XComponentContext; }
+
+namespace chart
+{
+
+namespace impl
+{
+typedef ::cppu::WeakImplHelper<
+ css::chart2::XDiagram,
+ css::lang::XServiceInfo,
+ css::chart2::XCoordinateSystemContainer,
+ css::chart2::XTitled,
+ css::chart::X3DDefaultSetter,
+ css::util::XModifyBroadcaster,
+ css::util::XModifyListener,
+ css::util::XCloneable >
+ Diagram_Base;
+}
+
+class Diagram final :
+ public MutexContainer,
+ public impl::Diagram_Base,
+ public ::property::OPropertySet
+{
+public:
+ Diagram( css::uno::Reference< css::uno::XComponentContext > const & xContext );
+ virtual ~Diagram() override;
+
+ /// XServiceInfo declarations
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
+ /// merge XInterface implementations
+ DECLARE_XINTERFACE()
+ /// merge XTypeProvider implementations
+ DECLARE_XTYPEPROVIDER()
+
+private:
+ explicit Diagram( const Diagram & rOther );
+
+ // ____ OPropertySet ____
+ virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+
+ // ____ OPropertySet ____
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+
+ // ____ XPropertySet ____
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() override;
+
+ // ____ XFastPropertySet ____
+ virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const css::uno::Any& rValue ) override;
+
+ /// make original interface function visible again
+ using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue;
+
+ virtual void SAL_CALL getFastPropertyValue(
+ css::uno::Any& rValue, sal_Int32 nHandle ) const override;
+
+ // ____ XDiagram ____
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getWall() override;
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getFloor() override;
+ virtual css::uno::Reference< css::chart2::XLegend > SAL_CALL getLegend() override;
+ virtual void SAL_CALL setLegend( const css::uno::Reference<
+ css::chart2::XLegend >& xLegend ) override;
+ virtual css::uno::Reference< css::chart2::XColorScheme > SAL_CALL getDefaultColorScheme() override;
+ virtual void SAL_CALL setDefaultColorScheme(
+ const css::uno::Reference< css::chart2::XColorScheme >& xColorScheme ) override;
+ virtual void SAL_CALL setDiagramData(
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override;
+
+ // ____ XCoordinateSystemContainer ____
+ virtual void SAL_CALL addCoordinateSystem(
+ const css::uno::Reference< css::chart2::XCoordinateSystem >& aCoordSys ) override;
+ virtual void SAL_CALL removeCoordinateSystem(
+ const css::uno::Reference< css::chart2::XCoordinateSystem >& aCoordSys ) override;
+ virtual css::uno::Sequence< css::uno::Reference< css::chart2::XCoordinateSystem > > SAL_CALL getCoordinateSystems() override;
+ virtual void SAL_CALL setCoordinateSystems(
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XCoordinateSystem > >& aCoordinateSystems ) override;
+
+ // ____ XTitled ____
+ virtual css::uno::Reference<
+ css::chart2::XTitle > SAL_CALL getTitleObject() override;
+ virtual void SAL_CALL setTitleObject( const css::uno::Reference<
+ css::chart2::XTitle >& Title ) override;
+
+ // ____ X3DDefaultSetter ____
+ virtual void SAL_CALL set3DSettingsToDefault() override;
+ virtual void SAL_CALL setDefaultRotation() override;
+ virtual void SAL_CALL setDefaultIllumination() override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
+
+ // ____ XModifyBroadcaster ____
+ virtual void SAL_CALL addModifyListener(
+ const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+ virtual void SAL_CALL removeModifyListener(
+ const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+
+ // ____ XModifyListener ____
+ virtual void SAL_CALL modified(
+ const css::lang::EventObject& aEvent ) override;
+
+ // ____ XEventListener (base of XModifyListener) ____
+ virtual void SAL_CALL disposing(
+ const css::lang::EventObject& Source ) override;
+
+ // ____ OPropertySet ____
+ virtual void firePropertyChangeEvent() override;
+ using OPropertySet::disposing;
+
+ void fireModifyEvent();
+
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+
+ typedef
+ std::vector< css::uno::Reference< css::chart2::XCoordinateSystem > >
+ tCoordinateSystemContainerType;
+
+ tCoordinateSystemContainerType m_aCoordSystems;
+
+ css::uno::Reference< css::beans::XPropertySet >
+ m_xWall;
+
+ css::uno::Reference< css::beans::XPropertySet >
+ m_xFloor;
+
+ css::uno::Reference< css::chart2::XTitle >
+ m_xTitle;
+
+ css::uno::Reference< css::chart2::XLegend >
+ m_xLegend;
+
+ css::uno::Reference< css::chart2::XColorScheme >
+ m_xColorScheme;
+
+ css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
+};
+
+} // namespace chart
+
+// INCLUDED_CHART2_SOURCE_MODEL_INC_DIAGRAM_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/inc/PolarCoordinateSystem.hxx b/chart2/source/model/inc/PolarCoordinateSystem.hxx
new file mode 100644
index 000000000..4572201f5
--- /dev/null
+++ b/chart2/source/model/inc/PolarCoordinateSystem.hxx
@@ -0,0 +1,76 @@
+/* -*- 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_MODEL_INC_POLARCOORDINATESYSTEM_HXX
+#define INCLUDED_CHART2_SOURCE_MODEL_INC_POLARCOORDINATESYSTEM_HXX
+
+#include "BaseCoordinateSystem.hxx"
+
+namespace chart
+{
+
+class PolarCoordinateSystem : public BaseCoordinateSystem
+{
+public:
+ explicit PolarCoordinateSystem( sal_Int32 nDimensionCount );
+ explicit PolarCoordinateSystem( const PolarCoordinateSystem & rSource );
+ virtual ~PolarCoordinateSystem() override;
+
+ // ____ XCoordinateSystem ____
+ virtual OUString SAL_CALL getCoordinateSystemType() override;
+ virtual OUString SAL_CALL getViewServiceName() override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
+
+ // ____ XServiceInfo ____
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+};
+
+class PolarCoordinateSystem2d : public PolarCoordinateSystem
+{
+public:
+ explicit PolarCoordinateSystem2d();
+ virtual ~PolarCoordinateSystem2d() override;
+
+ // ____ XServiceInfo ____
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+};
+
+class PolarCoordinateSystem3d : public PolarCoordinateSystem
+{
+public:
+ explicit PolarCoordinateSystem3d();
+ virtual ~PolarCoordinateSystem3d() override;
+
+ // ____ XServiceInfo ____
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+};
+
+} // namespace chart
+
+// INCLUDED_CHART2_SOURCE_MODEL_INC_POLARCOORDINATESYSTEM_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/inc/StockBar.hxx b/chart2/source/model/inc/StockBar.hxx
new file mode 100644
index 000000000..b1247e584
--- /dev/null
+++ b/chart2/source/model/inc/StockBar.hxx
@@ -0,0 +1,96 @@
+/* -*- 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_MODEL_INC_STOCKBAR_HXX
+#define INCLUDED_CHART2_SOURCE_MODEL_INC_STOCKBAR_HXX
+
+#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <MutexContainer.hxx>
+#include <OPropertySet.hxx>
+
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+
+namespace chart
+{
+
+namespace impl
+{
+typedef ::cppu::WeakImplHelper<
+ css::util::XCloneable,
+ css::util::XModifyBroadcaster,
+ css::util::XModifyListener >
+ StockBar_Base;
+}
+
+class StockBar final :
+ public MutexContainer,
+ public impl::StockBar_Base,
+ public ::property::OPropertySet
+{
+public:
+ explicit StockBar( bool bRisingCourse );
+ virtual ~StockBar() override;
+
+ /// merge XInterface implementations
+ DECLARE_XINTERFACE()
+
+private:
+ explicit StockBar( const StockBar & rOther );
+
+ // ____ OPropertySet ____
+ virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
+
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+
+ // ____ XPropertySet ____
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
+
+ // ____ XModifyBroadcaster ____
+ virtual void SAL_CALL addModifyListener(
+ const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+ virtual void SAL_CALL removeModifyListener(
+ const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
+
+ // ____ XModifyListener ____
+ virtual void SAL_CALL modified(
+ const css::lang::EventObject& aEvent ) override;
+
+ // ____ XEventListener (base of XModifyListener) ____
+ virtual void SAL_CALL disposing(
+ const css::lang::EventObject& Source ) override;
+
+ // ____ OPropertySet ____
+ virtual void firePropertyChangeEvent() override;
+ using OPropertySet::disposing;
+
+ css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
+};
+
+} // namespace chart
+
+// INCLUDED_CHART2_SOURCE_MODEL_INC_STOCKBAR_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/inc/XMLFilter.hxx b/chart2/source/model/inc/XMLFilter.hxx
new file mode 100644
index 000000000..4f4ba101a
--- /dev/null
+++ b/chart2/source/model/inc/XMLFilter.hxx
@@ -0,0 +1,171 @@
+/* -*- 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_MODEL_INC_XMLFILTER_HXX
+#define INCLUDED_CHART2_SOURCE_MODEL_INC_XMLFILTER_HXX
+
+#include <cppuhelper/implbase.hxx>
+#include <com/sun/star/document/XFilter.hpp>
+#include <com/sun/star/document/XImporter.hpp>
+#include <com/sun/star/document/XExporter.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/io/XActiveDataSource.hpp>
+#include <osl/mutex.hxx>
+#include <vcl/errcode.hxx>
+
+namespace com::sun::star::beans { class XPropertySet; }
+namespace com::sun::star::uno { class XComponentContext; }
+namespace com::sun::star::xml::sax { class XWriter; }
+namespace com::sun::star::lang { class XMultiComponentFactory; }
+
+namespace com::sun::star {
+ namespace embed {
+ class XStorage;
+ }
+ namespace xml::sax {
+ class XFastParser;
+ }
+ namespace document {
+ class XGraphicStorageHandler;
+ }
+}
+
+namespace chart
+{
+
+class XMLFilter : public
+ ::cppu::WeakImplHelper<
+ css::document::XFilter,
+ css::document::XExporter,
+ css::document::XImporter,
+ css::lang::XServiceInfo >
+{
+public:
+ explicit XMLFilter( css::uno::Reference< css::uno::XComponentContext > const & xContext );
+ virtual ~XMLFilter() override;
+
+ /// XServiceInfo declarations
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
+protected:
+ // ____ XFilter ____
+ virtual sal_Bool SAL_CALL filter(
+ const css::uno::Sequence< css::beans::PropertyValue >& aDescriptor ) override;
+ virtual void SAL_CALL cancel() override;
+
+ // ____ XImporter ____
+ virtual void SAL_CALL setTargetDocument(
+ const css::uno::Reference< css::lang::XComponent >& Document ) override;
+
+ // ____ XExporter ____
+ virtual void SAL_CALL setSourceDocument(
+ const css::uno::Reference< css::lang::XComponent >& Document ) override;
+
+ void setDocumentHandler(const OUString& _sDocumentHandler) { m_sDocumentHandler = _sDocumentHandler; }
+
+ virtual OUString getMediaType(bool _bOasis);
+
+ /** fills the oasis flag only when a filtername was set
+ *
+ * \param _rMediaDescriptor
+ * \param _rOutOASIS
+ */
+ virtual void isOasisFormat(const css::uno::Sequence< css::beans::PropertyValue >& _rMediaDescriptor, bool & _rOutOASIS );
+
+private:
+ // methods
+
+ /// @return a warning code, or 0 for successful operation
+ ErrCode impl_Import( const css::uno::Reference< css::lang::XComponent > & xDocumentComp,
+ const css::uno::Sequence< css::beans::PropertyValue > & aMediaDescriptor );
+ /// @return a warning code, or 0 for successful operation
+ ErrCode impl_ImportStream(
+ const OUString & rStreamName,
+ const OUString & rServiceName,
+ const css::uno::Reference< css::embed::XStorage > & xStorage,
+ const css::uno::Reference< css::lang::XMultiComponentFactory > & xFactory,
+ const css::uno::Reference<css::document::XGraphicStorageHandler> & xGraphicStorageHandler,
+ css::uno::Reference< css::beans::XPropertySet > const & xPropSet );
+
+ /// @return a warning code, or 0 for successful operation
+ ErrCode impl_Export( const css::uno::Reference< css::lang::XComponent > & xDocumentComp,
+ const css::uno::Sequence< css::beans::PropertyValue > & aMediaDescriptor );
+ /// @return a warning code, or 0 for successful operation
+ ErrCode impl_ExportStream(
+ const OUString & rStreamName,
+ const OUString & rServiceName,
+ const css::uno::Reference< css::embed::XStorage > & xStorage,
+ const css::uno::Reference< css::xml::sax::XWriter >& xActiveDataSource,
+ const css::uno::Reference< css::lang::XMultiServiceFactory > & xFactory,
+ const css::uno::Sequence< css::uno::Any > & rFilterProperties );
+
+ // members
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ css::uno::Reference< css::lang::XComponent > m_xTargetDoc;
+ css::uno::Reference< css::lang::XComponent > m_xSourceDoc;
+
+ css::uno::Sequence<css::beans::PropertyValue> m_aMediaDescriptor;
+
+ OUString m_sDocumentHandler; // when set it will be set as doc handler
+
+ volatile bool m_bCancelOperation;
+ ::osl::Mutex m_aMutex;
+};
+
+class XMLReportFilterHelper : public XMLFilter
+{
+ virtual void isOasisFormat(const css::uno::Sequence< css::beans::PropertyValue >& _rMediaDescriptor,
+ bool & _rOutOASIS ) override;
+public:
+ explicit XMLReportFilterHelper( css::uno::Reference< css::uno::XComponentContext > const & _xContext )
+ :XMLFilter(_xContext)
+ {}
+protected:
+ virtual OUString SAL_CALL
+ getImplementationName() override
+ {
+ return "com.sun.star.comp.chart2.report.XMLFilter";
+ }
+ // ____ XImporter ____
+ virtual void SAL_CALL setTargetDocument(
+ const css::uno::Reference< css::lang::XComponent >& Document ) override
+ {
+ setDocumentHandler( "com.sun.star.comp.report.ImportDocumentHandler" );
+ XMLFilter::setTargetDocument(Document);
+ }
+
+ // ____ XExporter ____
+ virtual void SAL_CALL setSourceDocument(
+ const css::uno::Reference< css::lang::XComponent >& Document ) override
+ {
+ setDocumentHandler( "com.sun.star.comp.report.ExportDocumentHandler" );
+ XMLFilter::setSourceDocument(Document);
+ }
+
+ virtual OUString getMediaType(bool _bOasis) override;
+};
+
+} // namespace chart
+
+// INCLUDED_CHART2_SOURCE_MODEL_INC_XMLFILTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */