1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _COMPHELPER_ATTRIBUTE_LIST_HXX
25 #define _COMPHELPER_ATTRIBUTE_LIST_HXX
26 
27 #include <com/sun/star/xml/sax/XAttributeList.hpp>
28 #include <cppuhelper/implbase1.hxx>
29 #include <comphelper/comphelperdllapi.h>
30 
31 
32 namespace comphelper
33 {
34 
35 struct AttributeList_Impl;
36 
37 class COMPHELPER_DLLPUBLIC AttributeList : public ::cppu::WeakImplHelper1
38 <
39 	::com::sun::star::xml::sax::XAttributeList
40 >
41 {
42 	AttributeList_Impl *m_pImpl;
43 public:
44 	AttributeList();
45 	virtual ~AttributeList();
46 
47 	// methods that are not contained in any interface
48 	void AddAttribute( const ::rtl::OUString &sName , const ::rtl::OUString &sType , const ::rtl::OUString &sValue );
49 	void Clear();
50 	void RemoveAttribute( const ::rtl::OUString sName );
51 	void SetAttributeList( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & );
52 	void AppendAttributeList( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & );
53 
54 	// ::com::sun::star::xml::sax::XAttributeList
55 	virtual sal_Int16 SAL_CALL getLength(void)
56 		throw( ::com::sun::star::uno::RuntimeException );
57 	virtual ::rtl::OUString SAL_CALL getNameByIndex(sal_Int16 i)
58 		throw( ::com::sun::star::uno::RuntimeException );
59 	virtual ::rtl::OUString SAL_CALL getTypeByIndex(sal_Int16 i)
60 		throw( ::com::sun::star::uno::RuntimeException );
61 	virtual ::rtl::OUString SAL_CALL getTypeByName(const ::rtl::OUString& aName)
62 		throw( ::com::sun::star::uno::RuntimeException );
63 	virtual ::rtl::OUString SAL_CALL getValueByIndex(sal_Int16 i)
64 		throw( ::com::sun::star::uno::RuntimeException );
65 	virtual ::rtl::OUString SAL_CALL getValueByName(const ::rtl::OUString& aName)
66 		throw( ::com::sun::star::uno::RuntimeException );
67 
68 };
69 
70 } // namespace comphelper
71 
72 #endif // _COMPHELPER_ATTRIBUTE_LIST_HXX
73 
74