1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #include "sfx2/minfitem.hxx"
22 // STATIC DATA -----------------------------------------------------------
24 TYPEINIT1(SfxMacroInfoItem
, SfxPoolItem
);
26 // -----------------------------------------------------------------------
28 SfxMacroInfoItem::SfxMacroInfoItem(
29 sal_uInt16 nWhichId
, // Slot-ID
30 const BasicManager
* pMgr
,
31 const String
&rLibName
,
32 const String
&rModuleName
,
33 const String
&rMethodName
,
34 const String
&rComment
) :
35 SfxPoolItem(nWhichId
),
38 aModuleName(rModuleName
),
39 aMethodName(rMethodName
),
40 aCommentText(rComment
)
44 // -----------------------------------------------------------------------
48 SfxMacroInfoItem::SfxMacroInfoItem(const SfxMacroInfoItem
& rCopy
):
50 pBasicManager(rCopy
.pBasicManager
),
51 aLibName(rCopy
.aLibName
),
52 aModuleName(rCopy
.aModuleName
),
53 aMethodName(rCopy
.aMethodName
),
54 aCommentText(rCopy
.aCommentText
)
58 // -----------------------------------------------------------------------
62 int SfxMacroInfoItem::operator==( const SfxPoolItem
& rCmp
) const
64 return SfxPoolItem::operator==(rCmp
) &&
65 pBasicManager
== ((const SfxMacroInfoItem
&)rCmp
).pBasicManager
&&
66 aLibName
== ((const SfxMacroInfoItem
&)rCmp
).aLibName
&&
67 aModuleName
== ((const SfxMacroInfoItem
&)rCmp
).aModuleName
&&
68 aMethodName
== ((const SfxMacroInfoItem
&)rCmp
).aMethodName
&&
69 aCommentText
== ((const SfxMacroInfoItem
&)rCmp
).aCommentText
;
72 // -----------------------------------------------------------------------
74 SfxPoolItem
*SfxMacroInfoItem::Clone( SfxItemPool
*) const
76 return new SfxMacroInfoItem(*this);
79 // -----------------------------------------------------------------------
81 String
SfxMacroInfoItem::GetQualifiedName() const
83 String aMacroName
= aLibName
;
85 aMacroName
+= aModuleName
;
87 aMacroName
+= aMethodName
;
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */