Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / include / svl / grabbagitem.hxx
blob5f459e8949904a9169e90e187954f95b363b0f0c
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 interim interop purposes.
19 class SVL_DLLPUBLIC SfxGrabBagItem : public SfxPoolItem
21 private:
22 std::map<OUString, css::uno::Any> m_aMap;
24 public:
26 SfxGrabBagItem();
27 SfxGrabBagItem(sal_uInt16 nWhich, const std::map<OUString, css::uno::Any>* pMap = nullptr);
28 SfxGrabBagItem(const SfxGrabBagItem& rItem);
29 virtual ~SfxGrabBagItem();
31 const std::map<OUString, css::uno::Any>& GetGrabBag() const
33 return m_aMap;
36 std::map<OUString, css::uno::Any>& GetGrabBag()
38 return m_aMap;
41 virtual bool operator==(const SfxPoolItem&) const override;
42 virtual SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) const override;
44 virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) override;
45 virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override;
47 #endif
49 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */