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