]> git.lyx.org Git - lyx.git/log
lyx.git
4 years agoctest autotest for #11773 language nesting with lyx2lyx.
Günter Milde [Wed, 4 Mar 2020 23:19:11 +0000 (00:19 +0100)]
ctest autotest for #11773 language nesting with lyx2lyx.

* invert failing lyx2lyx tests for ko/Welcome
* add dedicated test sample
* set language for English text part in ko/Welcome.

Also

* fix a lyx2lyx language test sample
* fix clause in unreliableTests

4 years agoRemove no longer needed module import.
Günter Milde [Wed, 4 Mar 2020 12:40:11 +0000 (13:40 +0100)]
Remove no longer needed module import.

4 years agoRefactor lyx2lyx code.
Günter Milde [Tue, 3 Mar 2020 22:44:08 +0000 (23:44 +0100)]
Refactor lyx2lyx code.

Use helper functions for shorter, self-documenting code.

Drop optional arguments that equal the default value.

Remove hard TABs and trailing whitespace.

4 years agoFixup cf9827df: do not forget keyboard bindings and docs
Jean-Marc Lasgouttes [Wed, 4 Mar 2020 11:21:11 +0000 (12:21 +0100)]
Fixup cf9827df: do not forget keyboard bindings and docs

Keyboard bindings are easy. For lfun icons in documentation, both the UserGuide and Tutorial have to be updated. Since this will have to be done again once the documentation is imported from branch, I list them here for reference:

For the lib/doc/ directory:
find . -name 'Tutorial.lyx' | xargs sed -i 's/"layout List"/"layout Labeling"/g'
find . -name 'UserGuide.lyx' | xargs sed -i 's/"layout List"/"layout Labeling"/g'
and then
find . -name 'Tutorial.lyx' | xargs sed -i 's/"layout \(Itemize\|Description\|Labeling\|Enumerate\|List\)"/"layout-toggle \1"/g'
find . -name 'UserGuide.lyx' | xargs sed -i 's/"layout \(Itemize\|Description\|Labeling\|Enumerate\|List\)"/"layout-toggle \1"/g'

Related to bug #11770.

4 years agoList is obsoleted by Labeling: update icons
Jean-Marc Lasgouttes [Wed, 4 Mar 2020 10:01:31 +0000 (11:01 +0100)]
List is obsoleted by Labeling: update icons

This does not change much in master but it is cleaner since the List
layout has been obsolete since 2010 (7f8b868f).

See bug #11770.

4 years agoFix bug #10316.
Richard Kimberly Heck [Tue, 3 Mar 2020 04:57:08 +0000 (23:57 -0500)]
Fix bug #10316.

By sending the request through the usual dispatch machinery, we
make sure the cursor is valid when we're done.

4 years agoAndr'e points out this is wrong. Of course it is, since that is not a pointer.
Richard Kimberly Heck [Tue, 3 Mar 2020 19:27:03 +0000 (14:27 -0500)]
Andr'e points out this is wrong. Of course it is, since that is not a pointer.

4 years agoDo not display caret when we're not ready
Jean-Marc Lasgouttes [Fri, 28 Feb 2020 14:21:40 +0000 (15:21 +0100)]
Do not display caret when we're not ready

Using a dialog may trigger a redraw at times where the metrics caches
have not been updated yet. To fix this, do as in paintEvent() and
abort caret blinking if there is an open undo group.

Move the decision to skip the caret painting to showCaret(), closer to
where real work happens. hideCaret () is now an alias for
showCaret(false), which allows some code refactoring.

See also commit c7496a11b2.

Fixes bug #11763 (although it does not trigger on master).

4 years agoFix nullptr warning
Richard Kimberly Heck [Tue, 3 Mar 2020 05:08:46 +0000 (00:08 -0500)]
Fix nullptr warning

4 years agoSend a DispatchResult object with dispatch requests to the TOC.
Richard Kimberly Heck [Tue, 3 Mar 2020 05:02:45 +0000 (00:02 -0500)]
Send a DispatchResult object with dispatch requests to the TOC.

This allows us to request a buffer update.

4 years agoAmend(1) 7f0efc51: Add evince_sync files to the dist target of automake
Kornel Benko [Mon, 2 Mar 2020 11:49:09 +0000 (12:49 +0100)]
Amend(1) 7f0efc51: Add evince_sync files to the dist target of automake

4 years agoFix nullptr warnings
Richard Kimberly Heck [Sun, 1 Mar 2020 20:31:52 +0000 (15:31 -0500)]
Fix nullptr warnings

4 years agoCmake build: Add evince_sync-files to be installed under the scripts dir
Kornel Benko [Sun, 1 Mar 2020 15:48:14 +0000 (16:48 +0100)]
Cmake build: Add evince_sync-files to be installed under the scripts dir

4 years agoMoving 3rdparty/evince_sync to 3rdparty/scripts/evince_sync
Kornel Benko [Sun, 1 Mar 2020 15:46:35 +0000 (16:46 +0100)]
Moving 3rdparty/evince_sync to 3rdparty/scripts/evince_sync

4 years agoCmake build: Remove deprecated policy warning
Kornel Benko [Sun, 1 Mar 2020 14:36:41 +0000 (15:36 +0100)]
Cmake build: Remove deprecated policy warning

4 years agoCmake tests: Amend f6f51587
Kornel Benko [Sat, 29 Feb 2020 19:37:04 +0000 (20:37 +0100)]
Cmake tests: Amend f6f51587

4 years agoUn-provide amsmath in beamer article layouts
Juergen Spitzmueller [Sat, 29 Feb 2020 18:20:18 +0000 (19:20 +0100)]
Un-provide amsmath in beamer article layouts

Fixes #11768

4 years agoAvoid a copy.
Richard Kimberly Heck [Sat, 29 Feb 2020 10:55:20 +0000 (05:55 -0500)]
Avoid a copy.

4 years agoru.po: update by Yuriy
Juergen Spitzmueller [Sat, 29 Feb 2020 08:38:15 +0000 (09:38 +0100)]
ru.po: update by Yuriy

4 years agoFix warnings and use ranges.
Richard Kimberly Heck [Sat, 29 Feb 2020 05:21:02 +0000 (00:21 -0500)]
Fix warnings and use ranges.

4 years agoFix warnings
Richard Kimberly Heck [Sat, 29 Feb 2020 05:21:00 +0000 (00:21 -0500)]
Fix warnings

4 years agoFix a bunch of warnings
Richard Kimberly Heck [Sat, 29 Feb 2020 05:06:30 +0000 (00:06 -0500)]
Fix a bunch of warnings

4 years agoFix warnings in support/.
Richard Kimberly Heck [Sat, 29 Feb 2020 05:00:47 +0000 (00:00 -0500)]
Fix warnings in support/.

4 years agoFix header.
Richard Kimberly Heck [Sat, 29 Feb 2020 04:52:06 +0000 (23:52 -0500)]
Fix header.

4 years agoNull pointers.
Richard Kimberly Heck [Sat, 29 Feb 2020 04:51:53 +0000 (23:51 -0500)]
Null pointers.

4 years agoCmake build: Use correct include if using internal hunspell
Kornel Benko [Fri, 28 Feb 2020 20:48:54 +0000 (21:48 +0100)]
Cmake build: Use correct include if using internal hunspell

This way also "HAVE_HUNSPELL_CXXABI" is correctly set to 1

4 years agoUse ranges, fix warning
Richard Kimberly Heck [Fri, 28 Feb 2020 06:55:05 +0000 (01:55 -0500)]
Use ranges, fix warning

4 years agoUse ranges, fix warning
Richard Kimberly Heck [Fri, 28 Feb 2020 06:48:10 +0000 (01:48 -0500)]
Use ranges, fix warning

4 years agoUse range
Richard Kimberly Heck [Fri, 28 Feb 2020 06:44:48 +0000 (01:44 -0500)]
Use range

4 years agoFix nullptr warnings
Richard Kimberly Heck [Fri, 28 Feb 2020 06:42:32 +0000 (01:42 -0500)]
Fix nullptr warnings

4 years agoUse ranges, fix warnings
Richard Kimberly Heck [Fri, 28 Feb 2020 06:39:06 +0000 (01:39 -0500)]
Use ranges, fix warnings

4 years agoFix nullptr warnings
Richard Kimberly Heck [Fri, 28 Feb 2020 06:28:08 +0000 (01:28 -0500)]
Fix nullptr warnings

4 years agoUse ranges, fix warnings
Richard Kimberly Heck [Fri, 28 Feb 2020 06:25:30 +0000 (01:25 -0500)]
Use ranges, fix warnings

4 years agoFix warnings
Richard Kimberly Heck [Fri, 28 Feb 2020 06:21:02 +0000 (01:21 -0500)]
Fix warnings

4 years agoFix warnings
Richard Kimberly Heck [Fri, 28 Feb 2020 06:16:21 +0000 (01:16 -0500)]
Fix warnings

4 years agoUse range
Richard Kimberly Heck [Fri, 28 Feb 2020 06:13:56 +0000 (01:13 -0500)]
Use range

4 years agoFix warnings
Richard Kimberly Heck [Fri, 28 Feb 2020 06:09:45 +0000 (01:09 -0500)]
Fix warnings

4 years agoUse range and rename private variable
Richard Kimberly Heck [Fri, 28 Feb 2020 06:08:28 +0000 (01:08 -0500)]
Use range and rename private variable

4 years agoUse more ranges
Richard Kimberly Heck [Fri, 28 Feb 2020 06:06:22 +0000 (01:06 -0500)]
Use more ranges

4 years agoUse ranges
Richard Kimberly Heck [Fri, 28 Feb 2020 05:52:38 +0000 (00:52 -0500)]
Use ranges

4 years agoPolish
Richard Kimberly Heck [Fri, 28 Feb 2020 05:39:50 +0000 (00:39 -0500)]
Polish

4 years agoMore requires --> required, for C++2a.
Richard Kimberly Heck [Fri, 28 Feb 2020 05:36:55 +0000 (00:36 -0500)]
More requires --> required, for C++2a.

4 years agoApparently, "requires" is a keyword in C++2a.
Richard Kimberly Heck [Fri, 28 Feb 2020 05:26:31 +0000 (00:26 -0500)]
Apparently, "requires" is a keyword in C++2a.

4 years agoRemove code that has not been used since 2010.
Richard Kimberly Heck [Fri, 28 Feb 2020 05:21:48 +0000 (00:21 -0500)]
Remove code that has not been used since 2010.

See 208acbc72.

4 years agoStop dialogs from updating twice all the time.
Richard Kimberly Heck [Fri, 28 Feb 2020 05:11:45 +0000 (00:11 -0500)]
Stop dialogs from updating twice all the time.

I've long wondered why dialogs seem to update twice when it seems
they just need to update once. It seems it was this code. But it
was only put there to deal with a problem with code in the button
controllers that was disabled in 2007! So I'm going to try removing
it. If we start seeing weird behavior with dialogs in master, then
this will be why.

4 years agoFix warnings
Richard Kimberly Heck [Fri, 28 Feb 2020 05:10:23 +0000 (00:10 -0500)]
Fix warnings

4 years agoRemove code that has not been used for 13 years.
Richard Kimberly Heck [Fri, 28 Feb 2020 05:08:30 +0000 (00:08 -0500)]
Remove code that has not been used for 13 years.

4 years agoFix warnings.
Richard Kimberly Heck [Fri, 28 Feb 2020 05:07:53 +0000 (00:07 -0500)]
Fix warnings.

4 years agoFix a bunch of warnings.
Richard Kimberly Heck [Fri, 28 Feb 2020 04:58:01 +0000 (23:58 -0500)]
Fix a bunch of warnings.

4 years agoRevert unintended change
Richard Kimberly Heck [Thu, 27 Feb 2020 19:36:46 +0000 (14:36 -0500)]
Revert unintended change

4 years agoFix null pointer warnings.
Richard Kimberly Heck [Thu, 27 Feb 2020 05:05:41 +0000 (00:05 -0500)]
Fix null pointer warnings.

4 years agoFix warning (and simplify)
Richard Kimberly Heck [Thu, 27 Feb 2020 04:37:24 +0000 (23:37 -0500)]
Fix warning (and simplify)

4 years agoFix bug #11748.
Richard Kimberly Heck [Thu, 27 Feb 2020 04:00:09 +0000 (23:00 -0500)]
Fix bug #11748.

Track the last chosen citation style when we clear the entries.

4 years agoFix a bunch of warnings
Richard Kimberly Heck [Thu, 27 Feb 2020 03:29:40 +0000 (22:29 -0500)]
Fix a bunch of warnings

4 years agoFix problem with validation when using InsetLayout.
Richard Kimberly Heck [Thu, 27 Feb 2020 03:18:58 +0000 (22:18 -0500)]
Fix problem with validation when using InsetLayout.

4 years agoCleaner fix to ensure 32-bit XCB events
Enrico Forestieri [Tue, 25 Feb 2020 11:37:51 +0000 (12:37 +0100)]
Cleaner fix to ensure 32-bit XCB events

This fix still satisfies Valgrind and is cleaner than the approach
at 19c41bd0: instead of using calloc we now use the C++11 specifier
alignas. For more info, see the following ML thread:
https://www.mail-archive.com/search?l=mid&q=20200219024908.5n4x4osni55gylo3%40tallinn

4 years agoRevert "Fix write to uninitialized bytes for XCB event"
Enrico Forestieri [Tue, 25 Feb 2020 11:32:10 +0000 (12:32 +0100)]
Revert "Fix write to uninitialized bytes for XCB event"

This reverts commit 19c41bd09572f15ac3546c8e6a6d4ec15306c93a.

A more efficient fix is on the way.

4 years agoFix bug #11750.
Richard Kimberly Heck [Tue, 25 Feb 2020 00:00:31 +0000 (19:00 -0500)]
Fix bug #11750.

Unfortunately, stat.st_ino returns 0 on Windows, at least on Python 2.7, so we can't use that way of telling when we're seeing the same directory again. Surely the real pathname should work.

4 years agoFixup d207e85c: paint sublabel with the correct background color
Jean-Marc Lasgouttes [Mon, 24 Feb 2020 09:37:14 +0000 (10:37 +0100)]
Fixup d207e85c: paint sublabel with the correct background color

The above mentionned patch did paint the background of the sublabel to
avoid "bold-like" effect. However the correct backgound color is the
row's one, not the inset's one.

4 years agoFix alignment warnings from clang.
Richard Kimberly Heck [Sun, 23 Feb 2020 22:14:13 +0000 (17:14 -0500)]
Fix alignment warnings from clang.

4 years agoUse C++11 construct.
Richard Kimberly Heck [Sun, 23 Feb 2020 21:59:31 +0000 (16:59 -0500)]
Use C++11 construct.

4 years agoFix FileName::realPath() on Windows
Enrico Forestieri [Sun, 23 Feb 2020 21:48:35 +0000 (22:48 +0100)]
Fix FileName::realPath() on Windows

The realPath() implementation on Windows works only for files and
not for directories. By using an API available starting from Vista
it is possible to fix it in a simple way.

I also took into account using the Qt QFileInfo::canonicalFilePath(),
but it turns out to not work when a path component is a junction
(tested with Qt 5.14.1).

Due to this, it is not possible compiling or using LyX on Windows
versions earlier than Vista.

4 years agoTry again to fix memory leak reported by Scott.
Richard Kimberly Heck [Sun, 23 Feb 2020 21:39:00 +0000 (16:39 -0500)]
Try again to fix memory leak reported by Scott.

This time, use a shared_ptr.

4 years agoRevert "Fix memory leak reported by Scott."
Richard Kimberly Heck [Sun, 23 Feb 2020 21:29:58 +0000 (16:29 -0500)]
Revert "Fix memory leak reported by Scott."

It leads to a double delete error.

This reverts commit 11397a2e82ba19b69818f9891132ff7074bc1759.

4 years agoFix memory leak reported by Scott.
Richard Kimberly Heck [Sun, 23 Feb 2020 20:54:13 +0000 (15:54 -0500)]
Fix memory leak reported by Scott.

4 years agoFix some clang warnings.
Richard Kimberly Heck [Sun, 23 Feb 2020 20:51:52 +0000 (15:51 -0500)]
Fix some clang warnings.

The first one, a comma instead of a semi-colon, is a weird one.

4 years agoFix nullptr warnings
Richard Kimberly Heck [Wed, 19 Feb 2020 00:27:12 +0000 (19:27 -0500)]
Fix nullptr warnings

4 years agoFix "no extern declaration" warning.
Richard Kimberly Heck [Wed, 19 Feb 2020 00:22:54 +0000 (19:22 -0500)]
Fix "no extern declaration" warning.

4 years agoCmake build: Remove unused option
Kornel Benko [Sat, 22 Feb 2020 20:13:43 +0000 (21:13 +0100)]
Cmake build: Remove unused option

LYX_USE_FILEDIALOG is not used since af795b80

4 years agoMake sure that spelling marks do not spill ouside of row
Jean-Marc Lasgouttes [Sat, 22 Feb 2020 16:59:37 +0000 (17:59 +0100)]
Make sure that spelling marks do not spill ouside of row

This avoids annoying remnants of dotted red lines.

Fixes bug #11755.

4 years agoAvoid UTF8 "no-break space" and use the space inset instead.
Stephan Witt [Sat, 22 Feb 2020 14:21:26 +0000 (15:21 +0100)]
Avoid UTF8 "no-break space" and use the space inset instead.

4 years agoProvide predefined key binding for LFUN "forward-search" on Mac
Stephan Witt [Sat, 22 Feb 2020 11:24:41 +0000 (12:24 +0100)]
Provide predefined key binding for LFUN "forward-search" on Mac

4 years agoUse real path names for buffer lookup by name of temporary external files.
Stephan Witt [Sat, 22 Feb 2020 11:11:42 +0000 (12:11 +0100)]
Use real path names for buffer lookup by name of temporary external files.

In case of path names for external files containing symbolic links the real path
and the logical path name may be different for the same file or directory.
LyX is using QDir::tempPath() to create the path name of the temporary directory.
The Qt implementation is free to return the logical or the real path name here and
it happens to be different for various platforms and versions.
The most stable and clean solution is to use the real path name consistently.

4 years agoMake the directories in LyX application bundle read only.
Stephan Witt [Fri, 21 Feb 2020 17:04:28 +0000 (18:04 +0100)]
Make the directories in LyX application bundle read only.

Python produces files with cached on-the-fly compiled code on disk inside the bundle.
This should be avoided in case of a signed application bundle.

4 years agoCleanup code signing of the LyX application bundle
Stephan Witt [Fri, 21 Feb 2020 08:45:09 +0000 (09:45 +0100)]
Cleanup code signing of the LyX application bundle

4 years agoCleanup internal structure of embedded Qt frameworks
Stephan Witt [Fri, 21 Feb 2020 08:44:07 +0000 (09:44 +0100)]
Cleanup internal structure of embedded Qt frameworks

4 years agoImproved standard conformance of private frameworks naming scheme
Stephan Witt [Fri, 21 Feb 2020 08:43:10 +0000 (09:43 +0100)]
Improved standard conformance of private frameworks naming scheme

4 years agoAvoid potential leak of memory pointed to by QTreeWidgetItem subcatItem
Stephan Witt [Fri, 21 Feb 2020 06:57:09 +0000 (07:57 +0100)]
Avoid potential leak of memory pointed to by QTreeWidgetItem subcatItem

4 years agoAdd packaging option to code sign the LyX application
Stephan Witt [Thu, 20 Feb 2020 09:47:23 +0000 (10:47 +0100)]
Add packaging option to code sign the LyX application

4 years agoCreate private frameworks on Mac with standard conforming internal structure
Stephan Witt [Thu, 20 Feb 2020 09:46:22 +0000 (10:46 +0100)]
Create private frameworks on Mac with standard conforming internal structure

4 years agogcc 4.7 leftover
Pavel Sanda [Thu, 20 Feb 2020 08:24:34 +0000 (09:24 +0100)]
gcc 4.7 leftover

4 years agoOnly gcc 4.8 is C++11 feature complete.
Pavel Sanda [Thu, 20 Feb 2020 08:15:31 +0000 (09:15 +0100)]
Only gcc 4.8 is C++11 feature complete.

4 years agoAvoid potential leak of memory pointed to by QTreeWidgetItem catItem
Stephan Witt [Thu, 20 Feb 2020 07:12:08 +0000 (08:12 +0100)]
Avoid potential leak of memory pointed to by QTreeWidgetItem catItem

4 years agoru.po: update by Yuriy
Juergen Spitzmueller [Wed, 19 Feb 2020 17:26:52 +0000 (18:26 +0100)]
ru.po: update by Yuriy

4 years agoFix write to uninitialized bytes for XCB event
Scott Kostyshak [Wed, 19 Feb 2020 02:39:18 +0000 (21:39 -0500)]
Fix write to uninitialized bytes for XCB event

As the xcb_send_event man page [1] states,

  In order to properly initialize these bytes, we allocate 32 bytes
  even though we only need less for an xcb_configure_notify_event_t

This commit fixes the following Valgrind error, which could be
triggered by selecting a letter in LyX:

  ==12698== Syscall param writev(vector[...]) points to uninitialised byte(s)
  ==12698==    at 0x61F578D: __writev (writev.c:26)
  ==12698==    by 0x61F578D: writev (writev.c:24)
  ==12698==    by 0x4A83BFC: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
  ==12698==    by 0x4A83FD0: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
  ==12698==    by 0x4A84246: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
  ==12698==    by 0x4A84ACB: xcb_flush (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
  ==12698==    by 0x17C8F06: lyx::frontend::GuiApplication::nativeEventFilter(QByteArray const&, void*, long*) (GuiApplication.cpp:3366)
  ==12698==    by 0x5AA4EEE: QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) (qabstracteventdispatcher.cpp:484)

[1] https://www.x.org/releases/current/doc/man/man3/xcb_send_event.3.xhtml

4 years agoFix memory leak.
Pavel Sanda [Tue, 18 Feb 2020 09:03:42 +0000 (10:03 +0100)]
Fix memory leak.

Spotted by Scott.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg210447.html

4 years agoAdd missing check for nullptr on check of language encoding of next paragraph.
Stephan Witt [Tue, 18 Feb 2020 08:03:20 +0000 (09:03 +0100)]
Add missing check for nullptr on check of language encoding of next paragraph.

4 years agoAdd missing initialization for local variable.
Stephan Witt [Tue, 18 Feb 2020 07:59:20 +0000 (08:59 +0100)]
Add missing initialization for local variable.

The autoargs variable is random for empty macro argument lists otherwise.

4 years agoRemove useless assignments to a local variables never read later.
Stephan Witt [Tue, 18 Feb 2020 07:55:45 +0000 (08:55 +0100)]
Remove useless assignments to a local variables never read later.

4 years agoRemove useless assignment to a local variables never read later.
Stephan Witt [Tue, 18 Feb 2020 07:55:00 +0000 (08:55 +0100)]
Remove useless assignment to a local variables never read later.

4 years agoAvoid crashes in case of missing document buffer for buffer based conversions.
Stephan Witt [Tue, 18 Feb 2020 07:43:22 +0000 (08:43 +0100)]
Avoid crashes in case of missing document buffer for buffer based conversions.

4 years agoSilence some clang warnings.
Richard Kimberly Heck [Mon, 17 Feb 2020 17:31:24 +0000 (12:31 -0500)]
Silence some clang warnings.

4 years agoFix a strange warning in QtCreator:
Richard Kimberly Heck [Fri, 14 Feb 2020 16:11:12 +0000 (11:11 -0500)]
Fix a strange warning in QtCreator:

/cvs/lyx/lyx-devel/src/frontends/qt/TocModel.cpp:356: warning: loop variable 'toc' has type 'const pair<std::string, shared_ptr<lyx::Toc> > &' (aka 'const pair<basic_string<char>, shared_ptr<vector<lyx::TocItem> > > &') but is initialized with type 'const std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<std::vector<lyx::TocItem, std::allocator<lyx::TocItem> > > >' resulting in a copy

/cvs/lyx/lyx-devel/src/frontends/qt/TocModel.cpp:356: use non-reference type 'pair<std::string, shared_ptr<lyx::Toc> >' (aka 'pair<basic_string<char>, shared_ptr<vector<lyx::TocItem> > >') to keep the copy or type 'const std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<std::vector<lyx::TocItem, std::allocator<lyx::TocItem> > > > &' to prevent copying

Easier just to use 'auto'.

4 years agoRemove unnecessary assertion after explicit buffer pointer check.
Stephan Witt [Mon, 17 Feb 2020 13:35:03 +0000 (14:35 +0100)]
Remove unnecessary assertion after explicit buffer pointer check.

4 years agoAvoid potential crashes with missing document buffer in dispatch of buffer based...
Stephan Witt [Mon, 17 Feb 2020 12:36:37 +0000 (13:36 +0100)]
Avoid potential crashes with missing document buffer in dispatch of buffer based LFUNs.

Use LASSERT with appropriate action instead of LATTEST assertions.
Debug build is unchanged and asserts, release build skips the action gracefully.

4 years agoCode cleanup: avoid repeating temp_dir method calls while local variable has a result...
Stephan Witt [Mon, 17 Feb 2020 12:25:35 +0000 (13:25 +0100)]
Code cleanup: avoid repeating temp_dir method calls while local variable has a result already.

4 years agoRestore custom tmp directory
Juergen Spitzmueller [Mon, 17 Feb 2020 08:00:08 +0000 (09:00 +0100)]
Restore custom tmp directory

Fixes #1174

4 years agolyxpreview_tools.py: fix a regular expression
Scott Kostyshak [Sat, 15 Feb 2020 18:27:45 +0000 (13:27 -0500)]
lyxpreview_tools.py: fix a regular expression

Three backslashes are needed before a LaTeX command, not one. Before
this commit, the code gave the following error with Python >= 3.6:

  re.error: bad escape \g at position 29

This error was introduced with Python 3.6, as documented [1] by the
following line of documentation:

  Changed in version 3.6: Unknown escapes in pattern consisting of
  '\' and an ASCII letter now are errors.

Although previous Python versions did not give an error, the regular
expression was not working as intended: for example, the "\\n" in
"\\newcommandx" would be interpreted as a new line.

[1] https://docs.python.org/3.6/library/re.html#re.sub

4 years agoUnify handling in dispatchVC.
Pavel Sanda [Sat, 15 Feb 2020 19:55:14 +0000 (20:55 +0100)]
Unify handling in dispatchVC.

All these check could be actually dropped, because unless dispatchVC
is called directly, getstatus would already handle it.

4 years agoAmend 43dfd12f
Kornel Benko [Sat, 15 Feb 2020 11:21:32 +0000 (12:21 +0100)]
Amend 43dfd12f