xref: /AOO41X/main/sc/source/filter/inc/expbase.hxx (revision 38d50f7b14e1cf975d8c6468d9633894cd59b523)
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_EXPBASE_HXX
25 #define SC_EXPBASE_HXX
26 
27 #include <tools/solar.h>
28 #include "global.hxx"
29 #include "address.hxx"
30 
31 
32 class SvStream;
33 class ScFieldEditEngine;
34 
35 class ScExportBase
36 {
37 public:
38 #if defined UNX
39     static const sal_Char __FAR_DATA sNewLine;
40 #else
41     static const sal_Char __FAR_DATA sNewLine[];
42 #endif
43 
44 protected:
45 
46     SvStream&           rStrm;
47     ScRange             aRange;
48     ScDocument*         pDoc;
49     SvNumberFormatter*  pFormatter;
50     ScFieldEditEngine*  pEditEngine;
51 
52 public:
53 
54                         ScExportBase( SvStream&, ScDocument*, const ScRange& );
55     virtual             ~ScExportBase();
56 
57                         // Hidden Cols/Rows an den Raendern trimmen,
58                         // return: sal_True wenn Bereich vorhanden
59                         // Start/End/Col/Row muessen gueltige Ausgangswerte sein
60     sal_Bool                TrimDataArea( SCTAB nTab, SCCOL& nStartCol,
61                             SCROW& nStartRow, SCCOL& nEndCol, SCROW& nEndRow ) const;
62 
63                         // Ausgabebereich einer Tabelle ermitteln,
64                         // Hidden Cols/Rows an den Raendern beruecksichtigt,
65                         // return: sal_True wenn Bereich vorhanden
66     sal_Bool                GetDataArea( SCTAB nTab, SCCOL& nStartCol,
67                             SCROW& nStartRow, SCCOL& nEndCol, SCROW& nEndRow ) const;
68 
69                         // Tabelle nicht vorhanden oder leer
70     sal_Bool                IsEmptyTable( SCTAB nTab ) const;
71 
72     ScFieldEditEngine&  GetEditEngine() const;
73 
74 };
75 
76 
77 #endif  // SC_EXPBASE_HXX
78 
79