diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp index e574115c31..750479f8d4 100644 --- a/src/DocIterator.cpp +++ b/src/DocIterator.cpp @@ -449,6 +449,28 @@ void DocIterator::backwardPos() } +#if 0 +// works, but currently not needed +void DocIterator::backwardInset() +{ + backwardPos(); + + while (!empty() && !nextInset()) { + if (inTexted()) { + pos_type const lastp = lastpos(); + Paragraph const & par = paragraph(); + pos_type & pos = top().pos(); + while (pos > 0 && (pos == lastp || !par.isInset(pos))) + --pos; + if (pos > 0) + break; + } + backwardPos(); + } +} +#endif + + bool DocIterator::hasPart(DocIterator const & it) const { // it can't be a part if it is larger diff --git a/src/DocIterator.h b/src/DocIterator.h index 77968191dd..6a86e41d44 100644 --- a/src/DocIterator.h +++ b/src/DocIterator.h @@ -202,7 +202,7 @@ public: /// move backward one paragraph void backwardPar(); /// move backward one inset - /// FIXME: This is not implemented! + /// not used currently, uncomment if you need it //void backwardInset(); /// are we some 'extension' (i.e. deeper nested) of the given iterator