Commit Graph

32473 Commits

Author SHA1 Message Date
Juergen Spitzmueller
15957d003a Revert fix for #9231
This is more complicated than I thought.
2014-08-28 08:22:47 +02:00
Enrico Forestieri
43c669fb13 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.
2014-08-25 20:55:03 +02:00
Richard Heck
f626d8f589 New Japanese translation from Koji. 2014-08-24 12:43:55 -04:00
Richard Heck
d643ab471d Remerge strings. 2014-08-15 11:18:19 -04:00
Kornel Benko
69c1a6b04c Merge branch '2.1.x' of git.lyx.org:lyx into 2.1.x 2014-08-15 17:08:40 +02:00
Kornel Benko
7749f72fb9 * sk.po 2014-08-15 17:08:27 +02:00
Richard Heck
a0ed470672 Start preparing ANNOUNCE file for 2.1.2. 2014-08-15 11:00:23 -04:00
Richard Heck
f52d5ae614 Minor updates to status file. 2014-08-15 10:53:38 -04:00
Richard Heck
8302d1bab1 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.

(cherry picked from commit 54c2ab2732)
2014-08-15 10:46:56 -04:00
Richard Heck
1757ef2a99 Use a const ref here. Guess it was a thinko when I did it.
(cherry picked from commit b9fe1dd10b)
2014-08-12 12:33:29 -04:00
Richard Heck
090bd44740 Fix bug #9236: After we recreate the DocumentClass, we have to apply
it to the document.

(cherry picked from commit c2fdbbe01a)
2014-08-07 15:16:16 -04:00
Enrico Forestieri
e2d834e8d0 Fix bug #9146 (Graphics conversion problem).
If LyX does not know about a given file format, it may easily
happen that the format is recognized as "latex" and this causes
bug #9146. This patch limits the check for a latex format to
non-binary files. The strategy for deciding that a file has
binary content is the same as that adopted by the "less" program.
This is a stripped down backport of the more complex fix in master.
2014-08-04 18:52:20 +02:00
Enrico Forestieri
a8b7e0a18b Add some postscript and pdf viewers for Unix and Windows.
For Windows: AcroRd32, SumatraPDF 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-08-03 19:26:34 +02:00
Enrico Forestieri
64cc8a1c1e 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-08-03 18:59:54 +02:00
Enrico Forestieri
47e263fa7f Fix compatibility issue with 64-bit cygwin. 2014-08-03 18:53:33 +02:00
Enrico Forestieri
154cd41119 Fix import of latex documents with scaled fonts. 2014-08-03 18:42:04 +02:00
Juergen Spitzmueller
d8b88a78a4 Fix bug with wrong baseline calculation in last paragraph
Fixes: #9231
2014-08-03 17:43:18 +02:00
Juergen Spitzmueller
03d6040904 Do not break documents with complex beamer block ERT usage we cannot handle
Fixes: #9144
2014-08-03 17:38:46 +02:00
Enrico Forestieri
2a0b22ba9e Fix bug #9151 (Wrong reverse search for images and tables).
If the reverse position corresponds to an inset, its paragraph id
does not follow the main text numbering. Typically, an inset has
only a few paragraphs, so that we would jump near the beginning of
the document. Now the cursor in LyX jumps to the right spot.
2014-08-03 16:47:22 +02:00
Juergen Spitzmueller
c31cb9fd98 Improve parsing of ERT arguments in beamer block titles.
Fixes: #9225
2014-08-01 16:06:42 +02:00
Uwe Stöhr
96639d2255 French documentation files: 2 fixes by Jan-Pierre 2014-07-28 00:56:57 +02:00
Enrico Forestieri
5f7948e5a5 Fix bugs 9190 and 9193.
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 returned 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.
2014-07-28 00:33:13 +02:00
Juergen Spitzmueller
edddfb99fc Fix beamer block conversion when arguments are in multiple ERTS.
Fixes second part of #9208.
2014-07-27 18:06:08 +02:00
Juergen Spitzmueller
a8ba869d73 Add beamer-resenumerate (from our wiki) to the list of safe modules for argument conversion, since it is safe.
Fixes part of #9208.
2014-07-27 18:02:35 +02:00
Juergen Spitzmueller
5210cfa5f9 Whitespace 2014-07-27 12:26:37 +02:00
Juergen Spitzmueller
8d8880d83b Fix typos in InsetListingsParams validator 2014-07-27 09:08:30 +02:00
Juergen Spitzmueller
2194c2c484 Store InsetListingsParams in a vector of pairs, not a map, since order of insertion matters.
Fixes: #8144, #5203.
2014-07-27 09:08:29 +02:00
Scott Kostyshak
63f980bc04 Backport 'select word on double click at boundary'
Now when double clicking on a boundary of a word, the
word is selected. This also causes single-letter words
to now be selected (fixes #9159).

Backported from bcbc162.
2014-07-26 17:30:56 -04:00
Jean-Marc Lasgouttes
3e60f58a92 Do not forget last word of paragraph in completion
With the old code, the last word of a paragraph would not be added in
the completion list. The key difference is to pass `from' instead of `pos'
to FontList::fontiterator.

Slight cleanup of the code.
2014-07-20 00:07:23 +02:00
Jean-Marc Lasgouttes
fa67a6ae89 Fix error spotted by cppcheck 2014-07-20 00:04:45 +02:00
Georg Baum
275c6dabe6 Fix bug #9162: Missing \use_indices
The lyx2lyx conversion for format 352 was incomplete: It should have been
added the \use_indices setting, but it relied on the fact that the default in
LyX for missing \use_indices is the same as the old format without that
setting used. However, the default might change in the future, and later
lyx2lyx conversions rely on that setting as well.
2014-07-09 20:58:44 +02:00
Georg Baum
d610f34212 Make GraphicsConverter threadsafe
build_script() was already threadsafe, since it used a TempFile, and the
counter was basically not needed, but the new solution makes this obvious
and has the additional advantage that TempFile constructs the real output
file, not a dummy without extension which is not needed.
2014-07-07 22:31:11 +02:00
Georg Baum
17275458d9 Fix uncodable author warning
The old code was not threadsafe, and the restriction to one message box per
author name did not work if more than two authors were uncodable.
2014-07-07 22:22:25 +02:00
Georg Baum
d9e234b6da Fix LaTeXFeatures::useLayout() recursion test
It was broken in two ways: It was not threadsafe, and it did never detect
any recursion, since the counter was decremented for each non-recursive call
and never incremented again.
2014-07-07 22:16:13 +02:00
Georg Baum
29f6aebb3e Make LaTeX export threadsafe.
This is one of the more important threadsafety issues because of export in
thread and simultanous view source. The solution is ugly, but a better one
(see FIXME) would require major rework. These static variables should not
have been used in the first place IMHO.
2014-07-07 22:14:28 +02:00
Georg Baum
2fe650f77f Make BufferList::fileNames() threadsafe
Using a static variable here was premature optimization: fileNames() is only
called from GuiRef (directly or indirectly), and since this is a dialog the
copying of a FileNameList is not noticeable at all.
2014-07-07 22:05:10 +02:00
Georg Baum
fc3183a762 Make createBufferTmpDir() threadsafe
This must not use thread local storage, since the generated directories are
all in the same parent directory which is unique per running LyX instance.
2014-07-07 22:03:32 +02:00
Georg Baum
211e1661b5 Make DocFileName::mangledFileName() threadsafe 2014-07-07 22:01:58 +02:00
Georg Baum
7f1fa090e3 Make preview filename generation threadsafe
Threadsafety is ensured by the atomic file name generation in TempFile.
2014-07-07 21:58:24 +02:00
Georg Baum
ee145f2a74 Backport temp file changes from bf782ee
This is a tiny part of the commit which is needed for other thread-safety
fixes.
2014-07-07 21:56:36 +02:00
Georg Baum
9dae9a9d4f Make newUnnamedFile() threadsafe 2014-07-07 21:38:39 +02:00
Georg Baum
ac8fd45b44 Make BufferParams::auto_packages() threadsafe 2014-07-07 21:37:11 +02:00
Georg Baum
f4ed3dc6b5 Make include and bibitem insets threadsafe
Using a mutex to ensure that the generated filenames and ids are still unique.
2014-07-07 21:35:53 +02:00
Georg Baum
8fe58b90c2 Make Formats::isZippedFile() threadsafe
In this case I use a mutex, so the zip status of files is shared between
threads. This is possible because a deadlock can't happen, and it should give
better performance.
2014-07-07 21:34:54 +02:00
Georg Baum
f5cf3705d5 Make theWordList() thread safe.
Without this, you get crashes in a few second when you set the autosave
interval to one second and edit quickly (typing new words etc). The reason
is that the cloned buffer wants to insert words into the word list and
remove them again, but it lives in a different thread.
2014-07-06 18:12:57 +02:00
Georg Baum
e64954e7d3 Reset after 2.1.1 release 2014-07-06 18:02:56 +02:00
Richard Heck
e5ee9eea15 Start 2.1.2. 2014-07-06 15:30:17 +01:00
Richard Heck
fd819a405f Prepare for 2.1.1. 2014-07-02 16:29:58 -04:00
Richard Heck
0fe60a02dd Remerge strings. 2014-07-02 16:12:26 -04:00
Uwe Stöhr
0f1af6d190 fr.po: last minute changes from Jean-Pierre 2014-07-01 01:50:49 +02:00