LibreOffice Module xmloff (master)  1
XMLTextMarkImportContext.hxx
Go to the documentation of this file.
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::sun::star {
29  namespace text {
30  class XTextRange;
31  class XTextContent;
32  }
33  namespace xml::sax {
34  class XAttributeList;
35  }
36 }
38 
40 {
42 public:
44  SvXMLImport& rImport,
45  XMLTextImportHelper& rHlp,
46  sal_uInt16 nPrfx,
47  const OUString& rLocalName );
48 
49  virtual void StartElement(
50  const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override;
51 };
52 
53 
62 {
63 private:
65 
66  css::uno::Reference<css::uno::XInterface> & m_rxCrossRefHeadingBookmark;
67 
68  OUString m_sBookmarkName;
69  OUString m_sFieldName;
70  OUString m_sXmlId;
71  // RDFa
73  OUString m_sAbout;
74  OUString m_sProperty;
75  OUString m_sContent;
76  OUString m_sDatatype;
77 
78 public:
79 
81  SvXMLImport& rImport,
82  XMLTextImportHelper& rHlp,
83  css::uno::Reference<css::uno::XInterface> & io_rxCrossRefHeadingBookmark,
84  sal_uInt16 nPrfx,
85  const OUString& rLocalName );
86 
87 protected:
88 
89  virtual void StartElement(
90  const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override;
91  virtual void EndElement() override;
92 
93  virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
94  const OUString& rLocalName,
95  const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
96 
97 public:
98  static css::uno::Reference< css::text::XTextContent > CreateAndInsertMark(
99  SvXMLImport& rImport,
100  const OUString& sServiceName,
101  const OUString& sMarkName,
102  const css::uno::Reference<css::text::XTextRange> & rRange,
103  const OUString& i_rXmlId = OUString());
104 
105  bool FindName(
106  SvXMLImport& rImport,
107  const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList);
108 };
109 
110 #endif
111 
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
XMLFieldParamImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, sal_uInt16 nPrfx, const OUString &rLocalName)
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
StartElement is called after a context has been constructed and before an elements context is parsed...
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
StartElement is called after a context has been constructed and before an elements context is parsed...
static css::uno::Reference< css::text::XTextContent > CreateAndInsertMark(SvXMLImport &rImport, const OUString &sServiceName, const OUString &sMarkName, const css::uno::Reference< css::text::XTextRange > &rRange, const OUString &i_rXmlId=OUString())
exports com.sun.star. text
bool FindName(SvXMLImport &rImport, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:44
virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
Create a children element context.
import bookmarks and reference marks ( , , , , , )
css::uno::Reference< css::uno::XInterface > & m_rxCrossRefHeadingBookmark
virtual void EndElement() override
EndElement is called before a context will be destructed, but after an elements context has been pars...
XMLTextMarkImportContext(SvXMLImport &rImport, XMLTextImportHelper &rHlp, css::uno::Reference< css::uno::XInterface > &io_rxCrossRefHeadingBookmark, sal_uInt16 nPrfx, const OUString &rLocalName)