1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef _CHART2_NAMECONTAINER_HXX
29 #define _CHART2_NAMECONTAINER_HXX
31 #include <com/sun/star/container/XNameContainer.hpp>
32 #include <com/sun/star/lang/XServiceInfo.hpp>
33 #include <com/sun/star/uno/XComponentContext.hpp>
34 #include <com/sun/star/util/XCloneable.hpp>
35 #include <cppuhelper/implbase3.hxx>
36 #include "charttoolsdllapi.hxx"
40 //.............................................................................
43 //.............................................................................
45 OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
> createNameContainer(
46 const ::com::sun::star::uno::Type
& rType
, const rtl::OUString
& rServicename
, const rtl::OUString
& rImplementationName
);
50 typedef ::cppu::WeakImplHelper3
<
51 ::com::sun::star::container::XNameContainer
,
52 ::com::sun::star::lang::XServiceInfo
,
53 ::com::sun::star::util::XCloneable
>
57 class NameContainer
: public impl::NameContainer_Base
60 NameContainer( const ::com::sun::star::uno::Type
& rType
, const rtl::OUString
& rServicename
, const rtl::OUString
& rImplementationName
);
61 explicit NameContainer( const NameContainer
& rOther
);
62 virtual ~NameContainer();
65 virtual ::rtl::OUString SAL_CALL
getImplementationName( ) throw(::com::sun::star::uno::RuntimeException
);
66 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
) throw(::com::sun::star::uno::RuntimeException
);
67 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException
);
70 virtual void SAL_CALL
insertByName( const rtl::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
);
71 virtual void SAL_CALL
removeByName( const rtl::OUString
& Name
) throw( com::sun::star::container::NoSuchElementException
, com::sun::star::lang::WrappedTargetException
, com::sun::star::uno::RuntimeException
);
74 virtual void SAL_CALL
replaceByName( const rtl::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
);
77 virtual com::sun::star::uno::Any SAL_CALL
getByName( const rtl::OUString
& aName
) throw( com::sun::star::container::NoSuchElementException
, com::sun::star::lang::WrappedTargetException
, com::sun::star::uno::RuntimeException
);
78 virtual com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getElementNames( ) throw( com::sun::star::uno::RuntimeException
);
79 virtual sal_Bool SAL_CALL
hasByName( const rtl::OUString
& aName
) throw( com::sun::star::uno::RuntimeException
);
82 virtual sal_Bool SAL_CALL
hasElements( ) throw( com::sun::star::uno::RuntimeException
);
83 virtual com::sun::star::uno::Type SAL_CALL
getElementType( ) throw( com::sun::star::uno::RuntimeException
);
86 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone() throw (::com::sun::star::uno::RuntimeException
);
89 NameContainer();//no default contructor
92 const ::com::sun::star::uno::Type m_aType
;
93 const rtl::OUString m_aServicename
;
94 const rtl::OUString m_aImplementationName
;
96 typedef ::std::map
< ::rtl::OUString
, com::sun::star::uno::Any
> tContentMap
;
101 //.............................................................................
103 //.............................................................................