Bump version to 6.4.7.2.M8
[LibreOffice.git] / svx / source / unodraw / UnoNameItemTable.hxx
blob05faef9017f2f31671df8a8bbef265ddc2632892
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 .
20 #ifndef INCLUDED_SVX_SOURCE_UNODRAW_UNONAMEITEMTABLE_HXX
21 #define INCLUDED_SVX_SOURCE_UNODRAW_UNONAMEITEMTABLE_HXX
23 #include <com/sun/star/lang/XServiceInfo.hpp>
24 #include <com/sun/star/container/XNameContainer.hpp>
26 #include <cppuhelper/implbase.hxx>
28 #include <memory>
29 #include <vector>
30 #include <svl/lstner.hxx>
31 #include <svx/xit.hxx>
33 #include <svx/xdef.hxx>
35 class SdrModel;
36 class SfxItemPool;
37 class SfxItemSet;
39 typedef std::vector< std::unique_ptr< SfxItemSet > > ItemPoolVector;
40 class SvxUnoNameItemTable : public cppu::WeakImplHelper< css::container::XNameContainer, css::lang::XServiceInfo >,
41 public SfxListener
43 private:
44 SdrModel* mpModel;
45 SfxItemPool* mpModelPool;
46 sal_uInt16 mnWhich;
47 sal_uInt8 const mnMemberId;
49 ItemPoolVector maItemSetVector;
51 void ImplInsertByName( const OUString& aName, const css::uno::Any& aElement );
53 public:
54 SvxUnoNameItemTable( SdrModel* pModel, sal_uInt16 nWhich, sal_uInt8 nMemberId ) throw();
55 virtual ~SvxUnoNameItemTable() throw() override;
57 virtual NameOrIndex* createItem() const = 0;
58 virtual bool isValid( const NameOrIndex* pItem ) const;
60 void dispose();
62 // SfxListener
63 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw () override;
65 // XServiceInfo
66 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
68 // XNameContainer
69 virtual void SAL_CALL insertByName( const OUString& aName, const css::uno::Any& aElement ) override;
70 virtual void SAL_CALL removeByName( const OUString& Name ) override;
72 // XNameReplace
73 virtual void SAL_CALL replaceByName( const OUString& aName, const css::uno::Any& aElement ) override;
75 // XNameAccess
76 virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override;
77 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames( ) override;
78 virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
80 // XElementAccess
81 virtual sal_Bool SAL_CALL hasElements( ) override;
84 #endif // INCLUDED_SVX_SOURCE_UNODRAW_UNONAMEITEMTABLE_HXX
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */