Uwe Stöhr [Thu, 26 Nov 2015 23:39:38 +0000 (00:39 +0100)]
installer: install Qt plugin DLLs correctly
- also remove support metafile2eps because:
- it is outdated
- unnecessary third-party program since ImageMagick can do this too
- needs unnecessarily installation time
Richard Heck [Wed, 25 Nov 2015 05:37:36 +0000 (00:37 -0500)]
Simplify lyx2lyx code a bit, and correct a mistake in my previous
patch. Also fix some escaping problems (\end instead of \\end).
My testing revealed some other problems with this routine: stray
\noindent tags popping up here and there. I don't have time to fix
it right now but will try to come back to it.
Georg Baum [Tue, 24 Nov 2015 19:31:14 +0000 (20:31 +0100)]
Fix C++11 std::regex incompatibility
boost::regex supports escape sequences starting with a backslash in format
strings of regex_replace, but std::regex does not. Therefore format strings
involving literal backslashes have to be written differently for both flavours.
The special MSVC handling in regex.h is removed, since it is not needed
anymore, and using grep syntax would definitely be wrong.
The computation of the legth of expanded hfills did not take into account their unexpanded size. This is done now by increasing the dimension (+=) instead of merely setting it.
Moreover, since the insets sizes are integer number, rounding effects have to be taken in account. To this end, the extra number of pixels is added to the last hfill in the row.
This fixes part of bug #9860.
Note not everything is fixed by this patch: the logic of ParagraphMetrics::hfillExpansion seems bogus to me. I do not see why consecutive hfills at the beginning of a row should not be all expanded. Since I do not know what are the peculiarities of hfill handling in LaTeX, I did not change it (yet).
I did not either try to investigate the label hfill part, because I do not even know what is so special about it. I think there is a lot of old logic that nobody ever tried to question.
Kornel Benko [Mon, 23 Nov 2015 12:07:53 +0000 (13:07 +0100)]
Cmake url tests: Added summary files.
The files will be locatet in the build-directory "Testing/Temporary" as
LastFailedAccessibleURLS.log
LastFailedInaccessibleURLS.log
LastFailedKnownInvalidURLS.log
Georg Baum [Sun, 22 Nov 2015 16:43:10 +0000 (17:43 +0100)]
Fix InsetListings::getCaption() for std::regex
Back references in the format string of regex_replace use the syntax $n both
in std::regex and in boost::regex for the default format. Boost seems to
support the syntax \n in addition, but it is not documented at
http://www.boost.org/doc/libs/master/libs/regex/doc/html/boost_regex/format.html.
Therefore it is a good idea to use $n also for boost.
Kornel Benko [Sun, 22 Nov 2015 12:44:27 +0000 (13:44 +0100)]
Cmake export tests: Created sub-labels manuals, examples, templates, mathmacros, autotests.
To test all export use 'ctest -L export'. This is unchanged.
The following lists directories and assigned sub-label
lib/doc: manuals
lib/templates: templates
lib/examples: examples
development/mathmacro: mathmacros
autotests: autotests
Georg Baum [Sun, 22 Nov 2015 12:02:39 +0000 (13:02 +0100)]
Fix some thinkos in MSVC regex hack
The changed code is not used, but I tried to use a similar approach for
boost::regex, and found some problems:
- regex_replace and regex_search are implemented in the replacement, so they
must not be used directly
- an smatch object must be given by reference (as in the called methods),
otherwise an exception would be thrown at runtime
- the commented out regex_replace version is actually needed
This code is supposed to be deleted, but nevertheless I wanted to record here
how it had to be modified if it was actually needed.
Günter Milde [Sat, 21 Nov 2015 22:06:24 +0000 (23:06 +0100)]
Fix inputenc for some templates.
Some templates had the inputenc setting "default" (meaning
use the language default encoding, (not TeX's default which is 7-bit ASCII) but
don't load inputenc, leave handling of non-ASCII characters to the author).
This is no apparent problem as long as no non-ASCII character is used in the
document. It is very unsave, however, as any non-ASCII character used in the
document has the potential to either make compilation fail or be
misrepresented in the output.
Scott Kostyshak [Thu, 19 Nov 2015 05:19:00 +0000 (00:19 -0500)]
Clear the error list before second LaTeX run
It was possible for errors that occured in the first run to be shown
in the error list after the second run. Now, the errors are cleared
before the second run.
Although I do not have a reproducible example at hand, I imagine
this situation would occur if a rerun is required and there is still
an error after the rerun.
Scott Kostyshak [Thu, 19 Nov 2015 05:18:40 +0000 (00:18 -0500)]
Update exit code on second LaTeX run (#9765)
Before, the exit code for the first LaTeX run was used to set the
flag, which caused an error to be reported when in fact there was no
error on the second run.
tex2lyx: Add a newline at the end of comment if not at the end of a paragraph.
When importing TeX code like
%comment
TEXT
the LyX document currently becomes
[ERT %comment] TEXT
so that TEXT is now part of the comment.
Now output_comment adds a trailing newline if the token after the
comment is not a newline. Note that the newline that marks the end of
the comment has already been parsed at this point.
tex2lyx tests have been checked manually and updated.
Guillaume Munch [Wed, 11 Nov 2015 21:31:05 +0000 (21:31 +0000)]
Fix bug #9854 "Dataloss after git merge with change tracking"
A plausible scenario is that change tracking is used together with a versioning
system. In this case, parallel modifications might remove an \author line on one
side, and add another change of this author on the other side. This scenario
causes a bad merge after which the added change has no associated author. In
this case, LyX used to display a list of errors on opening and deliberately
removed the corresponding change tracking information.
* If ever a tracked change refers to an author that does not exist, then add a
dummy author. This dummy author is not saved to the file afterwards.
* Have a very clear error message on opening such a corrupt file.
Kornel Benko [Tue, 17 Nov 2015 17:22:45 +0000 (18:22 +0100)]
Cmake export tests: More tests to be inverted, suspended or made non-standard
All comments in revertedTests comes from Günter Milde
Non standard test is new. It should collect all tests
which may not work because of some missing non-standard
tex package or some exotic system font.
This is better because it implements a LRU cache. Indeed, while editing in particular, width of many different strings has to be computed. This is different from the previous situation where only width of single characters was computed and cached.
Georg Baum [Mon, 16 Nov 2015 20:51:30 +0000 (21:51 +0100)]
Fix wrong forward declaration
This popped up in cmake monolithic build once. It looks like BufferView is
included indirectly by some of the other headers (otherwise we would have seen
compile errors for other build configurations as well), bu I'll keep the
forward declaration since we don't want to depend on this indirect header
inclusion.
Georg Baum [Mon, 16 Nov 2015 20:39:03 +0000 (21:39 +0100)]
Fix a cmake monolithic build error
N_() is a preprocessor macro to mark translatable static strings. It is not a
good idea to also name a class member variable N_: It did only work in the
other build configurations because gettext.h was not included.
Uwe Stöhr [Mon, 16 Nov 2015 03:04:11 +0000 (04:04 +0100)]
installer: support texindy
texindy requires some more Perl and unfortunately the path tho the perl.exe in Windows' PATh environment variable.
The new EnvVarUpdate.nsh contains a function to modify Windows environment variables easily.
Georg Baum [Sat, 14 Nov 2015 09:25:07 +0000 (10:25 +0100)]
Fix sorting
No single translation has been changed, but pt_BR and pt_PT are now correctly
sorted. This removes the artifical diffs that running
make ../lib/layouttranslations
did produce previously.
Georg Baum [Sat, 14 Nov 2015 09:14:59 +0000 (10:14 +0100)]
Add experimental mode to save files with LyX
Thanks Scott for the idea to modify the document. This seems to work, but I am
not surer whether it is safe in all cases, so better warn if this is used.