Commit Graph

24244 Commits

Author SHA1 Message Date
Uwe Stöhr
da8b732443 Move mathindent from text layout to math settings as discussed 2017-04-25 03:01:39 +02:00
Uwe Stöhr
3f8c15a7c6 support for the document class option leqno
- fileformat change
2017-04-25 02:28:10 +02:00
Guillaume MM
62c9d0f640 Mover.h: let move be defined
We cannot use default for ~Mover() because gcc 4.6 cannot cope with it.
2017-04-24 10:53:39 +02:00
Scott Kostyshak
ee7d78d1dc Revert "Mover.h: let move be defined"
This reverts commit d4ea07705a.

d4ea0770 lead to a compile error with gcc 4.6. The error is likely
due to that version's weak C++11 support.

This commit reverts d4ea0770 in order to preserve compilation with
gcc 4.6 for alpha1.
2017-04-21 22:41:03 -04:00
Günter Milde
69e3e00603 Fix tex2lyx roundtrip ctests.
The last commit accidentially changed the encoding
of a sample file.
2017-04-21 14:03:37 +02:00
Stephan Witt
a91402dc64 use examples folder setting from preferences 2017-04-21 11:27:11 +02:00
Guillaume MM
4fc8c7fedd MathAtom: prefer composition over inheritance 2017-04-20 23:49:02 +02:00
Guillaume MM
d4ea07705a Mover.h: let move be defined 2017-04-20 23:49:02 +02:00
Tommaso Cucinotta
31adae1f23 Fix for crash/segfault introduced with [244de5d2/lyxgit], thanks Guillame. 2017-04-20 23:41:10 +02:00
Günter Milde
f5ac0580ff special character "allowbreak" (ZWSP), fileformat change
New special character to mark an optional line break
without inserting a hyphen (ZWSP). See #10585.

Corresponds to the Unicode character U+200B ZERO WIDTH SPACE

 This isn't a “space”. It is an invisible character that can be used
 to provide line break opportunities.
 ​http://unicode.org/notes/tn27/

While the literal Unicode character can be used in the LyX
file, it is invisible in the GUI.

For visible feedback, the patch adds a new special character "allowbreak".

The small mark is inspired by LibereOffice.
A tooltip is added.
2017-04-20 23:28:48 +02:00
Uwe Stöhr
6cabf4948f GuiDocument: re-introduce allowMathIndent()
was accidentally reverted by [d86954eb/lyxgit]
2017-04-20 23:21:11 +02:00
Jean-Marc Lasgouttes
b2e759d8b2 Make top/bottom margin value DPI-dependent
One less hardcoded pixel value.

Use thisoccasion to set the left/right margin in inches too, since it
is easier to compute.
2017-04-20 18:07:50 +02:00
Jean-Marc Lasgouttes
df6b2f4470 Rewrite mathindent without HSpace class
Use Length instead of HSpace for math_indentation and rename it to mathindent.
Get rid of the string version.

Rename (g|s)etMathIndentation() to (g|s)etMathIndent().

Remove the HSpace class altogether.

Some cleanups to parindent support to look like mathindent.
2017-04-19 17:55:56 +02:00
Jean-Marc Lasgouttes
d86954eb81 Revert "BufferParams: get rid of the HSpace class for mathindent as requested by JMarc"
This reverts commit d9a2a40268.

This is not the right way of getting rid of HSpace. We need a proper
Length, not a string.
2017-04-19 16:19:18 +02:00
Jean-Marc Lasgouttes
e7c3354a87 Fixes to ParIndent support
- remove quotes around length
- use "default" for default parindent, instead of an empty string
- Fix the constructor Length(string const &) so that an empty string
  corresponds to an empty length (coherent with Length::asString()).
2017-04-18 18:06:35 +02:00
Jean-Marc Lasgouttes
b250eb5a46 Autotools: use silent rule for moc in src/support. 2017-04-18 14:45:05 +02:00
Uwe Stöhr
17a53bbcf9 GuiDocument.cpp: add missing validation code 2017-04-17 20:58:09 +02:00
Uwe Stöhr
d9a2a40268 BufferParams: get rid of the HSpace class for mathindent as requested by JMarc 2017-04-17 20:32:31 +02:00
Jean-Marc Lasgouttes
fc4ca36403 Cleanup parindent support
Rename (g|s)etter to (get|set)ParIndent(), and rename member variables
accordingly.

Do not rely on HSpace anymore, since Length does have all we need.
2017-04-17 18:30:33 +02:00
Stephan Witt
b5c2859a92 Revert "update canAutoOpenFile/autoOpenFile implementation to new MacOSX API, avoid deprecated calls"
This reverts commit d568846e03.

Unfortunately the used alternative API LSCopyDefaultApplicationURLForContentType
is available with 10.10 and later only and cannot be used therefore. So there
is no alternative to deprecated calls ATM. LyX 2.3 should run on 10.7 at least.
2017-04-17 01:42:38 +02:00
Tommaso Cucinotta
4f75026176 lyxfind: cleanup regex_replace() and back to a sane amount of logging during findadv operations. 2017-04-17 00:41:29 +02:00
Tommaso Cucinotta
6d05a96546 findadv: match \textbackslash and \textasciicircum also without trailing {} (fixes autotest findadv-re-02-in.txt). 2017-04-17 00:38:31 +02:00
Tommaso Cucinotta
664798128a findadv: almost all test cases, including \regex[{}, back to working with std::regex. 2017-04-17 00:15:26 +02:00
Scott Kostyshak
742b39f49d Do not open or close branches after doc settings
When applying or saving Document Settings, LyX no longer opens or
closes branch insets. The intent of the previous code was to open
branch insets of a branch that is activated, and close branch insets
of a branch that is deactivated.

After some discussion [1], it was decided that the behavior intended
by the previous code was inconsistent with activating/deactivating a
branch in the context-menu of a branch inset, and the previous code
assumed a workflow of the user, rather than letting the user
separate opening/closing branch insets from activating/deactivating
them.

This commit modifies fd6cd728.

[1] https://www.mail-archive.com/search?l=mid&q=20161030220813.3zlp3zgqgomhx35y%40steph
2017-04-16 16:54:29 -04:00
Kornel Benko
28c320e1a0 findadv: fix compilation issue from [lyxgit/ecc36be6], when using boost instead of std regex. 2017-04-16 19:43:54 +02:00
Tommaso Cucinotta
ecc36be60b findadv: avoid crash when regexp-based search fails (mitigates #10625). 2017-04-16 11:27:34 +02:00
Uwe Stöhr
3677c20be9 BufferParams.cpp: correct output for \mathindent after [fc1c5c6f/lyxgit]
- also adapt the lyx2lyx logic to the changed implementation
2017-04-15 17:32:58 +02:00
Uwe Stöhr
5c91be293d tex2lyx: update fileformat 2017-04-15 17:03:13 +02:00
Stephan Witt
28fd15307b Care for a tilde in front of a path name. A path name with tilde sign at start is interpreted as relative to the current users home directory. 2017-04-15 13:30:35 +02: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
Kornel Benko
70b0f8d953 Cmake roundtrip tests: Amend fc1c5c6, rename formula_indent to math_indent 2017-04-13 15:48:07 +02:00
Kornel Benko
fab6ee2f4d Check_layout tests: Check also stderr
1.) The command check_layout exits with "0", even if the module contains errors.
  The new module check_layout.cmake tries to compensate.
2.) Added default style to the test layouts when checking single modules.
2017-04-13 11:18:05 +02:00
Juergen Spitzmueller
953876a46c Tiny clean up 2017-04-13 09:59:06 +02:00
Enrico Forestieri
ee0cc3cec1 Fix tests after 031748d9 2017-04-13 09:38:46 +02:00
Uwe Stöhr
fc1c5c6f28 BufferParams: rename formula_indent to math_indent etc. as requested
- also add flyx2lyx feature to import existing document class option as requested by JMarc
- also don't use a real default indentation length
2017-04-13 02:31:26 +02:00
Enrico Forestieri
031748d9c8 Avoid an assertion when compiling in debug mode with MSVC 2015
Seemingly, when removing an argument from argv, and thus inserting
a null pointer to shorten the array, causes an assertion because
the null pointer is not a valid heap pointer (sic!)

Fixes bug #10440
2017-04-12 21:19:42 +02:00
Juergen Spitzmueller
06fb58a2da FontUi: Fix layout
The old layout resulted in a too wide dialog
(especially in some localizations)
2017-04-12 12:50:44 +02:00
Juergen Spitzmueller
cbde0e16e2 TextLayout.ui: small layout fixes. 2017-04-12 12:10:58 +02:00
Juergen Spitzmueller
9068d1902e No need to translate number 2017-04-12 11:57:43 +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
Uwe Stöhr
818373ce4f tex2lyx: support rotated algorithm floats
LyX knows algorithm floats since ages. tex2lyx's support for rotated algorithm floats has simply been forgotten.
2017-04-11 00:36:00 +02:00
Uwe Stöhr
d2ac0d2cf4 TextLayoutUi.ui: correct a tooltip 2017-04-10 23:34:20 +02:00
Jean-Marc Lasgouttes
20696ecb7e Try to preserve small details from eb4a2a19
Part of ticket #10569
2017-04-10 11:21:29 +02:00
Jean-Marc Lasgouttes
94114fd121 Better implementation for corssOutLines
When trying to do implement a LaTeX feature on screen, it is always
good to see how LaTeX does it, just in case it is easy to implement on
our side.

Then we have a correct output at all DPI sizes.
2017-04-10 10:27:08 +02:00
Kornel Benko
560ebc1d50 Make output of check_Length.cpp more human readable. 2017-04-10 09:57:40 +02:00
Stephan Witt
d568846e03 update canAutoOpenFile/autoOpenFile implementation to new MacOSX API, avoid deprecated calls 2017-04-08 21:01:17 +02:00
Uwe Stöhr
1c2d056cfc tex2lyx: fix the preamble output
- LyX has new preamble tags. Although that they are not relevant for LaTeX they must be created by tex2lyx nevertheless
- also fix an issue that the formula indentation was always output
- update the tex2lyx tests accordingly
2017-04-08 04:55:22 +02:00
Uwe Stöhr
fae697a65c update tex2lyx tests to latest file format 2017-04-08 04:13:05 +02:00
Uwe Stöhr
b3b7675f54 Length.cpp: add new unit representing \baselineskip
- fileformat change
2017-04-08 03:30:21 +02:00
Uwe Stöhr
b3b1cf7e98 InsetTabular.cpp: handle crossed-out text 2017-04-08 02:55:00 +02:00