summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ui/dlg
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-10-04 14:36:34 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-04 14:42:52 +0200
commitdd11a1e57a2565560803dc3fef5fccc9e7157105 (patch)
tree4adf17c00e21a17b0137a286ce1547b0e56bea2f /dbaccess/source/ui/dlg
parentfdo#46808, Adapt task::InteractionHandler UNO service to new style (diff)
downloadcore-dd11a1e57a2565560803dc3fef5fccc9e7157105.tar.gz
core-dd11a1e57a2565560803dc3fef5fccc9e7157105.zip
Fixes/improvements on previous commit
* UUIInteractionHandler still needs to implement XInitialization. * Moved ambiguating InteractionHandler typedef out of the way. * Removed InteractionHandler.createDefault, as it was originally stated that "it is strongly recommended that [the "Parent"] property is supplied." * Added back documentation about Parent and Context. * Simplified some call-sites to directly use XInteractionHandler2. Change-Id: I1029b8f3cf079171c75920cafaaa44b5bbada883
Diffstat (limited to 'dbaccess/source/ui/dlg')
-rw-r--r--dbaccess/source/ui/dlg/CollectionView.cxx12
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx2
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx9
4 files changed, 8 insertions, 17 deletions
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx
index 3c11de710096..7123db850014 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -29,7 +29,6 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <svtools/QueryFolderName.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -170,20 +169,13 @@ IMPL_LINK_NOARG(OCollectionView, Save_Click)
InteractiveAugmentedIOException aException(sTemp,Reference<XInterface>(),eClass,eError,aValues);
- Reference<XInitialization> xIni(
- InteractionHandler::createDefault(comphelper::getComponentContext(m_xORB)), UNO_QUERY_THROW);
- aValue.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Parent"));
- aValue.Value <<= VCLUnoHelper::GetInterface( this );
- Sequence< Any > aArgs(1);
- aArgs[0] <<= makeAny(aValue);
- xIni->initialize(aArgs);
+ Reference<XInteractionHandler2> xHandler(
+ InteractionHandler::createWithParent(comphelper::getComponentContext(m_xORB), VCLUnoHelper::GetInterface( this )));
OInteractionRequest* pRequest = new OInteractionRequest(makeAny(aException));
Reference< XInteractionRequest > xRequest(pRequest);
OInteractionApprove* pApprove = new OInteractionApprove;
pRequest->addContinuation(pApprove);
-
- Reference< XInteractionHandler > xHandler(xIni,UNO_QUERY);
xHandler->handle(xRequest);
return 0;
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index f3cab0081558..ac7e55f21a55 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -524,7 +524,7 @@ DBG_NAME(OConnectionHelper)
sal_Bool bExists = sal_False;
IS_PATH_EXIST eExists = PATH_NOT_EXIST;
Reference< ::com::sun::star::task::XInteractionHandler > xInteractionHandler(
- task::InteractionHandler::createDefault(comphelper::getComponentContext(m_xORB)), UNO_QUERY_THROW );
+ task::InteractionHandler::createWithParent(comphelper::getComponentContext(m_xORB), 0), UNO_QUERY );
OFilePickerInteractionHandler* pHandler = new OFilePickerInteractionHandler(xInteractionHandler);
xInteractionHandler = pHandler;
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 30118af634d3..9082417c97ca 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -255,7 +255,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert
if ( !xHandler.is() )
{
// instantiate the default SDB interaction handler
- xHandler = Reference< XInteractionHandler >( task::InteractionHandler::createDefault(comphelper::getComponentContext(m_xORB)), UNO_QUERY_THROW );
+ xHandler = Reference< XInteractionHandler >( task::InteractionHandler::createWithParent(comphelper::getComponentContext(m_xORB), 0), UNO_QUERY );
}
String sName = pName ? pName->GetValue() : String();
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index dfdb2e26bb1e..1f34d54c47df 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -735,7 +735,7 @@ namespace
//-------------------------------------------------------------------------
sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
{
- Reference< XInteractionHandler2 > xHandler( InteractionHandler::createDefault(comphelper::getComponentContext(getORB())), UNO_QUERY_THROW );
+ Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(comphelper::getComponentContext(getORB()), 0) );
try
{
if (callSaveAsDialog() == sal_True)
@@ -965,7 +965,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
private:
Reference< XComponentLoader > m_xFrameLoader;
Reference< XDesktop > m_xDesktop;
- Reference< XInteractionHandler > m_xInteractionHandler;
+ Reference< XInteractionHandler2 > m_xInteractionHandler;
::rtl::OUString m_sURL;
OAsyncronousLink m_aAsyncCaller;
@@ -993,9 +993,8 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
{
m_xDesktop.set( _rxORB->createInstance( SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
m_xFrameLoader.set( m_xDesktop, UNO_QUERY_THROW );
- m_xInteractionHandler.set(
- InteractionHandler::createDefault(comphelper::getComponentContext(_rxORB)),
- UNO_QUERY_THROW );
+ m_xInteractionHandler =
+ InteractionHandler::createWithParent(comphelper::getComponentContext(_rxORB), 0);
}
catch( const Exception& )
{