summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-01 21:32:33 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-02-01 21:32:33 +0100
commitbd711a0e5e5e0e94cc4cb78251f50de205aeb485 (patch)
treef0db6147b7b1c5012196f256183a4fdc9268fea7 /sw
parent5f2428d39fcb746c8aee3ca0b06dcfae8849fa3b (diff)
autorecovery: more sophisticated configuration data for interaction handlers
The generic css.task.InteractionHandler implementation in module uui is now able to instantiate "sub handlers", i.e. components to delegate a request to, based on the type of the request, and some configuration data. The "old" (and now deprecated) configuration scheme at org.openoffice.ucb.InteractionHandler did not contain type information, so any handlers registered there were always called when no default implementation for a given request was available. The "new" configuration scheme at org.openoffice.Interaction contains UNO type information. That is, a given handler implementation can declare itself responsible for an arbitrary set of UNO types, and for each of those types, whether it is also responsible for sub types. The generic interaction handler implementation uses this configuration data, when it encounteres an interaction request it cannot fullfill itself, to instantiate a component to delegate the request to. As with the "old" data, such a component is required to support the css.task.XInteractionHandler2 interface. Also, if it supports css.lang.XInitialization, then it will be initialized with a name-value pair, the name being "Parent", the value being the XWindow interface of the parent window for any message boxes. As an examplary implementation for this feature, the css.sdb.InteractionHandler has been deprecated. Now the css.sdb.DatabaseInteractionHandler is reponsible for database-related interactions, and the new configuration scheme is pre-filled with data assigning this responsibility. Consequently, a lot of places previously creating an css.sdb.InteractionHandler have been modified to create the default css.task.InteractionHandler.
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index ec8ad0dc1473..858a4b5a63b2 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -583,7 +583,7 @@ void SwAddressListDialog::DetectTablesAndQueries(
uno::Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
uno::Reference< XInteractionHandler > xHandler(
- xMgr->createInstance( C2U( "com.sun.star.sdb.InteractionHandler" )), UNO_QUERY);
+ xMgr->createInstance( C2U( "com.sun.star.task.InteractionHandler" )), UNO_QUERY);
pUserData->xConnection = SharedConnection( xComplConnection->connectWithCompletion( xHandler ) );
}
if(pUserData->xConnection.is())
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 1f72bbf1fe84..3d8eb202fbb4 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -1949,7 +1949,7 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData
{
rxSource.set(xComplConnection,UNO_QUERY);
Reference< XInteractionHandler > xHandler(
- xMgr->createInstance( C2U( "com.sun.star.sdb.InteractionHandler" )), UNO_QUERY);
+ xMgr->createInstance( C2U( "com.sun.star.task.InteractionHandler" )), UNO_QUERY);
xConnection = xComplConnection->connectWithCompletion( xHandler );
}
}
@@ -3100,7 +3100,7 @@ uno::Reference<XResultSet> SwNewDBMgr::createCursor(const ::rtl::OUString& _sDat
if ( xRowSet.is() )
{
- uno::Reference< XInteractionHandler > xHandler(xMgr->createInstance(C2U("com.sun.star.sdb.InteractionHandler")), UNO_QUERY);
+ uno::Reference< XInteractionHandler > xHandler(xMgr->createInstance(C2U("com.sun.star.task.InteractionHandler")), UNO_QUERY);
xRowSet->executeWithCompletion(xHandler);
}
xResultSet = uno::Reference<XResultSet>(xRowSet, UNO_QUERY);