LCOV - code coverage report
Current view: top level - sc/inc - tokenuno.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 1 100.0 %
Date: 2012-08-25 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

           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_TOKENUNO_HXX
      30                 :            : #define SC_TOKENUNO_HXX
      31                 :            : 
      32                 :            : #include <com/sun/star/uno/Sequence.hxx>
      33                 :            : #include <com/sun/star/lang/XServiceInfo.hpp>
      34                 :            : #include <com/sun/star/beans/XPropertySet.hpp>
      35                 :            : #include <com/sun/star/sheet/FormulaOpCodeMapEntry.hpp>
      36                 :            : #include <com/sun/star/sheet/FormulaToken.hpp>
      37                 :            : #include <com/sun/star/sheet/XFormulaParser.hpp>
      38                 :            : #include <cppuhelper/implbase3.hxx>
      39                 :            : #include <svl/lstner.hxx>
      40                 :            : #include <formula/FormulaOpCodeMapperObj.hxx>
      41                 :            : #include "address.hxx"
      42                 :            : #include "compiler.hxx"
      43                 :            : 
      44                 :            : class ScTokenArray;
      45                 :            : class ScDocShell;
      46                 :            : 
      47                 :            : // ============================================================================
      48                 :            : 
      49                 :            : class ScTokenConversion
      50                 :            : {
      51                 :            : public:
      52                 :            :     static SC_DLLPUBLIC bool ConvertToTokenArray(
      53                 :            :                         ScDocument& rDoc,
      54                 :            :                         ScTokenArray& rTokenArray,
      55                 :            :                         const com::sun::star::uno::Sequence< com::sun::star::sheet::FormulaToken >& rSequence );
      56                 :            :     static SC_DLLPUBLIC bool ConvertToTokenSequence(
      57                 :            :                         ScDocument& rDoc,
      58                 :            :                         com::sun::star::uno::Sequence< com::sun::star::sheet::FormulaToken >& rSequence,
      59                 :            :                         const ScTokenArray& rTokenArray );
      60                 :            : };
      61                 :            : 
      62                 :            : // ============================================================================
      63                 :            : 
      64                 :            : class ScFormulaParserObj : public ::cppu::WeakImplHelper3<
      65                 :            :                             ::com::sun::star::sheet::XFormulaParser,
      66                 :            :                             ::com::sun::star::beans::XPropertySet,
      67                 :            :                             ::com::sun::star::lang::XServiceInfo >,
      68                 :            :                         public SfxListener
      69                 :            : {
      70                 :            : private:
      71                 :            :     ::com::sun::star::uno::Sequence< const ::com::sun::star::sheet::FormulaOpCodeMapEntry > maOpCodeMapping;
      72                 :            :     ::com::sun::star::uno::Sequence< const ::com::sun::star::sheet::ExternalLinkInfo > maExternalLinks;
      73                 :            :     ScCompiler::OpCodeMapPtr    mxOpCodeMap;
      74                 :            :     ScDocShell*         mpDocShell;
      75                 :            :     sal_Int16           mnConv;
      76                 :            :     bool                mbEnglish;
      77                 :            :     bool                mbIgnoreSpaces;
      78                 :            :     bool                mbCompileFAP;
      79                 :            : 
      80                 :            :     void                    SetCompilerFlags( ScCompiler& rCompiler ) const;
      81                 :            : 
      82                 :            : public:
      83                 :            :                             ScFormulaParserObj(ScDocShell* pDocSh);
      84                 :            :     virtual                 ~ScFormulaParserObj();
      85                 :            : 
      86                 :            :     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
      87                 :            : 
      88                 :            :                             // XFormulaParser
      89                 :            :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > SAL_CALL parseFormula(
      90                 :            :                                     const ::rtl::OUString& aFormula,
      91                 :            :                                     const ::com::sun::star::table::CellAddress& rReferencePos )
      92                 :            :                                 throw (::com::sun::star::uno::RuntimeException);
      93                 :            :     virtual ::rtl::OUString SAL_CALL printFormula( const ::com::sun::star::uno::Sequence<
      94                 :            :                                     ::com::sun::star::sheet::FormulaToken >& aTokens,
      95                 :            :                                     const ::com::sun::star::table::CellAddress& rReferencePos )
      96                 :            :                                 throw (::com::sun::star::uno::RuntimeException);
      97                 :            : 
      98                 :            :                             // XPropertySet
      99                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
     100                 :            :                             SAL_CALL getPropertySetInfo()
     101                 :            :                                 throw(::com::sun::star::uno::RuntimeException);
     102                 :            :     virtual void SAL_CALL   setPropertyValue( const ::rtl::OUString& aPropertyName,
     103                 :            :                                     const ::com::sun::star::uno::Any& aValue )
     104                 :            :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     105                 :            :                                     ::com::sun::star::beans::PropertyVetoException,
     106                 :            :                                     ::com::sun::star::lang::IllegalArgumentException,
     107                 :            :                                     ::com::sun::star::lang::WrappedTargetException,
     108                 :            :                                     ::com::sun::star::uno::RuntimeException);
     109                 :            :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     110                 :            :                                     const ::rtl::OUString& PropertyName )
     111                 :            :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     112                 :            :                                     ::com::sun::star::lang::WrappedTargetException,
     113                 :            :                                     ::com::sun::star::uno::RuntimeException);
     114                 :            :     virtual void SAL_CALL   addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
     115                 :            :                                     const ::com::sun::star::uno::Reference<
     116                 :            :                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener )
     117                 :            :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     118                 :            :                                     ::com::sun::star::lang::WrappedTargetException,
     119                 :            :                                     ::com::sun::star::uno::RuntimeException);
     120                 :            :     virtual void SAL_CALL   removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
     121                 :            :                                     const ::com::sun::star::uno::Reference<
     122                 :            :                                         ::com::sun::star::beans::XPropertyChangeListener >& aListener )
     123                 :            :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     124                 :            :                                     ::com::sun::star::lang::WrappedTargetException,
     125                 :            :                                     ::com::sun::star::uno::RuntimeException);
     126                 :            :     virtual void SAL_CALL   addVetoableChangeListener( const ::rtl::OUString& PropertyName,
     127                 :            :                                     const ::com::sun::star::uno::Reference<
     128                 :            :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     129                 :            :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     130                 :            :                                     ::com::sun::star::lang::WrappedTargetException,
     131                 :            :                                     ::com::sun::star::uno::RuntimeException);
     132                 :            :     virtual void SAL_CALL   removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
     133                 :            :                                     const ::com::sun::star::uno::Reference<
     134                 :            :                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener )
     135                 :            :                                 throw(::com::sun::star::beans::UnknownPropertyException,
     136                 :            :                                     ::com::sun::star::lang::WrappedTargetException,
     137                 :            :                                     ::com::sun::star::uno::RuntimeException);
     138                 :            : 
     139                 :            :                             // XServiceInfo
     140                 :            :     virtual ::rtl::OUString SAL_CALL getImplementationName()
     141                 :            :                                 throw(::com::sun::star::uno::RuntimeException);
     142                 :            :     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
     143                 :            :                                 throw(::com::sun::star::uno::RuntimeException);
     144                 :            :     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
     145                 :            :                                 throw(::com::sun::star::uno::RuntimeException);
     146                 :            : };
     147                 :            : 
     148                 :            : // ============================================================================
     149                 :            : 
     150         [ -  + ]:         50 : class ScFormulaOpCodeMapperObj : public formula::FormulaOpCodeMapperObj
     151                 :            : {
     152                 :            : public:
     153                 :            :     SAL_WNODEPRECATED_DECLARATIONS_PUSH
     154                 :            :     ScFormulaOpCodeMapperObj(::std::auto_ptr<formula::FormulaCompiler> _pCompiler);
     155                 :            :     SAL_WNODEPRECATED_DECLARATIONS_POP
     156                 :            : };
     157                 :            : 
     158                 :            : // ============================================================================
     159                 :            : 
     160                 :            : #endif
     161                 :            : 
     162                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10