xref: /aoo41x/main/editeng/inc/editeng/xmlcnitm.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _SVX_XMLCNITM_HXX
29 #define _SVX_XMLCNITM_HXX
30 
31 #include <svl/poolitem.hxx>
32 #include "editeng/editengdllapi.h"
33 
34 class SvXMLNamespaceMap;
35 namespace rtl { class OUString; }
36 
37 //============================================================================
38 
39 class SvXMLAttrContainerData;
40 
41 class EDITENG_DLLPUBLIC SvXMLAttrContainerItem: public SfxPoolItem
42 {
43 	SvXMLAttrContainerData	*pImpl;
44 
45 public:
46 	TYPEINFO();
47 
48 	SvXMLAttrContainerItem( sal_uInt16 nWhich = 0 );
49 	SvXMLAttrContainerItem( const SvXMLAttrContainerItem& );
50 	virtual ~SvXMLAttrContainerItem();
51 
52 	virtual int operator==( const SfxPoolItem& ) const;
53 	using SfxPoolItem::Compare;
54 	virtual int	Compare( const SfxPoolItem &rWith ) const;
55 
56 	virtual SfxItemPresentation GetPresentation(
57 								SfxItemPresentation ePresentation,
58 								SfxMapUnit eCoreMetric,
59 								SfxMapUnit ePresentationMetric,
60 								XubString &rText,
61                                 const IntlWrapper *pIntlWrapper = 0 ) const;
62 
63 	virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
64 
65 	virtual	sal_Bool        	 QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
66 	virtual	sal_Bool			 PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
67 
68 	virtual SfxPoolItem *Clone( SfxItemPool * = 0) const
69 	{ return new SvXMLAttrContainerItem( *this ); }
70 
71 	sal_Bool AddAttr( const ::rtl::OUString& rLName,
72 			  	  	  const ::rtl::OUString& rValue );
73 	sal_Bool AddAttr( const ::rtl::OUString& rPrefix,
74 			  	  	  const ::rtl::OUString& rNamespace,
75 			  	  	  const ::rtl::OUString& rLName,
76 			  	  	  const ::rtl::OUString& rValue );
77 
78 	sal_uInt16 GetAttrCount() const;
79 	::rtl::OUString GetAttrNamespace( sal_uInt16 i ) const;
80 	::rtl::OUString GetAttrPrefix( sal_uInt16 i ) const;
81 	const ::rtl::OUString& GetAttrLName( sal_uInt16 i ) const;
82 	const ::rtl::OUString& GetAttrValue( sal_uInt16 i ) const;
83 
84 	sal_uInt16 GetFirstNamespaceIndex() const;
85 	sal_uInt16 GetNextNamespaceIndex( sal_uInt16 nIdx ) const;
86 	const ::rtl::OUString& GetNamespace( sal_uInt16 i ) const;
87 	const ::rtl::OUString& GetPrefix( sal_uInt16 i ) const;
88 };
89 
90 #endif //  _SVX_XMLCNITM_HXX
91 
92