1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef _SAMPLEADDIN_HXX_
29 #define _SAMPLEADDIN_HXX_
31 #include <cppuhelper/implbase9.hxx>
33 #include <com/sun/star/lang/XInitialization.hpp>
34 #include <com/sun/star/chart/XDiagram.hpp>
35 #include <com/sun/star/chart/XAxisXSupplier.hpp>
36 #include <com/sun/star/chart/XAxisYSupplier.hpp>
37 #include <com/sun/star/chart/XStatisticDisplay.hpp>
39 #include <com/sun/star/lang/XServiceName.hpp>
40 #include <com/sun/star/lang/XServiceInfo.hpp>
41 #include <com/sun/star/util/XRefreshable.hpp>
42 #include <com/sun/star/lang/XLocalizable.hpp>
44 #include <com/sun/star/chart/XChartDocument.hpp>
46 com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> SAL_CALL
47 SampleAddIn_CreateInstance(
48 const com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
>& );
50 class SampleAddIn
: public cppu::WeakImplHelper9
<
51 com::sun::star::lang::XInitialization
,
52 com::sun::star::chart::XDiagram
,
53 com::sun::star::chart::XAxisXSupplier
,
54 com::sun::star::chart::XAxisYSupplier
,
55 com::sun::star::chart::XStatisticDisplay
,
56 com::sun::star::lang::XServiceName
,
57 com::sun::star::lang::XServiceInfo
,
58 com::sun::star::util::XRefreshable
,
59 com::sun::star::lang::XLocalizable
>
62 ::com::sun::star::uno::Reference
< ::com::sun::star::chart::XChartDocument
> mxChartDoc
;
63 ::com::sun::star::lang::Locale maLocale
;
65 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> mxMyRedLine
;
66 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> mxMyText
;
70 virtual ~SampleAddIn();
72 // class specific code
73 static ::rtl::OUString
getImplementationName_Static();
74 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
> getSupportedServiceNames_Static();
76 sal_Bool
getLogicalPosition( ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
>& xAxis
,
79 ::com::sun::star::awt::Point
& aOutPosition
);
82 virtual void SAL_CALL
initialize( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aArguments
)
83 throw( ::com::sun::star::uno::Exception
,
84 ::com::sun::star::uno::RuntimeException
);
87 virtual ::rtl::OUString SAL_CALL
getDiagramType() throw( ::com::sun::star::uno::RuntimeException
);
88 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> SAL_CALL
getDataRowProperties( sal_Int32 nRow
)
89 throw( ::com::sun::star::lang::IndexOutOfBoundsException
,
90 ::com::sun::star::uno::RuntimeException
);
91 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> SAL_CALL
getDataPointProperties( sal_Int32 nCol
, sal_Int32 nRow
)
92 throw( ::com::sun::star::lang::IndexOutOfBoundsException
,
93 ::com::sun::star::uno::RuntimeException
);
95 // XShape ( ::XDiagram )
96 virtual ::com::sun::star::awt::Size SAL_CALL
getSize()
97 throw( ::com::sun::star::uno::RuntimeException
);
98 virtual void SAL_CALL
setSize( const ::com::sun::star::awt::Size
& )
99 throw( ::com::sun::star::beans::PropertyVetoException
,
100 ::com::sun::star::uno::RuntimeException
);
101 virtual ::com::sun::star::awt::Point SAL_CALL
getPosition()
102 throw( ::com::sun::star::uno::RuntimeException
);
103 virtual void SAL_CALL
setPosition( const ::com::sun::star::awt::Point
& )
104 throw( ::com::sun::star::uno::RuntimeException
);
106 // XShapeDescriptor ( ::XShape ::XDiagram )
107 virtual rtl::OUString SAL_CALL
getShapeType() throw( com::sun::star::uno::RuntimeException
);
110 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> SAL_CALL
getXAxisTitle()
111 throw( ::com::sun::star::uno::RuntimeException
);
112 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> SAL_CALL
getXAxis()
113 throw( ::com::sun::star::uno::RuntimeException
);
114 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> SAL_CALL
getXMainGrid()
115 throw( ::com::sun::star::uno::RuntimeException
);
116 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> SAL_CALL
getXHelpGrid()
117 throw( ::com::sun::star::uno::RuntimeException
);
120 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> SAL_CALL
getYAxisTitle()
121 throw( ::com::sun::star::uno::RuntimeException
);
122 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> SAL_CALL
getYAxis()
123 throw( ::com::sun::star::uno::RuntimeException
);
124 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> SAL_CALL
getYHelpGrid()
125 throw( ::com::sun::star::uno::RuntimeException
);
126 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> SAL_CALL
getYMainGrid()
127 throw( ::com::sun::star::uno::RuntimeException
);
130 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> SAL_CALL
getUpBar()
131 throw( ::com::sun::star::uno::RuntimeException
);
132 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> SAL_CALL
getDownBar()
133 throw( ::com::sun::star::uno::RuntimeException
);
134 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> SAL_CALL
getMinMaxLine()
135 throw( ::com::sun::star::uno::RuntimeException
);
138 virtual ::rtl::OUString SAL_CALL
getServiceName() throw( ::com::sun::star::uno::RuntimeException
);
141 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw( ::com::sun::star::uno::RuntimeException
);
142 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
143 throw( ::com::sun::star::uno::RuntimeException
);
144 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
145 throw( ::com::sun::star::uno::RuntimeException
);
148 virtual void SAL_CALL
refresh() throw( ::com::sun::star::uno::RuntimeException
);
149 virtual void SAL_CALL
addRefreshListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XRefreshListener
>& l
)
150 throw( ::com::sun::star::uno::RuntimeException
);
151 virtual void SAL_CALL
removeRefreshListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XRefreshListener
>& l
)
152 throw( ::com::sun::star::uno::RuntimeException
);
155 virtual void SAL_CALL
setLocale( const ::com::sun::star::lang::Locale
& eLocale
)
156 throw( ::com::sun::star::uno::RuntimeException
);
157 virtual ::com::sun::star::lang::Locale SAL_CALL
getLocale()
158 throw( ::com::sun::star::uno::RuntimeException
);
161 #endif // _SAMPLEADDIN_HXX_