Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / filter / inc / lotimpop.hxx
blobed1c492d79bc6f89ecbc1cc2cae03f34e5309b27
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 SC_LOTIMPOP_HXX
21 #define SC_LOTIMPOP_HXX
23 #include <rtl/ustring.hxx>
25 #include "imp_op.hxx"
26 #include "flttypes.hxx"
27 #include "ftools.hxx"
28 #include "lotform.hxx"
29 #include "lotattr.hxx"
31 class ScFormulaCell;
32 class LotusFontBuffer;
35 class ImportLotus : public ImportTyp
37 private:
38 SvStream* pIn; // benoetigt wegen multiplem Read()!
39 LotusToSc aConv;
40 sal_uInt16 nTab; // z.Zt. bearbeitete Tabelle
41 sal_Int32 nExtTab;
42 // -------------------------------------------------------------------
43 // in WK?-Datei
44 void Bof( void ); // 0x0000 00
45 sal_Bool BofFm3( void ); // 0x0000 00
46 void Columnwidth( sal_uInt16 nRecLen ); // 0x0007 07
47 void Hiddencolumn( sal_uInt16 nRecLen ); // 0x0008 08
48 void Userrange( void ); // 0x0009 09
49 void Errcell( void ); // 0x0014 20
50 void Nacell( void ); // 0x0015 21
51 void Labelcell( void ); // 0x0016 22
52 void Numbercell( void ); // 0x0017 23
53 void Smallnumcell( void ); // 0x0018 24
54 ScFormulaCell* Formulacell( sal_uInt16 nRecLen ); // 0x0019 25
55 void Formulastring( ScFormulaCell& ); // 0x001a 26
56 // 0x001b 27 special
57 void NamedSheet( void ); // 14000
58 void RowPresentation( sal_uInt16 nRecLen ); // 2007
60 // -------------------------------------------------------------------
61 // in FM?-Datei
62 void Font_Face( void ); // 174
63 void Font_Type( void ); // 176
64 void Font_Ysize( void ); // 177
65 void _Row( const sal_uInt16 nRecLen ); // 197 ?
66 // -------------------------------------------------------------------
67 inline void Read( ScAddress& );
68 inline void Read( ScRange& );
69 // fuer Addresses/Ranges im Format Row(16)/Tab(8)/Col(8)
70 inline void Read( sal_Char& );
71 inline void Read( sal_uInt8& );
72 inline void Read( sal_uInt16& );
73 inline void Read( sal_Int16& );
74 inline void Read( sal_uInt32& );
75 inline void Read( double& ); // 10-Byte-IEEE lesen
76 inline void Read( LotAttrWK3& );
77 void Read( OUString& ); // 0-terminierten String einlesen
78 inline void Skip( const sal_uInt16 nNumBytes );
79 // -------------------------------------------------------------------
80 public:
81 ImportLotus( SvStream&, ScDocument*, rtl_TextEncoding eSrc );
83 virtual ~ImportLotus();
85 FltError Read();
86 FltError Read( SvStream& ); // special for *.fm3-Dateien
90 inline void ImportLotus::Read( ScAddress& rAddr )
92 sal_uInt16 nRow;
93 *pIn >> nRow;
94 rAddr.SetRow( static_cast<SCROW>(nRow) );
95 sal_uInt8 nByte;
96 *pIn >> nByte;
97 rAddr.SetTab( static_cast<SCTAB>(nByte) );
98 *pIn >> nByte;
99 rAddr.SetCol( static_cast<SCCOL>(nByte) );
103 inline void ImportLotus::Read( ScRange& rRange )
105 Read( rRange.aStart );
106 Read( rRange.aEnd );
110 inline void ImportLotus::Read( sal_Char& r )
112 *pIn >> r;
116 inline void ImportLotus::Read( sal_uInt8& r )
118 *pIn >> r;
122 inline void ImportLotus::Read( sal_uInt16& r )
124 *pIn >> r;
128 inline void ImportLotus::Read( sal_Int16& r )
130 *pIn >> r;
134 inline void ImportLotus::Read( sal_uInt32& r )
136 *pIn >> r;
140 inline void ImportLotus::Read( double& r )
142 r = ScfTools::ReadLongDouble( *pIn );
146 inline void ImportLotus::Read( LotAttrWK3& r )
148 *pIn >> r.nFont >> r.nFontCol >> r.nBack >> r.nLineStyle;
152 inline void ImportLotus::Skip( const sal_uInt16 n )
154 pIn->SeekRel( n );
159 #endif
161 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */