Juergen Spitzmueller
b3b22b0c70
Sync with master
2022-10-26 10:52:21 +02:00
Thibaut Cuvelier
cfb6f205fa
DocBook, InsetFloat: avoid a potential nullptr dereference when detecting the type of table for filler content.
2022-02-20 21:31:13 +01:00
Thibaut Cuvelier
51e92a5a97
DocBook: more explicit comment.
2021-12-26 02:26:50 +01:00
Thibaut Cuvelier
4c27a7307e
Amend c734504d
to fix a very bad nullptr dereferencing...
2021-12-26 02:24:06 +01:00
Thibaut Cuvelier
81274c8da7
Remove code that has been commented out for a long time.
2021-12-26 02:14:49 +01:00
Thibaut Cuvelier
c734504d3b
DocBook: in InsetFloat, detect the presence of a caption by generating it.
...
This catches the case where the caption only contains a comment, as in export/export/latex/lyxbugs-resolved/cprotect/9313-comment-in-figure-float-caption. No duplicate work is performed to ensure the same level of performance as before.
2021-12-24 01:08:24 +01:00
Richard Kimberly Heck
33f9cfb796
Capitalize labels of floats, etc. Fixes #11993 .
...
Patch from Daniel.
2021-01-03 14:38:52 -05:00
Yuriy Skalko
ecf62a8f21
Refactor OutputParams
...
Now all Inset hierarchy uses OutputParams.h included in Inset.h.
Forward declare some enums to reduce header dependencies.
2020-11-30 13:05:03 +02:00
Thibaut Cuvelier
7437a6ce3c
DocBook: fix regression in floats.
...
Also implement a valid filler for tables.
2020-11-27 23:44:48 +01:00
Thibaut Cuvelier
3f07ae9083
DocBook: for empty figures, output a message.
...
This ensures that this part of the DocBook file is valid.
2020-11-27 05:19:27 +01:00
Thibaut Cuvelier
dae0640436
DocBook: implement REVTeX.
...
Improvements to abstract detection: it can now contain lists or anything with a higher depth.
Implement video floats.
2020-11-26 06:22:27 +01:00
Thibaut Cuvelier
46cbd6d234
DocBook: refactor code about retrieving captions and labels.
...
There was already an existing method in InsetCaptionable for captions, but not yet for labels. It was at least already useful at two places, that's why I moved it to InsetCaptionable.
2020-11-15 04:03:04 +01:00
Thibaut Cuvelier
c4bbff8ecb
DocBook: fix handling of listings with titles.
...
Also implement a code path for inline listings.
2020-11-15 04:03:04 +01:00
Yuriy Skalko
10272e4747
Move include of own header to the top. Fix dependencies
2020-10-25 19:58:57 +02:00
Yuriy Skalko
919a06718a
Constify
2020-10-12 15:06:16 +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
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
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
Juergen Spitzmueller
3fc095e3bc
Do not \protect label in subfloat caption ( #11950 )
2020-08-28 07:32:29 +02:00
Thibaut Cuvelier
875f7d42e2
DocBook: avoid generating empty paragraphs instead of new pages.
...
As this required to first generate the paragraph before outputting it if necessary, tests like XMLStream::isTagOpen no more worked properly. This also refactors table handling to get rid of that case (and make code easier to read).
2020-08-02 04:03:39 +02:00
Juergen Spitzmueller
60741c3d49
InsetFloat: pass back inset-modify that is addressed to other inset
...
Fixes #9994
2020-07-13 16:46:43 +02:00
Juergen Spitzmueller
289cb58f52
Remove unneeded header
2020-07-11 16:41:34 +02:00
Juergen Spitzmueller
aaeb425230
Fix header inclusion order
...
This cures a crash with stdlib-debug on autotools
2020-07-11 12:30:14 +02:00
Juergen Spitzmueller
11a57ce6c6
Fix header inclusions
2020-07-09 17:19:01 +02:00
Thibaut Cuvelier
3883b85f49
New DocBook support
2020-07-08 08:42:16 +02:00
Jean-Marc Lasgouttes
5d4e6dfb68
Run codespell on src/insets
...
Command was
codespell -w -i 3 -S Makefile.in -L mathed,afe,tthe,ue,fro,uint,larg,alph,te,thes,alle,Claus,pres,pass-thru src/insets/
2020-06-25 23:46:16 +02:00
Thibaut Cuvelier
a6b07608d8
Rename XHTMLStream to XMLStream, move it to another file, and prepare for DocBook adoption.
...
xml.cpp/h also merges functionalities from sgml.cpp/h.
2020-06-15 13:01:56 +02:00
Juergen Spitzmueller
89b5607e0a
Centralize code to markup deleted complex objects (with tikz) in output
...
This fixes #9293
2019-12-28 13:43:17 +01:00
Juergen Spitzmueller
7c63896c60
CT: Mark deleted floats in output
...
Fixes #11175
2019-12-27 09:50:11 +01:00
Jean-Marc Lasgouttes
3aba81cf6a
Many small code cleanups suggested by cppcheck
2019-09-16 00:45:20 +02:00
Enrico Forestieri
bd21aa99d2
Fix bug #11398
...
When deciding how to strike out deleted math in change-tracking
mode, differentiate only on begin-of-line or not, and not on
after-paragraph-break or not.
The assumption that a new paragraph is always started after a
float seems to be not true and was causing this bug.
2018-12-02 18:27:38 +01:00
Enrico Forestieri
f6922b8c88
Fix bug #11174
...
Apparently, a new paragraph is started after a float even if
no blank line is actually present. So, account for this fact.
2018-06-16 20:55:38 +02:00
Juergen Spitzmueller
3e24f0da98
Implement InsetFloat::contentAlignment()
2018-05-11 15:31:04 +02:00
Juergen Spitzmueller
aa9543fa2b
Add support for global float alignment
...
It is now possible in the float settings (doc dialog) to specify a global
(inner) alignment for floats, and in the float settings, this can be
overridden (just as with float placement)
Fixes : #8665
File format change.
2018-05-10 20:15:11 +02:00
Juergen Spitzmueller
1249e5e13e
Mark some intentional fall-throughs (in a way understandable to gcc)
...
This silences -Wimplicit-fallthrough warnings with gcc7.
(Re-Apply without the unintended commits)
2017-08-12 09:06:29 +02:00
Juergen Spitzmueller
0120c3fc10
Revert "Mark some intentional fall-throughs (in a way understandable to gcc)"
...
This reverts commit 6dc1884d05
.
2017-08-12 09:04:23 +02:00
Juergen Spitzmueller
6dc1884d05
Mark some intentional fall-throughs (in a way understandable to gcc)
...
This silences -Wimplicit-fallthrough warnings with gcc7.
2017-08-12 08:57:02 +02:00
Richard Heck
75bfed5507
Fix trailing whitespace in cpp files.
2017-07-03 13:53:14 -04:00
Uwe Stöhr
58e6c6c876
InsetFloat: allow float placement for rotated floats
...
- fixes bug #10270
- fileformat change
- fixes also a bug that unwanted placement was output to LaTeX on certain cases
2017-04-15 06:57:52 +02:00
Uwe Stöhr
eb15b26801
InsetFloat.cpp: fix bug #10618
...
the label code missed to check all options (rotated, span columns)
2017-04-12 00:22:23 +02:00
Guillaume Munch
dbe0c6991b
Add safe line breaks to improve TexRow precision in subfloat & caption
2016-10-22 23:05:44 +02:00
Guillaume Munch
676a0639c5
Use otexstringstream for the captions of InsetCaptionables
...
* Enable TexRow for InsetListings caption.
* Move getCaption* from InsetText to InsetCaptionable.
* Clean-up caption generation for InsetFloat.
2016-10-17 00:16:59 +02:00
Guillaume Munch
f3256ee2cd
texstring and otexstringstream
...
texstring is a pair of a docstring and a corresponding TexRow. The row count in
the TexRow has to match the number of lines in the docstring.
otexstringstream is an output string stream that can be used to create
texstrings (i.e. it's an odocstringstream that records the TexRow information
and let us extract a texstring from it).
texstrings can be passed around and output to otexstream and otexrowstream,
which produces an accurate TexRow information by concatenating TexRows.
2016-10-17 00:16:59 +02:00
Guillaume Munch
3fd2398a28
Remove option to disable texrow
...
I suspect that the gain was negligible, yet it made debugging and maintainance
harder.
2016-09-23 23:39:48 +02:00
Richard Heck
eeb6b5b153
Revert most of dd7863b6
.
...
I did not mean to commit the caption-related stuff.
2016-07-30 01:42:08 -04:00
Richard Heck
dd7863b6ac
Fix thinko from earlier commit.
...
We need to output the deferred material AFTER the paragraph is closed.
2016-07-30 01:29:06 -04:00
Richard Heck
f1cd24243f
Be more careful with braces, due to comments.
2016-07-29 23:59:24 -04:00
Guillaume Munch
670efa8f64
Rationalise includes
...
Modifying TexRow.h or texstream.h no longer triggers the recompilation of the
complete source tree.
2016-07-04 02:42:17 +02:00