summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocumentlayout.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersAkseli Salovaara2015-03-311-13/+13
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Updated year in copyright headerKai Koehne2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix clipping of QTextList decorators.Leonard Lee2013-07-081-1/+14
| | | | | | | | | | | | | | | | List decorators may be clipped if you set a large font size and/or small indent for a QTextList. This fix is to prevent clipping by moving list decorators and items to left (or to right in case of right to left layouts) so that the list decorator is always painted inside the layout. This commit fixes painting related issue, so auto test is not needed. The manual test program can be used for verification purposes. Task-number: QTBUG-5111 Change-Id: I0de01f4d6b833289948ac29e38dd3cc8ab9bca9e (cherry picked from commit qtbase/ad443dfb1d8e9096c4913686aa2ed0bc9b3f5de7) Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* 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
* Merge earth-team into origin/4.8Olivier Goffart2011-05-031-2/+11
|\ | | | | | | | | Conflicts: configure
| * Support more items for QTextCharFormat::VerticalAlignment enum for custom ↵Dmitry Zelenkovsky2011-04-281-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | text objects. * QTextCharFormat::AlignNormal - support text format descent, place text object bottom on (baseline - descent). * QTextCharFormat::AlignBottom - place text object bottom on baseline. * QTextCharFormat::AlignTop - Still not supported. * Any other vertical alignment is mapped QTextCharFormat::AlignBottom. Add new enum AlignBaseline for custom inline objects to take into account font baseline. Merge-request: 2578 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | Fixes warnings about unused variablesOlivier Goffart2011-04-281-0/+1
|/ | | | Reviewed-by: Samuel
* Put all the declarations of qt_defaultDpi{,X,Y}() in one placeJiang Jiang2011-04-051-2/+0
| | | | Reviewed-by: Samuel Rødal
* Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-221-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/declarative/positioners/layoutdirection/layoutdirection.qml src/corelib/global/qglobal.h src/plugins/qpluginbase.pri src/qbase.pri src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def tests/auto/selftests/expected_cmptest.txt tests/auto/selftests/expected_crashes_3.txt tests/auto/selftests/expected_longstring.txt tests/auto/selftests/expected_maxwarnings.txt tests/auto/selftests/expected_skip.txt tools/assistant/tools/assistant/doc/assistant.qdocconf tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qdeclarative.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2011-03-221-1/+1
| |\ | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Don't crash calling QTextDocument::blockBoundingRect on invalid block
| | * Don't crash calling QTextDocument::blockBoundingRect on invalid blockEskil Abrahamsen Blomfeldt2011-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | If the block is invalid, QTextBlock::layout() will return 0 and we would dereference a null pointer. Task-number: QTBUG-18192 Reviewed-by: Jiang Jiang
| * | Use same values for Text.lineHeightMode and QTextBlock::lineHeightMode from ↵Yann Bodson2011-02-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master. - MultiplyHeight becomes ProportionalHeight - PixelHeight becomes FixedHeight Change-Id: I2a1ebc6ff9db7e62f513919f19773f985b08f8d7 Reviewed-by: Michael Brasser
* | | Revert part of commit 7c1ab9b6a8Olivier Goffart2011-02-091-13/+1
| | | | | | | | | | | | | | | | | | | | | It was not properly merged in master because of conflicts, and we have now a public API for this Added QEXPECT_FAIL and opened QTBUG-17325
* | | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-041-1/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/declarative/samegame/SamegameCore/samegame.js mkspecs/features/symbian/default_post.prf src/declarative/qml/qdeclarativeengine.cpp src/gui/text/qtextdocumentlayout.cpp src/plugins/plugins.pro src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def src/s60installs/s60installs.pro tests/auto/declarative/declarative.pro tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp tests/auto/declarative/qmlvisual/qmlvisual.pro
| * | Add support for line spacing in Text element.Yann Bodson2011-01-281-2/+15
| |/ | | | | | | | | | | | | This change adds the lineHeight and lineHeightMode properties. Task-number: QTBUG-14296 Reviewed-by: Martin Jones
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
| * Doc: Fixing typoSergio Ahumada2011-01-071-1/+1
| |
* | Compile when qreal != doubleEskil Abrahamsen Blomfeldt2011-01-101-1/+1
| | | | | | | | | | | | Compile fix for devices where qreals are floats. Reviewed-by: Fabien Freling
* | Rename QTextBlockFormat::AtLeastHeight -> MinimumHeightEskil Abrahamsen Blomfeldt2011-01-041-1/+1
| | | | | | | | | | | | | | | | | | Make some alterations to merge request 2305: 1. Rename enum for consistency with other APIs in Qt. 2. Correct documentation with actual version number of features. 3. Remove unstandard css syntax in line-height specification. Reviewed-by: Jiang Jiang
* | Add line spacing to QTextBlockFormat, get/set functions, CSS supportJoshua Grauman2011-01-041-6/+32
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds line spacing options to Qt, as in all modern word processors. I primarily checked OpenOffice as a reference for how to position the lines based on the various types of line spacing as well as where to do the page breaks. The following functions were added: void QTextBlockFormat::setLineHeight(qreal height, int heightType) qreal QTextBlockFormat::lineHeight() int QTextBlockFormat::lineHeightType() qreal QTextBlockFormat::lineHeight(qreal scriptLineHeight, qreal scaling) Here are the HeightTypes available: QTextBlockFormat::SingleHeight QTextBlockFormat::ProportionalHeight QTextBlockFormat::FixedHeight QTextBlockFormat::AtLeastHeight QTextBlockFormat::LineDistanceHeight The following CSS syntax was added: line-height:150% line-height:40px line-height:normal line-height:40al line-height:40ld Merge-request: 2305 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Use the textDirection() of blocks correctly.Lars Knoll2010-06-101-6/+2
| | | | | Task-number: Part of QT-3292 Reviewed-by: Simon Hausmann
* Ensure that we only have one QLayoutStruct struct by renaming the otherAndy Shaw2010-06-031-29/+29
| | | | | | | | Since QTextDocumentLayout and QLayoutEngine code referred to their own instances of QLayoutStruct it was causing problems with the Visual Studio debugger as it kept confusing the two together. Reviewed-by: Eskil
* 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
* Update copyright year to 2010Jason McDonald2010-01-071-1/+1
| | | | Reviewed-by: Trust Me
* CompileEskil Abrahamsen Blomfeldt2009-11-101-1/+1
| | | | | | QPen does not have a constructor which only takes a single QBrush. Reviewed-by: Gunnar
* Pixelalign circles in HTML bullet listsGunnar Sletta2009-11-091-1/+1
| | | | Reviewed-by: Eskil
* Fixed inconsistent coloring of bullets, circles and square listsGunnar Sletta2009-11-091-1/+1
| | | | | | | Also removed a redundant setBrush(), as it will be followed by painter->restore() a few lines below. Reviewed-by: Eskil
* Line spacing fixesJoerg Bornemann2009-10-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QTextEdit (via QTextLayout) and QPlainTextEdit in Qt used to ignore any font leading but added one extra pixel in QFontMetrics. With many freetype fonts, this resulted in a "spacy" text layout. The necessary fixes on X11 and Windows were to take (positive) leading into account, to make the font database convert point sizes to pixel sizes without rounding to plain integer values, and to subtract the extra pixel from QFontMetrics from the font engines' descent value. The change also fixes several places in styles and widgets, where QFontMetrics::lineSpacing() was wrongly used instead of QFontMetrics::height(). Ideally we should also handle negative leading, which would require additional and bigger code changes in QTextLayout and QPlainTextEdit. In addition, all other editors we have tested seem to ignore leading on X11. If we choose to believe the values provided by freetype, our text layout would be one pixel smaller than everybody else's. On the Mac, this change does nothing. There our layout is still too spacy, and for smaller fonts quite ugly compared to native Mac applications. Done with mae. Reviewed-by: mae
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Don't float objects into next page unless they can fit in itEskil Abrahamsen Blomfeldt2009-08-241-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you had a floating table which spanned over several pages, this would always float down to the next page, even when it was the only element in the document. The main reason why this mechanism was added to positionFloat() was to handle floating images, since they can't be broken down into more than one page. Tables, however, have logic to ensure they are broken into several pages if they are too large for the current page. There is however no reason to float an object into the next page if it is larger than that page. Since the size of tables are altered by their position as long as they span more than one page, we need to set the sizeDirty flag for floating tables when positioning and then relayout the frame to make sure the page breaks are set correctly. Task-number: 240086 Reviewed-by: Simon Hausmann
* | Avoid wrapping outside word boundaries in QTextDocument unless necessaryEskil Abrahamsen Blomfeldt2009-08-141-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | If you have a floating object which affects the width available to the text, we need to recalculate the width of the text line. In the code, the setLineWidth() call to do this would by default have WrapAnywhere as its wrap mode, even when this was not necessary. The code has now been moved so that WrapAnywhere is only used if we try to set the line width to match the available width and detect that the text is too wide (the natural text width exceeds the available space.) Task-number: 240325 Reviewed-by: Simon Hausmann
* | QVariant: added toFloat and toRealThierry Bastian2009-08-141-2/+2
| | | | | | | | | | | | | | | | Made better use of qreal all over the place. We were previously using QVariant::toDouble a lot. That is triggering unnecessary conversions between float and double on embedded. Reviewed-by: ogoffart
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Added QTextListFormat::ListUpperRoman and QTextListFormat::ListLowerRoman ↵Nils Jeisecke2009-07-131-1/+5
| | | | | | | | | | | | | | for roman numbering of lists as supported by HTML/ODF Reviewed-by: Olivier Goffart Merge-request: 681
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
|\|
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | Merge commit 'origin/4.5'Bjørn Erik Nilsen2009-06-121-18/+18
|\| | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp src/gui/graphicsview/qgraphicsitem.cpp tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp tools/linguist/shared/cpp.cpp translations/linguist_ja.qm translations/qt_ru.qm
| * Fixed a problem with disappearing borders in a QTextFrame.Trond Kjernåsen2009-06-111-18/+18
| | | | | | | | | | | | | | | | | | The border was always drawn before the background, and if there were both a border and background brush set, the background ended up being drawn ontop of the border. Task-number: 255868 Reviewed-by: Samuel
| * Long live Qt 4.5!Lars Knoll2009-03-231-0/+3224
|
* refactor of private getters for the mode i item widget classesThierry Bastian2009-06-111-6/+4
|
* improved string operations all over the placeThierry Bastian2009-05-281-1/+1
| | | | | used character operations whenever possible better usage of QLatin1String
* Long live Qt!Lars Knoll2009-03-231-0/+3224