Bump version to 6.4-15
[LibreOffice.git] / sc / inc / edittextiterator.hxx
blob354719adcea79ae6e264b057bdfc2e1c6490e3fb
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_EDITTEXTITERATOR_HXX
11 #define INCLUDED_SC_INC_EDITTEXTITERATOR_HXX
13 #include "types.hxx"
14 #include "mtvelements.hxx"
16 class ScTable;
17 class ScDocument;
18 class EditTextObject;
20 namespace sc {
22 /**
23 * Iterate through all edit text cells in a given sheet. The caller must
24 * check the validity of the sheet index passed to its constructor.
26 * It iterates from top to bottom, and then left to right order.
28 class EditTextIterator
30 const ScTable& mrTable;
31 SCCOL mnCol;
32 const CellStoreType* mpCells;
33 CellStoreType::const_position_type maPos;
34 CellStoreType::const_iterator miEnd;
36 /**
37 * Move to the next edit text cell position if the current position is not
38 * an edit text.
40 const EditTextObject* seek();
42 void incBlock();
43 /**
44 * Initialize members w.r.t the dynamic column container in the given table.
46 void init();
48 public:
49 EditTextIterator( const ScDocument& rDoc, SCTAB nTab );
51 const EditTextObject* first();
52 const EditTextObject* next();
57 #endif
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */