]> git.lyx.org Git - features.git/commitdiff
* insetgraphics.[Ch]:
authorMichael Schmitt <michael.schmitt@teststep.org>
Sat, 17 Feb 2007 11:30:58 +0000 (11:30 +0000)
committerMichael Schmitt <michael.schmitt@teststep.org>
Sat, 17 Feb 2007 11:30:58 +0000 (11:30 +0000)
* insetquotes.C: fix plaintext(); WS changes

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

src/insets/insetgraphics.C
src/insets/insetgraphics.h
src/insets/insetquotes.C

index 49b8ecec5e91d278dd436c9cd6df410010c55d14..407de303d18b2a9fbbdc012707da08b9c841c624 100644 (file)
@@ -738,7 +738,7 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
 
 
 int InsetGraphics::latex(Buffer const & buf, odocstream & os,
-                        OutputParams const & runparams) const
+                         OutputParams const & runparams) const
 {
        // If there is no file specified or not existing,
        // just output a message about it in the latex output.
@@ -808,7 +808,7 @@ int InsetGraphics::latex(Buffer const & buf, odocstream & os,
 
 
 int InsetGraphics::plaintext(Buffer const &, odocstream & os,
-                        OutputParams const &) const
+                             OutputParams const &) const
 {
        // No graphics in ascii output. Possible to use gifscii to convert
        // images to ascii approximation.
@@ -817,10 +817,12 @@ int InsetGraphics::plaintext(Buffer const &, odocstream & os,
        // at least we send the filename
        // FIXME UNICODE
        // FIXME: We have no idea what the encoding of the filename is
-       os << '<' << bformat(_("Graphics file: %1$s"),
-                            from_utf8(params().filename.absFilename()))
-          << ">\n";
-       return 0;
+
+       docstring str = bformat(_("Graphics file: %1$s"),
+                               from_utf8(params().filename.absFilename()));
+       os << '<' << str << '>';
+
+       return 2 + str.size();
 }
 
 
index 51ffe31ca274fdd6106ab0c4ee14c00eb876c089..49811a2da629ff4b140694031144e0261246d209 100644 (file)
@@ -48,13 +48,13 @@ public:
         fragile commands by adding a #\protect# before.
         */
        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;
 
        /** Tell LyX what the latex features you need i.e. what latex packages
            you need to be included.
index eb7c87e454086a3daf03fd07dfb4d88d9e4f1ca6..b9d1957be07e1ceadb35f08ef447baf1612713ec 100644 (file)
@@ -296,7 +296,7 @@ void InsetQuotes::read(Buffer const &, LyXLex & lex)
 
 
 int InsetQuotes::latex(Buffer const &, odocstream & os,
-                      OutputParams const & runparams) const
+                       OutputParams const & runparams) const
 {
        const int quoteind = quote_index[side_][language_];
        string qstr;
@@ -329,15 +329,16 @@ int InsetQuotes::latex(Buffer const &, odocstream & os,
 
 
 int InsetQuotes::plaintext(Buffer const & buf, odocstream & os,
-                          OutputParams const &) const
+                           OutputParams const &) const
 {
-       os << dispString(buf.params().language);
-       return 0;
+       docstring str = dispString(buf.params().language);
+       os << str;
+       return str.size();
 }
 
 
 int InsetQuotes::docbook(Buffer const &, odocstream & os,
-                        OutputParams const &) const
+                         OutputParams const &) const
 {
        if (times_ == DoubleQ) {
                if (side_ == LeftQ)