diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-03-07 11:34:51 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-03-07 11:34:51 +0000 |
commit | 9be722cb92e4bd3c953b0da876d753506e7ac0e8 (patch) | |
tree | b8068362d624051a195bec9af111f75403fd020d /sfx2 | |
parent | 05856705d87112e9e647c3f62685b9159c041872 (diff) |
INTEGRATION: CWS calcshare_DEV300 (1.77.8); FILE MERGED
2008/02/25 14:48:34 mav 1.77.8.5: #i8811# fix the file handling
2008/02/25 13:37:25 mav 1.77.8.4: #i8811# fix the title and file handling
2008/02/25 11:32:02 mav 1.77.8.3: #i8811# fix the namespace
2008/02/25 09:41:24 mav 1.77.8.2: #i8811# the helper accessing the sharing control file
2008/02/20 11:32:08 mav 1.77.8.1: #i8811# title related fixes
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 8983139560f2..6c99c924bcbf 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -4,9 +4,9 @@ * * $RCSfile: objxtor.cxx,v $ * - * $Revision: 1.79 $ + * $Revision: 1.80 $ * - * last change: $Author: kz $ $Date: 2008-03-06 19:55:44 $ + * last change: $Author: kz $ $Date: 2008-03-07 12:34:51 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -115,6 +115,7 @@ #include <svtools/urihelper.hxx> #include <svtools/pathoptions.hxx> +#include <svtools/sharecontrolfile.hxx> #include <unotools/localfilehelper.hxx> #include <unotools/ucbhelper.hxx> #include <svtools/asynclink.hxx> @@ -306,6 +307,7 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell ) ,bLoadReadonly( sal_False ) ,bUseUserData( sal_True ) ,bSaveVersionOnClose( sal_False ) + ,m_bIsDocShared( sal_False ) ,lErr(ERRCODE_NONE) ,nEventId ( 0) ,bDoNotTouchDocInfo( sal_False ) @@ -453,6 +455,27 @@ SfxObjectShell::~SfxObjectShell() if ( pMedium ) { pMedium->CloseAndReleaseStreams_Impl(); + + if ( IsDocShared() ) + { + ::rtl::OUString aTempFileURL = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); + if ( GetSharedFileUrl().getLength() && !SfxMedium::EqualURLs( aTempFileURL, GetSharedFileUrl() ) ) + { + try + { + ::svt::ShareControlFile aControlFile( GetSharedFileUrl() ); + aControlFile.RemoveEntry(); + } + catch( uno::Exception& ) + { + } + + + // now remove the temporary file the document is based currently on + ::utl::UCBContentHelper::Kill( pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ); + } + } + DELETEX( pMedium ); } |