summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorKai Sommerfeld <kso@openoffice.org>2001-02-12 12:17:09 +0000
committerKai Sommerfeld <kso@openoffice.org>2001-02-12 12:17:09 +0000
commitfcfa9d404eb0186bf74be2627f0b20c411bea888 (patch)
treeeaccbfc476904941bf330c81e83b1d5f771dd15e /ucb
parentdf6d4e07e8d0da02a56bca5527b85ec230748002 (diff)
#83045# - Optimized: Now uses command environment proxy to cache remote
interfaces.
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/core/ucbcmds.cxx22
1 files changed, 16 insertions, 6 deletions
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 77e53e0a11ee..599a603d3c02 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ucbcmds.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: kso $ $Date: 2001-02-02 08:18:49 $
+ * last change: $Author: kso $ $Date: 2001-02-12 13:17:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -122,6 +122,10 @@
#include <com/sun/star/ucb/XDynamicResultSet.hpp>
#endif
+#ifndef _UCBHELPER_COMMANDENVIRONMENTPROXY_HXX
+#include <ucbhelper/commandenvironmentproxy.hxx>
+#endif
+
#ifndef _UCBCMDS_HXX
#include "ucbcmds.hxx"
#endif
@@ -905,6 +909,11 @@ void UniversalContentBroker::globalTransfer(
const uno::Reference< XCommandEnvironment > & xEnv )
throw( uno::Exception )
{
+ // Remote optimization: Supply own task environment, which caches (remote)
+ // interfaces (progress handler, interaction handler, ...) locally.
+ uno::Reference< XCommandEnvironment > xLocalEnv(
+ new ::ucb::CommandEnvironmentProxy( xEnv ) );
+
//////////////////////////////////////////////////////////////////////
//
// (1) Try to transfer the content using 'transfer' command.
@@ -947,7 +956,7 @@ void UniversalContentBroker::globalTransfer(
-1, // Handle
uno::makeAny( aTransferArg ) ); // Argument
- xCommandProcessor->execute( aCommand, 0, xEnv );
+ xCommandProcessor->execute( aCommand, 0, xLocalEnv );
// Command succeeded. We're done.
return;
@@ -1010,13 +1019,14 @@ void UniversalContentBroker::globalTransfer(
uno::makeAny( aProps ) );
uno::Reference< sdbc::XRow > xRow;
- xCommandProcessor->execute( aGetPropsCommand, 0, xEnv ) >>= xRow;
+ xCommandProcessor->execute( aGetPropsCommand, 0, xLocalEnv ) >>= xRow;
if ( !xRow.is() )
ucb_commands::abort( "Unable to get properties from source object!" );
// Do it!
- ucb_commands::globalTransfer( m_xSMgr, xSource, xTarget, rArg, xRow, xEnv );
+ ucb_commands::globalTransfer(
+ m_xSMgr, xSource, xTarget, rArg, xRow, xLocalEnv );
//////////////////////////////////////////////////////////////////////
//
@@ -1033,7 +1043,7 @@ void UniversalContentBroker::globalTransfer(
-1, // Handle
uno::makeAny( sal_Bool( sal_True ) ) ); // Argument
- xCommandProcessor->execute( aCommand, 0, xEnv );
+ xCommandProcessor->execute( aCommand, 0, xLocalEnv );
}
catch ( uno::Exception const & )
{