mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Replace CDATA argument as innertag.
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
This commit is contained in:
parent
5b859a8e9a
commit
a590b1e0d2
@ -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.
|
||||
|
@ -11,7 +11,6 @@ Style Code
|
||||
CopyStyle LyX-Code
|
||||
LatexType Environment
|
||||
LatexName screen
|
||||
InnerTag CDATA
|
||||
PassThru 1
|
||||
End
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user