]> git.lyx.org Git - features.git/commitdiff
* src/insets/insetbititem.C:
authorMichael Schmitt <michael.schmitt@teststep.org>
Sat, 17 Feb 2007 16:36:45 +0000 (16:36 +0000)
committerMichael Schmitt <michael.schmitt@teststep.org>
Sat, 17 Feb 2007 16:36:45 +0000 (16:36 +0000)
* src/insets/insetcite.C:
* src/insets/insetcite.h: fix plaintext(); code formatting

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

src/insets/insetbibitem.C
src/insets/insetcite.C
src/insets/insetcite.h

index 89346660f835a460c6f43fd67d8cc08e06bbaa38..0de266a2a710f8c8a11c41a3e3ebb6a02743317a 100644 (file)
@@ -109,10 +109,15 @@ docstring const InsetBibitem::getScreenLabel(Buffer const &) const
 
 
 int InsetBibitem::plaintext(Buffer const &, odocstream & os,
-                           OutputParams const &) const
+                            OutputParams const &) const
 {
-       os << '[' << getCounter() << "] ";
-       return 0;
+       odocstringstream oss;
+       oss << '[' << getCounter() << "] ";
+
+       docstring const str = oss.str();
+       os << str;
+
+       return str.size();
 }
 
 
index a8bf9a068e5a87daedc172ce1e9636476a567b06..5bf970f88ff6cb58ebf9b895ba79bcbbe5693eb5 100644 (file)
@@ -365,12 +365,16 @@ docstring const InsetCitation::getScreenLabel(Buffer const & buffer) const
 int InsetCitation::plaintext(Buffer const & buffer, odocstream & os,
                              OutputParams const &) const
 {
+       docstring str;
+
        if (cache.params == params() &&
            cache.engine == biblio::getEngine(buffer))
-               os << cache.generated_label;
+               str = cache.generated_label;
        else
-               os << generateLabel(buffer);
-       return 0;
+               str = generateLabel(buffer);
+
+       os << str;
+       return str.size();
 }
 
 
@@ -396,7 +400,8 @@ docstring const cleanupWhitespace(docstring const & citelist)
 // end anon namyspace
 }
 
-int InsetCitation::docbook(Buffer const &, odocstream & os, OutputParams const &) const
+int InsetCitation::docbook(Buffer const &, odocstream & os,
+                           OutputParams const &) const
 {
        os << "<citation>"
            << cleanupWhitespace(getParam("key"))
@@ -417,7 +422,7 @@ int InsetCitation::textString(Buffer const & buf, odocstream & os,
 // citations and then changes his mind, turning natbib support off. The output
 // should revert to \cite[]{}
 int InsetCitation::latex(Buffer const & buffer, odocstream & os,
-                        OutputParams const &) const
+                         OutputParams const &) const
 {
        biblio::CiteEngine const cite_engine = buffer.params().cite_engine;
        // FIXME UNICODE
index 1c83084a67ea156ebccc95f82dce0a0e8ecf79bb..d07a5bdfbb2ee167eff349e8147b69b85f932d16 100644 (file)
@@ -34,13 +34,14 @@ public:
        ///
        InsetBase::Code lyxCode() const { return InsetBase::CITE_CODE; }
        ///
-       int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
-       ///
        int latex(Buffer const &, odocstream &,
-                 OutputParams const &) const;
+                 OutputParams const &) const;
+       ///
+       int plaintext(Buffer const &, odocstream &,
+                     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;