bump product version to 5.0.4.1
[LibreOffice.git] / xmloff / source / text / XMLTextMarkImportContext.hxx
blobae01b79b2a6b7f87c70711e4510ae6c1f0232c8b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #ifndef INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTMARKIMPORTCONTEXT_HXX
22 #define INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTMARKIMPORTCONTEXT_HXX
24 #include <xmloff/xmlictxt.hxx>
25 #include <com/sun/star/uno/Reference.h>
28 namespace com { namespace sun { namespace star {
29 namespace text {
30 class XTextRange;
31 class XTextContent;
33 namespace xml { namespace sax {
34 class XAttributeList;
35 } }
36 } } }
37 class XMLTextImportHelper;
39 class XMLFieldParamImportContext : public SvXMLImportContext
41 XMLTextImportHelper& rHelper;
42 public:
43 XMLFieldParamImportContext(
44 SvXMLImport& rImport,
45 XMLTextImportHelper& rHlp,
46 sal_uInt16 nPrfx,
47 const OUString& rLocalName );
49 virtual void StartElement(
50 const ::com::sun::star::uno::Reference<
51 ::com::sun::star::xml::sax::XAttributeList> & xAttrList) SAL_OVERRIDE;
55 /**
56 * import bookmarks and reference marks
57 * ( <bookmark>, <bookmark-start>, <bookmark-end>,
58 * <reference>, <reference-start>, <reference-end> )
60 * All elements are handled by the same class due to their similarities.
62 class XMLTextMarkImportContext : public SvXMLImportContext
65 XMLTextImportHelper & m_rHelper;
66 OUString m_sBookmarkName;
67 OUString m_sFieldName;
68 OUString m_sXmlId;
69 // RDFa
70 bool m_bHaveAbout;
71 OUString m_sAbout;
72 OUString m_sProperty;
73 OUString m_sContent;
74 OUString m_sDatatype;
76 public:
78 TYPEINFO_OVERRIDE();
80 XMLTextMarkImportContext(
81 SvXMLImport& rImport,
82 XMLTextImportHelper& rHlp,
83 sal_uInt16 nPrfx,
84 const OUString& rLocalName );
86 protected:
88 virtual void StartElement(
89 const ::com::sun::star::uno::Reference<
90 ::com::sun::star::xml::sax::XAttributeList> & xAttrList) SAL_OVERRIDE;
91 virtual void EndElement() SAL_OVERRIDE;
93 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
94 const OUString& rLocalName,
95 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
97 public:
98 static ::com::sun::star::uno::Reference<
99 ::com::sun::star::text::XTextContent > CreateAndInsertMark(
100 SvXMLImport& rImport,
101 const OUString& sServiceName,
102 const OUString& sMarkName,
103 const ::com::sun::star::uno::Reference<
104 ::com::sun::star::text::XTextRange> & rRange,
105 const OUString& i_rXmlId = OUString());
107 bool FindName(
108 SvXMLImport& rImport,
109 const ::com::sun::star::uno::Reference<
110 ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
113 #endif
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */