Commit Graph

617 Commits

Author SHA1 Message Date
Juergen Spitzmueller
9dd71b9e4a Recent multirow finally allows multiple paragraphs 2021-01-30 09:15:14 +01:00
Juergen Spitzmueller
52196d6c48 Set proper multirow size in X table columns 2021-01-29 10:15:36 +01:00
Juergen Spitzmueller
c5e5dda0ef Some minor polishment 2021-01-26 14:50:14 +01:00
Juergen Spitzmueller
27e7eb4b14 Fix copy-paste error (#12092) 2021-01-26 14:48:12 +01:00
Juergen Spitzmueller
82a8ed4d55 Allow to move multiple (selected) columns/rows (#9045) 2021-01-25 19:00:50 +01:00
Juergen Spitzmueller
a05c7b3555 Fix alignment missetting with multirows (#10826) 2021-01-25 09:09:07 +01:00
Juergen Spitzmueller
4029680413 Fix on-screen vertical alignment in some table cells (#7757) 2021-01-24 15:28:37 +01:00
Juergen Spitzmueller
7f78050957 Fix metrics of varwidth cells (#12089) 2021-01-23 15:22:09 +01:00
Juergen Spitzmueller
8d09fb5bf0 Support non-default styles in multirow 2021-01-23 14:53:51 +01:00
Juergen Spitzmueller
5979a01b1d Allow paragraph and line breaks in multirow (#12083) 2021-01-23 14:24:54 +01:00
Juergen Spitzmueller
7bd072e750 Fix status of tabular function 2021-01-23 08:10:55 +01:00
Juergen Spitzmueller
0b0757916e Format incremented to 605: Extended variable table cell support
- Multicolumn now supports multiple paragraphs in non-fixed-width context.
- Multicolumn now supports valign in non-fixed-width context.
- varwidth columns now properly align horizontally and vertically.
2021-01-22 19:16:43 +01:00
Jean-Marc Lasgouttes
9e1db65932 Move handling of LFUN_COPY to BufferView
It turns out that the code is the same in texted ans mathed and that
whatever is done in InsetTabular is not useful.

This means that we do not need to deal Text::dispatch idiosyncrasies
(in particular forcing the cursor to be visible).

Fix bug #11225.
2021-01-08 19:31:42 +01:00
Juergen Spitzmueller
18f7dce3d9 Implement inset-split (only for text insets for now) (#10260) 2020-12-24 10:48:52 +01:00
Yuriy Skalko
9cb98136ce Cleanup headers 2020-12-03 00:38:27 +02: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
Yuriy Skalko
ad7c5568cd Make InsetIterator compatible with range-based loops 2020-11-29 00:25:19 +02:00
Yuriy Skalko
6a21ec854b Move several common types to support/types.h 2020-11-27 12:16:22 +02:00
Yuriy Skalko
5061db891c Use const references 2020-11-01 22:23:26 +02:00
Yuriy Skalko
84365fc946 Move Author.h, Format.h from BufferParams.h 2020-10-16 08:02:51 +03: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
Yuriy Skalko
fe85162a29 Refactoring 2020-10-05 14:55:00 +02:00
Enrico Forestieri
f5672a4843 Switch font for multipar insets
Use font switches for insets that allow paragraph breaks rather
than insets that do not inherit outer font settings. No change of
behavior is intended with respect to the current status, but this
will allow a simple and effective fix for #10263.
2020-08-12 16:25:35 +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
Thibaut Cuvelier
e302757476 Add support for CALS tables in DocBook. 2020-07-16 00:40:16 +02:00
Thibaut Cuvelier
3b740d0c8f DocBook: add support for LYX_ALIGN_BLOCK and LYX_ALIGN_DECIMAL in tables 2020-07-15 16:17:16 +02:00
Jean-Marc Lasgouttes
32f06d01ec Revert "Improve handling of top and bottom margin"
It turns out this is not ready at all.

This reverts commit ff7cdf1b74.
2020-07-13 00:00:36 +02:00
Jean-Marc Lasgouttes
ff7cdf1b74 Improve handling of top and bottom margin
The 20px space on top and bottom of document have traditionally been
obtained by adding the to the ascent/descent of the first/last row.
This reads to annoyances like selections that are drawn in these
margins and issues with the nesting marker.

The change is to add the values to a separate member of the Row
object, and to add new Row::total(Ascent|Descent) methods that add the
effect of this padding.

Moreover, some methods are added to TextMetrics to simplify the
BufferView code.

Fixes bug #9545.
2020-07-12 20:32:04 +02:00
Richard Kimberly Heck
8ae0841826 Whitespace 2020-07-08 12:38:05 -04:00
Thibaut Cuvelier
3883b85f49 New DocBook support 2020-07-08 08:42:16 +02:00
Pavel Sanda
28968b1f0d Add required elements in the layouts to support DocBook.
Slightly modified patch from Thibaut Cuvelier.
2020-07-07 09:49:48 +02:00
Juergen Spitzmueller
3718ff9a15 Fix c&p of tabular data between different LyX instances (#4448) 2020-06-29 18:52:10 +02:00
Juergen Spitzmueller
7f773cf24e Resize table if needed on multi-cell paste 2020-06-29 17:51:24 +02:00
Juergen Spitzmueller
5cb89a8f81 Implement proper pasting from multiple table cells to non-table (#4447) 2020-06-29 15:13:45 +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
Jean-Marc Lasgouttes
ba738d0167 Use new rowFlags() values to remove some inset hardcoding.
The enum DisplayType is replaced with the flags RowFlags that can be
combined. Here is the correspondence between the old DisplayType and
the new Inset::RowFlags:

DisplayType   RowFLags             Meaning
 Inline        Inline               plain inline inset
  --           BreakBefore          row ends before this inset
  --           BreakAfter           the row ends after this inset
 AlignCenter   Display	            the inset is centered on its own row
 AlignLeft     Display | AlignLeft  the inset is left-aligned on its row
 AlignRight    Display | AlignRight the inset is right-aligned on its row
  --           RowAfter             an extra row is needed after this inset

Display is just a shortcut for BreakBefore | BreakAfter.

The flags for the newline inset will be BreakAfter | RowAfter,
while the separator inset will just use BreakAfter.

This groundwork does not introduce any new feature at this point. It
aims to remve the numerous isNewLine and isSeparator all over the
code, and to eventually optional break after some insets like spaces
(see #11621).

Most display() methods are renamed to rowFlags(). Some are removed
because they returned Inline.

Now display() is only a helper function for hull insets.
2020-06-22 23:11:40 +02:00
Jean-Marc Lasgouttes
5aadf0879f Pass BufferParams by address
Spotted by coverity.

Note that this probably fixes a bug in getTokenValue(), where an author
was added to the BufferParams copy.
2020-06-18 11:17:32 +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
cbe75042c0 Do not track row/column deletion in paste_tabular
Fixes #11884.
2020-06-07 19:18:00 +02:00
Richard Kimberly Heck
8a4bb40c7e Fix typo. 2020-05-01 19:47:50 -04:00
Juergen Spitzmueller
1e409a1a75 Properly resolve tracked changes when pasting multiple tabular cells
Fixes #11791
2020-03-21 15:54:37 +01:00
Juergen Spitzmueller
d94b708a0f Tell updateBuffer whether an inset is deleted.
Fixes #11747
2020-03-06 13:23:01 +01:00
Stephan Witt
e900b61d46 Make cell index of tabular local for column loop. 2020-02-12 12:32:31 +01:00
Juergen Spitzmueller
62a2b69bb0 Remove terminating linebreak 2020-01-16 10:19:52 +01:00
Jean-Marc Lasgouttes
0ef2c192c0 Replace the hardcoded TEXT_TO_INSET_OFFSET by tunable values
The basic value is Inset::textOffset(BufferView*), which can in theory
change with the BufferView zoom and dpi. It is hardcoded to 4 for now.

Moreover, we introduce the virtual inset methods
(top|bottom|left|right)Offset, which can be tweaked for each inset.

No change intended (for now).
2020-01-15 11:13:54 +01:00
Juergen Spitzmueller
8bd47bda8c Improve comments 2020-01-15 08:40:51 +01:00
Juergen Spitzmueller
a940e9d709 Cross out ct-deleted tabular rows/columns in workarea 2020-01-15 08:37:35 +01:00
Juergen Spitzmueller
218731c3eb Whitespace 2020-01-14 16:23:09 +01:00