Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 :
21 : #ifndef INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTMARKIMPORTCONTEXT_HXX
22 : #define INCLUDED_XMLOFF_SOURCE_TEXT_XMLTEXTMARKIMPORTCONTEXT_HXX
23 :
24 : #include <xmloff/xmlictxt.hxx>
25 : #include <com/sun/star/uno/Reference.h>
26 :
27 :
28 : namespace com { namespace sun { namespace star {
29 : namespace text {
30 : class XTextRange;
31 : class XTextContent;
32 : }
33 : namespace xml { namespace sax {
34 : class XAttributeList;
35 : } }
36 : } } }
37 : class XMLTextImportHelper;
38 :
39 0 : class XMLFieldParamImportContext : public SvXMLImportContext
40 : {
41 : XMLTextImportHelper& rHelper;
42 : public:
43 : XMLFieldParamImportContext(
44 : SvXMLImport& rImport,
45 : XMLTextImportHelper& rHlp,
46 : sal_uInt16 nPrfx,
47 : const OUString& rLocalName );
48 :
49 : virtual void StartElement(
50 : const ::com::sun::star::uno::Reference<
51 : ::com::sun::star::xml::sax::XAttributeList> & xAttrList) SAL_OVERRIDE;
52 : };
53 :
54 :
55 : /**
56 : * import bookmarks and reference marks
57 : * ( <bookmark>, <bookmark-start>, <bookmark-end>,
58 : * <reference>, <reference-start>, <reference-end> )
59 : *
60 : * All elements are handled by the same class due to their similarities.
61 : */
62 7956 : class XMLTextMarkImportContext : public SvXMLImportContext
63 : {
64 :
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;
75 :
76 : public:
77 :
78 : TYPEINFO_OVERRIDE();
79 :
80 : XMLTextMarkImportContext(
81 : SvXMLImport& rImport,
82 : XMLTextImportHelper& rHlp,
83 : sal_uInt16 nPrfx,
84 : const OUString& rLocalName );
85 :
86 : protected:
87 :
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;
92 :
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;
96 :
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());
106 :
107 : bool FindName(
108 : SvXMLImport& rImport,
109 : const ::com::sun::star::uno::Reference<
110 : ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
111 : };
112 :
113 : #endif
114 :
115 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|