Update ooo320-m1
[ooovba.git] / sc / source / filter / inc / lotimpop.hxx
blob589a922eb8a4d40eff5bf017897694af8309a296
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: lotimpop.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_LOTIMPOP_HXX
32 #define SC_LOTIMPOP_HXX
34 #include <tools/string.hxx>
36 #include "imp_op.hxx"
37 #include "flttypes.hxx"
38 #include "ftools.hxx"
39 #include "lotform.hxx"
40 #include "lotattr.hxx"
42 class ScFormulaCell;
43 class LotusFontBuffer;
44 class SvxBorderLine;
47 class ImportLotus : public ImportTyp
49 private:
50 SvStream* pIn; // benoetigt wegen multiplem Read()!
51 LotusFontBuffer* pFontBuff;
52 LotusToSc aConv;
53 UINT16 nTab; // z.Zt. bearbeitete Tabelle
54 INT32 nExtTab;
55 // -------------------------------------------------------------------
56 // in WK?-Datei
57 void Bof( void ); // 0x0000 00
58 BOOL BofFm3( void ); // 0x0000 00
59 void Columnwidth( UINT16 nRecLen ); // 0x0007 07
60 void Hiddencolumn( UINT16 nRecLen ); // 0x0008 08
61 void Userrange( void ); // 0x0009 09
62 void Errcell( void ); // 0x0014 20
63 void Nacell( void ); // 0x0015 21
64 void Labelcell( void ); // 0x0016 22
65 void Numbercell( void ); // 0x0017 23
66 void Smallnumcell( void ); // 0x0018 24
67 ScFormulaCell* Formulacell( UINT16 nRecLen ); // 0x0019 25
68 void Formulastring( ScFormulaCell& ); // 0x001a 26
69 // 0x001b 27 special
70 void NamedSheet( void ); // 14000
71 void RowPresentation( UINT16 nRecLen ); // 2007
73 // -------------------------------------------------------------------
74 // in FM?-Datei
75 void Font_Face( void ); // 174
76 void Font_Type( void ); // 176
77 void Font_Ysize( void ); // 177
78 void _Row( const UINT16 nRecLen ); // 197 ?
79 // -------------------------------------------------------------------
80 inline void Read( ScAddress& );
81 inline void Read( ScRange& );
82 // fuer Addresses/Ranges im Format Row(16)/Tab(8)/Col(8)
83 inline void Read( sal_Char& );
84 inline void Read( BYTE& );
85 inline void Read( UINT16& );
86 inline void Read( INT16& );
87 inline void Read( UINT32& );
88 inline void Read( double& ); // 10-Byte-IEEE lesen
89 inline void Read( LotAttrWK3& );
90 void Read( String& ); // 0-terminierten String einlesen
91 inline void Skip( const UINT16 nNumBytes );
92 // -------------------------------------------------------------------
93 public:
94 ImportLotus( SvStream&, ScDocument*, CharSet eSrc );
96 virtual ~ImportLotus();
98 FltError Read();
99 FltError Read( SvStream& ); // special for *.fm3-Dateien
103 inline void ImportLotus::Read( ScAddress& rAddr )
105 UINT16 nRow;
106 *pIn >> nRow;
107 rAddr.SetRow( static_cast<SCROW>(nRow) );
108 BYTE nByte;
109 *pIn >> nByte;
110 rAddr.SetTab( static_cast<SCTAB>(nByte) );
111 *pIn >> nByte;
112 rAddr.SetCol( static_cast<SCCOL>(nByte) );
116 inline void ImportLotus::Read( ScRange& rRange )
118 Read( rRange.aStart );
119 Read( rRange.aEnd );
123 inline void ImportLotus::Read( sal_Char& r )
125 *pIn >> r;
129 inline void ImportLotus::Read( BYTE& r )
131 *pIn >> r;
135 inline void ImportLotus::Read( UINT16& r )
137 *pIn >> r;
141 inline void ImportLotus::Read( INT16& r )
143 *pIn >> r;
147 inline void ImportLotus::Read( UINT32& r )
149 *pIn >> r;
153 inline void ImportLotus::Read( double& r )
155 r = ScfTools::ReadLongDouble( *pIn );
159 inline void ImportLotus::Read( LotAttrWK3& r )
161 *pIn >> r.nFont >> r.nFontCol >> r.nBack >> r.nLineStyle;
165 inline void ImportLotus::Skip( const UINT16 n )
167 pIn->SeekRel( n );
172 #endif