]> git.lyx.org Git - features.git/commitdiff
* src/insets/insettoc.[Ch]:
authorMichael Schmitt <michael.schmitt@teststep.org>
Sat, 17 Feb 2007 11:59:42 +0000 (11:59 +0000)
committerMichael Schmitt <michael.schmitt@teststep.org>
Sat, 17 Feb 2007 11:59:42 +0000 (11:59 +0000)
* 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

src/insets/insetspecialchar.C
src/insets/insetspecialchar.h
src/insets/insettoc.C
src/insets/insettoc.h

index 7ed1ea8489cbae9250b301601e10480647e119c3..98f07bcae0e4cdb951838ef83575a34276fbf9a4 100644 (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:
index 26ee9612bde82ee48684161012c687a4420fce19..91655f3cf9b6db5d236a19e6b6e1483444beafb9 100644 (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;
index c959ee47c5aeaa0a96825bb6b2b57897dc78ca88..3634ad751ba2eb63e8255f4a8db0e74539e5bfcc 100644 (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>";
index 73bf1b67d32972a0109c97fc63a5c3f7988e4314..81b135c9b1579fb317ac5ca9835401f76a25d3bd 100644 (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;
 };