Bump version to 6.4-15
[LibreOffice.git] / include / basic / sbxobj.hxx
blob7ad0953ae500f5b00629609c1aced9201760d239
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_BASIC_SBXOBJ_HXX
21 #define INCLUDED_BASIC_SBXOBJ_HXX
23 #include <svl/lstner.hxx>
24 #include <basic/sbxvar.hxx>
25 #include <basic/basicdllapi.h>
28 class SbxProperty;
30 class BASIC_DLLPUBLIC SbxObject : public SbxVariable, public SfxListener
32 BASIC_DLLPRIVATE SbxArray* FindVar( SbxVariable const *, 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 bool LoadData( SvStream&, sal_uInt16 ) override;
41 virtual bool StoreData( SvStream& ) const override;
42 virtual ~SbxObject() override;
43 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
44 public:
45 SBX_DECL_PERSIST_NODATA(SBXID_OBJECT,1);
46 SbxObject( const OUString& rClassname );
47 SbxObject( const SbxObject& );
48 SbxObject& operator=( const SbxObject& );
49 virtual SbxDataType GetType() const override;
50 virtual SbxClassType GetClass() const override;
51 virtual void Clear() override;
53 virtual bool IsClass( const OUString& ) const;
54 const OUString& GetClassName() const { return aClassName; }
55 void SetClassName( const OUString &rNew ) { aClassName = rNew; }
56 // Default-Property
57 SbxProperty* GetDfltProperty();
58 void SetDfltProperty( const OUString& r );
59 // Search for an element
60 virtual SbxVariable* Find( const OUString&, SbxClassType );
61 SbxVariable* FindQualified( const OUString&, SbxClassType );
62 // Quick-Call-Interface for Methods
63 virtual bool Call( const OUString&, SbxArray* = nullptr );
64 // Execution of DDE-Commands
65 SbxVariable* Execute( const OUString& );
66 // Manage elements
67 SbxVariable* Make( const OUString&, SbxClassType, SbxDataType, bool bIsRuntimeFunction = false );
68 virtual void Insert( SbxVariable* );
69 // AB 23.4.1997, Optimization, Insertion without check for duplicate Entries and
70 // without Broadcasts, only used in SO2/auto.cxx
71 void QuickInsert( SbxVariable* );
72 void Remove( const OUString&, SbxClassType );
73 virtual void Remove( SbxVariable* );
75 // Direct access on arrays
76 SbxArray* GetMethods() { return pMethods.get(); }
77 SbxArray* GetProperties() { return pProps.get(); }
78 SbxArray* GetObjects() { return pObjs.get(); }
79 // Debugging
80 void Dump( SvStream&, bool bDumpAll );
83 #endif // INCLUDED_BASIC_SBXOBJ_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */