Commit Graph

27014 Commits

Author SHA1 Message Date
Thibaut Cuvelier
170866986c Amend 82ea3d6
Test was done on the wrong data structure: the title is almost the only element ending up in shouldBeInInfo, it is never inmustBeInInfo.
2020-10-16 04:30:41 +02:00
Yuriy Skalko
36c8e06cf1 Move Dimension.h from InsetIPA.h 2020-10-15 19:26:16 +03:00
Yuriy Skalko
5ac65d1532 Move BufferParams.h from Language.h 2020-10-15 19:25:37 +03:00
Yuriy Skalko
87d19e1068 Remove BufferParams.h from BiblioInfo.h 2020-10-15 19:25:19 +03:00
Daniel Ramoeller
d5fe3337c6 Cleanup CutAndPaste.cpp 2020-10-15 10:24:00 +02:00
Richard Kimberly Heck
1f22a2520a Fix linking problem by adding convert from string to unsigned long long. 2020-10-14 22:28:10 -04:00
Pavel Sanda
c0f9309300 Move <fstream> from support/gzstream.h 2020-10-14 15:12:48 +02:00
Pavel Sanda
644c1d3453 Move docstream.h from output_xhtml.h 2020-10-14 15:06:12 +02:00
Pavel Sanda
560ff6d40d Move MetricsInfo.h from InsetMathSize.h 2020-10-14 14:58:18 +02:00
Pavel Sanda
2b02b73f4a Move <QTimer> from TocWidget.h 2020-10-14 14:48:41 +02:00
Pavel Sanda
bd33601512 Move <QTimer> from GuiViewSource.h 2020-10-14 14:37:38 +02:00
Pavel Sanda
85eec10e4b Move <QKeyEvent> from DockView.h 2020-10-14 14:35:29 +02:00
Pavel Sanda
61824e057e Move GuiView.h from DockView.h 2020-10-14 14:28:47 +02:00
Pavel Sanda
57703d51c6 <QCloseEvent> DialogView.h -> DialogView.cpp 2020-10-14 13:57:30 +02:00
Pavel Sanda
f1b147cc97 include "GuiView.h": DialogView.h -> DialogView.cpp 2020-10-14 13:53:40 +02:00
Pavel Sanda
10fafd3bfe <map> ParagraphMetrics.h -> TextMetrics.h 2020-10-14 13:14:58 +02:00
Pavel Sanda
da8b5de973 Move <algorithm> from DocIterator.h 2020-10-14 13:01:30 +02:00
Richard Kimberly Heck
b7f632ca1c Fix bug #12002.
Patch from Daniel.
2020-10-13 19:51:27 -04:00
Richard Kimberly Heck
1ff2de387d Whitespace 2020-10-13 18:26:13 -04:00
Richard Kimberly Heck
28ae543a2a Fix signed-ness warnings 2020-10-13 18:24:03 -04:00
Pavel Sanda
0ea9df7467 Add inset for \nopagebreak.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg213388.html
2020-10-13 19:13:59 +02:00
Jean-Marc Lasgouttes
c516c86d19 Make cursor width depend on current font
This makes the cursor more visible wrt current font.

Moreover make the cursor width scalable by default.
2020-10-13 17:27:52 +02:00
Jean-Marc Lasgouttes
310c94c48c Fix display of caret completion indicator
The zooming algorithm based on caret width was deeply flawed. It is
not replaced with a formula based on caret height.

Fixes bug #12000.
2020-10-13 17:09:33 +02:00
Yuriy Skalko
2a594d3e90 Remove unused forward declarations 2020-10-13 09:57:36 +03:00
Thibaut Cuvelier
769578eac6 Fix typos in filetools.cpp. 2020-10-13 00:33:05 +02:00
Thibaut Cuvelier
82ea3d67ec DocBook: documents must have a title. 2020-10-12 19:26:37 +02:00
Thibaut Cuvelier
92b9c82dea Fix compilation on Visual C++.
Without this patch, there would be errors like these (warnings turned into errors):

D:\LyX\lyx-unstable\src\frontends\qt\GuiView.cpp(2413): error C4101: 'e': unreferenced local variable
D:\LyX\lyx-unstable\src\frontends\qt\GuiView.cpp(4879): error C4101: 'ex': unreferenced local variable
2020-10-12 19:21:58 +02:00
Yuriy Skalko
cb52dd2e42 Add override in VCBackend 2020-10-12 15:14:55 +02:00
Yuriy Skalko
238fd9ac50 Right exception rethrowing 2020-10-12 15:14:55 +02:00
Yuriy Skalko
919a06718a Constify 2020-10-12 15:06:16 +02:00
Richard Kimberly Heck
2dc4277452 Const 2020-10-10 17:12:50 -04:00
Richard Kimberly Heck
b28bd27932 Fix warning 2020-10-10 17:12:50 -04:00
Yuriy Skalko
7d38a4d126 Loop refactoring 2020-10-09 09:04:20 +03:00
Richard Kimberly Heck
b511d8d93e Use 'delete' for unimplemented constructors.
Thanks Yuriy!
2020-10-07 11:05:54 -04:00
Thibaut Cuvelier
0bd2978ac9 DocBook: add DocBookInnerTag and family.
This allows old DocBook documents to be valid when output.
2020-10-07 06:05:22 +02:00
Thibaut Cuvelier
6a0e93f162 Amend 249d899
Non-ASCII characters make std::isspace crash, but not lyx::isSpace.
2020-10-07 04:49:20 +02:00
Richard Kimberly Heck
3d46cc302b Use explicit default syntax (C++11).
Thanks to Jos'e for noticing this option.
2020-10-06 20:31:11 -04:00
Richard Kimberly Heck
0f417f2a06 Fix some warnings 2020-10-06 12:27:28 -04:00
Richard Kimberly Heck
bff97ba76d Explicit InsetTableCell copy constructor 2020-10-06 12:20:31 -04:00
Pavel Sanda
ffbcac3dde Add few examples for lineno options.
It's actually pretty hard to get that from the manual.
2020-10-06 15:05:11 +02:00
Thibaut Cuvelier
249d899298 DocBook: clean output when fonts span over text that ends with a space 2020-10-05 16:22:58 +02:00
Jean-Marc Lasgouttes
c46f3b8f31 remove unused variable 2020-10-05 15:11:51 +02:00
Yuriy Skalko
c5ae08f0b8 Amend efc0877f
Add the last `override`s.
2020-10-05 15:03:13 +02:00
Yuriy Skalko
fe85162a29 Refactoring 2020-10-05 14:55:00 +02:00
Yuriy Skalko
d82adc625b Amend efc0877f
Add more `override` specifiers. Replace `throw()` to `noexcept`.
2020-10-05 09:37:15 +02:00
Yuriy Skalko
14b0da28c2 Amend efc0877f 2020-10-03 21:17:17 +02:00
Yuriy Skalko
715b8cda54 Refactoring based on cppcheck suggestions 2020-10-03 13:39:51 +02:00
Kornel Benko
a43d8501a2 Do not use runparams.nice == true while exporting to docbook5
The setting implies that the variable external_in_tmpdir is set to false.
If a lyx-file includes external material for spreadsheet,
the conversion results are in tmpdir.
The routine doSubstitution() (insets/ExternalSupport.cpp:188) therefore
does nothing for the entry $$Contents because it uses wrong path.
2020-10-03 13:28:26 +02:00
Yuriy Skalko
efc0877f8f Add override specifiers to improve code maintainability 2020-10-03 12:43:48 +02:00
Juergen Spitzmueller
2330b4ce9c Never mark references in inactive insets broken
This is the sledgehammer (and the only) way to omit broken refs if the
target is in an (or the same) inactive inset as well.
2020-10-03 08:54:06 +02:00
Richard Kimberly Heck
2afc68ede2 Whitespace 2020-10-02 13:11:28 -04:00
Jean-Marc Lasgouttes
dd65a97b55 Pass parameters as const references when possible
Fixes some cppcheck warnings.
2020-10-02 18:56:01 +02:00
Jean-Marc Lasgouttes
4d9a2c2e59 Fixup f96b99dc: do not initialize cache too late 2020-10-02 12:17:57 +02:00
Jean-Marc Lasgouttes
a97b384b07 Fixup f96b99dc: thinko
Setting the res value and returning from the function at the same time
does not make sense. After reflection, it is the "return" that shall
go.

No idea what effect it had.
2020-10-02 12:06:32 +02:00
Juergen Spitzmueller
8b155ce957 Refactoring 2020-10-02 08:30:31 +02:00
Juergen Spitzmueller
720179947e tex2lyx: properly set textclass if no class is given
(snippets without \documentclass and no forced class)
2020-10-02 08:17:45 +02:00
Jean-Marc Lasgouttes
e16b9e8d22 Remove non-const version of ParagraphMetrics::getRow
Constify a bit TextMetrics::isRTLBoundary().
2020-10-01 14:58:18 +02:00
Jean-Marc Lasgouttes
a2b754b10b Fixup 7d965319: reset cursor font at a finer level 2020-10-01 14:19:09 +02:00
Jean-Marc Lasgouttes
7f1b1729b4 Cleanup the caret geometry code
Intended changes:

* code is shorter and cleaner

* caret scales better with zoom when cursor_width=0: completion
  indicator, l-shaped cursor...

Details:

* Rename BufferView::getPosAndHeight to getPosAndDim because ascent is
  needed too and width could in the future be set depending on font.

* Get rid of rect_ in CaretWidget and record a Dimension (and y value) instead.
  Remove also caret_width_ and slant_, replace rtl_ with dir.

* Make CaretWidget members public and lose the trailing _.

* change CaretWidget::update to read its parameters from current bufferview.
2020-10-01 13:17:01 +02:00
Jean-Marc Lasgouttes
7d96531909 Fix bug where cursor size is not reset correctly.
A couple of calls to setCurrentFont fix the issue, but there has to be
more cases to catch. I am not sure why it used to work.
2020-10-01 12:44:38 +02:00
Jean-Marc Lasgouttes
f9aadae290 Get rid of helper Text::previousWord(), used only once 2020-09-29 10:15:31 +02:00
Richard Kimberly Heck
a41bcb3701 Error message 2020-09-28 22:45:44 -04:00
Richard Kimberly Heck
003a267764 We really do not want id to change 2020-09-28 22:20:22 -04:00
Richard Kimberly Heck
594401912b Fix minor annoyance with previous commit.
When validating local layout, in particular, we create a dummy text TextClass
and so are not necessarily modifying previously declared material. Hence, we
get a spurious (but harmless) "Incomplete argument definition!" warning. This
suppresses it, but to do that we need to propogate the ReadType.
2020-09-28 22:07:08 -04:00
Richard Kimberly Heck
6f643e52d4 Allow argument definitions in layout files to modify existing ones.
This is what layout re-definitions do in all other cases.
2020-09-28 22:06:11 -04:00
Richard Kimberly Heck
54a72663ae Move defaults into struct definition 2020-09-28 21:30:40 -04:00
Pavel Sanda
ad475adfd3 amend 6d6fc761be 2020-09-28 16:44:12 +02:00
Pavel Sanda
6d6fc761be Qt4 compilable again 2020-09-28 16:34:42 +02:00
Yuriy Skalko
e47092044b Use real italic slope for slanted caret 2020-09-28 14:30:05 +02:00
Juergen Spitzmueller
b38500353c Amend 448e5efab4
Only set langClosed to true if it really has been closed.
2020-09-26 12:12:09 +02:00
Enrico Forestieri
f0807a604c Use correct bounding box when exporting from command line
Without GUI an image is not available even if it is actually cached.
In this case we load the image for obtaining its dimensions in order
to correct the clipping bounding box.

This amends 380f34a1.
2020-09-25 20:58:40 +02:00
Enrico Forestieri
a8572c1358 Correct comment 2020-09-25 12:11:10 +02:00
Enrico Forestieri
9b1763cd42 Do not correct clipping bounding box for vector formats
This amends 380f34a1 that only took into account the postscript format.
2020-09-25 12:01:57 +02:00
Jean-Marc Lasgouttes
967f4d661e Remove default parameter of UndoGroupHelper constructor
This can lead to mistakes. If no buffer is required at the beginning,
it is better to pass 'nullptr' explicitly.

Fix a case of missing parameter in GuiCompleter (introduced at
f3656600). This avoids some spurious "There is no group open (creating
one)" messages.
2020-09-23 17:33:17 +02:00
Jean-Marc Lasgouttes
32b688225d Do not use a fake row to compute completion dimension
The code in TextMetrics::completionPosAndDim is needlessly complicated.

1/ It is easier to rely directly on Text::getWord() rather than on the
   helper previousWord().

2/ Using a fake row to compute completion height is overkill. A
   simpler solution is proposed here.

No intended effect. These changes prepare the fix to ticket #11818.
2020-09-22 15:11:08 +02:00
Juergen Spitzmueller
b814c4fda7 Fix unnecessary cprotect 2020-09-20 08:45:42 +02:00
Thibaut Cuvelier
da67bde61a Revert "XHTML: remove DOCTYPE, as the document is then understood as HTML4/XHTML1, and not XHTML5."
This reverts commit c8e2c17a: this makes some browsers unable to understand basic HTML entities.
2020-09-20 01:35:14 +02:00
Thibaut Cuvelier
44a7d2bc88 DocBook: adapt code for older GCC. 2020-09-19 23:55:07 +02:00
Thibaut Cuvelier
b5adcec28a XHTML: fix for encodings in attributes (patch by Kornel) 2020-09-19 20:43:42 +02:00
Thibaut Cuvelier
c83fd0eb06 XHTML sections: saner code to close the section.
It only caused troubles in corner cases...
2020-09-19 20:43:42 +02:00
Thibaut Cuvelier
a85b4b88ed XHTML sections: only filter out things that are not Sectioning, not based on the level. 2020-09-19 20:43:42 +02:00
Thibaut Cuvelier
0dfa240209 XHTML: restore sections. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
15dbc2b9ab Revert "XHTML: remove <section> support."
This reverts commit 52216b73
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
c8e2c17a58 XHTML: remove DOCTYPE, as the document is then understood as HTML4/XHTML1, and not XHTML5. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
92ad86dacc XHTML: remove <section> support. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
bfeb3b66b1 DocBook: slight code simplification. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
6c51cabd35 DocBook: fix output in Layout::write. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
50f011e062 DocBook: implement InsetBox titles. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
3711a38b9c DocBook: fix a crash in bibliography paragraphs. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
1b818c448d DocBook: work for more subfigure cases.
EmbeddedObjects hid quite a few gems :).
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
8758000641 DocBook: ensure xml:id is not output too many times.
This is mostly important for subfigures, but debugging this issue showed that InsetCaption could be slightly simplified and InsetLabel should be made a tad more robust.
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
d0a5ba4859 DocBook: handle other cases of subfigures. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
9a48c8d22b DocBook: fix handling of new lines and fonts.
Only the font variable was restored to the right state, not fs.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
5f0720e947 XHTML: fix generation of many useless </section>. 2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
faec783822 XML: bad fix for a crash that only happened in XHTML.
As an error is output, I suppose that this behaviour is OK.
2020-09-19 20:43:40 +02:00
Scott Kostyshak
a632a9ae3c DocBook: remove useless functions. 2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
1a76fb9658 DocBook: avoid using isspace in StartTag::writeTag.
This is the cause of crashes (on both Windows and Linux).
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
2cd7a94f8b DocBook: introduce Floating::docbookFloatType.
This ensures that all comparisons for DocBook are made on the same normalised version of the float type. This cased a strange bug where <table> was output within <informaltable> for Linguistics Tableaux.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
8ed8d36595 Fix two warnings in BufferView. 2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
40f4da3c9f DocBook: floats can no more override DocBookTag.
This lead to a quite subtle bug. The major problem is that float tags
depend on whether the LyX float has a title (formal) or nor (informal).
This information cannot be encoded in the layout format as easily as a
simple DocBookTag.
2020-09-19 20:43:40 +02:00