Commit Graph

21212 Commits

Author SHA1 Message Date
Georg Baum
928dc03324 Fic crash for repeated pasting from complex docs
Using a cloned buffer was an idea by Richard, and it works well.
2013-04-21 21:16:41 +02:00
Georg Baum
ed2f6a8599 Use MathML on the clipboard for formulas in HTML
This speeds up the copying, and although not many applications understand
MathML currently (MS word is supposed to understand it), their number should
go up in the future.
2013-04-21 21:16:41 +02:00
Uwe Stöhr
0050245151 PrefInputUi.ui: change 2 strings
because all over the docs we refer to the keyboard maps as primary and secondary
2013-04-21 20:20:08 +02:00
Richard Heck
db358a4315 Fix bug found by Scott concerning copying XHTML to clipboard. We
needed to updateMacros() before doing the export, which required a
bit of code massaging.
2013-04-20 21:07:07 -04:00
Juergen Spitzmueller
be0610362d Revert "Fix the zombie toolbar problem (bug #8520)"
This reverts commit d00ec4dece.
2013-04-20 11:42:21 +02:00
Juergen Spitzmueller
f3bb757f97 Revert "avoid redundant toolbar initialization"
This reverts commit 0f26aabeee.

It turned out this breaks session.
2013-04-20 11:40:40 +02:00
Uwe Stöhr
d750b6610f fix some more typos spotted by Yuri 2013-04-19 23:26:58 +02:00
Georg Baum
60448bf681 Whitespace 2013-04-19 21:34:05 +02:00
Vincent van Ravesteijn
cd88c51cce Pass the binary dir to the configure script to find tex2lyx
When using CMake, the binary files are stored in <build-dir>/bin. LyX can't fin tex2lyx with the current code. So, we have to point configure.py to explicitly look in the binary dir.
2013-04-19 20:31:30 +02:00
Georg Baum
c14b9e67bc Implement paste from LaTeX and HTML (bug #3096)
As discussed on the list. No automatic contents detection is done, the user
needs to use the special paste menu instead. I used the new TempFile class
for safe temporary file handling.
The documentation would go into section 2.2 of UserGuide.lyx, but I am not
allowed to edit that document.
2013-04-14 19:45:36 +02:00
Georg Baum
db0ba3a3c6 Add class for threadsafe temp file handling
FileName::tempName() is not thread safe, since the QTemporaryFile object is
immediately deleted after creating it. Therefore, another thread could create
the same temporary file in the time span before the user of FileName::tempName()
recreates it. This is not as theoretical as it may look: I observed that
repeated creation and deletion of QTemporaryFile objects always use the same
name.
This problem is solved by the new class TempFile which should be used like
QTemporaryFile itself.
2013-04-14 18:22:42 +02:00
Enrico Forestieri
f6ca8350cd Fix bug #8631: Python detection unfinished 2013-04-14 13:44:59 +02:00
José Matos
2be29006ad sgml: ignore paragraphs named *dummy*
dummy is the name given in the latex backend to simple (usually single) paragraphs and since dummy is not a docbook element it is acceptable to ignore it. It is a reasonal compromise.
2013-04-14 11:34:47 +01:00
Pavel Sanda
fb16e5cca1 Make parameter more readable. 2013-04-13 21:56:52 -07:00
Georg Baum
f4eae12d60 Improve LaTeX format detection
libmime is a bit lacking here.
2013-04-12 22:31:48 +02:00
Georg Baum
0613a218aa Also put HTML on the clipboard when copying
The HTML export is now mature enough so that it can be used to transfer
formatted text to the clipboard. This enhances interoperability e.g. with
office applications.
2013-04-12 22:12:47 +02:00
Richard Heck
19554dda4e Remove useless test and add comment. 2013-04-11 21:43:01 -04:00
Richard Heck
0c61991c9a Do less indenting. 2013-04-11 21:41:52 -04:00
Richard Heck
b447587aa9 Remove obsolete comment. 2013-04-11 21:07:57 -04:00
Richard Heck
f6fceea317 Const. 2013-04-11 15:56:41 -04:00
Tommaso Cucinotta
7779d46920 Replacing git status --porcelain along with output parsing, with a simple git ls-files.
git ls-files tells me straight whether or not a file-name is in the repo.
I cannot say the same of git status --porcelain.
See also discussion at: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg177840.html
2013-04-11 02:04:25 +01:00
Tommaso Cucinotta
34dfe2d71e Avoid check mistakenly current folder for .git/.svn/.CVS, when going up the path checking for parents. 2013-04-11 02:04:24 +01:00
Georg Baum
ceb2303e2b Remove partial support for non-buffer files in VCS
This reverts a small part of 0526eb9d and gets rid of the double calls of
SVN::findFile() and GIT::findFile(). Please note that git detection does
currently not work because of 26dd4d0c.
2013-04-10 22:31:38 +02:00
Jean-Marc Lasgouttes
ec962dea20 Fix another faulty signature 2013-04-08 15:18:04 +02:00
Juergen Spitzmueller
15fe9fe7b4 Fix plaintext header definition 2013-04-08 11:09:45 +02:00
Juergen Spitzmueller
d288b2d628 Revert "Do not pass thru argument of pass-thru layout literally"
This reverts commit 4564c88469.

The bug is actually elsewhere.
2013-04-08 11:07:02 +02:00
Juergen Spitzmueller
4564c88469 Do not pass thru argument of pass-thru layout literally 2013-04-08 08:26:49 +02:00
Tommaso Cucinotta
6a3792bdbb Let non-ASCII chars within regexp insets match their occurrence within TEXT, rather than MATHS (seems the most recurrently needed scenario).
See also: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg177747.html
2013-04-07 23:35:32 +01:00
Jean-Marc Lasgouttes
a88e5cbf74 Fix bug #8370: crash when searching for next change
Cursor::backwardPos() may enter in a nested inset, while CursorSlice::backwardPos() will not.
2013-04-07 14:22:37 +02:00
Richard Heck
72aee2a9c5 Add a FIXME.
(cherry picked from commit 4363ff2a93aa82ce2bcdc36351f0c041aff9f5bd)
2013-04-06 18:09:08 -04:00
Tommaso Cucinotta
26dd4d0c15 Now LyX correctly asks to retrieve non-existing file from GIT repo only if the file is actually registered in repo.
See also discussion at: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg177840.html
2013-04-06 16:12:06 +01:00
Tommaso Cucinotta
6ea1479252 Just refactoring patch 5e5115c3 in simpler terms. 2013-04-04 00:50:02 +01:00
Tommaso Cucinotta
5e5115c376 Fixed issue #8543 also for advanced search (cursor moved at proper end of selection before starting Find Advanced operation). 2013-04-04 00:43:36 +01:00
Uwe Stöhr
6d4cde435d BufferParams.cpp: fix bug #6813
- varioref needs to be loaded after babel to know what languages it has to use
2013-04-02 23:53:27 +02:00
Scott Kostyshak
2427e9b57a Remove exclamation mark from "String not found!"
When using 'find' and a string is not found, this is not an error or a
surprising event. It is often expected (e.g. after searching through
the whole document for a certain string eventually you will get this
message). The exclamation mark should be reserved for messages that
are unexpected or that need extra attention, such as errors.
2013-04-01 15:33:41 -04:00
Georg Baum
0d7702e5e6 Delete temp file after usage 2013-04-01 12:24:24 +02:00
Kornel Benko
415343d19b Advanced search: Allow faster searching for normal (non-regular) strings
Setting variable 'par_as_string_nolead' also in case we are ignoring format,
drastically accelerates the search.
2013-04-01 10:16:45 +02:00
Georg Baum
274b3caff2 Fix most important case of bug #8205
Since a complete solution requires some refactoring, I fixed the bug for the
most important case: The main document language is only supported by
polyglossia. If any other language than the main one is only supported by
polyglossia the bug is still there.
2013-03-31 23:48:05 +02:00
Georg Baum
7462381a27 Fix layout write bugs found by tests 2013-03-31 18:17:40 +02:00
Georg Baum
7cf8b9da78 Implement writing of layouts
This will be needed for layout forward compatibility, and could also be used
for a layout editor. Writing was only implemented for styles, not for complete
layout files (text class). I rarely made use of default values for missing
variables which exist in read(), so the output it a bit verbose (but more safe
against future changes). Also, some things like CopyStyle are never written for
obvious reasons.
2013-03-31 15:33:26 +02:00
Vincent van Ravesteijn
ea7d36912b Use setSectionResizeMode from qt_helpers
This is needed to compile with Qt5.
2013-03-30 12:41:08 +01:00
Scott Kostyshak
d42c5fcd23 Exit with error if required filename is not given
This is a second attempt to fix the problem described in
6df4a7bb (2c2c1767 reverted the first attempt).

The solution here is more general: if we get to a certain point
in the code and there is no filename, an error is given.

The following command now gives an error:

  lyx -e pdf2

And the following command continues to not give an error:

  lyx myfile.lyx -e pdf
2013-03-30 00:01:39 -04:00
Scott Kostyshak
70eddf2c30 Give an error message when LyX cannot load a file
Before, the following commands correctly exited with code 1, but now
a reason for exiting is also given:

  lyx -e pdf2 doesNotExist
  lyx doesNotExist -e pdf2
2013-03-29 23:58:43 -04:00
Scott Kostyshak
2c2c17675d Revert "Exit with error if no filename given to -e switch"
This reverts commit 6df4a7bb40.

As Vincent points out, this commit is not correct. For one reason,
it would incorrectly exit with error for the following syntax:

lyx myfile.lyx -e pdf

I will look for a correct solution to the problem specified in the
message of the reverted commit.
2013-03-29 11:20:23 -04:00
Scott Kostyshak
6df4a7bb40 Exit with error if no filename given to -e switch
Before, 'lyx -e pdf2' would give no error and would exit with 0. A use
case is if a user has in a bash script the following command:

lyx -e pdf2 "${mylxyfile}" || exit 1

where 'lyx' is mispelled as 'lxy' and thus yields an empty
string. If LyX does not exit with an error, the script continues where
the user probably intends for it to stop.
2013-03-29 01:57:29 -04:00
Scott Kostyshak
cc138f6e68 Remove an empty line to make style consistent 2013-03-29 01:57:29 -04:00
Jean-Marc Lasgouttes
3231ab7d70 Putenv requires a char *, for some reason. 2013-03-28 14:03:43 +01:00
Richard Heck
5fbbd863db Remove "List of" from outliner dropdown. 2013-03-28 08:33:21 -04:00
Richard Heck
4a6efbb102 Implement XHTML output for InsetPrintNomencl. 2013-03-27 21:30:48 -04:00
Richard Heck
62d1e762c7 Remove debugging code. 2013-03-27 21:30:47 -04:00