xref: /aoo42x/main/basctl/source/inc/sbxitem.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _SBXITEM_HXX
28 #define _SBXITEM_HXX
29 
30 #include "scriptdocument.hxx"
31 #include <svl/poolitem.hxx>
32 
33 const sal_uInt16 BASICIDE_TYPE_UNKNOWN	=	0;
34 const sal_uInt16 BASICIDE_TYPE_SHELL	=	1;
35 const sal_uInt16 BASICIDE_TYPE_LIBRARY	=	2;
36 const sal_uInt16 BASICIDE_TYPE_MODULE	=	3;
37 const sal_uInt16 BASICIDE_TYPE_DIALOG	=	4;
38 const sal_uInt16 BASICIDE_TYPE_METHOD	=	5;
39 
40 
41 class SbxItem : public SfxPoolItem
42 {
43 	ScriptDocument          m_aDocument;
44 	String					m_aLibName;
45 	String					m_aName;
46 	String					m_aMethodName;
47 	sal_uInt16					m_nType;
48 
49 public:
50 	TYPEINFO();
51 	SbxItem( sal_uInt16 nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, sal_uInt16 nType );
52 	SbxItem( sal_uInt16 nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, const String& aMethodName, sal_uInt16 nType );
53 	SbxItem( const SbxItem& );
54 
55 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
56 	virtual int				operator==( const SfxPoolItem& ) const;
57 
58     const ScriptDocument&
59 	                        GetDocument() const { return m_aDocument; }
60 	void					SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }
61 
62 	const String&			GetLibName() const { return m_aLibName; }
63 	void					SetLibName( const String& aLibName ) { m_aLibName = aLibName; }
64 
65 	const String&			GetName() const { return m_aName; }
66 	void					SetName( const String& aName ) { m_aName = aName; }
67 
68 	const String&			GetMethodName() const { return m_aMethodName; }
69 	void					SetMethodName( const String& aMethodName ) { m_aMethodName = aMethodName; }
70 
71 	sal_uInt16					GetType() const { return m_nType; }
72 	void					SetType( sal_uInt16 nType ) { m_nType = nType; }
73 };
74 
75 
76 #endif
77