[LyX/master] Do not use lyxerr in from_ascii(char const *)

2024-09-09 Thread Jean-Marc Lasgouttes
commit ed291f0d4fbc778229840a9ad830c2481aa60bbd Author: Jean-Marc Lasgouttes Date: Mon Sep 9 12:08:23 2024 +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

[LyX/master] Fixup b8cdfd1e1db: fix thinko

2024-09-09 Thread Jean-Marc Lasgouttes
commit 12d771c43fc121c89e6df5ae1e0b6aedc11d799e Author: Jean-Marc Lasgouttes Date: Mon Sep 9 15:19:25 2024 +0200 Fixup b8cdfd1e1db: fix thinko Spotted by Coverity. --- src/KeyMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KeyMap.cpp b/src

[LyX/master] Initialize client's name in main()

2024-09-09 Thread Jean-Marc Lasgouttes
commit 3d323412ad5b4d47774de43f985202f20cabd156 Author: Jean-Marc Lasgouttes Date: Mon Sep 9 15:29:39 2024 +0200 Initialize client's name in main() Initializing clientName at declaration time is not a good idea. Spotted by Coverity scan. --- src/client/client.cpp

[LyX/master] Do not access current_view_ if it is NULL

2024-09-09 Thread Jean-Marc Lasgouttes
commit ffde470363c0bfafc915751fa788a34d4c9e06b8 Author: Jean-Marc Lasgouttes Date: Mon Sep 9 15:35:57 2024 +0200 Do not access current_view_ if it is NULL Spotted by Coverity scan. --- src/frontends/qt/GuiApplication.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[LyX/master] Do not handle special case where buffer == NULL

2024-09-09 Thread Jean-Marc Lasgouttes
commit 6687b34c072064950ff52efd79439fa4fc03604f Author: Jean-Marc Lasgouttes Date: Mon Sep 9 15:52:01 2024 +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

[LyX/master] Do not forget to reset stream after std::hex

2024-09-09 Thread Jean-Marc Lasgouttes
commit f4c02d670b60a56bc6fb4a49e201c7134af1011b Author: Jean-Marc Lasgouttes Date: Mon Sep 9 17:49:20 2024 +0200 Do not forget to reset stream after std::hex Spotted by Coverity scan. --- src/frontends/qt/GuiWorkArea.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[LyX/master] Improve coverity modeling

2024-09-09 Thread Jean-Marc Lasgouttes
commit 2ea95fa71bf2085a1e8753df968f31bf43a80e73 Author: Jean-Marc Lasgouttes Date: Mon Sep 9 17:50:01 2024 +0200 Improve coverity modeling This tells coverity that these functions terminate the program. --- development/coverity_modeling.cpp | 13 + 1 file changed, 13

Re: [LyX/master] Initialize client's name in main()

2024-09-09 Thread Jean-Marc Lasgouttes
Le 09/09/2024 à 15:33, Jean-Marc Lasgouttes a écrit : commit 3d323412ad5b4d47774de43f985202f20cabd156 Author: Jean-Marc Lasgouttes Date: Mon Sep 9 15:29:39 2024 +0200 Initialize client's name in main() Initializing clientName at declaration time is not a good idea. Th

[LyX/2.4.x] Do not forget to reset stream after std::hex

2024-09-10 Thread Jean-Marc Lasgouttes
commit 615f03585431adafa49a3110842dacca1435bed6 Author: Jean-Marc Lasgouttes Date: Mon Sep 9 17:49:20 2024 +0200 Do not forget to reset stream after std::hex Spotted by Coverity scan. (cherry picked from commit f4c02d670b60a56bc6fb4a49e201c7134af1011b) --- src/frontends

[LyX/2.4.x] Initialize client's name in main()

2024-09-10 Thread Jean-Marc Lasgouttes
commit 2c5f284f895356647cda38d3dccdaa53c984e6ae Author: Jean-Marc Lasgouttes Date: Mon Sep 9 15:29:39 2024 +0200 Initialize client's name in main() Initializing clientName at declaration time is not a good idea. Spotted by Coverity scan. (cherry picked

[LyX/master] Make some code that handle authors more readable

2024-09-11 Thread Jean-Marc Lasgouttes
commit 3f5b836aa9f263e8680d80726cae35a245495b5a Author: Jean-Marc Lasgouttes Date: Tue Sep 10 15:29:36 2024 +0200 Make some code that handle authors more readable Create accssors authodmap() in BufferParams. Use [] operator instead of find(). Hopefully this will

[LyX/master] Limit the number of iterations for some tabular features in math

2024-09-11 Thread Jean-Marc Lasgouttes
commit 716e20ae1bd7ab012c953d1dad18c88859e4252d Author: Jean-Marc Lasgouttes Date: Wed Sep 11 13:29:20 2024 +0200 Limit the number of iterations for some tabular features in math Try to please Coverity scan. --- development/coverity_modeling.cpp | 11 +++ src/mathed

[LyX/master] Fixup 716e20ae: revert useless part

2024-09-11 Thread Jean-Marc Lasgouttes
commit 951cb62f47a73fca8c9724f5d385280d79344740 Author: Jean-Marc Lasgouttes Date: Wed Sep 11 13:37:32 2024 +0200 Fixup 716e20ae: revert useless part --- development/coverity_modeling.cpp | 11 --- 1 file changed, 11 deletions(-) diff --git a/development/coverity_modeling.cpp b

[LyX/master] Pass parameters of constructor by address

2024-09-11 Thread Jean-Marc Lasgouttes
commit 100075c8901a72d875f90f2e46ef02af29dc2f6f Author: Jean-Marc Lasgouttes Date: Wed Sep 11 16:25:45 2024 +0200 Pass parameters of constructor by address Spotted by Coverity scan. --- src/insets/InsetNomencl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[LyX/master] Fix linking of test programs in support/.

2024-09-11 Thread Jean-Marc Lasgouttes
commit 291d2db18ed8e7a886a349b5138367233577f537 Author: Jean-Marc Lasgouttes Date: Wed Sep 11 16:42:41 2024 +0200 Fix linking of test programs in support/. --- src/support/Makefile.am | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/support/Makefile.am b/src

[LyX/master] Pass arguments by address in convert() templates

2024-09-11 Thread Jean-Marc Lasgouttes
commit a47d66df34d27742d21efd84e662031d4c0a0a60 Author: Jean-Marc Lasgouttes Date: Wed Sep 11 16:43:26 2024 +0200 Pass arguments by address in convert() templates The situation of the convert<>() template was a mess: the header announced that template specializations

[LyX/master] Avoid an unnecessary string copy

2024-09-11 Thread Jean-Marc Lasgouttes
commit 851e59cd2657a73a5fd376d01ce2d1dfc336fe23 Author: Jean-Marc Lasgouttes Date: Wed Sep 11 17:08:45 2024 +0200 Avoid an unnecessary string copy Spotted by Coverity scan. --- src/LyXVC.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/LyXVC.cpp b/src

[LyX/master] Pass a pair of docstring arguments by address

2024-09-11 Thread Jean-Marc Lasgouttes
commit e6930ffec8be56f3a54dbf17f499ec14dd0cd59a Author: Jean-Marc Lasgouttes Date: Wed Sep 11 17:25:03 2024 +0200 Pass a pair of docstring arguments by address Spotted by Coverity scan. --- src/frontends/qt/GuiCitation.cpp | 2 +- src/frontends/qt/GuiCitation.h | 4 ++-- 2

[LyX/master] Pass a docstring parameter by address

2024-09-11 Thread Jean-Marc Lasgouttes
commit 13b05102f2d9dcecd9d0fe24e49000867c5b835a Author: Jean-Marc Lasgouttes Date: Wed Sep 11 17:30:33 2024 +0200 Pass a docstring parameter by address Spotted by Coverity scan. --- src/insets/InsetCommandParams.cpp | 2 +- src/insets/InsetCommandParams.h | 2 +- 2 files

[LyX/master] Pass three string parameters by address

2024-09-11 Thread Jean-Marc Lasgouttes
commit eeb84bce17f74cba1c6482411fa14434a9703b7f Author: Jean-Marc Lasgouttes Date: Wed Sep 11 17:33:52 2024 +0200 Pass three string parameters by address Spoted by Coverity scan. --- src/lyxfind.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src

[LyX/master] TransState::addkey() pass parameter by const reference

2024-09-12 Thread Jean-Marc Lasgouttes
commit 7946dfacfa57f031ec5de9a03e63937578fe9430 Author: Jean-Marc Lasgouttes Date: Thu Sep 12 16:54:02 2024 +0200 TransState::addkey() pass parameter by const reference Spotted by Coverity scan. --- src/Trans.cpp | 6 +++--- src/Trans.h | 10 +- 2 files changed, 8

[LyX/master] Avoid a couple copies in Trans::addDeadKeys().

2024-09-12 Thread Jean-Marc Lasgouttes
commit 8ea9c2da03d97be8cd74d90bf4deed5f405d16df Author: Jean-Marc Lasgouttes Date: Thu Sep 12 17:24:32 2024 +0200 Avoid a couple copies in Trans::addDeadKeys(). Spotted by Coverity scan. --- src/Trans.cpp | 10 ++ src/Trans.h | 3 +++ 2 files changed, 5 insertions

[LyX/master] GuiWorkArea: pass KeySymbol parameters as const references

2024-09-12 Thread Jean-Marc Lasgouttes
commit 91f3f27545121e5869c74db8d68a34908ab01ad4 Author: Jean-Marc Lasgouttes Date: Thu Sep 12 17:52:57 2024 +0200 GuiWorkArea: pass KeySymbol parameters as const references Spotted by Coverity scan. --- src/frontends/qt/GuiWorkArea.cpp | 2 +- src/frontends/qt/GuiWorkArea.h | 6

[LyX/master] Avoid a couple of copies

2024-09-12 Thread Jean-Marc Lasgouttes
commit cc40330e00cc8a222f31c53551873f5d2ae66b14 Author: Jean-Marc Lasgouttes Date: Thu Sep 12 17:59:41 2024 +0200 Avoid a couple of copies Spotted by Coverity scan. --- src/insets/InsetCitation.cpp | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src

[LyX/master] Avoid a copy

2024-09-12 Thread Jean-Marc Lasgouttes
commit b1bbf64a28331c6b5eb3f5fb987d2e88d30167bc Author: Jean-Marc Lasgouttes Date: Thu Sep 12 18:05:50 2024 +0200 Avoid a copy Spotted by Coverity scan. --- src/Buffer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index

[LyX/master] Graph::getReachable(): pass a parameter by const reference

2024-09-12 Thread Jean-Marc Lasgouttes
commit b743870d71db1c13e10078e1bb7028e9db1af377 Author: Jean-Marc Lasgouttes Date: Thu Sep 12 18:20:43 2024 +0200 Graph::getReachable(): pass a parameter by const reference Spotted by coverity. --- src/Graph.cpp | 5 ++--- src/Graph.h | 4 ++-- 2 files changed, 4 insertions

[LyX/master] Make docstring parameters const references

2024-09-12 Thread Jean-Marc Lasgouttes
commit 7a99ef7fbbe5760e7d70e8ef6b446aebb0af04e2 Author: Jean-Marc Lasgouttes Date: Thu Sep 12 18:28:26 2024 +0200 Make docstring parameters const references Spotted by Coverity scan. --- src/insets/InsetLabel.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[LyX/master] Avoid a couple of copies.

2024-09-12 Thread Jean-Marc Lasgouttes
commit 8e181e992da3054fc1a0221615f9dd4920332ace Author: Jean-Marc Lasgouttes Date: Thu Sep 12 18:33:45 2024 +0200 Avoid a couple of copies. Spotted by Coverity scan. --- src/frontends/qt/Menus.cpp | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src

[LyX/master] Make string parameter a const reference

2024-09-13 Thread Jean-Marc Lasgouttes
commit 9b3c28178cf8835213e9da418dc66208a9afd6cd Author: Jean-Marc Lasgouttes Date: Fri Sep 13 10:27:24 2024 +0200 Make string parameter a const reference Spotted by Coverity scan. --- src/frontends/qt/GuiDelimiter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[LyX/master] Do not use rand() to set a BranchList id

2024-09-13 Thread Jean-Marc Lasgouttes
commit 9f40eaee15d53ce418a728d3ff3716541d35775f Author: Jean-Marc Lasgouttes Date: Fri Sep 13 11:07:05 2024 +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

[LyX/master] Fix uninitialized variable

2024-09-13 Thread Jean-Marc Lasgouttes
commit ffca6730d6fd97ec9be1bbf70eabd2ef9835f607 Author: Jean-Marc Lasgouttes Date: Fri Sep 13 11:21:19 2024 +0200 Fix uninitialized variable Spotted by Coverity scan. --- src/frontends/qt/GuiWorkArea.cpp | 2 +- src/frontends/qt/GuiWorkArea_Private.h | 2 +- 2 files changed

[LyX/master] Make two parameters const references

2024-09-13 Thread Jean-Marc Lasgouttes
commit 3649cea9e59ecbf1c1831c54781a7aaff342714f Author: Jean-Marc Lasgouttes Date: Fri Sep 13 11:27:00 2024 +0200 Make two parameters const references --- src/insets/InsetIndexMacro.cpp | 2 +- src/insets/InsetIndexMacro.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

[LyX/master] Pass DocumentClassConstPtr arguments by const reference

2024-09-13 Thread Jean-Marc Lasgouttes
commit 58ee4c9ec74172b7600f1cc5d2299eba465496d7 Author: Jean-Marc Lasgouttes Date: Fri Sep 13 14:16:21 2024 +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

[LyX/master] Pass shared_ptr<> arguments by const reference

2024-09-13 Thread Jean-Marc Lasgouttes
commit 3af0bad22a9f6200fcfc09534f5c0925ad63271c Author: Jean-Marc Lasgouttes Date: Fri Sep 13 14:54:43 2024 +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 referenc

[LyX/master] Transform CoordCache::check/checkDim in ASSERT_DIM/POS macros

2024-09-13 Thread Jean-Marc Lasgouttes
commit 375aba7b5d8404511553e4e2d6154476bd00fcf2 Author: Jean-Marc Lasgouttes Date: Fri Sep 13 15:41:53 2024 +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

[LyX/master] Pass SocketCallback object as const reference

2024-09-14 Thread Jean-Marc Lasgouttes
commit 980f91d12ee9f47ad944ec0f0befb9c638511bdc Author: Jean-Marc Lasgouttes Date: Sat Sep 14 20:19:34 2024 +0200 Pass SocketCallback object as const reference Spotted by Coverity scan. --- src/frontends/qt/GuiApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[LyX/master] Pass sigPtr object as const reference too

2024-09-14 Thread Jean-Marc Lasgouttes
commit 8c76a9fc3da7ab200f36e501ca67fc0421f0517e Author: Jean-Marc Lasgouttes Date: Sat Sep 14 20:36:04 2024 +0200 Pass sigPtr object as const reference too Spotted by Coverity scan. --- src/support/ForkedCalls.cpp | 2 +- src/support/ForkedCalls.h | 2 +- 2 files changed, 2

[LyX/master] More places where DocumentClassPtr should not be copied

2024-09-14 Thread Jean-Marc Lasgouttes
commit 928f9514a890edf37e298e419104a98c4ebfe844 Author: Jean-Marc Lasgouttes Date: Sat Sep 14 20:40:53 2024 +0200 More places where DocumentClassPtr should not be copied Spotted by COverity scan. --- src/CutAndPaste.cpp | 10 +- src/CutAndPaste.h | 2 +- 2 files

Re: r40282 - lyx-devel/trunk/po

2011-12-01 Thread Jean-Marc Lasgouttes
Le 25/11/2011 23:55, lasgout...@lyx.org a écrit : Author: lasgouttes Date: Fri Nov 25 23:55:02 2011 New Revision: 40282 URL: http://www.lyx.org/trac/changeset/40282 Log: Package.cpp is not autogenerated anymore, there is no need to skip it. Richard, can I backport this to branch? JMarc

Re: r40377 - in lyx-devel/trunk/src: . frontends/qt4

2011-12-05 Thread Jean-Marc Lasgouttes
Le 12/05/11 14:12, v...@lyx.org a écrit : Fix bug #7916: Undo warning message when inserting plaintext file LFUN_INSERT_PLAINTEXT is handled in GuiView because it might need to ask for a filename. But if the filename is given as a paramater we can handle it in BufferView immediately. Also, whe

Re: r40532 - lyx-devel/trunk/development/cmake

2011-12-20 Thread Jean-Marc Lasgouttes
Le 20/12/2011 14:49, kor...@lyx.org a écrit : Author: kornel Date: Tue Dec 20 14:49:55 2011 New Revision: 40532 URL: http://www.lyx.org/trac/changeset/40532 Log: Adapt support for distributing desktop files and icons also in cmake build Thanks. JMarc

Re: r40785 - in lyx-devel/trunk/src: . tex2lyx

2012-02-21 Thread Jean-Marc Lasgouttes
Le 21/02/2012 00:38, uwesto...@lyx.org a écrit : Log: support for verbatim: step 2: tex2lyx support OK, so this is the thing I missed in my previous message, where I complained about missing verbatim support. + else if (name == "verbatim") { Of course eventually, you do not want to

[LyX/master] Compile 3rdparty/hunspell in stdlib-debug mode when needed

2018-03-29 Thread Jean-Marc Lasgouttes
commit d9e0a842cfb2090cecbc61252c842b427eddadd4 Author: Jean-Marc Lasgouttes Date: Thu Mar 29 12:05:50 2018 +0200 Compile 3rdparty/hunspell in stdlib-debug mode when needed A function that returns a vector will lead to a crash if the main code and the library have not been

[LyX/master] Makes caret height adapt to context in mathed.

2018-04-04 Thread Jean-Marc Lasgouttes
commit c5ca503d92a25dc168f84b9d7c008c390f434667 Author: Jean-Marc Lasgouttes Date: Tue Mar 20 16:41:59 2018 +0100 Makes caret height adapt to context in mathed. Set current cursor font in MathData::metrics() Also make sure that caret dimension in mathed is not larger than

[LyX/master] When inserting math inset, put cursor selection in the correct cell

2018-04-05 Thread Jean-Marc Lasgouttes
commit 503c7c1688bee80a2c5dc472aaf97fb2aa0391e0 Author: Jean-Marc Lasgouttes Date: Wed Apr 4 18:24:14 2018 +0200 When inserting math inset, put cursor selection in the correct cell The original use case for this bug is entering an overset inset when there is a selection. The

[LyX/master] Warn when using system hunspell in stdlib-debug mode

2018-04-09 Thread Jean-Marc Lasgouttes
commit d7020ea9190fcaf015c758f46170ab1065b1021e Author: Jean-Marc Lasgouttes Date: Mon Apr 9 15:50:50 2018 +0200 Warn when using system hunspell in stdlib-debug mode This is what we already do with boost. Note that the warning only triggers with the new C++ ABI. --- config

[LyX/master] Set a minimal height for math rows

2018-04-09 Thread Jean-Marc Lasgouttes
commit 6df8c42e59f7dbe00d585525d1ce7e91a42411ca Author: Jean-Marc Lasgouttes Date: Mon Apr 9 12:18:24 2018 +0200 Set a minimal height for math rows The value used here is the x height. It would be nice to see what the TeXbook really says. This makes a big difference

[LyX/master] Fix invalid octal number

2018-04-12 Thread Jean-Marc Lasgouttes
commit 6cffd468e0b6421643007dc9086bc499c6d7cdad Author: Jean-Marc Lasgouttes Date: Thu Apr 12 10:48:50 2018 +0200 Fix invalid octal number --- src/Format.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/Format.cpp b/src/Format.cpp index b7a8c20..3b3a10d

[LyX/2.3.x] forgotten glitch

2018-04-14 Thread Jean-Marc Lasgouttes
commit 9966f098ea07d1568f8650a1fc3e43a838f2fe82 Author: Pavel Sanda Date: Sat Feb 3 22:43:00 2018 +0100 forgotten glitch --- src/LyXAction.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index dae9b53..33d5100 100644 --- a

[LyX/2.3.x] Make input methods support great again

2018-04-14 Thread Jean-Marc Lasgouttes
commit 9ef52806f8ff80bf1325368f07ba07a83172f7da Author: Jean-Marc Lasgouttes Date: Sun Jul 23 00:56:27 2017 +0200 Make input methods support great again This unbreaks input methods by splitting the part of the code that does the actual drawing to a separate paintPreeditText

[LyX/2.3.x] Fix caret painting

2018-04-14 Thread Jean-Marc Lasgouttes
commit ef1d50207088bc40cd0fbbd27229df9e8400e932 Author: Jean-Marc Lasgouttes Date: Thu Jul 20 23:31:05 2017 +0200 Fix caret painting The trick is to remember in BufferView what has been done at the previous draw, so that the row that contained the caret can be repainted if

[LyX/2.3.x] Implement display of roots more faithfully

2018-04-14 Thread Jean-Marc Lasgouttes
commit 2e1863b704fe5260dcf40c19c8679756c0f1a409 Author: Jean-Marc Lasgouttes Date: Mon Dec 4 10:44:49 2017 +0100 Implement display of roots more faithfully This is a follow-up to 758de957. - unify the metrics and drawing of \sqrt and \root using helper functions

[LyX/2.3.x] Remove workaround that is not necessary anymore.

2018-04-14 Thread Jean-Marc Lasgouttes
commit 410605385f1f40d3381fc7236dfb468d100d94f8 Author: Jean-Marc Lasgouttes Date: Sun Jul 23 15:50:35 2017 +0200 Remove workaround that is not necessary anymore. This code was necessary to handle cases where the insets positions were not yet in cache. This cannot happen

[LyX/2.3.x] three-stage drawing: add a nodraw stage

2018-04-14 Thread Jean-Marc Lasgouttes
commit d222e0f48e17eb838d8320f30f82b4c96b3e496e Author: Jean-Marc Lasgouttes Date: Sun Jul 16 01:25:03 2017 +0200 three-stage drawing: add a nodraw stage Normally the two stages of drawing are 1/ compute metrics of insets/rows/paragraphs/mathrow... 2/ draw the elements and

[LyX/2.3.x] Do the actual drawing in the paint event

2018-04-14 Thread Jean-Marc Lasgouttes
commit 7b8b3e38a1b9ff4d733266a4f3fe0f8fb041da01 Author: Jean-Marc Lasgouttes Date: Fri Sep 8 16:55:11 2017 +0200 Do the actual drawing in the paint event Historically, because of two-stage drawing, LyX has been painting on a Pixmap, and this pixmap is copied to screen at paint

[LyX/2.3.x] Improve UndoGroupHelper and use it more

2018-04-14 Thread Jean-Marc Lasgouttes
commit 1dc134fb60806ee0d27371049392ab72223b6cd0 Author: Jean-Marc Lasgouttes Date: Wed Dec 13 11:10:49 2017 +0100 Improve UndoGroupHelper and use it more Now the helper class contains logic that checks whether buffer are known before closing them. This avoids potential crashes

[LyX/2.3.x] Rename more instances of "cursor" to "caret"

2018-04-14 Thread Jean-Marc Lasgouttes
commit 94b1d04f2c379291748365a296f2b6378d617f4a Author: Jean-Marc Lasgouttes Date: Thu Aug 24 17:37:56 2017 +0200 Rename more instances of "cursor" to "caret" Thanks to Pavel for the hint. --- src/BufferView.cpp |2

[LyX/2.3.x] Remember correctly pixel ratio used for painting

2018-04-14 Thread Jean-Marc Lasgouttes
commit c43b6a9ecf7d78a2187384e776d439698633f01f Author: Jean-Marc Lasgouttes Date: Mon Sep 18 10:58:07 2017 +0200 Remember correctly pixel ratio used for painting This avoids endless resize issues on HiDPI systems (e.g. Retina Mac). Rename pixel_ratio_ to

[LyX/2.3.x] Fix compilation in monolithic mode

2018-04-14 Thread Jean-Marc Lasgouttes
commit be35ba31bfff429330d628b848ecc7d65265590d Author: Jean-Marc Lasgouttes Date: Sat Jan 6 20:46:06 2018 +0100 Fix compilation in monolithic mode (cherry picked from commit 3aa10c8dbaf4813fb30d6e9487a5d50720c7affd) --- src/frontends/qt4/GuiApplication.cpp |1 + src

[LyX/2.3.x] Fix bad refresh when changing zoom level

2018-04-14 Thread Jean-Marc Lasgouttes
commit f6cbc08a7db3c2185b6eae768c026c58f577b0bc Author: Jean-Marc Lasgouttes Date: Wed Sep 27 17:52:06 2017 +0200 Fix bad refresh when changing zoom level Replace the tricky code in LFUN_SCREEN_FONT_UPDATE and replace it with proper use of DispatchResult flags

[LyX/2.3.x] Make sure that rows are repainted when they get (un)selected

2018-04-14 Thread Jean-Marc Lasgouttes
commit 8af3077753381238e1fb3e21d65017b94778a47c Author: Jean-Marc Lasgouttes Date: Wed Nov 29 11:16:09 2017 +0100 Make sure that rows are repainted when they get (un)selected The bug is the following: when selecting several paragraphs quickly enough, some rows do not get

[LyX/2.3.x] Avoid some caret ghosts

2018-04-14 Thread Jean-Marc Lasgouttes
commit fa4fc6fc4d97f5c3d3e8ba44ad8b52f750293623 Author: Jean-Marc Lasgouttes Date: Thu Nov 23 15:38:17 2017 +0100 Avoid some caret ghosts When the caret is at end of row, if may happen that it is drawn after the end of the row. In this case caret blinking will not work

[LyX/2.3.x] Compute metrics when graphics is updated

2018-04-14 Thread Jean-Marc Lasgouttes
commit a1579c583acb22a7f5dae80a9bfe7707774f49a4 Author: Jean-Marc Lasgouttes Date: Thu Sep 14 15:50:30 2017 +0200 Compute metrics when graphics is updated Remove the old schedule_redraw_ mechanism that was only useful because of our synchronous drawing code. Now that actual

[LyX/2.3.x] Improve the logic of caret repainting

2018-04-14 Thread Jean-Marc Lasgouttes
commit 6bd158dcba851beb4c22f8aa79a572b21f1a16d0 Author: Jean-Marc Lasgouttes Date: Fri Sep 29 10:29:39 2017 +0200 Improve the logic of caret repainting For some reason the existing code only considered the bottom row that contained the cursor. There is no need for that, and

[LyX/2.3.x] Store change bar information in row element

2018-04-14 Thread Jean-Marc Lasgouttes
commit d2e15bd1893e288f3177dbec15b82b723bfca6a6 Author: Jean-Marc Lasgouttes Date: Sat Nov 11 11:57:39 2017 +0100 Store change bar information in row element It is wrong to compute this at paint time. In general, painting a row should not require any access to a paragraph

[LyX/2.3.x] Create new method GuiWorkArea::Private:::updateCaretGeometry

2018-04-14 Thread Jean-Marc Lasgouttes
commit 2b1b33189dc4113d2744cb9a68e691fbca4b884a Author: Jean-Marc Lasgouttes Date: Mon Oct 2 17:07:31 2017 +0200 Create new method GuiWorkArea::Private:::updateCaretGeometry This replaces a showCaret/hideCaret pair and avoids an update. Also remove an update() call in

[LyX/2.3.x] Merge remote-tracking branch 'features/properpaint' into 2.3.2-staging

2018-04-14 Thread Jean-Marc Lasgouttes
commit c8230ab0d0a919530c43c29395f4d9961498bf15 Merge: 9a1728c 61c5769 Author: Jean-Marc Lasgouttes Date: Thu Feb 15 14:08:16 2018 +0100 Merge remote-tracking branch 'features/properpaint' into 2.3.2-staging This makes sure that painting actually happens at paint even

[LyX/2.3.x] Update insets position in cache in more cases

2018-04-14 Thread Jean-Marc Lasgouttes
commit 9bb41f09436ad23fb881dd87e2caf3628b03403f Author: Jean-Marc Lasgouttes Date: Wed Aug 30 18:05:16 2017 +0200 Update insets position in cache in more cases This patch makes sure that, every time a ParagraphMetrics has its position set, the inset positions for the insets

[LyX/2.3.x] Use a backing store on macOS

2018-04-14 Thread Jean-Marc Lasgouttes
commit c6771569384edc1e100d427365d6a4976bc5bd95 Author: Jean-Marc Lasgouttes Date: Sat Nov 25 12:31:11 2017 +0100 Use a backing store on macOS Qt on macOS does not respect the Qt::WA_OpaquePaintEvent attribute and clears the widget backing store at each update. Therefore, we

[LyX/2.3.x] Add Alex Dunlap to our contributors

2018-04-14 Thread Jean-Marc Lasgouttes
commit 31c7ce19fbc47ee1dd059005ff5dd295a5b8c21b Author: Jean-Marc Lasgouttes Date: Wed Feb 21 12:05:40 2018 +0100 Add Alex Dunlap to our contributors (cherry picked from commit 4447fb349cbbc18f0aaebd9010fb320700d58c79) (cherry picked from commit

[LyX/2.3.x] Use parMetrics to access the par_metrics_ map

2018-04-14 Thread Jean-Marc Lasgouttes
commit a2e1021aba81371b29bf6a61d184383cffda7f9d Author: Jean-Marc Lasgouttes Date: Mon Feb 12 17:11:09 2018 +0100 Use parMetrics to access the par_metrics_ map In cursorY, it is dangerous to access par_petrics_[0], since one does not know whether metrics have been computed for

[LyX/2.3.x] save session when we save a buffer

2018-04-14 Thread Jean-Marc Lasgouttes
commit 257f978d626d272abc2212bdd4c3e64a65eacf63 Author: Alexander Dunlap Date: Thu Feb 15 11:28:34 2018 -0800 save session when we save a buffer Implements enhancement #10712. (cherry picked from commit cca365f26c7d541cc13453fc42fc9b6de7736319) --- src/frontends/qt4/GuiVi

[LyX/2.3.x] Improve documentation of inset-(begin|end)(|-select)

2018-04-14 Thread Jean-Marc Lasgouttes
commit 2e67181036c1b7ff8829931d70a4a2e316bb791b Author: Jean-Marc Lasgouttes Date: Thu Feb 22 17:00:54 2018 +0100 Improve documentation of inset-(begin|end)(|-select) Make it clear that it can go at the beginning/end of the document. (cherry picked from commit

[LyX/2.3.x] Cleanup and simplify WorkArea code

2018-04-14 Thread Jean-Marc Lasgouttes
commit 418bf09879dfad860e298f0f3b16d765bb1262d5 Author: Jean-Marc Lasgouttes Date: Sat Jul 22 01:19:45 2017 +0200 Cleanup and simplify WorkArea code Rename cursor to caret to in order to avoid ambiguity. The caret is now the blinking thing only. Remove unused header

[LyX/2.3.x] Remove row crc computation

2018-04-14 Thread Jean-Marc Lasgouttes
commit a71610b9d72d346ac694518d6dab634f02247e2b Author: Jean-Marc Lasgouttes Date: Sat Nov 11 12:40:39 2017 +0100 Remove row crc computation This computation did not make sense anymore since we began to put the contents in the Row object. The fact that it worked was a

[LyX/2.3.x] Implement buffer-anonymize more efficiently

2018-04-14 Thread Jean-Marc Lasgouttes
commit 9a1728c70a0e17864168d5f3ac9cae1ca2b8 Author: Jean-Marc Lasgouttes Date: Thu Feb 15 12:07:33 2018 +0100 Implement buffer-anonymize more efficiently The work is done now in Paragraph::anonymize(). Move the handling of the lfun to Buffer class. Document

[LyX/2.3.x] Fix ghost caret

2018-04-14 Thread Jean-Marc Lasgouttes
commit 61c5769e3981825b5fef9aecf512679e94e0fc53 Author: Jean-Marc Lasgouttes Date: Mon Jan 8 11:49:40 2018 +0100 Fix ghost caret This fixes a regression in e64ea357, where a test has been (badly) tightened to avoid that two consecutive rows may be redrawn to get rid of

[LyX/2.3.x] Update the painting process documentation

2018-04-14 Thread Jean-Marc Lasgouttes
commit 8bb7ce4e4a25622b91208e18702fbd52c59bf16f Author: Jean-Marc Lasgouttes Date: Sun Jul 23 12:39:26 2017 +0200 Update the painting process documentation --- development/PAINTING_ANALYSIS | 44 +--- 1 files changed, 14 insertions(+), 30 deletions

[LyX/2.3.x] Make it possible to select (not)native file dialogs at run time

2018-04-14 Thread Jean-Marc Lasgouttes
commit 977a0c403746aeff9ee529aed01966b1fdeea95b Author: Jean-Marc Lasgouttes Date: Tue Jan 30 14:32:53 2018 +0100 Make it possible to select (not)native file dialogs at run time Add a new LyXRC variable use_native_filedialog (true by default) that allows to select the kind of

[LyX/2.3.x] Do not presume what the defaults for a new QPainter are

2018-04-14 Thread Jean-Marc Lasgouttes
commit 7b99bf6a375e14882713d96338345d130cab1425 Author: Jean-Marc Lasgouttes Date: Mon Sep 18 11:21:18 2017 +0200 Do not presume what the defaults for a new QPainter are (cherry picked from commit 275d306c73e3e0f60e0742adbcb06cce98c48ee5) --- src/frontends/qt4/GuiPainter.cpp

[LyX/2.3.x] Handle properly top/bottom of inset with mac-like cursor movement

2018-04-14 Thread Jean-Marc Lasgouttes
commit 5f6c681b76b7137107be20b52fb3200883a4faa9 Author: Jean-Marc Lasgouttes Date: Sat Jul 15 17:23:22 2017 +0200 Handle properly top/bottom of inset with mac-like cursor movement The correct behavior is to go to position 0 going up from first row, and to end of row when going

[LyX/2.3.x] Fixup ac4bcb12

2018-04-14 Thread Jean-Marc Lasgouttes
commit 9c8e3df86bb3140435e022d67cd7b6f7f8575c71 Author: Jean-Marc Lasgouttes Date: Fri Nov 24 23:36:28 2017 +0100 Fixup ac4bcb12 Cursor at end of paragraph should be treated as if boundary was on. (cherry picked from commit d01dd54bf14167e880c1d0a6382b87e622c2c2ed

[LyX/2.3.x] Allow multiple calls to processUpdateFlags before redraw

2018-04-14 Thread Jean-Marc Lasgouttes
commit 4ecbff00192fb097432bc2d0604c6c8d97aa883a Author: Jean-Marc Lasgouttes Date: Wed Oct 11 18:00:48 2017 +0200 Allow multiple calls to processUpdateFlags before redraw The goal of this commit is to ensure that a processUpdateFlags call that requires no redraw will not

[LyX/2.3.x] Better handling of multiple buffers in UndoGroupHelper

2018-04-14 Thread Jean-Marc Lasgouttes
commit 51e80361b2880a9f2e3b9d91ffd9498713a6 Author: Jean-Marc Lasgouttes Date: Wed Nov 29 14:10:33 2017 +0100 Better handling of multiple buffers in UndoGroupHelper It may happen that the buffers are visited in order buffer1, buffer2, buffer1. In this case, we want to have

[LyX/master] Update cursor position after committing IM string

2018-04-18 Thread Jean-Marc Lasgouttes
commit 01fea56eb67eafa88680a913eeb72e023e1afa71 Author: Jean-Marc Lasgouttes Date: Wed Apr 18 17:39:43 2018 +0200 Update cursor position after committing IM string --- src/frontends/qt4/GuiWorkArea.cpp |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/frontends

[LyX/master] Revert "Makes caret height adapt to context in mathed."

2018-04-20 Thread Jean-Marc Lasgouttes
commit 4300feb8595c8542050adedf664cd4bfda7ede12 Author: Jean-Marc Lasgouttes Date: Fri Apr 20 09:51:35 2018 +0200 Revert "Makes caret height adapt to context in mathed." This will be replaced by a different solution. This reve

[LyX/master] Better mechanism for setting cell cell height

2018-04-20 Thread Jean-Marc Lasgouttes
commit 7bcb78a77875ecae0f54063ff02ec90e1b78f8b6 Author: Jean-Marc Lasgouttes Date: Thu Apr 19 13:15:43 2018 +0200 Better mechanism for setting cell cell height When computing a cell metrics, it is now possible to specify whether it is tight (at least as tall as 'x')

[LyX/master] Redo metrics after cancelling macro mode

2018-04-24 Thread Jean-Marc Lasgouttes
commit 68ec34e60343a5dec9f32d60c79a2c0825b62d12 Author: Jean-Marc Lasgouttes Date: Tue Apr 24 14:03:35 2018 +0200 Redo metrics after cancelling macro mode When the cursor is inside a subscript that may become empty, metrics issues can happen. This patch fixes the issue

[LyX/2.3.x] Redo metrics after cancelling macro mode

2018-04-25 Thread Jean-Marc Lasgouttes
commit d0a11cb8e2227d2b2932c9c71cd5ac476ed8c344 Author: Jean-Marc Lasgouttes Date: Tue Apr 24 14:03:35 2018 +0200 Redo metrics after cancelling macro mode When the cursor is inside a subscript that may become empty, metrics issues can happen. This patch fixes the issue

[LyX/2.3.x] Update cursor position after committing IM string

2018-04-26 Thread Jean-Marc Lasgouttes
commit 5c6bc52b1b7dc76e13b5602dd1bcc0e699a74187 Author: Jean-Marc Lasgouttes Date: Wed Apr 18 17:39:43 2018 +0200 Update cursor position after committing IM string (cherry picked from commit 01fea56eb67eafa88680a913eeb72e023e1afa71) --- src/frontends/qt4/GuiWorkArea.cpp |1

[LyX/master] Rework caret display code

2018-04-26 Thread Jean-Marc Lasgouttes
commit 2f1eb35b868aaa5adb83ff358c2468551e25685e Author: Jean-Marc Lasgouttes Date: Wed Apr 18 10:10:08 2018 +0200 Rework caret display code The new code is much simpler: what it does is, after redrawing has been done, to mark the cursor row as changed, so that it will be

[LyX/master] Adapt caret height to context in mathed.

2018-04-26 Thread Jean-Marc Lasgouttes
commit 90cfe4ec3b4ff22ef798a63e98ca70d0d33a1656 Author: Jean-Marc Lasgouttes Date: Fri Apr 27 00:03:48 2018 +0200 Adapt caret height to context in mathed. Compute a height from current font and current cell vertical dimensions in MathData::metrics(), because this is where

[LyX/2.3.x] Rework caret display code

2018-04-27 Thread Jean-Marc Lasgouttes
commit be62d98dcf5cab618df4e7f9fd3501b8ce01f311 Author: Jean-Marc Lasgouttes Date: Wed Apr 18 10:10:08 2018 +0200 Rework caret display code The new code is much simpler: what it does is, after redrawing has been done, to mark the cursor row as changed, so that it will be

[LyX/master] Update documentation

2018-05-02 Thread Jean-Marc Lasgouttes
commit 969540be59de2dcb15a694cea268a4b16af24688 Author: Jean-Marc Lasgouttes Date: Wed May 2 12:21:29 2018 +0200 Update documentation --- src/update_flags.h |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/update_flags.h b/src/update_flags.h index a40e88c

[LyX/master] Revert "Update documentation"

2018-05-02 Thread Jean-Marc Lasgouttes
commit 7f035b51a00f96f4dd49e6d67f5522cb22538438 Author: Jean-Marc Lasgouttes Date: Wed May 2 12:38:40 2018 +0200 Revert "Update documentation" This update was wrong. This reverts commit 969540be59de2dcb15a694cea268a4b16af24688. --- src/update_flags.h |3 ++

[LyX/master] Move code around

2018-05-02 Thread Jean-Marc Lasgouttes
commit 22de5c972a4e3432f09d8195ac41c77153f04770 Author: Jean-Marc Lasgouttes Date: Wed May 2 12:43:10 2018 +0200 Move code around --- src/Cursor.cpp | 12 ++-- src/Cursor.h | 18 ++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src

Re: [LyX/master] Restore implicit word selection for inset insertion.

2018-05-02 Thread Jean-Marc Lasgouttes
Le 26/04/2018 à 03:49, Richard Kimberly Heck a écrit : commit aa2f409d871d36dc0e1c038aba900d06963d3459 Author: Richard Kimberly Heck Date: Wed Apr 25 21:48:25 2018 -0400 Restore implicit word selection for inset insertion. Am I right that you test for the same condition in the if() and

[LyX/2.3.x] Set a minimal height for math rows

2018-05-10 Thread Jean-Marc Lasgouttes
commit f33d0789f6360e0b196e738d025360c2ef793b42 Author: Jean-Marc Lasgouttes Date: Mon Apr 9 12:18:24 2018 +0200 Set a minimal height for math rows The value used here is the x height. It would be nice to see what the TeXbook really says. This makes a big difference

[LyX/2.3.x] Better mechanism for setting cell height

2018-05-10 Thread Jean-Marc Lasgouttes
commit 0cba074ecf0e25ede759ee1f817a7cfec06537d6 Author: Jean-Marc Lasgouttes Date: Thu Apr 19 13:15:43 2018 +0200 Better mechanism for setting cell height When computing a cell metrics, it is now possible to specify whether it is tight (at least as tall as 'x') or no

[LyX/2.3.x] Adapt caret height to context in mathed.

2018-05-10 Thread Jean-Marc Lasgouttes
commit 4e981b034eba8b04534931e570a8f64b7396ad7d Author: Jean-Marc Lasgouttes Date: Fri Apr 27 00:03:48 2018 +0200 Adapt caret height to context in mathed. Compute a height from current font and current cell vertical dimensions in MathData::metrics(), because this is where

<    4   5   6   7   8   9   10   11   12   13   >