diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2005-03-11 09:53:18 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2005-03-11 09:53:18 +0000 |
commit | 0b010f142ef73f3d349d24737bb09282bd30ac4e (patch) | |
tree | ee23fcf7e489ae057179029de929a09baf5e14fb /sfx2/source/appl | |
parent | b9cd11d5b93d50201ebb426624f3790de589b66a (diff) |
INTEGRATION: CWS os54 (1.87.76); FILE MERGED
2005/03/02 13:10:09 os 1.87.76.2: RESYNC: (1.87-1.88); FILE MERGED
2005/02/23 11:07:37 mba 1.87.76.1: #i43307#: don't try to close desktop
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r-- | sfx2/source/appl/appopen.cxx | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index a13bc422cbc8..85039822dd6b 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -2,9 +2,9 @@ * * $RCSfile: appopen.cxx,v $ * - * $Revision: 1.88 $ + * $Revision: 1.89 $ * - * last change: $Author: vg $ $Date: 2005-02-16 16:35:17 $ + * last change: $Author: vg $ $Date: 2005-03-11 10:53:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,6 +83,9 @@ #ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_ #include <com/sun/star/frame/XFrame.hpp> #endif +#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HPP_ +#include <com/sun/star/frame/XDesktop.hpp> +#endif #ifndef _COM_SUN_STAR_FRAME_DISPATCHRESULTSTATE_HPP_ #include <com/sun/star/frame/DispatchResultState.hpp> #endif @@ -1383,8 +1386,13 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) // check if caller wants to create a view BOOL bCreateView = TRUE; SFX_REQUEST_ARG( rReq, pCreateViewItem, SfxBoolItem, SID_VIEW, FALSE ); - if ( pCreateViewItem && !pCreateViewItem->GetValue() ) - bCreateView = FALSE; + if ( pCreateViewItem ) + { + if ( !pCreateViewItem->GetValue() ) + bCreateView = FALSE; + // this is an "SFX only" parameter + rReq.RemoveItem( SID_VIEW ); + } // we can't load without a view - switch to hidden view if ( !bCreateView ) @@ -1497,10 +1505,14 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) { // a blank frame would have been created in findFrame; in this case I am the owner and I must delete it Reference < XCloseable > xClose( xFrame, UNO_QUERY ); - if ( xClose.is() ) - xClose->close(sal_True); - else - xFrame->dispose(); + Reference < XDesktop > xDesktop( xFrame, UNO_QUERY ); + if ( !xDesktop.is() ) + { + if ( xClose.is() ) + xClose->close(sal_True); + else + xFrame->dispose(); + } } } else |