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/gui/text/qtextcursor.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])
     
    6565QTextCursorPrivate::QTextCursorPrivate(QTextDocumentPrivate *p)
    6666    : priv(p), x(0), position(0), anchor(0), adjusted_anchor(0),
    67       currentCharFormat(-1), visualNavigation(false)
     67      currentCharFormat(-1), visualNavigation(false), keepPositionOnInsert(false),
     68      changed(false)
    6869{
    6970    priv->addCursor(this);
     
    8081    currentCharFormat = rhs.currentCharFormat;
    8182    visualNavigation = rhs.visualNavigation;
     83
     84
    8285    priv->addCursor(this);
    8386}
     
    9699        || (position == positionOfChange
    97100            && (op == QTextUndoCommand::KeepCursor
    98                 || anchor < position)
     101                || )
    99102            )
    100103         ) {
     
    361364    QTextBlock blockIt = block();
    362365
     366
     367
     368
    363369    if (op >= QTextCursor::Left && op <= QTextCursor::WordRight
    364         && blockIt.blockFormat().layoutDirection() == Qt::RightToLeft) {
     370        && blockIt.tDirection() == Qt::RightToLeft) {
    365371        if (op == QTextCursor::Left)
    366372            op = QTextCursor::NextCharacter;
     
    11461152    The cursor is positioned between characters.
    11471153
    1148     \sa setPosition() movePosition() anchor()
     1154    \sa setPosition() movePosition() anchor()
    11491155*/
    11501156int QTextCursor::position() const
     
    11531159        return -1;
    11541160    return d->position;
     1161
     1162
     1163
     1164
     1165
     1166
     1167
     1168
     1169
     1170
     1171
     1172
     1173
     1174
     1175
     1176
    11551177}
    11561178
     
    12611283}
    12621284
     1285
     1286
     1287
     1288
     1289
     1290
     1291
     1292
     1293
     1294
     1295
     1296
     1297
     1298
     1299
     1300
     1301
     1302
     1303
     1304
     1305
     1306
     1307
     1308
     1309
     1310
     1311
     1312
     1313
     1314
     1315
     1316
     1317
     1318
     1319
     1320
     1321
     1322
     1323
     1324
     1325
     1326
     1327
     1328
     1329
     1330
     1331
     1332
     1333
     1334
     1335
     1336
     1337
     1338
     1339
     1340
     1341
     1342
     1343
     1344
     1345
     1346
     1347
     1348
     1349
     1350
     1351
     1352
     1353
     1354
     1355
     1356
     1357
     1358
    12631359/*!
    12641360    Inserts \a text at the current position, using the current
     
    13931489    if (!d || !d->priv)
    13941490        return;
    1395    
     1491
    13961492    if (d->position != d->anchor) {
    13971493        removeSelectedText();
    13981494        return;
    13991495    }
    1400    
     1496
    14011497    if (d->anchor < 1 || !d->canDelete(d->anchor-1))
    14021498        return;
    14031499    d->anchor--;
    1404    
     1500
    14051501    QTextDocumentPrivate::FragmentIterator fragIt = d->priv->find(d->anchor);
    14061502    const QTextFragmentData * const frag = fragIt.value();
     
    14141510            --d->anchor;
    14151511    }
    1416    
     1512
    14171513    d->adjusted_anchor = d->anchor;
    14181514    d->remove();
     
    23472443        return;
    23482444
     2445
     2446
     2447
    23492448    d->priv->beginEditBlock();
    23502449}
     
    24152514}
    24162515
     2516
    24172517/*!
    24182518    \since 4.2
    24192519    Returns the position of the cursor within its containing line.
     2520
     2521
     2522
     2523
     2524
     2525
     2526
    24202527*/
    24212528int QTextCursor::columnNumber() const
Note: See TracChangeset for help on using the changeset viewer.