1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_XMLOFF_UNOATRCN_HXX
21 #define INCLUDED_XMLOFF_UNOATRCN_HXX
23 #include <sal/config.h>
24 #include <xmloff/dllapi.h>
25 #include <sal/types.h>
26 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
27 #include <com/sun/star/container/XNameContainer.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/lang/XUnoTunnel.hpp>
31 #include <cppuhelper/implbase3.hxx>
33 extern ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SvUnoAttributeContainer_CreateInstance();
35 class SvXMLAttrContainerData
;
37 class XMLOFF_DLLPUBLIC SvUnoAttributeContainer
:
38 public ::cppu::WeakAggImplHelper3
<
39 ::com::sun::star::lang::XServiceInfo
,
40 ::com::sun::star::lang::XUnoTunnel
,
41 ::com::sun::star::container::XNameContainer
>
44 SvXMLAttrContainerData
* mpContainer
;
46 SAL_DLLPRIVATE sal_uInt16
getIndexByName(const OUString
& aName
)
50 SvUnoAttributeContainer( SvXMLAttrContainerData
* pContainer
= NULL
);
51 virtual ~SvUnoAttributeContainer();
53 SvXMLAttrContainerData
* GetContainerImpl() const { return mpContainer
; }
55 static const ::com::sun::star::uno::Sequence
< sal_Int8
> & getUnoTunnelId() throw();
56 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
58 // ::com::sun::star::container::XElementAccess
59 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType() throw( ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
60 virtual sal_Bool SAL_CALL
hasElements() throw( ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
62 // ::com::sun::star::container::XNameAccess
63 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
, std::exception
) SAL_OVERRIDE
;
64 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getElementNames() throw( ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
65 virtual sal_Bool SAL_CALL
hasByName(const OUString
& aName
) throw( ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
67 // ::com::sun::star::container::XNameReplace
68 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
, std::exception
) SAL_OVERRIDE
;
70 // ::com::sun::star::container::XNameContainer
71 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
, std::exception
) SAL_OVERRIDE
;
72 virtual void SAL_CALL
removeByName(const OUString
& Name
) throw( ::com::sun::star::container::NoSuchElementException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
74 // ::com::sun::star::lang::XServiceInfo
75 virtual OUString SAL_CALL
getImplementationName() throw( ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
76 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
77 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
79 friend ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SvUnoAttributeContainer_CreateInstance( const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
> & rSMgr
) throw( ::com::sun::star::uno::Exception
);
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */