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: linkuno.hxx,v $
10 * $Revision: 1.7.134.9 $
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_LINKUNO_HXX
32 #define SC_LINKUNO_HXX
34 #include <svtools/lstner.hxx>
35 #include <svtools/itemprop.hxx>
36 #include <com/sun/star/sheet/XDDELink.hpp>
37 #include <com/sun/star/sheet/XDDELinkResults.hpp>
38 #include <com/sun/star/sheet/XDDELinks.hpp>
39 #include <com/sun/star/sheet/XExternalDocLink.hpp>
40 #include <com/sun/star/sheet/XExternalDocLinks.hpp>
41 #include <com/sun/star/sheet/XExternalSheetCache.hpp>
42 #include <com/sun/star/sheet/XAreaLink.hpp>
43 #include <com/sun/star/sheet/XAreaLinks.hpp>
44 #include <com/sun/star/util/XRefreshable.hpp>
45 #include <com/sun/star/lang/XServiceInfo.hpp>
46 #include <com/sun/star/beans/XPropertySet.hpp>
47 #include <com/sun/star/container/XEnumerationAccess.hpp>
48 #include <com/sun/star/container/XNameAccess.hpp>
49 #include <com/sun/star/container/XIndexAccess.hpp>
50 #include <com/sun/star/container/XNamed.hpp>
51 #include <cppuhelper/implbase1.hxx>
52 #include <cppuhelper/implbase3.hxx>
53 #include <cppuhelper/implbase4.hxx>
54 #include <cppuhelper/implbase5.hxx>
56 #include "externalrefmgr.hxx"
65 typedef ::com::sun::star::uno::Reference
<
66 ::com::sun::star::util::XRefreshListener
>* XRefreshListenerPtr
;
67 SV_DECL_PTRARR_DEL( XRefreshListenerArr_Impl
, XRefreshListenerPtr
, 4, 4 )
71 class ScSheetLinkObj
: public cppu::WeakImplHelper4
<
72 com::sun::star::container::XNamed
,
73 com::sun::star::util::XRefreshable
,
74 com::sun::star::beans::XPropertySet
,
75 com::sun::star::lang::XServiceInfo
>,
79 SfxItemPropertySet aPropSet
;
80 ScDocShell
* pDocShell
;
82 XRefreshListenerArr_Impl aRefreshListeners
;
84 ScTableLink
* GetLink_Impl() const;
85 void Refreshed_Impl();
86 void ModifyRefreshDelay_Impl( sal_Int32 nRefresh
);
89 ScSheetLinkObj(ScDocShell
* pDocSh
, const String
& rName
);
90 virtual ~ScSheetLinkObj();
92 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
95 virtual ::rtl::OUString SAL_CALL
getName() throw(::com::sun::star::uno::RuntimeException
);
96 virtual void SAL_CALL
setName( const ::rtl::OUString
& aName
)
97 throw(::com::sun::star::uno::RuntimeException
);
100 virtual void SAL_CALL
refresh() throw(::com::sun::star::uno::RuntimeException
);
101 virtual void SAL_CALL
addRefreshListener( const ::com::sun::star::uno::Reference
<
102 ::com::sun::star::util::XRefreshListener
>& l
)
103 throw(::com::sun::star::uno::RuntimeException
);
104 virtual void SAL_CALL
removeRefreshListener( const ::com::sun::star::uno::Reference
<
105 ::com::sun::star::util::XRefreshListener
>& l
)
106 throw(::com::sun::star::uno::RuntimeException
);
109 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
110 SAL_CALL
getPropertySetInfo( )
111 throw(::com::sun::star::uno::RuntimeException
);
112 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
113 const ::com::sun::star::uno::Any
& aValue
)
114 throw(::com::sun::star::beans::UnknownPropertyException
,
115 ::com::sun::star::beans::PropertyVetoException
,
116 ::com::sun::star::lang::IllegalArgumentException
,
117 ::com::sun::star::lang::WrappedTargetException
,
118 ::com::sun::star::uno::RuntimeException
);
119 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
120 const ::rtl::OUString
& PropertyName
)
121 throw(::com::sun::star::beans::UnknownPropertyException
,
122 ::com::sun::star::lang::WrappedTargetException
,
123 ::com::sun::star::uno::RuntimeException
);
124 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
125 const ::com::sun::star::uno::Reference
<
126 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
127 throw(::com::sun::star::beans::UnknownPropertyException
,
128 ::com::sun::star::lang::WrappedTargetException
,
129 ::com::sun::star::uno::RuntimeException
);
130 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
131 const ::com::sun::star::uno::Reference
<
132 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
133 throw(::com::sun::star::beans::UnknownPropertyException
,
134 ::com::sun::star::lang::WrappedTargetException
,
135 ::com::sun::star::uno::RuntimeException
);
136 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
137 const ::com::sun::star::uno::Reference
<
138 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
139 throw(::com::sun::star::beans::UnknownPropertyException
,
140 ::com::sun::star::lang::WrappedTargetException
,
141 ::com::sun::star::uno::RuntimeException
);
142 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
143 const ::com::sun::star::uno::Reference
<
144 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
145 throw(::com::sun::star::beans::UnknownPropertyException
,
146 ::com::sun::star::lang::WrappedTargetException
,
147 ::com::sun::star::uno::RuntimeException
);
149 // aus get/setPropertyValue gerufen:
150 ::rtl::OUString
getFileName(void) const;
151 void setFileName(const ::rtl::OUString
& FileName
);
152 ::rtl::OUString
getFilter(void) const;
153 void setFilter(const ::rtl::OUString
& Filter
);
154 ::rtl::OUString
getFilterOptions(void) const;
155 void setFilterOptions(const ::rtl::OUString
& FilterOptions
);
156 sal_Int32
getRefreshDelay(void) const;
157 void setRefreshDelay(sal_Int32 nRefreshDelay
);
160 virtual ::rtl::OUString SAL_CALL
getImplementationName()
161 throw(::com::sun::star::uno::RuntimeException
);
162 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
163 throw(::com::sun::star::uno::RuntimeException
);
164 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
165 throw(::com::sun::star::uno::RuntimeException
);
169 class ScSheetLinksObj
: public cppu::WeakImplHelper4
<
170 com::sun::star::container::XNameAccess
,
171 com::sun::star::container::XEnumerationAccess
,
172 com::sun::star::container::XIndexAccess
,
173 com::sun::star::lang::XServiceInfo
>,
177 ScDocShell
* pDocShell
;
179 ScSheetLinkObj
* GetObjectByIndex_Impl(INT32 nIndex
);
180 ScSheetLinkObj
* GetObjectByName_Impl(const ::rtl::OUString
& aName
);
183 ScSheetLinksObj(ScDocShell
* pDocSh
);
184 virtual ~ScSheetLinksObj();
186 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
189 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
190 throw(::com::sun::star::container::NoSuchElementException
,
191 ::com::sun::star::lang::WrappedTargetException
,
192 ::com::sun::star::uno::RuntimeException
);
193 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames()
194 throw(::com::sun::star::uno::RuntimeException
);
195 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
196 throw(::com::sun::star::uno::RuntimeException
);
199 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
200 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
201 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
202 ::com::sun::star::lang::WrappedTargetException
,
203 ::com::sun::star::uno::RuntimeException
);
205 // XEnumerationAccess
206 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
207 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
210 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
211 throw(::com::sun::star::uno::RuntimeException
);
212 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
215 virtual ::rtl::OUString SAL_CALL
getImplementationName()
216 throw(::com::sun::star::uno::RuntimeException
);
217 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
218 throw(::com::sun::star::uno::RuntimeException
);
219 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
220 throw(::com::sun::star::uno::RuntimeException
);
224 class ScAreaLinkObj
: public cppu::WeakImplHelper4
<
225 com::sun::star::sheet::XAreaLink
,
226 com::sun::star::util::XRefreshable
,
227 com::sun::star::beans::XPropertySet
,
228 com::sun::star::lang::XServiceInfo
>,
232 SfxItemPropertySet aPropSet
;
233 ScDocShell
* pDocShell
;
235 XRefreshListenerArr_Impl aRefreshListeners
;
237 void Modify_Impl( const ::rtl::OUString
* pNewFile
, const ::rtl::OUString
* pNewFilter
,
238 const ::rtl::OUString
* pNewOptions
, const ::rtl::OUString
* pNewSource
,
239 const com::sun::star::table::CellRangeAddress
* pNewDest
);
240 void ModifyRefreshDelay_Impl( sal_Int32 nRefresh
);
241 void Refreshed_Impl();
244 ScAreaLinkObj(ScDocShell
* pDocSh
, USHORT nP
);
245 virtual ~ScAreaLinkObj();
247 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
250 virtual void SAL_CALL
refresh() throw(::com::sun::star::uno::RuntimeException
);
251 virtual void SAL_CALL
addRefreshListener( const ::com::sun::star::uno::Reference
<
252 ::com::sun::star::util::XRefreshListener
>& l
)
253 throw(::com::sun::star::uno::RuntimeException
);
254 virtual void SAL_CALL
removeRefreshListener( const ::com::sun::star::uno::Reference
<
255 ::com::sun::star::util::XRefreshListener
>& l
)
256 throw(::com::sun::star::uno::RuntimeException
);
259 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
260 SAL_CALL
getPropertySetInfo( )
261 throw(::com::sun::star::uno::RuntimeException
);
262 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
263 const ::com::sun::star::uno::Any
& aValue
)
264 throw(::com::sun::star::beans::UnknownPropertyException
,
265 ::com::sun::star::beans::PropertyVetoException
,
266 ::com::sun::star::lang::IllegalArgumentException
,
267 ::com::sun::star::lang::WrappedTargetException
,
268 ::com::sun::star::uno::RuntimeException
);
269 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
270 const ::rtl::OUString
& PropertyName
)
271 throw(::com::sun::star::beans::UnknownPropertyException
,
272 ::com::sun::star::lang::WrappedTargetException
,
273 ::com::sun::star::uno::RuntimeException
);
274 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
275 const ::com::sun::star::uno::Reference
<
276 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
277 throw(::com::sun::star::beans::UnknownPropertyException
,
278 ::com::sun::star::lang::WrappedTargetException
,
279 ::com::sun::star::uno::RuntimeException
);
280 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
281 const ::com::sun::star::uno::Reference
<
282 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
283 throw(::com::sun::star::beans::UnknownPropertyException
,
284 ::com::sun::star::lang::WrappedTargetException
,
285 ::com::sun::star::uno::RuntimeException
);
286 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
287 const ::com::sun::star::uno::Reference
<
288 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
289 throw(::com::sun::star::beans::UnknownPropertyException
,
290 ::com::sun::star::lang::WrappedTargetException
,
291 ::com::sun::star::uno::RuntimeException
);
292 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
293 const ::com::sun::star::uno::Reference
<
294 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
295 throw(::com::sun::star::beans::UnknownPropertyException
,
296 ::com::sun::star::lang::WrappedTargetException
,
297 ::com::sun::star::uno::RuntimeException
);
299 // aus get/setPropertyValue gerufen:
300 ::rtl::OUString
getFileName(void) const;
301 void setFileName(const ::rtl::OUString
& FileName
);
302 ::rtl::OUString
getFilter(void) const;
303 void setFilter(const ::rtl::OUString
& Filter
);
304 ::rtl::OUString
getFilterOptions(void) const;
305 void setFilterOptions(const ::rtl::OUString
& FilterOptions
);
306 sal_Int32
getRefreshDelay(void) const;
307 void setRefreshDelay(sal_Int32 nRefreshDelay
);
310 virtual ::rtl::OUString SAL_CALL
getSourceArea() throw(::com::sun::star::uno::RuntimeException
);
311 virtual void SAL_CALL
setSourceArea( const ::rtl::OUString
& aSourceArea
)
312 throw(::com::sun::star::uno::RuntimeException
);
313 virtual ::com::sun::star::table::CellRangeAddress SAL_CALL
getDestArea()
314 throw(::com::sun::star::uno::RuntimeException
);
315 virtual void SAL_CALL
setDestArea( const ::com::sun::star::table::CellRangeAddress
& aDestArea
)
316 throw(::com::sun::star::uno::RuntimeException
);
319 virtual ::rtl::OUString SAL_CALL
getImplementationName()
320 throw(::com::sun::star::uno::RuntimeException
);
321 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
322 throw(::com::sun::star::uno::RuntimeException
);
323 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
324 throw(::com::sun::star::uno::RuntimeException
);
328 class ScAreaLinksObj
: public cppu::WeakImplHelper3
<
329 com::sun::star::sheet::XAreaLinks
,
330 com::sun::star::container::XEnumerationAccess
,
331 com::sun::star::lang::XServiceInfo
>,
335 ScDocShell
* pDocShell
;
337 ScAreaLinkObj
* GetObjectByIndex_Impl(INT32 nIndex
);
340 ScAreaLinksObj(ScDocShell
* pDocSh
);
341 virtual ~ScAreaLinksObj();
343 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
346 virtual void SAL_CALL
insertAtPosition( const ::com::sun::star::table::CellAddress
& aDestPos
,
347 const ::rtl::OUString
& aFileName
,
348 const ::rtl::OUString
& aSourceArea
,
349 const ::rtl::OUString
& aFilter
,
350 const ::rtl::OUString
& aFilterOptions
)
351 throw(::com::sun::star::uno::RuntimeException
);
352 virtual void SAL_CALL
removeByIndex( sal_Int32 nIndex
)
353 throw(::com::sun::star::uno::RuntimeException
);
356 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
357 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
358 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
359 ::com::sun::star::lang::WrappedTargetException
,
360 ::com::sun::star::uno::RuntimeException
);
362 // XEnumerationAccess
363 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
364 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
367 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
368 throw(::com::sun::star::uno::RuntimeException
);
369 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
372 virtual ::rtl::OUString SAL_CALL
getImplementationName()
373 throw(::com::sun::star::uno::RuntimeException
);
374 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
375 throw(::com::sun::star::uno::RuntimeException
);
376 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
377 throw(::com::sun::star::uno::RuntimeException
);
381 //! order of XNamed and DDELink changed to avoid "duplicate comdat" symbols
383 class ScDDELinkObj
: public cppu::WeakImplHelper5
<
384 com::sun::star::sheet::XDDELink
,
385 com::sun::star::container::XNamed
,
386 com::sun::star::util::XRefreshable
,
387 com::sun::star::sheet::XDDELinkResults
,
388 com::sun::star::lang::XServiceInfo
>,
392 ScDocShell
* pDocShell
;
396 XRefreshListenerArr_Impl aRefreshListeners
;
398 void Refreshed_Impl();
401 ScDDELinkObj(ScDocShell
* pDocSh
, const String
& rA
,
402 const String
& rT
, const String
& rI
);
403 virtual ~ScDDELinkObj();
405 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
408 virtual ::rtl::OUString SAL_CALL
getName() throw(::com::sun::star::uno::RuntimeException
);
409 virtual void SAL_CALL
setName( const ::rtl::OUString
& aName
)
410 throw(::com::sun::star::uno::RuntimeException
);
413 virtual ::rtl::OUString SAL_CALL
getApplication() throw(::com::sun::star::uno::RuntimeException
);
414 virtual ::rtl::OUString SAL_CALL
getTopic() throw(::com::sun::star::uno::RuntimeException
);
415 virtual ::rtl::OUString SAL_CALL
getItem() throw(::com::sun::star::uno::RuntimeException
);
418 virtual void SAL_CALL
refresh() throw(::com::sun::star::uno::RuntimeException
);
419 virtual void SAL_CALL
addRefreshListener( const ::com::sun::star::uno::Reference
<
420 ::com::sun::star::util::XRefreshListener
>& l
)
421 throw(::com::sun::star::uno::RuntimeException
);
422 virtual void SAL_CALL
removeRefreshListener( const ::com::sun::star::uno::Reference
<
423 ::com::sun::star::util::XRefreshListener
>& l
)
424 throw(::com::sun::star::uno::RuntimeException
);
427 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> >
428 SAL_CALL
getResults( )
429 throw (::com::sun::star::uno::RuntimeException
);
430 virtual void SAL_CALL
setResults(
431 const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> >& aResults
)
432 throw (::com::sun::star::uno::RuntimeException
);
435 virtual ::rtl::OUString SAL_CALL
getImplementationName()
436 throw(::com::sun::star::uno::RuntimeException
);
437 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
438 throw(::com::sun::star::uno::RuntimeException
);
439 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
440 throw(::com::sun::star::uno::RuntimeException
);
444 class ScDDELinksObj
: public cppu::WeakImplHelper4
<
445 com::sun::star::container::XEnumerationAccess
,
446 com::sun::star::container::XIndexAccess
,
447 com::sun::star::sheet::XDDELinks
,
448 com::sun::star::lang::XServiceInfo
>,
452 ScDocShell
* pDocShell
;
454 ScDDELinkObj
* GetObjectByIndex_Impl(INT32 nIndex
);
455 ScDDELinkObj
* GetObjectByName_Impl(const ::rtl::OUString
& aName
);
458 ScDDELinksObj(ScDocShell
* pDocSh
);
459 virtual ~ScDDELinksObj();
461 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
464 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
465 throw(::com::sun::star::container::NoSuchElementException
,
466 ::com::sun::star::lang::WrappedTargetException
,
467 ::com::sun::star::uno::RuntimeException
);
468 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames()
469 throw(::com::sun::star::uno::RuntimeException
);
470 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
471 throw(::com::sun::star::uno::RuntimeException
);
474 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
475 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
476 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
477 ::com::sun::star::lang::WrappedTargetException
,
478 ::com::sun::star::uno::RuntimeException
);
480 // XEnumerationAccess
481 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
482 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
485 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
486 throw(::com::sun::star::uno::RuntimeException
);
487 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
490 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sheet::XDDELink
> SAL_CALL
addDDELink(
491 const ::rtl::OUString
& aApplication
, const ::rtl::OUString
& aTopic
,
492 const ::rtl::OUString
& aItem
, ::com::sun::star::sheet::DDELinkMode nMode
)
493 throw (::com::sun::star::uno::RuntimeException
);
496 virtual ::rtl::OUString SAL_CALL
getImplementationName()
497 throw(::com::sun::star::uno::RuntimeException
);
498 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
499 throw(::com::sun::star::uno::RuntimeException
);
500 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
501 throw(::com::sun::star::uno::RuntimeException
);
504 // ============================================================================
506 class ScExternalSheetCacheObj
: public cppu::WeakImplHelper1
< ::com::sun::star::sheet::XExternalSheetCache
>
509 explicit ScExternalSheetCacheObj(ScExternalRefCache::TableTypeRef pTable
, size_t nIndex
);
510 ~ScExternalSheetCacheObj();
512 // XExternalSheetCache
513 virtual void SAL_CALL
setCellValue(
514 sal_Int32 nCol
, sal_Int32 nRow
, const ::com::sun::star::uno::Any
& rAny
)
515 throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
517 virtual ::com::sun::star::uno::Any SAL_CALL
getCellValue(sal_Int32 nCol
, sal_Int32 nRow
)
518 throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
520 virtual ::com::sun::star::uno::Sequence
< sal_Int32
> SAL_CALL
getAllRows()
521 throw (::com::sun::star::uno::RuntimeException
);
523 virtual ::com::sun::star::uno::Sequence
< sal_Int32
> SAL_CALL
getAllColumns(sal_Int32 nRow
)
524 throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
527 virtual sal_Int32 SAL_CALL
getTokenIndex()
528 throw (::com::sun::star::uno::RuntimeException
);
531 ScExternalSheetCacheObj();
532 ScExternalSheetCacheObj(const ScExternalSheetCacheObj
&);
535 ScExternalRefCache::TableTypeRef mpTable
;
539 // ============================================================================
541 class ScExternalDocLinkObj
: public cppu::WeakImplHelper1
< ::com::sun::star::sheet::XExternalDocLink
>
544 ScExternalDocLinkObj(ScExternalRefManager
* pRefMgr
, sal_uInt16 nFileId
);
545 ~ScExternalDocLinkObj();
548 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sheet::XExternalSheetCache
>
549 SAL_CALL
addSheetCache( const ::rtl::OUString
& aSheetName
)
550 throw (::com::sun::star::uno::RuntimeException
);
553 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
554 throw(::com::sun::star::container::NoSuchElementException
,
555 ::com::sun::star::lang::WrappedTargetException
,
556 ::com::sun::star::uno::RuntimeException
);
557 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames()
558 throw(::com::sun::star::uno::RuntimeException
);
559 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
560 throw(::com::sun::star::uno::RuntimeException
);
563 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
564 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 nIndex
)
565 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
566 ::com::sun::star::lang::WrappedTargetException
,
567 ::com::sun::star::uno::RuntimeException
);
569 // XEnumerationAccess
570 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
571 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
574 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
575 throw(::com::sun::star::uno::RuntimeException
);
576 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
579 virtual sal_Int32 SAL_CALL
getTokenIndex()
580 throw (::com::sun::star::uno::RuntimeException
);
583 ScExternalRefManager
* mpRefMgr
;
587 // ============================================================================
589 /** This is the UNO API equivalent of ScExternalRefManager. */
590 class ScExternalDocLinksObj
: public cppu::WeakImplHelper1
< ::com::sun::star::sheet::XExternalDocLinks
>
593 ScExternalDocLinksObj(ScDocShell
* pDocShell
);
594 ~ScExternalDocLinksObj();
597 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sheet::XExternalDocLink
>
598 SAL_CALL
addDocLink( const ::rtl::OUString
& aDocName
)
599 throw (::com::sun::star::uno::RuntimeException
);
602 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
603 throw(::com::sun::star::container::NoSuchElementException
,
604 ::com::sun::star::lang::WrappedTargetException
,
605 ::com::sun::star::uno::RuntimeException
);
606 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames()
607 throw(::com::sun::star::uno::RuntimeException
);
608 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
609 throw(::com::sun::star::uno::RuntimeException
);
612 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
613 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 nIndex
)
614 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
615 ::com::sun::star::lang::WrappedTargetException
,
616 ::com::sun::star::uno::RuntimeException
);
618 // XEnumerationAccess
619 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
620 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
623 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
624 throw(::com::sun::star::uno::RuntimeException
);
625 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
628 ScExternalDocLinksObj();
629 ScExternalDocLinksObj(const ScExternalDocLinksObj
&);
632 ScDocShell
* mpDocShell
;
633 ScExternalRefManager
* mpRefMgr
;