From 5b4e90488cf69bc7663080bf44ac225426a48f1b Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Tue, 3 Jun 2003 10:13:26 +0000 Subject: [PATCH] Add copy constructor. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7090 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/graphics/ChangeLog | 4 ++++ src/graphics/GraphicsLoader.C | 8 +++++++- src/graphics/GraphicsLoader.h | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog index a46962f13a..1586f13517 100644 --- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,3 +1,7 @@ +2003-06-03 Angus Leeming + + * GraphicsLoader.[Ch] (Loader): add copy constructor. + 2003-05-23 Angus Leeming * PreviewLoader.C (dumpPreamble): rename fragile as moving_arg. diff --git a/src/graphics/GraphicsLoader.C b/src/graphics/GraphicsLoader.C index 5da53f9b84..cba47a8f44 100644 --- a/src/graphics/GraphicsLoader.C +++ b/src/graphics/GraphicsLoader.C @@ -38,9 +38,10 @@ struct Loader::Impl : boost::signals::trackable { void resetParams(Params const &); /// void createPixmap(); - /// void startLoading(); + /// + Params const & params() const { return params_; } /// The loading status of the image. ImageStatus status_; @@ -84,6 +85,11 @@ Loader::Loader(string const & file, Params const & params) } +Loader::Loader(Loader const & other) + : pimpl_(new Impl(other.pimpl_->params())) +{} + + Loader::~Loader() {} diff --git a/src/graphics/GraphicsLoader.h b/src/graphics/GraphicsLoader.h index 893070919a..6307ec1a02 100644 --- a/src/graphics/GraphicsLoader.h +++ b/src/graphics/GraphicsLoader.h @@ -46,6 +46,8 @@ public: Loader(string const & file_with_path, DisplayType = ColorDisplay); /// The image is transformed before display. Loader(string const & file_with_path, Params const &); + /// + Loader(Loader const &); /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy. ~Loader(); -- 2.39.2