LibreOffice Module basctl (master) 1
sbxitem.cxx
Go to the documentation of this file.
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 <sbxitem.hxx>
21#include <sal/log.hxx>
22#include <utility>
23
24namespace basctl
25{
26SfxPoolItem* SbxItem::CreateDefault() { SAL_WARN( "basctl.basicide", "No SbxItem factory available"); return nullptr; }
28 sal_uInt16 nWhichItem,
30 OUString aLibName,
31 OUString aName,
32 ItemType eType
33) :
34 SfxPoolItem(nWhichItem),
35 m_aDocument(std::move(aDocument)),
36 m_aLibName(std::move(aLibName)),
37 m_aName(std::move(aName)),
39{ }
40
42 sal_uInt16 nWhichItem,
44 OUString aLibName,
45 OUString aName,
46 OUString aMethodName,
47 ItemType eType
48) :
49 SfxPoolItem(nWhichItem),
50 m_aDocument(std::move(aDocument)),
51 m_aLibName(std::move(aLibName)),
52 m_aName(std::move(aName)),
53 m_aMethodName(std::move(aMethodName)),
55{ }
56
58{
59 return new SbxItem(*this);
60}
61
62bool SbxItem::operator==(const SfxPoolItem& rCmp) const
63{
64 SbxItem const* pSbxItem = static_cast<SbxItem const*>(&rCmp);
65 return
67 m_aDocument == pSbxItem->m_aDocument &&
68 m_aLibName == pSbxItem->m_aLibName &&
69 m_aName == pSbxItem->m_aName &&
70 m_aMethodName == pSbxItem->m_aMethodName &&
71 m_eType == pSbxItem->m_eType;
72}
73
74} // namespace basctl
75
76/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScriptDocument aDocument
Definition: basobj2.cxx:194
virtual bool operator==(const SfxPoolItem &) const=0
SbxItem(sal_uInt16 nWhich, ScriptDocument aDocument, OUString aLibName, OUString aName, ItemType)
Definition: sbxitem.cxx:27
ItemType m_eType
Definition: sbxitem.hxx:43
const OUString m_aLibName
Definition: sbxitem.hxx:40
const OUString m_aName
Definition: sbxitem.hxx:41
virtual SbxItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: sbxitem.cxx:57
const ScriptDocument m_aDocument
Definition: sbxitem.hxx:39
const OUString m_aMethodName
Definition: sbxitem.hxx:42
virtual bool operator==(const SfxPoolItem &) const override
Definition: sbxitem.cxx:62
static SfxPoolItem * CreateDefault()
Definition: sbxitem.cxx:26
encapsulates a document which contains Basic scripts and dialogs
const EnumerationType m_eType
DocumentType eType
OUString aName
#define SAL_WARN(area, stream)
ItemType
Definition: sbxitem.hxx:28
OUString m_aName