Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / basctl / source / inc / sbxitem.hxx
blob4e97389906fdd756b8ba0e906179bcb4f08d0ca2
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 .
19 #ifndef INCLUDED_BASCTL_SOURCE_INC_SBXITEM_HXX
20 #define INCLUDED_BASCTL_SOURCE_INC_SBXITEM_HXX
22 #include "scriptdocument.hxx"
23 #include <svl/poolitem.hxx>
25 namespace basctl
28 enum ItemType
30 TYPE_UNKNOWN,
31 TYPE_SHELL,
32 TYPE_LIBRARY,
33 TYPE_MODULE,
34 TYPE_DIALOG,
35 TYPE_METHOD
38 class SbxItem : public SfxPoolItem
40 const ScriptDocument m_aDocument;
41 const OUString m_aLibName;
42 const OUString m_aName;
43 const OUString m_aMethodName;
44 ItemType m_eType;
46 public:
47 static SfxPoolItem* CreateDefault();
48 SbxItem(sal_uInt16 nWhich, const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aName, ItemType);
49 SbxItem(sal_uInt16 nWhich, const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aName, const OUString& aMethodName, ItemType eType);
51 virtual SfxPoolItem* Clone(SfxItemPool *pPool = nullptr) const override;
52 virtual bool operator==(const SfxPoolItem&) const override;
54 ScriptDocument const& GetDocument () const { return m_aDocument; }
55 OUString const& GetLibName () const { return m_aLibName; }
56 OUString const& GetName () const { return m_aName; }
57 OUString const& GetMethodName () const { return m_aMethodName; }
58 ItemType GetType () const { return m_eType; }
61 } // namespace basctl
63 // For baside.sdi, because I don't know how to use nested names in it.
64 using basctl::SbxItem;
66 #endif // INCLUDED_BASCTL_SOURCE_INC_SBXITEM_HXX
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */