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