commit f330b50c6324bcefeb4e3029827ffac3c83e145f
Author: Juergen Spitzmueller <[email protected]>
Date: Fri Aug 22 16:25:32 2025 +0200
Add StepParentCounter to InsetLayout
---
lib/doc/Customization.lyx | 53 ++++++++++++++++++++++++++++++++++++++++++++
lib/doc/de/Customization.lyx | 35 +++++++++++++++++++++++++++++
lib/scripts/layout2layout.py | 1 +
src/insets/InsetLayout.cpp | 7 +++++-
src/insets/InsetLayout.h | 4 ++++
5 files changed, 99 insertions(+), 1 deletion(-)
diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx
index 99b400246e..9fd4588a08 100644
--- a/lib/doc/Customization.lyx
+++ b/lib/doc/Customization.lyx
@@ -23800,6 +23800,53 @@ status collapsed
\change_unchanged
Allow spell-checking the contents of this inset.
Default is true.
+\change_inserted -712698321 1755872621
+
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -712698321 1755872640
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755872622
+StepParentCounter
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755872622
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1755872622
+1
+\end_layout
+
+\end_inset
+
+] Steps the parent counter of the counter of this inset at the beginning of
the inset.
+\change_unchanged
+
\end_layout
\begin_layout Subsection
@@ -26045,6 +26092,8 @@ status collapsed
\change_inserted -712698321 1755842965
StepOtherCounter
+\change_unchanged
+
\end_layout
\end_inset
@@ -26057,6 +26106,8 @@ status collapsed
\change_inserted -712698321 1755842953
string
+\change_unchanged
+
\end_layout
\end_inset
@@ -26087,6 +26138,8 @@ status collapsed
\change_inserted -712698321 1755843121
StepOtherCounter
+\change_unchanged
+
\end_layout
\end_inset
diff --git a/lib/doc/de/Customization.lyx b/lib/doc/de/Customization.lyx
index c8c71510d8..2694ddea46 100644
--- a/lib/doc/de/Customization.lyx
+++ b/lib/doc/de/Customization.lyx
@@ -21538,6 +21538,41 @@ status collapsed
den Inhalt der Einfügung auf Rechtschreibung zu überprüfen.
\end_layout
+\begin_layout Description
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+StepParentCounter
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] Erhöht den Hauptzähler des gegebenen Zählers dieser Einfügung (so vorhanden)
am Anfang der Einfügung.
+\end_layout
+
\begin_layout Subsection
Argumente
\begin_inset CommandInset label
diff --git a/lib/scripts/layout2layout.py b/lib/scripts/layout2layout.py
index 18f852fa34..0ae1dd8b6f 100644
--- a/lib/scripts/layout2layout.py
+++ b/lib/scripts/layout2layout.py
@@ -268,6 +268,7 @@ currentFormat = 111
# Incremented to format 81, 12 August 2019 by rikiheck
# New tag GuiName for counters
+# Add tag StepParentCounter to InsetLayout
# Incremented to format 82, 4 June 2017 by tcuvelier
# - Add new tags for Layout:
diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp
index f376dbcc20..1a50b53a03 100644
--- a/src/insets/InsetLayout.cpp
+++ b/src/insets/InsetLayout.cpp
@@ -156,6 +156,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const &
tclass,
IL_RESETARGS,
IL_RESETSFONT,
IL_SPELLCHECK,
+ IL_STEPPARENTCOUNTER,
IL_END
};
@@ -248,7 +249,8 @@ bool InsetLayout::read(Lexer & lex, TextClass const &
tclass,
{ "resetargs", IL_RESETARGS },
{ "resetsfont", IL_RESETSFONT },
{ "rightdelim", IL_RIGHTDELIM },
- { "spellcheck", IL_SPELLCHECK }
+ { "spellcheck", IL_SPELLCHECK },
+ { "stepparentcounter", IL_STEPPARENTCOUNTER }
};
lex.pushTable(elementTags);
@@ -692,6 +694,9 @@ bool InsetLayout::read(Lexer & lex, TextClass const &
tclass,
case IL_ALLOWED_OCCURRENCES_PER_ITEM:
lex >> allowed_occurrences_per_item_;
break;
+ case IL_STEPPARENTCOUNTER:
+ lex >> stepparentcounter_;
+ break;
case IL_END:
getout = true;
break;
diff --git a/src/insets/InsetLayout.h b/src/insets/InsetLayout.h
index 19e432ef23..b485acddff 100644
--- a/src/insets/InsetLayout.h
+++ b/src/insets/InsetLayout.h
@@ -272,6 +272,8 @@ public:
bool allowedOccurrencesPerItem() const { return
allowed_occurrences_per_item_; }
///
bool insertCotext() const { return insert_cotext_; }
+ ///
+ bool stepParentCounter() const { return stepparentcounter_; }
private:
///
void makeDefaultCSS() const;
@@ -471,6 +473,8 @@ private:
bool allowed_occurrences_per_item_ = false;
///
bool insert_cotext_ = false;
+ /// Step parent counter?
+ bool stepparentcounter_ = false;
};
///
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs