LibreOffice Module xmloff (master)  1
XMLFootnoteConfigurationImportContext.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 #ifndef INCLUDED_XMLOFF_INC_XMLFOOTNOTECONFIGURATIONIMPORTCONTEXT_HXX
21 #define INCLUDED_XMLOFF_INC_XMLFOOTNOTECONFIGURATIONIMPORTCONTEXT_HXX
22 
23 #include <memory>
24 #include <xmloff/xmlstyle.hxx>
25 
26 namespace com::sun::star {
27  namespace uno { template<class X> class Reference; }
28  namespace xml::sax { class XAttributeList; }
29  namespace beans { class XPropertySet; }
30 }
31 class SvXMLImport;
32 
35 {
36  OUString sCitationStyle;
37  OUString sAnchorStyle;
38  OUString sDefaultStyle;
39  OUString sPageStyle;
40  OUString sPrefix;
41  OUString sSuffix;
42  OUString sNumFormat;
43  OUString sNumSync;
44  OUString sBeginNotice;
45  OUString sEndNotice;
46 
47  std::unique_ptr<SvXMLTokenMap> pAttrTokenMap;
48 
49  sal_Int16 nOffset;
50  sal_Int16 nNumbering;
51  bool bPosition;
52  bool bIsEndnote;
53 
55  virtual void SetAttribute( sal_uInt16 nPrefixKey,
56  const OUString& rLocalName,
57  const OUString& rValue ) override;
58 public:
59 
60 
62  SvXMLImport& rImport,
63  sal_Int32 nElement,
64  const css::uno::Reference< css::xml::sax::XFastAttributeList> & xAttrList);
65 
66  virtual ~XMLFootnoteConfigurationImportContext() override;
67 
69  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
70  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
71 
74 
76  /* Move code from <CreateAndInsertLate(..)> to <Finish(..)>, because
77  at this time all styles it references have been set. (#i40579#)
78  */
79  virtual void Finish( bool bOverwrite) override;
80 
82  void ProcessSettings(
83  const css::uno::Reference< css::beans::XPropertySet> & rConfig);
84 
86  void SetBeginNotice( const OUString& sText);
87 
89  void SetEndNotice( const OUString& sText);
90 };
91 
92 #endif
93 
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference
const SvXMLTokenMap & GetFtnConfigAttrTokenMap()
get token map for attributes
css::uno::Any const & rValue
Definition: ImageStyle.hxx:38
virtual void SetAttribute(sal_uInt16 nPrefixKey, const OUString &rLocalName, const OUString &rValue) override
parse attributes
void ProcessSettings(const css::uno::Reference< css::beans::XPropertySet > &rConfig)
set configuration at document
XMLFootnoteConfigurationImportContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
virtual void Finish(bool bOverwrite) override
set configuration at document; calls ProcessSettings
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
for footnotes, also parse begin and end notices
class SAL_NO_VTABLE XPropertySet
import footnote and endnote configuration elements
exports com.sun.star. beans
void SetBeginNotice(const OUString &sText)
for helper class: set begin notice
void SetEndNotice(const OUString &sText)
for helper class: set end notice