1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef INCLUDED_SC_INC_COLUMNITERATOR_HXX
11 #define INCLUDED_SC_INC_COLUMNITERATOR_HXX
14 #include "address.hxx"
15 #include <mdds/multi_type_vector_types.hpp>
16 #include "mtvelements.hxx"
17 #include <sal/types.h>
21 struct ScRefCellValue
;
23 class ScColumnTextWidthIterator
27 sc::CellTextAttrStoreType::iterator miBlockCur
;
28 sc::CellTextAttrStoreType::iterator miBlockEnd
;
29 sc::celltextattr_block::iterator miDataCur
;
30 sc::celltextattr_block::iterator miDataEnd
;
33 ScColumnTextWidthIterator(const ScColumnTextWidthIterator
&) = delete;
34 const ScColumnTextWidthIterator
& operator=(const ScColumnTextWidthIterator
&) = delete;
35 ScColumnTextWidthIterator(const ScDocument
& rDoc
, ScColumn
& rCol
, SCROW nStartRow
,
39 * @param rDoc document instance.
40 * @param rStartPos position of the first cell from which to start
41 * iteration. Note that the caller must ensure that this
42 * position is valid; the constructor does not check its
44 * @param nEndRow end row position.
46 ScColumnTextWidthIterator(const ScDocument
& rDoc
, const ScAddress
& rStartPos
, SCROW nEndRow
);
51 sal_uInt16
getValue() const;
52 void setValue(sal_uInt16 nVal
);
55 void init(const ScDocument
& rDoc
, SCROW nStartRow
, SCROW nEndRow
);
56 void getDataIterators(size_t nOffsetInBlock
);
63 * This iterator lets you iterate over cells over specified range in a
64 * single column. It does not modify the state of the cells, and therefore
69 CellStoreType::const_position_type maPos
;
70 CellStoreType::const_position_type maPosEnd
;
74 ColumnIterator(const CellStoreType
& rCells
, SCROW nRow1
, SCROW nRow2
);
83 mdds::mtv::element_t
getType() const;
85 ScRefCellValue
getCell() const;
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */