LibreOffice Module sc (master)  1
TablePivotChart.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 
10 #ifndef INCLUDED_SC_INC_TABLEPIVOTCHART_HXX
11 #define INCLUDED_SC_INC_TABLEPIVOTCHART_HXX
12 
13 #include <com/sun/star/table/XTablePivotChart.hpp>
14 #include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
15 #include <com/sun/star/lang/XServiceInfo.hpp>
16 #include <com/sun/star/container/XNamed.hpp>
17 
18 #include <svl/lstner.hxx>
19 #include <cppuhelper/basemutex.hxx>
20 #include <cppuhelper/compbase.hxx>
21 
22 #include "types.hxx"
23 
24 class ScDocShell;
25 
26 namespace sc
27 {
28 
29 typedef cppu::WeakComponentImplHelper<css::table::XTablePivotChart,
30  css::document::XEmbeddedObjectSupplier,
31  css::container::XNamed,
32  css::lang::XServiceInfo>
34 
35 class TablePivotChart final : public cppu::BaseMutex,
36  public TablePivotChart_Base,
37  public SfxListener
38 {
39 private:
41  SCTAB m_nTab; // Charts are per sheet
42  OUString m_aChartName;
43 
44 public:
45  TablePivotChart(ScDocShell* pDocShell, SCTAB nTab, OUString const & rName);
46  virtual ~TablePivotChart() override;
47 
48  virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
49 
50  // XComponent
51  using TablePivotChart_Base::disposing;
52 
53  // XEmbeddedObjectSupplier
54  virtual css::uno::Reference<css::lang::XComponent> SAL_CALL
55  getEmbeddedObject() override;
56 
57  // XNamed
58  virtual OUString SAL_CALL getName() override;
59  virtual void SAL_CALL setName(OUString const & aName) override;
60 
61  // XTablePivotChart
62  virtual OUString SAL_CALL getPivotTableName() override;
63 
64  // XServiceInfo
65  virtual OUString SAL_CALL getImplementationName() override;
66  virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
67  virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
68 };
69 
70 }
71 
72 #endif
73 
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL setName(OUString const &aName) override
virtual OUString SAL_CALL getName() override
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL getEmbeddedObject() override
virtual OUString SAL_CALL getImplementationName() override
TablePivotChart(ScDocShell *pDocShell, SCTAB nTab, OUString const &rName)
virtual ~TablePivotChart() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
cppu::WeakComponentImplHelper< css::table::XTablePivotChart, css::document::XEmbeddedObjectSupplier, css::container::XNamed, css::lang::XServiceInfo > TablePivotChart_Base
unsigned char sal_Bool
virtual sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
virtual OUString SAL_CALL getPivotTableName() override
ScDocShell * m_pDocShell
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
sal_Int16 SCTAB
Definition: types.hxx:23