[LyX master] Update ru.po
The branch, master, has been updated. - Log - commit 59d1cc69509c1d4b73f2428d7f7fb0e1bbf2df1d Author: Yuriy Skalko Date: Mon Feb 12 19:11:00 2024 +0100 Update ru.po diff --git a/po/ru.gmo b/po/ru.gmo index 721baa7c68..a42aef583f 100644 Binary files a/po/ru.gmo and b/po/ru.gmo differ diff --git a/po/ru.po b/po/ru.po index 78b418ebce..d82f745e38 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,13 +6,13 @@ # Nick A. Gusev , 2009. # Valeriy Kruchko , 2009. # Sergey Tereschenko , 2010. -# Yuriy Skalko , 2017-2023. +# Yuriy Skalko , 2017-2024. msgid "" msgstr "" "Project-Id-Version: LyX 2.4\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" "POT-Creation-Date: 2024-02-12 11:10-0500\n" -"PO-Revision-Date: 2023-11-12 19:37+0100\n" +"PO-Revision-Date: 2024-02-12 18:54+0100\n" "Last-Translator: Yuriy Skalko \n" "Language-Team: Russian \n" "Language: ru\n" @@ -17470,9 +17470,8 @@ msgid "(\\Alph{enumiv})" msgstr "(\\Alph{enumiv})" #: lib/layouts/stdcounters.inc:82 -#, fuzzy msgid "Listing ##" -msgstr "ÐиÑÑинг" +msgstr "ÐиÑÑинг ##" #: lib/layouts/stdcounters.inc:87 msgid "Equation ##" --- Summary of changes: po/ru.gmo | Bin 797290 -> 797431 bytes po/ru.po | 7 +++ 2 files changed, 3 insertions(+), 4 deletions(-) hooks/post-receive -- The LyX Source Repository -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] ru/UserGuide: adjust for alphadin to alpha change
commit 7b218e11991d606c7b8198ca9b03aebc8369b37c Author: Yuriy Skalko Date: Sat Jan 27 10:52:20 2024 +0100 ru/UserGuide: adjust for alphadin to alpha change --- lib/doc/ru/UserGuide.lyx | 13 + 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/lib/doc/ru/UserGuide.lyx b/lib/doc/ru/UserGuide.lyx index a435966..615f07b 100644 --- a/lib/doc/ru/UserGuide.lyx +++ b/lib/doc/ru/UserGuide.lyx @@ -30724,18 +30724,7 @@ literal "false" alpha.bst \family default , - который обеспечивает буквенно-цифровой стиль в соответствии с Немецким институтом стандартов (DIN). -\begin_inset Note Note -status collapsed - -\begin_layout Plain Layout -Please adjust, - style has been changed from alphadin to alpha -\end_layout - -\end_inset - - + который обеспечивает буквенно-цифровой стиль. \end_layout \begin_layout Standard -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update ru.po
commit fd69f35fe9a91aa765efffa6392fcba16c22fe17 Author: Yuriy Skalko Date: Fri Nov 10 17:37:25 2023 +0100 Update ru.po --- po/ru.gmo | Bin 797206 -> 797290 bytes po/ru.po | 124 ++-- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/po/ru.gmo b/po/ru.gmo index 4834ab2..85900c1 100644 Binary files a/po/ru.gmo and b/po/ru.gmo differ diff --git a/po/ru.po b/po/ru.po index 90e584e..82de058 100644 --- a/po/ru.po +++ b/po/ru.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: LyX 2.4\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" "POT-Creation-Date: 2023-11-05 11:07-0500\n" -"PO-Revision-Date: 2023-11-08 21:50+0100\n" +"PO-Revision-Date: 2023-11-12 19:37+0100\n" "Last-Translator: Yuriy Skalko \n" "Language-Team: Russian \n" "Language: ru\n" @@ -111,9 +111,9 @@ msgid "" "full list for author-year citation, you can put the full list here and the " "abbreviated list above." msgstr "" -"Если вы хотите использовать сокращенный список авторов (с пометкой \"и др." +"Если вы хотите использовать сокращённый список авторов (с пометкой \"и др." "\"), а также полный список для ссылки \"автор-год\", вы можете поместить " -"полный список здесь и сокращенный список выше." +"полный список здесь и сокращённый список выше." #: src/frontends/qt/ui/BibitemUi.ui:122 src/frontends/qt/GuiBibitem.cpp:93 msgid "" @@ -2343,7 +2343,7 @@ msgid "" "Link to an arbitrary URI scheme not matched by the other three types (to be " "fully spelled out in the Target field above)" msgstr "" -"Ссылка на произвольную схему URI, не соответствующую трем другим типам " +"Ссылка на произвольную схему URI, не соответствующую трём другим типам " "(должна быть полностью прописана в поле Цель выше)" #: src/frontends/qt/ui/HyperlinkUi.ui:169 @@ -3123,7 +3123,7 @@ msgid "" "document.This is the fastest method. Use this if you do not need correct " "counter values and references." msgstr "" -"Все счётчики и ссылки исключенных дочерних документов будут игнорироваться, " +"Все счётчики и ссылки исключённых дочерних документов будут игнорироваться, " "при этом счётчики в выводе будут отличаться от вывода полного документа." "Это самый быстрый метод. Используйте его, если вам не нужны правильные " "значения счётчиков и ссылок." @@ -3460,13 +3460,13 @@ msgid "" "Namespace prefix to use for MathML formulae. For instance, with the m prefix, the MathML tags will be output like m:math." msgstr "" -"Префикс пространства имен для формул MathML. Например, с префиксом mm теги MathML будут выводиться как m:math." #: src/frontends/qt/ui/OutputUi.ui:327 msgid "No prefix (namespace defined inline for each tag)" msgstr "" -"Без префикса (пространство имен определяется непосредственно для каждого " +"Без префикса (пространство имён определяется непосредственно для каждого " "тега)" #: src/frontends/qt/ui/OutputUi.ui:332 @@ -3487,7 +3487,7 @@ msgstr "CALS" #: src/frontends/qt/ui/OutputUi.ui:419 msgid " namespace prefix:" -msgstr "Префикс пространства имен MathML:" +msgstr "Префикс пространства имён MathML:" #: src/frontends/qt/ui/OutputUi.ui:449 msgid "LyX Format" @@ -3636,7 +3636,7 @@ msgstr "Дополнительные &параметры" msgid "" "Additional hyperref options (comma-separated) to be passed via \\hypersetup." msgstr "" -"Дополнительные параметры hyperref (разделенные запятыми) для передачи через " +"Дополнительные параметры hyperref (разделённые запятыми) для передачи через " "\\hypersetup." #: src/frontends/qt/ui/PDFSupportUi.ui:464 @@ -6193,7 +6193,7 @@ msgid "" "change tracking, etc.)" msgstr "" "Отфильтровать элементы, которые не выводятся (в заметках, неактивных ветках, " -"удаленных в отслеживании изменений и т. д.)" +"удалённых в отслеживании изменений и т. д.)" #: src/frontends/qt/ui/TocUi.ui:317 src/frontends/qt/TocWidget.cpp:99 msgid "All items" @@ -14241,7 +14241,7 @@ msgstr "Аннотация над колонками" #: lib/layouts/jlreq-common.inc:107 lib/layouts/jlreq-common.inc:113 msgid "JLReq Setup" -msgstr "JLReq Setup" +msgstr "Настройка JLReq" #: lib/layouts/jlreq-common.inc:170 lib/layouts/jlreq-common.inc:173 #: lib/layouts/tufte-book.layout:27 lib/layouts/tufte-book.layout:159 @@ -14310,7 +14310,7 @@ msgstr "Distance
[LyX/master] Update ru.po and UserGuide
commit bf0005b5b265d8811d7a074de0467e673d4d7bf3 Author: Yuriy Skalko Date: Wed Nov 8 23:14:50 2023 +0100 Update ru.po and UserGuide lib/doc/ru/UserGuide.lyx | 123 - po/ru.gmo| Bin 774731 -> 797206 bytes po/ru.po | 729 +- 3 files changed, 320 insertions(+), 532 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Better dialog resizing behavior
commit 53784b90aeaad049b6cc4f9002d28509706fb343 Author: Yuriy Skalko Date: Wed Nov 8 23:38:09 2023 +0100 Better dialog resizing behavior --- src/frontends/qt/ui/AboutUi.ui | 13 - src/frontends/qt/ui/PageLayoutUi.ui |2 +- src/frontends/qt/ui/PrefLatexUi.ui |5 - 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/frontends/qt/ui/AboutUi.ui b/src/frontends/qt/ui/AboutUi.ui index a2175dd..4a6adac 100644 --- a/src/frontends/qt/ui/AboutUi.ui +++ b/src/frontends/qt/ui/AboutUi.ui @@ -234,19 +234,6 @@ - - - - Qt::Horizontal - - - - 15 - 20 - - - - diff --git a/src/frontends/qt/ui/PageLayoutUi.ui b/src/frontends/qt/ui/PageLayoutUi.ui index c7c77d2..b8fb8c0 100644 --- a/src/frontends/qt/ui/PageLayoutUi.ui +++ b/src/frontends/qt/ui/PageLayoutUi.ui @@ -153,7 +153,7 @@ - + 0 0 diff --git a/src/frontends/qt/ui/PrefLatexUi.ui b/src/frontends/qt/ui/PrefLatexUi.ui index c39b441..cd4088e 100644 --- a/src/frontends/qt/ui/PrefLatexUi.ui +++ b/src/frontends/qt/ui/PrefLatexUi.ui @@ -65,10 +65,13 @@ Qt::Vertical + + QSizePolicy::Fixed + 20 - 0 + 5 -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] UserGuide: fix menu name
commit 76d8bfcf2111ac94782e53cdf69e549622e92e0c Author: Yuriy Skalko Date: Wed Nov 8 23:21:57 2023 +0100 UserGuide: fix menu name --- lib/doc/UserGuide.lyx |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx index 97e7e21..fc0497b 100644 --- a/lib/doc/UserGuide.lyx +++ b/lib/doc/UserGuide.lyx @@ -22409,7 +22409,13 @@ non-breaking hyphen ( \family sans Insert\SpecialChar menuseparator -Formatting\SpecialChar menuseparator + +\change_inserted 244031559 1699481895 +Special Character +\change_deleted 244031559 1699481900 +Formatting +\change_unchanged +\SpecialChar menuseparator \change_deleted 177693 1654619809 Protected -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Typo
commit fe8d1209a202e66d6efb2c223b5b6d39332d33ea Author: Yuriy Skalko Date: Tue Sep 19 01:10:57 2023 +0200 Typo --- .../Win32/packaging/installer/src/lang/english.nsh |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/development/Win32/packaging/installer/src/lang/english.nsh b/development/Win32/packaging/installer/src/lang/english.nsh index 7bb40dd..22d56b1 100644 --- a/development/Win32/packaging/installer/src/lang/english.nsh +++ b/development/Win32/packaging/installer/src/lang/english.nsh @@ -8,7 +8,7 @@ Author: Joost Verburg, Uwe Stöhr ${LangFileString} TEXT_INSTALL_CURRENTUSER "(Installed for Current User)" -${LangFileString} TEXT_WELCOME "This wizard will guide you through the installation of $(^NameDA), $\r$\n\ +${LangFileString} TEXT_WELCOME "This wizard will guide you through the installation of $(^NameDA). $\r$\n\ $\r$\n\ $_CLICK" -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Name menu item according to UI guidelines
commit 771bb50552cf55db6958a80dba0505d61e607e78 Author: Yuriy Skalko Date: Fri Jun 16 00:34:05 2023 +0200 Name menu item according to UI guidelines --- lib/ui/stdcontext.inc |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index b594814..fdef5b4 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -644,7 +644,7 @@ Menuset OptItem "Bold Page Formatting|B" "inset-modify changeparam pagefmt textbf" OptItem "Italic Page Formatting|I" "inset-modify changeparam pagefmt textit" OptItem "Emphasized Page Formatting|z" "inset-modify changeparam pagefmt emph" - OptItem "Custom Page Formatting|u" "inset-modify changeparam pagefmt custom" + OptItem "Custom Page Formatting...|u" "inset-modify changeparam pagefmt custom" End Menu "context-edit-index" -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update ru.po
commit e050d8cfe4ed8b23d6956689d6e94244af4ae480 Author: Yuriy Skalko Date: Mon Mar 20 00:19:54 2023 +0100 Update ru.po --- po/ru.gmo | Bin 777030 -> 786554 bytes po/ru.po | 287 ++--- 2 files changed, 122 insertions(+), 165 deletions(-) diff --git a/po/ru.gmo b/po/ru.gmo index bf81157..7bd5529 100644 Binary files a/po/ru.gmo and b/po/ru.gmo differ diff --git a/po/ru.po b/po/ru.po index 75cf606..27b93ff 100644 --- a/po/ru.po +++ b/po/ru.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: LyX 2.4\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" "POT-Creation-Date: 2023-03-15 22:56+0100\n" -"PO-Revision-Date: 2023-03-12 16:52+0100\n" +"PO-Revision-Date: 2023-03-20 00:18+0100\n" "Last-Translator: Yuriy Skalko \n" "Language-Team: Russian \n" "Language: ru\n" @@ -1743,7 +1743,7 @@ msgstr "Зачёркивание" #: src/frontends/qt/ui/FindAndReplaceUi.ui:460 msgid "Font series[[FindReplaceAdv]]" -msgstr "" +msgstr "Насыщенность шрифта" #: src/frontends/qt/ui/FindAndReplaceUi.ui:474 msgid "Emph/noun" @@ -2557,12 +2557,10 @@ msgstr "" "ниже." #: src/frontends/qt/ui/InfoUi.ui:49 src/frontends/qt/GuiInfo.cpp:362 -#, fuzzy msgid " Date:" msgstr "Заданная дата:" #: src/frontends/qt/ui/InfoUi.ui:59 src/frontends/qt/GuiInfo.cpp:361 -#, fuzzy msgid "Here you can enter a fixed date (in ISO format: -MM-DD)" msgstr "Введите дату (в формате ISO: -MM-DD)" @@ -2935,7 +2933,6 @@ msgid "Errors reported in terminal." msgstr "Ошибки показаны в терминале." #: src/frontends/qt/ui/LocalLayoutUi.ui:74 src/frontends/qt/ui/PreambleUi.ui:49 -#, fuzzy msgid "Editor for LaTeX (plain) format will be used" msgstr "Будет использован редактор для формата LaTeX (plain)" @@ -3303,7 +3300,6 @@ msgid " out" msgstr "&Серый текст" #: src/frontends/qt/ui/NumberingUi.ui:37 -#, fuzzy msgid "Add line numbers to the side of the document" msgstr "Добавить нумерацию строк в документ" @@ -4086,14 +4082,20 @@ msgid "" "the application crashes with unsaved changes and the restoration from the " "emergency file fails, this snapshot can be at rescue." msgstr "" +"Если флажок установлен, LyX сохраняет временную копию измененных документов " +"в заданном интервале (как #filename.lyx# в заданном каталоге). В отличие от " +"резервного копирования, задаваемого выше, эта временная копия будет удалена " +"сразу после сохранения изменений. Если приложение аварийно завершает работу " +"с несохраненными изменениями и восстановление из аварийного файла не " +"удается, эта копия может стать спасением." #: src/frontends/qt/ui/PrefDocHandlingUi.ui:106 msgid "Make a snapshots every[[ N minutes]]" -msgstr "" +msgstr "Делать копии с автоматическим сохранением каждые" #: src/frontends/qt/ui/PrefDocHandlingUi.ui:123 msgid "[[Make auto-save snapshots every N ]]" -msgstr "" +msgstr "минут" #: src/frontends/qt/ui/PrefDocHandlingUi.ui:148 msgid "" @@ -4901,6 +4903,10 @@ msgid "" "This requires 'Backup original documents when saving' in Look & Feel > " "Document Handling to be checked." msgstr "" +"Если здесь указан путь, все резервные копии файлов LyX будут располагаться " +"там. Если путь не указан, резервные копии будут храниться рядом с исходным " +"документом. Для этого необходимо установить флажок 'Резервное копирование " +"исходных документов при сохранении' в Вид и поведение > Документ." #: src/frontends/qt/ui/PrefPathsUi.ui:156 msgid " directory:" @@ -5528,10 +5534,10 @@ msgid "Re All" msgstr "Заменить вс&ё" #: src/frontends/qt/ui/SpellcheckerUi.ui:165 -#, fuzzy msgid "" "Ignore this occurrence of the word permanently (saved as a text property)." -msgstr "Игнорировать это появление слова всегда" +msgstr "" +"Игнорировать это появление слова всегда (сохраняется в свойствах текста)" #: src/frontends/qt/ui/SpellcheckerUi.ui:168 msgid "Ign" @@ -6400,25 +6406,25 @@ msgstr "Использовать полный заголовок, даже ес #: lib/citeengines/biblatex.citeengine:145 #: lib/citeengines/jurabib.citeengine:130 lib/citeengines/natbib.citeengine:124 msgid " et al." -msgstr "" +msgstr " и др." #: lib/citeengines/biblatex-natbib.citeengine:154 #: lib/citeengines/biblatex.citeengine:146 #: lib/citeengines/natbib.citeengine:125 lib/layouts/stdciteformats.inc:29 msgid ", [[separ
[LyX/master] Update ru.po and docs
commit cc30ec006161fbe8974e007d2cc3d326b1814110 Author: Yuriy Skalko Date: Tue Mar 14 16:27:32 2023 +0100 Update ru.po and docs lib/doc/ru/Additional.lyx | 121 + lib/doc/ru/UserGuide.lyx | 83 ++ lib/layouttranslations|4 +- po/ru.gmo | Bin 772231 -> 777030 bytes po/ru.po | 220 +++-- 5 files changed, 226 insertions(+), 202 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Include QScreen header to fix compilation with Qt 5.14
commit 2b6b20ff69eb1f839ea827aedd6f24528abadd9b Author: Yuriy Skalko Date: Fri Mar 10 09:18:59 2023 +0100 Include QScreen header to fix compilation with Qt 5.14 Needed after e2e1fd6ea9. --- src/frontends/qt/GuiApplication.cpp |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp index f8a3e76..c316456 100644 --- a/src/frontends/qt/GuiApplication.cpp +++ b/src/frontends/qt/GuiApplication.cpp @@ -108,6 +108,7 @@ #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) #include #endif +#include #include #include #include -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update ru docs
commit 6741a8fbf83f14b10907d053029915bb6df002aa Author: Yuriy Skalko Date: Sat Dec 10 22:20:14 2022 +0100 Update ru docs --- lib/doc/ru/Additional.lyx | 589 +++-- lib/doc/ru/UserGuide.lyx | 208 - 2 files changed, 291 insertions(+), 506 deletions(-) diff --git a/lib/doc/ru/Additional.lyx b/lib/doc/ru/Additional.lyx index 7ab16a6..5d8eca3 100644 --- a/lib/doc/ru/Additional.lyx +++ b/lib/doc/ru/Additional.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 611 +\lyxformat 612 \begin_document \begin_header \save_transient_properties true @@ -5334,6 +5334,148 @@ status collapsed \end_layout \begin_layout Chapter +Вывод DocBook +\end_layout + +\begin_layout Standard +Помимо HTML, + \SpecialChar LyX + может генерировать документы DocBook XML. + В версиях 2.3 и ранее генерация документов DocBook была возможна только с определёнными макетами (только DocBook версии 4). + Начиная с версии \SpecialChar LyX + 2.4 поддерживается большинство макетов \SpecialChar LyX + (только DocBook версии 5). + Эта функция встроена в \SpecialChar LyX + и не требует использования внешних инструментов. +\end_layout + +\begin_layout Standard +В результате вывод DocBook может быть настроен и расширен точно так же, + как и вывод \SpecialChar LaTeX +: + с помощью файлов макетов и модулей. + Подробности см. + в пятой главе +\emph on +Руководства по настройке +\emph default +. +\end_layout + +\begin_layout Standard +Большинство функций \SpecialChar LyX + поддерживаются в DocBook, + например, + вывод математических формул. +\end_layout + +\begin_layout Itemize +Математический вывод осуществляется в основном в MathML (основным исключением являются конструкции, + не поддерживаемые \SpecialChar LyX +, + т.е. + ERT). + Все формулы также доступны непосредственно в формате TeX в выводе DocBook для дальнейшей обработки. +\end_layout + +\begin_layout Itemize +Библиографии и ссылки реализованы, + в том числе с использованием внешнего файла BibTeX. + Библиографические источники не пререндерены при наличии подробной информации, + а выводятся с помощью стандартных конструкций DocBook. + Предполагается, + что внешний процессор DocBook будет обрабатывать рендеринг источников. +\end_layout + +\begin_layout Itemize +Поддерживаются указатели, + включая множественные указатели. + Поддерживается группировка (с помощью !), + диапазоны страниц и перекрестные ссылки (|see), + за исключением экранирования тех же символов. + Порядок рубрик (@) и макет (|mathbf) не поддерживаются. + Не поддерживается экранирование рубрик указателя. +\end_layout + +\begin_layout Itemize +Реализованы глоссарии. +\end_layout + +\begin_layout Standard +Два основных параметра могут быть установлены на уровне документа. +\end_layout + +\begin_layout Itemize +Формат таблиц: + \SpecialChar LyX + может генерировать таблицы либо в формате HTML (значение по умолчанию), + либо в формате CALS, + в зависимости от требований пользователя. + Большинство процессоров DocBook принимают оба формата. +\end_layout + +\begin_deeper +\begin_layout Itemize +Без префикса: + пространство имен MathML определяется для каждой формулы (с помощью атрибута +\family typewriter +xmlns +\family default +). +\end_layout + +\begin_layout Itemize +С префиксом +\family typewriter +m +\family default + (по умолчанию): + пространство имен MathML определяется на уровне документа (с помощью атрибута +\family typewriter +xmlns:m +\family default + на корневом элементе). + Каждая формула MathML имеет префикс +\family typewriter +m: + +\family default + например, + +\family typewriter +m:math +\family default +. +\end_layout + +\begin_layout Itemize +С префиксом +\family typewriter +mml +\family default +: + аналогично опции +\family typewriter +m +\family default +, + но с префиксом +\family typewriter +mml +\family default +. +\end_layout + +\end_deeper +\begin_layout Standard +Эта опция особенно полезна, + если вы хотите, + чтобы \SpecialChar LyX + соответствовал вашему личному стилю или для работы с некачественным программным обеспечением, + которое принимает только один префикс для MathML. +\end_layout + +\begin_layout Chapter \SpecialChar LyX -сервер \end_layout @@ -10451,451 +10593,6 @@ INSERT — \end_layout \begin_layout Section -ijmpc и ijmpd -\end_layout - -\begin_layout Standard -Пакет -\series bold -ijmpc -\series default - — - это набор макросов, - которые упрощают отправку электронных рукописей в -\shape italic -International Journal of Modern Physics C -\shape default -. - Аналогично, - пакет -\series bold -ijmpd -\series default - предназначен для создания рукописей, - которые будут отправлены в -\shape italic -International Journal of Modern Physics D -\shape default -. - Оба журнала публикуются World Scientific. - Соответствующие классы документов называются -\family typewriter -ws-ijmpc.cls -\family default - и -\family typewriter -ws-ijmpd.cl -\family default -s
[LyX/master] Update ru.po
commit c23f6f2e9b2f86c12daf081c7322cfc3c93d2349 Author: Yuriy Skalko Date: Sat Dec 10 22:17:03 2022 +0100 Update ru.po po/ru.gmo | Bin 753296 -> 772231 bytes po/ru.po | 591 ++--- 2 files changed, 250 insertions(+), 341 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update format for doc/ru files
commit 610765050a3cc9d7d26aba9def9620e049c5e027 Author: Yuriy Skalko Date: Fri Dec 2 11:38:23 2022 +0200 Update format for doc/ru files lib/doc/ru/Additional.lyx | 6900 +- lib/doc/ru/EmbeddedObjects.lyx | 5505 +++-- lib/doc/ru/Intro.lyx | 972 ++-- lib/doc/ru/Math.lyx| 4006 - lib/doc/ru/Shortcuts.lyx |6 +- lib/doc/ru/Tutorial.lyx| 2174 +--- lib/doc/ru/UserGuide.lyx |12913 +--- 7 files changed, 20522 insertions(+), 11954 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.3.x] Update ru.po
commit abca508bada4f51f4f6e48d8d1dbd2dd5adf8fee Author: Yuriy Skalko Date: Sat Dec 10 21:55:48 2022 +0100 Update ru.po --- po/ru.po |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/po/ru.po b/po/ru.po index 4738fb4..8d37847 100644 --- a/po/ru.po +++ b/po/ru.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: LyX 2.3\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" "POT-Creation-Date: 2022-12-04 19:23+0100\n" -"PO-Revision-Date: 2022-11-27 15:01+0200\n" +"PO-Revision-Date: 2022-12-10 21:55+0100\n" "Last-Translator: Yuriy Skalko \n" "Language-Team: Russian \n" "Language: ru\n" @@ -33714,9 +33714,8 @@ msgid "Can't change number of columns in '%1$s'" msgstr "Невозможно изменить число колонок в '%1$s'" #: src/mathed/InsetMathMacro.cpp:1116 -#, fuzzy msgid "Uncodable characters in math macro" -msgstr "Некодируемые символы в пути" +msgstr "Некодируемые символы в математическом макросе" #: src/mathed/InsetMathMacro.cpp:1117 #, c-format @@ -33725,6 +33724,9 @@ msgid "" "that is not encodable in the current encoding (%2$s).\n" "Please fix this macro." msgstr "" +"Имя макроса '%1$s' содержит символ,\n" +"который не может быть закодирован в текущей кодировке (%2$s).\n" +"Пожалуйста, исправьте этот макрос." #: src/mathed/InsetMathMacro.cpp:1269 src/mathed/InsetMathMacro.cpp:1275 #, c-format -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Add "semantic linefeeds" after punctuation marks.
commit 7b23c76b71cd9259d40f621a21b21c91386cbc41 Author: Yuriy Skalko Date: Sun Nov 27 18:30:26 2022 +0200 Add "semantic linefeeds" after punctuation marks. We already had such breaks for dot. File format change. --- development/FORMAT |4 lib/lyx2lyx/lyx_2_4.py |6 -- src/Paragraph.cpp | 26 ++ src/version.h |4 ++-- 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index 0c41d88..5fcf13e 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -7,6 +7,10 @@ changes happened in particular if possible. A good example would be --- +2022-11-27 Yuriy Skalko + * Format incremented to 611: Implement "semantic linefeeds" after punctuation marks. + Dummy format change for now. + 2022-10-29 Jürgen Spitzmüller * Format incremented to 610: InsetIndexMacros and new IndexInset params: - \begin_inset IndexMacro [see|seealso|subentry|sortkey], relating to diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py index 73826a5..5c0507a 100644 --- a/lib/lyx2lyx/lyx_2_4.py +++ b/lib/lyx2lyx/lyx_2_4.py @@ -4621,10 +4621,12 @@ convert = [ [607, []], [608, []], [609, []], - [610, []] + [610, []], + [611, []] ] -revert = [[609, [revert_index_macros]], +revert = [[610, []], + [609, [revert_index_macros]], [608, [revert_document_metadata]], [607, [revert_docbook_mathml_prefix]], [606, [revert_spellchecker_ignore]], diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 3b3bc39..453b1e1 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1746,16 +1746,34 @@ void Paragraph::write(ostream & os, BufferParams const & bparams, column = 0; break; case '.': + case '!': + case '?': + case ':': + case ';': + case ',': + case 0x061F: // ؟ U+061F ARABIC QUESTION MARK + case 0x061B: // ؛ U+061B ARABIC SEMICOLON + case 0x060C: // ، U+060C ARABIC COMMA flushString(os, write_buffer); if (i + 1 < size() && d->text_[i + 1] == ' ') { - os << ".\n"; + os << to_utf8(docstring(1, c)) << '\n'; column = 0; } else - os << '.'; + os << to_utf8(docstring(1, c)); + break; + case 0x2014: // — U+2014 EM DASH + case 0x3002: // 。 U+3002 IDEOGRAPHIC FULL STOP + case 0xFF01: // ! U+FF01 FULLWIDTH EXCLAMATION MARK + case 0xFF1F: // ? U+FF1F FULLWIDTH QUESTION MARK + case 0xFF1A: // : U+FF1A FULLWIDTH COLON + case 0xFF1B: // ; U+FF1B FULLWIDTH SEMICOLON + case 0xFF0C: // , U+FF0C FULLWIDTH COMMA + flushString(os, write_buffer); + os << to_utf8(docstring(1, c)) << '\n'; + column = 0; break; default: - if ((column > 70 && c == ' ') - || column > 79) { + if (column > 500) { flushString(os, write_buffer); os << '\n'; column = 0; diff --git a/src/version.h b/src/version.h index b496d10..bfcd986 100644 --- a/src/version.h +++ b/src/version.h @@ -32,8 +32,8 @@ extern char const * const lyx_version_info; // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -#define LYX_FORMAT_LYX 610 // spitz: inset index macros -#define LYX_FORMAT_TEX2LYX 610 +#define LYX_FORMAT_LYX 611 // Yuriy Skalko: semantic linefeeds +#define LYX_FORMAT_TEX2LYX 611 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX #ifndef _MSC_VER -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Show branches from master document in branch inset dialog
commit 8f43f83ddfbe6adbb04a2ba86e62797c0a313324 Author: Yuriy Skalko Date: Fri Oct 7 18:56:33 2022 +0300 Show branches from master document in branch inset dialog --- src/frontends/qt/GuiBranch.cpp | 37 + 1 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/frontends/qt/GuiBranch.cpp b/src/frontends/qt/GuiBranch.cpp index 24b6977..923d383 100644 --- a/src/frontends/qt/GuiBranch.cpp +++ b/src/frontends/qt/GuiBranch.cpp @@ -22,9 +22,13 @@ #include "insets/InsetBranch.h" +#include "support/gettext.h" +#include "support/lstrings.h" + #include using namespace std; +using namespace lyx::support; namespace lyx { namespace frontend { @@ -40,20 +44,36 @@ GuiBranch::GuiBranch(QWidget * parent) : InsetParamsWidget(parent) void GuiBranch::paramsToDialog(Inset const * inset) { InsetBranch const * ib = static_cast(inset); - typedef BranchList::const_iterator const_iterator; - BranchList const & branchlist = ib->buffer().params().branchlist(); + Buffer const & buf = ib->buffer(); + BranchList const & branchlist = buf.params().branchlist(); docstring const cur_branch = ib->branch(); branchCO->clear(); - const_iterator const begin = branchlist.begin(); - const_iterator const end = branchlist.end(); int id = 0; int count = 0; - for (const_iterator it = begin; it != end; ++it, ++count) { - docstring const & branch = it->branch(); - branchCO->addItem(toqstr(branch)); + for (Branch const & it : branchlist) { + docstring const & branch = it.branch(); + branchCO->addItem(toqstr(branch), toqstr(branch)); if (cur_branch == branch) id = count; + ++count; + } + // Add branches from master + Buffer const * masterBuf = buf.masterBuffer(); + if (masterBuf != ) { + BranchList const & masterBranchlist = masterBuf->params().branchlist(); + for (Branch const & it : masterBranchlist) { + docstring const & branch = it.branch(); + if (!branchlist.find(branch)) { + branchCO->addItem( + toqstr(bformat(_("%1$s[[branch]] (%2$s)[[master]]"), + branch, _("master"))), + toqstr(branch)); + if (cur_branch == branch) + id = count; + ++count; + } + } } branchCO->setCurrentIndex(id); invertedCB->setChecked(ib->params().inverted); @@ -62,7 +82,8 @@ void GuiBranch::paramsToDialog(Inset const * inset) docstring GuiBranch::dialogToParams() const { - InsetBranchParams params(qstring_to_ucs4(branchCO->currentText()), invertedCB->isChecked()); + docstring branch = qstring_to_ucs4(branchCO->itemData(branchCO->currentIndex()).toString()); + InsetBranchParams params(branch, invertedCB->isChecked()); return from_utf8(InsetBranch::params2string(params)); } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Mark inverted branch insets
commit 54028c3eea9bdba9f4f851eb339933b1e8e1cfec Author: Yuriy Skalko Date: Thu Oct 21 12:56:05 2021 +0300 Mark inverted branch insets --- lib/doc/UserGuide.lyx | 14 -- src/insets/InsetBranch.cpp |6 -- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx index b3e93e8..123c09a 100644 --- a/lib/doc/UserGuide.lyx +++ b/lib/doc/UserGuide.lyx @@ -35523,8 +35523,18 @@ There are also inverted branch insets, whose content is output just in case \emph on not \emph default - activated. - This make it easy to add alternative text for different versions of a document. + activated +\change_inserted 244031559 1635284375 + (they are marked with ~ before the name) +\change_unchanged +. + +\change_deleted 244031559 1635284383 +This +\change_inserted 244031559 1635284385 +Such insets +\change_unchanged + make it easy to add alternative text for different versions of a document. To control whether a particular inset is inverted, right-click on the inset button and choose \family sans diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index 95f7ba9..66cc6ef 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -112,8 +112,10 @@ docstring const InsetBranch::buttonLabel(BufferView const &) const if (inchild && master_selected != child_selected) symb += (child_selected ? tick : cross); +docstring inv_symb = from_ascii(params_.inverted ? "~" : ""); + if (decoration() == InsetDecoration::MINIMALISTIC) - return symb + params_.branch; + return symb + inv_symb + params_.branch; docstring s; if (inmaster && inchild) @@ -124,7 +126,7 @@ docstring const InsetBranch::buttonLabel(BufferView const &) const s = _("Branch (master): "); else // !inmaster && !inchild s = _("Branch (undefined): "); - s += params_.branch; + s += inv_symb + params_.branch; return symb + s; } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update ru.po
commit 2d57c7199caee7ca12adde024cfbd3081ac58362 Author: Yuriy Skalko Date: Tue Oct 26 18:24:02 2021 +0300 Update ru.po --- po/ru.po | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/po/ru.po b/po/ru.po index 5189cab..8de1130 100644 --- a/po/ru.po +++ b/po/ru.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: LyX 2.4\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" "POT-Creation-Date: 2021-03-05 15:06-0500\n" -"PO-Revision-Date: 2021-03-06 12:45+0200\n" +"PO-Revision-Date: 2021-10-26 18:20+0300\n" "Last-Translator: Yuriy Skalko \n" "Language-Team: Russian \n" "Language: ru\n" @@ -18014,7 +18014,7 @@ msgstr "[Список TODO]" #: lib/layouts/todonotes.module:48 msgid "List of TODOs Heading|s" -msgstr "Список заголовков TODO" +msgstr "Заголовок списка TODO" #: lib/layouts/todonotes.module:49 msgid "Enter a custom header for the List of TODOs here" @@ -20092,19 +20092,19 @@ msgstr "Отклонить изменение|О" #: lib/ui/stdcontext.inc:659 msgid "Promote Section|P" -msgstr "Выдвинуть раздел|В" +msgstr "Выдвинуть раздел" #: lib/ui/stdcontext.inc:660 msgid "Demote Section|D" -msgstr "Задвинуть раздел|З" +msgstr "Задвинуть раздел" #: lib/ui/stdcontext.inc:662 msgid "Move Section Down|w" -msgstr "Переместить раздел вниз|в" +msgstr "Переместить раздел вниз" #: lib/ui/stdcontext.inc:664 msgid "Select Section|S" -msgstr "Выделить раздел|В" +msgstr "Выделить раздел" #: lib/ui/stdcontext.inc:672 msgid "Wrap by Preview|y" @@ -33895,7 +33895,7 @@ msgstr "Панель \"%1$s\" не поддерживает состояние \ #: src/frontends/qt/GuiToolbar.cpp:638 src/insets/InsetBranch.cpp:79 #: src/insets/InsetBranch.cpp:82 msgid "off" -msgstr "выключен" +msgstr "выкл." #: src/frontends/qt/GuiToolbar.cpp:645 src/frontends/qt/GuiToolbar.cpp:685 #, c-format @@ -35058,12 +35058,12 @@ msgstr "%1$s (%2$s, %3$s)" #: src/insets/InsetBranch.cpp:70 src/insets/InsetBranch.cpp:72 msgid "active" -msgstr "активный" +msgstr "активна" #: src/insets/InsetBranch.cpp:70 src/insets/InsetBranch.cpp:72 #: src/insets/InsetIndex.cpp:659 msgid "non-active" -msgstr "не активный" +msgstr "не активна" #: src/insets/InsetBranch.cpp:75 src/insets/InsetBranch.cpp:85 #, c-format @@ -35078,8 +35078,8 @@ msgid "" "Inset Status: %3$s" msgstr "" "Имя ветки: %1$s\n" -"Статус ветки: %2$s\n" -"Статус вставки: %3$s" +"Состояние ветки: %2$s\n" +"Состояние вставки: %3$s" #: src/insets/InsetBranch.cpp:120 msgid "Branch: " -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Amend d3c335a5d5
commit 6a7c9d12f9f45b207ed19b03cb494ec5fb660617 Author: Yuriy Skalko Date: Fri Oct 1 00:37:58 2021 +0300 Amend d3c335a5d5 --- src/Text.cpp |4 ++-- src/Text2.cpp|2 +- src/TextMetrics.cpp | 12 ++-- src/VSpace.cpp |6 +++--- src/frontends/qt/GuiWorkArea.cpp |4 ++-- src/lyxfind.cpp |6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Text.cpp b/src/Text.cpp index 8f30f4e..aa70b18 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -209,7 +209,7 @@ pit_type Text::outerHook(pit_type par_offset) const if (par.getDepth() == 0) return pars_.size(); - return depthHook(par_offset, depth_type(par.getDepth() - 1)); + return depthHook(par_offset, par.getDepth() - 1); } @@ -369,7 +369,7 @@ InsetText const & Text::inset() const void Text::readParToken(Paragraph & par, Lexer & lex, string const & token, Font & font, Change & change, ErrorList & errorList) { - Buffer * buf = const_cast(_->buffer()); + Buffer * buf = _->buffer(); BufferParams & bp = buf->params(); if (token[0] != '\\') { diff --git a/src/Text2.cpp b/src/Text2.cpp index cc53403..66dd083 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -934,7 +934,7 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur, void Text::deleteEmptyParagraphMechanism(pit_type first, pit_type last, bool trackChanges) { - pos_type last_pos = static_cast(pars_[last].size() - 1); + pos_type last_pos = pars_[last].size() - 1; deleteEmptyParagraphMechanism(first, last, 0, last_pos, trackChanges); } diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 57c7715..a2a3e4b 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -434,7 +434,7 @@ bool TextMetrics::redoParagraph(pit_type const pit, bool const align_rows) // environment? I think the answer is: when paragraphs are merged; // when layout is set; when material is pasted. if (par.brokenBiblio()) { - Cursor & cur = const_cast(bv_->cursor()); + Cursor & cur = bv_->cursor(); // In some cases, we do not know how to record undo if (() == _->inset()) cur.recordUndo(pit, pit); @@ -700,7 +700,7 @@ void TextMetrics::setRowAlignment(Row & row, int width) const // We don't have to look at the alignment if the row is already // larger then the permitted width as then we force the // LEFT_ALIGN'edness! - if (int(row.width()) >= max_width_) + if (row.width() >= max_width_) return; if (nh == 0) { @@ -1300,7 +1300,7 @@ pit_type TextMetrics::getPitNearY(int y) ParagraphMetrics const & pm = it->second; - if (y < it->second.position() - int(pm.ascent())) { + if (y < it->second.position() - pm.ascent()) { // We are looking for a position that is before the first paragraph in // the cache (which is in priciple off-screen, that is before the // visible part. @@ -1315,7 +1315,7 @@ pit_type TextMetrics::getPitNearY(int y) ParagraphMetrics const & pm_last = par_metrics_[last->first]; - if (y >= last->second.position() + int(pm_last.descent())) { + if (y >= last->second.position() + pm_last.descent()) { // We are looking for a position that is after the last paragraph in // the cache (which is in priciple off-screen), that is before the // visible part. @@ -1334,7 +1334,7 @@ pit_type TextMetrics::getPitNearY(int y) ParagraphMetrics const & pm2 = par_metrics_[it->first]; - if (it->first >= pit && int(it->second.position()) - int(pm2.ascent()) <= y) { + if (it->first >= pit && it->second.position() - pm2.ascent() <= y) { pit = it->first; yy = it->second.position(); } @@ -1461,7 +1461,7 @@ void TextMetrics::setCursorFromCoordinates(Cursor & cur, int const x, int const LBUFERR(pm.rows().size()); for (; r < int(pm.rows().size()) - 1; ++r) { Row const & row = pm.rows()[r]; - if (int(yy + row.height()) > y) + if (yy + row.height() > y) break; yy += row.height(); } diff --git a/src/VSpace.cpp b/src/VSpace.cpp index abec3ef..66e3a6c 100644 --- a/src/VSpace.cpp +++ b/src/VSpace.cpp @@ -263,10 +263,10 @@ int VSpace::inPixels(BufferView const & bv) const // This is how the skips are normally defined by LaTeX. // But there should be some way to change this per docume
[LyX/master] Remove useless casts reported by GCC with -Wuseless-cast option
commit d3c335a5d524e2edeb73ae1a891fcc58ba5bfd1a Author: Yuriy Skalko Date: Wed Sep 29 12:49:21 2021 +0300 Remove useless casts reported by GCC with -Wuseless-cast option --- src/BiblioInfo.cpp|2 +- src/Buffer.cpp|2 +- src/Converter.cpp |2 +- src/LaTeX.cpp |2 +- src/ParIterator.cpp |6 +++--- src/frontends/qt/ColorCache.cpp |2 +- src/frontends/qt/GuiBox.cpp |2 +- src/frontends/qt/GuiDocument.cpp |6 +++--- src/frontends/qt/GuiExternal.cpp |2 +- src/frontends/qt/GuiMathMatrix.cpp|4 ++-- src/frontends/qt/GuiPrefs.cpp |2 +- src/frontends/qt/GuiSendto.cpp|2 +- src/frontends/qt/GuiView.cpp |4 ++-- src/frontends/qt/Menus.cpp|6 ++ src/insets/InsetGraphics.cpp |2 +- src/insets/InsetIPAMacro.cpp |4 ++-- src/insets/InsetTabular.cpp | 16 src/mathed/InsetMathMacroTemplate.cpp |2 +- 18 files changed, 33 insertions(+), 35 deletions(-) diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index 85c3e88..638579a 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -1402,7 +1402,7 @@ docstring const BiblioInfo::getInfo(docstring const & key, { BiblioInfo::const_iterator it = find(key); if (it == end()) - return docstring(_("Bibliography entry not found!")); + return _("Bibliography entry not found!"); BibTeXInfo const & data = it->second; BibTeXInfoList xrefptrs; for (docstring const & xref : getXRefs(data)) { diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 457aa43..a713f8d 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3827,7 +3827,7 @@ void Buffer::Impl::updateMacros(DocIterator & it, DocIterator & scope) // FIXME (Abdel), I don't understand why we pass 'it' here // instead of 'macroTemplate' defined above... is this correct? macros[macroTemplate.name()][it] = - Impl::ScopeMacro(scope, MacroData(const_cast(owner_), it)); + Impl::ScopeMacro(scope, MacroData(owner_, it)); } // next paragraph diff --git a/src/Converter.cpp b/src/Converter.cpp index b4340c8..4e9a2ad 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -853,7 +853,7 @@ Converters::RetVal Converters::runLaTeX(Buffer const & buffer, string const & co // do the LaTeX run(s) string const name = buffer.latexName(); - LaTeX latex(command, runparams, FileName(makeAbsPath(name)), + LaTeX latex(command, runparams, makeAbsPath(name), buffer.filePath(), buffer.layoutPos(), buffer.isClone(), buffer.freshStartRequired()); TeXErrors terr; diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index 6e7fe92..a8d14b1 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -795,7 +795,7 @@ int LaTeX::scanLogFile(TeXErrors & terr) string tmp = onlyFileName(changeExtension(file.absFileName(), ".log")); LYXERR(Debug::LATEX, "Log file: " << tmp); - FileName const fn = FileName(makeAbsPath(tmp)); + FileName const fn = makeAbsPath(tmp); // FIXME we should use an ifdocstream here and a docstring for token // below. The encoding of the log file depends on the _output_ (font) // encoding of the TeX file (T1, TU etc.). See #10728. diff --git a/src/ParIterator.cpp b/src/ParIterator.cpp index 7289889..10de5f3 100644 --- a/src/ParIterator.cpp +++ b/src/ParIterator.cpp @@ -69,7 +69,7 @@ ParIterator & ParIterator::operator--() Paragraph & ParIterator::operator*() const { - return const_cast(text()->getPar(pit())); + return text()->getPar(pit()); } @@ -81,7 +81,7 @@ pit_type ParIterator::pit() const Paragraph * ParIterator::operator->() const { - return const_cast(()->getPar(pit())); + return ()->getPar(pit()); } @@ -93,7 +93,7 @@ pit_type ParIterator::outerPar() const ParagraphList & ParIterator::plist() const { - return const_cast(text()->paragraphs()); + return text()->paragraphs(); } diff --git a/src/frontends/qt/ColorCache.cpp b/src/frontends/qt/ColorCache.cpp index 822f44a..821494e 100644 --- a/src/frontends/qt/ColorCache.cpp +++ b/src/frontends/qt/ColorCache.cpp @@ -23,7 +23,7 @@ namespace{ QPalette::ColorRole role(ColorCode col) { - switch (ColorCode(col)) { + switch (col) { case Color_background: case Color_commentbg: case Color_greyedoutbg: diff --git a/src/frontends/qt/GuiBox.cpp b/src/frontends/qt/GuiBox.cpp index 0d22aa7..ddd5775 100644 --- a/src/frontends/qt/GuiBox.c
[LyX/master] Remove redundant declarations reported by GCC with -Wredundant-decls option
commit a9119c3fa80746bb22de91654e958ede01029cac Author: Yuriy Skalko Date: Tue Sep 28 20:20:57 2021 +0300 Remove redundant declarations reported by GCC with -Wredundant-decls option --- src/frontends/qt/qt_helpers.h |2 -- src/support/ForkedCalls.cpp | 11 +-- src/xml.h |4 +--- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/frontends/qt/qt_helpers.h b/src/frontends/qt/qt_helpers.h index 73f7db9..08d50fa 100644 --- a/src/frontends/qt/qt_helpers.h +++ b/src/frontends/qt/qt_helpers.h @@ -191,8 +191,6 @@ QString onlyFileName(QString const & str); QString onlyPath(QString const & str); QStringList fileFilters(QString const & description); -QString changeExtension(QString const & oldname, QString const & extension); - /// Remove the extension from \p name QString removeExtension(QString const & name); diff --git a/src/support/ForkedCalls.cpp b/src/support/ForkedCalls.cpp index 387f856..e6f5a8e 100644 --- a/src/support/ForkedCalls.cpp +++ b/src/support/ForkedCalls.cpp @@ -439,12 +439,6 @@ namespace ForkedCallQueue { /// A process in the queue typedef pair Process; -/** Add a process to the queue. Processes are forked sequentially - * only one is running at a time. - * Connect to the returned signal and you'll be informed when - * the process has ended. - */ -ForkedCall::sigPtr add(string const & process); /// in-progress queue static queue callQueue_; @@ -459,6 +453,11 @@ void stopCaller(); /// void callback(pid_t, int); +/** Add a process to the queue. Processes are forked sequentially + * only one is running at a time. + * Connect to the returned signal and you'll be informed when + * the process has ended. + */ ForkedCall::sigPtr add(string const & process) { ForkedCall::sigPtr ptr; diff --git a/src/xml.h b/src/xml.h index b3569ba..bf72fac 100644 --- a/src/xml.h +++ b/src/xml.h @@ -143,6 +143,7 @@ namespace xml { docstring escapeChar(char_type c, XMLStream::EscapeSettings e); /// Escape the given character, if necessary, to an entity. +/// \param c must be ASCII docstring escapeChar(char c, XMLStream::EscapeSettings e); /// Escape a word instead of a single character @@ -151,9 +152,6 @@ docstring escapeString(docstring const & raw, XMLStream::EscapeSettings e=XMLStr /// cleans \param str for use as an attribute by replacing all non-altnum by "_" docstring cleanAttr(docstring const & str); -/// \p c must be ASCII -docstring escapeChar(char c, XMLStream::EscapeSettings e); - /// replaces illegal characters from ID attributes docstring cleanID(docstring const ); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Remove redundant semicolons reported by GCC with -Wextra-semi option
commit 325c405541207e91110cc8e488c9210ddeb436f7 Author: Yuriy Skalko Date: Tue Sep 28 11:21:45 2021 +0300 Remove redundant semicolons reported by GCC with -Wextra-semi option --- src/LyXRC.h |2 +- src/Session.h |2 +- src/VCBackend.h |8 src/frontends/qt/DialogView.h |2 +- src/insets/InsetPreview.h |2 +- src/lyxfind.cpp | 28 ++-- src/mathed/InsetMathGrid.h |2 +- src/mathed/InsetMathMacroArgument.h |2 +- src/mathed/MathStream.h |2 +- src/support/Length.h|4 ++-- src/xml.h |2 +- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/LyXRC.h b/src/LyXRC.h index f9b5664..74c0e4c 100644 --- a/src/LyXRC.h +++ b/src/LyXRC.h @@ -195,7 +195,7 @@ public: /// LyXRC() : user_name(support::user_name()), user_email(support::user_email()) // always empty - {}; + {} /// \param check_format: whether to try to convert the file format, /// if it is not current. this should only be true, really, for the diff --git a/src/Session.h b/src/Session.h index b7443b9..ea51754 100644 --- a/src/Session.h +++ b/src/Session.h @@ -361,7 +361,7 @@ class ShellEscapeSection : SessionSection { public: /// - explicit ShellEscapeSection() {}; + explicit ShellEscapeSection() {} /// void read(std::istream & is) override; diff --git a/src/VCBackend.h b/src/VCBackend.h index e7dc735..e0f6266 100644 --- a/src/VCBackend.h +++ b/src/VCBackend.h @@ -154,7 +154,7 @@ public: /// get file from repo, the caller must ensure that it does not exist locally static bool retrieve(support::FileName const & file); - std::string vcname() const override { return "RCS"; }; + std::string vcname() const override { return "RCS"; } void registrer(std::string const & msg) override; @@ -247,7 +247,7 @@ public: /// get file from repo, the caller must ensure that it does not exist locally static bool retrieve(support::FileName const & file); - std::string vcname() const override { return "CVS"; }; + std::string vcname() const override { return "CVS"; } void registrer(std::string const & msg) override; @@ -393,7 +393,7 @@ public: /// get file from repo, the caller must ensure that it does not exist locally static bool retrieve(support::FileName const & file); - std::string vcname() const override { return "SVN"; }; + std::string vcname() const override { return "SVN"; } void registrer(std::string const & msg) override; @@ -504,7 +504,7 @@ public: /// get file from repo, the caller must ensure that it does not exist locally static bool retrieve(support::FileName const & file); - std::string vcname() const override { return "GIT"; }; + std::string vcname() const override { return "GIT"; } void registrer(std::string const & msg) override; diff --git a/src/frontends/qt/DialogView.h b/src/frontends/qt/DialogView.h index ee29471..514242e 100644 --- a/src/frontends/qt/DialogView.h +++ b/src/frontends/qt/DialogView.h @@ -47,7 +47,7 @@ protected: void hideEvent(QHideEvent * ev) override; protected Q_SLOTS: - void onBufferViewChanged() override {}; + void onBufferViewChanged() override {} }; } // namespace frontend diff --git a/src/insets/InsetPreview.h b/src/insets/InsetPreview.h index ca6641a..f36ea56 100644 --- a/src/insets/InsetPreview.h +++ b/src/insets/InsetPreview.h @@ -69,7 +69,7 @@ public: void edit(Cursor & cur, bool front, EntryDirection entry_from) override; - bool canPaintChange(BufferView const &) const override { return true; }; + bool canPaintChange(BufferView const &) const override { return true; } //@} protected: diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 004e10b..4a8c037 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -935,7 +935,7 @@ public: int pos_len; int searched_size; vector result = vector (); - MatchResult(int len = 0): match_len(len),match_prefix(0),match2end(0), pos(0),leadsize(0),pos_len(-1),searched_size(0) {}; + MatchResult(int len = 0): match_len(len),match_prefix(0),match2end(0), pos(0),leadsize(0),pos_len(-1),searched_size(0) {} }; static MatchResult::range interpretMatch(MatchResult , MatchResult ) @@ -1248,7 +1248,7 @@ class KeyInfo { class Border { public: - Border(int l=0, int u=0) : low(l), upper(u) {}; + Border(int l=0, int u=0) : low(l), upper(u) {} int low; int upper; }; @@ -1920,7 +1920,7 @@ class LatexInfo { buildKeys(is
[LyX/master] Update Russian documentation
commit 9c1cacaf181f1ed026906cdc08b94f7924f0db36 Author: Yuriy Skalko Date: Tue Jun 8 14:58:44 2021 +0300 Update Russian documentation --- lib/doc/ru/EmbeddedObjects.lyx |8 + lib/doc/ru/UserGuide.lyx | 362 +-- 2 files changed, 203 insertions(+), 167 deletions(-) diff --git a/lib/doc/ru/EmbeddedObjects.lyx b/lib/doc/ru/EmbeddedObjects.lyx index 17ea1d0..97fdaf7 100644 --- a/lib/doc/ru/EmbeddedObjects.lyx +++ b/lib/doc/ru/EmbeddedObjects.lyx @@ -26900,6 +26900,14 @@ status collapsed \end_layout \begin_layout Description +Именно +\begin_inset space ~ +\end_inset + +здесь принудительное размещение плавающего объекта там, куда он был вставлен +\end_layout + +\begin_layout Description Верх \begin_inset space ~ \end_inset diff --git a/lib/doc/ru/UserGuide.lyx b/lib/doc/ru/UserGuide.lyx index 61afe17..368e79f 100644 --- a/lib/doc/ru/UserGuide.lyx +++ b/lib/doc/ru/UserGuide.lyx @@ -574,7 +574,7 @@ arg "buffer-new" \begin_inset Info type "shortcut" -arg "buffer-new-template" +arg "dialog-show lyxfiles templates" \end_inset @@ -703,6 +703,16 @@ arg "buffer-write-as" \begin_layout Itemize \family sans +Сохранить +\begin_inset space ~ +\end_inset + +все +\end_layout + +\begin_layout Itemize + +\family sans Вернуться \begin_inset space ~ \end_inset @@ -14423,151 +14433,6 @@ arg "font-bold" \labelwidthstring 00.00. \family sans -Цвет -\family default - Изменяет цвет текста. - Заметим, что не все DVI-просмотрщики могут отображать цвета. - Кроме -\family sans -(нет) -\family default -, что означает использование цвета текста документа по умолчанию, установленного - в -\family sans - Документ\SpecialChar menuseparator -Настройки\SpecialChar menuseparator -Цвета -\family default -для -\family sans - Основной текст -\family default -, вы можете выбрать -\family sans - черный -\family default -, -\family sans -белый -\family default -, -\family sans -красный -\family default -, -\family sans -зеленый -\family default -, -\family sans -синий -\family default -, -\family sans -циановый -\family default -, -\family sans -пурпурный -\family default -, -\family sans -желтый -\family default -, -\family sans -коричневый -\family default -, -\family sans -темно-серый -\family default -, -\family sans -серый -\family default -, -\family sans -светло-серый -\family default -, -\family sans -лайм -\family default -, -\family sans -оранжевый -\family default -, -\family sans -оливковый -\family default -, -\family sans -розовый -\family default -, -\family sans -маджента -\family default -, -\family sans -сине-зеленый -\family default - и -\family sans -фиолетовый -\family default - цвет. -\begin_inset Index idx -status collapsed - -\begin_layout Plain Layout -Цвет ! текста -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Labeling -\labelwidthstring 00.00. - -\family sans -Язык -\family default - Это свойство используется, чтобы пометить области текста как имеющие язык, - отличный от языка документа. - Текст, помеченный таким образом, будет подчеркнут в рабочей области \SpecialChar LyX - синим - цветом, чтобы указать на изменение. -\begin_inset Newline newline -\end_inset - -Если у вас присутствует, например, фрагмент текста на немецком языке в русскоязы -чном документе, \SpecialChar LaTeX - автоматически будет соблюдать немецкие правила переноса - слов. - При использовании проверки правописания текст, помеченный как немецкий, - будет проверяться в соответствии со словарем немецкого языка. -\begin_inset Newline newline -\end_inset - -Если вы не хотите, чтобы в текстовых фрагментах проверялось правописание, - активируйте -\family sans -Не проверять правописание -\family default -. - В таких фрагментах, тем не менее будут выполняться переносы в соответствии - с установленным языком. -\end_layout - -\begin_layout Labeling -\labelwidthstring 00.00. - -\family sans Размер \family default Изменяет размер шрифта. @@ -14898,7 +14763,6 @@ arg "font-size decrease" ) \end_layout -\end_deeper \begin_layout Standard \shape italic @@ -14913,6 +14777,119 @@ arg "font-size decrease" тонкой настройки! \end_layout +\end_deeper +\begin_layout Labeling +\labelwidthstring 00.00. + +\family sans +Цвет +\family default + Изменяет цвет текста. + Заметим, что не все DVI-просмотрщики могут отображать цвета. + Кроме +\family sans +(нет) +\family default +, что означает использование цвета текста документа по умолчанию, установленного + в +\family sans + Документ\SpecialChar menuseparator +Настройки\SpecialChar menuseparator +Цвета +\family default +для +\family sans + Основной текст +\family default +, вы можете выбрать +\family sans + черный +\family default +, +\family sans +белый +\family default +, +\family sans +красный +\family default +, +\family sans +зеленый +\family default +, +\family sans +синий
[LyX/master] Fix typos in credits
commit 04bcd1b484a4825d0bc9625a6b73f3773957822f Author: Yuriy Skalko Date: Sat Apr 24 15:30:51 2021 +0300 Fix typos in credits --- lib/CREDITS |4 ++-- lib/generate_contributions.py |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/CREDITS b/lib/CREDITS index 981e9a5..33765cb 100644 --- a/lib/CREDITS +++ b/lib/CREDITS @@ -98,7 +98,7 @@ Bug fixes @bHenry Chern @iE-mail: henrychern () yandex ! com - Russian Translation of documentation + Russian translation of documentation @bYuri Chornoivan @iE-mail: yurchor () ukr ! net Ukrainian translation @@ -557,7 +557,7 @@ @iE-mail: horst () schirmeier ! com small fixes @bChristoph Schmitz -@iE-mail: http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Set correct Windows console code page since all LyX output is in UTF-8
commit 4ec5d33551847ca3a4c6aa02b6f3a72bff3a18d4 Author: Yuriy Skalko Date: Thu Mar 11 16:19:44 2021 +0200 Set correct Windows console code page since all LyX output is in UTF-8 --- src/main.cpp |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 94b1ccd..65a9f4d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,6 +40,7 @@ int main(int argc, char * argv[]) freopen("CONOUT$", "w", stdout); freopen("CONOUT$", "w", stderr); } + SetConsoleOutputCP(CP_UTF8); #endif // To avoid ordering of global object problems with some -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update Russian localization
commit 71e500c039945751e2e9282fbb05c94005872949 Author: Yuriy Skalko Date: Sat Mar 6 12:51:39 2021 +0200 Update Russian localization --- lib/doc/ru/UserGuide.lyx | 127 +++-- po/ru.gmo| Bin 746915 -> 753296 bytes po/ru.po | 202 ++ 3 files changed, 178 insertions(+), 151 deletions(-) diff --git a/lib/doc/ru/UserGuide.lyx b/lib/doc/ru/UserGuide.lyx index a617651..61afe17 100644 --- a/lib/doc/ru/UserGuide.lyx +++ b/lib/doc/ru/UserGuide.lyx @@ -1337,8 +1337,20 @@ arg "word-find-backward" Нажатие кнопки \family sans Заменить +\begin_inset space ~ +\end_inset + +> +\family default + ( +\family sans +< +\begin_inset space ~ +\end_inset + +Заменить \family default - заменяет выделенный текст содержимым поля +) заменяет выделенный текст содержимым поля \family sans Заменить \begin_inset space ~ @@ -1346,7 +1358,7 @@ arg "word-find-backward" на \family default - и ищет следующее совпадение. + и ищет следующее (предыдущее) совпадение. Нажмите \family sans Заменить @@ -1355,17 +1367,13 @@ arg "word-find-backward" всё \family default -, чтобы автоматически заменить все вхождения указанного текста в документе. +, чтобы автоматически заменить все вхождения искомого текста в документе. \end_layout \begin_layout Standard Имеются следующие настройки: \family sans -Учитывать -\begin_inset space ~ -\end_inset - -регистр +Учитывать регистр \family default можно использовать, если требуется, чтобы поиск учитывал регистр искомого слова. @@ -1373,19 +1381,36 @@ arg "word-find-backward" овать слову «тест». \family sans -Только -\begin_inset space ~ -\end_inset - -целые -\begin_inset space ~ -\end_inset - -слова +Только целые слова \family default может использоваться, чтобы заставить \SpecialChar LyX находить только полные слова, например, поиск слова «звезда» не даст сопоставления со словом «звездами». + +\family sans +Только в выделении +\family default + ограничивает область поиска или замены текущим выделенным текстом. + +\family sans +Искать при вводе текста +\family default + позволяет начать поиск сразу при вводе текста, без нажатия кнопки +\family sans +Найти +\begin_inset space ~ +\end_inset + +> +\family default +. + +\family sans +Продолжать с начала +\family default + позволяет сразу продолжить поиск с начала документа при достижении его + конца (если настройка отключена, то будет появляться диалоговое окно для + уточнения дальнейшего действия). \end_layout \begin_layout Standard @@ -33955,7 +33980,11 @@ arg "dialog-toggle findreplaceadv" \family default простое слово и найдите его вхождение, нажав кнопку \family sans -Найти далее +Найти +\begin_inset space ~ +\end_inset + +> \family default в нижней части панели (или просто нажмите клавишу \begin_inset Info @@ -34083,6 +34112,10 @@ Shift+Return Чтобы найти следующее вхождение и заменить его, нажмите кнопку \family sans Заменить +\begin_inset space ~ +\end_inset + +> \family default или, в качестве альтернативы, \begin_inset Info @@ -34949,9 +34982,9 @@ arg "thesaurus-entry" \end_layout \begin_layout Standard -Язык автоматически выбирается из языка слова, на котором находится курсор, - но вы также можете переключать язык в диалоговом окне, поскольку можете - вводить слова для поиска прямо там. +Язык автоматически выбирается в соответствии с языком слова, на котором + находится курсор, но вы также можете переключать язык в диалоговом окне, + поскольку можете вводить слова для поиска прямо там. \end_layout \begin_layout Standard @@ -34960,8 +34993,9 @@ arg "thesaurus-entry" \shape italic синтаксическая диаграмма \shape default -), и вы должны использовать так называемую лемму — форму, используемую в - словарях (именительный падеж, единственное число — для существительных, +). + Также вы должны использовать так называемую лемму — форму, используемую + в словарях (именительный падеж, единственное число — для существительных, инфинитив несовершенного вида — для глаголов). Например, поиск слова в виде \shape italic @@ -39647,7 +39681,7 @@ status collapsed \begin_layout Standard \align left \begin_inset Tabular - + @@ -40337,7 +40371,7 @@ arg "dialog-toggle toc" \begin_inset Text \begin_layout Plain Layout -Переключить панель навигации, + \family sans Вид\SpecialChar menuseparator Панель навигации @@ -40367,7 +40401,11 @@ arg "toolbar-toggle math" \begin_inset Text \begin_layout Plain Layout -Переключить панель формул + +\family sans +Вид\SpecialChar menuseparator +Панель инструментов\SpecialChar menuseparator +Формула \end_layout \end_inset @@ -40394,7 +40432,42 @@ arg "toolbar-toggle table" \begin_inset Text \begin_layout Plain Layout -Переключить панель таблиц + +\family sans +Вид\SpecialChar menus
[LyX/master] Update Russian localization
commit 07625d55be6d966713bd025e1103d5534e099457 Author: Yuriy Skalko Date: Fri Feb 26 23:55:46 2021 +0200 Update Russian localization --- lib/examples/ru/Modules/Fancy_Colored_Boxes.lyx | 154 ++- po/ru.po|6 +- 2 files changed, 72 insertions(+), 88 deletions(-) diff --git a/lib/examples/ru/Modules/Fancy_Colored_Boxes.lyx b/lib/examples/ru/Modules/Fancy_Colored_Boxes.lyx index 103cf56..02de451 100644 --- a/lib/examples/ru/Modules/Fancy_Colored_Boxes.lyx +++ b/lib/examples/ru/Modules/Fancy_Colored_Boxes.lyx @@ -3,27 +3,24 @@ \begin_document \begin_header \save_transient_properties true -\origin unavailable +\origin /systemlyxdir/examples/ru/Modules/ \textclass scrartcl \begin_preamble -% if pdflatex is used -\usepackage{ifpdf} - - \@ifpackageloaded{babel}{ % increase link area for cross-references and autoname them, \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1 - \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{} - \addto\extrasenglish{% + \@ifundefined{extrasrussian}{\usepackage[russian]{babel}}{} + \addto\extrasrussian{% \renewcommand*{\equationautorefname}[1]{}% - \renewcommand{\sectionautorefname}{sec.\negthinspace}% - \renewcommand{\subsectionautorefname}{sec.\negthinspace}% - \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}% + \renewcommand{\sectionautorefname}{разд.\negthinspace}% + \renewcommand{\subsectionautorefname}{разд.\negthinspace}% + \renewcommand{\subsubsectionautorefname}{разд.\negthinspace}% } }{} -% Added by lyx2lyx -\setlength{\parskip}{\medskipamount} -\setlength{\parindent}{0pt} + +% Use serif font +\addtokomafont{disposition}{\rmfamily} +\addtokomafont{descriptionlabel}{\rmfamily} \end_preamble \options BCOR8mm, most, usenames, dvipsnames \use_default_options false @@ -32,12 +29,12 @@ tcolorbox \end_modules \maintain_unincluded_children no \language russian -\language_package \usepackage[english,russian,shorthands=off]{babel} +\language_package default \inputencoding utf8 \fontencoding auto \font_roman "default" "default" -\font_sans "PTSans-TLF" "default" -\font_typewriter "PTMono-TLF" "default" +\font_sans "default" "default" +\font_typewriter "default" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false @@ -47,7 +44,7 @@ tcolorbox \font_typewriter_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 -\use_microtype false +\use_microtype true \use_dash_ligatures false \graphics default \default_output_format default @@ -66,7 +63,7 @@ tcolorbox \pdf_bookmarks true \pdf_bookmarksnumbered true \pdf_bookmarksopen true -\pdf_bookmarksopenlevel 3 +\pdf_bookmarksopenlevel 2 \pdf_breaklinks false \pdf_pdfborder true \pdf_colorlinks true @@ -103,8 +100,8 @@ tcolorbox \end_index \secnumdepth 3 \tocdepth 3 -\paragraph_separation indent -\paragraph_indentation default +\paragraph_separation skip +\defskip halfline \is_math_indent 0 \math_numbering_side default \quotes_style russian @@ -113,7 +110,7 @@ tcolorbox \papersides 1 \paperpagestyle default \tablestyle default -\tracking_changes true +\tracking_changes false \output_changes false \change_bars false \postpone_fragile_content false @@ -139,7 +136,7 @@ Uwe Stöhr status collapsed \begin_layout Plain Layout -Перевод: Геннадий Чернышев, редактирование и обновление: Юрий Скалько. +Перевод: Геннадий Чернышев, редактирование: Юрий Скалько. \end_layout \end_inset @@ -158,11 +155,9 @@ LatexCommand tableofcontents \begin_layout Standard С модулем -\family sans -\shape italic +\emph on Красивые цветные блоки -\family default -\shape default +\emph default у вас появляется возможность создания огромного разнообразия цветных блоков. Они особенно полезны для презентаций или учебных текстов, где вы можете, например, выделить результаты или форму\SpecialChar softhyphen @@ -183,11 +178,11 @@ tcolorbox Поэтому \SpecialChar LyX может предоставить доступ только к его основным функциям. Более продвинутые возможности и примеры можно почерпнуть в руководстве - + по \series bold tcolorbox \series default -, + \begin_inset CommandInset citation LatexCommand cite key "tcolorbox" @@ -204,12 +199,10 @@ literal "true" \begin_layout Standard Сначала загрузите модуль -\family sans -\shape italic +\emph on Красивые цветные блоки -\family default -\shape default - в настройках документа файла. +\emph default + в настройках документа. \end_layout \begin_layout Standard @@ -287,7 +280,7 @@ status open \begin_layout Standard По умолчанию он имеет рамку с закругленными углами и занимает всю ширину - текста, может содержать несколько абзацев и математику. + текста, может содержать несколько абзацев и формулы. \end_layout \begin_layout Standard @@ -374,14 +367,12 @@ reference
[LyX/master] Add Russian translation of Fancy_Colored_Boxes.lyx by Henry Chern
commit b97b61f3b8d7a9da0a791b7f89c1da4209a9f600 Author: Yuriy Skalko Date: Fri Feb 26 18:00:15 2021 +0200 Add Russian translation of Fancy_Colored_Boxes.lyx by Henry Chern lib/Makefile.am |4 + lib/examples/ru/Modules/Fancy_Colored_Boxes.lyx | 7555 +++ 2 files changed, 7559 insertions(+), 0 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update Russian localization
commit 63f255dbd80654c86d5a20b9f7a963dc151fc5ed Author: Yuriy Skalko Date: Tue Feb 16 22:00:20 2021 +0200 Update Russian localization --- lib/doc/ru/EmbeddedObjects.lyx | 23 ++ lib/doc/ru/Math.lyx|6 ++- lib/doc/ru/UserGuide.lyx | 90 +--- po/ru.gmo | Bin 748718 -> 748652 bytes po/ru.po | 10 ++-- 5 files changed, 98 insertions(+), 31 deletions(-) diff --git a/lib/doc/ru/EmbeddedObjects.lyx b/lib/doc/ru/EmbeddedObjects.lyx index f61b35b..17ea1d0 100644 --- a/lib/doc/ru/EmbeddedObjects.lyx +++ b/lib/doc/ru/EmbeddedObjects.lyx @@ -264,8 +264,11 @@ varwidth \begin_layout Title Расширенное руководство \SpecialChar LyX - по рисункам, таблицам, плавающим объектам, заметкам, - блокам и внешнему материалу + +\begin_inset Newline newline +\end_inset + +по рисункам, таблицам, плавающим объектам, заметкам, блокам и внешнему материалу \end_layout \begin_layout Author @@ -27412,15 +27415,15 @@ status collapsed \begin_layout Standard Повернутые плавающие объекты всегда размещаются на отдельной странице (или - в отдельном столбце, если ваш документ — многоколоночный). - Вы можете позволить им охватывать несколько колонок, используя параметр - настроек с плавающей запятой + в отдельной колонке, если ваш документ — многоколоночный). + Вы можете позволить им занимать несколько колонок, используя параметр настроек + \family sans -Занимать все столбцы +Занимать все колонки \family default . - Плавающие объекты окажутся повернутыми в выводе, так что вы сможете рассмотреть - их с бокового поля страницы. + Плавающие объекты будут повернуты в выводе так, чтобы вы могли читать их + со стороны внешнего поля страницы. Чтобы задать определенное направление поворота для всех страниц, можно добавить к параметрам класса документа опцию \family typewriter @@ -27434,8 +27437,8 @@ figureright \end_layout \begin_layout Standard -Ссылка на повернутые плавающие объекты такая же, как и на обычные объекты, - формат заголовка тоже такой же: таблица +Ссылаться на повернутые плавающие объекты можно так же, как и на обычные. + Формат подписи тоже такой же: таблица \begin_inset space ~ \end_inset diff --git a/lib/doc/ru/Math.lyx b/lib/doc/ru/Math.lyx index 108f7e5..261ba20 100644 --- a/lib/doc/ru/Math.lyx +++ b/lib/doc/ru/Math.lyx @@ -241,7 +241,11 @@ subequations \begin_layout Title Расширенное руководство \SpecialChar LyX - по математике + +\begin_inset Newline newline +\end_inset + +по математике \end_layout \begin_layout Author diff --git a/lib/doc/ru/UserGuide.lyx b/lib/doc/ru/UserGuide.lyx index 333781d..a617651 100644 --- a/lib/doc/ru/UserGuide.lyx +++ b/lib/doc/ru/UserGuide.lyx @@ -1090,7 +1090,7 @@ status collapsed \begin_inset Info type "shortcut" -arg "dialog-show findreplaceadv" +arg "dialog-show findreplace" \end_inset или @@ -1265,7 +1265,7 @@ Comma Separated Values замена \family default - открывает диалоговое окно + открывает панель \family sans Поиск \begin_inset space ~ @@ -1280,28 +1280,73 @@ Comma Separated Values . Как только будет найдено слово или выражение, \SpecialChar LyX выделит его. - Нажатие кнопки + Вы можете нажать кнопку \family sans -Заменить +Найти +\begin_inset space ~ +\end_inset + +> \family default - заменяет выделенный текст содержимым поля + (клавишу \family sans -Заменить +Return +\family default + или +\begin_inset Info +type "shortcuts" +arg "word-find" +\end_inset + +), чтобы пропустить выделенное слово и искать дальше; или кнопку +\family sans +< \begin_inset space ~ \end_inset -на +Найти \family default + (сочетание +\family sans +Shift-Return +\family default + или +\begin_inset Info +type "shortcuts" +arg "word-find-backward" +\end_inset + +), чтобы искать в обратном направлении. + Даже при закрытой панели для поиска можно использовать сочетания клавиш + +\begin_inset Info +type "shortcuts" +arg "word-find" +\end_inset + + и +\begin_inset Info +type "shortcuts" +arg "word-find-backward" +\end_inset + . - Вы можете нажать кнопку +\end_layout + +\begin_layout Standard +Нажатие кнопки \family sans -Найти +Заменить +\family default + заменяет выделенный текст содержимым поля +\family sans +Заменить \begin_inset space ~ \end_inset -далее +на \family default -, чтобы пропустить выделенное слово. + и ищет следующее совпадение. Нажмите \family sans Заменить @@ -1311,7 +1356,10 @@ Comma Separated Values всё \family default , чтобы автоматически заменить все вхождения указанного текста в документе. - Параметр +\end_layout + +\begin_layout Standard +Имеются следующие настройки: \family sans Учитывать \begin_inset space ~ @@ -1323,7 +1371,7 @@ Comma Separated Values слова. К примеру, если этот переключатель установлен, поиск «Тест» не буде
[LyX/master] Fix margins for Beamer columns
commit e4b99081a56ad9ee4c0e858b96b626d93565987d Author: Yuriy Skalko Date: Thu Feb 18 15:38:13 2021 +0200 Fix margins for Beamer columns --- lib/layouts/beamer.layout | 12 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index 61d8823..a26c409 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -666,12 +666,12 @@ End # -# COLUMS +# COLUMNS # Style Column Category Columns - Margin Static + Margin Dynamic LatexTypeCommand LatexNamecolumn ParSkip 0.5 @@ -689,7 +689,6 @@ Style Column LabelString"Options" Tooltip"Column options (see beamer manual)" EndArgument - LeftMargin "Start column (increase depth!), width:xx" LabelFont Family Roman Color latex @@ -699,16 +698,15 @@ End Style Columns Category Columns KeepEmpty1 - Margin Static + Margin First_Dynamic LatexTypeEnvironment - NextNoIndent 0 + NextNoIndent 1 ParIndentMM AlignLeft LabelTypeStatic LabelSep xx LatexNamecolumns LabelString "Columns" - LeftMargin "Columnsxx" Argument 1 LabelString"Column Placement Options" Tooltip"Column placement options (t, T, c, b)" @@ -732,7 +730,6 @@ Style ColumnsCenterAligned CopyStyleColumns LatexParam [c] LabelString "Columns (center aligned)" - LeftMargin "Columns (center aligned)xx" ResetArgs1 End @@ -740,7 +737,6 @@ Style ColumnsTopAligned CopyStyleColumns LatexParam [t] LabelString "Columns (top aligned)" - LeftMargin "Columns (top aligned)xx" ResetArgs1 End -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Fix setting of math matrix size with mouse
commit 110862b09f538bd7412f9e747641a8ae14f3f70a Author: Yuriy Skalko Date: Thu Feb 18 15:36:24 2021 +0200 Fix setting of math matrix size with mouse --- src/frontends/qt/EmptyTable.cpp | 16 src/frontends/qt/EmptyTable.h |4 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt/EmptyTable.cpp b/src/frontends/qt/EmptyTable.cpp index bc2963b..80cbe88 100644 --- a/src/frontends/qt/EmptyTable.cpp +++ b/src/frontends/qt/EmptyTable.cpp @@ -22,10 +22,6 @@ * A simple widget for a quick "preview" in TabularCreateDialog */ -unsigned int const cellheight = 20; -unsigned int const cellwidth = 30; - - EmptyTable::EmptyTable(QWidget * parent, int rows, int columns) : QTableWidget(rows, columns, parent) { @@ -34,7 +30,9 @@ EmptyTable::EmptyTable(QWidget * parent, int rows, int columns) setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); viewport()->resize(cellheight * rows, cellwidth * columns); setSelectionMode(QAbstractItemView::NoSelection); + setFocusPolicy(Qt::NoFocus); setEditTriggers(QAbstractItemView::NoEditTriggers); + adjustMinCellSize(); } @@ -43,6 +41,16 @@ QSize EmptyTable::sizeHint() const return QSize(cellwidth * (2 + columnCount()), cellheight * (2 + rowCount())); } + +void EmptyTable::adjustMinCellSize() +{ + setRowHeight(0, cellheight); + cellheight = rowHeight(0); + setColumnWidth(0, cellwidth); + cellwidth = columnWidth(0); +} + + void EmptyTable::resetCellSize() { for(int i = 0; i < rowCount(); ++i) diff --git a/src/frontends/qt/EmptyTable.h b/src/frontends/qt/EmptyTable.h index 9926526..9285db5 100644 --- a/src/frontends/qt/EmptyTable.h +++ b/src/frontends/qt/EmptyTable.h @@ -49,6 +49,10 @@ protected: virtual void resetCellSize(); private: + void adjustMinCellSize(); + + int cellheight = 20; + int cellwidth = 30; }; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update ru manuals
commit 919d8ac2fb700770f5f24b6cfe90643ee631d7b6 Author: Yuriy Skalko Date: Sun Feb 7 17:55:52 2021 +0200 Update ru manuals --- lib/doc/ru/EmbeddedObjects.lyx | 196 ++-- lib/doc/ru/Math.lyx| 73 +++ lib/doc/ru/UserGuide.lyx | 19 +++- 3 files changed, 176 insertions(+), 112 deletions(-) diff --git a/lib/doc/ru/EmbeddedObjects.lyx b/lib/doc/ru/EmbeddedObjects.lyx index 455f927..f61b35b 100644 --- a/lib/doc/ru/EmbeddedObjects.lyx +++ b/lib/doc/ru/EmbeddedObjects.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 600 +\lyxformat 606 \begin_document \begin_header \save_transient_properties true @@ -263,9 +263,9 @@ varwidth \begin_body \begin_layout Title -Расширенное руководство по рисункам, таблицам, плавающим объектам, заметкам, - блокам и внешнему материалу \SpecialChar LyX - +Расширенное руководство \SpecialChar LyX + по рисункам, таблицам, плавающим объектам, заметкам, + блокам и внешнему материалу \end_layout \begin_layout Author @@ -11132,11 +11132,11 @@ Franz \end_layout \begin_layout Section -Многоколоночные и многострочные ячейки +Объединенные ячейки \end_layout \begin_layout Subsection -Многострочность в ячейках таблицы +Несколько строк в ячейках \begin_inset CommandInset label LatexCommand label name "subsec:Multiple-Lines-in" @@ -11675,7 +11675,7 @@ i \end_layout \begin_layout Subsection -Многоколоночность +Объединение столбцов \begin_inset CommandInset label LatexCommand label name "subsec:Multicolumns" @@ -11711,18 +11711,18 @@ arg "tabular-feature multicolumn" \family sans Правка\SpecialChar menuseparator Таблица\SpecialChar menuseparator -Многоколоночность +Объединить столбцы \family default , либо щелкните правой кнопкой мыши на этих ячейках и выберите \family sans Столбцы/строки\SpecialChar menuseparator -Многоколоночность +Объединить столбцы \family default в контекстном меню. \end_layout \begin_layout Standard -Многоколоночность имеет собственные настройки ячеек. +Объединенные ячейки имеют собственные настройки. Это означает, что изменение границ ячеек, выравнивания ячеек и их ширины влияет только на несколько столбцов. Вот пример таблицы с ячейкой из нескольких столбцов в первой строке и одной @@ -11891,7 +11891,7 @@ status open \begin_layout Standard LyX поддерживает многоколоночность напрямую, но мы должны учитывать ширину - ячеек столбцов, охватываемых многоколоночной ячейкой. + ячеек столбцов, охватываемых оьъединенной ячейкой. \end_layout \begin_layout Standard @@ -12478,7 +12478,7 @@ centering}m{2.5cm} \end_layout \begin_layout Subsection -Многострочность +Объединение строк \begin_inset CommandInset label LatexCommand label name "subsec:Multirows" @@ -12510,11 +12510,11 @@ arg "tabular-feature multirow" \family sans Правка\SpecialChar menuseparator Таблица\SpecialChar menuseparator -Многострочность +Объединить строки \family default , либо щелкните правой кнопкой мыши на отмеченных ячейках и выберите \family sans -Многострочность +Объединить строки \family default в контекстном меню. \end_layout @@ -12977,7 +12977,7 @@ eee \end_layout \begin_layout Subsection -Ячейки с диагональной (-ыми) линией (-ями) +Ячейки с диагональными линиями \end_layout \begin_layout Standard @@ -30797,7 +30797,9 @@ status open Вы можете вставлять их, используя меню \family sans Вставка\SpecialChar menuseparator -Списки/содержание/библиографии +Содержание\SpecialChar breakableslash +библиография\SpecialChar breakableslash +список \family default . \end_layout @@ -30809,22 +30811,20 @@ status open \end_layout \begin_layout Standard -Вы можете найти список рисунков и таблиц в конце этого документа. +Вы можете найти примеры списков рисунков и таблиц в конце этого документа. \end_layout \begin_layout Chapter -Заметки +Примечания \end_layout \begin_layout Section -Заметки в \SpecialChar LyX - +Заметки \begin_inset Index idx -status open +status collapsed \begin_layout Plain Layout -Заметки ! заметки \SpecialChar LyX - +Заметки ! заметки \end_layout \end_inset @@ -30849,11 +30849,7 @@ arg "note-insert" \end_layout \begin_layout Description -Заметка -\begin_inset space ~ -\end_inset - -LyX Этот тип заметок предназначен для внутреннего использования, которые +Заметка Этот тип заметок предназначен для внутреннего использования, которые не будут отображаться в выводе. Кнопка этого типа выглядит так: \begin_inset Newline newline @@ -31047,11 +31043,11 @@ arg "note-insert" панели инструментов для вставки заметок, вставляется \family sans -Заметка LyX +Заметка \family default . Вы можете переключаться между тремя типами заметок, щелкнув правой кнопкой - мыши на блоке заметок. + мыши на блоке заметки. Если вы хотите превратить существующий текст в заметку, выделите его и нажмите кно
[LyX/master] Update and correct LyX manuals
commit 7e9e81367fd326ac403d02473af92343c845710e Author: Yuriy Skalko Date: Fri Feb 5 22:55:19 2021 +0200 Update and correct LyX manuals --- lib/doc/EmbeddedObjects.lyx | 14 +++--- lib/doc/UserGuide.lyx |6 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/doc/EmbeddedObjects.lyx b/lib/doc/EmbeddedObjects.lyx index 3c3c3e4..64c551d 100644 --- a/lib/doc/EmbeddedObjects.lyx +++ b/lib/doc/EmbeddedObjects.lyx @@ -303,7 +303,7 @@ author: Uwe Stöhr \family sans -Version 2.3.x +Version 2.4.x \end_layout \begin_layout Standard @@ -530,6 +530,14 @@ externally \begin_layout Description \family sans +Coordinates +\begin_inset space ~ +\end_inset + +and +\begin_inset space ~ +\end_inset + Clipping \family default Alternatively to the usage of scaling units it is possible to set image @@ -1599,7 +1607,7 @@ Windows Metafile status collapsed \begin_layout Plain Layout -SVG|see +WMF|see \begin_inset ERT status collapsed @@ -25937,7 +25945,7 @@ for I in 1..N loop \begin_inset Newline newline \end_inset - Sum:= Sum + A(I); /*comment*/ + Sum := Sum + A(I); /* comment */ \begin_inset Newline newline \end_inset diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx index 1c4fb61..9864302 100644 --- a/lib/doc/UserGuide.lyx +++ b/lib/doc/UserGuide.lyx @@ -43063,8 +43063,12 @@ arg "bookmark-goto 2" \end_layout \begin_layout Standard + +\change_deleted 244031559 1613377262 The saved bookmarks are valid till the document is closed. - The submenu + +\change_unchanged +The submenu \family sans Clear \begin_inset space ~ -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update Russian localization
commit 5780b514d3dce1cfd3e2d5fbab0a74043dd13b7c Author: Yuriy Skalko Date: Sun Jan 31 01:10:36 2021 +0200 Update Russian localization lib/doc/ru/EmbeddedObjects.lyx | 704 +--- lib/doc/ru/Math.lyx| 202 +--- lib/doc/ru/Shortcuts.lyx | 10 +- lib/doc/ru/Tutorial.lyx| 40 ++-- lib/doc/ru/UserGuide.lyx | 68 ++-- po/ru.gmo | Bin 748772 -> 748718 bytes po/ru.po | 32 +- 7 files changed, 529 insertions(+), 527 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Russian translation of EmbeddedObjects manual by Henry Chern
commit a906ae9a4fcf428e177b4c3c494c49aef9a3ea8e Author: Yuriy Skalko Date: Fri Feb 5 16:29:28 2021 +0200 Russian translation of EmbeddedObjects manual by Henry Chern lib/doc/Makefile.am|1 + lib/doc/ru/EmbeddedObjects.lyx |46639 2 files changed, 46640 insertions(+), 0 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update Russian localization
commit 83a4384b27d286bd92867a0e7c66dc6c3e4de475 Author: Yuriy Skalko Date: Mon Jan 25 15:12:53 2021 +0200 Update Russian localization --- lib/doc/ru/UserGuide.lyx | 115 ++--- po/ru.gmo| Bin 745650 -> 748772 bytes po/ru.po | 116 ++ 3 files changed, 92 insertions(+), 139 deletions(-) diff --git a/lib/doc/ru/UserGuide.lyx b/lib/doc/ru/UserGuide.lyx index 9463429..130d33c 100644 --- a/lib/doc/ru/UserGuide.lyx +++ b/lib/doc/ru/UserGuide.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 604 +\lyxformat 605 \begin_document \begin_header \save_transient_properties true @@ -7464,7 +7464,7 @@ Return \family sans Return \family default - является функцией разрыва абзаца, а отдельные строки адреса не являются + предназначен для разрыва абзаца, а отдельные строки адреса не являются абзацами. Таким образом, вы должны использовать разрыв строки ( \begin_inset Info @@ -11909,20 +11909,20 @@ name "subsec:Forced-Page-Breaks" \end_layout \begin_layout Standard -Существует два типа разрывов страниц: первый, который завершает страницу - без каких-либо специальных действий. - Это может быть вставка выше или ниже абзаца через меню +Существует два типа разрывов страниц. + Первый из них завершает страницу без каких-либо специальных действий. + Он может быть вставлен до или после абзаца через меню \family sans Вставка\SpecialChar menuseparator Форматирование\SpecialChar menuseparator -Новая +Разрыв \begin_inset space ~ \end_inset -страница +страницы \family default . - Второй тип, который действует через меню + Второй тип ( \family sans Вставка\SpecialChar menuseparator Форматирование\SpecialChar menuseparator @@ -11940,9 +11940,10 @@ name "subsec:Forced-Page-Breaks" выравниванием \family default -, завершает страницу, но растягивает оставшееся содержимое на всю страницу. - Этот тип полезен в ситуации, когда разрыв оставляет страницу, на которой - отсутствуют только последние несколько строк, перенесенные на новую страницу. +) завершает страницу, при этом растягивая ее содержимое для получения заполненно +й по высоте страницы. + Это может быть полезно в ситуации, когда разрыв применяется на почти заполненно +й странице. \end_layout \begin_layout Standard @@ -11951,8 +11952,8 @@ name "subsec:Forced-Page-Breaks" Это, конечно же, неправильный способ. \SpecialChar LyX дает вам возможность автоматически обеспечивать отображение рисунков и - таблиц вверху страницы (или внизу, или в требуемом месте страницы), не - беспокоясь о том, что предшествует или следует за вашим рисунком или таблицей. + таблиц вверху страницы (или внизу, или на отдельной странице), не беспокоясь + о том, что предшествует или следует за вашим рисунком или таблицей. См. главу \begin_inset CommandInset ref @@ -11961,9 +11962,9 @@ reference "chap:Floats-and-Notes" \end_inset - для углубленного изучения категории + для углубленного изучения \family sans -Плавающий объект +Плавающих объектов \family default . \end_layout @@ -11981,7 +11982,7 @@ name "subsec:Clear-Page-Breaks" status collapsed \begin_layout Plain Layout -Разрыв страницы ! чистый +Разрыв страницы ! с очисткой \end_layout \end_inset @@ -11991,45 +11992,47 @@ status collapsed \begin_layout Standard Вместо принудительных разрывов страниц, когда содержимое, стоящее за разрывом, - размещается непосредственно на следующей странице, вы также можете очищать - страницы, разбивая их. - Это означает, что текущий абзац уже завершен, и все, включая необработанные + размещается непосредственно на следующей странице, вы также можете разорвать + страницу с очисткой. + Это означает, что текущий абзац завершается, и все, включая необработанные плавающие объекты из предыдущей части документа, помещается после него, - если необходимо, путем добавления страниц. + путем добавления страниц при необходимости. \end_layout \begin_layout Standard -Вы можете вставить чистый разрыв страницы с помощью меню +Вы можете вставить такой разрыв страницы с помощью меню \family sans Вставка\SpecialChar menuseparator -Форма\SpecialChar softhyphen -тирование\SpecialChar menuseparator -Очистить +\SpecialChar allowbreak +Форматирование\SpecialChar menuseparator +\SpecialChar allowbreak +Новая \begin_inset space ~ \end_inset -страницу +страница \family default . Если вы работаете с двусторонним документом, таким как книга, то можете использовать меню \family sans Вставка\SpecialChar menuseparator +\SpecialChar allowbreak Форматирование\SpecialChar menuseparator -Очис\SpecialChar softhyphen -тить +\SpecialChar allowbreak +Новая \begin_inset space ~ \end_inset -двойную +нечётная \begin_inset space ~ \end_inset -страницу +страница \family default -, чтобы вставить чистый разрыв страницы, который гарантиру
[LyX/master] Update Development.lyx
commit eab9108dc1ec71505e7addea6d8faabcf85be034 Author: Yuriy Skalko Date: Sun Jan 10 13:27:40 2021 +0200 Update Development.lyx --- lib/doc/Development.lyx | 99 +++ 1 files changed, 65 insertions(+), 34 deletions(-) diff --git a/lib/doc/Development.lyx b/lib/doc/Development.lyx index 5a4c386..46f253f 100644 --- a/lib/doc/Development.lyx +++ b/lib/doc/Development.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 600 +\lyxformat 601 \begin_document \begin_header \save_transient_properties true @@ -3616,7 +3616,7 @@ Wontfix \end_layout \begin_layout Paragraph -suspended tests +Suspended tests \end_layout \begin_layout Standard @@ -5178,7 +5178,7 @@ PDF (pdflatex) \begin_layout Enumerate All fixes (typos, compilation fixes, updates info etc.) go at first into - the current GIT branch because the user should benefit from all fixes with + the current Git branch because the user should benefit from all fixes with every minor release. Feel free to commit directly to branch as long as you follow rule \begin_inset space ~ @@ -5213,12 +5213,10 @@ The main documentation consists of these files: \end_layout \begin_layout Description -Welcome.lyx it is the first file you see after an installation. +Welcome.lyx It is the first file you see after an installation. We assume that a new user sees this. It is therefore designed to be as simple as possible. Therefore please don't add any new formatting, only fix typos etc. - Welcome.lyx is up to date for \SpecialChar LyX - 2.1.x, currently maintained by Uwe Stöhr. \end_layout \begin_layout Description @@ -5229,60 +5227,47 @@ Intro.lyx This is the manual new users will read to learn \SpecialChar LyX Since new users will first learn about the formatting possibilities of \SpecialChar LyX please keep this file that simple. - Intro.lyx is up to date for \SpecialChar LyX - 2.1.x, currently maintained by Uwe Stöhr. \end_layout \begin_layout Description -Tutorial.lyx our tutorial. +Tutorial.lyx Our tutorial. It must be always up to date. Normally there is nothing to add since we don't want to overwhelm new users with too much details. - The will learn these details while using \SpecialChar LyX + They will learn these details while using \SpecialChar LyX and we have special manuals. - Tutorial.lyx is up to date for \SpecialChar LyX - 2.1.x, currently maintained by Uwe Stöhr. \end_layout \begin_layout Description -UserGuide.lyx our main user guide. +UserGuide.lyx Our main user guide. It covers a mixture of basic and detailed information. Some information is also in the Math and EmbeddedObjects manual so that the UserGuide refers to these files. - UserGuide.lyx is up to date for \SpecialChar LyX - 2.1.x, currently maintained by Uwe Stöhr. \end_layout \begin_layout Description -EmbeddedObjects.lyx a special manual to explain things like tables floats +EmbeddedObjects.lyx A special manual to explain things like tables floats boxes etc. in all detail. - EmbeddedObjects.lyx is up to date for \SpecialChar LyX - 2.1.x, currently maintained by Uwe - Stöhr. \end_layout \begin_layout Description -Math.lyx a special manual to explain everything regarding math in all detail. - Math.lyx is up to date for \SpecialChar LyX - 2.1.x, currently maintained by Uwe Stöhr. +Math.lyx A special manual to explain everything regarding math in all detail. \end_layout \begin_layout Description -Additional.lyx this manual covers information that would be too much detail +Additional.lyx This manual covers information that would be too much detail for the UserGuide or would make the UserGuide uncompilable or only compilable when installing a lot of special \SpecialChar LaTeX --packages. + packages. What should be in the UserGuide or better in Additional is a matter of taste. - it is up to you to decide that. - Additional.lyx is not completely up to date for \SpecialChar LyX - 2.1.x. - Only chapter + It is up to you to decide that. + Additional.lyx is not completely up to date (only chapter \begin_inset space ~ \end_inset -8 is up to date and currently maintained by Uwe Stöhr. +8 is up to date). It certainly needs a rewrite and update. For example many info in chapter \begin_inset space ~ @@ -5293,7 +5278,7 @@ Additional.lyx this manual covers information that would be too much detail \end_layout \begin_layout Description -Customization.lyx this manual covers information how to customize \SpecialChar LyX +Customization.lyx This manual covers information how to customize \SpecialChar LyX for certain output formats, operating systems, languages etc. It is currently completely out of date and needs a major rewrite and update. @@ -5861,7 +5846,12 @@ switch (f) { \begin_layout Plain Layout -case FOO_BAR1: ...; +case FOO_BAR1: +\end_layout + +\begin_layout Plain Layout + + ...; \end_layout
[LyX/master] Update Russian localization
commit bd8e516138103ff0c3b83a2ba18f51e64c673ef0 Author: Yuriy Skalko Date: Sat Jan 9 14:13:57 2021 +0200 Update Russian localization --- lib/doc/ru/Intro.lyx | 43 +-- lib/doc/ru/UserGuide.lyx | 49 ++--- po/ru.po | 32 +++--- 3 files changed, 76 insertions(+), 48 deletions(-) diff --git a/lib/doc/ru/Intro.lyx b/lib/doc/ru/Intro.lyx index bbcdec9..a70a2e8 100644 --- a/lib/doc/ru/Intro.lyx +++ b/lib/doc/ru/Intro.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 600 +\lyxformat 601 \begin_document \begin_header \save_transient_properties true @@ -1072,8 +1072,8 @@ status collapsed \begin_layout Standard Чтобы упростить вам поиск ответов на вопросы и описать все возможности \SpecialChar LyX , - документация была разделена на несколько различных файлов. - Каждый из них имеет свою цель, как описано ниже. + документация была разделена на несколько файлов. + Каждый из них имеет своё назначение, как описано ниже. Однако перед тем, как открыть любой из этих файлов, сначала вам следует до конца прочитать эту главу, так как она содержит много полезной информации и комментариев, которые помогут сохранить вам время. @@ -1115,10 +1115,17 @@ literal "false" \end_inset . - Если у вас есть вопросы, которые плохо освещены в документации, и вам нужна - быстрая помощь, есть список рассылки пользователей \SpecialChar LyX -, который доступен по - адресу +\end_layout + +\begin_layout Subsection +Получение помощи +\end_layout + +\begin_layout Standard +Если у вас возникли вопросы, которые плохо освещены в документации, и вам + нужна быстрая помощь, есть список рассылки пользователей \SpecialChar LyX +, который доступен + по адресу \begin_inset CommandInset href LatexCommand href target "lyx-us...@lists.lyx.org" @@ -1128,6 +1135,28 @@ literal "false" \end_inset . + Регистрация в списке полезна, но не обязательна. + Подробности описаны на +\begin_inset CommandInset href +LatexCommand href +name "сайте \\LyX" +target "https://www.lyx.org/MailingLists; +literal "true" + +\end_inset + +. + Также существует +\begin_inset CommandInset href +LatexCommand href +name "вики проекта \\LyX" +target "https://wiki.lyx.org/; +literal "true" + +\end_inset + +, которая содержит много полезной информации. + \end_layout \begin_layout Subsection diff --git a/lib/doc/ru/UserGuide.lyx b/lib/doc/ru/UserGuide.lyx index cad1507..1586d3a 100644 --- a/lib/doc/ru/UserGuide.lyx +++ b/lib/doc/ru/UserGuide.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 600 +\lyxformat 601 \begin_document \begin_header \save_transient_properties true @@ -19428,8 +19428,8 @@ arg "tabular-insert" . Появится диалоговое окно с запросом количества строк и столбцов, также можно выбрать определенный стиль (границы). - Таблица по умолчанию имеет линии вокруг любой ячейки, а первая строка кажется - отделенной от остальной таблицы. + Таблица по умолчанию имеет линии вокруг каждой ячейки, а первая строка + кажется отделенной от остальной таблицы. Это отделение появляется из-за двойной линии: ячейки первого ряда имеют линию непосредственно под собой, а ячейки второго ряда — другую линию непосредс твенно над собой. @@ -19688,8 +19688,8 @@ arg "tabular-insert" Макет текста \family default . - Так что, если приведенный выше стиль по умолчанию не тот, который вам нужен, - следует изменить этот параметр. + Так что, если приведенный выше стиль по умолчанию вам не подходит, то следует + изменить этот параметр. \end_layout \begin_layout Subsection @@ -19702,9 +19702,9 @@ arg "tabular-insert" Настройки \family default . - Это запустит диалоговое окно настройки таблицы. - Здесь вы можете настроить параметры ячейки, строки и/или столбца, где курсор - находится в данный момент. + Это откроет диалоговое окно настройки таблицы. + Здесь вы можете настроить параметры той ячейки, строки и/или столбца, где + курсор находится в данный момент. Большинство параметров также работают для выделения. Это означает, что если вы выделите несколько ячеек, столбцов или строк, действие будет выполнено для всей выделенной совокупности. @@ -19730,10 +19730,10 @@ arg "tabular-insert" таблицы \family default диалогового окна можно установить выравнивание для текущей строки. - Если вы добавите строку или столбец, он будет вставлен рядом или ниже текущей - ячейки соответственно. - Вертикальное выравнивание столбца можно отрегулировать только при заданной - ширине столбца. + Если вы добавите строку или столбец, они будет вставлены правее или ниже + текущей ячейки соответственно. + Вертикальное выравнивание столбца можно изменять только при заданной ширине + столбца. Заданная ширина позволи
[LyX features/InsetParams-refactoring] InsetGraphicsParams::read is unused and unimplemented for now
The branch, InsetParams-refactoring, has been updated. - Log - commit 6851248054527a85a3950daec77e97cfd9f23fdd Author: Yuriy Skalko Date: Tue Jan 19 10:09:01 2021 +0200 InsetGraphicsParams::read is unused and unimplemented for now diff --git a/src/insets/InsetGraphicsParams.cpp b/src/insets/InsetGraphicsParams.cpp index 077320c..9e3ccd9 100644 --- a/src/insets/InsetGraphicsParams.cpp +++ b/src/insets/InsetGraphicsParams.cpp @@ -280,9 +280,9 @@ bool InsetGraphicsParams::read(Lexer & lex, string const & token, bool allowOrig } -void InsetGraphicsParams::read(Lexer & lex) +void InsetGraphicsParams::read(Lexer & /* lex */) { - // TODO + LYXERR0("InsetGraphicsParams::read(Lexer &) is not implemented"); } --- Summary of changes: src/insets/InsetGraphicsParams.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Repository for new features -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
Tags update in the features repository
In addition to recent updating of master branch in the features repository, I've also updated tags there. Yuriy -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update ru.po
commit 0b588de771d34ebd080a588d3fd4e63ec6a725b0 Author: Yuriy Skalko Date: Sat Jan 9 12:35:27 2021 +0200 Update ru.po --- po/ru.po | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/po/ru.po b/po/ru.po index c222c67..d91a290 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,13 +6,13 @@ # Nick A. Gusev , 2009. # Valeriy Kruchko , 2009. # Sergey Tereschenko , 2010. -# Yuriy Skalko , 2017-2020. +# Yuriy Skalko , 2017-2021. msgid "" msgstr "" "Project-Id-Version: LyX 2.4\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" "POT-Creation-Date: 2020-12-29 12:04-0500\n" -"PO-Revision-Date: 2020-12-29 23:31+0200\n" +"PO-Revision-Date: 2021-01-09 12:34+0200\n" "Last-Translator: Yuriy Skalko \n" "Language-Team: Russian \n" "Language: ru\n" @@ -21019,23 +21019,23 @@ msgstr "Перейти к метке|м" #: lib/ui/stdmenus.inc:606 msgid "Save Bookmark 1|S" -msgstr "Сохранить закладку 1|1" +msgstr "Сохранить закладку 1|з" #: lib/ui/stdmenus.inc:607 msgid "Save Bookmark 2" -msgstr "Сохранить закладку 2|2" +msgstr "Сохранить закладку 2" #: lib/ui/stdmenus.inc:608 msgid "Save Bookmark 3" -msgstr "Сохранить закладку 3|3" +msgstr "Сохранить закладку 3" #: lib/ui/stdmenus.inc:609 msgid "Save Bookmark 4" -msgstr "Сохранить закладку 4|4" +msgstr "Сохранить закладку 4" #: lib/ui/stdmenus.inc:610 msgid "Save Bookmark 5" -msgstr "Сохранить закладку 5|5" +msgstr "Сохранить закладку 5" #: lib/ui/stdmenus.inc:611 msgid "Clear Bookmarks|C" @@ -35545,7 +35545,7 @@ msgstr "Неизвестное действие %1$s" #: src/insets/InsetInfo.cpp:802 src/insets/InsetInfo.cpp:912 #: src/insets/InsetInfo.cpp:921 src/insets/InsetInfo.cpp:929 msgid "undefined" -msgstr "неопределённый" +msgstr "не задано" #: src/insets/InsetInfo.cpp:825 src/insets/InsetInfo.cpp:875 msgid "Return[[Key]]" -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Add move constructor and move assignment operator for FileName class
commit 854c9de8faf9eb357adc353fc9116996445d5e38 Author: Yuriy Skalko Date: Thu Jan 7 02:27:31 2021 +0200 Add move constructor and move assignment operator for FileName class --- src/support/FileName.cpp | 16 src/support/FileName.h | 14 ++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index 5295741..b9a1d43 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -158,6 +158,13 @@ FileName::FileName(FileName const & rhs) : d(new Private) } +FileName::FileName(FileName && rhs) noexcept + : d(rhs.d) +{ + rhs.d = nullptr; +} + + FileName::FileName(FileName const & rhs, string const & suffix) : d(new Private) { set(rhs, suffix); @@ -174,6 +181,15 @@ FileName & FileName::operator=(FileName const & rhs) } +FileName & FileName::operator=(FileName && rhs) noexcept +{ + auto temp = rhs.d; + rhs.d = d; + d = temp; + return *this; +} + + bool FileName::empty() const { return d->name.empty(); diff --git a/src/support/FileName.h b/src/support/FileName.h index 1cf1e73..2bc2e48 100644 --- a/src/support/FileName.h +++ b/src/support/FileName.h @@ -42,15 +42,21 @@ public: */ explicit FileName(std::string const & abs_filename); - /// copy constructor. + /// copy constructor FileName(FileName const &); - /// constructor with base name and suffix. + /// move constructor + FileName(FileName &&) noexcept; + + /// constructor with base name and suffix FileName(FileName const & fn, std::string const & suffix); - /// + /// copy assign FileName & operator=(FileName const &); + /// move assign + FileName & operator=(FileName &&) noexcept; + virtual ~FileName(); /** Set a new filename. * \param filename the file in question. Must have an absolute path. @@ -219,7 +225,7 @@ private: bool copyTo(FileName const &, bool, FileNameSet &) const; /// struct Private; - Private * const d; + Private * d; }; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Add Russian translation of Shortcuts.lyx
commit e5348078d701f289a49db8cb2e7e7a50eb84d3ee Author: Yuriy Skalko Date: Sat Jan 2 11:34:39 2021 +0200 Add Russian translation of Shortcuts.lyx lib/doc/Makefile.am |1 + lib/doc/ru/Shortcuts.lyx | 3812 ++ 2 files changed, 3813 insertions(+), 0 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Remove duplicated words in en/ru manuals
commit c785ba19a0765985bd54afc93d437d18d069dcdc Author: Yuriy Skalko Date: Wed Jan 6 10:48:27 2021 +0200 Remove duplicated words in en/ru manuals Thanks Kornel for suggesting regexp "\b(\w+)\s+\1\b". --- lib/doc/Customization.lyx | 10 +- lib/doc/EmbeddedObjects.lyx |2 +- lib/doc/Math.lyx|2 +- lib/doc/UserGuide.lyx |8 lib/doc/ru/Additional.lyx |4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index 026df28..744dd1d 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -19612,7 +19612,7 @@ name \end_inset - may be be any valid identifier not used by a pre-existing Flex inset. + may be any valid identifier not used by a pre-existing Flex inset. The identifier may include spaces, but in that case the whole thing must be wrapped in quotes. Note that the definition of a flex inset @@ -19672,7 +19672,7 @@ name \end_inset - may be be any valid identifier of branch defined in user's document. + may be any valid identifier of branch defined in user's document. The identifier may include spaces, but in that case the whole thing must be wrapped in quotes. The main purpose of this feature is to allow \SpecialChar LaTeX @@ -20544,9 +20544,9 @@ status collapsed \end_inset -] Force a a line break in the \SpecialChar LaTeX - output before the inset starts and after - the inset ends. +] Force a line break in the \SpecialChar LaTeX + output before the inset starts and after the + inset ends. This assures the inset itself is output on its own lines, for parsing purposes. \end_layout diff --git a/lib/doc/EmbeddedObjects.lyx b/lib/doc/EmbeddedObjects.lyx index 7bec584..3c3c3e4 100644 --- a/lib/doc/EmbeddedObjects.lyx +++ b/lib/doc/EmbeddedObjects.lyx @@ -37956,7 +37956,7 @@ reference "tab:Units" \series bold ! \series default - in of of the two insets, the size is set so that the aspect ratio of the + in one of the two insets, the size is set so that the aspect ratio of the box content is kept. If no \family sans diff --git a/lib/doc/Math.lyx b/lib/doc/Math.lyx index d02801c..224b30d 100644 --- a/lib/doc/Math.lyx +++ b/lib/doc/Math.lyx @@ -4870,7 +4870,7 @@ bigr). \change_deleted -563046850 1563192735 \change_unchanged -Alternatively, parentheses can can +Alternatively, parentheses can \change_deleted -563046850 1563192971 either \change_unchanged diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx index 82d5887..ef97f9d 100644 --- a/lib/doc/UserGuide.lyx +++ b/lib/doc/UserGuide.lyx @@ -13506,7 +13506,7 @@ automatic \change_unchanged \change_inserted -712698321 1524413747 -either the the standard \SpecialChar TeX +either the standard \SpecialChar TeX font \begin_inset Quotes eld \end_inset @@ -48227,8 +48227,8 @@ reference "subsec:Numbering-depth" \change_inserted 5863208 1558620379 You can typeset lines numbering in the output file by enabling the checkbox at the bottom. - The functionality is handled by package lineno and and additional options - of this package can be used as well. + The functionality is handled by package lineno and additional options of + this package can be used as well. The most common one are: \end_layout @@ -50232,7 +50232,7 @@ do not \emph default track changes. In such documents, change-tracked text will be copied and pasted as is - is (keeping + (keeping \emph on addition \emph default diff --git a/lib/doc/ru/Additional.lyx b/lib/doc/ru/Additional.lyx index 2a22687..937ad3f 100644 --- a/lib/doc/ru/Additional.lyx +++ b/lib/doc/ru/Additional.lyx @@ -8190,7 +8190,7 @@ references deluxetable \family default (2.15). - Если вам действительно действительно нужно использовать + Если вам действительно нужно использовать \family sans deluxetable \family default @@ -11568,7 +11568,7 @@ Chk\SpecialChar TeX \end_layout \begin_layout Itemize -Нет пробела перед скобками и/или после после них: +Нет пробела перед скобками и/или после них: \begin_inset Newline newline \end_inset -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Show caught exception message in findAdv
commit e8099942c7b7464895545959b346028a298f8bd7 Author: Yuriy Skalko Date: Mon Jan 4 15:41:53 2021 +0200 Show caught exception message in findAdv --- src/lyxfind.cpp |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index c728af1..ef4777b 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -4115,9 +4115,8 @@ bool findAdv(BufferView * bv, FindAndReplaceOptions const & opt) match_len = findForwardAdv(cur, matchAdv); else match_len = findBackwardsAdv(cur, matchAdv); - } catch (...) { - // This may only be raised by lyx::regex() - bv->message(_("Invalid regular expression!")); + } catch (exception & ex) { + bv->message(from_ascii(ex.what())); return false; } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Define keyboard codes for Cyrillic letters, enable shortcuts using them
commit a0b65e9bf830c5e46020fd6993474b1508245819 Author: Yuriy Skalko Date: Tue Sep 15 20:21:54 2020 +0300 Define keyboard codes for Cyrillic letters, enable shortcuts using them --- src/frontends/qt/GuiKeySymbol.cpp | 112 + 1 files changed, 112 insertions(+), 0 deletions(-) diff --git a/src/frontends/qt/GuiKeySymbol.cpp b/src/frontends/qt/GuiKeySymbol.cpp index 2cd2f61..c1882f7 100644 --- a/src/frontends/qt/GuiKeySymbol.cpp +++ b/src/frontends/qt/GuiKeySymbol.cpp @@ -354,6 +354,80 @@ static int string_to_qkey(std::string const & str) if (str == "Help") return Qt::Key_Help; if (str == "BackTab") return Qt::Key_Backtab; + // Keyboard codes for Cyrillic letters + if (str == "А") return 1040; + if (str == "Б") return 1041; + if (str == "В") return 1042; + if (str == "Г") return 1043; + if (str == "Д") return 1044; + if (str == "Е") return 1045; + if (str == "Є") return 1028; + if (str == "Ё") return 1025; + if (str == "Ж") return 1046; + if (str == "З") return 1047; + if (str == "И") return 1048; + if (str == "І") return 1030; + if (str == "Ї") return 1031; + if (str == "Й") return 1049; + if (str == "К") return 1050; + if (str == "Л") return 1051; + if (str == "М") return 1052; + if (str == "Н") return 1053; + if (str == "О") return 1054; + if (str == "П") return 1055; + if (str == "Р") return 1056; + if (str == "С") return 1057; + if (str == "Т") return 1058; + if (str == "У") return 1059; + if (str == "Ф") return 1060; + if (str == "Х") return 1061; + if (str == "Ц") return 1062; + if (str == "Ч") return 1063; + if (str == "Ш") return 1064; + if (str == "Щ") return 1065; + if (str == "Ъ") return 1066; + if (str == "Ы") return 1067; + if (str == "Ь") return 1068; + if (str == "Э") return 1069; + if (str == "Ю") return 1070; + if (str == "Я") return 1071; + if (str == "а") return 1040; + if (str == "б") return 1041; + if (str == "в") return 1042; + if (str == "г") return 1043; + if (str == "д") return 1044; + if (str == "е") return 1045; + if (str == "є") return 1028; + if (str == "ё") return 1025; + if (str == "ж") return 1046; + if (str == "з") return 1047; + if (str == "и") return 1048; + if (str == "і") return 1030; + if (str == "ї") return 1031; + if (str == "й") return 1049; + if (str == "к") return 1050; + if (str == "л") return 1051; + if (str == "м") return 1052; + if (str == "н") return 1053; + if (str == "о") return 1054; + if (str == "п") return 1055; + if (str == "р") return 1056; + if (str == "с") return 1057; + if (str == "т") return 1058; + if (str == "у") return 1059; + if (str == "ф") return 1060; + if (str == "х") return 1061; + if (str == "ц") return 1062; + if (str == "ч") return 1063; + if (str == "ш") return 1064; + if (str == "щ") return 1065; + if (str == "ъ") return 1066; + if (str == "ы") return 1067; + if (str == "ь") return 1068; + if (str == "э") return 1069; + if (str == "ю") return 1070; + if (str == "я") return 1071; + return Qt::Key_unknown; } @@ -574,6 +648,44 @@ static std::string const qkey_to_string(int lkey) case Qt::Key_Help: return "Help"; case Qt::Key_Backtab: return "BackTab"; + // Cyrillic + case 1040: return "а"; + case 1041: return "б"; + case 1042: return "в"; + case 1043: return "г"; + case 1044: return "д"; + case 1045: return "е"; + case 1028: return "є"; + case 1025: return "ё"; + case 1046: return "ж"; + case 1047: return "з"; + case 1048: return "и"; + case 1030: return "і"; + case 1031: return "ї"; + case 1049: return "й"; + case 1050: return "к"; + case 1051: return "л"; + case 1052: return "м"; + case 1053: return "н"; + case 1054: return "о"; + case 1055: return "п"; + case 1056: return "р"; + case 1057: return "с"; + case 1058: return "т"; + case 1059: return "у"; + case 1060: return "ф"; + case 1061: return "х"; + case 1062: return "ц"; + case 1063: return "ч"; + case 1064: return "ш"; + case 1065: return "щ"; + case 1066: return "ъ"; + case 1067: return "ы"; + case 1068: return "ь"; + case 1069: return "э"; + case 1070: return "ю"; + case 1071: return "я"; + default: case Qt::Key_unknown: return ""; } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Add bindings for Russian keyboard layout (same keys as English)
commit 4e92c34200326236dff2fd231b65ae2b9706ec02 Author: Yuriy Skalko Date: Fri Oct 9 17:51:51 2020 +0300 Add bindings for Russian keyboard layout (same keys as English) --- lib/Makefile.am|4 + lib/bind/ru/menus.bind | 271 2 files changed, 275 insertions(+), 0 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 752bef8..679f1a7 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -45,6 +45,10 @@ debinddir = $(pkgdatadir)/bind/de dist_debind_DATA = \ bind/de/menus.bind +rubinddir = $(pkgdatadir)/bind/ru +dist_rubind_DATA = \ + bind/ru/menus.bind + binddir = $(pkgdatadir)/bind dist_bind_DATA = \ bind/broadway.bind \ diff --git a/lib/bind/ru/menus.bind b/lib/bind/ru/menus.bind new file mode 100644 index 000..c535abe --- /dev/null +++ b/lib/bind/ru/menus.bind @@ -0,0 +1,271 @@ +# -*- text -*- + +# file ru/menus.bind +# This file is part of LyX, the document processor. +# Licence details can be found in the file COPYING. + +# author Lars Gullik Bjønnes +# author Jean-Marc Lasgouttes +# author Michael Gerz +# author Jürgen Vigna +# author Yuriy Skalko + +# Full author contact details are available in file CREDITS. + + +# +# Font size menu +# + +Format 5 + +\bind "M-s t" "font-size tiny" +\bind "M-s S-S""font-size footnotesize" +\bind "M-s s" "font-size small" +\bind "M-s n" "font-size normal" +\bind "M-s l" "font-size large" +\bind "M-s S-L""font-size larger" +\bind "M-s h" "font-size huge" +\bind "M-s S-H""font-size giant" + +\bind "M-ы е" "font-size tiny" +\bind "M-ы S-Ы""font-size footnotesize" +\bind "M-ы ы" "font-size small" +\bind "M-ы т" "font-size normal" +\bind "M-ы д" "font-size large" +\bind "M-ы S-Д""font-size larger" +\bind "M-ы р" "font-size huge" +\bind "M-ы S-Р""font-size giant" + +\bind "M-s ~S-1" "font-size tiny" +\bind "M-s ~S-2" "font-size scriptsize" +\bind "M-s ~S-3" "font-size footnotesize" +\bind "M-s ~S-4" "font-size small" +\bind "M-s ~S-5" "font-size normal" +\bind "M-s ~S-6" "font-size large" +\bind "M-s ~S-7" "font-size larger" +\bind "M-s ~S-8" "font-size largest" +\bind "M-s ~S-9" "font-size huge" +\bind "M-s ~S-0" "font-size giant" + +\bind "M-ы ~S-1" "font-size tiny" +\bind "M-ы ~S-2" "font-size scriptsize" +\bind "M-ы ~S-3" "font-size footnotesize" +\bind "M-ы ~S-4" "font-size small" +\bind "M-ы ~S-5" "font-size normal" +\bind "M-ы ~S-6" "font-size large" +\bind "M-ы ~S-7" "font-size larger" +\bind "M-ы ~S-8" "font-size largest" +\bind "M-ы ~S-9" "font-size huge" +\bind "M-ы ~S-0" "font-size giant" + +\bind "M-s ~S-plus""font-size increase" +\bind "M-s ~S-minus" "font-size decrease" + +\bind "M-ы ~S-plus""font-size increase" +\bind "M-ы ~S-minus" "font-size decrease" + + +# +# Paragraph menu +# + +\bind "M-a l" "paragraph-params \align left" +\bind "M-a r" "paragraph-params \align right" +\bind "M-a c" "paragraph-params \align center" +\bind "M-a j" "paragraph-params \align block" +\bind "M-a e" "paragraph-params \align default" +\bind "M-a i" "paragraph-params \indent-toggle" +\bind "M-a s" "paragraph-params \paragraph_spacing single" +\bind "M-a o" "paragraph-params \paragraph_spacing onehalf" +\bind "M-a d" "paragraph-params
[LyX/master] Replace deprecated std::result_of, make nod library compatible with C++20
commit a2c126f867e12ae166c64fd625101c3c49ee2933 Author: Yuriy Skalko Date: Wed Dec 30 01:35:25 2020 +0200 Replace deprecated std::result_of, make nod library compatible with C++20 --- 3rdparty/nod/nod.hpp |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/3rdparty/nod/nod.hpp b/3rdparty/nod/nod.hpp index 5c4a93c..4cc18fe 100644 --- a/3rdparty/nod/nod.hpp +++ b/3rdparty/nod/nod.hpp @@ -269,7 +269,11 @@ namespace nod { { public: /// Result type when calling the accumulating function operator. +#if __cplusplus >= 201703L + using result_type = typename std::invoke_result::type; +#else using result_type = typename std::result_of::type; +#endif /// Construct a signal_accumulator as a proxy to a given signal // -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update ru.po
commit 950eaae5e6928e7142fdced0e092259981cdc657 Author: Yuriy Skalko Date: Tue Dec 29 23:32:57 2020 +0200 Update ru.po --- po/ru.gmo | Bin 744841 -> 747001 bytes po/ru.po | 53 ++--- 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/po/ru.gmo b/po/ru.gmo index 247dd69..8885190 100644 Binary files a/po/ru.gmo and b/po/ru.gmo differ diff --git a/po/ru.po b/po/ru.po index 2d8b6c1..c222c67 100644 --- a/po/ru.po +++ b/po/ru.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: LyX 2.4\n" "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n" "POT-Creation-Date: 2020-12-29 12:04-0500\n" -"PO-Revision-Date: 2020-12-18 10:44+0200\n" +"PO-Revision-Date: 2020-12-29 23:31+0200\n" "Last-Translator: Yuriy Skalko \n" "Language-Team: Russian \n" "Language: ru\n" @@ -3540,9 +3540,8 @@ msgid "Lo label" msgstr "Самая длин&ная метка" #: src/frontends/qt/ui/ParagraphUi.ui:201 -#, fuzzy msgid " not indent paragraph" -msgstr "&Делать отступ в начале абзаца" +msgstr "Не делать отступ в начале абзаца" #: src/frontends/qt/ui/PhantomUi.ui:47 msgid "Horizontal and vertical space of the phantom content" @@ -3984,15 +3983,14 @@ msgstr "" "Редактировать математические макросы со списком параметров (как в LyX < 1.6)" #: src/frontends/qt/ui/PrefEditUi.ui:90 -#, fuzzy msgid "" "If this is checked, change tracking markup will not be resolved on copy/" "paste operations and when moving content from/to insets if change tracking " "is deactivated." msgstr "" -"Если этот флажок установлен, то удалённый и добавленный текст в режиме " -"отслеживания изменений будет сохраняться помеченным при выполнении операций " -"копирования/вставки и при перемещении содержимого во вставки / из вставок." +"Если этот флажок установлен, то удалённый и добавленный текст будет " +"сохраняться помеченным при его копировании/вставке и при перемещении " +"содержимого во вставки / из вставок при отключенном отслеживании изменений." #: src/frontends/qt/ui/PrefEditUi.ui:93 msgid " change tracking markup on copy and paste" @@ -19707,9 +19705,8 @@ msgid "End Editing Externally..." msgstr "Завершить внешнее редактирование..." #: lib/ui/stdcontext.inc:360 -#, fuzzy msgid "Split Inset|t" -msgstr "Развернуть вставку|Р" +msgstr "Разделить вставку|д" #: lib/ui/stdcontext.inc:362 msgid "Jump Back to Saved Bookmark|B" @@ -26369,9 +26366,8 @@ msgid "PDF (lower resolution)" msgstr "PDF (низкое разрешение)" #: lib/configure.py:754 -#, fuzzy msgid "PDF (DocBook)" -msgstr "PDF (docbook)" +msgstr "PDF (DocBook)" #: lib/configure.py:759 msgid "DVI" @@ -28032,19 +28028,16 @@ msgid "LaTeX text" msgstr "текст LaTeX" #: src/Color.cpp:258 -#, fuzzy msgid "Text label 1" -msgstr "метка рубрики" +msgstr "метка текста 1" #: src/Color.cpp:259 -#, fuzzy msgid "Text label 2" -msgstr "метка рубрики" +msgstr "метка текста 2" #: src/Color.cpp:260 -#, fuzzy msgid "Text label 3" -msgstr "метка рубрики" +msgstr "метка текста 3" #: src/Color.cpp:261 msgid "inline completion" @@ -29127,11 +29120,12 @@ msgid "LyX: Creating directory %1$s" msgstr "LyX: Создаётся каталог %1$s" #: src/LyX.cpp:1106 -#, fuzzy msgid "" "Failed to create directory. Perhaps wrong -userdir option?\n" "Exiting." -msgstr "Ошибка при создании каталога. Завершение работы." +msgstr "" +"Ошибка при создании каталога. Возможно неверный параметр -userdir?\n" +"Завершение работы." #: src/LyX.cpp:1179 msgid "List of supported debug flags:" @@ -30211,7 +30205,7 @@ msgstr "Обозначения" #: src/VCBackend.cpp:64 msgid "Perhaps the RCS package is not installed on your system?" -msgstr "" +msgstr "Возможно в системе не установлен пакет RCS?" #: src/VCBackend.cpp:65 src/VCBackend.cpp:874 src/VCBackend.cpp:879 #: src/VCBackend.cpp:928 src/VCBackend.cpp:987 src/VCBackend.cpp:1046 @@ -30870,9 +30864,8 @@ msgid "Opening help file %1$s..." msgstr "Открываем файл помощи %1$s..." #: src/frontends/qt/GuiApplication.cpp:1814 -#, fuzzy msgid "Syntax: set-color " -msgstr "Синтаксис: set-color " +msgstr "Синтаксис: set-color " #: src/frontends/qt/GuiApplication.cpp:1834 #, c-format @@ -33686,9 +33679,9 @@ msgid "auto" msgstr "автоматически" #: src/front
[LyX/master] Fix C++20 compilation on systems where char_type is wchar_t
commit cafa1d4ae4fca5abc72dfbb6d49014a48d538dd8 Author: Yuriy Skalko Date: Tue Dec 29 16:54:37 2020 +0200 Fix C++20 compilation on systems where char_type is wchar_t --- src/Buffer.cpp|2 +- src/Server.cpp|2 +- src/mathed/MathParser.cpp |4 ++-- src/tex2lyx/Parser.cpp|2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index ddce2db..3a6ae64 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1771,7 +1771,7 @@ Buffer::ExportStatus Buffer::makeLaTeXFile(FileName const & fname, catch (EncodingException const & e) { docstring const failed(1, e.failed_char); ostringstream oss; - oss << "0x" << hex << e.failed_char << dec; + oss << "0x" << hex << static_cast(e.failed_char) << dec; if (getParFromID(e.par_id).paragraph().layout().pass_thru) { docstring msg = bformat(_("Uncodable character '%1$s'" " (code point %2$s)"), diff --git a/src/Server.cpp b/src/Server.cpp index 6549228..e2e9d6a 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -866,7 +866,7 @@ int LyXComm::startPipe(string const & file, bool write) if (!write) { // Make sure not to call read_ready after destruction. weak_ptr tracker = tracker_.p(); - theApp()->registerSocketCallback(fd, [=](){ + theApp()->registerSocketCallback(fd, [this, tracker](){ if (!tracker.expired()) read_ready(); }); diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp index dd43dd9..478e906 100644 --- a/src/mathed/MathParser.cpp +++ b/src/mathed/MathParser.cpp @@ -370,9 +370,9 @@ ostream & operator<<(ostream & os, Token const & t) os << '\\' << to_utf8(cs); } else if (t.cat() == catLetter) - os << t.character(); + os << static_cast(t.character()); else - os << '[' << t.character() << ',' << t.cat() << ']'; + os << '[' << static_cast(t.character()) << ',' << t.cat() << ']'; return os; } diff --git a/src/tex2lyx/Parser.cpp b/src/tex2lyx/Parser.cpp index 67e0323..e4eb9b4 100644 --- a/src/tex2lyx/Parser.cpp +++ b/src/tex2lyx/Parser.cpp @@ -854,7 +854,7 @@ void Parser::tokenize_one() } case catIgnore: { - cerr << "ignoring a char: " << c << "\n"; + cerr << "ignoring a char: " << static_cast(c) << "\n"; break; } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Amend 3971b1b35e, also fix warnings for older compilers
commit d3ca28b468199408c5adb01c33cf0117469ad25c Author: Yuriy Skalko Date: Tue Dec 29 16:29:06 2020 +0200 Amend 3971b1b35e, also fix warnings for older compilers --- src/frontends/qt/GuiBibtex.cpp |2 +- src/frontends/qt/GuiCitation.cpp |2 +- src/frontends/qt/GuiDocument.cpp |2 +- src/frontends/qt/GuiLyXFiles.cpp |2 +- src/frontends/qt/GuiRef.cpp |2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt/GuiBibtex.cpp b/src/frontends/qt/GuiBibtex.cpp index 8d9e769..8a7ab3a 100644 --- a/src/frontends/qt/GuiBibtex.cpp +++ b/src/frontends/qt/GuiBibtex.cpp @@ -113,7 +113,7 @@ GuiBibtex::GuiBibtex(GuiView & lv) availableLV, SLOT(setFocus())); #else connect(filter_, ::downPressed, - availableLV, [=, this](){ focusAndHighlight(availableLV); }); + availableLV, [this](){ focusAndHighlight(availableLV); }); #endif availableLV->setToolTip(formatToolTip(qt_("This list consists of all databases that are indexed by LaTeX and thus are found without a file path. " diff --git a/src/frontends/qt/GuiCitation.cpp b/src/frontends/qt/GuiCitation.cpp index 1d89f20..fe8fe28 100644 --- a/src/frontends/qt/GuiCitation.cpp +++ b/src/frontends/qt/GuiCitation.cpp @@ -157,7 +157,7 @@ GuiCitation::GuiCitation(GuiView & lv) availableLV, SLOT(setFocus())); #else connect(filter_, ::downPressed, - availableLV, [=, this](){ focusAndHighlight(availableLV); }); + availableLV, [this](){ focusAndHighlight(availableLV); }); #endif connect(regexp_, SIGNAL(triggered()), this, SLOT(regexChanged())); diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp index 4b9bdff..4223771 100644 --- a/src/frontends/qt/GuiDocument.cpp +++ b/src/frontends/qt/GuiDocument.cpp @@ -1673,7 +1673,7 @@ GuiDocument::GuiDocument(GuiView & lv) modulesModule->availableLV, SLOT(setFocus())); #else connect(filter_, ::downPressed, - modulesModule->availableLV, [=, this](){ focusAndHighlight(modulesModule->availableLV); }); + modulesModule->availableLV, [this](){ focusAndHighlight(modulesModule->availableLV); }); #endif diff --git a/src/frontends/qt/GuiLyXFiles.cpp b/src/frontends/qt/GuiLyXFiles.cpp index 7859d48..00c2ea0 100644 --- a/src/frontends/qt/GuiLyXFiles.cpp +++ b/src/frontends/qt/GuiLyXFiles.cpp @@ -197,7 +197,7 @@ GuiLyXFiles::GuiLyXFiles(GuiView & lv) filesLW, SLOT(setFocus())); #else connect(filter_, ::downPressed, - filesLW, [=, this](){ focusAndHighlight(filesLW); }); + filesLW, [this](){ focusAndHighlight(filesLW); }); #endif filterBarL->addWidget(filter_, 0); diff --git a/src/frontends/qt/GuiRef.cpp b/src/frontends/qt/GuiRef.cpp index ccf2abf..0dddac6 100644 --- a/src/frontends/qt/GuiRef.cpp +++ b/src/frontends/qt/GuiRef.cpp @@ -67,7 +67,7 @@ GuiRef::GuiRef(GuiView & lv) refsTW, SLOT(setFocus())); #else connect(filter_, ::downPressed, - refsTW, [=, this](){ focusAndHighlight(refsTW); }); + refsTW, [this](){ focusAndHighlight(refsTW); }); #endif filterBarL->addWidget(filter_, 0); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Fix C++20 warning on implicit capture of this via [=]
commit 3971b1b35ef6325b7816c77941d2d95bcc497417 Author: Yuriy Skalko Date: Mon Dec 28 20:59:48 2020 +0200 Fix C++20 warning on implicit capture of this via [=] --- src/frontends/qt/GuiBibtex.cpp |2 +- src/frontends/qt/GuiCitation.cpp |2 +- src/frontends/qt/GuiDocument.cpp |2 +- src/frontends/qt/GuiLyXFiles.cpp |2 +- src/frontends/qt/GuiRef.cpp|2 +- src/graphics/GraphicsCacheItem.cpp |2 +- src/insets/InsetExternal.cpp |2 +- src/insets/InsetInclude.cpp|4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/frontends/qt/GuiBibtex.cpp b/src/frontends/qt/GuiBibtex.cpp index 66cff69..8d9e769 100644 --- a/src/frontends/qt/GuiBibtex.cpp +++ b/src/frontends/qt/GuiBibtex.cpp @@ -113,7 +113,7 @@ GuiBibtex::GuiBibtex(GuiView & lv) availableLV, SLOT(setFocus())); #else connect(filter_, ::downPressed, - availableLV, [=](){ focusAndHighlight(availableLV); }); + availableLV, [=, this](){ focusAndHighlight(availableLV); }); #endif availableLV->setToolTip(formatToolTip(qt_("This list consists of all databases that are indexed by LaTeX and thus are found without a file path. " diff --git a/src/frontends/qt/GuiCitation.cpp b/src/frontends/qt/GuiCitation.cpp index 20b4c34..1d89f20 100644 --- a/src/frontends/qt/GuiCitation.cpp +++ b/src/frontends/qt/GuiCitation.cpp @@ -157,7 +157,7 @@ GuiCitation::GuiCitation(GuiView & lv) availableLV, SLOT(setFocus())); #else connect(filter_, ::downPressed, - availableLV, [=](){ focusAndHighlight(availableLV); }); + availableLV, [=, this](){ focusAndHighlight(availableLV); }); #endif connect(regexp_, SIGNAL(triggered()), this, SLOT(regexChanged())); diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp index c21c3a0..4b9bdff 100644 --- a/src/frontends/qt/GuiDocument.cpp +++ b/src/frontends/qt/GuiDocument.cpp @@ -1673,7 +1673,7 @@ GuiDocument::GuiDocument(GuiView & lv) modulesModule->availableLV, SLOT(setFocus())); #else connect(filter_, ::downPressed, - modulesModule->availableLV, [=](){ focusAndHighlight(modulesModule->availableLV); }); + modulesModule->availableLV, [=, this](){ focusAndHighlight(modulesModule->availableLV); }); #endif diff --git a/src/frontends/qt/GuiLyXFiles.cpp b/src/frontends/qt/GuiLyXFiles.cpp index f14369a..7859d48 100644 --- a/src/frontends/qt/GuiLyXFiles.cpp +++ b/src/frontends/qt/GuiLyXFiles.cpp @@ -197,7 +197,7 @@ GuiLyXFiles::GuiLyXFiles(GuiView & lv) filesLW, SLOT(setFocus())); #else connect(filter_, ::downPressed, - filesLW, [=](){ focusAndHighlight(filesLW); }); + filesLW, [=, this](){ focusAndHighlight(filesLW); }); #endif filterBarL->addWidget(filter_, 0); diff --git a/src/frontends/qt/GuiRef.cpp b/src/frontends/qt/GuiRef.cpp index f16c656..ccf2abf 100644 --- a/src/frontends/qt/GuiRef.cpp +++ b/src/frontends/qt/GuiRef.cpp @@ -67,7 +67,7 @@ GuiRef::GuiRef(GuiView & lv) refsTW, SLOT(setFocus())); #else connect(filter_, ::downPressed, - refsTW, [=](){ focusAndHighlight(refsTW); }); + refsTW, [=, this](){ focusAndHighlight(refsTW); }); #endif filterBarL->addWidget(filter_, 0); diff --git a/src/graphics/GraphicsCacheItem.cpp b/src/graphics/GraphicsCacheItem.cpp index 918dc02..49132cc 100644 --- a/src/graphics/GraphicsCacheItem.cpp +++ b/src/graphics/GraphicsCacheItem.cpp @@ -220,7 +220,7 @@ void CacheItem::Impl::startMonitor() return; monitor_ = FileSystemWatcher::activeMonitor(filename_); // Disconnected at the same time as this is destroyed. - monitor_->connect([=](bool /* exists */){ startLoading(); }); + monitor_->connect([this](bool /* exists */){ startLoading(); }); } diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp index 7575702..92308db 100644 --- a/src/insets/InsetExternal.cpp +++ b/src/insets/InsetExternal.cpp @@ -648,7 +648,7 @@ void InsetExternal::updatePreview() const renderer_ = make_unique(this); RenderMonitoredPreview * preview_ptr = renderer_->asMonitoredPreview(); // This connection is closed at the same time as this is destroyed. - preview_ptr->connect([=]() { fileChanged(); }); + preview_ptr->connect([this]() { fileChanged(); }); add_preview_and_start_loading(*preview_ptr, *this, buffer()); break; } diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index ccee25f..71e9d38 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -185,7 +185,7 @@ InsetInclude::InsetInclude(Buffer * buf, Inset
[LyX/master] Use crc32 calculation from zlib instead of boost
commit 197ea63631d36aa3b781a61a3b70cff193788d29 Author: Yuriy Skalko Date: Sat Dec 26 21:23:44 2020 +0200 Use crc32 calculation from zlib instead of boost --- src/support/FileName.cpp |4 ++-- src/support/checksum.cpp | 25 + src/support/checksum.h |2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index 3d31c7d..5295741 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -608,8 +608,8 @@ unsigned long FileName::checksum() const return 0; } - char * beg = static_cast(mm); - char * end = beg + info.st_size; + unsigned char * beg = static_cast(mm); + unsigned char * end = beg + info.st_size; result = support::checksum(beg, end); diff --git a/src/support/checksum.cpp b/src/support/checksum.cpp index 79ef955..2249ad1 100644 --- a/src/support/checksum.cpp +++ b/src/support/checksum.cpp @@ -9,9 +9,10 @@ * Full author contact details are available in file CREDITS. */ +#include #include "support/checksum.h" -#include "boost/crc.hpp" -#include + +#include namespace lyx { @@ -19,9 +20,8 @@ namespace support { unsigned long checksum(std::string const & s) { - boost::crc_32_type crc; - crc.process_bytes(s.c_str(), s.size()); - return crc.checksum(); + auto p = reinterpret_cast(s.c_str()); + return crc32(0, p, s.size()); } unsigned long checksum(std::ifstream & ifs) @@ -29,16 +29,17 @@ unsigned long checksum(std::ifstream & ifs) std::istreambuf_iterator beg(ifs); std::istreambuf_iterator end; - boost::crc_32_type crc; - crc = for_each(beg, end, crc); - return crc.checksum(); + unsigned long sum = 0; + for (auto & it = beg; beg != end; ++it) { + unsigned char c = *it; + sum = crc32(sum, , 1); + } + return sum; } -unsigned long checksum(char const * beg, char const * end) +unsigned long checksum(unsigned char const * beg, unsigned char const * end) { - boost::crc_32_type crc; - crc.process_block(beg, end); - return crc.checksum(); + return crc32(0, beg, end - beg); } } // namespace support diff --git a/src/support/checksum.h b/src/support/checksum.h index ab14339..0533c57 100644 --- a/src/support/checksum.h +++ b/src/support/checksum.h @@ -21,7 +21,7 @@ namespace support { unsigned long checksum(std::string const & s); unsigned long checksum(std::ifstream & ifs); -unsigned long checksum(char const * beg, char const * end); +unsigned long checksum(unsigned char const * beg, unsigned char const * end); } // namespace support -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update Doxygen options to have more dependency graphs
commit 3e167f9fe72e0adcff49f87958a21a0c9a0b5d78 Author: Yuriy Skalko Date: Tue Dec 22 12:14:00 2020 +0200 Update Doxygen options to have more dependency graphs Now many graphs are not generated due to excessive dependencies (default node limit for one graph is 50). --- sourcedoc/Doxyfile.in |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sourcedoc/Doxyfile.in b/sourcedoc/Doxyfile.in index 921a2f6..ca52264 100644 --- a/sourcedoc/Doxyfile.in +++ b/sourcedoc/Doxyfile.in @@ -310,10 +310,9 @@ INPUT = @top_srcdir@/src # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp # *.h++ *.idl *.odl -FILE_PATTERNS = *.C \ +FILE_PATTERNS = *.cpp \ *.h \ - *.c \ -*.cpp + *.c # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. @@ -879,6 +878,8 @@ GENERATE_LEGEND= YES DOT_CLEANUP= YES +DOT_GRAPH_MAX_NODES= 200 + #--- # Configuration::addtions related to the search engine #--- -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Suppress unneeded git log output
commit d927e9343c4b51d5b81680d39c161f869a887b61 Author: Yuriy Skalko Date: Mon Dec 28 15:35:07 2020 +0200 Suppress unneeded git log output --- src/VCBackend.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index 48cb618..b20a586 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -1830,7 +1830,7 @@ bool GIT::findFile(FileName const & file) string const fname = onlyFileName(file.absFileName()); LYXERR(Debug::LYXVC, "LyXVC: Checking if file is under git control for `" << fname << '\''); - int const ret = doVCCommandCall("git log " + quoteName(fname), + int const ret = doVCCommandCall("git log -n 0 " + quoteName(fname), file.onlyPath()); bool const found = (ret == 0); LYXERR(Debug::LYXVC, "GIT control: " << (found ? "enabled" : "disabled")); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update Russian localization
commit dea8231b7bcacb5e8043ec1671955324914038a0 Author: Yuriy Skalko Date: Tue Dec 22 20:58:26 2020 +0200 Update Russian localization --- lib/doc/ru/Intro.lyx |2 +- lib/doc/ru/Math.lyx | 49 - po/ru.po | 16 3 files changed, 33 insertions(+), 34 deletions(-) diff --git a/lib/doc/ru/Intro.lyx b/lib/doc/ru/Intro.lyx index 998804c..0af9820 100644 --- a/lib/doc/ru/Intro.lyx +++ b/lib/doc/ru/Intro.lyx @@ -2489,7 +2489,7 @@ config.log \begin_layout Standard Документация по \SpecialChar LyX - охватывает всё его стороны; однако \SpecialChar LyX + охватывает все его стороны; однако \SpecialChar LyX находится в постоянной разработке, и каждый новый выпуск дополняется новыми возможностями. Возможно вы посчитаете, что некоторые части документации требуют улучшения. diff --git a/lib/doc/ru/Math.lyx b/lib/doc/ru/Math.lyx index 43df8cb..15238a3 100644 --- a/lib/doc/ru/Math.lyx +++ b/lib/doc/ru/Math.lyx @@ -811,7 +811,7 @@ text Текст в \SpecialChar LyX отображается черным цветом, и поэтому его можно отличить от других частей формулы, которые оформляются синим цветом. - В выводе математический текст устанавливается в прямом начертании, в отличие + В выводе математический текст отображается в прямом начертании, в отличие от других частей формулы. \end_layout @@ -5243,7 +5243,7 @@ arraystretch \backslash renewcommand{ \backslash -arraystretch}{коэффициент растяжения} +arraystretch}{коэффициент-растяжения} \begin_inset Index idx status collapsed @@ -5267,9 +5267,9 @@ renewcommand \series default назначает \series bold -коэффициент растяжения +коэффициент-растяжения \series default - предварительно определенной команде + ранее определенной команде \series bold \backslash @@ -5279,14 +5279,14 @@ arraystretch Для удвоения, например, расстояния между строками, используйте 2 в качестве значения этого коэффициента. Далее он будет использоваться для всех последующих матриц. - Чтобы вернуться к исходному параметру разделения строк, установите значение + Чтобы вернуться к исходному параметру разделения строк, задайте значение этого коэффициента для \series bold \backslash arraystretch \series default - в 1 указанным способом. + равным 1. \end_layout \begin_layout Standard @@ -12282,11 +12282,11 @@ mathsurround}{5mm} \end_layout \begin_layout Standard -После этого пробел в 5 +После этого вокруг всех обычных формул будет установлен пробел в 5 \begin_inset space \thinspace{} \end_inset -mm будет установлен вокруг всех обычных формул. +mm. \begin_inset ERT status collapsed @@ -14135,7 +14135,7 @@ cm, может также содержать формулы: \begin_layout Standard Такой блок создается щелчком правой кнопкой мыши на вставке серого поля. Появится диалоговое окно со свойствами блока. - Установки для приведенного примера: + Настройки для приведенного примера: \emph on Декорирование — \emph default @@ -17860,7 +17860,7 @@ status collapsed \end_layout \begin_layout Standard -Латинские буквы в формулах могут быть установлены в одном из следующих стилей +Латинские буквы в формулах могут быть набраны в одном из следующих стилей шрифта: \end_layout @@ -18421,7 +18421,7 @@ textrm \series default . То, что их стиль не может быть правильно установлен посредством диалога - по текстовому стилю, является ошибкой в \SpecialChar LyX + свойств текста, является ошибкой в \SpecialChar LyX \begin_inset Foot status collapsed @@ -19214,7 +19214,7 @@ arg "math-insert \\alpha" Все международные нормы по набору текста предполагают, что греческие буквы в математике должны быть набраны курсивом/наклонным шрифтом. В некоторых языках, таких как французский или русский, они, тем не менее, - иногда устанавливаются в прямом начертании. + иногда набираются в прямом начертании. \end_layout \begin_layout Subsection @@ -20648,8 +20648,8 @@ status collapsed \end_layout \begin_layout Standard -Греческие буквы не могут быть установлены с различными стилями шрифта, как - латинские буквы. +Греческие буквы не могут использовать различные стили шрифта, как латинские + буквы. Они могут быть выделены только шрифтом полужирной насыщенности командой \series bold @@ -26993,7 +26993,7 @@ textcircled \end_inset - все цифры и буквы могут быть установлены в круг, квази акцентированы кругом, + все цифры и буквы могут быть заключены в круг, квази акцентированы кругом, аналогично символу авторского права. \end_layout @@ -33887,8 +33887,8 @@ status collapsed \begin_layout Standard Отрицательные числа часто выглядят в формулах несогласованно, поскольку - знак минуса перед числом устанавливается такой же длины, что и у знака - оператора + знак минуса перед числом набирается такой же длины, что и у знака оператора + \begin_inset Quotes rld \end_inset @@ -36392,7 +36392,7 @@ reference "subsec:Predefined-Space" unittwo \series default . - При ее исп
[LyX/master] Move Trackable class to Server.h
commit d9e455b61ac7ce8340433754121e565697fd58d1 Author: Yuriy Skalko Date: Wed Dec 16 12:07:42 2020 +0200 Move Trackable class to Server.h --- src/Server.cpp|1 - src/Server.h | 20 +--- src/support/signals.h | 26 -- 3 files changed, 17 insertions(+), 30 deletions(-) diff --git a/src/Server.cpp b/src/Server.cpp index 8d9e0c6..6549228 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -55,7 +55,6 @@ #include "support/lassert.h" #include "support/lstrings.h" #include "support/os.h" -#include "support/signals.h" #include diff --git a/src/Server.h b/src/Server.h index b277284..2f26b8a 100644 --- a/src/Server.h +++ b/src/Server.h @@ -14,8 +14,7 @@ #ifndef SERVER_H #define SERVER_H -#include "support/signals.h" - +#include #include #ifdef _WIN32 @@ -30,6 +29,21 @@ namespace lyx { class Server; +/// A small utility to track the lifetime of an object. +class Trackable { +public: + Trackable() : p_(std::make_shared(0)) {} + Trackable(Trackable const &) : Trackable() {} + Trackable(Trackable &&) : Trackable() {} + Trackable & operator=(Trackable const &) { return *this; } + Trackable & operator=(Trackable &&) { return *this; } + // This weak pointer lets you know if the parent object has been destroyed + std::weak_ptr p() const { return p_; } +private: + std::shared_ptr const p_; +}; + + /** This class manages the pipes used for communicating with clients. Usage: Initialize with pipe-filename-base, client class to receive messages, and callback-function that will be called with the messages. @@ -191,7 +205,7 @@ private: bool deferred_loading_; /// Track object's liveness - support::Trackable tracker_; + Trackable tracker_; }; diff --git a/src/support/signals.h b/src/support/signals.h index 4b55663..269b206 100644 --- a/src/support/signals.h +++ b/src/support/signals.h @@ -14,38 +14,12 @@ #include -#include - namespace lyx { using nod::signal; using nod::connection; using nod::scoped_connection; -namespace support { - -/// A small utility to use with signals2::slot_type::track_foreign when the -/// parent object is not handled by a shared_ptr, or to track the lifetime of an -/// object. Using Trackable to track lifetimes is less thread-safe than tracking -/// their parents directly with a shared_ptr as recommended by signals2, but it -/// makes it easier for transitioning old code. (Essentially because Trackable -/// will not prevent the deletion of the parent by a concurrent thread.) -class Trackable { -public: - Trackable() : p_(std::make_shared(0)) {} - Trackable(Trackable const &) : Trackable() {} - Trackable(Trackable &&) : Trackable() {} - Trackable & operator=(Trackable const &) { return *this; } - Trackable & operator=(Trackable &&) { return *this; } - // This weak pointer lets you know if the parent object has been destroyed - std::weak_ptr p() const { return p_; } -private: - std::shared_ptr const p_; -}; - -} // namespace support - } // namespace lyx - #endif -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Merge namespace signals2 into namespace lyx
commit 4f0981e78d9d00490856daa3d35e170845d7 Author: Yuriy Skalko Date: Mon Dec 14 20:46:39 2020 +0200 Merge namespace signals2 into namespace lyx --- src/LaTeX.h|2 +- src/graphics/GraphicsCacheItem.cpp |4 ++-- src/graphics/GraphicsCacheItem.h |4 ++-- src/graphics/GraphicsConverter.cpp |4 ++-- src/graphics/GraphicsConverter.h |4 ++-- src/graphics/GraphicsLoader.cpp|6 +++--- src/graphics/GraphicsLoader.h |4 ++-- src/graphics/PreviewLoader.cpp |4 ++-- src/graphics/PreviewLoader.h |4 ++-- src/insets/RenderPreview.cpp |2 +- src/insets/RenderPreview.h |6 +++--- src/support/FileMonitor.cpp|2 +- src/support/FileMonitor.h |4 ++-- src/support/ForkedCalls.h |2 +- src/support/Timeout.h |2 +- src/support/signals.h |4 +++- 16 files changed, 30 insertions(+), 28 deletions(-) diff --git a/src/LaTeX.h b/src/LaTeX.h index 994fbe0..569114d 100644 --- a/src/LaTeX.h +++ b/src/LaTeX.h @@ -163,7 +163,7 @@ public: }; /// This signal emits an informative message - signals2::signal message; + signal message; /** diff --git a/src/graphics/GraphicsCacheItem.cpp b/src/graphics/GraphicsCacheItem.cpp index c72ac38..918dc02 100644 --- a/src/graphics/GraphicsCacheItem.cpp +++ b/src/graphics/GraphicsCacheItem.cpp @@ -119,7 +119,7 @@ public: ImageStatus status_; /// This signal is emitted when the image loading status changes. - signals2::signal statusChanged; + signal statusChanged; /// unique_ptr converter_; @@ -195,7 +195,7 @@ ImageStatus CacheItem::status() const } -signals2::connection CacheItem::connect(slot_type const & slot) const +connection CacheItem::connect(slot_type const & slot) const { return pimpl_->statusChanged.connect(slot); } diff --git a/src/graphics/GraphicsCacheItem.h b/src/graphics/GraphicsCacheItem.h index ba5efe6..a018b39 100644 --- a/src/graphics/GraphicsCacheItem.h +++ b/src/graphics/GraphicsCacheItem.h @@ -81,9 +81,9 @@ public: /** Connect and you'll be informed when the loading status of the image * changes. */ - typedef signals2::signal::slot_type slot_type; + typedef signal::slot_type slot_type; /// - signals2::connection connect(slot_type const &) const; + connection connect(slot_type const &) const; private: /// noncopyable diff --git a/src/graphics/GraphicsConverter.cpp b/src/graphics/GraphicsConverter.cpp index 66e198a..c97e766 100644 --- a/src/graphics/GraphicsConverter.cpp +++ b/src/graphics/GraphicsConverter.cpp @@ -55,7 +55,7 @@ public: /** At the end of the conversion process inform the outside world * by emitting a signal. */ - typedef signals2::signal sig; + typedef signal sig; /// sig finishedConversion; @@ -96,7 +96,7 @@ void Converter::startConversion() const } -signals2::connection Converter::connect(slot_type const & slot) const +connection Converter::connect(slot_type const & slot) const { return pimpl_->finishedConversion.connect(slot); } diff --git a/src/graphics/GraphicsConverter.h b/src/graphics/GraphicsConverter.h index 7eb3689..582c3f0 100644 --- a/src/graphics/GraphicsConverter.h +++ b/src/graphics/GraphicsConverter.h @@ -48,10 +48,10 @@ public: * If the conversion is successful, then the listener is passed \c true. * The connection is closed when this is destroyed. */ - typedef signals2::signal sig_type; + typedef signal sig_type; typedef sig_type::slot_type slot_type; /// - signals2::connection connect(slot_type const &) const; + connection connect(slot_type const &) const; /** If the conversion is successful, this returns the name of the * resulting file. diff --git a/src/graphics/GraphicsLoader.cpp b/src/graphics/GraphicsLoader.cpp index 2316a4a..b375c0e 100644 --- a/src/graphics/GraphicsLoader.cpp +++ b/src/graphics/GraphicsLoader.cpp @@ -192,9 +192,9 @@ public: /// We modify a local copy of the image once it is loaded. ImagePtr image_; /// This signal is emitted when the image loading status changes. - signals2::signal signal_; + signal signal_; /// The connection of the signal statusChanged - signals2::scoped_connection connection_; + scoped_connection connection_; double displayPixelRatio() const { @@ -364,7 +364,7 @@ void Loader::setDisplayPixelRatio(double scale) } -signals2::connection Loader::connect(slot const & slot) const +connection Loader::connect(slot const & slot) const { return pimpl_->signal_.connect(slot); } diff --git a/src/graphics/GraphicsLoader.h b/src/graphics/GraphicsLoader.h
[LyX/master] Update Russian localization
commit b89910af0faf07a8cab46ac4cd64b9e6fca2 Author: Yuriy Skalko Date: Thu Nov 26 20:00:48 2020 +0200 Update Russian localization --- lib/doc/ru/UserGuide.lyx | 149 - po/ru.po | 20 +++--- 2 files changed, 142 insertions(+), 27 deletions(-) diff --git a/lib/doc/ru/UserGuide.lyx b/lib/doc/ru/UserGuide.lyx index 9954005..cad1507 100644 --- a/lib/doc/ru/UserGuide.lyx +++ b/lib/doc/ru/UserGuide.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 599 +\lyxformat 600 \begin_document \begin_header \save_transient_properties true @@ -12028,6 +12028,40 @@ status collapsed одну страницу. \end_layout +\begin_layout Subsubsection +Запрет разрыва страницы +\begin_inset CommandInset label +LatexCommand label +name "subsec:Suppressing-Page-Breaks" + +\end_inset + + +\begin_inset Index idx +status collapsed + +\begin_layout Plain Layout +Разрыв страницы ! запрет +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +Для этого используйте +\family sans +Вставка\SpecialChar menuseparator +Форматирование\SpecialChar menuseparator +Запрет разрыва страницы +\family default +. + Обычно это полезно для абзацев, которые должны отображаться рядом, а также + если вы хотите видеть описания таблиц и рисунков вместе с самими таблицами + или рисунками, если не подходит использование плавающих объектов. +\end_layout + \begin_layout Subsection Принудительные разрывы строк \begin_inset Index idx @@ -17150,7 +17184,7 @@ status collapsed (обратите внимание, что \SpecialChar LyX делает разумное предположение для выбранного основного языка). - Существует 14 вариантов: + Существует 15 вариантов: \end_layout \begin_layout Labeling @@ -17747,6 +17781,54 @@ status collapsed \labelwidthstring <> and <>: \family sans +\begin_inset Quotes hld +\end_inset + +Внешние +\begin_inset Quotes hrd +\end_inset + + +\begin_inset space ~ +\end_inset + +и +\begin_inset space ~ +\end_inset + + +\begin_inset Quotes hls +\end_inset + +внутренние +\begin_inset Quotes hrs +\end_inset + + +\family default + Производит +\begin_inset Quotes hld +\end_inset + +эти внешние +\begin_inset Quotes hrd +\end_inset + + и +\begin_inset Quotes hls +\end_inset + +эти внутренние +\begin_inset Quotes hrs +\end_inset + + кавычки (как принято, например, в Венгрии) +\end_layout + +\begin_layout Labeling +\labelwidthstring <> and <>: + +\family sans \begin_inset Formula $\lceil$ \end_inset @@ -36885,7 +36967,10 @@ status collapsed панелей инструментов. Все панели инструментов и командная строка могут быть включены или выключены. Включенное состояние обозначается в меню галочкой. - Панели инструментов +\end_layout + +\begin_layout Standard +Панели инструментов \family sans Таблица \family default @@ -36895,22 +36980,22 @@ status collapsed \family default , \family sans -Математические макросы +Математические панели \family default , \family sans -Рецензирование +Математические макросы \family default - и +, \family sans -Математические панели +Фонетические символы \family default - могут быть дополнительно установлены в автоматическое состояние, обозначенное - в меню суффиксом +, \family sans -(автоматически) +Рецензирование \family default -. + могут быть дополнительно установлены в автоматическое состояние. + Их текущее состояние показывается в соответствующем подменю. \end_layout \begin_layout Standard @@ -36918,15 +37003,16 @@ status collapsed \shape italic включенном \shape default - состоянии панель инструментов отображается постоянно; в + состоянии панель инструментов отображается постоянно; в выключенном состоянии + — не отображается; в \shape italic автоматическом \shape default - режиме панель инструментов отображается только тогда, когда курсор находится - в определенном окружении или когда активирована определенная функция. - Это означает, например, что панель инструментов рецензирования будет отображать -ся только при включенном отслеживании изменений, а панели инструментов формул - и таблиц — если курсор находится внутри формулы или таблицы соответственно. + состоянии — отображается только тогда, когда курсор находится в определенном + окружении или когда активирована определенная функция. + Это означает, например, что панель рецензирования будет отображаться только + при включенном отслеживании изменений, а панели формул и таблиц — если + курсор находится внутри формулы или таблицы соответственно. \end_layout \begin_layout Standard @@ -37660,6 +37746,35 @@ reference "subsec:Forced-Page-Breaks" \end_layout \begin_layout Description +Запрет +\begin_inset space ~ +\end_inset + +разрыва +\begin_inset space ~ +\end_inset + +страницы Указывает \SpecialChar LaTeX + не допускать разрыв страницы в текущей позиции. + См. + подраздел +\begin_inset space ~ +\end_inset + + +\begin_inset CommandInset ref +LatexCommand re
[LyX/master] Remove useless declaration
commit cbd1b3a2d47b34d81b7c8e63ffbddadac4c32d7f Author: Yuriy Skalko Date: Tue Dec 15 09:25:28 2020 +0200 Remove useless declaration --- src/support/Timeout.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/support/Timeout.h b/src/support/Timeout.h index eef78db..cf15a58 100644 --- a/src/support/Timeout.h +++ b/src/support/Timeout.h @@ -55,8 +55,6 @@ private: /// class Impl; /// - friend class Impl; - /// Impl * const pimpl_; /// one-shot or repeating Type type; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Amend bda4570, remove BOM
commit c6b56ff200850c6cbd345db162928133adcd0ccf Author: Yuriy Skalko Date: Mon Dec 14 00:51:26 2020 +0200 Amend bda4570, remove BOM --- 3rdparty/nod/Makefile.am |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/3rdparty/nod/Makefile.am b/3rdparty/nod/Makefile.am index 07caaa4..d1285c4 100644 --- a/3rdparty/nod/Makefile.am +++ b/3rdparty/nod/Makefile.am @@ -1,4 +1,4 @@ -include $(top_srcdir)/config/common.am +include $(top_srcdir)/config/common.am EXTRA_DIST = nod \ README.md -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Use new signal library `nod` instead of `boost::signals2`
commit bda45704005d6b328e18457a07d05e56883c2874 Author: Yuriy Skalko Date: Sun Dec 13 23:06:05 2020 +0200 Use new signal library `nod` instead of `boost::signals2` Thanks Enrico for updating autotools files. 3rdparty/Makefile.am |8 +- 3rdparty/nod/Makefile.am |4 + 3rdparty/nod/README.md | 257 ++ 3rdparty/nod/nod.hpp | 680 CMakeLists.txt |2 + config/lyxinclude.m4 | 28 ++ configure.ac |2 + src/Makefile.am|2 +- src/Server.cpp |8 +- src/client/Makefile.am |2 +- src/frontends/Makefile.am |2 +- src/frontends/qt/Makefile.am |2 +- src/graphics/GraphicsConverter.cpp | 27 +- src/graphics/GraphicsConverter.h |6 +- src/graphics/GraphicsLoader.cpp|1 + src/graphics/PreviewLoader.cpp | 19 +- src/graphics/PreviewLoader.h |7 +- src/support/ForkedCalls.cpp|2 + src/support/Makefile.am|2 +- src/support/signals.h |4 +- src/tex2lyx/Makefile.am|2 +- 21 files changed, 1020 insertions(+), 47 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Remove unnecessary `c_str`
commit 5999dd96e64c707339c7cd05b81956017080fbb3 Author: Yuriy Skalko Date: Thu Dec 10 14:32:55 2020 +0200 Remove unnecessary `c_str` --- src/graphics/PreviewLoader.cpp |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index 63ddd43..d0590f6 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -380,8 +380,8 @@ PreviewLoader::Impl::Impl(PreviewLoader & p, Buffer const & b) { font_scaling_factor_ = int(buffer_.fontScalingFactor()); if (theApp()) { - fg_color_ = convert(theApp()->hexName(foregroundColor()).c_str(), 16); - bg_color_ = convert(theApp()->hexName(backgroundColor()).c_str(), 16); + fg_color_ = convert(theApp()->hexName(foregroundColor()), 16); + bg_color_ = convert(theApp()->hexName(backgroundColor()), 16); } else { fg_color_ = 0x0; bg_color_ = 0xff; @@ -444,8 +444,8 @@ PreviewLoader::Impl::preview(string const & latex_snippet) const int fg = 0x0; int bg = 0xff; if (theApp()) { - fg = convert(theApp()->hexName(foregroundColor()).c_str(), 16); - bg = convert(theApp()->hexName(backgroundColor()).c_str(), 16); + fg = convert(theApp()->hexName(foregroundColor()), 16); + bg = convert(theApp()->hexName(backgroundColor()), 16); } if (font_scaling_factor_ != fs || fg_color_ != fg || bg_color_ != bg) { // Schedule refresh of all previews on zoom or color changes. -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Use `to_string` instead of `boost::lexical_cast`
commit 9348c5c63521d5e2908e30b191afb1e703ff219a Author: Yuriy Skalko Date: Thu Dec 10 14:33:47 2020 +0200 Use `to_string` instead of `boost::lexical_cast` --- src/support/convert.cpp | 51 ++ 1 files changed, 16 insertions(+), 35 deletions(-) diff --git a/src/support/convert.cpp b/src/support/convert.cpp index 5912ac5..7053be3 100644 --- a/src/support/convert.cpp +++ b/src/support/convert.cpp @@ -14,8 +14,6 @@ #include "support/convert.h" #include "support/docstring.h" -#include - #include #include //needed for Mac OSX 10.5.2 Leopard @@ -23,23 +21,6 @@ using namespace std; -namespace { - -// A version of lexical cast that does not throw. Useful for when we convert to string -template -To lexical_cast(From const & value, To const & defaultResult = To()) -{ - try { - return boost::lexical_cast(value); - } catch(...) { - // Ignore all exceptions and use default. - return defaultResult; - } -} - -} // namespace - - namespace lyx { template<> @@ -59,49 +40,49 @@ string convert(char c) template<> string convert(short unsigned int sui) { - return lexical_cast(sui); + return to_string(sui); } template<> string convert(int i) { - return lexical_cast(i); + return to_string(i); } template<> docstring convert(int i) { - return from_ascii(lexical_cast(i)); + return from_ascii(to_string(i)); } template<> string convert(unsigned int ui) { - return lexical_cast(ui); + return to_string(ui); } template<> docstring convert(unsigned int ui) { - return from_ascii(lexical_cast(ui)); + return from_ascii(to_string(ui)); } template<> string convert(unsigned long ul) { - return lexical_cast(ul); + return to_string(ul); } template<> docstring convert(unsigned long ul) { - return from_ascii(lexical_cast(ul)); + return from_ascii(to_string(ul)); } @@ -109,28 +90,28 @@ docstring convert(unsigned long ul) template<> string convert(unsigned long long ull) { - return lexical_cast(ull); + return to_string(ull); } template<> docstring convert(unsigned long long ull) { - return from_ascii(lexical_cast(ull)); + return from_ascii(to_string(ull)); } template<> string convert(long long ll) { - return lexical_cast(ll); + return to_string(ll); } template<> docstring convert(long long ll) { - return from_ascii(lexical_cast(ll)); + return from_ascii(to_string(ll)); } @@ -154,21 +135,21 @@ long long convert(string const s) template<> string convert(long l) { - return lexical_cast(l); + return to_string(l); } template<> docstring convert(long l) { - return from_ascii(lexical_cast(l)); + return from_ascii(to_string(l)); } template<> string convert(float f) { - std::ostringstream val; + ostringstream val; val << f; return val.str(); } @@ -177,7 +158,7 @@ string convert(float f) template<> string convert(double d) { - std::ostringstream val; + ostringstream val; val << d; return val.str(); } @@ -197,7 +178,7 @@ int convert(string const s) } -int convert(std::string const & s, int base) +int convert(string const & s, int base) { return int(strtol(s.c_str(), nullptr, base)); } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Reduce the amount of needed boost headers
Great cleanup, Jean-Marc! Finally boost directory becomes less in size than main src directory :) Yuriy -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Move implementation details to constructors. Amend 78f457796c
commit ccbfd22f56258c39fbd7b8cac26a539c88c090ec Author: Yuriy Skalko Date: Sun Dec 6 18:01:09 2020 +0200 Move implementation details to constructors. Amend 78f457796c --- src/frontends/qt/DialogFactory.cpp | 22 +- src/frontends/qt/FindAndReplace.cpp |4 src/frontends/qt/GuiProgressView.h |2 +- src/frontends/qt/GuiSpellchecker.cpp |4 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/frontends/qt/DialogFactory.cpp b/src/frontends/qt/DialogFactory.cpp index e384841..62f6ab8 100644 --- a/src/frontends/qt/DialogFactory.cpp +++ b/src/frontends/qt/DialogFactory.cpp @@ -156,14 +156,8 @@ Dialog * createDialog(GuiView & gv, string const & name) return new GuiShowFile(gv); if (name == "findreplace") return new GuiSearch(gv); - if (name == "findreplaceadv") { - FindAndReplace * gui = new FindAndReplace(gv, Qt::RightDockWidgetArea); -#ifdef Q_OS_MAC - // On Mac show and floating - gui->setFloating(true); -#endif - return gui; - } + if (name == "findreplaceadv") + return new FindAndReplace(gv); if (name == "graphics") return new GuiGraphics(gv); if (name == "include") @@ -194,14 +188,8 @@ Dialog * createDialog(GuiView & gv, string const & name) return new GuiRef(gv); if (name == "sendto") return new GuiSendTo(gv); - if (name == "spellchecker") { - GuiSpellchecker * gui = new GuiSpellchecker(gv, Qt::RightDockWidgetArea); -#ifdef Q_OS_MAC - // On Mac show and floating - gui->setFloating(true); -#endif - return gui; - } + if (name == "spellchecker") + return new GuiSpellchecker(gv); if (name == "symbols") return new GuiSymbols(gv); if (name == "tabularcreate") @@ -217,7 +205,7 @@ Dialog * createDialog(GuiView & gv, string const & name) if (name == "wrap") return new GuiWrap(gv); if (name == "progress") - return new GuiProgressView(gv, Qt::BottomDockWidgetArea); + return new GuiProgressView(gv); return nullptr; } diff --git a/src/frontends/qt/FindAndReplace.cpp b/src/frontends/qt/FindAndReplace.cpp index fcfa6bd..b378f46 100644 --- a/src/frontends/qt/FindAndReplace.cpp +++ b/src/frontends/qt/FindAndReplace.cpp @@ -588,6 +588,10 @@ FindAndReplace::FindAndReplace(GuiView & parent, widget_ = new FindAndReplaceWidget(parent); setWidget(widget_); setFocusProxy(widget_); +#ifdef Q_OS_MAC + // On Mac show and floating + setFloating(true); +#endif connect(this, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)), widget_, SLOT(dockLocationChanged(Qt::DockWidgetArea))); diff --git a/src/frontends/qt/GuiProgressView.h b/src/frontends/qt/GuiProgressView.h index 4ea4efc..1a722b3 100644 --- a/src/frontends/qt/GuiProgressView.h +++ b/src/frontends/qt/GuiProgressView.h @@ -46,7 +46,7 @@ class GuiProgressView : public DockView public: GuiProgressView( GuiView & parent, ///< the main window where to dock. - Qt::DockWidgetArea area, ///< Position of the dock (and also drawer) + Qt::DockWidgetArea area = Qt::BottomDockWidgetArea, ///< Position of the dock (and also drawer) Qt::WindowFlags flags = 0); ~GuiProgressView(); diff --git a/src/frontends/qt/GuiSpellchecker.cpp b/src/frontends/qt/GuiSpellchecker.cpp index 7fc1155..9fcf20c 100644 --- a/src/frontends/qt/GuiSpellchecker.cpp +++ b/src/frontends/qt/GuiSpellchecker.cpp @@ -598,6 +598,10 @@ GuiSpellchecker::GuiSpellchecker(GuiView & parent, widget_ = new SpellcheckerWidget(, this); setWidget(widget_); setFocusProxy(widget_); +#ifdef Q_OS_MAC + // On Mac show and floating + setFloating(true); +#endif } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] More enums & includes refactoring
commit e292dd70bf615d5dcc6b20a581ba1b71db0ee4a8 Author: Yuriy Skalko Date: Wed Dec 2 22:34:28 2020 +0200 More enums & includes refactoring --- src/Changes.cpp |1 + src/Changes.h |3 +- src/Cursor.cpp |1 + src/Layout.cpp |3 -- src/ParagraphMetrics.cpp|1 - src/Text.cpp|4 +-- src/Text3.cpp |6 ++-- src/frontends/qt/FindAndReplace.cpp |4 -- src/frontends/qt/GuiParagraph.cpp |1 + src/frontends/qt/GuiToolbar.cpp |6 ++-- src/frontends/qt/Menus.cpp | 10 +++--- src/frontends/qt/qt_helpers.cpp | 13 +--- src/insets/Inset.cpp|7 src/insets/Inset.h |4 +- src/insets/InsetArgument.cpp|9 +++-- src/insets/InsetArgument.h |4 +- src/insets/InsetBranch.cpp |2 +- src/insets/InsetCollapsible.cpp | 50 +++ src/insets/InsetCollapsible.h | 15 + src/insets/InsetERT.cpp |7 ++-- src/insets/InsetFlex.cpp| 14 src/insets/InsetFlex.h |3 +- src/insets/InsetIPAMacro.cpp|3 +- src/insets/InsetLayout.cpp | 38 src/insets/InsetLayout.h| 56 ++- src/insets/InsetListings.cpp|8 ++--- src/insets/InsetNomencl.cpp |1 + src/insets/InsetNote.cpp|5 +-- src/insets/InsetQuotes.h|2 +- src/insets/InsetScript.h|1 + src/insets/InsetText.cpp| 43 +++ src/insets/InsetText.h | 14 - src/mathed/InsetMathSize.h |1 + src/mathed/MathFactory.cpp |1 + src/output_latex.h |1 - src/tex2lyx/tex2lyx.cpp |1 - 36 files changed, 196 insertions(+), 147 deletions(-) diff --git a/src/Changes.cpp b/src/Changes.cpp index e1c7515..33209af 100644 --- a/src/Changes.cpp +++ b/src/Changes.cpp @@ -17,6 +17,7 @@ #include "Author.h" #include "Buffer.h" #include "BufferParams.h" +#include "Color.h" #include "Encoding.h" #include "LyXRC.h" #include "MetricsInfo.h" diff --git a/src/Changes.h b/src/Changes.h index da9fef2..d538875 100644 --- a/src/Changes.h +++ b/src/Changes.h @@ -15,8 +15,6 @@ #ifndef CHANGES_H #define CHANGES_H -#include "Color.h" - #include "support/strfwd.h" #include "support/types.h" #include "support/lyxtime.h" @@ -28,6 +26,7 @@ namespace lyx { class AuthorList; class Buffer; +class Color; class DocIterator; class FontInfo; class OutputParams; diff --git a/src/Cursor.cpp b/src/Cursor.cpp index ee54ace..b250b7b 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -38,6 +38,7 @@ #include "support/gettext.h" #include "support/lassert.h" +#include "insets/InsetLayout.h" #include "insets/InsetTabular.h" #include "mathed/InsetMath.h" diff --git a/src/Layout.cpp b/src/Layout.cpp index 63a5dc4..79a2e7b 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -13,8 +13,6 @@ #include #include "Layout.h" -#include "FontInfo.h" -#include "Language.h" #include "Lexer.h" #include "output_xhtml.h" #include "TextClass.h" @@ -23,7 +21,6 @@ #include "support/docstream.h" #include "support/lassert.h" #include "support/lstrings.h" -#include "support/Messages.h" #include "support/textutils.h" diff --git a/src/ParagraphMetrics.cpp b/src/ParagraphMetrics.cpp index 86a3144..46f2edc 100644 --- a/src/ParagraphMetrics.cpp +++ b/src/ParagraphMetrics.cpp @@ -26,7 +26,6 @@ #include "Layout.h" #include "LayoutEnums.h" #include "Paragraph.h" -#include "Row.h" #include "TextClass.h" #include "frontends/FontMetrics.h" diff --git a/src/Text.cpp b/src/Text.cpp index 0bb66f6..d1e0d9a 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -29,7 +29,6 @@ #include "Cursor.h" #include "CursorSlice.h" #include "CutAndPaste.h" -#include "DispatchResult.h" #include "Encoding.h" #include "ErrorList.h" #include "factory.h" @@ -43,7 +42,6 @@ #include "ParagraphParameters.h" #include "TextClass.h" #include "TextMetrics.h" -#include "Undo.h" #include "WordList.h" #include "insets/Inset.h" @@ -2044,7 +2042,7 @@ docstring Text::currentState(CursorData const & cur, bool devel_mode) const // Custom text style InsetLayout const & layout = cur.inset().g
[LyX/master] Use range-based for loops
commit 3e7ccc367a0c670cfa324725b440f2c9cb3d7f07 Author: Yuriy Skalko Date: Thu Dec 3 21:51:25 2020 +0200 Use range-based for loops --- src/LaTeXFeatures.cpp | 29 ++--- 1 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 7c23a85..95a1a6d 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -1229,14 +1229,10 @@ string const LaTeXFeatures::getPackageOptions() const { ostringstream packageopts; // Output all the package option stuff we have been asked to do. - map::const_iterator it = - params_.documentClass().packageOptions().begin(); - map::const_iterator en = - params_.documentClass().packageOptions().end(); - for (; it != en; ++it) - if (mustProvide(it->first)) - packageopts << "\\PassOptionsToPackage{" << it->second << "}" -<< "{" << it->first << "}\n"; + for (auto const & p : params_.documentClass().packageOptions()) + if (mustProvide(p.first)) + packageopts << "\\PassOptionsToPackage{" << p.second << "}" +<< "{" << p.first << "}\n"; return packageopts.str(); } @@ -2215,10 +2211,8 @@ void LaTeXFeatures::getFloatDefinitions(otexstream & os) const // \newfloat{algorithm}{htbp}{loa} // \providecommand{\algorithmname}{Algorithm} // \floatname{algorithm}{\protect\algorithmname} - UsedFloats::const_iterator cit = usedFloats_.begin(); - UsedFloats::const_iterator end = usedFloats_.end(); - for (; cit != end; ++cit) { - Floating const & fl = floats.getType(cit->first); + for (auto const & cit : usedFloats_) { + Floating const & fl = floats.getType(cit.first); // For builtin floats we do nothing. if (fl.isPredefined()) @@ -2267,7 +2261,7 @@ void LaTeXFeatures::getFloatDefinitions(otexstream & os) const // used several times, when the same style is still in // effect. (Lgb) } - if (cit->second) + if (cit.second) // The subfig package is loaded later os << "\n\\AtBeginDocument{\\newsubfloat{" << from_ascii(fl.floattype()) << "}}\n"; } @@ -2312,13 +2306,10 @@ void LaTeXFeatures::expandMultiples() { for (Features::iterator it = features_.begin(); it != features_.end();) { if (contains(*it, ',')) { - vector const multiples = getVectorFromString(*it, ","); - vector::const_iterator const end = multiples.end(); - vector::const_iterator itm = multiples.begin(); // Do nothing if any multiple is already required - for (; itm != end; ++itm) { - if (!isRequired(*itm)) - require(*itm); + for (string const & pkg : getVectorFromString(*it, ",")) { + if (!isRequired(pkg)) + require(pkg); } features_.erase(it); it = features_.begin(); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Implement proper Dialog factory instead of implicit link-time dependencies
commit 78f457796c87bd86a10c7b24bf70f9bf60894f4f Author: Yuriy Skalko Date: Thu Dec 3 19:41:52 2020 +0200 Implement proper Dialog factory instead of implicit link-time dependencies --- src/frontends/qt/DialogFactory.cpp | 227 src/frontends/qt/DialogFactory.h | 30 src/frontends/qt/FindAndReplace.cpp| 11 -- src/frontends/qt/GuiAbout.cpp |3 - src/frontends/qt/GuiBibtex.cpp |3 - src/frontends/qt/GuiChanges.cpp|3 - src/frontends/qt/GuiCharacter.cpp |3 - src/frontends/qt/GuiCitation.cpp |3 - src/frontends/qt/GuiCompare.cpp|2 - src/frontends/qt/GuiCompareHistory.cpp |3 - src/frontends/qt/GuiDelimiter.cpp |3 - src/frontends/qt/GuiDocument.cpp |4 - src/frontends/qt/GuiErrorList.cpp |2 - src/frontends/qt/GuiExternal.cpp |3 - src/frontends/qt/GuiGraphics.cpp |3 - src/frontends/qt/GuiInclude.cpp|3 - src/frontends/qt/GuiIndex.cpp |3 - src/frontends/qt/GuiListings.cpp |3 - src/frontends/qt/GuiLog.cpp|3 - src/frontends/qt/GuiLyXFiles.cpp |2 - src/frontends/qt/GuiMathMatrix.cpp |3 - src/frontends/qt/GuiNote.cpp |3 - src/frontends/qt/GuiParagraph.cpp |6 - src/frontends/qt/GuiPhantom.cpp|3 - src/frontends/qt/GuiPrefs.cpp |3 - src/frontends/qt/GuiPrintindex.cpp |3 - src/frontends/qt/GuiProgressView.cpp |7 - src/frontends/qt/GuiRef.cpp|4 - src/frontends/qt/GuiSearch.cpp |3 - src/frontends/qt/GuiSendto.cpp |2 - src/frontends/qt/GuiShowFile.cpp |3 - src/frontends/qt/GuiSpellchecker.cpp | 10 -- src/frontends/qt/GuiSymbols.cpp|6 - src/frontends/qt/GuiTabularCreate.cpp |6 - src/frontends/qt/GuiTexinfo.cpp|3 - src/frontends/qt/GuiThesaurus.cpp |3 - src/frontends/qt/GuiToc.cpp|6 - src/frontends/qt/GuiView.cpp | 127 +-- src/frontends/qt/GuiViewSource.cpp |6 - src/frontends/qt/GuiWrap.cpp |3 - src/frontends/qt/InsetParamsDialog.cpp | 66 - src/frontends/qt/Makefile.am |4 +- 42 files changed, 262 insertions(+), 335 deletions(-) diff --git a/src/frontends/qt/DialogFactory.cpp b/src/frontends/qt/DialogFactory.cpp new file mode 100644 index 000..e384841 --- /dev/null +++ b/src/frontends/qt/DialogFactory.cpp @@ -0,0 +1,227 @@ +/** + * \file DialogFactory.cpp + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Yuriy Skalko + * + * Full author contact details are available in file CREDITS. + */ + +#include + +#include "DialogFactory.h" +#include "FindAndReplace.h" +#include "GuiAbout.h" +#include "GuiBibitem.h" +#include "GuiBibtex.h" +#include "GuiBox.h" +#include "GuiBranch.h" +#include "GuiChanges.h" +#include "GuiCharacter.h" +#include "GuiCitation.h" +#include "GuiCompare.h" +#include "GuiCompareHistory.h" +#include "GuiCounter.h" +#include "GuiDelimiter.h" +#include "GuiDocument.h" +#include "GuiErrorList.h" +#include "GuiERT.h" +#include "GuiExternal.h" +#include "FloatPlacement.h" +#include "GuiGraphics.h" +#include "GuiHSpace.h" +#include "GuiHyperlink.h" +#include "GuiInclude.h" +#include "GuiIndex.h" +#include "GuiInfo.h" +#include "GuiLabel.h" +#include "GuiLine.h" +#include "GuiListings.h" +#include "GuiLog.h" +#include "GuiLyXFiles.h" +#include "GuiMathMatrix.h" +#include "GuiNomenclature.h" +#include "GuiNote.h" +#include "GuiParagraph.h" +#include "GuiPhantom.h" +#include "GuiPrefs.h" +#include "GuiPrintindex.h" +#include "GuiPrintNomencl.h" +#include "GuiProgressView.h" +#include "GuiRef.h" +#include "GuiSearch.h" +#include "GuiSendto.h" +#include "GuiShowFile.h" +#include "GuiSpellchecker.h" +#include "GuiSymbols.h" +#include "GuiTabular.h" +#include "GuiTabularCreate.h" +#include "GuiTexinfo.h" +#include "GuiThesaurus.h" +#include "GuiToc.h" +#include "GuiViewSource.h" +#include "GuiVSpace.h" +#include "GuiWrap.h" + +#include "insets/Inset.h" +#include "InsetParamsDialog.h" +#include "InsetParamsWidget.h" + +using namespace std; + +namespace lyx { +namespace frontend { + + +Dialog * createDialog(GuiView & gv, string const & name) +{ + InsetParam
[LyX/master] Simplify FuncRequest constructors
commit 1dd676bed1eef3b60011fe68a1c8e5714d1fb4e1 Author: Yuriy Skalko Date: Wed Dec 2 14:23:01 2020 +0200 Simplify FuncRequest constructors --- src/FuncRequest.cpp | 22 -- src/FuncRequest.h | 16 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/src/FuncRequest.cpp b/src/FuncRequest.cpp index 0d6a487..25ea41a 100644 --- a/src/FuncRequest.cpp +++ b/src/FuncRequest.cpp @@ -30,41 +30,35 @@ FuncRequest const FuncRequest::unknown(LFUN_UNKNOWN_ACTION); FuncRequest const FuncRequest::noaction(LFUN_NOACTION); FuncRequest::FuncRequest(Origin o) - : action_(LFUN_NOACTION), origin_(o), view_origin_(nullptr), x_(0), y_(0), - button_(mouse_button::none), modifier_(NoModifier), allow_async_(true) + : origin_(o) {} FuncRequest::FuncRequest(FuncCode act, Origin o) - : action_(act), origin_(o), view_origin_(nullptr), x_(0), y_(0), - button_(mouse_button::none), modifier_(NoModifier), allow_async_(true) + : action_(act), origin_(o) {} FuncRequest::FuncRequest(FuncCode act, docstring const & arg, Origin o) - : action_(act), argument_(arg), origin_(o), view_origin_(nullptr), x_(0), y_(0), - button_(mouse_button::none), modifier_(NoModifier), allow_async_(true) + : action_(act), argument_(arg), origin_(o) {} FuncRequest::FuncRequest(FuncCode act, string const & arg, Origin o) - : action_(act), argument_(from_utf8(arg)), - origin_(o), view_origin_(nullptr), x_(0), y_(0), - button_(mouse_button::none), modifier_(NoModifier), allow_async_(true) + : FuncRequest(act, from_utf8(arg), o) {} FuncRequest::FuncRequest(FuncCode act, int ax, int ay, mouse_button::state button, KeyModifier modifier, Origin o) - : action_(act), origin_(o), view_origin_(nullptr), x_(ax), y_(ay), - button_(button), modifier_(modifier), allow_async_(true) + : action_(act), origin_(o), + x_(ax), y_(ay), button_(button), modifier_(modifier) {} FuncRequest::FuncRequest(FuncRequest const & cmd, docstring const & arg, Origin o) - : action_(cmd.action()), argument_(arg), - origin_(o), view_origin_(nullptr), x_(cmd.x_), y_(cmd.y_), - button_(cmd.button_), modifier_(NoModifier), allow_async_(true) + : action_(cmd.action()), argument_(arg), origin_(o), + x_(cmd.x_), y_(cmd.y_), button_(cmd.button_) {} diff --git a/src/FuncRequest.h b/src/FuncRequest.h index 19f571a..52fb143 100644 --- a/src/FuncRequest.h +++ b/src/FuncRequest.h @@ -105,25 +105,25 @@ public: private: /// the action - FuncCode action_; + FuncCode action_ = LFUN_NOACTION; /// the action's string argument docstring argument_; /// who initiated the action - Origin origin_; + Origin origin_ = INTERNAL; /// to which view should be this command sent (see bug #11004) /// NULL=current view - frontend::GuiView* view_origin_; + frontend::GuiView* view_origin_ = nullptr; /// the x coordinate of a mouse press - int x_; + int x_ = 0; /// the y coordinate of a mouse press - int y_; + int y_ = 0; /// some extra information (like button number) - mouse_button::state button_; + mouse_button::state button_ = mouse_button::none; /// - KeyModifier modifier_; + KeyModifier modifier_ = NoModifier; /// Commands should be run synchronously when they /// are launched via "command-sequence" or "repeat" or "buffer-forall" - bool allow_async_; + bool allow_async_ = true; }; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Simplify InsetMathGrid structs
commit efaffb897d44258182739a2cc27ac4f6325af9f3 Author: Yuriy Skalko Date: Wed Dec 2 14:45:14 2020 +0200 Simplify InsetMathGrid structs --- src/mathed/InsetMathGrid.cpp | 26 -- src/mathed/InsetMathGrid.h | 37 ++--- 2 files changed, 14 insertions(+), 49 deletions(-) diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp index 7158df2..260d61e 100644 --- a/src/mathed/InsetMathGrid.cpp +++ b/src/mathed/InsetMathGrid.cpp @@ -78,41 +78,15 @@ static void resetGrid(InsetMathGrid & grid) } - -// - - -InsetMathGrid::CellInfo::CellInfo() - : multi(CELL_NORMAL) -{} - - - // -InsetMathGrid::RowInfo::RowInfo() - : descent(0), ascent(0), lines(0), skip(0), - allow_newpage(true) -{} - - - int InsetMathGrid::RowInfo::skipPixels(MetricsInfo const & mi) const { return mi.base.inPixels(crskip); } - -// - - -InsetMathGrid::ColInfo::ColInfo() - : align('c'), width(0), offset(0), lines(0), skip(0) -{} - - // diff --git a/src/mathed/InsetMathGrid.h b/src/mathed/InsetMathGrid.h index df83449..cf24dcf 100644 --- a/src/mathed/InsetMathGrid.h +++ b/src/mathed/InsetMathGrid.h @@ -39,54 +39,45 @@ public: }; /// additional per-cell information - class CellInfo { - public: - /// - CellInfo(); + struct CellInfo { /// multicolumn flag - Multicolumn multi; + Multicolumn multi = CELL_NORMAL; /// special multi columns alignment docstring align; }; /// additional per-row information - class RowInfo { - public: - /// - RowInfo(); + struct RowInfo { /// int skipPixels(MetricsInfo const & mi) const; /// cached descent - mutable int descent; + mutable int descent = 0; /// cached ascent - mutable int ascent; + mutable int ascent = 0; /// cached offset for each bufferview mutable std::map offset; /// how many hlines above this row? - unsigned int lines; + unsigned int lines = 0; /// parameter to the line break Length crskip; /// extra distance between lines - int skip; + int skip = 0; /// Is a page break allowed after this row? - bool allow_newpage; + bool allow_newpage = true; }; // additional per-row information - class ColInfo { - public: - /// - ColInfo(); + struct ColInfo { /// currently possible: 'l', 'c', 'r' - char align; + char align = 'c'; /// cached width - mutable int width; + mutable int width = 0; /// cached offset - mutable int offset; + mutable int offset = 0; /// how many lines to the left of this column? - unsigned int lines; + unsigned int lines = 0; /// additional amount to the right to be skipped when drawing - int skip; + int skip = 0; /// Special alignment. /// This does also contain align_ and lines_ if it is nonempty. /// It needs to be in sync with align_ and lines_ because some -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Fix warnings and use range-based loop
commit e0f553b941ef2a14da046e1f4e10acbf3d63b08d Author: Yuriy Skalko Date: Wed Dec 2 00:16:55 2020 +0200 Fix warnings and use range-based loop --- src/frontends/qt/Menus.cpp | 14 ++ 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp index 8437ace..e567c64 100644 --- a/src/frontends/qt/Menus.cpp +++ b/src/frontends/qt/Menus.cpp @@ -1809,12 +1809,8 @@ void MenuDefinition::expandQuotes(BufferView const * bv) InsetQuotes const * qinset = static_cast(inset); - map styles = quoteparams.getTypes(); string const qtype = qinset->getType(); - map::const_iterator qq = styles.begin(); - map::const_iterator end = styles.end(); - MenuDefinition aqs; BufferParams const & bp = bv->buffer().masterBuffer()->params(); @@ -1856,10 +1852,12 @@ void MenuDefinition::expandQuotes(BufferView const * bv) main_dynamic_qs = true; } // now traverse through the static styles ... - for (; qq != end; ++qq) { - docstring const style = from_ascii(qq->first); - bool langdef = (style[0] == langqs); - bool globaldef = (style[0] == globalqsc); + map styles = quoteparams.getTypes(); + for (auto const & s : styles) { + char style_char = (s.first)[0]; + bool langdef = (style_char == langqs); + bool globaldef = (style_char == globalqsc); + docstring const style = from_ascii(s.first); if (prefixIs(style, qtype[0])) { FuncRequest cmd = FuncRequest(LFUN_INSET_MODIFY, subcmd + style); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Cleanup headers
commit 9cb98136ceeb3fbda70aa5beea4cf3f5ea26a36c Author: Yuriy Skalko Date: Wed Dec 2 17:13:32 2020 +0200 Cleanup headers --- src/Buffer.cpp|1 - src/BufferView.cpp|2 ++ src/Undo.cpp |2 ++ src/insets/InsetCommand.cpp |4 src/insets/InsetTabular.cpp |1 - src/mathed/InsetMath.cpp |6 +++--- src/mathed/InsetMath.h| 11 +-- src/mathed/InsetMathBox.h |4 ++-- src/mathed/InsetMathCommand.h |2 +- src/mathed/InsetMathFrac.h|2 +- src/mathed/InsetMathGrid.h|2 +- src/mathed/InsetMathMacro.cpp | 23 --- src/mathed/InsetMathMacroTemplate.cpp |6 +++--- src/mathed/MathData.cpp |3 ++- src/mathed/MathData.h |8 +--- src/mathed/MathRow.cpp| 30 -- src/mathed/MathRow.h |5 +++-- 17 files changed, 62 insertions(+), 50 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 0d5de8c..4f397ef 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -69,7 +69,6 @@ #include "insets/InsetBranch.h" #include "insets/InsetInclude.h" -#include "insets/InsetTabular.h" #include "insets/InsetText.h" #include "mathed/InsetMathHull.h" diff --git a/src/BufferView.cpp b/src/BufferView.cpp index f7567bd..758a992 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -50,7 +50,9 @@ #include "insets/InsetRef.h" #include "insets/InsetText.h" +#include "mathed/InsetMath.h" #include "mathed/MathData.h" +#include "mathed/MathRow.h" #include "frontends/alert.h" #include "frontends/CaretGeometry.h" diff --git a/src/Undo.cpp b/src/Undo.cpp index c6b7eaa..ebe2350 100644 --- a/src/Undo.cpp +++ b/src/Undo.cpp @@ -27,7 +27,9 @@ #include "ParagraphList.h" #include "Text.h" +#include "mathed/InsetMath.h" #include "mathed/MathData.h" +#include "mathed/MathRow.h" #include "insets/InsetText.h" diff --git a/src/insets/InsetCommand.cpp b/src/insets/InsetCommand.cpp index 8d9d174..67ff5fc 100644 --- a/src/insets/InsetCommand.cpp +++ b/src/insets/InsetCommand.cpp @@ -18,7 +18,6 @@ #include "BufferParams.h" #include "BufferView.h" #include "Cursor.h" -#include "DispatchResult.h" #include "FuncRequest.h" #include "FuncStatus.h" #include "Lexer.h" @@ -28,18 +27,15 @@ #include "insets/InsetBox.h" #include "insets/InsetBranch.h" -#include "insets/InsetCommand.h" #include "insets/InsetERT.h" #include "insets/InsetExternal.h" #include "insets/InsetFloat.h" #include "insets/InsetGraphics.h" #include "insets/InsetIndex.h" -#include "insets/InsetLine.h" #include "insets/InsetListings.h" #include "insets/InsetNote.h" #include "insets/InsetPhantom.h" #include "insets/InsetSpace.h" -#include "insets/InsetTabular.h" #include "insets/InsetVSpace.h" #include "insets/InsetWrap.h" diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 53d9ac1..181e68c 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -45,7 +45,6 @@ #include "xml.h" #include "output_xhtml.h" #include "Paragraph.h" -#include "ParagraphParameters.h" #include "ParIterator.h" #include "TexRow.h" #include "texstream.h" diff --git a/src/mathed/InsetMath.cpp b/src/mathed/InsetMath.cpp index 40cb906..d12474f 100644 --- a/src/mathed/InsetMath.cpp +++ b/src/mathed/InsetMath.cpp @@ -94,9 +94,9 @@ MathData const & InsetMath::cell(idx_type) const } -InsetMath::marker_type InsetMath::marker(BufferView const *) const +marker_type InsetMath::marker(BufferView const *) const { - return nargs() > 0 ? MARKER : NO_MARKER; + return nargs() > 0 ? marker_type::MARKER : marker_type::NO_MARKER; } @@ -104,7 +104,7 @@ bool InsetMath::addToMathRow(MathRow & mrow, MetricsInfo & mi) const { MathRow::Element e(mi, MathRow::INSET, mathClass()); e.inset = this; - e.marker = mi.base.macro_nesting ? NO_MARKER : marker(mi.base.bv); + e.marker = mi.base.macro_nesting ? marker_type::NO_MARKER : marker(mi.base.bv); mrow.push_back(e); return true; } diff --git a/src/mathed/InsetMath.h b/src/mathed/InsetMath.h index 9a970c5..2207956 100644 --- a/src/mathed/InsetMath.h +++ b/src/mathed/InsetMath.h @@ -50,6 +50,15 @@ enum Limits { }; +/// The possible marker types for math insets +enum class marker_type : int { +
[LyX/master] Refactor InsetQuotes.h enums
commit 6354ad60b4f61eca4a08c189ba7cc6dec3b7f987 Author: Yuriy Skalko Date: Mon Nov 30 22:34:16 2020 +0200 Refactor InsetQuotes.h enums --- src/BufferParams.cpp | 37 src/BufferParams.h | 12 ++- src/Format.cpp |1 + src/Text3.cpp|4 +- src/frontends/qt/GuiDocument.cpp | 17 ++-- src/frontends/qt/GuiDocument.h |2 + src/frontends/qt/Menus.cpp |4 +- src/insets/InsetQuotes.cpp | 184 +++--- src/insets/InsetQuotes.h | 116 src/output_plaintext.cpp |2 + 10 files changed, 197 insertions(+), 182 deletions(-) diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index bd78dae..798c773 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -45,6 +45,7 @@ #include "frontends/alert.h" #include "insets/InsetListingsParams.h" +#include "insets/InsetQuotes.h" #include "support/convert.h" #include "support/debug.h" @@ -135,26 +136,26 @@ ParSepTranslator const & parseptranslator() // Quotes style -typedef Translator QuotesStyleTranslator; +typedef Translator QuotesStyleTranslator; QuotesStyleTranslator const init_quotesstyletranslator() { QuotesStyleTranslator translator - (string_quotes_style[0], InsetQuotesParams::EnglishQuotes); - translator.addPair(string_quotes_style[1], InsetQuotesParams::SwedishQuotes); - translator.addPair(string_quotes_style[2], InsetQuotesParams::GermanQuotes); - translator.addPair(string_quotes_style[3], InsetQuotesParams::PolishQuotes); - translator.addPair(string_quotes_style[4], InsetQuotesParams::SwissQuotes); - translator.addPair(string_quotes_style[5], InsetQuotesParams::DanishQuotes); - translator.addPair(string_quotes_style[6], InsetQuotesParams::PlainQuotes); - translator.addPair(string_quotes_style[7], InsetQuotesParams::BritishQuotes); - translator.addPair(string_quotes_style[8], InsetQuotesParams::SwedishGQuotes); - translator.addPair(string_quotes_style[9], InsetQuotesParams::FrenchQuotes); - translator.addPair(string_quotes_style[10], InsetQuotesParams::FrenchINQuotes); - translator.addPair(string_quotes_style[11], InsetQuotesParams::RussianQuotes); - translator.addPair(string_quotes_style[12], InsetQuotesParams::CJKQuotes); - translator.addPair(string_quotes_style[13], InsetQuotesParams::CJKAngleQuotes); + (string_quotes_style[0], QuoteStyle::EnglishQuotes); + translator.addPair(string_quotes_style[1], QuoteStyle::SwedishQuotes); + translator.addPair(string_quotes_style[2], QuoteStyle::GermanQuotes); + translator.addPair(string_quotes_style[3], QuoteStyle::PolishQuotes); + translator.addPair(string_quotes_style[4], QuoteStyle::SwissQuotes); + translator.addPair(string_quotes_style[5], QuoteStyle::DanishQuotes); + translator.addPair(string_quotes_style[6], QuoteStyle::PlainQuotes); + translator.addPair(string_quotes_style[7], QuoteStyle::BritishQuotes); + translator.addPair(string_quotes_style[8], QuoteStyle::SwedishGQuotes); + translator.addPair(string_quotes_style[9], QuoteStyle::FrenchQuotes); + translator.addPair(string_quotes_style[10], QuoteStyle::FrenchINQuotes); + translator.addPair(string_quotes_style[11], QuoteStyle::RussianQuotes); + translator.addPair(string_quotes_style[12], QuoteStyle::CJKQuotes); + translator.addPair(string_quotes_style[13], QuoteStyle::CJKAngleQuotes); return translator; } @@ -393,7 +394,7 @@ BufferParams::BufferParams() paragraph_separation = ParagraphIndentSeparation; is_math_indent = false; math_numbering_side = DEFAULT; - quotes_style = InsetQuotesParams::EnglishQuotes; + quotes_style = QuoteStyle::EnglishQuotes; dynamic_quotes = false; fontsize = "default"; @@ -1452,7 +1453,7 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const os << "default"; } os << "\n\\quotes_style " - << string_quotes_style[quotes_style] + << string_quotes_style[static_cast(quotes_style)] << "\n\\dynamic_quotes " << dynamic_quotes << "\n\\papercolumns " << columns << "\n\\papersides " << sides @@ -2789,7 +2790,7 @@ Font const BufferParams::getFont() const } -InsetQuotesParams::QuoteStyle BufferParams::getQuoteStyle(string const & qs) const +QuoteStyle BufferParams::getQuoteStyle(string const & qs) const { return quotesstyletranslator().find(qs); } diff --git a/src/BufferParams.h b/src/BufferParams.h index 21bfc10..031524f 100644 --- a/src/BufferParams.h +++ b/src/BufferParams.h
[LyX/master] Refactor KernelDocType enum
commit 890ca6df7b3360e0a80da8726bb413ac3d52e11f Author: Yuriy Skalko Date: Mon Nov 30 22:46:46 2020 +0200 Refactor KernelDocType enum --- src/frontends/qt/Dialog.cpp|6 +++--- src/frontends/qt/Dialog.h |2 +- src/frontends/qt/Validator.cpp |7 --- src/frontends/qt/Validator.h |5 ++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/frontends/qt/Dialog.cpp b/src/frontends/qt/Dialog.cpp index 7590a54..509727d 100644 --- a/src/frontends/qt/Dialog.cpp +++ b/src/frontends/qt/Dialog.cpp @@ -91,12 +91,12 @@ QString Dialog::bufferFilePath() const KernelDocType Dialog::docType() const { if (buffer().params().isLatex()) - return LATEX; + return KernelDocType::LATEX; if (buffer().params().isLiterate()) - return LITERATE; + return KernelDocType::LITERATE; // This case should not happen. - return LATEX; + return KernelDocType::LATEX; } diff --git a/src/frontends/qt/Dialog.h b/src/frontends/qt/Dialog.h index b4a3c8d..819dcf9 100644 --- a/src/frontends/qt/Dialog.h +++ b/src/frontends/qt/Dialog.h @@ -38,7 +38,7 @@ class GuiView; * without making the kernel header files available to the * dialog's Controller or View. */ -enum KernelDocType +enum class KernelDocType : int { LATEX, LITERATE diff --git a/src/frontends/qt/Validator.cpp b/src/frontends/qt/Validator.cpp index 0fddd6d..1f72d56 100644 --- a/src/frontends/qt/Validator.cpp +++ b/src/frontends/qt/Validator.cpp @@ -13,14 +13,15 @@ #include #include "Validator.h" -#include "qt_helpers.h" -#include "support/gettext.h" +#include "Dialog.h" #include "LyXRC.h" +#include "qt_helpers.h" #include "frontends/alert.h" #include "support/docstring.h" +#include "support/gettext.h" #include "support/lstrings.h" #include @@ -233,7 +234,7 @@ QValidator::State PathValidator::validate(QString & qtext, int &) const void PathValidator::setChecker(KernelDocType const & type, LyXRC const & rc) { - latex_doc_ = type == LATEX; + latex_doc_ = type == KernelDocType::LATEX; tex_allows_spaces_ = rc.tex_allows_spaces; } diff --git a/src/frontends/qt/Validator.h b/src/frontends/qt/Validator.h index 72d08ae..87a1a1c 100644 --- a/src/frontends/qt/Validator.h +++ b/src/frontends/qt/Validator.h @@ -25,8 +25,6 @@ #ifndef VALIDATOR_H #define VALIDATOR_H -#include "Dialog.h" // KernelDocType - #include "support/Length.h" #include @@ -34,13 +32,14 @@ class QWidget; class QLineEdit; - namespace lyx { class LyXRC; namespace frontend { +enum class KernelDocType : int; + /** A class to ascertain whether the data passed to the @c validate() * member function can be interpreted as a GlueLength. */ -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Better naming for enums
commit c0a59871813d853ba455ec8d39be61db4f4b2848 Author: Yuriy Skalko Date: Tue Dec 1 00:00:40 2020 +0200 Better naming for enums src/Buffer.cpp | 34 src/BufferParams.cpp | 80 ++-- src/BufferParams.h |6 +- src/Converter.cpp| 26 +++--- src/Converter.h |4 +- src/Format.cpp | 24 +++--- src/Format.h |6 +- src/LaTeXFeatures.cpp| 20 +++--- src/OutputParams.cpp | 18 ++-- src/OutputParams.h | 22 +++--- src/PDFOptions.cpp |4 +- src/Paragraph.cpp|6 +- src/Text3.cpp|2 +- src/frontends/qt/Dialog.cpp |6 +- src/frontends/qt/Dialog.h|4 +- src/frontends/qt/GuiDocument.cpp |2 +- src/frontends/qt/Validator.cpp |2 +- src/graphics/PreviewLoader.cpp | 24 +++--- src/insets/InsetBibtex.cpp |2 +- src/insets/InsetExternal.cpp | 22 +++--- src/insets/InsetGraphics.cpp | 14 ++-- src/insets/InsetInclude.cpp |2 +- src/insets/InsetNote.cpp |2 +- src/insets/InsetQuotes.cpp | 156 +++--- src/insets/InsetQuotes.h | 52 ++-- src/lyxfind.cpp | 10 +- 26 files changed, 275 insertions(+), 275 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Remove useless breaks
commit 66403b44493d1e36b9b050de69895e6397eabc73 Author: Yuriy Skalko Date: Mon Nov 30 18:06:12 2020 +0200 Remove useless breaks --- src/insets/InsetNewpage.cpp |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/src/insets/InsetNewpage.cpp b/src/insets/InsetNewpage.cpp index f4eba12..da94452 100644 --- a/src/insets/InsetNewpage.cpp +++ b/src/insets/InsetNewpage.cpp @@ -237,22 +237,16 @@ docstring InsetNewpage::insetLabel() const switch (params_.kind) { case InsetNewpageParams::NEWPAGE: return _("New Page"); - break; case InsetNewpageParams::PAGEBREAK: return _("Page Break"); - break; case InsetNewpageParams::CLEARPAGE: return _("Clear Page"); - break; case InsetNewpageParams::CLEARDOUBLEPAGE: return _("Clear Double Page"); - break; case InsetNewpageParams::NOPAGEBREAK: return _("No Page Break"); - break; default: return _("New Page"); - break; } } @@ -263,12 +257,10 @@ ColorCode InsetNewpage::ColorName() const case InsetNewpageParams::PAGEBREAK: case InsetNewpageParams::NOPAGEBREAK: return Color_pagebreak; - break; case InsetNewpageParams::NEWPAGE: case InsetNewpageParams::CLEARPAGE: case InsetNewpageParams::CLEARDOUBLEPAGE: return Color_newpage; - break; } // not really useful, but to avoids gcc complaints return Color_newpage; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Move Inset.h include from .h to .cpp
commit ec5c7b905becaefc7f1697a27718d619c80b475d Author: Yuriy Skalko Date: Mon Nov 30 11:21:53 2020 +0200 Move Inset.h include from .h to .cpp --- src/frontends/qt/InsetParamsWidget.cpp |5 +++-- src/frontends/qt/InsetParamsWidget.h |7 ++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/frontends/qt/InsetParamsWidget.cpp b/src/frontends/qt/InsetParamsWidget.cpp index 86012a7..9f6d4ee 100644 --- a/src/frontends/qt/InsetParamsWidget.cpp +++ b/src/frontends/qt/InsetParamsWidget.cpp @@ -13,6 +13,7 @@ #include "InsetParamsWidget.h" +#include "insets/Inset.h" #include "qt_helpers.h" #include @@ -42,9 +43,9 @@ bool CheckedWidget::check() const } - -InsetParamsWidget::InsetParamsWidget(QWidget * parent) : QWidget(parent) +QString InsetParamsWidget::dialogTitle() const { + return toqstr(insetName(insetCode())); } diff --git a/src/frontends/qt/InsetParamsWidget.h b/src/frontends/qt/InsetParamsWidget.h index 63d9944..0811ca5 100644 --- a/src/frontends/qt/InsetParamsWidget.h +++ b/src/frontends/qt/InsetParamsWidget.h @@ -13,9 +13,6 @@ #define INSET_PARAMS_WIDGET_H #include "insets/InsetCode.h" -#include "insets/Inset.h" - -#include "qt_helpers.h" #include "FuncCode.h" @@ -57,11 +54,11 @@ class InsetParamsWidget : public QWidget Q_SIGNALS: void changed(); public: - InsetParamsWidget(QWidget * parent); + InsetParamsWidget(QWidget * parent) : QWidget(parent) {} /// This is a base class; destructor must exist and be virtual. virtual ~InsetParamsWidget() {} /// - virtual QString dialogTitle() const { return toqstr(insetName(insetCode())); } + virtual QString dialogTitle() const; /// virtual InsetCode insetCode() const = 0; /// -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Simplify DocIterator
commit 19f5aa58aa55fe210c689052967ade0f943f82fb Author: Yuriy Skalko Date: Sat Nov 28 01:14:32 2020 +0200 Simplify DocIterator --- src/DocIterator.cpp | 17 - src/DocIterator.h | 21 ++--- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp index b49fc2e..7c1924c 100644 --- a/src/DocIterator.cpp +++ b/src/DocIterator.cpp @@ -44,23 +44,6 @@ using namespace lyx::support; namespace lyx { -DocIterator::DocIterator() - : boundary_(false), inset_(nullptr), buffer_(nullptr) -{} - - -// We could be able to get rid of this if only every BufferView were -// associated to a buffer on construction. -DocIterator::DocIterator(Buffer * buf) - : boundary_(false), inset_(nullptr), buffer_(buf) -{} - - -DocIterator::DocIterator(Buffer * buf, Inset * inset) - : boundary_(false), inset_(inset), buffer_(buf) -{} - - DocIterator doc_iterator_begin(const Buffer * buf0, const Inset * inset0) { Buffer * buf = const_cast(buf0); diff --git a/src/DocIterator.h b/src/DocIterator.h index ca68757..5e6ae6c 100644 --- a/src/DocIterator.h +++ b/src/DocIterator.h @@ -36,9 +36,13 @@ class DocIterator { public: /// - DocIterator(); - /// - explicit DocIterator(Buffer *buf); + DocIterator() = default; + + // We could be able to get rid of this if only every BufferView were + // associated to a buffer on construction. + explicit DocIterator(Buffer *buf) + : buffer_(buf) + {} /// access to owning buffer Buffer * buffer() const { return buffer_; } @@ -271,7 +275,10 @@ private: friend DocIterator doc_iterator_begin(Buffer const * buf, Inset const * inset); friend DocIterator doc_iterator_end(Buffer const * buf, Inset const * inset); /// - explicit DocIterator(Buffer * buf, Inset * inset); + explicit DocIterator(Buffer * buf, Inset * inset) + : inset_(inset), buffer_(buf) + {} + /** * Normally, when the cursor is at position i, it is painted *before* * the character at position i. However, what if we want the cursor @@ -297,15 +304,15 @@ private: * happen *before* i. If the cursor, however, were painted *after* i, that * would be very unnatural... */ - bool boundary_; + bool boundary_ = false; /// std::vector const & internalData() const { return slices_; } /// std::vector slices_; /// - Inset * inset_; + Inset * inset_ = nullptr; /// - Buffer * buffer_; + Buffer * buffer_ = nullptr; }; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Refactor OutputParams
commit ecf62a8f21e457936ed285d4fbcbed7348bb636b Author: Yuriy Skalko Date: Mon Nov 30 01:03:35 2020 +0200 Refactor OutputParams Now all Inset hierarchy uses OutputParams.h included in Inset.h. Forward declare some enums to reduce header dependencies. src/Buffer.cpp| 34 src/BufferList.cpp|1 + src/BufferParams.cpp | 50 ++-- src/BufferParams.h|8 +++--- src/Changes.cpp | 10 +++--- src/Converter.cpp | 27 ++- src/Converter.h |6 +++- src/Format.cpp| 24 +- src/Format.h |8 +++--- src/LaTeXFeatures.cpp | 20 +++--- src/OutputParams.cpp | 13 ++--- src/OutputParams.h| 46 + src/PDFOptions.cpp|4 +- src/Paragraph.cpp | 14 +- src/Undo.cpp |1 - src/frontends/qt/GuiBox.h |1 + src/frontends/qt/GuiDocument.cpp |1 - src/frontends/qt/GuiPrefs.h |1 + src/graphics/PreviewLoader.cpp| 26 +- src/insets/Inset.cpp |6 src/insets/Inset.h|3 +- src/insets/InsetArgument.cpp |1 - src/insets/InsetBibitem.cpp |1 - src/insets/InsetBibtex.cpp|3 +- src/insets/InsetBranch.cpp|1 - src/insets/InsetCaption.cpp |1 - src/insets/InsetCitation.h|1 + src/insets/InsetCollapsible.cpp |1 - src/insets/InsetCommandParams.cpp |1 - src/insets/InsetCounter.cpp |1 - src/insets/InsetERT.cpp |1 - src/insets/InsetExternal.cpp | 23 - src/insets/InsetFloat.cpp | 10 ++- src/insets/InsetFloat.h |2 +- src/insets/InsetFoot.cpp |1 - src/insets/InsetGraphics.cpp | 21 +-- src/insets/InsetGraphics.h|2 +- src/insets/InsetHyperlink.cpp |1 - src/insets/InsetIPA.cpp |1 - src/insets/InsetInclude.cpp |3 +- src/insets/InsetInfo.cpp |1 + src/insets/InsetLine.cpp |1 - src/insets/InsetListings.cpp |1 - src/insets/InsetMarginal.cpp |1 - src/insets/InsetNewline.cpp |1 - src/insets/InsetNewpage.cpp |1 - src/insets/InsetNomencl.cpp |1 - src/insets/InsetNote.cpp |3 +- src/insets/InsetPhantom.cpp |1 - src/insets/InsetPreview.cpp |1 - src/insets/InsetQuotes.cpp|5 +-- src/insets/InsetRef.cpp |1 - src/insets/InsetScript.cpp|1 - src/insets/InsetSeparator.cpp |1 - src/insets/InsetSpace.cpp |1 - src/insets/InsetTOC.cpp |1 - src/insets/InsetTabular.cpp |1 - src/insets/InsetTabular.h |1 + src/insets/InsetText.cpp |1 - src/insets/InsetVSpace.cpp|1 - src/lyxfind.cpp | 10 +++--- src/mathed/InsetMathHull.cpp |8 +++--- src/mathed/InsetMathHull.h|2 +- src/mathed/InsetMathNest.cpp |1 - src/mathed/InsetMathRef.cpp |1 - src/mathed/MathFactory.cpp|1 - src/output_xhtml.cpp |1 - src/xml.cpp |1 - 68 files changed, 212 insertions(+), 219 deletions(-) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Cleanup included headers
commit 99b1488f0e591539b5597d36dbadda26844b2078 Author: Yuriy Skalko Date: Sat Nov 28 01:13:36 2020 +0200 Cleanup included headers --- src/KeySequence.cpp |2 -- src/frontends/qt/GuiErrorList.cpp |1 - src/frontends/qt/GuiKeySymbol.cpp |4 src/insets/InsetNote.cpp |1 - 4 files changed, 0 insertions(+), 8 deletions(-) diff --git a/src/KeySequence.cpp b/src/KeySequence.cpp index f1530c8..c0985b7 100644 --- a/src/KeySequence.cpp +++ b/src/KeySequence.cpp @@ -17,8 +17,6 @@ #include "support/gettext.h" -#include "frontends/KeySymbol.h" - using namespace std; namespace lyx { diff --git a/src/frontends/qt/GuiErrorList.cpp b/src/frontends/qt/GuiErrorList.cpp index 9fbdeda..c60dbf1 100644 --- a/src/frontends/qt/GuiErrorList.cpp +++ b/src/frontends/qt/GuiErrorList.cpp @@ -21,7 +21,6 @@ #include "FuncStatus.h" #include "BufferList.h" #include "LyX.h" -#include "ParIterator.h" #include "Text.h" #include "TexRow.h" diff --git a/src/frontends/qt/GuiKeySymbol.cpp b/src/frontends/qt/GuiKeySymbol.cpp index 4e031ee..b55f890 100644 --- a/src/frontends/qt/GuiKeySymbol.cpp +++ b/src/frontends/qt/GuiKeySymbol.cpp @@ -11,10 +11,6 @@ #include #include "GuiKeySymbol.h" - -#include "KeySymbol.h" -#include "GuiApplication.h" - #include "qt_helpers.h" #include "support/lassert.h" diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index 619a9f3..0f5f64c 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -28,7 +28,6 @@ #include "LyXRC.h" #include "OutputParams.h" #include "output_docbook.h" -#include "ParIterator.h" #include "TextClass.h" #include "TocBackend.h" -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Simplify KeyModifier
commit 89d05890bf264958863f318fa737e8337747ee8f Author: Yuriy Skalko Date: Sun Nov 29 10:19:58 2020 +0200 Simplify KeyModifier --- src/frontends/KeyModifier.h | 31 +-- 1 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/frontends/KeyModifier.h b/src/frontends/KeyModifier.h index fba80be..b900b14 100644 --- a/src/frontends/KeyModifier.h +++ b/src/frontends/KeyModifier.h @@ -16,31 +16,18 @@ namespace lyx { -/// modifier key states +/// Set of KeyModifierFlags +typedef unsigned int KeyModifier; -enum KeyModifier { - NoModifier = 0, //< no modifiers held - ControlModifier = 1, //< control button held - AltModifier = 2, //< alt key held - ShiftModifier= 4, //< shift key held - MetaModifier = 8 //< meta key held +/// modifier key states +enum KeyModifierFlags : unsigned int { + NoModifier = 0, //< no modifiers held + ControlModifier = 1 << 0, //< control button held + AltModifier = 1 << 1, //< alt key held + ShiftModifier= 1 << 2, //< shift key held + MetaModifier = 1 << 3 //< meta key held }; - -inline KeyModifier operator|(KeyModifier s1, KeyModifier s2) -{ - int const i1 = static_cast(s1); - int const i2 = static_cast(s2); - return static_cast(i1 | i2); -} - - -inline void operator|=(KeyModifier & s1, KeyModifier s2) -{ - s1 = static_cast(s1 | s2); -} - - } // namespace lyx #endif // KEYMODIFIER_H -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Include standard
commit 7779316e6c5dd6d0d522d8fdfedf5cba48c56c6a Author: Yuriy Skalko Date: Sun Nov 29 01:05:24 2020 +0200 Include standard --- src/BiblioInfo.cpp | 10 src/LaTeX.cpp |3 +- src/LaTeXFeatures.cpp |2 +- src/LayoutFile.cpp |3 +- src/Text3.cpp |2 +- src/VCBackend.cpp |2 +- src/frontends/qt/GuiCitation.cpp| 25 +-- src/frontends/qt/qt_helpers.cpp | 15 +-- src/frontends/tests/biblio.cpp | 13 +- src/graphics/epstools.cpp |7 +++-- src/insets/ExternalTransforms.cpp | 11 - src/insets/InsetBibtex.cpp |6 ++-- src/insets/InsetListings.cpp|3 +- src/lyxfind.cpp | 34 +- src/support/Makefile.am |1 - src/support/filetools.cpp |2 +- src/support/os.cpp |3 +- src/support/regex.h | 43 --- src/tests/check_ListingsCaption.cpp |2 +- src/tex2lyx/Preamble.cpp|3 +- 20 files changed, 70 insertions(+), 120 deletions(-) diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index 7d67e08..bdd7b75 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -32,10 +32,10 @@ #include "support/gettext.h" #include "support/lassert.h" #include "support/lstrings.h" -#include "support/regex.h" #include "support/textutils.h" #include +#include #include using namespace std; @@ -383,8 +383,8 @@ docstring convertLaTeXCommands(docstring const & str) // {\v a} to \v{a} (see #9340). // FIXME: This is a sort of mini-tex2lyx. //Use the real tex2lyx instead! - static lyx::regex const tma_reg("^\\{[bcCdfGhHkrtuUv]\\s\\w\\}"); - if (lyx::regex_search(to_utf8(val), tma_reg)) { + static regex const tma_reg("^\\{[bcCdfGhHkrtuUv]\\s\\w\\}"); + if (regex_search(to_utf8(val), tma_reg)) { val = val.substr(1); val.replace(2, 1, from_ascii("{")); continue; @@ -411,8 +411,8 @@ docstring convertLaTeXCommands(docstring const & str) // look for that and change it, if necessary. // FIXME: This is a sort of mini-tex2lyx. //Use the real tex2lyx instead! - static lyx::regex const reg("^\\W\\w"); - if (lyx::regex_search(to_utf8(val), reg)) { + static regex const reg("^\\W\\w"); + if (regex_search(to_utf8(val), reg)) { val.insert(3, from_ascii("}")); val.insert(2, from_ascii("{")); } diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index 25dffb7..31d6144 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -36,9 +36,8 @@ #include "support/Systemcall.h" #include "support/os.h" -#include "support/regex.h" - #include +#include #include diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index fb8a818..4da0e3b 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -40,9 +40,9 @@ #include "support/docstring.h" #include "support/filetools.h" #include "support/lstrings.h" -#include "support/regex.h" #include +#include using namespace std; diff --git a/src/LayoutFile.cpp b/src/LayoutFile.cpp index 1ce04aa..7944ad7 100644 --- a/src/LayoutFile.cpp +++ b/src/LayoutFile.cpp @@ -19,11 +19,10 @@ #include "support/FileName.h" #include "support/filetools.h" #include "support/lassert.h" - -#include "support/regex.h" #include "support/TempFile.h" #include +#include using namespace std; using namespace lyx::support; diff --git a/src/Text3.cpp b/src/Text3.cpp index 1927a25..aa34971 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -72,13 +72,13 @@ #include "support/lassert.h" #include "support/limited_stack.h" #include "support/lstrings.h" -#include "support/regex.h" #include "mathed/InsetMathHull.h" #include "mathed/InsetMathMacroTemplate.h" #include "lyxfind.h" #include +#include #include using namespace std; diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index bee398c..a1e0ec2 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -26,11 +26,11 @@ #include "support/lstrings.h" #include "support/PathChanger.h" #include "support/Systemcall.h" -#include "support/regex.h" #include "support/TempFile.h" #include #include +#include #include
[LyX/master] Use correct std header
commit 075ae38ec93aee2e2ad5c7234d62e97167838671 Author: Yuriy Skalko Date: Sun Nov 29 10:48:06 2020 +0200 Use correct std header --- src/support/checksum.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/support/checksum.cpp b/src/support/checksum.cpp index 151b533..79ef955 100644 --- a/src/support/checksum.cpp +++ b/src/support/checksum.cpp @@ -11,7 +11,7 @@ #include "support/checksum.h" #include "boost/crc.hpp" -#include +#include namespace lyx { -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Fix buffer over-read on last Unicode code points
commit 9b0cd3c97049c45427103d9352a9d22a6710f181 Author: Yuriy Skalko Date: Fri Nov 27 23:22:35 2020 +0200 Fix buffer over-read on last Unicode code points --- src/frontends/qt/GuiSymbols.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/frontends/qt/GuiSymbols.cpp b/src/frontends/qt/GuiSymbols.cpp index 050584a..99d1fc0 100644 --- a/src/frontends/qt/GuiSymbols.cpp +++ b/src/frontends/qt/GuiSymbols.cpp @@ -169,7 +169,7 @@ QString getBlock(char_type c) // c falls into an uncovered area, but we can guess which if (c > unicode_blocks[lastBlock].end - && c < unicode_blocks[lastBlock + 1].start) + && (lastBlock == no_blocks-1 || c < unicode_blocks[lastBlock + 1].start)) return QString(); // guessing was wrong so far. do a real search. -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Cleanup included headers
commit 813eb0f9f7830c8dc8eec8c16da8512a73e81df8 Author: Yuriy Skalko Date: Fri Nov 27 20:00:29 2020 +0200 Cleanup included headers --- src/frontends/qt/GuiPrefs.cpp |2 -- src/frontends/qt/GuiWorkArea.cpp |3 --- src/graphics/GraphicsCache.cpp |2 -- src/graphics/GraphicsConverter.cpp |4 src/graphics/PreviewLoader.cpp |3 --- src/insets/InsetInclude.cpp|3 --- src/insets/InsetLabel.cpp |5 - src/insets/InsetNomencl.cpp|1 - src/insets/InsetNote.cpp |1 - src/insets/InsetPhantom.cpp|1 - src/insets/InsetPreview.cpp|1 - src/mathed/InsetMathHull.cpp |1 - 12 files changed, 0 insertions(+), 27 deletions(-) diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp index 79064df..f0ccb52 100644 --- a/src/frontends/qt/GuiPrefs.cpp +++ b/src/frontends/qt/GuiPrefs.cpp @@ -49,8 +49,6 @@ #include "support/os.h" #include "support/Package.h" -#include "graphics/GraphicsTypes.h" - #include "frontends/alert.h" #include "frontends/Application.h" #include "frontends/FontLoader.h" diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp index 1c76928..8bb0bfc 100644 --- a/src/frontends/qt/GuiWorkArea.cpp +++ b/src/frontends/qt/GuiWorkArea.cpp @@ -40,9 +40,6 @@ #include "Undo.h" #include "version.h" -#include "graphics/GraphicsImage.h" -#include "graphics/GraphicsLoader.h" - #include "support/convert.h" #include "support/debug.h" #include "support/lassert.h" diff --git a/src/graphics/GraphicsCache.cpp b/src/graphics/GraphicsCache.cpp index 5f89c56..bf1b3fc 100644 --- a/src/graphics/GraphicsCache.cpp +++ b/src/graphics/GraphicsCache.cpp @@ -13,7 +13,6 @@ #include "GraphicsCache.h" #include "GraphicsCacheItem.h" -#include "GraphicsImage.h" #include "Format.h" @@ -21,7 +20,6 @@ #include "support/debug.h" #include "support/FileName.h" -#include "support/filetools.h" #include diff --git a/src/graphics/GraphicsConverter.cpp b/src/graphics/GraphicsConverter.cpp index 6c3e48d..1461fdb 100644 --- a/src/graphics/GraphicsConverter.cpp +++ b/src/graphics/GraphicsConverter.cpp @@ -12,12 +12,9 @@ #include "GraphicsConverter.h" -#include "Buffer.h" #include "Converter.h" #include "Format.h" -#include "LyXRC.h" -#include "frontends/alert.h" #include "support/lassert.h" #include "support/convert.h" #include "support/debug.h" @@ -25,7 +22,6 @@ #include "support/filetools.h" #include "support/ForkedCalls.h" #include "support/lstrings.h" -#include "support/os.h" #include "support/TempFile.h" diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index a7e37f3..de3f4a3 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -19,7 +19,6 @@ #include "Converter.h" #include "Encoding.h" #include "Format.h" -#include "InsetIterator.h" #include "LaTeXFeatures.h" #include "LyXRC.h" #include "output.h" @@ -29,8 +28,6 @@ #include "frontends/Application.h" // hexName -#include "insets/Inset.h" - #include "support/convert.h" #include "support/debug.h" #include "support/FileName.h" diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index bf9e1f5..60cfed2 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -20,7 +20,6 @@ #include "BufferView.h" #include "Converter.h" #include "Cursor.h" -#include "DispatchResult.h" #include "Encoding.h" #include "ErrorList.h" #include "Exporter.h" @@ -28,10 +27,8 @@ #include "FuncRequest.h" #include "FuncStatus.h" #include "LaTeXFeatures.h" -#include "LayoutFile.h" #include "LayoutModuleList.h" #include "LyX.h" -#include "Lexer.h" #include "MetricsInfo.h" #include "output_plaintext.h" #include "output_xhtml.h" diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp index 73bc21f..2c0c1e5 100644 --- a/src/insets/InsetLabel.cpp +++ b/src/insets/InsetLabel.cpp @@ -14,16 +14,12 @@ #include "InsetRef.h" -#include "buffer_funcs.h" #include "Buffer.h" #include "BufferParams.h" -#include "BufferView.h" #include "Cursor.h" #include "CutAndPaste.h" -#include "DispatchResult.h" #include "FuncRequest.h" #include "FuncStatus.h" -#include
[LyX/master] Make InsetIterator compatible with range-based loops
commit ad7c5568cd0969b13218167127f82eb3b40a7f2b Author: Yuriy Skalko Date: Fri Nov 27 20:10:52 2020 +0200 Make InsetIterator compatible with range-based loops --- src/Buffer.cpp | 28 +--- src/BufferEncodings.cpp |7 ++- src/CutAndPaste.cpp | 18 +- src/InsetIterator.cpp|4 ++-- src/InsetIterator.h |4 ++-- src/insets/InsetGraphics.cpp | 27 +-- src/insets/InsetTabular.cpp |9 - 7 files changed, 41 insertions(+), 56 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index f537ac0..058fb44 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1275,9 +1275,9 @@ void Buffer::updatePreviews() const if (!ploader) return; - InsetIterator it = inset_iterator_begin(*d->inset); - InsetIterator const end = inset_iterator_end(*d->inset); - for (; it != end; ++it) + InsetIterator it = begin(*d->inset); + InsetIterator const itend = end(*d->inset); + for (; it != itend; ++it) it->addPreview(it, *ploader); ploader->startLoading(); @@ -2581,7 +2581,7 @@ void Buffer::collectBibKeys(FileNameList & checkedFiles) const if (!parent()) clearIncludeList(); - for (InsetIterator it = inset_iterator_begin(inset()); it; ++it) { + for (InsetIterator it = begin(inset()); it; ++it) { it->collectBibKeys(it, checkedFiles); if (it->lyxCode() == BIBITEM_CODE) { if (parent() != nullptr) @@ -2959,10 +2959,10 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr) docstring const oldname = from_utf8(func.getArg(0)); docstring const newname = from_utf8(func.getArg(1)); - InsetIterator it = inset_iterator_begin(inset()); - InsetIterator const end = inset_iterator_end(inset()); + InsetIterator it = begin(inset()); + InsetIterator const itend = end(inset()); bool success = false; - for (; it != end; ++it) { + for (; it != itend; ++it) { if (it->lyxCode() == BRANCH_CODE) { InsetBranch & ins = static_cast(*it); if (ins.branch() == oldname) { @@ -3841,11 +3841,9 @@ void Buffer::updateMacros() const void Buffer::getUsedBranches(std::list & result, bool const from_master) const { - InsetIterator it = inset_iterator_begin(inset()); - InsetIterator const end = inset_iterator_end(inset()); - for (; it != end; ++it) { - if (it->lyxCode() == BRANCH_CODE) { - InsetBranch & br = static_cast(*it); + for (Inset const & it : inset()) { + if (it.lyxCode() == BRANCH_CODE) { + InsetBranch const & br = static_cast(it); docstring const name = br.branch(); if (!from_master && !params().branchlist().find(name)) result.push_back(name); @@ -3853,10 +3851,10 @@ void Buffer::getUsedBranches(std::list & result, bool const from_mast result.push_back(name); continue; } - if (it->lyxCode() == INCLUDE_CODE) { + if (it.lyxCode() == INCLUDE_CODE) { // get buffer of external file InsetInclude const & ins = - static_cast(*it); + static_cast(it); Buffer * child = ins.loadIfNeeded(); if (!child) continue; @@ -4027,7 +4025,7 @@ void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to) string const paramName = "key"; UndoGroupHelper ugh(this); - InsetIterator it = inset_iterator_begin(inset()); + InsetIterator it = begin(inset()); for (; it; ++it) { if (it->lyxCode() != CITE_CODE) continue; diff --git a/src/BufferEncodings.cpp b/src/BufferEncodings.cpp index d4f08fc..dcf422d 100644 --- a/src/BufferEncodings.cpp +++ b/src/BufferEncodings.cpp @@ -35,11 +35,8 @@ void BufferEncodings::initUnicodeMath(Buffer const & buffer, bool for_master) } // Check this buffer - Inset & inset = buffer.inset(); - InsetIterator it = inset_iterator_begin(inset); - InsetIterator const end = inset_iterator_end(inset); - for (; it != end; ++it) - it->initUnicodeMath(); + for (Inset const & it : buffer.inset()) + it.initUnicodeMath(); if (!for_master) return;
[LyX/master] Remove unused Counters::copy
commit 00d07d67326e7e2b65d17a2054f61a72fe34fc7d Author: Yuriy Skalko Date: Fri Nov 27 23:41:06 2020 +0200 Remove unused Counters::copy --- src/Counters.cpp | 10 -- src/Counters.h |4 2 files changed, 0 insertions(+), 14 deletions(-) diff --git a/src/Counters.cpp b/src/Counters.cpp index 139dc9b..6376b64 100644 --- a/src/Counters.cpp +++ b/src/Counters.cpp @@ -413,16 +413,6 @@ bool Counters::remove(docstring const & cnt) } -void Counters::copy(Counters const & from, Counters & to, docstring const & match) const -{ - for (auto const & ctr : counterList_) { - if (ctr.first.find(match) != string::npos || match == "") { - to.set(ctr.first, from.value(ctr.first)); - } - } -} - - docstring Counters::labelItem(docstring const & ctr, docstring const & numbertype) const { diff --git a/src/Counters.h b/src/Counters.h index e6554a2..ecd6853 100644 --- a/src/Counters.h +++ b/src/Counters.h @@ -160,10 +160,6 @@ public: void reset(docstring const & match); /// Remove counter \p cnt. bool remove(docstring const & cnt); - /// Copy counters whose name matches match from the to - /// the array of counters. Empty string matches all. - void copy(Counters const & from, Counters & to, - docstring const & match = docstring()) const; /** returns the expanded string representation of counter \c * c. The \c lang code is used to translate the string. */ -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Use range-based loops
commit e97daf9e13f450fd1828b944c0db94d0efff52c9 Author: Yuriy Skalko Date: Fri Nov 27 11:09:16 2020 +0200 Use range-based loops --- src/graphics/GraphicsCache.cpp | 23 ++- 1 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/graphics/GraphicsCache.cpp b/src/graphics/GraphicsCache.cpp index dbf9caf..5f89c56 100644 --- a/src/graphics/GraphicsCache.cpp +++ b/src/graphics/GraphicsCache.cpp @@ -70,18 +70,10 @@ vector const & Cache::loadableFormats() const if (!fmts.empty()) return fmts; - // The formats recognised by LyX - Formats::const_iterator begin = theFormats().begin(); - Formats::const_iterator end = theFormats().end(); - - // The formats natively loadable. - vector nformat = frontend::loadableImageFormats(); - - vector::const_iterator it = nformat.begin(); - for (; it != nformat.end(); ++it) { - for (Formats::const_iterator fit = begin; fit != end; ++fit) { - if (fit->extension() == *it) { - fmts.push_back(fit->name()); + for (string const & native_extension : frontend::loadableImageFormats()) { + for (Format const & format : theFormats()) { + if (format.extension() == native_extension) { + fmts.push_back(format.name()); break; } } @@ -89,11 +81,8 @@ vector const & Cache::loadableFormats() const if (lyxerr.debugging()) { LYXERR(Debug::GRAPHICS, "LyX recognises the following image formats:"); - - vector::const_iterator fbegin = fmts.begin(); - vector::const_iterator fend = fmts.end(); - for (vector::const_iterator fit = fbegin; fit != fend; ++fit) { - LYXERR(Debug::GRAPHICS, *fit << ','); + for (string const & format : fmts) { + LYXERR(Debug::GRAPHICS, format << ','); } } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update CMake for minimum GCC version: 4.9
commit b4b2d01ea7f6d63bc052f0c82c18bf6e0e08503e Author: Yuriy Skalko Date: Wed Nov 25 00:00:28 2020 +0200 Update CMake for minimum GCC version: 4.9 --- CMakeLists.txt | 19 ++- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 808a0cc..b35f2f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,9 +77,9 @@ if(NOT help AND NOT HELP) # 'project' triggers the searching for a compiler project(${LYX_PROJECT}) if (CMAKE_COMPILER_IS_GNUCXX) -if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.0") +if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9") message(STATUS "Gnu CXX compiler version = ${CMAKE_CXX_COMPILER_VERSION}") - message(STATUS "is too old, should be >= 4.0") + message(STATUS "is too old, should be >= 4.9") message(FATAL_ERROR "Exiting") endif() endif() @@ -396,25 +396,18 @@ if(UNIX OR MINGW) #message(STATUS "dumpversion: error = ${_error}, result = ${_err}") endif() message(STATUS "Using GCC version ${GCC_VERSION}") - if(GCC_VERSION VERSION_LESS 4.6) - message(FATAL_ERROR "gcc >= 4.6 is required.") - elseif(GCC_VERSION VERSION_LESS 4.9) - # in gcc is unusable in versions less than 4.9.0 - # see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 - set(LYX_USE_STD_REGEX 0) - else() - set(LYX_USE_STD_REGEX 1) + if(GCC_VERSION VERSION_LESS 4.9) + message(FATAL_ERROR "gcc >= 4.9 is required.") endif() + set(LYX_USE_STD_REGEX 1) endif() set(LYX_GCC11_MODE "${CXX11_FLAG}") else() if(MSVC_VERSION LESS 1900) # Drop support for msvc versions prior to 1900 (Visual Studio 2015) message(FATAL_ERROR "Visual Studio >= 2015 is required.") - set(LYX_USE_STD_REGEX 0) - else() - set(LYX_USE_STD_REGEX 1) endif() + set(LYX_USE_STD_REGEX 1) endif() if(LYX_3RDPARTY_BUILD) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Always use std::regex
commit f3ec89cfa15feae8aa3185413eda55f28cc6551e Author: Yuriy Skalko Date: Sat Nov 21 20:11:23 2020 +0200 Always use std::regex Since now minimum supported GCC is 4.9. --- 3rdparty/Makefile.am |3 -- 3rdparty/boost/libs/CMakeLists.txt |8 +- CMakeLists.txt | 52 --- config/lyxinclude.m4 | 41 development/cmake/config.h.cmake |2 - src/frontends/qt/GuiCitation.cpp |9 -- src/frontends/tests/biblio.cpp |8 - src/support/regex.h| 45 +++ 8 files changed, 23 insertions(+), 145 deletions(-) diff --git a/3rdparty/Makefile.am b/3rdparty/Makefile.am index e21e1cb..ec12adb 100644 --- a/3rdparty/Makefile.am +++ b/3rdparty/Makefile.am @@ -3,11 +3,8 @@ include $(top_srcdir)/config/common.am DIST_SUBDIRS = boost dtl hunspell mythes libiconv zlib if USE_INCLUDED_BOOST -if LYX_USE_STD_REGEX -else BOOST = boost endif -endif if USE_INCLUDED_HUNSPELL HUNSPELL = hunspell diff --git a/3rdparty/boost/libs/CMakeLists.txt b/3rdparty/boost/libs/CMakeLists.txt index d2fdd7f..84da81e 100644 --- a/3rdparty/boost/libs/CMakeLists.txt +++ b/3rdparty/boost/libs/CMakeLists.txt @@ -6,10 +6,4 @@ project(boost) - -if(LYX_USE_STD_REGEX) - message(STATUS "Using std regex") -else() - add_subdirectory(regex) -endif() - +message(STATUS "Using std regex") diff --git a/CMakeLists.txt b/CMakeLists.txt index b35f2f5..02a1b30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -380,13 +380,7 @@ unset(LYX_GCC11_MODE) if(UNIX OR MINGW) if (CMAKE_CXX_COMPILER_ID MATCHES "^([cC]lang|AppleClang)$") # ignore the GCC_VERSION for clang - # and use the resulting CXX11_STD_REGEX found in FindCXX11Compiler.cmake message(STATUS "Using clang") - if(CXX11_STD_REGEX) - set(LYX_USE_STD_REGEX 1) - else() - set(LYX_USE_STD_REGEX 0) - endif() else() execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpfullversion OUTPUT_VARIABLE GCC_VERSION ERROR_VARIABLE _error RESULT_VARIABLE _err OUTPUT_STRIP_TRAILING_WHITESPACE) #message(STATUS "dumpfullversion: error = ${_error}, result = ${_err}") @@ -399,7 +393,6 @@ if(UNIX OR MINGW) if(GCC_VERSION VERSION_LESS 4.9) message(FATAL_ERROR "gcc >= 4.9 is required.") endif() - set(LYX_USE_STD_REGEX 1) endif() set(LYX_GCC11_MODE "${CXX11_FLAG}") else() @@ -407,7 +400,6 @@ else() # Drop support for msvc versions prior to 1900 (Visual Studio 2015) message(FATAL_ERROR "Visual Studio >= 2015 is required.") endif() - set(LYX_USE_STD_REGEX 1) endif() if(LYX_3RDPARTY_BUILD) @@ -941,40 +933,12 @@ if(NOT LYX_EXTERNAL_DTL) add_subdirectory(3rdparty/dtl) endif() -if(LYX_USE_STD_REGEX) - # Set only include path. - # Use internal boost, which is known to exist - # we don't need any libraries - set(Lyx_Boost_Libraries) - add_definitions(-DBOOST_USER_CONFIG=) - include_directories(${TOP_SRC_DIR}/3rdparty/boost) -else() - # Using boost-regex - if(LYX_EXTERNAL_BOOST) -message(STATUS "Searching for external boost") -find_package(Boost COMPONENTS regex) -if(Boost_FOUND) - message(STATUS "Boost found") - message(STATUS "Boost-libs = ${Boost_LIBRARIES}") - set(Lyx_Boost_Libraries ${Boost_LIBRARIES}) - if (LYX_STDLIB_DEBUG OR LYX_DEBUG_GLIBC OR LYX_DEBUG_GLIBC_PEDANTIC) - # Comment from Jean-Marc Lasgouttes: - # In general, system boost libraries are incompatible with - # the use of stdlib-debug in libstdc++. See ticket #9736 for - # details. - message(FATAL_ERROR "Compiling LyX with stdlib-debug and system boost libraries may lead to crashes. Consider using '-DLYX_STDLIB_DEBUG=OFF -DLYX_DEBUG_GLIBC=OFF -DLYX_DEBUG_GLIBC_PEDANTIC=OFF' or using '-DLYX_EXTERNAL_BOOST=OFF'") - endif() -else() - message(FATAL_ERROR "Boost not found" ${Boost_ERROR_REASON}) -endif() - else() -# Using included boost -set(Lyx_Boost_Libraries boost_regex) -add_definitions(-DBOOST_USER_CONFIG=) -include_directories(${TOP_SRC_DIR}/3rdparty/boost) -add_subdirectory(3rdparty/boost "${TOP_BINARY_DIR}/3rdparty/boost") - endif() -endif() +# Set only include path. +# Use internal boost, which is known to exist +# we don't need any libraries +set(Lyx_Boost_Libraries) +add_definitions(-DBOOST_USER_CONFIG=) +include_directories(${TOP_SRC_DIR}/3rdparty/boost) if(WIN32) if(LYX_CONSOLE) @@ -1175,10 +1139,6 @@ if(QTVERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+).*") MATH(EXPR QT4_VERSION "(${CMAKE_MATCH_1}<<16)|(${CMAKE_MATCH_2
[LyX/master] Move several common types to support/types.h
commit 6a21ec854b356fbbc89aaf99b2a23e4c3de4aca6 Author: Yuriy Skalko Date: Sat Nov 21 00:06:05 2020 +0200 Move several common types to support/types.h --- src/Buffer.cpp |4 +- src/Changes.h|4 +- src/CursorSlice.cpp |4 +- src/CursorSlice.h|7 -- src/CutAndPaste.cpp | 26 +++--- src/CutAndPaste.h|9 --- src/DocIterator.cpp |8 +++--- src/DocIterator.h|8 --- src/TexRow.h |4 --- src/Text2.cpp|2 +- src/frontends/qt/GuiTabular.cpp | 16 +++--- src/insets/Inset.cpp |2 +- src/insets/Inset.h | 12 -- src/insets/InsetTabular.cpp | 42 +++--- src/insets/InsetTabular.h|7 +- src/mathed/InsetMath.h |3 -- src/mathed/InsetMathBig.cpp |2 +- src/mathed/InsetMathCancelto.cpp |2 +- src/mathed/InsetMathFrac.cpp |8 +++--- src/mathed/InsetMathGrid.cpp | 16 +++--- src/mathed/InsetMathMacro.cpp|4 +- src/mathed/InsetMathNest.cpp |2 +- src/mathed/InsetMathRoot.cpp |2 +- src/mathed/InsetMathScript.cpp |2 +- src/mathed/MathParser.cpp| 20 +- src/support/types.h | 10 + 26 files changed, 99 insertions(+), 127 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 23f6315..f537ac0 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3882,9 +3882,9 @@ void Buffer::updateMacroInstances(UpdateType utype) const continue; // update macro in all cells of the InsetMathNest - DocIterator::idx_type n = minset->nargs(); + idx_type n = minset->nargs(); MacroContext mc = MacroContext(this, it); - for (DocIterator::idx_type i = 0; i < n; ++i) { + for (idx_type i = 0; i < n; ++i) { MathData & data = minset->cell(i); data.updateMacros(nullptr, mc, utype, 0); } diff --git a/src/Changes.h b/src/Changes.h index 61e32b7..da9fef2 100644 --- a/src/Changes.h +++ b/src/Changes.h @@ -102,11 +102,11 @@ public: /// erase the entry at pos and adjust all range bounds past it /// (assumes that a character was deleted at pos) - void erase(lyx::pos_type pos); + void erase(pos_type pos); /// insert a new entry at pos and adjust all range bounds past it /// (assumes that a character was inserted at pos) - void insert(Change const & change, lyx::pos_type pos); + void insert(Change const & change, pos_type pos); /// diff --git a/src/CursorSlice.cpp b/src/CursorSlice.cpp index 872a911..105df96 100644 --- a/src/CursorSlice.cpp +++ b/src/CursorSlice.cpp @@ -76,14 +76,14 @@ pit_type CursorSlice::lastpit() const } -CursorSlice::row_type CursorSlice::row() const +row_type CursorSlice::row() const { LASSERT(inset_, return 0); return inset_->row(idx_); } -CursorSlice::col_type CursorSlice::col() const +col_type CursorSlice::col() const { LASSERT(inset_, return 0); return inset_->col(idx_); diff --git a/src/CursorSlice.h b/src/CursorSlice.h index 9f91ade..eb865de 100644 --- a/src/CursorSlice.h +++ b/src/CursorSlice.h @@ -44,13 +44,6 @@ public: friend class StableDocIterator; //@} - /// type for cell number in inset - typedef size_t idx_type; - /// type for row indices - typedef size_t row_type; - /// type for col indices - typedef size_t col_type; - /// CursorSlice(); /// diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index ee3418d..a1c4de5 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -728,8 +728,8 @@ void copySelectionHelper(Buffer const & buf, Text const & text, namespace cap { void region(CursorSlice const & i1, CursorSlice const & i2, - Inset::row_type & r1, Inset::row_type & r2, - Inset::col_type & c1, Inset::col_type & c2) + row_type & r1, row_type & r2, + col_type & c1, col_type & c2) { Inset const & p = i1.inset(); c1 = p.col(i1.idx()); @@ -1413,20 +1413,20 @@ void eraseSelection(Cursor & cur) cur.pos() = cur.lastpos(); } else if (p->nrows() > 0 && p->ncols() > 0) { // This is a grid, delete a nice square region - Inset::row_type r1, r2; - Inset::col_type c1, c2; + row_type r1, r2; + col_type c1, c2; region(i1, i2, r1, r2, c1, c2); - for (Inset:
[LyX/master] Constify
commit 8cb728c2d7a6b70dccb7651f300d9812f645d2ea Author: Yuriy Skalko Date: Thu Nov 26 01:11:07 2020 +0200 Constify --- src/Counters.cpp |2 +- src/Counters.h|2 +- src/Server.cpp|2 +- src/Server.h |4 ++-- src/graphics/PreviewImage.cpp |4 ++-- src/lyxfind.cpp | 28 ++-- src/tex2lyx/Parser.cpp|2 +- src/tex2lyx/Parser.h |2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Counters.cpp b/src/Counters.cpp index 8477d52..139dc9b 100644 --- a/src/Counters.cpp +++ b/src/Counters.cpp @@ -413,7 +413,7 @@ bool Counters::remove(docstring const & cnt) } -void Counters::copy(Counters const & from, Counters & to, docstring const & match) +void Counters::copy(Counters const & from, Counters & to, docstring const & match) const { for (auto const & ctr : counterList_) { if (ctr.first.find(match) != string::npos || match == "") { diff --git a/src/Counters.h b/src/Counters.h index 4708f5a..e6554a2 100644 --- a/src/Counters.h +++ b/src/Counters.h @@ -163,7 +163,7 @@ public: /// Copy counters whose name matches match from the to /// the array of counters. Empty string matches all. void copy(Counters const & from, Counters & to, - docstring const & match = docstring()); + docstring const & match = docstring()) const; /** returns the expanded string representation of counter \c * c. The \c lang code is used to translate the string. */ diff --git a/src/Server.cpp b/src/Server.cpp index fe50392..7934049 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -1003,7 +1003,7 @@ struct Sleep : QThread } // namespace -bool LyXComm::loadFilesInOtherInstance() +bool LyXComm::loadFilesInOtherInstance() const { int pipefd; FileName const pipe(inPipeName()); diff --git a/src/Server.h b/src/Server.h index 9257704..b277284 100644 --- a/src/Server.h +++ b/src/Server.h @@ -120,7 +120,7 @@ private: void closeConnection(); /// Load files in another running instance of LyX - bool loadFilesInOtherInstance(); + bool loadFilesInOtherInstance() const; #ifndef _WIN32 /// start a pipe @@ -212,7 +212,7 @@ public: /// void notifyClient(std::string const &); /// - bool deferredLoadingToOtherInstance() { return pipes_.deferredLoading(); } + bool deferredLoadingToOtherInstance() const { return pipes_.deferredLoading(); } /// whilst crashing etc. void emergencyCleanup() { pipes_.emergencyCleanup(); } diff --git a/src/graphics/PreviewImage.cpp b/src/graphics/PreviewImage.cpp index b80bf94..062dd6e 100644 --- a/src/graphics/PreviewImage.cpp +++ b/src/graphics/PreviewImage.cpp @@ -35,7 +35,7 @@ public: /// ~Impl(); /// - Image const * image(); + Image const * image() const; /// void statusChanged(); @@ -125,7 +125,7 @@ PreviewImage::Impl::~Impl() } -Image const * PreviewImage::Impl::image() +Image const * PreviewImage::Impl::image() const { if (iloader_.status() == WaitingToLoad) iloader_.startLoading(); diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index c438052..fc7b0b7 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -1101,20 +1101,20 @@ public: int depts[MAXOPENED]; int closes[MAXOPENED]; int actualdeptindex; - int previousNotIgnored(int); - int nextNotIgnored(int); + int previousNotIgnored(int) const; + int nextNotIgnored(int) const; void handleOpenP(int i); void handleCloseP(int i, bool closingAllowed); void resetOpenedP(int openPos); void addIntervall(int upper); void addIntervall(int low, int upper); /* if explicit */ void removeAccents(); - void setForDefaultLang(KeyInfo const & defLang); + void setForDefaultLang(KeyInfo const & defLang) const; int findclosing(int start, int end, char up, char down, int repeat); void handleParentheses(int lastpos, bool closingAllowed); bool hasTitle; int langcount; // Number of disabled language specs up to current position in actual interval - int isOpeningPar(int pos); + int isOpeningPar(int pos) const; string titleValue; void output(ostringstream , int lastpos); // string show(int lastpos); @@ -1122,7 +1122,7 @@ public: vector Intervall::borders = vector(30); -int Intervall::isOpeningPar(int pos) +int Intervall::isOpeningPar(int pos) const { if ((pos < 0) || (size_t(pos) >= par.size())) return 0; @@ -1137,7 +1137,7 @@ int Intervall::isOpeningPar(int pos) return 1; } -void Intervall::setForDefaultLang(KeyInfo const & defLang) +void Intervall::setForDefaultLang(KeyInfo const & defLang) const { // Enable the use of first token again if (ignoreidx >=
[LyX/master] Use to_string function
commit 816512879d724e2902019fee8585bead3064 Author: Yuriy Skalko Date: Thu Nov 26 00:17:29 2020 +0200 Use to_string function --- src/client/client.cpp | 10 +- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/src/client/client.cpp b/src/client/client.cpp index dd69fe2..0a80107 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -93,14 +93,6 @@ Messages const & getMessages(string const &) namespace support { -string itoa(unsigned int i) -{ - char buf[20]; - sprintf(buf, "%d", i); - return buf; -} - - /// Returns the absolute pathnames of all lyx local sockets in /// file system encoding. /// Parts stolen from lyx::support::DirList(). @@ -469,7 +461,7 @@ int h(vector const &) docstring clientName = - from_ascii(itoa(::getppid()) + ">" + itoa(::getpid())); + from_ascii(to_string(::getppid()) + ">" + to_string(::getpid())); int n(vector const & arg) { -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Fix signed integer overflow on x = 0, detected by GCC sanitizer
commit fdefff1108d43739b6631015f55fb3cc94cfed2b Author: Yuriy Skalko Date: Thu Nov 26 23:01:18 2020 +0200 Fix signed integer overflow on x = 0, detected by GCC sanitizer --- src/support/lstrings.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp index f0e79b8..9aac66a 100644 --- a/src/support/lstrings.cpp +++ b/src/support/lstrings.cpp @@ -1446,8 +1446,8 @@ std::string formatFPNumber(double x) os << std::fixed; // Prevent outputs of 23.4217 but output small numbers // with at least 6 significant digits. - double const logarithm = log10(fabs(x)); - os << std::setprecision(max(6 - iround(logarithm), 0)) << x; + int const precision = (x == 0.0) ? 0 : max(6 - iround(log10(fabs(x))), 0); + os << std::setprecision(precision) << x; string result = os.str(); if (result.find('.') != string::npos) { result = rtrim(result, "0"); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Replace ;;
commit 8793c2eed949cd925a933724ead36326d8cc549c Author: Yuriy Skalko Date: Thu Nov 26 22:14:43 2020 +0200 Replace ;; --- src/insets/InsetNewpage.cpp |2 +- src/mathed/InsetMathGrid.cpp |2 +- src/mathed/InsetMathMacroTemplate.cpp |2 +- src/mathed/InsetMathSpecialChar.cpp |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/insets/InsetNewpage.cpp b/src/insets/InsetNewpage.cpp index 7e91e68..7acd3a0 100644 --- a/src/insets/InsetNewpage.cpp +++ b/src/insets/InsetNewpage.cpp @@ -162,7 +162,7 @@ void InsetNewpage::draw(PainterInfo & pi, int x, int y) const pi.pain.lines(xp, yp, 2, ColorName()); //mid-rule - xp[0] = xp[1] = int(x + wid * 0.5);; + xp[0] = xp[1] = int(x + wid * 0.5); yp[0] = int(y - 0.875 * asc * 0.75); yp[1] = int(y - 0.125 * asc * 0.75); pi.pain.lines(xp, yp, 2, ColorName()); diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp index ba3bda6..7158df2 100644 --- a/src/mathed/InsetMathGrid.cpp +++ b/src/mathed/InsetMathGrid.cpp @@ -483,7 +483,7 @@ void InsetMathGrid::metrics(MetricsInfo & mi, Dimension & dim) const colinfo_[ncols()].width = 0; // compute horizontal offsets - colinfo_[0].offset = border() + colinfo_[0].lines * vlinesep();; + colinfo_[0].offset = border() + colinfo_[0].lines * vlinesep(); for (col_type col = 1; col <= ncols(); ++col) { colinfo_[col].offset = colinfo_[col - 1].offset + diff --git a/src/mathed/InsetMathMacroTemplate.cpp b/src/mathed/InsetMathMacroTemplate.cpp index 1152936..7f43586 100644 --- a/src/mathed/InsetMathMacroTemplate.cpp +++ b/src/mathed/InsetMathMacroTemplate.cpp @@ -573,7 +573,7 @@ void InsetMathMacroTemplate::metrics(MetricsInfo & mi, Dimension & dim) const if (macro) macro->unlock(); - dim.wid += leftOffset(mi.base.bv) + rightOffset(mi.base.bv);; + dim.wid += leftOffset(mi.base.bv) + rightOffset(mi.base.bv); dim.des += bottomOffset(mi.base.bv); dim.asc += topOffset(mi.base.bv); } diff --git a/src/mathed/InsetMathSpecialChar.cpp b/src/mathed/InsetMathSpecialChar.cpp index 701bcc8..f2a9a73 100644 --- a/src/mathed/InsetMathSpecialChar.cpp +++ b/src/mathed/InsetMathSpecialChar.cpp @@ -56,7 +56,7 @@ Inset * InsetMathSpecialChar::clone() const void InsetMathSpecialChar::metrics(MetricsInfo & mi, Dimension & dim) const { if (mi.base.fontname == "mathnormal") { - Changer dummy = mi.base.font.changeShape(UP_SHAPE);; + Changer dummy = mi.base.font.changeShape(UP_SHAPE); dim = theFontMetrics(mi.base.font).dimension(char_); } else { frontend::FontMetrics const & fm = theFontMetrics(mi.base.font); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Use iround function, amend c0ce79452f
commit 59e2becdd8041d92d3b3a98d36440494c975c845 Author: Yuriy Skalko Date: Thu Nov 26 22:10:45 2020 +0200 Use iround function, amend c0ce79452f --- src/Row.cpp |5 +++-- src/Spacing.cpp |5 +++-- src/graphics/PreviewImage.cpp |3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Row.cpp b/src/Row.cpp index 9ab7f11..02923d1 100644 --- a/src/Row.cpp +++ b/src/Row.cpp @@ -26,6 +26,7 @@ #include "support/debug.h" #include "support/lassert.h" #include "support/lstrings.h" +#include "support/lyxlib.h" #include #include @@ -297,7 +298,7 @@ int Row::left_x() const x += cit->full_width(); ++cit; } - return int(x + 0.5); + return support::iround(x); } @@ -313,7 +314,7 @@ int Row::right_x() const else break; } - return int(x + 0.5); + return support::iround(x); } diff --git a/src/Spacing.cpp b/src/Spacing.cpp index 9ac8345..ce64539 100644 --- a/src/Spacing.cpp +++ b/src/Spacing.cpp @@ -12,8 +12,9 @@ #include #include "Spacing.h" -#include "support/lstrings.h" #include "support/convert.h" +#include "support/lstrings.h" +#include "support/lyxlib.h" #include @@ -55,7 +56,7 @@ void Spacing::set(Spacing::Space sp, string const & val) { space = sp; if (sp == Other) { - switch (int(convert(val) * 1000 + 0.5)) { + switch (support::iround(convert(val) * 1000)) { case 1000: space = Single; break; diff --git a/src/graphics/PreviewImage.cpp b/src/graphics/PreviewImage.cpp index 062dd6e..b31af6f 100644 --- a/src/graphics/PreviewImage.cpp +++ b/src/graphics/PreviewImage.cpp @@ -19,6 +19,7 @@ #include "PreviewLoader.h" #include "support/FileName.h" +#include "support/lyxlib.h" using namespace std; @@ -85,7 +86,7 @@ Dimension PreviewImage::dim() const if (!image) return dim; - dim.asc = int(pimpl_->ascent_frac_ * double(image->height()) + 0.5); + dim.asc = support::iround(pimpl_->ascent_frac_ * double(image->height())); dim.des = image->height() - dim.asc; dim.wid = image->width(); return dim; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Update ru/UserGuide.lyx
commit 13ab1a4d8b518ac1edb85fbd49c6d6f3b89e7521 Author: Yuriy Skalko Date: Sun Nov 22 21:43:15 2020 +0200 Update ru/UserGuide.lyx --- lib/doc/ru/UserGuide.lyx | 28 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/doc/ru/UserGuide.lyx b/lib/doc/ru/UserGuide.lyx index 2e5e927..9954005 100644 --- a/lib/doc/ru/UserGuide.lyx +++ b/lib/doc/ru/UserGuide.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 598 +\lyxformat 599 \begin_document \begin_header \save_transient_properties true @@ -34287,7 +34287,7 @@ status collapsed \begin_layout Plain Layout -https://sourceforge.net/projects/lyxwininstaller/files/hunspell/ +https://www.lyx.org/trac/export/HEAD/lyxsvn/dictionaries/trunk/dicts/ \end_layout \end_inset @@ -34296,9 +34296,13 @@ https://sourceforge.net/projects/lyxwininstaller/files/hunspell/ \begin_inset Newline newline \end_inset -Для каждого языка имеется 2 файла. - Чтобы установить словарь в Windows, скопируйте 2 файла в подкаталог установки - \SpecialChar LyX +Для каждого языка нужно скачать 2 файла (используйте ссылку +\emph on +Original Format +\emph default + в конце открывшейся страницы). + Чтобы установить словарь в Windows, скопируйте эти 2 файла в подкаталог + установки \SpecialChar LyX \family typewriter ~ @@ -34667,8 +34671,8 @@ user/ \end_layout \begin_layout Standard -Если вы желаете установить новые/дополнительные словари тезауруса, то можете - скачать их здесь: +Если вы желаете установить обновленные или дополнительные словари тезауруса, + то можете скачать их здесь: \begin_inset Newline newline \end_inset @@ -34678,7 +34682,7 @@ status collapsed \begin_layout Plain Layout -https://sourceforge.net/projects/lyxwininstaller/files/thesaurus/ +https://www.lyx.org/trac/export/HEAD/lyxsvn/dictionaries/trunk/thes/ \end_layout \end_inset @@ -34687,17 +34691,17 @@ https://sourceforge.net/projects/lyxwininstaller/files/thesaurus/ \end_layout \begin_layout Standard -Для установки нового словаря, загрузите два файла для этого словаря в место, - указанное путем к тезаурусу (который установлен в +Для установки нового словаря, загрузите два файла для этого словаря в каталог, + путь которого установлен в \family sans Инструменты\SpecialChar menuseparator Настройки\SpecialChar menuseparator Пути\SpecialChar menuseparator Словари тезауруса \family default -) и перезапустите \SpecialChar LyX +, и перезапустите \SpecialChar LyX . - Если этот путь еще не определен, вы можете расположть словарь в необходимом + Если этот путь еще не определен, вы можете расположить словарь в подходящем месте, по вашему выбору, и указать это \SpecialChar LyX . \end_layout -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Fix loop variable, amend d8e8a93a58
commit 0a8d3c9887a2f332ce298e809b237b10213b70d9 Author: Yuriy Skalko Date: Wed Nov 25 20:24:36 2020 +0200 Fix loop variable, amend d8e8a93a58 --- src/frontends/qt/GuiView.cpp |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index d9e7fb2..31c8f88 100644 --- a/src/frontends/qt/GuiView.cpp +++ b/src/frontends/qt/GuiView.cpp @@ -2500,19 +2500,17 @@ static bool import(GuiView * lv, FileName const & filename, string loader_format; vector loaders = theConverters().loaders(); if (find(loaders.begin(), loaders.end(), format) == loaders.end()) { - vector::const_iterator it = loaders.begin(); - vector::const_iterator en = loaders.end(); for (string const & loader : loaders) { if (!theConverters().isReachable(format, loader)) continue; string const tofile = support::changeExtension(filename.absFileName(), - theFormats().extension(*it)); + theFormats().extension(loader)); if (theConverters().convert(nullptr, filename, FileName(tofile), - filename, format, *it, errorList) != Converters::SUCCESS) + filename, format, loader, errorList) != Converters::SUCCESS) return false; - loader_format = *it; + loader_format = loader; break; } if (loader_format.empty()) { -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs