LibreOffice Module xmloff (master)  1
XMLFontStylesContext_impl.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_SOURCE_STYLE_XMLFONTSTYLESCONTEXT_IMPL_HXX
21 #define INCLUDED_XMLOFF_SOURCE_STYLE_XMLFONTSTYLESCONTEXT_IMPL_HXX
22 
23 #include <xmloff/xmlstyle.hxx>
24 
25 namespace com::sun::star::io {
26  class XOutputStream;
27 }
28 
31 {
32  css::uno::Any aFamilyName;
33  css::uno::Any aStyleName;
34  css::uno::Any aFamily;
35  css::uno::Any aPitch;
36  css::uno::Any aEnc;
37 
39 
41  {
42  return xStyles.get();
43  }
44 
45 public:
46 
47 
49  XMLFontStylesContext& rStyles );
50  virtual ~XMLFontStyleContextFontFace() override;
51 
52  void SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName,
53  const OUString& rValue ) override;
54 
55  void FillProperties( ::std::vector< XMLPropertyState > &rProps,
56  sal_Int32 nFamilyNameIdx,
57  sal_Int32 nStyleNameIdx,
58  sal_Int32 nFamilyIdx,
59  sal_Int32 nPitchIdx,
60  sal_Int32 nCharsetIdx ) const;
61 
62  OUString familyName() const;
63 
64  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
65  sal_Int32 nElement,
66  const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override;
67 };
68 
71 {
73 public:
74 
75 
77  const XMLFontStyleContextFontFace& font );
78 
79  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
80  sal_Int32 nElement,
81  const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override;
82 };
83 
86 {
88  OUString format;
89  OUString linkPath;
90  ::css::uno::Sequence< sal_Int8 > maFontData;
91  ::css::uno::Reference< ::css::io::XOutputStream > mxBase64Stream;
92 
93  void handleEmbeddedFont( const OUString& url, bool eot );
94  void handleEmbeddedFont( const ::css::uno::Sequence< sal_Int8 >& rData, bool eot );
95 public:
96 
97 
99  const XMLFontStyleContextFontFace& font );
100 
101  virtual void SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName,
102  const OUString& rValue ) override;
103  void SetFormat( const OUString& rFormat );
104  void SAL_CALL endFastElement(sal_Int32 nElement) override;
105  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
106  sal_Int32 nElement,
107  const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override;
108 };
109 
112 {
114 public:
115 
118 
119  void SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName,
120  const OUString& rValue ) override;
121 };
122 
123 #endif
124 
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
XMLFontStyleContextFontFaceUri & uri
XMLFontStyleContextFontFaceSrc(SvXMLImport &rImport, const XMLFontStyleContextFontFace &font)
const XMLFontStyleContextFontFace & font
void FillProperties(::std::vector< XMLPropertyState > &rProps, sal_Int32 nFamilyNameIdx, sal_Int32 nStyleNameIdx, sal_Int32 nFamilyIdx, sal_Int32 nPitchIdx, sal_Int32 nCharsetIdx) const
css::uno::Any const & rValue
Definition: ImageStyle.hxx:38
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual void SetAttribute(sal_uInt16 nPrefixKey, const OUString &rLocalName, const OUString &rValue) override
virtual ~XMLFontStyleContextFontFace() override
void SetAttribute(sal_uInt16 nPrefixKey, const OUString &rLocalName, const OUString &rValue) override
const XMLFontStyleContextFontFace & font
rtl::Reference< XMLFontStylesContext > xStyles
::css::uno::Sequence< sal_Int8 > maFontData
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:45
void SetAttribute(sal_uInt16 nPrefixKey, const OUString &rLocalName, const OUString &rValue) override
XMLFontStyleContextFontFaceUri(SvXMLImport &rImport, const XMLFontStyleContextFontFace &font)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
::css::uno::Reference< ::css::io::XOutputStream > mxBase64Stream
void handleEmbeddedFont(const OUString &url, bool eot)
XMLFontStyleContextFontFace(SvXMLImport &rImport, XMLFontStylesContext &rStyles)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
XMLFontStyleContextFontFaceFormat(SvXMLImport &rImport, XMLFontStyleContextFontFaceUri &uri)
void SetFormat(const OUString &rFormat)