LCOV - code coverage report
Current view: top level - sc/inc - funcuno.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 3 0.0 %
Date: 2014-04-14 Functions: 0 3 0.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 SC_FUNCUNO_HXX
      21             : #define SC_FUNCUNO_HXX
      22             : 
      23             : #include <com/sun/star/lang/XServiceInfo.hpp>
      24             : #include <com/sun/star/sheet/XFunctionAccess.hpp>
      25             : #include <com/sun/star/beans/XPropertySet.hpp>
      26             : #include <cppuhelper/implbase3.hxx>
      27             : #include <svl/lstner.hxx>
      28             : 
      29             : class ScDocument;
      30             : class ScDocOptions;
      31             : 
      32             : 
      33             : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
      34             :     ScFunctionAccess_CreateInstance(
      35             :         const ::com::sun::star::uno::Reference<
      36             :             ::com::sun::star::lang::XMultiServiceFactory >& );
      37             : 
      38             : 
      39             : class ScTempDocCache
      40             : {
      41             : private:
      42             :     ScDocument*     pDoc;
      43             :     bool            bInUse;
      44             : 
      45             : public:
      46             :                 ScTempDocCache();
      47             :                 ~ScTempDocCache();
      48             : 
      49           0 :     ScDocument* GetDocument() const     { return pDoc; }
      50           0 :     bool        IsInUse() const         { return bInUse; }
      51           0 :     void        SetInUse( bool bSet )   { bInUse = bSet; }
      52             : 
      53             :     void        SetDocument( ScDocument* pNew );
      54             :     void        Clear();
      55             : };
      56             : 
      57             : class ScFunctionAccess : public cppu::WeakImplHelper3<
      58             :                                         com::sun::star::sheet::XFunctionAccess,
      59             :                                         com::sun::star::beans::XPropertySet,
      60             :                                         com::sun::star::lang::XServiceInfo>,
      61             :                          public SfxListener
      62             : {
      63             : private:
      64             :     ScTempDocCache  aDocCache;
      65             :     ScDocOptions*   pOptions;
      66             :     SfxItemPropertyMap aPropertyMap;
      67             :     bool            mbArray;
      68             :     bool            mbValid;
      69             : 
      70             : public:
      71             :                             ScFunctionAccess();
      72             :     virtual                 ~ScFunctionAccess();
      73             : 
      74             :     static OUString  getImplementationName_Static();
      75             :     static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static();
      76             : 
      77             :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
      78             : 
      79             :                             // XFunctionAccess
      80             :     virtual ::com::sun::star::uno::Any SAL_CALL callFunction(
      81             :                                     const OUString& aName,
      82             :                                     const ::com::sun::star::uno::Sequence<
      83             :                                         ::com::sun::star::uno::Any >& aArguments )
      84             :                                 throw (::com::sun::star::container::NoSuchElementException,
      85             :                                        ::com::sun::star::lang::IllegalArgumentException,
      86             :                                        ::com::sun::star::uno::RuntimeException,
      87             :                                        std::exception) SAL_OVERRIDE;
      88             : 
      89             :                             // XPropertySet
      90             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
      91             :                             SAL_CALL getPropertySetInfo()
      92             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      93             :     virtual void SAL_CALL   setPropertyValue( const OUString& aPropertyName,
      94             :                                     const ::com::sun::star::uno::Any& aValue )
      95             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
      96             :                                     ::com::sun::star::beans::PropertyVetoException,
      97             :                                     ::com::sun::star::lang::IllegalArgumentException,
      98             :                                     ::com::sun::star::lang::WrappedTargetException,
      99             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     100             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     101             :                                     const OUString& PropertyName )
     102             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     103             :                                     ::com::sun::star::lang::WrappedTargetException,
     104             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     105             :     virtual void SAL_CALL   addPropertyChangeListener( const OUString& aPropertyName,
     106             :                                     const ::com::sun::star::uno::Reference<
     107             :                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
     108             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     109             :                                     ::com::sun::star::lang::WrappedTargetException,
     110             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     111             :     virtual void SAL_CALL   removePropertyChangeListener( const OUString& aPropertyName,
     112             :                                     const ::com::sun::star::uno::Reference<
     113             :                                         ::com::sun::star::beans::XPropertyChangeListener >& aListener )
     114             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     115             :                                     ::com::sun::star::lang::WrappedTargetException,
     116             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     117             :     virtual void SAL_CALL   addVetoableChangeListener( const OUString& PropertyName,
     118             :                                     const ::com::sun::star::uno::Reference<
     119             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     120             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     121             :                                     ::com::sun::star::lang::WrappedTargetException,
     122             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     123             :     virtual void SAL_CALL   removeVetoableChangeListener( const OUString& PropertyName,
     124             :                                     const ::com::sun::star::uno::Reference<
     125             :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     126             :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     127             :                                     ::com::sun::star::lang::WrappedTargetException,
     128             :                                     ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     129             : 
     130             :                             // XServiceInfo
     131             :     virtual OUString SAL_CALL getImplementationName()
     132             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     133             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
     134             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     135             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
     136             :                                 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     137             : };
     138             : 
     139             : 
     140             : #endif
     141             : 
     142             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10