Commit Graph

33279 Commits

Author SHA1 Message Date
Enrico Forestieri
d03a13d4cf Math Panels: revise the "Relations" svg icons. 2015-04-03 00:36:11 +02:00
Georg Baum
1b5875043d Fix math macro crash (bug 9418)
In the test case the crash occured in mathml export of the temporary buffer,
because the macro was updated, and because one of the used other macros was
not copied, the macro argument was detached. However, the underlying problem
of the crash was a broken ArgumentProxy::mathMacro_ reference which became
invalid each time the ownng MathMacro was copied. In the bug test case the
copying happened due to resizing a std::vector, but any other copy would have
created the same problem. The crash did not always happen, because sometimes
the old freed memory was not immediately reused, so the invalid reference did
still point to usable data.

The fix is easy: Convert ArgumentProxy::mathMacro_ to a pointer and update it
always after creating a copy of the owner. The pimpl of MathMacro from the
previous commit helps here to distinguish between the data that can be
automatically copied (in MathMacro::Private) and the cleanup that needs to be
done manually (in MathMacro). This way, the manual copy constructor and
assigment operator of MathMacro does not need to be touched if a new member is
added.
2015-04-02 21:35:05 +02:00
Georg Baum
948ed1ffd5 Pimpl MathMacro
This will make it easier to fix bug 9418.
2015-04-02 21:20:32 +02:00
Juergen Spitzmueller
5fec78f69f Properly determine active font encoding 2015-04-02 17:13:45 +02:00
Juergen Spitzmueller
b309fa5d2b Implement checkWidgets in the remaining InsetParamsWidget derived dialogs. 2015-04-02 17:03:08 +02:00
Juergen Spitzmueller
5aee9e6d63 No need for default argument 2015-04-02 16:32:04 +02:00
Kornel Benko
953e56492a Cmake tests: Test export xhtml always, independent of default output format 2015-04-02 09:51:53 +02:00
Kornel Benko
6cd29398f6 Added test for export of icon graphics in lyx info inset.
Tests the polluting of the system directory with pdf form of the
original svgz graphic.
2015-04-02 09:39:42 +02:00
Enrico Forestieri
6dff827909 Math Panels: revise the "Operators (extra)" svg icons.
Also small tweaks to some other icons.
2015-04-02 00:27:51 +02:00
Kornel Benko
36d1829991 Enable editing 'slovak.nsh' with emacs. 2015-04-01 18:16:35 +02:00
Kornel Benko
390b59011d Cmake build: Do not install .pdf icons created by export
Such files are polluting the lib/images directory if
exporting lyx-files containing lyx-info of type icon.
2015-04-01 17:26:13 +02:00
Jean-Marc Lasgouttes
11ca140667 Clean-up the undo API
* Remove the UndoKind parameter in the general interface
* move recordUndoInset to Cursor
* remove one variant of Undo::recordUndo.
* get rid of Text::recUndo.
2015-04-01 14:18:23 +02:00
Kornel Benko
db7b1acd54 Cmake tests: Test pdf exports honoring the default output format
The variable 'out_formats' was not set correctly in this case.
2015-04-01 11:50:31 +02:00
Juergen Spitzmueller
82b392eb0d GuiInfo: implement checkWidgets. 2015-04-01 10:07:20 +02:00
Juergen Spitzmueller
f819ca6c6f EuropassCV only supports pdflatex. 2015-04-01 09:47:53 +02:00
Jean-Marc Lasgouttes
a9baa5380c Fix warning 2015-03-31 17:08:04 +02:00
Jean-Marc Lasgouttes
4dcc73ebf0 Get rid of autoBreakRow, which is obsoleted by allowMultiPar()
The only real user was Text::insertStringAsLine, but this got changed
in commit 2c7152ab.

While not other place did read the value, there is a side effect of
setAutobreakRow that merges exiting paragraphs. However, this is used
in two situations

* some constructors, where the inset is empty;

* InsetTabular::toggleFixedWidth, which actually contains itself some
  code to merge paragraphs.

Therefore the member and all associated code can be removed safely.
2015-03-31 17:02:00 +02:00
José Matos
908e93df50 Fix bug #9279
Make lyx2lyx parser a bit more robust.

Ignore if the first line of a lyx file does not start with a #
Add such a line if it is missing..
2015-03-31 15:14:26 +01:00
Enrico Forestieri
0bbfadb23f Typo 2015-03-31 16:03:16 +02:00
Jean-Marc Lasgouttes
67ff68bd02 Improve the check for multiple paragraphs in Text::insertStringAsLine.
Rely only on InsetText::allowMultipar() to get this information.

Implement this method for InsetTabular and InsetBox.

Also rely on this method for disabling LFUN_PARAGRAPH_BREAK.
2015-03-31 14:07:45 +02:00
Enrico Forestieri
f516629285 Add comment 2015-03-31 01:26:48 +02:00
Enrico Forestieri
498ca9f2bf Math Panels: revise the Operators svg icons 2015-03-31 01:15:41 +02:00
Georg Baum
af6cb2d0e2 Initialize definition_ correctly 2015-03-30 22:04:52 +02:00
Georg Baum
cdd79e76a6 whitespace 2015-03-30 22:03:03 +02:00
Enrico Forestieri
f191dc4961 Math Panels: revise the "Arrows" svg icons 2015-03-30 16:08:05 +02:00
Juergen Spitzmueller
99f7b916e6 Improve read-only mode of InsetParams derived dialogs
* Disable "New Inset" button
* Do not disable line edits, but use setReadOnly instead (this allows copying contents)

Fixes: #9408

Note that some dialogs still need some care.
2015-03-30 14:44:11 +02:00
Kornel Benko
7b72010408 Update doc-files due to icon rename, this time correct 2015-03-29 17:20:35 +02:00
Kornel Benko
ecf2b9f091 Update doc-files due to icon rename
promote -> outline-up
demote -> outline-down
2015-03-29 16:49:27 +02:00
Georg Baum
417139f4da Remove InsetMathSqrt hack from MathMacro
The expanded cells of a mathmacro were previously stored in an InsetMathSqrt.
This was only used as a container for the MathData object in the first cell
of the sqrt inset, which contained the actual expanded arguments.
Funny enough, the only place were the inset property of expanded_ was really
used cannot be seen in the diff. It was MathMacro::kerning(), and this usage
was wrong, since InsetMathSqrt::kerning() always returns 0. Threfore, using
the correct type (MathData) for expanded_ does not only make the code more
readable, gets rid of an unneeded dependency, but also fixes a bug: Now the
correct kerning is returned for expanded cells. Also, expanded_ and
definition_ use the same type now, which looks nicely symmetric.
2015-03-29 14:50:37 +02:00
Georg Baum
d48855cdfe Improve CAS output of math macros
Previously, things like [ name ] where exported for computer algebra systems.
Now, the expanded macros are exported, which may still be wrong, but now the
CAS has at least a chance to understand what was meant.
2015-03-29 13:53:01 +02:00
Georg Baum
34d0e997c4 support tests do not need QtGui anymore 2015-03-29 12:56:38 +02:00
Enrico Forestieri
f96e4f1bc5 Adjust docs after cb899b3f. 2015-03-28 23:39:30 +01:00
Enrico Forestieri
cb899b3fa2 Provide icons for the outline-* lfuns.
- Accordingly rename "promote" and "demote" icons.
- Add "outline-down" and "outline-up" icons.
2015-03-28 23:22:21 +01:00
Kornel Benko
69bec00e38 Cmake tests: Make check_load tests run in sequence.
Running parallel commands 'lyx -batch ...' with files from
the same directory has lead to conflicts.
2015-03-28 22:54:08 +01:00
Kornel Benko
cc3dd7753e Cmake tests: make parallel export tests safer.
Use different temporary directory for each test.
2015-03-28 21:21:16 +01:00
Kornel Benko
fd7e4f2dbb No need to compute size of an icon if not using GUI.
This also avoids crash while calling Qimage() without GUI.
2015-03-28 21:05:41 +01:00
Enrico Forestieri
d12920d437 Use an info inset instead of a graphics one 2015-03-28 13:13:03 +01:00
Enrico Forestieri
0f0750a65a Allow using icon names in InsetInfo
Currently, only lfun names are accepeted but there are cases in which
the lfun name does not map directly to an icon. Fore example, in the
outliner, the icon named "promote" is used for the lfun outline-out.
As a result, a graphics inset is used in the documentation for describing
the corresponding icon. Now one can also use an icon name. The argument
of "info-isert icon" is firstly lookep up as an lfun. If no corresponding
icon is found, the argument is taken as the name of the icon. If no such
icon exists, the "unknown" icon is used.
2015-03-28 12:45:20 +01:00
Stephan Witt
7789f3eb37 #9477 add documentation for optional language argument of LFUN_SPELLING_{ADD,REMOVE,IGNORE} 2015-03-28 09:24:08 +01:00
Kornel Benko
83f8909a57 Udate sk.po 2015-03-27 11:17:40 +01:00
Kornel Benko
27844f580e Expand dummy_functions.cpp with needed class for check_ExternalTransforms. 2015-03-27 10:53:12 +01:00
Stephan Witt
73242e0052 #9477 improved argument handling for LFUN_SPELLING_ADD,LFUN_SPELLING_IGNORE and LFUN_SPELLING_REMOVE 2015-03-27 08:07:05 +01:00
Jean-Marc Lasgouttes
e4fe294bdc Make builds reproducible
We do not really need to use __TIME__ and __DATE__, which prevent from making LyX builds reproducible.

Fixes bug #9415.
2015-03-26 18:14:45 +01:00
Jean-Marc Lasgouttes
66fa801e74 Improve support for on screen length calculation
The computation of length on screen depend in particular of the computation of the size of an em. Many places of the code used to rely on the width of the M character, which is not really correct:
http://en.wikipedia.org/wiki/Em_%28typography%29

In digital typography, the best value to use is the point size of the font.

* Implement FontMetrics::em(), which returns the value in pixels of the EM unit.
 Convert code to use it.

* Introduce Length::inPixel(MetricsBase const &), which takes the textwidth and em information from the MetricsBase object. Convert code to use it.

* Fix several places where Length::inPixel is used without a proper em value.

* add mathed_font_em() helper function. It should eventually be removed like some other functions in MathSupport.

* Add dummy implementation of FontMetrics to tex2lyx for linking purposes.
2015-03-26 17:10:15 +01:00
Jean-Marc Lasgouttes
67e6c45f80 Call DEPM properly when going somewhere with outliner.
LFUN_PARAGRAPH_GOTO used to do a plain setCursor, whereas the more elaborate mouseSetCursor is a much better version.

Fixes bug #9479.
2015-03-26 10:45:48 +01:00
Enrico Forestieri
6d3019c7de Fix compilation with cmake 2015-03-26 02:27:11 +01:00
Enrico Forestieri
a3d5f27038 Remove the iconScaleFactor() method from src/support.
I am moving the corresponding code directly to InsetInfo.cpp.
Moreover, the size of the image displayed by the info inset is
now dynamically set according to the text size.
2015-03-25 21:26:32 +01:00
Enrico Forestieri
32f5639fbc Math Panels: revise the "Frame decorations" svg icons 2015-03-25 15:21:42 +01:00
Juergen Spitzmueller
0e62bf9e0a Fix thinko in convert_corollary_args
Fixes: #9478
2015-03-24 21:43:25 +01:00
Enrico Forestieri
3c468a3eb8 Math panels: revise the big operators svg icons. 2015-03-24 21:23:03 +01:00