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