summaryrefslogtreecommitdiff
path: root/connectivity
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
commitaf66a011a47f673a9a0ee2c6a0b27e23b11b6ebf (patch)
treeb345d4f1da3fc120f681159be19d03435c2f9937 /connectivity
parent0e79b13cbd761931f6cd134b1e9ad4465882be7a (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 'connectivity')
-rw-r--r--connectivity/source/commontools/dbtools.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 02e6e420142f..4b0d0eafd56f 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -320,8 +320,8 @@ Reference< XConnection > getConnection_allowException(
Reference<XCompletedConnection> xConnectionCompletion(xProp, UNO_QUERY);
if (xConnectionCompletion.is())
{ // instantiate the default SDB interaction handler
- Reference< XInteractionHandler > xHandler(_rxFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.sdb.InteractionHandler")), UNO_QUERY);
- OSL_ENSURE(xHandler.is(), "dbtools::getConnection service com.sun.star.sdb.InteractionHandler not available!");
+ Reference< XInteractionHandler > xHandler(_rxFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.task.InteractionHandler")), UNO_QUERY);
+ OSL_ENSURE(xHandler.is(), "dbtools::getConnection service com.sun.star.task.InteractionHandler not available!");
if (xHandler.is())
{
xConnection = xConnectionCompletion->connectWithCompletion(xHandler);