summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/appopen.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-11-04 14:49:23 +0000
committerKurt Zenker <kz@openoffice.org>2005-11-04 14:49:23 +0000
commit01e04f10ec540d996a2502f35704bdb70848c49c (patch)
tree7ed59672de8fe64ec079156461179b336c8a03ac /sfx2/source/appl/appopen.cxx
parent2bed9eae167979dcfe7d42de8266fc191a2f2394 (diff)
INTEGRATION: CWS fwk25 (1.98.16); FILE MERGED
2005/11/01 17:36:52 mba 1.98.16.3: #i55787#: storage change wasn't notified 2005/10/31 16:21:09 mba 1.98.16.2: #i55787#: no OwnerLock used anymore for hidden documents 2005/10/17 09:31:52 mba 1.98.16.1: #i55787#: SID_OPENDOC can return two types of items
Diffstat (limited to 'sfx2/source/appl/appopen.cxx')
-rw-r--r--sfx2/source/appl/appopen.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 55a82a60da..a85e0102b4 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: appopen.cxx,v $
*
- * $Revision: 1.98 $
+ * $Revision: 1.99 $
*
- * last change: $Author: hr $ $Date: 2005-09-23 15:51:06 $
+ * last change: $Author: kz $ $Date: 2005-11-04 15:49:23 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -181,6 +181,7 @@
#include "objface.hxx"
#include "filedlghelper.hxx"
#include "docfac.hxx"
+#include "event.hxx"
#define _SVSTDARR_STRINGSDTOR
#include <svtools/svstdarr.hxx>
@@ -466,10 +467,21 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
SfxBoolItem aHidden( SID_HIDDEN, TRUE );
const SfxPoolItem *pRet = GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, &aName, &aHidden, &aReferer, &aFlags, 0L );
const SfxObjectItem *pObj = PTR_CAST( SfxObjectItem, pRet );
- xDoc = PTR_CAST( SfxObjectShell, pObj->GetShell() );
+ if ( pObj )
+ xDoc = PTR_CAST( SfxObjectShell, pObj->GetShell() );
+ else
+ {
+ const SfxViewFrameItem *pView = PTR_CAST( SfxViewFrameItem, pRet );
+ if ( pView )
+ {
+ SfxViewFrame *pFrame = pView->GetFrame();
+ if ( pFrame )
+ xDoc = pFrame->GetObjectShell();
+ }
+ }
+
if ( !xDoc.Is() )
return ERRCODE_SFX_DOLOADFAILED;
- xDoc->OwnerLock( FALSE ); // lock was set by hidden load
}
else
{
@@ -502,6 +514,7 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
//REMOVE xDoc->DoHandsOff();
if ( !xDoc->DoSaveCompleted( new SfxMedium( xTempStorage, String() ) ) )
throw uno::RuntimeException();
+ NotifyEvent( SfxEventHint( SFX_EVENT_STORAGECHANGED, xDoc ) );
}
catch( uno::Exception& )
{