]> git.lyx.org Git - lyx.git/log
lyx.git
9 years agoCmake tests: Disable keytests if missing needed input files
Kornel Benko [Wed, 3 Sep 2014 10:25:28 +0000 (12:25 +0200)]
Cmake tests: Disable keytests if missing needed input files

The files first-time-in.txt and hello-world-in.txt are used
as first tests to initialize the test environment for the other
keytests.

9 years agoFix possibly uninitialized use of variables
Stephan Witt [Tue, 2 Sep 2014 22:07:26 +0000 (00:07 +0200)]
Fix possibly uninitialized use of variables

9 years agoAdded more missing files to autoconf's dist
Kornel Benko [Tue, 2 Sep 2014 13:02:55 +0000 (15:02 +0200)]
Added more missing files to autoconf's dist

9 years ago Fix bug with wrong baseline calculation in last paragraph (2nd attempt)
Juergen Spitzmueller [Mon, 1 Sep 2014 07:14:26 +0000 (09:14 +0200)]
 Fix bug with wrong baseline calculation in last paragraph (2nd attempt)

This time, we consider the cases where a \par is not wanted (single-par insets, tabular cells).

Fixes: #9231
9 years agode,.po
Juergen Spitzmueller [Sun, 31 Aug 2014 14:03:01 +0000 (16:03 +0200)]
de,.po

9 years agoAdd some missing files to autoconf's dist
Kornel Benko [Sun, 31 Aug 2014 13:23:28 +0000 (15:23 +0200)]
Add some missing files to autoconf's dist

9 years agoAdd cmake files to autoconf's dist
Kornel Benko [Sun, 31 Aug 2014 13:21:20 +0000 (15:21 +0200)]
Add cmake files to autoconf's dist

9 years agoTypos.
Juergen Spitzmueller [Sun, 31 Aug 2014 13:15:11 +0000 (15:15 +0200)]
Typos.

9 years agoAdd support for todonotes package
Juergen Spitzmueller [Sun, 31 Aug 2014 12:49:30 +0000 (14:49 +0200)]
Add support for todonotes package

Fixes: #7546
9 years agoAdd support for the fixme package.
Juergen Spitzmueller [Sun, 31 Aug 2014 12:38:28 +0000 (14:38 +0200)]
Add support for the fixme package.

Fixes: #8868
9 years agoAdd support for beamer lemma environment.
Juergen Spitzmueller [Sun, 31 Aug 2014 10:30:14 +0000 (12:30 +0200)]
Add support for beamer lemma environment.

File fomat change.

9 years agoFix lyx2lyx issue with complex beamer arguments.
Juergen Spitzmueller [Sat, 30 Aug 2014 11:24:29 +0000 (13:24 +0200)]
Fix lyx2lyx issue with complex beamer arguments.

Fixes: #9254
9 years agoFix export of xfig external insets (bug #9244).
Enrico Forestieri [Fri, 29 Aug 2014 08:13:25 +0000 (10:13 +0200)]
Fix export of xfig external insets (bug #9244).

The check for a latex format is very fragile. Both libmagic and our
guessing from contents cannot distinguish the pstex and pdftex formats
used by the xfig external inset. Moreover, it may also happen that
lyx files are mistaken as latex ones. Thus, when the guessed format
is latex, the only solution is to give precedence to the format
determined by the file extension.

9 years agoRevert "Fix bug with wrong baseline calculation in last paragraph"
Juergen Spitzmueller [Thu, 28 Aug 2014 06:37:39 +0000 (08:37 +0200)]
Revert "Fix bug with wrong baseline calculation in last paragraph"

This reverts commit b555f31a34112761f360ec69c996abcb3272e135.

9 years agopass git commit hash within CPPFLAGS to add it to version info
Stephan Witt [Thu, 28 Aug 2014 06:30:45 +0000 (08:30 +0200)]
pass git commit hash within CPPFLAGS to add it to version info

9 years agoprint callstack on assert
Peter Kümmel [Wed, 27 Aug 2014 17:40:40 +0000 (19:40 +0200)]
print callstack on assert

9 years agoMore careful NSAutoreleasePool management
Stephan Witt [Tue, 26 Aug 2014 06:22:12 +0000 (08:22 +0200)]
More careful NSAutoreleasePool management

9 years agoCorrect LyXUtilitiesDir default assignment location (thanks Patrick)
Stephan Witt [Tue, 26 Aug 2014 05:37:59 +0000 (07:37 +0200)]
Correct LyXUtilitiesDir default assignment location (thanks Patrick)

9 years ago#9245 replace Q_WS_MACX with Q_OS_MAC - the Q_OS_MAC macro is usable with Qt4 and...
Stephan Witt [Mon, 25 Aug 2014 18:08:59 +0000 (20:08 +0200)]
#9245 replace Q_WS_MACX with Q_OS_MAC - the Q_OS_MAC macro is usable with Qt4 and Qt5.

9 years agoReplace Q_WS_WIN with appropriate guards to account for Qt5.
Enrico Forestieri [Mon, 25 Aug 2014 17:27:45 +0000 (19:27 +0200)]
Replace Q_WS_WIN with appropriate guards to account for Qt5.

This commit replaces almost all occurrences of Q_WS_WIN to comply
with Qt5. The remaining occurrences should *not* be replaced,
because the guarded code won't compile on Qt5.

9 years agoFix the -geometry command line argument for Windows.
Enrico Forestieri [Mon, 25 Aug 2014 16:35:15 +0000 (18:35 +0200)]
Fix the -geometry command line argument for Windows.

The command line argument -geometry WIDTHxHEIGHT±XOFF±YOFF
specifies a preferred size and location for the main window.
Currently, this is semi-broken on Windows. Indeed, only
specifying WIDTH and HEIGHT places the main window such that
the left and top borders are invisible such that the window cannot
be moved. Moreover, the XOFF and YOFF parts (when present) are
used to specify the distance of the window from the left and top
or right and bottom edges of the screen, when using '+' or '-',
respectively. However, -geometry 800x600-20-20, instead of placing
the window such that its bottom and right edges are at a distance
of 20 pixels from the corresponding screen edges, places the
window such that its left and top borders are out of the screen.
This is corrected by this commit, which also addresses the fact
that Qt5 does not define Q_WS_WIN anymore.

9 years agoAdd a debugging message.
Richard Heck [Mon, 25 Aug 2014 15:14:27 +0000 (11:14 -0400)]
Add a debugging message.

9 years agokeytest.py: Allow for LyX window to appear without timeout
Kornel Benko [Mon, 25 Aug 2014 12:28:18 +0000 (14:28 +0200)]
keytest.py: Allow for LyX window to appear without timeout

Timeout for lyx-process to appear may be significantly smaler.
5 sec. looks sufficient, while lyx-window may take some time
due to configure.py.

9 years ago* sk.po
Kornel Benko [Mon, 25 Aug 2014 11:52:14 +0000 (13:52 +0200)]
* sk.po

9 years agokeytests: add a timeout for LyX process to start
Kornel Benko [Mon, 25 Aug 2014 11:49:12 +0000 (13:49 +0200)]
keytests: add a timeout for LyX process to start

If the LyX window does not appear after a certain (conservative)
time, the keytest now fails. One reason that caused the LyX window
to never show up was when DISPLAY was not set. This particular case
has been fixed in <commit1hash>. This commit is meant for the more general
scenario.
(Collaboration with Scott Kostyshak)

9 years agoFix stalling of keytests when invalid DISPLAY
Kornel Benko [Mon, 25 Aug 2014 11:45:32 +0000 (13:45 +0200)]
Fix stalling of keytests when invalid DISPLAY

Before, the keytests would run infinitely if the
tests were run, e.g. through SSH without X forwarding.
To reproduce that problem, run

  DISPLAY='' ctest -R hello

This commit causes the test to correctly fail in such situations.
(Collaboration with Scott Kostyshak)

9 years agoFORMAT: document latest file format change
Uwe Stöhr [Sun, 24 Aug 2014 23:28:12 +0000 (01:28 +0200)]
FORMAT: document latest file format change

9 years agosupport for the LaTeX commands \x***arrow
Uwe Stöhr [Sun, 24 Aug 2014 22:44:09 +0000 (00:44 +0200)]
support for the LaTeX commands \x***arrow

- this patch supports the \x***arrow commands provided by the mathtool package
- fileformat change

9 years agoQt5MacExtras is required on a Mac; report the version of Qt5
Stephan Witt [Sun, 24 Aug 2014 19:59:12 +0000 (21:59 +0200)]
Qt5MacExtras is required on a Mac; report the version of Qt5

9 years agoReintroduce some class definitions.
Stephan Witt [Sun, 24 Aug 2014 19:40:40 +0000 (21:40 +0200)]
Reintroduce some class definitions.

9 years agoRemove superfluous class definitions.
Stephan Witt [Sun, 24 Aug 2014 18:32:01 +0000 (20:32 +0200)]
Remove superfluous class definitions.

9 years agoRemove special GlobalMenuBar class. As Patrick De Visschere pointed out it is not...
Stephan Witt [Sun, 24 Aug 2014 18:29:52 +0000 (20:29 +0200)]
Remove special GlobalMenuBar class. As Patrick De Visschere pointed out it is not needed. The shortcut handling of Qt does it internally now what GlobalMenuBar was made for.

9 years agoFSPathMakeRef is deprecated: use LSOpenFromURLSpec instead of LSOpenFromRefSpec
Stephan Witt [Sun, 24 Aug 2014 10:49:34 +0000 (12:49 +0200)]
FSPathMakeRef is deprecated: use LSOpenFromURLSpec instead of LSOpenFromRefSpec

9 years agoCorrect the method signature of MenuTranslator::translate for Qt5
Stephan Witt [Sat, 23 Aug 2014 14:01:03 +0000 (16:01 +0200)]
Correct the method signature of MenuTranslator::translate for Qt5

9 years agoCmake build: Use find_package(Qt5X11Extras ...) independent of OS
Kornel Benko [Sat, 23 Aug 2014 09:36:24 +0000 (11:36 +0200)]
Cmake build: Use find_package(Qt5X11Extras ...) independent of OS

We need to know, if Qt5 is built over X11 in order to test with
xvkbd, which manipulates XEvents.
Qt5X11Extras is independent of underlying OS.

9 years agoInsert menu accelerator 'x' now goes to box menu
Scott Kostyshak [Wed, 6 Aug 2014 07:36:31 +0000 (03:36 -0400)]
Insert menu accelerator 'x' now goes to box menu

Before, 'x' would go to "TeX Code" but that already has a shortcut
in the common bind files.

Reported and discussed on lyx-devel at:
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg185082.html

9 years agoMake BiblioInfo::collectCitedEntries private (since it can be),
Richard Heck [Fri, 22 Aug 2014 15:17:36 +0000 (11:17 -0400)]
Make BiblioInfo::collectCitedEntries private (since it can be),
and fix a comment referring to it.

9 years agoUse QProxyStyle instead of QMacStyle. QMacStyle is not available anymore with At5...
Stephan Witt [Fri, 22 Aug 2014 09:17:34 +0000 (11:17 +0200)]
Use QProxyStyle instead of QMacStyle. QMacStyle is not available anymore with At5 and QProxyStyle is present since Qt4.6 as an alternative

9 years agoAdd check for the link for libmagic.dylib.
Stephan Witt [Fri, 22 Aug 2014 08:05:40 +0000 (10:05 +0200)]
Add check for the link for libmagic.dylib.

9 years agoRemove unused code.
Stephan Witt [Fri, 22 Aug 2014 08:04:53 +0000 (10:04 +0200)]
Remove unused code.

9 years agoImproved QtConfigureOptions (for Qt5.3).
Stephan Witt [Fri, 22 Aug 2014 07:58:32 +0000 (09:58 +0200)]
Improved QtConfigureOptions (for Qt5.3).

9 years agoRemove gettext framework support. Add libmagic framework support.
Stephan Witt [Fri, 22 Aug 2014 07:52:39 +0000 (09:52 +0200)]
Remove gettext framework support. Add libmagic framework support.

9 years agoAdd command line option to define the location of the self made utilities
Stephan Witt [Fri, 22 Aug 2014 06:39:14 +0000 (08:39 +0200)]
Add command line option to define the location of the self made utilities

9 years agoAdd QtMacExtras detection for Qt5 support
Stephan Witt [Thu, 21 Aug 2014 16:22:43 +0000 (18:22 +0200)]
Add QtMacExtras detection for Qt5 support

9 years agoAdd policy definitions to avoid warnings from cmake 3.0.0
Stephan Witt [Thu, 21 Aug 2014 16:03:37 +0000 (18:03 +0200)]
Add policy definitions to avoid warnings from cmake 3.0.0

9 years agofix coding style
Peter Kümmel [Sat, 16 Aug 2014 05:26:21 +0000 (07:26 +0200)]
fix coding style

(should have read ml first)

9 years agoignore Qt Creator's cmake file
Peter Kümmel [Sat, 16 Aug 2014 04:59:40 +0000 (06:59 +0200)]
ignore Qt Creator's cmake file

9 years agobuild test_Layout test
Peter Kümmel [Sat, 16 Aug 2014 04:55:32 +0000 (06:55 +0200)]
build test_Layout test

9 years ago* sk.po
Kornel Benko [Fri, 15 Aug 2014 15:11:12 +0000 (17:11 +0200)]
* sk.po

9 years agoPossible fix for the mystery crash, which is bug #9049.
Richard Heck [Thu, 7 Aug 2014 19:00:35 +0000 (15:00 -0400)]
Possible fix for the mystery crash, which is bug #9049.

Investigation of bug #9236 showed that crash to be due to a Paragraph's
holding a dangling pointer to an old and deleted Layout after the
DocumentClass was reset. Since the backtraces look almost identical, it
seems likely that we have the same problem here.

Since this crash seems almost always to involve tables, I looked at the
code in switchBetweenClasses() and found that the Paragraphs that belong
to "hidden" table cells are not seen by the initial recursion using a
ParIterator: It skips right over them. This was confirmed by test code
suggested by Enrico, with results reported in Trac.

The present patch attempts to deal with this problem in the second
recursion, over Insets. When we see an InsetTabular, we call a new
routine that recurses through the cells, looking for hidden ones. If it
finds a hidden one, it then resets the Layout for the cell's Paragraphs
(there should be only one, but we do not make any assumptions) to the
PlainLayout that belongs to the new DocumentClass. This is good enough,
since such cells never have content.

There is extensive discussion of the patch here:
  https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg185095.html
Additional testing by Enrico and me confirmed the existence of the
dangling pointer.

9 years agoUpdate comments.
Richard Heck [Tue, 12 Aug 2014 19:44:15 +0000 (15:44 -0400)]
Update comments.

9 years agoLittle bit of cleanup.
Richard Heck [Tue, 12 Aug 2014 17:13:47 +0000 (13:13 -0400)]
Little bit of cleanup.

9 years agoMake the constructor of the singleton class LayoutFileList private.
Richard Heck [Tue, 12 Aug 2014 16:49:17 +0000 (12:49 -0400)]
Make the constructor of the singleton class LayoutFileList private.

9 years agoUse a const ref here. Guess it was a thinko when I did it.
Richard Heck [Tue, 12 Aug 2014 16:32:01 +0000 (12:32 -0400)]
Use a const ref here. Guess it was a thinko when I did it.

9 years agoCmake build: Move use of QT5 libraries to the end of linker command line.
Kornel Benko [Mon, 11 Aug 2014 19:30:21 +0000 (21:30 +0200)]
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.

9 years agoCMake: add option to enable address sanitizer
Peter Kümmel [Sun, 10 Aug 2014 08:35:56 +0000 (10:35 +0200)]
CMake: add option to enable address sanitizer

9 years agoAdd some comments about the behavior of cellInset and cellIndex.
Richard Heck [Sat, 9 Aug 2014 17:13:10 +0000 (13:13 -0400)]
Add some comments about the behavior of cellInset and cellIndex.

9 years agoFix bug #9236: After we recreate the DocumentClass, we have to apply
Richard Heck [Wed, 6 Aug 2014 15:43:22 +0000 (11:43 -0400)]
Fix bug #9236: After we recreate the DocumentClass, we have to apply
it to the document.

9 years agoDo not allow copying a separator without a following par end.
Enrico Forestieri [Wed, 6 Aug 2014 00:21:18 +0000 (02:21 +0200)]
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).

9 years agoinstaller: update changelog
Uwe Stöhr [Mon, 4 Aug 2014 21:59:29 +0000 (23:59 +0200)]
installer: update changelog

9 years agoRevert "Clear empty selections in GuiView after dispatch"
Scott Kostyshak [Sun, 3 Aug 2014 22:37:45 +0000 (18:37 -0400)]
Revert "Clear empty selections in GuiView after dispatch"

This reverts commit fb05011ad0db2e2c5e557d91f398970d75cf8d15,
which lead to various menu-related crashes, such as when
going to Help > About.

9 years agoDo not break documents with complex beamer block ERT usage we cannot handle
Juergen Spitzmueller [Sun, 3 Aug 2014 10:21:35 +0000 (12:21 +0200)]
Do not break documents with complex beamer block ERT usage we cannot handle

Fixes: #9144
9 years agoFix bug with wrong baseline calculation in last paragraph
Juergen Spitzmueller [Sun, 3 Aug 2014 09:26:16 +0000 (11:26 +0200)]
Fix bug with wrong baseline calculation in last paragraph

Fixes: #9231
9 years agoImprove parsing of ERT arguments in beamer block titles.
Juergen Spitzmueller [Fri, 1 Aug 2014 07:42:43 +0000 (09:42 +0200)]
Improve parsing of ERT arguments in beamer block titles.

Fixes: #9225
9 years agoRevert "AGUTeX template/layout: support the new cls name"
Scott Kostyshak [Tue, 29 Jul 2014 19:46:16 +0000 (15:46 -0400)]
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.

9 years agoUse enum instead of int in TextMetrics::getAlign
Jean-Marc Lasgouttes [Tue, 29 Jul 2014 09:05:14 +0000 (11:05 +0200)]
Use enum instead of int in TextMetrics::getAlign

This is just a code cleanup, no (intented) effect.

9 years agoMore tweaking of boundary setting at end of row
Jean-Marc [Mon, 28 Jul 2014 21:31:32 +0000 (23:31 +0200)]
More tweaking of boundary setting at end of row

9 years agoFix display of cursor at end of row
Jean-Marc [Mon, 28 Jul 2014 20:03:57 +0000 (22:03 +0200)]
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.

9 years agoRename FontSpan::inside(pos) to contains(pos)
Jean-Marc [Mon, 28 Jul 2014 18:41:01 +0000 (20:41 +0200)]
Rename FontSpan::inside(pos) to contains(pos)

9 years agoDisable branches insert menu if read only
Scott Kostyshak [Wed, 19 Feb 2014 21:58:31 +0000 (16:58 -0500)]
Disable branches insert menu if read only

9 years agoDisable custom insets insert menu if read only
Scott Kostyshak [Wed, 19 Feb 2014 21:58:29 +0000 (16:58 -0500)]
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.

9 years agoSubmenus now expand even if all items are disabled
Scott Kostyshak [Fri, 21 Feb 2014 15:26:36 +0000 (10:26 -0500)]
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

9 years agoClear empty selections in GuiView after dispatch
Scott Kostyshak [Wed, 25 Jun 2014 20:50:31 +0000 (16:50 -0400)]
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

9 years agoFix compilation warnings on windows.
Jean-Marc Lasgouttes [Mon, 28 Jul 2014 07:46:13 +0000 (09:46 +0200)]
Fix compilation warnings on windows.

9 years agoFix beamer block conversion when arguments are in multiple ERTS.
Juergen Spitzmueller [Sun, 27 Jul 2014 09:30:25 +0000 (11:30 +0200)]
Fix beamer block conversion when arguments are in multiple ERTS.

Fixes second part of #9208.

9 years agoAdd beamer-resenumerate (from our wiki) to the list of safe modules for argment conve...
Juergen Spitzmueller [Sun, 27 Jul 2014 08:23:17 +0000 (10:23 +0200)]
Add beamer-resenumerate (from our wiki) to the list of safe modules for argment conversion, since it is safe.

Fixes part of #9208.

9 years agoWhitespace
Jean-Marc Lasgouttes [Sat, 26 Jul 2014 14:29:23 +0000 (16:29 +0200)]
Whitespace

9 years agoWhitespace only
Jean-Marc Lasgouttes [Fri, 25 Jul 2014 20:35:08 +0000 (22:35 +0200)]
Whitespace only

9 years agoMake it compilable under cmake again after the merge from str-metrics
Kornel Benko [Fri, 25 Jul 2014 20:03:59 +0000 (22:03 +0200)]
Make it compilable under cmake again after the merge from str-metrics

9 years agoRename rowpainter.* to RowPainter.*
Jean-Marc Lasgouttes [Fri, 25 Jul 2014 19:55:08 +0000 (21:55 +0200)]
Rename rowpainter.* to RowPainter.*

This is the convention for files that define classes.

9 years agoMerge remote-tracking branch 'features/str-metrics'
Jean-Marc [Fri, 25 Jul 2014 18:10:55 +0000 (20:10 +0200)]
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.

9 years agoFix bad use of undo kind in Tabular inset.
Jean-Marc [Sat, 19 Jul 2014 22:50:24 +0000 (00:50 +0200)]
Fix bad use of undo kind in Tabular inset.

9 years agoremove branch documentation
Jean-Marc [Fri, 25 Jul 2014 18:01:04 +0000 (20:01 +0200)]
remove branch documentation

9 years agoFix logic error for spacing of RTL rows
Jean-Marc [Thu, 24 Jul 2014 22:10:10 +0000 (00:10 +0200)]
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.

9 years agoFix display of parenthesis in arabic
Jean-Marc [Mon, 21 Jul 2014 21:57:10 +0000 (23:57 +0200)]
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.

9 years agoBetter algorithm for forcing bidi drawing
Jean-Marc [Sun, 20 Jul 2014 22:19:50 +0000 (00:19 +0200)]
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.

9 years agoavoid qt4 variable names in cmake build
Kornel Benko [Mon, 21 Jul 2014 06:49:05 +0000 (08:49 +0200)]
avoid qt4 variable names in cmake build

9 years agoRevert optimization where several words are drawn at the same time
Jean-Marc Lasgouttes [Sun, 20 Jul 2014 16:54:31 +0000 (18:54 +0200)]
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.

9 years agoavoid qt4 variable names
Stephan Witt [Sun, 20 Jul 2014 16:16:36 +0000 (18:16 +0200)]
avoid qt4 variable names

9 years agoUpdate autotools for building with Qt5.
Enrico Forestieri [Sat, 19 Jul 2014 01:34:28 +0000 (03:34 +0200)]
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.

9 years agoFix build on FreeBSD.
Enrico Forestieri [Wed, 16 Jul 2014 20:25:49 +0000 (22:25 +0200)]
Fix build on FreeBSD.

Notified by Raphael Kubo da Costa.

9 years agodo not strip binary for packaging by default; improved name of disk image
Stephan Witt [Wed, 16 Jul 2014 20:25:25 +0000 (22:25 +0200)]
do not strip binary for packaging by default; improved name of disk image

9 years agoAdd forward search command for qpdfview.
Enrico Forestieri [Sun, 13 Jul 2014 18:08:43 +0000 (20:08 +0200)]
Add forward search command for qpdfview.

Also update docs explaining how to activate reverse search in qpdfview.

9 years agoAdd some postscript and pdf viewers for Unix and Windows.
Enrico Forestieri [Sun, 13 Jul 2014 17:59:31 +0000 (19:59 +0200)]
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.

9 years agoUse getent instead of grepping /etc/passwd.
Enrico Forestieri [Sun, 13 Jul 2014 12:39:05 +0000 (14:39 +0200)]
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.

9 years agoRevert 6a5aa1ca
Enrico Forestieri [Sat, 12 Jul 2014 17:52:12 +0000 (19:52 +0200)]
Revert 6a5aa1ca

That commit is obsoleted by 5bd14af8.

9 years agoFix bug #9193: Spacing modification not exact
Enrico Forestieri [Sat, 12 Jul 2014 17:12:08 +0000 (19:12 +0200)]
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).

9 years agoFix compatibility issue with 64-bit cygwin.
Enrico Forestieri [Fri, 11 Jul 2014 14:49:10 +0000 (16:49 +0200)]
Fix compatibility issue with 64-bit cygwin.

9 years agoFix scale parameter for fonts.
Enrico Forestieri [Fri, 11 Jul 2014 14:12:08 +0000 (16:12 +0200)]
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).

9 years agoFix import of latex documents with scaled fonts.
Enrico Forestieri [Fri, 11 Jul 2014 09:21:45 +0000 (11:21 +0200)]
Fix import of latex documents with scaled fonts.