X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsettoc.C;h=c93c62e26acb11e63787d4aa6b65eab0022a139d;hb=4a5b7a5952ad2381fcdf4830511293e184c7c5a1;hp=0e9685fb5bb6f1583ed089c4e3baadd7853c06c9;hpb=52153a589b4224d794de4f61f3f55b8d8832186f;p=lyx.git diff --git a/src/insets/insettoc.C b/src/insets/insettoc.C index 0e9685fb5b..c93c62e26a 100644 --- a/src/insets/insettoc.C +++ b/src/insets/insettoc.C @@ -12,9 +12,12 @@ #include "debug.h" #include "buffer.h" + using std::vector; +using std::ostream; + -string const InsetTOC::getScreenLabel() const +string const InsetTOC::getScreenLabel(Buffer const *) const { string const cmdname(getCmdName()); @@ -24,7 +27,7 @@ string const InsetTOC::getScreenLabel() const } -Inset::Code InsetTOC::LyxCode() const +Inset::Code InsetTOC::lyxCode() const { string const cmdname(getCmdName()); if (cmdname == "tableofcontents") @@ -33,15 +36,21 @@ Inset::Code InsetTOC::LyxCode() const } -void InsetTOC::Edit(BufferView * bv, int, int, unsigned int) +void InsetTOC::edit(BufferView * bv, int, int, unsigned int) { bv->owner()->getDialogs()->showTOC(this); } -int InsetTOC::Ascii(Buffer const * buffer, std::ostream & os, int) const +void InsetTOC::edit(BufferView * bv, bool) +{ + edit(bv, 0, 0, 0); +} + + +int InsetTOC::ascii(Buffer const * buffer, ostream & os, int) const { - os << getScreenLabel() << "\n\n"; + os << getScreenLabel(buffer) << "\n\n"; string type; string const cmdname = getCmdName(); @@ -63,7 +72,7 @@ int InsetTOC::Ascii(Buffer const * buffer, std::ostream & os, int) const } -int InsetTOC::Linuxdoc(Buffer const *, std::ostream & os) const +int InsetTOC::linuxdoc(Buffer const *, ostream & os) const { if (getCmdName() == "tableofcontents") os << ""; @@ -71,7 +80,7 @@ int InsetTOC::Linuxdoc(Buffer const *, std::ostream & os) const } -int InsetTOC::DocBook(Buffer const *, std::ostream & os) const +int InsetTOC::docbook(Buffer const *, ostream & os) const { if (getCmdName() == "tableofcontents") os << "";