The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 06cac41193e82e5e10d36958abc21129ba89cdbb
Author: Richard Heck <[email protected]>
Date:   Sat Feb 9 14:31:26 2013 -0500

    Add "NoInsetLayout" tag for Uwe. Fixes bug #8545.

diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx
index 0de6d4a..6329644 100644
--- a/lib/doc/Customization.lyx
+++ b/lib/doc/Customization.lyx
@@ -1,5 +1,5 @@
 #LyX 2.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 460
+\lyxformat 461
 \begin_document
 \begin_header
 \textclass scrbook
@@ -18532,6 +18532,51 @@ protect
 not
 \emph default
  whether the command should itself be protected.) Default is false.
+\change_inserted 1414654397 1360681873
+
+\end_layout
+
+\begin_layout Description
+
+\change_inserted 1414654397 1360681892
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted 1414654397 1360681880
+NoInsetLayout
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted 1414654397 1360681883
+<layout>
+\end_layout
+
+\end_inset
+
+] Deletes an existing 
+\begin_inset Flex Code
+status open
+
+\begin_layout Plain Layout
+
+\change_inserted 1414654397 1360681892
+InsetLayout
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+.
 \end_layout
 
 \begin_layout Description
diff --git a/lib/scripts/layout2layout.py b/lib/scripts/layout2layout.py
index b6345f1..bded39d 100644
--- a/lib/scripts/layout2layout.py
+++ b/lib/scripts/layout2layout.py
@@ -151,6 +151,9 @@ import os, re, string, sys
 # Remove COUNTER label style; rename as STATIC
 # Rename TOP_ENVIRONMENT to ABOVE and CENTERED_TOP_ENVIRONMENT to CENTERED
 
+# Incremented to format 45, 12 February 2013 by rgh
+# New Tag "NoInsetLayout"
+
 # Do not forget to document format change in Customization
 # Manual (section "Declaring a new text class").
 
@@ -375,6 +378,11 @@ def convert(lines):
                 i += 1
             continue
         
+        if format == 44:
+            # nothing to do.
+            i += 1
+            continue
+
         if format == 43:
           match = re_LabelTypeIsCounter.match(lines[i])
           if match:
diff --git a/src/TextClass.cpp b/src/TextClass.cpp
index 3609dee..a34cf90 100644
--- a/src/TextClass.cpp
+++ b/src/TextClass.cpp
@@ -182,6 +182,7 @@ enum TextClassTags {
        TC_IFSTYLE,
        TC_DEFAULTSTYLE,
        TC_INSETLAYOUT,
+       TC_NOINSETLAYOUT,
        TC_NOSTYLE,
        TC_COLUMNS,
        TC_SIDES,
@@ -250,6 +251,7 @@ LexerKeyword textClassTags[] = {
        { "leftmargin",        TC_LEFTMARGIN },
        { "nocounter",         TC_NOCOUNTER },
        { "nofloat",           TC_NOFLOAT },
+       { "noinsetlayout",     TC_NOINSETLAYOUT },
        { "nostyle",           TC_NOSTYLE },
        { "outputformat",      TC_OUTPUTFORMAT },
        { "outputtype",        TC_OUTPUTTYPE },
@@ -525,6 +527,16 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, 
ReadType rt)
                        }
                        break;
 
+               case TC_NOINSETLAYOUT:
+                       if (lexrc.next()) {
+                               docstring const style = 
from_utf8(subst(lexrc.getString(),
+                                                                '_', ' '));
+                               if (!deleteInsetLayout(style))
+                                       LYXERR0("Style `" << style << "' cannot 
be removed\n"
+                                               "because it was not found!");
+                       }
+                       break;
+
                case TC_COLUMNS:
                        if (lexrc.next())
                                columns_ = lexrc.getInteger();
@@ -1315,6 +1327,12 @@ bool TextClass::deleteLayout(docstring const & name)
 }
 
 
+bool TextClass::deleteInsetLayout(docstring const & name)
+{
+       return insetlayoutlist_.erase(name);
+}
+
+
 // Load textclass info if not loaded yet
 bool TextClass::load(string const & path) const
 {
diff --git a/src/TextClass.h b/src/TextClass.h
index b3daa4c..bc900fa 100644
--- a/src/TextClass.h
+++ b/src/TextClass.h
@@ -333,6 +333,8 @@ private:
        ///
        bool deleteLayout(docstring const &);
        ///
+       bool deleteInsetLayout(docstring const &);
+       ///
        bool convertLayoutFormat(support::FileName const &, ReadType);
        /// Reads the layout file without running layout2layout.
        ReturnValues readWithoutConv(support::FileName const & filename, 
ReadType rt);

-----------------------------------------------------------------------

Summary of changes:
 lib/doc/Customization.lyx    |   47 +++++++++++++++++++++++++++++++++++++++++-
 lib/scripts/layout2layout.py |    8 +++++++
 src/TextClass.cpp            |   18 ++++++++++++++++
 src/TextClass.h              |    2 +
 4 files changed, 74 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to