fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / filter / inc / colrowst.hxx
blob7d973920844a9a826512571f65c7441a7dd65c6b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_COLROWST_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_COLROWST_HXX
23 #include "xiroot.hxx"
24 #include <mdds/flat_segment_tree.hpp>
26 class XclImpColRowSettings : protected XclImpRoot
28 public:
29 explicit XclImpColRowSettings( const XclImpRoot& rRoot );
30 virtual ~XclImpColRowSettings();
32 void SetDefWidth( sal_uInt16 nDefWidth, bool bStdWidthRec = false );
33 void SetWidthRange( SCCOL nCol1, SCCOL nCol2, sal_uInt16 nWidth );
34 void HideCol( SCCOL nCol );
35 void HideColRange( SCCOL nCol1, SCCOL nCol2 );
37 void SetDefHeight( sal_uInt16 nDefHeight, sal_uInt16 nFlags );
38 void SetHeight( SCROW nRow, sal_uInt16 nHeight );
39 void SetRowSettings( SCROW nRow, sal_uInt16 nHeight, sal_uInt16 nFlags );
40 void SetManualRowHeight( SCROW nScRow );
42 void SetDefaultXF( SCCOL nScCol1, SCCOL nScCol2, sal_uInt16 nXFIndex );
43 /** Inserts all column and row settings of the specified sheet, except the hidden flags. */
44 void Convert( SCTAB nScTab );
45 /** Sets the HIDDEN flags at all hidden columns and rows in the specified sheet. */
46 void ConvertHiddenFlags( SCTAB nScTab );
48 private:
49 void ApplyColFlag(SCCOL nCol, sal_uInt8 nNewVal);
50 bool GetColFlag(SCCOL nCol, sal_uInt8 nMask) const;
52 private:
53 typedef ::mdds::flat_segment_tree<SCROW, sal_uInt16> WidthHeightStoreType;
54 typedef ::mdds::flat_segment_tree<SCROW, sal_uInt8> ColRowFlagsType;
55 typedef ::mdds::flat_segment_tree<SCROW, bool> RowHiddenType;
57 WidthHeightStoreType maColWidths;
58 ColRowFlagsType maColFlags;
59 WidthHeightStoreType maRowHeights;
60 ColRowFlagsType maRowFlags;
61 RowHiddenType maHiddenRows;
63 SCROW mnLastScRow;
65 sal_uInt16 mnDefWidth; /// Default width from DEFCOLWIDTH or STANDARDWIDTH record.
66 sal_uInt16 mnDefHeight; /// Default height from DEFAULTROWHEIGHT record.
67 sal_uInt16 mnDefRowFlags; /// Default row flags from DEFAULTROWHEIGHT record.
69 bool mbHasStdWidthRec; /// true = Width from STANDARDWIDTH (overrides DEFCOLWIDTH record).
70 bool mbHasDefHeight; /// true = mnDefHeight and mnDefRowFlags are valid.
71 bool mbDirty;
74 #endif
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */