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
Thibaut Cuvelier
08a58242c1
DocBook: better output with the Linguistics module.
...
One issue left: <table> output within an <informaltable>, that does not make sense... I'm debugging it.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
abed1f3e6e
DocBook: fix crash with Linguistics example.
...
This was due to Floating::docbookTag not returning anything with the floattype_ tableau. Another issue that happened with that document is that the standard library's isspace crashed for some characters. I therefore implemented a more efficient version of the part that required it, and inlined the definition of isspace (even though that part becomes irrespective of locale, but was that feature ever used?).
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
594a4763b7
Fix a few warnings.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
e3da8b65f6
DocBook: several missing features for Additional.lyx.
...
Includes: semantic markup (sorry about noun: Additional.lyx uses it to mark menus; there is something better in DocBook, but it looks like the LaTeX equivalent is really for person names), boxes, info layouts.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
19734ea454
DocBook: implement LyX-Code.
...
This is quite ugly.
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
bc9d3ec262
DocBook: <person> is not valid per se, rather use <personname>.
...
The cleanest solution would still be <person><personname>, but this ought to be enough. Otherwise, that would imply having two tags for some fonts...
2020-09-19 20:43:40 +02:00
Thibaut Cuvelier
8f3d0fd88f
DocBook: new-line behaviour in bibliographies.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
6d246bba69
DocBook: fix margin notes.
...
They were nested twice in <sidebar>. Also fixes a new line issue.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
91982ee105
DocBook: new lines around formulae.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
e995414917
DocBook: avoid generating fonts for "special cases" like equations.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
654559feb8
DocBook: fix line issues around programlisting.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
9d3a717ef1
DocBook: fix font issues when a paragraph has an InsetNewline.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
7a1b82a16a
DocBook: fix issue with fonts.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
c3aa843da8
DocBook: fixes in bibliography (missing new line at the end).
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
6688b076cc
DocBook: fixes in lists.
...
Actually output something when list item is empty. XMLStream discarded the sequence StartTag/EndTag (nothing in between).
New-line behaviour around term in description lists.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
5b01c80635
DocBook: fix titles in KOMA Script.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
976bd91fc2
DocBook: bug fixing with wrapper merging.
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
ec0f4885a7
DocBook: fix bibliographies (end of <bibliography> and sections).
2020-09-19 20:43:39 +02:00
Thibaut Cuvelier
642b18aad0
DocBook: generate <partintro> when required.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
17b06f5336
DocBook: streamline code to handle sections.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
f219fe1cd7
DocBook: streamline code to handle abstracts.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
a8da31e5e0
DocBook: fix handling of index end-of-range.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
78a361778f
DocBook: fix float tags (was unduly overridden).
...
The output was not valid for floats without title.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
39ad6e84f0
DocBook: improve equation formatting (new lines for block equations).
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
fc2c36289b
DocBook: rewrite makeListEnvironment.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
8656fbd520
DocBook: start splitting environment handling in two, to have proper things for lists.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
1bd49f9c39
DocBook: make all make* functions have the same argument order.
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
fc0999a422
DocBook: partially remove use of bpit/epit in docbookParagraphs and docbookSimpleAllParagraphs.
...
This will help with the next refactoring to be much cleaner (only work with iterators, don't maintain twice the same information).
2020-09-19 20:43:38 +02:00
Thibaut Cuvelier
bfc67c59b4
XML: use the new mechanisms for CR detection with errors.
...
This helps tracking down line problems even in the presence of errors.
2020-09-19 20:43:38 +02:00