/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
if (miDataCur != miDataEnd)
{ // Still in the same block. We're good.
checkEndRow(); return;
}
// Move to the next block. for (++miBlockCur; miBlockCur != miBlockEnd; ++miBlockCur)
{ if (miBlockCur->type != sc::element_type_celltextattr)
{ // We don't iterator over this block.
mnCurPos += miBlockCur->size; continue;
}
getDataIterators(0);
checkEndRow(); return;
}
// Reached the end.
assert(miBlockCur == miBlockEnd);
}
// Locate the start row position.
size_t nBlockStart = 0, nBlockEnd = 0; for (; miBlockCur != miBlockEnd; ++miBlockCur, nBlockStart = nBlockEnd)
{
nBlockEnd = nBlockStart + miBlockCur->size; // non-inclusive end point. if (nBlockStart <= nStart && nStart < nBlockEnd)
{ // Initial block is found! break;
}
}
if (miBlockCur == miBlockEnd) // Initial block not found for whatever reason... Bail out. return;
// Locate the initial row position within this block. if (miBlockCur->type == sc::element_type_celltextattr)
{ // This block stores text widths for non-empty cells.
size_t nOffsetInBlock = nStart - nBlockStart;
mnCurPos = nStart;
getDataIterators(nOffsetInBlock);
checkEndRow(); return;
}
// Current block is not of ushort type. Skip to the next block.
nBlockStart = nBlockEnd;
++miBlockCur;
// Look for the first ushort block. for (; miBlockCur != miBlockEnd; ++miBlockCur, nBlockStart = nBlockEnd)
{
nBlockEnd = nBlockStart + miBlockCur->size; // non-inclusive end point. if (miBlockCur->type != sc::element_type_celltextattr) continue;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.