1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: chartuno.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_CHARTUNO_HXX
32 #define SC_CHARTUNO_HXX
34 #ifndef _SFXLSTNER_HXX //autogen
35 #include <bf_svtools/lstner.hxx>
38 #include <tools/string.hxx>
41 #ifndef _COM_SUN_STAR_TABLE_XTABLECHART_HPP_
42 #include <com/sun/star/table/XTableChart.hpp>
44 #ifndef _COM_SUN_STAR_TABLE_XTABLECHARTS_HPP_
45 #include <com/sun/star/table/XTableCharts.hpp>
47 #ifndef _COM_SUN_STAR_DOCUMENT_XEMBEDDEDOBJECTSUPPLIER_HPP_
48 #include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
50 #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
51 #include <com/sun/star/lang/XServiceInfo.hpp>
53 #ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
54 #include <com/sun/star/container/XEnumerationAccess.hpp>
56 #ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
57 #include <com/sun/star/container/XIndexAccess.hpp>
59 #ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
60 #include <com/sun/star/container/XNamed.hpp>
63 #ifndef _CPPUHELPER_IMPLBASE4_HXX_
64 #include <cppuhelper/implbase4.hxx>
74 class ScChartsObj
: public cppu::WeakImplHelper4
<
75 ::com::sun::star::table::XTableCharts
,
76 ::com::sun::star::container::XEnumerationAccess
,
77 ::com::sun::star::container::XIndexAccess
,
78 ::com::sun::star::lang::XServiceInfo
>,
82 ScDocShell
* pDocShell
;
83 USHORT nTab
; // Charts sind pro Sheet
85 ScChartObj
* GetObjectByIndex_Impl(long nIndex
) const;
86 ScChartObj
* GetObjectByName_Impl(const ::rtl::OUString
& aName
) const;
89 ScChartsObj(ScDocShell
* pDocSh
, USHORT nT
);
90 virtual ~ScChartsObj();
92 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
95 virtual void SAL_CALL
addNewByName( const ::rtl::OUString
& aName
,
96 const ::com::sun::star::awt::Rectangle
& aRect
,
97 const ::com::sun::star::uno::Sequence
<
98 ::com::sun::star::table::CellRangeAddress
>& aRanges
,
99 sal_Bool bColumnHeaders
, sal_Bool bRowHeaders
)
100 throw(::com::sun::star::uno::RuntimeException
);
101 virtual void SAL_CALL
removeByName( const ::rtl::OUString
& aName
)
102 throw(::com::sun::star::uno::RuntimeException
);
105 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
106 throw(::com::sun::star::container::NoSuchElementException
,
107 ::com::sun::star::lang::WrappedTargetException
,
108 ::com::sun::star::uno::RuntimeException
);
109 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames()
110 throw(::com::sun::star::uno::RuntimeException
);
111 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
112 throw(::com::sun::star::uno::RuntimeException
);
115 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
116 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
117 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
118 ::com::sun::star::lang::WrappedTargetException
,
119 ::com::sun::star::uno::RuntimeException
);
121 // XEnumerationAccess
122 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
123 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
126 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
127 throw(::com::sun::star::uno::RuntimeException
);
128 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
131 virtual ::rtl::OUString SAL_CALL
getImplementationName()
132 throw(::com::sun::star::uno::RuntimeException
);
133 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
134 throw(::com::sun::star::uno::RuntimeException
);
135 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
136 throw(::com::sun::star::uno::RuntimeException
);
140 class ScChartObj
: public cppu::WeakImplHelper4
<
141 ::com::sun::star::table::XTableChart
,
142 ::com::sun::star::document::XEmbeddedObjectSupplier
,
143 ::com::sun::star::container::XNamed
,
144 ::com::sun::star::lang::XServiceInfo
>,
148 ScDocShell
* pDocShell
;
149 USHORT nTab
; // Charts sind pro Sheet
152 void Update_Impl( const ScRangeListRef
& rRanges
, BOOL bColHeaders
, BOOL bRowHeaders
);
153 void GetData_Impl( ScRangeListRef
& rRanges
, BOOL
& rColHeaders
, BOOL
& rRowHeaders
) const;
156 ScChartObj(ScDocShell
* pDocSh
, USHORT nT
, const String
& rN
);
157 virtual ~ScChartObj();
159 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
162 virtual sal_Bool SAL_CALL
getHasColumnHeaders() throw(::com::sun::star::uno::RuntimeException
);
163 virtual void SAL_CALL
setHasColumnHeaders( sal_Bool bHasColumnHeaders
)
164 throw(::com::sun::star::uno::RuntimeException
);
165 virtual sal_Bool SAL_CALL
getHasRowHeaders() throw(::com::sun::star::uno::RuntimeException
);
166 virtual void SAL_CALL
setHasRowHeaders( sal_Bool bHasRowHeaders
)
167 throw(::com::sun::star::uno::RuntimeException
);
168 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::table::CellRangeAddress
> SAL_CALL
169 getRanges( ) throw(::com::sun::star::uno::RuntimeException
);
170 virtual void SAL_CALL
setRanges( const ::com::sun::star::uno::Sequence
<
171 ::com::sun::star::table::CellRangeAddress
>& aRanges
)
172 throw(::com::sun::star::uno::RuntimeException
);
174 // XEmbeddedObjectSupplier
175 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
> SAL_CALL
176 getEmbeddedObject() throw(::com::sun::star::uno::RuntimeException
);
179 virtual ::rtl::OUString SAL_CALL
getName() throw(::com::sun::star::uno::RuntimeException
);
180 virtual void SAL_CALL
setName( const ::rtl::OUString
& aName
)
181 throw(::com::sun::star::uno::RuntimeException
);
184 virtual ::rtl::OUString SAL_CALL
getImplementationName()
185 throw(::com::sun::star::uno::RuntimeException
);
186 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
187 throw(::com::sun::star::uno::RuntimeException
);
188 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
189 throw(::com::sun::star::uno::RuntimeException
);
192 } //namespace binfilter