Bump version to 6.4-15
[LibreOffice.git] / include / svl / grabbagitem.hxx
blob3614e79a18e569eb99f0f1ce004b09403c550ac7
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/.
8 */
9 #ifndef INCLUDED_SVL_GRABBAGITEM_HXX
10 #define INCLUDED_SVL_GRABBAGITEM_HXX
12 #include <map>
14 #include <svl/svldllapi.h>
15 #include <svl/poolitem.hxx>
16 #include <com/sun/star/uno/Any.hxx>
18 /// Grab bag item provides a string-any map for keys with untyped values.
19 class SVL_DLLPUBLIC SfxGrabBagItem final : public SfxPoolItem
21 private:
22 std::map<OUString, css::uno::Any> m_aMap;
24 public:
25 SfxGrabBagItem();
26 SfxGrabBagItem(sal_uInt16 nWhich);
27 ~SfxGrabBagItem() override;
29 SfxGrabBagItem(SfxGrabBagItem const&) = default;
30 SfxGrabBagItem(SfxGrabBagItem&&) = default;
31 SfxGrabBagItem& operator=(SfxGrabBagItem const&) = delete; // due to SfxPoolItem
32 SfxGrabBagItem& operator=(SfxGrabBagItem&&) = delete; // due to SfxPoolItem
34 const std::map<OUString, css::uno::Any>& GetGrabBag() const { return m_aMap; }
36 std::map<OUString, css::uno::Any>& GetGrabBag() { return m_aMap; }
38 bool operator==(const SfxPoolItem& rItem) const override;
39 SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) const override;
41 bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) override;
42 bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override;
44 #endif
46 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */