LibreOffice Module xmloff (master)  1
XMLFontStylesContext.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 #ifndef INCLUDED_XMLOFF_XMLFONTSTYLESCONTEXT_HXX
20 #define INCLUDED_XMLOFF_XMLFONTSTYLESCONTEXT_HXX
21 
22 #include <sal/config.h>
23 #include <xmloff/dllapi.h>
24 
25 #include <memory>
26 #include <vector>
27 
28 #include <xmloff/xmlstyle.hxx>
29 
30 struct XMLPropertyState;
35 
37 {
38  std::unique_ptr<XMLFontFamilyNamePropHdl> pFamilyNameHdl;
39  std::unique_ptr<XMLFontFamilyPropHdl> pFamilyHdl;
40  std::unique_ptr<XMLFontPitchPropHdl> pPitchHdl;
41  std::unique_ptr<XMLFontEncodingPropHdl> pEncHdl;
42 
43  rtl_TextEncoding eDfltEncoding;
44 
46  virtual SvXMLStyleContext *CreateStyleChildContext( sal_Int32 nElement,
47  const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override;
48 
49 public:
50 
51  XMLFontStylesContext( SvXMLImport& rImport, rtl_TextEncoding eDfltEnc );
52 
53  ~XMLFontStylesContext() override;
54 
55  bool FillProperties( const OUString& rName,
56  ::std::vector< XMLPropertyState > &rProps,
57  sal_Int32 nFamilyNameIdx,
58  sal_Int32 nStyleNameIdx,
59  sal_Int32 nFamilyIdx,
60  sal_Int32 nPitchIdx,
61  sal_Int32 nCharsetIdx ) const;
62 
63  rtl_TextEncoding GetDfltCharset() const { return eDfltEncoding; }
64 
65  XMLFontFamilyNamePropHdl& GetFamilyNameHdl() const { return *pFamilyNameHdl; }
66  XMLFontFamilyPropHdl& GetFamilyHdl() const { return *pFamilyHdl; }
67  XMLFontPitchPropHdl& GetPitchHdl() const { return *pPitchHdl; }
68  XMLFontEncodingPropHdl& GetEncodingHdl() const { return *pEncHdl; }
69 
70 };
71 
72 #endif
73 
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual SvXMLStyleContext * CreateStyleChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Definition: xmlstyle.cxx:311
XMLFontPitchPropHdl & GetPitchHdl() const
PropertyHandler for the XML-data-type:
Definition: fonthdl.hxx:64
XMLFontEncodingPropHdl & GetEncodingHdl() const
std::unique_ptr< XMLFontEncodingPropHdl > pEncHdl
std::unique_ptr< XMLFontFamilyNamePropHdl > pFamilyNameHdl
PropertyHandler for the XML-data-type:
Definition: fonthdl.hxx:28
PropertyHandler for the XML-data-type:
Definition: fonthdl.hxx:52
std::unique_ptr< XMLFontPitchPropHdl > pPitchHdl
rtl_TextEncoding GetDfltCharset() const
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:122
XMLFontFamilyPropHdl & GetFamilyHdl() const
rtl_TextEncoding eDfltEncoding
PropertyHandler for the XML-data-type:
Definition: fonthdl.hxx:40
std::unique_ptr< XMLFontFamilyPropHdl > pFamilyHdl
#define XMLOFF_DLLPUBLIC
Definition: dllapi.h:29
XMLFontFamilyNamePropHdl & GetFamilyNameHdl() const