lok: vcl: fix multiple floatwin removal case more robustly.
[LibreOffice.git] / writerfilter / source / dmapper / FontTable.hxx
blobef2b3adbe79b77e1eb60096ea5d205cabdc63ef9
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 #ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_FONTTABLE_HXX
21 #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_FONTTABLE_HXX
23 #include <memory>
24 #include "LoggedResources.hxx"
25 #include <com/sun/star/lang/XComponent.hpp>
26 #include <com/sun/star/io/XInputStream.hpp>
28 namespace writerfilter {
29 namespace dmapper
32 struct FontTable_Impl;
33 struct FontEntry : public virtual SvRefBase
35 typedef tools::SvRef<FontEntry> Pointer_t;
37 OUString sFontName;
38 sal_Int32 nTextEncoding;
39 FontEntry() :
40 nTextEncoding( RTL_TEXTENCODING_DONTKNOW )
44 class FontTable : public LoggedProperties, public LoggedTable
45 /*,public BinaryObj*/, public LoggedStream
47 std::unique_ptr<FontTable_Impl> m_pImpl;
49 public:
50 FontTable();
51 virtual ~FontTable() override;
53 sal_uInt32 size();
54 const FontEntry::Pointer_t getFontEntry(sal_uInt32 nIndex);
56 private:
57 // Properties
58 virtual void lcl_attribute(Id Name, Value & val) override;
59 virtual void lcl_sprm(Sprm & sprm) override;
60 void resolveSprm(Sprm & r_sprm);
62 // Table
63 virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) override;
65 // Stream
66 virtual void lcl_startSectionGroup() override;
67 virtual void lcl_endSectionGroup() override;
68 virtual void lcl_startParagraphGroup() override;
69 virtual void lcl_endParagraphGroup() override;
70 virtual void lcl_startCharacterGroup() override;
71 virtual void lcl_endCharacterGroup() override;
72 virtual void lcl_text(const sal_uInt8 * data, size_t len) override;
73 virtual void lcl_utext(const sal_uInt8 * data, size_t len) override;
74 virtual void lcl_props(writerfilter::Reference<Properties>::Pointer_t ref) override;
75 virtual void lcl_table(Id name,
76 writerfilter::Reference<Table>::Pointer_t ref) override;
77 virtual void lcl_substream(Id name,
78 ::writerfilter::Reference<Stream>::Pointer_t ref) override;
79 virtual void lcl_info(const std::string & info) override;
80 virtual void lcl_startShape(css::uno::Reference<css::drawing::XShape> const& xShape) override;
81 virtual void lcl_endShape( ) override;
84 typedef tools::SvRef< FontTable > FontTablePtr;
86 class EmbeddedFontHandler : public LoggedProperties
88 public:
89 EmbeddedFontHandler( const OUString& fontName, const char* style );
90 virtual ~EmbeddedFontHandler() override;
91 private:
92 virtual void lcl_attribute( Id name, Value& val ) override;
93 virtual void lcl_sprm( Sprm& rSprm ) override;
94 OUString const fontName;
95 const char* const style;
96 OUString id;
97 OUString fontKey;
98 css::uno::Reference<css::io::XInputStream> inputStream;
104 #endif
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */