lyx_mirror/src/insets
Jean-Marc 41740ea915 Merge remote-tracking branch 'features/str-metrics'
This branch implements string-wise metrics computation. The goal is to
have both good metrics computation (and font with proper kerning and
ligatures) and better performance than what we have with
force_paint_single_char. Moreover there has been some code
factorization in TextMetrics, where the same row-breaking algorithm
was basically implemented 3 times.

Globally, the new code is a bit shorter than the existing one, and it
is much cleaner.  There is still a lot of potential for code removal,
especially in the RowPainter, which should be rewritten to use the new
Row information.

The bugs fixed and caused by this branch are tracked at ticket #9003:
http://www.lyx.org/trac/ticket/9003

What is done:

* Make TextMetrics methods operate on Row objects: breakRow and
  setRowHeight instead of rowBreakPoint and rowHeight.

* Change breakRow operation to operate at strings level to compute
  metrics The list of elements is stored in the row object in visual
  ordering, not logical. This will eventually allow to get rid of the
  Bidi class.

* rename getColumnNearX to getPosNearX (and change code accordingly).
  It does not make sense to return a position relative to the start of
  row, since nobody needs this.

* Re-implement cursorX and getPosNearX using row elements.

* Get rid of lyxrc.force_paint_single_char. This was a workaround that
  is not necessary anymore.

* Implement proper string metrics computation (with cache). Remove
  useless workarounds which disable kerning and ligatures.

* Draw also RtL text string-wise. This speeds-up drawing.

* Do not cut strings at selection boundary in RowPainter. This avoids
  ligature/kerning breaking in latin text, and bad rendering problems
  in Arabic.

* Remove homebrew Arabic and Hebrew support from Encoding.cpp. We now
  rely on Qt to do handle complex scripts.

* Get rid of LyXRC::rtl_support, which does not have a real use case.

* Fix display of [] and {} delimiters in Arabic scripts.
2014-07-25 20:10:55 +02:00
..
CMakeLists.txt CMake: Put projects into subdirs 2012-12-15 11:02:06 +01:00
ExternalSupport.cpp Make use of otexstream also in external::writeExternal 2014-05-16 14:40:09 +02:00
ExternalSupport.h Make use of otexstream also in external::writeExternal 2014-05-16 14:40:09 +02:00
ExternalTemplate.cpp Audit all the LASSERT calls, and try to do something sensible at 2013-04-25 17:27:10 -04:00
ExternalTemplate.h
ExternalTransforms.cpp
ExternalTransforms.h
Inset.cpp Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
Inset.h Small Inset isXXX methods cleanup 2014-06-25 17:54:26 +02:00
InsetArgument.cpp Fix language issues in Argument read (#8471) 2013-11-14 17:44:03 +01:00
InsetArgument.h InsetArgument: Set ResetsFontEdit to false 2013-05-27 11:29:15 +02:00
InsetBibitem.cpp Make include and bibitem insets threadsafe 2014-07-05 12:09:49 +02:00
InsetBibitem.h Fix another faulty signature 2013-04-08 15:18:04 +02:00
InsetBibtex.cpp Bibtopic requires styles files to be passed via argument 2014-04-22 09:25:58 +02:00
InsetBibtex.h Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetBox.cpp This is the result of an audit of all static variables, looking 2014-04-21 11:51:57 -04:00
InsetBox.h Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetBranch.cpp Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetBranch.h Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetCaption.cpp Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetCaption.h Simplify, and delete unused routine. 2014-03-05 17:55:38 -05:00
InsetCitation.cpp Fix bug #9131 for development branch. There are two parts to the fix. 2014-05-23 11:26:45 -04:00
InsetCitation.h Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetCode.h
InsetCollapsable.cpp Allow for some argument visual customization 2012-11-26 09:10:14 +01:00
InsetCollapsable.h Allow for some argument visual customization 2012-11-26 09:10:14 +01:00
InsetCommand.cpp Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetCommand.h Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetCommandParams.cpp Audit all the LASSERT calls, and try to do something sensible at 2013-04-25 17:27:10 -04:00
InsetCommandParams.h Remove ; from end of function definitions 2013-05-12 13:04:18 +02:00
InsetERT.cpp Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetERT.h Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetExternal.cpp Fix a bunch of small performance issues spotted by cppcheck 2014-07-05 19:13:10 +02:00
InsetExternal.h Remove unsafe method FileName::tempName() 2014-06-09 13:05:50 +02:00
InsetFlex.cpp Fix conflicting inset font defaults (bug #8874) 2014-02-10 22:06:32 +01:00
InsetFlex.h Fix conflicting inset font defaults (bug #8874) 2014-02-10 22:06:32 +01:00
InsetFloat.cpp Do not allow newlines in subfloats. Fixes #8752. 2014-01-26 14:23:40 -05:00
InsetFloat.h Support \caption* (bug #3209) 2013-03-22 22:23:38 +01:00
InsetFloatList.cpp Use InsetLayout to get the tag type for TOC-like things. 2013-03-27 20:03:32 -04:00
InsetFloatList.h Update the XHTML output for InsetFloatList. We'll now use an 2013-03-27 20:03:32 -04:00
InsetFoot.cpp Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetFoot.h Add a member to TocItem that tells us whether the item in question 2013-03-08 16:38:18 -05:00
InsetFootlike.cpp
InsetFootlike.h
InsetGraphics.cpp Whitespace. 2014-05-18 11:27:54 -04:00
InsetGraphics.h InsetGraphics: add a layoutName method 2013-03-23 05:35:09 -04:00
InsetGraphicsParams.cpp
InsetGraphicsParams.h Header cleanup cont. 2013-05-23 22:12:29 -07:00
InsetHyperlink.cpp Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetHyperlink.h Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetInclude.cpp Make include and bibitem insets threadsafe 2014-07-05 12:09:49 +02:00
InsetInclude.h Add a member to TocItem that tells us whether the item in question 2013-03-08 16:38:18 -05:00
InsetIndex.cpp Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetIndex.h Add a member to TocItem that tells us whether the item in question 2013-03-08 16:38:18 -05:00
InsetInfo.cpp Fix assertion: icon in insetinfo without a font 2013-05-19 12:48:34 +02:00
InsetInfo.h
InsetIPA.cpp Code cleanup: get rid of RenderPreview::status() 2014-05-20 12:19:26 +02:00
InsetIPA.h
InsetIPAMacro.cpp Small Inset isXXX methods cleanup 2014-06-25 17:54:26 +02:00
InsetIPAMacro.h Small Inset isXXX methods cleanup 2014-06-25 17:54:26 +02:00
InsetLabel.cpp Disable invalid inset-modify (#9019). 2014-03-06 08:34:32 +01:00
InsetLabel.h Add a member to TocItem that tells us whether the item in question 2013-03-08 16:38:18 -05:00
InsetLayout.cpp Fix iterator invalidation. 2014-04-06 19:21:47 +02:00
InsetLayout.h Update comment slightly. 2014-04-21 11:52:00 -04:00
InsetLine.cpp Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetLine.h Remove ; from end of function definitions 2013-05-12 13:04:18 +02:00
InsetListings.cpp InsetListings: Rewrite C-ism in C++ and fix terminator bug. 2014-04-21 11:51:57 -04:00
InsetListings.h
InsetListingsParams.cpp Listings: Validate skip amounts correctly. 2014-05-07 12:33:39 +02:00
InsetListingsParams.h Store InsetListingsParams in a vector of pairs, not a map, since order of insertion matters. 2014-05-06 20:22:25 +02:00
InsetMarginal.cpp Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetMarginal.h Add a member to TocItem that tells us whether the item in question 2013-03-08 16:38:18 -05:00
InsetNewline.cpp Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetNewline.h Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetNewpage.cpp Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetNewpage.h Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetNomencl.cpp Implement XHTML output for InsetPrintNomencl. 2013-03-27 21:30:48 -04:00
InsetNomencl.h Remove ; from end of function definitions 2013-05-12 13:04:18 +02:00
InsetNote.cpp Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetNote.h Add a member to TocItem that tells us whether the item in question 2013-03-08 16:38:18 -05:00
InsetPhantom.cpp This is the result of an audit of all static variables, looking 2014-04-21 11:51:57 -04:00
InsetPhantom.h Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetPreview.cpp Code cleanup: get rid of RenderPreview::status() 2014-05-20 12:19:26 +02:00
InsetPreview.h
InsetQuotes.cpp Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetQuotes.h Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetRef.cpp Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetRef.h Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetScript.cpp This is the result of an audit of all static variables, looking 2014-04-21 11:51:57 -04:00
InsetScript.h Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetSeparator.cpp Fix checkmark on current entry for InsetSeparator context menu 2014-06-13 10:30:25 +02:00
InsetSeparator.h Fix bugs #8546 and #9055, and introduce new separator inset. 2014-05-10 23:25:11 +02:00
InsetSpace.cpp Small Inset isXXX methods cleanup 2014-06-25 17:54:26 +02:00
InsetSpace.h Small Inset isXXX methods cleanup 2014-06-25 17:54:26 +02:00
InsetSpecialChar.cpp Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetSpecialChar.h Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetTabular.cpp Fix bad use of undo kind in Tabular inset. 2014-07-25 20:03:42 +02:00
InsetTabular.h Remove unneeded swap() (thanks Jean-Marc) 2014-07-07 21:16:10 +02:00
InsetText.cpp Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetText.h Change forToc() to forOutliner(), to avoid confusion. The old name 2014-04-21 11:51:59 -04:00
InsetTOC.cpp Fix obvious oversight. 2013-08-30 13:16:23 -04:00
InsetTOC.h Factor common code from TOC updates. 2013-03-27 17:16:34 -04:00
InsetVSpace.cpp Do not reset custom space values if accessed via context menu (#8847) 2013-11-15 19:41:36 +01:00
InsetVSpace.h InsetSpace and InsetVSpace are clickable (part of #8847) 2013-09-22 12:49:43 +02:00
InsetWrap.cpp Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
InsetWrap.h Introduce max_length parameter for plaintext() output routines, 2013-03-08 15:12:58 -05:00
RenderBase.h Fix a bunch of minor issues discovered by the cppcheck script. 2014-04-21 11:52:00 -04:00
RenderButton.cpp
RenderButton.h
RenderGraphic.cpp
RenderGraphic.h
RenderPreview.cpp Code cleanup: get rid of RenderPreview::status() 2014-05-20 12:19:26 +02:00
RenderPreview.h Code cleanup: get rid of RenderPreview::status() 2014-05-20 12:19:26 +02:00