Changeset 846 for trunk/src/gui/text/qtextdocument.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/text/qtextdocument.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 62 62 #include "qtextcontrol_p.h" 63 63 #include "private/qtextedit_p.h" 64 #include "private/qdataurl_p.h" 64 65 65 66 #include "qtextdocument_p.h" … … 126 127 tag += text[i]; 127 128 else if (!tag.isEmpty() && text[i].isSpace()) 129 break; 130 else if (!tag.isEmpty() && text[i] == QLatin1Char('/') && i + 1 == close) 128 131 break; 129 132 else if (!text[i].isSpace() && (!tag.isEmpty() || text[i] != QLatin1Char('!'))) … … 289 292 provides contentsChanged(), undoAvailable(), and redoAvailable() signals 290 293 that inform connected editor widgets about the state of the undo/redo 291 system. 294 system. The following are the undo/redo operations of a QTextDocument: 295 296 \list 297 \o Insertion or removal of characters. A sequence of insertions or removals 298 within the same text block are regarded as a single undo/redo operation. 299 \o Insertion or removal of text blocks. Sequences of insertion or removals 300 in a single operation (e.g., by selecting and then deleting text) are 301 regarded as a single undo/redo operation. 302 \o Text character format changes. 303 \o Text block format changes. 304 \o Text block group format changes. 305 \endlist 292 306 293 307 \sa QTextCursor, QTextEdit, \link richtext.html Rich Text Processing\endlink , {Text Object Example} … … 435 449 } 436 450 451 /*! \enum QTextDocument::Stacks 452 453 \value UndoStack The undo stack. 454 \value RedoStack The redo stack. 455 \value UndoAndRedoStacks Both the undo and redo stacks. 456 */ 457 458 /*! 459 \since 4.7 460 Clears the stacks specified by \a stacksToClear. 461 462 This method clears any commands on the undo stack, the redo stack, 463 or both (the default). If commands are cleared, the appropriate 464 signals are emitted, QTextDocument::undoAvailable() or 465 QTextDocument::redoAvailable(). 466 467 \sa QTextDocument::undoAvailable() QTextDocument::redoAvailable() 468 */ 469 void QTextDocument::clearUndoRedoStacks(Stacks stacksToClear) 470 { 471 Q_D(QTextDocument); 472 d->clearUndoRedoStacks(stacksToClear, true); 473 } 474 437 475 /*! 438 476 \overload … … 557 595 { 558 596 Q_D(QTextDocument); 559 if (!d->inContentsChange)560 d->beginEditBlock();561 597 d->documentChange(from, length); 562 if (!d->inContentsChange) 563 d->endEditBlock(); 598 if (!d->inContentsChange) { 599 if (d->lout) { 600 d->lout->documentChanged(d->docChangeFrom, d->docChangeOldLength, d->docChangeLength); 601 d->docChangeFrom = -1; 602 } 603 } 564 604 } 565 605 … … 1750 1790 if (printer->collateCopies() == true){ 1751 1791 docCopies = 1; 1752 pageCopies = printer-> numCopies();1792 pageCopies = printer->supportsMultipleCopies() ? 1 : printer->copyCount(); 1753 1793 } else { 1754 docCopies = printer-> numCopies();1794 docCopies = printer->supportsMultipleCopies() ? 1 : printer->copyCount(); 1755 1795 pageCopies = 1; 1756 1796 } … … 1921 1961 } 1922 1962 #endif 1963 1964 // handle data: URLs 1965 if (r.isNull() && name.scheme().compare(QLatin1String("data"), Qt::CaseInsensitive) == 0) 1966 r = qDecodeDataUrl(name).second; 1923 1967 1924 1968 // if resource was not loaded try to load it here … … 2468 2512 emitAlignment(format.alignment()); 2469 2513 2470 Qt::LayoutDirection dir = format.layoutDirection(); 2471 if (dir == Qt::LeftToRight) { 2472 // assume default to not bloat the html too much 2473 // html += QLatin1String(" dir='ltr'"); 2474 } else { 2514 // assume default to not bloat the html too much 2515 // html += QLatin1String(" dir='ltr'"); 2516 if (block.textDirection() == Qt::RightToLeft) 2475 2517 html += QLatin1String(" dir='rtl'"); 2476 }2477 2518 2478 2519 QLatin1String style(" style=\"");
Note:
See TracChangeset
for help on using the changeset viewer.