]> git.lyx.org Git - features.git/commitdiff
Replace CDATA argument as innertag.
authorJosé Matox <jamatos@lyx.org>
Sat, 30 Oct 2004 18:44:55 +0000 (18:44 +0000)
committerJosé Matox <jamatos@lyx.org>
Sat, 30 Oct 2004 18:44:55 +0000 (18:44 +0000)
Use CDATA if environment requires PassThru.
The code now feels more natural, as there is one less exception.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9148 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ChangeLog
lib/layouts/db_lyxmacros.inc
src/ChangeLog
src/output_docbook.C
src/paragraph.C

index 90a5460265c8f49213c80ef36e11cf1d8a0ec8c9..2e37fa5385b540f0ea7933a3f0e7a45a74f42fac 100644 (file)
@@ -1,3 +1,7 @@
+2004-10-30  José Matos  <jamatos@lyx.org>
+
+       * layouts/db_lyxmacros.inc: Remove innertag "CDATA" from Code.
+
 2004-10-30  José Matos  <jamatos@lyx.org>
 
        * layouts/db_stdlayouts.inc: remove SGML paragraph type.
index a93467d6ff8297ed6ebed2b8765012445b2eb28f..c43bc3546b5884e0207363407469e6faabf53d12 100644 (file)
@@ -11,7 +11,6 @@ Style Code
        CopyStyle             LyX-Code
        LatexType             Environment
        LatexName             screen
-       InnerTag              CDATA
        PassThru              1
 End
 
index 52167a5abc32150c1222886670d3ef1120e3e5e2..16edfe0062ab803c4702cede73a28db1cfdfe6a5 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-30  José Matos  <jamatos@lyx.org>
+
+       * paragraph.C (getFirstWord): the content should always be escaped there.
+       (simpleDocBookOnePar):
+       * output_docbook.C (makeEnvironment): replace reference to CDATA to style pass_thru.
+
 2004-10-30  José Matos  <jamatos@lyx.org>
 
        * paragraph.C (simpleDocBookOnePar): fix reference to CDATA.
index 47c8eefd4754e875b74256ac78b2047bdd8aae91..a46b0856800a32706294e2c00fe4e1b3da38f368 100644 (file)
@@ -132,7 +132,7 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
        // Opening outter tag
        sgml::openTag(buf, os, *pbegin);
        os << '\n';
-       if (bstyle->latextype == LATEX_ENVIRONMENT and bstyle->innertag() == "CDATA")
+       if (bstyle->latextype == LATEX_ENVIRONMENT and bstyle->pass_thru)
                os << "<![CDATA[";
 
        while (par != pend) {
@@ -145,7 +145,7 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
                // Opening inner tag
                switch (bstyle->latextype) {
                case LATEX_ENVIRONMENT:
-                       if (!bstyle->innertag().empty() and bstyle->innertag() != "CDATA") {
+                       if (!bstyle->innertag().empty()) {
                                sgml::openTag(os, bstyle->innertag(), id);
                        }
                        break;
@@ -189,7 +189,7 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
                // Closing inner tag
                switch (bstyle->latextype) {
                case LATEX_ENVIRONMENT:
-                       if (!bstyle->innertag().empty() and bstyle->innertag() != "CDATA") {
+                       if (!bstyle->innertag().empty()) {
                                sgml::closeTag(os, bstyle->innertag());
                                os << '\n';
                        }
@@ -204,7 +204,7 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
                }
        }
 
-       if (bstyle->latextype == LATEX_ENVIRONMENT and bstyle->innertag() == "CDATA")
+       if (bstyle->latextype == LATEX_ENVIRONMENT and bstyle->pass_thru)
                os << "]]>";
 
        // Closing outter tag
index 17a70818ca06dd4b3cb875a01268319e056bf29c..88a4193cb7eae40c6d84e3f0ed303230363f8721 100644 (file)
@@ -1389,10 +1389,7 @@ pos_type Paragraph::getFirstWord(Buffer const & buf, ostream & os, OutputParams
                        string str;
                        boost::tie(ws, str) = sgml::escapeChar(c);
 
-                       if (style->pass_thru)
-                               os << c;
-                       else
-                               os << str;
+                       os << str;
                }
        }
        return i;
@@ -1410,7 +1407,7 @@ void Paragraph::simpleDocBookOnePar(Buffer const & buf,
        LyXFont font_old =
                style->labeltype == LABEL_MANUAL ? style->labelfont : style->font;
 
-       bool cdata = (style->innertag() == "CDATA");
+       bool cdata = style->pass_thru;
        // parsing main loop
        for (pos_type i = initial; i < size(); ++i) {
                LyXFont font = getFont(buf.params(), i, outerfont);