output of tags until we know they're needed. In the case of HTML
tables, empty cells should of course be output, so we need to force
the tags to be output.
This was dead code that did never work, and most of it was boilerplate that
you can steel in 15 minutes from any existing math inset. Apart from that it
did contain a pointer to InsetXYMatrix which would create the same problems
we saw with the macros.
* Inset::canTrackChange() had two meanings: can it deal with change tracking?
Will it paint its own CT status? The latter information is now given by
Inset::canPaintChange().
* Line thickness computation is moved from RowPainter to MetricsBase.
* Painting function for Changes moved to lyx::Change. (One new, that strikes
diagonally.)
RefChanger temporarily assigns a value to a non-const reference of any
kind. RefChanger provides a flexible and uniform generalisation of the various
scope guards previously derived from the old Changer class in MetricsInfo.h.
As before, a temporary assignment lasts as long as the Changer object lives. But
the new Changer is movable. In particular, contorsions are no longer needed to
change a private field. Special code can be moved into the appropriate classes,
and it is no longer necessary to create a new class for each specific use.
Syntax change:
FontSetChanger dummy(mi.base, value);
-> Changer dummy = mi.base.changeFontSet(value);
New function for generating arbitrary Changers:
Changer dummy = make_change(ref, val, condition);
Bugfix:
* Fix the display of \displaystyle{\substack{\frac{xyz}{}}} (missing style
change).
Boost.Signals is deprecated. This fixes bug #9943.
The only thing left to do is to rewrite (or get rid of) the boost -mt test
in config/lyxinclude.m4 not to use signals anymore.
Two better ways of making a class non-copyable in C++11:
* Store the p. impl. in a unique_ptr (for the cases of classes with p. impl.),
or:
* Define publicly the copy constructor and assignment as deleted
Lots of other classes could be cleaned up in this way.
This is a mechanical replacement. For now it seems that unique_ptrs are
essentially used for exception-safety. More could certainly be done to clarify
pointer ownership in general.
There is already a spacing of 2 pixels on each side of a button (e.g. collapsed inset). There is no need to add one extra pixel for command insets.
Fixes part of bug #10149.
The way it works is:
* the inset defines allowParagraphCustomization() correctly
* Text::getStatus acts on it.
Note that, in Text::getStatus, testing for cur.inset().allowParagraphCustomization() does not make much sense, since one should pass the cursor idx as parameter. Actually, for some reason the safest bet is to use the owner of the Text object as inset.
The way it works is:
* the inset defines forcePlainLayout() correctly
* Text::getStatus acts on it.
Note that, in Text::getStatus, testing for cur.inset().forcePlainLayout() does not make much sense, since one should pass the cursor idx as parameter.
There are many other lfuns that do not have to be handled directly by insets. InsetScript in particular has tests for way too many lfuns.
This method did access more CursorSlice than Text. It is only a setter for
CursorSlice with some bound checking. The new signature is
setPitPos(pit_type, pos_type).
The old name would be confusing wrt setSelection(), which does additional checks.
This one is a pure acessor, and the more complete methods are
* setSelection(), which avoids empty selections
* clearSelection(), which resets anchor, and sets word selection and mark more to false.
Most of the code should use these two instead of selection(bool), but this is for later.
Some headers contain
class Foo;
whereas there is no class Foo.
The list of class statements is given by
classes=`git grep '^\(class\|struct\) [a-zA-Z_:]*;' src | sed 's/^.* \(.*\);/\1/'|sort -u`
The ones that are useless are:
for c in $classes ; do grep -r "\\<$c\\>" src| grep -vq '^[^:]*:\(class\|struct\) [a-zA-Z_:]*;' || echo "$c"; done
When in a tabular cell, "this" is just a lone InsetText, while cur.inset() is the whole tabular. This makes a big difference, especially when one wants to count cells.
Fixes bug "9954.
Deriving from std::vector to provide helper functions appears a touch
excessive. Use typedef instead and move helper functions to the base class. New
header Toc.h provided to replace forward-declarations.
Remove TocIterator which is useless.
inset-select-all has 3 levels
1. select current cell
2. select all cells
3. select inset from outside.
The second level makes sense for tables (text and math), but not for things like a math fraction.
Introduce a new method Inset::isTable() that allows to detect this case properly and skip level 2.
This is done by implementing the clickable method. It is not possible yet to have the usual left and down arrows, because Qt does not implement them as far as I can see.
Factor the code that triggers row/column selection and fix the logic. Now it is possible to select also at the right of the tabular inset.
When several bufferviews exist for the same inset, the data that depends on the view width have to be BufferView-dependent. While this is the case for several mutable members of InsetCollapsable, some were missing.
This commit makes button_dim_ (renamed from button_dim) and openinlined_ bv-dependent.
Get rid of the hitButton function.
Remove the bv-independent geometry() method and implement editable() explicitely instead.
Fixes bug #9756.
When the box has a special width, one should not consider that as a fixed width. Otherwise, due to implementation quirks, the width will be set on screen as 1 inch.
A better solution would be to actually set the width by taking in account the contents width, height ans total height. This is not very difficult, but I do not know whether it would workout well in the work area.
Fixes bug #10048.
With this change, it becomes possible to run the following commands:
inset-forall Separator:latexpar char-delete-forward
inset-forall Separator:parbreak inset-modify separator plain
The first one deletes all latexpar separators. The second one turns parbreak
separators into plain separators. This is safe, flexible, and avoids adding a
new LFUN.
Regression at cfeddb929. If a flex inset has no layout upon saving (e.g. if a
module has been deleted) then its name became lost. This checks whether the name
resolution, introduced with the ObsoletedBy tag, comes back empty-handed (which
it will if the layout is not defined). In this case, we do as was done before
cfeddb929.
In addition, the use of support::token to strip "Flex:" off the beginning of the
name introduces a regression if somebody used a name containing ":". This
replaces it with support::split.
This is the same as the parbreak separator and is represented on screen
as the old parbreak. Old parbreak separators are converted to latexpar
separators when they are used for introducing blank lines in the
latex output rather than for separating environments.
Instead, parbreak separators are now represented on screen by a
double line. In essence, latexpar and parbreak separators produce
the same output but are represented differently on screen.
The context menu does not account for latexpar separators and only
"true" separators can be turned each into the other one.
The term LongTable has been deprecated and moreover the renaming makes the interface easier to the eye.
File format updated to 507. (conversion based on jamatos patch)
Layout format updated to 60.
tex2ylx tests updated.
Document EmbeddedObjects.lyx has been updated.
This fixes a failing unit test with 32bit gcc 4.9.3 and -O2 optimization:
It computed 9953 instead of 9954 for Length::inPixels() of value 2342.
The reason for this is probably different rounding behaviour caused by storing
the unrounded value in a processor register (uses 80bit accuracy) vs. writing
it back to memory (uses 64bit accuracy). The unrounded value is very close to
9953.5 (which is not representable as an exact IEEE floating point value).
Apart from that, having a proper function for rounding makes the code more
readable, and has the nice side effect to make Length::inPB() work for
negative lengths as well.
This concerns InsetPreview, InsetIPA and InsetMathHull.
Caching such a value is bad when opening the same buffer in two views.
In this case, it is not necessary to remember use_preview_ at all,
actually.
Also remove private member dim_ which is not used and remove some trailing whitespace.
Fixes bugs #9085 abd #9957.