xref: /aoo4110/main/basctl/source/inc/sbxitem.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SBXITEM_HXX
24 #define _SBXITEM_HXX
25 
26 #include "scriptdocument.hxx"
27 #include <svl/poolitem.hxx>
28 
29 const sal_uInt16 BASICIDE_TYPE_UNKNOWN	=	0;
30 const sal_uInt16 BASICIDE_TYPE_SHELL	=	1;
31 const sal_uInt16 BASICIDE_TYPE_LIBRARY	=	2;
32 const sal_uInt16 BASICIDE_TYPE_MODULE	=	3;
33 const sal_uInt16 BASICIDE_TYPE_DIALOG	=	4;
34 const sal_uInt16 BASICIDE_TYPE_METHOD	=	5;
35 
36 
37 class SbxItem : public SfxPoolItem
38 {
39 	ScriptDocument          m_aDocument;
40 	String					m_aLibName;
41 	String					m_aName;
42 	String					m_aMethodName;
43 	sal_uInt16					m_nType;
44 
45 public:
46 	TYPEINFO();
47 	SbxItem( sal_uInt16 nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, sal_uInt16 nType );
48 	SbxItem( sal_uInt16 nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, const String& aMethodName, sal_uInt16 nType );
49 	SbxItem( const SbxItem& );
50 
51 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
52 	virtual int				operator==( const SfxPoolItem& ) const;
53 
54     const ScriptDocument&
GetDocument() const55 	                        GetDocument() const { return m_aDocument; }
SetDocument(const ScriptDocument & rDocument)56 	void					SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }
57 
GetLibName() const58 	const String&			GetLibName() const { return m_aLibName; }
SetLibName(const String & aLibName)59 	void					SetLibName( const String& aLibName ) { m_aLibName = aLibName; }
60 
GetName() const61 	const String&			GetName() const { return m_aName; }
SetName(const String & aName)62 	void					SetName( const String& aName ) { m_aName = aName; }
63 
GetMethodName() const64 	const String&			GetMethodName() const { return m_aMethodName; }
SetMethodName(const String & aMethodName)65 	void					SetMethodName( const String& aMethodName ) { m_aMethodName = aMethodName; }
66 
GetType() const67 	sal_uInt16					GetType() const { return m_nType; }
SetType(sal_uInt16 nType)68 	void					SetType( sal_uInt16 nType ) { m_nType = nType; }
69 };
70 
71 
72 #endif
73