docbook code cleanup.

renamed some DocBook to docbook that Lars forgot. (inset methods)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3119 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2001-11-30 11:56:04 +00:00
parent 8c3c804a4d
commit 94b5a7b163
7 changed files with 26 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2001-11-30 José Matos <jamatos@fep.up.pt>
* buffer.C (makeDocBookFile): add a comment to point a hack.
(simpleDocBookOnePar): changed a PAR::META_INSET to isInset().
Fixed a double write of labels.
2001-11-28 André Pönitz <poenitz@gmx.net>
* all the files from the change on 2001/11/26:
@ -167,6 +173,11 @@
Change return code to string::npos when there have been no error
(0 was a bad idea when error is at first character)
2001-11-14 José Matos <jamatos@fep.up.pt>
* buffer.h:
* buffer.C (simpleDocBookOnePar): removed unused argument.
2001-11-13 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* text.C (selectNextWordToSpellcheck): do not test explicitely for

View File

@ -3126,6 +3126,8 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body)
// treat label as a special case for
// more WYSIWYM handling.
// This is a hack while paragraphs can't have
// attributes, like id in this case.
if (par->isInset(0)) {
Inset * inset = par->getInset(0);
Inset::Code lyx_code = inset->lyxCode();
@ -3306,12 +3308,14 @@ void Buffer::simpleDocBookOnePar(ostream & os,
}
}
char c = par->getChar(i);
if (c == Paragraph::META_INSET) {
if ( par->isInset(i) ) {
Inset * inset = par->getInset(i);
// don't print the inset in position 0 if desc_on == 3 (label)
if ( i || desc_on != 3)
inset->docbook(this, os);
} else {
char c = par->getChar(i);
string sgml_string;
par->sgmlConvertChar(c, sgml_string);

View File

@ -1,3 +1,7 @@
2001-11-30 José Matos <jamatos@fep.up.pt>
* inseturl.[Ch]:
* insettoc.[Ch]: DocBook -> docbook.
2001-11-29 André Pönitz <poenitz@gmx.net>

View File

@ -77,7 +77,7 @@ int InsetTOC::linuxdoc(Buffer const *, std::ostream & os) const
}
int InsetTOC::DocBook(Buffer const *, std::ostream & os) const
int InsetTOC::docbook(Buffer const *, std::ostream & os) const
{
if (getCmdName() == "tableofcontents")
os << "<toc></toc>";

View File

@ -46,7 +46,7 @@ public:
///
int linuxdoc(Buffer const *, std::ostream &) const;
///
int DocBook(Buffer const *, std::ostream &) const;
int docbook(Buffer const *, std::ostream &) const;
};
#endif

View File

@ -81,7 +81,7 @@ int InsetUrl::linuxdoc(Buffer const *, ostream & os) const
}
int InsetUrl::DocBook(Buffer const *, ostream & os) const
int InsetUrl::docbook(Buffer const *, ostream & os) const
{
os << "<ulink url=\"" << getContents() << "\">"
<< getOptions() << "</ulink>";

View File

@ -52,7 +52,7 @@ public:
///
int linuxdoc(Buffer const *, std::ostream &) const;
///
int DocBook(Buffer const *, std::ostream &) const;
int docbook(Buffer const *, std::ostream &) const;
};
#endif