/* -*- 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 // helper classes #include #include #include #include #include #include #include "ModifyListenerHelper.hxx" // interfaces and types #include #include #include #include #include #include namespace chart { typedef ::comphelper::WeakComponentImplHelper< css::chart2::data::XDataSequence, css::chart2::data::XNumericalDataSequence, css::chart2::data::XTextualDataSequence, css::util::XCloneable, css::util::XModifyBroadcaster, css::lang::XServiceInfo> HistogramDataSequence_Base; class HistogramDataSequence final : public HistogramDataSequence_Base, public ::comphelper::OPropertyContainer2, public ::comphelper::OPropertyArrayUsageHelper { public: HistogramDataSequence(); virtual ~HistogramDataSequence() override; /// declare XServiceInfo methods OUString SAL_CALL getImplementationName() override; sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; css::uno::Sequence SAL_CALL getSupportedServiceNames() override; /// merge XInterface implementations DECLARE_XINTERFACE() /// merge XTypeProvider implementations DECLARE_XTYPEPROVIDER() // XPropertySet /// @see css::beans::XPropertySet virtual css::uno::Reference SAL_CALL getPropertySetInfo() override; /// @see ::comphelper::OPropertySetHelper virtual ::cppu::IPropertyArrayHelper& getInfoHelper() override; /// @see ::comphelper::OPropertyArrayUsageHelper virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override; // XDataSequence css::uno::Sequence SAL_CALL getData() override; OUString SAL_CALL getSourceRangeRepresentation() override; css::uno::Sequence SAL_CALL generateLabel(css::chart2::data::LabelOrigin nLabelOrigin) override; sal_Int32 SAL_CALL getNumberFormatKeyByIndex(sal_Int32 nIndex) override; // XNumericalDataSequence /// @see css::chart::data::XNumericalDataSequence virtual css::uno::Sequence SAL_CALL getNumericalData() override; // XTextualDataSequence /// @see css::chart::data::XTextualDataSequence virtual css::uno::Sequence SAL_CALL getTextualData() override; // XCloneable virtual css::uno::Reference SAL_CALL createClone() override; // XModifyBroadcaster virtual void SAL_CALL addModifyListener(const css::uno::Reference& aListener) override; virtual void SAL_CALL removeModifyListener(const css::uno::Reference& aListener) override; void setLabels(css::uno::Sequence const& xLabels) { mxLabels = xLabels; } void setValues(css::uno::Sequence const& xValues) { mxValues = xValues; } private: rtl::Reference m_xModifyEventForwarder; OUString m_sRole; css::uno::Sequence mxLabels; css::uno::Sequence mxValues; }; } // namespace chart /* vim:set shiftwidth=4 softtabstop=4 expandtab: */