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>
21 #include <sal/log.hxx>
23 #include <config_features.h>
25 #if HAVE_FEATURE_SCRIPTING
27 SfxPoolItem
* SfxMacroInfoItem::CreateDefault() { SAL_WARN( "sfx", "No SfxMacroInfItem factory available"); return nullptr; }
30 SfxMacroInfoItem::SfxMacroInfoItem(
31 sal_uInt16 nWhichId
, // Slot-ID
32 const BasicManager
* pMgr
,
34 OUString _aModuleName
,
35 OUString _aMethodName
,
37 SfxPoolItem(nWhichId
),
39 aLibName(std::move(_aLibName
)),
40 aModuleName(std::move(_aModuleName
)),
41 aMethodName(std::move(_aMethodName
)),
42 aCommentText(std::move(_aComment
))
48 bool SfxMacroInfoItem::operator==( const SfxPoolItem
& rCmp
) const
50 const SfxMacroInfoItem rItem
= static_cast<const SfxMacroInfoItem
&>(rCmp
);
51 return SfxPoolItem::operator==(rCmp
) &&
52 pBasicManager
== rItem
.pBasicManager
&&
53 aLibName
== rItem
.aLibName
&&
54 aModuleName
== rItem
.aModuleName
&&
55 aMethodName
== rItem
.aMethodName
&&
56 aCommentText
== rItem
.aCommentText
;
59 SfxMacroInfoItem
* SfxMacroInfoItem::Clone( SfxItemPool
*) const
61 return new SfxMacroInfoItem(*this);
64 OUString
SfxMacroInfoItem::GetQualifiedName() const
66 OUString aMacroName
= aLibName
+
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */