LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/basic - sbxobj.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 7 9 77.8 %
Date: 2013-07-09 Functions: 14 19 73.7 %
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 _SBX_SBXOBJECT_HXX
      21             : #define _SBX_SBXOBJECT_HXX
      22             : 
      23             : #include <svl/lstner.hxx>
      24             : #include <basic/sbxvar.hxx>
      25             : #include "basicdllapi.h"
      26             : 
      27             : 
      28             : class SbxProperty;
      29             : 
      30             : class BASIC_DLLPUBLIC SbxObject : public SbxVariable, public SfxListener
      31             : {
      32             :     BASIC_DLLPRIVATE SbxArray* FindVar( SbxVariable*, sal_uInt16& );
      33             : protected:
      34             :     SbxArrayRef  pMethods;                  // Methods
      35             :     SbxArrayRef  pProps;                    // Properties
      36             :     SbxArrayRef  pObjs;                     // Objects
      37             :     SbxProperty* pDfltProp;                 // Default-Property
      38             :     OUString     aClassName;                // Classname
      39             :     OUString     aDfltPropName;
      40             :     virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
      41             :     virtual sal_Bool StoreData( SvStream& ) const;
      42             :     virtual ~SbxObject();
      43             :     virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
      44             :                              const SfxHint& rHint, const TypeId& rHintType );
      45             : public:
      46           0 :     SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_OBJECT,1);
      47             :     TYPEINFO();
      48             :     SbxObject( const OUString& rClassname );
      49             :     SbxObject( const SbxObject& );
      50             :     SbxObject& operator=( const SbxObject& );
      51             :     virtual SbxDataType GetType() const;
      52             :     virtual SbxClassType GetClass() const;
      53             :     virtual void Clear();
      54             : 
      55             :     virtual sal_Bool  IsClass( const OUString& ) const;
      56         237 :     const OUString& GetClassName() const { return aClassName; }
      57         456 :     void SetClassName( const OUString &rNew ) { aClassName = rNew; }
      58             :     // Default-Property
      59             :     SbxProperty* GetDfltProperty();
      60             :     void SetDfltProperty( const OUString& r );
      61             :     // Search for an element
      62             :     virtual SbxVariable* FindUserData( sal_uInt32 nUserData );
      63             :     virtual SbxVariable* Find( const OUString&, SbxClassType );
      64             :     SbxVariable* FindQualified( const OUString&, SbxClassType );
      65             :     // Quick-Call-Interface for Methods
      66             :     virtual sal_Bool Call( const OUString&, SbxArray* = NULL );
      67             :     // Execution of DDE-Commands
      68             :     SbxVariable* Execute( const OUString& );
      69             :     // Manage elements
      70      107291 :     virtual sal_Bool GetAll( SbxClassType ) { return sal_True; }
      71             :     SbxVariable* Make( const OUString&, SbxClassType, SbxDataType );
      72             :     virtual SbxObject* MakeObject( const OUString&, const OUString& );
      73             :     virtual void Insert( SbxVariable* );
      74             :     // AB 23.4.1997, Optimization, Insertion without check for duplicate Entries and
      75             :     // without Broadcasts, only used in SO2/auto.cxx
      76             :     void QuickInsert( SbxVariable* );
      77             :     virtual void Remove( const OUString&, SbxClassType );
      78             :     virtual void Remove( SbxVariable* );
      79             : 
      80             :     // Macro-Recording
      81             :     virtual OUString GenerateSource( const OUString &rLinePrefix,
      82             :                                      const SbxObject *pRelativeTo );
      83             :     // Direct access on arrays
      84        2445 :     SbxArray* GetMethods()      { return pMethods;  }
      85           0 :     SbxArray* GetProperties()   { return pProps;    }
      86         609 :     SbxArray* GetObjects()      { return pObjs;     }
      87             :     // Debugging
      88             :     void Dump( SvStream&, sal_Bool bDumpAll=sal_False );
      89             : };
      90             : 
      91       50095 : SV_DECL_REF(SbxObject)
      92       21582 : SV_IMPL_REF(SbxObject)
      93             : 
      94             : #endif /* _SBX_SBXOBJECT_HXX */
      95             : 
      96             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10