summaryrefslogtreecommitdiffstats
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.hxx134
-rw-r--r--chart2/source/inc/BaseCoordinateSystem.hxx21
-rw-r--r--chart2/source/inc/BaseGFXHelper.hxx23
-rw-r--r--chart2/source/inc/CachedDataSequence.hxx12
-rw-r--r--chart2/source/inc/CharacterProperties.hxx8
-rw-r--r--chart2/source/inc/ChartModelHelper.hxx46
-rw-r--r--chart2/source/inc/ChartResourceGroups.hxx9
-rw-r--r--chart2/source/inc/ChartType.hxx162
-rw-r--r--chart2/source/inc/ChartTypeDialogController.hxx4
-rw-r--r--chart2/source/inc/ChartTypeHelper.hxx75
-rw-r--r--chart2/source/inc/ChartTypeTemplate.hxx119
-rw-r--r--chart2/source/inc/ChartViewHelper.hxx23
-rw-r--r--chart2/source/inc/CloneHelper.hxx12
-rw-r--r--chart2/source/inc/ColorPerPointHelper.hxx9
-rw-r--r--chart2/source/inc/CommonConverters.hxx21
-rw-r--r--chart2/source/inc/CommonFunctors.hxx4
-rw-r--r--chart2/source/inc/ConfigColorScheme.hxx3
-rw-r--r--chart2/source/inc/ControllerLockGuard.hxx17
-rw-r--r--chart2/source/inc/DataInterpreter.hxx154
-rw-r--r--chart2/source/inc/DataSeries.hxx190
-rw-r--r--chart2/source/inc/DataSeriesHelper.hxx140
-rw-r--r--chart2/source/inc/DataSeriesProperties.hxx (renamed from chart2/source/inc/TrueGuard.hxx)38
-rw-r--r--chart2/source/inc/DataSource.hxx9
-rw-r--r--chart2/source/inc/DataSourceHelper.hxx39
-rw-r--r--chart2/source/inc/DataTable.hxx87
-rw-r--r--chart2/source/inc/Diagram.hxx244
-rw-r--r--chart2/source/inc/DiagramHelper.hxx227
-rw-r--r--chart2/source/inc/DisposeHelper.hxx2
-rw-r--r--chart2/source/inc/ErrorBar.hxx8
-rw-r--r--chart2/source/inc/EventListenerHelper.hxx10
-rw-r--r--chart2/source/inc/ExplicitCategoriesProvider.hxx23
-rw-r--r--chart2/source/inc/FillProperties.hxx4
-rw-r--r--chart2/source/inc/FormattedString.hxx142
-rw-r--r--chart2/source/inc/FormattedStringHelper.hxx13
-rw-r--r--chart2/source/inc/GridProperties.hxx98
-rw-r--r--chart2/source/inc/InternalDataProvider.hxx3
-rw-r--r--chart2/source/inc/LabeledDataSequence.hxx14
-rw-r--r--chart2/source/inc/Legend.hxx106
-rw-r--r--chart2/source/inc/LegendHelper.hxx12
-rw-r--r--chart2/source/inc/LifeTime.hxx56
-rw-r--r--chart2/source/inc/LinePropertiesHelper.hxx4
-rw-r--r--chart2/source/inc/MediaDescriptorHelper.hxx3
-rw-r--r--chart2/source/inc/ModifyListenerCallBack.hxx3
-rw-r--r--chart2/source/inc/ModifyListenerHelper.hxx75
-rw-r--r--chart2/source/inc/NameContainer.hxx1
-rw-r--r--chart2/source/inc/NumberFormatterWrapper.hxx3
-rw-r--r--chart2/source/inc/OPropertySet.hxx49
-rw-r--r--chart2/source/inc/ObjectIdentifier.hxx109
-rw-r--r--chart2/source/inc/PopupRequest.hxx3
-rw-r--r--chart2/source/inc/PropertyHelper.hxx17
-rw-r--r--chart2/source/inc/RangeHighlighter.hxx8
-rw-r--r--chart2/source/inc/ReferenceSizeProvider.hxx10
-rw-r--r--chart2/source/inc/RegressionCurveCalculator.hxx44
-rw-r--r--chart2/source/inc/RegressionCurveHelper.hxx96
-rw-r--r--chart2/source/inc/RegressionCurveModel.hxx242
-rw-r--r--chart2/source/inc/RelativePositionHelper.hxx3
-rw-r--r--chart2/source/inc/RelativeSizeHelper.hxx3
-rw-r--r--chart2/source/inc/SceneProperties.hxx5
-rw-r--r--chart2/source/inc/StatisticsHelper.hxx38
-rw-r--r--chart2/source/inc/ThreeDHelper.hxx53
-rw-r--r--chart2/source/inc/Title.hxx109
-rw-r--r--chart2/source/inc/TitleHelper.hxx42
-rw-r--r--chart2/source/inc/UncachedDataSequence.hxx22
-rw-r--r--chart2/source/inc/UserDefinedProperties.hxx3
-rw-r--r--chart2/source/inc/WeakListenerAdapter.hxx17
-rw-r--r--chart2/source/inc/WrappedDefaultProperty.hxx4
-rw-r--r--chart2/source/inc/WrappedDirectStateProperty.hxx2
-rw-r--r--chart2/source/inc/WrappedIgnoreProperty.hxx4
-rw-r--r--chart2/source/inc/WrappedProperty.hxx5
-rw-r--r--chart2/source/inc/WrappedPropertySet.hxx12
-rw-r--r--chart2/source/inc/chartview/ChartSfxItemIds.hxx11
-rw-r--r--chart2/source/inc/chartview/DataPointSymbolSupplier.hxx2
-rw-r--r--chart2/source/inc/chartview/DrawModelWrapper.hxx6
-rw-r--r--chart2/source/inc/chartview/ExplicitScaleValues.hxx5
-rw-r--r--chart2/source/inc/chartview/ExplicitValueProvider.hxx33
-rw-r--r--chart2/source/inc/defines.hxx2
-rw-r--r--chart2/source/inc/servicenames.hxx54
-rw-r--r--chart2/source/inc/servicenames_charttypes.hxx40
-rw-r--r--chart2/source/inc/servicenames_coosystems.hxx4
80 files changed, 2565 insertions, 1047 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 abe9ee1e257e..f39e54c1fc00 100644
--- a/chart2/source/inc/AxisHelper.hxx
+++ b/chart2/source/inc/AxisHelper.hxx
@@ -18,9 +18,11 @@
*/
#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,9 +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();
@@ -53,152 +58,151 @@ 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 rtl::Reference< ::chart::BaseCoordinateSystem >
getCoordinateSystemByIndex(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram
+ const rtl::Reference< ::chart::Diagram >& xDiagram
, sal_Int32 nIndex );
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 getAxisOrGridExistence( css::uno::Sequence< sal_Bool >& rExistenceList
- , const css::uno::Reference< css::chart2::XDiagram>& xDiagram, bool bAxis=true );
+ , 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();
};
diff --git a/chart2/source/inc/BaseCoordinateSystem.hxx b/chart2/source/inc/BaseCoordinateSystem.hxx
index 4cfa7ab42c80..71f226abcd51 100644
--- a/chart2/source/inc/BaseCoordinateSystem.hxx
+++ b/chart2/source/inc/BaseCoordinateSystem.hxx
@@ -19,7 +19,6 @@
#pragma once
#include "OPropertySet.hxx"
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -27,12 +26,13 @@
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/util/XCloneable.hpp>
#include "ModifyListenerHelper.hxx"
-#include "charttoolsdllapi.hxx"
#include <vector>
namespace chart
{
+class Axis;
+class ChartType;
namespace impl
{
@@ -48,7 +48,6 @@ typedef ::cppu::WeakImplHelper
class SAL_DLLPUBLIC_RTTI BaseCoordinateSystem :
public impl::BaseCoordinateSystem_Base,
- public cppu::BaseMutex,
public ::property::OPropertySet
{
public:
@@ -87,7 +86,7 @@ public:
const css::uno::Reference< css::chart2::XChartType >& aChartType ) override;
virtual css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > > SAL_CALL getChartTypes() override;
virtual void SAL_CALL setChartTypes(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aChartTypes ) override;
+ const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > >& aChartTypes ) final override;
// ____ XModifyBroadcaster ____
virtual void SAL_CALL addModifyListener(
@@ -95,6 +94,12 @@ public:
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 ____
@@ -111,14 +116,12 @@ protected:
void fireModifyEvent();
-protected:
- rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
-
private:
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
sal_Int32 m_nDimensionCount;
- typedef std::vector< std::vector< css::uno::Reference< css::chart2::XAxis > > > tAxisVecVecType;
+ 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< css::uno::Reference< css::chart2::XChartType > > m_aChartTypes;
+ std::vector< rtl::Reference<::chart::ChartType > > m_aChartTypes;
};
} // namespace chart
diff --git a/chart2/source/inc/BaseGFXHelper.hxx b/chart2/source/inc/BaseGFXHelper.hxx
index fd24fa2b45b6..4ba4a65c8250 100644
--- a/chart2/source/inc/BaseGFXHelper.hxx
+++ b/chart2/source/inc/BaseGFXHelper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include <basegfx/matrix/b3dhommatrix.hxx>
#include <basegfx/range/b2irectangle.hxx>
#include <basegfx/tuple/b3dtuple.hxx>
@@ -36,22 +37,24 @@ namespace com::sun::star::drawing { struct PolyPolygonShape3D; }
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 );
-OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DRange getBoundVolume( const std::vector<std::vector<css::drawing::Position3D>>& 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 );
@@ -64,17 +67,17 @@ 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 );
diff --git a/chart2/source/inc/CachedDataSequence.hxx b/chart2/source/inc/CachedDataSequence.hxx
index e9c1b9d50d25..513907c2429d 100644
--- a/chart2/source/inc/CachedDataSequence.hxx
+++ b/chart2/source/inc/CachedDataSequence.hxx
@@ -19,10 +19,9 @@
#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
@@ -41,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,
@@ -56,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
{
@@ -93,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;
diff --git a/chart2/source/inc/CharacterProperties.hxx b/chart2/source/inc/CharacterProperties.hxx
index 4dd7a4fbd113..40367f9b943d 100644
--- a/chart2/source/inc/CharacterProperties.hxx
+++ b/chart2/source/inc/CharacterProperties.hxx
@@ -120,14 +120,14 @@ 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 );
}
diff --git a/chart2/source/inc/ChartModelHelper.hxx b/chart2/source/inc/ChartModelHelper.hxx
index dfe864eeb0d4..ec904ce8a7be 100644
--- a/chart2/source/inc/ChartModelHelper.hxx
+++ b/chart2/source/inc/ChartModelHelper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include <com/sun/star/awt/Size.hpp>
#include "charttoolsdllapi.hxx"
#include <rtl/ref.hxx>
@@ -38,57 +39,38 @@ 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 css::uno::Reference< css::chart2::XChartDocument >& xChartDoc, bool bConnectToModel );
-
- static rtl::Reference< Diagram >
- findDiagram( const css::uno::Reference< css::frame::XModel >& xModel );
-
- static rtl::Reference< Diagram >
- findDiagram( const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc );
-
- static rtl::Reference< Diagram >
- findDiagram( const rtl::Reference<::chart::ChartModel>& xChartDoc );
+ const rtl::Reference<::chart::ChartModel>& xChartDoc, bool bConnectToModel );
static rtl::Reference< ::chart::BaseCoordinateSystem >
- getFirstCoordinateSystem( ChartModel& rModel );
+ getFirstCoordinateSystem( const rtl::Reference<::chart::ChartModel>& xModel );
- static rtl::Reference< ::chart::BaseCoordinateSystem >
- 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 std::vector< css::uno::Reference< css::chart2::XDataSeries > >
+ static std::vector< rtl::Reference< ::chart::DataSeries > >
getDataSeries( const rtl::Reference< ::chart::ChartModel > & 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
diff --git a/chart2/source/inc/ChartResourceGroups.hxx b/chart2/source/inc/ChartResourceGroups.hxx
index 8c263a7a6a75..ecb886f194af 100644
--- a/chart2/source/inc/ChartResourceGroups.hxx
+++ b/chart2/source/inc/ChartResourceGroups.hxx
@@ -27,7 +27,6 @@
namespace chart
{
using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
class SplinePropertiesDialog;
class SteppedPropertiesDialog;
@@ -113,16 +112,16 @@ 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 final : public ChangingResource
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 a027c99d7ac5..4c03ff269e1f 100644
--- a/chart2/source/inc/ChartTypeDialogController.hxx
+++ b/chart2/source/inc/ChartTypeDialogController.hxx
@@ -37,10 +37,6 @@ namespace com::sun::star::chart2
{
class XChartDocument;
}
-namespace com::sun::star::chart2
-{
-class XChartTypeTemplate;
-}
namespace com::sun::star::lang
{
class XMultiServiceFactory;
diff --git a/chart2/source/inc/ChartTypeHelper.hxx b/chart2/source/inc/ChartTypeHelper.hxx
index d4917be283fb..7366e4689773 100644
--- a/chart2/source/inc/ChartTypeHelper.hxx
+++ b/chart2/source/inc/ChartTypeHelper.hxx
@@ -19,67 +19,72 @@
#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 shiftCategoryPosAtXAxisPerDefault( const css::uno::Reference< css::chart2::XChartType >& xChartType );
+ 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
diff --git a/chart2/source/inc/ChartTypeTemplate.hxx b/chart2/source/inc/ChartTypeTemplate.hxx
index 560fc32fd167..ffd7cca26599 100644
--- a/chart2/source/inc/ChartTypeTemplate.hxx
+++ b/chart2/source/inc/ChartTypeTemplate.hxx
@@ -19,18 +19,31 @@
#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
@@ -66,45 +79,69 @@ namespace chart
* create an XLegend via the global service factory, set it at the diagram.
*/
-class SAL_DLLPUBLIC_RTTI ChartTypeTemplate : public ::cppu::WeakImplHelper<
+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,
- const OUString & rServiceName );
+ 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;
+ 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;
+ 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;
+ 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;
- // still abstract: getChartTypeForNewSeries()
- virtual css::uno::Reference< css::chart2::XDataInterpreter > SAL_CALL getDataInterpreter() override;
+ 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;
+ ::sal_Int32 nSeriesCount ) override final;
virtual void SAL_CALL resetStyles(
- const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
+ 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 css::uno::Reference< css::chart2::XDiagram >& xDiagram );
+ const rtl::Reference< ::chart::Diagram >& xDiagram );
// ____ XServiceName ____
virtual OUString SAL_CALL getServiceName() override;
@@ -124,7 +161,7 @@ public:
*/
virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const;
- virtual css::uno::Reference< css::chart2::XChartType >
+ virtual rtl::Reference< ::chart::ChartType >
getChartTypeForIndex( sal_Int32 nChartTypeIndex ) = 0;
virtual bool isSwapXAndY() const;
@@ -137,7 +174,7 @@ public:
changeDiagram
*/
virtual void adaptDiagram(
- const css::uno::Reference< css::chart2::XDiagram > & xDiagram );
+ 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
@@ -147,7 +184,7 @@ public:
<p>The dimension depends on the value returned by getDimension().</p>
*/
virtual void createCoordinateSystems(
- const css::uno::Reference< css::chart2::XCoordinateSystemContainer > & xOutCooSysCnt );
+ 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.
@@ -155,7 +192,7 @@ public:
<p>Called by FillDiagram.</p>
*/
virtual void adaptScales(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XCoordinateSystem > > & aCooSysSeq,
+ 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.
@@ -184,16 +221,14 @@ public:
empty.</p>
*/
virtual void createChartTypes(
- const css::uno::Sequence<
- css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XDataSeries > > > & aSeriesSeq,
- const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XCoordinateSystem > > & rCoordSys,
- const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XChartType > > & aOldChartTypesSeq
+ 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
@@ -205,7 +240,7 @@ public:
requesting a secondary axes a secondary y axes is added</p>
*/
void createAxes(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XCoordinateSystem > > & rCoordSys );
+ const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > & rCoordSys );
/** Give the number of requested axis per dimension here. Default is one
axis for each dimension
@@ -215,18 +250,18 @@ public:
/** adapt properties of existing axes and remove superfluous axes
*/
virtual void adaptAxes(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XCoordinateSystem > > & rCoordSys );
+ const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > & rCoordSys );
const css::uno::Reference< css::uno::XComponentContext >&
GetComponentContext() const { return m_xContext;}
static void copyPropertiesFromOldToNewCoordinateSystem(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XChartType > > & rOldChartTypesSeq,
- const css::uno::Reference< css::chart2::XChartType > & xNewChartType );
+ const std::vector< rtl::Reference< ChartType > > & rOldChartTypesSeq,
+ const rtl::Reference< ChartType > & xNewChartType );
protected:
css::uno::Reference< css::uno::XComponentContext > m_xContext;
- mutable css::uno::Reference< css::chart2::XDataInterpreter > m_xDataInterpreter;
+ mutable rtl::Reference< ::chart::DataInterpreter > m_xDataInterpreter;
private:
const OUString m_aServiceName;
@@ -234,17 +269,13 @@ private:
private:
/** modifies the given diagram
*/
- void FillDiagram( const css::uno::Reference<
- css::chart2::XDiagram > & xDiagram,
- const css::uno::Sequence<
- css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XDataSeries > > > & aSeriesSeq,
- const css::uno::Reference<
- css::chart2::data::XLabeledDataSequence >& xCategories,
- const css::uno::Sequence<
- css::uno::Reference<
- css::chart2::XChartType > > & aOldChartTypesSeq);
+ 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
diff --git a/chart2/source/inc/ChartViewHelper.hxx b/chart2/source/inc/ChartViewHelper.hxx
index 54d23e8107a0..0ffe60220f60 100644
--- a/chart2/source/inc/ChartViewHelper.hxx
+++ b/chart2/source/inc/ChartViewHelper.hxx
@@ -18,23 +18,28 @@
*/
#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
+#include <com/sun/star/uno/Reference.hxx>
+
+namespace com::sun::star::chart2
{
-class XModel;
+class XChartDocument;
}
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS ChartViewHelper
+class ChartModel;
+
+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
diff --git a/chart2/source/inc/CloneHelper.hxx b/chart2/source/inc/CloneHelper.hxx
index d9771a2681f2..cabcdb58366f 100644
--- a/chart2/source/inc/CloneHelper.hxx
+++ b/chart2/source/inc/CloneHelper.hxx
@@ -19,8 +19,7 @@
#pragma once
#include <com/sun/star/util/XCloneable.hpp>
-
-#include <algorithm>
+#include <rtl/ref.hxx>
#include <iterator>
#include <vector>
@@ -54,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(
diff --git a/chart2/source/inc/ColorPerPointHelper.hxx b/chart2/source/inc/ColorPerPointHelper.hxx
index f1665123b800..575019e9bbb2 100644
--- a/chart2/source/inc/ColorPerPointHelper.hxx
+++ b/chart2/source/inc/ColorPerPointHelper.hxx
@@ -19,19 +19,22 @@
#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
);
@@ -39,7 +42,7 @@ 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 );
};
diff --git a/chart2/source/inc/CommonConverters.hxx b/chart2/source/inc/CommonConverters.hxx
index d10bf91984c8..c6dc7b2ecd1d 100644
--- a/chart2/source/inc/CommonConverters.hxx
+++ b/chart2/source/inc/CommonConverters.hxx
@@ -133,7 +133,7 @@ basegfx::B2DPolyPolygon PolyToB2DPolyPolygon(
*/
OOO_DLLPUBLIC_CHARTTOOLS
void appendPointSequence( css::drawing::PointSequenceSequence& rTarget
- , css::drawing::PointSequenceSequence& rAdd );
+ , const css::drawing::PointSequenceSequence& rAdd );
/** Position3D + Direction3D == Position3D
*/
@@ -179,25 +179,24 @@ 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 );
- auto aResultRange = asNonConstRange(aResult);
+ 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 )
- aResultRange[nCount] = aSeqSeq[nOuter][nInner];
+ aResult[nCount] = aSeqSeq[nOuter][nInner];
}
return aResult;
}
@@ -212,7 +211,7 @@ sal_Int16 getShortForLongAlso( const css::uno::Any& rAny );
OOO_DLLPUBLIC_CHARTTOOLS
bool replaceParamterInString( OUString & rInOutResourceString,
- const OUString & rParamToReplace,
+ std::u16string_view rParamToReplace,
std::u16string_view rReplaceWith );
} //namespace chart
diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx
index 0340c82b692e..7bb776490cda 100644
--- a/chart2/source/inc/CommonFunctors.hxx
+++ b/chart2/source/inc/CommonFunctors.hxx
@@ -39,7 +39,7 @@ template< typename T >
{
css::uno::Any operator() ( const T & aVal )
{
- return css::uno::makeAny( aVal );
+ return css::uno::Any( aVal );
}
};
@@ -91,7 +91,7 @@ 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 );
diff --git a/chart2/source/inc/ConfigColorScheme.hxx b/chart2/source/inc/ConfigColorScheme.hxx
index 0cf65d0307ec..fe73dc671bb6 100644
--- a/chart2/source/inc/ConfigColorScheme.hxx
+++ b/chart2/source/inc/ConfigColorScheme.hxx
@@ -24,7 +24,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <memory>
-#include <string_view>
namespace com::sun::star::uno { class XComponentContext; }
@@ -54,7 +53,7 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// ____ ConfigItemListener ____
- void notify( std::u16string_view rPropertyName );
+ void notify();
protected:
// ____ XColorScheme ____
diff --git a/chart2/source/inc/ControllerLockGuard.hxx b/chart2/source/inc/ControllerLockGuard.hxx
index c84e87af36ad..b9da29954a02 100644
--- a/chart2/source/inc/ControllerLockGuard.hxx
+++ b/chart2/source/inc/ControllerLockGuard.hxx
@@ -18,8 +18,9 @@
*/
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
-#include <com/sun/star/uno/Reference.h>
+#include <rtl/ref.hxx>
namespace chart
{
@@ -36,14 +37,14 @@ namespace chart
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
@@ -62,17 +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
@@ -80,7 +81,7 @@ 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);
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 bda6d4f0796c..2015398a7681 100644
--- a/chart2/source/inc/DataSeriesHelper.hxx
+++ b/chart2/source/inc/DataSeriesHelper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include "StackMode.hxx"
#include "charttoolsdllapi.hxx"
#include <com/sun/star/uno/Reference.h>
@@ -37,12 +38,17 @@ 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 { 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
@@ -54,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 );
@@ -68,110 +75,115 @@ 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
+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 );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+bool hasDataLabelsAtSeries( const rtl::Reference< ::chart::DataSeries >& xSeries );
-OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelsAtPoints( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+bool hasDataLabelsAtPoints( 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 hasDataLabelAtPoint( const rtl::Reference< ::chart::DataSeries >& xSeries, sal_Int32 nPointIndex );
-OOO_DLLPUBLIC_CHARTTOOLS void insertDataLabelsToSeriesAndAllPoints( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void insertDataLabelsToSeriesAndAllPoints( const rtl::Reference< ::chart::DataSeries >& xSeries );
-OOO_DLLPUBLIC_CHARTTOOLS void insertDataLabelToPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void insertDataLabelToPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
-OOO_DLLPUBLIC_CHARTTOOLS void deleteDataLabelsFromSeriesAndAllPoints( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void deleteDataLabelsFromSeriesAndAllPoints( const rtl::Reference< ::chart::DataSeries >& xSeries );
-OOO_DLLPUBLIC_CHARTTOOLS void deleteDataLabelsFromPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
+UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS)
+void deleteDataLabelsFromPoint( const css::uno::Reference< css::beans::XPropertySet >& xPointPropertySet );
} // namespace chart::DataSeriesHelper
diff --git a/chart2/source/inc/TrueGuard.hxx b/chart2/source/inc/DataSeriesProperties.hxx
index 528fd28fc265..7d36721ef066 100644
--- a/chart2/source/inc/TrueGuard.hxx
+++ b/chart2/source/inc/DataSeriesProperties.hxx
@@ -18,19 +18,31 @@
*/
#pragma once
-namespace chart
-{
-/** This guard sets the given boolean reference to true in the constructor and to false in the destructor
- */
-class TrueGuard final
+#include "PropertyHelper.hxx"
+#include "FastPropertyIdRanges.hxx"
+
+#include <vector>
+
+namespace com::sun::star::beans { struct Property; }
+
+namespace chart::DataSeriesProperties
{
-public:
- explicit TrueGuard(bool& rbTrueDuringGuardedTime);
- ~TrueGuard();
-
-private:
- bool& m_rbTrueDuringGuardedTime;
-};
-}
+ 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
+ };
+
+ void AddPropertiesToVector(
+ std::vector< css::beans::Property > & rOutProperties );
+
+ void AddDefaultsToMap( tPropertyValueMap & rOutMap );
+
+} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/DataSource.hxx b/chart2/source/inc/DataSource.hxx
index 56c740bc0d2c..9b976e439a66 100644
--- a/chart2/source/inc/DataSource.hxx
+++ b/chart2/source/inc/DataSource.hxx
@@ -18,15 +18,19 @@
*/
#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 final : public
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) DataSource final : public
::cppu::WeakImplHelper<
css::lang::XServiceInfo,
css::chart2::data::XDataSource,
@@ -36,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;
@@ -44,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;
diff --git a/chart2/source/inc/DataSourceHelper.hxx b/chart2/source/inc/DataSourceHelper.hxx
index 2c866091b21a..7b08cafc22a7 100644
--- a/chart2/source/inc/DataSourceHelper.hxx
+++ b/chart2/source/inc/DataSourceHelper.hxx
@@ -19,9 +19,11 @@
#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; }
@@ -34,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 >
@@ -74,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
@@ -101,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
@@ -115,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 );
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
index 5d6dc79a1ee1..62e9eeeac69a 100644
--- a/chart2/source/inc/Diagram.hxx
+++ b/chart2/source/inc/Diagram.hxx
@@ -19,28 +19,44 @@
#pragma once
#include "OPropertySet.hxx"
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XTitled.hpp>
#include <com/sun/star/chart/X3DDefaultSetter.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/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 Wall;
+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
{
@@ -56,13 +72,13 @@ typedef ::cppu::WeakImplHelper<
Diagram_Base;
}
-class OOO_DLLPUBLIC_CHARTTOOLS Diagram final :
- public cppu::BaseMutex,
- public impl::Diagram_Base,
- public ::property::OPropertySet
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) Diagram
+ final
+ : public impl::Diagram_Base
+ , public ::property::OPropertySet
{
public:
- Diagram( css::uno::Reference< css::uno::XComponentContext > const & xContext );
+ Diagram( css::uno::Reference< css::uno::XComponentContext > xContext );
virtual ~Diagram() override;
/// XServiceInfo declarations
@@ -88,7 +104,7 @@ public:
getPropertySetInfo() override;
// ____ XFastPropertySet ____
- virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const css::uno::Any& rValue ) override;
+ 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;
@@ -109,6 +125,9 @@ public:
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;
@@ -142,10 +161,192 @@ public:
std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > >
tCoordinateSystemContainerType;
- const tCoordinateSystemContainerType & getBaseCoordinateSystems() { return m_aCoordSystems; }
+ 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.
-private:
+ "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;
@@ -160,24 +361,19 @@ private:
void fireModifyEvent();
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
-
+ css::uno::Reference<css::uno::XComponentContext> m_xContext;
tCoordinateSystemContainerType m_aCoordSystems;
- rtl::Reference< Wall > m_xWall;
-
- rtl::Reference< Wall > m_xFloor;
+ rtl::Reference<Wall> m_xWall;
+ rtl::Reference<Wall> m_xFloor;
- css::uno::Reference< css::chart2::XTitle >
- m_xTitle;
-
- css::uno::Reference< css::chart2::XLegend >
- m_xLegend;
-
- css::uno::Reference< css::chart2::XColorScheme >
- m_xColorScheme;
+ css::uno::Reference<css::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
diff --git a/chart2/source/inc/DiagramHelper.hxx b/chart2/source/inc/DiagramHelper.hxx
index 57372a1c072e..eb9e4fd00792 100644
--- a/chart2/source/inc/DiagramHelper.hxx
+++ b/chart2/source/inc/DiagramHelper.hxx
@@ -20,18 +20,18 @@
#include "StackMode.hxx"
#include "charttoolsdllapi.hxx"
+#include "ChartTypeTemplate.hxx"
#include <com/sun/star/awt/Rectangle.hpp>
-#include <com/sun/star/chart2/XChartTypeTemplate.hpp>
#include <rtl/ref.hxx>
-#include <utility>
-#include <vector>
-
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,68 +40,18 @@ namespace com::sun::star::util { class XNumberFormatsSupplier; }
namespace chart
{
+class Axis;
+class BaseCoordinateSystem;
+class ChartType;
class ChartTypeManager;
class ChartTypeTemplate;
+class DataSeries;
+class Diagram;
+class LabeledDataSequence;
-enum DiagramPositioningMode
-{
- DiagramPositioningMode_AUTO,
- DiagramPositioningMode_EXCLUDING,
- DiagramPositioningMode_INCLUDING
-};
-
-class OOO_DLLPUBLIC_CHARTTOOLS DiagramHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) DiagramHelper
{
public:
- struct tTemplateWithServiceName {
- rtl::Reference< ::chart::ChartTypeTemplate > xChartTypeTemplate;
- OUString sServiceName;
- };
-
- /** 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 rtl::Reference< ::chart::ChartTypeManager > & 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.
@@ -113,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 );
@@ -207,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 );
-
- 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 );
+ SAL_DLLPRIVATE static bool areChartTypesCompatible(
+ const rtl::Reference< ::chart::ChartType >& xFirstType,
+ const rtl::Reference< ::chart::ChartType >& xSecondType );
- 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
diff --git a/chart2/source/inc/DisposeHelper.hxx b/chart2/source/inc/DisposeHelper.hxx
index 8c9b0b7d47f3..58dc2d5c55ba 100644
--- a/chart2/source/inc/DisposeHelper.hxx
+++ b/chart2/source/inc/DisposeHelper.hxx
@@ -33,7 +33,7 @@ template <class T> void Dispose(const T& xInterface)
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)
diff --git a/chart2/source/inc/ErrorBar.hxx b/chart2/source/inc/ErrorBar.hxx
index bf31ed364d72..939b95c739e8 100644
--- a/chart2/source/inc/ErrorBar.hxx
+++ b/chart2/source/inc/ErrorBar.hxx
@@ -18,7 +18,7 @@
*/
#pragma once
-#include <cppuhelper/basemutex.hxx>
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
#include <cppuhelper/implbase.hxx>
@@ -57,9 +57,7 @@ typedef ::cppu::WeakImplHelper<
ErrorBar_Base;
}
-class ErrorBar final :
- public cppu::BaseMutex,
- public impl::ErrorBar_Base
+class ErrorBar final : public impl::ErrorBar_Base
{
private:
OUString maDashName;
@@ -77,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
diff --git a/chart2/source/inc/EventListenerHelper.hxx b/chart2/source/inc/EventListenerHelper.hxx
index a042c006716d..dcf3256d46b5 100644
--- a/chart2/source/inc/EventListenerHelper.hxx
+++ b/chart2/source/inc/EventListenerHelper.hxx
@@ -20,7 +20,7 @@
#include <com/sun/star/lang/XComponent.hpp>
-#include <algorithm>
+#include <utility>
namespace com::sun::star::lang { class XEventListener; }
@@ -35,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 )
@@ -53,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 )
diff --git a/chart2/source/inc/ExplicitCategoriesProvider.hxx b/chart2/source/inc/ExplicitCategoriesProvider.hxx
index 63097a3aea11..73bc258c9922 100644
--- a/chart2/source/inc/ExplicitCategoriesProvider.hxx
+++ b/chart2/source/inc/ExplicitCategoriesProvider.hxx
@@ -18,11 +18,13 @@
*/
#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; }
@@ -33,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)
{}
};
@@ -52,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();
@@ -68,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 );
@@ -82,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();
@@ -93,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;
diff --git a/chart2/source/inc/FillProperties.hxx b/chart2/source/inc/FillProperties.hxx
index 84759cfa0ced..ce1c6d83629c 100644
--- a/chart2/source/inc/FillProperties.hxx
+++ b/chart2/source/inc/FillProperties.hxx
@@ -63,10 +63,10 @@ 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
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 45ce0b30142e..adc1f54802b8 100644
--- a/chart2/source/inc/FormattedStringHelper.hxx
+++ b/chart2/source/inc/FormattedStringHelper.hxx
@@ -18,24 +18,23 @@
*/
#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
+ static rtl::Reference< ::chart::FormattedString >
+ createFormattedString(
+ const OUString & rString
, const css::uno::Reference< css::beans::XPropertySet > & xTextProperties ) noexcept;
};
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/InternalDataProvider.hxx b/chart2/source/inc/InternalDataProvider.hxx
index 0fa2bdf8b855..a5032efcdab8 100644
--- a/chart2/source/inc/InternalDataProvider.hxx
+++ b/chart2/source/inc/InternalDataProvider.hxx
@@ -37,6 +37,7 @@ namespace com::sun::star::chart2 { class XChartDocument; }
namespace chart
{
+class ChartModel;
class UncachedDataSequence;
namespace impl
@@ -72,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 );
diff --git a/chart2/source/inc/LabeledDataSequence.hxx b/chart2/source/inc/LabeledDataSequence.hxx
index 811eb1997e49..aa37753695f9 100644
--- a/chart2/source/inc/LabeledDataSequence.hxx
+++ b/chart2/source/inc/LabeledDataSequence.hxx
@@ -18,12 +18,13 @@
*/
#pragma once
-#include <cppuhelper/basemutex.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 final :
- public cppu::BaseMutex,
+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(
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 d0f19ebb8385..c46131bd2bc4 100644
--- a/chart2/source/inc/LegendHelper.hxx
+++ b/chart2/source/inc/LegendHelper.hxx
@@ -18,7 +18,9 @@
*/
#pragma once
+#include <config_options.h>
#include <com/sun/star/uno/Reference.hxx>
+#include <rtl/ref.hxx>
#include "charttoolsdllapi.hxx"
namespace chart { class ChartModel; }
@@ -28,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 );
@@ -47,7 +51,7 @@ 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
diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx
index 613d92314f96..582d10086b78 100644
--- a/chart2/source/inc/LifeTime.hxx
+++ b/chart2/source/inc/LifeTime.hxx
@@ -18,24 +18,27 @@
*/
#pragma once
-#include <osl/mutex.hxx>
+#include <config_options.h>
+#include <mutex>
#include <osl/conditn.hxx>
-#include <comphelper/multicontainer2.hxx>
+#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();
@@ -44,25 +47,25 @@ public:
/// @throws css::uno::RuntimeException
bool dispose();
-public:
- ::comphelper::OMultiTypeInterfaceContainerHelper2 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;
};
@@ -96,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);
};
/*
@@ -178,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;
@@ -191,23 +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
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/LinePropertiesHelper.hxx b/chart2/source/inc/LinePropertiesHelper.hxx
index 2999de81a76f..efa5a6e6b847 100644
--- a/chart2/source/inc/LinePropertiesHelper.hxx
+++ b/chart2/source/inc/LinePropertiesHelper.hxx
@@ -48,10 +48,10 @@ namespace LinePropertiesHelper
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 );
diff --git a/chart2/source/inc/MediaDescriptorHelper.hxx b/chart2/source/inc/MediaDescriptorHelper.hxx
index cfef8fc14f68..46edb2657598 100644
--- a/chart2/source/inc/MediaDescriptorHelper.hxx
+++ b/chart2/source/inc/MediaDescriptorHelper.hxx
@@ -18,6 +18,7 @@
*/
#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>
@@ -43,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 );
diff --git a/chart2/source/inc/ModifyListenerCallBack.hxx b/chart2/source/inc/ModifyListenerCallBack.hxx
index 406804189e73..b1b704c86002 100644
--- a/chart2/source/inc/ModifyListenerCallBack.hxx
+++ b/chart2/source/inc/ModifyListenerCallBack.hxx
@@ -19,6 +19,7 @@
#pragma once
+#include <config_options.h>
#include <tools/link.hxx>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
@@ -32,7 +33,7 @@ without becoming a XModifyListener yourself
class ModifyListenerCallBack_impl;
-class OOO_DLLPUBLIC_CHARTTOOLS ModifyListenerCallBack final
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ModifyListenerCallBack final
{
public:
explicit ModifyListenerCallBack(const Link<void*, void>& rCallBack);
diff --git a/chart2/source/inc/ModifyListenerHelper.hxx b/chart2/source/inc/ModifyListenerHelper.hxx
index b65530d9f229..ee90d407a66f 100644
--- a/chart2/source/inc/ModifyListenerHelper.hxx
+++ b/chart2/source/inc/ModifyListenerHelper.hxx
@@ -75,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 )
@@ -93,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 )
@@ -111,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 )
@@ -129,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 )
@@ -157,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(
@@ -168,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,
@@ -178,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,
@@ -200,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,
@@ -210,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,
@@ -220,16 +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 chart::ModifyListenerHelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/NameContainer.hxx b/chart2/source/inc/NameContainer.hxx
index 66d0fde1a70f..12fc76978b0d 100644
--- a/chart2/source/inc/NameContainer.hxx
+++ b/chart2/source/inc/NameContainer.hxx
@@ -23,7 +23,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/util/XCloneable.hpp>
#include <cppuhelper/implbase.hxx>
-#include "charttoolsdllapi.hxx"
#include <map>
diff --git a/chart2/source/inc/NumberFormatterWrapper.hxx b/chart2/source/inc/NumberFormatterWrapper.hxx
index c3412fc9c91c..aff249d84f33 100644
--- a/chart2/source/inc/NumberFormatterWrapper.hxx
+++ b/chart2/source/inc/NumberFormatterWrapper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <tools/date.hxx>
@@ -28,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 );
diff --git a/chart2/source/inc/OPropertySet.hxx b/chart2/source/inc/OPropertySet.hxx
index 0a810fc6d2d8..0dd19a236e8a 100644
--- a/chart2/source/inc/OPropertySet.hxx
+++ b/chart2/source/inc/OPropertySet.hxx
@@ -18,7 +18,10 @@
*/
#pragma once
+
+#include <config_options.h>
// helper classes
+#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/propshlp.hxx>
// interfaces and types
@@ -28,12 +31,13 @@
#include <com/sun/star/style/XStyleSupplier.hpp>
#include "charttoolsdllapi.hxx"
-#include <map>
+#include <unordered_map>
namespace property
{
-class SAL_DLLPUBLIC_RTTI OPropertySet :
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OPropertySet :
+ protected cppu::BaseMutex,
public ::cppu::OBroadcastHelper,
// includes beans::XPropertySet, XMultiPropertySet and XFastPropertySet
public ::cppu::OPropertySetHelper,
@@ -45,11 +49,11 @@ class SAL_DLLPUBLIC_RTTI 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();
@@ -103,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.
@@ -136,15 +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,36 +162,35 @@ public:
// ____ 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;
- OOO_DLLPUBLIC_CHARTTOOLS
+ 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
@@ -222,12 +225,8 @@ private:
bool SetStyle( const css::uno::Reference< css::style::XStyle > & xStyle );
- /// reference to mutex of class deriving from here
- ::osl::Mutex & m_rMutex;
-
bool m_bSetNewValuesExplicitlyEvenIfTheyEqualDefault;
- typedef std::map< sal_Int32, css::uno::Any > tPropertyMap;
- tPropertyMap m_aProperties;
+ std::unordered_map< sal_Int32, css::uno::Any > m_aProperties;
css::uno::Reference< css::style::XStyle > m_xStyle;
};
diff --git a/chart2/source/inc/ObjectIdentifier.hxx b/chart2/source/inc/ObjectIdentifier.hxx
index e429e3eb2105..5cfd6a1671b1 100644
--- a/chart2/source/inc/ObjectIdentifier.hxx
+++ b/chart2/source/inc/ObjectIdentifier.hxx
@@ -42,7 +42,11 @@ namespace com::sun::star::uno { class XInterface; }
namespace chart
{
+class Axis;
+class BaseCoordinateSystem;
+class DataSeries;
class Diagram;
+class Legend;
enum ObjectType
{
@@ -70,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
@@ -95,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
+ 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 );
@@ -144,14 +149,16 @@ 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 );
+
+ /** 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
@@ -165,22 +172,22 @@ public:
, 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
+ , 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 );
@@ -188,57 +195,49 @@ public:
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 );
- static css::uno::Reference< css::beans::XPropertySet >
- getObjectPropertySet(
- const OUString& rObjectCID
+ 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 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;
diff --git a/chart2/source/inc/PopupRequest.hxx b/chart2/source/inc/PopupRequest.hxx
index a755fdfa3c85..90fe315d2471 100644
--- a/chart2/source/inc/PopupRequest.hxx
+++ b/chart2/source/inc/PopupRequest.hxx
@@ -9,6 +9,7 @@
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
#include <comphelper/compbase.hxx>
@@ -21,7 +22,7 @@ namespace impl
typedef comphelper::WeakComponentImplHelper<css::awt::XRequestCallback> PopupRequest_Base;
}
-class OOO_DLLPUBLIC_CHARTTOOLS PopupRequest final : public impl::PopupRequest_Base
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) PopupRequest final : public impl::PopupRequest_Base
{
public:
explicit PopupRequest();
diff --git a/chart2/source/inc/PropertyHelper.hxx b/chart2/source/inc/PropertyHelper.hxx
index 14aa57609534..3e1949057361 100644
--- a/chart2/source/inc/PropertyHelper.hxx
+++ b/chart2/source/inc/PropertyHelper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/uno/Any.hxx>
#include "charttoolsdllapi.hxx"
@@ -41,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 );
@@ -51,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 );
@@ -61,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,
@@ -72,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 );
@@ -82,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 );
@@ -92,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 );
@@ -111,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.
@@ -130,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
diff --git a/chart2/source/inc/RangeHighlighter.hxx b/chart2/source/inc/RangeHighlighter.hxx
index 8642d66f7e88..c7bcdd2c5c55 100644
--- a/chart2/source/inc/RangeHighlighter.hxx
+++ b/chart2/source/inc/RangeHighlighter.hxx
@@ -36,6 +36,8 @@ namespace com::sun::star::view { class XSelectionSupplier; }
namespace chart
{
+class ChartModel;
+class DataSeries;
class Diagram;
namespace impl
@@ -52,7 +54,7 @@ class RangeHighlighter final :
{
public:
explicit RangeHighlighter(
- const css::uno::Reference< css::view::XSelectionSupplier > & xSelectionSupplier );
+ const rtl::Reference< ::chart::ChartModel > & xSelectionSupplier );
virtual ~RangeHighlighter() override;
protected:
@@ -81,16 +83,16 @@ 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 >
diff --git a/chart2/source/inc/ReferenceSizeProvider.hxx b/chart2/source/inc/ReferenceSizeProvider.hxx
index 3db11e5327b1..f3626b03d193 100644
--- a/chart2/source/inc/ReferenceSizeProvider.hxx
+++ b/chart2/source/inc/ReferenceSizeProvider.hxx
@@ -21,6 +21,8 @@
#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 {
@@ -36,7 +38,7 @@ namespace com::sun::star {
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS ReferenceSizeProvider
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ReferenceSizeProvider
{
public:
@@ -50,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;}
@@ -63,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
@@ -119,7 +121,7 @@ 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;
};
diff --git a/chart2/source/inc/RegressionCurveCalculator.hxx b/chart2/source/inc/RegressionCurveCalculator.hxx
index 6cf1f2914d5b..ebb3ad40f616 100644
--- a/chart2/source/inc/RegressionCurveCalculator.hxx
+++ b/chart2/source/inc/RegressionCurveCalculator.hxx
@@ -42,28 +42,6 @@ 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;
- sal_Int32 mnMovingType;
-
// ____ XRegressionCurveCalculator ____
virtual void SAL_CALL setRegressionProperties(
sal_Int32 aDegree,
@@ -96,6 +74,28 @@ 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
diff --git a/chart2/source/inc/RegressionCurveHelper.hxx b/chart2/source/inc/RegressionCurveHelper.hxx
index 83fc72e65649..fc0c2abcd5b7 100644
--- a/chart2/source/inc/RegressionCurveHelper.hxx
+++ b/chart2/source/inc/RegressionCurveHelper.hxx
@@ -18,8 +18,10 @@
*/
#pragma once
+#include <config_options.h>
#include <svx/chrtitem.hxx>
#include "charttoolsdllapi.hxx"
+#include <rtl/ref.hxx>
#include <vector>
@@ -31,59 +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::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>
+ 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
@@ -91,7 +112,7 @@ namespace chart::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,
@@ -99,21 +120,29 @@ namespace chart::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>
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveCalculator>
createRegressionCurveCalculatorByServiceName( std::u16string_view aServiceName );
/** recalculates the regression parameters according to the data given in
@@ -141,36 +170,33 @@ namespace chart::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
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 5a6bcbbc85af..03ea72eebeed 100644
--- a/chart2/source/inc/RelativePositionHelper.hxx
+++ b/chart2/source/inc/RelativePositionHelper.hxx
@@ -19,6 +19,7 @@
#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>
@@ -30,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
diff --git a/chart2/source/inc/RelativeSizeHelper.hxx b/chart2/source/inc/RelativeSizeHelper.hxx
index b07876bb67d3..6b3dbb7c2dee 100644
--- a/chart2/source/inc/RelativeSizeHelper.hxx
+++ b/chart2/source/inc/RelativeSizeHelper.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include "charttoolsdllapi.hxx"
namespace com::sun::star::awt { struct Size; }
@@ -28,7 +29,7 @@ class SvxShapeText;
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS RelativeSizeHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) RelativeSizeHelper
{
public:
static double calculate(
diff --git a/chart2/source/inc/SceneProperties.hxx b/chart2/source/inc/SceneProperties.hxx
index ab7d89711af4..1fdae1b6703f 100644
--- a/chart2/source/inc/SceneProperties.hxx
+++ b/chart2/source/inc/SceneProperties.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include "PropertyHelper.hxx"
#include "FastPropertyIdRanges.hxx"
#include "charttoolsdllapi.hxx"
@@ -71,10 +72,10 @@ 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
diff --git a/chart2/source/inc/StatisticsHelper.hxx b/chart2/source/inc/StatisticsHelper.hxx
index 7a6a96c5e5bd..f38a27ba500f 100644
--- a/chart2/source/inc/StatisticsHelper.hxx
+++ b/chart2/source/inc/StatisticsHelper.hxx
@@ -18,8 +18,10 @@
*/
#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; }
@@ -29,6 +31,8 @@ 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::StatisticsHelper
{
@@ -36,33 +40,33 @@ namespace chart::StatisticsHelper
@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,
@@ -71,27 +75,27 @@ namespace chart::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
diff --git a/chart2/source/inc/ThreeDHelper.hxx b/chart2/source/inc/ThreeDHelper.hxx
index 93b1c995f388..2c43fff6c71a 100644
--- a/chart2/source/inc/ThreeDHelper.hxx
+++ b/chart2/source/inc/ThreeDHelper.hxx
@@ -19,7 +19,9 @@
#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; }
@@ -27,6 +29,7 @@ namespace com::sun::star::chart2 { class XDiagram; }
namespace chart
{
+class Diagram;
enum class ThreeDLookScheme
{
@@ -45,7 +48,7 @@ enum CuboidPlanePosition
CuboidPlanePosition_Back
};
-class OOO_DLLPUBLIC_CHARTTOOLS ThreeDHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) ThreeDHelper
{
public:
@@ -57,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; }
@@ -88,40 +74,25 @@ 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 );
};
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 c85b5ce1a3ff..f4ea2204d7d5 100644
--- a/chart2/source/inc/TitleHelper.hxx
+++ b/chart2/source/inc/TitleHelper.hxx
@@ -19,8 +19,10 @@
#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; }
@@ -31,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
@@ -51,46 +53,44 @@ 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 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 );
+ , const float * pDefaultCharHeight = nullptr
+ , bool bDialogTitle = false );
static bool getTitleType( eTitleType& rType
- , const css::uno::Reference< css::chart2::XTitle >& xTitle
- , ChartModel& rModel);
-
- 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 css::uno::Reference< css::frame::XModel > & xModel);
+ const rtl::Reference< ::chart::ChartModel > & xModel);
};
} //namespace chart
diff --git a/chart2/source/inc/UncachedDataSequence.hxx b/chart2/source/inc/UncachedDataSequence.hxx
index e3a51f55727a..c134601944ff 100644
--- a/chart2/source/inc/UncachedDataSequence.hxx
+++ b/chart2/source/inc/UncachedDataSequence.hxx
@@ -19,10 +19,10 @@
#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>
@@ -42,10 +42,11 @@ 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,
@@ -68,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
{
@@ -78,11 +78,11 @@ public:
lifetime is at least as long as the one of this object.
*/
UncachedDataSequence(
- const rtl::Reference< InternalDataProvider > & xIntDataProv,
- const OUString & rRangeRepresentation );
+ rtl::Reference< InternalDataProvider > xIntDataProv,
+ OUString aRangeRepresentation );
UncachedDataSequence(
- const rtl::Reference< InternalDataProvider > & xIntDataProv,
- const OUString & rRangeRepresentation,
+ rtl::Reference< InternalDataProvider > xIntDataProv,
+ OUString aRangeRepresentation,
const OUString & rRole );
UncachedDataSequence( const UncachedDataSequence & rSource );
virtual ~UncachedDataSequence() override;
@@ -102,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;
@@ -164,7 +164,7 @@ private:
rtl::Reference< InternalDataProvider > m_xDataProvider;
OUString m_aSourceRepresentation;
- css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
+ rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
};
} // namespace chart
diff --git a/chart2/source/inc/UserDefinedProperties.hxx b/chart2/source/inc/UserDefinedProperties.hxx
index 07ab7b5bbcef..3d4e587db745 100644
--- a/chart2/source/inc/UserDefinedProperties.hxx
+++ b/chart2/source/inc/UserDefinedProperties.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include "FastPropertyIdRanges.hxx"
#include "charttoolsdllapi.hxx"
@@ -45,7 +46,7 @@ namespace UserDefinedProperties
PROP_XML_USERDEF
};
- OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(
+ UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void AddPropertiesToVector(
std::vector< css::beans::Property > & rOutProperties );
}
diff --git a/chart2/source/inc/WeakListenerAdapter.hxx b/chart2/source/inc/WeakListenerAdapter.hxx
index 7240a5363f85..f300f1aa0391 100644
--- a/chart2/source/inc/WeakListenerAdapter.hxx
+++ b/chart2/source/inc/WeakListenerAdapter.hxx
@@ -19,7 +19,6 @@
#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>
@@ -47,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) ____
@@ -71,19 +67,6 @@ private:
css::uno::WeakReference< Listener > m_xListener;
};
-class WeakModifyListenerAdapter final :
- 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 final :
public WeakListenerAdapter< css::view::XSelectionChangeListener >
{
diff --git a/chart2/source/inc/WrappedDefaultProperty.hxx b/chart2/source/inc/WrappedDefaultProperty.hxx
index 08a11ce032eb..f9fdbff2cbf9 100644
--- a/chart2/source/inc/WrappedDefaultProperty.hxx
+++ b/chart2/source/inc/WrappedDefaultProperty.hxx
@@ -24,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(
diff --git a/chart2/source/inc/WrappedDirectStateProperty.hxx b/chart2/source/inc/WrappedDirectStateProperty.hxx
index 28398efd8155..082a70ed0a76 100644
--- a/chart2/source/inc/WrappedDirectStateProperty.hxx
+++ b/chart2/source/inc/WrappedDirectStateProperty.hxx
@@ -23,7 +23,7 @@
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);
diff --git a/chart2/source/inc/WrappedIgnoreProperty.hxx b/chart2/source/inc/WrappedIgnoreProperty.hxx
index a031097bda01..22c1673cc956 100644
--- a/chart2/source/inc/WrappedIgnoreProperty.hxx
+++ b/chart2/source/inc/WrappedIgnoreProperty.hxx
@@ -26,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 );
@@ -47,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 );
diff --git a/chart2/source/inc/WrappedProperty.hxx b/chart2/source/inc/WrappedProperty.hxx
index 6bd13936c732..de6e0095e354 100644
--- a/chart2/source/inc/WrappedProperty.hxx
+++ b/chart2/source/inc/WrappedProperty.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <rtl/ustring.hxx>
@@ -33,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;}
diff --git a/chart2/source/inc/WrappedPropertySet.hxx b/chart2/source/inc/WrappedPropertySet.hxx
index 30ac421b3f5c..dabc6e33c5c4 100644
--- a/chart2/source/inc/WrappedPropertySet.hxx
+++ b/chart2/source/inc/WrappedPropertySet.hxx
@@ -18,16 +18,17 @@
*/
#pragma once
+#include <config_options.h>
#include "WrappedProperty.hxx"
#include "charttoolsdllapi.hxx"
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertyStates.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase.hxx>
#include <memory>
+#include <mutex>
#include <vector>
namespace cppu { class IPropertyArrayHelper; }
@@ -36,9 +37,8 @@ namespace cppu { class OPropertyArrayHelper; }
namespace chart
{
-class OOO_DLLPUBLIC_CHARTTOOLS WrappedPropertySet :
- public cppu::BaseMutex
- , public ::cppu::WeakImplHelper
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) WrappedPropertySet :
+ public ::cppu::WeakImplHelper
< css::beans::XPropertySet
, css::beans::XMultiPropertySet
, css::beans::XPropertyState
@@ -103,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
diff --git a/chart2/source/inc/chartview/ChartSfxItemIds.hxx b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
index 55fec55872f3..a5099cc0c31a 100644
--- a/chart2/source/inc/chartview/ChartSfxItemIds.hxx
+++ b/chart2/source/inc/chartview/ChartSfxItemIds.hxx
@@ -163,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);
@@ -194,7 +194,14 @@ constexpr TypedWhichId<SfxStringItem> 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
diff --git a/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx b/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
index 58d8a9ff2e4d..304b0f5a486f 100644
--- a/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
+++ b/chart2/source/inc/chartview/DataPointSymbolSupplier.hxx
@@ -29,7 +29,7 @@ namespace com::sun::star::drawing { struct Direction3D; }
namespace chart
{
-class OOO_DLLPUBLIC_CHARTVIEW DataPointSymbolSupplier
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) DataPointSymbolSupplier
{
public:
static rtl::Reference< SvxShapeGroup >
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index 0b4da35435d4..e555fb7ab021 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -35,12 +35,12 @@ class SdrObject;
namespace chart
{
-class OOO_DLLPUBLIC_CHARTVIEW DrawModelWrapper final : private SdrModel
+class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTVIEW) DrawModelWrapper final : private SdrModel
{
private:
rtl::Reference<SvxDrawPage> m_xMainDrawPage;
rtl::Reference<SvxDrawPage> m_xHiddenDrawPage;
-
+ rtl::Reference<SfxItemPool> m_xChartItemPool;
VclPtr<OutputDevice> m_pRefDevice;
public:
@@ -66,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();
diff --git a/chart2/source/inc/chartview/ExplicitScaleValues.hxx b/chart2/source/inc/chartview/ExplicitScaleValues.hxx
index a49dddeb6658..07b8290cb7db 100644
--- a/chart2/source/inc/chartview/ExplicitScaleValues.hxx
+++ b/chart2/source/inc/chartview/ExplicitScaleValues.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <config_options.h>
#include <chartview/chartviewdllapi.hxx>
#include <com/sun/star/chart/TimeInterval.hpp>
#include <com/sun/star/chart2/AxisOrientation.hpp>
@@ -35,7 +36,7 @@ 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();
@@ -73,7 +74,7 @@ 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();
diff --git a/chart2/source/inc/chartview/ExplicitValueProvider.hxx b/chart2/source/inc/chartview/ExplicitValueProvider.hxx
index f367271e3b80..f4bc4aac874b 100644
--- a/chart2/source/inc/chartview/ExplicitValueProvider.hxx
+++ b/chart2/source/inc/chartview/ExplicitValueProvider.hxx
@@ -18,14 +18,14 @@
*/
#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; }
@@ -37,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.
@@ -50,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;
@@ -62,13 +69,11 @@ 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
@@ -76,9 +81,9 @@ public:
, 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 );
@@ -88,7 +93,7 @@ public:
, const css::uno::Reference< css::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
protected:
- ~ExplicitValueProvider() {}
+ ~ExplicitValueProvider() = default;
};
} //namespace chart
diff --git a/chart2/source/inc/defines.hxx b/chart2/source/inc/defines.hxx
index bf003b6c6520..1eb464bc203a 100644
--- a/chart2/source/inc/defines.hxx
+++ b/chart2/source/inc/defines.hxx
@@ -19,6 +19,6 @@
#pragma once
-#define FIXED_SIZE_FOR_3D_CHART_VOLUME 10000.0
+constexpr double FIXED_SIZE_FOR_3D_CHART_VOLUME = 10000.0;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/servicenames.hxx b/chart2/source/inc/servicenames.hxx
index 30e9b40f5efa..0f5cbe2b40f9 100644
--- a/chart2/source/inc/servicenames.hxx
+++ b/chart2/source/inc/servicenames.hxx
@@ -20,44 +20,34 @@
#include <rtl/ustring.hxx>
-inline constexpr OUStringLiteral CHART_MODEL_SERVICE_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.ChartModel";
-inline constexpr OUStringLiteral CHART_MODEL_SERVICE_NAME = u"com.sun.star.chart2.ChartDocument";
+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
-inline constexpr OUStringLiteral CHART_CONTROLLER_SERVICE_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.ChartController";
-inline constexpr OUStringLiteral CHART_CONTROLLER_SERVICE_NAME
- = u"com.sun.star.chart2.ChartController";
-//@todo create your own service containing the service com.sun.star.frame.Controller
+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;
-inline constexpr OUStringLiteral CHART_VIEW_SERVICE_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.ChartView";
-inline constexpr OUStringLiteral CHART_VIEW_SERVICE_NAME = u"com.sun.star.chart2.ChartView";
+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;
-inline constexpr OUStringLiteral CHART_FRAMELOADER_SERVICE_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.ChartFrameLoader";
-inline constexpr OUStringLiteral CHART_FRAMELOADER_SERVICE_NAME
- = u"com.sun.star.frame.SynchronousFrameLoader";
+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;
-inline constexpr OUStringLiteral CHART_WIZARD_DIALOG_SERVICE_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.WizardDialog";
-inline constexpr OUStringLiteral CHART_WIZARD_DIALOG_SERVICE_NAME
- = u"com.sun.star.chart2.WizardDialog";
-
-inline constexpr OUStringLiteral CHART_TYPE_DIALOG_SERVICE_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.ChartTypeDialog";
-inline constexpr OUStringLiteral CHART_TYPE_DIALOG_SERVICE_NAME
- = u"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)
-inline constexpr OUStringLiteral CHART_CHARTAPIWRAPPER_IMPLEMENTATION_NAME
- = u"com.sun.star.comp.chart2.ChartDocumentWrapper";
-inline constexpr OUStringLiteral CHART_CHARTAPIWRAPPER_SERVICE_NAME
- = u"com.sun.star.chart2.ChartDocumentWrapper";
-
-// accessibility
-inline constexpr OUStringLiteral CHART_ACCESSIBLE_TEXT_SERVICE_NAME
- = u"com.sun.star.accessibility.AccessibleTextComponent";
+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 0c06c2d3ea57..5ab2dcbf4929 100644
--- a/chart2/source/inc/servicenames_charttypes.hxx
+++ b/chart2/source/inc/servicenames_charttypes.hxx
@@ -20,25 +20,25 @@
#include <rtl/ustring.hxx>
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_AREA
- = u"com.sun.star.chart2.AreaChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_BAR
- = u"com.sun.star.chart2.BarChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_COLUMN
- = u"com.sun.star.chart2.ColumnChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_LINE
- = u"com.sun.star.chart2.LineChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_SCATTER
- = u"com.sun.star.chart2.ScatterChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_PIE
- = u"com.sun.star.chart2.PieChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_NET
- = u"com.sun.star.chart2.NetChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET
- = u"com.sun.star.chart2.FilledNetChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK
- = u"com.sun.star.chart2.CandleStickChartType";
-inline constexpr OUStringLiteral CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE
- = u"com.sun.star.chart2.BubbleChartType";
+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 f8472a3dfeec..065155a8bb37 100644
--- a/chart2/source/inc/servicenames_coosystems.hxx
+++ b/chart2/source/inc/servicenames_coosystems.hxx
@@ -20,7 +20,7 @@
#include <rtl/ustring.hxx>
-inline constexpr OUStringLiteral CHART2_COOSYSTEM_CARTESIAN_VIEW_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.CartesianView";
-inline constexpr OUStringLiteral CHART2_COOSYSTEM_POLAR_VIEW_SERVICE_NAME = u"com.sun.star.chart2.CoordinateSystems.PolarView";
+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: */