chart2/Library_chartcore.mk | 1 chart2/source/chartcore.component | 7 chart2/source/inc/DataTable.hxx | 89 +++++++++++ chart2/source/inc/Diagram.hxx | 15 + chart2/source/model/main/DataTable.cxx | 234 ++++++++++++++++++++++++++++++ chart2/source/model/main/Diagram.cxx | 49 +++--- offapi/UnoApi_offapi.mk | 2 offapi/com/sun/star/chart2/DataTable.idl | 53 ++++++ offapi/com/sun/star/chart2/Diagram.idl | 6 offapi/com/sun/star/chart2/XDataTable.idl | 35 ++++ offapi/com/sun/star/chart2/XDiagram.idl | 9 + 11 files changed, 474 insertions(+), 26 deletions(-)
New commits: commit 4189819b9bca775f72d463c9229a75e16c2860c5 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Mon May 16 15:27:46 2022 +0900 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Mon May 16 15:27:46 2022 +0900 [API-CHANGE] chart data table implementation Adds new service DataTable, which is reposible for the properties of a data table for a chart. Also removes the existing properties related to the data table from Diagram service, which were added prematurely in the past, without a data table actually being supported by the chart module. Also adds an implementation of the DataTable service in chart2 module. Change-Id: I0c6b32163745704c623d04baaf0ce0e208c107f5 diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk index 3d3806e14c27..4c93c6d2c3ec 100644 --- a/chart2/Library_chartcore.mk +++ b/chart2/Library_chartcore.mk @@ -130,6 +130,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\ chart2/source/model/main/DataPointProperties \ chart2/source/model/main/DataSeries \ chart2/source/model/main/DataSeriesProperties \ + chart2/source/model/main/DataTable \ chart2/source/model/main/Diagram \ chart2/source/model/main/FormattedString \ chart2/source/model/main/GridProperties \ diff --git a/chart2/source/chartcore.component b/chart2/source/chartcore.component index f58ba98ba3ac..d15c808919df 100644 --- a/chart2/source/chartcore.component +++ b/chart2/source/chartcore.component @@ -219,6 +219,13 @@ <service name="com.sun.star.drawing.LineProperties"/> <service name="com.sun.star.layout.LayoutElement"/> <service name="com.sun.star.style.CharacterProperties"/> + </implementation> + <implementation name="com.sun.star.comp.chart2.DataTable" + constructor="com_sun_star_comp_chart2_DataTable_get_implementation"> + <service name="com.sun.star.beans.PropertySet"/> + <service name="com.sun.star.chart2.DataTable"/> + <service name="com.sun.star.drawing.FillProperties"/> + <service name="com.sun.star.drawing.LineProperties"/> </implementation> <implementation name="com.sun.star.comp.chart2.PageBackground" constructor="com_sun_star_comp_chart2_PageBackground_get_implementation"> diff --git a/chart2/source/inc/DataTable.hxx b/chart2/source/inc/DataTable.hxx new file mode 100644 index 000000000000..4a41a40a1cbf --- /dev/null +++ b/chart2/source/inc/DataTable.hxx @@ -0,0 +1,89 @@ +/* -*- 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/basemutex.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 OOO_DLLPUBLIC_CHARTTOOLS DataTable final : public cppu::BaseMutex, + 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 3c0e31d8be6d..50cc2cb0dfcd 100644 --- a/chart2/source/inc/Diagram.hxx +++ b/chart2/source/inc/Diagram.hxx @@ -26,8 +26,8 @@ #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" @@ -41,6 +41,7 @@ namespace chart { class BaseCoordinateSystem; class Legend; +class DataTable; class Wall; namespace impl @@ -110,6 +111,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; @@ -150,8 +154,14 @@ public: const rtl::Reference< ::chart::Legend > & getLegend2() const { return m_xLegend; } void setLegend(const rtl::Reference< ::chart::Legend > &); -private: + void setDataTable(const rtl::Reference<::chart::DataTable>& xNewDataTable); + + rtl::Reference<::chart::DataTable> const& getDataTableRef() const + { + return m_xDataTable; + }; +private: // ____ XModifyListener ____ virtual void SAL_CALL modified( const css::lang::EventObject& aEvent ) override; @@ -175,6 +185,7 @@ private: 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; diff --git a/chart2/source/model/main/DataTable.cxx b/chart2/source/model/main/DataTable.cxx new file mode 100644 index 000000000000..12e08e28b3e4 --- /dev/null +++ b/chart2/source/model/main/DataTable.cxx @@ -0,0 +1,234 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <DataTable.hxx> + +#include <LinePropertiesHelper.hxx> +#include <FillProperties.hxx> +#include <CharacterProperties.hxx> +#include <ModifyListenerHelper.hxx> +#include <PropertyHelper.hxx> +#include <cppuhelper/supportsservice.hxx> + +#include <com/sun/star/beans/PropertyAttribute.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> + +#include <algorithm> + +using namespace css; + +namespace +{ +enum +{ + DataTableProperty_Show, + DataTableProperty_HorizontalBorder, + DataTableProperty_VerticalBorder, + DataTableProperty_Outilne, + DataTableProperty_Keys, +}; + +void lcl_AddPropertiesToVector(std::vector<beans::Property>& rOutProperties) +{ + rOutProperties.emplace_back("Show", DataTableProperty_Show, cppu::UnoType<bool>::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT); + rOutProperties.emplace_back( + "HBorder", DataTableProperty_HorizontalBorder, cppu::UnoType<bool>::get(), + beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT); + rOutProperties.emplace_back( + "VBorder", DataTableProperty_VerticalBorder, cppu::UnoType<bool>::get(), + beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT); + rOutProperties.emplace_back("Outline", DataTableProperty_Outilne, cppu::UnoType<bool>::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT); + rOutProperties.emplace_back("Keys", DataTableProperty_Keys, cppu::UnoType<bool>::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT); +} + +struct StaticLegendDefaults_Initializer +{ + chart::tPropertyValueMap* operator()() + { + static chart::tPropertyValueMap aStaticDefaults; + lcl_AddDefaultsToMap(aStaticDefaults); + return &aStaticDefaults; + } + +private: + static void lcl_AddDefaultsToMap(::chart::tPropertyValueMap& aMap) + { + ::chart::LinePropertiesHelper::AddDefaultsToMap(aMap); + ::chart::FillProperties::AddDefaultsToMap(aMap); + ::chart::CharacterProperties::AddDefaultsToMap(aMap); + + ::chart::PropertyHelper::setPropertyValueDefault(aMap, DataTableProperty_Show, false); + ::chart::PropertyHelper::setPropertyValueDefault(aMap, DataTableProperty_HorizontalBorder, + false); + ::chart::PropertyHelper::setPropertyValueDefault(aMap, DataTableProperty_VerticalBorder, + false); + ::chart::PropertyHelper::setPropertyValueDefault(aMap, DataTableProperty_Outilne, false); + ::chart::PropertyHelper::setPropertyValueDefault(aMap, DataTableProperty_Keys, false); + } +}; + +struct StaticLegendDefaults + : public rtl::StaticAggregate<::chart::tPropertyValueMap, StaticLegendDefaults_Initializer> +{ +}; + +struct StaticLegendInfoHelper_Initializer +{ + cppu::OPropertyArrayHelper* operator()() + { + static cppu::OPropertyArrayHelper aPropHelper(lcl_GetPropertySequence()); + return &aPropHelper; + } + +private: + static uno::Sequence<beans::Property> lcl_GetPropertySequence() + { + std::vector<beans::Property> aProperties; + lcl_AddPropertiesToVector(aProperties); + chart::LinePropertiesHelper::AddPropertiesToVector(aProperties); + chart::FillProperties::AddPropertiesToVector(aProperties); + std::sort(aProperties.begin(), aProperties.end(), chart::PropertyNameLess()); + + return comphelper::containerToSequence(aProperties); + } +}; + +struct StaticLegendInfoHelper + : public rtl::StaticAggregate<::cppu::OPropertyArrayHelper, StaticLegendInfoHelper_Initializer> +{ +}; + +struct StaticLegendInfo_Initializer +{ + uno::Reference<beans::XPropertySetInfo>* operator()() + { + static uno::Reference<beans::XPropertySetInfo> xPropertySetInfo( + ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticLegendInfoHelper::get())); + return &xPropertySetInfo; + } +}; + +struct StaticLegendInfo : public rtl::StaticAggregate<uno::Reference<beans::XPropertySetInfo>, + StaticLegendInfo_Initializer> +{ +}; + +} // anonymous namespace + +namespace chart +{ +DataTable::DataTable() + : ::property::OPropertySet(m_aMutex) + , m_xModifyEventForwarder(new ModifyEventForwarder()) +{ +} + +DataTable::DataTable(const DataTable& rOther) + : DataTable_Base(rOther) + , ::property::OPropertySet(rOther, m_aMutex) + , m_xModifyEventForwarder(new ModifyEventForwarder()) +{ +} + +DataTable::~DataTable() = default; + +// ____ XCloneable ____ +uno::Reference<util::XCloneable> SAL_CALL DataTable::createClone() +{ + return uno::Reference<util::XCloneable>(new DataTable(*this)); +} + +// ____ XModifyBroadcaster ____ +void SAL_CALL DataTable::addModifyListener(const uno::Reference<util::XModifyListener>& aListener) +{ + m_xModifyEventForwarder->addModifyListener(aListener); +} + +void SAL_CALL +DataTable::removeModifyListener(const uno::Reference<util::XModifyListener>& aListener) +{ + m_xModifyEventForwarder->removeModifyListener(aListener); +} + +// ____ XModifyListener ____ +void SAL_CALL DataTable::modified(const lang::EventObject& aEvent) +{ + m_xModifyEventForwarder->modified(aEvent); +} + +// ____ XEventListener (base of XModifyListener) ____ +void SAL_CALL DataTable::disposing(const lang::EventObject& /* Source */) +{ + // nothing +} + +// ____ OPropertySet ____ +void DataTable::firePropertyChangeEvent() +{ + m_xModifyEventForwarder->modified(lang::EventObject(static_cast<uno::XWeak*>(this))); +} + +// ____ OPropertySet ____ +void DataTable::GetDefaultValue(sal_Int32 nHandle, uno::Any& rAny) const +{ + const tPropertyValueMap& rStaticDefaults = *StaticLegendDefaults::get(); + auto aFound = rStaticDefaults.find(nHandle); + if (aFound == rStaticDefaults.end()) + rAny.clear(); + else + rAny = (*aFound).second; +} + +::cppu::IPropertyArrayHelper& SAL_CALL DataTable::getInfoHelper() +{ + return *StaticLegendInfoHelper::get(); +} + +// ____ XPropertySet ____ +uno::Reference<beans::XPropertySetInfo> SAL_CALL DataTable::getPropertySetInfo() +{ + return *StaticLegendInfo::get(); +} + +// implement XServiceInfo methods basing upon getSupportedServiceNames_Static +OUString SAL_CALL DataTable::getImplementationName() +{ + return "com.sun.star.comp.chart2.DataTable"; +} + +sal_Bool SAL_CALL DataTable::supportsService(const OUString& rServiceName) +{ + return cppu::supportsService(this, rServiceName); +} + +uno::Sequence<OUString> SAL_CALL DataTable::getSupportedServiceNames() +{ + return { "com.sun.star.chart2.DataTable", "com.sun.star.beans.PropertySet", + "com.sun.star.drawing.FillProperties", "com.sun.star.drawing.LineProperties" }; +} + +IMPLEMENT_FORWARD_XINTERFACE2(DataTable, DataTable_Base, ::property::OPropertySet) +IMPLEMENT_FORWARD_XTYPEPROVIDER2(DataTable, DataTable_Base, ::property::OPropertySet) + +} // namespace chart + +extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* +com_sun_star_comp_chart2_DataTable_get_implementation( + css::uno::XComponentContext* /*pComponentContext*/, uno::Sequence<uno::Any> const& /*rAny*/) +{ + return cppu::acquire(new chart::DataTable); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index b1cfa0786f83..2225071f2768 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -32,6 +32,7 @@ #include <unonames.hxx> #include <BaseCoordinateSystem.hxx> #include <Legend.hxx> +#include <DataTable.hxx> #include <basegfx/numeric/ftools.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> @@ -160,21 +161,6 @@ void lcl_AddPropertiesToVector( PROP_DIAGRAM_3DRELATIVEHEIGHT, cppu::UnoType<sal_Int32>::get(), beans::PropertyAttribute::MAYBEVOID ); - rOutProperties.emplace_back( "DataTableHBorder", - PROP_DIAGRAM_DATATABLEHBORDER, - cppu::UnoType<bool>::get(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT ); - rOutProperties.emplace_back( "DataTableVBorder", - PROP_DIAGRAM_DATATABLEVBORDER, - cppu::UnoType<bool>::get(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT ); - rOutProperties.emplace_back( "DataTableOutline", - PROP_DIAGRAM_DATATABLEOUTLINE, - cppu::UnoType<bool>::get(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT ); rOutProperties.emplace_back( "ExternalData", PROP_DIAGRAM_EXTERNALDATA, cppu::UnoType<OUString>::get(), @@ -192,9 +178,6 @@ const ::chart::tPropertyValueMap& StaticDiagramDefaults() ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_GROUP_BARS_PER_AXIS, true ); ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS, true ); ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_RIGHT_ANGLED_AXES, false ); - ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_DATATABLEHBORDER, false ); - ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_DATATABLEVBORDER, false ); - ::chart::PropertyHelper::setPropertyValueDefault( aMap, PROP_DIAGRAM_DATATABLEOUTLINE, false ); ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aMap, PROP_DIAGRAM_STARTING_ANGLE, 90 ); ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aMap, PROP_DIAGRAM_3DRELATIVEHEIGHT, 100 ); ::chart::SceneProperties::AddDefaultsToMap( aMap ); @@ -663,6 +646,36 @@ void SAL_CALL Diagram::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) co ::property::OPropertySet::getFastPropertyValue( rValue,nHandle ); } +uno::Reference<chart2::XDataTable> SAL_CALL Diagram::getDataTable() +{ + MutexGuard aGuard(m_aMutex); + return m_xDataTable; +} + +void SAL_CALL Diagram::setDataTable(const uno::Reference<chart2::XDataTable>& xDataTable) +{ + auto* pDataTable = dynamic_cast<DataTable*>(xDataTable.get()); + assert(!xDataTable || pDataTable); + setDataTable(rtl::Reference<DataTable>(pDataTable)); +} + +void Diagram::setDataTable(const rtl::Reference<DataTable>& xNewDataTable) +{ + rtl::Reference<DataTable> xOldDataTable; + { + MutexGuard aGuard(m_aMutex); + if (m_xDataTable == xNewDataTable) + return; + xOldDataTable = m_xDataTable; + m_xDataTable = xNewDataTable; + } + if (xOldDataTable.is()) + ModifyListenerHelper::removeListener(xOldDataTable, m_xModifyEventForwarder); + if (xNewDataTable.is()) + ModifyListenerHelper::addListener(xNewDataTable, m_xModifyEventForwarder); + fireModifyEvent(); +} + using impl::Diagram_Base; IMPLEMENT_FORWARD_XINTERFACE2( Diagram, Diagram_Base, ::property::OPropertySet ) diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index a9b92639a667..c43f293fca87 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -647,6 +647,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/chart2,\ DataPoint \ DataPointProperties \ DataSeries \ + DataTable \ Diagram \ ErrorBar \ GridProperties \ @@ -2036,6 +2037,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/chart2,\ XDataPointCustomLabelField \ XDataSeries \ XDataSeriesContainer \ + XDataTable \ XDefaultSizeTransmitter \ XDiagram \ XDiagramProvider \ diff --git a/offapi/com/sun/star/chart2/DataTable.idl b/offapi/com/sun/star/chart2/DataTable.idl new file mode 100644 index 000000000000..c6288ad994c3 --- /dev/null +++ b/offapi/com/sun/star/chart2/DataTable.idl @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef com_sun_star_chart2_DataTable_idl +#define com_sun_star_chart2_DataTable_idl + +#include <com/sun/star/beans/PropertySet.idl> +#include <com/sun/star/drawing/LineProperties.idl> +#include <com/sun/star/drawing/FillProperties.idl> + +module com +{ +module sun +{ +module star +{ +module chart2 +{ + +/** Describes a data table for a Diagram. + @since LibreOffice 7.4 + */ +service DataTable +{ + service com::sun::star::beans::PropertySet; + service com::sun::star::drawing::FillProperties; + service com::sun::star::drawing::LineProperties; + + /** The interface for registering and removing data table entries. + */ + interface ::com::sun::star::chart2::XDataTable; + + /** Determines, whether the data table should be rendered by the view. + */ + [property] boolean Show; + + [optional, property] boolean HBorder; + [optional, property] boolean VBorder; + [optional, property] boolean Outline; + [optional, property] boolean Keys; + +}; + +}; }; }; }; // com::sun::star::chart2 + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/chart2/Diagram.idl b/offapi/com/sun/star/chart2/Diagram.idl index 2ae557e64c71..514f116e3aef 100644 --- a/offapi/com/sun/star/chart2/Diagram.idl +++ b/offapi/com/sun/star/chart2/Diagram.idl @@ -91,12 +91,6 @@ service Diagram [optional, property] boolean RightAngledAxes; - /** Chart Datatable flags - */ - [optional, property] boolean DataTableHBorder; - [optional, property] boolean DataTableVBorder; - [optional, property] boolean DataTableOutline; - /** Perspective of 3D charts ( [0,100] ). */ [optional, property] long Perspective; diff --git a/offapi/com/sun/star/chart2/XDataTable.idl b/offapi/com/sun/star/chart2/XDataTable.idl new file mode 100644 index 000000000000..48117b8c44b3 --- /dev/null +++ b/offapi/com/sun/star/chart2/XDataTable.idl @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef com_sun_star_chart2_XDataTable_idl +#define com_sun_star_chart2_XDataTable_idl + +#include <com/sun/star/uno/XInterface.idl> + +module com +{ +module sun +{ +module star +{ +module chart2 +{ + +/** Interface for the data table of a diagram + @since LibreOffice 7.4 + */ +interface XDataTable : ::com::sun::star::uno::XInterface +{ +}; + +}; }; }; }; // com::sun::star::chart2 + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/chart2/XDiagram.idl b/offapi/com/sun/star/chart2/XDiagram.idl index a878759be40d..b95e19cb7d34 100644 --- a/offapi/com/sun/star/chart2/XDiagram.idl +++ b/offapi/com/sun/star/chart2/XDiagram.idl @@ -91,6 +91,15 @@ interface XDiagram : ::com::sun::star::uno::XInterface */ void setDiagramData( [in] com::sun::star::chart2::data::XDataSource xDataSource, [in] sequence< com::sun::star::beans::PropertyValue > aArguments ); + + + /** returns the data table + */ + XDataTable getDataTable(); + + /** sets a new data table. + */ + void setDataTable([in] XDataTable xDataTable); }; } ; // chart2