Georg Baum [Sat, 11 Jun 2016 07:20:16 +0000 (09:20 +0200)]
Skip boost linking test if not needed
We only link against boost libraries if we do not use std::regex.
Therefore, we do not need to test how to link against boost libs unconditionally.
Also, the warning regarding stdlib-debug is only needed if we link against boost.
Georg Baum [Thu, 9 Jun 2016 20:25:34 +0000 (22:25 +0200)]
Replace Boost.Signals with Boost.Signals2
Boost.Signals is deprecated. This fixes bug #9943.
The only thing left to do is to rewrite (or get rid of) the boost -mt test
in config/lyxinclude.m4 not to use signals anymore.
Guillaume Munch [Thu, 2 Jun 2016 21:27:52 +0000 (22:27 +0100)]
Exercise: simplify the definition of IconvProcessor
It is no longer needed to create fake copy constructors and assignment and to
deal with deletion by hand, thanks to unique_ptr, the inference of move
constructor and assignment operator, and the compatibility of standard
containers with movable objects.
Guillaume Munch [Thu, 2 Jun 2016 20:58:52 +0000 (21:58 +0100)]
Replace auto_ptr with unique_ptr
This is a mechanical replacement. For now it seems that unique_ptrs are
essentially used for exception-safety. More could certainly be done to clarify
pointer ownership in general.
The parameter passed to allowDisplayMath will need to be copied, so it
made sense to pass it by value. Since Coverity complains about that,
the code is rewritten to make the copy explicit.
Georg Baum [Tue, 7 Jun 2016 18:33:06 +0000 (20:33 +0200)]
Require a C++11 compiler
As discussed on the list. If no C++11 compiler is found configuration stops
with an error. There are now unneeded parts of boost, the will be removed in
a second commit.
Kornel Benko [Sun, 5 Jun 2016 20:59:13 +0000 (22:59 +0200)]
Cmake build: Set new installation paths
For a suffixed version (with suffix 2.3) and installation dir (/usr/local)
the new paths are:
binary -> /usr/local/bin
system-lib -> /usr/local/share/lyx2.3
fonts -> /usr/local/fonts/truetype/lyx2.3
manuals -> /usr/local/man/man1
locales -> /usr/local/share/locale
tex -> /usr/local/texmf/tex/latex/lyx2.3
Georg Baum [Sat, 4 Jun 2016 17:40:53 +0000 (19:40 +0200)]
Make gen_lfuns.py python3 compatible
Also read files with universal line endings and write files using native line
endings, so the script can also be used on windows without changing the line
endings.
Georg Baum [Sat, 4 Jun 2016 15:33:19 +0000 (17:33 +0200)]
Get rid of pseudo diffs when remerging strings
cmake sorts the input files for lyx_pot.py internally, but autotools use a
shell pattern like *.ui on the command line, so the order may be different
on different machines. It is more robust not to require any sorting from the
caller, so lyx_pot.py sorts now internally.
Georg Baum [Sat, 4 Jun 2016 07:09:33 +0000 (09:09 +0200)]
Work around limited SVG support (bug #9778)
Qt only supports SVG 1.2 tiny, so we prefer to convert on our own if an
explicit converter is defined and the converter cache is used (otherwise
the conversion would be too expensive).
Scott Kostyshak [Wed, 25 May 2016 22:02:26 +0000 (18:02 -0400)]
Output file from (xe|lua)latex is PDF, not DVI
A few parts of our code depend on correctly identifying the output
format of LaTeX commands. One specific bug is that because the
output file was not correctly set, it was not removed after an
error. For example, this commit fixes the following bug:
1. Create a new document that contains "hello\blah" where \blah is
in an ERT box.
2. Compile with PDF (LuaTeX). You'll get an error because of \blah.
3. Close the error dialog.
4. Remove the text "hello" and compile again with PDF (LuaTeX).
The error dialog is shown and the "Show Output Anyway" button is
enabled. If you click it, it shows the previously compiled PDF (with
the text "hello"). With this commit, the button is correctly
disabled (and the output file is deleted).
Georg Baum [Thu, 2 Jun 2016 20:34:28 +0000 (22:34 +0200)]
Export svg in xhtml, not svgz (bug 10160)
LyX did not distinguish compressed and uncompressed svg files previously.
Therefore XHTML export of vector graphics did use svgz images directly, which
is not supported by browsers. If svg and svgz are treated as two formats then
all works fine. This is also consistent with the loadable image formats
reported by qt: It reports both svg and svgz.
The gunzip dependency in converters is not new (it is already used internally),
but the gzip dependency is new, so it might not be available on windows.
This is not important at the moment, since we do not yet need to convert svg
to svgz, I only added the converter for completeness.
Georg Baum [Thu, 2 Jun 2016 20:31:27 +0000 (22:31 +0200)]
Do not duplicate jpg format
Some qt versions report both "jpeg" and "jpg" as loadable file extensions.
In this case the jpg format was added twice previously. This does not happen
anymore with the new code, and it works as well if only "jpg" or only "jpeg"
is reported.
Georg Baum [Tue, 31 May 2016 20:43:09 +0000 (22:43 +0200)]
Force native line endings for .po files
As discussed on the list some time ago. cmake produces .po files already in
native line endings. Only autotools on mingw might produce wrong line endings
now, but I am pretty sure that nobody updates .po files using autotools on mingw.
It is wrong to assume that direction is left-to-right when no indication exist.
Add a new enum with values LtR, RtL and Auto to be used as argument of
the private text() methods. When direction is Auto, let Qt decide how
the string shall be layed out.