LCOV - code coverage report
Current view: top level - sc/inc - viewuno.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 1 1 100.0 %
Date: 2014-11-03 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          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 INCLUDED_SC_INC_VIEWUNO_HXX
      21             : #define INCLUDED_SC_INC_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       11972 :     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             : //  ScViewPaneObj for direct use (including OWeakObject)
     130             : 
     131             : class ScViewPaneObj : public ScViewPaneBase, public cppu::OWeakObject
     132             : {
     133             : public:
     134             :                             ScViewPaneObj(ScTabViewShell* pViewSh, sal_uInt16 nP);
     135             :     virtual                 ~ScViewPaneObj();
     136             : 
     137             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
     138             :                                 const ::com::sun::star::uno::Type & rType )
     139             :                                     throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     140             :     virtual void SAL_CALL   acquire() throw() SAL_OVERRIDE;
     141             :     virtual void SAL_CALL   release() throw() SAL_OVERRIDE;
     142             : };
     143             : 
     144             : //  OWeakObject is base of SfxBaseController -> use ScViewPaneBase
     145             : 
     146             : class ScTabViewObj : public ScViewPaneBase,
     147             :                      public SfxBaseController,
     148             :                      public com::sun::star::sheet::XSpreadsheetView,
     149             :                      public com::sun::star::sheet::XEnhancedMouseClickBroadcaster,
     150             :                      public com::sun::star::sheet::XActivationBroadcaster,
     151             :                      public com::sun::star::container::XEnumerationAccess,
     152             :                      public com::sun::star::container::XIndexAccess,
     153             :                      public com::sun::star::view::XSelectionSupplier,
     154             :                      public com::sun::star::beans::XPropertySet,
     155             :                      public com::sun::star::sheet::XViewSplitable,
     156             :                      public com::sun::star::sheet::XViewFreezable,
     157             :                      public com::sun::star::sheet::XRangeSelection,
     158             :                      public com::sun::star::lang::XUnoTunnel,
     159             :                      public com::sun::star::datatransfer::XTransferableSupplier,
     160             :                      public com::sun::star::sheet::XSelectedSheetsSupplier
     161             : {
     162             : private:
     163             :     typedef ::com::sun::star::uno::Reference<
     164             :             ::com::sun::star::sheet::XRangeSelectionListener > XRangeSelectionListenerUnoRef;
     165             :     typedef boost::ptr_vector<XRangeSelectionListenerUnoRef> XRangeSelectionListenerVector;
     166             : 
     167             :     typedef ::com::sun::star::uno::Reference<
     168             :             ::com::sun::star::sheet::XRangeSelectionChangeListener > XRangeSelectionChangeListenerUnoRef;
     169             :     typedef boost::ptr_vector<XRangeSelectionChangeListenerUnoRef> XRangeSelectionChangeListenerVector;
     170             : 
     171             :     typedef ::com::sun::star::uno::Reference<
     172             :             ::com::sun::star::view::XSelectionChangeListener > XSelectionChangeListenerUnoRef;
     173             :     typedef boost::ptr_vector<XSelectionChangeListenerUnoRef> XSelectionChangeListenerVector;
     174             : 
     175             :     typedef ::com::sun::star::uno::Reference<
     176             :             ::com::sun::star::beans::XPropertyChangeListener > XViewPropertyChangeListenerUnoRef;
     177             :     typedef boost::ptr_vector<XViewPropertyChangeListenerUnoRef> XViewPropertyChangeListenerVector;
     178             : 
     179             :     typedef ::com::sun::star::uno::Reference<
     180             :             ::com::sun::star::awt::XEnhancedMouseClickHandler > XMouseClickHandlerUnoRef;
     181             :     typedef boost::ptr_vector<XMouseClickHandlerUnoRef> XMouseClickHandlerVector;
     182             : 
     183             :     typedef ::com::sun::star::uno::Reference<
     184             :             ::com::sun::star::sheet::XActivationEventListener > XActivationEventListenerUnoRef;
     185             :     typedef boost::ptr_vector<XActivationEventListenerUnoRef> XActivationEventListenerVector;
     186             : 
     187             :     SfxItemPropertySet                      aPropSet;
     188             :     XSelectionChangeListenerVector          aSelectionChgListeners;
     189             :     XRangeSelectionListenerVector           aRangeSelListeners;
     190             :     XRangeSelectionChangeListenerVector     aRangeChgListeners;
     191             :     XViewPropertyChangeListenerVector       aPropertyChgListeners;
     192             :     XMouseClickHandlerVector                aMouseClickHandlers;
     193             :     XActivationEventListenerVector          aActivationListeners;
     194             :     SCTAB                                   nPreviousTab;
     195             :     bool                                    bDrawSelModeSet;
     196             :     bool                                    bFilteredRangeSelection;
     197             : 
     198             :     ScViewPaneObj*          GetObjectByIndex_Impl(sal_uInt16 nIndex) const;
     199             :     sal_Int16                   GetZoom(void) const;
     200             :     void                    SetZoom(sal_Int16 Zoom);
     201             :     sal_Int16                   GetZoomType(void) const;
     202             :     void                    SetZoomType(sal_Int16 ZoomType);
     203             : 
     204             :     com::sun::star::uno::Reference< com::sun::star::uno::XInterface > GetClickedObject(const Point& rPoint) const;
     205             :     void                    StartMouseListening();
     206             :     void                    EndMouseListening();
     207             :     void                    StartActivationListening();
     208             :     void                    EndActivationListening();
     209             :     bool                    mbLeftMousePressed;
     210             :     bool                    mbPendingSelectionChanged;
     211             :     ScTabViewObj(); // disabled
     212             : public:
     213             :                             ScTabViewObj(ScTabViewShell* pViewSh);
     214             :     virtual                 ~ScTabViewObj();
     215             : 
     216             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
     217             :                                 const ::com::sun::star::uno::Type & rType )
     218             :                                     throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     219             :     virtual void SAL_CALL   acquire() throw() SAL_OVERRIDE;
     220             :     virtual void SAL_CALL   release() throw() SAL_OVERRIDE;
     221             : 
     222             :     void                    SelectionChanged();
     223             :     void                    VisAreaChanged();
     224             :     // bSameTabButMoved = true if the same sheet as before is activated, used after moving/copying/inserting/deleting a sheet
     225             :     void                    SheetChanged( bool bSameTabButMoved = false );
     226             :     bool                    IsMouseListening() const;
     227             :     bool                    MousePressed( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
     228             :     bool                    MouseReleased( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException);
     229             : 
     230             :     void                    RangeSelDone( const OUString& rText );
     231             :     void                    RangeSelAborted( const OUString& rText );
     232             :     void                    RangeSelChanged( const OUString& rText );
     233             : 
     234             :                             // XSelectionSupplier
     235             :     virtual sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& aSelection )
     236             :                                 throw(::com::sun::star::lang::IllegalArgumentException,
     237             :                                       ::com::sun::star::uno::RuntimeException,
     238             :                                       std::exception) SAL_OVERRIDE;
     239             :     virtual ::com::sun::star::uno::Any SAL_CALL getSelection()
     240             :                                 throw(::com::sun::star::uno::RuntimeException,
     241             :                                       std::exception) SAL_OVERRIDE;
     242             :     virtual void SAL_CALL   addSelectionChangeListener( const ::com::sun::star::uno::Reference<
     243             :                                 ::com::sun::star::view::XSelectionChangeListener >& xListener )
     244             :                                     throw (::com::sun::star::uno::RuntimeException,
     245             :                                            std::exception) SAL_OVERRIDE;
     246             :     virtual void SAL_CALL   removeSelectionChangeListener( const ::com::sun::star::uno::Reference<
     247             :                                 ::com::sun::star::view::XSelectionChangeListener >& xListener )
     248             :                                     throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     249             : 
     250             :     //! XPrintable?
     251             : 
     252             :                             // XPropertySet
     253             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
     254             :                             SAL_CALL getPropertySetInfo()
     255             :                                 throw(::com::sun::star::uno::RuntimeException,
     256             :                                       std::exception) SAL_OVERRIDE;
     257             :     virtual void SAL_CALL   setPropertyValue( const OUString& aPropertyName,
     258             :                                     const ::com::sun::star::uno::Any& aValue )
     259             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     260             :                                     ::com::sun::star::beans::PropertyVetoException,
     261             :                                     ::com::sun::star::lang::IllegalArgumentException,
     262             :                                     ::com::sun::star::lang::WrappedTargetException,
     263             :                                     ::com::sun::star::uno::RuntimeException,
     264             :                                     std::exception) SAL_OVERRIDE;
     265             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     266             :                                     const OUString& PropertyName )
     267             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     268             :                                     ::com::sun::star::lang::WrappedTargetException,
     269             :                                     ::com::sun::star::uno::RuntimeException,
     270             :                                     std::exception) SAL_OVERRIDE;
     271             :     virtual void SAL_CALL   addPropertyChangeListener( const OUString& aPropertyName,
     272             :                                     const ::com::sun::star::uno::Reference<
     273             :                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
     274             :                                 throw (::com::sun::star::beans::UnknownPropertyException,
     275             :                                        ::com::sun::star::lang::WrappedTargetException,
     276             :                                        ::com::sun::star::uno::RuntimeException,
     277             :                                        std::exception) SAL_OVERRIDE;
     278             :     virtual void SAL_CALL   removePropertyChangeListener( const 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, std::exception) SAL_OVERRIDE;
     284             :     virtual void SAL_CALL   addVetoableChangeListener( const 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, std::exception) SAL_OVERRIDE;
     290             :     virtual void SAL_CALL   removeVetoableChangeListener( const 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, std::exception) SAL_OVERRIDE;
     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, std::exception) SAL_OVERRIDE;
     300             : 
     301             :                             // XIndexAccess
     302             :     virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     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, std::exception) SAL_OVERRIDE;
     307             : 
     308             :                             // XElementAccess
     309             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
     310             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     311             :     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     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, std::exception) SAL_OVERRIDE;
     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             :                                           std::exception) SAL_OVERRIDE;
     320             : 
     321             :                             //XEnhancedMouseClickBroadcaster
     322             : 
     323             :     virtual void SAL_CALL addEnhancedMouseClickHandler( const ::com::sun::star::uno::Reference<
     324             :                                 ::com::sun::star::awt::XEnhancedMouseClickHandler >& aListener )
     325             :                                     throw (::com::sun::star::uno::RuntimeException,
     326             :                                            std::exception) SAL_OVERRIDE;
     327             :     virtual void SAL_CALL removeEnhancedMouseClickHandler( const ::com::sun::star::uno::Reference<
     328             :                                 ::com::sun::star::awt::XEnhancedMouseClickHandler >& aListener )
     329             :                                     throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     330             : 
     331             :                             //XActivationBroadcaster
     332             : 
     333             :     virtual void SAL_CALL addActivationEventListener( const ::com::sun::star::uno::Reference<
     334             :                                 ::com::sun::star::sheet::XActivationEventListener >& aListener )
     335             :                                     throw (::com::sun::star::uno::RuntimeException,
     336             :                                            std::exception) SAL_OVERRIDE;
     337             :     virtual void SAL_CALL removeActivationEventListener( const ::com::sun::star::uno::Reference<
     338             :                                 ::com::sun::star::sheet::XActivationEventListener >& aListener )
     339             :                                     throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     340             : 
     341             :                             // XViewSplitable
     342             :     virtual sal_Bool SAL_CALL getIsWindowSplit() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     343             :     virtual sal_Int32 SAL_CALL getSplitHorizontal() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     344             :     virtual sal_Int32 SAL_CALL getSplitVertical() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     345             :     virtual sal_Int32 SAL_CALL getSplitColumn()
     346             :         throw(::com::sun::star::uno::RuntimeException,
     347             :               std::exception) SAL_OVERRIDE;
     348             :     virtual sal_Int32 SAL_CALL getSplitRow()
     349             :         throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     350             :     virtual void SAL_CALL   splitAtPosition( sal_Int32 nPixelX, sal_Int32 nPixelY )
     351             :                                 throw(::com::sun::star::uno::RuntimeException,
     352             :                                       std::exception) SAL_OVERRIDE;
     353             : 
     354             :                             // XViewFreezable
     355             :     virtual sal_Bool SAL_CALL hasFrozenPanes() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     356             :     virtual void SAL_CALL   freezeAtPosition( sal_Int32 nColumns, sal_Int32 nRows )
     357             :                                 throw(::com::sun::star::uno::RuntimeException,
     358             :                                       std::exception) SAL_OVERRIDE;
     359             : 
     360             :                             // XRangeSelection
     361             :     virtual void SAL_CALL   startRangeSelection( const ::com::sun::star::uno::Sequence<
     362             :                                 ::com::sun::star::beans::PropertyValue >& aArguments )
     363             :                                     throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     364             :     virtual void SAL_CALL   abortRangeSelection() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     365             :     virtual void SAL_CALL   addRangeSelectionListener( const ::com::sun::star::uno::Reference<
     366             :                                 ::com::sun::star::sheet::XRangeSelectionListener >& aListener )
     367             :                                     throw (::com::sun::star::uno::RuntimeException,
     368             :                                            std::exception) SAL_OVERRIDE;
     369             :     virtual void SAL_CALL   removeRangeSelectionListener( const ::com::sun::star::uno::Reference<
     370             :                                 ::com::sun::star::sheet::XRangeSelectionListener >& aListener )
     371             :                                     throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     372             :     virtual void SAL_CALL   addRangeSelectionChangeListener( const ::com::sun::star::uno::Reference<
     373             :                                 ::com::sun::star::sheet::XRangeSelectionChangeListener >& aListener )
     374             :                                     throw (::com::sun::star::uno::RuntimeException,
     375             :                                            std::exception) SAL_OVERRIDE;
     376             :     virtual void SAL_CALL   removeRangeSelectionChangeListener( const ::com::sun::star::uno::Reference<
     377             :                                 ::com::sun::star::sheet::XRangeSelectionChangeListener >& aListener )
     378             :                                     throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     379             : 
     380             :                             // XServiceInfo
     381             :     virtual OUString SAL_CALL getImplementationName()
     382             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     383             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     384             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     385             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     386             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     387             : 
     388             :                             // XUnoTunnel
     389             :     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
     390             :                                     sal_Int8 >& aIdentifier )
     391             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     392             : 
     393             :     static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
     394             :     static ScTabViewObj* getImplementation( const com::sun::star::uno::Reference<
     395             :                                     com::sun::star::uno::XInterface> xObj );
     396             : 
     397             :                             // XTypeProvider
     398             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
     399             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     400             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
     401             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     402             : 
     403             :     // XTransferableSupplier
     404             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getTransferable()
     405             :                                 throw (::com::sun::star::uno::RuntimeException,
     406             :                                        std::exception) SAL_OVERRIDE;
     407             :     virtual void SAL_CALL insertTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans )
     408             :                                 throw(::com::sun::star::datatransfer::UnsupportedFlavorException,
     409             :                                       ::com::sun::star::uno::RuntimeException,
     410             :                                       std::exception) SAL_OVERRIDE;
     411             : 
     412             :     // XSelectedSheetsSupplier
     413             :     virtual ::com::sun::star::uno::Sequence<sal_Int32> SAL_CALL getSelectedSheets()
     414             :         throw(::com::sun::star::uno::RuntimeException,
     415             :               std::exception) SAL_OVERRIDE;
     416             : };
     417             : 
     418             : class ScPreviewObj : public SfxBaseController,
     419             :                      public SfxListener,
     420             :                      public com::sun::star::sheet::XSelectedSheetsSupplier
     421             : {
     422             :     ScPreviewShell* mpViewShell;
     423             : public:
     424             :     ScPreviewObj(ScPreviewShell* pViewSh);
     425             :     virtual ~ScPreviewObj();
     426             : 
     427             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
     428             :         const ::com::sun::star::uno::Type & rType)
     429             :             throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     430             : 
     431             :     virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
     432             :     virtual void SAL_CALL release() throw() SAL_OVERRIDE;
     433             : 
     434             :     virtual void Notify(SfxBroadcaster&, const SfxHint& rHint) SAL_OVERRIDE;
     435             : 
     436             :     // XSelectedSheetsSupplier
     437             :     virtual ::com::sun::star::uno::Sequence<sal_Int32> SAL_CALL getSelectedSheets()
     438             :         throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     439             : };
     440             : 
     441             : #endif
     442             : 
     443             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10