Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #include <sfx2/minfitem.hxx>
21 :
22 : // STATIC DATA -----------------------------------------------------------
23 :
24 0 : TYPEINIT1(SfxMacroInfoItem, SfxPoolItem);
25 :
26 :
27 :
28 0 : SfxMacroInfoItem::SfxMacroInfoItem(
29 : sal_uInt16 nWhichId, // Slot-ID
30 : const BasicManager* pMgr,
31 : const OUString &rLibName,
32 : const OUString &rModuleName,
33 : const OUString &rMethodName,
34 : const OUString &rComment) :
35 : SfxPoolItem(nWhichId),
36 : pBasicManager(pMgr),
37 : aLibName(rLibName),
38 : aModuleName(rModuleName),
39 : aMethodName(rMethodName),
40 0 : aCommentText(rComment)
41 : {
42 0 : }
43 :
44 :
45 :
46 : // copy constructor
47 :
48 0 : SfxMacroInfoItem::SfxMacroInfoItem(const SfxMacroInfoItem& rCopy):
49 : SfxPoolItem(rCopy),
50 : pBasicManager(rCopy.pBasicManager),
51 : aLibName(rCopy.aLibName),
52 : aModuleName(rCopy.aModuleName),
53 : aMethodName(rCopy.aMethodName),
54 0 : aCommentText(rCopy.aCommentText)
55 : {
56 0 : }
57 :
58 :
59 :
60 : // op ==
61 :
62 0 : bool SfxMacroInfoItem::operator==( const SfxPoolItem& rCmp) const
63 : {
64 0 : const SfxMacroInfoItem rItem = static_cast<const SfxMacroInfoItem&>(rCmp);
65 0 : return SfxPoolItem::operator==(rCmp) &&
66 0 : pBasicManager == rItem.pBasicManager &&
67 0 : aLibName == rItem.aLibName &&
68 0 : aModuleName == rItem.aModuleName &&
69 0 : aMethodName == rItem.aMethodName &&
70 0 : aCommentText == rItem.aCommentText;
71 : }
72 :
73 :
74 :
75 0 : SfxPoolItem *SfxMacroInfoItem::Clone( SfxItemPool *) const
76 : {
77 0 : return new SfxMacroInfoItem(*this);
78 : }
79 :
80 :
81 :
82 0 : OUString SfxMacroInfoItem::GetQualifiedName() const
83 : {
84 0 : OUString aMacroName = aLibName;
85 0 : aMacroName += ".";
86 0 : aMacroName += aModuleName;
87 0 : aMacroName += ".";
88 0 : aMacroName += aMethodName;
89 0 : return aMacroName;
90 : }
91 :
92 :
93 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|