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 .
23 #include <xmloff/xmlictxt.hxx>
24 #include <com/sun/star/uno/Reference.h>
27 namespace com::sun::star
{
36 class XMLTextImportHelper
;
38 class XMLFieldParamImportContext
: public SvXMLImportContext
40 XMLTextImportHelper
& rHelper
;
42 XMLFieldParamImportContext(
44 XMLTextImportHelper
& rHlp
);
46 virtual void SAL_CALL
startFastElement(
48 const css::uno::Reference
<css::xml::sax::XFastAttributeList
> & xAttrList
) override
;
53 * import bookmarks and reference marks
54 * ( <bookmark>, <bookmark-start>, <bookmark-end>,
55 * <reference>, <reference-start>, <reference-end> )
57 * All elements are handled by the same class due to their similarities.
59 class XMLTextMarkImportContext final
: public SvXMLImportContext
62 XMLTextImportHelper
& m_rHelper
;
64 css::uno::Reference
<css::uno::XInterface
> & m_rxCrossRefHeadingBookmark
;
66 OUString m_sBookmarkName
;
67 OUString m_sFieldName
;
69 OUString m_sCondition
;
80 XMLTextMarkImportContext(
82 XMLTextImportHelper
& rHlp
,
83 css::uno::Reference
<css::uno::XInterface
> & io_rxCrossRefHeadingBookmark
);
85 virtual void SAL_CALL
startFastElement( sal_Int32 nElement
,
86 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
87 virtual void SAL_CALL
endFastElement(sal_Int32 nElement
) override
;
89 virtual css::uno::Reference
< css::xml::sax::XFastContextHandler
> SAL_CALL
createFastChildContext(
91 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
94 static css::uno::Reference
< css::text::XTextContent
> CreateAndInsertMark(
96 const OUString
& sServiceName
,
97 const OUString
& sMarkName
,
98 const css::uno::Reference
<css::text::XTextRange
> & rRange
,
99 const OUString
& i_rXmlId
= OUString(),
100 bool const isFieldmarkSeparatorMissing
= false);
103 const css::uno::Reference
<css::xml::sax::XFastAttributeList
> & xAttrList
);
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */