Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/corelib/tools/qtextboundaryfinder.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    101101}
    102102
    103 /*! \class QTextBoundaryFinder
     103/*!
     104    \class QTextBoundaryFinder
    104105
    105106    \brief The QTextBoundaryFinder class provides a way of finding Unicode text boundaries in a string.
     
    131132    might happen and sentence boundaries will show the beginning and
    132133    end of whole sentences.
     134
     135
     136
     137
     138
    133139*/
    134140
     
    239245
    240246  \warning QTextBoundaryFinder does not create a copy of \a chars. It is the
    241   application programmer's responsability to ensure the array is allocated for
     247  application programmer's responsbility to ensure the array is allocated for
    242248  as long as the QTextBoundaryFinder object stays alive. The same applies to
    243249  \a buffer.
     
    332338  Moves the QTextBoundaryFinder to the next boundary position and returns that position.
    333339
    334   Returns -1 is there is no next boundary.
     340  Returns -1 i there is no next boundary.
    335341*/
    336342int QTextBoundaryFinder::toNextBoundary()
     
    363369        break;
    364370    case Line:
    365         while (pos < length && d->attributes[pos].lineBreakType < HB_Break)
     371        Q_ASSERT(pos);
     372        while (pos < length && d->attributes[pos-1].lineBreakType < HB_Break)
    366373            ++pos;
    367374        break;
     
    374381  Moves the QTextBoundaryFinder to the previous boundary position and returns that position.
    375382
    376   Returns -1 is there is no previous boundary.
     383  Returns -1 i there is no previous boundary.
    377384*/
    378385int QTextBoundaryFinder::toPreviousBoundary()
     
    405412        break;
    406413    case Line:
    407         while (pos > 0 && d->attributes[pos].lineBreakType < HB_Break)
     414        while (pos > 0 && d->attributes[pos].lineBreakType < HB_Break)
    408415            --pos;
    409416        break;
     
    430437        return d->attributes[pos].wordBoundary;
    431438    case Line:
    432         return d->attributes[pos].lineBreakType >= HB_Break;
     439        return ;
    433440    case Sentence:
    434441        return d->attributes[pos].sentenceBoundary;
Note: See TracChangeset for help on using the changeset viewer.