Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef SC_VIEWUNO_HXX
30 : : #define SC_VIEWUNO_HXX
31 : :
32 : : #include <sfx2/sfxbasecontroller.hxx>
33 : : #include <svl/itemprop.hxx>
34 : : #include <com/sun/star/view/XFormLayerAccess.hpp>
35 : : #include <com/sun/star/view/XSelectionChangeListener.hpp>
36 : : #include <com/sun/star/view/XSelectionSupplier.hpp>
37 : : #include <com/sun/star/sheet/XCellRangeReferrer.hpp>
38 : : #include <com/sun/star/sheet/XViewSplitable.hpp>
39 : : #include <com/sun/star/sheet/XViewFreezable.hpp>
40 : : #include <com/sun/star/sheet/XSelectedSheetsSupplier.hpp>
41 : : #include <com/sun/star/sheet/XSpreadsheetView.hpp>
42 : : #include <com/sun/star/sheet/XEnhancedMouseClickBroadcaster.hpp>
43 : : #include <com/sun/star/sheet/XActivationBroadcaster.hpp>
44 : : #include <com/sun/star/sheet/XViewPane.hpp>
45 : : #include <com/sun/star/sheet/XRangeSelection.hpp>
46 : : #include <com/sun/star/lang/XServiceInfo.hpp>
47 : : #include <com/sun/star/container/XEnumerationAccess.hpp>
48 : : #include <com/sun/star/beans/XPropertySet.hpp>
49 : : #include <com/sun/star/lang/XUnoTunnel.hpp>
50 : : #include <com/sun/star/datatransfer/XTransferableSupplier.hpp>
51 : :
52 : : #include "address.hxx"
53 : : #include "boost/ptr_container/ptr_vector.hpp"
54 : :
55 : : class ScTabViewShell;
56 : : class ScPreviewShell;
57 : :
58 : : #define SC_VIEWPANE_ACTIVE 0xFFFF
59 : :
60 : : // ScViewPaneBase not derived from OWeakObject
61 : : // to avoid duplicate OWeakObject in ScTabViewObj
62 : :
63 : : class ScViewPaneBase : public com::sun::star::sheet::XViewPane,
64 : : public com::sun::star::sheet::XCellRangeReferrer,
65 : : public com::sun::star::view::XFormLayerAccess,
66 : : public com::sun::star::lang::XServiceInfo,
67 : : public com::sun::star::lang::XTypeProvider,
68 : : public SfxListener
69 : : {
70 : : private:
71 : : ScTabViewShell* pViewShell;
72 : : sal_uInt16 nPane; // ScSplitPos oder SC_VIEWPANE_ACTIVE
73 : :
74 : : protected:
75 : : ::com::sun::star::awt::Rectangle GetVisArea() const;
76 : :
77 : : public:
78 : : ScViewPaneBase(ScTabViewShell* pViewSh, sal_uInt16 nP);
79 : : virtual ~ScViewPaneBase();
80 : :
81 : 1047 : ScTabViewShell* GetViewShell() const { return pViewShell; }
82 : :
83 : : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
84 : : const ::com::sun::star::uno::Type & rType )
85 : : throw(::com::sun::star::uno::RuntimeException);
86 : :
87 : : virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
88 : :
89 : : // XViewPane
90 : : virtual sal_Int32 SAL_CALL getFirstVisibleColumn() throw(::com::sun::star::uno::RuntimeException);
91 : : virtual void SAL_CALL setFirstVisibleColumn( sal_Int32 nFirstVisibleColumn )
92 : : throw(::com::sun::star::uno::RuntimeException);
93 : : virtual sal_Int32 SAL_CALL getFirstVisibleRow() throw(::com::sun::star::uno::RuntimeException);
94 : : virtual void SAL_CALL setFirstVisibleRow( sal_Int32 nFirstVisibleRow )
95 : : throw(::com::sun::star::uno::RuntimeException);
96 : : virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getVisibleRange()
97 : : throw(::com::sun::star::uno::RuntimeException);
98 : :
99 : : // XCellRangeReferrer
100 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
101 : : getReferredCells() throw(::com::sun::star::uno::RuntimeException);
102 : :
103 : : // XFormLayerAccess
104 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > SAL_CALL
105 : : getFormController( const ::com::sun::star::uno::Reference<
106 : : ::com::sun::star::form::XForm >& Form )
107 : : throw (::com::sun::star::uno::RuntimeException);
108 : : virtual ::sal_Bool SAL_CALL
109 : : isFormDesignMode( )
110 : : throw (::com::sun::star::uno::RuntimeException);
111 : : virtual void SAL_CALL setFormDesignMode( ::sal_Bool DesignMode )
112 : : throw (::com::sun::star::uno::RuntimeException);
113 : :
114 : : // XControlAccess
115 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > SAL_CALL
116 : : getControl( const ::com::sun::star::uno::Reference<
117 : : ::com::sun::star::awt::XControlModel >& xModel )
118 : : throw(::com::sun::star::container::NoSuchElementException,
119 : : ::com::sun::star::uno::RuntimeException);
120 : :
121 : : // XServiceInfo
122 : : virtual ::rtl::OUString SAL_CALL getImplementationName()
123 : : throw(::com::sun::star::uno::RuntimeException);
124 : : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
125 : : throw(::com::sun::star::uno::RuntimeException);
126 : : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
127 : : throw(::com::sun::star::uno::RuntimeException);
128 : :
129 : : // XTypeProvider
130 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
131 : : throw(::com::sun::star::uno::RuntimeException);
132 : : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
133 : : throw(::com::sun::star::uno::RuntimeException);
134 : : };
135 : :
136 : :
137 : : // ScViewPaneObj for direct use (including OWeakObject)
138 : :
139 : : class ScViewPaneObj : public ScViewPaneBase, public cppu::OWeakObject
140 : : {
141 : : public:
142 : : ScViewPaneObj(ScTabViewShell* pViewSh, sal_uInt16 nP);
143 : : virtual ~ScViewPaneObj();
144 : :
145 : : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
146 : : const ::com::sun::star::uno::Type & rType )
147 : : throw(::com::sun::star::uno::RuntimeException);
148 : : virtual void SAL_CALL acquire() throw();
149 : : virtual void SAL_CALL release() throw();
150 : : };
151 : :
152 : : // OWeakObject is base of SfxBaseController -> use ScViewPaneBase
153 : :
154 : : class ScTabViewObj : public ScViewPaneBase,
155 : : public SfxBaseController,
156 : : public com::sun::star::sheet::XSpreadsheetView,
157 : : public com::sun::star::sheet::XEnhancedMouseClickBroadcaster,
158 : : public com::sun::star::sheet::XActivationBroadcaster,
159 : : public com::sun::star::container::XEnumerationAccess,
160 : : public com::sun::star::container::XIndexAccess,
161 : : public com::sun::star::view::XSelectionSupplier,
162 : : public com::sun::star::beans::XPropertySet,
163 : : public com::sun::star::sheet::XViewSplitable,
164 : : public com::sun::star::sheet::XViewFreezable,
165 : : public com::sun::star::sheet::XRangeSelection,
166 : : public com::sun::star::lang::XUnoTunnel,
167 : : public com::sun::star::datatransfer::XTransferableSupplier,
168 : : public com::sun::star::sheet::XSelectedSheetsSupplier
169 : : {
170 : : private:
171 : : typedef ::com::sun::star::uno::Reference<
172 : : ::com::sun::star::sheet::XRangeSelectionListener > XRangeSelectionListenerUnoRef;
173 : : typedef boost::ptr_vector<XRangeSelectionListenerUnoRef> XRangeSelectionListenerVector;
174 : :
175 : : typedef ::com::sun::star::uno::Reference<
176 : : ::com::sun::star::sheet::XRangeSelectionChangeListener > XRangeSelectionChangeListenerUnoRef;
177 : : typedef boost::ptr_vector<XRangeSelectionChangeListenerUnoRef> XRangeSelectionChangeListenerVector;
178 : :
179 : : typedef ::com::sun::star::uno::Reference<
180 : : ::com::sun::star::view::XSelectionChangeListener > XSelectionChangeListenerUnoRef;
181 : : typedef boost::ptr_vector<XSelectionChangeListenerUnoRef> XSelectionChangeListenerVector;
182 : :
183 : : typedef ::com::sun::star::uno::Reference<
184 : : ::com::sun::star::beans::XPropertyChangeListener > XViewPropertyChangeListenerUnoRef;
185 : : typedef boost::ptr_vector<XViewPropertyChangeListenerUnoRef> XViewPropertyChangeListenerVector;
186 : :
187 : : typedef ::com::sun::star::uno::Reference<
188 : : ::com::sun::star::awt::XEnhancedMouseClickHandler > XMouseClickHandlerUnoRef;
189 : : typedef boost::ptr_vector<XMouseClickHandlerUnoRef> XMouseClickHandlerVector;
190 : :
191 : : typedef ::com::sun::star::uno::Reference<
192 : : ::com::sun::star::sheet::XActivationEventListener > XActivationEventListenerUnoRef;
193 : : typedef boost::ptr_vector<XActivationEventListenerUnoRef> XActivationEventListenerVector;
194 : :
195 : : SfxItemPropertySet aPropSet;
196 : : XSelectionChangeListenerVector aSelectionChgListeners;
197 : : XRangeSelectionListenerVector aRangeSelListeners;
198 : : XRangeSelectionChangeListenerVector aRangeChgListeners;
199 : : XViewPropertyChangeListenerVector aPropertyChgListeners;
200 : : XMouseClickHandlerVector aMouseClickHandlers;
201 : : XActivationEventListenerVector aActivationListeners;
202 : : SCTAB nPreviousTab;
203 : : sal_Bool bDrawSelModeSet;
204 : : sal_Bool bFilteredRangeSelection;
205 : :
206 : : ScViewPaneObj* GetObjectByIndex_Impl(sal_uInt16 nIndex) const;
207 : : sal_Int16 GetZoom(void) const;
208 : : void SetZoom(sal_Int16 Zoom);
209 : : sal_Int16 GetZoomType(void) const;
210 : : void SetZoomType(sal_Int16 ZoomType);
211 : :
212 : : com::sun::star::uno::Reference< com::sun::star::uno::XInterface > GetClickedObject(const Point& rPoint) const;
213 : : void StartMouseListening();
214 : : void EndMouseListening();
215 : : void StartActivationListening();
216 : : void EndActivationListening();
217 : :
218 : : ScTabViewObj(); // disabled
219 : : public:
220 : : ScTabViewObj(ScTabViewShell* pViewSh);
221 : : virtual ~ScTabViewObj();
222 : :
223 : : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
224 : : const ::com::sun::star::uno::Type & rType )
225 : : throw(::com::sun::star::uno::RuntimeException);
226 : : virtual void SAL_CALL acquire() throw();
227 : : virtual void SAL_CALL release() throw();
228 : :
229 : : void SelectionChanged();
230 : : void VisAreaChanged();
231 : : // bSameTabButMoved = true if the same sheet as before is activated, used after moving/copying/inserting/deleting a sheet
232 : : void SheetChanged( bool bSameTabButMoved = false );
233 : : bool IsMouseListening() const;
234 : : sal_Bool MousePressed( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
235 : : sal_Bool MouseReleased( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
236 : :
237 : : void RangeSelDone( const String& rText );
238 : : void RangeSelAborted( const String& rText );
239 : : void RangeSelChanged( const String& rText );
240 : :
241 : : // XSelectionSupplier
242 : : virtual sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& aSelection )
243 : : throw(::com::sun::star::lang::IllegalArgumentException,
244 : : ::com::sun::star::uno::RuntimeException);
245 : : virtual ::com::sun::star::uno::Any SAL_CALL getSelection()
246 : : throw(::com::sun::star::uno::RuntimeException);
247 : : virtual void SAL_CALL addSelectionChangeListener( const ::com::sun::star::uno::Reference<
248 : : ::com::sun::star::view::XSelectionChangeListener >& xListener )
249 : : throw(::com::sun::star::uno::RuntimeException);
250 : : virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference<
251 : : ::com::sun::star::view::XSelectionChangeListener >& xListener )
252 : : throw(::com::sun::star::uno::RuntimeException);
253 : :
254 : : //! XPrintable?
255 : :
256 : : // XPropertySet
257 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
258 : : SAL_CALL getPropertySetInfo()
259 : : throw(::com::sun::star::uno::RuntimeException);
260 : : virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
261 : : const ::com::sun::star::uno::Any& aValue )
262 : : throw(::com::sun::star::beans::UnknownPropertyException,
263 : : ::com::sun::star::beans::PropertyVetoException,
264 : : ::com::sun::star::lang::IllegalArgumentException,
265 : : ::com::sun::star::lang::WrappedTargetException,
266 : : ::com::sun::star::uno::RuntimeException);
267 : : virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
268 : : const ::rtl::OUString& PropertyName )
269 : : throw(::com::sun::star::beans::UnknownPropertyException,
270 : : ::com::sun::star::lang::WrappedTargetException,
271 : : ::com::sun::star::uno::RuntimeException);
272 : : virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
273 : : const ::com::sun::star::uno::Reference<
274 : : ::com::sun::star::beans::XPropertyChangeListener >& xListener )
275 : : throw(::com::sun::star::beans::UnknownPropertyException,
276 : : ::com::sun::star::lang::WrappedTargetException,
277 : : ::com::sun::star::uno::RuntimeException);
278 : : virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
279 : : const ::com::sun::star::uno::Reference<
280 : : ::com::sun::star::beans::XPropertyChangeListener >& aListener )
281 : : throw(::com::sun::star::beans::UnknownPropertyException,
282 : : ::com::sun::star::lang::WrappedTargetException,
283 : : ::com::sun::star::uno::RuntimeException);
284 : : virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
285 : : const ::com::sun::star::uno::Reference<
286 : : ::com::sun::star::beans::XVetoableChangeListener >& aListener )
287 : : throw(::com::sun::star::beans::UnknownPropertyException,
288 : : ::com::sun::star::lang::WrappedTargetException,
289 : : ::com::sun::star::uno::RuntimeException);
290 : : virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
291 : : const ::com::sun::star::uno::Reference<
292 : : ::com::sun::star::beans::XVetoableChangeListener >& aListener )
293 : : throw(::com::sun::star::beans::UnknownPropertyException,
294 : : ::com::sun::star::lang::WrappedTargetException,
295 : : ::com::sun::star::uno::RuntimeException);
296 : :
297 : : // XEnumerationAccess
298 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
299 : : createEnumeration() throw(::com::sun::star::uno::RuntimeException);
300 : :
301 : : // XIndexAccess
302 : : virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
303 : : virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
304 : : throw(::com::sun::star::lang::IndexOutOfBoundsException,
305 : : ::com::sun::star::lang::WrappedTargetException,
306 : : ::com::sun::star::uno::RuntimeException);
307 : :
308 : : // XElementAccess
309 : : virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
310 : : throw(::com::sun::star::uno::RuntimeException);
311 : : virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
312 : :
313 : : // XSpreadsheetView
314 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > SAL_CALL
315 : : getActiveSheet() throw(::com::sun::star::uno::RuntimeException);
316 : : virtual void SAL_CALL setActiveSheet( const ::com::sun::star::uno::Reference<
317 : : ::com::sun::star::sheet::XSpreadsheet >& xActiveSheet )
318 : : throw(::com::sun::star::uno::RuntimeException);
319 : :
320 : : // support expand (but not replace) the active sheet
321 : : virtual void SAL_CALL selectSheet( const ::com::sun::star::uno::Reference<
322 : : ::com::sun::star::sheet::XSpreadsheet >& xActiveSheet,
323 : : sal_Bool bExpand)
324 : : throw(::com::sun::star::uno::RuntimeException);
325 : : //XEnhancedMouseClickBroadcaster
326 : :
327 : : virtual void SAL_CALL addEnhancedMouseClickHandler( const ::com::sun::star::uno::Reference<
328 : : ::com::sun::star::awt::XEnhancedMouseClickHandler >& aListener )
329 : : throw (::com::sun::star::uno::RuntimeException);
330 : : virtual void SAL_CALL removeEnhancedMouseClickHandler( const ::com::sun::star::uno::Reference<
331 : : ::com::sun::star::awt::XEnhancedMouseClickHandler >& aListener )
332 : : throw (::com::sun::star::uno::RuntimeException);
333 : :
334 : : //XActivationBroadcaster
335 : :
336 : : virtual void SAL_CALL addActivationEventListener( const ::com::sun::star::uno::Reference<
337 : : ::com::sun::star::sheet::XActivationEventListener >& aListener )
338 : : throw (::com::sun::star::uno::RuntimeException);
339 : : virtual void SAL_CALL removeActivationEventListener( const ::com::sun::star::uno::Reference<
340 : : ::com::sun::star::sheet::XActivationEventListener >& aListener )
341 : : throw (::com::sun::star::uno::RuntimeException);
342 : :
343 : : // XViewSplitable
344 : : virtual sal_Bool SAL_CALL getIsWindowSplit() throw(::com::sun::star::uno::RuntimeException);
345 : : virtual sal_Int32 SAL_CALL getSplitHorizontal() throw(::com::sun::star::uno::RuntimeException);
346 : : virtual sal_Int32 SAL_CALL getSplitVertical() throw(::com::sun::star::uno::RuntimeException);
347 : : virtual sal_Int32 SAL_CALL getSplitColumn() throw(::com::sun::star::uno::RuntimeException);
348 : : virtual sal_Int32 SAL_CALL getSplitRow() throw(::com::sun::star::uno::RuntimeException);
349 : : virtual void SAL_CALL splitAtPosition( sal_Int32 nPixelX, sal_Int32 nPixelY )
350 : : throw(::com::sun::star::uno::RuntimeException);
351 : :
352 : : // XViewFreezable
353 : : virtual sal_Bool SAL_CALL hasFrozenPanes() throw(::com::sun::star::uno::RuntimeException);
354 : : virtual void SAL_CALL freezeAtPosition( sal_Int32 nColumns, sal_Int32 nRows )
355 : : throw(::com::sun::star::uno::RuntimeException);
356 : :
357 : : // XRangeSelection
358 : : virtual void SAL_CALL startRangeSelection( const ::com::sun::star::uno::Sequence<
359 : : ::com::sun::star::beans::PropertyValue >& aArguments )
360 : : throw(::com::sun::star::uno::RuntimeException);
361 : : virtual void SAL_CALL abortRangeSelection() throw(::com::sun::star::uno::RuntimeException);
362 : : virtual void SAL_CALL addRangeSelectionListener( const ::com::sun::star::uno::Reference<
363 : : ::com::sun::star::sheet::XRangeSelectionListener >& aListener )
364 : : throw(::com::sun::star::uno::RuntimeException);
365 : : virtual void SAL_CALL removeRangeSelectionListener( const ::com::sun::star::uno::Reference<
366 : : ::com::sun::star::sheet::XRangeSelectionListener >& aListener )
367 : : throw(::com::sun::star::uno::RuntimeException);
368 : : virtual void SAL_CALL addRangeSelectionChangeListener( const ::com::sun::star::uno::Reference<
369 : : ::com::sun::star::sheet::XRangeSelectionChangeListener >& aListener )
370 : : throw(::com::sun::star::uno::RuntimeException);
371 : : virtual void SAL_CALL removeRangeSelectionChangeListener( const ::com::sun::star::uno::Reference<
372 : : ::com::sun::star::sheet::XRangeSelectionChangeListener >& aListener )
373 : : throw(::com::sun::star::uno::RuntimeException);
374 : :
375 : : // XServiceInfo
376 : : virtual ::rtl::OUString SAL_CALL getImplementationName()
377 : : throw(::com::sun::star::uno::RuntimeException);
378 : : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
379 : : throw(::com::sun::star::uno::RuntimeException);
380 : : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
381 : : throw(::com::sun::star::uno::RuntimeException);
382 : :
383 : : // XUnoTunnel
384 : : virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
385 : : sal_Int8 >& aIdentifier )
386 : : throw(::com::sun::star::uno::RuntimeException);
387 : :
388 : : static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
389 : : static ScTabViewObj* getImplementation( const com::sun::star::uno::Reference<
390 : : com::sun::star::uno::XInterface> xObj );
391 : :
392 : : // XTypeProvider
393 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
394 : : throw(::com::sun::star::uno::RuntimeException);
395 : : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
396 : : throw(::com::sun::star::uno::RuntimeException);
397 : :
398 : : // XTransferableSupplier
399 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getTransferable( ) throw (::com::sun::star::uno::RuntimeException);
400 : : virtual void SAL_CALL insertTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans ) throw (::com::sun::star::datatransfer::UnsupportedFlavorException, ::com::sun::star::uno::RuntimeException);
401 : :
402 : : // XSelectedSheetsSupplier
403 : : virtual ::com::sun::star::uno::Sequence<sal_Int32> SAL_CALL getSelectedSheets()
404 : : throw(::com::sun::star::uno::RuntimeException);
405 : : };
406 : :
407 : : class ScPreviewObj : public SfxBaseController,
408 : : public SfxListener,
409 : : public com::sun::star::sheet::XSelectedSheetsSupplier
410 : : {
411 : : ScPreviewShell* mpViewShell;
412 : : public:
413 : : ScPreviewObj(ScPreviewShell* pViewSh);
414 : : virtual ~ScPreviewObj();
415 : :
416 : : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
417 : : const ::com::sun::star::uno::Type & rType)
418 : : throw(::com::sun::star::uno::RuntimeException);
419 : :
420 : : virtual void SAL_CALL acquire() throw();
421 : : virtual void SAL_CALL release() throw();
422 : :
423 : : virtual void Notify(SfxBroadcaster&, const SfxHint& rHint);
424 : :
425 : : // XSelectedSheetsSupplier
426 : : virtual ::com::sun::star::uno::Sequence<sal_Int32> SAL_CALL getSelectedSheets()
427 : : throw(::com::sun::star::uno::RuntimeException);
428 : : };
429 : :
430 : : #endif
431 : :
432 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|