tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / xmloff / source / style / XMLFontStylesContext_impl.hxx
blob0fdcb8104175454d5710754e642dfff17c4b02bd
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 .
20 #pragma once
22 #include <xmloff/xmlstyle.hxx>
23 #include <xmloff/XMLFontStylesContext.hxx>
25 namespace com::sun::star::io {
26 class XOutputStream;
29 /// Handles <style:font-face>
30 class XMLFontStyleContextFontFace : public SvXMLStyleContext
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;
38 rtl::Reference<XMLFontStylesContext> xStyles;
40 XMLFontStylesContext *GetStyles()
42 return xStyles.get();
45 public:
48 XMLFontStyleContextFontFace( SvXMLImport& rImport,
49 XMLFontStylesContext& rStyles );
50 virtual ~XMLFontStyleContextFontFace() override;
52 void SetAttribute( sal_Int32 nElement,
53 const OUString& rValue ) override;
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;
62 OUString familyName() const;
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;
69 /// Handles <style:font-face-src>
70 class XMLFontStyleContextFontFaceSrc : public SvXMLImportContext
72 const XMLFontStyleContextFontFace& font;
73 public:
76 XMLFontStyleContextFontFaceSrc( SvXMLImport& rImport,
77 const XMLFontStyleContextFontFace& font );
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;
84 /// Handles <style:font-face-uri>
85 class XMLFontStyleContextFontFaceUri : public SvXMLStyleContext
87 const XMLFontStyleContextFontFace& font;
88 OUString format;
89 OUString linkPath;
90 ::css::uno::Sequence< sal_Int8 > maFontData;
91 ::css::uno::Reference< ::css::io::XOutputStream > mxBase64Stream;
93 void handleEmbeddedFont( const OUString& url, bool eot );
94 void handleEmbeddedFont( const ::css::uno::Sequence< sal_Int8 >& rData, bool eot );
95 public:
98 XMLFontStyleContextFontFaceUri( SvXMLImport& rImport,
99 const XMLFontStyleContextFontFace& font );
101 virtual void SetAttribute( sal_Int32 nElement,
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;
110 /// Handles <svg:font-face-format>
111 class XMLFontStyleContextFontFaceFormat : public SvXMLStyleContext
113 XMLFontStyleContextFontFaceUri& uri;
114 public:
116 XMLFontStyleContextFontFaceFormat( SvXMLImport& rImport,
117 XMLFontStyleContextFontFaceUri& uri );
119 void SetAttribute( sal_Int32 nElement,
120 const OUString& rValue ) override;
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */