merge the formfield patch from ooo-build
[ooovba.git] / xmloff / source / transform / MutableAttrList.hxx
blob9d9ce00bdb214e9b83abd7d2bddaa0e4ca288bd4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: MutableAttrList.hxx,v $
10 * $Revision: 1.4.56.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _XMLOFF_MUTABLEATTRLIST_HXX
32 #define _XMLOFF_MUTABLEATTRLIST_HXX
34 #include <com/sun/star/util/XCloneable.hpp>
35 #include <com/sun/star/xml/sax/XAttributeList.hpp>
36 #include <com/sun/star/lang/XUnoTunnel.hpp>
38 #include <cppuhelper/implbase3.hxx>
40 class SvXMLAttributeList;
42 class XMLMutableAttributeList : public ::cppu::WeakImplHelper3<
43 ::com::sun::star::xml::sax::XAttributeList,
44 ::com::sun::star::util::XCloneable,
45 ::com::sun::star::lang::XUnoTunnel>
47 ::com::sun::star::uno::Reference<
48 ::com::sun::star::xml::sax::XAttributeList> m_xAttrList;
50 SvXMLAttributeList *m_pMutableAttrList;
52 SvXMLAttributeList *GetMutableAttrList();
54 public:
55 XMLMutableAttributeList();
56 XMLMutableAttributeList( const ::com::sun::star::uno::Reference<
57 ::com::sun::star::xml::sax::XAttributeList> & rAttrList,
58 sal_Bool bClone=sal_False );
59 ~XMLMutableAttributeList();
61 static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
63 // XUnoTunnel
64 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
66 // ::com::sun::star::xml::sax::XAttributeList
67 virtual sal_Int16 SAL_CALL getLength(void) throw( ::com::sun::star::uno::RuntimeException );
68 virtual ::rtl::OUString SAL_CALL getNameByIndex(sal_Int16 i) throw( ::com::sun::star::uno::RuntimeException );
69 virtual ::rtl::OUString SAL_CALL getTypeByIndex(sal_Int16 i) throw( ::com::sun::star::uno::RuntimeException );
70 virtual ::rtl::OUString SAL_CALL getTypeByName(const ::rtl::OUString& aName) throw( ::com::sun::star::uno::RuntimeException );
71 virtual ::rtl::OUString SAL_CALL getValueByIndex(sal_Int16 i) throw( ::com::sun::star::uno::RuntimeException );
72 virtual ::rtl::OUString SAL_CALL getValueByName(const ::rtl::OUString& aName) throw( ::com::sun::star::uno::RuntimeException );
74 // ::com::sun::star::util::XCloneable
75 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() throw( ::com::sun::star::uno::RuntimeException );
77 // methods that are not contained in any interface
78 void SetValueByIndex( sal_Int16 i, const ::rtl::OUString& rValue );
79 void AddAttribute( const ::rtl::OUString &sName , const ::rtl::OUString &sValue );
80 // void Clear();
81 void RemoveAttributeByIndex( sal_Int16 i );
82 void RenameAttributeByIndex( sal_Int16 i, const ::rtl::OUString& rNewName );
83 // void SetAttributeList( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & );
84 void AppendAttributeList( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & );
86 sal_Int16 GetIndexByName( const ::rtl::OUString& rName ) const;
90 #endif // _XMLOFF_MUTABLEATTRLIST_HXX