1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
{
33 namespace xml
{ namespace sax
{
37 class XMLTextImportHelper
;
39 class XMLFieldParamImportContext
: public SvXMLImportContext
41 XMLTextImportHelper
& rHelper
;
43 XMLFieldParamImportContext(
45 XMLTextImportHelper
& rHlp
,
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
;
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
;
80 XMLTextMarkImportContext(
82 XMLTextImportHelper
& rHlp
,
84 const OUString
& rLocalName
);
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
;
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());
108 SvXMLImport
& rImport
,
109 const ::com::sun::star::uno::Reference
<
110 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */