xref: /aoo41x/main/sfx2/source/control/minfitem.cxx (revision d119d52d)
1*d119d52dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*d119d52dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*d119d52dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*d119d52dSAndrew Rist  * distributed with this work for additional information
6*d119d52dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*d119d52dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*d119d52dSAndrew Rist  * "License"); you may not use this file except in compliance
9*d119d52dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*d119d52dSAndrew Rist  *
11*d119d52dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*d119d52dSAndrew Rist  *
13*d119d52dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*d119d52dSAndrew Rist  * software distributed under the License is distributed on an
15*d119d52dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d119d52dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*d119d52dSAndrew Rist  * specific language governing permissions and limitations
18*d119d52dSAndrew Rist  * under the License.
19*d119d52dSAndrew Rist  *
20*d119d52dSAndrew Rist  *************************************************************/
21*d119d52dSAndrew Rist 
22*d119d52dSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sfx2.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir // INCLUDE ---------------------------------------------------------------
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include "sfx2/minfitem.hxx"
30cdf0e10cSrcweir 
31cdf0e10cSrcweir // STATIC DATA -----------------------------------------------------------
32cdf0e10cSrcweir 
33cdf0e10cSrcweir TYPEINIT1(SfxMacroInfoItem, SfxPoolItem);
34cdf0e10cSrcweir 
35cdf0e10cSrcweir // -----------------------------------------------------------------------
36cdf0e10cSrcweir 
SfxMacroInfoItem(sal_uInt16 nWhichId,const BasicManager * pMgr,const String & rLibName,const String & rModuleName,const String & rMethodName,const String & rComment)37cdf0e10cSrcweir SfxMacroInfoItem::SfxMacroInfoItem(
38cdf0e10cSrcweir     sal_uInt16 nWhichId,		// Slot-ID
39cdf0e10cSrcweir 	const BasicManager* pMgr,
40cdf0e10cSrcweir 	const String &rLibName,
41cdf0e10cSrcweir 	const String &rModuleName,
42cdf0e10cSrcweir 	const String &rMethodName,
43cdf0e10cSrcweir 	const String &rComment) :
44cdf0e10cSrcweir 	SfxPoolItem(nWhichId),
45cdf0e10cSrcweir 	pBasicManager(pMgr),
46cdf0e10cSrcweir 	aLibName(rLibName),
47cdf0e10cSrcweir 	aModuleName(rModuleName),
48cdf0e10cSrcweir 	aMethodName(rMethodName),
49cdf0e10cSrcweir 	aCommentText(rComment)
50cdf0e10cSrcweir {
51cdf0e10cSrcweir }
52cdf0e10cSrcweir 
53cdf0e10cSrcweir // -----------------------------------------------------------------------
54cdf0e10cSrcweir 
55cdf0e10cSrcweir // copy ctor
56cdf0e10cSrcweir 
SfxMacroInfoItem(const SfxMacroInfoItem & rCopy)57cdf0e10cSrcweir SfxMacroInfoItem::SfxMacroInfoItem(const SfxMacroInfoItem& rCopy):
58cdf0e10cSrcweir 	SfxPoolItem(rCopy),
59cdf0e10cSrcweir 	pBasicManager(rCopy.pBasicManager),
60cdf0e10cSrcweir 	aLibName(rCopy.aLibName),
61cdf0e10cSrcweir 	aModuleName(rCopy.aModuleName),
62cdf0e10cSrcweir 	aMethodName(rCopy.aMethodName),
63cdf0e10cSrcweir 	aCommentText(rCopy.aCommentText)
64cdf0e10cSrcweir {
65cdf0e10cSrcweir }
66cdf0e10cSrcweir 
67cdf0e10cSrcweir // -----------------------------------------------------------------------
68cdf0e10cSrcweir 
69cdf0e10cSrcweir // op ==
70cdf0e10cSrcweir 
operator ==(const SfxPoolItem & rCmp) const71cdf0e10cSrcweir int SfxMacroInfoItem::operator==( const SfxPoolItem& rCmp) const
72cdf0e10cSrcweir {
73cdf0e10cSrcweir 	return SfxPoolItem::operator==(rCmp) &&
74cdf0e10cSrcweir 			pBasicManager == ((const SfxMacroInfoItem&)rCmp).pBasicManager &&
75cdf0e10cSrcweir 			aLibName == ((const SfxMacroInfoItem&)rCmp).aLibName &&
76cdf0e10cSrcweir 			aModuleName == ((const SfxMacroInfoItem&)rCmp).aModuleName &&
77cdf0e10cSrcweir 			aMethodName == ((const SfxMacroInfoItem&)rCmp).aMethodName &&
78cdf0e10cSrcweir 			aCommentText == ((const SfxMacroInfoItem&)rCmp).aCommentText;
79cdf0e10cSrcweir }
80cdf0e10cSrcweir 
81cdf0e10cSrcweir // -----------------------------------------------------------------------
82cdf0e10cSrcweir 
Clone(SfxItemPool *) const83cdf0e10cSrcweir SfxPoolItem *SfxMacroInfoItem::Clone( SfxItemPool *) const
84cdf0e10cSrcweir {
85cdf0e10cSrcweir 	return new SfxMacroInfoItem(*this);
86cdf0e10cSrcweir }
87cdf0e10cSrcweir 
88cdf0e10cSrcweir // -----------------------------------------------------------------------
89cdf0e10cSrcweir 
GetQualifiedName() const90cdf0e10cSrcweir String SfxMacroInfoItem::GetQualifiedName() const
91cdf0e10cSrcweir {
92cdf0e10cSrcweir 	String aMacroName = aLibName;
93cdf0e10cSrcweir 	aMacroName += '.';
94cdf0e10cSrcweir 	aMacroName += aModuleName;
95cdf0e10cSrcweir 	aMacroName += '.';
96cdf0e10cSrcweir 	aMacroName += aMethodName;
97cdf0e10cSrcweir 	return aMacroName;
98cdf0e10cSrcweir }
99cdf0e10cSrcweir 
100cdf0e10cSrcweir 
101