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 .
19 #ifndef INCLUDED_XMLOFF_TXTSTYLI_HXX
20 #define INCLUDED_XMLOFF_TXTSTYLI_HXX
22 #include <sal/config.h>
23 #include <xmloff/dllapi.h>
24 #include <xmloff/prstylei.hxx>
26 class XMLEventsImportContext
;
28 class XMLOFF_DLLPUBLIC XMLTextStyleContext
: public XMLPropStyleContext
30 OUString m_sListStyleName
;
31 OUString m_sCategoryVal
;
32 OUString m_sDropCapTextStyleName
;
33 OUString m_sMasterPageName
;
34 OUString m_sDataStyleName
; // for grid columns only
36 sal_Int8 m_nOutlineLevel
;
38 bool m_isAutoUpdate
: 1;
39 bool m_bHasMasterPageName
: 1;
41 bool m_bHasCombinedCharactersLetter
: 1;
43 // Introduce import of empty list style (#i69523#)
44 bool m_bListStyleSet
: 1;
46 rtl::Reference
<XMLEventsImportContext
> m_xEventContext
;
50 virtual void SetAttribute( sal_uInt16 nPrefixKey
,
51 const OUString
& rLocalName
,
52 const OUString
& rValue
) override
;
57 XMLTextStyleContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
58 const OUString
& rLName
,
59 const css::uno::Reference
< css::xml::sax::XAttributeList
> & xAttrList
,
60 SvXMLStylesContext
& rStyles
, sal_uInt16 nFamily
,
61 bool bDefaultStyle
= false );
62 ~XMLTextStyleContext() override
;
64 XMLTextStyleContext(const XMLTextStyleContext
&) = delete;
65 XMLTextStyleContext
operator=(const XMLTextStyleContext
&) = delete;
67 virtual SvXMLImportContextRef
CreateChildContext(
69 const OUString
& rLocalName
,
70 const css::uno::Reference
< css::xml::sax::XAttributeList
> & xAttrList
) 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(); }
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */