tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / xmloff / source / text / txtparai.hxx
blobcfe9408d664859425c4d4989d9492c4b0ad11bcb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #pragma once
22 #include <com/sun/star/container/XIndexReplace.hpp>
23 #include <com/sun/star/uno/Reference.h>
24 #include <xmloff/xmlictxt.hxx>
25 #include "txthints.hxx"
27 namespace com::sun::star {
28 namespace text { class XTextRange; }
29 namespace xml::sax { class XAttributeList; }
32 #define CONV_FROM_STAR_BATS 1
33 #define CONV_FROM_STAR_MATH 2
34 #define CONV_STAR_FONT_FLAGS_VALID 4
36 class XMLParaContext : public SvXMLImportContext
38 css::uno::Reference < css::text::XTextRange > xStart;
39 OUString sStyleName;
40 OUString m_sXmlId;
41 OUString m_sAbout;
42 OUString m_sProperty;
43 OUString m_sContent;
44 OUString m_sDatatype;
45 css::uno::Any m_aMarkerStyleName;
46 bool m_bHaveAbout;
47 sal_Int8 nOutlineLevel;
48 std::optional<XMLHints_Impl> m_oHints;
49 // Lost outline numbering in master document (#i73509#)
50 bool mbOutlineLevelAttrFound;
51 bool mbOutlineContentVisible;
52 bool bIgnoreLeadingSpace;
53 bool bHeading;
54 bool bIsListHeader;
55 bool bIsRestart;
56 sal_Int16 nStartValue;
57 sal_uInt8 nStarFontsConvFlags;
59 public:
62 XMLParaContext( SvXMLImport& rImport,
63 sal_Int32 nElement,
64 const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList );
66 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
68 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
69 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
71 virtual void SAL_CALL characters( const OUString& rChars ) override;
75 class XMLNumberedParaContext : public SvXMLImportContext
77 /// text:list-level MINUS 1
78 sal_Int16 m_Level;
79 /// text:start-value
80 sal_Int16 m_StartValue;
81 /// text:list-id
82 OUString m_ListId;
83 /// text:style-name
84 css::uno::Reference< css::container::XIndexReplace > m_xNumRules;
86 public:
89 XMLNumberedParaContext( SvXMLImport& i_rImport,
90 sal_Int32 nElement,
91 const css::uno::Reference< css::xml::sax::XFastAttributeList > & i_xAttrList );
93 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
95 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
96 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
98 sal_Int16 GetLevel() const { return m_Level; }
99 const css::uno::Reference< css::container::XIndexReplace >& GetNumRules() const
100 { return m_xNumRules; }
101 const OUString& GetListId() const { return m_ListId; }
102 sal_Int16 GetStartValue() const { return m_StartValue; }
106 class XMLHints_Impl;
107 class XMLStyleHint_Impl;
109 class XMLImpSpanContext_Impl : public SvXMLImportContext
111 XMLHints_Impl& m_rHints;
112 XMLStyleHint_Impl *pHint;
114 bool& rIgnoreLeadingSpace;
116 sal_uInt8 nStarFontsConvFlags;
118 public:
121 XMLImpSpanContext_Impl(
122 SvXMLImport& rImport,
123 sal_Int32 nElement,
124 const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList,
125 XMLHints_Impl& rHints,
126 bool& rIgnLeadSpace,
127 sal_uInt8 nSFConvFlags
130 static css::uno::Reference< css::xml::sax::XFastContextHandler > CreateSpanContext(
131 SvXMLImport& rImport,
132 sal_Int32 nElement,
133 const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList,
134 XMLHints_Impl& rHints,
135 bool& rIgnLeadSpace,
136 sal_uInt8 nStarFontsConvFlags = 0
139 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
140 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
142 virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
143 virtual void SAL_CALL characters( const OUString& rChars ) override;
146 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */