]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.cpp
update SCons
[lyx.git] / src / Layout.cpp
index 6dfc0f5dcf7c1838c3a81f1ae73f77dad23323bc..a9a5487b989e624d10203f0bccb20b34d666efd3 100644 (file)
@@ -23,7 +23,7 @@
 #include "support/lassert.h"
 #include "support/lstrings.h"
 
-#include <boost/regex.hpp>
+#include "support/regex.h"
 
 using namespace std;
 using namespace lyx::support;
@@ -507,9 +507,15 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
                        break;
                }
                        
-               case LT_REFPREFIX:
-                       lex >> refprefix;
+               case LT_REFPREFIX: {
+                       docstring arg;
+                       lex >> arg;
+                       if (arg == "OFF")
+                               refprefix.clear();
+                       else
+                               refprefix = arg;
                        break;
+               }
 
                case LT_HTMLTAG:
                        lex >> htmltag_;
@@ -873,11 +879,11 @@ docstring const i18npreamble(Language const * lang, docstring const & templ)
        LASSERT(false, /**/);
 #else
        // FIXME UNICODE
-       // boost::regex is not unicode-safe.
+       // lyx::regex is not unicode-safe.
        // Should use QRegExp or (boost::u32regex, but that requires ICU)
-       static boost::regex const reg("_\\(([^\\)]+)\\)");
-       boost::smatch sub;
-       while (boost::regex_search(preamble, sub, reg)) {
+       static regex const reg("_\\(([^\\)]+)\\)");
+       smatch sub;
+       while (regex_search(preamble, sub, reg)) {
                string const key = sub.str(1);
                string translated;
                if (isAscii(key))