xref: /aoo4110/main/sc/inc/dpoutputgeometry.hxx (revision b1cdbd2c)
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_DPOUTPUTGEOMETRY_HXX
25 #define SC_DPOUTPUTGEOMETRY_HXX
26 
27 #include "address.hxx"
28 #include <vector>
29 
30 class ScAddress;
31 
32 class SC_DLLPUBLIC ScDPOutputGeometry
33 {
34 public:
35     enum FieldType { Column, Row, Page, Data, None };
36     enum ImportType { ODF, XLS };
37 
38     ScDPOutputGeometry(const ScRange& rOutRange, bool bShowFilter, ImportType eImportType);
39     ~ScDPOutputGeometry();
40 
41     /**
42      * @param nCount number of row fields, <b>excluding the data layout
43      *               field if exists</b>.
44      */
45     void setRowFieldCount(sal_uInt32 nCount);
46     void setColumnFieldCount(sal_uInt32 nCount);
47     void setPageFieldCount(sal_uInt32 nCount);
48     void setDataFieldCount(sal_uInt32 nCount);
49 
50     void getColumnFieldPositions(::std::vector<ScAddress>& rAddrs) const;
51     void getRowFieldPositions(::std::vector<ScAddress>& rAddrs) const;
52     void getPageFieldPositions(::std::vector<ScAddress>& rAddrs) const;
53 
54     SCROW getRowFieldHeaderRow() const;
55 
56     FieldType getFieldButtonType(const ScAddress& rPos) const;
57 
58 private:
59     ScDPOutputGeometry(); // disabled
60 
61 private:
62     ScRange     maOutRange;
63     sal_uInt32  mnRowFields;    /// number of row fields (data layout field NOT included!)
64     sal_uInt32  mnColumnFields;
65     sal_uInt32  mnPageFields;
66     sal_uInt32  mnDataFields;
67 
68     ImportType  meImportType;
69 
70     bool        mbShowFilter;
71 };
72 
73 #endif
74