]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.cpp
Update Russian localization
[lyx.git] / src / Layout.cpp
index 942a1e37b9aaec591bfb463a204d0469ef93914b..ff123dc32ef74c84eb76b00956dfdec4b67026c3 100644 (file)
@@ -117,6 +117,7 @@ enum LayoutTags {
        LT_DOCBOOKWRAPPERATTR,
        LT_DOCBOOKWRAPPERTAGTYPE,
        LT_DOCBOOKWRAPPERMERGEWITHPREVIOUS,
+       LT_DOCBOOKSECTION,
        LT_DOCBOOKSECTIONTAG,
        LT_DOCBOOKITEMWRAPPERTAG,
        LT_DOCBOOKITEMWRAPPERATTR,
@@ -137,7 +138,7 @@ enum LayoutTags {
        LT_REFPREFIX,
        LT_RESETARGS,
        LT_RESUMECOUNTER,
-       LT_STEPMASTERCOUNTER,
+       LT_STEPPARENTCOUNTER,
        LT_RIGHTDELIM,
        LT_FORCELOCAL,
        LT_TOGGLE_INDENT,
@@ -155,7 +156,7 @@ Layout::Layout()
        margintype = MARGIN_STATIC;
        latextype = LATEX_PARAGRAPH;
        resumecounter = false;
-       stepmastercounter = false;
+       stepparentcounter = false;
        intitle = false;
        inpreamble = false;
        needprotect = false;
@@ -190,6 +191,7 @@ Layout::Layout()
        htmltitle_ = false;
        docbookabstract_ = false;
        docbookwrappermergewithprevious_ = false;
+       docbooksection_ = false;
        spellcheck = true;
        forcelocal = 0;
        itemcommand_ = "item";
@@ -253,6 +255,7 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass,
                { "docbookitemwrapperattr",    LT_DOCBOOKITEMWRAPPERATTR },
                { "docbookitemwrappertag",     LT_DOCBOOKITEMWRAPPERTAG },
                { "docbookitemwrappertagtype", LT_DOCBOOKITEMWRAPPERTAGTYPE },
+               { "docbooksection",            LT_DOCBOOKSECTION },
                { "docbooksectiontag",         LT_DOCBOOKSECTIONTAG },
                { "docbooktag",                LT_DOCBOOKTAG },
                { "docbooktagtype",            LT_DOCBOOKTAGTYPE },
@@ -324,7 +327,7 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass,
                { "rightmargin",    LT_RIGHTMARGIN },
                { "spacing",        LT_SPACING },
                { "spellcheck",     LT_SPELLCHECK },
-               { "stepmastercounter",  LT_STEPMASTERCOUNTER },
+               { "stepparentcounter",  LT_STEPPARENTCOUNTER },
                { "textfont",       LT_TEXTFONT },
                { "toclevel",       LT_TOCLEVEL },
                { "toggleindent",   LT_TOGGLE_INDENT },
@@ -444,8 +447,8 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass,
                        lex >> resumecounter;
                        break;
 
-               case LT_STEPMASTERCOUNTER:
-                       lex >> stepmastercounter;
+               case LT_STEPPARENTCOUNTER:
+                       lex >> stepparentcounter;
                        break;
 
                case LT_ARGUMENT:
@@ -797,6 +800,10 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass,
                        lex >> docbookwrappermergewithprevious_;
                        break;
 
+               case LT_DOCBOOKSECTION:
+                       lex >> docbooksection_;
+                       break;
+
                case LT_DOCBOOKSECTIONTAG:
                        lex >> docbooksectiontag_;
                        break;
@@ -1261,6 +1268,15 @@ void Layout::readArgument(Lexer & lex, bool validating)
                } else if (tok == "freespacing") {
                        lex.next();
                        arg.free_spacing = lex.getBool();
+               } else if (tok == "docbooktag") {
+                       lex.next();
+                       arg.docbooktag = lex.getDocString();
+               } else if (tok == "docbookattr") {
+                       lex.next();
+                       arg.docbookattr = lex.getDocString();
+               } else if (tok == "docbooktagtype") {
+                       lex.next();
+                       arg.docbooktagtype = lex.getDocString();
                } else {
                        lex.printError("Unknown tag");
                        error = true;
@@ -1384,7 +1400,7 @@ void Layout::write(ostream & os) const
              "\tInPreamble " << inpreamble << "\n"
              "\tTocLevel " << toclevel << "\n"
              "\tResumeCounter " << resumecounter << "\n"
-            "\tStepMasterCounter " << stepmastercounter << '\n';
+             "\tStepParentCounter " << stepparentcounter << '\n';
        // ResetArgs does not make sense here
        for (LaTeXArgMap::const_iterator it = latexargs_.begin();
             it != latexargs_.end(); ++it)
@@ -1672,6 +1688,7 @@ void Layout::write(ostream & os) const
                os << "\tDocBookWrapperAttr " << docbookwrapperattr_ << '\n';
        if(!docbookwrappertagtype_.empty())
                os << "\tDocBookWrapperTagType " << docbookwrappertagtype_ << '\n';
+       os << "\tDocBookSection " << docbooksection_ << '\n';
        if(!docbooksectiontag_.empty())
                os << "\tDocBookSectionTag " << docbooksectiontag_ << '\n';
        if(!docbookitemtag_.empty())
@@ -1868,7 +1885,7 @@ string const & Layout::docbookattr() const
 }
 
 
-bool isValidTagType(std::string type)
+bool isValidTagType(std::string const & type)
 {
        return !(type.empty() || (type != "block" && type != "paragraph" && type != "inline"));
 }