bump product version to 4.1.6.2
[LibreOffice.git] / svx / source / unodraw / UnoNameItemTable.hxx
blob3aa0b21afbbe23568fed85d32ef6d0c8dc7c73f6
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 _SVX_UNONAMEITEMTABLE_HXX_
21 #define _SVX_UNONAMEITEMTABLE_HXX_
23 #include <com/sun/star/lang/XServiceInfo.hpp>
24 #include <com/sun/star/container/XNameContainer.hpp>
26 #include <cppuhelper/implbase2.hxx>
28 #include <vector>
29 #include <svl/lstner.hxx>
30 #include <svx/xit.hxx>
32 #include <svx/xdef.hxx>
34 class SdrModel;
35 class SfxItemPool;
36 class SfxItemSet;
38 typedef std::vector< SfxItemSet* > ItemPoolVector;
39 class SvxUnoNameItemTable : public cppu::WeakImplHelper2< com::sun::star::container::XNameContainer, com::sun::star::lang::XServiceInfo >,
40 public SfxListener
42 private:
43 SdrModel* mpModel;
44 SfxItemPool* mpModelPool;
45 sal_uInt16 mnWhich;
46 sal_uInt8 mnMemberId;
48 ItemPoolVector maItemSetVector;
50 void SAL_CALL ImplInsertByName( const OUString& aName, const com::sun::star::uno::Any& aElement );
52 public:
53 SvxUnoNameItemTable( SdrModel* pModel, sal_uInt16 nWhich, sal_uInt8 nMemberId ) throw();
54 virtual ~SvxUnoNameItemTable() throw();
56 virtual NameOrIndex* createItem() const throw() = 0;
57 virtual bool isValid( const NameOrIndex* pItem ) const;
59 void dispose();
61 // SfxListener
62 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw ();
64 // XServiceInfo
65 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( com::sun::star::uno::RuntimeException);
67 // XNameContainer
68 virtual void SAL_CALL insertByName( const OUString& aName, const com::sun::star::uno::Any& aElement ) throw( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::ElementExistException, com::sun::star::lang::WrappedTargetException, com::sun::star::uno::RuntimeException);
69 virtual void SAL_CALL removeByName( const OUString& Name ) throw( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException, com::sun::star::uno::RuntimeException);
71 // XNameReplace
72 virtual void SAL_CALL replaceByName( const OUString& aName, const com::sun::star::uno::Any& aElement ) throw( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException, com::sun::star::uno::RuntimeException);
74 // XNameAccess
75 virtual com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName ) throw( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException, com::sun::star::uno::RuntimeException);
76 virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames( ) throw( com::sun::star::uno::RuntimeException);
77 virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw( com::sun::star::uno::RuntimeException);
79 // XElementAccess
80 virtual sal_Bool SAL_CALL hasElements( ) throw( com::sun::star::uno::RuntimeException);
83 #endif // _SVX_UNONAMEITEMTABLE_HXX_
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */