]> git.lyx.org Git - features.git/commitdiff
Implement resetArgs to InsetLayout (#8437)
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 2 Dec 2012 09:16:26 +0000 (10:16 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 2 Dec 2012 09:16:26 +0000 (10:16 +0100)
lib/doc/Customization.lyx
src/insets/InsetLayout.cpp

index 7320540dc5d507b158ed1e684accd3d398fe637d..bf62213c46b70c1d9d76e9709c6f7201db978ac3 100644 (file)
@@ -17321,7 +17321,81 @@ reference "des:FreeSpacing"
 \end_inset
 
 ) for information on `features'.
+\change_inserted -712698321 1354439699
+
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -712698321 1354439705
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354439699
+ResetArgs
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354439699
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354439699
+1
+\end_layout
+
+\end_inset
+
+] Resets the LaTeX arguments of this layout (as defined via the 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354439699
+Argument
+\end_layout
+
+\end_inset
+
+ tag).
+ This is useful if you have copied a style via 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354439699
+CopyStyle
+\end_layout
+
+\end_inset
+
+, but you do not want to inherit its (required and optional) arguments.
+
+\change_deleted -712698321 1354439698
  
+\change_unchanged
+
 \end_layout
 
 \begin_layout Description
index 0d9e88e909064e95bbcb40f4edfb01e366248e51..a86bef26cc7272928d9a831c3f2e78e403eac14b 100644 (file)
@@ -117,9 +117,10 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
                IL_PREAMBLE,
                IL_REQUIRES,
                IL_RIGHTDELIM,
-               IL_SPELLCHECK,
                IL_REFPREFIX,
+               IL_RESETARGS,
                IL_RESETSFONT,
+               IL_SPELLCHECK,
                IL_END
        };
 
@@ -166,6 +167,7 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
                { "preamble", IL_PREAMBLE },
                { "refprefix", IL_REFPREFIX },
                { "requires", IL_REQUIRES },
+               { "resetargs", IL_RESETARGS },
                { "resetsfont", IL_RESETSFONT },
                { "rightdelim", IL_RIGHTDELIM },
                { "spellcheck", IL_SPELLCHECK }
@@ -331,6 +333,12 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
                        labelfont_ = font_;
                        break;
                }
+               case IL_RESETARGS:
+                       bool reset;
+                       lex >> reset;
+                       if (reset)
+                               latexargs_.clear();
+                       break;
                case IL_ARGUMENT:
                        readArgument(lex);
                        break;