]> git.lyx.org Git - lyx.git/log
lyx.git
9 years agocmake: Put check_ExternalTransforms in tests folder
Vincent van Ravesteijn [Wed, 7 Jan 2015 20:13:50 +0000 (21:13 +0100)]
cmake: Put check_ExternalTransforms in tests folder

9 years agoAdjust indentation after ff42fea8.
Enrico Forestieri [Tue, 13 Jan 2015 17:05:31 +0000 (18:05 +0100)]
Adjust indentation after ff42fea8.

9 years agoMore tweaks to C++ compiler detection
Jean-Marc Lasgouttes [Tue, 13 Jan 2015 14:59:30 +0000 (15:59 +0100)]
More tweaks to C++ compiler detection

Now CXXFLAGS is left alone by autoconf: only the user can override it.

Properly set -g and -O options, which were overriden.

Try to put the arguments in a more reasonable ordering.

9 years agoFixup commit ff42fe
Jean-Marc Lasgouttes [Tue, 13 Jan 2015 11:38:55 +0000 (12:38 +0100)]
Fixup commit ff42fe

It looks like bash pattern matching does not work as I think it does. Play safe for now.

9 years agoCleanup autoconf compiler support
Jean-Marc Lasgouttes [Tue, 13 Jan 2015 10:48:07 +0000 (11:48 +0100)]
Cleanup autoconf compiler support

Get rid of some old useless compiler checking code

Do not touch CXXFLAGS and friends, only the AM_* version

Let the gcc-related options for latest known version be the default (assume they will still be fine in future versions)

Try to take clang in account in a better way (to be continued):
 * use proper option for C++11,
 * use -Wno-deprecated-register in this case because Qt has a lot of these
 * define version as being clang for internal testing (there is no real way to get the clang version)

9 years agoConvert layout files to current format
Georg Baum [Sun, 11 Jan 2015 19:25:18 +0000 (20:25 +0100)]
Convert layout files to current format

9 years agoFix preferences panel.
Enrico Forestieri [Sun, 11 Jan 2015 19:09:04 +0000 (20:09 +0100)]
Fix preferences panel.

This commit fixes a thinko in [8bab2338/lyxgit] causing the warning:
QObject::connect: No such slot lyx::frontend::GuiPreferences::slotApplyRC() in ../../../../src/frontends/qt4/GuiPrefs.cpp:3308
QObject::connect:  (sender name:   'applyPB')
QObject::connect:  (receiver name: 'PrefsUi')

9 years agoReplace hardcoded hack with InsetLayout tag
Georg Baum [Sun, 11 Jan 2015 19:00:45 +0000 (20:00 +0100)]
Replace hardcoded hack with InsetLayout tag

9 years agoFix two warnings about conversion from double to int.
Jean-Marc Lasgouttes [Sun, 11 Jan 2015 16:13:36 +0000 (17:13 +0100)]
Fix two warnings about conversion from double to int.

9 years agoAdjust preprocessor guards for Qt5/X11.
Enrico Forestieri [Sun, 11 Jan 2015 18:36:41 +0000 (19:36 +0100)]
Adjust preprocessor guards for Qt5/X11.

This fixes the -geometry command line option and restores the
"Use icons from system's theme" checkbox in the preferences.

There is still code addressing Qt4 and xlib that has to be
audited. This code cannot be compiled with Qt5 because the
default backend is now xcb and not xlib. I have marked such
code with a "FIXME QT5" comment.

9 years agoFix wrong listings preamble encoding (bug #9382)
Georg Baum [Sun, 11 Jan 2015 18:17:51 +0000 (19:17 +0100)]
Fix wrong listings preamble encoding (bug #9382)

The listings package employs some dirty tricks internally, therefore it does
not work with utf8 encoding, but requires fixed width encodings. This version
of the fix uses ugly hardcoding instead of a layout file format change, so it
could be backported if needed.

9 years agoStart qt event loop for commandline usage
Georg Baum [Sun, 11 Jan 2015 13:06:17 +0000 (14:06 +0100)]
Start qt event loop for commandline usage

This is needed since src/support calls lots of qt code, and some parts of it
(e.g. QFileInfo) require a running event loop. This fixes bug #4917 which is
a symptom of the problem.
The fix is to create a QCoreApplication for tex2lyx, lyxclient and LyX running
without GUI. In the future this could be extended, i.e. to split up the
frontend Application class in a GUI and a console class, and having the
console class use LyXConsoleApp in the same way as Application now uses
GuiApplication. If that is done, one could also think of moving
support/ConsoleApplication to frontend/console/ConsoleApplication.

9 years agoFix indentation
Georg Baum [Fri, 9 Jan 2015 21:48:40 +0000 (22:48 +0100)]
Fix indentation

9 years agoaastex.lyx: repair a broken figure float
Uwe Stöhr [Sun, 11 Jan 2015 02:40:31 +0000 (03:40 +0100)]
aastex.lyx: repair a broken figure float

9 years agoFixes to InsetCaption \protect-ion
Jean-Marc Lasgouttes [Tue, 23 Dec 2014 10:58:04 +0000 (11:58 +0100)]
Fixes to InsetCaption \protect-ion

* \caption does not need to be protected in general
* the contents of \caption arguments need to be protected, though.

All styles related to caoption inset have been audited and updated.

The special casing of captions in longtables has been removed, since there is no special case.

Fixes bug: #9177

9 years agoMerge remote-tracking branch 'features/scroll-reloaded'
Jean-Marc Lasgouttes [Sat, 10 Jan 2015 17:00:13 +0000 (18:00 +0100)]
Merge remote-tracking branch 'features/scroll-reloaded'

This implement horizontal scrolling of rows to allow editing insets
(math, tabular...) that are larger then the screen. The scrolling happens
as the cursor moves, in order to make sure that the cursor is always visible.
This effectively closes an 11 years old bug.

This feature is the result of the work of Hashini Senaratne as part of
Google Summer of Code 2013. The code has been cleaned-up for inclusion
and remaining bugs have been fixed.

Fixes bug: #1083.

9 years agoRemove direct calls of exit()
Georg Baum [Fri, 9 Jan 2015 20:43:45 +0000 (21:43 +0100)]
Remove direct calls of exit()

This is a preparation for using QCoreApplication.

9 years agoMove otexstream out of support
Georg Baum [Fri, 9 Jan 2015 20:07:59 +0000 (21:07 +0100)]
Move otexstream out of support

This resolves a dependency of src/support/docstream.cpp on src/TexRow.cpp,
which is the wrong way round. This fixes the linking
src/tests/check_ExternalTransforms with MSVC where the linker is not clever
enough to detect that the whole otexstream class is unused.

9 years agoUpdate references after 706960eba
Georg Baum [Fri, 9 Jan 2015 20:05:42 +0000 (21:05 +0100)]
Update references after 706960eba

The generated output is correct, since the lyx2lyx forward conversion is empty.

9 years agoAdd Question and Question* theorem types (bug #9015)
Juergen Spitzmueller [Fri, 9 Jan 2015 10:24:45 +0000 (11:24 +0100)]
Add Question and Question* theorem types (bug #9015)

File format change.

9 years agoWindows installer: fix problem with installation of babel Packages
Uwe Stöhr [Fri, 9 Jan 2015 01:49:41 +0000 (02:49 +0100)]
Windows installer: fix problem with installation of babel Packages

- the installer now re-synchronize MiKTeX's package database before installing or updating LaTeX-packages. This assures that new packages and renamed packages can automatically be installed when they are missing (fixes bug #9370)
- update the list of LaTeX packages that have to be installed when LyX is installed via the bundle installer for the first time on a PC
- add support for Turkish spell-checking

9 years agoFix biblio regex test
Georg Baum [Thu, 8 Jan 2015 19:46:54 +0000 (20:46 +0100)]
Fix biblio regex test

Now it tests lyx::regex instead of boost::regex, so it works as well if
std::regex is used.

9 years agoremove duplicated include
Georg Baum [Tue, 6 Jan 2015 20:26:45 +0000 (21:26 +0100)]
remove duplicated include

9 years agochkconfig.ltx: remove an entry that was added only for the Win-installer
Uwe Stöhr [Thu, 8 Jan 2015 00:41:34 +0000 (01:41 +0100)]
chkconfig.ltx: remove an entry that was added only for the Win-installer

9 years agoAdd marks to indicate when a row is too large
Jean-Marc Lasgouttes [Sun, 27 Jul 2014 16:55:10 +0000 (18:55 +0200)]
Add marks to indicate when a row is too large

A dotted line is shown on the left or on the right to indicate that a part of the row is not visible.

Add a color code for the scroll indicator

9 years agoFix some display glitches
Jean-Marc Lasgouttes [Sun, 27 Jul 2014 15:30:57 +0000 (17:30 +0200)]
Fix some display glitches

* When doing a redraw with drawing disabled (to set inset positions properly), take horizontal scroll offset in account

* reset horizontal scroll offset when it is smaller than the left margin.

* when drawing a paragraph, do not modify x globally, only for the row that is offset.

9 years agoRemove the special horizontal scrolling support in InsetTabular
Jean-Marc Lasgouttes [Sat, 26 Jul 2014 20:25:48 +0000 (22:25 +0200)]
Remove the special horizontal scrolling support in InsetTabular

It is not necessary anymore now that there is a global mechanism.

Also, fix the clearing of rows in SingleParUpdate mode.

9 years agoFine tune the scroll offset setting code
Jean-Marc Lasgouttes [Sat, 26 Jul 2014 14:25:56 +0000 (16:25 +0200)]
Fine tune the scroll offset setting code

The new code should feel a bit more natural. It avoids explicit pixel values for the margins and does not scroll in some cases where it is not necessary.

9 years agoKeyboard based horizontal scrolling for wide insets
Hashini Senaratne [Sat, 26 Jul 2014 11:17:28 +0000 (13:17 +0200)]
Keyboard based horizontal scrolling for wide insets

[This commit is the output of the "horizontal scrolling" GSoC 2013
 project, by Hashini Senaratne. The code has been cleaned up, some
 variables have been renamed and moved from the Cursor class to
 BufferView::Private. This is the base from which I (jmarc) will polish
 the feature for landing on master.

 Below is the original commit log of Hashini, updated to reflect the
 changes that have been done.]

This feature also applicable for other insets; graphics and labels.

This implementation is capable of scrolling a single row when reaching
its content which is beyond the screen limits, using left and right
arrow keys.

The attribute 'horiz_scroll_offset_' introduced in the
BufferView::Private class plays a main role in horizontal scrolling of
the wide rows that grow beyond the screen limits. This attribute
represents by how much pixels the current row that the text cursor
lies in should be get scrolled.

The main logic that is responsible for drawing the scrolled rows is
within the BufferView class, BufferView::checkCursorScrollOffset.

 * The main logic is called via BufferView::draw.

 * What this does is set the horiz_scroll_offset_ attribute in in order to
 show the position that the text cursor lies in.

 * To make sure that BufferView::draw gets involved when Update flag is
 FitCursor, necessary changes are made in BufferView::processUpdateFlags.

Basically what the logic that used to set the horiz_scroll_offset_
does is,

 * The row which the text cursor lies in is identified by a
 CursorSlice that points to the beginning of the row. This is the
 'rowSlice' variable used in BufferView::checkCursorScrollOffset. Acessors
 are added to obtain this variable. Here row objects were not used to
 identify the current row, because it appears that row objects can
 disappear when doing a decoration update for example. This means that
 comparing row pointers is not a good idea, because they can change
 without notice.

 * Stop calculations of horiz_scroll_offset_ variable, if metrics have not been
 computed yet. Otherwise the calls to TextMetrics::parMetrics, calls
 redoParagraph and may change the row heigths. Therefore vertical scrolling
 feature may get disturbed. This is avoided.

 * Using BufferView::::setCurrentRowSlice resets horiz_scroll_offset_
 when changing cursor row. This is done in order to prevent unwanted
 scrolling that happens when changing the selected row using up and
 down arrow keys.

 * Recompute inset positions before checking scoll offset of the row, by
 painting the row insets with drawing disabled. This is done because the
 position of insets is computed within the drawing procedure.

 * Current x position of the text cursor is compared with the
 horiz_scroll_offset_ value and the other variables like row.width(),
 bv.workWidth(). Compute the new horiz_scroll_offset_ value in order
 to show where the text cursor lies in. The basics conditions that we
 check before recomputing it are, if the text cursor lies rightward to
 the current right screen boundary, if the text cursor lies leftward
 to the current left screen boundary, if the text cursor lies within
 screen boundaries but the length of the row is less than the left
 boundary of the screen (this happens when we delete some content of
 the row using delete key or backspace key).

 * Change update strategy when scrooll offset has changed. This allows to
 redraw the row when no drawing was scheduled. By doing so, it was
 possible to redraw a wide row when moving to the leftmost position of the
 wide row, from the leftmost position of the row below, using the left
 arrow key.

In TextMetrics::drawParagraph it is checked whether the current row is
what is drawing now. If it is so, the value used to the x value of the row
for drawing is adapted according to BufferView::horizScrollOffset.

The method used to pass boundary() was fixed to get row when cursor was in
a nested inset. This matter is considered in Cursor::textRow and it is
modified accordingly.

GuiWorkArea::Private::showCursor() is modified to show the cursor position
in a scrolled row.

9 years agoTurn a double variable into an int.
Jean-Marc Lasgouttes [Wed, 7 Jan 2015 21:38:48 +0000 (22:38 +0100)]
Turn a double variable into an int.

This is a better fix than 0ad9d46068, and was just as simple.

9 years agoFix some warnings
Jean-Marc Lasgouttes [Wed, 7 Jan 2015 20:27:53 +0000 (21:27 +0100)]
Fix some warnings

9 years agostd:regex cleanup for cmake
Kornel Benko [Wed, 7 Jan 2015 08:01:25 +0000 (09:01 +0100)]
std:regex cleanup for cmake

Do not use system boost regex lib when not needed.

9 years agoInsetTabular.cpp: Remove commented code without a comment
Vincent van Ravesteijn [Tue, 6 Jan 2015 18:35:41 +0000 (19:35 +0100)]
InsetTabular.cpp: Remove commented code without a comment

This was a leftover of [b2246c4e/lyxgit].

9 years agostr_metrics: Prevent clipping of chars with negative bearing
Vincent van Ravesteijn [Tue, 6 Jan 2015 17:48:19 +0000 (18:48 +0100)]
str_metrics: Prevent clipping of chars with negative bearing

This happens when part of the word is selected.

To reproduce:
1. Start a new document
2. Type "af"
3. Select 'a'
4. Observe that the right part of the 'f' is clipped away.

This patch uses QRegion to set a clip region that is everything except
the part that is drawn in another color.

Fixes: #9223.
9 years agoFix autotools config for gcc < 4.9
Georg Baum [Tue, 6 Jan 2015 18:48:27 +0000 (19:48 +0100)]
Fix autotools config for gcc < 4.9

Since LYX_USE_STD_REGEX is used in Makefile.am, it must always be defined, not
only if C++11 support is enabled.

9 years agoMove global variable to preamble
Georg Baum [Tue, 6 Jan 2015 18:20:05 +0000 (19:20 +0100)]
Move global variable to preamble

This will be needed in the future, when I need to parse the preamble twice
for detecting japanese encoding (bug #8218).

9 years agoCleanup support for std::regex with autotools
Jean-Marc Lasgouttes [Tue, 6 Jan 2015 12:53:18 +0000 (13:53 +0100)]
Cleanup support for std::regex with autotools

Do not link against system boost regex lib or build included boost regex when not needed.

9 years agoAdjust autotools default configure options for Qt5.
Enrico Forestieri [Sun, 4 Jan 2015 17:07:11 +0000 (18:07 +0100)]
Adjust autotools default configure options for Qt5.

* Disable concept-checks unless explicitly required (errors out with Qt5).
* Add -fPIC to CPPFLAGS for elf targets (required with Qt5).

9 years agoupdate sk.po
Kornel Benko [Sun, 4 Jan 2015 10:53:46 +0000 (11:53 +0100)]
update sk.po

9 years agode.po
Juergen Spitzmueller [Sun, 4 Jan 2015 10:01:42 +0000 (11:01 +0100)]
de.po

9 years agoSome casing fixes
Juergen Spitzmueller [Sun, 4 Jan 2015 09:53:36 +0000 (10:53 +0100)]
Some casing fixes

English UI uses Title Casing for headers and sentence casing for normal widgets

9 years agoFix aspectratio UI
Juergen Spitzmueller [Sun, 4 Jan 2015 09:05:42 +0000 (10:05 +0100)]
Fix aspectratio UI

Fixes: #9357
9 years agoFix parsing of verbatim options (bug #9113)
Georg Baum [Sat, 3 Jan 2015 19:45:06 +0000 (20:45 +0100)]
Fix parsing of verbatim options (bug #9113)

Parser::verbatimOption() did swallow backslashes previously. The similar code
in Parser::verbatim_item() was already correct.

9 years agoParse subcaption.sty commands correctly (bug #8690)
Georg Baum [Sat, 3 Jan 2015 19:23:02 +0000 (20:23 +0100)]
Parse subcaption.sty commands correctly (bug #8690)

9 years agoAdjust subfigure and subcaption options
Georg Baum [Sat, 3 Jan 2015 17:43:01 +0000 (18:43 +0100)]
Adjust subfigure and subcaption options

9 years agoCleanup of outliner moving code.
Richard Heck [Sat, 3 Jan 2015 16:33:11 +0000 (11:33 -0500)]
Cleanup of outliner moving code.

9 years agoFix typo.
Enrico Forestieri [Thu, 1 Jan 2015 18:37:46 +0000 (19:37 +0100)]
Fix typo.

9 years agoUpdate it.po
Enrico Forestieri [Thu, 1 Jan 2015 18:34:07 +0000 (19:34 +0100)]
Update it.po

9 years agoFix configuring for Qt5 with autotools on non-Mac platforms.
Enrico Forestieri [Thu, 1 Jan 2015 17:44:01 +0000 (18:44 +0100)]
Fix configuring for Qt5 with autotools on non-Mac platforms.

9 years agoParse tikzpicture env. correctly (bug #9011)
Georg Baum [Tue, 30 Dec 2014 17:49:11 +0000 (18:49 +0100)]
Parse tikzpicture env. correctly (bug #9011)

9 years agoParse post command argument insets (bug #8473)
Georg Baum [Tue, 30 Dec 2014 17:37:08 +0000 (18:37 +0100)]
Parse post command argument insets (bug #8473)

This is now very easy with the new InsetArgument infrastructure.

9 years agoHandle \textgreek commands from unicodesymbols
Georg Baum [Tue, 30 Dec 2014 17:12:35 +0000 (18:12 +0100)]
Handle \textgreek commands from unicodesymbols

This is the second part of bug #8553: The symbols defined in unicodesymbols
are now detected correctly and converted to unicode, so no ERT anymore.

9 years agoFix misparsing of \textgreek without polyglossia
Georg Baum [Tue, 30 Dec 2014 16:44:08 +0000 (17:44 +0100)]
Fix misparsing of \textgreek without polyglossia

This is the first part of bug #8553. \textgreek was interpreted as the
polyglossia version even if polyglossia was not used. Now it is not recognized
at all and converted to ERT, but this ensures at least correct LaTeX output.

9 years agoMake macro xhtml export more secure
Georg Baum [Tue, 30 Dec 2014 12:30:40 +0000 (13:30 +0100)]
Make macro xhtml export more secure

Actually I wanted to do that in cc87f8100 but forgot to adjust the original
solution completely. Now we do not search for an arbitrary latexkeys instance
which just happens to have the same name as the macro, but we only use the
symbol that was explicitly set for global macros.

9 years agotex2lyx: Run configure.py if needed (bug #8539)
Georg Baum [Mon, 29 Dec 2014 22:46:25 +0000 (23:46 +0100)]
tex2lyx: Run configure.py if needed (bug #8539)

Since tex2lyx reads some LyX config files it needs to run configure.py if
they do not exist or are out of date.

9 years agoHandle unknown table column specifiers (bug #9311)
Georg Baum [Mon, 29 Dec 2014 21:54:06 +0000 (22:54 +0100)]
Handle unknown table column specifiers (bug #9311)

Previously tex2lyx did ignore table columns if the column specifier was
unknown. This can lead to data loss, and now it does not ignore these columns,
but assumes that the column specifiers use only once character. This can still
lead to data loss, but less often.

9 years agoWrite fixed encoding to LyX file (bug #9178)
Georg Baum [Mon, 29 Dec 2014 21:29:20 +0000 (22:29 +0100)]
Write fixed encoding to LyX file (bug #9178)

If the user gave the -fixednec argument to tex2lyx then set that encoding as
LaTeX input encoding in the generated LyX file. Otherwise, included .bib files
could be interpreted using a wrong encoding.

9 years agoUse new argument inset code for environments
Georg Baum [Mon, 29 Dec 2014 21:06:29 +0000 (22:06 +0100)]
Use new argument inset code for environments

This removes another instance of the limitation solved by file format 446:
The order of optional and required arguments is not fixed anymore.

9 years agoSkip missing optional argument insets in tex2lyx
Georg Baum [Mon, 29 Dec 2014 20:54:15 +0000 (21:54 +0100)]
Skip missing optional argument insets in tex2lyx

Optional arguments are optional, so if one is missing, do not stop the parsing,
but continue with the next argument (it might be a required one).

9 years agoStore ASCII data in std::string
Georg Baum [Mon, 29 Dec 2014 20:46:30 +0000 (21:46 +0100)]
Store ASCII data in std::string

Math inset names and LaTeX requirements are always ASCII. This avoids some
conversions and makes math requirements more similar to text requirements.

9 years agoFix html export of \ne (second part of bug #9372)
Georg Baum [Mon, 29 Dec 2014 20:13:42 +0000 (21:13 +0100)]
Fix html export of \ne (second part of bug #9372)

The fix consists of two parts: The needed infrastructure to assign HTML
entities to global math macros, and the actual fix for \ne and \neq.

9 years agoAdd icon library to link target - needed on Mac OS X - thanks Kornel
Stephan Witt [Mon, 29 Dec 2014 10:33:47 +0000 (11:33 +0100)]
Add icon library to link target - needed on Mac OS X - thanks Kornel

9 years agowhitespace again
Stephan Witt [Mon, 29 Dec 2014 00:28:24 +0000 (01:28 +0100)]
whitespace again

9 years ago#9323 add check for Qt5MacExtras to use it on Mac with --enable-qt5
Stephan Witt [Sun, 28 Dec 2014 23:18:40 +0000 (00:18 +0100)]
#9323 add check for Qt5MacExtras to use it on Mac with --enable-qt5

9 years agowhitespace
Stephan Witt [Sun, 28 Dec 2014 23:12:33 +0000 (00:12 +0100)]
whitespace

9 years agoFix HTML output of \gg and \ll
Georg Baum [Sun, 28 Dec 2014 17:54:19 +0000 (18:54 +0100)]
Fix HTML output of \gg and \ll

This is a part of bug #9372. The remaining part (\ne) is not easy to fix,
since \ne is a predefined macro internally, so the HTML output is done for
the expanded macro, and we have no machinery to assign a HTML output to a
complete macro.

9 years agoUse std::regex if possible
Georg Baum [Sun, 28 Dec 2014 17:08:18 +0000 (18:08 +0100)]
Use std::regex if possible

It works with gcc >= 4.9.0 and clang (with libc++ or gcc libstdc++ from gcc
>= 4.9.0). The MSVC parg is missing, because I cannot test it, and the
autotools build still link against boost::regex even if it is not needed, but
I don't know how to fix that.

9 years agoGet rid of regex_constants::match_partial
Georg Baum [Sun, 28 Dec 2014 16:46:33 +0000 (17:46 +0100)]
Get rid of regex_constants::match_partial

As shown by the unit test this is not needed at all, even not for really
awkward input.

9 years agoTest invalid sanitizeLatexOption() input as well
Georg Baum [Sun, 28 Dec 2014 16:34:46 +0000 (17:34 +0100)]
Test invalid sanitizeLatexOption() input as well

9 years agoUse typedef for std::basic_string in trivstring
Georg Baum [Sun, 28 Dec 2014 16:06:34 +0000 (17:06 +0100)]
Use typedef for std::basic_string in trivstring

This fixes compilation for llvm-gcc-4.2 on OS X and makes the code a bit more
readable.

9 years agoAdd ExternalTransforms test also to cmake build
Kornel Benko [Sun, 28 Dec 2014 13:20:17 +0000 (14:20 +0100)]
Add ExternalTransforms test also to cmake build

9 years agoAdd unit test for sanitizeLatexOption()
Georg Baum [Sun, 28 Dec 2014 12:23:35 +0000 (13:23 +0100)]
Add unit test for sanitizeLatexOption()

This is a prerequisite for safe removal of regex::match_partial.

9 years agoRemove duplicated CMakeLists.txt from EXTRA_DIST
Georg Baum [Sun, 28 Dec 2014 12:20:20 +0000 (13:20 +0100)]
Remove duplicated CMakeLists.txt from EXTRA_DIST

9 years agoAdd forgotten test to distribution
Georg Baum [Sun, 28 Dec 2014 11:53:18 +0000 (12:53 +0100)]
Add forgotten test to distribution

9 years agoReduce caption hardcoding
Georg Baum [Sat, 27 Dec 2014 17:15:07 +0000 (18:15 +0100)]
Reduce caption hardcoding

Now we can handle all types of captions defined in layout files or modules.
This does also mean that \captionabove and \captionbelow are only recognized
in KOMA-classes and not always anymore, but this is correct, since these
captions would not work in other document classes anyway.

9 years agoRevert e01886327d
Georg Baum [Sat, 27 Dec 2014 16:03:39 +0000 (17:03 +0100)]
Revert e01886327d

Sorry, this was nonsense.

9 years agoOutput caption insets collapsed
Georg Baum [Sat, 27 Dec 2014 15:10:11 +0000 (16:10 +0100)]
Output caption insets collapsed

Like all other collapsable insets, there is not reason to treat captions
specially.

9 years agoRemove InsetArgument 999 workaround
Georg Baum [Fri, 26 Dec 2014 21:13:09 +0000 (22:13 +0100)]
Remove InsetArgument 999 workaround

Since we iterate through all arguments we can as well compute the correct id
directly.

9 years agowhitespace
Georg Baum [Fri, 26 Dec 2014 21:08:07 +0000 (22:08 +0100)]
whitespace

9 years agoParse starred InsetLayout correctly
Georg Baum [Fri, 26 Dec 2014 20:01:08 +0000 (21:01 +0100)]
Parse starred InsetLayout correctly

Previously, an InsetLayout was not found if the LaTeX name was starred, e.g.
for "\caption*".

9 years agoMove cjk check out of the loop
Georg Baum [Fri, 26 Dec 2014 19:44:29 +0000 (20:44 +0100)]
Move cjk check out of the loop

According to the indentation this was probably a merge error, and the check is
only needed once.

9 years agoDo not compile trivstring.cpp if not needed
Georg Baum [Fri, 26 Dec 2014 19:09:58 +0000 (20:09 +0100)]
Do not compile trivstring.cpp if not needed

This avoids a MSVC warning.

9 years agoAdjust tex2lyx InsetArgument to format 446
Georg Baum [Fri, 26 Dec 2014 19:08:37 +0000 (20:08 +0100)]
Adjust tex2lyx InsetArgument to format 446

tex2lyx does now allow mixed order of required and optional arguments.

9 years agoFix building with cmake on cygwin.
Enrico Forestieri [Fri, 26 Dec 2014 16:00:23 +0000 (17:00 +0100)]
Fix building with cmake on cygwin.

Add required libraries for the link stage.

9 years agoFix bug #9217: [Qt5] QWindowsMime class not available
Enrico Forestieri [Fri, 26 Dec 2014 15:53:31 +0000 (16:53 +0100)]
Fix bug #9217: [Qt5] QWindowsMime class not available

The support for QWindowsMime has been reintroduced in Qt 5.4.0.
The class name has been changed to QWinMime but the interface
is exactly the same.

9 years agoAdd tex2lyx test for KOMA-Script classes
Georg Baum [Tue, 23 Dec 2014 21:33:32 +0000 (22:33 +0100)]
Add tex2lyx test for KOMA-Script classes

In the future this test case should contain all KOMA-Script features.
Currently, it tests just \captionabove anmd \captionbelow.

9 years agoGet rid of tr1 support
Georg Baum [Tue, 23 Dec 2014 21:18:08 +0000 (22:18 +0100)]
Get rid of tr1 support

As discussed on the list. We don't need it anymore, either we have a modern
compiler that supports C++11, or we fall back to boost. I kept and adjusted
the regex #define, since we cannot use std regex completely yet.

9 years agoDrop runtime support for OS X 10.5 NSSpellChecker
Stephan Witt [Tue, 23 Dec 2014 17:19:27 +0000 (18:19 +0100)]
Drop runtime support for OS X 10.5 NSSpellChecker

9 years agoRevert parts of 7e69ac220dd
Georg Baum [Mon, 22 Dec 2014 20:32:45 +0000 (21:32 +0100)]
Revert parts of 7e69ac220dd

This fixes the tex2lyx test test-refstyle-theorems.tex. It seems that the
intent of the fix was to remove a \protect in front of a \caption,
\captionabove or \captionbelow, but the implementation did not really do that.
Furthermore, it is not clear in which cases a \protect in front of a caption
needs to removed, and in which cases it needs to be kept: After looking at the
LyX sources I could not see that caprions are always output with \protect.

9 years agoReduce use of double variables in Row
Jean-Marc Lasgouttes [Mon, 22 Dec 2014 09:36:53 +0000 (10:36 +0100)]
Reduce use of double variables in Row

All the code that is run before row metrics have been computed should use int arithmetic. After metrics have been computed, we still need doubles because fully justified rows use double for Row::Element::extra.

Rename Row::x to Row::left_margin and change its type to int.

Rename Row::Element::width() to full_width(). In some places of the code, use dim.wid (the int version without the extra separator) because metrics have not been computed.

Let Row::Element::x2pos take a int& argument instead of double&

Let Row::Element::breakAt take a int argument instead of double

9 years agoFix the last clang warnings about overloaded virtual methods
Jean-Marc Lasgouttes [Fri, 19 Dec 2014 10:35:37 +0000 (11:35 +0100)]
Fix the last clang warnings about overloaded virtual methods

This patch fixes a series of warnings like:
{{{
In file included from ../../master/src/mathed/InsetMathBoldSymbol.cpp:13:
In file included from ../../master/src/mathed/InsetMathBoldSymbol.h:15:
../../master/src/mathed/InsetMathNest.h:37:7: warning: 'lyx::InsetMathNest::metrics' hides overloaded virtual function [-Woverloaded-virtual]
        void metrics(MetricsInfo const & mi) const;
             ^
../../master/src/insets/Inset.h:186:15: note: hidden overloaded virtual function 'lyx::Inset::metrics' declared here: different number of parameters
      (2 vs 1)
        virtual void metrics(MetricsInfo & mi, Dimension & dim) const = 0;
                     ^
}}}
For a description of the problem, see for example:
http://stackoverflow.com/questions/18515183/c-overloaded-virtual-function-warning-by-clang

3 different strategies have been used:
 * in frontend, some functions have been renamed.
 * in InsetMath.h, Inset::write has been explicitly imported too
 * in InsetMathNest.h, since a comment said that hiding Inset::metrics is intended, a special trick has bee used to silence the warning.

9 years agoWhitespace
Scott Kostyshak [Mon, 22 Dec 2014 00:01:26 +0000 (19:01 -0500)]
Whitespace

9 years agoMake Converter class thread-safe
Georg Baum [Sun, 21 Dec 2014 21:05:15 +0000 (22:05 +0100)]
Make Converter class thread-safe

Again, this is used in a global list shared by all threads

9 years agoMake Format class almost thread-safe
Georg Baum [Sun, 21 Dec 2014 20:40:25 +0000 (21:40 +0100)]
Make Format class almost thread-safe

This is needed since all formats are stored in a global list which is shared
between threads, but never modfified except from the main thread.
The only missing bit is extension_list_, which is not so easy to do.

9 years agoImprove C++11 support
Georg Baum [Sun, 21 Dec 2014 19:19:12 +0000 (20:19 +0100)]
Improve C++11 support

If we compile in C++11 mode, do not use the boost replacements for bind,
functional and shared_ptr. regex is excluded, since it misses match_partial, and
gcc does not provide a usable one in versions less than 4.9.0.
I also removed the #define for match_partial, since this is dangerous. Now you
get a compile error instead of subtle runtime differences.

9 years agoDo not warn about changed modules when changing modules.
Juergen Spitzmueller [Sun, 21 Dec 2014 18:08:41 +0000 (19:08 +0100)]
Do not warn about changed modules when changing modules.

Part of #9356
Also fixes #9365

9 years agoAdd missing using declarations
Georg Baum [Sun, 21 Dec 2014 18:05:00 +0000 (19:05 +0100)]
Add missing using declarations

This fixes using std::tr1::regex for non-MSVC compilers.

9 years agoDo not use tr1 with libc++
Georg Baum [Sun, 21 Dec 2014 17:22:33 +0000 (18:22 +0100)]
Do not use tr1 with libc++

clang defines __GNUC__ but libc++ does not have tr1, so we either need to use
boost, or std and compile in c++11 mode.

9 years ago::readlink() needs unistd.h
Georg Baum [Sun, 21 Dec 2014 17:13:33 +0000 (18:13 +0100)]
::readlink() needs unistd.h

this is included in some gcc headers, but not in c++11 mode, that is the
reason why we did not get a compile error so far.

9 years agoImprove llvm libc++ detection
Georg Baum [Sun, 21 Dec 2014 16:23:56 +0000 (17:23 +0100)]
Improve llvm libc++ detection

The old detection did only work if CFLAGS contained -std=c++11, since ciso646
was only included for __cplusplus > 199711.
Thanks to Koernel for the cmake part.