Commit Graph

23348 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
1d4d07b66e When selecting special logos, set their color correctly
Adapted from 860accd01f.
2016-10-26 11:19:49 +02:00
Enrico Forestieri
4ad8be330e Show on screen font changes for text-in-math 2016-10-25 20:24:26 +02:00
Günter Milde
ded70f24f6 Fix #10394 Do not error on missing characters in "nullfont".
Add an exception to the conversion of "missing character" warnings into errors.

The PGF package deliberately uses the dummy font "nullfont" to suppress output.
Therefore, warnings about missing characters in "nullfont" are really only warnings.

Also updated the comment: "Missing character" warnigns are especially widespread
in XeTeX/LuaTeX but can also happen with "classical" 8-bit TeX.

Feel free to port this to branch.
2016-10-23 17:16:26 +02:00
Juergen Spitzmueller
5b2f5d056a Amend 2c4673af58
Also consider xrefs in crossref'ed entries.
2016-10-23 08:12:34 +02:00
Juergen Spitzmueller
95f7545823 Improve info display for biblatex databases, part III
When resolving biblatex's xdata references, consider that xdata fields
can contain a comma-separated list of keys, not just a single key like
crossref.
2016-10-23 08:11:53 +02:00
Juergen Spitzmueller
0f21c5caf6 Regex fix for endyear
As of biblatex 3.5, years and endyears can be negative (BCE).
2016-10-23 08:11:30 +02:00
Juergen Spitzmueller
a887eb6300 Improve info display for biblatex databases, part II
In addition to the classic crossref, biblatex introduces xdata
references in order to source-out common data of entries. Entries
that have "xdata = {somekey}" just inherit all fields from the
respective @xdata entry, if the field is not already defined in
the entry itself (just like crossref, with the exception that @xdata
entries themselves are _never_ output on their own). @xdata entries can
themselves inherit to other @xdata entries (ad infinitum). So you can,
for instance, setup an xdata entry for a book series with series name
that inherits an xdata entry with information of the publisher
(publisher, address). Any book of that series would just need to refer
to the series xdata and add the number.

BiblioInfo now checks, in addition to crossrefs, for such xdata
references and inherits missing fields.

Nte that biblatex also introduces an "xref" field as an alternative to
crossref. We must not care about that, since the point of xref is that
it does not inherit fields from the target (just cites that one if a
given number of refs to it exist)
2016-10-23 08:11:14 +02:00
Juergen Spitzmueller
e7e0472742 Improve info display for biblatex databases
If an entry does not have a year field, check for a date field
(the common type in biblatex databases) and extract the year(s).

Candidate for branch.
2016-10-23 08:10:37 +02:00
Guillaume Munch
5e447d133e Better error message when try to bind a Hidden LFUN
(cherry picked from commit 1f2d7f4db9)
2016-10-22 20:07:42 +02:00
Guillaume Munch
bf588abfbd Prioritize the shortcuts from the work areas
* Fix bug #10261 : KDE smartly adds conflicting accelerators.

* Prevent bugs like #9495 in the future.

Issues (non-regression):

* It does not appear possible to prevent Ubuntu's Unity from grabbing the
  accelerators for the menus. For instance Alt+A still opens _Affichage in the
  French localization.

(cherry picked from commit eb8c5905f6)
2016-10-22 20:07:42 +02:00
Guillaume Munch
a36706c3ff Better title for ViewSource
The title is changed to "LaTeX (pdflatex) Preview", etc. depending on the
format. The actual default format is computed.

The menu name "Source Pane" is replaced by "Code Preview Pane" to better reflect
its purpose.

(cherry-picked from ca58674267)
2016-10-22 20:07:42 +02:00
Guillaume Munch
ef7e344318 Change "Output" into "Formats"
This reverts commit 030f4c6d1e.

The plural form seems more appropriate and the tag [[output]] is added for
disambiguation (e.g. for the French translation).
2016-10-22 20:07:41 +02:00
Juergen Spitzmueller
37d30288af Fix LaTeX output of fixed-width cells with decimal separator
This follows Uwe's suggestions (and discharges my own).

The result is not ideal, but there is currently no ideal solution.

Fixes: #9568
2016-10-22 19:27:53 +02:00
Juergen Spitzmueller
0be77e2eb2 Implement wrapping in next-change (#10388). 2016-10-22 19:25:07 +02:00
Juergen Spitzmueller
5c4fa40849 Move wrap check for simple search/replace to lyxfind
This gets rid of some dirty dispatch tricks and fixes wrap-around
on replace and in the spellchecker

Fixes: #10378
2016-10-22 19:20:26 +02:00
Juergen Spitzmueller
f23924e824 Refs dialog redesign. 2016-10-21 22:05:54 +02:00
Juergen Spitzmueller
54248a6e98 Citation dialog redesign 2016-10-21 22:03:19 +02:00
Jean-Marc Lasgouttes
4fa54014d7 When breaking an empty paragraph reduces depth, set layout too
This requires an adaptation of the Separator inset insertion code,
which has been duly provided by Enrico.
(cherry picked from commit b162bd6d2b)
2016-10-20 14:50:34 +02:00
Jean-Marc Lasgouttes
4c724a6072 Do some caching of window title and related UI
This should avoid performance problems related to the window update machinery.
Moreover this fixes a crash introduced by e4998f21 when closing a file.

Note that GuiWorkArea::Private already had a read_only_ member, but it
was unused.

Also rename LyXVC::vcname() to LyXVC::vcstatus() since it now contains
directly the UI string to be shown.

(cherry picked from commit 6cb05ce8bb)
(cherry picked from commit 85bcf0d93f)
2016-10-19 17:34:54 +02:00
Jean-Marc Lasgouttes
e4998f21b0 Set window title according to platform UI
The window title is built from the current file name and its
mofidication state. We use our own code instead of the automatic title
bar provided when windowFileName() is set because

1/ Qt does not keep the full path name
2/ Qt does not yield a nice application name
3/ Qt separates file name and app name with an em-dash. It seems that
   only KDE does that: Gnome does not, Windows does not either. I do not
   think that we can/want to detect a KDE environment at run-time.

The "read only" and "version control" status are shown in the status bar:

* for read only we use the tab read only emblem (with the right size)
* for version control, we show the name of the backend (using a new
  vcname() method of the backend).

The iconText() of the view is not updated anymore, since this is
deprecated in Qt5.

(cherry picked from commit 82808fea04)
(cherry picked from commit 9313f8565b)
(cherry picked from commit bbe36ce6ce)
(cherry picked from commit 7cbc0c16a8)
2016-10-17 10:51:46 +02:00
Jean-Marc Lasgouttes
25640ce39c Make *-lyxformat-* backup files use .lyx~ extension
At least now they look like real backup files.

(cherry picked from commit d12ebb00b9)
2016-10-17 10:27:40 +02:00
Jean-Marc Lasgouttes
181ecc51a7 Do not hardcode required packages for Note inset
This does not change the default behavior, but allows to customize it.

(cherry picked from commit db12707655)
2016-10-17 10:22:45 +02:00
Juergen Spitzmueller
90ffcf41eb Sanitize Ref dialog validation.
Fixes: #10376
2016-10-16 11:49:06 +02:00
Richard Heck
3fe8c04274 Fix monolithic build. 2016-10-10 10:24:08 -04:00
Enrico Forestieri
ae0679926e Improve systemlyxdir handling
Do not assume that the /systemlyxdir path prefix in \origin refers
to the system directory of the running instance, but check through
some heuristics what the real system dir is. In this way, a document
in the system dir of any other LyX installation is correctly spotted
and the \origin tag properly updated. For example, one can use an
installed version of lyx to edit a document in the lib/doc dir of a
git repo and obtain the same result as when running lyx in place.

(cherry picked from commit ade098e289)
2016-09-25 12:09:24 -04:00
Georg Baum
701f10a502 Fix data loss with [ in first cell of aligned
If the first character in the first cell of an aligned math environment is
'[', and the environment does not use top or bottom vertical alignment,
then LyX did write the '[' unprotected so that it got misinterpreted as
optional argument, both when reading the .lyx file in LyX and when reading
the .tex file in LaTeX => data loss!
The fix is to output an empty optional argument in this case, which is
interpreted as default alignment both by LyX and LaTeX. It would also be
possible to output \[ in the first cell instead, but this would be more
difficult to implement.
2016-09-12 20:56:05 +02:00
Jean-Marc Lasgouttes
69f0efd797 Set vertical lines in math arrays correctly on Y axis
This is a fixup to commit 39329935. The two fixes are
* add forgotten offset `y' when drawing the line
* in order to have a continuous vertical line, draw from the offset of
  the previous row.

Fixes bug #10363.

(cherry-picked from a27ff136)
2016-09-09 09:56:44 +02:00
Georg Baum
1cbc3b6e54 Fix filter filter regex
Now the external material file dialog shows the file types defined in the
template again. Before this fix it did only show "All files (*)".
I don't know what the old syntax was supposed to do or whether it ever worked
with boost::regex, but with std::regex the new one is correct.
2016-09-08 20:54:40 +02:00
Juergen Spitzmueller
b14d9186bb Amend 7d52d37662
\@ifundefined is an If-Then-ELSE construct.
2016-09-04 17:43:51 +02:00
Juergen Spitzmueller
7d52d37662 Fix for recent luatex versions. 2016-09-04 17:35:11 +02:00
Jean-Marc Lasgouttes
36d0e3032d Amend 3e432ec631
It failed in the case where a selection already existed (the anchor would be wrongly reset).

(cherry picked from commit 68d825fed8)
2016-08-29 18:25:56 +02:00
Jean-Marc Lasgouttes
9e44cd672a Simplify menus when there is only one caption type
This removes the submenu indirection in Insert and the type changer in
contextual menu. Interestingly, the code was there, but it did not
work at all.

(cherry picked from commit e7a33cacf1
and made compatible with C++98)
2016-08-29 13:49:50 +02:00
Jean-Marc Lasgouttes
bbeb3773a1 Do not set layout for no-op paragraph break
When breaking paragraph in an empty top-level paragraph, nothing
happens on screen but yet there is an undo step because the layout is
reset to what it already was.

Avoid this case.

Fixes bug #10089.
(cherry picked from commit 2ad52918da)
2016-08-29 12:09:53 +02:00
Guillaume Munch
1dc8278fef LaTeX highlighter: make at a letter in the user preamble
Syntax highlighting now provides the appropriate cue that the user preamble is
inside \makeatletter…\makeatother.

(cherry picked from commit 10f6eb2e7e)
2016-08-28 02:38:02 +01:00
Guillaume Munch
c8381f7873 LyXToolBox: a QToolBox with minimum size management
The purpose of this custom widget is to allow the use of a QToolBox in a limited
area. The stock QToolBox does not provide a minimum size hint that depends on
the size of the pages; it assumes that there is enough room.  This subclass sets
the minimal size of the QToolbox. Without this, the size of the QToolbox is only
determined by values in the ui file and therefore causes portability and
localisation issues. Note that the computation of the minimum size hint depends
on the minimum size hints of the page widgets. Therefore page widgets must have
a layout with layoutSizeContraint = SetMinimumSize or similar.

(cherry picked from commits 576cb5df77
                            7e9d0a938b
                            efbc297b95)
2016-08-28 01:43:46 +01:00
Guillaume Munch
2da2f6c00c Basic implementation of QSignalBlocker for qt4
(cherry picked from commit bc8eb059db)
2016-08-26 20:42:52 +01:00
Guillaume Munch
49ce94f636 Fix "scroll here" feature of scrollbar (#10311)
Prevent setRange() from causing a recursive call to scrollTo(). Reduces three
calls of scrollTo() to one call for all scrolling functions of the scroll bar
(e.g. clicking on the arrow, dragging, or clicking somewhere on the scrollbar).

(cherry picked from commit 4d7b912ca1)
2016-08-26 20:41:08 +01:00
Juergen Spitzmueller
010284dbe5 Implement proper dialog titles in InsetParamsDialogs
Fixes: #10329
2016-08-26 18:51:01 +02:00
Jean-Marc Lasgouttes
a957879839 Move correctly the end of proof marker when row is large
This was a regression from 2.1.x in LtR mode, and it never worked correctly in RtL mode.

Fixes bug #10344.

(cherry picked from commit 07c7dae367)
2016-08-24 12:04:19 +02:00
Jean-Marc Lasgouttes
3e432ec631 Reset anchor before selecting with S-button1
(cherry picked from commit b583fb26e8)
2016-08-24 11:59:01 +02:00
Jean-Marc Lasgouttes
e2489c1c31 Let M-x give focus to minibuffer when it is already open
(cherry picked from commit 65b0e84b54)
2016-08-23 12:25:16 +02:00
Jean-Marc Lasgouttes
e0730fe070 Remove horizontal spacing around previews
This concerns the preview version of InsetPreview and InsetIPA.

Fixes bug #10304.
(cherry picked from commit 4ddad2f6cd)
2016-08-22 10:20:01 +02:00
Scott Kostyshak
deec55866c Warn in GUI when mixing Title and InTitle layouts
Since we process layouts sequentially, we export LaTeX code for the
title once we arrive to a layout that has InTitle false. If the
document then later has a layout with InTitle true, we do not
(currently) go back to add it to the title and just output it
in-place. We previously warned with LYXERR0, but since this can
cause missing or unexpected output we now warn in the GUI.

For more information, see the following lyx-devel thread:
https://www.mail-archive.com/search?l=mid&q=a65ae226-d3bd-8fc5-a93b-7bb23f1cda82%40lyx.org

(cherry picked from commit 0b1cf1330d)
2016-08-18 21:07:42 -04:00
Scott Kostyshak
b3a6f51f30 Improve a layout LYXERR0 message
The name of the layout is now included in an error message about
layouts. This will help with finding the root issue of several
documents we have.

(cherry picked from commit c949268da7)
2016-08-18 21:07:38 -04:00
Enrico Forestieri
93003eee16 Fix exit code from runCommand on Windows
On Windows, runCommand has never returned the exit code of the
spawned process but the result of correctly closing the input handle.

Fixes #10327

(cherry picked from commit fb46b3a1ee)
2016-08-18 17:00:55 -04:00
Richard Heck
50162ebb1e Fix XHTML export of German Additional Features manual.
There was an oddity in the manual that exposed a problem with the
test for the "special case" of an inset all by itself in a pargraph.
If a font change is applied to that inset, we still need to open the
paragraph.

(cherry picked from commit 3be23d18b6)
2016-08-04 22:47:32 -04:00
Richard Heck
928c7a3d68 We don't need to crash here, but can try to continue in release
mode.

(cherry picked from commit 0a603c5d0e)
2016-08-04 22:46:26 -04:00
Richard Heck
c92b1aa359 Special characters should be output to the TOC.
(cherry picked from commit f15c4159aa)
2016-08-04 22:45:56 -04:00
Richard Heck
b5a37a856c Fix bug #10320.
Layout::write needs to allow for the possility that the name of the
style may contain a space. It seems sufficient just always to quote it.
2016-08-04 17:10:39 -04:00
Richard Heck
612dc74f75 Fix problem noticed by Scott.
(cherry picked from commit 16d39b1f83)
2016-08-02 18:56:46 -04:00
Richard Heck
199e63fa19 Simplify CSS classes for floats.
Fixes bug #8605 and probably parts of #8755 and #9328.

(cherry picked from commit 50c1391950)
2016-07-31 03:45:05 -04:00
Richard Heck
98d4fba57b Fix CSS for math cases.
Fixes bug #8755.

(cherry picked from commit 752c89ae13)
2016-07-31 03:42:38 -04:00
Richard Heck
ffd6a28a97 Fix HTML display of math matrices.
(cherry picked from commit 60ce2b7570)
2016-07-31 03:41:13 -04:00
Richard Heck
ddb7c5884b Fix output of floats, etc, inside environments.
Fixes bug #9094.

(cherry picked from commit 98feadd61e)
2016-07-31 03:20:00 -04:00
Richard Heck
1c9bb3f6de Add 'dir="auto"' to the body tag for XHTML export. This should take
care of much of what we need to do for RTL languages. It does not
take care of inline language changes, probably.

(cherry picked from commit 07dcb1c525)
2016-07-31 02:54:28 -04:00
Richard Heck
5fa071ec1e Fix display of code listings in XHTML.
Fixes bug #8362.

(cherry picked from commit ab3a49973f)
2016-07-31 01:48:57 -04:00
Richard Heck
de3284ba9a Activate export of external material for XHTML.
As of this commit, this is ineffective, since no changes have been
made to external_templates.

(cherry picked from commit daf7cd4c05)
2016-07-31 01:35:53 -04:00
Richard Heck
f457b11fa7 Fix substitution for $$Contents.
The second argument here is the length of the string to replace,
not the position of the final character.

(cherry picked from commit 6b97f2c075)
2016-07-31 00:17:22 -04:00
Richard Heck
a536ee7718 Fix preview of external material with plaintext and DocBook.
(cherry picked from commit 93a612220e)
2016-07-30 23:51:06 -04:00
Richard Heck
8c6b947eb5 Use scaling factor in XHTML output.
(cherry picked from commit 47c52db13e)
2016-07-30 22:02:48 -04:00
Richard Heck
e1bad06103 If we cannot find the input format for a graphic, we cannot convert it.
Also includes some minor code cleanup.

(cherry picked from commit e1f597e3da)
2016-07-30 21:58:59 -04:00
Richard Heck
0ab8ea6682 Fix bug #10154. 2016-07-30 20:18:03 -04:00
Richard Heck
c760707548 Fix thinko from earlier commit.
We need to output the deferred material AFTER the paragraph is closed.
2016-07-30 01:30:37 -04:00
Richard Heck
909fcb7fcc Fix problem with branch handling. The problem was that we were not
dealing properly with the paragraph separator tag.

We really need to use that tag as a kind of general marker for which
tags we're responsible for in a given paragraph and which tags we are
not. So the changes to InsetText.cpp use the tag as that kind of marker.

Note that, as of this commit, the User Guide again exports without any
kind of error. I haven't yet checked the other manuals.

This fixes bug #8022.

(cherry picked from commit 31e25c8ec6)
2016-07-29 23:50:13 -04:00
Richard Heck
275bdcd845 Fix display of colors in labels of arguments.
We need to handle this specially, just as we do the main font.

(cherry picked from commit 96a8156557)
2016-07-29 23:42:40 -04:00
Richard Heck
0dceac6288 orig_x can and so prsumably should be a double. 2016-07-26 13:33:41 -04:00
Richard Heck
68487d5197 Fix indentation. 2016-07-25 15:07:03 -04:00
Richard Heck
46a16b0ca7 Merge branch '2.2.x' into 2.2.2-staging 2016-07-25 14:55:16 -04:00
Jean-Marc Lasgouttes
cf6b30ae76 Recompute Paragraph::beginOfBody() earlier
In redoParagraph, this should be done before coping with the insets,
other wise some graphic gliches may occur. This is a better fix for

Fixes bug #10163.

(cherry picked from commit 71374b38c2)
2016-07-21 10:37:41 +02:00
Jean-Marc Lasgouttes
5f2023796a When painting only insets, paint also change and language marks
Fixes bug #10265.

(cherry picked from commit c73923c519)
2016-07-21 01:09:32 +02:00
Jean-Marc Lasgouttes
6633e7aa3e Add feedback in status bar when zooming
Moreover enforce better the lower limit of 10 and avoid overflow due
to unsigned int.

Fixes bug #10212.

(cherry picked from commit 8884c4044d)
2016-07-20 00:58:30 +02:00
Jean-Marc Lasgouttes
28e347b0a6 Realize inset argument label font before using it
Also fix a few typos in status.22x.

(cherry picked from commit e35110eab7)
2016-07-19 22:58:36 +02:00
Richard Heck
32b56ee8f7 Do not crash is release mode if we stumble across an unrealized font.
(cherry picked from commit 3203fb1c5f)
2016-07-18 13:03:47 -04:00
Richard Heck
4a75d358a1 The way this was previously, it had to fail if the GUI language
was not English: We return the the abbreviated author "One and Two",
but translated to the GUI language; then we search that for " and "
in order to pull the authors apart again.

I've just replaced the distinct routines with a single one that handles
both cases, depending upon whether a Buffer is provided as one argument.

(cherry picked from commit fb84ccd9fb)
2016-07-17 22:56:14 -04:00
Richard Heck
e98334098b Fix thinko that led 2-authors citations to be displayed with "et al."
(cherry picked from commit d5633f17e5)
2016-07-17 22:56:14 -04:00
Stephan Witt
ab1dd332e1 Remove special code for Qt5 to manage HiDPI. It's not needed anymore and leads to strange icon scaling problems in mixed resolution environment.
For reference see the screen shots in bug tracker ticket #10114.

(cherry picked from commit d5fb80ed87)
2016-07-15 07:20:50 +02:00
Guillaume Munch
030f4c6d1e Revert the change of "Output" into "Format"
(Partial revert of commit 141d9d34dfb5ee5b642438f76945ee51ab931800.)
2016-07-13 17:47:27 +01:00
Guillaume Munch
4089153770 Add line breaks
2.2 still requires those
2016-07-12 14:55:20 +01:00
Guillaume Munch
141d9d34df UI for save_transient_properties
Add a new checkbox "Save transient properties" to the "Output" panel in the
document properties dialog (now renamed as "Format").

This provides the front-end for the change at 5c2d04999.

(cherry picked from commit 5d292fce2d)
2016-07-12 14:50:51 +01:00
Juergen Spitzmueller
343c4c0af8 Polyglossia is no longer restricted to XeTeX.
Thus enable the use of LuaTeX for all polyglossia-supported languages.
2016-07-11 16:16:14 +02:00
Juergen Spitzmueller
cd68c6afdf Clarify some comments wrt XeTeX/LuaTeX (see bug #10013) 2016-07-11 10:16:56 +02:00
Juergen Spitzmueller
90e337c84d Generate a proper error dialog title for XeTeX/LuaTeX
(see bug #10013)

Candidate for stable
2016-07-10 16:04:24 +02:00
Günter Milde
5198fdfc0b 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).

(cherry picked from commit b170b6e40f

I just converted the test to format 508. Thanks Scott for running the
tests. -Guillaume)
2016-07-10 13:42:18 +01:00
Richard Heck
103bf05099 Simplify logic a bit. (This was meant to be part of a previous
commit.)

(cherry picked from commit 2104d41f71)
2016-07-10 01:45:05 -04:00
Richard Heck
b02a93d7e8 Fix thinko in Buffer::preview. It is possible for this routine to
be called when we do not have a cloned Buffer, namely, if we do not
have EXPORT_in_THREAD defined.

(cherry picked from commit d8aab4af9e)
2016-07-10 01:17:54 -04:00
Guillaume Munch
bca4965dd8 Accessibility of document class combo box (#10035)
* Access it with tab

* Access it with the accelerator from the title of the group

(cherry picked from commit 3e6df97963)
2016-07-08 17:36:32 +01:00
Enrico Forestieri
ebb1941143 Bring window to front only for single-instance mode
A window manager could be configured such that to maintain a certain
stack order for the windows. It would be annoying that opening a new
file through menu brings up the window, so do this only if we are
loading a file through the lyx-server.

This commit amends f5f8c6fd, so no status line is needed.
2016-07-05 23:19:59 +02:00
Jean-Marc Lasgouttes
39e8cbf4e5 Record undo when deleting end of paragraph in change tracking mode
Fixes bug #10253.
(cherry picked from commit 86c33c96a0)
2016-07-05 16:47:50 +02:00
Enrico Forestieri
f5f8c6fd38 Bring window to front after loading a document
Fixes #7875.
2016-07-04 20:44:13 +02:00
Georg Baum
3fb8d71869 Fix CAS input on windows (bug 10262)
This is the well known file locking problem: The TempFile class keeps the
created file locked for the own process, and this prevents the CAS to read it.
2016-07-03 19:48:15 +02:00
Uwe Stöhr
534137a517 InsetSeparator.cpp:backport a compiler warning fie
( 45e3a8f8/lyxgit)
2016-07-02 18:16:03 +02:00
Richard Heck
bfeee826b4 ABOVE and CENTERED labels need special treatment.
Fixes bug #8843.

(cherry picked from commit 08bf9781ee)
2016-06-29 23:56:54 -04:00
Richard Heck
c52f30f253 Make sure we center displayed equations.
(cherry picked from commit a8aa7feb89)
2016-06-29 23:20:56 -04:00
Richard Heck
24d8d880c1 Add class attribute for \mathbb in XHTML output. Fixes part of 8251.
Patch from Josh.

(cherry picked from commit e3625b5b80)
2016-06-29 23:02:28 -04:00
Richard Heck
f3fbfcfd05 Use symbols file to lookup entities for delimiters. Fixes bug #8280.
Based upon work by Josh Hieronymus.

(cherry picked from commit 04b8f5cdc4)
2016-06-29 22:42:03 -04:00
Richard Heck
98ba7cf49d Don't be so cute with VSpace: We just output it inline now for
XHTML.

Fixes bug #8154.

(cherry picked from commit 8ea3d1f130)
2016-06-29 21:59:44 -04:00
Richard Heck
63f6ee213c Output column width info for XHTML.
(cherry picked from commit ddc28f0374)
2016-06-29 21:49:28 -04:00
Richard Heck
88f6da78af Fix bug #8782: We need to query the cell, not just the inset.
(cherry picked from commit f49556b3ed)
2016-06-29 21:28:05 -04:00
Richard Heck
2417d9cb5d Add missing buffer update after pasting unformatted text.
Fixes bug #8735.

(cherry picked from commit 6ecb05e6ea)
2016-06-29 13:34:22 -04:00
Jean-Marc Lasgouttes
a097e0cf82 Fix right_boundary properly after a row is shortened
Instead of resetting it to false, do a proper test to see whether
there is a separator at the end of the row.

Fixes bug #10180.
(cherry picked from commit 5e5440f2f3)
2016-06-29 17:55:47 +02:00
Enrico Forestieri
7b423a4eb3 Make command buffer icons same size as QLineEdit height
Part of bug #10125

(cherry picked from commit 458d2015dc)
2016-06-27 18:44:50 -04:00
Enrico Forestieri
7d759dccbb Make oultliner icons same size as the toolbar icons
Part of bug #10125

(cherry picked from commit f56ee1875c)
2016-06-27 18:44:08 -04:00
Richard Heck
46133b26be Let "provides [fontspec|listings|subfig] 1" work.
(cherry picked from commit f46a52d97f)
2016-06-27 17:48:08 -04:00
Richard Heck
180f1d5497 Fix for previous commit: We come right back through here from
exportBufferAs, so we need to make sure we haven't been given
an export location.
2016-06-25 00:41:23 -04:00
Richard Heck
1207d93951 Fix bug #8814: Ask where to export file if it is not
yet saved.
2016-06-25 03:29:30 +01:00
Guillaume Munch
4668e6eceb TocWidget: fix part of #9825
(cherry picked from commit 78a5c87781)
2016-06-23 14:19:14 +01:00
Richard Heck
774c00c457 By default, charstyles should not permit layout changes internally.
Fixes #10237.

(cherry picked from commit 152817576a)
2016-06-21 15:55:12 -04:00
Richard Heck
d1c11283a3 Fix bug #10213 as discussed there: We now display the same button
whether the branch is open or closed.

(cherry picked from commit 3573b7270c)
2016-06-21 15:02:01 -04:00
Guillaume Munch
41f7f1d237 Fix bug #10195
The computation of the index of the main text entry of a row did not take into
account the fact that the entry could be optimised away.

(cherry picked from commit 947c34364c)
2016-06-21 01:51:42 +01:00
Richard Heck
8731689d41 Fix bug #10153: There's a mechanism in XHTML output that defers the
output of tags until we know they're needed. In the case of HTML
tables, empty cells should of course be output, so we need to force
the tags to be output.

(cherry picked from commit 35d449c5da)
2016-06-20 10:26:40 -04:00
Richard Heck
bfcd8a3991 Fix typo, and also check, if string is null. 2016-06-18 18:34:30 -04:00
Richard Heck
c503804eeb Be a bit more careful about setting and restoring the last reference
when we go to and return from labels.

(cherry picked from commit 68b60ec529)
2016-06-18 18:28:48 -04:00
Guillaume Munch
0ba875add1 TocWidget: fix an erroneous collapse and optimise updates based on profiling
TocModels::reset() in GuiView::structureChanged() collapses the TocWidget, and
therefore requires an update right after, which was missing.

In fact, profiling TocWidget::updateView() shows that delaying the update is
good only for fast keypresses (essentially movement). It costs 5% of a
char-forward operation in a document with approx. 100 table of contents
items. The update optimisation has been rewritten to take this data into
account.

This also fixes #9826: Outline disclosure of subsection content disappears one
second after doubleclicking content item.
2016-06-15 22:32:53 +01:00
Richard Heck
adcdf22042 Restore last selected label when using the "go to label" feature
of the reference dialog.

(cherry picked from commit 9d5ffa8e75)
2016-06-15 22:32:53 +01:00
Jean-Marc Lasgouttes
3c7c63376f Take inset dimension into account in row signature
In some cases, the insets may change height or width without changing
the other apsects of the row.

Fixes bug #6991 and #10182.

(cherry picked from commit 508518ad95)
2016-06-15 22:32:53 +01:00
Jean-Marc Lasgouttes
aa522e7071 Fix drawing of buttonText (enforce same left/right spacing)
The computation of the width of the button was wrong. If <--> stands
for TEXT_TO_INSET_OFFSET/2 spacing, and if `[]' marks the button's
limits, then the intent is
  <-->[<-->button text<-->]<-->

Therefore the physical grey rectangle width is
   width - Inset::TEXT_TO_INSET_OFFSET

With this change, the spacing on the right of the button is not larger
than the left one.

Fixes bug #10147.
(cherry picked from commit 516d5d29dc)
2016-06-15 22:32:53 +01:00
Jean-Marc Lasgouttes
cba0b073aa Remove extra spacing around InsetCommand buttons
There is already a spacing of 2 pixels on each side of a button (e.g.
collapsed inset). There is no need to add one extra pixel for command
insets.

Fixes part of bug #10149.
(cherry picked from commit 68149e380d)
2016-06-15 22:32:53 +01:00
Juergen Spitzmueller
8318473227 Implement some forgotten context menu items for arguments
* Dissolve context menu
* Label toggle (for conglomerate-styled arguments)

Fixes: #10150
2016-06-15 22:32:53 +01:00
Jean-Marc Lasgouttes
b6552d017b \\pagebreak is a fragile command in general
As such, it shall be protected in moving arguments, such as sections.

Fixes bug #10092.
(cherry picked from commit 86ee2699c30b63e5b4de3ad725519756d17aec2c)
2016-06-15 22:32:53 +01:00
Jean-Marc Lasgouttes
dbd83603b0 Fix getStatus for math-mutate and math-display
Those two functions used two different hackish and buggy
implementation to know when the function is disabled. Replace that by
asking the containing inset whether it accepts inserting display math
inset.

Fixes bug #10033.
(cherry picked from commit de5630a1562054cb969b106e35f84bfe1e99002a)
2016-06-15 22:32:53 +01:00
Jean-Marc Lasgouttes
c25ba48f0a Disable LFUN_INSET_DISSOLVE in tabulars
When in a tabular cell, "this" is just a lone InsetText, while cur.inset() is the whole tabular. This makes a big difference, especially when one wants to count cells.

Fixes bug #9954.

(cherry picked from commit 4caf167dbd24722421ae8d94a2c103bf41a7667d)
2016-06-15 22:32:53 +01:00
Jean-Marc Lasgouttes
9a4309b104 Rename InsetMathHull::isTable to allowsTabularFeatures
The old name conflicted with the newly introduced Inset::isTable.

Now the meaning is as follows.
* Inset::isTable() is true when the inset is composed of lines and columns
* InsetMathHull::allowsTabularFeatures is true when the current type of hull allows for tabular-like functions.

(cherry picked from commit db39dc7ccd4c2dd14ef20547e6e3c056ba030d83)
2016-06-15 22:32:53 +01:00
Jean-Marc Lasgouttes
f3cb98c784 Make inset-select-all select all cells only in tables
inset-select-all has 3 levels
1. select current cell
2. select all cells
3. select inset from outside.

The second level makes sense for tables (text and math), but not for things like a math fraction.

Introduce a new method Inset::isTable() that allows to detect this case properly and skip level 2.

(cherry picked from commit 5de28b9ac6736c791146a1a3ebe7f4826c22a9b7)
2016-06-15 22:32:53 +01:00
Guillaume Munch
108cb35b64 Show review toolbar when outputting changes
"Output changes" alters the preamble even in the absence of tracked
changes. Therefore, not being able to notice when it is activated can possibly
yield hard-to-debug compilation failures.
2016-06-15 22:32:53 +01:00
Guillaume Munch
05e38d1366 Disable certain change tracking commands when there are no changes
Fix TODO
2016-06-15 22:32:53 +01:00
Guillaume Munch
73dd3f4ecb GuiChanges: provide feedback when there are no more changes
Remove FIXMEs: date and time localisation
2016-06-15 22:32:53 +01:00
Guillaume Munch
c137ae4c43 Automatically show the review toolbar if the document has tracked changes
(#8738)

For efficiency, we add a new flag to the buffer indicating when changes are
present. This flag is updated at each buffer update, and also when explicitly
requested via a dispatch result flag.
2016-06-15 22:32:53 +01:00
Guillaume Munch
5486beac29 getInnerText() 2016-06-15 22:32:53 +01:00
Guillaume Munch
b90435ac72 TocWidget: clean-up the timer logic
The timer logic introduced to solve bug #7138 was not entirely reliable; in
particular it resulted in spurious updates (noticeable by the treeview
collapsing just after one opens a branch, in particular).

This commit cleans up the timer logic. I followed the original design decision
of having an immediate update followed by a delayed update. Now the updates are
appropriately compressed and done after a delay of 2s (as can be noticed with
the treeview still collapsing, unfortunately, but after a more predictable
delay...).
2016-06-15 22:32:53 +01:00
Guillaume Munch
009dc75fef TocWidget: Fix perf regression
4d1ad336 fixed #9754 but caused perf issues by cancelling the gains of having a
timer (introduced after #7138). This introduces in GuiToc::enableView() a
lightweight check of whether the widget should be updated. The logic is inspired
from GuiViewSource::enableView().
2016-06-15 22:32:53 +01:00
Guillaume Munch
8149d4fc0b Whitespace 2016-06-15 22:32:52 +01:00
Jean-Marc Lasgouttes
e359124a86 Let getPosNearX take horizontal scrolling into account
If we do not do that, it is not possible to position the cursor after
a long inset with the mouse.

To do this, it is necessary to add the pit information to the Row
object. This is a good idea in any case, and will allow to simplify
some code later on.

Fixes bug #10094.
(cherry picked from commit 8851645799ef67015e49fd75b9dfeed65d685e85)
2016-06-15 22:32:52 +01:00
Jean-Marc Lasgouttes
f53c17145a Fix cursor position after redo
When document settings are modified, a command
  inset-forall Branch inset-toggle asign
is run to open as needed all branches. At the end of the said loop,
the cursor is reset to where it was. However, the cur_after undo
element member is not set because it already had a value.

To make this work as expected, it is necessary in LFUN_INSET_FORALL to
reset the cursor before ending the undo group and to insert a dummy
recordUndo call.

Fixes bug #10097.

(cherry picked from commit 0036762f30def16ab8b2216f721f9e552893bc85)
2016-06-15 22:32:52 +01:00
Guillaume Munch
3b1068af62 Improvements to the shortcuts preference dialog (#9174)
Ask the user for removing bindings when using the "restore" button (#9174).

Fix the already-bound-key detection logic.

Don't forget to trigger the search when initializing the search LineEdit with
its former value.
2016-06-15 22:32:52 +01:00
Richard Heck
fe96d33229 Updates to splitting of consecutive environments.
From Enrico.

(cherry picked from commit ee82dd604010d4c1bf250640a3df6d790ea08380)
2016-06-15 22:32:52 +01:00
Jean-Marc Lasgouttes
0ea92e677a Change mouse cursor on tabular selection zones
This is done by implementing the clickable method. It is not possible yet to have the usual left and down arrows, because Qt does not implement them as far as I can see.

Factor the code that triggers row/column selection and fix the logic. Now it is possible to select also at the right of the tabular inset.
2016-06-15 22:32:52 +01:00
Jean-Marc Lasgouttes
cd27ae65a2 Fix display of InsetCollapsable with split views
When several bufferviews exist for the same inset, the data that depends on the view width have to be BufferView-dependent. While this is the case for several mutable members of InsetCollapsable, some were missing.

This commit makes button_dim_ (renamed from button_dim) and openinlined_ bv-dependent.

Get rid of the hitButton function.

Remove the bv-independent geometry() method and implement editable() explicitely instead.

Fixes bug #9756.
2016-06-15 22:32:52 +01:00
Jean-Marc Lasgouttes
e495dfb5f7 whitespace only 2016-06-15 22:32:52 +01:00
Jean-Marc Lasgouttes
815e6c9f2f Pass a BufferView to Inset::clickable 2016-06-15 22:32:52 +01:00
Jean-Marc Lasgouttes
9fc27f6bb7 Make monolithic build code portable to Mac OS
"echo -e" is definitely not portable. Use a plain loop instead.

Also use the automake silent rule mechanism to make the generation of monolithic source files visible.
2016-06-15 22:32:52 +01:00
Guillaume Munch
8e1e55c9e6 Sanitize InsetMathHull and add a check for mutability in LFUN_MATH_MUTATE
Remove in particular all comparisons < and >= involving HullType.

Add a guard to make sure that mutate() only operates on types it has been
designed for. Then I figured I could use this new knowledge to give feedback
when math-mutate is not implemented via getStatus(). (To test this, insert a
regexp in Advanced Search & Replace and try to change it into a standard
equation via the contextual menu.)
2016-06-15 22:32:52 +01:00
Guillaume Munch
6d8863ad60 Correct col spacing in Cases environment 2016-06-15 22:32:52 +01:00
Guillaume Munch
7069b90f92 Fix the display of column spacing in AMS environments
AMS align environment should have some spacing between odd and even columns.

Add a new virtual method displayColSpace() to InsetMathGrid, InsetMathHull and
InsetMathSplit.
2016-06-15 22:32:52 +01:00
Guillaume Munch
665ad80313 Display the correct horizontal alignment in AMS environments
A longstanding problem... (related: #1861)

The columns in AMS math environments have a fixed alignment (colAlign() in
InsetMathGrid.cpp). We set this alignment for display (Georg's
displayColAlign()) in InsetMathHull and InsetMathSplit. This is done according
to tests and documentation for the various environments.

There is also some mechanical code factoring via colAlign().

Finally, I disable setting the horizontal alignment in InsetMathSplit, which has
no impact on the LaTeX output, and has no longer any impact on the screen. (As
for vertical alignment I discovered that it was in fact customisable for
\aligned & friends! I hope that the more faithful interface will let other
users discover that too.)
2016-06-15 22:32:52 +01:00
Guillaume Munch
78dde8edc6 Raise the maxlastfiles cap
This only changes the maximum value that the user can choose in the UI, not the
default value.
2016-06-15 22:32:11 +01:00
Guillaume Munch
6b17cbafac Do not omit the starting space when copying (#9995)
The offending code appears to have been introduced a long time ago. My
understanding is that it is no longer relevant. Notably, it only appears on copy
and not on cut, which tells us that: 1) it should be safe to remove it, 2) we
should remove it for consistency.
2016-06-15 22:32:11 +01:00
Guillaume Munch
5c13007d92 Make latex highlighter colors compatible with dark theme
Partial fix for #8325
2016-06-15 19:51:45 +01:00
Guillaume Munch
203136d287 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:50:06 +01:00
Guillaume Munch
210f97c67b Fix bug #9218
This makes Qt 5.4 as usable as Qt 5.5.1 in my experience. Otherwise, fix again
INSTALL.
2016-06-12 23:12:24 +01:00
Guillaume Munch
e6d28aad0a Fix compilation with Qt < 4.7
Thanks to jkulesza
2016-06-12 23:12:24 +01:00