summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocument.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix compiler warning in qtextdocument.cppEskil Abrahamsen Blomfeldt2011-07-111-1/+1
| | | | | | Missing QLatin1String() wrapper to ensure codec of text. Reviewed-by: Jiang Jiang
* Merge remote branch 'qt-mainline/4.8'aavit2011-06-221-1/+1
|\
| * Merge branch '4.8' of scm.dev.nokia.troll.no:qt/qtDavid Boddie2011-06-171-1/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/righttoleft.qdoc examples/draganddrop/fridgemagnets/main.cpp examples/script/context2d/main.cpp
| * \ Merge branch '4.8' of scm.dev.nokia.troll.no:qt/qtDavid Boddie2011-05-241-20/+28
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qrawfont.cpp src/gui/text/qtextlayout.cpp src/gui/util/qscroller.cpp src/gui/widgets/qlineedit.cpp
| * | | Doc: Fixed qdoc warnings.David Boddie2011-05-111-1/+1
| | | |
* | | | Fix empty lines in Qt HTML when displayed in external browsers (again)Eskil Abrahamsen Blomfeldt2011-06-201-1/+3
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This redoes f541c78e1bc5b293466b40e6f10496199a4a5d73 in a way which should be more compliant with different browsers. In particular, Outlook didn't support the CSS trick in the last fix, so we need the somewhat larger patch which adds an extra line break node to the tree and then ignores it when re-importing the document. Task-number: QTBUG-3669 Reviewed-by: Simon Hausmann
* | | Fix missing empty lines in Qt HTML when displayed in compliant browsersEskil Abrahamsen Blomfeldt2011-06-101-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | When QTextDocument exports HTML, it makes an effort to be compatible with its own importer, hence it has to be compatible with the dialect of HTML which Qt has developed over the years. One incorrect interpretation in Qt is that an empty paragraph is interpreted as an empty line. So if you use a QTextDocument to produce HTML for text where an empty line has been added, this empty line will not be visible when the document is viewed in a compliant browser. The fix is to set the height of the empty paragraph to 1em, so that it will match the current pixel size of the font, thus look the same as a <p><br /></p> but without altering the structure of the document. Reviewed-by: Gunnar
* | Merge remote-tracking branch 'qt/4.8'Jyri Tahtela2011-05-181-3/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
| * | Move QTextCursor::MoveStyle to Qt namespaceJiang Jiang2011-05-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot use QTextCursor::MoveStyle enums in QTextLine because QTextCursor is not a QObject, while referring to that enum in Q_PROPERTY requires it to be. That's why we need to move the enums in Qt namespace. Reviewed-by: David Boddie
| * | Include pixel size of font in exported HTML from QTextDocumentEskil Abrahamsen Blomfeldt2011-05-041-0/+8
| |/ | | | | | | | | | | | | | | | | | | When you copy-pasted rich text in which the font size had been set using setPixelSize() the font size would be mysteriously forgotten. The pixel size property in QTextCharFormat was added ad hoc, and not integrated in the HTML exporter. Task-number: QT-4792 Reviewed-by: Gunnar
* | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
|/ | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Support visual cursor movement for BIDI textJiang Jiang2011-04-191-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bidi input can in some contexts be more intuitive if the cursor works in visual way: pressing left arrow key always make cursor move one character to the left regardless the language of text, pressing right arrow key always make cursor move to the right. It is also the behavior of Mac OS X. Based on the above reason and requests from Symbian we implemented this support for visual movement in BIDI text. 3 public properties are added to QTextDocument, QTextLayout and QLineEdit respectively: - QTextDocument::defaultCursorMoveStyle can be used to control the cursor behavior in all widgets based on QTextDocument, like QTextEdit, QPlainTextEdit, etc. When set to QTextCursor:: Visual, it will enable visual movement for all the cursors in the corresponding text edit. Default is QTextCursor::Logical. - QTextLayout::cursorMoveStyle is used for low-level cursor manipulation. When set to Visual, it will enable visual movement behavior for all the cursor related methods, including cursorToX, xToCursor and drawCursor. Default is Logical. - QLineEdit::cursorMoveStyle is used to control cursor movement behavior in QLineEdit. Default is Logical.: Task-number: QTBUG-13859 Reviewed-by: Eskil
* Put all the declarations of qt_defaultDpi{,X,Y}() in one placeJiang Jiang2011-04-051-2/+1
| | | | Reviewed-by: Samuel Rødal
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-131-2/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/gui/graphicsview/qgraphicslayout.cpp src/gui/text/qfontengine_s60.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
| * Fix crash in QTextDocument::markContentsDirtyJiang Jiang2010-12-061-2/+4
| | | | | | | | | | | | | | | | 6f6c25b6 introduced this regression because it didn't check d->lout before calling d->lout->documentChange(). Task-number: QTBUG-15777 Reviewed-by: Eskil
* | Fix warningsOlivier Goffart2010-11-101-4/+4
| | | | | | | | | | | | Regarding conversion from char* to QString Reviewed-by: Joao
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-09-211-1/+12
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.h src/declarative/graphicsitems/qdeclarativeflickable.cpp src/declarative/graphicsitems/qdeclarativeflickable_p_p.h src/declarative/util/qdeclarativelistmodel.cpp
| * Doc: Listed undoable operations in QTextDocumentGeir Vattekar2010-09-151-1/+12
| | | | | | | | | | Task-number: QT-1212 Reviewed-by: David Boddie
* | Implemented suffix and prefix strings for the numbering in ordered lists as ↵Nils Jeisecke2010-08-311-4/+30
| | | | | | | | | | | | | | supported by ODF. Works also with HTML import/export by using Qt CSS properties extensions. Merge-request: 1642 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-151-4/+4
|\ \ | |/ | | | | | | Conflicts: src/gui/kernel/qapplication.h
| * Fix QTextDocument::markContentsDirty()mae2010-07-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function markContentsDirty(from,length) is documented to inform the document that it needs to lay out again the part from from to from + length. Trouble was that the function was implemented using beginEditBlock()/endEditBlock(), which has the negative side effect that it does increase the document's revision number and emits all sorts of contentChanged() signals. This did not matter from the one case where Qt uses the method itself in QSyntaxHighlighter, because here a private flag inContentsChange avoided the issue. Without the change, we cannot implement semantic syntax highlighting in creator without expensive extra selections or triggering a full rehighlight via QSyntaxHighlighter. Done-with: Roberto Raggi Reviewed-by: Roberto Raggi
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-011-6/+5
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: bin/syncqt src/gui/text/qtextlayout.cpp tools/assistant/tools/assistant/helpviewer_qwv.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/configure/configureapp.cpp
| * Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7Andy Shaw2010-06-211-6/+3
| |\
| | * Use the textDirection() of blocks correctly.Lars Knoll2010-06-091-6/+3
| | | | | | | | | | | | | | | Task-number: Part of QT-3292 Reviewed-by: Simon Hausmann
| * | Make sure that <br/> is seen as a valid tag in Qt::mightBeRichText()Andy Shaw2010-06-211-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | The W3C online markup validation test verifies that <br/> is indeed valid XHTML and <br /> is also valid so this ensures that this case is accounted for. The existing test was expanded to accout for each of these cases. Task-number: QTBUG-1786 Reviewed-by: Eskil Abrahamsen Blomfeldt
* | Allow QTextDocument to resolve URLs to the current working dir.Thiago Macieira2010-05-201-0/+2
|/
* Use case-insensitive comparison for the "data" scheme in URLsThiago Macieira2010-05-151-1/+1
|
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-05-011-6/+3
|\
| * Fixed a leak in QTextDocument::print().Trond Kjernåsen2010-04-291-6/+3
| | | | | | | | | | | | | | Also fixed a typo in the QScopedPointer docs. Task-number: QTBUG-10301 Reviewed-by: Kim
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-04-161-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/page/FrameView.cpp src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtNetworku.def src/s60installs/eabi/QtGuiu.def tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
| * Symbol visibility fixes for RVCT4 on SymbianIain2010-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | RVCT 4 is far more strict with regards to symbol visiblity that RVCT 2.2, and will hide symbols unless all references have default visibility in the object files. Update the various places in Qt code where the symbol visibility was set incorrectly for DLL-based platforms (those that use __declspec(dllimport) and (dllexport). Note: QtWebkit and QtScript are fixed in different commits. Task-number: QTBUG-9903 Reviewed-by: Jason Barron
* | Merge remote branch 'qt/master' into staging-2-masterQt Continuous Integration System2010-02-181-6/+13
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: tools/assistant/tools/assistant/helpviewer_qtb.h tools/assistant/tools/assistant/helpviewer_qwv.cpp tools/assistant/tools/assistant/helpviewer_qwv.h
| * | doc: Fixed some qdoc errors.Martin Smith2010-02-161-6/+13
| | |
* | | Replaced the numCopies()/setNumCopies() and actualNumCopies() API.Trond Kjernåsen2010-02-151-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | Obsoleted the numCopies()/setNumCopies()/actualNumCopies() with copyCount()/setCopyCount() and supportsMultipleCopies(). The old numCopies() was confusing since it returned the number of times a job had to be printed to get the copies you wanted. Now copyCount() and setCopyCount() are symmetric, and always returns the number of copies the user want to print. Task-number: QTBUG-5605 Reviewed-by: Kim
* | Added method to clear the undo/redo stacks.Erik Verbruggen2010-02-091-0/+17
| | | | | | | | Reviewed-by: mae
* | Merge branch '4.6'Thiago Macieira2010-01-131-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt doc/src/deployment/deployment.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/xml/qxmlstream.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
| * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Add data: URL handling to QTextDocument::loadResourceThorvald Natvig2009-12-021-0/+5
|/ | | | | Merge-request: 1560 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* Fixed endless loop when printing a QTextDocument.Trond Kjernåsen2009-11-231-0/+6
| | | | | | | | | If the user enters a valid page range, which lies outside of the actual number of printable pages, we can't detect that until the document has been paginated. Task-number: QTBUG-6051 Reviewed-by: Kim
* Printing QTextDocument doesn't include custom objects.Samuel Rødal2009-11-111-0/+4
| | | | | | | | We need to copy the abstract text layout's custom object handlers as well when we temporarily use a different QTextDocument. Task-number: QTBUG-5397 Reviewed-by: Simon Hausmann
* Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-021-8/+10
|\
| * Qt::escape(): also escape the quote (&quot;)Olivier Goffart2009-10-281-22/+5
| | | | | | | | | | | | | | | | This amend previous commit by removing the duplicate function. The quote need to be escaped in attributes. Reviewed-by: Thomas Zander
| * Fix XML entities in QTextDocument::toHtml()Thorvald Natvig2009-10-281-7/+26
| | | | | | | | | | | | | | | | | | If a QTextDocument contains an anchor with a & in it, this & is not escaped in the toHtml() function, meaning the resulting document can't be parsed as XML as it will contain invalid entities. Reviewed-by: Olivier Goffart Merge-request: 1753
* | introduce int QTextDocument::available{Undo,Redo}Steps() const;hjk2009-10-301-0/+27
|/ | | | | | | | | | Formerly, QTextDocument::revision() could be used to guesstimate the number of available undo steps that was used in Qt Creator to store cursor positions in parallel to the actual text contents. Now that revision() is strictly increasing, another means is needed, therefore the new functions providing the needed data. Reviewed-by: mae
* QTextDocument initial revision after setPlainText/setHtmlmae2009-09-241-0/+4
| | | | | | After separating document revisions from the undo stack, the initial revision after setText/setHtml could get to high. Now it's +1 from the previous revision
* Fix QTextDocument::revision()mae2009-09-241-1/+1
| | | | | | | | | The revision was bound to the current depth of the undo stack. This had the negative side effect, that equal revisions could point to different documents, and sometimes changes would not even increase the revision (in the case of undo command merging). Reviewed-by: Roberto Raggi
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Remove implicit margin on bulleted lists when exporting to HTMLEskil Abrahamsen Blomfeldt2009-09-041-3/+5
| | | | | | | | | | | | | | When we export a bulleted list to HTML, we add a meta-block around the list items to set the bullet style of the list (<ul> or <ol>.) This block will implicitly have a margin, even if the list itself does not in the internal document. The result is that exporting a list to HTML and then reloading it will give a different apperance, because the 0 margin of the original was not saved. The fix is to always set the meta-block's margin to 0, since it is only there to set the bullet style and should not affect the layout at all. Task-number: 201228 Reviewed-by: Simon Hausmann