X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetindex.C;h=486aeb23111eb845002f76c2d95d5f78f60f3c40;hb=4a5b7a5952ad2381fcdf4830511293e184c7c5a1;hp=eccde8d07c1c9bf1f8e6549dfdfa0a6e7ab4dbc5;hpb=7c0dad35b33c8f23f3d74d26f5689cc4d869c8b2;p=lyx.git diff --git a/src/insets/insetindex.C b/src/insets/insetindex.C index eccde8d07c..486aeb2311 100644 --- a/src/insets/insetindex.C +++ b/src/insets/insetindex.C @@ -10,13 +10,16 @@ #include "frontends/Dialogs.h" #include "LaTeXFeatures.h" #include "gettext.h" +#include "support/LOstream.h" + +using std::ostream; InsetIndex::InsetIndex(InsetCommandParams const & p, bool) : InsetCommand(p) {} -string const InsetIndex::getScreenLabel() const +string const InsetIndex::getScreenLabel(Buffer const *) const { return _("Idx"); } @@ -24,7 +27,7 @@ string const InsetIndex::getScreenLabel() const void InsetIndex::edit(BufferView * bv, int, int, unsigned int) { - bv->owner()->getDialogs()->showIndex( this ); + bv->owner()->getDialogs()->showIndex(this); } @@ -34,11 +37,24 @@ void InsetIndex::edit(BufferView * bv, bool) } +int InsetIndex::docbook(Buffer const *, ostream & os) const +{ + os << "" << getContents() << ""; + return 0; +} + + +Inset::Code InsetIndex::lyxCode() const +{ + return Inset::INDEX_CODE; +} + + InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool) : InsetCommand(p) {} -string const InsetPrintIndex::getScreenLabel() const +string const InsetPrintIndex::getScreenLabel(Buffer const *) const { return _("Index"); } @@ -46,11 +62,11 @@ string const InsetPrintIndex::getScreenLabel() const void InsetPrintIndex::validate(LaTeXFeatures & features) const { - features.makeidx = true; + features.require("makeidx"); } Inset::Code InsetPrintIndex::lyxCode() const { - return Inset::INDEX_CODE; + return Inset::INDEX_PRINT_CODE; }