]>
git.lyx.org Git - lyx.git/log
Scott Kostyshak [Fri, 20 Sep 2024 09:04:16 +0000 (11:04 +0200)]
ctests: invert chess lyx2lyx tests
In export.cmake, if the detected output format is pdf3, we try to
export to "platex", which usually makes sense, but for this file we
would need to export to "latex". This file is very particular, and
also old, so I do not know if it is worth the time to handle this
case.
This commit inverts the following tests:
export/examples/Articles/Chess/Game_1_lyx16 (Failed)
export/examples/Articles/Chess/Game_1_lyx20 (Failed)
export/examples/Articles/Chess/Game_1_lyx21 (Failed)
export/examples/Articles/Chess/Game_1_lyx22 (Failed)
export/examples/Articles/Chess/Game_1_lyx23 (Failed)
Juergen Spitzmueller [Sat, 21 Sep 2024 10:46:45 +0000 (12:46 +0200)]
de.po
Juergen Spitzmueller [Sat, 21 Sep 2024 09:30:08 +0000 (11:30 +0200)]
Only \protect labels in \thanks notes
See https://marc.info/?l=lyx-users&m=
136394387505489
Juergen Spitzmueller [Sat, 21 Sep 2024 05:30:55 +0000 (07:30 +0200)]
GuiBibTeX: introduce way to toggle between absolute and relative local paths (#13097)
Pavel Sanda [Fri, 20 Sep 2024 19:33:41 +0000 (21:33 +0200)]
Header not needed anymore
Jean-Marc Lasgouttes [Thu, 19 Sep 2024 21:17:48 +0000 (23:17 +0200)]
Move assertion at the right position
It would wrongly trigger when doing a multi-cell selection.
Scott Kostyshak [Thu, 19 Sep 2024 20:38:49 +0000 (22:38 +0200)]
ctests: invert lyx2lyx tests that fail TeX export
These fail when exporting to TeX, but since they have to do with old
formats, it's not clear it's worth the time to investigate.
These started failing once we check the exit code of LyX's TeX
export (at
c7be9780 ).
Scott Kostyshak [Tue, 17 Sep 2024 19:49:48 +0000 (21:49 +0200)]
ctests: exit with error if export to .tex fails
Now that we detect and export to the correct TeX format (instead of
assuming pdflatex), we can make the check more strict by giving an
error if LyX exits with error from the export.
Scott Kostyshak [Thu, 19 Sep 2024 20:00:23 +0000 (22:00 +0200)]
ctests: default for Japanese + systemF is pdf4
This fixes the following tests:
export/examples/ja/Modules/Rnw_%28knitr%29_lyx22
export/examples/ja/Modules/Rnw_%28knitr%29_lyx23
export/examples/ja/Modules/Sweave_lyx22
export/examples/ja/Modules/Sweave_lyx23
Juergen Spitzmueller [Thu, 19 Sep 2024 08:00:39 +0000 (10:00 +0200)]
Fix outliner tree depth (#13098)
Pavel Sanda [Wed, 18 Sep 2024 19:25:18 +0000 (21:25 +0200)]
Move header where needed.
Scott Kostyshak [Wed, 18 Sep 2024 12:19:10 +0000 (14:19 +0200)]
ctests: comment the inverted ja Math systemF tests
Comments from Jürgen about why it is complicated to fix the exports.
Scott Kostyshak [Tue, 17 Sep 2024 19:41:48 +0000 (21:41 +0200)]
Pavel Sanda [Tue, 17 Sep 2024 17:51:35 +0000 (19:51 +0200)]
Header not needed anymore
Kornel Benko [Tue, 17 Sep 2024 16:42:46 +0000 (18:42 +0200)]
Cmake lyx2lyx export tests: Try to use output format from the lyx-source
Juergen Spitzmueller [Tue, 17 Sep 2024 13:53:18 +0000 (15:53 +0200)]
Do not output empty statement in lyx2lyx reversion
Scott Kostyshak [Tue, 17 Sep 2024 09:12:10 +0000 (11:12 +0200)]
Uninvert ja UserGuide systemF tests
These exports pass thanks to Jürgen's recent fixes, including
working around a language nesting issue.
Juergen Spitzmueller [Tue, 17 Sep 2024 07:51:29 +0000 (09:51 +0200)]
ja/UserGuide: work around language nesting issue
Scott Kostyshak [Mon, 16 Sep 2024 15:53:38 +0000 (17:53 +0200)]
Uninvert the ja Additional systemF tests
These exports now succeed thanks to Jürgen's recent fixes.
Juergen Spitzmueller [Mon, 16 Sep 2024 15:05:12 +0000 (17:05 +0200)]
Add missing ("false") condition
Kornel Benko [Mon, 16 Sep 2024 13:30:33 +0000 (15:30 +0200)]
Update sk.po
Juergen Spitzmueller [Mon, 16 Sep 2024 13:12:42 +0000 (15:12 +0200)]
amend
8e49c9a704b941fe5
we might not be using babel, after all
Juergen Spitzmueller [Mon, 16 Sep 2024 12:54:30 +0000 (14:54 +0200)]
Fix es/ModernCV on older versions that do not have language options
Juergen Spitzmueller [Mon, 16 Sep 2024 12:30:16 +0000 (14:30 +0200)]
Fix most math problems with Xe/LuaTeX
One NULL character issue left
Juergen Spitzmueller [Mon, 16 Sep 2024 11:36:48 +0000 (13:36 +0200)]
Fixup ja/Additional for Xe/LuaTeX
Juergen Spitzmueller [Mon, 16 Sep 2024 11:36:03 +0000 (13:36 +0200)]
Fixup ja/UserGuide for XeTeX
The system fonts do not cover Western quotation marks
Juergen Spitzmueller [Mon, 16 Sep 2024 06:48:28 +0000 (08:48 +0200)]
Fix font def
Juergen Spitzmueller [Sun, 15 Sep 2024 16:36:23 +0000 (18:36 +0200)]
A&A does not work with polyglossia
(babel is hardcoded in the class)
Juergen Spitzmueller [Sun, 15 Sep 2024 15:34:28 +0000 (17:34 +0200)]
Uee a more accesible JP mono font
Juergen Spitzmueller [Sun, 15 Sep 2024 13:21:46 +0000 (15:21 +0200)]
Fixup polyglossia-languages test file
* Workaround for churchslavonic
Juergen Spitzmueller [Sun, 15 Sep 2024 13:09:08 +0000 (15:09 +0200)]
Fixup polyglossia-languages test file
* Branch Kazakh as it is now babel-only
* Setup fonts for Chinese via fontspec
* Setup proper fonts for Japanese
* Use proper Japanese language variant
Juergen Spitzmueller [Sun, 15 Sep 2024 11:53:41 +0000 (13:53 +0200)]
Fix Spanish ModernCV example
Juergen Spitzmueller [Sun, 15 Sep 2024 11:32:10 +0000 (13:32 +0200)]
Set appropriate system fonts for Chinese docs
Jean-Marc Lasgouttes [Sat, 14 Sep 2024 18:40:53 +0000 (20:40 +0200)]
More places where DocumentClassPtr should not be copied
Spotted by COverity scan.
Jean-Marc Lasgouttes [Sat, 14 Sep 2024 18:36:04 +0000 (20:36 +0200)]
Pass sigPtr object as const reference too
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Sat, 14 Sep 2024 18:19:34 +0000 (20:19 +0200)]
Pass SocketCallback object as const reference
Spotted by Coverity scan.
Juergen Spitzmueller [Sat, 14 Sep 2024 12:46:29 +0000 (14:46 +0200)]
Set appropriate tt font that supports CJK
The actual font should be discussed. This one is OSS and works well:
https://github.com/adobe-fonts/source-han-code-jp
Juergen Spitzmueller [Sat, 14 Sep 2024 12:43:43 +0000 (14:43 +0200)]
Fixup some more Japanese templates
All of these rely on non-polyglossia language support
Juergen Spitzmueller [Sat, 14 Sep 2024 12:38:47 +0000 (14:38 +0200)]
Fixup Japanese Article template
This one relies on its own language support
Juergen Spitzmueller [Sat, 14 Sep 2024 12:36:18 +0000 (14:36 +0200)]
Fixup Japanese Feynman example
Polyglossia is loaded after the user preamble
Juergen Spitzmueller [Sat, 14 Sep 2024 12:29:31 +0000 (14:29 +0200)]
Fixup Japanese Article example
This one relies on its own language support
Juergen Spitzmueller [Sat, 14 Sep 2024 10:48:57 +0000 (12:48 +0200)]
Fixup test file for texF tests
Use proper fonts basically (the rest is format conversion)
Juergen Spitzmueller [Sat, 14 Sep 2024 08:59:13 +0000 (10:59 +0200)]
Revert "use std::move() instead of copying when value is no longer used"
This reverts commit
e685d31f5aadadd9c84c80a604818d49f5853dbf .
Juergen Spitzmueller [Sat, 14 Sep 2024 08:59:08 +0000 (10:59 +0200)]
Revert "Fix compiler warning"
This reverts commit
0a7585403832c114fd2d084363aee98c3234058e .
Jean-Marc Lasgouttes [Fri, 13 Sep 2024 13:41:53 +0000 (15:41 +0200)]
Transform CoordCache::check/checkDim in ASSERT_DIM/POS macros
This makes it more obvious to the reader that these are actually
assertions, and should help Coverity scan too.
Jean-Marc Lasgouttes [Fri, 13 Sep 2024 12:54:43 +0000 (14:54 +0200)]
Pass shared_ptr<> arguments by const reference
These arguments are not expensive to copy. However, it makes sense to
pass such pointers by const reference when they are just intended for
reading.
Some reading about this issue is here:
https://www.internalpointers.com/post/move-smart-pointers-and-out-functions-modern-c
Fixes some Coverity scan defects.
Jean-Marc Lasgouttes [Fri, 13 Sep 2024 12:16:21 +0000 (14:16 +0200)]
Pass DocumentClassConstPtr arguments by const reference
This arguments are shared_ptr objects, so they are not expensive to
copy. However, it makes sense to pass such pointers by const reference
when they are just intended for reading.
Some reading about this issue is here:
https://www.internalpointers.com/post/move-smart-pointers-and-out-functions-modern-c
Fixes some Coverity scan defects.
Jean-Marc Lasgouttes [Fri, 13 Sep 2024 09:27:00 +0000 (11:27 +0200)]
Make two parameters const references
Jean-Marc Lasgouttes [Fri, 13 Sep 2024 09:21:19 +0000 (11:21 +0200)]
Fix uninitialized variable
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Fri, 13 Sep 2024 09:07:05 +0000 (11:07 +0200)]
Do not use rand() to set a BranchList id
Use a simple counting instead, beecause Coverity complains that rand()
is not safe, and counting is siimpler anyway.
Jean-Marc Lasgouttes [Fri, 13 Sep 2024 08:27:24 +0000 (10:27 +0200)]
Make string parameter a const reference
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Thu, 12 Sep 2024 16:33:45 +0000 (18:33 +0200)]
Avoid a couple of copies.
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Thu, 12 Sep 2024 16:28:26 +0000 (18:28 +0200)]
Make docstring parameters const references
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Thu, 12 Sep 2024 16:20:43 +0000 (18:20 +0200)]
Graph::getReachable(): pass a parameter by const reference
Spotted by coverity.
Jean-Marc Lasgouttes [Thu, 12 Sep 2024 16:05:50 +0000 (18:05 +0200)]
Avoid a copy
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Thu, 12 Sep 2024 15:59:41 +0000 (17:59 +0200)]
Avoid a couple of copies
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Thu, 12 Sep 2024 15:52:57 +0000 (17:52 +0200)]
GuiWorkArea: pass KeySymbol parameters as const references
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Thu, 12 Sep 2024 15:24:32 +0000 (17:24 +0200)]
Avoid a couple copies in Trans::addDeadKeys().
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Thu, 12 Sep 2024 14:54:02 +0000 (16:54 +0200)]
TransState::addkey() pass parameter by const reference
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Wed, 11 Sep 2024 15:33:52 +0000 (17:33 +0200)]
Pass three string parameters by address
Spoted by Coverity scan.
Jean-Marc Lasgouttes [Wed, 11 Sep 2024 15:30:33 +0000 (17:30 +0200)]
Pass a docstring parameter by address
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Wed, 11 Sep 2024 15:25:03 +0000 (17:25 +0200)]
Pass a pair of docstring arguments by address
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Wed, 11 Sep 2024 15:08:45 +0000 (17:08 +0200)]
Avoid an unnecessary string copy
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Wed, 11 Sep 2024 14:43:26 +0000 (16:43 +0200)]
Pass arguments by address in convert() templates
The situation of the convert<>() template was a mess: the header
announced that template specializations passed strings by address (my
doing long ago), but the code would just define versions that upass
strings by value.
The solution is to pass all values by address. This works very well,
_except_ when the value is a string litteral.
Defining the templates thus requires a bit of work.
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Wed, 11 Sep 2024 14:42:41 +0000 (16:42 +0200)]
Fix linking of test programs in support/.
Jean-Marc Lasgouttes [Wed, 11 Sep 2024 14:25:45 +0000 (16:25 +0200)]
Pass parameters of constructor by address
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Wed, 11 Sep 2024 11:37:32 +0000 (13:37 +0200)]
Fixup
716e20ae : revert useless part
Jean-Marc Lasgouttes [Wed, 11 Sep 2024 11:29:20 +0000 (13:29 +0200)]
Limit the number of iterations for some tabular features in math
Try to please Coverity scan.
Jean-Marc Lasgouttes [Tue, 10 Sep 2024 13:29:36 +0000 (15:29 +0200)]
Make some code that handle authors more readable
Create accssors authodmap() in BufferParams.
Use [] operator instead of find().
Hopefully this will avoid to confuse Coverity scan.
Udi Fogiel [Tue, 10 Sep 2024 12:44:42 +0000 (15:44 +0300)]
update test
Scott Kostyshak [Tue, 10 Sep 2024 12:23:37 +0000 (14:23 +0200)]
Whitespace
Udi Fogiel [Tue, 10 Sep 2024 12:17:07 +0000 (15:17 +0300)]
fix jlreq abstract layout and adapt Chinese docs for unicode engines
jlreq layout defined the abstract environment to be boxed
in the preamble. Doing any kind of typesetting before
all the setup has finished is error prone and may lead to
wrong output (wrong fonts for example). The correct
place to put the abstract code is right before \maketitle.
The Chinese docs loaded the ctex package in case system fonts
were used. Now, with the new support for languages with babel
and polyglossia it is no longer necessary and creates collisions.
Jürgen Spitzmüller [Tue, 10 Sep 2024 11:58:33 +0000 (13:58 +0200)]
Do not push options to \babelprovide which do not make sense there
Should fix a couple of tests
Thibaut Cuvelier [Mon, 9 Sep 2024 21:31:53 +0000 (23:31 +0200)]
Add a comment for Python binary names.
Jean-Marc Lasgouttes [Mon, 9 Sep 2024 15:50:01 +0000 (17:50 +0200)]
Improve coverity modeling
This tells coverity that these functions terminate the program.
Jean-Marc Lasgouttes [Mon, 9 Sep 2024 15:49:20 +0000 (17:49 +0200)]
Do not forget to reset stream after std::hex
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Mon, 9 Sep 2024 13:52:01 +0000 (15:52 +0200)]
Do not handle special case where buffer == NULL
If it is so, we have already crashed in isBranchSelected() above.
(and hopefully, buffer_ is never null these days).
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Mon, 9 Sep 2024 13:35:57 +0000 (15:35 +0200)]
Do not access current_view_ if it is NULL
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Mon, 9 Sep 2024 13:29:39 +0000 (15:29 +0200)]
Initialize client's name in main()
Initializing clientName at declaration time is not a good idea.
Spotted by Coverity scan.
Jean-Marc Lasgouttes [Mon, 9 Sep 2024 13:19:25 +0000 (15:19 +0200)]
Fixup
b8cdfd1e1db : fix thinko
Spotted by Coverity.
Jean-Marc Lasgouttes [Mon, 9 Sep 2024 10:08:23 +0000 (12:08 +0200)]
Do not use lyxerr in from_ascii(char const *)
This function is used a lot to initialize static docstrings. This is
an issue in theory because lyxerr may not have been initialized in
time.
In practice of course, lyxerr will only be used when there is a
non-ascii character in the parameter, which is really not supposed to
happen.
This gets rid of 75 coverity reports.
Juergen Spitzmueller [Mon, 9 Sep 2024 06:29:24 +0000 (08:29 +0200)]
adapt tex2lyx to
0beb790a6a194
Juergen Spitzmueller [Sun, 8 Sep 2024 17:07:44 +0000 (19:07 +0200)]
Handle space issue with refstyle more downstream
It is not necessarily, and infers with some usages, to generally escape
spaces in labels and references
Juergen Spitzmueller [Sun, 8 Sep 2024 14:00:36 +0000 (16:00 +0200)]
Fix indentation
Scott Kostyshak [Sat, 7 Sep 2024 21:45:51 +0000 (23:45 +0200)]
Fix compiler warning
Fixes the following warning:
warning unqualified call to 'std::move' [-Werror,-Wunqualified-std-cast-call]
Juergen Spitzmueller [Sat, 7 Sep 2024 10:55:10 +0000 (12:55 +0200)]
initialize boolean (reported by coverity)
Juergen Spitzmueller [Sat, 7 Sep 2024 10:50:27 +0000 (12:50 +0200)]
use std::move() instead of copying when value is no longer used
This is mainly to shut down coverity which nowadays nags on this.
I am not sure whether we really gain something in these cases.
Juergen Spitzmueller [Sat, 7 Sep 2024 10:39:45 +0000 (12:39 +0200)]
Fix cut and past error (reported by coverity)
Juergen Spitzmueller [Sat, 7 Sep 2024 10:36:23 +0000 (12:36 +0200)]
fix potential null pointer (reported by coverity)
Pavel Sanda [Fri, 6 Sep 2024 21:06:52 +0000 (23:06 +0200)]
* postats.py
Jean-Marc Lasgouttes [Fri, 6 Sep 2024 14:21:47 +0000 (16:21 +0200)]
Remove handling of dispatched() property in BufferView::dispatch
As indicated in DispatchResult.h, this is only needed in insets'
doDispatch() methods, where lfuns can be delegated to a higher lever.
Jean-Marc Lasgouttes [Thu, 5 Sep 2024 20:05:38 +0000 (22:05 +0200)]
Add ScrollType BOTTOM and TOGGLE for BufferView::scrollToCursor()
BOTTOM shows the paragraph containing the cursor at the bottom of the
work area.
TOGGLE does CENTER, then TOP, BOTTOM and finally cycles to CENTER.
This is a feature copied from emacs's C-l binding.
Add new argument "caret" to lfun "scroll" that can be used like
scroll caret center
Change the keys (either C-l, M-l or F5) bound to screen-recenter to
"scroll caret toggle".
As an experiment, change paragraph-goto to use this scrolling method.
This can be tested when going to a heading in the outline pane.
Jean-Marc Lasgouttes [Wed, 4 Sep 2024 13:48:38 +0000 (15:48 +0200)]
Cleanup Page Up/Down code
Since BufferView::scroll() does not correct scrolling amount at
top/bottom anymore, remove its return value and add a new one to
BufferView::updateMetrics(bool) that returns this correction.
Rely on updateMetrics(false) to set the metrics straight after moving
the anchor y position.
Use assert_in_view = false when calling TextMetrics::editXY() because
this parameter does not work as advertised: if an inset not totally
visible, the code will not try to go inside it to look for a smaller
row that is totally visible.
Two small (hopfully useful) modifications:
- take into account the cursor X target instead of its screen position
- adapt the cursor position depending on
lyxrc.mac_like_cursor_movement when hitting start or end of
document.
Jean-Marc Lasgouttes [Tue, 3 Sep 2024 16:13:02 +0000 (18:13 +0200)]
Get rid of BufferView::scrollUp/Down
LFUN_SCROLL was the last user, change it to use only scroll(). Take
this opportunity to improve a bit this dispatch code.
Also improve somewhat the methods documentation.
Jean-Marc Lasgouttes [Tue, 3 Sep 2024 14:21:32 +0000 (16:21 +0200)]
Streamline BufferView::scrollToCursor
There are two parts in this patch :
1/ in the part where the cursor is already visible, replace calls to
scroll/scrollUp/scrollDown by direct manipulation of the anchor
vertical position. Reasoning in terms of new position rather than
amount of pixels to scroll makes work easier.
2/ in the part where the cursor is set to a new TOP or CENTER
position, move the code around in order to prepare for new ScrollType
enums.
No change intended, except that CENTER now relies on the contents
dimension of the row that holds the iterator, that is without spacing
and labels.
Jean-Marc Lasgouttes [Tue, 3 Sep 2024 13:55:34 +0000 (15:55 +0200)]
Simplify greatly Buffer::scroll/Up/Down methods
The code there that checks whether we scroll beyond the top/bottom of
document is not needed anymore, this is handled later by
BufferView::update(bool).
Note that this methods may disappear with time.
No change intended.
Jean-Marc Lasgouttes [Fri, 30 Aug 2024 14:56:16 +0000 (16:56 +0200)]
Fix update of cursor in tab-delete when there is a selection
The position of the cursor should not be decreased if it is already at
the start of the paragraph. This can lead to a crash when trying to
display the caret.
Jean-Marc Lasgouttes [Fri, 30 Aug 2024 13:07:03 +0000 (15:07 +0200)]
Fixup
999fb37e : fix thinko
The current buffer is part of allRelatives(), contrary to what I
thought. Therefore updateId() increased the buffer id by two.
Jean-Marc Lasgouttes [Fri, 30 Aug 2024 12:53:07 +0000 (14:53 +0200)]
update comments
Jean-Marc Lasgouttes [Fri, 30 Aug 2024 12:31:47 +0000 (14:31 +0200)]
Remove legacy code to compute geometry
This code is not necessary anymore after the fix to #13069.
Remove the first QString argument to createView(). Set the autoShow
parameter to false by default and rename createView(id) to
createAndShowView(id) to avoid member function overloading issues.
Remove optional <GEOMETRY> argument of window-new lfun.
Document the removal of the argument in release notes.