Commit Graph

35603 Commits

Author SHA1 Message Date
Guillaume Munch
0e3c8ba627 Fix computation of scroll value 2016-06-13 08:46:15 +01:00
Guillaume Munch
d2d243d77f Simplify the TexRow information for mathed output
Replace the manual manipulation of a stack of RowEntries with a Changer
function. When I introduced the stack of RowEntries, I did not know about the
Changer mechanism.
2016-06-13 08:46:15 +01:00
Guillaume Munch
348e0241af Do not include MetricsInfo.h in MathStream.h
Fixes the FIXME in MathStream.h
2016-06-13 08:46:15 +01:00
Guillaume Munch
760bca8265 Change tracking cue: paint over labels in text and prepare for further work
* Inset::canTrackChange() had two meanings: can it deal with change tracking?
  Will it paint its own CT status? The latter information is now given by
  Inset::canPaintChange().

* Line thickness computation is moved from RowPainter to MetricsBase.

* Painting function for Changes moved to lyx::Change. (One new, that strikes
  diagonally.)
2016-06-13 08:46:15 +01:00
Guillaume Munch
e2bc7ffae3 RefChanger
RefChanger temporarily assigns a value to a non-const reference of any
kind. RefChanger provides a flexible and uniform generalisation of the various
scope guards previously derived from the old Changer class in MetricsInfo.h.

As before, a temporary assignment lasts as long as the Changer object lives. But
the new Changer is movable. In particular, contorsions are no longer needed to
change a private field. Special code can be moved into the appropriate classes,
and it is no longer necessary to create a new class for each specific use.

Syntax change:

   FontSetChanger dummy(mi.base, value);
-> Changer dummy = mi.base.changeFontSet(value);

New function for generating arbitrary Changers:

  Changer dummy = make_change(ref, val, condition);

Bugfix:

* Fix the display of \displaystyle{\substack{\frac{xyz}{}}} (missing style
  change).
2016-06-13 08:46:15 +01:00
Guillaume Munch
0be52d3710 ShortcutOverride again
Re: fix for #9218 (not #10119)

Now it matches the example given in the docs. This time tested on qt4.
2016-06-13 08:46:15 +01:00
Pavel Sanda
8e3a890b2a * Math.lyx put last changes under CT. 2016-06-12 19:00:06 -07:00
Georg Baum
166420d02c Make lyx2lyx infrastructure python3 ready
The LyX class works now with python 3. Certain file format conversions may
still fail (convert_multiencoding() is a hot candidate), but this will need
to be fixed in the individual modules.
2016-06-12 21:21:15 +02:00
Guillaume Munch
881b7ec673 Remove that pesky broken window that pops up with Qt5 when saving preferences
It turns out this show event is not necessary (tested with Qt4.8 and Qt5)
2016-06-12 19:17:33 +01:00
Guillaume Munch
89175ee0f1 Add perf comment 2016-06-12 19:17:33 +01:00
Guillaume Munch
aedc6720c7 Toc: clean-up 2016-06-12 19:17:33 +01:00
Guillaume Munch
6144bbfbf8 Replace foreach with for
C++11 allows foreach-style iterations with the following syntax:

for (auto & element : container) {
 ...
}
2016-06-12 19:17:33 +01:00
Guillaume Munch
32ff5f0f30 climits
It's as you prefer, Jean-Marc.
2016-06-12 19:17:33 +01:00
Guillaume Munch
36099dce44 rewrite 51a15c45
Poor wording
2016-06-12 19:17:33 +01:00
Kornel Benko
2da1c956e4 Cmake build: Check for make_unique and PATH_MAX symbols added. 2016-06-12 19:56:31 +02:00
Stephan Witt
a80e0cacb9 Use iostream instead of sstream and move it from header to cpp-source of LyX-Server 2016-06-12 13:03:06 +02:00
Richard Heck
fa190691a8 When we use InPremable styles, we want to write as many versions
to the premable as the user enters.
2016-06-12 00:58:33 -04:00
Richard Heck
e622f82521 Add comments to fix coverity #23505 and 23507. 2016-06-12 00:35:49 -04:00
Richard Heck
4152c68c66 Add comment to fix coverity #111935. 2016-06-12 00:31:33 -04:00
Richard Heck
a48adfa6d6 Fix coverity issue #127197.
We may fail to get a buffer when we request one.
2016-06-12 00:26:38 -04:00
Richard Heck
f19d650752 Add comment about coverity #102061. 2016-06-12 00:22:09 -04:00
Richard Heck
7b15ea393f Add a check to please coverity.
Fixes #23496.
2016-06-12 00:12:03 -04:00
Richard Heck
6675601147 Fix a number of other uninitialized members.
Fixes coverity #23392, 23394, 23397, 23403, 23414, 23424,
23448, 23477.
2016-06-11 23:59:55 -04:00
Richard Heck
ae676958d9 Add comment to fix coverity #23438. 2016-06-11 23:57:15 -04:00
Richard Heck
d29732e138 Initialize a bunch of uninitialized members. It does not seem to
matter what they are initialized to. Fixes coverity #23391.
2016-06-11 23:39:43 -04:00
Richard Heck
1bd5ef9a75 Add some comments to fix coverity #23386. 2016-06-11 23:26:02 -04:00
Richard Heck
3703a0235c False positive on coverity #23366. 2016-06-11 23:13:01 -04:00
Richard Heck
7aa6f972da Add a LATTEST, just in case this ever causes a problem.
Fixes coverity #23363.
2016-06-11 23:09:30 -04:00
Richard Heck
df022f91b4 Check to make sure we have a preview loader.
Fixes coverity #23353.
2016-06-11 23:09:30 -04:00
Richard Heck
a637efca6e Add comment fixing coverity #23351. 2016-06-11 23:09:30 -04:00
Richard Heck
9d49f09bcf Add comment about coverity #23335. 2016-06-11 23:09:30 -04:00
Richard Heck
fd42194c7e Add comment to fix coverity #23308 2016-06-11 23:09:30 -04:00
Richard Heck
2cb6ed9376 Make sure we have a buffer in VC_COMPARE.
Fixes coverity #23304.
2016-06-11 23:09:30 -04:00
Richard Heck
edefef17b5 Add comment for coverity, fixing #23307. 2016-06-11 23:09:30 -04:00
Richard Heck
355395174b Mark a number of coverity false positives.
Fixes coverity #23284, 23285, 23286, 23287, 23289.
2016-06-11 23:09:30 -04:00
Scott Kostyshak
2db62cf5d5 Add a comment and FIXME that lualatex can make DVI
The command 'lualatex' can produce a DVI with the option
--output-format=dvi
It is best to keep things as is because it is better to guess a PDF
than to guess a DVI (we do not use that feature of the 'lualatex'
command internally; we use 'dvilualatex' instead). However, we
should ideally get this information in a more robust way.

Thanks to Günter for pointing this out.
2016-06-11 17:05:28 -04:00
Pavel Sanda
67e45aa36c * Math.lyx : add few maxima examples to ch. 23.1. 2016-06-11 11:27:49 -07:00
Georg Baum
72c6602b13 Improve comments and add missing decoding call
We do already fill the first line of the body in the first pass, so the body
has to be converted to the correct encoding as well.
2016-06-11 14:46:48 +02:00
Günter Milde
b170b6e40f fix #10199 Non-encodable characters with XeTeX and utf8-plain
XeTeX with TeX fonts is only safe with ASCII input encoding (see #9740)
and we therefore force "ascii" when exporting with XeTeX and 8-bit TeX-fonts.

However, "utf8-plain" is a "power-user" option, which allows to switch off LyX's 
encoding of the LaTeX file: 
keep this also for "XeTeX with TeX fonts".

The user is responsible to ensure all characters can be processed and are 
correctly shown in the output. The provided test sample shows the problems
with this encoding without special measures (like loading fontspec in the
user-preamble or a document class).
2016-06-11 13:57:24 +02:00
Kornel Benko
48bad4b581 Cmake build: Correct wrong comment 2016-06-11 12:44:15 +02:00
Kornel Benko
24a7dd45dc Cmake build: Determine availability of 'std::regex' if using clang compiler 2016-06-11 12:23:33 +02:00
Georg Baum
9558d863c8 Some python 3 fixes for lyx2lyx
These were found by 2to3 and later adapted to use the compatibility code
which was already used in some parts of lyx2lyx, e.g. lyx_1_5.py.
2016-06-11 11:06:11 +02:00
Georg Baum
20a00903b1 Fix linking with std::regex and included boost 2016-06-11 10:10:20 +02:00
Stephan Witt
e8b15b5f0c Add missing includes after change to boost signals2 2016-06-11 09:56:35 +02:00
Georg Baum
d67a8cb212 Do not try to build an empty boost lib
This should fix a build failure on OS X:
Making all in boost
  AR       liblyxboost.a
  ar: no archive members specified
2016-06-11 09:28:11 +02:00
Georg Baum
cf1e08f7f7 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.
2016-06-11 09:20:16 +02:00
Georg Baum
7293fc7b66 Get rid of boost signals in multithreading test
Test for regex instead since this is the only boost library we are linking against.
2016-06-11 09:04:50 +02:00
Richard Heck
bb5c760b37 Fix silly error outputting math sizes. Fixes bug #10129. 2016-06-11 00:49:21 -04:00
Guillaume Munch
ab41c1d1ac Fix bug #10119
This makes Qt 5.4 as usable as Qt 5.5.1 in my experience. Otherwise, fix again
INSTALL.
2016-06-11 05:42:43 +01:00
Guillaume Munch
51a15c4569 Clarify Qt requirements for 2.3
As discussed on the list. If the needs to drop Qt 4.8 arises, then this should
be discussed again.
2016-06-11 05:25:34 +01:00