summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-01-28 18:10:35 +0000
committerKurt Zenker <kz@openoffice.org>2004-01-28 18:10:35 +0000
commitb84d513500edd56b78c382e1500e9125b7cb9d5a (patch)
tree05cd021977a5156bd82e17d24ef8fbca47a59cf5 /sfx2
parent42e6850e115c931d4835507a9ffdc4631a1f119c (diff)
INTEGRATION: CWS filtercfg (1.31.6); FILE MERGED
2004/01/13 20:09:15 as 1.31.6.3: RESYNC: (1.32-1.33); FILE MERGED 2003/12/02 11:36:44 as 1.31.6.2: RESYNC: (1.31-1.32); FILE MERGED 2003/11/14 08:27:37 as 1.31.6.1: #102620# improve detection; use dispatch returns as load result
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appserv.cxx26
1 files changed, 22 insertions, 4 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 04dcc479c4f3..82dda514eefc 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: appserv.cxx,v $
*
- * $Revision: 1.33 $
+ * $Revision: 1.34 $
*
- * last change: $Author: vg $ $Date: 2004-01-06 16:23:19 $
+ * last change: $Author: kz $ $Date: 2004-01-28 19:10:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,6 +65,12 @@
#ifndef _COM_SUN_STAR_LANG_XMultiServiceFactory_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#endif
+#ifndef _COM_SUN_STAR_FRAME_DISPATCHRESULTEVENT_HPP_
+#include <com/sun/star/frame/DispatchResultEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_DISPATCHRESULTSTATE_HPP_
+#include <com/sun/star/frame/DispatchResultState.hpp>
+#endif
#ifndef _COM_SUN_STAR_TASK_XJOBEXECUTOR_HPP_
#include <com/sun/star/task/XJobExecutor.hpp>
#endif
@@ -1081,7 +1087,13 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
Sequence < com::sun::star::beans::PropertyValue > aSeq;
if ( rReq.GetArgs() )
TransformItems( rReq.GetSlot(), *rReq.GetArgs(), aSeq );
- xHelper->executeDispatch( xProv, aCmd, ::rtl::OUString(), 0, aSeq );
+ Any aResult = xHelper->executeDispatch( xProv, aCmd, ::rtl::OUString(), 0, aSeq );
+ ::com::sun::star::frame::DispatchResultEvent aEvent;
+ sal_Bool bSuccess = (
+ (aResult >>= aEvent) &&
+ (aEvent.State == ::com::sun::star::frame::DispatchResultState::SUCCESS)
+ );
+ rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bSuccess ) );
}
}
}
@@ -1108,7 +1120,13 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
Sequence < com::sun::star::beans::PropertyValue > aSeq;
if ( rReq.GetArgs() )
TransformItems( rReq.GetSlot(), *rReq.GetArgs(), aSeq );
- xHelper->executeDispatch( xProv, aCmd, ::rtl::OUString(), 0, aSeq );
+ Any aResult = xHelper->executeDispatch( xProv, aCmd, ::rtl::OUString(), 0, aSeq );
+ ::com::sun::star::frame::DispatchResultEvent aEvent;
+ sal_Bool bSuccess = (
+ (aResult >>= aEvent) &&
+ (aEvent.State == ::com::sun::star::frame::DispatchResultState::SUCCESS)
+ );
+ rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bSuccess ) );
}
}
}