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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
|
/*************************************************************************
*
* $RCSfile: xcl97rec.hxx,v $
*
* $Revision: 1.25 $
*
* last change: $Author: dr $ $Date: 2002-12-06 16:41:07 $
*
* 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 _XCL97REC_HXX
#define _XCL97REC_HXX
#include "excrecds.hxx"
#include "xcl97esc.hxx"
struct SingleRefData;
struct ScExtTabOptions;
//___________________________________________________________________
// --- class XclMsodrawing_Base --------------------------------------
class XclMsodrawing_Base
{
protected:
XclEscher* pEscher;
ULONG nStartPos; // position in OffsetMap
ULONG nStopPos; // position in OffsetMap
public:
XclMsodrawing_Base( XclEscher& rEscher, ULONG nInitialSize = 0 );
virtual ~XclMsodrawing_Base();
inline XclEscher* GetEscher() const { return pEscher; }
inline XclEscherEx* GetEscherEx() const { return pEscher->GetEx(); }
void UpdateStopPos();
ULONG GetDataLen() const;
};
// --- class XclMsodrawinggroup --------------------------------------
class XclMsodrawinggroup : public XclMsodrawing_Base, public ExcRecord
{
private:
virtual void SaveCont( XclExpStream& rStrm );
public:
XclMsodrawinggroup( RootData& rRoot,
UINT16 nEscherType = 0 );
virtual ~XclMsodrawinggroup();
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// --- class XclMsodrawing -------------------------------------------
class XclMsodrawing : public XclMsodrawing_Base, public ExcRecord
{
private:
virtual void SaveCont( XclExpStream& rStrm );
public:
XclMsodrawing( RootData& rRoot,
UINT16 nEscherType = 0,
ULONG nInitialSize = 0 );
virtual ~XclMsodrawing();
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// --- class XclObjList ----------------------------------------------
class XclObj;
class XclMsodrawing;
class XclObjList : public List, public ExcEmptyRec, public ExcRoot
{
private:
XclMsodrawing* pMsodrawingPerSheet;
XclMsodrawing* pSolverContainer;
public:
XclObjList( RootData& rRoot );
virtual ~XclObjList();
XclObj* First() { return (XclObj*) List::First(); }
XclObj* Next() { return (XclObj*) List::Next(); }
/// return: 1-based ObjId
///! count>=0xFFFF: Obj will be deleted, return 0
UINT16 Add( XclObj* );
inline XclMsodrawing* GetMsodrawingPerSheet() { return pMsodrawingPerSheet; }
/// close groups and DgContainer opened in ctor
void EndSheet();
virtual void Save( XclExpStream& rStrm );
};
// --- class XclObj --------------------------------------------------
class XclTxo;
class SdrTextObj;
class XclObj : public ExcRecord
{
protected:
enum FtType {
ftEnd = 0x0000,
// reserved: 0x01-0x03
ftMacro = 0x0004,
ftButton = 0x0005,
ftGmo = 0x0006,
ftCf = 0x0007,
ftPioGrbit = 0x0008,
ftPictFmla = 0x0009,
ftCbls = 0x000A,
ftRbo = 0x000B,
ftSbs = 0x000C,
ftNts = 0x000D,
ftSbsFmla = 0x000E,
ftGboData = 0x000F,
ftEdoData = 0x0010,
ftRboData = 0x0011,
ftCblsdata = 0x0012,
ftLbsData = 0x0013,
ftCbsFmls = 0x0014,
ftCmo = 0x0015
};
enum ObjType {
otGroup = 0x0000,
otLine = 0x0001,
otRectangle = 0x0002,
otOval = 0x0003,
otArc = 0x0004,
otChart = 0x0005,
otText = 0x0006,
otButton = 0x0007,
otPicture = 0x0008,
otPolygon = 0x0009,
// reserved: 0x0A
otCheckBox = 0x000B,
otOptionButtton = 0x000C,
otEditBox = 0x000D,
otLabel = 0x000E,
otDialogBox = 0x000F,
otSpinner = 0x0010,
otScrollBar = 0x0011,
otListBox = 0x0012,
otGroupBox = 0x0013,
otComboBox = 0x0014,
// reserved: 0x15-0x18
otComment = 0x0019,
// reserved: 0x1A-0x1D
otMsOffDrawing = 0x001E,
// SC internal
otUnknown = 0xFFFF // only for temporary use
};
XclMsodrawing* pMsodrawing;
XclMsodrawing* pClientTextbox;
XclTxo* pTxo;
ObjType eObjType;
UINT16 nObjId;
UINT16 nGrbit;
BOOL bFirstOnSheet;
XclObj( ObjType eObjType, RootData& rRoot );
// overwritten for writing MSODRAWING record
virtual void SaveCont( XclExpStream& rStrm );
void SaveTextRecs( XclExpStream& rStrm );
public:
virtual ~XclObj();
inline void SetId( UINT16 nId ) { nObjId = nId; }
inline void SetLocked( BOOL b )
{ b ? nGrbit |= 0x0001 : nGrbit &= ~0x0001; }
inline void SetPrintable( BOOL b )
{ b ? nGrbit |= 0x0010 : nGrbit &= ~0x0010; }
inline void SetAutoFill( BOOL b )
{ b ? nGrbit |= 0x2000 : nGrbit &= ~0x2000; }
inline void SetAutoLine( BOOL b )
{ b ? nGrbit |= 0x4000 : nGrbit &= ~0x4000; }
// set corresponding ObjType
void SetEscherShapeType( UINT16 nType );
inline void SetEscherShapeTypeGroup() { eObjType = otGroup; }
//! actually writes ESCHER_ClientTextbox
void SetText( RootData& rRoot, const SdrTextObj& rObj );
inline void UpdateStopPos();
virtual void Save( XclExpStream& rStrm );
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
inline void XclObj::UpdateStopPos()
{
if ( pClientTextbox )
pClientTextbox->UpdateStopPos();
else
pMsodrawing->UpdateStopPos();
}
// --- class XclObjComment -------------------------------------------
class XclObjComment : public XclObj
{
private:
virtual void SaveCont( XclExpStream& rStrm );
public:
XclObjComment( RootData& rRoot,
const ScAddress& rPos, const String& rStr );
virtual ~XclObjComment();
virtual void Save( XclExpStream& rStrm );
virtual ULONG GetLen() const;
};
// --- class XclObjDropDown ------------------------------------------
class XclObjDropDown : public XclObj
{
private:
BOOL bIsFiltered;
virtual void SaveCont( XclExpStream& rStrm );
protected:
public:
XclObjDropDown( RootData& rRoot, const ScAddress& rPos, BOOL bFilt );
virtual ~XclObjDropDown();
virtual ULONG GetLen() const; // GetNum() done by XclObj
};
// --- class XclTxo --------------------------------------------------
class SdrTextObj;
class XclTxo : public ExcRecord
{
friend void XclObjComment::SaveCont( XclExpStream& );
private:
XclExpUniString aText;
UINT16 nGrbit;
UINT16 nRot;
virtual void SaveCont( XclExpStream& rStrm );
public:
XclTxo( const String& rStr );
XclTxo( const SdrTextObj& rEditObj );
virtual ~XclTxo();
virtual void Save( XclExpStream& rStrm );
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// --- class XclObjOle -----------------------------------------------
class XclObjOle : public XclObj
{
private:
const SdrObject& rOleObj;
SvStorage* pRootStorage;
virtual void SaveCont( XclExpStream& rStrm );
public:
XclObjOle( RootData& rRoot, const SdrObject& rObj );
virtual ~XclObjOle();
virtual void Save( XclExpStream& rStrm );
virtual ULONG GetLen() const;
};
// --- class XclObjAny -----------------------------------------------
class XclObjAny : public XclObj
{
private:
virtual void SaveCont( XclExpStream& rStrm );
public:
XclObjAny( RootData& rRoot );
virtual ~XclObjAny();
virtual void Save( XclExpStream& rStrm );
virtual ULONG GetLen() const;
};
// --- class XclNoteList ---------------------------------------------
class XclNote;
class XclNoteList : public List, public ExcEmptyRec
{
private:
public:
XclNoteList();
virtual ~XclNoteList();
XclNote* First() { return (XclNote*) List::First(); }
XclNote* Next() { return (XclNote*) List::Next(); }
void Add( XclNote* );
virtual void Save( XclExpStream& rStrm );
};
// --- class XclNote -------------------------------------------------
class XclNote : public ExcRecord
{
private:
XclExpUniString aAuthor;
ScAddress aPos;
UINT16 nGrbit;
UINT16 nObjId;
virtual void SaveCont( XclExpStream& rStrm );
public:
XclNote( RootData& rD, const ScAddress& rPos,
const String& rNoteText, const String& rNoteAuthor );
virtual ~XclNote();
virtual void Save( XclExpStream& rStrm );
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// --- class ExcBof8_Base --------------------------------------------
class ExcBof8_Base : public ExcBof_Base
{
protected:
UINT32 nFileHistory; // bfh
UINT32 nLowestBiffVer; // sfo
virtual void SaveCont( XclExpStream& rStrm );
public:
ExcBof8_Base();
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// --- class ExcBofW8 ------------------------------------------------
// Header Record fuer WORKBOOKS
class ExcBofW8 : public ExcBof8_Base
{
public:
ExcBofW8();
};
// --- class ExcBof8 -------------------------------------------------
// Header Record fuer WORKSHEETS
class ExcBof8 : public ExcBof8_Base
{
public:
ExcBof8();
};
// --- class ExcBofC8 ------------------------------------------------
// Header Record fuer CHARTs
class ExcBofC8 : public ExcBof8_Base
{
public:
ExcBofC8();
};
// --- class ExcLabelSst ---------------------------------------------
class ExcLabelSst : public ExcCell
{
private:
UINT32 nIsst; // Index in SST
virtual void SaveDiff( XclExpStream& rStrm ); // instead of SaveCont()
virtual ULONG GetDiffLen() const;
public:
ExcLabelSst(
const ScAddress& rPos,
const ScPatternAttr* pAttr,
RootData& rRoot,
const String& rText );
ExcLabelSst(
const ScAddress& rPos,
const ScPatternAttr* pAttr,
RootData& rRoot,
const ScEditCell& rEdCell );
virtual ~ExcLabelSst();
virtual UINT16 GetNum() const;
};
// --- class ExcXf8 --------------------------------------------------
class ExcXf8 : public ExcXf
{
private:
XclTextDirection eTextDir;
UINT16 nTrot;
UINT16 nCIndent;
UINT16 nGrbitDiag;
UINT32 nIcvDiagSer;
UINT16 nDgDiag;
BOOL bFShrinkToFit;
BOOL bFMergeCell;
virtual void SaveCont( XclExpStream& rStrm );
public:
ExcXf8( const XclExpRoot& rRoot, UINT16 nFont, UINT16 nForm,
const ScPatternAttr* pPattAttr,
BOOL& rbLineBreak, BOOL bStyle = FALSE );
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// --- class ExcBundlesheet8 -----------------------------------------
class ExcBundlesheet8 : public ExcBundlesheetBase
{
private:
XclExpUniString aUnicodeName;
virtual void SaveCont( XclExpStream& rStrm );
public:
ExcBundlesheet8( RootData& rRootData, UINT16 nTab );
ExcBundlesheet8( const String& rString );
virtual ULONG GetLen() const;
};
// --- class ExcWindow18 ---------------------------------------------
class ExcWindow18 : public ExcRecord
{
private:
UINT16 nCurrTable;
UINT16 nSelTabs;
virtual void SaveCont( XclExpStream& rStrm );
public:
ExcWindow18( RootData& rRootData );
virtual UINT16 GetNum( void ) const;
virtual ULONG GetLen( void ) const;
};
// --- class ExcPane8 ------------------------------------------------
class ExcPane8 : public ExcRecord
{
private:
UINT16 nSplitX;
UINT16 nSplitY;
UINT16 nLeftCol;
UINT16 nTopRow;
UINT16 nActivePane;
virtual void SaveCont( XclExpStream& rStrm );
public:
ExcPane8( const ScExtTabOptions& rTabOptions );
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// --- class ExcWindow28 ---------------------------------------------
class ExcWindow28 : public ExcRecord, protected XclExpRoot
{
private:
ExcPane8* pPaneRec;
UINT32 nGridColorSer;
UINT16 nFlags;
UINT16 nLeftCol;
UINT16 nTopRow;
UINT16 nActiveCol;
UINT16 nActiveRow;
BOOL bHorSplit : 1;
BOOL bVertSplit : 1;
virtual void SaveCont( XclExpStream& rStrm );
public:
ExcWindow28( const XclExpRoot& rRoot, UINT16 nTab );
virtual ~ExcWindow28();
virtual void Save( XclExpStream& rStrm );
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// --- class XclCondFormat -------------------------------------------
class ScConditionalFormat;
class ScCondFormatEntry;
class ScRangeList;
struct RootData;
class XclCf;
class XclCondFormat : public ExcEmptyRec, protected List
{
// writes multiple cf _and_ condfmt records!
private:
const ScConditionalFormat& rCF;
ScRangeList* pRL;
UINT16 nTabNum;
ULONG nComplLen;
inline XclCf* _First() { return (XclCf*) List::First(); }
inline XclCf* _Next() { return (XclCf*) List::Next(); }
void WriteCondfmt( XclExpStream& rStrm );
public:
XclCondFormat( const ScConditionalFormat&, ScRangeList*, RootData& );
// takes ScRangeList, don't use it after this Ctor!
virtual ~XclCondFormat();
virtual void Save( XclExpStream& rStrm );
};
class XclCf : public ExcRecord, protected XclExpRoot
{
private:
friend XclCondFormat;
sal_Char* pVarData; // formats + formulas
UINT16 nVarLen; // len of attributes + formulas
UINT16 nFormatLen;
UINT16 nFormLen1;
UINT16 nFormLen2;
UINT8 nType; // formatting type
UINT8 nOp; // formatting operator
BOOL bHasStyle;
UINT32 nStart;
BOOL bHasFont;
UINT32 nFontData1;
UINT32 nFontData2;
UINT32 nFontData3;
UINT32 nFontData4;
UINT32 nFontData5;
UINT8 nFontData6;
BOOL bHasColor;
UINT32 nIcvTextSer;
BOOL bHasLine;
UINT8 nLineData1;
UINT8 nLineData2;
UINT32 nIcvTopSer;
UINT32 nIcvBotSer;
UINT32 nIcvLftSer;
UINT32 nIcvRigSer;
BOOL bHasPattern;
UINT16 nPatt;
UINT32 nIcvForeSer;
UINT32 nIcvBackSer;
virtual void SaveCont( XclExpStream& rStrm );
public:
XclCf( const XclExpRoot& rRoot, const ScCondFormatEntry& );
virtual ~XclCf();
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// --- class XclObproj -----------------------------------------------
class XclObproj : public ExcRecord
{
public:
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// --- class XclDConRef ----------------------------------------------
class XclDConRef : public ExcRecord
{
private:
ScRange aSourceRange;
XclExpUniString* pWorkbook;
virtual void SaveCont( XclExpStream& rStrm );
public:
XclDConRef( const ScRange& rSrcR, const String& rWB );
virtual ~XclDConRef();
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// --- class XclExpCellMerging ---------------------------------------
struct XclExpMergedCell
{
UINT16 nCol1;
UINT16 nCol2;
UINT16 nRow1;
UINT16 nRow2;
UINT16 nXF;
inline XclExpMergedCell( UINT16 nC1, UINT16 nC2, UINT16 nR1, UINT16 nR2, UINT16 _nXF ) :
nCol1( nC1 ), nCol2( nC2 ), nRow1( nR1 ), nRow2( nR2 ), nXF( _nXF ) {}
};
inline XclExpStream& operator<<( XclExpStream& rStrm, const XclExpMergedCell& rCell )
{
return (rStrm << rCell.nRow1 << rCell.nRow2 << rCell.nCol1 << rCell.nCol2);
}
class XclExpCellMerging : public ExcEmptyRec
{
private:
List aCellList;
inline XclExpMergedCell* FirstCell() { return (XclExpMergedCell*) aCellList.First(); }
inline XclExpMergedCell* NextCell() { return (XclExpMergedCell*) aCellList.Next(); }
inline XclExpMergedCell* GetCell( ULONG nIndex )
{ return (XclExpMergedCell*) aCellList.GetObject( nIndex ); }
inline void AppendCell( XclExpMergedCell* pNewCell )
{ aCellList.Insert( pNewCell, LIST_APPEND ); }
public:
void Append( UINT16 nCol1, UINT16 nColCnt, UINT16 nRow1, UINT16 nRowCnt, UINT16 nXF );
BOOL FindNextMerge( const ScAddress& rPos, UINT16& rnCol );
BOOL FindMergeBaseXF( const ScAddress& rPos, UINT16& rnXF, UINT16& rnColCount );
inline BOOL FindMergeBaseXF( const ScAddress& rPos, UINT16& rnXF );
virtual void Save( XclExpStream& rStrm );
};
inline BOOL XclExpCellMerging::FindMergeBaseXF( const ScAddress& rPos, UINT16& rnXF )
{
UINT16 nCols;
return FindMergeBaseXF( rPos, rnXF, nCols );
}
// ---- class XclCodename --------------------------------------------
class XclCodename : public ExcRecord
{
private:
XclExpUniString aName;
virtual void SaveCont( XclExpStream& rStrm );
public:
XclCodename( const String& );
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// ---- Scenarios ----------------------------------------------------
// - ExcEScenarioCell a cell of a scenario range
// - ExcEScenario all ranges of a scenario table
// - ExcEScenarioManager list of scenario tables
class ExcEScenarioCell
{
private:
UINT16 nCol;
UINT16 nRow;
XclExpUniString sText;
protected:
public:
ExcEScenarioCell( UINT16 nC, UINT16 nR, const String& rTxt );
inline ULONG GetStringBytes()
{ return sText.GetSize(); }
void WriteAddress( XclExpStream& rStrm );
void WriteText( XclExpStream& rStrm );
};
class ExcEScenario : public ExcRecord, private List
{
private:
ULONG nRecLen;
XclExpUniString sName;
XclExpUniString sComment;
static XclExpUniString sUsername;
inline ExcEScenarioCell* _First() { return (ExcEScenarioCell*) List::First(); }
inline ExcEScenarioCell* _Next() { return (ExcEScenarioCell*) List::Next(); }
BOOL Append( UINT16 nCol, UINT16 nRow, const String& rTxt );
virtual void SaveCont( XclExpStream& rStrm );
protected:
public:
ExcEScenario( ScDocument& rDoc, UINT16 nTab );
virtual ~ExcEScenario();
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
class ExcEScenarioManager : public ExcRecord, private List
{
private:
UINT16 nActive;
inline ExcEScenario* _First() { return (ExcEScenario*) List::First(); }
inline ExcEScenario* _Next() { return (ExcEScenario*) List::Next(); }
inline void Append( ExcEScenario* pScen )
{ List::Insert( pScen, LIST_APPEND ); }
virtual void SaveCont( XclExpStream& rStrm );
protected:
public:
ExcEScenarioManager( ScDocument& rDoc, UINT16 nTab );
virtual ~ExcEScenarioManager();
virtual void Save( XclExpStream& rStrm );
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
// ---- class XclProtection ------------------------------------------
class XclProtection : public ExcDummyRec
{
// replacement for records PROTECT, SCENPROTECT, OBJPROTECT...
private:
static const BYTE pMyData[];
static const ULONG nMyLen;
public:
virtual ULONG GetLen( void ) const;
virtual const BYTE* GetData( void ) const;
};
// -------------------------------------------------------------------
class XclCalccount : public ExcRecord
{
private:
UINT16 nCount;
protected:
virtual void SaveCont( XclExpStream& rStrm );
public:
XclCalccount( const ScDocument& );
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
class XclIteration : public ExcRecord
{
private:
UINT16 nIter;
protected:
virtual void SaveCont( XclExpStream& rStrm );
public:
XclIteration( const ScDocument& );
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
class XclDelta : public ExcRecord
{
private:
double fDelta;
protected:
virtual void SaveCont( XclExpStream& rStrm );
public:
XclDelta( const ScDocument& );
virtual UINT16 GetNum() const;
virtual ULONG GetLen() const;
};
#endif // _XCL97REC_HXX
|