Branch data Line data Source code
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_FONTTABLE_HXX
21 : : #define INCLUDED_FONTTABLE_HXX
22 : :
23 : : #include <boost/shared_ptr.hpp>
24 : : #include <WriterFilterDllApi.hxx>
25 : : #include <resourcemodel/LoggedResources.hxx>
26 : : #include <com/sun/star/lang/XComponent.hpp>
27 : :
28 : : namespace writerfilter {
29 : : namespace dmapper
30 : : {
31 : :
32 : : struct FontTable_Impl;
33 : 2203 : struct FontEntry
34 : : {
35 : : typedef boost::shared_ptr<FontEntry> Pointer_t;
36 : :
37 : : OUString sFontName;
38 : : OUString sFontName1;
39 : : bool bTrueType;
40 : : sal_Int16 nPitchRequest;
41 : : sal_Int32 nTextEncoding;
42 : : sal_Int32 nFontFamilyId;
43 : : sal_Int32 nBaseWeight;
44 : : sal_Int32 nAltFontIndex;
45 : : OUString sPanose;
46 : : OUString sFontSignature;
47 : : OUString sAlternativeFont;
48 : 2203 : FontEntry() :
49 : : bTrueType(false),
50 : : nPitchRequest( 0 ),
51 : : nTextEncoding( RTL_TEXTENCODING_DONTKNOW ),
52 : : nFontFamilyId( 0 ),
53 : : nBaseWeight( 0 ),
54 : 2203 : nAltFontIndex( 0 )
55 : 2203 : {}
56 : : };
57 : :
58 : : class WRITERFILTER_DLLPRIVATE FontTable : public LoggedProperties, public LoggedTable
59 : : /*,public BinaryObj*/, public LoggedStream
60 : : {
61 : : FontTable_Impl *m_pImpl;
62 : :
63 : : public:
64 : : FontTable();
65 : : virtual ~FontTable();
66 : :
67 : : sal_uInt32 size();
68 : : const FontEntry::Pointer_t getFontEntry(sal_uInt32 nIndex);
69 : :
70 : : private:
71 : : // Properties
72 : : virtual void lcl_attribute(Id Name, Value & val);
73 : : virtual void lcl_sprm(Sprm & sprm);
74 : : void resolveSprm(Sprm & r_sprm);
75 : :
76 : : // Table
77 : : virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref);
78 : :
79 : : // Stream
80 : : virtual void lcl_startSectionGroup();
81 : : virtual void lcl_endSectionGroup();
82 : : virtual void lcl_startParagraphGroup();
83 : : virtual void lcl_endParagraphGroup();
84 : : virtual void lcl_startCharacterGroup();
85 : : virtual void lcl_endCharacterGroup();
86 : : virtual void lcl_text(const sal_uInt8 * data, size_t len);
87 : : virtual void lcl_utext(const sal_uInt8 * data, size_t len);
88 : : virtual void lcl_props(writerfilter::Reference<Properties>::Pointer_t ref);
89 : : virtual void lcl_table(Id name,
90 : : writerfilter::Reference<Table>::Pointer_t ref);
91 : : virtual void lcl_substream(Id name,
92 : : ::writerfilter::Reference<Stream>::Pointer_t ref);
93 : : virtual void lcl_info(const string & info);
94 : : virtual void lcl_startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape );
95 : : virtual void lcl_endShape( );
96 : :
97 : : };
98 : : typedef boost::shared_ptr< FontTable > FontTablePtr;
99 : : }}
100 : :
101 : : #endif //
102 : :
103 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|