Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / workbench / addin / sampleaddin.hxx
blob5e32e479cb3cf3865a1fb3c6ba8fc12923e9a866
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_CHART2_WORKBENCH_ADDIN_SAMPLEADDIN_HXX
21 #define INCLUDED_CHART2_WORKBENCH_ADDIN_SAMPLEADDIN_HXX
23 #include <cppuhelper/implbase.hxx>
25 #include <com/sun/star/lang/XInitialization.hpp>
26 #include <com/sun/star/chart/XDiagram.hpp>
27 #include <com/sun/star/chart/XAxisXSupplier.hpp>
28 #include <com/sun/star/chart/XAxisYSupplier.hpp>
29 #include <com/sun/star/chart/XStatisticDisplay.hpp>
31 #include <com/sun/star/lang/XServiceName.hpp>
32 #include <com/sun/star/lang/XServiceInfo.hpp>
33 #include <com/sun/star/util/XRefreshable.hpp>
34 #include <com/sun/star/lang/XLocalizable.hpp>
36 #include <com/sun/star/chart/XChartDocument.hpp>
38 css::uno::Reference< css::uno::XInterface > SAL_CALL
39 SampleAddIn_CreateInstance(
40 const css::uno::Reference< css::lang::XMultiServiceFactory >& );
42 class SampleAddIn : public cppu::WeakImplHelper<
43 css::lang::XInitialization,
44 css::chart::XDiagram,
45 css::chart::XAxisXSupplier,
46 css::chart::XAxisYSupplier,
47 css::chart::XStatisticDisplay,
48 css::lang::XServiceName,
49 css::lang::XServiceInfo,
50 css::util::XRefreshable,
51 css::lang::XLocalizable >
53 private:
54 css::uno::Reference< css::chart::XChartDocument > mxChartDoc;
55 css::lang::Locale maLocale;
57 css::uno::Reference< css::drawing::XShape > mxMyRedLine;
58 css::uno::Reference< css::drawing::XShape > mxMyText;
60 public:
61 SampleAddIn();
62 virtual ~SampleAddIn();
64 // class specific code
65 static OUString getImplementationName_Static();
66 static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
68 sal_Bool getLogicalPosition( css::uno::Reference< css::drawing::XShape >& xAxis,
69 double fValue,
70 sal_Bool bVertical,
71 css::awt::Point& aOutPosition );
73 // XInitialization
74 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
75 throw( css::uno::Exception,
76 css::uno::RuntimeException );
78 // XDiagram
79 virtual OUString SAL_CALL getDiagramType() throw( css::uno::RuntimeException );
80 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getDataRowProperties( sal_Int32 nRow )
81 throw( css::lang::IndexOutOfBoundsException,
82 css::uno::RuntimeException );
83 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getDataPointProperties( sal_Int32 nCol, sal_Int32 nRow )
84 throw( css::lang::IndexOutOfBoundsException,
85 css::uno::RuntimeException );
87 // XShape ( ::XDiagram )
88 virtual css::awt::Size SAL_CALL getSize()
89 throw( css::uno::RuntimeException );
90 virtual void SAL_CALL setSize( const css::awt::Size& )
91 throw( css::beans::PropertyVetoException,
92 css::uno::RuntimeException );
93 virtual css::awt::Point SAL_CALL getPosition()
94 throw( css::uno::RuntimeException );
95 virtual void SAL_CALL setPosition( const css::awt::Point& )
96 throw( css::uno::RuntimeException );
98 // XShapeDescriptor ( ::XShape ::XDiagram )
99 virtual OUString SAL_CALL getShapeType() throw( css::uno::RuntimeException );
101 // XAxisXSupplier
102 virtual css::uno::Reference< css::drawing::XShape > SAL_CALL getXAxisTitle()
103 throw( css::uno::RuntimeException );
104 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getXAxis()
105 throw( css::uno::RuntimeException );
106 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getXMainGrid()
107 throw( css::uno::RuntimeException );
108 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getXHelpGrid()
109 throw( css::uno::RuntimeException );
111 // XAxisYSupplier
112 virtual css::uno::Reference< css::drawing::XShape > SAL_CALL getYAxisTitle()
113 throw( css::uno::RuntimeException );
114 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getYAxis()
115 throw( css::uno::RuntimeException );
116 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getYHelpGrid()
117 throw( css::uno::RuntimeException );
118 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getYMainGrid()
119 throw( css::uno::RuntimeException );
121 // XStatisticDisplay
122 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getUpBar()
123 throw( css::uno::RuntimeException );
124 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getDownBar()
125 throw( css::uno::RuntimeException );
126 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getMinMaxLine()
127 throw( css::uno::RuntimeException );
129 // XServiceName
130 virtual OUString SAL_CALL getServiceName() throw( css::uno::RuntimeException );
132 // XServiceInfo
133 virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException );
134 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
135 throw( css::uno::RuntimeException );
136 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
137 throw( css::uno::RuntimeException );
139 // XRefreshable
140 virtual void SAL_CALL refresh() throw( css::uno::RuntimeException );
141 virtual void SAL_CALL addRefreshListener( const css::uno::Reference< css::util::XRefreshListener >& l )
142 throw( css::uno::RuntimeException );
143 virtual void SAL_CALL removeRefreshListener( const css::uno::Reference< css::util::XRefreshListener >& l )
144 throw( css::uno::RuntimeException );
146 // XLocalizable
147 virtual void SAL_CALL setLocale( const css::lang::Locale& eLocale )
148 throw( css::uno::RuntimeException );
149 virtual css::lang::Locale SAL_CALL getLocale()
150 throw( css::uno::RuntimeException );
153 #endif // INCLUDED_CHART2_WORKBENCH_ADDIN_SAMPLEADDIN_HXX
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */