]> git.lyx.org Git - lyx.git/log
lyx.git
8 years agoinstaller: update the packages list
Uwe Stöhr [Mon, 12 Oct 2015 00:50:07 +0000 (02:50 +0200)]
installer: update the packages list

- there are some new packages required by LyX's supported document classes and example files
(this list is only used when LyX is installed the first time on a PC together with MiKTeX to shorten the installation time)

8 years agoinstaller: new release because of bug #9733
Uwe Stöhr [Sun, 11 Oct 2015 23:01:30 +0000 (01:01 +0200)]
installer: new release because of bug #9733

8 years agoFix languages in math docs.
Georg Baum [Sun, 11 Oct 2015 17:00:21 +0000 (19:00 +0200)]
Fix languages in math docs.

These were either unneeded or used the old german spelling.

8 years agoFix cursor movement for large logos (#9628)
Georg Baum [Sun, 11 Oct 2015 12:21:45 +0000 (14:21 +0200)]
Fix cursor movement for large logos (#9628)

Previously, if one clicked onto a large non-editable inset like the new LyX
logo inset, the cursor was always positioned in front of the inset, even if
the click was almost at the back edge. Now the cursor is positioned at the
correct edge. I tested this also with RTL contents, where from means right
and back means left, but the inset anchor position anchor point is still
at the left, and the right edge is dim.wid pixels to the right of it.

8 years agoDisable assigment operator
Georg Baum [Sun, 11 Oct 2015 10:04:43 +0000 (12:04 +0200)]
Disable assigment operator

Forgot that in cea2d71e641

8 years agoComply with rule-of-three
Georg Baum [Sun, 11 Oct 2015 09:16:09 +0000 (11:16 +0200)]
Comply with rule-of-three

The rule-of-three says that if any of virtual destructor, copy constructor
or assignment operator needs to be manually implemented, then all three
should be implemented. Otherwise you can get subtle bugs which can be
difficult to find. In the changed classes, changing a copy-construction to
an assignment would have had surprising effects. Now they all behave
consistently.

8 years agoMove comment where it belongs
Georg Baum [Sun, 11 Oct 2015 08:27:16 +0000 (10:27 +0200)]
Move comment where it belongs

8 years agoRemove C-style casts found by cppcheck
Georg Baum [Sat, 10 Oct 2015 19:44:08 +0000 (21:44 +0200)]
Remove C-style casts found by cppcheck

8 years agoFix LASSERT correction
Georg Baum [Sat, 10 Oct 2015 19:38:17 +0000 (21:38 +0200)]
Fix LASSERT correction

Found bx cppcheck:
(style) Assignment of function parameter has no effect outside the function.

8 years agoRemove unused variables
Georg Baum [Sat, 10 Oct 2015 19:28:28 +0000 (21:28 +0200)]
Remove unused variables

Found by cppcheck: (style) Unused variable: x

8 years agoFix duplicated pointer check
Georg Baum [Sat, 10 Oct 2015 19:23:52 +0000 (21:23 +0200)]
Fix duplicated pointer check

Found by cppcheck: (style) Same expression on both sides of '&&'.

8 years agoFix copy-paste leftover
Georg Baum [Sat, 10 Oct 2015 19:15:55 +0000 (21:15 +0200)]
Fix copy-paste leftover

Found by cppcheck: (style) Same expression on both sides of '&&'.
I deduced the correct if-condition from the other places where theLaTeXFonts()
is called.

8 years agoAdd missing intializations
Georg Baum [Sat, 10 Oct 2015 19:04:28 +0000 (21:04 +0200)]
Add missing intializations

These were found by cppcheck:
Member variable 'x' is not initialized in the constructor.
The crash #9788 would not have happened if this had been done earlier.

8 years agoFix multicolumn regression (bug #9788)
Georg Baum [Sat, 10 Oct 2015 16:58:18 +0000 (18:58 +0200)]
Fix multicolumn regression (bug #9788)

The test case did show several problems:
- The alignment argument was not parsed correctly if it was not in braces
- There one column too much created, since I did not take into account that
  the current cell must bge replaced by the multicolumn cell
- If the last line of an array contained only an empty multicolumn cell, then
  the complete multicolumn was swallowed
- The decision whether to output the column separator & was sometimes wrong
  for multicolumns

8 years agoPDF-comment.lyx: new German translation
Uwe Stöhr [Sat, 10 Oct 2015 00:15:09 +0000 (02:15 +0200)]
PDF-comment.lyx: new German translation

- also disable PDF-reply since this never works correctly and it could even destroy the whole PDF and exceeds the TeX capacity
- update the french version accordingly

8 years agoInitialize member
Georg Baum [Fri, 9 Oct 2015 21:15:54 +0000 (23:15 +0200)]
Initialize member

This fixes the crash of bug #9788. However, the misparsing of \multicolumn
is still there: LyX thinks that the array has three columns, it inserts an
additional one before the multicolumn.

8 years agoUpdate LYX_DIR_21x environment variable
Georg Baum [Fri, 9 Oct 2015 19:47:01 +0000 (21:47 +0200)]
Update LYX_DIR_21x environment variable

8 years agoFix typo
Georg Baum [Fri, 9 Oct 2015 19:37:43 +0000 (21:37 +0200)]
Fix typo

Found by gcc: operation on 'preview_ptr' may be undefined [-Wsequence-point]

8 years agoDocument how to use Qt 5 with cmake
Georg Baum [Fri, 9 Oct 2015 19:19:41 +0000 (21:19 +0200)]
Document how to use Qt 5 with cmake

8 years agoFix display of perenthesis in Hebrew documents
Jean-Marc Lasgouttes [Fri, 9 Oct 2015 14:16:13 +0000 (16:16 +0200)]
Fix display of perenthesis in Hebrew documents

This was a regression from 2.1.x. I failed to copy the horrible hack that was present for the special case of () in Hebrew.

There is a real need for someone who understands RTL language stuff to fix this. Currently () are wrong in .lyx files IMO. We should not have to swap them for display.

8 years agoSmall code cleanup
Jean-Marc Lasgouttes [Fri, 9 Oct 2015 13:48:59 +0000 (15:48 +0200)]
Small code cleanup

8 years agoGet rid of old Bidi code
Jean-Marc Lasgouttes [Fri, 9 Oct 2015 13:10:39 +0000 (15:10 +0200)]
Get rid of old Bidi code

This removes the old implementation of Cursor::getSurroundingPos, that has been superceded in commit .

As this was the last user of the Bidi class, this can be removed too.

8 years agoAvoid the use of a static NSAutoreleasePool.
Stephan Witt [Fri, 9 Oct 2015 06:16:10 +0000 (08:16 +0200)]
Avoid the use of a static NSAutoreleasePool.
This seems to cause crashes on exit from time to time.

8 years agoAdd missing adjustment of end_pos if given length exceeds last pos
Stephan Witt [Fri, 9 Oct 2015 06:14:18 +0000 (08:14 +0200)]
Add missing adjustment of end_pos if given length exceeds last pos

8 years agoFix "dead store" warnings of Xcode analyze tool
Stephan Witt [Fri, 9 Oct 2015 06:08:49 +0000 (08:08 +0200)]
Fix "dead store" warnings of Xcode analyze tool

8 years agoPDF-comment.lyx: some corrections
Uwe Stöhr [Thu, 8 Oct 2015 22:53:51 +0000 (00:53 +0200)]
PDF-comment.lyx: some corrections

- also: de.po: fix a typo

8 years agoFix cppcheck portability warning
Georg Baum [Mon, 28 Sep 2015 18:40:56 +0000 (20:40 +0200)]
Fix cppcheck portability warning

(portability) Assigning a pointer to an integer is not portable.

8 years agoRevise commit 7a5eff56
Jean-Marc Lasgouttes [Wed, 7 Oct 2015 09:30:04 +0000 (11:30 +0200)]
Revise commit 7a5eff56

Courtesy of the whitespace police.

8 years agoSet minimal width of fixedwidth collapsable insets.
Pavel Sanda [Wed, 7 Oct 2015 09:15:35 +0000 (02:15 -0700)]
Set minimal width of fixedwidth collapsable insets.

Intention behind this is actually Box inset being too tiny
to reasonably contain other insets like ERT.

http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg188987.html

8 years agoAdd TOC of external materials. (#7790, partial)
Guillaume Munch [Sun, 4 Oct 2015 18:48:31 +0000 (19:48 +0100)]
Add TOC of external materials. (#7790, partial)

Known issues (non-regressions):

* The TOC is not updated immediately after an external material inset is
  inserted. See TocBackend::updateItem().

8 years agoConsistency of ellipses across the UI
Guillaume Munch [Sun, 4 Oct 2015 18:38:47 +0000 (19:38 +0100)]
Consistency of ellipses across the UI

Use the function support:truncateWithEllipsis() to shorten a docstring with
... at the end. Actually we use U+2026 HORIZONTAL ELLIPSIS instead of "..." when
automatically shortening strings. This is to be consistent with Qt's own
truncation and is much nicer on the screen.

This includes the bugs #9575 and #9572 regarding broken text elision in the
outliner.

Known issues (non-regressions):

* TocBackend::updateItem() should be rewritten to update all TOCs. (#8386)

* "..." should be replaced with … everywhere else on the interface (including
  translation strings).

* We should prefer to rely on QFontMetrics::elidedText() to truncate strings
  with an ellipsis whenever possible, or an equivalent for the buffer view
  dependent on the font metrics. See the warning in src/support/lstrings.h.

8 years agoRemove PainterInfo argument to checkCursorScrollOffset
Jean-Marc Lasgouttes [Mon, 5 Oct 2015 16:04:12 +0000 (18:04 +0200)]
Remove PainterInfo argument to checkCursorScrollOffset

This will allow later to move its invokation to processUpdateFlags.

Also, remove wrong use of Update::SinglePar flag.

8 years agoMore updates to painting analysis
Jean-Marc Lasgouttes [Sun, 4 Oct 2015 20:28:36 +0000 (22:28 +0200)]
More updates to painting analysis

8 years agoUpdate file from Abdel's comments and some of my own thinking
Jean-Marc Lasgouttes [Sat, 3 Oct 2015 22:03:46 +0000 (00:03 +0200)]
Update file from Abdel's comments and some of my own thinking

8 years agoSmall typos in PAINTING_ANALYSIS
Jean-Marc Lasgouttes [Fri, 2 Oct 2015 15:26:28 +0000 (17:26 +0200)]
Small typos in PAINTING_ANALYSIS

8 years agoFix #9726: Preview does not have correct font size
Enrico Forestieri [Sat, 3 Oct 2015 16:13:20 +0000 (18:13 +0200)]
Fix #9726: Preview does not have correct font size

8 years agoFix #9490: SIGSEGV involving LyX macros --- A reproducible MWE (part II)
Enrico Forestieri [Sat, 3 Oct 2015 15:41:25 +0000 (17:41 +0200)]
Fix #9490: SIGSEGV involving LyX macros --- A reproducible MWE (part II)

8 years agoUpdate sk.po
Kornel Benko [Fri, 2 Oct 2015 19:58:07 +0000 (21:58 +0200)]
Update sk.po

8 years agoAmend d5a5fbb8e (cosmetic)
Guillaume Munch [Fri, 2 Oct 2015 18:44:36 +0000 (19:44 +0100)]
Amend d5a5fbb8e (cosmetic)

Bug #9579

8 years agoAdd a file that describe the current state of painting
Jean-Marc Lasgouttes [Fri, 2 Oct 2015 13:30:16 +0000 (15:30 +0200)]
Add a file that describe the current state of painting

This is a work in progress intended to start collective work towards improving the performance of our painting process.

The intent is to make it a living document that is updated as code evolves.

8 years agoSmall BufferView cleanup
Jean-Marc Lasgouttes [Fri, 2 Oct 2015 13:25:09 +0000 (15:25 +0200)]
Small BufferView cleanup

Rename fitCursor() to needsFitCursor() to show that it does not do any
action. Constify.

Update a few comments.

8 years agoExample Emacs configuration
Guillaume Munch [Thu, 1 Oct 2015 21:06:01 +0000 (22:06 +0100)]
Example Emacs configuration

8 years agoFix compilation with MSVC in c++98 mode
Guillaume Munch [Mon, 28 Sep 2015 17:13:19 +0000 (18:13 +0100)]
Fix compilation with MSVC in c++98 mode

8 years agoImprovements to cursor highlighting in the source panel
Guillaume Munch [Tue, 15 Sep 2015 04:56:01 +0000 (05:56 +0100)]
Improvements to cursor highlighting in the source panel

* TexRow now computes rows from a DocIterator. In practice, the cursor
  highlighting is now correct inside insets, it is no longer restricted to the
  topmost level. It certainly also makes forward-search more precise.

* Added the option to disable a texrow when not needed, for perf.

* Fixed a bug where the last paragraph was not properly highlighted.

Limitations:

* TexRow still does not handle: math (e.g. multi-cell), sub-captions, inset
  arguments.

8 years agoEnhancements and bugfixes to the TOCs
Guillaume Munch [Sun, 27 Sep 2015 06:05:00 +0000 (07:05 +0100)]
Enhancements and bugfixes to the TOCs

* New TOC "math-macro". This means that math macros can now be accessed in the
  outline pane in their order of appearance or in alphabetical order, and can be
  searched using the filter.

* Lists of floats now show subfloats deeper in the navigation menu

* The arbitrary 30 element cut-off after which nothing is shown except "Open
  Navigator..." is removed. Menus now have no limit in size, so Qt may display
  them scrollable. In exchange, we always show "Open outliner..." at the
  beginning. I tested for performance issues with a rather complex document and
  it is fine; but this does not exclude corner cases with lots of TOC entries of
  a certain kind. If necessary, populating the navigation sub-menu should be
  delayed like the main menu.

* Elements that do not contribute to the output (e.g. in a note, a disabled
  branch) are now preceded with a symbol indicating this status. (The machinery
  was already there; I wonder why it was not implemented already.) I have chosen
  U+274E NEGATIVE SQUARED CROSS MARK.

* Fix the contextual menus in the outliner (bug introduced at 94e992c5).

* Toc item now move to the caption when present, but first center on the float,
  to prevent the situation where the caption is at the top of the screen and the
  contents of the float is off-screen above the caption.
  (Internally, the action of the toc items can now be customised)

* Fix the LyXHTML output. Disabled captions no longer appear in the list of
  figures.

8 years agoFix bugs #6078 and #9364
Guillaume Munch [Sat, 29 Aug 2015 00:51:38 +0000 (01:51 +0100)]
Fix bugs #6078 and #9364

Remove unwanted clearSelection()s in MathData::updateMacros(). These calls broke
text selection with keyboard and mouse, search-and-replace, restoring selection
after Undo, etc. in a document with math macros since 1.6.0. (Regression at
6aa54673 and 12314897)

I do not know the purpose of these calls, but the selection code has been worked
on since, and I cannot produce undesired behaviour after removing
them.

8 years agoRewrite Cursor::getSurroundingPos without Bidi class
Jean-Marc Lasgouttes [Mon, 14 Sep 2015 20:13:39 +0000 (22:13 +0200)]
Rewrite Cursor::getSurroundingPos without Bidi class

New method TextMetrics::findRowElement, excerpted from CursorX.

Reimplement getSurroundingPos using Row information. This is easy when
the cursor is inside a row element. At row element edges, different
situations can occur; hopefully all these situations are taken into
account.

Rename the old getSurroundingPos to getSurroundingPosOrig and
transform getSurroundingPos into a wrapper that compares the two
methods. This will be removed when we are confident that the new
function is equivalent to the old one.

It will then be possible to remove also the Bidi class (at last!).

8 years agoRepeat after me: into account, into account, into account
Jean-Marc Lasgouttes [Fri, 25 Sep 2015 16:14:53 +0000 (18:14 +0200)]
Repeat after me: into account, into account, into account

8 years agoPDF-comment.lyx: describe a further feature
Uwe Stöhr [Sun, 27 Sep 2015 01:07:08 +0000 (03:07 +0200)]
PDF-comment.lyx: describe a further feature

- also some corrections

8 years agoCmake build: Remove support for concept checks.
Kornel Benko [Fri, 25 Sep 2015 12:55:50 +0000 (14:55 +0200)]
Cmake build: Remove support for concept checks.

See also commit 7f4101a

8 years agoFix some compilation problems in C++11 mode
Jean-Marc Lasgouttes [Fri, 25 Sep 2015 11:58:52 +0000 (13:58 +0200)]
Fix some compilation problems in C++11 mode

Only enable std::regex when the header <regex> is present (fix Mac OS X issue).

Remove support for concept checks. The page
  https://gcc.gnu.org/onlinedocs/libstdc++/manual/concept_checking.html
says about concept checking:

  Please note that the checks are based on the requirements in the
  original C++ standard, many of which were relaxed in the C++11
  standard and so valid C++11 code may be incorrectly rejected by the
  concept checks. Additionally, some correct C++03 code might be
  rejected by the concept checks, for example template argument types
  may need to be complete when used in a template definition, rather
  than at the point of instantiation. There are no plans to address
  these shortcomings.

Therefore it seems reasonable to remove our support for this.

8 years agoRemove support for precompiled headers for autotools
Jean-Marc Lasgouttes [Fri, 25 Sep 2015 08:58:17 +0000 (10:58 +0200)]
Remove support for precompiled headers for autotools

This was turned off by default for a long time, and it does not seem
to have any use these days.

8 years agoChange --enable-cxx11 configure option to --disable-cxx11
Jean-Marc Lasgouttes [Fri, 25 Sep 2015 08:47:42 +0000 (10:47 +0200)]
Change --enable-cxx11 configure option to --disable-cxx11

8 years agoTypo in tutorial.
Richard Heck [Thu, 24 Sep 2015 22:00:03 +0000 (18:00 -0400)]
Typo in tutorial.

8 years agoPDF-comment.lyx: fix 2 typos
Uwe Stöhr [Wed, 23 Sep 2015 22:15:06 +0000 (00:15 +0200)]
PDF-comment.lyx: fix 2 typos

- de.po: correct a translation

8 years agoUserGuide.lyx: accept Stephan's changes
Uwe Stöhr [Wed, 23 Sep 2015 20:54:41 +0000 (22:54 +0200)]
UserGuide.lyx: accept Stephan's changes

- port one change to the other language versions

8 years agoCorrect many different typos and logical errors.
Stephan Witt [Wed, 23 Sep 2015 19:00:27 +0000 (21:00 +0200)]
Correct many different typos and logical errors.

8 years agoinstaller: update to latest ImageMagick
Uwe Stöhr [Tue, 22 Sep 2015 23:59:28 +0000 (01:59 +0200)]
installer: update to latest ImageMagick

finally the IM people fixed the PDF image conversion problems so that I can update IM

8 years agoCmake build: Warning if system boost and stdlib-debug are used together
Kornel Benko [Tue, 22 Sep 2015 13:27:35 +0000 (15:27 +0200)]
Cmake build: Warning if system boost and stdlib-debug are used together
Change according to commit d95c187b5

8 years agoGive a warning when system boost and stdlib-debug are used together
Jean-Marc Lasgouttes [Fri, 11 Sep 2015 12:08:20 +0000 (14:08 +0200)]
Give a warning when system boost and stdlib-debug are used together

In general this would lead to an immediate runtime crash because the
runtime checks of libstdc++ change the layout of some STL objects.
Therefore, this will only work when the boost libraries have been
compiled with this same flag. At this time, it is not known whether
any linux distribution contains such libraries.

Fixes bug #9736.

8 years agoMake text insets wide as soon as they contain a display inset
Jean-Marc Lasgouttes [Mon, 14 Sep 2015 18:57:11 +0000 (20:57 +0200)]
Make text insets wide as soon as they contain a display inset

This also handles the case of a paragraph ended by a newline.

Fixes bug #9757.

8 years agoNew helper method Row::Element::isRTL()
Jean-Marc Lasgouttes [Fri, 18 Sep 2015 14:42:24 +0000 (15:42 +0100)]
New helper method Row::Element::isRTL()

8 years agode.po
Juergen Spitzmueller [Mon, 21 Sep 2015 08:24:21 +0000 (10:24 +0200)]
de.po

8 years agoAdd assertions, just to be sure.
Richard Heck [Sun, 20 Sep 2015 16:32:24 +0000 (12:32 -0400)]
Add assertions, just to be sure.

Fixes coverity issue #111941.

8 years agoWin installer: preparations for a new build
Uwe Stöhr [Sun, 20 Sep 2015 23:53:15 +0000 (01:53 +0200)]
Win installer: preparations for a new build

- the long awaited MiKTeX installer is available, this fixes many installation errors in LyX is installed for the first time (I will provide a new installer build as soon as I find more time)

8 years agoRemove unused variables found by cppcheck
Georg Baum [Sun, 20 Sep 2015 19:39:59 +0000 (21:39 +0200)]
Remove unused variables found by cppcheck

There are still a few warnings of the kind
(style) Variable 'x' is assigned a value that is never used.
since I did not touch code where I was not sure whether there might be a real
bug, and I kept some for symmetry reasons as well.

8 years agoFix missing xhtml output found by cppcheck
Georg Baum [Sun, 20 Sep 2015 18:47:33 +0000 (20:47 +0200)]
Fix missing xhtml output found by cppcheck

Actually I don't know if this operator is used at all, but if it exists then
it must output something.

8 years agoFix wrong label found by cppcheck
Georg Baum [Sun, 20 Sep 2015 18:32:45 +0000 (20:32 +0200)]
Fix wrong label found by cppcheck

It was not intended to ignore the return value of expandParagraphLabel().

8 years agoForbid wrong compiler generated copy constructors
Georg Baum [Sun, 20 Sep 2015 17:43:06 +0000 (19:43 +0200)]
Forbid wrong compiler generated copy constructors

This fixes cppcheck warnings (style) 'class x' does not have a copy constructor
which is recommended since the class contains a pointer to allocated memory.

8 years agoUse Require instead of AddToPreamble
Georg Baum [Sun, 20 Sep 2015 17:33:43 +0000 (19:33 +0200)]
Use Require instead of AddToPreamble

This plays more nicely with other modules requiring enumitem as well.

8 years agoAmend 94e992c5
Guillaume Munch [Sun, 20 Sep 2015 17:24:45 +0000 (19:24 +0200)]
Amend 94e992c5

Fix compilation with --disable-cxx11

8 years agoAdd comment regarding fall through.
Richard Heck [Sun, 20 Sep 2015 16:34:49 +0000 (12:34 -0400)]
Add comment regarding fall through.

Coverity issue #111940.

8 years agoUpdate sk.po
Kornel Benko [Sun, 20 Sep 2015 12:59:45 +0000 (14:59 +0200)]
Update sk.po

8 years agoCreate module for paralist.sty
Georg Baum [Sun, 20 Sep 2015 11:05:30 +0000 (13:05 +0200)]
Create module for paralist.sty

paralist.sty extends the standard list environments by some more compact
versions. Support for this has already been requested 15 years ago, and
now I needed it myself.

8 years agoWork around encoding bug
Georg Baum [Sun, 20 Sep 2015 10:41:44 +0000 (12:41 +0200)]
Work around encoding bug

It looks like the author names are sometimes not encoded correctly.
We'll need to find out where this happens, but for now just fix the symptom.

8 years agoFix cppcheck variable scope warnings
Georg Baum [Sun, 20 Sep 2015 08:42:35 +0000 (10:42 +0200)]
Fix cppcheck variable scope warnings

These were all flagged by "(style) The scope of the variable 'x' can be reduced."
Narowing the scope improves readability, and if it is in a loop then the
compiler will be clever enough to produce efficient code, we do not need
manual optimization for POD types.

8 years agoRefuse to run tex2lyx tests with in-source builds
Georg Baum [Thu, 17 Sep 2015 20:11:18 +0000 (22:11 +0200)]
Refuse to run tex2lyx tests with in-source builds

As Günter found out running the tex2lyx tests overwrites the test references
if the build directory is identical to the source directory. Therefore the
tests would always pass, but git diff would show a non-empty diff if the tests
should have failed. Since it is better anyway to build in a separate directory
we simply do not support srcdir = builddir for the tests and abort with an
error.

8 years agorestore crucial float information in note insets (bug #9760)
Juergen Spitzmueller [Tue, 15 Sep 2015 20:58:49 +0000 (22:58 +0200)]
restore crucial float information in note insets (bug #9760)

8 years agoNew class InsetCaptionable
Guillaume Munch [Wed, 2 Sep 2015 18:53:13 +0000 (19:53 +0100)]
New class InsetCaptionable

This generalises the new use of TocBuilder (97e8101) to listings and wraps and
removes some duplicate code.

Make sure that we will never write an empty float type again in the future
(#9760)

8 years agoBetter construction of the TOC for floats and captions
Guillaume Munch [Tue, 1 Sep 2015 16:08:35 +0000 (17:08 +0100)]
Better construction of the TOC for floats and captions

We introduce TocBuilder for building TOCs that take into account both float
insets and their captions.

* Floats without caption are shown with their content.

* Floats with a caption are shown with their caption, but clicking the entry now
  correctly moves to the float and not to the caption.

* Subsequent captions produce additional entries in the TOC.

* Figures and subfigures are correctly ordered in the outliner.

* New TOC "senseless" for captions appearing alone (a bit like broken references
are still displayed in the menu and outliner).

* Disable LFUN_CAPTION_INSERT if there is already a caption in a listing

Known issues:

* Inconsistent output for includes located inside floats

* We should record the end of the float in addition of the beginning for a more
  accurate cursor -> outliner entry conversion

8 years agoDo not show subfigures in the menu (bug #9759)
Guillaume Munch [Mon, 31 Aug 2015 02:43:30 +0000 (03:43 +0100)]
Do not show subfigures in the menu (bug #9759)

* More consistent behavour (no 30 elements limit)
* Subfloats are given depth 1
* Only show depth 0
* Always show "Open outliner..."

8 years agoSupport for (std|boost)::make_shared
Guillaume Munch [Tue, 1 Sep 2015 16:47:01 +0000 (17:47 +0100)]
Support for (std|boost)::make_shared

8 years agoCorrect commit 92b0886: true is not True in python.
Stephan Witt [Tue, 15 Sep 2015 05:18:16 +0000 (07:18 +0200)]
Correct commit 92b0886: true is not True in python.

8 years agoMath commands used in text mode now always use the current selection as contents
Guillaume Munch [Sat, 1 Aug 2015 07:05:33 +0000 (08:05 +0100)]
Math commands used in text mode now always use the current selection as contents
(#9762)

* fixes a bug where this was already the expected behaviour of
  math-subscript and math-superscript but failed.

* corrects the behaviour where if there is \newcommand in the
  selection, then a corresponding macro template is introduced
  instead of a math inset.

  * fixes a bug where math-display, math-subscript and math-supscript
    would also introduce such a macro template in a way unrelated to
    their function. Now it only happens with math-mode without
    arguments.

  * fixes a bug where a text that does not denote a macro definition,
    e.g. "aaa\newcommandaaa", would produce \invalidmacro.

8 years agoAdd some missing member variable initializations
Georg Baum [Sun, 13 Sep 2015 17:47:21 +0000 (19:47 +0200)]
Add some missing member variable initializations

These were all found by cppcheck. Even in constructors that are there "only
because of std containers" the class should be initialized correctly. You can
never know whether such an object does not get used, and then a nice crash
caused by dereferencing a NULL-pointer is better than undefined behaviour.

8 years agoReturn reference to this in operator=()
Georg Baum [Sun, 13 Sep 2015 17:43:44 +0000 (19:43 +0200)]
Return reference to this in operator=()

This is the recommendede signature of assignment operators and was found by
cppcheck.

8 years agoRemove dead code
Georg Baum [Sun, 13 Sep 2015 12:05:49 +0000 (14:05 +0200)]
Remove dead code

Thanks to Jean-Marc and coverity for finding it.

8 years agoWork around a gcc5 bug
Georg Baum [Sun, 13 Sep 2015 08:04:16 +0000 (10:04 +0200)]
Work around a gcc5 bug

The old code produced crashes with gcc5 caused by calling the copy
constructor (see https://bugzilla.redhat.com/show_bug.cgi?id=1260976).
This has been filed as gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67557
It is currently being marked as invalid (they claim the code is not valid and
produces undefined behaviour), but I don't think that this is correct.
Fortunately i does not matter for us whether the old code was valid or not,
since the new version is easier to understand and works with all compilers.

8 years agoMake destructor virtual
Georg Baum [Fri, 11 Sep 2015 21:04:59 +0000 (23:04 +0200)]
Make destructor virtual

Base classes with virtual methods should have a virtual destructor.
See Scott Meyers, Effective C++ item 7: Declare destructors virtual in
polymorphic base classes.

8 years agoFix bug #1996
Guillaume Munch [Sat, 29 Aug 2015 02:38:54 +0000 (03:38 +0100)]
Fix bug #1996

\overrightarrow and related macros have a standard behaviour with respect to
sub/superscripts.

8 years agoImprovements to the display of the source.
Guillaume Munch [Tue, 4 Aug 2015 22:16:40 +0000 (23:16 +0100)]
Improvements to the display of the source.

Fix bugs #6501 and #7359.

* Selection highlighting has been broken since a conflict with
  reverse-search was repaired (at 00a62b7c), is now fixed.

* The selection highlighting was not accurate, for LaTeX formats (in
  full source view), and meaningless, for non LaTeX formats.

* fix regression at cc00b9aa: force_getcontent_ was always true
  therefore the code to detect changes in the generated source was
  dead. The consequence is that the source view would jump to the
  beginning at each updateView() even if no change occurred. Cc00b9aa
  was meant to fix #5600, which I cannot reproduce with the new
  implementation.

* Various improvements:
  *  When the position-to-line conversion is unavailable (LyXHTML, LyX
     source, etc.) we focus on the first difference instead.
  *  Get some space around the cursor
  *  Respect the scrollbars
  *  Highlight with QTextEdit::ExtraSelections instead of cursor
     selection (the latter used to break syntax highlighting of the
     TeX code... which was not so much of an issue before because the
     wrong part was selected)

Known issues:
  * The highlighting is off by one line in very last paragraph of a
    document. This appears to be a bug in TexRow.cpp.
  * The highlighting is off for any kind of inset. This could be
    solved by adapting TexRow so that it accepts CursorSlices as
    and argument for the conversion to line number. (this is bug
    #4725)

8 years agoBetter session management for the source panel.
Guillaume Munch [Fri, 31 Jul 2015 00:05:54 +0000 (01:05 +0100)]
Better session management for the source panel.

We now remember the previous GUI values across sessions.

8 years agoImprove the performance of the source panel by using a QTimer.
Guillaume Munch [Fri, 31 Jul 2015 00:05:54 +0000 (01:05 +0100)]
Improve the performance of the source panel by using a QTimer.

Fix bug #9493. The source panel was very slow with auto-update on. Now
we use a timer that ensures that the source is generated only at
rest. The delay is short or long depending on whether we show the
source of a paragraph or the whole source.

8 years agoFix bug #9754
Guillaume Munch [Fri, 4 Sep 2015 14:27:50 +0000 (15:27 +0100)]
Fix bug #9754

Don't delay the update of the TOC panel on switching documents

8 years agoIn fileLock, take in account the case where the file cannot be opened
Jean-Marc Lasgouttes [Sat, 12 Sep 2015 21:49:32 +0000 (23:49 +0200)]
In fileLock, take in account the case where the file cannot be opened

overity issue 23352

8 years agoiInitialize a few variables in TextClass constructor
Jean-Marc Lasgouttes [Sat, 12 Sep 2015 21:11:35 +0000 (23:11 +0200)]
iInitialize a few variables in TextClass constructor

Also use proper initializers and reorder members properly.

Coverity issue 23385

8 years agoInitialize properly two members of InsetTabular
Jean-Marc Lasgouttes [Sat, 12 Sep 2015 20:54:35 +0000 (22:54 +0200)]
Initialize properly two members of InsetTabular

Also rename first_visible_cell to first_visible_cell_. I wonder though whether this variable is still useful.

Coverity issue 23383

8 years agoInitialize MathData members
Jean-Marc Lasgouttes [Sat, 12 Sep 2015 20:47:09 +0000 (22:47 +0200)]
Initialize MathData members

Coverity issues 23381 and 23436

8 years agoInitialize pointer members
Jean-Marc Lasgouttes [Sat, 12 Sep 2015 20:39:50 +0000 (22:39 +0200)]
Initialize pointer members

Coverity issue 23387

8 years agoAdd missing break in switch
Jean-Marc Lasgouttes [Sat, 12 Sep 2015 20:29:25 +0000 (22:29 +0200)]
Add missing break in switch

Coverity issue 102058