X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffactory.cpp;h=2ffa85018c1666ab32b1a8b57d688aec03ed2433;hb=f08f5821ec5d29232bccb342a5b1ff86600b0716;hp=b640c6b2ae09a60412fe9540254d538c0aca5be4;hpb=b95c17cfdd469aac842304073a56e3fb64bfe629;p=lyx.git diff --git a/src/factory.cpp b/src/factory.cpp index b640c6b2ae..2ffa85018c 100644 --- a/src/factory.cpp +++ b/src/factory.cpp @@ -224,8 +224,12 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd) return new InsetTabular(buf, r, c); } - case LFUN_CAPTION_INSERT: - return new InsetCaption(buf); + case LFUN_CAPTION_INSERT: { + string arg = cmd.getArg(0); + if (arg.empty()) + arg = "Standard"; + return new InsetCaption(buf, arg); + } case LFUN_INDEX_PRINT: { InsetCommandParams icp(INDEX_PRINT_CODE); @@ -632,7 +636,9 @@ Inset * readInset(Lexer & lex, Buffer * buf) string tmptok = lex.getString(); inset.reset(new InsetWrap(buf, tmptok)); } else if (tmptok == "Caption") { - inset.reset(new InsetCaption(buf)); + lex.eatLine(); + string s = lex.getString(); + inset.reset(new InsetCaption(buf, s)); } else if (tmptok == "Index") { inset.reset(new InsetIndex(buf, InsetIndexParams())); } else if (tmptok == "FloatList") {