ofz: Use-of-uninitialized-value
[LibreOffice.git] / sc / inc / edittextiterator.hxx
blob8bcbc1f7b3d38c8a4b0b93f0f439ee6b8c779396
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 #pragma once
12 #include "types.hxx"
13 #include "mtvelements.hxx"
15 class ScTable;
16 class ScDocument;
17 class EditTextObject;
19 namespace sc
21 /**
22 * Iterate through all edit text cells in a given sheet. The caller must
23 * check the validity of the sheet index passed to its constructor.
25 * It iterates from top to bottom, and then left to right order.
27 class EditTextIterator
29 const ScTable& mrTable;
30 SCCOL mnCol;
31 const CellStoreType* mpCells;
32 CellStoreType::const_position_type maPos;
33 CellStoreType::const_iterator miEnd;
35 /**
36 * Move to the next edit text cell position if the current position is not
37 * an edit text.
39 const EditTextObject* seek();
41 void incBlock();
42 /**
43 * Initialize members w.r.t the dynamic column container in the given table.
45 void init();
47 public:
48 EditTextIterator(const ScDocument& rDoc, SCTAB nTab);
50 const EditTextObject* first();
51 const EditTextObject* next();
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */