bump product version to 5.0.4.1
[LibreOffice.git] / sfx2 / source / control / minfitem.cxx
blob8fd65376b8dafabab1f948600e3447f5c5a92520
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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);
28 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 aCommentText(rComment)
46 // copy constructor
48 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 aCommentText(rCopy.aCommentText)
60 // op ==
62 bool SfxMacroInfoItem::operator==( const SfxPoolItem& rCmp) const
64 const SfxMacroInfoItem rItem = static_cast<const SfxMacroInfoItem&>(rCmp);
65 return SfxPoolItem::operator==(rCmp) &&
66 pBasicManager == rItem.pBasicManager &&
67 aLibName == rItem.aLibName &&
68 aModuleName == rItem.aModuleName &&
69 aMethodName == rItem.aMethodName &&
70 aCommentText == rItem.aCommentText;
75 SfxPoolItem *SfxMacroInfoItem::Clone( SfxItemPool *) const
77 return new SfxMacroInfoItem(*this);
82 OUString SfxMacroInfoItem::GetQualifiedName() const
84 OUString aMacroName = aLibName;
85 aMacroName += ".";
86 aMacroName += aModuleName;
87 aMacroName += ".";
88 aMacroName += aMethodName;
89 return aMacroName;
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */