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_COLROWST_HXX 25 #define SC_COLROWST_HXX 26 27 #include "xiroot.hxx" 28 29 class XclImpStream; 30 31 // ============================================================================ 32 33 class XclImpColRowSettings : protected XclImpRoot 34 { 35 public: 36 explicit XclImpColRowSettings( const XclImpRoot& rRoot ); 37 virtual ~XclImpColRowSettings(); 38 39 void SetDefWidth( sal_uInt16 nDefWidth, bool bStdWidthRec = false ); 40 void SetWidthRange( SCCOL nCol1, SCCOL nCol2, sal_uInt16 nWidth ); 41 void HideCol( SCCOL nCol ); 42 void HideColRange( SCCOL nCol1, SCCOL nCol2 ); 43 44 void SetDefHeight( sal_uInt16 nDefHeight, sal_uInt16 nFlags ); 45 void SetHeight( SCROW nRow, sal_uInt16 nHeight ); 46 void SetRowSettings( SCROW nRow, sal_uInt16 nHeight, sal_uInt16 nFlags ); 47 void SetManualRowHeight( SCROW nScRow ); 48 49 void SetDefaultXF( SCCOL nScCol1, SCCOL nScCol2, sal_uInt16 nXFIndex ); 50 /** Inserts all column and row settings of the specified sheet, except the hidden flags. */ 51 void Convert( SCTAB nScTab ); 52 /** Sets the HIDDEN flags at all hidden columns and rows in the specified sheet. */ 53 void ConvertHiddenFlags( SCTAB nScTab ); 54 55 private: 56 ScfUInt16Vec maWidths; /// Column widths in twips. 57 ScfUInt8Vec maColFlags; /// Flags for all columns. 58 ScfUInt16Vec maHeights; /// Row heights in twips. 59 ScfUInt8Vec maRowFlags; /// Flags for all rows. 60 61 const SCCOL mnMaxCol; 62 const SCROW mnMaxRow; 63 64 SCROW mnLastScRow; 65 66 sal_uInt16 mnDefWidth; /// Default width from DEFCOLWIDTH or STANDARDWIDTH record. 67 sal_uInt16 mnDefHeight; /// Default height from DEFAULTROWHEIGHT record. 68 sal_uInt16 mnDefRowFlags; /// Default row flags from DEFAULTROWHEIGHT record. 69 70 bool mbHasStdWidthRec; /// true = Width from STANDARDWIDTH (overrides DEFCOLWIDTH record). 71 bool mbHasDefHeight; /// true = mnDefHeight and mnDefRowFlags are valid. 72 bool mbDirty; 73 }; 74 75 76 77 78 #endif 79 80