diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index 9decdaaa80..2ef6d47287 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -191,7 +191,7 @@ void InsetGraphics::doDispatch(Cursor & cur, FuncRequest & cmd) InsetGraphicsParams p = params(); if (!cmd.argument().empty()) string2params(to_utf8(cmd.argument()), buffer(), p); - editGraphics(p, buffer()); + editGraphics(p); break; } @@ -895,10 +895,9 @@ InsetGraphicsParams const & InsetGraphics::params() const } -void InsetGraphics::editGraphics(InsetGraphicsParams const & p, - Buffer const & buffer) const +void InsetGraphics::editGraphics(InsetGraphicsParams const & p) const { - formats.edit(buffer, p.filename, + formats.edit(buffer(), p.filename, formats.getFormatFromFile(p.filename)); } diff --git a/src/insets/InsetGraphics.h b/src/insets/InsetGraphics.h index ec68897b88..588b8b183e 100644 --- a/src/insets/InsetGraphics.h +++ b/src/insets/InsetGraphics.h @@ -87,7 +87,7 @@ private: /// bool showInsetDialog(BufferView * bv) const; /// - void editGraphics(InsetGraphicsParams const &, Buffer const &) const; + void editGraphics(InsetGraphicsParams const &) const; /// bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; /// diff --git a/src/insets/InsetText.h b/src/insets/InsetText.h index bcb0bfa503..0853144c9b 100644 --- a/src/insets/InsetText.h +++ b/src/insets/InsetText.h @@ -19,8 +19,6 @@ namespace lyx { -class Buffer; -class BufferView; class CompletionList; class CursorSlice; class Dimension;