X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FPreviewImage.C;h=75d41634ced7a43394d54dc6f2bf9d2fccf2633e;hb=005545f28100fd30afa22313d6e3b1b67aa9a857;hp=2ec2e846d2fab81079738ef2d88600247a700e1a;hpb=99d1627a471b92f403598d03dfc861ddc3c11be0;p=lyx.git diff --git a/src/graphics/PreviewImage.C b/src/graphics/PreviewImage.C index 2ec2e846d2..75d41634ce 100644 --- a/src/graphics/PreviewImage.C +++ b/src/graphics/PreviewImage.C @@ -1,27 +1,31 @@ /** - * \file PreviewImage.C + * \file PreviewImage.C * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * * \author Angus Leeming * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ #include #include "PreviewImage.h" -#include "PreviewLoader.h" #include "GraphicsImage.h" #include "GraphicsLoader.h" +#include "PreviewLoader.h" #include "support/lyxlib.h" #include -#include + +namespace support = lyx::support; + +using std::string; -namespace grfx { +namespace lyx { +namespace graphics { struct PreviewImage::Impl : public boost::signals::trackable { /// @@ -30,7 +34,7 @@ struct PreviewImage::Impl : public boost::signals::trackable { /// ~Impl(); /// - Image const * image(Inset const &, BufferView const &); + Image const * image(); /// void statusChanged(); @@ -93,10 +97,9 @@ int PreviewImage::width() const } -Image const * PreviewImage::image(Inset const & inset, - BufferView const & bv) const +Image const * PreviewImage::image() const { - return pimpl_->image(inset, bv); + return pimpl_->image(); } @@ -113,15 +116,14 @@ PreviewImage::Impl::Impl(PreviewImage & p, PreviewLoader & l, PreviewImage::Impl::~Impl() { - lyx::unlink(iloader_.filename()); + support::unlink(iloader_.filename()); } -Image const * PreviewImage::Impl::image(Inset const & inset, - BufferView const & bv) +Image const * PreviewImage::Impl::image() { if (iloader_.status() == WaitingToLoad) - iloader_.startLoading(inset, bv); + iloader_.startLoading(); return iloader_.image(); } @@ -147,10 +149,11 @@ void PreviewImage::Impl::statusChanged() break; case Ready: - lyx::unlink(iloader_.filename()); - ploader_.emitSignal(parent_); + support::unlink(iloader_.filename()); break; } + ploader_.emitSignal(parent_); } -} // namespace grfx +} // namespace graphics +} // namespace lyx