Bump version to 4.3-4
[LibreOffice.git] / sc / inc / columniterator.hxx
blobdaac219c587d21557c29db5e4d75ead8f82a3f0e
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 <boost/noncopyable.hpp>
15 #include "column.hxx"
17 class ScColumnTextWidthIterator : boost::noncopyable
19 sc::CellTextAttrStoreType& mrCellTextAttrs;
20 const size_t mnEnd;
21 size_t mnCurPos;
22 sc::CellTextAttrStoreType::iterator miBlockCur;
23 sc::CellTextAttrStoreType::iterator miBlockEnd;
24 sc::celltextattr_block::iterator miDataCur;
25 sc::celltextattr_block::iterator miDataEnd;
27 public:
28 ScColumnTextWidthIterator(ScColumn& rCol, SCROW nStartRow, SCROW nEndRow);
30 /**
31 * @param rDoc document instance.
32 * @param rStartPos position of the first cell from which to start
33 * iteration. Note that the caller must ensure that this
34 * position is valid; the constructor does not check its
35 * validity.
36 * @param nEndRow end row position.
38 ScColumnTextWidthIterator(ScDocument& rDoc, const ScAddress& rStartPos, SCROW nEndRow);
40 void next();
41 bool hasCell() const;
42 SCROW getPos() const;
43 sal_uInt16 getValue() const;
44 void setValue(sal_uInt16 nVal);
46 private:
47 void init(SCROW nStartRow, SCROW nEndRow);
48 void getDataIterators(size_t nOffsetInBlock);
49 void checkEndRow();
52 #endif
54 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */