tdf#125181 maxY is 50000 in prstGeom for star24 and star32
[LibreOffice.git] / sc / inc / columniterator.hxx
blob51270f363ea756aa40e0b2eafa6e4fd900d4f2d0
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/.
8 */
10 #ifndef INCLUDED_SC_INC_COLUMNITERATOR_HXX
11 #define INCLUDED_SC_INC_COLUMNITERATOR_HXX
13 #include <stddef.h>
14 #include "address.hxx"
15 #include <mdds/multi_type_vector_types.hpp>
16 #include "mtvelements.hxx"
17 #include <sal/types.h>
18 #include "types.hxx"
19 class ScColumn;
20 class ScDocument;
21 struct ScRefCellValue;
23 class ScColumnTextWidthIterator
25 const size_t mnEnd;
26 size_t mnCurPos;
27 sc::CellTextAttrStoreType::iterator miBlockCur;
28 sc::CellTextAttrStoreType::iterator miBlockEnd;
29 sc::celltextattr_block::iterator miDataCur;
30 sc::celltextattr_block::iterator miDataEnd;
32 public:
33 ScColumnTextWidthIterator(const ScColumnTextWidthIterator&) = delete;
34 const ScColumnTextWidthIterator& operator=(const ScColumnTextWidthIterator&) = delete;
35 ScColumnTextWidthIterator(ScColumn& rCol, SCROW nStartRow, SCROW nEndRow);
37 /**
38 * @param rDoc document instance.
39 * @param rStartPos position of the first cell from which to start
40 * iteration. Note that the caller must ensure that this
41 * position is valid; the constructor does not check its
42 * validity.
43 * @param nEndRow end row position.
45 ScColumnTextWidthIterator(ScDocument& rDoc, const ScAddress& rStartPos, SCROW nEndRow);
47 void next();
48 bool hasCell() const;
49 SCROW getPos() const;
50 sal_uInt16 getValue() const;
51 void setValue(sal_uInt16 nVal);
53 private:
54 void init(SCROW nStartRow, SCROW nEndRow);
55 void getDataIterators(size_t nOffsetInBlock);
56 void checkEndRow();
59 namespace sc {
61 /**
62 * This iterator lets you iterate over cells over specified range in a
63 * single column. It does not modify the state of the cells, and therefore
64 * is thread safe.
66 class ColumnIterator
68 CellStoreType::const_position_type maPos;
69 CellStoreType::const_position_type const maPosEnd;
70 bool mbComplete;
72 public:
73 ColumnIterator( const CellStoreType& rCells, SCROW nRow1, SCROW nRow2 );
74 ~ColumnIterator();
76 void next();
78 SCROW getRow() const;
80 bool hasCell() const;
82 mdds::mtv::element_t getType() const;
84 ScRefCellValue getCell() const;
89 #endif
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */