xref: /trunk/main/sc/source/filter/inc/exp_op.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef SC_EXP_OP_HXX
25 #define SC_EXP_OP_HXX
26 
27 #include "filter.hxx"
28 #include "root.hxx"
29 #include "xeroot.hxx"
30 
31 
32 class ScDocument;
33 class ScPatternAttr;
34 class ScFormulaCell;
35 class ExcDocument;
36 class SotStorage;
37 
38 
39 class ExportTyp
40 {
41 protected:
42     SvStream&           aOut;           // Ausgabe-Stream
43     ScDocument*         pD;             // Dokument
44     CharSet             eZielChar;      // Ziel-Zeichensatz
45 public:
ExportTyp(SvStream & aStream,ScDocument * pDoc,CharSet eDest)46                         ExportTyp( SvStream& aStream, ScDocument* pDoc, CharSet eDest ):
47                             aOut( aStream )
48                         {
49                             eZielChar = eDest;
50                             pD = pDoc;
51                         }
52 
53     virtual FltError    Write() = 0;
54 };
55 
56 
57 
58 #if ENABLE_LOTUS123_EXPORT
59 class ExportWK1 : public ExportTyp
60 {
61 private:
62     sal_uInt8               GenFormByte( const ScPatternAttr& );
63     void                Bof();
64     void                Eof();
65     void                Calcmode();
66     void                Calcorder();
67     void                Split();
68     void                Sync();
69     void                Dimensions();
70     void                Window1();
71     void                Colw();
72     void                Blank( const sal_uInt16 nC, const sal_uInt16 nR, const ScPatternAttr& );
73     void                Number( const sal_uInt16 nC, const sal_uInt16 nR, const double f, const ScPatternAttr& );
74     void                Label( const sal_uInt16 nC, const sal_uInt16 nR, const String&, const ScPatternAttr& );
75     void                Formula( const sal_uInt16 nC, const sal_uInt16 nR, const ScFormulaCell*, const ScPatternAttr& );
76     void                Protect();
77     void                Footer();
78     void                Header();
79     void                Margins();
80     void                Labelfmt();
81     void                Calccount();
82     void                Cursorw12();
83     void                WKString( const sal_uInt16 nC, const sal_uInt16 nR, const ScFormulaCell*, const ScPatternAttr& );
84     void                Snrange();
85     void                Hidcol();
86     void                Cpi();
87 public:
88 
89     static  const sal_uInt16    WK1MAXCOL;
90     static  const sal_uInt16    WK1MAXROW;
91 
ExportWK1(SvStream & r,ScDocument * p,CharSet e)92     inline              ExportWK1( SvStream& r, ScDocument* p, CharSet e ) :
93                             ExportTyp( r, p, e ) {};
94 
95     FltError            Write();
96 };
97 #endif
98 
99 
100 
101 class ExportBiff5 : public ExportTyp, protected XclExpRoot
102 {
103 private:
104     ExcDocument*        pExcDoc;
105 
106 protected:
107     RootData*           pExcRoot;
108 
109 public:
110                         ExportBiff5( XclExpRootData& rExpData, SvStream& rStrm );
111     virtual             ~ExportBiff5();
112     FltError            Write();
113 };
114 
115 
116 
117 
118 class ExportBiff8 : public ExportBiff5
119 {
120 public:
121                         ExportBiff8( XclExpRootData& rExpData, SvStream& rStrm );
122     virtual             ~ExportBiff8();
123 };
124 
125 
126 class ExportXml2007 : public ExportTyp, protected XclExpRoot
127 {
128 private:
129     ExcDocument*        pExcDoc;
130 
131 protected:
132     RootData*           pExcRoot;
133 
134 public:
135                         ExportXml2007( XclExpRootData& rExpData, SvStream& rStrm );
136     virtual             ~ExportXml2007();
137     FltError            Write();
138 };
139 
140 
141 #endif
142