LibreOffice Module chart2 (master) 1
UncachedDataSequence.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
21// helper classes
23#include <comphelper/uno3.hxx>
27#include <rtl/ref.hxx>
28
29// interfaces and types
30#include <com/sun/star/lang/XServiceInfo.hpp>
31#include <com/sun/star/chart2/data/XDataSequence.hpp>
32#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
33#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
34#include <com/sun/star/container/XIndexReplace.hpp>
35#include <com/sun/star/container/XNamed.hpp>
36#include <com/sun/star/util/XCloneable.hpp>
37#include <com/sun/star/util/XModifiable.hpp>
38
39namespace com::sun::star::beans { class XPropertySetInfo; }
40namespace com::sun::star::chart2 { class XInternalDataProvider; }
41
42namespace chart
43{
44class InternalDataProvider;
45class ModifyEventForwarder;
46
47namespace impl
48{
49typedef ::cppu::WeakComponentImplHelper<
50 css::chart2::data::XDataSequence,
51 css::chart2::data::XNumericalDataSequence,
52 css::chart2::data::XTextualDataSequence,
53 css::util::XCloneable,
54 css::util::XModifiable, // contains util::XModifyBroadcaster
55 css::container::XIndexReplace,
56 css::container::XNamed, // for setting a new range representation
57 css::lang::XServiceInfo >
59}
60
74 public ::comphelper::OPropertyArrayUsageHelper< UncachedDataSequence >,
76{
77public:
83 OUString aRangeRepresentation );
86 OUString aRangeRepresentation,
87 const OUString & rRole );
89 virtual ~UncachedDataSequence() override;
90
92 virtual OUString SAL_CALL getImplementationName() override;
93 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
94 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
95
100
101private:
102 // ____ XPropertySet ____
104 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
106 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
108 virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override;
109
110 // ____ XDataSequence ____
111 virtual css::uno::Sequence< css::uno::Any > SAL_CALL getData() override;
112 virtual OUString SAL_CALL getSourceRangeRepresentation() override;
113 virtual css::uno::Sequence< OUString > SAL_CALL generateLabel(
114 css::chart2::data::LabelOrigin nLabelOrigin ) override;
115 virtual ::sal_Int32 SAL_CALL getNumberFormatKeyByIndex( ::sal_Int32 nIndex ) override;
116
117 // ____ XNumericalDataSequence ____
119 virtual css::uno::Sequence< double > SAL_CALL getNumericalData() override;
120
121 // ____ XTextualDataSequence ____
123 virtual css::uno::Sequence< OUString > SAL_CALL getTextualData() override;
124
125 // ____ XIndexReplace ____
126 virtual void SAL_CALL replaceByIndex( ::sal_Int32 Index, const css::uno::Any& Element ) override;
127
128 // ____ XIndexAccess (base of XIndexReplace) ____
129 virtual ::sal_Int32 SAL_CALL getCount() override;
130 virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override;
131
132 // ____ XElementAccess (base of XIndexAccess) ____
133 virtual css::uno::Type SAL_CALL getElementType() override;
134 virtual sal_Bool SAL_CALL hasElements() override;
135
136 // ____ XNamed (for setting a new range representation) ____
137 virtual OUString SAL_CALL getName() override;
138 virtual void SAL_CALL setName( const OUString& aName ) override;
139
140 // ____ XCloneable ____
141 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
142
143 // ____ XModifiable ____
144 virtual sal_Bool SAL_CALL isModified() override;
145 virtual void SAL_CALL setModified( sal_Bool bModified ) override;
146
147 // ____ XModifyBroadcaster (base of XModifiable) ____
148 virtual void SAL_CALL addModifyListener(
149 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
150 virtual void SAL_CALL removeModifyListener(
151 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
152
153 void fireModifyEvent();
154
155 // <properties>
157 OUString m_sRole;
158 OUString m_aXMLRange;
159 // </properties>
160
164 void registerProperties();
165
169};
170
171} // namespace chart
172
173/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
This sequence object does NOT store actual sequence data.
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Sequence< OUString > SAL_CALL generateLabel(css::chart2::data::LabelOrigin nLabelOrigin) override
UncachedDataSequence(rtl::Reference< InternalDataProvider > xIntDataProv, OUString aRangeRepresentation)
The referring data provider is held as uno reference to ensure its lifetime is at least as long as th...
virtual OUString SAL_CALL getName() override
virtual void SAL_CALL setName(const OUString &aName) override
void registerProperties()
This method registers all properties.
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
merge XInterface implementations
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getData() override
virtual css::uno::Sequence< OUString > SAL_CALL getTextualData() override
virtual css::uno::Sequence< double > SAL_CALL getNumericalData() override
virtual ~UncachedDataSequence() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Any SAL_CALL getByIndex(::sal_Int32 Index) override
virtual sal_Bool SAL_CALL isModified() override
virtual ::sal_Int32 SAL_CALL getCount() override
virtual ::sal_Int32 SAL_CALL getNumberFormatKeyByIndex(::sal_Int32 nIndex) override
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
virtual void SAL_CALL replaceByIndex(::sal_Int32 Index, const css::uno::Any &Element) override
virtual sal_Bool SAL_CALL hasElements() override
virtual void SAL_CALL setModified(sal_Bool bModified) override
rtl::Reference< InternalDataProvider > m_xDataProvider
rtl::Reference< ModifyEventForwarder > m_xModifyEventForwarder
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual OUString SAL_CALL getImplementationName() override
declare XServiceInfo methods
virtual OUString SAL_CALL getSourceRangeRepresentation() override
sal_Int32 nIndex
OUString aName
::cppu::WeakComponentImplHelper< css::chart2::data::XDataSequence, css::chart2::data::XNumericalDataSequence, css::chart2::data::XTextualDataSequence, css::util::XCloneable, css::util::XModifiable, css::container::XIndexReplace, css::container::XNamed, css::lang::XServiceInfo > UncachedDataSequence_Base
unsigned char sal_Bool
#define DECLARE_XTYPEPROVIDER()
#define DECLARE_XINTERFACE()