From 83ea64867086464cc3d277aa73b44ad56465c9d9 Mon Sep 17 00:00:00 2001 From: Guillaume Smaha Date: Tue, 10 Nov 2015 15:54:06 +0100 Subject: [PATCH] Fix issue when saving file with macro. Change-Id: Ia34ac45d85328236552a0fc37a9399c0cff04fb7 --- sfx2/source/doc/objstor.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 8b2916c..fff3ba5 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -1317,6 +1317,12 @@ bool SfxObjectShell::SaveTo_Impl AddLog( OUString( OSL_LOG_PREFIX "SaveAs/Export" ) ); + // Disconnects the storage from source medium for the cases "save a copy" and "autosave". + if ( bCopyTo ) + { + pMedium->CanDisposeStorage_Impl( false ); + } + rMedium.CloseAndRelease(); if ( bStorageBasedTarget ) { -- 2.5.0