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: xmlcnitm.hxx,v $
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_XMLCNITM_HXX
32 #define _XMLOFF_XMLCNITM_HXX
34 #include <svtools/poolitem.hxx>
36 class SvXMLNamespaceMap
;
37 namespace rtl
{ class OUString
; }
39 //============================================================================
41 class SvXMLAttrContainerItem_Impl
;
43 class SvXMLAttrContainerItem
: public SfxPoolItem
45 SvXMLAttrContainerItem_Impl
*pImpl
;
50 SvXMLAttrContainerItem( sal_uInt16 nWhich
= 0 );
51 SvXMLAttrContainerItem( const SvXMLAttrContainerItem
& );
52 virtual ~SvXMLAttrContainerItem();
54 virtual int operator==( const SfxPoolItem
& ) const;
55 using SfxPoolItem::Compare
;
56 virtual int Compare( const SfxPoolItem
&rWith
) const;
58 virtual SfxItemPresentation
GetPresentation(
59 SfxItemPresentation ePresentation
,
60 SfxMapUnit eCoreMetric
,
61 SfxMapUnit ePresentationMetric
,
63 const IntlWrapper
*pIntlWrapper
= 0 ) const;
65 virtual sal_uInt16
GetVersion( sal_uInt16 nFileFormatVersion
) const;
67 virtual BOOL
QueryValue( com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 ) const;
68 virtual BOOL
PutValue( const com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 );
70 virtual SfxPoolItem
*Clone( SfxItemPool
* = 0) const
71 { return new SvXMLAttrContainerItem( *this ); }
73 sal_Bool
AddAttr( const ::rtl::OUString
& rLName
,
74 const ::rtl::OUString
& rValue
);
75 sal_Bool
AddAttr( const ::rtl::OUString
& rPrefix
,
76 const ::rtl::OUString
& rNamespace
,
77 const ::rtl::OUString
& rLName
,
78 const ::rtl::OUString
& rValue
);
80 sal_uInt16
GetAttrCount() const;
81 ::rtl::OUString
GetAttrNamespace( sal_uInt16 i
) const;
82 ::rtl::OUString
GetAttrPrefix( sal_uInt16 i
) const;
83 const ::rtl::OUString
& GetAttrLName( sal_uInt16 i
) const;
84 const ::rtl::OUString
& GetAttrValue( sal_uInt16 i
) const;
86 sal_uInt16
GetFirstNamespaceIndex() const;
87 sal_uInt16
GetNextNamespaceIndex( sal_uInt16 nIdx
) const;
88 const ::rtl::OUString
& GetNamespace( sal_uInt16 i
) const;
89 const ::rtl::OUString
& GetPrefix( sal_uInt16 i
) const;
92 #endif // _XMLOFF_XMLCNITM_HXX