xref: /trunk/main/sc/inc/prnsave.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_PRNSAVE_HXX
25 #define SC_PRNSAVE_HXX
26 
27 #include "address.hxx"
28 #include <tools/solar.h>
29 
30 #include <vector>
31 
32 class ScRange;
33 
34 class ScPrintSaverTab
35 {
36     typedef ::std::vector< ScRange > ScRangeVec;
37 
38     ScRangeVec  maPrintRanges;      // Array
39     ScRange*    mpRepeatCol;        // einzeln
40     ScRange*    mpRepeatRow;        // einzeln
41     sal_Bool        mbEntireSheet;
42 
43 public:
44 			ScPrintSaverTab();
45 			~ScPrintSaverTab();
46 
47     void            SetAreas( const ScRangeVec& rRanges, sal_Bool bEntireSheet );
48     void            SetRepeat( const ScRange* pCol, const ScRange* pRow );
49 
GetPrintRanges() const50     const ScRangeVec&   GetPrintRanges() const  { return maPrintRanges; }
IsEntireSheet() const51     sal_Bool                IsEntireSheet() const   { return mbEntireSheet; }
GetRepeatCol() const52     const ScRange*      GetRepeatCol() const    { return mpRepeatCol; }
GetRepeatRow() const53     const ScRange*      GetRepeatRow() const    { return mpRepeatRow; }
54 
55 	sal_Bool	operator==( const ScPrintSaverTab& rCmp ) const;
56 };
57 
58 class ScPrintRangeSaver
59 {
60 	SCTAB				nTabCount;
61 	ScPrintSaverTab*	pData;		// Array
62 
63 public:
64 			ScPrintRangeSaver( SCTAB nCount );
65 			~ScPrintRangeSaver();
66 
GetTabCount() const67 	SCTAB					GetTabCount() const		{ return nTabCount; }
68 	ScPrintSaverTab&		GetTabData(SCTAB nTab);
69 	const ScPrintSaverTab&	GetTabData(SCTAB nTab) const;
70 
71 	sal_Bool	operator==( const ScPrintRangeSaver& rCmp ) const;
72 };
73 
74 
75 #endif
76 
77 
78