Commit Graph

32598 Commits

Author SHA1 Message Date
Kornel Benko
49efd1933a Cmake build: Move use of QT5 libraries to the end of linker command line.
To prevent the linker error if they were before some object file referencing
some symbol there.
2014-08-11 21:30:21 +02:00
Peter Kümmel
048571a2bf CMake: add option to enable address sanitizer 2014-08-10 11:23:42 +02:00
Richard Heck
3a78422782 Add some comments about the behavior of cellInset and cellIndex. 2014-08-09 13:13:10 -04:00
Richard Heck
c2fdbbe01a Fix bug #9236: After we recreate the DocumentClass, we have to apply
it to the document.
2014-08-07 15:13:31 -04:00
Enrico Forestieri
39492b0cd7 Do not allow copying a separator without a following par end.
This makes virtually impossible copying a separator inset whithout
also copying the end of paragraph. These insets are not supposed to
be directly inserted by users. For example, the parbreak version
represents a LaTeX paragraph break, not a LyX one. So, if it is
possible to copy and paste it by alone, an unsespecting user may be
surprised to see a paragraph break in the output but not on the LyX
screen (because of the lack of indentation, for example).
In this way, it also becomes a LyX par break from a user point of
view, not any more useful than simply introducing a par break by
hitting <return> (except in those cases where it makes a difference,
in which case they are automatically inserted by LyX).
2014-08-06 02:21:18 +02:00
Uwe Stöhr
ad1a553454 installer: update changelog 2014-08-04 23:59:29 +02:00
Scott Kostyshak
453ce61191 Revert "Clear empty selections in GuiView after dispatch"
This reverts commit fb05011ad0,
which lead to various menu-related crashes, such as when
going to Help > About.
2014-08-03 19:20:56 -04:00
Juergen Spitzmueller
e9681bbe08 Do not break documents with complex beamer block ERT usage we cannot handle
Fixes: #9144
2014-08-03 12:21:35 +02:00
Juergen Spitzmueller
b555f31a34 Fix bug with wrong baseline calculation in last paragraph
Fixes: #9231
2014-08-03 11:26:16 +02:00
Juergen Spitzmueller
d62ba3c333 Improve parsing of ERT arguments in beamer block titles.
Fixes: #9225
2014-08-01 09:42:43 +02:00
Scott Kostyshak
e9c1a1943b Revert "AGUTeX template/layout: support the new cls name"
This reverts commit cde8707 and changes "AGUTeX" back to "agutex".
The maintainer has changed "AGUTeX.cls" back to "agutex.cls" and has
confirmed (through private email) that he plans to keep the filename
all lowercase now that he is aware of case-sensitive file systems.
2014-07-29 15:50:52 -04:00
Jean-Marc Lasgouttes
37fd7b24ba Use enum instead of int in TextMetrics::getAlign
This is just a code cleanup, no (intented) effect.
2014-07-29 11:05:14 +02:00
Jean-Marc
f29e78039d More tweaking of boundary setting at end of row 2014-07-28 23:31:32 +02:00
Jean-Marc
46ee67995d Fix display of cursor at end of row
The particular case here is:
* the last element of the row is an inset
* the row is broken by a display inset.
2014-07-28 22:03:57 +02:00
Jean-Marc
fca332bace Rename FontSpan::inside(pos) to contains(pos) 2014-07-28 20:42:01 +02:00
Scott Kostyshak
4843618655 Disable branches insert menu if read only 2014-07-28 12:59:35 -04:00
Scott Kostyshak
0bf61a48c0 Disable custom insets insert menu if read only
Before, if a document was read only and had no custom insets
defined, the submenu would be enabled.
2014-07-28 12:59:34 -04:00
Scott Kostyshak
d449e7e64e Submenus now expand even if all items are disabled
As stated in the Apple HIG[1] (via JMarc):

  Ensure that a submenu’s title is undimmed even when all its commands
  are unavailable. As with menu titles, it’s important for users to be
  able to view a submenu’s contents, even if none of them are
  available in the current context.

[1]
https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Menus/Menus.html#//apple_ref/doc/uid/TP30000356-TP6
2014-07-28 12:59:34 -04:00
Scott Kostyshak
fb05011ad0 Clear empty selections in GuiView after dispatch
Empty selections can cause confusing behavior for a few reasons:

(1) some functions behave differently depending on whether there is a
selection. If I press delete, nothing happens (where I expect the
character or inset before the cusor to be deleted). If I toggle bold or
emphasize nothing happens (where if there is no selection the entire
word is toggled). There are other LyX functions that depend on whether
there is a selection or not. Further, I wonder if any part of LyX's code
assumes that if there is a selection it is non-empty.

(2) menu options are incorrectly set. For example, the scissors icon.

For remaining empty selection issues, see #9222.

For more information, see:
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg184758.html
2014-07-28 10:37:08 -04:00
Jean-Marc Lasgouttes
f9caebd29f Fix compilation warnings on windows. 2014-07-28 09:46:13 +02:00
Juergen Spitzmueller
cc56c64ede Fix beamer block conversion when arguments are in multiple ERTS.
Fixes second part of #9208.
2014-07-27 11:30:25 +02:00
Juergen Spitzmueller
728cf1edf3 Add beamer-resenumerate (from our wiki) to the list of safe modules for argment conversion, since it is safe.
Fixes part of #9208.
2014-07-27 10:23:17 +02:00
Jean-Marc Lasgouttes
7f7dc5d314 Whitespace 2014-07-26 16:29:23 +02:00
Jean-Marc Lasgouttes
5e126d2920 Whitespace only 2014-07-25 22:36:20 +02:00
Kornel Benko
5acc6b3791 Make it compilable under cmake again after the merge from str-metrics 2014-07-25 22:03:59 +02:00
Jean-Marc Lasgouttes
b54deb3683 Rename rowpainter.* to RowPainter.*
This is the convention for files that define classes.
2014-07-25 21:55:08 +02:00
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
Jean-Marc
1fefbf5bdc Fix bad use of undo kind in Tabular inset. 2014-07-25 20:03:42 +02:00
Jean-Marc
9bfbaed2b5 remove branch documentation 2014-07-25 20:01:04 +02:00
Jean-Marc
6ee39ff90a Fix logic error for spacing of RTL rows
The code referred to vpos (the visible position) instead of pos, the logical one.
This can lead to using the wrong font when computing spaces width.
2014-07-25 19:59:37 +02:00
Jean-Marc
3599285019 Fix display of parenthesis in arabic
Actually the workaround that is used to show parenthesis in the right direction
is not needed any more, since this is part of the unicode bidi writing algorithm.

This fixes at the same time the use of [] or  as delimiters in arabic, which was wrong on screen.

Note that there is a problem with hebrew, but this will require a fileformat change.
2014-07-25 19:59:37 +02:00
Jean-Marc
f4fc035cf6 Better algorithm for forcing bidi drawing
The use of RLO/LRO overrides to force text orientation was really hackish and the way it was done caused dropped letters in Mac OS X (for some unknown reasons).

This new approach is much cleaner, except that it relies on features not advertised in documentation
but present at least from Qt 4.5 to Qt 5.3:
* TextFlag enum values TextForceLeftToRight and TextForceRightToLeft, which are strong versions
  of QPainter::setLayoutDirection; they are passed as a parameter of QPainter::drawText.

* QTextLayout::setFlags method, which is required to pass the above flags to QTextLayout.

The unicode override method is still used to draw strings Mac OS X because, for some reason, the direction was not really enforced in this case.
2014-07-25 19:56:51 +02:00
Kornel Benko
63976066ad avoid qt4 variable names in cmake build 2014-07-21 08:49:05 +02:00
Jean-Marc Lasgouttes
bbe6e9f593 Revert optimization where several words are drawn at the same time
This can only be done where splitting of string is identical in row breaking and display. It will be possible to reintroduce this when row painting uses the tokenized row information.
2014-07-20 18:54:31 +02:00
Stephan Witt
b06abbbdbc avoid qt4 variable names 2014-07-20 18:16:36 +02:00
Enrico Forestieri
4bdeae2733 Update autotools for building with Qt5.
The option --enable-qt5 allows configuring for Qt5. The default is Qt4.
Nothing special is done with respect to Qt4, apart from pulling in the
correct libraries. Indeed, other than the core and gui libraries, now
also the concurrent and widgets libraries are needed.
2014-07-19 03:34:28 +02:00
Enrico Forestieri
4342411297 Fix build on FreeBSD.
Notified by Raphael Kubo da Costa.
2014-07-16 22:28:46 +02:00
Stephan Witt
0eb2df6ab6 do not strip binary for packaging by default; improved name of disk image 2014-07-16 22:25:25 +02:00
Enrico Forestieri
294d08b1bf Add forward search command for qpdfview.
Also update docs explaining how to activate reverse search in qpdfview.
2014-07-13 20:08:43 +02:00
Enrico Forestieri
d5210c555a Add some postscript and pdf viewers for Unix and Windows.
For Windows: AcroRd32 and gsview (both 32 and 64 bit versions).
For Unix: qpdfview.

Qpdfview is a nice alternative to Okular for KDE users and a superior
alternative to Evince for Gnome users, due to its complete synctex
support. It only depends on Qt libraries for the graphical interface.
2014-07-13 20:05:37 +02:00
Enrico Forestieri
ff506c8e42 Use getent instead of grepping /etc/passwd.
Forthcoming versions of cygwin will use a different mechanism for
obtaining passwd/group information based on /etc/nsswitch.conf.
Thus, it will not be guaranteed that the files /etc/passwd and
/etc/group even exist. The recommended way for obtaining those
info is by using the getent command, which already works in
current versions.
2014-07-13 14:39:05 +02:00
Enrico Forestieri
2af17f8f89 Revert 6a5aa1ca
That commit is obsoleted by 5bd14af8.
2014-07-12 19:52:12 +02:00
Enrico Forestieri
5bd14af887 Fix bug #9193: Spacing modification not exact
The conversion from floating point to string performed by
boost:lexical_cast does not allow specifying a precision and,
for example, values such as 0.9 are resturned as 0.899999976.
The standard C++ way for performing the conversion is using
std::ostringstream which is exempt from this problem, even if
less efficient. For the sake of accuracy, boost::lexical_cast
is ditched in favor of the ostrinsgstream implementation.
In C++11 another option would be using std::to_string, but I
think it is not as efficient as the boost way and not worth
implementing through #ifdef's.
Incidentally, this patch would have also fixed #9190 and all
similar cases involving the use of convert<string>(float|double).
2014-07-12 19:12:08 +02:00
Enrico Forestieri
b3735501c7 Fix compatibility issue with 64-bit cygwin. 2014-07-11 16:49:10 +02:00
Enrico Forestieri
6a5aa1cab1 Fix scale parameter for fonts.
When a font is scaled by a certain percentage in the document settings,
LyX was outputting a ridiculous parameter value. For example, if the
font is scaled 90%, the corresponding parameter was "scaled=0.899999976".
The patch avoids this and, in the previous case, one gets "scaled=0.9".
This is not only cosmetic, because in roundtrip conversions the parameter
would be continuosly changing.

This commit and b60b505f should be backported to the 2.1.x branch, where
reimporting with tex2lyx an exported document produces wrong results
(also in version 2.1.0).
2014-07-11 16:12:08 +02:00
Enrico Forestieri
b60b505fd8 Fix import of latex documents with scaled fonts. 2014-07-11 11:21:45 +02:00
Enrico Forestieri
60a1b3b83c Fix make check. 2014-07-11 11:14:02 +02:00
Georg Baum
98fc5e518f Support new languages in tex2lyx
I forgot that this was part of the file format update as well.
Also fix a mixup of "english" and "uppersorbian".
2014-07-10 22:15:34 +02:00
Georg Baum
1a073ea416 Missing file format bis from 0c3b88e3 2014-07-10 21:59:17 +02:00
Jean-Marc Lasgouttes
45eb314a86 Get rid of rtl_support preference
This variable was introduced to guard against any bad consequence of the then-new right-to-left
languages support. Let's be bold and get rid of it altogether!

Now right to left support is always enabled.
2014-07-09 21:11:08 +02:00