1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: saxattrlist.hxx,v $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifndef INCLUDED_PDFI_SAXATTRLIST_HXX
33 #define INCLUDED_PDFI_SAXATTRLIST_HXX
35 #include <rtl/ustring.hxx>
38 #include <cppuhelper/implbase2.hxx>
40 #include <com/sun/star/util/XCloneable.hpp>
41 #include <com/sun/star/xml/sax/XAttributeList.hpp>
45 class SaxAttrList
: public ::cppu::WeakImplHelper2
<
46 com::sun::star::xml::sax::XAttributeList
,
47 com::sun::star::util::XCloneable
52 rtl::OUString m_aName
;
53 rtl::OUString m_aValue
;
55 AttrEntry( const rtl::OUString
& i_rName
, const rtl::OUString
& i_rValue
)
56 : m_aName( i_rName
), m_aValue( i_rValue
) {}
58 std::vector
< AttrEntry
> m_aAttributes
;
59 std::hash_map
< rtl::OUString
, size_t, rtl::OUStringHash
> m_aIndexMap
;
63 SaxAttrList( const std::hash_map
< rtl::OUString
, rtl::OUString
, rtl::OUStringHash
>& );
64 SaxAttrList( const SaxAttrList
& );
65 virtual ~SaxAttrList();
67 // ::com::sun::star::xml::sax::XAttributeList
68 virtual sal_Int16 SAL_CALL
getLength() throw();
69 virtual rtl::OUString SAL_CALL
getNameByIndex(sal_Int16 i
) throw();
70 virtual rtl::OUString SAL_CALL
getTypeByIndex(sal_Int16 i
) throw();
71 virtual rtl::OUString SAL_CALL
getTypeByName(const ::rtl::OUString
& aName
) throw();
72 virtual rtl::OUString SAL_CALL
getValueByIndex(sal_Int16 i
) throw();
73 virtual rtl::OUString SAL_CALL
getValueByName(const ::rtl::OUString
& aName
) throw();
75 // ::com::sun::star::util::XCloneable
76 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone() throw();