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 #ifndef _XMLOFF_XMLCHANGEIMPORTCONTEXT_HXX
25 #define _XMLOFF_XMLCHANGEIMPORTCONTEXT_HXX
26 
27 
28 #include <xmloff/xmlictxt.hxx>
29 #include <com/sun/star/uno/Reference.h>
30 
31 
32 namespace com { namespace sun { namespace star {
33 	namespace xml { namespace sax {
34 		class XAttributeList;
35 	} }
36 } } }
37 namespace rtl {
38 	class OUString;
39 }
40 
41 
42 
43 /**
44  * import change tracking/redlining markers
45  * <text:change>, <text:change-start>, <text:change-end>
46  */
47 class XMLChangeImportContext : public SvXMLImportContext
48 {
49 	sal_Bool bIsStart;
50 	sal_Bool bIsEnd;
51 	sal_Bool bIsOutsideOfParagraph;
52 
53 public:
54 
55 	TYPEINFO();
56 
57 	/**
58 	 * import a change mark
59 	 * (<text:change>, <text:change-start>, <text:change-end>)
60 	 * Note: a <text:change> mark denotes start and end of a change
61 	 * simultaniously, so both bIsStart and bIsEnd parameters would
62 	 * be set true.
63 	 */
64 	XMLChangeImportContext(
65 		SvXMLImport& rImport,
66 		sal_Int16 nPrefix,
67 		const ::rtl::OUString& rLocalName,
68 		sal_Bool bIsStart,	/// mark start of a change
69 		sal_Bool bIsEnd,	/// mark end of a change
70 		/// true if change mark is encountered outside of a paragraph
71 		/// (usually before a section or table)
72 		sal_Bool bIsOutsideOfParagraph = sal_False);
73 
74 	~XMLChangeImportContext();
75 
76 	virtual void StartElement(
77 		const ::com::sun::star::uno::Reference<
78 				::com::sun::star::xml::sax::XAttributeList> & xAttrList);
79 };
80 
81 #endif
82