summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/gdi/impgraph.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index a82e67a57e02..e9fcfa56d285 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -108,6 +108,8 @@ ImpGraphic::ImpGraphic() :
ImpGraphic::ImpGraphic(const ImpGraphic& rImpGraphic)
: maMetaFile(rImpGraphic.maMetaFile)
, maEx(rImpGraphic.maEx)
+ , maSwapInfo(rImpGraphic.maSwapInfo)
+ , mpContext(rImpGraphic.mpContext)
, mpSwapFile(rImpGraphic.mpSwapFile)
, meType(rImpGraphic.meType)
, mnSizeBytes(rImpGraphic.mnSizeBytes)
@@ -187,6 +189,10 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic )
meType = rImpGraphic.meType;
mnSizeBytes = rImpGraphic.mnSizeBytes;
+ maSwapInfo = rImpGraphic.maSwapInfo;
+ mpContext = rImpGraphic.mpContext;
+ mbDummyContext = rImpGraphic.mbDummyContext;
+
mpAnimation.reset();
if ( rImpGraphic.mpAnimation )
@@ -1256,10 +1262,18 @@ bool ImpGraphic::ImplSwapIn( SvStream* xIStm )
std::shared_ptr<ImpSwapFile> xSwapFile(std::move(mpSwapFile));
assert(!mpSwapFile);
+ std::shared_ptr<GraphicReader> xContext(std::move(mpContext));
+ assert(!mpContext);
+
+ bool bDummyContext = mbDummyContext;
+ mbDummyContext = false;
+
bRet = ImplReadEmbedded( *xIStm );
- //restore ownership of the swap file
+ //restore ownership of the swap file and context
mpSwapFile = std::move(xSwapFile);
+ mpContext = std::move(xContext);
+ mbDummyContext = bDummyContext;
if (!bRet)
{