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 
25 #ifndef _XMLOFF_XMLCHANGEINFOCONTEXT_HXX
26 #define _XMLOFF_XMLCHANGEINFOCONTEXT_HXX
27 
28 #include <xmloff/xmlictxt.hxx>
29 #include <com/sun/star/uno/Reference.h>
30 #include <rtl/ustring.hxx>
31 #include <rtl/ustrbuf.hxx>
32 
33 namespace com { namespace sun { namespace star {
34 	namespace xml { namespace sax { class XAttributeList; } }
35 } } }
36 class XMLChangedRegionImportContext;
37 
38 
39 
40 /**
41  * Import <office:change-info> elements as children of <text:changed-region>
42  * elements. The attribute values will be passed to the enclosing
43  * XMLChangedRegionImportContext (which has to be passed down in the
44  * constructor).
45  */
46 class XMLChangeInfoContext : public SvXMLImportContext
47 {
48 	const ::rtl::OUString& rType;
49 
50 	::rtl::OUStringBuffer sAuthorBuffer;
51 	::rtl::OUStringBuffer sDateTimeBuffer;
52 	::rtl::OUStringBuffer sCommentBuffer;
53 
54 	XMLChangedRegionImportContext& rChangedRegion;
55 
56 public:
57 
58 	TYPEINFO();
59 
60 	XMLChangeInfoContext(
61 		SvXMLImport& rImport,
62 		sal_uInt16 nPrefix,
63 		const ::rtl::OUString& rLocalName,
64 		XMLChangedRegionImportContext& rChangedRegion,
65 		const ::rtl::OUString& rChangeType);
66 
67 	~XMLChangeInfoContext();
68 
69 	virtual void StartElement(
70 		const ::com::sun::star::uno::Reference<
71 			::com::sun::star::xml::sax::XAttributeList> & xAttrList);
72 
73 	virtual SvXMLImportContext *CreateChildContext(
74 		sal_uInt16 nPrefix,
75 		const ::rtl::OUString& rLocalName,
76 		const ::com::sun::star::uno::Reference<
77 			::com::sun::star::xml::sax::XAttributeList >& xAttrList );
78 
79 	virtual void EndElement();
80 
81 };
82 
83 #endif
84