1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
|
/*************************************************************************
*
* $RCSfile: imp_op.hxx,v $
*
* $Revision: 1.4 $
*
* last change: $Author: dr $ $Date: 2001-02-08 14:12:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _IMP_OP_HXX
#define _IMP_OP_HXX
#ifndef _GEN_HXX //autogen
#include <tools/gen.hxx>
#endif
#ifndef _SC_XCLIMPSTREAM_HXX
#include "XclImpStream.hxx"
#endif
#ifndef _FLTTYPES_HXX
#include "flttypes.hxx"
#endif
#ifndef _NAMEBUFF_HXX
#include "namebuff.hxx"
#endif
#ifndef _ROOT_HXX
#include "root.hxx"
#endif
#ifndef _OTLNBUFF_HXX
#include "otlnbuff.hxx"
#endif
#ifndef _COLROWST_HXX
#include "colrowst.hxx"
#endif
#ifndef _EXCDEFS_HXX
#include "excdefs.hxx"
#endif
class SfxItemSet;
class SvStream;
class ScFormulaCell;
class SdrObject;
class ScDocument;
struct ScToken;
class ScToken2;
class ScExtDocOptions;
class _ScRangeListTabs;
class FontBuffer;
class XF_Buffer;
class ValueFormBuffer;
class ExcelToSc;
class AutoFilterBuffer;
class ImportTyp
{
protected:
XclImpStream aIn; // input stream
CharSet eQuellChar; // Quell-Zeichensatz
ScDocument* pD; // Dokument
ScExtDocOptions* pExtOpt; // optionale extended Options
UINT16 nTab; // z.Zt. bearbeitete Tabelle
public:
ImportTyp( SvStream&, ScDocument*, CharSet eSrc );
virtual ~ImportTyp();
virtual FltError Read( void );
ScExtDocOptions& GetExtOpt( void );
};
class SvInPlaceObjectRef;
struct ExcelChartData
{
Rectangle aRect; // Ecken
String aTitle, aXTitle, aYTitle, aZTitle;
String aLastLabel; // letzter SERIESTEXT-Label
SfxItemSet* pAttrs; // Attribute
ExcelChartData* pNext; // wer weiss schon...
UINT16 nRow1, nCol1, nRow2, nCol2, nTab1, nTab2; // Quellbereich
UINT16 nBaseTab;
UINT32 nObjNum;
ExcelChartData( ScDocument*, const Point&, const Point&,
const UINT16 nBaseTab );
~ExcelChartData();
};
class ImportExcel : public ImportTyp, protected ExcRoot
{
private:
ExcelChartData* pChart; // aktuelle Chart-Daten
ExcelChartData* pUsedChartFirst; // benutzte Chart-Daten, erster
ExcelChartData* pUsedChartLast; // benutzte Chart-Daten, letzter
protected:
static const double fExcToTwips; // Umrechnung 1/256 Zeichen -> Twips
ValueFormBuffer* pValueFormBuffer; // ... Number-Formats
NameBuffer aExtNameBuff; // ... externe Namen (Ind.-Basis=1)
_ScRangeListTabs* pPrintRanges;
_ScRangeListTabs* pPrintTitles;
ExcelToSc* pFormConv; // Formel-Konverter
SfxItemSet* pStyleSheetItemSet; // aktuelle Seitenvorlage
OutlineBuffer aColOutlineBuff; // temporaere Puffer fuer Outline-
OutlineBuffer aRowOutlineBuff; // Angabe
ColRowSettings aColRowBuff; // Col/Row-Einstellungen 1 Tabelle
FltTabelle* pFltTab; // Attribute-Optimierung
UINT16 nIxfeIndex; // merkt sich Angabe im IXFE-Record
UINT16 nLastXF; // letzter XF in Formula-Record
UINT16 nBdshtTab; // Counter fuer Boundsheet
ScFormulaCell* pLastFormCell; // fuer String-Records
BOOL bTabTruncated; // wenn Bereichsueberschreitung zum
// Abschneiden von Zellen fuehrt
AutoFilterBuffer* pAutoFilter; // ranges for autofilter and advanced filter
// Record-Funktionen
void Dimensions( void ); // 0x00
void Blank25( void ); // 0x01
void Integer( void ); // 0x02
void Number25( void ); // 0x03
void Label25( void ); // 0x04
void Boolerr25( void ); // 0x05
void Formula25( void ); // 0x06 -> excform.cxx
void RecString( void ); // 0x07, 0x0207
void Row25( void ); // 0x08
void Bof2( void ); // 0x09
void Eof( void ); // 0x0A
BOOL Password( void ); // 0x13
void Header( void ); // 0x14
void Footer( void ); // 0x15
void Externsheet( void ); // 0x17
void Name25( void ); // 0x18
void Verticalpagebreaks( void ); // 0x1A
void Horizontalpagebreaks( void ); // 0x1B
void Note( void ); // 0x1C
void Selection( void ); // 0x1D
void Format235( void ); // 0x1E
void Formatcount( void ); // 0x1F
void Columndefault( void ); // 0x20
void Array25( void ); // 0x21
void Rec1904( void ); // 0x22
void Externname25( void ); // 0x23
void Colwidth( void ); // 0x24
void Defrowheight2( void ); // 0x25
void Leftmargin( void ); // 0x26
void Rightmargin( void ); // 0x27
void Topmargin( void ); // 0x28
void Bottommargin( void ); // 0x29
void Printheaders( void ); // 0x2A
void Prntgrdlns( void ); // 0x2B
BOOL Filepass( void ); // 0x2F
void Font25( void ); // 0x31
// void Window1( void ); // 0x3D
void Pane( void ); // 0x41
void Codepage( void ); // 0x42
void XF2( void ); // 0x43
void Ixfe( void ); // 0x44
void DefColWidth( void ); // 0x55
void Builtinfmtcnt( void ); // 0x56
void Obj( void ); // 0x5D
void Colinfo( void ); // 0x7D
void Rk( void ); // 0x7E
void Wsbool( void ); // 0x81
void Gridset( void ); // 0x82
void Hcenter( void ); // 0x83
void Vcenter( void ); // 0x84
void Boundsheet( void ); // 0x85
void Country( void ); // 0x8C
void Hideobj( void ); // 0x8D
void Bundleheader( void ); // 0x8F
void Palette( void ); // 0x92
void Standardwidth( void ); // 0x99
void Scl( void ); // 0xA0
void Setup( void ); // 0xA1
void Shrfmla( void ); // 0xBC
void Mulrk( void ); // 0xBD
void Mulblank( void ); // 0xBE
void Rstring( void ); // 0xD6
void XF5( void ); // 0xE0
void Blank34( void ); // 0x0201
void Number34( void ); // 0x0203
void Label34( void ); // 0x0204
void Boolerr34( void ); // 0x0205
void Formula3( void ); // 0x0206 -> excform.cxx
// 0x0207 -> 0x07
void Row34( void ); // 0x0208
void Bof3( void ); // 0x0209
void Name34( void ); // 0x0218
void Array34( void ); // 0x0221
void Externname34( void ); // 0x0223
void Defrowheight345( void ); // 0x0225
void Font34( void ); // 0x0231
void TableOp( void ); // 0x0236
void Window2_5( void ); // 0x023E
void XF3( void ); // 0x0243
//void Rk( void ); // 0x027E -> 0x7E
void Formula4( void ); // 0x0406 -> excform.cxx
void Bof4( void ); // 0x0409
void Format4( void ); // 0x041E
void XF4( void ); // 0x0443
void Bof5( void ); // 0x0809
// ---------------------------------------------------------------
void SetLineStyle( SfxItemSet&, short, short, short );
void SetFillStyle( SfxItemSet&, short, short, short );
SdrObject* LineObj( SfxItemSet&, const Point&, const Point& );
SdrObject* RectObj( SfxItemSet&, const Point&, const Point& );
SdrObject* BeginChartObj( SfxItemSet&, const Point&, const Point& );
void EndChartObj( void );
void ChartSelection( void );
void ChartSeriesText( void );
void ChartObjectLink( void );
void Chart3D( void );
void ChartAi( void );
void ChartAlruns( void );
void ChartArea( void );
void ChartAreaformat( void );
void ChartAttachedlabel( void );
void ChartAxesused( void );
void ChartAxis( void );
void ChartAxislineformat( void );
void ChartAxisparent( void );
void ChartBar( void );
void ChartCatserrange( void );
void ChartChart( void );
void ChartChartformat( void );
void ChartChartline( void );
void ChartDataformat( void );
void ChartDefaulttext( void );
void ChartDropbar( void );
void ChartFontx( void );
void ChartFrame( void );
void ChartIfmt( void );
void ChartLegend( void );
void ChartLegendxn( void );
void ChartLine( void );
void ChartLineform( void );
void ChartMarkerformat( void );
// void ChartObjectlink( void );
void ChartPicf( void );
void ChartPie( void );
void ChartPieformat( void );
void ChartPlotarea( void );
void ChartPos( void );
void ChartRadar( void );
void ChartRadararea( void );
void ChartSbaseref( void );
void ChartSerauxerrbar( void );
void ChartSerauxtrend( void );
void ChartSerfmt( void );
void ChartSeries( void );
void ChartSerieslist( void );
void ChartSeriestext( void );
void ChartSerparent( void );
void ChartSertocrt( void );
void ChartShtprops( void );
void ChartSurface( void );
void ChartText( void );
void ChartTick( void );
void ChartValuerange( void );
// ---------------------------------------------------------------
void Formula( UINT16 nCol, UINT16 nRow, UINT16 nTab,
UINT16 nXF, UINT16 nFormLen, double &rCurVal,
BYTE nFlag, BOOL bShrFmla );
// -> excform.cxx
void ResetBof( void );
void EndSheet( void );
void NeueTabelle( void );
const ScTokenArray* ErrorToFormula( BYTE bErrOrVal, BYTE nError,
double& rVal );
void ScanHeadFootParts( const String& rIn, EditTextObject*& rpLeft,
EditTextObject*& rpMid, EditTextObject*& rpRight );
void GetHF( BOOL bHeader );
virtual void GetHFString( String& rStr );
void GetAndSetMargin( IMPEXC_MARGINSIDE eSide );
// nSide -> IMPEXC_MARGINSIDE_*
String GetPageStyleName( UINT16 nTab );
EditTextObject* CreateFormText( BYTE, const String&, const UINT16 );
ScEditEngineDefaulter& GetEdEng( void ) const;
virtual void EndAllChartObjects( void ); // -> excobj.cxx
virtual void PostDocLoad( void );
virtual void SetTextCell( const UINT16 nCol, const UINT16 nRow,
ByteString& rUnconvertedText, const UINT16 nXF );
// Achtung: rUnconvertedText wird moeglicherweise veraendert
UINT16 CalcColWidth( const UINT16 nExcColWidth );
public:
ImportExcel( SvStream&, ScDocument* );
virtual ~ImportExcel( void );
virtual FltError Read( void );
};
#endif
|