]> git.lyx.org Git - features.git/blobdiff - src/insets/insetnote.C
change "support/std_sstream.h" to <sstream>
[features.git] / src / insets / insetnote.C
index fb1d4cf68d2b6e2170af48e9e8629f24274612ae..3be5403fb54ccff288c0a69101b7009932e47a06 100644 (file)
@@ -27,9 +27,9 @@
 #include "paragraph.h"
 
 #include "support/lyxalgo.h"
-#include "support/std_sstream.h"
 #include "support/translator.h"
 
+#include <sstream>
 
 using std::string;
 using std::auto_ptr;
@@ -184,31 +184,30 @@ bool InsetNote::showInsetDialog(BufferView * bv) const
 }
 
 
-DispatchResult
-InsetNote::priv_dispatch(LCursor & cur, FuncRequest const & cmd)
+void InsetNote::priv_dispatch(LCursor & cur, FuncRequest & cmd)
 {
        switch (cmd.action) {
 
-       case LFUN_INSET_MODIFY: {
+       case LFUN_INSET_MODIFY:
                InsetNoteMailer::string2params(cmd.argument, params_);
                setButtonLabel();
                cur.bv().update();
-               return DispatchResult(true, true);
-       }
+               break;
 
        case LFUN_INSET_DIALOG_UPDATE:
                InsetNoteMailer(*this).updateDialog(&cur.bv());
-               return DispatchResult(true, true);
+               break;
 
        case LFUN_MOUSE_RELEASE:
-               if (cmd.button() == mouse_button::button3 && hitButton(cmd)) {
+               if (cmd.button() == mouse_button::button3 && hitButton(cmd))
                        InsetNoteMailer(*this).showDialog(&cur.bv());
-                       return DispatchResult(true, true);
-               }
-               return InsetCollapsable::priv_dispatch(cur, cmd);
+               else
+                       InsetCollapsable::priv_dispatch(cur, cmd);
+               break;
 
        default:
-               return InsetCollapsable::priv_dispatch(cur, cmd);
+               InsetCollapsable::priv_dispatch(cur, cmd);
+               break;
        }
 }
 
@@ -227,7 +226,7 @@ int InsetNote::latex(Buffer const & buf, ostream & os,
 
        ostringstream ss;
        ss << "%\n\\begin{" << type << "}\n";
-       inset.latex(buf, ss, runparams);
+       InsetText::latex(buf, ss, runparams);
        ss << "%\n\\end{" << type << "}\n";
 
        string const str = ss.str();
@@ -247,7 +246,7 @@ int InsetNote::linuxdoc(Buffer const & buf, std::ostream & os,
        if (params_.type == InsetNoteParams::Comment)
                ss << "<comment>\n";
 
-       inset.linuxdoc(buf, ss, runparams);
+       InsetText::linuxdoc(buf, ss, runparams);
 
        if (params_.type == InsetNoteParams::Comment)
                ss << "\n</comment>\n";
@@ -269,7 +268,7 @@ int InsetNote::docbook(Buffer const & buf, std::ostream & os,
        if (params_.type == InsetNoteParams::Comment)
                ss << "<remark>\n";
 
-       inset.docbook(buf, ss, runparams);
+       InsetText::docbook(buf, ss, runparams);
 
        if (params_.type == InsetNoteParams::Comment)
                ss << "\n</remark>\n";
@@ -289,7 +288,7 @@ int InsetNote::plaintext(Buffer const & buf, std::ostream & os,
 
        ostringstream ss;
        ss << "[";
-       inset.plaintext(buf, ss, runparams);
+       InsetText::plaintext(buf, ss, runparams);
        ss << "]";
 
        string const str = ss.str();
@@ -307,12 +306,12 @@ void InsetNote::validate(LaTeXFeatures & features) const
                features.require("color");
                features.require("lyxgreyedout");
        }
-       inset.validate(features);
+       InsetText::validate(features);
 }
 
 
 
-string const InsetNoteMailer:: name_("note");
+string const InsetNoteMailer::name_("note");
 
 InsetNoteMailer::InsetNoteMailer(InsetNote & inset)
        : inset_(inset)