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