summaryrefslogtreecommitdiff
path: root/chart2/source/inc
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/inc')
-rw-r--r--chart2/source/inc/Axis.hxx145
-rw-r--r--chart2/source/inc/AxisHelper.hxx146
-rw-r--r--chart2/source/inc/AxisIndexDefines.hxx5
-rw-r--r--chart2/source/inc/BaseCoordinateSystem.hxx129
-rw-r--r--chart2/source/inc/BaseGFXHelper.hxx36
-rw-r--r--chart2/source/inc/CachedDataSequence.hxx22
-rw-r--r--chart2/source/inc/ChangingResource.hxx4
-rw-r--r--chart2/source/inc/CharacterProperties.hxx14
-rw-r--r--chart2/source/inc/ChartModelHelper.hxx55
-rw-r--r--chart2/source/inc/ChartResourceGroupDlgs.hxx8
-rw-r--r--chart2/source/inc/ChartResourceGroups.hxx31
-rw-r--r--chart2/source/inc/ChartType.hxx162
-rw-r--r--chart2/source/inc/ChartTypeDialogController.hxx86
-rw-r--r--chart2/source/inc/ChartTypeHelper.hxx78
-rw-r--r--chart2/source/inc/ChartTypeTemplate.hxx283
-rw-r--r--chart2/source/inc/ChartTypeTemplateProvider.hxx24
-rw-r--r--chart2/source/inc/ChartViewHelper.hxx24
-rw-r--r--chart2/source/inc/CloneHelper.hxx25
-rw-r--r--chart2/source/inc/ColorPerPointHelper.hxx13
-rw-r--r--chart2/source/inc/CommonConverters.hxx59
-rw-r--r--chart2/source/inc/CommonFunctors.hxx27
-rw-r--r--chart2/source/inc/ConfigColorScheme.hxx10
-rw-r--r--chart2/source/inc/ControllerLockGuard.hxx41
-rw-r--r--chart2/source/inc/DataInterpreter.hxx154
-rw-r--r--chart2/source/inc/DataSeries.hxx190
-rw-r--r--chart2/source/inc/DataSeriesHelper.hxx160
-rw-r--r--chart2/source/inc/DataSeriesProperties.hxx (renamed from chart2/source/inc/MutexContainer.hxx)35
-rw-r--r--chart2/source/inc/DataSource.hxx15
-rw-r--r--chart2/source/inc/DataSourceHelper.hxx43
-rw-r--r--chart2/source/inc/DataTable.hxx87
-rw-r--r--chart2/source/inc/Diagram.hxx381
-rw-r--r--chart2/source/inc/DiagramHelper.hxx238
-rw-r--r--chart2/source/inc/DisposeHelper.hxx25
-rw-r--r--chart2/source/inc/ErrorBar.hxx18
-rw-r--r--chart2/source/inc/EventListenerHelper.hxx16
-rw-r--r--chart2/source/inc/ExplicitCategoriesProvider.hxx29
-rw-r--r--chart2/source/inc/ExponentialRegressionCurveCalculator.hxx8
-rw-r--r--chart2/source/inc/FastPropertyIdRanges.hxx23
-rw-r--r--chart2/source/inc/FillProperties.hxx10
-rw-r--r--chart2/source/inc/FormattedString.hxx142
-rw-r--r--chart2/source/inc/FormattedStringHelper.hxx19
-rw-r--r--chart2/source/inc/GridProperties.hxx98
-rw-r--r--chart2/source/inc/InternalData.hxx13
-rw-r--r--chart2/source/inc/InternalDataProvider.hxx23
-rw-r--r--chart2/source/inc/LabeledDataSequence.hxx23
-rw-r--r--chart2/source/inc/Legend.hxx106
-rw-r--r--chart2/source/inc/LegendHelper.hxx16
-rw-r--r--chart2/source/inc/LifeTime.hxx60
-rw-r--r--chart2/source/inc/LinePropertiesHelper.hxx13
-rw-r--r--chart2/source/inc/LinearRegressionCurveCalculator.hxx11
-rw-r--r--chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx8
-rw-r--r--chart2/source/inc/MeanValueRegressionCurveCalculator.hxx8
-rw-r--r--chart2/source/inc/MediaDescriptorHelper.hxx8
-rw-r--r--chart2/source/inc/ModifyListenerCallBack.hxx (renamed from chart2/source/inc/TrueGuard.hxx)41
-rw-r--r--chart2/source/inc/ModifyListenerHelper.hxx136
-rw-r--r--chart2/source/inc/MovingAverageRegressionCurveCalculator.hxx10
-rw-r--r--chart2/source/inc/NameContainer.hxx19
-rw-r--r--chart2/source/inc/NumberFormatterWrapper.hxx10
-rw-r--r--chart2/source/inc/OPropertySet.hxx91
-rw-r--r--chart2/source/inc/ObjectIdentifier.hxx145
-rw-r--r--chart2/source/inc/PolynomialRegressionCurveCalculator.hxx5
-rw-r--r--chart2/source/inc/PopupRequest.hxx28
-rw-r--r--chart2/source/inc/PotentialRegressionCurveCalculator.hxx8
-rw-r--r--chart2/source/inc/PropertyHelper.hxx23
-rw-r--r--chart2/source/inc/RangeHighlighter.hxx29
-rw-r--r--chart2/source/inc/ReferenceSizeProvider.hxx16
-rw-r--r--chart2/source/inc/RegressionCalculationHelper.hxx16
-rw-r--r--chart2/source/inc/RegressionCurveCalculator.hxx52
-rw-r--r--chart2/source/inc/RegressionCurveHelper.hxx111
-rw-r--r--chart2/source/inc/RegressionCurveModel.hxx242
-rw-r--r--chart2/source/inc/RelativePositionHelper.hxx7
-rw-r--r--chart2/source/inc/RelativeSizeHelper.hxx15
-rw-r--r--chart2/source/inc/ResId.hxx10
-rw-r--r--chart2/source/inc/Scaling.hxx12
-rw-r--r--chart2/source/inc/SceneProperties.hxx10
-rw-r--r--chart2/source/inc/StackMode.hxx6
-rw-r--r--chart2/source/inc/StatisticsHelper.hxx50
-rw-r--r--chart2/source/inc/ThreeDHelper.hxx59
-rw-r--r--chart2/source/inc/Title.hxx109
-rw-r--r--chart2/source/inc/TitleHelper.hxx50
-rw-r--r--chart2/source/inc/UncachedDataSequence.hxx35
-rw-r--r--chart2/source/inc/UserDefinedProperties.hxx9
-rw-r--r--chart2/source/inc/WeakListenerAdapter.hxx25
-rw-r--r--chart2/source/inc/WrappedDefaultProperty.hxx8
-rw-r--r--chart2/source/inc/WrappedDirectStateProperty.hxx13
-rw-r--r--chart2/source/inc/WrappedIgnoreProperty.hxx10
-rw-r--r--chart2/source/inc/WrappedProperty.hxx11
-rw-r--r--chart2/source/inc/WrappedPropertySet.hxx18
-rw-r--r--chart2/source/inc/XMLRangeHelper.hxx13
-rw-r--r--chart2/source/inc/charttoolsdllapi.hxx5
-rw-r--r--chart2/source/inc/chartview/ChartSfxItemIds.hxx30
-rw-r--r--chart2/source/inc/chartview/DataPointSymbolSupplier.hxx15
-rw-r--r--chart2/source/inc/chartview/DrawModelWrapper.hxx29
-rw-r--r--chart2/source/inc/chartview/ExplicitScaleValues.hxx39
-rw-r--r--chart2/source/inc/chartview/ExplicitValueProvider.hxx39
-rw-r--r--chart2/source/inc/chartview/chartviewdllapi.hxx5
-rw-r--r--chart2/source/inc/defines.hxx7
-rw-r--r--chart2/source/inc/res_BarGeometry.hxx5
-rw-r--r--chart2/source/inc/servicenames.hxx52
-rw-r--r--chart2/source/inc/servicenames_charttypes.hxx39
-rw-r--r--chart2/source/inc/servicenames_coosystems.hxx13
101 files changed, 3476 insertions, 1661 deletions
diff --git a/chart2/source/inc/Axis.hxx b/chart2/source/inc/Axis.hxx
new file mode 100644
index 000000000000..e36acdbad7aa
--- /dev/null
+++ b/chart2/source/inc/Axis.hxx
@@ -0,0 +1,145 @@
+/* -*- 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 .
+ */
+#pragma once
+
+#include "OPropertySet.hxx"
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/chart2/XAxis.hpp>
+#include <com/sun/star/chart2/XTitled.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include "ModifyListenerHelper.hxx"
+#include "charttoolsdllapi.hxx"
+#include "PropertyHelper.hxx"
+
+namespace chart
+{
+class GridProperties;
+class Title;
+
+namespace impl
+{
+typedef ::cppu::WeakImplHelper<
+ css::chart2::XAxis,
+ css::chart2::XTitled,
+ css::lang::XServiceInfo,
+ css::util::XCloneable,
+ css::util::XModifyBroadcaster,
+ css::util::XModifyListener >
+ Axis_Base;
+}
+
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) Axis final :
+ public impl::Axis_Base,
+ public ::property::OPropertySet
+{
+public:
+ explicit Axis();
+ virtual ~Axis() 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 Axis( const Axis & rOther );
+
+ // late initialization to call after copy-constructing
+ void Init();
+
+ // ____ OPropertySet ____
+ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
+
+ // ____ OPropertySet ____
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+
+public:
+ // ____ XPropertySet ____
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() override;
+
+ // ____ XAxis ____
+ virtual void SAL_CALL setScaleData( const css::chart2::ScaleData& rScaleData ) override;
+ virtual css::chart2::ScaleData SAL_CALL getScaleData() override;
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getGridProperties() override;
+ virtual css::uno::Sequence< css::uno::Reference< css::beans::XPropertySet > > SAL_CALL getSubGridProperties() override;
+ virtual css::uno::Sequence< css::uno::Reference< css::beans::XPropertySet > > SAL_CALL getSubTickProperties() 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;
+
+ // ____ XCloneable ____
+ // Note: the coordinate systems are not cloned!
+ 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;
+
+ rtl::Reference< ::chart::Title > getTitleObject2() const;
+ void setTitleObject( const rtl::Reference< ::chart::Title >& xNewTitle );
+
+ rtl::Reference< ::chart::GridProperties > getGridProperties2();
+ std::vector< rtl::Reference< ::chart::GridProperties > > getSubGridProperties2();
+
+private:
+ // ____ 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();
+
+ void AllocateSubGrids();
+
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+
+ css::chart2::ScaleData m_aScaleData;
+
+ rtl::Reference< ::chart::GridProperties > m_xGrid;
+
+ std::vector< rtl::Reference< ::chart::GridProperties > > m_aSubGridProperties;
+
+ rtl::Reference< ::chart::Title > m_xTitle;
+};
+
+OOO_DLLPUBLIC_CHARTTOOLS const ::chart::tPropertyValueMap & StaticAxisDefaults();
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/AxisHelper.hxx b/chart2/source/inc/AxisHelper.hxx
index 2097d216bc60..f39e54c1fc00 100644
--- a/chart2/source/inc/AxisHelper.hxx
+++ b/chart2/source/inc/AxisHelper.hxx
@@ -16,11 +16,13 @@
* 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_INC_AXISHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_AXISHELPER_HXX
+#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
#include <com/sun/star/chart2/ScaleData.hpp>
+#include <rtl/ref.hxx>
+#include "GridProperties.hxx"
#include <vector>
@@ -38,8 +40,12 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
+class Axis;
+class BaseCoordinateSystem;
+class ChartType;
+class Diagram;
-class OOO_DLLPUBLIC_CHARTTOOLS AxisHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) AxisHelper
{
public:
static css::uno::Reference< css::chart2::XScaling > createLinearScaling();
@@ -52,157 +58,155 @@ public:
static bool isLogarithmic( const css::uno::Reference< css::chart2::XScaling >& xScaling );
static void checkDateAxis( css::chart2::ScaleData& rScale, ExplicitCategoriesProvider* pExplicitCategoriesProvider, bool bChartTypeAllowsDateAxis );
- static css::chart2::ScaleData getDateCheckedScale( const css::uno::Reference< css::chart2::XAxis >& xAxis, ChartModel& rModel );
+ static css::chart2::ScaleData getDateCheckedScale( const rtl::Reference< ::chart::Axis >& xAxis, ChartModel& rModel );
static sal_Int32 getExplicitNumberFormatKeyForAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XCoordinateSystem >& xCorrespondingCoordinateSystem
- , const css::uno::Reference< css::chart2::XChartDocument>& xChartDoc
+ const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCorrespondingCoordinateSystem
+ , const rtl::Reference< ::chart::ChartModel>& xChartDoc
, bool bSearchForParallelAxisIfNothingIsFound );
- static css::uno::Reference<
- css::chart2::XAxis >
+ static rtl::Reference< ::chart::Axis >
createAxis( sal_Int32 nDimensionIndex, bool bMainAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ , const rtl::Reference< ::chart::Diagram >& xDiagram
, const css::uno::Reference< css::uno::XComponentContext >& xContext
, ReferenceSizeProvider * pRefSizeProvider = nullptr );
- static css::uno::Reference< css::chart2::XAxis >
+ static rtl::Reference< ::chart::Axis >
createAxis(
sal_Int32 nDimensionIndex
, sal_Int32 nAxisIndex // 0==main or 1==secondary axis
- , const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
+ , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys
, const css::uno::Reference< css::uno::XComponentContext > & xContext
, ReferenceSizeProvider * pRefSizeProvider = nullptr );
static void showAxis( sal_Int32 nDimensionIndex, bool bMainAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ , const rtl::Reference< ::chart::Diagram >& xDiagram
, const css::uno::Reference< css::uno::XComponentContext >& xContext
, ReferenceSizeProvider * pRefSizeProvider = nullptr );
static void showGrid( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
static void hideAxis( sal_Int32 nDimensionIndex, bool bMainAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
static void hideGrid( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
static bool isAxisShown( sal_Int32 nDimensionIndex, bool bMainAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
static bool isGridShown( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
- static void makeAxisVisible( const css::uno::Reference< css::chart2::XAxis >& xAxis );
- static void makeGridVisible( const css::uno::Reference< css::beans::XPropertySet >& xGridProperties );
+ static void makeAxisVisible( const rtl::Reference< ::chart::Axis >& xAxis );
+ static void makeGridVisible( const rtl::Reference< ::chart::GridProperties >& xGridProperties );
- static void makeAxisInvisible( const css::uno::Reference< css::chart2::XAxis >& xAxis );
- static void makeGridInvisible( const css::uno::Reference< css::beans::XPropertySet >& xGridProperties );
+ static void makeAxisInvisible( const rtl::Reference< ::chart::Axis >& xAxis );
+ static void makeGridInvisible( const rtl::Reference< ::chart::GridProperties >& xGridProperties );
- static void hideAxisIfNoDataIsAttached( const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram);
+ static void hideAxisIfNoDataIsAttached( const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::Diagram >& xDiagram);
- SAL_DLLPRIVATE static bool areAxisLabelsVisible( const css::uno::Reference< css::beans::XPropertySet >& xAxisProperties );
- static bool isAxisVisible( const css::uno::Reference< css::chart2::XAxis >& xAxis );
- static bool isGridVisible( const css::uno::Reference< css::beans::XPropertySet >& xGridProperties );
+ SAL_DLLPRIVATE static bool areAxisLabelsVisible( const rtl::Reference< ::chart::Axis >& xAxisProperties );
+ static bool isAxisVisible( const rtl::Reference< ::chart::Axis >& xAxis );
+ static bool isGridVisible( const rtl::Reference< ::chart::GridProperties >& xGridProperties );
- static css::uno::Reference< css::chart2::XCoordinateSystem >
+ static rtl::Reference< ::chart::BaseCoordinateSystem >
getCoordinateSystemByIndex(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ const rtl::Reference< ::chart::Diagram >& xDiagram
, sal_Int32 nIndex );
- static css::uno::Reference< css::chart2::XCoordinateSystem >
+ static rtl::Reference< ::chart::BaseCoordinateSystem >
getCoordinateSystemOfAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
- static css::uno::Reference< css::chart2::XAxis >
+ static rtl::Reference< ::chart::Axis >
getAxis( sal_Int32 nDimensionIndex, bool bMainAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
- static css::uno::Reference< css::chart2::XAxis >
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
+ static rtl::Reference< ::chart::Axis >
getAxis( sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex
- , const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys );
+ , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys );
- static css::uno::Reference< css::chart2::XAxis >
- getCrossingMainAxis( const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys );
+ static rtl::Reference< ::chart::Axis >
+ getCrossingMainAxis( const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys );
- static css::uno::Reference< css::chart2::XAxis >
- getParallelAxis( const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ static rtl::Reference< ::chart::Axis >
+ getParallelAxis( const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
- static css::uno::Reference< css::beans::XPropertySet >
- getGridProperties( const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
+ static rtl::Reference< ::chart::GridProperties >
+ getGridProperties( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys
, sal_Int32 nDimensionIndex
, sal_Int32 nAxisIndex //0: Primary axis, 1: secondary axis
, sal_Int32 nSubGridIndex //-1: Main Grid; 0: First SubGrid etc
);
static sal_Int32 getDimensionIndexOfAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::Diagram >& xDiagram );
static bool getIndicesForAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
+ const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys
, sal_Int32& rOutDimensionIndex, sal_Int32& rOutAxisIndex );
static bool getIndicesForAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::Diagram >& xDiagram
, sal_Int32& rOutCooSysIndex, sal_Int32& rOutDimensionIndex, sal_Int32& rOutAxisIndex );
/** @param bOnlyVisible if </TRUE>, only axes with property "Show" set to
</sal_True> are returned
*/
- static css::uno::Sequence< css::uno::Reference< css::chart2::XAxis > >
- getAllAxesOfDiagram( const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ static std::vector< rtl::Reference< ::chart::Axis > >
+ getAllAxesOfDiagram( const rtl::Reference< ::chart::Diagram >& xDiagram
, bool bOnlyVisible = false );
/** @param bOnlyVisible if </TRUE>, only axes with property "Show" set to
</sal_True> are returned
*/
- SAL_DLLPRIVATE static std::vector< css::uno::Reference< css::chart2::XAxis > >
- getAllAxesOfCoordinateSystem( const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
+ SAL_DLLPRIVATE static std::vector< rtl::Reference< ::chart::Axis > >
+ getAllAxesOfCoordinateSystem( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys
, bool bOnlyVisible = false );
- static css::uno::Sequence< css::uno::Reference< css::beans::XPropertySet > >
- getAllGrids( const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ static std::vector< rtl::Reference< ::chart::GridProperties > >
+ getAllGrids( const rtl::Reference< ::chart::Diagram >& xDiagram );
static void getAxisOrGridPossibilities( css::uno::Sequence< sal_Bool >& rPossibilityList
- , const css::uno::Reference< css::chart2::XDiagram>& xDiagram, bool bAxis=true );
+ , const rtl::Reference< ::chart::Diagram>& xDiagram, bool bAxis=true );
- static void getAxisOrGridExcistence( css::uno::Sequence< sal_Bool >& rExcistenceList
- , const css::uno::Reference< css::chart2::XDiagram>& xDiagram, bool bAxis=true );
+ static void getAxisOrGridExistence( css::uno::Sequence< sal_Bool >& rExistenceList
+ , const rtl::Reference< ::chart::Diagram>& xDiagram, bool bAxis=true );
- static bool changeVisibilityOfGrids( const css::uno::Reference< css::chart2::XDiagram>& xDiagram
+ static bool changeVisibilityOfGrids( const rtl::Reference< ::chart::Diagram>& xDiagram
, const css::uno::Sequence< sal_Bool >& rOldExistenceList
, const css::uno::Sequence< sal_Bool >& rNewExistenceList );
- static bool changeVisibilityOfAxes( const css::uno::Reference< css::chart2::XDiagram>& xDiagram
+ static bool changeVisibilityOfAxes( const rtl::Reference< ::chart::Diagram>& xDiagram
, const css::uno::Sequence< sal_Bool >& rOldExistenceList
, const css::uno::Sequence< sal_Bool >& rNewExistenceList
, const css::uno::Reference< css::uno::XComponentContext >& xContext
, ReferenceSizeProvider * pRefSizeProvider );
- static bool shouldAxisBeDisplayed( const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys );
- static bool isSecondaryYAxisNeeded( const css::uno::Reference<
- css::chart2::XCoordinateSystem >& xCooSys );
+ static bool shouldAxisBeDisplayed( const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys );
+ static bool isSecondaryYAxisNeeded( const rtl::Reference<
+ ::chart::BaseCoordinateSystem >& xCooSys );
- static css::uno::Reference< css::chart2::XChartType >
- getChartTypeByIndex( const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys,
+ static rtl::Reference< ::chart::ChartType >
+ getChartTypeByIndex( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys,
sal_Int32 nIndex );
- static void setRTLAxisLayout( const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys );
+ static void setRTLAxisLayout( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys );
- static css::uno::Reference< css::chart2::XChartType >
- getFirstChartTypeWithSeriesAttachedToAxisIndex( const css::uno::Reference< css::chart2::XDiagram >& xDiagram, const sal_Int32 nAttachedAxisIndex );
+ static rtl::Reference< ::chart::ChartType >
+ getFirstChartTypeWithSeriesAttachedToAxisIndex( const rtl::Reference< ::chart::Diagram >& xDiagram, const sal_Int32 nAttachedAxisIndex );
static bool isAxisPositioningEnabled();
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/AxisIndexDefines.hxx b/chart2/source/inc/AxisIndexDefines.hxx
index 779f8fc7ff96..5e6d32d691b5 100644
--- a/chart2/source/inc/AxisIndexDefines.hxx
+++ b/chart2/source/inc/AxisIndexDefines.hxx
@@ -16,8 +16,7 @@
* 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_INC_AXISINDEXDEFINES_HXX
-#define INCLUDED_CHART2_SOURCE_INC_AXISINDEXDEFINES_HXX
+#pragma once
#include <sal/types.h>
@@ -28,6 +27,4 @@ const sal_Int32 SECONDARY_AXIS_INDEX = 1;
} // namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/BaseCoordinateSystem.hxx b/chart2/source/inc/BaseCoordinateSystem.hxx
new file mode 100644
index 000000000000..71f226abcd51
--- /dev/null
+++ b/chart2/source/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 .
+ */
+#pragma once
+
+#include "OPropertySet.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 "ModifyListenerHelper.hxx"
+
+#include <vector>
+
+namespace chart
+{
+class Axis;
+class ChartType;
+
+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 SAL_DLLPUBLIC_RTTI BaseCoordinateSystem :
+ public impl::BaseCoordinateSystem_Base,
+ public ::property::OPropertySet
+{
+public:
+ BaseCoordinateSystem( sal_Int32 nDimensionCount );
+ explicit BaseCoordinateSystem( const BaseCoordinateSystem & rSource );
+ virtual ~BaseCoordinateSystem() override;
+
+ // ____ OPropertySet ____
+ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 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()
+
+ // ____ 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 ) final 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;
+
+ void setAxisByDimension( sal_Int32 nDimension, const rtl::Reference< ::chart::Axis >& xAxis, sal_Int32 nIndex );
+ const rtl::Reference< ::chart::Axis > & getAxisByDimension2(sal_Int32 nDimension, sal_Int32 nIndex ) const;
+
+ void setChartTypes( const std::vector< rtl::Reference< ::chart::ChartType > >& aChartTypes );
+ const std::vector< rtl::Reference<::chart::ChartType > > & getChartTypes2() const { return m_aChartTypes; }
+
+protected:
+
+ // ____ 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();
+
+private:
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+ sal_Int32 m_nDimensionCount;
+ typedef std::vector< std::vector< rtl::Reference< ::chart::Axis > > > tAxisVecVecType;
+ tAxisVecVecType m_aAllAxis; //outer sequence is the dimension; inner sequence is the axis index that indicates main or secondary axis
+ std::vector< rtl::Reference<::chart::ChartType > > m_aChartTypes;
+};
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/BaseGFXHelper.hxx b/chart2/source/inc/BaseGFXHelper.hxx
index 014371bfa20e..4ba4a65c8250 100644
--- a/chart2/source/inc/BaseGFXHelper.hxx
+++ b/chart2/source/inc/BaseGFXHelper.hxx
@@ -16,9 +16,9 @@
* 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_INC_BASEGFXHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_BASEGFXHELPER_HXX
+#pragma once
+#include <config_options.h>
#include <basegfx/matrix/b3dhommatrix.hxx>
#include <basegfx/range/b2irectangle.hxx>
#include <basegfx/tuple/b3dtuple.hxx>
@@ -34,25 +34,27 @@
namespace com::sun::star::awt { struct Rectangle; }
namespace com::sun::star::drawing { struct PolyPolygonShape3D; }
-namespace chart
-{
-namespace BaseGFXHelper
+namespace chart::BaseGFXHelper
{
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DRange getBoundVolume( const css::drawing::PolyPolygonShape3D& rPolyPoly );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B3DRange getBoundVolume( const css::drawing::PolyPolygonShape3D& rPolyPoly );
+
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B3DRange getBoundVolume( const std::vector<std::vector<css::drawing::Position3D>>& rPolyPoly );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B2IRectangle makeRectangle(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B2IRectangle makeRectangle(
const css::awt::Point& rPosition,
const css::awt::Size& rSize );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B2IRectangle makeRectangle( const css::awt::Rectangle& rRect );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B2IRectangle makeRectangle( const css::awt::Rectangle& rRect );
-OOO_DLLPUBLIC_CHARTTOOLS css::awt::Point B2IRectangleToAWTPoint(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::awt::Point B2IRectangleToAWTPoint(
const ::basegfx::B2IRectangle& rB2IRectangle );
-OOO_DLLPUBLIC_CHARTTOOLS css::awt::Size B2IRectangleToAWTSize(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::awt::Size B2IRectangleToAWTSize(
const ::basegfx::B2IRectangle& rB2IRectangle );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::awt::Rectangle toAwtRectangle(const basegfx::B2IRectangle& rB2IRectangle);
+
::basegfx::B3DVector Direction3DToB3DVector(
const css::drawing::Direction3D& rDirection );
@@ -65,25 +67,21 @@ css::drawing::Direction3D B3DVectorToDirection3D(
css::drawing::Position3D B3DVectorToPosition3D(
const ::basegfx::B3DVector& rB3DVector );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DHomMatrix HomogenMatrixToB3DHomMatrix(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B3DHomMatrix HomogenMatrixToB3DHomMatrix(
const css::drawing::HomogenMatrix & rHomogenMatrix );
-OOO_DLLPUBLIC_CHARTTOOLS
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
css::drawing::HomogenMatrix B3DHomMatrixToHomogenMatrix(
const ::basegfx::B3DHomMatrix & rB3DMatrix );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple GetRotationFromMatrix(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B3DTuple GetRotationFromMatrix(
const ::basegfx::B3DHomMatrix & rB3DMatrix );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple GetScaleFromMatrix(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ::basegfx::B3DTuple GetScaleFromMatrix(
const ::basegfx::B3DHomMatrix & rB3DMatrix );
void ReduceToRotationMatrix( ::basegfx::B3DHomMatrix & rB3DMatrix );
-} // namespace BaseGFXHelper
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_INC_BASEGFXHELPER_HXX
-#endif
+} // namespace chart::BaseGFXHelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/CachedDataSequence.hxx b/chart2/source/inc/CachedDataSequence.hxx
index 90acd6dbfa63..513907c2429d 100644
--- a/chart2/source/inc/CachedDataSequence.hxx
+++ b/chart2/source/inc/CachedDataSequence.hxx
@@ -16,14 +16,12 @@
* 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_INC_CACHEDDATASEQUENCE_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CACHEDDATASEQUENCE_HXX
+#pragma once
// helper classes
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
#include <comphelper/uno3.hxx>
-#include <comphelper/broadcasthelper.hxx>
-#include <comphelper/propertycontainer.hxx>
+#include <comphelper/propertycontainer2.hxx>
#include <comphelper/proparrhlp.hxx>
// interfaces and types
@@ -33,7 +31,7 @@
#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include "ModifyListenerHelper.hxx"
namespace com::sun::star::uno { class XComponentContext; }
@@ -42,7 +40,7 @@ namespace chart
namespace impl
{
-typedef ::cppu::WeakComponentImplHelper<
+typedef ::comphelper::WeakComponentImplHelper<
css::chart2::data::XDataSequence,
css::chart2::data::XNumericalDataSequence,
css::chart2::data::XTextualDataSequence,
@@ -57,8 +55,7 @@ typedef ::cppu::WeakComponentImplHelper<
* This sequence object does store actual values within, hence "cached".
*/
class CachedDataSequence final :
- public ::comphelper::OMutexAndBroadcastHelper,
- public ::comphelper::OPropertyContainer,
+ public ::comphelper::OPropertyContainer2,
public ::comphelper::OPropertyArrayUsageHelper< CachedDataSequence >,
public impl::CachedDataSequence_Base
{
@@ -94,7 +91,7 @@ private:
/// @see css::beans::XPropertySet
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
/// @see ::comphelper::OPropertySetHelper
- virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+ virtual ::cppu::IPropertyArrayHelper& getInfoHelper() override;
/// @see ::comphelper::OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override;
@@ -157,12 +154,9 @@ private:
css::uno::Sequence< double > m_aNumericalSequence;
css::uno::Sequence< OUString > m_aTextualSequence;
css::uno::Sequence< css::uno::Any > m_aMixedSequence;
- css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
};
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_CACHEDDATASEQUENCE_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ChangingResource.hxx b/chart2/source/inc/ChangingResource.hxx
index ca39d92b873d..bde5b0923400 100644
--- a/chart2/source/inc/ChangingResource.hxx
+++ b/chart2/source/inc/ChangingResource.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_CHANGINGRESOURCE_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_CHANGINGRESOURCE_HXX
+#pragma once
namespace chart
{
@@ -43,6 +42,5 @@ protected:
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/CharacterProperties.hxx b/chart2/source/inc/CharacterProperties.hxx
index 7385bfe12020..40367f9b943d 100644
--- a/chart2/source/inc/CharacterProperties.hxx
+++ b/chart2/source/inc/CharacterProperties.hxx
@@ -16,8 +16,7 @@
* 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_INC_CHARACTERPROPERTIES_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CHARACTERPROPERTIES_HXX
+#pragma once
#include "PropertyHelper.hxx"
#include "FastPropertyIdRanges.hxx"
@@ -121,20 +120,17 @@ namespace CharacterProperties
FAST_PROPERTY_ID_END_CHAR_PROP
};
- OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddPropertiesToVector(
std::vector< css::beans::Property > & rOutProperties );
- OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
- OOO_DLLPUBLIC_CHARTTOOLS bool IsCharacterPropertyHandle( sal_Int32 nHandle );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool IsCharacterPropertyHandle( sal_Int32 nHandle );
- OOO_DLLPUBLIC_CHARTTOOLS css::awt::FontDescriptor createFontDescriptorFromPropertySet(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::awt::FontDescriptor createFontDescriptorFromPropertySet(
const css::uno::Reference< css::beans::XMultiPropertySet > & xMultiPropSet );
}
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_CHARACTERPROPERTIES_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ChartModelHelper.hxx b/chart2/source/inc/ChartModelHelper.hxx
index 0a8192706ef0..ec904ce8a7be 100644
--- a/chart2/source/inc/ChartModelHelper.hxx
+++ b/chart2/source/inc/ChartModelHelper.hxx
@@ -16,11 +16,12 @@
* 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_INC_CHARTMODELHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CHARTMODELHELPER_HXX
+#pragma once
+#include <config_options.h>
#include <com/sun/star/awt/Size.hpp>
#include "charttoolsdllapi.hxx"
+#include <rtl/ref.hxx>
#include <vector>
@@ -37,53 +38,41 @@ namespace com::sun::star::view { class XSelectionSupplier; }
namespace chart
{
+class BaseCoordinateSystem;
+class ChartType;
+class DataSeries;
+class Diagram;
+class InternalDataProvider;
-class OOO_DLLPUBLIC_CHARTTOOLS ChartModelHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ChartModelHelper
{
public:
- static css::uno::Reference< css::chart2::data::XRangeHighlighter > createRangeHighlighter(
- const css::uno::Reference< css::view::XSelectionSupplier >& xSelectionSupplier );
+ static rtl::Reference< InternalDataProvider > createInternalDataProvider(
+ const rtl::Reference<::chart::ChartModel>& xChartDoc, bool bConnectToModel );
- static css::uno::Reference< css::chart2::data::XDataProvider > createInternalDataProvider(
- const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc, bool bConnectToModel );
+ static rtl::Reference< ::chart::BaseCoordinateSystem >
+ getFirstCoordinateSystem( const rtl::Reference<::chart::ChartModel>& xModel );
- static css::uno::Reference< css::chart2::XDiagram >
- findDiagram( const css::uno::Reference< css::frame::XModel >& xModel );
+ static std::vector< rtl::Reference< ::chart::DataSeries > >
+ getDataSeries( const rtl::Reference< ::chart::ChartModel > & xModel );
- static css::uno::Reference< css::chart2::XDiagram >
- findDiagram( const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc );
-
- static css::uno::Reference< css::chart2::XCoordinateSystem >
- getFirstCoordinateSystem( ChartModel& rModel );
-
- static css::uno::Reference< css::chart2::XCoordinateSystem >
- getFirstCoordinateSystem( const css::uno::Reference< css::frame::XModel >& xModel );
-
- SAL_DLLPRIVATE static std::vector< css::uno::Reference< css::chart2::XDataSeries > >
- getDataSeries( ChartModel& rModel );
-
- SAL_DLLPRIVATE static std::vector< css::uno::Reference< css::chart2::XDataSeries > >
- getDataSeries( const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc );
- static std::vector< css::uno::Reference< css::chart2::XDataSeries > >
- getDataSeries( const css::uno::Reference< css::frame::XModel > & xModel );
-
- static css::uno::Reference< css::chart2::XChartType >
+ static rtl::Reference< ChartType >
getChartTypeOfSeries(
- const css::uno::Reference< css::frame::XModel >& xModel
- , const css::uno::Reference< css::chart2::XDataSeries >& xGivenDataSeries );
+ const rtl::Reference<::chart::ChartModel>& xModel
+ , const rtl::Reference< ::chart::DataSeries >& xGivenDataSeries );
static css::awt::Size getDefaultPageSize();
- static css::awt::Size getPageSize( const css::uno::Reference< css::frame::XModel >& xModel );
+ static css::awt::Size getPageSize( const rtl::Reference<::chart::ChartModel>& xModel );
- static void triggerRangeHighlighting( const css::uno::Reference< css::frame::XModel >& xModel );
+ static void triggerRangeHighlighting( const rtl::Reference<::chart::ChartModel>& xModel );
- static bool isIncludeHiddenCells( const css::uno::Reference< css::frame::XModel >& xChartModel );
+ static bool isIncludeHiddenCells( const rtl::Reference<::chart::ChartModel>& xChartModel );
static bool setIncludeHiddenCells( bool bIncludeHiddenCells, ChartModel& rModel);
+
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ChartResourceGroupDlgs.hxx b/chart2/source/inc/ChartResourceGroupDlgs.hxx
index 755e7af15345..e54585488971 100644
--- a/chart2/source/inc/ChartResourceGroupDlgs.hxx
+++ b/chart2/source/inc/ChartResourceGroupDlgs.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CHARTRESOURCEGROUPDLGS_HXX
-#define INCLUDED_CHART2_SOURCE_CHARTRESOURCEGROUPDLGS_HXX
+#pragma once
#include <vcl/weld.hxx>
@@ -26,7 +25,7 @@ namespace chart
{
class ChartTypeParameter;
-class SplinePropertiesDialog : public weld::GenericDialogController
+class SplinePropertiesDialog final : public weld::GenericDialogController
{
public:
explicit SplinePropertiesDialog(weld::Window* pParent);
@@ -44,7 +43,7 @@ private:
std::unique_ptr<weld::SpinButton> m_xMF_SplineOrder;
};
-class SteppedPropertiesDialog : public weld::GenericDialogController
+class SteppedPropertiesDialog final : public weld::GenericDialogController
{
public:
explicit SteppedPropertiesDialog(weld::Window* pParent);
@@ -60,6 +59,5 @@ private:
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ChartResourceGroups.hxx b/chart2/source/inc/ChartResourceGroups.hxx
index f3b3e2f4b2c5..ecb886f194af 100644
--- a/chart2/source/inc/ChartResourceGroups.hxx
+++ b/chart2/source/inc/ChartResourceGroups.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CHARTRESOURCEGROUPS_HXX
-#define INCLUDED_CHART2_SOURCE_CHARTRESOURCEGROUPS_HXX
+#pragma once
#include "res_BarGeometry.hxx"
#include "ChangingResource.hxx"
@@ -28,7 +27,6 @@
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
class SplinePropertiesDialog;
class SteppedPropertiesDialog;
@@ -39,7 +37,7 @@ enum
POS_3DSCHEME_REALISTIC = 1
};
-class Dim3DLookResourceGroup : public ChangingResource
+class Dim3DLookResourceGroup final : public ChangingResource
{
public:
explicit Dim3DLookResourceGroup(weld::Builder* pBuilder);
@@ -50,7 +48,7 @@ public:
void fillParameter(ChartTypeParameter& rParameter);
private:
- DECL_LINK(Dim3DLookCheckHdl, weld::ToggleButton&, void);
+ DECL_LINK(Dim3DLookCheckHdl, weld::Toggleable&, void);
DECL_LINK(SelectSchemeHdl, weld::ComboBox&, void);
private:
@@ -58,7 +56,7 @@ private:
std::unique_ptr<weld::ComboBox> m_xLB_Scheme;
};
-class SortByXValuesResourceGroup : public ChangingResource
+class SortByXValuesResourceGroup final : public ChangingResource
{
public:
explicit SortByXValuesResourceGroup(weld::Builder* pBuilder);
@@ -69,13 +67,13 @@ public:
void fillParameter(ChartTypeParameter& rParameter);
private:
- DECL_LINK(SortByXValuesCheckHdl, weld::ToggleButton&, void);
+ DECL_LINK(SortByXValuesCheckHdl, weld::Toggleable&, void);
private:
std::unique_ptr<weld::CheckButton> m_xCB_XValueSorting;
};
-class StackingResourceGroup : public ChangingResource
+class StackingResourceGroup final : public ChangingResource
{
public:
explicit StackingResourceGroup(weld::Builder* pBuilder);
@@ -86,8 +84,8 @@ public:
void fillParameter(ChartTypeParameter& rParameter);
private:
- DECL_LINK(StackingChangeHdl, weld::ToggleButton&, void);
- DECL_LINK(StackingEnableHdl, weld::ToggleButton&, void);
+ DECL_LINK(StackingChangeHdl, weld::Toggleable&, void);
+ DECL_LINK(StackingEnableHdl, weld::Toggleable&, void);
private:
std::unique_ptr<weld::CheckButton> m_xCB_Stacked;
@@ -100,7 +98,7 @@ private:
#define POS_LINETYPE_SMOOTH 1
#define POS_LINETYPE_STEPPED 2
-class SplineResourceGroup : public ChangingResource
+class SplineResourceGroup final : public ChangingResource
{
public:
explicit SplineResourceGroup(weld::Builder* pBuilder, weld::Window* pParent);
@@ -114,19 +112,19 @@ private:
DECL_LINK(LineTypeChangeHdl, weld::ComboBox&, void);
DECL_LINK(SplineDetailsDialogHdl, weld::Button&, void);
DECL_LINK(SteppedDetailsDialogHdl, weld::Button&, void);
- SplinePropertiesDialog& getSplinePropertiesDialog();
- SteppedPropertiesDialog& getSteppedPropertiesDialog();
+ std::shared_ptr<SplinePropertiesDialog> getSplinePropertiesDialog();
+ std::shared_ptr<SteppedPropertiesDialog> getSteppedPropertiesDialog();
private:
weld::Window* m_pParent;
std::unique_ptr<weld::Label> m_xFT_LineType;
std::unique_ptr<weld::ComboBox> m_xLB_LineType;
std::unique_ptr<weld::Button> m_xPB_DetailsDialog;
- std::unique_ptr<SplinePropertiesDialog> m_xSplinePropertiesDialog;
- std::unique_ptr<SteppedPropertiesDialog> m_xSteppedPropertiesDialog;
+ std::shared_ptr<SplinePropertiesDialog> m_xSplinePropertiesDialog;
+ std::shared_ptr<SteppedPropertiesDialog> m_xSteppedPropertiesDialog;
};
-class GeometryResourceGroup : public ChangingResource
+class GeometryResourceGroup final : public ChangingResource
{
public:
explicit GeometryResourceGroup(weld::Builder* pBuilder);
@@ -144,6 +142,5 @@ private:
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ChartType.hxx b/chart2/source/inc/ChartType.hxx
new file mode 100644
index 000000000000..fa55cf05694f
--- /dev/null
+++ b/chart2/source/inc/ChartType.hxx
@@ -0,0 +1,162 @@
+/* -*- 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 .
+ */
+#pragma once
+
+#include "OPropertySet.hxx"
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/chart2/XChartType.hpp>
+#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <rtl/ref.hxx>
+
+#include <vector>
+#include "charttoolsdllapi.hxx"
+
+namespace chart
+{
+class BaseCoordinateSystem;
+class DataSeries;
+class ModifyEventForwarder;
+
+enum
+{
+ PROP_PIECHARTTYPE_USE_RINGS,
+ PROP_PIECHARTTYPE_3DRELATIVEHEIGHT,
+ PROP_PIECHARTTYPE_SUBTYPE // none, of-bar, of-pie
+};
+
+
+
+namespace impl
+{
+typedef ::cppu::WeakImplHelper<
+ css::lang::XServiceInfo,
+ css::chart2::XChartType,
+ css::chart2::XDataSeriesContainer,
+ css::util::XCloneable,
+ css::util::XModifyBroadcaster,
+ css::util::XModifyListener >
+ ChartType_Base;
+}
+
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ChartType :
+ public impl::ChartType_Base,
+ public ::property::OPropertySet
+{
+public:
+ explicit ChartType();
+ virtual ~ChartType() override;
+
+ /// merge XInterface implementations
+ DECLARE_XINTERFACE()
+
+ explicit ChartType( const ChartType & rOther );
+
+ // ____ XChartType ____
+ // still abstract ! implement !
+ virtual OUString SAL_CALL getChartType() override = 0;
+ virtual css::uno::Reference< css::chart2::XCoordinateSystem > SAL_CALL
+ createCoordinateSystem( ::sal_Int32 DimensionCount ) final override;
+ virtual css::uno::Sequence< OUString > SAL_CALL
+ getSupportedMandatoryRoles() override;
+ virtual css::uno::Sequence< OUString > SAL_CALL
+ getSupportedOptionalRoles() override;
+ virtual OUString SAL_CALL getRoleOfSequenceForSeriesLabel() override;
+ virtual css::uno::Sequence< OUString > SAL_CALL
+ getSupportedPropertyRoles() override;
+
+ // ____ XDataSeriesContainer ____
+ virtual void SAL_CALL addDataSeries(
+ const css::uno::Reference< css::chart2::XDataSeries >& aDataSeries ) override;
+ virtual void SAL_CALL removeDataSeries(
+ const css::uno::Reference< css::chart2::XDataSeries >& aDataSeries ) override;
+ virtual css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > > SAL_CALL getDataSeries() override;
+ virtual void SAL_CALL setDataSeries(
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > >& aDataSeries ) 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;
+
+ virtual rtl::Reference<ChartType> cloneChartType() const = 0;
+
+ void addDataSeries(
+ const rtl::Reference< ::chart::DataSeries >& aDataSeries );
+ void removeDataSeries(
+ const rtl::Reference< ::chart::DataSeries >& aDataSeries );
+ void setDataSeries(
+ const std::vector< rtl::Reference< ::chart::DataSeries > >& aDataSeries );
+ const std::vector< rtl::Reference< ::chart::DataSeries > > & getDataSeries2() const { return m_aDataSeries; }
+
+ virtual rtl::Reference< ::chart::BaseCoordinateSystem >
+ createCoordinateSystem2( sal_Int32 DimensionCount );
+
+protected:
+
+ // ____ 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;
+
+ void fireModifyEvent();
+
+ // ____ OPropertySet ____
+ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+
+ virtual void firePropertyChangeEvent() override;
+ using OPropertySet::disposing;
+
+ // ____ XPropertySet ____
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() override;
+
+ /// merge XTypeProvider implementations
+ DECLARE_XTYPEPROVIDER()
+
+protected:
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+
+private:
+ void impl_addDataSeriesWithoutNotification(
+ const rtl::Reference< ::chart::DataSeries >& aDataSeries );
+
+private:
+ typedef
+ std::vector< rtl::Reference< ::chart::DataSeries > > tDataSeriesContainerType;
+
+ // --- mutable members: the following members need mutex guard ---
+
+ tDataSeriesContainerType m_aDataSeries;
+
+ bool m_bNotifyChanges;
+};
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ChartTypeDialogController.hxx b/chart2/source/inc/ChartTypeDialogController.hxx
index f65ce90a5008..4c03ff269e1f 100644
--- a/chart2/source/inc/ChartTypeDialogController.hxx
+++ b/chart2/source/inc/ChartTypeDialogController.hxx
@@ -17,8 +17,7 @@
* 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
+#pragma once
#include <sal/config.h>
@@ -30,63 +29,27 @@
#include <com/sun/star/chart2/CurveStyle.hpp>
#include <vcl/weld.hxx>
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace beans
+namespace com::sun::star::beans
{
class XPropertySet;
}
-}
-}
-}
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace chart2
+namespace com::sun::star::chart2
{
class XChartDocument;
}
-}
-}
-}
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace chart2
-{
-class XChartTypeTemplate;
-}
-}
-}
-}
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace lang
+namespace com::sun::star::lang
{
class XMultiServiceFactory;
}
-}
-}
-}
class ValueSet;
namespace chart
{
+class ChartModel;
+class ChartTypeTemplate;
+class ChartTypeManager;
+
enum GlobalStackMode
{
GlobalStackMode_NONE,
@@ -151,7 +114,7 @@ public:
virtual void showExtraControls(weld::Builder* pBuilder);
virtual void hideExtraControls() const;
virtual void
- fillExtraControls(const css::uno::Reference<css::chart2::XChartDocument>& xChartModel,
+ fillExtraControls(const rtl::Reference<::chart::ChartModel>& xChartModel,
const css::uno::Reference<css::beans::XPropertySet>& xTemplateProps) const;
/// @throws css::uno::RuntimeException
virtual void setTemplateProperties(
@@ -168,10 +131,10 @@ public:
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;
+ const rtl::Reference<::chart::ChartModel>& xChartModel);
+ rtl::Reference<::chart::ChartTypeTemplate>
+ getCurrentTemplate(const ChartTypeParameter& rParameter,
+ const rtl::Reference<::chart::ChartTypeManager>& xTemplateManager) const;
protected:
bool bSupportsXAxisWithValues;
@@ -190,7 +153,7 @@ public:
virtual void adjustSubTypeAndEnableControls(ChartTypeParameter& rParameter) override;
};
-class ColumnChartDialogController : public ColumnOrBarChartDialogController_Base
+class ColumnChartDialogController final : public ColumnOrBarChartDialogController_Base
{
public:
ColumnChartDialogController();
@@ -203,7 +166,7 @@ public:
const ChartTypeParameter& rParameter) override;
};
-class BarChartDialogController : public ColumnOrBarChartDialogController_Base
+class BarChartDialogController final : public ColumnOrBarChartDialogController_Base
{
public:
BarChartDialogController();
@@ -216,7 +179,7 @@ public:
const ChartTypeParameter& rParameter) override;
};
-class PieChartDialogController : public ChartTypeDialogController
+class PieChartDialogController final : public ChartTypeDialogController
{
public:
PieChartDialogController();
@@ -232,7 +195,7 @@ public:
virtual bool shouldShow_3DLookControl() const override;
};
-class LineChartDialogController : public ChartTypeDialogController
+class LineChartDialogController final : public ChartTypeDialogController
{
public:
LineChartDialogController();
@@ -250,7 +213,7 @@ public:
virtual bool shouldShow_SplineControl() const override;
};
-class XYChartDialogController : public ChartTypeDialogController
+class XYChartDialogController final : public ChartTypeDialogController
{
public:
XYChartDialogController();
@@ -267,7 +230,7 @@ public:
virtual bool shouldShow_SortByXValuesResourceGroup() const override;
};
-class AreaChartDialogController : public ChartTypeDialogController
+class AreaChartDialogController final : public ChartTypeDialogController
{
public:
AreaChartDialogController();
@@ -284,7 +247,7 @@ public:
virtual bool shouldShow_3DLookControl() const override;
};
-class NetChartDialogController : public ChartTypeDialogController
+class NetChartDialogController final : public ChartTypeDialogController
{
public:
NetChartDialogController();
@@ -300,7 +263,7 @@ public:
virtual bool shouldShow_StackingControl() const override;
};
-class StockChartDialogController : public ChartTypeDialogController
+class StockChartDialogController final : public ChartTypeDialogController
{
public:
StockChartDialogController();
@@ -314,7 +277,7 @@ public:
virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
};
-class CombiColumnLineChartDialogController : public ChartTypeDialogController
+class CombiColumnLineChartDialogController final : public ChartTypeDialogController
{
public:
CombiColumnLineChartDialogController();
@@ -329,7 +292,7 @@ public:
virtual void showExtraControls(weld::Builder* pBuilder) override;
virtual void hideExtraControls() const override;
virtual void fillExtraControls(
- const css::uno::Reference<css::chart2::XChartDocument>& xChartModel,
+ const rtl::Reference<::chart::ChartModel>& xChartModel,
const css::uno::Reference<css::beans::XPropertySet>& xTemplateProps) const override;
virtual void setTemplateProperties(
@@ -343,7 +306,7 @@ private:
std::unique_ptr<weld::SpinButton> m_xMF_NumberOfLines;
};
-class BubbleChartDialogController : public ChartTypeDialogController
+class BubbleChartDialogController final : public ChartTypeDialogController
{
public:
BubbleChartDialogController();
@@ -358,6 +321,5 @@ public:
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ChartTypeHelper.hxx b/chart2/source/inc/ChartTypeHelper.hxx
index e749dd5b4f75..7366e4689773 100644
--- a/chart2/source/inc/ChartTypeHelper.hxx
+++ b/chart2/source/inc/ChartTypeHelper.hxx
@@ -17,72 +17,76 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_INC_CHARTTYPEHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CHARTTYPEHELPER_HXX
+#pragma once
+#include <config_options.h>
#include <com/sun/star/drawing/Direction3D.hpp>
#include "charttoolsdllapi.hxx"
+#include "ChartType.hxx"
+#include <rtl/ref.hxx>
namespace com::sun::star::chart2 { class XChartType; }
namespace com::sun::star::chart2 { class XDataSeries; }
namespace chart
{
+class ChartType;
+class DataSeries;
-class OOO_DLLPUBLIC_CHARTTOOLS ChartTypeHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ChartTypeHelper
{
public:
- static bool isSupportingGeometryProperties( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingStatisticProperties( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingRegressionProperties(const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingMainAxis( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex );
- static bool isSupportingSecondaryAxis( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingAreaProperties( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingSymbolProperties( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingOverlapAndGapWidthProperties( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingBarConnectors( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingRightAngledAxes( const css::uno::Reference< css::chart2::XChartType >& xChartType );
- static bool isSupportingAxisSideBySide( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
- static bool isSupportingStartingAngle( const css::uno::Reference< css::chart2::XChartType >& xChartType );
+ static bool isSupportingGeometryProperties( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingStatisticProperties( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingRegressionProperties(const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingMainAxis( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex );
+ static bool isSupportingSecondaryAxis( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingAreaProperties( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingSymbolProperties( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingOverlapAndGapWidthProperties( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingBarConnectors( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingRightAngledAxes( const rtl::Reference< ::chart::ChartType >& xChartType );
+ static bool isSupportingAxisSideBySide( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingStartingAngle( const rtl::Reference< ::chart::ChartType >& xChartType );
//starting value for bars or baseline for areas for example
- static bool isSupportingBaseValue( const css::uno::Reference< css::chart2::XChartType >& xChartType );
- static bool isSupportingAxisPositioning( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex );
- static bool isSupportingDateAxis( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionIndex );
- static bool isSupportingComplexCategory( const css::uno::Reference< css::chart2::XChartType >& xChartType );
- static bool isSupportingCategoryPositioning( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool isSupportingBaseValue( const rtl::Reference< ::chart::ChartType >& xChartType );
+ static bool isSupportingAxisPositioning( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount, sal_Int32 nDimensionIndex );
+ static bool isSupportingDateAxis( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionIndex );
+ static bool isSupportingComplexCategory( const rtl::Reference< ::chart::ChartType >& xChartType );
+ static bool isSupportingCategoryPositioning( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nDimensionCount );
+ static bool shiftCategoryPosAtXAxisPerDefault( const rtl::Reference< ::chart::ChartType >& xChartType );
//returns sequence of css::chart::DataLabelPlacement
static css::uno::Sequence < sal_Int32 > getSupportedLabelPlacements(
- const css::uno::Reference< css::chart2::XChartType >& xChartType, bool bSwapXAndY
- , const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+ const rtl::Reference< ::chart::ChartType >& xChartType, bool bSwapXAndY
+ , const rtl::Reference< ::chart::DataSeries >& xSeries );
//returns sequence of css::chart::MissingValueTreatment
static css::uno::Sequence < sal_Int32 > getSupportedMissingValueTreatments(
- const css::uno::Reference< css::chart2::XChartType >& xChartType );
+ const rtl::Reference< ::chart::ChartType >& xChartType );
- SAL_DLLPRIVATE static css::drawing::Direction3D getDefaultSimpleLightDirection( const css::uno::Reference< css::chart2::XChartType >& xChartType );
- SAL_DLLPRIVATE static css::drawing::Direction3D getDefaultRealisticLightDirection( const css::uno::Reference< css::chart2::XChartType >& xChartType );
- SAL_DLLPRIVATE static sal_Int32 getDefaultDirectLightColor( bool bSimple, const css::uno::Reference< css::chart2::XChartType >& xChartType );
- SAL_DLLPRIVATE static sal_Int32 getDefaultAmbientLightColor( bool bSimple, const css::uno::Reference< css::chart2::XChartType >& xChartType );
- static sal_Int32 getNumberOfDisplayedSeries( const css::uno::Reference< css::chart2::XChartType >& xChartType, sal_Int32 nNumberOfSeries );
- SAL_DLLPRIVATE static bool noBordersForSimpleScheme( const css::uno::Reference< css::chart2::XChartType >& xChartType );
+ SAL_DLLPRIVATE static css::drawing::Direction3D getDefaultSimpleLightDirection( const rtl::Reference< ::chart::ChartType >& xChartType );
+ SAL_DLLPRIVATE static css::drawing::Direction3D getDefaultRealisticLightDirection( const rtl::Reference< ::chart::ChartType >& xChartType );
+ SAL_DLLPRIVATE static sal_Int32 getDefaultDirectLightColor( bool bSimple, const rtl::Reference< ::chart::ChartType >& xChartType );
+ SAL_DLLPRIVATE static sal_Int32 getDefaultAmbientLightColor( bool bSimple, const rtl::Reference< ::chart::ChartType >& xChartType );
+ static sal_Int32 getNumberOfDisplayedSeries( const rtl::Reference< ::chart::ChartType >& xChartType, sal_Int32 nNumberOfSeries );
+ SAL_DLLPRIVATE static bool noBordersForSimpleScheme( const rtl::Reference< ::chart::ChartType >& xChartType );
- static bool isSeriesInFrontOfAxisLine( const css::uno::Reference< css::chart2::XChartType >& xChartType );
+ static bool isSeriesInFrontOfAxisLine( const rtl::Reference< ::chart::ChartType >& xChartType );
static sal_Int32 //one of css::chart2::AxisType
- getAxisType( const css::uno::Reference< css::chart2::XChartType >& xChartType
+ getAxisType( const rtl::Reference< ::chart::ChartType >& xChartType
, sal_Int32 nDimensionIndex );
- static OUString getRoleOfSequenceForYAxisNumberFormatDetection( const css::uno::Reference<
- css::chart2::XChartType >& xChartType );
+ static OUString getRoleOfSequenceForYAxisNumberFormatDetection( const rtl::Reference<
+ ::chart::ChartType >& xChartType );
- static OUString getRoleOfSequenceForDataLabelNumberFormatDetection( const css::uno::Reference<
- css::chart2::XChartType >& xChartType );
+ static OUString getRoleOfSequenceForDataLabelNumberFormatDetection( const rtl::Reference<
+ ::chart::ChartType >& xChartType );
- static bool isSupportingOnlyDeepStackingFor3D( const css::uno::Reference< css::chart2::XChartType >& xChartType );
+ static bool isSupportingOnlyDeepStackingFor3D( const rtl::Reference< ::chart::ChartType >& xChartType );
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ChartTypeTemplate.hxx b/chart2/source/inc/ChartTypeTemplate.hxx
new file mode 100644
index 000000000000..ffd7cca26599
--- /dev/null
+++ b/chart2/source/inc/ChartTypeTemplate.hxx
@@ -0,0 +1,283 @@
+/* -*- 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 .
+ */
+#pragma once
+
+#include <cppuhelper/implbase.hxx>
+#include "DataInterpreter.hxx"
+#include "StackMode.hxx"
+#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
+#include <com/sun/star/lang/XServiceName.hpp>
+#include "charttoolsdllapi.hxx"
+#include <rtl/ref.hxx>
+#include <vector>
+
+namespace com::sun::star::beans { struct PropertyValue; }
+namespace com::sun::star::chart2 { class XChartType; }
+namespace com::sun::star::chart2 { class XCoordinateSystem; }
+namespace com::sun::star::chart2 { class XCoordinateSystemContainer; }
+namespace com::sun::star::chart2 { class XDataSeries; }
+namespace com::sun::star::chart2 { class XDiagram; }
+namespace com::sun::star::chart2::data { class XDataSource; }
+namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
+namespace com::sun::star::uno { class XComponentContext; }
+
+namespace chart
+{
+class BaseCoordinateSystem;
+class ChartType;
+class DataSeries;
+class Diagram;
+class LabeledDataSequence;
+
+/** For creating diagrams and modifying existing diagrams. A base class that
+ implements XChartTypeTemplate and offers some tooling for classes that
+ derive from this class.
+
+ createDiagramByDataSource
+
+ This does the following steps using some virtual helper-methods, that may be
+ overridden by derived classes:
+
+ * creates an XDiagram via service-factory.
+
+ * convert the given XDataSource to a sequence of XDataSeries using the
+ method createDataSeries(). In this class the DataInterpreter helper class
+ is used to create a standard interpretation (just y-values).
+
+ * call applyDefaultStyle() for all XDataSeries in order to apply default
+ styles. In this class the series get the system-wide default colors as
+ "Color" property.
+
+ * call applyStyle() for applying chart-type specific styles to all series.
+ The default implementation is empty.
+
+ * call createCoordinateSystems() and apply them to the diagram. As
+ default one cartesian system with Scales using a linear Scaling is
+ created.
+
+ * createChartTypes() is called in order to define the structure of the
+ diagram. For details see comment of this function. As default this
+ method creates a tree where all series appear in one branch with the chart
+ type determined by getChartTypeForNewSeries(). The stacking is determined
+ via the method getStackMode().
+
+ * create an XLegend via the global service factory, set it at the diagram.
+ */
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ChartTypeTemplate : public ::cppu::WeakImplHelper<
+ css::chart2::XChartTypeTemplate,
+ css::lang::XServiceName >
+{
+public:
+ explicit ChartTypeTemplate( css::uno::Reference< css::uno::XComponentContext > const & xContext,
+ OUString aServiceName );
+ virtual ~ChartTypeTemplate() override;
+
+ rtl::Reference< ::chart::Diagram > createDiagramByDataSource2(
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments );
+
+ // ____ XChartTypeTemplate ____
+ virtual css::uno::Reference< css::chart2::XDiagram > SAL_CALL createDiagramByDataSource(
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override final;
+ /// denotes if the chart needs categories at the first scale
+ virtual sal_Bool SAL_CALL supportsCategories() override;
+ virtual void SAL_CALL changeDiagram(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override final;
+ virtual void SAL_CALL changeDiagramData(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override final;
+ virtual sal_Bool SAL_CALL matchesTemplate(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
+ sal_Bool bAdaptProperties ) override final;
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getDataInterpreter() override final;
+ virtual css::uno::Reference< ::css::chart2::XChartType > SAL_CALL getChartTypeForNewSeries(
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aFormerlyUsedChartTypes ) override final;
+ virtual void SAL_CALL applyStyle(
+ const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+ ::sal_Int32 nChartTypeIndex,
+ ::sal_Int32 nSeriesIndex,
+ ::sal_Int32 nSeriesCount ) override final;
+ virtual void SAL_CALL resetStyles(
+ const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override final;
+
+ void changeDiagram(
+ const rtl::Reference< ::chart::Diagram >& xDiagram );
+ void changeDiagramData(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments );
+ virtual bool matchesTemplate2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram,
+ bool bAdaptProperties );
+ virtual rtl::Reference< ::chart::ChartType >
+ getChartTypeForNewSeries2( const std::vector<
+ rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) = 0;
+ virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter2();
+ virtual void applyStyle2(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
+ ::sal_Int32 nChartTypeIndex,
+ ::sal_Int32 nSeriesIndex,
+ ::sal_Int32 nSeriesCount );
+ virtual void resetStyles2(
+ const rtl::Reference< ::chart::Diagram >& xDiagram );
+
+ /// @throws css::uno::RuntimeException
+ void applyStyles(
+ const rtl::Reference< ::chart::Diagram >& xDiagram );
+
+ // ____ XServiceName ____
+ virtual OUString SAL_CALL getServiceName() override;
+
+ // Methods to override for automatic creation
+
+ /// returns 2 by default. Supported are 2 and 3
+ virtual sal_Int32 getDimension() const;
+
+ /** returns StackMode::NONE by default. This is a global flag used for all
+ series of a specific chart type. If percent stacking is supported, the
+ percent stacking mode is retrieved from the first chart type (index 0)
+
+ @param nChartTypeIndex denotes the index of the charttype in means
+ defined by the template creation order, i.e., 0 means the first
+ chart type that a template creates.
+ */
+ virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const;
+
+ virtual rtl::Reference< ::chart::ChartType >
+ getChartTypeForIndex( sal_Int32 nChartTypeIndex ) = 0;
+
+ virtual bool isSwapXAndY() const;
+
+ // Methods for creating the diagram piecewise
+
+ /** Allows derived classes to manipulate the diagrams whole, like changing
+ the wall color. The default implementation is empty. It is called by
+ FillDiagram which is called by createDiagramByDataSource and
+ changeDiagram
+ */
+ virtual void adaptDiagram(
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
+
+ /** Creates a 2d or 3d cartesian coordinate system with mathematically
+ oriented, linear scales with auto-min/max. If the given
+ CoordinateSystemContainer is not empty, those coordinate system should
+ be reused.
+
+ <p>The dimension depends on the value returned by getDimension().</p>
+ */
+ virtual void createCoordinateSystems(
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
+
+ /** Sets categories at the scales of dimension 0 and the percent stacking at
+ the scales of dimension 1 of all given coordinate systems.
+
+ <p>Called by FillDiagram.</p>
+ */
+ virtual void adaptScales(
+ const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > & aCooSysSeq,
+ const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & xCategories );
+
+ /** create a data series tree, that fits the requirements of the chart type.
+
+ <p>As default, this creates a tree with the following structure:</p>
+
+ <pre>
+ root
+ |
+ +-- chart type (determined by getChartTypeForNewSeries())
+ |
+ +-- category (DiscreteStackableScaleGroup using scale 0)
+ |
+ +-- values (ContinuousStackableScaleGroup using scale 1)
+ |
+ +-- series 0
+ |
+ +-- series 1
+ |
+ ...
+ |
+ +.. series n-1
+ </pre>
+
+ <p>If there are less than two scales available the returned tree is
+ empty.</p>
+ */
+ virtual void createChartTypes(
+ const std::vector<
+ std::vector<
+ rtl::Reference<
+ ::chart::DataSeries > > > & aSeriesSeq,
+ const std::vector<
+ rtl::Reference<
+ ::chart::BaseCoordinateSystem > > & rCoordSys,
+ const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq
+ );
+
+ /** create axes and add them to the given container. If there are already
+ compatible axes in the container these should be maintained.
+
+ <p>As default, this method creates as many axes as there are dimensions
+ in the given first coordinate system. Each of the axis
+ represents one of the dimensions of the coordinate systems. If there are series
+ requesting a secondary axes a secondary y axes is added</p>
+ */
+ void createAxes(
+ const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > & rCoordSys );
+
+ /** Give the number of requested axis per dimension here. Default is one
+ axis for each dimension
+ */
+ virtual sal_Int32 getAxisCountByDimension( sal_Int32 nDimension );
+
+ /** adapt properties of existing axes and remove superfluous axes
+ */
+ virtual void adaptAxes(
+ const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > & rCoordSys );
+
+ const css::uno::Reference< css::uno::XComponentContext >&
+ GetComponentContext() const { return m_xContext;}
+
+ static void copyPropertiesFromOldToNewCoordinateSystem(
+ const std::vector< rtl::Reference< ChartType > > & rOldChartTypesSeq,
+ const rtl::Reference< ChartType > & xNewChartType );
+
+protected:
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ mutable rtl::Reference< ::chart::DataInterpreter > m_xDataInterpreter;
+
+private:
+ const OUString m_aServiceName;
+
+private:
+ /** modifies the given diagram
+ */
+ void FillDiagram( const rtl::Reference< ::chart::Diagram >& xDiagram,
+ const std::vector<
+ std::vector<
+ rtl::Reference<
+ ::chart::DataSeries > > > & aSeriesSeq,
+ const css::uno::Reference< css::chart2::data::XLabeledDataSequence >& xCategories,
+ const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq);
+};
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ChartTypeTemplateProvider.hxx b/chart2/source/inc/ChartTypeTemplateProvider.hxx
index fc4517d1bc4e..400b1c8e2819 100644
--- a/chart2/source/inc/ChartTypeTemplateProvider.hxx
+++ b/chart2/source/inc/ChartTypeTemplateProvider.hxx
@@ -17,35 +17,21 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_CHARTTYPETEMPLATEPROVIDER_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_CHARTTYPETEMPLATEPROVIDER_HXX
+#pragma once
-#include <com/sun/star/uno/Reference.hxx>
-
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace chart2
-{
-class XChartTypeTemplate;
-}
-}
-}
-}
+#include <rtl/ref.hxx>
namespace chart
{
+class ChartTypeTemplate;
+
class ChartTypeTemplateProvider
{
public:
- virtual css::uno::Reference<css::chart2::XChartTypeTemplate> getCurrentTemplate() const = 0;
+ virtual rtl::Reference<::chart::ChartTypeTemplate> getCurrentTemplate() const = 0;
virtual ~ChartTypeTemplateProvider() {}
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ChartViewHelper.hxx b/chart2/source/inc/ChartViewHelper.hxx
index 48f7c27b6fac..0ffe60220f60 100644
--- a/chart2/source/inc/ChartViewHelper.hxx
+++ b/chart2/source/inc/ChartViewHelper.hxx
@@ -16,24 +16,32 @@
* 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_INC_CHARTVIEWHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CHARTVIEWHELPER_HXX
+#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
+#include <rtl/ref.hxx>
-namespace com::sun::star::uno { template <class interface_type> class Reference; }
-namespace com::sun::star::frame { class XModel; }
+#include <com/sun/star/uno/Reference.hxx>
+
+namespace com::sun::star::chart2
+{
+class XChartDocument;
+}
namespace chart
{
+class ChartModel;
-class OOO_DLLPUBLIC_CHARTTOOLS ChartViewHelper
+namespace ChartViewHelper
{
-public:
- static void setViewToDirtyState( const css::uno::Reference< css::frame::XModel >& xChartModel );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void setViewToDirtyState(const rtl::Reference<ChartModel>& xChartModel);
+
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void setViewToDirtyState_UNO(const css::uno::Reference<css::chart2::XChartDocument>& xChartModel);
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/CloneHelper.hxx b/chart2/source/inc/CloneHelper.hxx
index da697e05ece4..cabcdb58366f 100644
--- a/chart2/source/inc/CloneHelper.hxx
+++ b/chart2/source/inc/CloneHelper.hxx
@@ -16,18 +16,14 @@
* 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_INC_CLONEHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CLONEHELPER_HXX
+#pragma once
#include <com/sun/star/util/XCloneable.hpp>
-
-#include <algorithm>
+#include <rtl/ref.hxx>
#include <iterator>
#include <vector>
-namespace chart
-{
-namespace CloneHelper
+namespace chart::CloneHelper
{
/// functor that clones a UNO-Reference
@@ -57,6 +53,15 @@ template< class Interface >
CreateRefClone< Interface >());
}
+template< class T >
+ void CloneRefVector(
+ const std::vector< rtl::Reference< T > > & rSource,
+ std::vector< rtl::Reference< T > > & rDestination )
+{
+ for (const auto & rSourceItem : rSource)
+ rDestination.push_back(static_cast<T*>(rSourceItem->createClone().get()));
+}
+
/// clones a UNO-sequence of UNO-References
template< class Interface >
void CloneRefSequence(
@@ -69,10 +74,6 @@ template< class Interface >
CreateRefClone< Interface >());
}
-} // namespace CloneHelper
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_INC_CLONEHELPER_HXX
-#endif
+} // namespace chart::CloneHelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ColorPerPointHelper.hxx b/chart2/source/inc/ColorPerPointHelper.hxx
index 6c34693da111..575019e9bbb2 100644
--- a/chart2/source/inc/ColorPerPointHelper.hxx
+++ b/chart2/source/inc/ColorPerPointHelper.hxx
@@ -17,22 +17,24 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_INC_COLORPERPOINTHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_COLORPERPOINTHELPER_HXX
+#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
+#include <rtl/ref.hxx>
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::uno { template <class interface_type> class Reference; }
namespace chart
{
+class DataSeries;
-class OOO_DLLPUBLIC_CHARTTOOLS ColorPerPointHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ColorPerPointHelper
{
public:
static bool hasPointOwnColor(
- const css::uno::Reference< css::beans::XPropertySet >& xDataSeriesProperties
+ const rtl::Reference< ::chart::DataSeries >& xDataSeries
, sal_Int32 nPointIndex
, const css::uno::Reference< css::beans::XPropertySet >& xDataPointProperties //may be NULL this is just for performance
);
@@ -40,11 +42,10 @@ public:
// returns true if AttributedDataPoints contains nPointIndex and the
// property Color is DEFAULT
SAL_DLLPRIVATE static bool hasPointOwnProperties(
- const css::uno::Reference< css::beans::XPropertySet >& xSeriesProperties
+ const rtl::Reference< ::chart::DataSeries >& xDataSeries
, sal_Int32 nPointIndex );
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/CommonConverters.hxx b/chart2/source/inc/CommonConverters.hxx
index 940b95d70502..c6dc7b2ecd1d 100644
--- a/chart2/source/inc/CommonConverters.hxx
+++ b/chart2/source/inc/CommonConverters.hxx
@@ -16,8 +16,7 @@
* 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_INC_COMMONCONVERTERS_HXX
-#define INCLUDED_CHART2_SOURCE_INC_COMMONCONVERTERS_HXX
+#pragma once
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Size.hpp>
@@ -30,6 +29,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/point/b3dpoint.hxx>
#include <basegfx/vector/b3dvector.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
#include "charttoolsdllapi.hxx"
namespace com::sun::star::awt { struct Rectangle; }
@@ -85,21 +85,28 @@ OOO_DLLPUBLIC_CHARTTOOLS
void AddPointToPoly( css::drawing::PolyPolygonShape3D& rPoly
, const css::drawing::Position3D& rPos
, sal_Int32 nSequenceIndex=0 );
+OOO_DLLPUBLIC_CHARTTOOLS
+void AddPointToPoly( std::vector<std::vector<css::drawing::Position3D>>& rPoly
+ , const css::drawing::Position3D& rPos
+ , sal_Int32 nSequenceIndex=0 );
/** get a single Point from a Polygon
*/
OOO_DLLPUBLIC_CHARTTOOLS css::drawing::Position3D getPointFromPoly(
+ const std::vector<std::vector<css::drawing::Position3D>>& rPolygon
+ , sal_Int32 nPointIndex, sal_Int32 nPolyIndex );
+OOO_DLLPUBLIC_CHARTTOOLS css::drawing::Position3D getPointFromPoly(
const css::drawing::PolyPolygonShape3D& rPolygon
, sal_Int32 nPointIndex, sal_Int32 nPolyIndex );
OOO_DLLPUBLIC_CHARTTOOLS
-void addPolygon( css::drawing::PolyPolygonShape3D& rRet
- , const css::drawing::PolyPolygonShape3D& rAdd );
+void addPolygon( std::vector<std::vector<css::drawing::Position3D>>& rRet
+ , const std::vector<std::vector<css::drawing::Position3D>>& rAdd );
/** PolyPolygonShape3D + PolyPolygonShape3D -> PolyPolygonShape3D
*/
OOO_DLLPUBLIC_CHARTTOOLS
-void appendPoly( css::drawing::PolyPolygonShape3D& rRet
- , const css::drawing::PolyPolygonShape3D& rAdd );
+void appendPoly( std::vector<std::vector<css::drawing::Position3D>>& rRet
+ , const std::vector<std::vector<css::drawing::Position3D>>& rAdd );
/** PolyPolygonBezierCoords -> PolyPolygonShape3D
*/
@@ -112,12 +119,21 @@ css::drawing::PolyPolygonShape3D BezierToPoly(
OOO_DLLPUBLIC_CHARTTOOLS
css::drawing::PointSequenceSequence PolyToPointSequence(
const css::drawing::PolyPolygonShape3D& rPolyPolygon );
+OOO_DLLPUBLIC_CHARTTOOLS
+css::drawing::PointSequenceSequence PolyToPointSequence(
+ const std::vector<std::vector<css::drawing::Position3D>>& rPolyPolygon );
+
+/** PolyPolygonShape3D -> basegfx::B2DPolyPolygon (2D)
+*/
+OOO_DLLPUBLIC_CHARTTOOLS
+basegfx::B2DPolyPolygon PolyToB2DPolyPolygon(
+ const std::vector<std::vector<css::drawing::Position3D>>& rPolyPolygon );
/** drawing::PointSequenceSequence + drawing::PointSequenceSequence
*/
OOO_DLLPUBLIC_CHARTTOOLS
void appendPointSequence( css::drawing::PointSequenceSequence& rTarget
- , css::drawing::PointSequenceSequence& rAdd );
+ , const css::drawing::PointSequenceSequence& rAdd );
/** Position3D + Direction3D == Position3D
*/
@@ -147,21 +163,11 @@ OOO_DLLPUBLIC_CHARTTOOLS css::awt::Point Position3DToAWTPoint( const css::drawin
*/
OOO_DLLPUBLIC_CHARTTOOLS css::awt::Size Direction3DToAWTSize( const css::drawing::Direction3D& rDirection );
-/** B3DPoint -> Sequence<double>
-*/
-OOO_DLLPUBLIC_CHARTTOOLS css::uno::Sequence< double > B3DPointToSequence( const ::basegfx::B3DPoint& rPoint );
-
/** Sequence<double> -> drawing::Position3D
*/
OOO_DLLPUBLIC_CHARTTOOLS css::drawing::Position3D
SequenceToPosition3D( const css::uno::Sequence< double >& rSeq );
-/** drawing::Position3D -> Sequence<double>
-*/
-
-OOO_DLLPUBLIC_CHARTTOOLS css::uno::Sequence< double >
- Position3DToSequence( const css::drawing::Position3D& rPosition );
-
/** chart2::XDataSequence -> uno::Sequence< double >
*/
@@ -173,22 +179,22 @@ OOO_DLLPUBLIC_CHARTTOOLS
css::uno::Sequence< OUString > DataSequenceToStringSequence(
const css::uno::Reference< css::chart2::data::XDataSequence > & xDataSequence );
-/** uno::Sequence< uno::Sequence< T > > -> uno::Sequence< T >
+/** std::vector< std::vector< T > > -> std::vector< T >
*/
template< typename T >
-css::uno::Sequence< T >
- FlattenSequence( const css::uno::Sequence< css::uno::Sequence< T > > & aSeqSeq )
+std::vector< T >
+ FlattenSequence( const std::vector< std::vector< T > > & aSeqSeq )
{
sal_Int32 nOuter, nInner, nCount = 0,
nResultSize = 0;
- const sal_Int32 nOuterSize = aSeqSeq.getLength();
+ const sal_Int32 nOuterSize = aSeqSeq.size();
for( nOuter=0; nOuter<nOuterSize; ++nOuter )
- nResultSize += aSeqSeq[nOuter].getLength();
- css::uno::Sequence< T > aResult( nResultSize );
+ nResultSize += aSeqSeq[nOuter].size();
+ std::vector< T > aResult( nResultSize );
for( nOuter=0; nOuter<nOuterSize; ++nOuter )
{
- const sal_Int32 nInnerSize = aSeqSeq[nOuter].getLength();
+ const sal_Int32 nInnerSize = aSeqSeq[nOuter].size();
for( nInner=0; nInner<nInnerSize; ++nInner, ++nCount )
aResult[nCount] = aSeqSeq[nOuter][nInner];
}
@@ -205,10 +211,9 @@ sal_Int16 getShortForLongAlso( const css::uno::Any& rAny );
OOO_DLLPUBLIC_CHARTTOOLS
bool replaceParamterInString( OUString & rInOutResourceString,
- const OUString & rParamToReplace,
- const OUString & rReplaceWith );
+ std::u16string_view rParamToReplace,
+ std::u16string_view rReplaceWith );
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx
index 10d32f5bf0e1..7bb776490cda 100644
--- a/chart2/source/inc/CommonFunctors.hxx
+++ b/chart2/source/inc/CommonFunctors.hxx
@@ -16,8 +16,7 @@
* 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_INC_COMMONFUNCTORS_HXX
-#define INCLUDED_CHART2_SOURCE_INC_COMMONFUNCTORS_HXX
+#pragma once
#include <o3tl/any.hxx>
#include <rtl/math.hxx>
@@ -25,9 +24,9 @@
#include <rtl/ustring.hxx>
#include "charttoolsdllapi.hxx"
-namespace chart
-{
-namespace CommonFunctors
+#include <limits>
+
+namespace chart::CommonFunctors
{
/** unary function to convert any type T into a css::uno::Any.
@@ -40,21 +39,19 @@ template< typename T >
{
css::uno::Any operator() ( const T & aVal )
{
- return css::uno::makeAny( aVal );
+ return css::uno::Any( aVal );
}
};
/** unary function to convert css::uno::Any into a double number.
- <p>In case no number can be generated from the Any, NaN (see
- rtl::math::SetNAN()) is returned.</p>
+ <p>In case no number can be generated from the Any, NaN is returned.</p>
*/
struct OOO_DLLPUBLIC_CHARTTOOLS AnyToDouble
{
double operator() ( const css::uno::Any & rAny )
{
- double fResult;
- ::rtl::math::setNan( & fResult );
+ double fResult = std::numeric_limits<double>::quiet_NaN();
rAny >>= fResult;
return fResult;
}
@@ -94,13 +91,13 @@ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToString
*/
struct OOO_DLLPUBLIC_CHARTTOOLS OUStringToDouble
{
- double operator() ( const OUString & rStr )
+ double operator() ( std::u16string_view rStr )
{
rtl_math_ConversionStatus eConversionStatus;
double fResult = ::rtl::math::stringToDouble( rStr, '.', ',', & eConversionStatus );
if( eConversionStatus != rtl_math_ConversionStatus_Ok )
- ::rtl::math::setNan( & fResult );
+ return std::numeric_limits<double>::quiet_NaN();
return fResult;
}
@@ -124,10 +121,6 @@ struct OOO_DLLPUBLIC_CHARTTOOLS DoubleToOUString
}
};
-} // namespace CommonFunctors
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_INC_COMMONFUNCTORS_HXX
-#endif
+} // namespace chart::CommonFunctors
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ConfigColorScheme.hxx b/chart2/source/inc/ConfigColorScheme.hxx
index 7d0bbf662ed4..fe73dc671bb6 100644
--- a/chart2/source/inc/ConfigColorScheme.hxx
+++ b/chart2/source/inc/ConfigColorScheme.hxx
@@ -16,8 +16,7 @@
* 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_INC_CONFIGCOLORSCHEME_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CONFIGCOLORSCHEME_HXX
+#pragma once
#include "charttoolsdllapi.hxx"
#include <cppuhelper/implbase.hxx>
@@ -39,7 +38,7 @@ namespace impl
class ChartConfigItem;
}
-class ConfigColorScheme :
+class ConfigColorScheme final :
public ::cppu::WeakImplHelper<
css::chart2::XColorScheme,
css::lang::XServiceInfo >
@@ -54,7 +53,7 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// ____ ConfigItemListener ____
- void notify( const OUString & rPropertyName );
+ void notify();
protected:
// ____ XColorScheme ____
@@ -73,7 +72,4 @@ private:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_CONFIGCOLORSCHEME_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ControllerLockGuard.hxx b/chart2/source/inc/ControllerLockGuard.hxx
index 090becde9343..b9da29954a02 100644
--- a/chart2/source/inc/ControllerLockGuard.hxx
+++ b/chart2/source/inc/ControllerLockGuard.hxx
@@ -16,36 +16,41 @@
* 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_INC_CONTROLLERLOCKGUARD_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CONTROLLERLOCKGUARD_HXX
+#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
-#include <com/sun/star/uno/Reference.h>
-
-namespace chart { class ChartModel; }
-namespace com::sun::star::frame { class XModel; }
+#include <rtl/ref.hxx>
namespace chart
{
+class ChartModel;
+}
+namespace com::sun::star::frame
+{
+class XModel;
+}
+namespace chart
+{
/** This guard calls lockControllers at the given Model in the CTOR and
unlockControllers in the DTOR. Using this ensures that controllers do not
remain locked when leaving a function even in case an exception is thrown.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS ControllerLockGuardUNO
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ControllerLockGuardUNO
{
public:
- explicit ControllerLockGuardUNO( const css::uno::Reference< css::frame::XModel > & xModel );
+ explicit ControllerLockGuardUNO(rtl::Reference<::chart::ChartModel> xModel);
~ControllerLockGuardUNO();
private:
- css::uno::Reference< css::frame::XModel > mxModel;
+ rtl::Reference<::chart::ChartModel> mxModel;
};
class ControllerLockGuard
{
public:
- explicit ControllerLockGuard( ChartModel& rModel );
+ explicit ControllerLockGuard(ChartModel& rModel);
~ControllerLockGuard();
private:
@@ -58,18 +63,17 @@ private:
Use the ControllerLockHelperGuard to lock/unlock the model during a block of
instructions.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS ControllerLockHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ControllerLockHelper
{
public:
- explicit ControllerLockHelper(
- const css::uno::Reference< css::frame::XModel > & xModel );
+ explicit ControllerLockHelper(rtl::Reference<::chart::ChartModel> xModel);
~ControllerLockHelper();
SAL_DLLPRIVATE void lockControllers();
SAL_DLLPRIVATE void unlockControllers();
private:
- css::uno::Reference< css::frame::XModel > m_xModel;
+ rtl::Reference<::chart::ChartModel> m_xModel;
};
/** This guard calls lockControllers at the given ControllerLockHelper in the
@@ -77,19 +81,16 @@ private:
do not remain locked when leaving a function even in case an exception is
thrown.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS ControllerLockHelperGuard
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ControllerLockHelperGuard
{
public:
- explicit ControllerLockHelperGuard( ControllerLockHelper & rHelper );
+ explicit ControllerLockHelperGuard(ControllerLockHelper& rHelper);
~ControllerLockHelperGuard();
private:
- ControllerLockHelper & m_rHelper;
+ ControllerLockHelper& m_rHelper;
};
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_CONTROLLERLOCKGUARD_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/DataInterpreter.hxx b/chart2/source/inc/DataInterpreter.hxx
new file mode 100644
index 000000000000..7638e5ccee3e
--- /dev/null
+++ b/chart2/source/inc/DataInterpreter.hxx
@@ -0,0 +1,154 @@
+/* -*- 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 .
+ */
+#pragma once
+
+#include "DataSeries.hxx"
+#include <cppuhelper/implbase.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/chart2/data/XDataSource.hpp>
+#include <rtl/ref.hxx>
+#include <vector>
+
+namespace chart
+{
+class DataSeries;
+class DataSource;
+class LabeledDataSequence;
+
+/** offers tooling to interpret different data sources in a structural
+ and chart-type-dependent way.
+ */
+struct InterpretedData
+{
+ std::vector< std::vector< rtl::Reference<::chart::DataSeries> > > Series;
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence > Categories;
+};
+
+/** offers tooling to interpret different data sources in a structural
+ and chart-type-dependent way.
+ */
+class SAL_DLLPUBLIC_RTTI DataInterpreter : public ::cppu::WeakImplHelper<
+ css::lang::XServiceInfo >
+{
+public:
+ explicit DataInterpreter();
+ virtual ~DataInterpreter() 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;
+
+ // convenience methods
+ static OUString GetRole( const css::uno::Reference< css::chart2::data::XDataSequence > & xSeq );
+
+ static void SetRole(
+ const css::uno::Reference< css::chart2::data::XDataSequence > & xSeq,
+ const OUString & rRole );
+
+ static css::uno::Any GetProperty(
+ const css::uno::Sequence<css::beans::PropertyValue > & aArguments,
+ std::u16string_view rName );
+
+ static bool HasCategories(
+ const css::uno::Sequence< css::beans::PropertyValue > & rArguments,
+ const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rData );
+
+ static bool UseCategoriesAsX(
+ const css::uno::Sequence< css::beans::PropertyValue > & rArguments );
+
+ static std::vector<css::uno::Reference< css::chart2::data::XLabeledDataSequence >> getDataSequences(
+ const css::uno::Reference< css::chart2::data::XDataSource >& xSource);
+
+ // ____ DataInterpreter ____
+ /** Interprets the given data.
+
+ @param xSource
+ the data source.
+
+ @param aArguments
+ Arguments that tell the template how to slice the given
+ range. The properties should be defined in a separate
+ service.
+
+ <p>For standard parameters that may be used, see the
+ service StandardDiagramCreationParameters.
+ </p>
+
+ @param aSeriesToReUse
+ use all the data series given here for the result before
+ creating new ones.
+ */
+ virtual InterpretedData interpretDataSource(
+ const css::uno::Reference< css::chart2::data::XDataSource >& xSource,
+ const css::uno::Sequence< css::beans::PropertyValue >& aArguments,
+ const std::vector< rtl::Reference< ::chart::DataSeries > >& aSeriesToReUse );
+
+ /** Re-interprets the data given in <code>aInterpretedData</code>
+ while keeping the number of data series and the categories.
+ */
+ virtual InterpretedData reinterpretDataSeries(
+ const InterpretedData& aInterpretedData );
+
+ /** parses the given data and states, if a
+ reinterpretDataSeries() call can be done
+ without data loss.
+
+ @return
+ `TRUE`, if the data given in
+ <code>aInterpretedData</code> has a similar structure than
+ the one required is used as output of the data interpreter.
+ */
+ virtual bool isDataCompatible(
+ const InterpretedData& aInterpretedData );
+
+ /** Try to reverse the operation done in
+ interpretDataSource().
+
+ <p>In case <code>aInterpretedData</code> is the result of
+ interpretDataSource()( <code>xSource</code> ),
+ the result of this method should be <code>xSource</code>.</p>
+ */
+ static rtl::Reference< ::chart::DataSource > mergeInterpretedData(
+ const InterpretedData& aInterpretedData );
+
+ /** Get chart information that is specific to a particular chart
+ type, by key.
+
+ @param sKey
+ name of the piece of data to retrieve.
+
+ <p>Supported key strings:</p>
+ <ul>
+ <li><tt>"stock variant"</tt>: stock chart variant,
+ with 0 = neither Open Values nor volume, 1 = Open Values,
+ 2 = volume, 3 = both. Valid for candlestick charts.</li>
+ </ul>
+
+ @return
+ The value requested, or nothing if not present.
+ */
+ virtual css::uno::Any getChartTypeSpecificData(
+ const OUString& sKey );
+};
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/DataSeries.hxx b/chart2/source/inc/DataSeries.hxx
new file mode 100644
index 000000000000..3705ea3fdab4
--- /dev/null
+++ b/chart2/source/inc/DataSeries.hxx
@@ -0,0 +1,190 @@
+/* -*- 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 .
+ */
+#pragma once
+
+// 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/lang/XServiceInfo.hpp>
+
+// helper classes
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+#include "ModifyListenerHelper.hxx"
+#include "PropertyHelper.hxx"
+
+// STL
+#include <vector>
+#include <map>
+
+#include "OPropertySet.hxx"
+#include "charttoolsdllapi.hxx"
+
+namespace com::sun::star::beans { class XPropertySet; }
+
+namespace chart
+{
+class LabeledDataSequence;
+class RegressionCurveModel;
+
+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 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) DataSeries
+ final
+ : 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()
+
+ explicit DataSeries( 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 void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 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;
+
+ typedef std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tDataSequenceContainer;
+
+ void setData( const tDataSequenceContainer& aData );
+ const tDataSequenceContainer & getDataSequences2() const { return m_aDataSequences; }
+
+ typedef
+ std::vector< rtl::Reference< ::chart::RegressionCurveModel > >
+ tRegressionCurveContainerType;
+
+ const tRegressionCurveContainerType & getRegressionCurves2() const { return m_aRegressionCurves; }
+
+ /** Get the label of a series (e.g. for the legend)
+
+ @param rLabelSequenceRole
+ The data sequence contained in xSeries that has this role will be used
+ to take its label.
+ */
+ OUString getLabelForRole( const OUString & rLabelSequenceRole );
+
+ bool hasUnhiddenData();
+
+private:
+
+ // late initialization to call after copy-constructing
+ void Init( const DataSeries & rOther );
+
+ // ____ 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();
+
+ tDataSequenceContainer m_aDataSequences;
+
+ typedef std::map< sal_Int32,
+ css::uno::Reference< css::beans::XPropertySet > > tDataPointAttributeContainer;
+ tDataPointAttributeContainer m_aAttributedDataPoints;
+
+ tRegressionCurveContainerType m_aRegressionCurves;
+
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+};
+
+OOO_DLLPUBLIC_CHARTTOOLS const tPropertyValueMap & StaticDataSeriesDefaults();
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/DataSeriesHelper.hxx b/chart2/source/inc/DataSeriesHelper.hxx
index c6fba94de6c7..2015398a7681 100644
--- a/chart2/source/inc/DataSeriesHelper.hxx
+++ b/chart2/source/inc/DataSeriesHelper.hxx
@@ -16,13 +16,14 @@
* 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_INC_DATASERIESHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_DATASERIESHELPER_HXX
+#pragma once
+#include <config_options.h>
#include "StackMode.hxx"
#include "charttoolsdllapi.hxx"
#include <com/sun/star/uno/Reference.h>
#include <rtl/ustring.hxx>
+#include <rtl/ref.hxx>
#include <vector>
@@ -36,15 +37,18 @@ namespace com::sun::star::chart2::data { class XDataSource; }
namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
namespace com::sun::star::uno { class Any; }
namespace com::sun::star::uno { template <class E> class Sequence; }
-
-namespace chart
-{
-
-namespace DataSeriesHelper
+namespace chart { class BaseCoordinateSystem; }
+namespace chart { class ChartType; }
+namespace chart { class DataSource; }
+namespace chart { class Diagram; }
+namespace chart { class DataSeries; }
+namespace chart { class LabeledDataSequence; }
+
+namespace chart::DataSeriesHelper
{
-OOO_DLLPUBLIC_CHARTTOOLS OUString
- getRole( const css::uno::Reference<css::chart2::data::XLabeledDataSequence>& xLabeledDataSequence );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+OUString getRole( const css::uno::Reference<css::chart2::data::XLabeledDataSequence>& xLabeledDataSequence );
/** Retrieves the data sequence in the given data source that matches the
given role. If more than one sequences match the role, the first match
@@ -56,7 +60,8 @@ OOO_DLLPUBLIC_CHARTTOOLS OUString
@param aRole
The role that is to be filtered out.
*/
-OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+css::uno::Reference< css::chart2::data::XLabeledDataSequence >
getDataSequenceByRole( const css::uno::Reference< css::chart2::data::XDataSource > & xSource,
const OUString& aRole,
bool bMatchPrefix = false );
@@ -70,115 +75,116 @@ OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSeq
@param aRole
The role that is to be filtered out.
*/
-OOO_DLLPUBLIC_CHARTTOOLS std::vector<
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+std::vector<
css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
getAllDataSequencesByRole( const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & aDataSequences,
const OUString& aRole );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+std::vector<
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
+ getAllDataSequencesByRole( const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & aDataSequences,
+ const OUString& aRole );
-OOO_DLLPUBLIC_CHARTTOOLS
-std::vector<css::uno::Reference<css::chart2::data::XLabeledDataSequence> >
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
getAllDataSequences(
- const css::uno::Sequence<css::uno::Reference<css::chart2::XDataSeries> >& aSeries );
+ const std::vector<rtl::Reference<::chart::DataSeries> >& aSeries );
/** Retrieves all data sequences found in the given data series and puts them
into a data source. The order of sequences will match the order of the data
series.
*/
-OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XDataSource >
- getDataSource( const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > > & aSeries );
-
-/** Get the label of a series (e.g. for the legend)
-
- @param rLabelSequenceRole
- The data sequence contained in xSeries that has this role will be used
- to take its label.
- */
-OOO_DLLPUBLIC_CHARTTOOLS OUString getDataSeriesLabel(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const OUString & rLabelSequenceRole );
-
-/** Get the label of a labeled sequence including necessary automatic generation
- */
-OOO_DLLPUBLIC_CHARTTOOLS OUString getLabelForLabeledDataSequence(
- const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & xLabeledSeq );
-
-OOO_DLLPUBLIC_CHARTTOOLS void setStackModeAtSeries(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > > & aSeries,
- const css::uno::Reference< css::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem,
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+rtl::Reference< ::chart::DataSource >
+ getDataSource( const std::vector< rtl::Reference< ::chart::DataSeries > > & aSeries );
+
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void setStackModeAtSeries(
+ const std::vector< rtl::Reference< ::chart::DataSeries > > & aSeries,
+ const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
StackMode eStackMode );
-OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getAttachedAxisIndex(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+sal_Int32 getAttachedAxisIndex(
+ const rtl::Reference< ::chart::DataSeries > & xSeries );
/// @param nAxisIndex, if -1 it is determined by the given data series via getAttachedAxisIndex
-OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getNumberFormatKeyFromAxis(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const css::uno::Reference< css::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem,
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+sal_Int32 getNumberFormatKeyFromAxis(
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
+ const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
sal_Int32 nDimensionIndex,
sal_Int32 nAxisIndex = -1 );
-OOO_DLLPUBLIC_CHARTTOOLS
-css::uno::Reference< css::chart2::XCoordinateSystem >
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+rtl::Reference< ::chart::BaseCoordinateSystem >
getCoordinateSystemOfSeries(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
-OOO_DLLPUBLIC_CHARTTOOLS
-css::uno::Reference< css::chart2::XChartType >
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+rtl::Reference< ::chart::ChartType >
getChartTypeOfSeries(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
-OOO_DLLPUBLIC_CHARTTOOLS void deleteSeries(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const css::uno::Reference< css::chart2::XChartType > & xChartType );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void deleteSeries(
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
+ const rtl::Reference< ::chart::ChartType > & xChartType );
-OOO_DLLPUBLIC_CHARTTOOLS void switchSymbolsOnOrOff(
- const css::uno::Reference< css::beans::XPropertySet > & xSeriesProperties,
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void switchSymbolsOnOrOff(
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
bool bSymbolsOn, sal_Int32 nSeriesIndex );
-OOO_DLLPUBLIC_CHARTTOOLS void switchLinesOnOrOff(
- const css::uno::Reference< css::beans::XPropertySet > & xSeriesProperties,
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void switchLinesOnOrOff(
+ const rtl::Reference< ::chart::DataSeries > & xSeries,
bool bLinesOn );
-OOO_DLLPUBLIC_CHARTTOOLS
-void makeLinesThickOrThin( const css::uno::Reference< css::beans::XPropertySet > & xSeriesProperties, bool bThick );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void makeLinesThickOrThin( const rtl::Reference< ::chart::DataSeries > & xSeries, bool bThick );
-OOO_DLLPUBLIC_CHARTTOOLS void setPropertyAlsoToAllAttributedDataPoints(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void setPropertyAlsoToAllAttributedDataPoints(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
const OUString& rPropertyName,
const css::uno::Any& rPropertyValue );
-OOO_DLLPUBLIC_CHARTTOOLS bool hasAttributedDataPointDifferentValue(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
+
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+bool hasAttributedDataPointDifferentValue(
+ const rtl::Reference< ::chart::DataSeries >& xSeries,
const OUString& rPropertyName,
const css::uno::Any& rPropertyValue );
-OOO_DLLPUBLIC_CHARTTOOLS bool hasUnhiddenData( const css::uno::Reference<
- css::chart2::XDataSeries >& xSeries );
-
-OOO_DLLPUBLIC_CHARTTOOLS
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nClippedIndex, const css::uno::Reference<
css::chart2::data::XDataSequence >& xDataSequence, bool bTranslate );
-OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelsAtSeries( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
-
-OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelsAtPoints( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+bool hasDataLabelsAtSeries( const rtl::Reference< ::chart::DataSeries >& xSeries );
-OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelAtPoint( const css::uno::Reference< css::chart2::XDataSeries >& xSeries, sal_Int32 nPointIndex );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+bool hasDataLabelsAtPoints( const rtl::Reference< ::chart::DataSeries >& xSeries );
-OOO_DLLPUBLIC_CHARTTOOLS void insertDataLabelsToSeriesAndAllPoints( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+bool hasDataLabelAtPoint( const rtl::Reference< ::chart::DataSeries >& xSeries, sal_Int32 nPointIndex );
-OOO_DLLPUBLIC_CHARTTOOLS void insertDataLabelToPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void insertDataLabelsToSeriesAndAllPoints( const rtl::Reference< ::chart::DataSeries >& xSeries );
-OOO_DLLPUBLIC_CHARTTOOLS void deleteDataLabelsFromSeriesAndAllPoints( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void insertDataLabelToPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
-OOO_DLLPUBLIC_CHARTTOOLS void deleteDataLabelsFromPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void deleteDataLabelsFromSeriesAndAllPoints( const rtl::Reference< ::chart::DataSeries >& xSeries );
-} // namespace DataSeriesHelper
-} // namespace chart
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void deleteDataLabelsFromPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
-// INCLUDED_CHART2_SOURCE_INC_DATASERIESHELPER_HXX
-#endif
+} // namespace chart::DataSeriesHelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/MutexContainer.hxx b/chart2/source/inc/DataSeriesProperties.hxx
index bab6b6c3fb1a..7d36721ef066 100644
--- a/chart2/source/inc/MutexContainer.hxx
+++ b/chart2/source/inc/DataSeriesProperties.hxx
@@ -16,26 +16,33 @@
* 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_INC_MUTEXCONTAINER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_MUTEXCONTAINER_HXX
+#pragma once
-#include <osl/mutex.hxx>
+#include "PropertyHelper.hxx"
+#include "FastPropertyIdRanges.hxx"
-namespace chart
-{
-class MutexContainer
+#include <vector>
+
+namespace com::sun::star::beans { struct Property; }
+
+namespace chart::DataSeriesProperties
{
-protected:
- MutexContainer() = default;
+ enum
+ {
+ PROP_DATASERIES_ATTRIBUTED_DATA_POINTS = FAST_PROPERTY_ID_START_DATA_SERIES,
+ PROP_DATASERIES_STACKING_DIRECTION,
+ PROP_DATASERIES_VARY_COLORS_BY_POINT,
+ PROP_DATASERIES_ATTACHED_AXIS_INDEX,
+ PROP_DATASERIES_SHOW_LEGEND_ENTRY,
+ PROP_DATASERIES_DELETED_LEGEND_ENTRIES,
+ PROP_DATASERIES_SHOW_CUSTOM_LEADERLINES
+ };
- ~MutexContainer() = default;
+ void AddPropertiesToVector(
+ std::vector< css::beans::Property > & rOutProperties );
- mutable ::osl::Mutex m_aMutex;
-};
+ void AddDefaultsToMap( tPropertyValueMap & rOutMap );
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_MUTEXCONTAINER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/DataSource.hxx b/chart2/source/inc/DataSource.hxx
index 6ad8bbffc409..9b976e439a66 100644
--- a/chart2/source/inc/DataSource.hxx
+++ b/chart2/source/inc/DataSource.hxx
@@ -16,18 +16,21 @@
* 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_INC_DATASOURCE_HXX
-#define INCLUDED_CHART2_SOURCE_INC_DATASOURCE_HXX
+#pragma once
+#include <config_options.h>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <cppuhelper/implbase.hxx>
+#include <vector>
+#include "charttoolsdllapi.hxx"
namespace chart
{
+class LabeledDataSequence;
-class DataSource : public
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) DataSource final : public
::cppu::WeakImplHelper<
css::lang::XServiceInfo,
css::chart2::data::XDataSource,
@@ -37,6 +40,8 @@ public:
explicit DataSource();
explicit DataSource(
const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rSequences );
+ explicit DataSource(
+ const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rSequences );
virtual ~DataSource() override;
@@ -45,7 +50,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
-protected:
// ____ XDataSource ____
virtual css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > SAL_CALL
getDataSequences() override;
@@ -60,7 +64,4 @@ private:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_DATASOURCE_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/DataSourceHelper.hxx b/chart2/source/inc/DataSourceHelper.hxx
index 5f159f6a5dac..7b08cafc22a7 100644
--- a/chart2/source/inc/DataSourceHelper.hxx
+++ b/chart2/source/inc/DataSourceHelper.hxx
@@ -17,12 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_INC_DATASOURCEHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_DATASOURCEHELPER_HXX
+#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Sequence.h>
+#include <rtl/ref.hxx>
namespace chart { class ChartModel; }
namespace com::sun::star::beans { struct PropertyValue; }
@@ -35,30 +36,29 @@ namespace com::sun::star::frame { class XModel; }
namespace chart
{
+class DataSource;
+class Diagram;
+class LabeledDataSequence;
-class OOO_DLLPUBLIC_CHARTTOOLS DataSourceHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) DataSourceHelper
{
public:
- static css::uno::Reference< css::chart2::data::XDataSource >
- createDataSource( const css::uno::Sequence<
- css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rSequences );
-
static css::uno::Reference< css::chart2::data::XDataSequence >
createCachedDataSequence();
static css::uno::Reference< css::chart2::data::XDataSequence >
createCachedDataSequence( const OUString & rSingleText );
- static css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ static rtl::Reference< LabeledDataSequence >
createLabeledDataSequence(
const css::uno::Reference< css::chart2::data::XDataSequence >& xValues ,
const css::uno::Reference< css::chart2::data::XDataSequence >& xLabels );
- static css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ static rtl::Reference< LabeledDataSequence >
createLabeledDataSequence(
const css::uno::Reference< css::chart2::data::XDataSequence >& xValues );
- static css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ static rtl::Reference< LabeledDataSequence >
createLabeledDataSequence();
static css::uno::Sequence< css::beans::PropertyValue >
@@ -75,26 +75,20 @@ public:
, OUString & rRangeRepresentation, css::uno::Sequence< sal_Int32 >& rSequenceMapping
, bool& bUseColumns, bool& bFirstCellAsLabel, bool& bHasCategories );
- static css::uno::Reference< css::chart2::data::XDataSource >
- pressUsedDataIntoRectangularFormat( const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc );
+ static rtl::Reference< ::chart::DataSource >
+ pressUsedDataIntoRectangularFormat( const rtl::Reference< ::chart::ChartModel >& xChartDoc );
SAL_DLLPRIVATE static css::uno::Sequence< OUString > getUsedDataRanges(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ const rtl::Reference< ::chart::Diagram > & xDiagram );
static css::uno::Sequence< OUString > getUsedDataRanges(
- const css::uno::Reference< css::frame::XModel > & xChartModel );
+ const rtl::Reference<::chart::ChartModel> & xChartModel );
- static css::uno::Reference< css::chart2::data::XDataSource > getUsedData(
+ static rtl::Reference< ::chart::DataSource > getUsedData(
ChartModel& rModel );
- static css::uno::Reference< css::chart2::data::XDataSource > getUsedData(
- const css::uno::Reference< css::frame::XModel >& xChartModel );
-
- static css::uno::Reference< css::chart2::data::XDataSource > getUsedData(
- const css::uno::Reference<css::chart2::XChartDocument >& xChartDoc );
-
static bool detectRangeSegmentation(
- const css::uno::Reference< css::frame::XModel >& xChartModel
+ const rtl::Reference<::chart::ChartModel>& xChartModel
, OUString& rOutRangeString
, css::uno::Sequence< sal_Int32 >& rSequenceMapping
, bool& rOutUseColumns
@@ -102,7 +96,7 @@ public:
, bool& rOutHasCategories );
static void setRangeSegmentation(
- const css::uno::Reference< css::frame::XModel >& xChartModel
+ const rtl::Reference<::chart::ChartModel>& xChartModel
, const css::uno::Sequence< sal_Int32 >& rSequenceMapping
, bool bUseColumns
, bool bFirstCellAsLabel
@@ -116,7 +110,7 @@ public:
HasCategories and FirstCellAsLabel.
*/
static bool allArgumentsForRectRangeDetected(
- const css::uno::Reference< css::chart2::XChartDocument >& xChartDocument );
+ const rtl::Reference<::chart::ChartModel>& xChartDocument );
SAL_DLLPRIVATE static css::uno::Sequence< OUString > getRangesFromLabeledDataSequence(
const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & xLSeq );
@@ -129,6 +123,5 @@ public:
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/DataTable.hxx b/chart2/source/inc/DataTable.hxx
new file mode 100644
index 000000000000..fdebc6f1751a
--- /dev/null
+++ b/chart2/source/inc/DataTable.hxx
@@ -0,0 +1,87 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include "OPropertySet.hxx"
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+
+#include "charttoolsdllapi.hxx"
+#include <com/sun/star/chart2/XDataTable.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include "ModifyListenerHelper.hxx"
+
+namespace chart
+{
+typedef cppu::WeakImplHelper<css::chart2::XDataTable, css::lang::XServiceInfo,
+ css::util::XCloneable, css::util::XModifyBroadcaster,
+ css::util::XModifyListener>
+ DataTable_Base;
+
+/** Data table implementation */
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) DataTable final : public DataTable_Base,
+ public ::property::OPropertySet
+{
+public:
+ explicit DataTable();
+ virtual ~DataTable() 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()
+
+ explicit DataTable(DataTable const& rOther);
+
+private:
+ // ____ OPropertySet ____
+ virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any& rAny) const override;
+
+ // ____ OPropertySet ____
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+
+public:
+ // ____ 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;
+
+private:
+ // ____ 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;
+
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+};
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/Diagram.hxx b/chart2/source/inc/Diagram.hxx
new file mode 100644
index 000000000000..62e9eeeac69a
--- /dev/null
+++ b/chart2/source/inc/Diagram.hxx
@@ -0,0 +1,381 @@
+/* -*- 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 .
+ */
+#pragma once
+
+#include "OPropertySet.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/util/XCloneable.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include "ModifyListenerHelper.hxx"
+#include "charttoolsdllapi.hxx"
+
+#include <vector>
+
+namespace com::sun::star::beans { struct PropertyValue; }
+namespace com::sun::star::chart2 { class XDataSeries; }
+namespace com::sun::star::chart2::data { class XDataSource; }
+namespace com::sun::star::uno { class XComponentContext; }
+
+namespace chart
+{
+class Axis;
+class BaseCoordinateSystem;
+class ChartType;
+class ChartTypeManager;
+class ChartTypeTemplate;
+class DataSeries;
+class Legend;
+class DataTable;
+class RegressionCurveModel;
+enum class StackMode;
+class Wall;
+enum class ThreeDLookScheme;
+
+enum class DiagramPositioningMode
+{
+ Auto, Excluding, Including
+};
+
+
+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 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) Diagram
+ final
+ : public impl::Diagram_Base
+ , public ::property::OPropertySet
+{
+public:
+ Diagram( css::uno::Reference< css::uno::XComponentContext > 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()
+
+ explicit Diagram( const Diagram & rOther );
+
+ // ____ OPropertySet ____
+ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 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_NoBroadcast( 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;
+
+ virtual css::uno::Reference<css::chart2::XDataTable> SAL_CALL getDataTable() override;
+ virtual void SAL_CALL setDataTable(const css::uno::Reference<css::chart2::XDataTable>& xDataTable) 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;
+
+ typedef
+ std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > >
+ tCoordinateSystemContainerType;
+
+ tCoordinateSystemContainerType getBaseCoordinateSystems() const;
+ void setCoordinateSystems(
+ const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > >& aCoordinateSystems );
+
+ rtl::Reference< ::chart::Legend > getLegend2() const;
+ void setLegend(const rtl::Reference< ::chart::Legend > &);
+
+ void setDataTable(const rtl::Reference<::chart::DataTable>& xNewDataTable);
+ rtl::Reference<::chart::DataTable> getDataTableRef() const;
+
+ DiagramPositioningMode getDiagramPositioningMode();
+
+ //returns integer from constant group css::chart::MissingValueTreatment
+ sal_Int32 getCorrectedMissingValueTreatment(
+ const rtl::Reference< ::chart::ChartType >& xChartType );
+
+ void setGeometry3D( sal_Int32 nNewGeometry );
+
+ sal_Int32 getGeometry3D( bool& rbFound, bool& rbAmbiguous );
+
+ bool isPieOrDonutChart();
+
+ bool isSupportingFloorAndWall();
+
+ /**
+ * Move a series forward or backward.
+ *
+ * @param xDiagram
+ * Reference to the diagram that contains the series.
+ *
+ * @param xGivenDataSeries
+ * Reference to the series that should be moved.
+ *
+ * @param bForward
+ * Direction in which the series should be moved.
+ *
+ * @returns </sal_True> if the series was moved successfully.
+ *
+ */
+ bool moveSeries(
+ const rtl::Reference< DataSeries >& xGivenDataSeries,
+ bool bForward );
+
+ /**
+ * Test if a series can be moved.
+ *
+ * @param xDiagram
+ * Reference to the diagram that contains the series.
+ *
+ * @param xGivenDataSeries
+ * Reference to the series that should be tested for moving.
+ *
+ * @param bForward
+ * Direction of the move to be checked.
+ *
+ * @returns </sal_True> if the series can be moved.
+ *
+ */
+ bool isSeriesMoveable(
+ const rtl::Reference< DataSeries >& xGivenDataSeries,
+ bool bForward );
+
+ std::vector< rtl::Reference< ChartType > > getChartTypes();
+
+ rtl::Reference< ChartType > getChartTypeByIndex( sal_Int32 nIndex );
+
+ bool isSupportingDateAxis();
+
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ getCategories();
+
+ void setCategories(
+ const css::uno::Reference< css::chart2::data::XLabeledDataSequence >& xCategories,
+ bool bSetAxisType = false, // when this flag is true ...
+ bool bCategoryAxis = true);// set the AxisType to CATEGORY or back to REALNUMBER
+
+ bool isCategory();
+
+ /** return all data series in this diagram grouped by chart-types
+ */
+ std::vector<
+ std::vector<
+ rtl::Reference< ::chart::DataSeries > > >
+ getDataSeriesGroups();
+
+ std::vector< rtl::Reference< ::chart::DataSeries > >
+ getDataSeries();
+
+ rtl::Reference< ChartType >
+ getChartTypeOfSeries( const rtl::Reference< DataSeries >& xSeries );
+
+ rtl::Reference< ::chart::Axis > getAttachedAxis(
+ const rtl::Reference< ::chart::DataSeries >& xSeries );
+
+ bool attachSeriesToAxis( bool bMainAxis,
+ const rtl::Reference< DataSeries >& xSeries,
+ const css::uno::Reference< css::uno::XComponentContext > & xContext,
+ bool bAdaptAxes=true );
+
+ /** Replaces all occurrences of xCooSysToReplace in the tree with
+ xReplacement in the diagram's tree
+ */
+ SAL_DLLPRIVATE void replaceCoordinateSystem(
+ const rtl::Reference< ::chart::BaseCoordinateSystem > & xCooSysToReplace,
+ const rtl::Reference< ::chart::BaseCoordinateSystem > & xReplacement );
+
+
+ /** Returns the dimension found for all chart types in the tree. If the
+ dimension is not unique, 0 is returned.
+ */
+ sal_Int32 getDimension();
+
+ /** Sets the dimension of the diagram given.
+
+ 1. Sets the dimension of all used ChartTypes
+ 2. Adapts the DataSeriesTree to reflect the new dimension
+ 3. If new coordinate-systems have to be created, adapts the
+ XCoordinateSystemContainer of the diagram.
+ */
+ void setDimension( sal_Int32 nNewDimensionCount );
+
+
+ StackMode getStackMode(bool& rbFound, bool& rbAmbiguous);
+
+ /** The stacking mode is only set at the series found inside
+ the first chart type. This is the standard for all current
+ templates (the only template that has more than one chart-type and
+ allows stacking is bar/line combi, and for this the stacking only
+ applies to the first chart type/the bars)
+ */
+ void setStackMode(StackMode eStackMode);
+
+
+ /** Sets the "SwapXAndYAxis" property at all coordinate systems found in the
+ given diagram.
+
+ "vertical==true" for bar charts, "vertical==false" for column charts
+ */
+ void setVertical( bool bVertical );
+
+ /** Gets the "SwapXAndYAxis" property at all coordinate systems found in the
+ given diagram.
+
+ "vertical==true" for bar charts, "vertical==false" for column charts
+ */
+ bool getVertical( bool& rbOutFoundResult, bool& rbOutAmbiguousResult );
+
+ struct tTemplateWithServiceName {
+ rtl::Reference< ::chart::ChartTypeTemplate > xChartTypeTemplate;
+ OUString sServiceName;
+ };
+
+ /** tries to find a template in the chart-type manager that matches this
+ diagram.
+
+ @return
+ A pair containing a template with the correct properties set as
+ first entry and the service name of the templates second entry. If
+ no template was found both elements are empty.
+ */
+ tTemplateWithServiceName
+ getTemplate(const rtl::Reference< ::chart::ChartTypeManager > & xChartTypeManager);
+
+ std::vector<rtl::Reference<::chart::RegressionCurveModel> >
+ getAllRegressionCurvesNotMeanValueLine();
+
+ double getCameraDistance();
+ void setCameraDistance( double fCameraDistance );
+
+ void getRotation(
+ sal_Int32& rnHorizontalAngleDegree, sal_Int32& rnVerticalAngleDegree );
+ void setRotation(
+ sal_Int32 nHorizontalAngleDegree, sal_Int32 nVerticalYAngleDegree );
+ void getRotationAngle(
+ double& rfXAngleRad, double& rfYAngleRad, double& rfZAngleRad );
+ void setRotationAngle(
+ double fXAngleRad, double fYAngleRad, double fZAngleRad );
+
+ ThreeDLookScheme detectScheme();
+ void setScheme( ThreeDLookScheme aScheme );
+
+ void setDefaultRotation( bool bPieOrDonut );
+
+ void switchRightAngledAxes( bool bRightAngledAxes );
+
+private:
+ // ____ 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;
+ tCoordinateSystemContainerType m_aCoordSystems;
+
+ rtl::Reference<Wall> m_xWall;
+ rtl::Reference<Wall> m_xFloor;
+
+ css::uno::Reference<css::chart2::XTitle> m_xTitle;
+
+ rtl::Reference<::chart::Legend> m_xLegend;
+ rtl::Reference<::chart::DataTable> m_xDataTable;
+ css::uno::Reference<css::chart2::XColorScheme> m_xColorScheme;
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+
+};
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx
index 3fcd9a0af2d3..eb9e4fd00792 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -16,22 +16,22 @@
* 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_INC_DIAGRAMHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_DIAGRAMHELPER_HXX
+#pragma once
#include "StackMode.hxx"
#include "charttoolsdllapi.hxx"
+#include "ChartTypeTemplate.hxx"
#include <com/sun/star/awt/Rectangle.hpp>
-#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
-
-#include <utility>
-#include <vector>
+#include <rtl/ref.hxx>
namespace chart { class ChartModel; }
namespace com::sun::star::chart2 { class XAxis; }
namespace com::sun::star::chart2 { class XChartDocument; }
+namespace com::sun::star::chart2 { class XChartType; }
namespace com::sun::star::chart2 { class XCoordinateSystem; }
namespace com::sun::star::chart2 { class XDiagram; }
+namespace com::sun::star::chart2 { class XDataSeries; }
+namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
namespace com::sun::star::frame { class XModel; }
namespace com::sun::star::lang { class XMultiServiceFactory; }
namespace com::sun::star::uno { class XComponentContext; }
@@ -40,66 +40,18 @@ namespace com::sun::star::util { class XNumberFormatsSupplier; }
namespace chart
{
-
-enum DiagramPositioningMode
-{
- DiagramPositioningMode_AUTO,
- DiagramPositioningMode_EXCLUDING,
- DiagramPositioningMode_INCLUDING
-};
-
-class OOO_DLLPUBLIC_CHARTTOOLS DiagramHelper
+class Axis;
+class BaseCoordinateSystem;
+class ChartType;
+class ChartTypeManager;
+class ChartTypeTemplate;
+class DataSeries;
+class Diagram;
+class LabeledDataSequence;
+
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) DiagramHelper
{
public:
- typedef std::pair<
- css::uno::Reference< css::chart2::XChartTypeTemplate >,
- OUString >
- tTemplateWithServiceName;
-
- /** tries to find a template in the chart-type manager that matches the
- given diagram.
-
- @return
- A pair containing a template with the correct properties set as
- first entry and the service name of the templates second entry. If
- no template was found both elements are empty.
- */
- static tTemplateWithServiceName
- getTemplateForDiagram(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- const css::uno::Reference< css::lang::XMultiServiceFactory > & xChartTypeManager);
-
- /** Sets the "SwapXAndYAxis" property at all coordinate systems found in the
- given diagram.
-
- "vertical==true" for bar charts, "vertical==false" for column charts
- */
- static void setVertical( const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- bool bVertical );
-
- /** Gets the "SwapXAndYAxis" property at all coordinate systems found in the
- given diagram.
-
- "vertical==true" for bar charts, "vertical==false" for column charts
- */
- static bool getVertical( const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- bool& rbOutFoundResult, bool& rbOutAmbiguousResult );
-
- static StackMode getStackMode(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- bool& rbFound, bool& rbAmbiguous
- );
-
- /** The stacking mode is only set at the series found inside
- the first chart type. This is the standard for all current
- templates (the only template that has more than one chart-type and
- allows stacking is bar/line combi, and for this the stacking only
- applies to the first chart type/the bars)
- */
- static void setStackMode(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- StackMode eStackMode
- );
/** Retrieves the stackmode of the first DataSeries or none. If the series have differing stack
modes, rbAmbiguous is set to true. If no series is there rbFound is set to false.
@@ -111,93 +63,27 @@ public:
"ambiguous")
*/
static StackMode getStackModeFromChartType(
- const css::uno::Reference< css::chart2::XChartType > & xChartType,
+ const rtl::Reference< ::chart::ChartType > & xChartType,
bool& rbFound, bool& rbAmbiguous,
- const css::uno::Reference< css::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
+ const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem
);
- /** Returns the dimension found for all chart types in the tree. If the
- dimension is not unique, 0 is returned.
- */
- static sal_Int32 getDimension(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
-
- /** Sets the dimension of the diagram given.
-
- 1. Sets the dimension of all used ChartTypes
- 2. Adapts the DataSeriesTree to reflect the new dimension
- 3. If new coordinate-systems have to be created, adapts the
- XCoordinateSystemContainer of the diagram.
- */
- static void setDimension(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- sal_Int32 nNewDimensionCount );
-
- /** Replaces all occurrences of xCooSysToReplace in the tree with
- xReplacement in the diagram's tree
- */
- SAL_DLLPRIVATE static void replaceCoordinateSystem(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- const css::uno::Reference< css::chart2::XCoordinateSystem > & xCooSysToReplace,
- const css::uno::Reference< css::chart2::XCoordinateSystem > & xReplacement );
-
static bool isSeriesAttachedToMainAxis(
- const css::uno::Reference< css::chart2::XDataSeries >& xDataSeries );
-
- static bool attachSeriesToAxis( bool bMainAxis,
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- const css::uno::Reference< css::uno::XComponentContext > & xContext,
- bool bAdaptAxes=true );
-
- static css::uno::Reference< css::chart2::XAxis > getAttachedAxis(
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries,
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
-
- static css::uno::Reference< css::chart2::XChartType >
- getChartTypeOfSeries(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
-
- static std::vector< css::uno::Reference< css::chart2::XDataSeries > >
- getDataSeriesFromDiagram(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
-
- /** return all data series in this diagram grouped by chart-types
- */
- static css::uno::Sequence<
- css::uno::Sequence<
- css::uno::Reference< css::chart2::XDataSeries > > >
- getDataSeriesGroups(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
-
- static bool isCategoryDiagram(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
-
- static void setCategoriesToDiagram(
- const css::uno::Reference< css::chart2::data::XLabeledDataSequence >& xCategories,
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- bool bSetAxisType = false, // when this flag is true ...
- bool bCategoryAxis = true);// set the AxisType to CATEGORY or back to REALNUMBER
-
- static css::uno::Reference< css::chart2::data::XLabeledDataSequence >
- getCategoriesFromDiagram(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ const rtl::Reference< ::chart::DataSeries >& xDataSeries );
static css::uno::Sequence< OUString >
getExplicitSimpleCategories( ChartModel& rModel );
SAL_DLLPRIVATE static css::uno::Sequence< OUString >
generateAutomaticCategoriesFromCooSys(
- const css::uno::Reference< css::chart2::XCoordinateSystem > & xCooSys );
+ const rtl::Reference< ::chart::BaseCoordinateSystem > & xCooSys );
static void switchToDateCategories(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc );
+ const rtl::Reference<::chart::ChartModel> & xChartDoc );
static void switchToTextCategories(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc );
+ const rtl::Reference<::chart::ChartModel> & xChartDoc );
- static bool isSupportingDateAxis( const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
static bool isDateNumberFormat( sal_Int32 nNumberFormat, const css::uno::Reference< css::util::XNumberFormats >& xNumberFormats );
static sal_Int32 getDateNumberFormat( const css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
static sal_Int32 getDateTimeInputNumberFormat( const css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier, double fNumber );
@@ -205,81 +91,14 @@ public:
static sal_Int32 getPercentNumberFormat( const css::uno::Reference<
css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
- static css::uno::Reference< css::chart2::XChartType >
- getChartTypeByIndex( const css::uno::Reference< css::chart2::XDiagram >& xDiagram, sal_Int32 nIndex );
+ SAL_DLLPRIVATE static bool areChartTypesCompatible(
+ const rtl::Reference< ::chart::ChartType >& xFirstType,
+ const rtl::Reference< ::chart::ChartType >& xSecondType );
- static css::uno::Sequence<
- css::uno::Reference< css::chart2::XChartType > >
- getChartTypesFromDiagram(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
-
- SAL_DLLPRIVATE static bool areChartTypesCompatible( const css::uno::Reference<
- css::chart2::XChartType >& xFirstType,
- const css::uno::Reference< css::chart2::XChartType >& xSecondType );
-
- /**
- * Test if a series can be moved.
- *
- * @param xDiagram
- * Reference to the diagram that contains the series.
- *
- * @param xGivenDataSeries
- * Reference to the series that should be tested for moving.
- *
- * @param bForward
- * Direction of the move to be checked.
- *
- * @returns </sal_True> if the series can be moved.
- *
- */
- static bool isSeriesMoveable(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- const css::uno::Reference< css::chart2::XDataSeries >& xGivenDataSeries,
- bool bForward );
-
- /**
- * Move a series forward or backward.
- *
- * @param xDiagram
- * Reference to the diagram that contains the series.
- *
- * @param xGivenDataSeries
- * Reference to the series that should be moved.
- *
- * @param bForward
- * Direction in which the series should be moved.
- *
- * @returns </sal_True> if the series was moved successfully.
- *
- */
- static bool moveSeries(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram,
- const css::uno::Reference< css::chart2::XDataSeries >& xGivenDataSeries,
- bool bForward );
-
- static bool isSupportingFloorAndWall( const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
-
- static bool isPieOrDonutChart( const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
-
- static sal_Int32 getGeometry3D(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- bool& rbFound, bool& rbAmbiguous );
-
- static void setGeometry3D(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- sal_Int32 nNewGeometry );
-
- //returns integer from constant group css::chart::MissingValueTreatment
- static sal_Int32 getCorrectedMissingValueTreatment(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram,
- const css::uno::Reference< css::chart2::XChartType >& xChartType );
-
- static DiagramPositioningMode getDiagramPositioningMode( const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
-
- static bool setDiagramPositioning( const css::uno::Reference< css::frame::XModel >& xChartModel,
+ static bool setDiagramPositioning( const rtl::Reference<::chart::ChartModel>& xChartModel,
const css::awt::Rectangle& rPosRect /*100th mm*/ );
- static css::awt::Rectangle getDiagramRectangleFromModel( const css::uno::Reference< css::frame::XModel >& xChartModel );
+ static css::awt::Rectangle getDiagramRectangleFromModel( const rtl::Reference<::chart::ChartModel>& xChartModel );
static bool switchDiagramPositioningToExcludingPositioning( ChartModel& rModel
, bool bResetModifiedState //set model back to unchanged if it was unchanged before
@@ -292,7 +111,4 @@ private:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_DIAGRAMHELPER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/DisposeHelper.hxx b/chart2/source/inc/DisposeHelper.hxx
index 9f02ca3f8ab4..58dc2d5c55ba 100644
--- a/chart2/source/inc/DisposeHelper.hxx
+++ b/chart2/source/inc/DisposeHelper.hxx
@@ -16,43 +16,34 @@
* 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_INC_DISPOSEHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_DISPOSEHELPER_HXX
+#pragma once
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/lang/XComponent.hpp>
-namespace chart
+namespace chart::DisposeHelper
{
-namespace DisposeHelper
-{
-
-template<class T>
-void Dispose(const T & xInterface)
+template <class T> void Dispose(const T& xInterface)
{
css::uno::Reference<css::lang::XComponent> xComponent(xInterface, css::uno::UNO_QUERY);
if (xComponent.is())
xComponent->dispose();
}
-template<class T>
-void DisposeAndClear(css::uno::Reference<T> & rInterface)
+template <class T> void DisposeAndClear(css::uno::Reference<T>& rInterface)
{
Dispose<css::uno::Reference<T>>(rInterface);
- rInterface.set(nullptr);
+ rInterface.clear();
}
-template<class Container>
-void DisposeAllElements(Container & rContainer)
+template <class Container> void DisposeAllElements(Container& rContainer)
{
- for (const auto & rElement : rContainer)
+ for (const auto& rElement : rContainer)
{
Dispose<typename Container::value_type>(rElement);
}
}
-}} // namespace chart::DisposeHelper
-
-#endif // INCLUDED_CHART2_SOURCE_INC_DISPOSEHELPER_HXX
+} // namespace chart::DisposeHelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ErrorBar.hxx b/chart2/source/inc/ErrorBar.hxx
index 6cd513ebc940..939b95c739e8 100644
--- a/chart2/source/inc/ErrorBar.hxx
+++ b/chart2/source/inc/ErrorBar.hxx
@@ -16,10 +16,9 @@
* 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_INC_ERRORBAR_HXX
-#define INCLUDED_CHART2_SOURCE_INC_ERRORBAR_HXX
+#pragma once
-#include "MutexContainer.hxx"
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
#include <cppuhelper/implbase.hxx>
@@ -36,7 +35,7 @@
#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/util/Color.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include "ModifyListenerHelper.hxx"
#include <vector>
@@ -58,9 +57,7 @@ typedef ::cppu::WeakImplHelper<
ErrorBar_Base;
}
-class ErrorBar final :
- public MutexContainer,
- public impl::ErrorBar_Base
+class ErrorBar final : public impl::ErrorBar_Base
{
private:
OUString maDashName;
@@ -78,7 +75,7 @@ private:
sal_Int32 meStyle;
public:
- OOO_DLLPUBLIC_CHARTTOOLS explicit ErrorBar();
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) explicit ErrorBar();
virtual ~ErrorBar() override;
/// XServiceInfo declarations
@@ -133,12 +130,9 @@ private:
css::chart2::data::XLabeledDataSequence > > tDataSequenceContainer;
tDataSequenceContainer m_aDataSequences;
- css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
};
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_ERRORBAR_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/EventListenerHelper.hxx b/chart2/source/inc/EventListenerHelper.hxx
index c40fdc49c1e2..dcf3256d46b5 100644
--- a/chart2/source/inc/EventListenerHelper.hxx
+++ b/chart2/source/inc/EventListenerHelper.hxx
@@ -16,12 +16,11 @@
* 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_INC_EVENTLISTENERHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_EVENTLISTENERHELPER_HXX
+#pragma once
#include <com/sun/star/lang/XComponent.hpp>
-#include <algorithm>
+#include <utility>
namespace com::sun::star::lang { class XEventListener; }
@@ -36,8 +35,8 @@ namespace impl
template< class InterfaceRef >
struct addListenerFunctor
{
- explicit addListenerFunctor( const css::uno::Reference< css::lang::XEventListener > & xListener ) :
- m_xListener( xListener )
+ explicit addListenerFunctor( css::uno::Reference< css::lang::XEventListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const InterfaceRef & xObject )
@@ -54,8 +53,8 @@ private:
template< class InterfaceRef >
struct removeListenerFunctor
{
- explicit removeListenerFunctor( const css::uno::Reference< css::lang::XEventListener > & xListener ) :
- m_xListener( xListener )
+ explicit removeListenerFunctor( css::uno::Reference< css::lang::XEventListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const InterfaceRef & xObject )
@@ -118,7 +117,4 @@ void removeListenerFromAllElements(
} // namespace EventListenerHelper
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_EVENTLISTENERHELPER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ExplicitCategoriesProvider.hxx b/chart2/source/inc/ExplicitCategoriesProvider.hxx
index 13c9a3605cc6..73bc258c9922 100644
--- a/chart2/source/inc/ExplicitCategoriesProvider.hxx
+++ b/chart2/source/inc/ExplicitCategoriesProvider.hxx
@@ -16,14 +16,15 @@
* 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_INC_EXPLICITCATEGORIESPROVIDER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_EXPLICITCATEGORIESPROVIDER_HXX
+#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
-#include <cppuhelper/weakref.hxx>
+#include <unotools/weakref.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/uno/Sequence.h>
+#include <utility>
#include <vector>
namespace chart { class ChartModel; }
@@ -34,13 +35,15 @@ namespace com::sun::star::uno { class Any; }
namespace chart
{
+class BaseCoordinateSystem;
+class LabeledDataSequence;
struct OOO_DLLPUBLIC_CHARTTOOLS ComplexCategory
{
OUString Text;
sal_Int32 Count;
- ComplexCategory( const OUString& rText, sal_Int32 nCount ) : Text( rText ), Count (nCount)
+ ComplexCategory( OUString aText, sal_Int32 nCount ) : Text(std::move( aText )), Count (nCount)
{}
};
@@ -53,10 +56,10 @@ public:
virtual css::uno::Sequence< OUString > getStringsForLevel( sal_Int32 nIndex ) const = 0;
};
-class OOO_DLLPUBLIC_CHARTTOOLS ExplicitCategoriesProvider final
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ExplicitCategoriesProvider final
{
public:
- ExplicitCategoriesProvider( const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSysModel
+ ExplicitCategoriesProvider( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSysModel
, ChartModel& rChartModel
);
~ExplicitCategoriesProvider();
@@ -69,7 +72,7 @@ public:
const std::vector<ComplexCategory>* getCategoriesByLevel( sal_Int32 nLevel );
static OUString getCategoryByIndex(
- const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSysModel
+ const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSysModel
, ChartModel& rModel
, sal_Int32 nIndex );
@@ -83,8 +86,8 @@ public:
bool hasComplexCategories() const;
sal_Int32 getCategoryLevelCount() const;
- const css::uno::Sequence< css::uno::Reference<
- css::chart2::data::XLabeledDataSequence> >& getSplitCategoriesList() const { return m_aSplitCategoriesList;}
+ const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence> >&
+ getSplitCategoriesList() const { return m_aSplitCategoriesList;}
bool isDateAxis();
const std::vector< double >& getDateCategories();
@@ -94,15 +97,14 @@ private:
ExplicitCategoriesProvider& operator =(ExplicitCategoriesProvider const &) = delete;
bool volatile m_bDirty;
- css::uno::WeakReference< css::chart2::XCoordinateSystem > m_xCooSysModel;
+ unotools::WeakReference< ::chart::BaseCoordinateSystem > m_xCooSysModel;
ChartModel& mrModel;
css::uno::Reference< css::chart2::data::XLabeledDataSequence> m_xOriginalCategories;
bool m_bIsExplicitCategoriesInited;
css::uno::Sequence< OUString > m_aExplicitCategories;
std::vector< std::vector< ComplexCategory > > m_aComplexCats;
- css::uno::Sequence< css::uno::Reference<
- css::chart2::data::XLabeledDataSequence> > m_aSplitCategoriesList;
+ std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence> > m_aSplitCategoriesList;
bool m_bIsDateAxis;
bool m_bIsAutoDate;
@@ -111,7 +113,4 @@ private:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_EXPLICITCATEGORIESPROVIDER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx b/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
index ba08bb13dfd1..c929ac80cd73 100644
--- a/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
@@ -16,15 +16,14 @@
* 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_INC_EXPONENTIALREGRESSIONCURVECALCULATOR_HXX
-#define INCLUDED_CHART2_SOURCE_INC_EXPONENTIALREGRESSIONCURVECALCULATOR_HXX
+#pragma once
#include "RegressionCurveCalculator.hxx"
namespace chart
{
-class ExponentialRegressionCurveCalculator : public RegressionCurveCalculator
+class ExponentialRegressionCurveCalculator final : public RegressionCurveCalculator
{
public:
ExponentialRegressionCurveCalculator();
@@ -60,7 +59,4 @@ private:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_EXPONENTIALREGRESSIONCURVECALCULATOR_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/FastPropertyIdRanges.hxx b/chart2/source/inc/FastPropertyIdRanges.hxx
index a2572c5117fc..d06809e44c1f 100644
--- a/chart2/source/inc/FastPropertyIdRanges.hxx
+++ b/chart2/source/inc/FastPropertyIdRanges.hxx
@@ -16,24 +16,22 @@
* 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_INC_FASTPROPERTYIDRANGES_HXX
-#define INCLUDED_CHART2_SOURCE_INC_FASTPROPERTYIDRANGES_HXX
+#pragma once
namespace chart
{
-
enum FastPropertyIdRanges
{
FAST_PROPERTY_ID_START = 10000,
FAST_PROPERTY_ID_START_DATA_SERIES = FAST_PROPERTY_ID_START + 1000,
- FAST_PROPERTY_ID_START_DATA_POINT = FAST_PROPERTY_ID_START + 2000,
- FAST_PROPERTY_ID_START_CHAR_PROP = FAST_PROPERTY_ID_START + 3000,
- FAST_PROPERTY_ID_START_LINE_PROP = FAST_PROPERTY_ID_START + 4000,
- FAST_PROPERTY_ID_START_FILL_PROP = FAST_PROPERTY_ID_START + 5000,
- FAST_PROPERTY_ID_START_USERDEF_PROP= FAST_PROPERTY_ID_START + 6000,
- FAST_PROPERTY_ID_START_SCENE_PROP = FAST_PROPERTY_ID_START + 7000,
-// FAST_PROPERTY_ID_START_NAMED_FILL_PROP = FAST_PROPERTY_ID_START + 8000,
-// FAST_PROPERTY_ID_START_NAMED_LINE_PROP = FAST_PROPERTY_ID_START + 9000,
+ FAST_PROPERTY_ID_START_DATA_POINT = FAST_PROPERTY_ID_START + 2000,
+ FAST_PROPERTY_ID_START_CHAR_PROP = FAST_PROPERTY_ID_START + 3000,
+ FAST_PROPERTY_ID_START_LINE_PROP = FAST_PROPERTY_ID_START + 4000,
+ FAST_PROPERTY_ID_START_FILL_PROP = FAST_PROPERTY_ID_START + 5000,
+ FAST_PROPERTY_ID_START_USERDEF_PROP = FAST_PROPERTY_ID_START + 6000,
+ FAST_PROPERTY_ID_START_SCENE_PROP = FAST_PROPERTY_ID_START + 7000,
+ // FAST_PROPERTY_ID_START_NAMED_FILL_PROP = FAST_PROPERTY_ID_START + 8000,
+ // FAST_PROPERTY_ID_START_NAMED_LINE_PROP = FAST_PROPERTY_ID_START + 9000,
FAST_PROPERTY_ID_START_CHART_STATISTIC_PROP = FAST_PROPERTY_ID_START + 12000,
FAST_PROPERTY_ID_START_CHART_SYMBOL_PROP = FAST_PROPERTY_ID_START + 13000,
FAST_PROPERTY_ID_START_CHART_DATACAPTION_PROP = FAST_PROPERTY_ID_START + 14000,
@@ -45,7 +43,4 @@ enum FastPropertyIdRanges
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_FASTPROPERTYIDRANGES_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/FillProperties.hxx b/chart2/source/inc/FillProperties.hxx
index 65a7b221e517..ce1c6d83629c 100644
--- a/chart2/source/inc/FillProperties.hxx
+++ b/chart2/source/inc/FillProperties.hxx
@@ -16,8 +16,7 @@
* 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_INC_FILLPROPERTIES_HXX
-#define INCLUDED_CHART2_SOURCE_INC_FILLPROPERTIES_HXX
+#pragma once
#include "PropertyHelper.hxx"
#include "FastPropertyIdRanges.hxx"
@@ -64,15 +63,12 @@ namespace FillProperties
, PROP_FILL_BACKGROUND
};
- OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddPropertiesToVector(
std::vector< css::beans::Property > & rOutProperties );
- OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
}
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_FILLPROPERTIES_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/FormattedString.hxx b/chart2/source/inc/FormattedString.hxx
new file mode 100644
index 000000000000..23c81454facf
--- /dev/null
+++ b/chart2/source/inc/FormattedString.hxx
@@ -0,0 +1,142 @@
+/* -*- 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 .
+ */
+#pragma once
+
+#include "OPropertySet.hxx"
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include "ModifyListenerHelper.hxx"
+#include "PropertyHelper.hxx"
+
+namespace chart
+{
+
+namespace impl
+{
+typedef ::cppu::WeakImplHelper<
+ css::chart2::XDataPointCustomLabelField, // inherits from XFormattedString2
+ css::lang::XServiceInfo,
+ css::util::XCloneable,
+ css::util::XModifyBroadcaster,
+ css::util::XModifyListener >
+ FormattedString_Base;
+}
+
+class FormattedString final :
+ public impl::FormattedString_Base,
+ public ::property::OPropertySet
+{
+public:
+ explicit FormattedString();
+ virtual ~FormattedString() override;
+
+ /// declare XServiceInfo methods
+ 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()
+
+ virtual void SAL_CALL setPropertyValue(const OUString& p1, const css::uno::Any& p2) override
+ { ::property::OPropertySet::setPropertyValue(p1, p2); }
+ virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& p1) override
+ { return ::property::OPropertySet::getPropertyValue(p1); }
+ virtual void SAL_CALL addPropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) override
+ { ::property::OPropertySet::addPropertyChangeListener(p1, p2); }
+ virtual void SAL_CALL removePropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) override
+ { ::property::OPropertySet::removePropertyChangeListener(p1, p2); }
+ virtual void SAL_CALL addVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) override
+ { ::property::OPropertySet::addVetoableChangeListener(p1, p2); }
+ virtual void SAL_CALL removeVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) override
+ { ::property::OPropertySet::removeVetoableChangeListener(p1, p2); }
+
+ explicit FormattedString( const FormattedString & rOther );
+
+ // ____ XFormattedString ____
+ virtual OUString SAL_CALL getString() override;
+ virtual void SAL_CALL setString( const OUString& String ) override;
+
+ // ____ XDataPointCustomLabelField ____
+ virtual css::chart2::DataPointCustomLabelFieldType SAL_CALL getFieldType() override;
+ virtual void SAL_CALL
+ setFieldType( const css::chart2::DataPointCustomLabelFieldType FieldType ) override;
+ virtual OUString SAL_CALL getGuid() override;
+ void SAL_CALL setGuid( const OUString& guid ) override;
+ virtual sal_Bool SAL_CALL getDataLabelsRange() override;
+ virtual void SAL_CALL setDataLabelsRange( sal_Bool dataLabelsRange ) override;
+ virtual OUString SAL_CALL getCellRange() override;
+ virtual void SAL_CALL setCellRange( const OUString& cellRange ) override;
+
+ // ____ OPropertySet ____
+ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
+
+ // ____ OPropertySet ____
+ 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;
+
+private:
+ // ____ OPropertySet ____
+ virtual void firePropertyChangeEvent() override;
+ using OPropertySet::disposing;
+
+ void fireModifyEvent();
+
+ // ____ XFormattedString ____
+ OUString m_aString;
+
+ // ____ XDataPointCustomLabelField ____
+ css::chart2::DataPointCustomLabelFieldType m_aType;
+ OUString m_aGuid;
+ OUString m_aCellRange;
+ bool m_bDataLabelsRange;
+
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+};
+
+OOO_DLLPUBLIC_CHARTTOOLS const ::chart::tPropertyValueMap & StaticFormattedStringDefaults();
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/FormattedStringHelper.hxx b/chart2/source/inc/FormattedStringHelper.hxx
index 9953de31aff5..adc1f54802b8 100644
--- a/chart2/source/inc/FormattedStringHelper.hxx
+++ b/chart2/source/inc/FormattedStringHelper.hxx
@@ -16,31 +16,28 @@
* 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_INC_FORMATTEDSTRINGHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_FORMATTEDSTRINGHELPER_HXX
+#pragma once
-#include <com/sun/star/uno/Sequence.h>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::chart2 { class XFormattedString2; }
-namespace com::sun::star::uno { class XComponentContext; }
namespace com::sun::star::uno { template <class interface_type> class Reference; }
namespace chart
{
+class FormattedString;
class FormattedStringHelper
{
public:
- static css::uno::Sequence<
- css::uno::Reference< css::chart2::XFormattedString2 > >
- createFormattedStringSequence(
- const css::uno::Reference< css::uno::XComponentContext > & xContext
- , const OUString & rString
- , const css::uno::Reference< css::beans::XPropertySet > & xTextProperties ) throw();
+ static rtl::Reference< ::chart::FormattedString >
+ createFormattedString(
+ const OUString & rString
+ , const css::uno::Reference< css::beans::XPropertySet > & xTextProperties ) noexcept;
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/GridProperties.hxx b/chart2/source/inc/GridProperties.hxx
new file mode 100644
index 000000000000..da19322675e3
--- /dev/null
+++ b/chart2/source/inc/GridProperties.hxx
@@ -0,0 +1,98 @@
+/* -*- 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 .
+ */
+#pragma once
+
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include "ModifyListenerHelper.hxx"
+
+#include "OPropertySet.hxx"
+
+namespace chart
+{
+
+namespace impl
+{
+typedef ::cppu::WeakImplHelper<
+ css::lang::XServiceInfo,
+ css::util::XCloneable,
+ css::util::XModifyBroadcaster,
+ css::util::XModifyListener >
+ GridProperties_Base;
+}
+
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) GridProperties final :
+ public impl::GridProperties_Base,
+ public ::property::OPropertySet
+{
+public:
+ explicit GridProperties();
+ explicit GridProperties( const GridProperties & rOther );
+ virtual ~GridProperties() 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()
+
+ // ____ OPropertySet ____
+ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) 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;
+
+private:
+
+ // ____ 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;
+
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+};
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/InternalData.hxx b/chart2/source/inc/InternalData.hxx
index 25ed60606d74..9d9abeb3a7c0 100644
--- a/chart2/source/inc/InternalData.hxx
+++ b/chart2/source/inc/InternalData.hxx
@@ -16,8 +16,7 @@
* 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_INC_INTERNALDATA_HXX
-#define INCLUDED_CHART2_SOURCE_INC_INTERNALDATA_HXX
+#pragma once
#include <com/sun/star/uno/Sequence.hxx>
@@ -43,8 +42,8 @@ public:
void setColumnValues( sal_Int32 nColumnIndex, const std::vector< double > & rNewData );
void setRowValues( sal_Int32 nRowIndex, const std::vector< double > & rNewData );
- void setComplexColumnLabel( sal_Int32 nColumnIndex, const std::vector< css::uno::Any >& rComplexLabel );
- void setComplexRowLabel( sal_Int32 nRowIndex, const std::vector< css::uno::Any >& rComplexLabel );
+ void setComplexColumnLabel( sal_Int32 nColumnIndex, std::vector< css::uno::Any >&& rComplexLabel );
+ void setComplexRowLabel( sal_Int32 nRowIndex, std::vector< css::uno::Any >&& rComplexLabel );
std::vector< css::uno::Any > getComplexColumnLabel( sal_Int32 nColumnIndex ) const;
std::vector< css::uno::Any > getComplexRowLabel( sal_Int32 nRowIndex ) const;
@@ -67,9 +66,9 @@ public:
typedef std::vector< std::vector< css::uno::Any > > tVecVecAny; //inner index is hierarchical level
- void setComplexRowLabels( const tVecVecAny& rNewRowLabels );
+ void setComplexRowLabels( tVecVecAny&& rNewRowLabels );
const tVecVecAny& getComplexRowLabels() const;
- void setComplexColumnLabels( const tVecVecAny& rNewColumnLabels );
+ void setComplexColumnLabels( tVecVecAny&& rNewColumnLabels );
const tVecVecAny& getComplexColumnLabels() const;
void dump() const;
@@ -92,8 +91,6 @@ private:
tVecVecAny m_aColumnLabels;//outer index is column index
};
-#endif
-
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/InternalDataProvider.hxx b/chart2/source/inc/InternalDataProvider.hxx
index 7c3491ae17e6..a5032efcdab8 100644
--- a/chart2/source/inc/InternalDataProvider.hxx
+++ b/chart2/source/inc/InternalDataProvider.hxx
@@ -16,8 +16,7 @@
* 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_INC_INTERNALDATAPROVIDER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_INTERNALDATAPROVIDER_HXX
+#pragma once
#include "InternalData.hxx"
@@ -30,6 +29,7 @@
#include <com/sun/star/util/XCloneable.hpp>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/weakref.hxx>
+#include <rtl/ref.hxx>
#include <map>
@@ -37,6 +37,8 @@ namespace com::sun::star::chart2 { class XChartDocument; }
namespace chart
{
+class ChartModel;
+class UncachedDataSequence;
namespace impl
{
@@ -62,7 +64,7 @@ typedef ::cppu::WeakImplHelper<
<p>The format for a complete range is "all". (Do we need more than
that?)</p>
*/
-class InternalDataProvider :
+class InternalDataProvider final :
public impl::InternalDataProvider_Base
{
public:
@@ -71,7 +73,7 @@ public:
// #i120559# allow handing over a default for data orientation
// (DataInColumns) that will be used when no data is available
explicit InternalDataProvider(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc,
+ const rtl::Reference< ::chart::ChartModel > & xChartDoc,
bool bConnectToModel,
bool bDefaultDataInColumns );
explicit InternalDataProvider( const InternalDataProvider & rOther );
@@ -113,7 +115,8 @@ public:
const OUString& aRangeRepresentation ) override;
virtual css::uno::Reference<css::chart2::data::XDataSequence> SAL_CALL
- createDataSequenceByValueArray( const OUString& aRole, const OUString& aRangeRepresentation ) override;
+ createDataSequenceByValueArray( const OUString& aRole, const OUString& aRangeRepresentation,
+ const OUString& aRoleQualifier ) override;
virtual css::uno::Reference< css::sheet::XRangeSelection > SAL_CALL getRangeSelection() override;
@@ -180,11 +183,12 @@ private:
css::uno::Reference< css::chart2::data::XDataSequence >
createDataSequenceAndAddToMap( const OUString & rRangeRepresentation,
const OUString & rRole );
- css::uno::Reference< css::chart2::data::XDataSequence >
+ rtl::Reference< UncachedDataSequence >
createDataSequenceAndAddToMap( const OUString & rRangeRepresentation );
- css::uno::Reference<css::chart2::data::XDataSequence>
- createDataSequenceFromArray( const OUString& rArrayStr, const OUString& rRole );
+ rtl::Reference<UncachedDataSequence>
+ createDataSequenceFromArray( const OUString& rArrayStr, std::u16string_view rRole,
+ std::u16string_view rRoleQualifier);
void deleteMapReferences( const OUString & rRangeRepresentation );
@@ -213,7 +217,4 @@ private:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_INTERNALDATAPROVIDER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/LabeledDataSequence.hxx b/chart2/source/inc/LabeledDataSequence.hxx
index dd99ac8479b5..aa37753695f9 100644
--- a/chart2/source/inc/LabeledDataSequence.hxx
+++ b/chart2/source/inc/LabeledDataSequence.hxx
@@ -16,14 +16,15 @@
* 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_INC_LABELEDDATASEQUENCE_HXX
-#define INCLUDED_CHART2_SOURCE_INC_LABELEDDATASEQUENCE_HXX
+#pragma once
-#include "MutexContainer.hxx"
+#include <config_options.h>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/chart2/data/XLabeledDataSequence2.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include "ModifyListenerHelper.hxx"
+#include "charttoolsdllapi.hxx"
namespace com::sun::star::chart2::data { class XDataSequence; }
namespace com::sun::star::util { class XCloneable; }
@@ -40,17 +41,17 @@ typedef cppu::WeakImplHelper<
LabeledDataSequence_Base;
}
-class LabeledDataSequence :
- public MutexContainer,
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) LabeledDataSequence final :
public impl::LabeledDataSequence_Base
{
public:
explicit LabeledDataSequence();
+ explicit LabeledDataSequence(const LabeledDataSequence &);
explicit LabeledDataSequence(
- const css::uno::Reference< css::chart2::data::XDataSequence > & rValues );
+ css::uno::Reference< css::chart2::data::XDataSequence > xValues );
explicit LabeledDataSequence(
- const css::uno::Reference< css::chart2::data::XDataSequence > & rValues,
- const css::uno::Reference< css::chart2::data::XDataSequence > & rLabels );
+ css::uno::Reference< css::chart2::data::XDataSequence > xValues,
+ css::uno::Reference< css::chart2::data::XDataSequence > xLabels );
virtual ~LabeledDataSequence() override;
@@ -59,7 +60,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
-protected:
// ____ XLabeledDataSequence ____
virtual css::uno::Reference< css::chart2::data::XDataSequence > SAL_CALL getValues() override;
virtual void SAL_CALL setValues(
@@ -81,12 +81,9 @@ private:
css::uno::Reference< css::chart2::data::XDataSequence > m_xData;
css::uno::Reference< css::chart2::data::XDataSequence > m_xLabel;
- css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
};
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_LABELEDDATASEQUENCE_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/Legend.hxx b/chart2/source/inc/Legend.hxx
new file mode 100644
index 000000000000..dbc3db602400
--- /dev/null
+++ b/chart2/source/inc/Legend.hxx
@@ -0,0 +1,106 @@
+/* -*- 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 .
+ */
+#pragma once
+
+#include "OPropertySet.hxx"
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+#include <com/sun/star/chart2/XLegend.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include "ModifyListenerHelper.hxx"
+#include "charttoolsdllapi.hxx"
+#include "PropertyHelper.hxx"
+
+namespace chart
+{
+
+namespace impl
+{
+typedef ::cppu::WeakImplHelper<
+ css::chart2::XLegend,
+ css::lang::XServiceInfo,
+ css::util::XCloneable,
+ css::util::XModifyBroadcaster,
+ css::util::XModifyListener >
+ Legend_Base;
+}
+
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) Legend final :
+ public impl::Legend_Base,
+ public ::property::OPropertySet
+{
+public:
+ explicit Legend();
+ virtual ~Legend() 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()
+
+ explicit Legend( const Legend & rOther );
+
+private:
+ // ____ OPropertySet ____
+ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
+
+ // ____ OPropertySet ____
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+
+public:
+ // ____ 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;
+
+private:
+ // ____ 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;
+
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+};
+
+OOO_DLLPUBLIC_CHARTTOOLS const ::chart::tPropertyValueMap& StaticLegendDefaults();
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/LegendHelper.hxx b/chart2/source/inc/LegendHelper.hxx
index 75064f594eb6..c46131bd2bc4 100644
--- a/chart2/source/inc/LegendHelper.hxx
+++ b/chart2/source/inc/LegendHelper.hxx
@@ -16,10 +16,11 @@
* 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_INC_LEGENDHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_LEGENDHELPER_HXX
+#pragma once
+#include <config_options.h>
#include <com/sun/star/uno/Reference.hxx>
+#include <rtl/ref.hxx>
#include "charttoolsdllapi.hxx"
namespace chart { class ChartModel; }
@@ -29,17 +30,19 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
+class Diagram;
+class Legend;
-class OOO_DLLPUBLIC_CHARTTOOLS LegendHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) LegendHelper
{
public:
- static css::uno::Reference< css::chart2::XLegend >
+ static rtl::Reference< ::chart::Legend >
showLegend( ChartModel& rModel
, const css::uno::Reference< css::uno::XComponentContext >& xContext );
static void hideLegend( ChartModel& rModel );
- static css::uno::Reference< css::chart2::XLegend >
+ static rtl::Reference< ::chart::Legend >
getLegend( ChartModel& rModel
, const css::uno::Reference< css::uno::XComponentContext >& xContext = nullptr
, bool bCreate = false );
@@ -48,10 +51,9 @@ public:
is a legend which has a "Show" property of value <FALSE/>. Otherwise,
<TRUE/> is returned.
*/
- static bool hasLegend( const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ static bool hasLegend( const rtl::Reference< ::chart::Diagram > & xDiagram );
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx
index ca1e583f9835..582d10086b78 100644
--- a/chart2/source/inc/LifeTime.hxx
+++ b/chart2/source/inc/LifeTime.hxx
@@ -16,27 +16,29 @@
* 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_INC_LIFETIME_HXX
-#define INCLUDED_CHART2_SOURCE_INC_LIFETIME_HXX
+#pragma once
-#include <osl/mutex.hxx>
+#include <config_options.h>
+#include <mutex>
#include <osl/conditn.hxx>
-#include <cppuhelper/interfacecontainer.h>
+#include <comphelper/interfacecontainer4.hxx>
#include "charttoolsdllapi.hxx"
+namespace com::sun::star::document { class XStorageChangeListener; }
namespace com::sun::star::lang { class XComponent; }
+namespace com::sun::star::lang { class XEventListener; }
namespace com::sun::star::util { class CloseVetoException; }
namespace com::sun::star::util { class XCloseListener; }
namespace com::sun::star::util { class XCloseable; }
+namespace com::sun::star::util { class XModifyListener; }
+namespace com::sun::star::view { class XSelectionChangeListener; }
namespace apphelper
{
-class OOO_DLLPUBLIC_CHARTTOOLS LifeTimeManager
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) LifeTimeManager
{
friend class LifeTimeGuard;
-protected:
- mutable ::osl::Mutex m_aAccessMutex;
public:
LifeTimeManager( css::lang::XComponent* pComponent );
virtual ~LifeTimeManager();
@@ -45,25 +47,25 @@ public:
/// @throws css::uno::RuntimeException
bool dispose();
-public:
- ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer;
+ mutable std::mutex m_aAccessMutex;
+ ::comphelper::OInterfaceContainerHelper4<css::util::XCloseListener> m_aCloseListeners;
+ ::comphelper::OInterfaceContainerHelper4<css::util::XModifyListener> m_aModifyListeners;
+ ::comphelper::OInterfaceContainerHelper4<css::document::XStorageChangeListener> m_aStorageChangeListeners;
+ ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListeners;
+ ::comphelper::OInterfaceContainerHelper4<css::view::XSelectionChangeListener> m_aSelectionChangeListeners;
protected:
- SAL_DLLPRIVATE virtual bool impl_canStartApiCall();
- SAL_DLLPRIVATE virtual void impl_apiCallCountReachedNull(){}
+ SAL_DLLPRIVATE virtual bool impl_canStartApiCall();
+ SAL_DLLPRIVATE virtual void impl_apiCallCountReachedNull(std::unique_lock<std::mutex>& /*rGuard*/){}
SAL_DLLPRIVATE void impl_registerApiCall(bool bLongLastingCall);
- SAL_DLLPRIVATE void impl_unregisterApiCall(bool bLongLastingCall);
+ SAL_DLLPRIVATE void impl_unregisterApiCall(std::unique_lock<std::mutex>& rGuard, bool bLongLastingCall);
-protected:
css::lang::XComponent* m_pComponent;
-
::osl::Condition m_aNoAccessCountCondition;
sal_Int32 m_nAccessCount;
-
bool volatile m_bDisposed;
bool volatile m_bInDispose;
-
::osl::Condition m_aNoLongLastingCallCountCondition;
sal_Int32 m_nLongLastingCallCount;
};
@@ -97,10 +99,10 @@ public:
private:
virtual bool impl_canStartApiCall() override;
- virtual void impl_apiCallCountReachedNull() override;
+ virtual void impl_apiCallCountReachedNull(std::unique_lock<std::mutex>& rGuard) override;
void impl_setOwnership( bool bDeliverOwnership, bool bMyVeto );
- void impl_doClose();
+ void impl_doClose(std::unique_lock<std::mutex>& rGuard);
};
/*
@@ -179,10 +181,10 @@ public:
}
bool startApiCall(bool bLongLastingCall=false);
~LifeTimeGuard();
- void clear() { m_guard.clear(); }
+ void clear() { m_guard.unlock(); }
private:
- osl::ClearableMutexGuard m_guard;
+ std::unique_lock<std::mutex> m_guard;
LifeTimeManager& m_rManager;
bool m_bCallRegistered;
bool m_bLongLastingCallRegistered;
@@ -192,24 +194,6 @@ private:
LifeTimeGuard& operator= ( const LifeTimeGuard& ) = delete;
};
-template<class T>
-class NegativeGuard final
-{
- T * m_pT;
-public:
-
- NegativeGuard(T & t) : m_pT(&t)
- {
- m_pT->release();
- }
-
- ~NegativeGuard()
- {
- m_pT->acquire();
- }
-};
-
}//end namespace apphelper
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/LinePropertiesHelper.hxx b/chart2/source/inc/LinePropertiesHelper.hxx
index 11c56b186eaf..efa5a6e6b847 100644
--- a/chart2/source/inc/LinePropertiesHelper.hxx
+++ b/chart2/source/inc/LinePropertiesHelper.hxx
@@ -16,8 +16,7 @@
* 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_INC_LINEPROPERTIESHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_LINEPROPERTIESHELPER_HXX
+#pragma once
#include "PropertyHelper.hxx"
#include "FastPropertyIdRanges.hxx"
@@ -45,13 +44,14 @@ namespace LinePropertiesHelper
PROP_LINE_COLOR,
PROP_LINE_TRANSPARENCE,
PROP_LINE_WIDTH,
- PROP_LINE_JOINT
+ PROP_LINE_JOINT,
+ PROP_LINE_CAP
};
- OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddPropertiesToVector(
std::vector< css::beans::Property > & rOutProperties );
- OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
bool IsLineVisible( const css::uno::Reference<
css::beans::XPropertySet >& xLineProperties );
@@ -65,7 +65,4 @@ namespace LinePropertiesHelper
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_LINEPROPERTIESHELPER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/LinearRegressionCurveCalculator.hxx b/chart2/source/inc/LinearRegressionCurveCalculator.hxx
index 24d82d1ecf5d..05853b26a8f5 100644
--- a/chart2/source/inc/LinearRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/LinearRegressionCurveCalculator.hxx
@@ -16,15 +16,14 @@
* 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_INC_LINEARREGRESSIONCURVECALCULATOR_HXX
-#define INCLUDED_CHART2_SOURCE_INC_LINEARREGRESSIONCURVECALCULATOR_HXX
+#pragma once
#include "PolynomialRegressionCurveCalculator.hxx"
namespace chart
{
-class LinearRegressionCurveCalculator : public PolynomialRegressionCurveCalculator
+class LinearRegressionCurveCalculator final : public PolynomialRegressionCurveCalculator
{
public:
LinearRegressionCurveCalculator();
@@ -35,7 +34,8 @@ private:
sal_Int32 aDegree,
sal_Bool aForceIntercept,
double aInterceptValue,
- sal_Int32 aPeriod) override;
+ sal_Int32 aPeriod,
+ sal_Int32 nMovingType) override;
virtual css::uno::Sequence<css::geometry::RealPoint2D> SAL_CALL getCurveValues(
double min,
@@ -48,7 +48,4 @@ private:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_LINEARREGRESSIONCURVECALCULATOR_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx b/chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx
index 522756afe139..02fa1fc22bc0 100644
--- a/chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/LogarithmicRegressionCurveCalculator.hxx
@@ -16,15 +16,14 @@
* 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_INC_LOGARITHMICREGRESSIONCURVECALCULATOR_HXX
-#define INCLUDED_CHART2_SOURCE_INC_LOGARITHMICREGRESSIONCURVECALCULATOR_HXX
+#pragma once
#include "RegressionCurveCalculator.hxx"
namespace chart
{
-class LogarithmicRegressionCurveCalculator : public RegressionCurveCalculator
+class LogarithmicRegressionCurveCalculator final : public RegressionCurveCalculator
{
public:
LogarithmicRegressionCurveCalculator();
@@ -58,7 +57,4 @@ private:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_LOGARITHMICREGRESSIONCURVECALCULATOR_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/MeanValueRegressionCurveCalculator.hxx b/chart2/source/inc/MeanValueRegressionCurveCalculator.hxx
index 7c947bec4d8c..be46e973887d 100644
--- a/chart2/source/inc/MeanValueRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/MeanValueRegressionCurveCalculator.hxx
@@ -16,15 +16,14 @@
* 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_INC_MEANVALUEREGRESSIONCURVECALCULATOR_HXX
-#define INCLUDED_CHART2_SOURCE_INC_MEANVALUEREGRESSIONCURVECALCULATOR_HXX
+#pragma once
#include "RegressionCurveCalculator.hxx"
namespace chart
{
-class MeanValueRegressionCurveCalculator : public RegressionCurveCalculator
+class MeanValueRegressionCurveCalculator final : public RegressionCurveCalculator
{
public:
MeanValueRegressionCurveCalculator();
@@ -57,7 +56,4 @@ private:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_MEANVALUEREGRESSIONCURVECALCULATOR_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/MediaDescriptorHelper.hxx b/chart2/source/inc/MediaDescriptorHelper.hxx
index f44d5d1d038f..46edb2657598 100644
--- a/chart2/source/inc/MediaDescriptorHelper.hxx
+++ b/chart2/source/inc/MediaDescriptorHelper.hxx
@@ -16,9 +16,9 @@
* 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_INC_MEDIADESCRIPTORHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_MEDIADESCRIPTORHELPER_HXX
+#pragma once
+#include <config_options.h>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -44,7 +44,7 @@ namespace com::sun::star::io { class XStream; }
namespace apphelper
{
-class OOO_DLLPUBLIC_CHARTTOOLS MediaDescriptorHelper final
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) MediaDescriptorHelper final
{
public:
MediaDescriptorHelper( const css::uno::Sequence< css::beans::PropertyValue > & rMediaDescriptor );
@@ -88,6 +88,4 @@ private:
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/TrueGuard.hxx b/chart2/source/inc/ModifyListenerCallBack.hxx
index 109c64a06c03..b1b704c86002 100644
--- a/chart2/source/inc/TrueGuard.hxx
+++ b/chart2/source/inc/ModifyListenerCallBack.hxx
@@ -16,24 +16,43 @@
* 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_INC_TRUEGUARD_HXX
-#define INCLUDED_CHART2_SOURCE_INC_TRUEGUARD_HXX
+
+#pragma once
+
+#include <config_options.h>
+#include <tools/link.hxx>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include "charttoolsdllapi.hxx"
namespace chart
{
-/** This guard sets the given boolean reference to true in the constructor and to false in the destructor
+/** Use this class as a member if you want to listen on a XModifyBroadcaster
+without becoming a XModifyListener yourself
*/
-class TrueGuard final
+
+class ModifyListenerCallBack_impl;
+
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ModifyListenerCallBack final
{
public:
- explicit TrueGuard(bool& rbTrueDuringGuardedTime);
- ~TrueGuard();
+ explicit ModifyListenerCallBack(const Link<void*, void>& rCallBack);
-private:
- bool& m_rbTrueDuringGuardedTime;
+ ~ModifyListenerCallBack();
+
+ void startListening(
+ const ::com::sun::star::uno::Reference<::com::sun::star::util::XModifyBroadcaster>&
+ xBroadcaster);
+ SAL_DLLPRIVATE void stopListening();
+
+private: //methods
+ ModifyListenerCallBack(const ModifyListenerCallBack&) = delete;
+
+private: //member
+ ModifyListenerCallBack_impl* pModifyListener_impl;
+ css::uno::Reference<css::util::XModifyListener> m_xModifyListener;
};
-}
-// INCLUDED_CHART2_SOURCE_INC_TRUEGUARD_HXX
-#endif
+
+} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ModifyListenerHelper.hxx b/chart2/source/inc/ModifyListenerHelper.hxx
index 29c4106f538f..ee90d407a66f 100644
--- a/chart2/source/inc/ModifyListenerHelper.hxx
+++ b/chart2/source/inc/ModifyListenerHelper.hxx
@@ -16,52 +16,33 @@
* 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_INC_MODIFYLISTENERHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_MODIFYLISTENERHELPER_HXX
+#pragma once
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/interfacecontainer4.hxx>
+#include <comphelper/compbase.hxx>
+#include <rtl/ref.hxx>
-#include "MutexContainer.hxx"
-
-#include <vector>
+#include <mutex>
#include <algorithm>
#include <utility>
-namespace com::sun::star::uno { class XWeak; }
-namespace com::sun::star::uno { template <class interface_type> class WeakReference; }
-
namespace chart
{
-namespace ModifyListenerHelper
-{
-
-css::uno::Reference< css::util::XModifyListener > createModifyEventForwarder();
/** This helper class serves as forwarder of modify events. It can be used
whenever an object has to send modify events after it gets a modify event of
one of its children.
-
- <p>The listeners are held as WeakReferences if they support XWeak. Thus the
- life time of the listeners is independent of the broadcaster's lifetime in
- this case.</p>
*/
-class ModifyEventForwarder :
- public MutexContainer,
- public ::cppu::WeakComponentImplHelper<
+class ModifyEventForwarder final :
+ public ::comphelper::WeakComponentImplHelper<
css::util::XModifyBroadcaster,
css::util::XModifyListener >
{
public:
ModifyEventForwarder();
- void AddListener(
- const css::uno::Reference< css::util::XModifyListener >& aListener );
- void RemoveListener(
- const css::uno::Reference< css::util::XModifyListener >& aListener );
-
-protected:
// ____ XModifyBroadcaster ____
virtual void SAL_CALL addModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
@@ -72,29 +53,21 @@ protected:
virtual void SAL_CALL modified(
const css::lang::EventObject& aEvent ) override;
+private:
// ____ XEventListener (base of XModifyListener) ____
virtual void SAL_CALL disposing(
const css::lang::EventObject& Source ) override;
// ____ WeakComponentImplHelperBase ____
- virtual void SAL_CALL disposing() override;
-
-private:
- /// call disposing() at all listeners and remove all listeners
- void DisposeAndClear( const css::uno::Reference<
- css::uno::XWeak > & xSource );
+ virtual void disposing(std::unique_lock<std::mutex>& ) override;
-// ::osl::Mutex & m_rMutex;
- ::cppu::OBroadcastHelper m_aModifyListeners;
+ comphelper::OInterfaceContainerHelper4<css::util::XModifyListener> m_aModifyListeners;
+};
- typedef std::vector<
- std::pair<
- css::uno::WeakReference< css::util::XModifyListener >,
- css::uno::Reference< css::util::XModifyListener > > >
- tListenerMap;
+}
- tListenerMap m_aListenerMap;
-};
+namespace chart::ModifyListenerHelper
+{
namespace impl
{
@@ -102,8 +75,8 @@ namespace impl
template< class InterfaceRef >
struct addListenerFunctor
{
- explicit addListenerFunctor( const css::uno::Reference< css::util::XModifyListener > & xListener ) :
- m_xListener( xListener )
+ explicit addListenerFunctor( css::uno::Reference< css::util::XModifyListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const InterfaceRef & xObject )
@@ -120,8 +93,8 @@ private:
template< class InterfaceRef >
struct removeListenerFunctor
{
- explicit removeListenerFunctor( const css::uno::Reference< css::util::XModifyListener > & xListener ) :
- m_xListener( xListener )
+ explicit removeListenerFunctor( css::uno::Reference< css::util::XModifyListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const InterfaceRef & xObject )
@@ -138,8 +111,8 @@ private:
template< class Pair >
struct addListenerToMappedElementFunctor
{
- explicit addListenerToMappedElementFunctor( const css::uno::Reference< css::util::XModifyListener > & xListener ) :
- m_xListener( xListener )
+ explicit addListenerToMappedElementFunctor( css::uno::Reference< css::util::XModifyListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const Pair & aPair )
@@ -156,8 +129,8 @@ private:
template< class Pair >
struct removeListenerFromMappedElementFunctor
{
- explicit removeListenerFromMappedElementFunctor( const css::uno::Reference< css::util::XModifyListener > & xListener ) :
- m_xListener( xListener )
+ explicit removeListenerFromMappedElementFunctor( css::uno::Reference< css::util::XModifyListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const Pair & aPair )
@@ -184,6 +157,14 @@ void addListener(
aFunctor( xObject );
}
}
+template< class T >
+void addListener(
+ const rtl::Reference<T> & xBroadcaster,
+ const css::uno::Reference< css::util::XModifyListener > & xListener )
+{
+ if( xBroadcaster && xListener )
+ xBroadcaster->addModifyListener( xListener );
+}
template< class Container >
void addListenerToAllElements(
@@ -195,6 +176,17 @@ void addListenerToAllElements(
impl::addListenerFunctor< typename Container::value_type >( xListener ));
}
+template< class T >
+void addListenerToAllElements(
+ const std::vector<rtl::Reference<T>> & rContainer,
+ const css::uno::Reference< css::util::XModifyListener > & xListener )
+{
+ if( !xListener )
+ return;
+ for (auto const & i : rContainer)
+ i->addModifyListener(xListener);
+}
+
template< class Container >
void addListenerToAllMapElements(
const Container & rContainer,
@@ -205,16 +197,6 @@ void addListenerToAllMapElements(
impl::addListenerToMappedElementFunctor< typename Container::value_type >( xListener ));
}
-template< typename T >
-void addListenerToAllSequenceElements(
- const css::uno::Sequence< T > & rSequence,
- const css::uno::Reference< css::util::XModifyListener > & xListener )
-{
- if( xListener.is())
- std::for_each( rSequence.begin(), rSequence.end(),
- impl::addListenerFunctor< T >( xListener ));
-}
-
template< class InterfaceRef >
void removeListener(
const InterfaceRef & xObject,
@@ -227,6 +209,15 @@ void removeListener(
}
}
+template< class T >
+void removeListener(
+ const rtl::Reference<T> & xBroadcaster,
+ const css::uno::Reference< css::util::XModifyListener > & xListener )
+{
+ if( xBroadcaster && xListener )
+ xBroadcaster->removeModifyListener( xListener );
+}
+
template< class Container >
void removeListenerFromAllElements(
const Container & rContainer,
@@ -237,6 +228,17 @@ void removeListenerFromAllElements(
impl::removeListenerFunctor< typename Container::value_type >( xListener ));
}
+template< class T >
+void removeListenerFromAllElements(
+ const std::vector<rtl::Reference<T>> & rContainer,
+ const css::uno::Reference< css::util::XModifyListener > & xListener )
+{
+ if( !xListener )
+ return;
+ for (auto const & i : rContainer)
+ i->removeModifyListener(xListener);
+}
+
template< class Container >
void removeListenerFromAllMapElements(
const Container & rContainer,
@@ -247,20 +249,6 @@ void removeListenerFromAllMapElements(
impl::removeListenerFromMappedElementFunctor< typename Container::value_type >( xListener ));
}
-template< typename T >
-void removeListenerFromAllSequenceElements(
- const css::uno::Sequence< T > & rSequence,
- const css::uno::Reference< css::util::XModifyListener > & xListener )
-{
- if( xListener.is())
- std::for_each( rSequence.begin(), rSequence.end(),
- impl::removeListenerFunctor< T >( xListener ));
-}
-
-} // namespace ModifyListenerHelper
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_INC_MODIFYLISTENERHELPER_HXX
-#endif
+} // namespace chart::ModifyListenerHelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/MovingAverageRegressionCurveCalculator.hxx b/chart2/source/inc/MovingAverageRegressionCurveCalculator.hxx
index fb6185098193..f7e25fe51348 100644
--- a/chart2/source/inc/MovingAverageRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/MovingAverageRegressionCurveCalculator.hxx
@@ -16,16 +16,16 @@
* 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_INC_MOVINGAVERAGEREGRESSIONCURVECALCULATOR_HXX
-#define INCLUDED_CHART2_SOURCE_INC_MOVINGAVERAGEREGRESSIONCURVECALCULATOR_HXX
+#pragma once
#include "RegressionCurveCalculator.hxx"
+#include "RegressionCalculationHelper.hxx"
#include <vector>
namespace chart
{
-class MovingAverageRegressionCurveCalculator : public RegressionCurveCalculator
+class MovingAverageRegressionCurveCalculator final : public RegressionCurveCalculator
{
public:
MovingAverageRegressionCurveCalculator();
@@ -52,12 +52,12 @@ private:
const css::uno::Reference<css::chart2::XScaling>& xScalingY,
sal_Bool bMaySkipPointsInCalculation ) override;
+ void calculateValues(RegressionCalculationHelper::tDoubleVectorPair aValues, bool bUseXAvg);
+ void calculateValuesCentral(RegressionCalculationHelper::tDoubleVectorPair aValues);
std::vector<double> aYList;
std::vector<double> aXList;
};
} // namespace chart
-#endif // INCLUDED_CHART2_SOURCE_INC_MOVINGAVERAGEREGRESSIONCURVECALCULATOR_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/NameContainer.hxx b/chart2/source/inc/NameContainer.hxx
index 8d13d8037eff..12fc76978b0d 100644
--- a/chart2/source/inc/NameContainer.hxx
+++ b/chart2/source/inc/NameContainer.hxx
@@ -17,23 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_INC_NAMECONTAINER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_NAMECONTAINER_HXX
+#pragma once
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/util/XCloneable.hpp>
#include <cppuhelper/implbase.hxx>
-#include "charttoolsdllapi.hxx"
#include <map>
namespace chart
{
-OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::container::XNameContainer > createNameContainer(
- const css::uno::Type& rType, const OUString& rServicename, const OUString& rImplementationName );
-
namespace impl
{
typedef ::cppu::WeakImplHelper<
@@ -43,11 +38,12 @@ typedef ::cppu::WeakImplHelper<
NameContainer_Base;
}
-class NameContainer : public impl::NameContainer_Base
+/// Contains the XML namespaces map
+///
+class NameContainer final : public impl::NameContainer_Base
{
public:
- NameContainer() = delete;
- NameContainer( const css::uno::Type& rType, const OUString& rServicename, const OUString& rImplementationName );
+ NameContainer();
explicit NameContainer( const NameContainer & rOther );
virtual ~NameContainer() override;
@@ -76,16 +72,11 @@ public:
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
private: //member
- const css::uno::Type m_aType;
- const OUString m_aServicename;
- const OUString m_aImplementationName;
typedef std::map< OUString, css::uno::Any > tContentMap;
-
tContentMap m_aMap;
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/NumberFormatterWrapper.hxx b/chart2/source/inc/NumberFormatterWrapper.hxx
index 828ef6a3cc4d..aff249d84f33 100644
--- a/chart2/source/inc/NumberFormatterWrapper.hxx
+++ b/chart2/source/inc/NumberFormatterWrapper.hxx
@@ -16,12 +16,11 @@
* 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_INC_NUMBERFORMATTERWRAPPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_NUMBERFORMATTERWRAPPER_HXX
+#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#include <tools/solar.h>
#include <tools/date.hxx>
class SvNumberFormatter;
@@ -30,7 +29,7 @@ class Color;
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS NumberFormatterWrapper final
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) NumberFormatterWrapper final
{
public:
NumberFormatterWrapper( const css::uno::Reference< css::util::XNumberFormatsSupplier >& xSupplier );
@@ -62,10 +61,9 @@ public:
private:
NumberFormatterWrapper m_aNumberFormatterWrapper;
- sal_uLong m_nNumberFormatKey;
+ sal_uInt32 m_nNumberFormatKey;
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/OPropertySet.hxx b/chart2/source/inc/OPropertySet.hxx
index 1fafa218a9bd..0dd19a236e8a 100644
--- a/chart2/source/inc/OPropertySet.hxx
+++ b/chart2/source/inc/OPropertySet.hxx
@@ -16,10 +16,12 @@
* 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_INC_OPROPERTYSET_HXX
-#define INCLUDED_CHART2_SOURCE_INC_OPROPERTYSET_HXX
+#pragma once
+
+#include <config_options.h>
// helper classes
+#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/propshlp.hxx>
// interfaces and types
@@ -29,15 +31,13 @@
#include <com/sun/star/style/XStyleSupplier.hpp>
#include "charttoolsdllapi.hxx"
-#include <memory>
+#include <unordered_map>
namespace property
{
-namespace impl
-{ class ImplOPropertySet; }
-
-class OPropertySet :
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OPropertySet :
+ protected cppu::BaseMutex,
public ::cppu::OBroadcastHelper,
// includes beans::XPropertySet, XMultiPropertySet and XFastPropertySet
public ::cppu::OPropertySetHelper,
@@ -49,22 +49,25 @@ class OPropertySet :
public css::style::XStyleSupplier
{
public:
- OPropertySet( ::osl::Mutex & rMutex );
+ OPropertySet();
virtual ~OPropertySet();
protected:
- explicit OPropertySet( const OPropertySet & rOther, ::osl::Mutex & rMutex );
+ explicit OPropertySet( const OPropertySet & rOther );
void SetNewValuesExplicitlyEvenIfTheyEqualDefault();
/** implement this method to provide default values for all properties
supporting defaults. If a property does not have a default value, you
may throw an UnknownPropertyException.
+ We pass the any by reference because this code is very hot and doing
+ it this way is cheaper than the two step process of constructing a new
+ any and then assigning to via a return value.
@throws css::beans::UnknownPropertyException
@throws css::uno::RuntimeException
*/
- virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const = 0;
+ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const = 0;
/** The InfoHelper table contains all property names and types of
this object.
@@ -104,7 +107,7 @@ protected:
( css::uno::Any & rConvertedValue,
css::uno::Any & rOldValue,
sal_Int32 nHandle,
- const css::uno::Any& rValue ) override;
+ const css::uno::Any& rValue ) override final;
/** The same as setFastPropertyValue; nHandle is always valid.
The changes must not be broadcasted in this method.
@@ -137,14 +140,15 @@ protected:
( css::uno::Any& rValue,
sal_Int32 nHandle ) const override;
- /// make original interface function visible again
- using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue;
-
/** implement this method in derived classes to get called when properties
change.
*/
virtual void firePropertyChangeEvent();
+public:
+ /// make original interface function visible again
+ using ::cppu::OPropertySetHelper::getFastPropertyValue;
+
// Interfaces
// ____ XInterface ____
@@ -158,51 +162,74 @@ protected:
// ____ XPropertyState ____
virtual css::beans::PropertyState SAL_CALL
- getPropertyState( const OUString& PropertyName ) override;
+ getPropertyState( const OUString& PropertyName ) override final;
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL
- getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName ) override;
+ getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName ) override final;
virtual void SAL_CALL
- setPropertyToDefault( const OUString& PropertyName ) override;
+ setPropertyToDefault( const OUString& PropertyName ) override final;
virtual css::uno::Any SAL_CALL
- getPropertyDefault( const OUString& aPropertyName ) override;
+ getPropertyDefault( const OUString& aPropertyName ) override final;
// ____ XMultiPropertyStates ____
// Note: getPropertyStates() is already implemented in XPropertyState with the
// same signature
virtual void SAL_CALL
- setAllPropertiesToDefault() override;
+ setAllPropertiesToDefault() override final;
virtual void SAL_CALL
- setPropertiesToDefault( const css::uno::Sequence< OUString >& aPropertyNames ) override;
+ setPropertiesToDefault( const css::uno::Sequence< OUString >& aPropertyNames ) override final;
virtual css::uno::Sequence< css::uno::Any > SAL_CALL
- getPropertyDefaults( const css::uno::Sequence< OUString >& aPropertyNames ) override;
+ getPropertyDefaults( const css::uno::Sequence< OUString >& aPropertyNames ) override final;
// ____ XStyleSupplier ____
- virtual css::uno::Reference< css::style::XStyle > SAL_CALL getStyle() override;
- virtual void SAL_CALL setStyle( const css::uno::Reference< css::style::XStyle >& xStyle ) override;
+ virtual css::uno::Reference< css::style::XStyle > SAL_CALL getStyle() override final;
+ virtual void SAL_CALL setStyle( const css::uno::Reference< css::style::XStyle >& xStyle ) override final;
// ____ XMultiPropertySet ____
virtual void SAL_CALL setPropertyValues(
const css::uno::Sequence< OUString >& PropertyNames,
- const css::uno::Sequence< css::uno::Any >& Values ) override;
+ const css::uno::Sequence< css::uno::Any >& Values ) override final;
// ____ XFastPropertySet ____
- virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const css::uno::Any& rValue ) override;
+ virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const css::uno::Any& rValue ) override final;
// Note: it is assumed that the base class implements setPropertyValue by
// using setFastPropertyValue
private:
- /// reference to mutex of class deriving from here
- ::osl::Mutex & m_rMutex;
+ /** supports states DIRECT_VALUE and DEFAULT_VALUE
+ */
+ css::beans::PropertyState
+ GetPropertyStateByHandle( sal_Int32 nHandle ) const;
+
+ css::uno::Sequence< css::beans::PropertyState >
+ GetPropertyStatesByHandle( const std::vector< sal_Int32 > & aHandles ) const;
+
+ void SetPropertyToDefault( sal_Int32 nHandle );
+ void SetPropertiesToDefault( const std::vector< sal_Int32 > & aHandles );
+ void SetAllPropertiesToDefault();
+
+ /** @param rValue is set to the value for the property given in nHandle. If
+ the property is not set, the style chain is searched for any
+ instance set there. If there was no value found either in the
+ property set itself or any of its styles, rValue remains
+ unchanged and false is returned.
+
+ @return false if the property is default, true otherwise.
+ */
+ bool GetPropertyValueByHandle(
+ css::uno::Any & rValue,
+ sal_Int32 nHandle ) const;
+
+ void SetPropertyValueByHandle( sal_Int32 nHandle,
+ const css::uno::Any & rValue );
+
+ bool SetStyle( const css::uno::Reference< css::style::XStyle > & xStyle );
- /// pImpl idiom implementation
- std::unique_ptr< impl::ImplOPropertySet > m_pImplProperties;
bool m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault;
+ std::unordered_map< sal_Int32, css::uno::Any > m_aProperties;
+ css::uno::Reference< css::style::XStyle > m_xStyle;
};
} // namespace property
-// INCLUDED_CHART2_SOURCE_INC_OPROPERTYSET_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ObjectIdentifier.hxx b/chart2/source/inc/ObjectIdentifier.hxx
index 59248857b91c..5cfd6a1671b1 100644
--- a/chart2/source/inc/ObjectIdentifier.hxx
+++ b/chart2/source/inc/ObjectIdentifier.hxx
@@ -16,13 +16,17 @@
* 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_INC_OBJECTIDENTIFIER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_OBJECTIDENTIFIER_HXX
+#pragma once
+
+#include <sal/config.h>
+
+#include <string_view>
#include "TitleHelper.hxx"
#include "charttoolsdllapi.hxx"
#include <rtl/ustring.hxx>
+#include <rtl/ref.hxx>
namespace chart { class ChartModel; }
namespace com::sun::star::awt { struct Point; }
@@ -38,6 +42,11 @@ namespace com::sun::star::uno { class XInterface; }
namespace chart
{
+class Axis;
+class BaseCoordinateSystem;
+class DataSeries;
+class Diagram;
+class Legend;
enum ObjectType
{
@@ -65,11 +74,12 @@ enum ObjectType
OBJECTTYPE_DATA_STOCK_RANGE,
OBJECTTYPE_DATA_STOCK_LOSS,
OBJECTTYPE_DATA_STOCK_GAIN,
+ OBJECTTYPE_DATA_TABLE,
OBJECTTYPE_SHAPE,
OBJECTTYPE_UNKNOWN
};
-class OOO_DLLPUBLIC_CHARTTOOLS ObjectIdentifier
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ObjectIdentifier
{
//CID == ClassifiedIdentifier <--> name of shape
//semicolon, colon, equal sign and slash have special meanings in a CID
@@ -90,45 +100,45 @@ class OOO_DLLPUBLIC_CHARTTOOLS ObjectIdentifier
public:
ObjectIdentifier();
- ObjectIdentifier( const OUString& rObjectCID );
+ ObjectIdentifier( OUString aObjectCID );
ObjectIdentifier( const css::uno::Reference< css::drawing::XShape >& rxShape );
ObjectIdentifier( const css::uno::Any& rAny );
bool operator==( const ObjectIdentifier& rOID ) const;
- bool operator!=( const ObjectIdentifier& rOID ) const;
bool operator<( const ObjectIdentifier& rOID ) const;
static OUString createClassifiedIdentifierForObject(
const css::uno::Reference< css::uno::XInterface >& xObject
- , ChartModel& rModel);
-
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
static OUString createClassifiedIdentifierForObject(
- const css::uno::Reference< css::uno::XInterface >& xObject
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
+ const rtl::Reference< ::chart::Title >& xObject
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
+ static OUString createClassifiedIdentifierForObject(
+ const rtl::Reference< ::chart::Legend >& xObject
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
+ static OUString createClassifiedIdentifierForObject(
+ const rtl::Reference< ::chart::Axis >& xObject
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
static OUString createClassifiedIdentifierForParticle(
- const OUString& rParticle );
+ std::u16string_view rParticle );
static OUString createClassifiedIdentifierForParticles(
- const OUString& rParentParticle
- , const OUString& rChildParticle
- , const OUString& rDragMethodServiceName = OUString()
- , const OUString& rDragParameterString = OUString() );
+ std::u16string_view rParentParticle
+ , std::u16string_view rChildParticle
+ , std::u16string_view rDragMethodServiceName = std::u16string_view()
+ , std::u16string_view rDragParameterString = std::u16string_view() );
static OUString createClassifiedIdentifierForGrid(
const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::frame::XModel >& xChartModel
+ , const rtl::Reference<::chart::ChartModel>& xChartModel
, sal_Int32 nSubIndex = -1 );//-1: main grid, 0: first subgrid etc
SAL_DLLPRIVATE static OUString createParticleForDiagram();
static OUString createParticleForCoordinateSystem(
- const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
- , ChartModel& rModel );
-
- static OUString createParticleForCoordinateSystem(
- const css::uno::Reference< css::chart2::XCoordinateSystem >& xCooSys
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
+ const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
static OUString createParticleForAxis(
sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex );
@@ -139,97 +149,95 @@ public:
static OUString createParticleForSeries( sal_Int32 nDiagramIndex, sal_Int32 nCooSysIndex
, sal_Int32 nChartTypeIndex, sal_Int32 nSeriesIndex );
- static OUString createParticleForLegend( ChartModel& rModel );
-
static OUString createParticleForLegend(
- const css::uno::Reference< css::frame::XModel >& xChartModel );
+ const rtl::Reference<::chart::ChartModel>& xChartModel );
- static OUString addChildParticle( const OUString& rParticle, const OUString& rChildParticle );
+ /** Creates an identifier for the data table */
+ static OUString createParticleForDataTable(
+ const rtl::Reference<::chart::ChartModel>& xChartModel );
+
+ static OUString addChildParticle( std::u16string_view rParticle, std::u16string_view rChildParticle );
static OUString createChildParticleWithIndex( ObjectType eObjectType, sal_Int32 nIndex );
- static sal_Int32 getIndexFromParticleOrCID( const OUString& rParticleOrCID );
+ static sal_Int32 getIndexFromParticleOrCID( std::u16string_view rParticleOrCID );
static OUString createClassifiedIdentifier(
enum ObjectType eObjectType //e.g. OBJECTTYPE_DATA_SERIES
- , const OUString& rParticleID );//e.g. SeriesID
+ , std::u16string_view rParticleID );//e.g. SeriesID
static OUString createClassifiedIdentifierWithParent(
enum ObjectType //e.g. OBJECTTYPE_DATA_POINT or OBJECTTYPE_GRID
- , const OUString& rParticleID //for points or subgrids this is an Index or otherwise an identifier from the model object
- , const OUString& rParentPartical //e.g. "Series=SeriesID" or "Grid=GridId"
- , const OUString& rDragMethodServiceName = OUString()
- , const OUString& rDragParameterString = OUString()
+ , std::u16string_view rParticleID //for points or subgrids this is an Index or otherwise an identifier from the model object
+ , std::u16string_view rParentPartical //e.g. "Series=SeriesID" or "Grid=GridId"
+ , std::u16string_view rDragMethodServiceName = std::u16string_view()
+ , std::u16string_view rDragParameterString = std::u16string_view()
);
- static bool isCID( const OUString& rName );
- static OUString getDragMethodServiceName( const OUString& rClassifiedIdentifier );
- static OUString getDragParameterString( const OUString& rCID );
- static bool isDragableObject( const OUString& rClassifiedIdentifier );
+ static bool isCID( std::u16string_view rName );
+ static std::u16string_view getDragMethodServiceName( std::u16string_view rClassifiedIdentifier );
+ static std::u16string_view getDragParameterString( std::u16string_view rCID );
+ static bool isDragableObject( std::u16string_view rClassifiedIdentifier );
bool isDragableObject() const;
- static bool isRotateableObject( const OUString& rClassifiedIdentifier );
- static bool isMultiClickObject( const OUString& rClassifiedIdentifier );
- static bool areSiblings( const OUString& rCID1, const OUString& rCID2 );//identical object is no sibling
- static bool areIdenticalObjects( const OUString& rCID1, const OUString& rCID2 );
+ static bool isRotateableObject( std::u16string_view rClassifiedIdentifier );
+ static bool isMultiClickObject( std::u16string_view rClassifiedIdentifier );
+ static bool areSiblings( std::u16string_view rCID1, std::u16string_view rCID2 );//identical object is no sibling
+ static bool areIdenticalObjects( std::u16string_view rCID1, std::u16string_view rCID2 );
static OUString getStringForType( ObjectType eObjectType );
- static ObjectType getObjectType( const OUString& rCID );
+ static ObjectType getObjectType( std::u16string_view rCID );
ObjectType getObjectType() const;
static OUString createSeriesSubObjectStub( ObjectType eSubObjectType
- , const OUString& rSeriesParticle
- , const OUString& rDragMethodServiceName = OUString()
- , const OUString& rDragParameterString = OUString() );
- static OUString createPointCID( const OUString& rPointCID_Stub, sal_Int32 nIndex );
+ , std::u16string_view rSeriesParticle
+ , std::u16string_view rDragMethodServiceName = std::u16string_view()
+ , std::u16string_view rDragParameterString = std::u16string_view() );
+ static OUString createPointCID( std::u16string_view rPointCID_Stub, sal_Int32 nIndex );
- static OUString createDataCurveCID( const OUString& rSeriesParticle, sal_Int32 nCurveIndex, bool bAverageLine );
- static OUString createDataCurveEquationCID( const OUString& rSeriesParticle, sal_Int32 nCurveIndex );
+ static OUString createDataCurveCID( std::u16string_view rSeriesParticle, sal_Int32 nCurveIndex, bool bAverageLine );
+ static OUString createDataCurveEquationCID( std::u16string_view rSeriesParticle, sal_Int32 nCurveIndex );
- SAL_DLLPRIVATE static OUString getObjectID( const OUString& rCID );
- static OUString getParticleID( const OUString& rCID );
- static OUString getFullParentParticle( const OUString& rCID );
+ SAL_DLLPRIVATE static OUString getObjectID( std::u16string_view rCID );
+ static std::u16string_view getParticleID( std::u16string_view rCID );
+ static std::u16string_view getFullParentParticle( std::u16string_view rCID );
//returns the series particle of a CID when the CID is a child of the series
- static OUString getSeriesParticleFromCID( const OUString& rCID );
+ static OUString getSeriesParticleFromCID( std::u16string_view rCID );
//return the model object that is indicated by rObjectCID
static css::uno::Reference< css::beans::XPropertySet >
getObjectPropertySet(
- const OUString& rObjectCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
- static css::uno::Reference< css::beans::XPropertySet >
- getObjectPropertySet(
- const OUString& rObjectCID
- , const css::uno::Reference< css::chart2::XChartDocument >& xChartDocument );
+ std::u16string_view rObjectCID
+ , const rtl::Reference< ::chart::ChartModel >& xChartDocument );
//return the axis object that belongs to rObjectCID if any
- static css::uno::Reference< css::chart2::XAxis >
+ static rtl::Reference< ::chart::Axis >
getAxisForCID(
- const OUString& rObjectCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
+ std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
//return the series object that belongs to rObjectCID if any
- static css::uno::Reference< css::chart2::XDataSeries >
+ static rtl::Reference< ::chart::DataSeries >
getDataSeriesForCID(
- const OUString& rObjectCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
+ std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
- static css::uno::Reference< css::chart2::XDiagram >
+ static rtl::Reference< ::chart::Diagram >
getDiagramForCID(
- const OUString& rObjectCID
- , const css::uno::Reference< css::frame::XModel >& xChartModel );
+ std::u16string_view rObjectCID
+ , const rtl::Reference<::chart::ChartModel>& xChartModel );
static const OUString& getPieSegmentDragMethodServiceName();
static OUString createPieSegmentDragParameterString(
sal_Int32 nOffsetPercent
, const css::awt::Point& rMinimumPosition
, const css::awt::Point& rMaximumPosition );
- static bool parsePieSegmentDragParameterString( const OUString& rDragParameterString
+ static bool parsePieSegmentDragParameterString( std::u16string_view rDragParameterString
, sal_Int32& rOffsetPercent
, css::awt::Point& rMinimumPosition
, css::awt::Point& rMaximumPosition );
- static TitleHelper::eTitleType getTitleTypeForCID( const OUString& rCID );
+ static TitleHelper::eTitleType getTitleTypeForCID( std::u16string_view rCID );
- static OUString getMovedSeriesCID( const OUString& rObjectCID, bool bForward );
+ static OUString getMovedSeriesCID( std::u16string_view rObjectCID, bool bForward );
bool isValid() const;
bool isAutoGeneratedObject() const;
@@ -249,6 +257,5 @@ private:
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx b/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx
index e47d882d4903..73512497b190 100644
--- a/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx
@@ -16,8 +16,7 @@
* 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_INC_POLYNOMIALREGRESSIONCURVECALCULATOR_HXX
-#define INCLUDED_CHART2_SOURCE_INC_POLYNOMIALREGRESSIONCURVECALCULATOR_HXX
+#pragma once
#include "RegressionCurveCalculator.hxx"
#include <vector>
@@ -59,6 +58,4 @@ private:
} // namespace chart
-#endif // INCLUDED_CHART2_SOURCE_INC_POLYNOMIALREGRESSIONCURVECALCULATOR_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/PopupRequest.hxx b/chart2/source/inc/PopupRequest.hxx
index 0c9af2f50bad..90fe315d2471 100644
--- a/chart2/source/inc/PopupRequest.hxx
+++ b/chart2/source/inc/PopupRequest.hxx
@@ -7,51 +7,37 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_CHART2_SOURCE_INC_POPUPREQUEST_HXX
-#define INCLUDED_CHART2_SOURCE_INC_POPUPREQUEST_HXX
+#pragma once
-#include "MutexContainer.hxx"
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
#include <com/sun/star/awt/XRequestCallback.hpp>
namespace chart
{
-
namespace impl
{
-
-typedef cppu::WeakComponentImplHelper<css::awt::XRequestCallback> PopupRequest_Base;
-
+typedef comphelper::WeakComponentImplHelper<css::awt::XRequestCallback> PopupRequest_Base;
}
-class OOO_DLLPUBLIC_CHARTTOOLS PopupRequest : public MutexContainer, public impl::PopupRequest_Base
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) PopupRequest final : public impl::PopupRequest_Base
{
public:
explicit PopupRequest();
virtual ~PopupRequest() override;
- css::uno::Reference<css::awt::XCallback> const & getCallback() const
- {
- return m_xCallback;
- }
+ css::uno::Reference<css::awt::XCallback> const& getCallback() const { return m_xCallback; }
-protected:
// ____ XRequestCallback ____
- virtual void SAL_CALL addCallback(const css::uno::Reference< ::css::awt::XCallback >& xCallback,
+ virtual void SAL_CALL addCallback(const css::uno::Reference<::css::awt::XCallback>& xCallback,
const css::uno::Any& aData) override;
- // ____ WeakComponentImplHelperBase ____
- // is called when dispose() is called at this component
- virtual void SAL_CALL disposing() override;
-
private:
css::uno::Reference<css::awt::XCallback> m_xCallback;
};
} // namespace chart
-#endif // INCLUDED_CHART2_SOURCE_INC_POPUPREQUEST_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/PotentialRegressionCurveCalculator.hxx b/chart2/source/inc/PotentialRegressionCurveCalculator.hxx
index c3306d3c6ee4..a0d05b4a2f53 100644
--- a/chart2/source/inc/PotentialRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/PotentialRegressionCurveCalculator.hxx
@@ -16,15 +16,14 @@
* 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_INC_POTENTIALREGRESSIONCURVECALCULATOR_HXX
-#define INCLUDED_CHART2_SOURCE_INC_POTENTIALREGRESSIONCURVECALCULATOR_HXX
+#pragma once
#include "RegressionCurveCalculator.hxx"
namespace chart
{
-class PotentialRegressionCurveCalculator : public RegressionCurveCalculator
+class PotentialRegressionCurveCalculator final : public RegressionCurveCalculator
{
public:
PotentialRegressionCurveCalculator();
@@ -59,7 +58,4 @@ private:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_POTENTIALREGRESSIONCURVECALCULATOR_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/PropertyHelper.hxx b/chart2/source/inc/PropertyHelper.hxx
index 19ce354c9735..3e1949057361 100644
--- a/chart2/source/inc/PropertyHelper.hxx
+++ b/chart2/source/inc/PropertyHelper.hxx
@@ -16,9 +16,9 @@
* 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_INC_PROPERTYHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_PROPERTYHELPER_HXX
+#pragma once
+#include <config_options.h>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/uno/Any.hxx>
#include "charttoolsdllapi.hxx"
@@ -42,7 +42,7 @@ namespace PropertyHelper
@return The name used for storing this element in the table
*/
-OOO_DLLPUBLIC_CHARTTOOLS OUString addLineDashUniqueNameToTable(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString addLineDashUniqueNameToTable(
const css::uno::Any & rValue,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xFact,
const OUString & rPreferredName );
@@ -52,7 +52,7 @@ OOO_DLLPUBLIC_CHARTTOOLS OUString addLineDashUniqueNameToTable(
@return The name used for storing this element in the table
*/
-OOO_DLLPUBLIC_CHARTTOOLS OUString addGradientUniqueNameToTable(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString addGradientUniqueNameToTable(
const css::uno::Any & rValue,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xFact,
const OUString & rPreferredName );
@@ -62,7 +62,7 @@ OOO_DLLPUBLIC_CHARTTOOLS OUString addGradientUniqueNameToTable(
@return The name used for storing this element in the table
*/
-OOO_DLLPUBLIC_CHARTTOOLS
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
OUString addTransparencyGradientUniqueNameToTable(
const css::uno::Any & rValue,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xFact,
@@ -73,7 +73,7 @@ OUString addTransparencyGradientUniqueNameToTable(
@return The name used for storing this element in the table
*/
-OOO_DLLPUBLIC_CHARTTOOLS OUString addHatchUniqueNameToTable(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString addHatchUniqueNameToTable(
const css::uno::Any & rValue,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xFact,
const OUString & rPreferredName );
@@ -83,7 +83,7 @@ OOO_DLLPUBLIC_CHARTTOOLS OUString addHatchUniqueNameToTable(
@return The name used for storing this element in the table
*/
-OOO_DLLPUBLIC_CHARTTOOLS OUString addBitmapUniqueNameToTable(
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString addBitmapUniqueNameToTable(
const css::uno::Any & rValue,
const css::uno::Reference< css::lang::XMultiServiceFactory > & xFact,
const OUString & rPreferredName );
@@ -93,7 +93,7 @@ OOO_DLLPUBLIC_CHARTTOOLS OUString addBitmapUniqueNameToTable(
@param any is the value encapsulated in the variant type Any
*/
-OOO_DLLPUBLIC_CHARTTOOLS
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
void setPropertyValueAny( tPropertyValueMap & rOutMap, tPropertyValueMapKey key,
const css::uno::Any & rAny );
@@ -112,7 +112,7 @@ template< typename Value >
template<>
void setPropertyValue< css::uno::Any >( tPropertyValueMap & rOutMap, tPropertyValueMapKey key, const css::uno::Any & rAny );
-OOO_DLLPUBLIC_CHARTTOOLS void setPropertyValueDefaultAny( tPropertyValueMap & rOutMap, tPropertyValueMapKey key, const css::uno::Any & rAny );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void setPropertyValueDefaultAny( tPropertyValueMap & rOutMap, tPropertyValueMapKey key, const css::uno::Any & rAny );
/** Calls setPropertyValue() but asserts that the given property hasn't been set
before.
@@ -131,7 +131,7 @@ template<>
/** Calls setPropertyValueDefault() with an empty Any as value
*/
-OOO_DLLPUBLIC_CHARTTOOLS void setEmptyPropertyValueDefault( tPropertyValueMap & rOutMap, tPropertyValueMapKey key );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void setEmptyPropertyValueDefault( tPropertyValueMap & rOutMap, tPropertyValueMapKey key );
} // namespace PropertyHelper
@@ -146,7 +146,4 @@ struct OOO_DLLPUBLIC_CHARTTOOLS PropertyNameLess
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_PROPERTYHELPER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/RangeHighlighter.hxx b/chart2/source/inc/RangeHighlighter.hxx
index c1fe2d721b5b..c7bcdd2c5c55 100644
--- a/chart2/source/inc/RangeHighlighter.hxx
+++ b/chart2/source/inc/RangeHighlighter.hxx
@@ -16,13 +16,13 @@
* 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_INC_RANGEHIGHLIGHTER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_RANGEHIGHLIGHTER_HXX
+#pragma once
-#include "MutexContainer.hxx"
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
+#include <comphelper/interfacecontainer4.hxx>
#include <com/sun/star/chart2/data/XRangeHighlighter.hpp>
#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#include <rtl/ref.hxx>
namespace com::sun::star {
namespace chart2 {
@@ -36,23 +36,25 @@ namespace com::sun::star::view { class XSelectionSupplier; }
namespace chart
{
+class ChartModel;
+class DataSeries;
+class Diagram;
namespace impl
{
-typedef ::cppu::WeakComponentImplHelper<
+typedef comphelper::WeakComponentImplHelper<
css::chart2::data::XRangeHighlighter,
css::view::XSelectionChangeListener
>
RangeHighlighter_Base;
}
-class RangeHighlighter :
- public MutexContainer,
+class RangeHighlighter final :
public impl::RangeHighlighter_Base
{
public:
explicit RangeHighlighter(
- const css::uno::Reference< css::view::XSelectionSupplier > & xSelectionSupplier );
+ const rtl::Reference< ::chart::ChartModel > & xSelectionSupplier );
virtual ~RangeHighlighter() override;
protected:
@@ -73,7 +75,7 @@ protected:
// ____ WeakComponentImplHelperBase ____
// is called when dispose() is called at this component
- virtual void SAL_CALL disposing() override;
+ virtual void disposing(std::unique_lock<std::mutex>&) override;
private:
void fireSelectionEvent();
@@ -81,26 +83,25 @@ private:
void stopListening();
void determineRanges();
- void fillRangesForDiagram( const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ void fillRangesForDiagram( const rtl::Reference< ::chart::Diagram > & xDiagram );
void fillRangesForDataSeries( const css::uno::Reference< css::chart2::XDataSeries > & xSeries );
void fillRangesForCategories( const css::uno::Reference< css::chart2::XAxis > & xAxis );
- void fillRangesForDataPoint( const css::uno::Reference< css::uno::XInterface > & xDataSeries, sal_Int32 nIndex );
+ void fillRangesForDataPoint( const rtl::Reference< ::chart::DataSeries > & xDataSeries, sal_Int32 nIndex );
void fillRangesForErrorBars( const css::uno::Reference< css::beans::XPropertySet > & xErrorBar,
const css::uno::Reference< css::chart2::XDataSeries > & xDataSeries );
css::uno::Reference< css::view::XSelectionSupplier >
m_xSelectionSupplier;
+ rtl::Reference< ::chart::ChartModel > m_xChartModel;
css::uno::Reference< css::view::XSelectionChangeListener >
m_xListener;
css::uno::Sequence< css::chart2::data::HighlightedRange >
m_aSelectedRanges;
sal_Int32 m_nAddedListenerCount;
bool m_bIncludeHiddenCells;
+ comphelper::OInterfaceContainerHelper4<css::view::XSelectionChangeListener> maSelectionChangeListeners;
};
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_RANGEHIGHLIGHTER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ReferenceSizeProvider.hxx b/chart2/source/inc/ReferenceSizeProvider.hxx
index 253ab79fb7b4..f3626b03d193 100644
--- a/chart2/source/inc/ReferenceSizeProvider.hxx
+++ b/chart2/source/inc/ReferenceSizeProvider.hxx
@@ -16,12 +16,13 @@
* 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_INC_REFERENCESIZEPROVIDER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_REFERENCESIZEPROVIDER_HXX
+#pragma once
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/awt/Size.hpp>
#include "charttoolsdllapi.hxx"
+#include <rtl/ref.hxx>
+#include <ChartModel.hxx>
namespace com::sun::star {
namespace chart2 {
@@ -37,7 +38,7 @@ namespace com::sun::star {
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS ReferenceSizeProvider
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ReferenceSizeProvider
{
public:
@@ -51,7 +52,7 @@ public:
ReferenceSizeProvider(
css::awt::Size aPageSize,
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc );
+ const rtl::Reference<::chart::ChartModel> & xChartDoc );
const css::awt::Size& getPageSize() const { return m_aPageSize;}
@@ -64,7 +65,7 @@ public:
with state NO, AUTO_RESIZE_AMBIGUOUS is returned.
*/
static AutoResizeState getAutoResizeState(
- const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc );
+ const rtl::Reference<::chart::ChartModel> & xChartDoc );
/** sets or resets the auto-resize at all objects that support this feature
for text to the opposite of the current setting. If the current state
@@ -120,13 +121,10 @@ private:
AutoResizeState & rInOutState );
css::awt::Size m_aPageSize;
- css::uno::Reference< css::chart2::XChartDocument > m_xChartDoc;
+ rtl::Reference<::chart::ChartModel> m_xChartDoc;
bool m_bUseAutoScale;
};
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_REFERENCESIZEPROVIDER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/RegressionCalculationHelper.hxx b/chart2/source/inc/RegressionCalculationHelper.hxx
index a5b2b3b16975..0b9600e99dc5 100644
--- a/chart2/source/inc/RegressionCalculationHelper.hxx
+++ b/chart2/source/inc/RegressionCalculationHelper.hxx
@@ -16,19 +16,15 @@
* 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_INC_REGRESSIONCALCULATIONHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_REGRESSIONCALCULATIONHELPER_HXX
+#pragma once
#include <com/sun/star/uno/Sequence.hxx>
-#include <rtl/math.hxx>
-
+#include <cmath>
#include <utility>
#include <vector>
-namespace chart
-{
-namespace RegressionCalculationHelper
+namespace chart::RegressionCalculationHelper
{
typedef std::pair< std::vector< double >, std::vector< double > > tDoubleVectorPair;
@@ -133,10 +129,6 @@ public:
}
};
-} // namespace RegressionCalculationHelper
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_INC_REGRESSIONCALCULATIONHELPER_HXX
-#endif
+} // namespace chart::RegressionCalculationHelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/RegressionCurveCalculator.hxx b/chart2/source/inc/RegressionCurveCalculator.hxx
index 183db2b65c06..ebb3ad40f616 100644
--- a/chart2/source/inc/RegressionCurveCalculator.hxx
+++ b/chart2/source/inc/RegressionCurveCalculator.hxx
@@ -16,8 +16,7 @@
* 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_INC_REGRESSIONCURVECALCULATOR_HXX
-#define INCLUDED_CHART2_SOURCE_INC_REGRESSIONCURVECALCULATOR_HXX
+#pragma once
#include <cppuhelper/implbase.hxx>
#include <rtl/ustrbuf.hxx>
@@ -43,33 +42,13 @@ public:
static bool isLogarithmicScaling(
const css::uno::Reference< css::chart2::XScaling >& xScaling );
-protected:
- virtual OUString ImplGetRepresentation(
- const css::uno::Reference< css::util::XNumberFormatter >& xNumFormatter,
- sal_Int32 nNumberFormatKey, sal_Int32* pFormulaLength = nullptr ) const = 0;
-
- static OUString getFormattedString(
- const css::uno::Reference< css::util::XNumberFormatter >& xNumFormatter,
- sal_Int32 nNumberFormatKey,
- double fNumber,
- const sal_Int32* pStringLength );
-
- static void addStringToEquation( OUStringBuffer& aStrEquation, sal_Int32& nLineLength, OUStringBuffer const & aAddString, const sal_Int32* pMaxLength );
-
- double m_fCorrelationCoefficient;
-
- sal_Int32 mDegree;
- bool mForceIntercept;
- double mInterceptValue;
- sal_Int32 mPeriod;
- OUString mXName, mYName;
-
// ____ XRegressionCurveCalculator ____
virtual void SAL_CALL setRegressionProperties(
sal_Int32 aDegree,
sal_Bool aForceIntercept,
double aInterceptValue,
- sal_Int32 aPeriod) override;
+ sal_Int32 aPeriod,
+ sal_Int32 nMovingType) override;
virtual void SAL_CALL recalculateRegression(
const css::uno::Sequence< double >& aXValues,
@@ -95,11 +74,30 @@ protected:
virtual void SAL_CALL setXYNames(
const OUString& aXName, const OUString& aYName ) override;
+
+protected:
+ virtual OUString ImplGetRepresentation(
+ const css::uno::Reference< css::util::XNumberFormatter >& xNumFormatter,
+ sal_Int32 nNumberFormatKey, sal_Int32* pFormulaLength = nullptr ) const = 0;
+
+ static OUString getFormattedString(
+ const css::uno::Reference< css::util::XNumberFormatter >& xNumFormatter,
+ sal_Int32 nNumberFormatKey,
+ double fNumber,
+ const sal_Int32* pStringLength );
+
+ static void addStringToEquation( OUStringBuffer& aStrEquation, sal_Int32& nLineLength, OUStringBuffer const & aAddString, const sal_Int32* pMaxLength );
+
+ double m_fCorrelationCoefficient;
+
+ sal_Int32 mDegree;
+ bool mForceIntercept;
+ double mInterceptValue;
+ sal_Int32 mPeriod;
+ OUString mXName, mYName;
+ sal_Int32 mnMovingType;
};
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_REGRESSIONCURVECALCULATOR_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/RegressionCurveHelper.hxx b/chart2/source/inc/RegressionCurveHelper.hxx
index 8fa4071471d0..fc0c2abcd5b7 100644
--- a/chart2/source/inc/RegressionCurveHelper.hxx
+++ b/chart2/source/inc/RegressionCurveHelper.hxx
@@ -16,11 +16,12 @@
* 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_INC_REGRESSIONCURVEHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_REGRESSIONCURVEHELPER_HXX
+#pragma once
+#include <config_options.h>
#include <svx/chrtitem.hxx>
#include "charttoolsdllapi.hxx"
+#include <rtl/ref.hxx>
#include <vector>
@@ -32,62 +33,78 @@ namespace com::sun::star::chart2 { class XRegressionCurveCalculator; }
namespace com::sun::star::chart2 { class XRegressionCurveContainer; }
namespace com::sun::star::chart2::data { class XDataSource; }
namespace com::sun::star::frame { class XModel; }
+namespace chart { class ChartModel; }
+namespace chart { class DataSeries; }
+namespace chart { class RegressionCurveModel; }
+namespace chart { class RegressionCurveCalculator; }
-namespace chart
-{
-
-namespace RegressionCurveHelper
+namespace chart::RegressionCurveHelper
{
/// returns a model mean-value line
- css::uno::Reference<css::chart2::XRegressionCurve> createMeanValueLine();
+ rtl::Reference<::chart::RegressionCurveModel> createMeanValueLine();
/// returns a model regression curve
- css::uno::Reference<css::chart2::XRegressionCurve>
- createRegressionCurveByServiceName( const OUString& aServiceName );
+ rtl::Reference<::chart::RegressionCurveModel>
+ createRegressionCurveByServiceName( std::u16string_view aServiceName );
- OOO_DLLPUBLIC_CHARTTOOLS bool hasMeanValueLine(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool hasMeanValueLine(
const css::uno::Reference<css::chart2::XRegressionCurveContainer> & xRegCnt );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool hasMeanValueLine(
+ const rtl::Reference<::chart::DataSeries> & xRegCnt );
- OOO_DLLPUBLIC_CHARTTOOLS bool isMeanValueLine(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool isMeanValueLine(
const css::uno::Reference<css::chart2::XRegressionCurve> & xRegCurve );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool isMeanValueLine(
+ const rtl::Reference<::chart::RegressionCurveModel> & xRegCurve );
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve>
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
getMeanValueLine(
const css::uno::Reference<css::chart2::XRegressionCurveContainer> & xRegCnt );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
+ getMeanValueLine(
+ const rtl::Reference<::chart::DataSeries> & xRegCnt );
/** creates a mean-value line and adds it to the container.
@param xSeriesProp
If set, this property-set will be used to apply a line color
*/
- OOO_DLLPUBLIC_CHARTTOOLS void addMeanValueLine(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void addMeanValueLine(
css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xRegCnt,
const css::uno::Reference<css::beans::XPropertySet>& xSeriesProp );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void addMeanValueLine(
+ rtl::Reference<::chart::DataSeries> const & xRegCnt,
+ const css::uno::Reference<css::beans::XPropertySet>& xSeriesProp );
- OOO_DLLPUBLIC_CHARTTOOLS void removeMeanValueLine(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void removeMeanValueLine(
css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xRegCnt );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void removeMeanValueLine(
+ rtl::Reference<::chart::DataSeries> const & xRegCnt );
/** Returns the first regression curve found that is not of type
mean-value line
*/
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve>
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
getFirstCurveNotMeanValueLine(
const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xCurveContainer );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
+ getFirstCurveNotMeanValueLine(
+ const rtl::Reference<::chart::DataSeries>& xCurveContainer );
/** Returns the regression curve found at the index provided.
*/
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve>
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
getRegressionCurveAtIndex(
- const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xCurveContainer,
+ const rtl::Reference<::chart::DataSeries>& xCurveContainer,
sal_Int32 aIndex);
/** Returns the type of the first regression curve found that is not of type
mean-value line
*/
- OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress getFirstRegressTypeNotMeanValueLine(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) SvxChartRegress getFirstRegressTypeNotMeanValueLine(
const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xCurveContainer );
- OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress getRegressionType(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) SvxChartRegress getRegressionType(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
/** @param xPropertySource is taken as source to copy all properties from if
@@ -95,7 +112,7 @@ namespace RegressionCurveHelper
@param xEquationProperties is set at the new regression curve as
equation properties if not null
*/
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve>
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
addRegressionCurve(
SvxChartRegress eType,
css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xCurveContainer,
@@ -103,22 +120,30 @@ namespace RegressionCurveHelper
css::uno::Reference<css::beans::XPropertySet>(),
const css::uno::Reference<css::beans::XPropertySet>& xEquationProperties =
css::uno::Reference<css::beans::XPropertySet>() );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
+ addRegressionCurve(
+ SvxChartRegress eType,
+ rtl::Reference<::chart::DataSeries> const & xCurveContainer,
+ const css::uno::Reference<css::beans::XPropertySet >& xPropertySource =
+ css::uno::Reference<css::beans::XPropertySet>(),
+ const css::uno::Reference<css::beans::XPropertySet>& xEquationProperties =
+ css::uno::Reference<css::beans::XPropertySet>() );
- OOO_DLLPUBLIC_CHARTTOOLS bool removeAllExceptMeanValueLine(
- css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xCurveContainer );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool removeAllExceptMeanValueLine(
+ rtl::Reference<::chart::DataSeries> const & xCurveContainer );
- OOO_DLLPUBLIC_CHARTTOOLS void removeEquations(
- css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xCurveContainer );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void removeEquations(
+ rtl::Reference<::chart::DataSeries> const & xCurveContainer );
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve>
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel>
changeRegressionCurveType(
SvxChartRegress eType,
css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xRegressionCurveContainer,
css::uno::Reference<css::chart2::XRegressionCurve> const & xRegressionCurve );
/// returns a calculator object for regression curves (used by the view)
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurveCalculator>
- createRegressionCurveCalculatorByServiceName( const OUString& aServiceName );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveCalculator>
+ createRegressionCurveCalculatorByServiceName( std::u16string_view aServiceName );
/** recalculates the regression parameters according to the data given in
the data source.
@@ -145,40 +170,34 @@ namespace RegressionCurveHelper
necessary that the data::XDataSource is an XDataSeries, thus this parameter
also changed.
*/
- OOO_DLLPUBLIC_CHARTTOOLS void initializeCurveCalculator(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void initializeCurveCalculator(
const css::uno::Reference<css::chart2::XRegressionCurveCalculator>& xOutCurveCalculator,
- const css::uno::Reference<css::chart2::XDataSeries>& xSeries,
- const css::uno::Reference<css::frame::XModel>& xModel );
+ const rtl::Reference<::chart::DataSeries>& xSeries,
+ const rtl::Reference<::chart::ChartModel>& xModel );
- OOO_DLLPUBLIC_CHARTTOOLS OUString getUINameForRegressionCurve(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString getUINameForRegressionCurve(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
- OOO_DLLPUBLIC_CHARTTOOLS OUString getRegressionCurveName(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString getRegressionCurveName(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
- OOO_DLLPUBLIC_CHARTTOOLS OUString getRegressionCurveGenericName(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString getRegressionCurveGenericName(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
- OOO_DLLPUBLIC_CHARTTOOLS OUString getRegressionCurveSpecificName(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString getRegressionCurveSpecificName(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
- OOO_DLLPUBLIC_CHARTTOOLS std::vector<css::uno::Reference<css::chart2::XRegressionCurve> >
- getAllRegressionCurvesNotMeanValueLine(
- const css::uno::Reference<css::chart2::XDiagram>& xDiagram );
-
- OOO_DLLPUBLIC_CHARTTOOLS void resetEquationPosition(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void resetEquationPosition(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
/// @return the index of the given curve in the given container. -1 if not contained
- OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getRegressionCurveIndex(
- const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xContainer,
- const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) sal_Int32 getRegressionCurveIndex(
+ const rtl::Reference<::chart::DataSeries>& xContainer,
+ const rtl::Reference<::chart::RegressionCurveModel>& xCurve );
- OOO_DLLPUBLIC_CHARTTOOLS bool hasEquation(const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
-}
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool hasEquation(const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool MayHaveCorrelationCoefficient(const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
} // namespace chart
-#endif // INCLUDED_CHART2_SOURCE_INC_REGRESSIONCURVEHELPER_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/RegressionCurveModel.hxx b/chart2/source/inc/RegressionCurveModel.hxx
new file mode 100644
index 000000000000..ddd75a8391a1
--- /dev/null
+++ b/chart2/source/inc/RegressionCurveModel.hxx
@@ -0,0 +1,242 @@
+/* -*- 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 .
+ */
+#pragma once
+
+#include "OPropertySet.hxx"
+
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+#include <sal/types.h>
+
+#include <com/sun/star/chart2/XRegressionCurve.hpp>
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XServiceName.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include "ModifyListenerHelper.hxx"
+
+namespace chart
+{
+
+namespace impl
+{
+typedef ::cppu::WeakImplHelper<
+ css::lang::XServiceInfo,
+ css::lang::XServiceName,
+ css::chart2::XRegressionCurve,
+ css::util::XCloneable,
+ css::util::XModifyBroadcaster,
+ css::util::XModifyListener >
+ RegressionCurveModel_Base;
+}
+
+class SAL_DLLPUBLIC_RTTI RegressionCurveModel :
+ public impl::RegressionCurveModel_Base,
+ public ::property::OPropertySet
+{
+public:
+ enum tCurveType
+ {
+ CURVE_TYPE_MEAN_VALUE,
+ CURVE_TYPE_LINEAR,
+ CURVE_TYPE_LOGARITHM,
+ CURVE_TYPE_EXPONENTIAL,
+ CURVE_TYPE_POWER,
+ CURVE_TYPE_POLYNOMIAL,
+ CURVE_TYPE_MOVING_AVERAGE
+ };
+
+ RegressionCurveModel( tCurveType eCurveType );
+ RegressionCurveModel( const RegressionCurveModel & rOther );
+ virtual ~RegressionCurveModel() override;
+
+ /// merge XInterface implementations
+ DECLARE_XINTERFACE()
+ /// merge XTypeProvider implementations
+ DECLARE_XTYPEPROVIDER()
+
+protected:
+ // ____ OPropertySet ____
+ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
+
+ // ____ OPropertySet ____
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+
+ // ____ XPropertySet ____
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() override;
+
+public:
+ // ____ XRegressionCurve ____
+ virtual css::uno::Reference< css::chart2::XRegressionCurveCalculator > SAL_CALL getCalculator() override;
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getEquationProperties() override;
+ virtual void SAL_CALL setEquationProperties(
+ const css::uno::Reference< css::beans::XPropertySet >& xEquationProperties ) override;
+
+ // ____ XServiceName ____
+ virtual OUString SAL_CALL getServiceName() 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;
+
+protected:
+ // ____ 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;
+
+ using ::cppu::OPropertySetHelper::disposing;
+
+ // ____ OPropertySet ____
+ virtual void firePropertyChangeEvent() override;
+
+ void fireModifyEvent();
+
+private:
+ const tCurveType m_eRegressionCurveType;
+
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+ css::uno::Reference< css::beans::XPropertySet > m_xEquationProperties;
+ void setPropertyMayHaveR2();
+};
+
+// implementations for factory instantiation
+
+class MeanValueRegressionCurve : public RegressionCurveModel
+{
+public:
+ explicit MeanValueRegressionCurve();
+ explicit MeanValueRegressionCurve(
+ const MeanValueRegressionCurve & rOther );
+ virtual ~MeanValueRegressionCurve() override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() 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;
+};
+
+class LinearRegressionCurve : public RegressionCurveModel
+{
+public:
+ explicit LinearRegressionCurve();
+ explicit LinearRegressionCurve( const LinearRegressionCurve & rOther );
+ virtual ~LinearRegressionCurve() override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() 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;
+};
+
+class LogarithmicRegressionCurve : public RegressionCurveModel
+{
+public:
+ explicit LogarithmicRegressionCurve();
+ explicit LogarithmicRegressionCurve( const LogarithmicRegressionCurve & rOther );
+ virtual ~LogarithmicRegressionCurve() override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() 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;
+};
+
+class ExponentialRegressionCurve : public RegressionCurveModel
+{
+public:
+ explicit ExponentialRegressionCurve();
+ explicit ExponentialRegressionCurve( const ExponentialRegressionCurve & rOther );
+ virtual ~ExponentialRegressionCurve() override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() 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;
+};
+
+class PotentialRegressionCurve : public RegressionCurveModel
+{
+public:
+ explicit PotentialRegressionCurve();
+ explicit PotentialRegressionCurve( const PotentialRegressionCurve & rOther );
+ virtual ~PotentialRegressionCurve() override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() 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;
+};
+
+class PolynomialRegressionCurve : public RegressionCurveModel
+{
+public:
+ explicit PolynomialRegressionCurve();
+ explicit PolynomialRegressionCurve( const PolynomialRegressionCurve & rOther );
+ virtual ~PolynomialRegressionCurve() override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() 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;
+};
+
+class MovingAverageRegressionCurve : public RegressionCurveModel
+{
+public:
+ explicit MovingAverageRegressionCurve();
+ explicit MovingAverageRegressionCurve( const MovingAverageRegressionCurve & rOther );
+ virtual ~MovingAverageRegressionCurve() override;
+
+ // ____ XCloneable ____
+ virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() 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;
+};
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/RelativePositionHelper.hxx b/chart2/source/inc/RelativePositionHelper.hxx
index 961a55e99f6e..03ea72eebeed 100644
--- a/chart2/source/inc/RelativePositionHelper.hxx
+++ b/chart2/source/inc/RelativePositionHelper.hxx
@@ -17,9 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_INC_RELATIVEPOSITIONHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_RELATIVEPOSITIONHELPER_HXX
+#pragma once
+#include <config_options.h>
#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/drawing/Alignment.hpp>
#include <com/sun/star/awt/Point.hpp>
@@ -31,7 +31,7 @@ namespace com::sun::star::chart2 { struct RelativeSize; }
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS RelativePositionHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) RelativePositionHelper
{
public:
/** returns the upper left corner of an object that has size aObjectSize and
@@ -100,6 +100,5 @@ public:
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/RelativeSizeHelper.hxx b/chart2/source/inc/RelativeSizeHelper.hxx
index 517804096100..6b3dbb7c2dee 100644
--- a/chart2/source/inc/RelativeSizeHelper.hxx
+++ b/chart2/source/inc/RelativeSizeHelper.hxx
@@ -16,19 +16,20 @@
* 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_INC_RELATIVESIZEHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_RELATIVESIZEHELPER_HXX
+#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
namespace com::sun::star::awt { struct Size; }
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::uno { template <class interface_type> class Reference; }
+class SvxShapeText;
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS RelativeSizeHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) RelativeSizeHelper
{
public:
static double calculate(
@@ -42,13 +43,15 @@ public:
const css::awt::Size & rOldReferenceSize,
const css::awt::Size & rNewReferenceSize );
+ static void adaptFontSizes(
+ SvxShapeText& xTargetProperties,
+ const css::awt::Size & rOldReferenceSize,
+ const css::awt::Size & rNewReferenceSize );
+
private:
RelativeSizeHelper() = delete;
};
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_RELATIVESIZEHELPER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ResId.hxx b/chart2/source/inc/ResId.hxx
index 31d96d155b91..48baf852ab04 100644
--- a/chart2/source/inc/ResId.hxx
+++ b/chart2/source/inc/ResId.hxx
@@ -16,20 +16,16 @@
* 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_INC_RESID_HXX
-#define INCLUDED_CHART2_SOURCE_INC_RESID_HXX
+#pragma once
#include <rtl/ustring.hxx>
#include "charttoolsdllapi.hxx"
+#include <unotools/resmgr.hxx>
namespace chart
{
-
-OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(const char *pId);
+OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(TranslateId aId);
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_RESID_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/Scaling.hxx b/chart2/source/inc/Scaling.hxx
index 7314ce84ebbc..6f6310933d1a 100644
--- a/chart2/source/inc/Scaling.hxx
+++ b/chart2/source/inc/Scaling.hxx
@@ -16,8 +16,7 @@
* 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_INC_SCALING_HXX
-#define INCLUDED_CHART2_SOURCE_INC_SCALING_HXX
+#pragma once
#include <com/sun/star/chart2/XScaling.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -27,7 +26,7 @@
namespace chart
{
-class LogarithmicScaling :
+class LogarithmicScaling final :
public ::cppu::WeakImplHelper<
css::chart2::XScaling,
css::lang::XServiceName,
@@ -60,7 +59,7 @@ private:
const double m_fLogOfBase;
};
-class ExponentialScaling :
+class ExponentialScaling final :
public ::cppu::WeakImplHelper<
css::chart2::XScaling,
css::lang::XServiceName,
@@ -92,7 +91,7 @@ private:
const double m_fBase;
};
-class LinearScaling : public ::cppu::WeakImplHelper<
+class LinearScaling final : public ::cppu::WeakImplHelper<
css::chart2::XScaling,
css::lang::XServiceName,
css::lang::XServiceInfo
@@ -124,7 +123,7 @@ private:
const double m_fOffset;
};
-class PowerScaling : public ::cppu::WeakImplHelper<
+class PowerScaling final : public ::cppu::WeakImplHelper<
css::chart2::XScaling,
css::lang::XServiceName,
css::lang::XServiceInfo
@@ -156,6 +155,5 @@ private:
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/SceneProperties.hxx b/chart2/source/inc/SceneProperties.hxx
index 9fedd60a643f..1fdae1b6703f 100644
--- a/chart2/source/inc/SceneProperties.hxx
+++ b/chart2/source/inc/SceneProperties.hxx
@@ -16,9 +16,9 @@
* 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_INC_SCENEPROPERTIES_HXX
-#define INCLUDED_CHART2_SOURCE_INC_SCENEPROPERTIES_HXX
+#pragma once
+#include <config_options.h>
#include "PropertyHelper.hxx"
#include "FastPropertyIdRanges.hxx"
#include "charttoolsdllapi.hxx"
@@ -72,14 +72,12 @@ namespace SceneProperties
PROP_SCENE_LIGHT_ON_8
};
- OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddPropertiesToVector(
std::vector< css::beans::Property > & rOutProperties );
- OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
}
} // namespace chart
-#endif // INCLUDED_CHART2_SOURCE_INC_SCENEPROPERTIES_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/StackMode.hxx b/chart2/source/inc/StackMode.hxx
index 14e5fe6ee71e..718befc4e533 100644
--- a/chart2/source/inc/StackMode.hxx
+++ b/chart2/source/inc/StackMode.hxx
@@ -16,8 +16,7 @@
* 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_INC_STACKMODE_HXX
-#define INCLUDED_CHART2_SOURCE_INC_STACKMODE_HXX
+#pragma once
namespace chart
{
@@ -33,7 +32,4 @@ enum class StackMode
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_STACKMODE_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/StatisticsHelper.hxx b/chart2/source/inc/StatisticsHelper.hxx
index d9793456917f..f38a27ba500f 100644
--- a/chart2/source/inc/StatisticsHelper.hxx
+++ b/chart2/source/inc/StatisticsHelper.hxx
@@ -16,11 +16,12 @@
* 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_INC_STATISTICSHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_STATISTICSHELPER_HXX
+#pragma once
+#include <config_options.h>
#include <com/sun/star/uno/Reference.h>
#include <rtl/ustring.hxx>
+#include <rtl/ref.hxx>
#include "charttoolsdllapi.hxx"
namespace com::sun::star::beans { class XPropertySet; }
@@ -30,43 +31,42 @@ namespace com::sun::star::chart2::data { class XDataSequence; }
namespace com::sun::star::chart2::data { class XDataSource; }
namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
namespace com::sun::star::uno { template <typename > class Sequence; }
+namespace chart { class LabeledDataSequence; }
+namespace chart { class DataSeries; }
-namespace chart
-{
-
-namespace StatisticsHelper
+namespace chart::StatisticsHelper
{
/** Calculates 1/n * sum (x_i - x_mean)^2.
@see http://mathworld.wolfram.com/Variance.html
*/
- OOO_DLLPUBLIC_CHARTTOOLS double getVariance( const css::uno::Sequence< double > & rData );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) double getVariance( const css::uno::Sequence< double > & rData );
// square root of the variance
- OOO_DLLPUBLIC_CHARTTOOLS double getStandardDeviation( const css::uno::Sequence< double > & rData );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) double getStandardDeviation( const css::uno::Sequence< double > & rData );
// also called "Standard deviation of the mean (SDOM)"
- OOO_DLLPUBLIC_CHARTTOOLS double getStandardError( const css::uno::Sequence< double > & rData );
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) double getStandardError( const css::uno::Sequence< double > & rData );
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSequence >
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::uno::Reference< css::chart2::data::XLabeledDataSequence >
getErrorLabeledDataSequenceFromDataSource(
const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
bool bPositiveValue,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XDataSequence >
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::uno::Reference< css::chart2::data::XDataSequence >
getErrorDataSequenceFromDataSource(
const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
bool bPositiveValue,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS double getErrorFromDataSource(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) double getErrorFromDataSource(
const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
sal_Int32 nIndex,
bool bPositiveValue,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS void setErrorDataSequence(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void setErrorDataSequence(
const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
const css::uno::Reference< css::chart2::data::XDataProvider > & xDataProvider,
const OUString & rNewRange,
@@ -75,33 +75,29 @@ namespace StatisticsHelper
OUString const * pXMLRange = nullptr );
/// @return the newly created or existing error bar object
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::beans::XPropertySet >
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::uno::Reference< css::beans::XPropertySet >
addErrorBars(
- const css::uno::Reference< css::chart2::XDataSeries > & xDataSeries,
+ const rtl::Reference< ::chart::DataSeries > & xDataSeries,
sal_Int32 nStyle,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::beans::XPropertySet >
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) css::uno::Reference< css::beans::XPropertySet >
getErrorBars(
- const css::uno::Reference< css::chart2::XDataSeries > & xDataSeries,
+ const rtl::Reference< ::chart::DataSeries > & xDataSeries,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS bool hasErrorBars(
- const css::uno::Reference< css::chart2::XDataSeries > & xDataSeries,
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool hasErrorBars(
+ const rtl::Reference< ::chart::DataSeries > & xDataSeries,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS void removeErrorBars(
- const css::uno::Reference< css::chart2::XDataSeries > & xDataSeries,
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void removeErrorBars(
+ const rtl::Reference< ::chart::DataSeries > & xDataSeries,
bool bYError = true );
- OOO_DLLPUBLIC_CHARTTOOLS bool usesErrorBarRanges(
- const css::uno::Reference< css::chart2::XDataSeries > & xDataSeries,
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool usesErrorBarRanges(
+ const rtl::Reference< ::chart::DataSeries > & xDataSeries,
bool bYError = true );
-}
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_STATISTICSHELPER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/ThreeDHelper.hxx b/chart2/source/inc/ThreeDHelper.hxx
index 52c97392b5c9..2c43fff6c71a 100644
--- a/chart2/source/inc/ThreeDHelper.hxx
+++ b/chart2/source/inc/ThreeDHelper.hxx
@@ -17,10 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_INC_THREEDHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_THREEDHELPER_HXX
+#pragma once
+#include <config_options.h>
#include <com/sun/star/drawing/CameraGeometry.hpp>
+#include <rtl/ref.hxx>
#include "charttoolsdllapi.hxx"
namespace com::sun::star::beans { class XPropertySet; }
@@ -28,8 +29,9 @@ namespace com::sun::star::chart2 { class XDiagram; }
namespace chart
{
+class Diagram;
-enum ThreeDLookScheme
+enum class ThreeDLookScheme
{
ThreeDLookScheme_Simple,
ThreeDLookScheme_Realistic,
@@ -46,7 +48,7 @@ enum CuboidPlanePosition
CuboidPlanePosition_Back
};
-class OOO_DLLPUBLIC_CHARTTOOLS ThreeDHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ThreeDHelper
{
public:
@@ -58,23 +60,6 @@ public:
*/
static css::drawing::CameraGeometry getDefaultCameraGeometry( bool bPie=false );
- static void getRotationAngleFromDiagram(
- const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
- , double& rfXAngleRad, double& rfYAngleRad, double& rfZAngleRad );
- static void setRotationAngleToDiagram(
- const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
- , double fXAngleRad, double fYAngleRad, double fZAngleRad );
-
- static void getRotationFromDiagram(
- const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
- , sal_Int32& rnHorizontalAngleDegree, sal_Int32& rnVerticalAngleDegree );
- static void setRotationToDiagram(
- const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
- , sal_Int32 nHorizontalAngleDegree, sal_Int32 nVerticalYAngleDegree );
-
- static void switchRightAngledAxes( const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
- , bool bRightAngledAxes );
-
static void adaptRadAnglesForRightAngledAxes( double& rfXAngleRad, double& rfYAngleRad );
static double getXDegreeAngleLimitForRightAngledAxes() { return 90.0; }
static double getYDegreeAngleLimitForRightAngledAxes() { return 45.0; }
@@ -89,44 +74,28 @@ public:
sal_Int32& rnElevationDeg, sal_Int32& rnRotationDeg
, double fXRad, double fYRad, double fZRad );
- static double getCameraDistance(
- const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties );
- static void setCameraDistance(
- const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties
- , double fCameraDistance );
SAL_DLLPRIVATE static void ensureCameraDistanceRange( double& rfCameraDistance );
SAL_DLLPRIVATE static void getCameraDistanceRange( double& rfMinimumDistance, double& rfMaximumDistance );
static double CameraDistanceToPerspective( double fCameraDistance );
static double PerspectiveToCameraDistance( double fPerspective );
- static void set3DSettingsToDefault( const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties );
- static void setDefaultRotation( const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties );
- static void setDefaultIllumination( const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties );
-
- static void setDefaultRotation( const css::uno::Reference< css::beans::XPropertySet >& xSceneProperties, bool bPieOrDonut );
-
- static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardLeftWall( const css::uno::Reference<
- css::beans::XPropertySet >& xSceneProperties );
- static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardBackWall(const css::uno::Reference<
- css::beans::XPropertySet >& xSceneProperties );
- static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardBottom(const css::uno::Reference<
- css::beans::XPropertySet >& xSceneProperties );
-
- static ThreeDLookScheme detectScheme( const css::uno::Reference< css::chart2::XDiagram >& xDiagram );
- static void setScheme( const css::uno::Reference< css::chart2::XDiagram >& xDiagram
- , ThreeDLookScheme aScheme );
+ static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardLeftWall( const rtl::Reference<
+ ::chart::Diagram >& xDiagram );
+ static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardBackWall(const rtl::Reference<
+ ::chart::Diagram >& xDiagram );
+ static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardBottom(const rtl::Reference<
+ ::chart::Diagram >& xDiagram );
//sal_Int32 nRoundedEdges: <0 or >100 -> mixed state
//sal_Int32 nObjectLines: 0->no lines; 1->all lines on; other->mixed state
- static void getRoundedEdgesAndObjectLines( const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ static void getRoundedEdgesAndObjectLines( const rtl::Reference< ::chart::Diagram >& xDiagram
, sal_Int32& rnRoundedEdges, sal_Int32& rnObjectLines );
- static void setRoundedEdgesAndObjectLines( const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ static void setRoundedEdgesAndObjectLines( const rtl::Reference< ::chart::Diagram >& xDiagram
, sal_Int32 nRoundedEdges, sal_Int32 nObjectLines );
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/Title.hxx b/chart2/source/inc/Title.hxx
new file mode 100644
index 000000000000..230267918de2
--- /dev/null
+++ b/chart2/source/inc/Title.hxx
@@ -0,0 +1,109 @@
+/* -*- 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 .
+ */
+#pragma once
+
+#include "OPropertySet.hxx"
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+#include <com/sun/star/chart2/XTitle.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include "ModifyListenerHelper.hxx"
+
+namespace chart
+{
+
+namespace impl
+{
+typedef ::cppu::WeakImplHelper<
+ css::chart2::XTitle,
+ css::lang::XServiceInfo,
+ css::util::XCloneable,
+ css::util::XModifyBroadcaster,
+ css::util::XModifyListener >
+ Title_Base;
+}
+
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) Title final :
+ public impl::Title_Base,
+ public ::property::OPropertySet
+{
+public:
+ explicit Title();
+ virtual ~Title() 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()
+
+ explicit Title( const Title & rOther );
+
+ // ____ OPropertySet ____
+ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
+
+ // ____ OPropertySet ____
+ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
+
+ // ____ XPropertySet ____
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo() override;
+
+ // ____ XTitle ____
+ virtual css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > > SAL_CALL getText() override;
+ virtual void SAL_CALL setText( const css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > >& Strings ) 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;
+
+private:
+
+ // ____ 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::Sequence< css::uno::Reference< css::chart2::XFormattedString > > m_aStrings;
+
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
+};
+
+} // namespace chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/TitleHelper.hxx b/chart2/source/inc/TitleHelper.hxx
index e16beda39134..f4ea2204d7d5 100644
--- a/chart2/source/inc/TitleHelper.hxx
+++ b/chart2/source/inc/TitleHelper.hxx
@@ -16,12 +16,13 @@
* 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_INC_TITLEHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_TITLEHELPER_HXX
+#pragma once
#include <com/sun/star/uno/Reference.h>
+#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
#include "charttoolsdllapi.hxx"
+#include "Title.hxx"
namespace chart { class ChartModel; }
namespace chart { class ReferenceSizeProvider; }
@@ -32,7 +33,7 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS TitleHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) TitleHelper
{
public:
enum eTitleType
@@ -52,51 +53,46 @@ public:
TITLE_AT_STANDARD_Y_AXIS_POSITION //equals the X_AXIS_TITLE for barchart
};
- static css::uno::Reference< css::chart2::XTitle >
+ static rtl::Reference< ::chart::Title >
getTitle( eTitleType nTitleIndex
, ChartModel& rModel );
- static css::uno::Reference< css::chart2::XTitle >
+ static rtl::Reference< ::chart::Title >
getTitle( eTitleType nTitleIndex
- , const css::uno::Reference< css::frame::XModel >& xModel );
+ , const rtl::Reference< ::chart::ChartModel >& xModel );
- static css::uno::Reference<
- css::chart2::XTitle >
+ static rtl::Reference< ::chart::Title >
createTitle( eTitleType nTitleIndex
, const OUString& rTitleText
- , const css::uno::Reference< css::frame::XModel >& xModel
+ , const rtl::Reference< ::chart::ChartModel >& xModel
, const css::uno::Reference< css::uno::XComponentContext > & xContext
, ReferenceSizeProvider * pRefSizeProvider = nullptr );
- static css::uno::Reference<
- css::chart2::XTitle >
+ static rtl::Reference< ::chart::Title >
createOrShowTitle( eTitleType nTitleIndex
, const OUString& rTitleText
- , const css::uno::Reference< css::frame::XModel >& xModel
+ , const rtl::Reference< ::chart::ChartModel >& xModel
, const css::uno::Reference< css::uno::XComponentContext > & xContex );
static void removeTitle( eTitleType nTitleIndex
- , const css::uno::Reference< css::frame::XModel >& xModel );
+ , const rtl::Reference< ::chart::ChartModel >& xModel );
- static void hideTitle( eTitleType nTitleIndex
- , const css::uno::Reference< css::frame::XModel >& xModel );
-
-
- static OUString getCompleteString( const css::uno::Reference< css::chart2::XTitle >& xTitle );
+ static OUString getCompleteString( const rtl::Reference< ::chart::Title >& xTitle );
+ static OUString getUnstackedStr( const OUString& rNewText );
+ static void setFormattedString( const rtl::Reference< ::chart::Title >& xTitle,
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > >& aNewFormattedTitle );
static void setCompleteString( const OUString& rNewText
- , const css::uno::Reference< css::chart2::XTitle >& xTitle
+ , const rtl::Reference< ::chart::Title >& xTitle
, const css::uno::Reference< css::uno::XComponentContext > & xContext
- , const float * pDefaultCharHeight = nullptr );
-
- static bool getTitleType( eTitleType& rType
- , const css::uno::Reference< css::chart2::XTitle >& xTitle
- , ChartModel& rModel);
+ , const float * pDefaultCharHeight = nullptr
+ , bool bDialogTitle = false );
static bool getTitleType( eTitleType& rType
- , const css::uno::Reference< css::chart2::XTitle >& xTitle
- , const css::uno::Reference< css::frame::XModel >& xModel );
+ , const rtl::Reference< ::chart::Title >& xTitle
+ , const rtl::Reference< ::chart::ChartModel >& xModel );
+ static void hideTitle( eTitleType nTitleIndex,
+ const rtl::Reference< ::chart::ChartModel > & xModel);
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/UncachedDataSequence.hxx b/chart2/source/inc/UncachedDataSequence.hxx
index 0829ceffafa0..c134601944ff 100644
--- a/chart2/source/inc/UncachedDataSequence.hxx
+++ b/chart2/source/inc/UncachedDataSequence.hxx
@@ -16,15 +16,15 @@
* 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_INC_UNCACHEDDATASEQUENCE_HXX
-#define INCLUDED_CHART2_SOURCE_INC_UNCACHEDDATASEQUENCE_HXX
+#pragma once
// helper classes
-#include <cppuhelper/compbase.hxx>
+#include <comphelper/compbase.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/broadcasthelper.hxx>
-#include <comphelper/propertycontainer.hxx>
+#include <comphelper/propertycontainer2.hxx>
#include <comphelper/proparrhlp.hxx>
+#include <rtl/ref.hxx>
// interfaces and types
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -41,10 +41,12 @@ namespace com::sun::star::chart2 { class XInternalDataProvider; }
namespace chart
{
+class InternalDataProvider;
+class ModifyEventForwarder;
namespace impl
{
-typedef ::cppu::WeakComponentImplHelper<
+typedef ::comphelper::WeakComponentImplHelper<
css::chart2::data::XDataSequence,
css::chart2::data::XNumericalDataSequence,
css::chart2::data::XTextualDataSequence,
@@ -67,8 +69,7 @@ typedef ::cppu::WeakComponentImplHelper<
* 'label 2', ...</p>
*/
class UncachedDataSequence final :
- public ::comphelper::OMutexAndBroadcastHelper,
- public ::comphelper::OPropertyContainer,
+ public ::comphelper::OPropertyContainer2,
public ::comphelper::OPropertyArrayUsageHelper< UncachedDataSequence >,
public impl::UncachedDataSequence_Base
{
@@ -77,11 +78,11 @@ public:
lifetime is at least as long as the one of this object.
*/
UncachedDataSequence(
- const css::uno::Reference< css::chart2::XInternalDataProvider > & xIntDataProv,
- const OUString & rRangeRepresentation );
+ rtl::Reference< InternalDataProvider > xIntDataProv,
+ OUString aRangeRepresentation );
UncachedDataSequence(
- const css::uno::Reference< css::chart2::XInternalDataProvider > & xIntDataProv,
- const OUString & rRangeRepresentation,
+ rtl::Reference< InternalDataProvider > xIntDataProv,
+ OUString aRangeRepresentation,
const OUString & rRole );
UncachedDataSequence( const UncachedDataSequence & rSource );
virtual ~UncachedDataSequence() override;
@@ -101,7 +102,7 @@ private:
/// @see css::beans::XPropertySet
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
/// @see ::comphelper::OPropertySetHelper
- virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+ virtual ::cppu::IPropertyArrayHelper& getInfoHelper() override;
/// @see ::comphelper::OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override;
@@ -161,15 +162,11 @@ private:
*/
void registerProperties();
- css::uno::Reference< css::chart2::XInternalDataProvider > m_xDataProvider;
- OUString m_aSourceRepresentation;
- css::uno::Reference< css::util::XModifyListener >
- m_xModifyEventForwarder;
+ rtl::Reference< InternalDataProvider > m_xDataProvider;
+ OUString m_aSourceRepresentation;
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
};
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_UNCACHEDDATASEQUENCE_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/UserDefinedProperties.hxx b/chart2/source/inc/UserDefinedProperties.hxx
index 93d7af9fda42..3d4e587db745 100644
--- a/chart2/source/inc/UserDefinedProperties.hxx
+++ b/chart2/source/inc/UserDefinedProperties.hxx
@@ -16,9 +16,9 @@
* 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_INC_USERDEFINEDPROPERTIES_HXX
-#define INCLUDED_CHART2_SOURCE_INC_USERDEFINEDPROPERTIES_HXX
+#pragma once
+#include <config_options.h>
#include "FastPropertyIdRanges.hxx"
#include "charttoolsdllapi.hxx"
@@ -46,13 +46,10 @@ namespace UserDefinedProperties
PROP_XML_USERDEF
};
- OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddPropertiesToVector(
std::vector< css::beans::Property > & rOutProperties );
}
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_USERDEFINEDPROPERTIES_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/WeakListenerAdapter.hxx b/chart2/source/inc/WeakListenerAdapter.hxx
index 08568f25316a..f300f1aa0391 100644
--- a/chart2/source/inc/WeakListenerAdapter.hxx
+++ b/chart2/source/inc/WeakListenerAdapter.hxx
@@ -16,11 +16,9 @@
* 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_INC_WEAKLISTENERADAPTER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_WEAKLISTENERADAPTER_HXX
+#pragma once
#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/view/XSelectionChangeListener.hpp>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/implbase.hxx>
@@ -48,9 +46,6 @@ public:
explicit WeakListenerAdapter( const css::uno::Reference< Listener > & xListener ) :
m_xListener( xListener )
{}
- explicit WeakListenerAdapter( const css::uno::WeakReference< Listener > & xListener ) :
- m_xListener( xListener )
- {}
protected:
// ____ XEventListener (base of all listeners) ____
@@ -72,20 +67,7 @@ private:
css::uno::WeakReference< Listener > m_xListener;
};
-class WeakModifyListenerAdapter :
- public WeakListenerAdapter< css::util::XModifyListener >
-{
-public:
- explicit WeakModifyListenerAdapter(
- const css::uno::WeakReference< css::util::XModifyListener > & xListener );
- virtual ~WeakModifyListenerAdapter() override;
-
-protected:
- // ____ XModifyListener ____
- virtual void SAL_CALL modified( const css::lang::EventObject& aEvent ) override;
-};
-
-class WeakSelectionChangeListenerAdapter :
+class WeakSelectionChangeListenerAdapter final :
public WeakListenerAdapter< css::view::XSelectionChangeListener >
{
public:
@@ -101,7 +83,4 @@ protected:
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_WEAKLISTENERADAPTER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/WrappedDefaultProperty.hxx b/chart2/source/inc/WrappedDefaultProperty.hxx
index a3632118171d..f9fdbff2cbf9 100644
--- a/chart2/source/inc/WrappedDefaultProperty.hxx
+++ b/chart2/source/inc/WrappedDefaultProperty.hxx
@@ -16,8 +16,7 @@
* 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_INC_WRAPPEDDEFAULTPROPERTY_HXX
-#define INCLUDED_CHART2_SOURCE_INC_WRAPPEDDEFAULTPROPERTY_HXX
+#pragma once
#include "WrappedProperty.hxx"
#include "charttoolsdllapi.hxx"
@@ -25,12 +24,12 @@
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedDefaultProperty : public WrappedProperty
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedDefaultProperty : public WrappedProperty
{
public:
explicit WrappedDefaultProperty(
const OUString& rOuterName, const OUString& rInnerName,
- const css::uno::Any& rNewOuterDefault );
+ css::uno::Any aNewOuterDefault );
virtual ~WrappedDefaultProperty() override;
virtual void setPropertyToDefault(
@@ -48,6 +47,5 @@ private:
} // namespace chart
// CHART2_WRAPPEDPROPERTYNEWDEFAULT_HXX
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/WrappedDirectStateProperty.hxx b/chart2/source/inc/WrappedDirectStateProperty.hxx
index ba2bc0aac459..082a70ed0a76 100644
--- a/chart2/source/inc/WrappedDirectStateProperty.hxx
+++ b/chart2/source/inc/WrappedDirectStateProperty.hxx
@@ -16,30 +16,25 @@
* 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_INC_WRAPPEDDIRECTSTATEPROPERTY_HXX
-#define INCLUDED_CHART2_SOURCE_INC_WRAPPEDDIRECTSTATEPROPERTY_HXX
+#pragma once
#include "WrappedProperty.hxx"
#include "charttoolsdllapi.hxx"
namespace chart
{
-
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedDirectStateProperty :
- public WrappedProperty
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedDirectStateProperty : public WrappedProperty
{
public:
- explicit WrappedDirectStateProperty(
- const OUString& rOuterName, const OUString& rInnerName );
+ explicit WrappedDirectStateProperty(const OUString& rOuterName, const OUString& rInnerName);
virtual ~WrappedDirectStateProperty() override;
virtual css::beans::PropertyState getPropertyState(
- const css::uno::Reference< css::beans::XPropertyState >& xInnerPropertyState ) const override;
+ const css::uno::Reference<css::beans::XPropertyState>& xInnerPropertyState) const override;
};
} // namespace chart
// CHART2_WRAPPEDPROPERTYNEWDEFAULT_HXX
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/WrappedIgnoreProperty.hxx b/chart2/source/inc/WrappedIgnoreProperty.hxx
index 185e06d663a5..22c1673cc956 100644
--- a/chart2/source/inc/WrappedIgnoreProperty.hxx
+++ b/chart2/source/inc/WrappedIgnoreProperty.hxx
@@ -16,8 +16,7 @@
* 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_INC_WRAPPEDIGNOREPROPERTY_HXX
-#define INCLUDED_CHART2_SOURCE_INC_WRAPPEDIGNOREPROPERTY_HXX
+#pragma once
#include "WrappedProperty.hxx"
#include "charttoolsdllapi.hxx"
@@ -27,7 +26,7 @@
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedIgnoreProperty final : public WrappedProperty
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedIgnoreProperty final : public WrappedProperty
{
public:
WrappedIgnoreProperty( const OUString& rOuterName, const css::uno::Any& rDefaultValue );
@@ -48,7 +47,7 @@ private:
mutable css::uno::Any m_aCurrentValue;
};
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedIgnoreProperties
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedIgnoreProperties
{
public:
static void addIgnoreLineProperties( std::vector< std::unique_ptr<WrappedProperty> >& rList );
@@ -60,7 +59,4 @@ public:
} //namespace chart
-// INCLUDED_CHART2_SOURCE_INC_WRAPPEDIGNOREPROPERTY_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/WrappedProperty.hxx b/chart2/source/inc/WrappedProperty.hxx
index 82b9f3b0cbd9..de6e0095e354 100644
--- a/chart2/source/inc/WrappedProperty.hxx
+++ b/chart2/source/inc/WrappedProperty.hxx
@@ -16,9 +16,9 @@
* 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_INC_WRAPPEDPROPERTY_HXX
-#define INCLUDED_CHART2_SOURCE_INC_WRAPPEDPROPERTY_HXX
+#pragma once
+#include <config_options.h>
#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <rtl/ustring.hxx>
@@ -34,13 +34,13 @@ namespace com::sun::star::uno { template <class interface_type> class Reference;
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedProperty
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedProperty
{
/** The property visible to the outer PropertySet in the PropertySetWrapper may have a different name, type and value than
a corresponding property of the inner PropertySet. Use this class to do the conversion between the two.
*/
public:
- WrappedProperty( const OUString& rOuterName, const OUString& rInnerName );
+ WrappedProperty( OUString aOuterName, OUString aInnerName );
virtual ~WrappedProperty();
const OUString& getOuterName() const { return m_aOuterName;}
@@ -84,7 +84,4 @@ typedef std::map< sal_Int32, std::unique_ptr<const WrappedProperty> > tWrappedPr
} //namespace chart
-// INCLUDED_CHART2_SOURCE_INC_WRAPPEDPROPERTY_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/WrappedPropertySet.hxx b/chart2/source/inc/WrappedPropertySet.hxx
index 09c768fc75f0..dabc6e33c5c4 100644
--- a/chart2/source/inc/WrappedPropertySet.hxx
+++ b/chart2/source/inc/WrappedPropertySet.hxx
@@ -16,11 +16,10 @@
* 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_INC_WRAPPEDPROPERTYSET_HXX
-#define INCLUDED_CHART2_SOURCE_INC_WRAPPEDPROPERTYSET_HXX
+#pragma once
+#include <config_options.h>
#include "WrappedProperty.hxx"
-#include "MutexContainer.hxx"
#include "charttoolsdllapi.hxx"
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertyStates.hpp>
@@ -29,6 +28,7 @@
#include <cppuhelper/implbase.hxx>
#include <memory>
+#include <mutex>
#include <vector>
namespace cppu { class IPropertyArrayHelper; }
@@ -37,9 +37,8 @@ namespace cppu { class OPropertyArrayHelper; }
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedPropertySet :
- public MutexContainer
- , public ::cppu::WeakImplHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedPropertySet :
+ public ::cppu::WeakImplHelper
< css::beans::XPropertySet
, css::beans::XMultiPropertySet
, css::beans::XPropertyState
@@ -104,7 +103,9 @@ protected: //methods
const WrappedProperty* getWrappedProperty( const OUString& rOuterName );
const WrappedProperty* getWrappedProperty( sal_Int32 nHandle );
-protected: //member
+ std::mutex m_aMutex;
+
+private:
css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo;//outer PropertySetInfo
std::unique_ptr<::cppu::OPropertyArrayHelper> m_pPropertyArrayHelper;//holds all possible outer properties
@@ -120,7 +121,4 @@ protected: //member
} //namespace chart
-// INCLUDED_CHART2_SOURCE_INC_WRAPPEDPROPERTYSET_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/XMLRangeHelper.hxx b/chart2/source/inc/XMLRangeHelper.hxx
index 207770dbbed9..519c9b772271 100644
--- a/chart2/source/inc/XMLRangeHelper.hxx
+++ b/chart2/source/inc/XMLRangeHelper.hxx
@@ -16,16 +16,13 @@
* 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_INC_XMLRANGEHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_XMLRANGEHELPER_HXX
+#pragma once
#include <sal/types.h>
#include <rtl/ustring.hxx>
#include "charttoolsdllapi.hxx"
-namespace chart
-{
-namespace XMLRangeHelper
+namespace chart::XMLRangeHelper
{
struct OOO_DLLPUBLIC_CHARTTOOLS Cell
@@ -58,10 +55,6 @@ CellRange getCellRangeFromXMLString( const OUString & rXMLString );
OUString getXMLStringFromCellRange( const CellRange & rRange );
-} // namespace XMLRangeHelper
-} // namespace chart
-
-// INCLUDED_CHART2_SOURCE_INC_XMLRANGEHELPER_HXX
-#endif
+} // namespace chart::XMLRangeHelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/charttoolsdllapi.hxx b/chart2/source/inc/charttoolsdllapi.hxx
index 3a5b8144b770..96336e1012ae 100644
--- a/chart2/source/inc/charttoolsdllapi.hxx
+++ b/chart2/source/inc/charttoolsdllapi.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_INC_CHARTTOOLSDLLAPI_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CHARTTOOLSDLLAPI_HXX
+#pragma once
#include <sal/config.h>
@@ -30,6 +29,4 @@
#define OOO_DLLPUBLIC_CHARTTOOLS SAL_DLLPUBLIC_IMPORT
#endif
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/chartview/ChartSfxItemIds.hxx b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
index 2d02f2f8bd2b..a5099cc0c31a 100644
--- a/chart2/source/inc/chartview/ChartSfxItemIds.hxx
+++ b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
@@ -16,8 +16,7 @@
* 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_INC_CHARTVIEW_CHARTSFXITEMIDS_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_CHARTSFXITEMIDS_HXX
+#pragma once
#include <svl/typedwhich.hxx>
@@ -33,6 +32,7 @@ class SvxBrushItem;
class SvxChartKindErrorItem;
class SvxChartTextOrderItem;
class SvxChartRegressItem;
+class SdrAngleItem;
// SCHATTR
@@ -49,9 +49,11 @@ constexpr TypedWhichId<SfxStringItem> SCHATTR_DATADESCR_SEPARATOR
constexpr TypedWhichId<SfxInt32Item> SCHATTR_DATADESCR_PLACEMENT (SCHATTR_DATADESCR_START + 6);
constexpr TypedWhichId<SfxIntegerListItem> SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS (SCHATTR_DATADESCR_START + 7);
constexpr TypedWhichId<SfxBoolItem> SCHATTR_DATADESCR_NO_PERCENTVALUE (SCHATTR_DATADESCR_START + 8); //percentage values should not be offered
-constexpr TypedWhichId<SfxUInt32Item> SCHATTR_PERCENT_NUMBERFORMAT_VALUE (SCHATTR_DATADESCR_START + 9);
-constexpr TypedWhichId<SfxBoolItem> SCHATTR_PERCENT_NUMBERFORMAT_SOURCE (SCHATTR_DATADESCR_START + 10);
-constexpr sal_uInt16 SCHATTR_DATADESCR_END (SCHATTR_PERCENT_NUMBERFORMAT_SOURCE);
+constexpr TypedWhichId<SfxBoolItem> SCHATTR_DATADESCR_CUSTOM_LEADER_LINES (SCHATTR_DATADESCR_START + 9);
+constexpr TypedWhichId<SfxUInt32Item> SCHATTR_PERCENT_NUMBERFORMAT_VALUE (SCHATTR_DATADESCR_START + 10);
+constexpr TypedWhichId<SfxBoolItem> SCHATTR_PERCENT_NUMBERFORMAT_SOURCE (SCHATTR_DATADESCR_START + 11);
+constexpr TypedWhichId<SfxBoolItem> SCHATTR_DATADESCR_SHOW_DATA_SERIES_NAME (SCHATTR_DATADESCR_START + 12);
+constexpr sal_uInt16 SCHATTR_DATADESCR_END (SCHATTR_DATADESCR_SHOW_DATA_SERIES_NAME);
//legend
constexpr sal_uInt16 SCHATTR_LEGEND_START (SCHATTR_DATADESCR_END + 1);
@@ -62,7 +64,7 @@ constexpr sal_uInt16 SCHATTR_LEGEND_END (SCHATTR_LEGEND_N
//text
constexpr sal_uInt16 SCHATTR_TEXT_START (SCHATTR_LEGEND_END + 1);
-constexpr TypedWhichId<SfxInt32Item> SCHATTR_TEXT_DEGREES (SCHATTR_TEXT_START);
+constexpr TypedWhichId<SdrAngleItem> SCHATTR_TEXT_DEGREES (SCHATTR_TEXT_START);
constexpr TypedWhichId<SfxBoolItem> SCHATTR_TEXT_STACKED (SCHATTR_TEXT_START + 1);
constexpr sal_uInt16 SCHATTR_TEXT_END (SCHATTR_TEXT_STACKED);
@@ -161,7 +163,7 @@ constexpr TypedWhichId<SfxInt32Item> SCHATTR_NUM_OF_LINES_FOR_BAR
constexpr TypedWhichId<SfxInt32Item> SCHATTR_SPLINE_ORDER (SCHATTR_CHARTTYPE_START + 4);
constexpr TypedWhichId<SfxInt32Item> SCHATTR_SPLINE_RESOLUTION (SCHATTR_CHARTTYPE_START + 5);
constexpr TypedWhichId<SfxBoolItem> SCHATTR_GROUP_BARS_PER_AXIS (SCHATTR_CHARTTYPE_START + 6);
-constexpr TypedWhichId<SfxInt32Item> SCHATTR_STARTING_ANGLE (SCHATTR_CHARTTYPE_START + 7);
+constexpr TypedWhichId<SdrAngleItem> SCHATTR_STARTING_ANGLE (SCHATTR_CHARTTYPE_START + 7);
constexpr TypedWhichId<SfxBoolItem> SCHATTR_CLOCKWISE (SCHATTR_CHARTTYPE_START + 8);
constexpr TypedWhichId<SfxInt32Item> SCHATTR_MISSING_VALUE_TREATMENT (SCHATTR_CHARTTYPE_START + 9);
constexpr TypedWhichId<SfxIntegerListItem> SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS (SCHATTR_CHARTTYPE_START + 10);
@@ -189,9 +191,17 @@ constexpr TypedWhichId<SvxDoubleItem> SCHATTR_REGRESSION_INTERCEPT_VALUE
constexpr TypedWhichId<SfxStringItem> SCHATTR_REGRESSION_CURVE_NAME (SCHATTR_REGRESSION_START + 9);
constexpr TypedWhichId<SfxStringItem> SCHATTR_REGRESSION_XNAME (SCHATTR_REGRESSION_START + 10);
constexpr TypedWhichId<SfxStringItem> SCHATTR_REGRESSION_YNAME (SCHATTR_REGRESSION_START + 11);
-constexpr sal_uInt16 SCHATTR_REGRESSION_END (SCHATTR_REGRESSION_YNAME);
+constexpr TypedWhichId<SfxInt32Item> SCHATTR_REGRESSION_MOVING_TYPE (SCHATTR_REGRESSION_START + 12);
+constexpr sal_uInt16 SCHATTR_REGRESSION_END (SCHATTR_REGRESSION_MOVING_TYPE);
-constexpr sal_uInt16 SCHATTR_END (SCHATTR_REGRESSION_END);
+constexpr sal_uInt16 SCHATTR_DATA_TABLE_START (SCHATTR_REGRESSION_END + 1);
+constexpr TypedWhichId<SfxBoolItem> SCHATTR_DATA_TABLE_HORIZONTAL_BORDER (SCHATTR_DATA_TABLE_START + 0);
+constexpr TypedWhichId<SfxBoolItem> SCHATTR_DATA_TABLE_VERTICAL_BORDER (SCHATTR_DATA_TABLE_START + 1);
+constexpr TypedWhichId<SfxBoolItem> SCHATTR_DATA_TABLE_OUTLINE (SCHATTR_DATA_TABLE_START + 2);
+constexpr TypedWhichId<SfxBoolItem> SCHATTR_DATA_TABLE_KEYS (SCHATTR_DATA_TABLE_START + 3);
+constexpr sal_uInt16 SCHATTR_DATA_TABLE_END (SCHATTR_DATA_TABLE_KEYS);
+
+constexpr sal_uInt16 SCHATTR_END (SCHATTR_DATA_TABLE_END);
// values for Items
@@ -223,6 +233,4 @@ constexpr sal_uInt16 SCHATTR_END (SCHATTR_REGRESSION_END);
#define CHART_AXIS_SECONDARY_Y 4
#define CHART_AXIS_SECONDARY_X 5
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx b/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
index 203c3c390bd1..304b0f5a486f 100644
--- a/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
+++ b/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
@@ -17,29 +17,26 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_DATAPOINTSYMBOLSUPPLIER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_DATAPOINTSYMBOLSUPPLIER_HXX
+#pragma once
#include <chartview/chartviewdllapi.hxx>
-#include <com/sun/star/uno/Reference.h>
+#include <rtl/ref.hxx>
+#include <svx/unoshape.hxx>
namespace com::sun::star::drawing { class XShapes; }
namespace com::sun::star::drawing { struct Direction3D; }
-namespace com::sun::star::lang { class XMultiServiceFactory; }
namespace chart
{
-class OOO_DLLPUBLIC_CHARTVIEW DataPointSymbolSupplier
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) DataPointSymbolSupplier
{
public:
- static css::uno::Reference< css::drawing::XShapes >
- create2DSymbolList( const css::uno::Reference< css::lang::XMultiServiceFactory >& xShapeFactory
- , const css::uno::Reference< css::drawing::XShapes >& xTarget
+ static rtl::Reference< SvxShapeGroup >
+ create2DSymbolList( const rtl::Reference<SvxDrawPage>& xTarget
, const css::drawing::Direction3D& rSize );
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index bd9189dbff88..e555fb7ab021 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -16,11 +16,11 @@
* 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_INC_CHARTVIEW_DRAWMODELWRAPPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_DRAWMODELWRAPPER_HXX
+#pragma once
#include <svx/svdmodel.hxx>
-
+#include <svx/unopage.hxx>
+#include <svx/unoshape.hxx>
#include <chartview/chartviewdllapi.hxx>
namespace com::sun::star::lang { class XMultiServiceFactory; }
@@ -35,14 +35,12 @@ class SdrObject;
namespace chart
{
-class OOO_DLLPUBLIC_CHARTVIEW DrawModelWrapper : private SdrModel
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) DrawModelWrapper final : private SdrModel
{
private:
- SfxItemPool* m_pChartItemPool;
-
- css::uno::Reference< css::drawing::XDrawPage > m_xMainDrawPage;
- css::uno::Reference< css::drawing::XDrawPage > m_xHiddenDrawPage;
-
+ rtl::Reference<SvxDrawPage> m_xMainDrawPage;
+ rtl::Reference<SvxDrawPage> m_xHiddenDrawPage;
+ rtl::Reference<SfxItemPool> m_xChartItemPool;
VclPtr<OutputDevice> m_pRefDevice;
public:
@@ -52,14 +50,14 @@ public:
css::uno::Reference< css::lang::XMultiServiceFactory > getShapeFactory();
// the main page will contain the normal view objects
- css::uno::Reference< css::drawing::XDrawPage > const & getMainDrawPage();
+ const rtl::Reference<SvxDrawPage> & getMainDrawPage();
SAL_DLLPRIVATE void clearMainDrawPage();
// the extra page is not visible, but contains some extras like the symbols for data points
- css::uno::Reference< css::drawing::XDrawPage > const & getHiddenDrawPage();
+ const rtl::Reference<SvxDrawPage> & getHiddenDrawPage();
- static css::uno::Reference< css::drawing::XShapes >
- getChartRootShape( const css::uno::Reference< css::drawing::XDrawPage>& xPage );
+ static rtl::Reference<SvxShapeGroupAnyD>
+ getChartRootShape( const rtl::Reference<SvxDrawPage>& xPage );
SAL_DLLPRIVATE void lockControllers();
SAL_DLLPRIVATE void unlockControllers();
@@ -68,7 +66,7 @@ public:
SfxItemPool& GetItemPool();
- SAL_DLLPRIVATE virtual css::uno::Reference< css::uno::XInterface >
+ SAL_DLLPRIVATE virtual css::uno::Reference< css::frame::XModel >
createUnoModel() override;
SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel >
getUnoModel();
@@ -85,11 +83,10 @@ public:
SdrObject* getNamedSdrObject( const OUString& rName );
static SdrObject* getNamedSdrObject( const OUString& rName, SdrObjList const * pObjList );
- static bool removeShape( const css::uno::Reference< css::drawing::XShape >& xShape );
+ static bool removeShape( const rtl::Reference<SvxShape>& xShape );
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/chartview/ExplicitScaleValues.hxx b/chart2/source/inc/chartview/ExplicitScaleValues.hxx
index 731d4c087a91..07b8290cb7db 100644
--- a/chart2/source/inc/chartview/ExplicitScaleValues.hxx
+++ b/chart2/source/inc/chartview/ExplicitScaleValues.hxx
@@ -16,9 +16,9 @@
* 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_INC_CHARTVIEW_EXPLICITSCALEVALUES_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_EXPLICITSCALEVALUES_HXX
+#pragma once
+#include <config_options.h>
#include <chartview/chartviewdllapi.hxx>
#include <com/sun/star/chart/TimeInterval.hpp>
#include <com/sun/star/chart2/AxisOrientation.hpp>
@@ -26,15 +26,17 @@
#include <tools/date.hxx>
#include <vector>
-namespace com::sun::star::chart2 { class XScaling; }
+namespace com::sun::star::chart2
+{
+class XScaling;
+}
namespace chart
{
-
/** This structure contains the explicit values for a scale like Minimum and Maximum.
See also css::chart2::ScaleData.
*/
-struct OOO_DLLPUBLIC_CHARTVIEW ExplicitScaleData
+struct UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) ExplicitScaleData
{
ExplicitScaleData();
@@ -42,14 +44,14 @@ struct OOO_DLLPUBLIC_CHARTVIEW ExplicitScaleData
double Maximum;
double Origin;
- css::chart2::AxisOrientation Orientation;
+ css::chart2::AxisOrientation Orientation;
- css::uno::Reference< css::chart2::XScaling > Scaling;
+ css::uno::Reference<css::chart2::XScaling> Scaling;
- sal_Int32 AxisType;//see css::chart2::AxisType
- bool ShiftedCategoryPosition;
- sal_Int32 TimeResolution; //constant of type <type>css::chart::TimeUnit</type>
- Date NullDate;
+ sal_Int32 AxisType; //see css::chart2::AxisType
+ bool m_bShiftedCategoryPosition;
+ sal_Int32 TimeResolution; //constant of type <type>css::chart::TimeUnit</type>
+ Date NullDate;
};
struct ExplicitSubIncrement
@@ -72,14 +74,14 @@ struct ExplicitSubIncrement
/** describes how tickmarks are positioned on the scale of an axis.
*/
-struct OOO_DLLPUBLIC_CHARTVIEW ExplicitIncrementData
+struct UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) ExplicitIncrementData
{
ExplicitIncrementData();
/** the following two members are only for date-time axis
*/
- css::chart::TimeInterval MajorTimeInterval;
- css::chart::TimeInterval MinorTimeInterval;
+ css::chart::TimeInterval MajorTimeInterval;
+ css::chart::TimeInterval MinorTimeInterval;
/** the other members are for *not* date-time axis
*/
@@ -104,7 +106,7 @@ struct OOO_DLLPUBLIC_CHARTVIEW ExplicitIncrementData
<p><member>PostEquidistant</member> rules whether the <member>Distance</member>
is meant to be a value before or after scaling.</p>
*/
- double Distance;
+ double Distance;
/**
<member>PostEquidistant</member> rules whether the member <member>Distance</member>
@@ -116,7 +118,7 @@ struct OOO_DLLPUBLIC_CHARTVIEW ExplicitIncrementData
If <member>PostEquidistant</member> equals <FALSE/> <member>Distance</member>
is given in values before <type>XScaling</type> is applied.</p>
*/
- bool PostEquidistant;
+ bool PostEquidistant;
/** The <member>BaseValue</member> gives a starting point on the scale
to which all further main tickmarks are relatively positioned.
@@ -134,7 +136,7 @@ struct OOO_DLLPUBLIC_CHARTVIEW ExplicitIncrementData
And setting BaseValue to 2, -2, 4, -4 etc. in this example
leads to the same result as BaseValue=0.</p>
*/
- double BaseValue;
+ double BaseValue;
/** <member>SubIncrements</member> describes the positioning of further
sub tickmarks on the scale of an axis.
@@ -145,10 +147,9 @@ struct OOO_DLLPUBLIC_CHARTVIEW ExplicitIncrementData
positions of subsequent tickmarks in relation to their parent tickmarks
given by the preceding SubIncrement.</p>
*/
- std::vector< ExplicitSubIncrement > SubIncrements;
+ std::vector<ExplicitSubIncrement> SubIncrements;
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/chartview/ExplicitValueProvider.hxx b/chart2/source/inc/chartview/ExplicitValueProvider.hxx
index e2ff1e01a334..f4bc4aac874b 100644
--- a/chart2/source/inc/chartview/ExplicitValueProvider.hxx
+++ b/chart2/source/inc/chartview/ExplicitValueProvider.hxx
@@ -16,17 +16,16 @@
* 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_INC_CHARTVIEW_EXPLICITVALUEPROVIDER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_EXPLICITVALUEPROVIDER_HXX
+#pragma once
-#include <com/sun/star/awt/Rectangle.hpp>
+#include <config_options.h>
+#include <sal/types.h>
#include <chartview/chartviewdllapi.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
#include <memory>
-namespace chart { class ChartModel; }
-namespace chart { struct ExplicitIncrementData; }
-namespace chart { struct ExplicitScaleData; }
namespace com::sun::star::beans { class XPropertySet; }
namespace com::sun::star::chart2 { class XAxis; }
namespace com::sun::star::chart2 { class XChartDocument; }
@@ -38,12 +37,19 @@ namespace com::sun::star::uno { class XInterface; }
namespace com::sun::star::uno { template <typename > class Reference; }
namespace com::sun::star::uno { template <typename > class Sequence; }
namespace com::sun::star::util { class XNumberFormatsSupplier; }
+namespace com::sun::star::awt { struct Rectangle; }
+class SvxShape;
namespace chart
{
-
+class Axis;
+class BaseCoordinateSystem;
class DrawModelWrapper;
-class OOO_DLLPUBLIC_CHARTVIEW ExplicitValueProvider
+class ChartModel;
+struct ExplicitIncrementData;
+struct ExplicitScaleData;
+
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) SAL_LOPLUGIN_ANNOTATE("crosscast") ExplicitValueProvider
{
public:
/** Gives calculated scale and increment values for a given xAxis in the current view.
@@ -51,7 +57,7 @@ public:
If the given Axis could not be found or for another reason no correct output can be given false is returned.
*/
virtual bool getExplicitValuesForAxis(
- css::uno::Reference< css::chart2::XAxis > xAxis
+ rtl::Reference< ::chart::Axis > xAxis
, ExplicitScaleData& rExplicitScale
, ExplicitIncrementData& rExplicitIncrement )=0;
@@ -63,23 +69,21 @@ public:
virtual css::awt::Rectangle getDiagramRectangleExcludingAxes()=0;
- virtual css::uno::Reference< css::drawing::XShape >
+ virtual rtl::Reference< SvxShape >
getShapeForCID( const OUString& rObjectCID )=0;
virtual std::shared_ptr< DrawModelWrapper > getDrawModelWrapper() = 0;
- static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
-
static css::awt::Rectangle
AddSubtractAxisTitleSizes(
ChartModel& rModel
- , const css::uno::Reference< css::uno::XInterface >& xChartView
+ , ExplicitValueProvider* pChartView
, const css::awt::Rectangle& rPositionAndSize, bool bSubtract );
static sal_Int32 getExplicitNumberFormatKeyForAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const css::uno::Reference< css::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
- , const css::uno::Reference< css::chart2::XChartDocument>& xChartDoc);
+ const rtl::Reference< ::chart::Axis >& xAxis
+ , const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem
+ , const rtl::Reference<::chart::ChartModel>& xChartDoc);
static sal_Int32 getExplicitNumberFormatKeyForDataLabel(
const css::uno::Reference< css::beans::XPropertySet >& xSeriesOrPointProp );
@@ -89,10 +93,9 @@ public:
, const css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
protected:
- ~ExplicitValueProvider() {}
+ ~ExplicitValueProvider() = default;
};
} //namespace chart
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/chartview/chartviewdllapi.hxx b/chart2/source/inc/chartview/chartviewdllapi.hxx
index 2762104384f2..533a5cb8338e 100644
--- a/chart2/source/inc/chartview/chartviewdllapi.hxx
+++ b/chart2/source/inc/chartview/chartviewdllapi.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_CHARTVIEWDLLAPI_HXX
-#define INCLUDED_CHART2_SOURCE_INC_CHARTVIEW_CHARTVIEWDLLAPI_HXX
+#pragma once
#include <sal/config.h>
@@ -30,6 +29,4 @@
#define OOO_DLLPUBLIC_CHARTVIEW SAL_DLLPUBLIC_IMPORT
#endif
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/defines.hxx b/chart2/source/inc/defines.hxx
index 135afe44bbef..1eb464bc203a 100644
--- a/chart2/source/inc/defines.hxx
+++ b/chart2/source/inc/defines.hxx
@@ -17,11 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_INC_DEFINES_HXX
-#define INCLUDED_CHART2_SOURCE_INC_DEFINES_HXX
+#pragma once
-#define FIXED_SIZE_FOR_3D_CHART_VOLUME 10000.0
-
-#endif
+constexpr double FIXED_SIZE_FOR_3D_CHART_VOLUME = 10000.0;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/res_BarGeometry.hxx b/chart2/source/inc/res_BarGeometry.hxx
index 235c5f4fe5ca..9e0c01870f29 100644
--- a/chart2/source/inc/res_BarGeometry.hxx
+++ b/chart2/source/inc/res_BarGeometry.hxx
@@ -16,8 +16,7 @@
* 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_RES_BARGEOMETRY_HXX
-#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_RES_BARGEOMETRY_HXX
+#pragma once
#include <vcl/weld.hxx>
@@ -43,6 +42,4 @@ private:
} //namespace chart
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/servicenames.hxx b/chart2/source/inc/servicenames.hxx
index a63c0939321a..0f5cbe2b40f9 100644
--- a/chart2/source/inc/servicenames.hxx
+++ b/chart2/source/inc/servicenames.hxx
@@ -16,40 +16,38 @@
* 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_INC_SERVICENAMES_HXX
-#define INCLUDED_CHART2_SOURCE_INC_SERVICENAMES_HXX
+#pragma once
-namespace chart
-{
-#define CHART_MODEL_SERVICE_IMPLEMENTATION_NAME "com.sun.star.comp.chart2.ChartModel"
-#define CHART_MODEL_SERVICE_NAME "com.sun.star.chart2.ChartDocument"
-//@todo create your own service containing the service com.sun.star.document.OfficeDocument
+#include <rtl/ustring.hxx>
-#define CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME "com.sun.star.comp.chart2.ChartController"
-#define CHART_CONTROLLER_SERVICE_NAME "com.sun.star.chart2.ChartController"
-//@todo create your own service containing the service com.sun.star.frame.Controller
+inline constexpr OUString CHART_MODEL_SERVICE_IMPLEMENTATION_NAME
+ = u"com.sun.star.comp.chart2.ChartModel"_ustr;
+inline constexpr OUString CHART_MODEL_SERVICE_NAME = u"com.sun.star.chart2.ChartDocument"_ustr;
+//@todo create your own service containing the service com.sun.star.document.OfficeDocument
-#define CHART_VIEW_SERVICE_IMPLEMENTATION_NAME "com.sun.star.comp.chart2.ChartView"
-#define CHART_VIEW_SERVICE_NAME "com.sun.star.chart2.ChartView"
+inline constexpr OUString CHART_VIEW_SERVICE_IMPLEMENTATION_NAME
+ = u"com.sun.star.comp.chart2.ChartView"_ustr;
+inline constexpr OUString CHART_VIEW_SERVICE_NAME = u"com.sun.star.chart2.ChartView"_ustr;
-#define CHART_FRAMELOADER_SERVICE_IMPLEMENTATION_NAME "com.sun.star.comp.chart2.ChartFrameLoader"
-#define CHART_FRAMELOADER_SERVICE_NAME "com.sun.star.frame.SynchronousFrameLoader"
+inline constexpr OUString CHART_FRAMELOADER_SERVICE_IMPLEMENTATION_NAME
+ = u"com.sun.star.comp.chart2.ChartFrameLoader"_ustr;
+inline constexpr OUString CHART_FRAMELOADER_SERVICE_NAME
+ = u"com.sun.star.frame.SynchronousFrameLoader"_ustr;
-#define CHART_WIZARD_DIALOG_SERVICE_IMPLEMENTATION_NAME "com.sun.star.comp.chart2.WizardDialog"
-#define CHART_WIZARD_DIALOG_SERVICE_NAME "com.sun.star.chart2.WizardDialog"
+inline constexpr OUString CHART_WIZARD_DIALOG_SERVICE_IMPLEMENTATION_NAME
+ = u"com.sun.star.comp.chart2.WizardDialog"_ustr;
+inline constexpr OUString CHART_WIZARD_DIALOG_SERVICE_NAME
+ = u"com.sun.star.chart2.WizardDialog"_ustr;
-#define CHART_TYPE_DIALOG_SERVICE_IMPLEMENTATION_NAME "com.sun.star.comp.chart2.ChartTypeDialog"
-#define CHART_TYPE_DIALOG_SERVICE_NAME "com.sun.star.chart2.ChartTypeDialog"
+inline constexpr OUString CHART_TYPE_DIALOG_SERVICE_IMPLEMENTATION_NAME
+ = u"com.sun.star.comp.chart2.ChartTypeDialog"_ustr;
+inline constexpr OUString CHART_TYPE_DIALOG_SERVICE_NAME
+ = u"com.sun.star.chart2.ChartTypeDialog"_ustr;
// wrapper for old UNO API (com.sun.star.chart)
-#define CHART_CHARTAPIWRAPPER_IMPLEMENTATION_NAME "com.sun.star.comp.chart2.ChartDocumentWrapper"
-#define CHART_CHARTAPIWRAPPER_SERVICE_NAME "com.sun.star.chart2.ChartDocumentWrapper"
-
-// accessibility
-#define CHART_ACCESSIBLE_TEXT_SERVICE_NAME "com.sun.star.accessibility.AccessibleTextComponent"
-
-} //namespace chart
-
-#endif
+inline constexpr OUString CHART_CHARTAPIWRAPPER_IMPLEMENTATION_NAME
+ = u"com.sun.star.comp.chart2.ChartDocumentWrapper"_ustr;
+inline constexpr OUString CHART_CHARTAPIWRAPPER_SERVICE_NAME
+ = u"com.sun.star.chart2.ChartDocumentWrapper"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/servicenames_charttypes.hxx b/chart2/source/inc/servicenames_charttypes.hxx
index 9a1ee83db019..5ab2dcbf4929 100644
--- a/chart2/source/inc/servicenames_charttypes.hxx
+++ b/chart2/source/inc/servicenames_charttypes.hxx
@@ -16,24 +16,29 @@
* 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_INC_SERVICENAMES_CHARTTYPES_HXX
-#define INCLUDED_CHART2_SOURCE_INC_SERVICENAMES_CHARTTYPES_HXX
+#pragma once
-namespace chart {
+#include <rtl/ustring.hxx>
-#define CHART2_SERVICE_NAME_CHARTTYPE_AREA "com.sun.star.chart2.AreaChartType"
-#define CHART2_SERVICE_NAME_CHARTTYPE_BAR "com.sun.star.chart2.BarChartType"
-#define CHART2_SERVICE_NAME_CHARTTYPE_COLUMN "com.sun.star.chart2.ColumnChartType"
-#define CHART2_SERVICE_NAME_CHARTTYPE_LINE "com.sun.star.chart2.LineChartType"
-#define CHART2_SERVICE_NAME_CHARTTYPE_SCATTER "com.sun.star.chart2.ScatterChartType"
-#define CHART2_SERVICE_NAME_CHARTTYPE_PIE "com.sun.star.chart2.PieChartType"
-#define CHART2_SERVICE_NAME_CHARTTYPE_NET "com.sun.star.chart2.NetChartType"
-#define CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET "com.sun.star.chart2.FilledNetChartType"
-#define CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK "com.sun.star.chart2.CandleStickChartType"
-#define CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE "com.sun.star.chart2.BubbleChartType"
-
-} //namespace chart
-
-#endif
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_AREA
+ = u"com.sun.star.chart2.AreaChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_BAR
+ = u"com.sun.star.chart2.BarChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_COLUMN
+ = u"com.sun.star.chart2.ColumnChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_LINE
+ = u"com.sun.star.chart2.LineChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_SCATTER
+ = u"com.sun.star.chart2.ScatterChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_PIE
+ = u"com.sun.star.chart2.PieChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_NET
+ = u"com.sun.star.chart2.NetChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET
+ = u"com.sun.star.chart2.FilledNetChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK
+ = u"com.sun.star.chart2.CandleStickChartType"_ustr;
+inline constexpr OUString CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE
+ = u"com.sun.star.chart2.BubbleChartType"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/servicenames_coosystems.hxx b/chart2/source/inc/servicenames_coosystems.hxx
index 17648619948b..065155a8bb37 100644
--- a/chart2/source/inc/servicenames_coosystems.hxx
+++ b/chart2/source/inc/servicenames_coosystems.hxx
@@ -16,16 +16,11 @@
* 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_INC_SERVICENAMES_COOSYSTEMS_HXX
-#define INCLUDED_CHART2_SOURCE_INC_SERVICENAMES_COOSYSTEMS_HXX
+#pragma once
-namespace chart
-{
+#include <rtl/ustring.hxx>
-#define CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME "com.sun.star.chart2.CoordinateSystems.CartesianView"
-#define CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME "com.sun.star.chart2.CoordinateSystems.PolarView"
-
-} //namespace chart
-#endif
+inline constexpr OUString CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.CartesianView"_ustr;
+inline constexpr OUString CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.PolarView"_ustr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */