Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / xmloff / txtstyli.hxx
blobaa5627c0e608ff8e6c7442c93ea6b66b5c5dc7a6
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 #ifndef INCLUDED_XMLOFF_TXTSTYLI_HXX
20 #define INCLUDED_XMLOFF_TXTSTYLI_HXX
22 #include <sal/config.h>
24 #include <optional>
26 #include <xmloff/dllapi.h>
27 #include <xmloff/prstylei.hxx>
29 class XMLEventsImportContext;
31 class XMLOFF_DLLPUBLIC XMLTextStyleContext : public XMLPropStyleContext
33 OUString m_sListStyleName;
34 OUString m_sCategoryVal;
35 OUString m_sDropCapTextStyleName;
36 OUString m_sMasterPageName;
37 OUString m_sDataStyleName; // for grid columns only
39 sal_Int8 m_nOutlineLevel;
41 bool m_isAutoUpdate : 1;
42 bool m_bHasMasterPageName : 1;
44 bool m_bHasCombinedCharactersLetter : 1;
46 // Introduce import of empty list style (#i69523#)
47 bool m_bListStyleSet : 1;
49 rtl::Reference<XMLEventsImportContext> m_xEventContext;
51 /// Reads <style:style style:list-level="...">.
52 std::optional<sal_Int16> m_aListLevel;
54 protected:
56 virtual void SetAttribute( sal_Int32 nElement,
57 const OUString& rValue ) override;
59 public:
61 XMLTextStyleContext( SvXMLImport& rImport,
62 SvXMLStylesContext& rStyles, XmlStyleFamily nFamily,
63 bool bDefaultStyle = false );
64 ~XMLTextStyleContext() override;
66 XMLTextStyleContext(const XMLTextStyleContext &) = delete;
67 XMLTextStyleContext operator=(const XMLTextStyleContext &) = delete;
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;
72 const OUString& GetListStyle() const { return m_sListStyleName; }
73 // XML import: reconstruction of assignment of paragraph style to outline levels (#i69629#)
74 bool IsListStyleSet() const
76 return m_bListStyleSet;
79 const OUString& GetMasterPageName() const { return m_sMasterPageName; }
80 bool HasMasterPageName() const { return m_bHasMasterPageName; }
81 const OUString& GetDropCapStyleName() const { return m_sDropCapTextStyleName; }
82 const OUString& GetDataStyleName() const { return m_sDataStyleName; }
84 virtual void CreateAndInsert( bool bOverwrite ) override;
85 virtual void Finish( bool bOverwrite ) override;
86 virtual void SetDefaults() override;
88 // override FillPropertySet, so we can get at the combined characters
89 virtual void FillPropertySet(
90 const css::uno::Reference< css::beans::XPropertySet > & rPropSet ) override;
92 bool HasCombinedCharactersLetter() const
93 { return m_bHasCombinedCharactersLetter; }
95 const ::std::vector< XMLPropertyState > & GetProperties_() { return GetProperties(); }
98 #endif
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */