xref: /aoo41x/main/sc/source/filter/inc/xiview.hxx (revision 38d50f7b)
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_XIVIEW_HXX
25 #define SC_XIVIEW_HXX
26 
27 #include "xlview.hxx"
28 #include "xiroot.hxx"
29 
30 // Document view settings =====================================================
31 
32 /** Contains document view settings (WINDOW1 record). */
33 class XclImpDocViewSettings : protected XclImpRoot
34 {
35 public:
36     explicit            XclImpDocViewSettings( const XclImpRoot& rRoot );
37 
38     /** Reads a WINDOW1 record. */
39     void                ReadWindow1( XclImpStream& rStrm );
40 
41     /** Returns the Calc index of the displayed sheet. */
42     SCTAB               GetDisplScTab() const;
43 
44     /** Sets the view settings at the document. */
45     void                Finalize();
46 
47 private:
48     XclDocViewData      maData;         /// Document view settings data.
49 };
50 
51 // Sheet view settings ========================================================
52 
53 /** Contains all view settings for a single sheet.
54 
55     Usage:
56     1)  When import filter starts reading a worksheet substream, inizialize an
57         instance of this class with the Initialize() function. This will set
58         all view options to Excel default values.
59     2)  Read all view related records using the Read*() functions.
60     3)  When import filter ends reading a worksheet substream, call Finalize()
61         to set all view settings to the current sheet of the Calc document.
62  */
63 class XclImpTabViewSettings : protected XclImpRoot
64 {
65 public:
66     explicit            XclImpTabViewSettings( const XclImpRoot& rRoot );
67 
68     /** Initializes the object to be used for a new sheet. */
69     void                Initialize();
70 
71     /** Reads a WINDOW2 record. */
72     void                ReadWindow2( XclImpStream& rStrm, bool bChart );
73     /** Reads an SCL record. */
74     void                ReadScl( XclImpStream& rStrm );
75     /** Reads a PANE record. */
76     void                ReadPane( XclImpStream& rStrm );
77     /** Reads a SELECTION record. */
78     void                ReadSelection( XclImpStream& rStrm );
79     /** Reads a SHEETEXT record (Tab Color). */
80     void                ReadTabBgColor( XclImpStream& rStrm, XclImpPalette& rPal );
81     /** Sets the view settings at the current sheet or the extended sheet options object. */
82     void                Finalize();
83 
84 private:
85     XclTabViewData      maData;         /// Sheet view settings data.
86 };
87 
88 // ============================================================================
89 
90 #endif
91 
92