[LyX/master] Fix ru Beamer_Article polyglossia exports

2020-09-12 Thread Scott Kostyshak
commit 06855a66ca2a88a23749a6d9354b6062793301d8
Author: Scott Kostyshak 
Date:   Sun Sep 13 01:27:19 2020 -0400

Fix ru Beamer_Article polyglossia exports

Set fonts to DejaVu to avoid the following error:

  ! Package polyglossia Error: The current latin font  does not
  contain the "Cyrillic" script!

This choice of font is consistent with the Russian intro and
tutorial manuals.
---
 .../Beamer_Article_%28Standard_Class%29.lyx|6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/lib/examples/ru/Presentations/Beamer_Article_%28Standard_Class%29.lyx 
b/lib/examples/ru/Presentations/Beamer_Article_%28Standard_Class%29.lyx
index d2c5db4..d5fff81 100644
--- a/lib/examples/ru/Presentations/Beamer_Article_%28Standard_Class%29.lyx
+++ b/lib/examples/ru/Presentations/Beamer_Article_%28Standard_Class%29.lyx
@@ -11,9 +11,9 @@
 \language_package default
 \inputencoding utf8
 \fontencoding auto
-\font_roman "default" "default"
-\font_sans "default" "default"
-\font_typewriter "default" "default"
+\font_roman "default" "DejaVu Serif"
+\font_sans "default" "DejaVu Sans"
+\font_typewriter "default" "DejaVu Sans Mono"
 \font_math "auto" "auto"
 \font_default_family default
 \use_non_tex_fonts false
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX features/feature/docbook] DocBook: slight code simplification.

2020-09-12 Thread Thibaut Cuvelier
The branch, feature/docbook, has been updated.

- Log -

commit 85d8c77522a0d4cbc1ea7f690a6252cf7a01c205
Author: Thibaut Cuvelier 
Date:   Sun Sep 13 01:50:11 2020 +0200

DocBook: slight code simplification.

diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index c8ddc1a..0d0aa10 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -1087,8 +1087,7 @@ void docbookParagraphs(Text const ,
 
// Close all sections before the bibliography.
// TODO: Only close all when the bibliography is at the end of 
the document? Or force to output the bibliography at the end of the document? 
Or don't care (as allowed by DocBook)?
-   auto insetsLength = distance(par->insetList().begin(), 
par->insetList().end());
-   if (insetsLength > 0) {
+   if (!par->insetList().empty()) {
Inset const *firstInset = par->getInset(0);
if (firstInset && (firstInset->lyxCode() == 
BIBITEM_CODE || firstInset->lyxCode() == BIBTEX_CODE)) {
while (!headerLevels.empty()) {

---

Summary of changes:
 src/output_docbook.cpp |3 +--
 1 files changed, 1 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


[LyX/master] Fix documentation for LFUN_LAYOUT

2020-09-12 Thread Scott Kostyshak
commit 670da1817e30241d9aeb76660cf9518ff3bee071
Author: Scott Kostyshak 
Date:   Sat Sep 12 19:29:01 2020 -0400

Fix documentation for LFUN_LAYOUT

The argument 'ignorenests' was renamed to 'ignoreautonests' at
d6fb2abb.
---
 src/LyXAction.cpp |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp
index 3e1e023..23cc745 100644
--- a/src/LyXAction.cpp
+++ b/src/LyXAction.cpp
@@ -2386,9 +2386,9 @@ void LyXAction::init()
 /*!
  * \var lyx::FuncCode lyx::LFUN_LAYOUT
  * \li Action: Sets the layout (that is, environment) for the current 
paragraph.
- * \li Syntax: layout  [ignorenests]
+ * \li Syntax: layout  [ignoreautonests]
  * \li Params: : the layout to use\n
-   ignorenests: If specified, nesting advices will be ignored.
+   ignoreautonests: If specified, nesting advices will be ignored.
  * \endvar
  */
{ LFUN_LAYOUT, "layout", Noop, Layout },
@@ -2399,9 +2399,9 @@ void LyXAction::init()
  * \li Notion: Contrary to `layout', this function resets the current
  * (or selection) layout to the standard layout it already has the
  * correct layout. Useful for toolbar icons.
- * \li Syntax: layout-toggle  [ignorenests]
+ * \li Syntax: layout-toggle  [ignoreautonests]
  * \li Params: : the layout to toggle\n
-   ignorenests: If specified, nesting advices will be ignored.
+   ignoreautonests: If specified, nesting advices will be ignored.
  * \li Origin: lasgouttes, 14 May 2018
  * \endvar
  */
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX features/feature/docbook] ru Beamer: make absolute path relative

2020-09-12 Thread Scott Kostyshak
The branch, feature/docbook, has been updated.
  discards  c8e76e78e7db859455bfd91dc24af7a1a79257da (commit)
  discards  e432855a30661e5e8a786b146cfb9aee2717e524 (commit)
  discards  ffef28772219aedf874a0747518116d144ddc3e5 (commit)
  discards  8456ff160df443656ba51dfdd1ff34cfc5188e7a (commit)
  discards  510299ae4a96ffb734192b2e5ec36949457811bb (commit)
  discards  71f8d419e4ca3114e6e527725b673e580e713040 (commit)
  discards  e00770d1e9f94a82b8c3719167480ab2b15ce049 (commit)
  discards  c15863a8a62d3bd167bb9213b34545e0a2742dad (commit)
  discards  6011a6eb0ef6eb393ea6e1c9e9fde4e2d696e93c (commit)
  discards  a74c1963559feef65a5342714e248d4b4c65beb7 (commit)
  discards  604ba1b77e788d2c5c865cb59c81aaec36dcd43f (commit)
  discards  67784de1f95ca4bc3225e24778d715b2f8007c6d (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (c8e76e78e7db859455bfd91dc24af7a1a79257da)
\
 N -- N -- N (98f92809874d68dc6c329cfd81a409331bc68d81)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

- Log -

commit 98f92809874d68dc6c329cfd81a409331bc68d81
Author: Scott Kostyshak 
Date:   Fri Sep 11 00:51:10 2020 -0400

ru Beamer: make absolute path relative

(cherry picked from commit 6a5f1f380e5e988367fdb0ffa86e5177ff88e3ff)

diff --git a/lib/examples/ru/Presentations/Beamer.lyx 
b/lib/examples/ru/Presentations/Beamer.lyx
index 3a8acc3..d91272e 100644
--- a/lib/examples/ru/Presentations/Beamer.lyx
+++ b/lib/examples/ru/Presentations/Beamer.lyx
@@ -124,7 +124,7 @@ status collapsed
 
 \begin_layout TitleGraphic
 \begin_inset Graphics
-   filename C:/Program Files (x86)/LyX 
2.3/Resources/doc/clipart/3D-structure-distort.pdf
+   filename ../../../doc/clipart/3D-structure-distort.pdf
lyxscale 30
scale 10
 

commit 46f12f6a97e633a1776b10abe46369740efaa88d
Author: Thibaut Cuvelier 
Date:   Sat Sep 12 03:21:08 2020 +0200

DocBook: fix output in Layout::write.

diff --git a/lib/layouts/aastex.layout b/lib/layouts/aastex.layout
index 78089a4..37dbd07 100644
--- a/lib/layouts/aastex.layout
+++ b/lib/layouts/aastex.layout
@@ -204,7 +204,7 @@ Style Altaffilation
  Color green
EndFont
DocBookTagaffiliation
-   DocBookAttr   role="alternate"
+   DocBookAttr   role='alternate'
DocBookWrapperTag author
DocBookWrapperMergeWithPrevious   true
DocBookItemTagorgname
diff --git a/lib/layouts/shapepar.module b/lib/layouts/shapepar.module
index 6b38cdf..2b2fbfe 100644
--- a/lib/layouts/shapepar.module
+++ b/lib/layouts/shapepar.module
@@ -36,50 +36,50 @@ Style "CD label"
Align   Block
LabelType   No_Label
DocBookWrapperTag  sidebar
-   DocBookWrapperAttr role="cd-label"
+   DocBookWrapperAttr role='cd-label'
DocBookTag  para
 End
 
 Style "Circle"
CopyStyle   "CD label"
LatexName   circlepar
-   DocBookWrapperAttr role="circle"
+   DocBookWrapperAttr role='circle'
 End
 
 Style "Diamond"
CopyStyle   "CD label"
LatexName   diamondpar
-   DocBookWrapperAttr role="diamond"
+   DocBookWrapperAttr role='diamond'
 End
 
 Style "Heart"
CopyStyle   "CD label"
LatexName   heartpar
-   DocBookWrapperAttr role="heart"
+   DocBookWrapperAttr role='heart'
 End
 
 Style "Hexagon"
CopyStyle   "CD label"
LatexName   hexagonpar
-   DocBookWrapperAttr role="hexagon"
+   DocBookWrapperAttr role='hexagon'
 End
 
 Style "Nut"
CopyStyle   "CD label"
LatexName   nutpar
-   DocBookWrapperAttr role="nut"
+   DocBookWrapperAttr role='nut'
 End
 
 Style "Square"
CopyStyle   "CD label"
LatexName   squarepar
-   DocBookWrapperAttr role="square"
+   DocBookWrapperAttr role='square'
 End
 
 Style "Star"
CopyStyle   "CD label"
LatexName   starpar
-   DocBookWrapperAttr role="star"
+   DocBookWrapperAttr role='star'
 End
 
 # now the shapes defined in the .def files
@@ -87,49 +87,49 @@ End
 Style "Candle"
CopyStyle   "CD label"
LatexName   shapepar{\candle}
-   DocBookWrapperAttr role="candle"
+   DocBookWrapperAttr role='candle'
 End
 
 Style "Drop down"
CopyStyle   "CD label"
LatexName   droppar
-   DocBookWrapperAttr role="drop-down"
+   DocBookWrapperAttr role='drop-down'
 End
 
 Style "Drop up"
   

[LyX features/feature/docbook] ru Beamer: make absolute path relative

2020-09-12 Thread Scott Kostyshak
The branch, feature/docbook, has been updated.
  discards  69722a4f8f5eb7aa4ff589131d9364fa5f3b65d4 (commit)
  discards  f59d11169efbd034760a008916771f25125c29c8 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (69722a4f8f5eb7aa4ff589131d9364fa5f3b65d4)
\
 N -- N -- N (c8e76e78e7db859455bfd91dc24af7a1a79257da)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

- Log -

commit c8e76e78e7db859455bfd91dc24af7a1a79257da
Author: Scott Kostyshak 
Date:   Fri Sep 11 00:51:10 2020 -0400

ru Beamer: make absolute path relative

(cherry picked from commit 6a5f1f380e5e988367fdb0ffa86e5177ff88e3ff)

diff --git a/lib/examples/ru/Presentations/Beamer.lyx 
b/lib/examples/ru/Presentations/Beamer.lyx
index 3a8acc3..d91272e 100644
--- a/lib/examples/ru/Presentations/Beamer.lyx
+++ b/lib/examples/ru/Presentations/Beamer.lyx
@@ -124,7 +124,7 @@ status collapsed
 
 \begin_layout TitleGraphic
 \begin_inset Graphics
-   filename C:/Program Files (x86)/LyX 
2.3/Resources/doc/clipart/3D-structure-distort.pdf
+   filename ../../../doc/clipart/3D-structure-distort.pdf
lyxscale 30
scale 10
 

commit e432855a30661e5e8a786b146cfb9aee2717e524
Author: Thibaut Cuvelier 
Date:   Sat Sep 12 03:21:08 2020 +0200

DocBook: fix output in Layout::write.

diff --git a/lib/layouts/aastex.layout b/lib/layouts/aastex.layout
index 78089a4..37dbd07 100644
--- a/lib/layouts/aastex.layout
+++ b/lib/layouts/aastex.layout
@@ -204,7 +204,7 @@ Style Altaffilation
  Color green
EndFont
DocBookTagaffiliation
-   DocBookAttr   role="alternate"
+   DocBookAttr   role='alternate'
DocBookWrapperTag author
DocBookWrapperMergeWithPrevious   true
DocBookItemTagorgname
diff --git a/lib/layouts/shapepar.module b/lib/layouts/shapepar.module
index 6b38cdf..2b2fbfe 100644
--- a/lib/layouts/shapepar.module
+++ b/lib/layouts/shapepar.module
@@ -36,50 +36,50 @@ Style "CD label"
Align   Block
LabelType   No_Label
DocBookWrapperTag  sidebar
-   DocBookWrapperAttr role="cd-label"
+   DocBookWrapperAttr role='cd-label'
DocBookTag  para
 End
 
 Style "Circle"
CopyStyle   "CD label"
LatexName   circlepar
-   DocBookWrapperAttr role="circle"
+   DocBookWrapperAttr role='circle'
 End
 
 Style "Diamond"
CopyStyle   "CD label"
LatexName   diamondpar
-   DocBookWrapperAttr role="diamond"
+   DocBookWrapperAttr role='diamond'
 End
 
 Style "Heart"
CopyStyle   "CD label"
LatexName   heartpar
-   DocBookWrapperAttr role="heart"
+   DocBookWrapperAttr role='heart'
 End
 
 Style "Hexagon"
CopyStyle   "CD label"
LatexName   hexagonpar
-   DocBookWrapperAttr role="hexagon"
+   DocBookWrapperAttr role='hexagon'
 End
 
 Style "Nut"
CopyStyle   "CD label"
LatexName   nutpar
-   DocBookWrapperAttr role="nut"
+   DocBookWrapperAttr role='nut'
 End
 
 Style "Square"
CopyStyle   "CD label"
LatexName   squarepar
-   DocBookWrapperAttr role="square"
+   DocBookWrapperAttr role='square'
 End
 
 Style "Star"
CopyStyle   "CD label"
LatexName   starpar
-   DocBookWrapperAttr role="star"
+   DocBookWrapperAttr role='star'
 End
 
 # now the shapes defined in the .def files
@@ -87,49 +87,49 @@ End
 Style "Candle"
CopyStyle   "CD label"
LatexName   shapepar{\candle}
-   DocBookWrapperAttr role="candle"
+   DocBookWrapperAttr role='candle'
 End
 
 Style "Drop down"
CopyStyle   "CD label"
LatexName   droppar
-   DocBookWrapperAttr role="drop-down"
+   DocBookWrapperAttr role='drop-down'
 End
 
 Style "Drop up"
CopyStyle   "CD label"
LatexName   dropuppar
-   DocBookWrapperAttr role="drop-up"
+   DocBookWrapperAttr role='drop-up'
 End
 
 Style "TeX"
CopyStyle   "CD label"
LatexName   shapepar{\TeXshape}
-   DocBookWrapperAttr role="tex"
+   DocBookWrapperAttr role='tex'
 End
 
 Style "Triangle up"
CopyStyle   "CD label"
LatexName   triangleuppar
-   DocBookWrapperAttr role="triangle-up"
+   DocBookWrapperAttr role='triangle-up'
 End
 
 Style "Triangle down"
CopyStyle   "CD label"
LatexName   triangledownpar

[LyX features/feature/docbook] ru Beamer: make absolute path relative

2020-09-12 Thread Scott Kostyshak
The branch, feature/docbook, has been updated.
  discards  472ecc4c8b2d18486c7a7140a03879a88f12e67e (commit)
  discards  b2881c270bd7891d6d2f92559d8007e5a419a743 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (472ecc4c8b2d18486c7a7140a03879a88f12e67e)
\
 N -- N -- N (69722a4f8f5eb7aa4ff589131d9364fa5f3b65d4)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

- Log -

commit 69722a4f8f5eb7aa4ff589131d9364fa5f3b65d4
Author: Scott Kostyshak 
Date:   Fri Sep 11 00:51:10 2020 -0400

ru Beamer: make absolute path relative

(cherry picked from commit 6a5f1f380e5e988367fdb0ffa86e5177ff88e3ff)

diff --git a/lib/examples/ru/Presentations/Beamer.lyx 
b/lib/examples/ru/Presentations/Beamer.lyx
index 3a8acc3..d91272e 100644
--- a/lib/examples/ru/Presentations/Beamer.lyx
+++ b/lib/examples/ru/Presentations/Beamer.lyx
@@ -124,7 +124,7 @@ status collapsed
 
 \begin_layout TitleGraphic
 \begin_inset Graphics
-   filename C:/Program Files (x86)/LyX 
2.3/Resources/doc/clipart/3D-structure-distort.pdf
+   filename ../../../doc/clipart/3D-structure-distort.pdf
lyxscale 30
scale 10
 

commit f59d11169efbd034760a008916771f25125c29c8
Author: Thibaut Cuvelier 
Date:   Sat Sep 12 03:21:08 2020 +0200

DocBook: fix output in Layout::write.

diff --git a/lib/layouts/stdstarsections.inc b/lib/layouts/stdstarsections.inc
index 60354b1..0159b07 100644
--- a/lib/layouts/stdstarsections.inc
+++ b/lib/layouts/stdstarsections.inc
@@ -49,7 +49,7 @@ Style Section*
LabelCounter""
ResetArgs   1
DocBookTagbridgehead
-   DocBookAttr   renderas="sect1"
+   DocBookAttr   renderas='sect1'
DocBookSectionTag NONE
DocBookForceAbstractTag NONE
 End
@@ -64,7 +64,7 @@ Style Subsection*
LabelCounter""
ResetArgs   1
DocBookTagbridgehead
-   DocBookAttr   renderas="sect2"
+   DocBookAttr   renderas='sect2'
DocBookSectionTag NONE
DocBookForceAbstractTag NONE
 End
@@ -79,7 +79,7 @@ Style Subsubsection*
LabelCounter""
ResetArgs   1
DocBookTagbridgehead
-   DocBookAttr   renderas="sect3"
+   DocBookAttr   renderas='sect3'
DocBookSectionTag NONE
DocBookForceAbstractTag NONE
 End
@@ -94,7 +94,7 @@ Style Paragraph*
LabelCounter""
ResetArgs   1
DocBookTagbridgehead
-   DocBookAttr   renderas="sect4"
+   DocBookAttr   renderas='sect4'
DocBookSectionTag NONE
DocBookForceAbstractTag NONE
 End
@@ -109,7 +109,7 @@ Style Subparagraph*
LabelCounter""
ResetArgs   1
DocBookTagbridgehead
-   DocBookAttr   renderas="sect5"
+   DocBookAttr   renderas='sect5'
DocBookSectionTag NONE
DocBookForceAbstractTag NONE
 End
diff --git a/src/Layout.cpp b/src/Layout.cpp
index 102410d..f5e6f77 100644
--- a/src/Layout.cpp
+++ b/src/Layout.cpp
@@ -1643,7 +1643,7 @@ void Layout::write(ostream & os) const
if(!docbooktag_.empty())
os << "\tDocBookTag " << docbooktag_ << '\n';
if(!docbookattr_.empty())
-   os << "\tDocBookAttr " << docbookattr_ << '\n';
+   os << "\tDocBookAttr \"" << docbookattr_ << "\"\n";
if(!docbooktagtype_.empty())
os << "\tDocBookTagType " << docbooktagtype_ << '\n';
if(!docbookininfo_.empty())
@@ -1669,7 +1669,7 @@ void Layout::write(ostream & os) const
os << "\tDocBookItemWrapperAttr " << docbookitemwrapperattr_ << 
'\n';
if(!docbookitemwrappertagtype_.empty())
os << "\tDocBookItemWrapperTagType " << 
docbookitemwrappertagtype_ << '\n';
-   os << "\tDocBookItemWrapperMergeWithPrevious " << 
docbookwrappermergewithprevious_ << '\n';
+   os << "\tDocBookWrapperMergeWithPrevious " << 
docbookwrappermergewithprevious_ << '\n';
if(!docbookitemlabeltag_.empty())
os << "\tDocBookItemLabelTag " << docbookitemlabeltag_ << '\n';
if(!docbookitemlabelattr_.empty())

---

Summary of changes:
 lib/layouts/stdstarsections.inc |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Repository for new features
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org

[LyX features/feature/docbook] ru Beamer: make absolute path relative

2020-09-12 Thread Scott Kostyshak
The branch, feature/docbook, has been updated.
  discards  7dc72ef35dd5f119684cd97e195fc499640c0ee9 (commit)
  discards  6941db32e105967364ef14eac34b4990a5453f0f (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (7dc72ef35dd5f119684cd97e195fc499640c0ee9)
\
 N -- N -- N (472ecc4c8b2d18486c7a7140a03879a88f12e67e)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

- Log -

commit 472ecc4c8b2d18486c7a7140a03879a88f12e67e
Author: Scott Kostyshak 
Date:   Fri Sep 11 00:51:10 2020 -0400

ru Beamer: make absolute path relative

(cherry picked from commit 6a5f1f380e5e988367fdb0ffa86e5177ff88e3ff)

diff --git a/lib/examples/ru/Presentations/Beamer.lyx 
b/lib/examples/ru/Presentations/Beamer.lyx
index 3a8acc3..d91272e 100644
--- a/lib/examples/ru/Presentations/Beamer.lyx
+++ b/lib/examples/ru/Presentations/Beamer.lyx
@@ -124,7 +124,7 @@ status collapsed
 
 \begin_layout TitleGraphic
 \begin_inset Graphics
-   filename C:/Program Files (x86)/LyX 
2.3/Resources/doc/clipart/3D-structure-distort.pdf
+   filename ../../../doc/clipart/3D-structure-distort.pdf
lyxscale 30
scale 10
 

commit b2881c270bd7891d6d2f92559d8007e5a419a743
Author: Thibaut Cuvelier 
Date:   Sat Sep 12 03:21:08 2020 +0200

DocBook: fix output in Layout::write.

diff --git a/src/Layout.cpp b/src/Layout.cpp
index 102410d..f5e6f77 100644
--- a/src/Layout.cpp
+++ b/src/Layout.cpp
@@ -1643,7 +1643,7 @@ void Layout::write(ostream & os) const
if(!docbooktag_.empty())
os << "\tDocBookTag " << docbooktag_ << '\n';
if(!docbookattr_.empty())
-   os << "\tDocBookAttr " << docbookattr_ << '\n';
+   os << "\tDocBookAttr \"" << docbookattr_ << "\"\n";
if(!docbooktagtype_.empty())
os << "\tDocBookTagType " << docbooktagtype_ << '\n';
if(!docbookininfo_.empty())
@@ -1669,7 +1669,7 @@ void Layout::write(ostream & os) const
os << "\tDocBookItemWrapperAttr " << docbookitemwrapperattr_ << 
'\n';
if(!docbookitemwrappertagtype_.empty())
os << "\tDocBookItemWrapperTagType " << 
docbookitemwrappertagtype_ << '\n';
-   os << "\tDocBookItemWrapperMergeWithPrevious " << 
docbookwrappermergewithprevious_ << '\n';
+   os << "\tDocBookWrapperMergeWithPrevious " << 
docbookwrappermergewithprevious_ << '\n';
if(!docbookitemlabeltag_.empty())
os << "\tDocBookItemLabelTag " << docbookitemlabeltag_ << '\n';
if(!docbookitemlabelattr_.empty())

---

Summary of changes:
 src/Layout.cpp |2 +-
 1 files changed, 1 insertions(+), 1 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


[LyX/master] #6401 correct cursor movement for word forward/backward with enabled Mac style (mac_like_cursor_movement)

2020-09-12 Thread Stephan Witt
commit 320b6b66566978fb9c75de086b889f0d34c5cf87
Author: Stephan Witt 
Date:   Sat Sep 12 14:34:56 2020 +0200

#6401 correct cursor movement for word forward/backward with enabled Mac 
style (mac_like_cursor_movement)

The change includes a rewrite of the cursor movement when „mac style“ is 
enabled and don’t change anything otherwise.
The new code for mac uses the document iterator to go forward or backward. 
The traversal stops at word boundaries.
If going forward the position increments until a word is reached (if not 
already inside) and stops at the end of the word.
If going backward it does the same in opposite direction. The cursor jumps 
over non-editable insets and math.
Editable (open) insets are entered and the cursor move detects word 
boundaries inside them.
---
 src/Text.cpp |  150 +
 1 files changed, 97 insertions(+), 53 deletions(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index 59bfbef..575eea6 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -1146,30 +1146,53 @@ bool Text::cursorForwardOneWord(Cursor & cur)
 {
LBUFERR(this == cur.text());
 
-   pos_type const lastpos = cur.lastpos();
-   pit_type pit = cur.pit();
-   pos_type pos = cur.pos();
-   Paragraph const & par = cur.paragraph();
-
-   // Paragraph boundary is a word boundary
-   if (pos == lastpos || (pos + 1 == lastpos && par.isEnvSeparator(pos))) {
-   if (pit != cur.lastpit())
-   return setCursor(cur, pit + 1, 0);
-   else
-   return false;
-   }
-
if (lyxrc.mac_like_cursor_movement) {
-   // Skip through trailing punctuation and spaces.
-   while (pos != lastpos && (par.isChar(pos) || par.isSpace(pos)))
-   ++pos;
-
-   // Skip over either a non-char inset or a full word
-   if (pos != lastpos && par.isWordSeparator(pos))
-   ++pos;
-   else while (pos != lastpos && !par.isWordSeparator(pos))
-++pos;
+   DocIterator dit(cur);
+   DocIterator prv(cur);
+   bool inword = false;
+   bool intext = dit.inTexted();
+   while (!dit.atEnd()) {
+   if (dit.inTexted()) { // no paragraphs in mathed
+   Paragraph const & par = dit.paragraph();
+   pos_type const pos = dit.pos();
+
+   if (!par.isDeleted(pos)) {
+   bool wordsep = par.isWordSeparator(pos);
+   if (inword && wordsep)
+   break; // stop at word end
+   else if (!inword && !wordsep)
+   inword = true;
+   }
+   intext = true;
+   } else if (intext) {
+   // move to end of math
+   while (!dit.inTexted() && !dit.atEnd()) 
dit.forwardPos();
+   break;
+   }
+   prv = dit;
+   dit.forwardPosIgnoreCollapsed();
+   }
+   if (dit.atEnd()) dit = prv;
+   if (dit == cur) return false; // we didn't move
+   Cursor orig(cur);
+   cur.setCursor(dit);
+   // see comment above
+   cur.bv().checkDepm(cur, orig);
+   return true;
} else {
+   pos_type const lastpos = cur.lastpos();
+   pit_type pit = cur.pit();
+   pos_type pos = cur.pos();
+   Paragraph const & par = cur.paragraph();
+
+   // Paragraph boundary is a word boundary
+   if (pos == lastpos || (pos + 1 == lastpos && 
par.isEnvSeparator(pos))) {
+   if (pit != cur.lastpit())
+   return setCursor(cur, pit + 1, 0);
+   else
+   return false;
+   }
+
LASSERT(pos < lastpos, return false); // see above
if (!par.isWordSeparator(pos))
while (pos != lastpos && !par.isWordSeparator(pos))
@@ -1183,13 +1206,13 @@ bool Text::cursorForwardOneWord(Cursor & cur)
// Skip over white space
while (pos != lastpos && par.isSpace(pos))
 ++pos;
-   }
 
-   // Don't skip a separator inset at the end of a paragraph
-   if (pos == lastpos && pos && par.isEnvSeparator(pos - 1))
-   --pos;
+   // Don't skip a separator inset at the end of a paragraph
+   if (pos == lastpos && pos && par.isEnvSeparator(pos - 1))
+