]> git.lyx.org Git - features.git/commitdiff
Preparation for the nomencl inset: Add {} in InsetCommand rather than
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sat, 4 Nov 2006 14:55:15 +0000 (14:55 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sat, 4 Nov 2006 14:55:15 +0000 (14:55 +0000)
InsetHFill. This is possible because InsetHFill is the only inset so
far without parameters.

* src/insets/insetcommandparams.C
(InsetCommandParams::getCommand): Add {} to commands without
parameters.

* src/insets/insethfill.[Ch]
(InsetHFill::latex): Remove

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

src/insets/insetcommandparams.C
src/insets/insethfill.C
src/insets/insethfill.h

index ab61de201cf8ce23cbf4d6255a176e8488f9c3eb..8c7805db85e1196bc91aed8d6fab572375139e50 100644 (file)
@@ -307,6 +307,10 @@ docstring const InsetCommandParams::getCommand() const
                } else
                        s += '{' + params_[i] + '}';
        }
+       if (info_->n == 0)
+               // Make sure that following stuff does not change the
+               // command name.
+               s += "{}";
        return s;
 }
 
index 20d179a485a7999dc52e360547d5f4bef17e0360..25146edb54baee80b487483cd204a718183b4d7f 100644 (file)
@@ -47,14 +47,6 @@ docstring const InsetHFill::getScreenLabel(Buffer const &) const
 }
 
 
-int InsetHFill::latex(Buffer const &, odocstream & os,
-                     OutputParams const &) const
-{
-       os << getCommand() << "{}";
-       return 0;
-}
-
-
 int InsetHFill::plaintext(Buffer const &, odocstream & os,
                      OutputParams const &) const
 {
index dfd44cea5ca383758933da743ab5aa73f3c05c0b..3bfa98ffc3cff83076693c96510d5088ceaa3dc4 100644 (file)
@@ -29,9 +29,6 @@ public:
        ///
        InsetBase::Code lyxCode() const { return InsetBase::HFILL_CODE; }
        ///
-       int latex(Buffer const &, odocstream &,
-                 OutputParams const &) const;
-       ///
        int plaintext(Buffer const &, odocstream &,
                  OutputParams const & runparams) const;
        ///