+2003-04-24 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * insetexternal.C (string2params): dont do anything if the string
+ is empty.
+ * insetgraphics.C (string2params): ditto
+ * insetcommand.C (string2params): ditto
+ * insetert.C (string2params): ditto
+ * insetfloat.C (string2params): ditto
+ * insetinclude.C (string2params): ditto
+ * insetminipage.C (string2params): ditto
+ * insettabular.C (string2params): ditto
+ * insetwrap.C (string2params): ditto
2003-04-24 André Pönitz <poenitz@gmx.net>
params.setContents(string());
params.setOptions(string());
+ if (in.empty())
+ return;
+
istringstream data(in);
LyXLex lex(0,0);
lex.setStream(data);
{
params = InsetExternal::Params();
+ if (in.empty())
+ return;
+
istringstream data(in);
LyXLex lex(0,0);
lex.setStream(data);
}
if (lex.isOK()) {
- InsetExternal inset;
+ InsetExternal inset;
inset.read(0, lex);
params = inset.params();
}
{
params = InsetFloatParams();
+ if (in.empty())
+ return;
+
istringstream data(in);
LyXLex lex(0,0);
lex.setStream(data);
{
params = InsetGraphicsParams();
+ if (in.empty())
+ return;
+
istringstream data(in);
LyXLex lex(0,0);
lex.setStream(data);
}
if (lex.isOK()) {
- InsetGraphics inset;
+ InsetGraphics inset;
inset.readInsetGraphics(lex);
params = inset.params();
}
///
~InsetGraphics();
///
- virtual dispatch_result localDispatch(FuncRequest const & cmd);
+ virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
int ascent(BufferView *, LyXFont const &) const;
///
params_ = p;
string command;
-
+
switch (params_.flag) {
case INCLUDE:
command="include";
command="verbatiminput*";
break;
}
-
- params_.cparams.setCmdName(command);
-
+
+ params_.cparams.setCmdName(command);
+
if (preview_->monitoring())
preview_->stopMonitoring();
if (!finfo.isOK())
return false;
- return bufferlist.loadLyXFile(getFileName(), false) != 0;
+ return bufferlist.loadLyXFile(getFileName(), false) != 0;
}
{
params = InsetInclude::Params();
+ if (in.empty())
+ return;
+
istringstream data(in);
LyXLex lex(0,0);
lex.setStream(data);
}
if (lex.isOK()) {
- InsetInclude inset(params);
+ InsetInclude inset(params);
inset.read(0, lex);
params = inset.params();
}
{
params = InsetMinipage::Params();
+ if (in.empty())
+ return;
+
istringstream data(in);
LyXLex lex(0,0);
lex.setStream(data);
LyXLex lex(0,0);
lex.setStream(data);
+#warning CHECK verify that this is a sane value to return.
+ if (in.empty())
+ return -1;
+
if (lex.isOK()) {
lex.next();
string const token = lex.getString();
{
params = InsetWrapParams();
+ if (in.empty())
+ return;
+
istringstream data(in);
LyXLex lex(0,0);
lex.setStream(data);