* src/insets/insettoc.[Ch]:

* src/insets/insetspecialchar.[Ch]: fix plaintext(); WS changes


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17231 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Michael Schmitt 2007-02-17 11:59:42 +00:00
parent 6d2a778724
commit 757d2bc963
4 changed files with 15 additions and 15 deletions

View File

@ -192,28 +192,28 @@ int InsetSpecialChar::latex(Buffer const &, odocstream & os,
int InsetSpecialChar::plaintext(Buffer const &, odocstream & os,
OutputParams const &) const
OutputParams const &) const
{
switch (kind_) {
case HYPHENATION:
case LIGATURE_BREAK:
break;
return 0;
case END_OF_SENTENCE:
os << '.';
break;
return 1;
case LDOTS:
os << "...";
break;
return 3;
case MENU_SEPARATOR:
os << "->";
break;
return 2;
}
return 0;
}
int InsetSpecialChar::docbook(Buffer const &, odocstream & os,
OutputParams const &) const
OutputParams const &) const
{
switch (kind_) {
case HYPHENATION:

View File

@ -57,13 +57,13 @@ public:
void read(Buffer const &, LyXLex & lex);
///
int latex(Buffer const &, odocstream &,
OutputParams const &) const;
OutputParams const &) const;
///
int plaintext(Buffer const &, odocstream &,
OutputParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, odocstream &,
OutputParams const &) const;
OutputParams const &) const;
/// the string that is passed to the TOC
virtual int textString(Buffer const &, odocstream &,
OutputParams const &) const;

View File

@ -17,6 +17,7 @@
#include "funcrequest.h"
#include "gettext.h"
#include "metricsinfo.h"
#include "outputparams.h"
#include "TocBackend.h"
#include "support/std_ostream.h"
@ -56,19 +57,18 @@ InsetBase::Code InsetTOC::lyxCode() const
int InsetTOC::plaintext(Buffer const & buffer, odocstream & os,
OutputParams const &) const
OutputParams const & runparams) const
{
os << getScreenLabel(buffer) << "\n\n";
buffer.tocBackend().writePlaintextTocList(getCmdName(), os);
os << "\n";
return 0;
return runparams.linelen; // start with column 0 in new line
}
int InsetTOC::docbook(Buffer const &, odocstream & os,
OutputParams const &) const
OutputParams const &) const
{
if (getCmdName() == "tableofcontents")
os << "<toc></toc>";

View File

@ -33,10 +33,10 @@ public:
bool display() const { return true; }
///
int plaintext(Buffer const &, odocstream &,
OutputParams const &) const;
OutputParams const &) const;
///
int docbook(Buffer const &, odocstream &,
OutputParams const &) const;
OutputParams const &) const;
private:
virtual std::auto_ptr<InsetBase> doClone() const;
};