[Libreoffice-commits] .: 2 commits - basctl/source comphelper/inc comphelper/source connectivity/inc connectivity/source cui/source dbaccess/source desktop/source embedserv/source extensions/source filter/source forms/source fpicker/source offapi/com offapi/type_reference offapi/UnoApi_offapi.mk reportdesign/source sc/CppunitTest_sc_ucalc.mk sc/source sfx2/source svl/source svtools/source svx/inc svx/source sw/CppunitTest_sw_subsequent_odfexport.mk sw/CppunitTest_sw_subsequent_odfimport.mk sw/source ucb/workben udkapi/com uui/source xmlsecurity/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Oct 4 05:44:55 PDT 2012
basctl/source/basicide/moduldl2.cxx | 45 +++----
comphelper/inc/comphelper/ihwrapnofilter.hxx | 15 +-
comphelper/source/misc/ihwrapnofilter.cxx | 20 +++
connectivity/inc/connectivity/dbtools.hxx | 2
connectivity/inc/connectivity/virtualdbtools.hxx | 2
connectivity/source/commontools/dbtools.cxx | 25 +---
connectivity/source/simpledbt/staticdbtools_s.cxx | 4
connectivity/source/simpledbt/staticdbtools_s.hxx | 2
cui/source/dialogs/insdlg.cxx | 24 +---
cui/source/options/webconninfo.cxx | 12 --
dbaccess/source/core/dataaccess/databasecontext.cxx | 3
dbaccess/source/core/dataaccess/documentdefinition.cxx | 12 --
dbaccess/source/ext/macromigration/docinteraction.cxx | 3
dbaccess/source/filter/xml/dbloader2.cxx | 6 -
dbaccess/source/inc/stringconstants.hrc | 1
dbaccess/source/inc/stringconstants.inc | 1
dbaccess/source/ui/browser/brwctrlr.cxx | 7 -
dbaccess/source/ui/browser/unodatbr.cxx | 9 -
dbaccess/source/ui/dlg/CollectionView.cxx | 26 +---
dbaccess/source/ui/dlg/ConnectionHelper.cxx | 7 -
dbaccess/source/ui/dlg/DbAdminImpl.cxx | 6 -
dbaccess/source/ui/dlg/dbwizsetup.cxx | 12 --
dbaccess/source/ui/dlg/tablespage.cxx | 3
dbaccess/source/ui/inc/UITools.hxx | 8 -
dbaccess/source/ui/misc/TokenWriter.cxx | 2
dbaccess/source/ui/misc/UITools.cxx | 18 +--
dbaccess/source/ui/misc/WCopyTable.cxx | 3
dbaccess/source/ui/misc/datasourceconnector.cxx | 12 --
dbaccess/source/ui/uno/copytablewizard.cxx | 28 ++--
dbaccess/source/ui/uno/dbinteraction.cxx | 7 -
dbaccess/source/ui/uno/dbinteraction.hxx | 3
desktop/source/app/configinit.cxx | 15 --
desktop/source/app/dispatchwatcher.cxx | 8 -
desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 13 --
desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 15 --
embedserv/source/embed/docholder.cxx | 7 -
extensions/source/abpilot/datasourcehandling.cxx | 11 -
extensions/source/bibliography/datman.cxx | 7 -
extensions/source/dbpilots/controlwizard.cxx | 8 -
extensions/source/update/check/updatehdl.cxx | 11 -
filter/source/xsltdialog/xmlfiltertestdialog.cxx | 10 -
forms/source/xforms/submission/replace.cxx | 6 -
forms/source/xforms/submission/submission.hxx | 4
forms/source/xforms/submission/submission_get.cxx | 10 -
forms/source/xforms/submission/submission_get.hxx | 4
fpicker/source/office/fpsmartcontent.cxx | 13 +-
fpicker/source/office/iodlg.cxx | 13 --
offapi/UnoApi_offapi.mk | 2
offapi/com/sun/star/task/InteractionHandler.idl | 42 +++----
offapi/type_reference/types.rdb |binary
reportdesign/source/core/api/ReportDefinition.cxx | 5
sc/CppunitTest_sc_ucalc.mk | 1
sc/source/core/data/dpobject.cxx | 7 -
sc/source/ui/dbgui/dapidata.cxx | 7 -
sc/source/ui/docshell/dbdocimp.cxx | 7 -
sfx2/source/appl/shutdownicon.cxx | 7 -
sfx2/source/bastyp/helper.cxx | 13 +-
sfx2/source/control/templateremoteview.cxx | 8 -
sfx2/source/dialog/templateinfodlg.cxx | 8 -
sfx2/source/doc/docfile.cxx | 14 --
sfx2/source/doc/doctemplates.cxx | 12 --
sfx2/source/doc/guisaveas.cxx | 7 -
sfx2/source/doc/objserv.cxx | 31 +----
svl/source/passwordcontainer/passwordcontainer.cxx | 11 +
svtools/source/contnr/fileview.cxx | 18 +--
svtools/source/contnr/templwin.cxx | 9 -
svtools/source/dialogs/ServerDetailsControls.cxx | 8 -
svtools/source/dialogs/addresstemplate.cxx | 8 -
svx/inc/svx/dbtoolsclient.hxx | 2
svx/source/fmcomp/fmgridcl.cxx | 3
svx/source/form/dbtoolsclient.cxx | 4
svx/source/form/fmvwimp.cxx | 2
svx/source/form/formcontroller.cxx | 4
sw/CppunitTest_sw_subsequent_odfexport.mk | 1
sw/CppunitTest_sw_subsequent_odfimport.mk | 1
sw/source/ui/dbui/addresslistdialog.cxx | 6 -
sw/source/ui/dbui/dbmgr.cxx | 10 -
ucb/workben/ucb/ucbdemo.cxx | 12 --
udkapi/com/sun/star/task/XInteractionHandler2.idl | 2
uui/source/iahndl-authentication.cxx | 2
uui/source/iahndl.cxx | 57 ++--------
uui/source/iahndl.hxx | 12 +-
uui/source/interactionhandler.cxx | 18 ++-
uui/source/passwordcontainer.cxx | 41 ++++---
uui/source/passwordcontainer.hxx | 15 +-
xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx | 44 +++----
86 files changed, 443 insertions(+), 501 deletions(-)
New commits:
commit dd11a1e57a2565560803dc3fef5fccc9e7157105
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Oct 4 14:36:34 2012 +0200
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
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index f146118..5de042e 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -82,9 +82,9 @@ namespace
class DummyInteractionHandler : public HandlerImpl_BASE
{
- Reference< task::XInteractionHandler > m_xHandler;
+ Reference< task::XInteractionHandler2 > m_xHandler;
public:
- DummyInteractionHandler( const Reference< task::XInteractionHandler >& xHandler ) : m_xHandler( xHandler ){}
+ DummyInteractionHandler( const Reference< task::XInteractionHandler2 >& xHandler ) : m_xHandler( xHandler ){}
virtual void SAL_CALL handle( const Reference< task::XInteractionRequest >& rRequest ) throw (::com::sun::star::uno::RuntimeException)
{
@@ -1255,7 +1255,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
// file open dialog
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createDefault(xContext), UNO_QUERY );
+ Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) );
Reference< XSimpleFileAccess2 > xSFA = SimpleFileAccess::create(xContext);
Reference < XFilePicker > xFP;
@@ -1307,7 +1307,10 @@ void LibPage::ExportAsPackage( const String& aLibName )
implExportLib( aLibName, aTmpPath, xDummyHandler );
Reference< XCommandEnvironment > xCmdEnv =
- static_cast<XCommandEnvironment*>( new OLibCommandEnvironment( xHandler ) );
+ static_cast<XCommandEnvironment*>(
+ new OLibCommandEnvironment(
+ Reference< task::XInteractionHandler >(
+ xHandler, UNO_QUERY ) ) );
::ucbhelper::Content sourceContent( aSourcePath, xCmdEnv, comphelper::getProcessComponentContext() );
@@ -1386,7 +1389,7 @@ void LibPage::ExportAsBasic( const String& aLibName )
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference< XFolderPicker > xFolderPicker( xMSF->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" ) ) ), UNO_QUERY );
- Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
+ Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) );
if( xFolderPicker.is() )
{
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index e5800bc..2afd001 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -307,7 +307,7 @@ Reference< XConnection > getConnection_allowException(
if (xConnectionCompletion.is())
{ // instantiate the default SDB interaction handler
Reference< XInteractionHandler > xHandler(
- InteractionHandler::createDefault(_rxContext), UNO_QUERY_THROW );
+ InteractionHandler::createWithParent(_rxContext, 0), UNO_QUERY );
xConnection = xConnectionCompletion->connectWithCompletion(xHandler);
}
}
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 95b2eb1..e15c328 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -342,9 +342,8 @@ short SvInsertOleDlg::Execute()
aMedium[0].Value <<= ::rtl::OUString( aFileName );
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- uno::Reference< task::XInteractionHandler > xInteraction(
- task::InteractionHandler::createDefault(xContext),
- uno::UNO_QUERY_THROW );
+ uno::Reference< task::XInteractionHandler2 > xInteraction(
+ task::InteractionHandler::createWithParent(xContext, 0) );
aMedium[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ) );
aMedium[1].Value <<= xInteraction;
diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx
index 5b4ca5f..bc7bb02 100644
--- a/cui/source/options/webconninfo.cxx
+++ b/cui/source/options/webconninfo.cxx
@@ -188,8 +188,8 @@ void WebConnectionInfoDialog::FillPasswordList()
if ( xMasterPasswd->isPersistentStoringAllowed() )
{
uno::Reference< task::XInteractionHandler > xInteractionHandler(
- task::InteractionHandler::createDefault(comphelper::getProcessComponentContext()),
- uno::UNO_QUERY_THROW);
+ task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), 0),
+ uno::UNO_QUERY);
uno::Sequence< task::UrlRecord > aURLEntries = xMasterPasswd->getAllPersistent( xInteractionHandler );
sal_Int32 nCount = 0;
@@ -297,8 +297,8 @@ IMPL_LINK_NOARG(WebConnectionInfoDialog, ChangePasswordHdl)
uno::Reference< task::XInteractionRequest > rRequest( pPasswordRequest );
uno::Reference< task::XInteractionHandler > xInteractionHandler(
- task::InteractionHandler::createDefault(comphelper::getProcessComponentContext()),
- uno::UNO_QUERY_THROW );
+ task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), 0),
+ uno::UNO_QUERY );
xInteractionHandler->handle( rRequest );
if ( pPasswordRequest->isPassword() )
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 717661d..798262f 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -363,7 +363,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const ::rtl::OUStrin
::comphelper::NamedValueCollection aArgs;
aArgs.put( "URL", _sURL );
aArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
- aArgs.put( "InteractionHandler", task::InteractionHandler::createDefault(m_aContext.getUNOContext()) );
+ aArgs.put( "InteractionHandler", task::InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
Sequence< PropertyValue > aResource( aArgs.getPropertyValues() );
xLoad->load( aResource );
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index fd1ded7..5abe8f8 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -1301,7 +1301,7 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
pRequest->addContinuation(pAbort);
// create the handler, let it handle the request
- Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(m_aContext.getUNOContext()), UNO_QUERY_THROW );
+ Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
xHandler->handle(xRequest);
if ( pAbort->wasSelected() )
@@ -1375,7 +1375,7 @@ sal_Bool ODocumentDefinition::saveAs()
pRequest->addContinuation(pAbort);
// create the handler, let it handle the request
- Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(m_aContext.getUNOContext()), UNO_QUERY_THROW);
+ Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
xHandler->handle(xRequest);
if ( pAbort->wasSelected() )
diff --git a/dbaccess/source/ext/macromigration/docinteraction.cxx b/dbaccess/source/ext/macromigration/docinteraction.cxx
index f2f9dc5..9e21ef4 100644
--- a/dbaccess/source/ext/macromigration/docinteraction.cxx
+++ b/dbaccess/source/ext/macromigration/docinteraction.cxx
@@ -66,7 +66,7 @@ namespace dbmm
}
InteractionHandler_Data( const ::comphelper::ComponentContext& _rContext )
- :xHandler( ::com::sun::star::task::InteractionHandler::createDefault(_rContext.getUNOContext()), UNO_QUERY_THROW )
+ :xHandler( ::com::sun::star::task::InteractionHandler::createWithParent(_rContext.getUNOContext(), 0), UNO_QUERY )
{
}
};
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index 52562d9..07fe9f2 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -429,7 +429,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const ::
// not touch it.
if ( !aMediaDesc.has( "InteractionHandler" ) )
{
- Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(m_aContext.getUNOContext()), UNO_QUERY_THROW );
+ Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
aMediaDesc.put( "InteractionHandler", xHandler );
}
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index d03cd2a..460b093 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1471,7 +1471,7 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for
pParamRequest->addContinuation(pAbort);
// create the handler, let it handle the request
- Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(comphelper::ComponentContext(getORB()).getUNOContext()), UNO_QUERY_THROW);
+ Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(comphelper::getComponentContext(getORB()), 0) );
xHandler->handle(xParamRequest);
if (!pParamValues->wasSelected())
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 23148ba..058aaef 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -3531,8 +3531,7 @@ void SbaTableQueryBrowser::implAdministrate( SvLBoxEntry* _pApplyTo )
if ( xDocumentModel.is() )
{
Reference< XInteractionHandler2 > xInteractionHandler(
- InteractionHandler::createDefault(comphelper::getComponentContext(getORB())),
- UNO_QUERY_THROW );
+ InteractionHandler::createWithParent(comphelper::getComponentContext(getORB()), 0) );
::comphelper::NamedValueCollection aLoadArgs;
aLoadArgs.put( "Model", xDocumentModel );
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx
index 3c11de7..7123db8 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 f3cab00..ac7e55f 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 30118af..9082417 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 dfdb2e2..1f34d54 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& )
{
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index a705c8b..d43e4cd 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -192,7 +192,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
}
else
{ // instantiate the default SDB interaction handler
- Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(_rxContext), UNO_QUERY_THROW);
+ Reference< XInteractionHandler > xHandler( InteractionHandler::createWithParent(_rxContext, 0), UNO_QUERY);
_rOUTConnection = xConnectionCompletion->connectWithCompletion(xHandler);
}
}
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index c63f77c..bf3c9d3 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -684,7 +684,7 @@ OCopyTableWizard::OCopyTableWizard( Window* pParent, const ::rtl::OUString& _rDe
::dbaui::fillTypeInfo( _xConnection, m_sTypeNames, m_aTypeInfo, m_aTypeInfoIndex );
::dbaui::fillTypeInfo( _xConnection, m_sTypeNames, m_aDestTypeInfo, m_aDestTypeInfoIndex );
- m_xInteractionHandler.set( InteractionHandler::createDefault(comphelper::getComponentContext(m_xFactory)), UNO_QUERY_THROW );
+ m_xInteractionHandler.set( InteractionHandler::createWithParent(comphelper::getComponentContext(m_xFactory), 0), UNO_QUERY );
OCopyTable* pPage1( new OCopyTable( this ) );
pPage1->disallowViews();
diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx
index 4f1b4af..b4b4187 100644
--- a/dbaccess/source/ui/misc/datasourceconnector.cxx
+++ b/dbaccess/source/ui/misc/datasourceconnector.cxx
@@ -139,7 +139,7 @@ namespace dbaui
if ( !xHandler.is() )
{
// instantiate the default SDB interaction handler
- xHandler = Reference< XInteractionHandler >( InteractionHandler::createDefault(comphelper::getComponentContext(m_xORB)), UNO_QUERY_THROW );
+ xHandler = Reference< XInteractionHandler >( InteractionHandler::createWithParent(comphelper::getComponentContext(m_xORB), 0), UNO_QUERY );
}
xConnection = xConnectionCompletion->connectWithCompletion(xHandler);
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index d41a496..252564d 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -136,7 +136,6 @@ namespace dbaui
namespace DataType = ::com::sun::star::sdbc::DataType;
typedef ::utl::SharedUNOComponent< XConnection > SharedConnection;
- typedef Reference< XInteractionHandler > InteractionHandler;
//=========================================================================
//= CopyTableWizard
@@ -239,7 +238,7 @@ namespace dbaui
const Sequence< Any >& _rAllArgs,
const sal_Int16 _nArgPos,
SharedConnection& _out_rxConnection,
- InteractionHandler& _out_rxDocInteractionHandler
+ Reference< XInteractionHandler >& _out_rxDocInteractionHandler
) const;
/** extracts the source object (table or query) described by the given descriptor,
@@ -293,7 +292,7 @@ namespace dbaui
SharedConnection
impl_extractConnection_throw(
const Reference< XPropertySet >& _rxDataSourceDescriptor,
- InteractionHandler& _out_rxDocInteractionHandler
+ Reference< XInteractionHandler >& _out_rxDocInteractionHandler
) const;
/** actually copies the table
@@ -358,7 +357,7 @@ private:
SharedConnection m_xDestConnection;
// other
- InteractionHandler m_xInteractionHandler;
+ Reference< XInteractionHandler > m_xInteractionHandler;
::cppu::OInterfaceContainerHelper
m_aCopyTableListeners;
sal_Int16 m_nOverrideExecutionResult;
@@ -635,9 +634,9 @@ namespace
if it occures during invoking any of the data source's methods, or if any of the involved
components violates its contract by not providing the required interfaces
*/
- InteractionHandler lcl_getInteractionHandler_throw( const Reference< XDataSource >& _rxDataSource, const InteractionHandler& _rFallback )
+ Reference< XInteractionHandler > lcl_getInteractionHandler_throw( const Reference< XDataSource >& _rxDataSource, const Reference< XInteractionHandler >& _rFallback )
{
- InteractionHandler xHandler( _rFallback );
+ Reference< XInteractionHandler > xHandler( _rFallback );
// try to obtain the document model
Reference< XModel > xDocumentModel;
@@ -664,7 +663,7 @@ namespace
if it occures during invoking any of the data source's methods, or if any of the involved
components violates its contract by not providing the required interfaces
*/
- InteractionHandler lcl_getInteractionHandler_throw( const Reference< XConnection >& _rxConnection, const InteractionHandler& _rFallback )
+ Reference< XInteractionHandler > lcl_getInteractionHandler_throw( const Reference< XConnection >& _rxConnection, const Reference< XInteractionHandler >& _rFallback )
{
// try whether there is a data source which the connection belongs to
Reference< XDataSource > xDataSource;
@@ -682,7 +681,7 @@ namespace
//-------------------------------------------------------------------------
Reference< XPropertySet > CopyTableWizard::impl_ensureDataAccessDescriptor_throw(
const Sequence< Any >& _rAllArgs, const sal_Int16 _nArgPos, SharedConnection& _out_rxConnection,
- InteractionHandler& _out_rxDocInteractionHandler ) const
+ Reference< XInteractionHandler >& _out_rxDocInteractionHandler ) const
{
Reference< XPropertySet > xDescriptor;
_rAllArgs[ _nArgPos ] >>= xDescriptor;
@@ -879,7 +878,7 @@ void CopyTableWizard::impl_extractSourceResultSet_throw( const Reference< XPrope
//-------------------------------------------------------------------------
SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference< XPropertySet >& _rxDataSourceDescriptor,
- InteractionHandler& _out_rxDocInteractionHandler ) const
+ Reference< XInteractionHandler >& _out_rxDocInteractionHandler ) const
{
SharedConnection xConnection;
@@ -887,7 +886,7 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference<
if ( !_rxDataSourceDescriptor.is() )
return xConnection;
- InteractionHandler xInteractionHandler;
+ Reference< XInteractionHandler > xInteractionHandler;
do
{
@@ -1554,15 +1553,15 @@ void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments )
);
}
if ( !m_xInteractionHandler.is() )
- m_xInteractionHandler.set( InteractionHandler::createDefault(m_aContext.getUNOContext()), UNO_QUERY_THROW );
+ m_xInteractionHandler.set( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0), UNO_QUERY );
- InteractionHandler xSourceDocHandler;
+ Reference< XInteractionHandler > xSourceDocHandler;
Reference< XPropertySet > xSourceDescriptor( impl_ensureDataAccessDescriptor_throw( _rArguments, 0, m_xSourceConnection, xSourceDocHandler ) );
impl_checkForUnsupportedSettings_throw( xSourceDescriptor );
m_pSourceObject = impl_extractSourceObject_throw( xSourceDescriptor, m_nCommandType );
impl_extractSourceResultSet_throw( xSourceDescriptor );
- InteractionHandler xDestDocHandler;
+ Reference< XInteractionHandler > xDestDocHandler;
impl_ensureDataAccessDescriptor_throw( _rArguments, 1, m_xDestConnection, xDestDocHandler );
if ( xDestDocHandler.is() && !m_xInteractionHandler.is() )
diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx
index 4a8d80f..8cb12b9 100644
--- a/dbaccess/source/ui/uno/dbinteraction.cxx
+++ b/dbaccess/source/ui/uno/dbinteraction.cxx
@@ -304,11 +304,10 @@ namespace dbaui
//-------------------------------------------------------------------------
bool BasicInteractionHandler::implHandleUnknown( const Reference< XInteractionRequest >& _rxRequest )
{
- Reference< XInteractionHandler > xFallbackHandler;
if ( m_xORB.is() )
- xFallbackHandler = xFallbackHandler.query( InteractionHandler::createDefault(comphelper::getComponentContext(m_xORB)) );
- if ( xFallbackHandler.is() )
{
+ Reference< XInteractionHandler2 > xFallbackHandler(
+ InteractionHandler::createWithParent(comphelper::getComponentContext(m_xORB), 0) );
xFallbackHandler->handle( _rxRequest );
return true;
}
diff --git a/desktop/source/app/configinit.cxx b/desktop/source/app/configinit.cxx
index 66b1c6e..9394a9b 100644
--- a/desktop/source/app/configinit.cxx
+++ b/desktop/source/app/configinit.cxx
@@ -165,7 +165,7 @@ void ConfigurationErrorHandler::deactivate()
ConfigurationErrorHandler::InteractionHandler ConfigurationErrorHandler::getDefaultInteractionHandler()
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- InteractionHandler xHandler( com::sun::star::task::InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
+ InteractionHandler xHandler( com::sun::star::task::InteractionHandler::createWithParent(xContext, 0), UNO_QUERY );
return xHandler;
}
//------------------------------------------------------------------------------
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 091d484..261fa64 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -227,9 +227,8 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
}
else
{
- Reference < XInteractionHandler > xInteraction(
- InteractionHandler::createDefault(::comphelper::getProcessComponentContext()),
- UNO_QUERY_THROW );
+ Reference < XInteractionHandler2 > xInteraction(
+ InteractionHandler::createWithParent(::comphelper::getProcessComponentContext(), 0) );
aArgs[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
aArgs[1].Value <<= xInteraction;
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index b524781..943d37e 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -36,7 +36,6 @@
#include <cstddef>
-#include "com/sun/star/beans/PropertyValue.hpp"
#include "com/sun/star/beans/NamedValue.hpp"
#include "com/sun/star/deployment/DependencyException.hpp"
@@ -134,7 +133,7 @@ class ProgressCmdEnv
task::XInteractionHandler,
ucb::XProgressHandler >
{
- uno::Reference< task::XInteractionHandler> m_xHandler;
+ uno::Reference< task::XInteractionHandler2> m_xHandler;
uno::Reference< uno::XComponentContext > m_xContext;
uno::Reference< task::XAbortChannel> m_xAbortChannel;
@@ -533,11 +532,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
// forward to UUI handler:
if (! m_xHandler.is()) {
// late init:
- uno::Sequence< uno::Any > handlerArgs( 1 );
- handlerArgs[ 0 ] <<= beans::PropertyValue(
- OUSTR("Context"), -1, uno::Any( m_sTitle ),
- beans::PropertyState_DIRECT_VALUE );
- m_xHandler.set( task::InteractionHandler::createWithParentAndContext(m_xContext, NULL, m_sTitle), uno::UNO_QUERY_THROW );
+ m_xHandler = task::InteractionHandler::createWithParentAndContext(m_xContext, NULL, m_sTitle);
}
m_xHandler->handle( xRequest );
}
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 107e7b6..e224633 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -273,9 +273,9 @@ UpdateDialog::Thread::Thread(
{
if( m_context.is() )
{
- m_xInteractionHdl = uno::Reference< task::XInteractionHandler > (
- task::InteractionHandler::createDefault(m_context),
- uno::UNO_QUERY_THROW );
+ m_xInteractionHdl.set(
+ task::InteractionHandler::createWithParent(m_context, 0),
+ uno::UNO_QUERY );
m_updateInformation->setInteractionHandler( m_xInteractionHdl );
}
}
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index 9b23732..0577224 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -527,10 +527,9 @@ namespace abp
Reference< XInteractionHandler > xInteractions;
try
{
- xInteractions = Reference< XInteractionHandler >(
- InteractionHandler::createDefault(comphelper::getComponentContext(m_pImpl->xORB)),
- UNO_QUERY_THROW
- );
+ xInteractions.set(
+ InteractionHandler::createWithParent(comphelper::getComponentContext(m_pImpl->xORB), 0),
+ UNO_QUERY);
}
catch(const Exception&)
{
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 1146aaf..242733b 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -119,7 +119,7 @@ Reference< XConnection > getConnection(const ::rtl::OUString& _rURL)
Reference< XCompletedConnection > xComplConn(xDataSource, UNO_QUERY);
try
{
- Reference<task::XInteractionHandler> xIHdl( task::InteractionHandler::createDefault(xContext), UNO_QUERY_THROW);
+ Reference<task::XInteractionHandler> xIHdl( task::InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW);
xConn = xComplConn->connectWithCompletion(xIHdl);
}
catch (const SQLException&)
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index cb5a0d4..767088e 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -518,7 +518,7 @@ namespace dbp
Reference< XInteractionHandler > xHandler;
try
{
- xHandler = Reference< XInteractionHandler >( InteractionHandler::createDefault(comphelper::getComponentContext(getServiceFactory())), UNO_QUERY_THROW );
+ xHandler = Reference< XInteractionHandler >( InteractionHandler::createWithParent(comphelper::getComponentContext(getServiceFactory()), 0), UNO_QUERY_THROW );
}
catch(const Exception&) { }
if (!xHandler.is())
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 6ee4458..e4d125f 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -450,9 +450,9 @@ void SAL_CALL UpdateHandler::handle( uno::Reference< task::XInteractionRequest >
if( !xServiceManager.is() )
throw uno::RuntimeException( UNISTRING( "UpdateHandler: unable to obtain service manager from component context" ), *this );
- mxInteractionHdl = uno::Reference<task::XInteractionHandler> (
- task::InteractionHandler::createDefault(mxContext),
- uno::UNO_QUERY_THROW);
+ mxInteractionHdl.set(
+ task::InteractionHandler::createWithParent(mxContext, 0),
+ uno::UNO_QUERY_THROW);
}
uno::Reference< task::XInteractionRequestStringResolver > xStrResolver =
task::InteractionRequestStringResolver::create( mxContext );
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 670e615..6f265a5 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -424,7 +424,7 @@ void XMLFilterTestDialog::onExportBrowse()
maExportRecentFile = aDlg.GetPath();
Reference< XComponentLoader > xLoader( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) ), UNO_QUERY );
- Reference< XInteractionHandler > xInter( InteractionHandler::createDefault(comphelper::getComponentContext(mxMSF)), UNO_QUERY_THROW );
+ Reference< XInteractionHandler2 > xInter( InteractionHandler::createWithParent(comphelper::getComponentContext(mxMSF), 0) );
if( xLoader.is() )
{
OUString aFrame( RTL_CONSTASCII_USTRINGPARAM( "_default" ) );
@@ -619,7 +619,7 @@ void XMLFilterTestDialog::import( const OUString& rURL )
try
{
Reference< XComponentLoader > xLoader( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) ), UNO_QUERY );
- Reference< XInteractionHandler > xInter( InteractionHandler::createDefault(comphelper::getComponentContext(mxMSF)), UNO_QUERY_THROW );
+ Reference< XInteractionHandler2 > xInter( InteractionHandler::createWithParent(comphelper::getComponentContext(mxMSF), 0) );
if( xLoader.is() )
{
diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx
index 902ba9c..cb53a0b 100644
--- a/forms/source/xforms/submission/replace.cxx
+++ b/forms/source/xforms/submission/replace.cxx
@@ -130,8 +130,8 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
if( _xHandler.is() )
pHelper->m_aInteractionHandler = _xHandler;
else
- pHelper->m_aInteractionHandler = CSS::uno::Reference< XInteractionHandler >(
- InteractionHandler::createDefault(m_xContext), UNO_QUERY_THROW);
+ pHelper->m_aInteractionHandler.set(
+ InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY_THROW);
CProgressHandlerHelper *pProgressHelper = new CProgressHandlerHelper;
pHelper->m_aProgressHandler = Reference< XProgressHandler >(pProgressHelper);
diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx
index 1569724..9a141a1 100644
--- a/forms/source/xforms/submission/submission_get.cxx
+++ b/forms/source/xforms/submission/submission_get.cxx
@@ -73,8 +73,8 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const CSS::uno::Reference<
if( aInteractionHandler.is() )
pHelper->m_aInteractionHandler = aInteractionHandler;
else
- pHelper->m_aInteractionHandler = CSS::uno::Reference< XInteractionHandler >(
- CSS::task::InteractionHandler::createDefault(m_xContext), UNO_QUERY_THROW);
+ pHelper->m_aInteractionHandler.set(
+ CSS::task::InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY_THROW);
CProgressHandlerHelper *pProgressHelper = new CProgressHandlerHelper;
pHelper->m_aProgressHandler = CSS::uno::Reference< XProgressHandler >(pProgressHelper);
diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx
index 98cbd32..9a68aae 100644
--- a/fpicker/source/office/fpsmartcontent.cxx
+++ b/fpicker/source/office/fpsmartcontent.cxx
@@ -81,8 +81,8 @@ namespace svt
void SmartContent::enableOwnInteractionHandler(::svt::OFilePickerInteractionHandler::EInterceptedInteractions eInterceptions)
{
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- Reference< XInteractionHandler > xGlobalInteractionHandler = Reference< XInteractionHandler >(
- InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
+ Reference< XInteractionHandler > xGlobalInteractionHandler(
+ InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW );
m_pOwnInteraction = new ::svt::OFilePickerInteractionHandler(xGlobalInteractionHandler);
m_pOwnInteraction->enableInterceptions(eInterceptions);
@@ -100,8 +100,8 @@ namespace svt
m_xOwnInteraction = Reference< XInteractionHandler >();
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- Reference< XInteractionHandler > xGlobalInteractionHandler = Reference< XInteractionHandler >(
- InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
+ Reference< XInteractionHandler > xGlobalInteractionHandler(
+ InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW );
m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() );
}
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 264e673..f44c4c3 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -2000,10 +2000,8 @@ void SvtFileDialog::displayIOException( const String& _rURL, IOErrorCode _eCode
new ::comphelper::OInteractionRequest( makeAny( aException ) );
pRequest->addContinuation( new ::comphelper::OInteractionAbort( ) );
- Reference< XInteractionHandler > xHandler(
- InteractionHandler::createDefault( ::comphelper::getProcessComponentContext() ),
- UNO_QUERY_THROW
- );
+ Reference< XInteractionHandler2 > xHandler(
+ InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), 0 ) );
xHandler->handle( xRequest );
}
catch( const Exception& )
diff --git a/offapi/com/sun/star/task/InteractionHandler.idl b/offapi/com/sun/star/task/InteractionHandler.idl
index 524c385..74e7323 100644
--- a/offapi/com/sun/star/task/InteractionHandler.idl
+++ b/offapi/com/sun/star/task/InteractionHandler.idl
@@ -149,11 +149,22 @@ module com { module sun { module star { module task {
*/
published service InteractionHandler : XInteractionHandler2
{
- createDefault();
+ /** Creates an instance.
- createWithParent([in] com::sun::star::awt::XWindow parent);
+ @param parent denotes the parent window for any GUI dialogs the
+ interaction handler pops up; may be null.
+ */
+ createWithParent([in] com::sun::star::awt::XWindow parent);
- createWithParentAndContext([in] com::sun::star::awt::XWindow parent, [in] string context);
+ /** Creates an instance with an additional context.
+
+ @param parent denotes the parent window for any GUI dialogs the
+ interaction handler pops up; may be null.
+
+ @param context is a textual description of the current context (used,
+ e.g., as a first line of text in error boxes).
+ */
+ createWithParentAndContext([in] com::sun::star::awt::XWindow parent, [in] string context);
};
}; }; }; };
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index d95c6a0..df133d7 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -2651,7 +2651,7 @@ uno::Reference< embed::XStorage > OReportDefinition::getStorage() const
uno::Reference< task::XInteractionHandler > OReportDefinition::getInteractionHandler() const
{
uno::Reference< task::XInteractionHandler > xRet(
- task::InteractionHandler::createDefault(m_aProps->m_xContext), uno::UNO_QUERY_THROW);
+ task::InteractionHandler::createWithParent(m_aProps->m_xContext, 0), uno::UNO_QUERY_THROW);
return xRet;
}
// -----------------------------------------------------------------------------
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index c3a034c..634eeb2 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -3058,7 +3058,7 @@ uno::Reference<sdbc::XRowSet> ScDPCollection::DBCaches::createRowSet(
if ( xExecute.is() )
{
uno::Reference<task::XInteractionHandler> xHandler(
- task::InteractionHandler::createDefault(comphelper::getProcessComponentContext()),
+ task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), 0),
uno::UNO_QUERY_THROW);
xExecute->executeWithCompletion( xHandler );
}
diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx
index 117a8e7..4213ede 100644
--- a/sc/source/ui/dbgui/dapidata.cxx
+++ b/sc/source/ui/dbgui/dapidata.cxx
@@ -165,8 +165,8 @@ void ScDataPilotDatabaseDlg::FillObjects()
if ( !xSource.is() ) return;
uno::Reference<task::XInteractionHandler> xHandler(
- task::InteractionHandler::createDefault(comphelper::getProcessComponentContext()),
- uno::UNO_QUERY_THROW);
+ task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), 0),
+ uno::UNO_QUERY_THROW);
uno::Reference<sdbc::XConnection> xConnection = xSource->connectWithCompletion( xHandler );
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 5b84990..c3be664 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -252,8 +252,8 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if ( xExecute.is() )
{
uno::Reference<task::XInteractionHandler> xHandler(
- task::InteractionHandler::createDefault(comphelper::getProcessComponentContext()),
- uno::UNO_QUERY_THROW);
+ task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), 0),
+ uno::UNO_QUERY_THROW);
xExecute->executeWithCompletion( xHandler );
}
else
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 96f19ec..f8cf040 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -438,9 +438,8 @@ IMPL_STATIC_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYAR
int nArgs=3;
Sequence< PropertyValue > aArgs(3);
- Reference < com::sun::star::task::XInteractionHandler > xInteraction(
- task::InteractionHandler::createDefault(::comphelper::getProcessComponentContext()),
- com::sun::star::uno::UNO_QUERY_THROW );
+ Reference < com::sun::star::task::XInteractionHandler2 > xInteraction(
+ task::InteractionHandler::createWithParent(::comphelper::getProcessComponentContext(), 0) );
aArgs[0].Name = OUString("InteractionHandler");
aArgs[0].Value <<= xInteraction;
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 248595c..c97d92f 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -170,8 +170,8 @@ uno::Sequence< OUString > SfxContentHelper::GetHelpTreeViewContents( const Strin
try
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- uno::Reference< task::XInteractionHandler > xInteractionHandler = uno::Reference< task::XInteractionHandler > (
- task::InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
+ uno::Reference< task::XInteractionHandler > xInteractionHandler(
+ task::InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ), comphelper::getProcessComponentContext() );
uno::Reference< sdbc::XResultSet > xResultSet;
@@ -254,8 +254,8 @@ String SfxContentHelper::GetActiveHelpString( const String& rURL )
try
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- uno::Reference< task::XInteractionHandler > xInteractionHandler = uno::Reference< task::XInteractionHandler > (
- task::InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
+ uno::Reference< task::XInteractionHandler > xInteractionHandler(
+ task::InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ), comphelper::getProcessComponentContext() );
// open the "active help" stream
uno::Reference< io::XInputStream > xStream = aCnt.openStream();
diff --git a/sfx2/source/control/templateremoteview.cxx b/sfx2/source/control/templateremoteview.cxx
index 40f9208..776bab1 100644
--- a/sfx2/source/control/templateremoteview.cxx
+++ b/sfx2/source/control/templateremoteview.cxx
@@ -53,8 +53,8 @@ TemplateRemoteView::TemplateRemoteView (Window *pParent, WinBits nWinStyle, bool
mpItemView->setChangeNameHdl(LINK(this,TemplateRemoteView,ChangeNameHdl));
Reference< XComponentContext > xContext = comphelper::getProcessComponentContext();
- Reference< XInteractionHandler > xGlobalInteractionHandler = Reference< XInteractionHandler >(
- InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
+ Reference< XInteractionHandler > xGlobalInteractionHandler(
+ InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW );
m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() );
}
diff --git a/sfx2/source/dialog/templateinfodlg.cxx b/sfx2/source/dialog/templateinfodlg.cxx
index 06ecbbf..32fa7d8 100644
--- a/sfx2/source/dialog/templateinfodlg.cxx
+++ b/sfx2/source/dialog/templateinfodlg.cxx
@@ -75,8 +75,8 @@ void SfxTemplateInfoDlg::loadDocument(const OUString &rURL)
try
{
- uno::Reference<task::XInteractionHandler> xInteractionHandler(
- task::InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
+ uno::Reference<task::XInteractionHandler2> xInteractionHandler(
+ task::InteractionHandler::createWithParent(xContext, 0) );
uno::Sequence<beans::PropertyValue> aProps(1);
aProps[0].Name = "InteractionHandler";
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 666d37f..9c199ad 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2527,8 +2527,8 @@ SfxMedium::GetInteractionHandler()
// create default handler and cache it!
Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- pImp->xInteraction = Reference< task::XInteractionHandler >(
- task::InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
+ pImp->xInteraction.set(
+ task::InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW );
return pImp->xInteraction;
}
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index bb06edd..75e294c 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -391,7 +391,7 @@ void SfxDocTplService_Impl::init_Impl()
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
uno::Reference < task::XInteractionHandler > xInteractionHandler(
- task::InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
+ task::InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
maCmdEnv = new TplTaskEnvironment( xInteractionHandler );
::osl::ClearableMutexGuard aGuard( maMutex );
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 7bbfd07..3add4b1 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -440,9 +440,7 @@ void ModelData_Impl::CheckInteractionHandler()
{
try {
m_aMediaDescrHM[ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) ]
- <<= uno::Reference< task::XInteractionHandler >(
- task::InteractionHandler::createDefault(comphelper::getComponentContext(m_pOwner->GetServiceFactory())),
- uno::UNO_QUERY );
+ <<= task::InteractionHandler::createWithParent(comphelper::getComponentContext(m_pOwner->GetServiceFactory()), 0);
}
catch( const uno::Exception& )
{
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index c6caa28..70a4f1d 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -555,9 +555,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if ( !pInteractionHandlerItem )
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- uno::Reference< task::XInteractionHandler > xInteract(
- task::InteractionHandler::createDefault(xContext),
- UNO_QUERY_THROW );
+ uno::Reference< task::XInteractionHandler2 > xInteract(
+ task::InteractionHandler::createWithParent(xContext, 0) );
SfxUnoAnyItem aInteractionItem( SID_INTERACTIONHANDLER, uno::makeAny( xInteract ) );
if ( nId == SID_SAVEDOC )
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 092b2ba..7280a04 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -1127,7 +1127,7 @@ sal_Bool SAL_CALL PasswordContainer::authorizateWithMasterPassword( const uno::R
{
uno::Reference< lang::XMultiServiceFactory > xFactory( mComponent, uno::UNO_QUERY_THROW );
uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) );
- xTmpHandler.set( InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
+ xTmpHandler.set( InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
}
if ( !m_aMasterPasswd.isEmpty() )
@@ -1172,7 +1172,7 @@ sal_Bool SAL_CALL PasswordContainer::changeMasterPassword( const uno::Reference<
{
uno::Reference< lang::XMultiServiceFactory > xFactory( mComponent, uno::UNO_QUERY_THROW );
uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) );
- xTmpHandler.set( InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
+ xTmpHandler.set( InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
}
sal_Bool bCanChangePassword = sal_True;
@@ -1289,7 +1289,7 @@ void SAL_CALL PasswordContainer::removeMasterPassword()
{
uno::Reference< lang::XMultiServiceFactory > xFactory( mComponent, uno::UNO_QUERY_THROW );
uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) );
- xTmpHandler.set( InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
+ xTmpHandler.set( InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
}
sal_Bool bCanChangePassword = sal_True;
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index dc18267..2087bb8 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -699,8 +699,8 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin,
maResetQuickSearch.SetTimeoutHdl( LINK( this, ViewTabListBox_Impl, ResetQuickSearch_Impl ) );
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- Reference< XInteractionHandler > xInteractionHandler = Reference< XInteractionHandler > (
- InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
+ Reference< XInteractionHandler > xInteractionHandler(
+ InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW );
mxCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
@@ -1161,8 +1161,8 @@ SvtFileView::SvtFileView( Window* pParent, const ResId& rResId,
nFlags |= FILEVIEW_MULTISELECTION;
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- Reference< XInteractionHandler > xInteractionHandler = Reference< XInteractionHandler > (
- InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
+ Reference< XInteractionHandler > xInteractionHandler(
+ InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW );
Reference < XCommandEnvironment > xCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
mpImp = new SvtFileView_Impl( this, xCmdEnv, nFlags, bOnlyFolder );
@@ -1179,8 +1179,8 @@ SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags
Control( pParent, rResId )
{
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- Reference< XInteractionHandler > xInteractionHandler = Reference< XInteractionHandler > (
- InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
+ Reference< XInteractionHandler > xInteractionHandler(
+ InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW );
Reference < XCommandEnvironment > xCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
mpImp = new SvtFileView_Impl( this, xCmdEnv, nFlags, nFlags & FILEVIEW_ONLYFOLDER );
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 9579759..c6df373 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -670,9 +670,8 @@ void SvtFrameWindow_Impl::ShowDocInfo( const String& rURL )
{
try
{
- uno::Reference < task::XInteractionHandler > xInteractionHandler(
- task::InteractionHandler::createDefault(::comphelper::getProcessComponentContext()),
- uno::UNO_QUERY_THROW );
+ uno::Reference < task::XInteractionHandler2 > xInteractionHandler(
+ task::InteractionHandler::createWithParent(::comphelper::getProcessComponentContext(), 0) );
uno::Sequence < beans::PropertyValue> aProps(1);
aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
aProps[0].Value <<= xInteractionHandler;
@@ -754,8 +753,8 @@ void SvtFrameWindow_Impl::OpenFile( const String& rURL, sal_Bool bPreview, sal_B
aArgs[1].Value.setValue( &b, ::getBooleanCppuType() );
aArgs[2].Name = ASCII_STR("AsTemplate"); // prevents getting an empty URL with getURL()!
- uno::Reference < task::XInteractionHandler > xInteractionHandler(
- task::InteractionHandler::createDefault(::comphelper::getProcessComponentContext()), uno::UNO_QUERY_THROW );
+ uno::Reference < task::XInteractionHandler2 > xInteractionHandler(
+ task::InteractionHandler::createWithParent(::comphelper::getProcessComponentContext(), 0) );
aArgs[3].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
aArgs[3].Value <<= xInteractionHandler;
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index 3417d55..411c6d4 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -293,8 +293,8 @@ CmisDetailsContainer::CmisDetailsContainer( ) :
m_xCmdEnv( )
{
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- Reference< XInteractionHandler > xGlobalInteractionHandler = Reference< XInteractionHandler >(
- InteractionHandler::createDefault(xContext), UNO_QUERY );
+ Reference< XInteractionHandler > xGlobalInteractionHandler(
+ InteractionHandler::createWithParent(xContext, 0), UNO_QUERY );
m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() );
}
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index a59b378..ce329fa 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -850,9 +850,9 @@ void AssignmentPersistentData::Commit()
Reference< XInteractionHandler > xHandler;
try
{
- xHandler = Reference< XInteractionHandler >(
- InteractionHandler::createDefault(comphelper::getComponentContext(m_xORB)),
- UNO_QUERY_THROW );
+ xHandler.set(
+ InteractionHandler::createWithParent(comphelper::getComponentContext(m_xORB), 0),
+ UNO_QUERY_THROW );
}
catch(Exception&) { }
if (!xHandler.is())
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 5dbb628..fb5f281 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -4274,7 +4274,7 @@ bool FormController::ensureInteractionHandler()
return false;
m_bAttemptedHandlerCreation = true;
- m_xInteractionHandler.set( InteractionHandler::createDefault(m_aContext.getUNOContext()), UNO_QUERY );
+ m_xInteractionHandler.set( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0), UNO_QUERY );
OSL_ENSURE( m_xInteractionHandler.is(), "FormController::ensureInteractionHandler: could not create an interaction handler!" );
return m_xInteractionHandler.is();
}
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 045436b..7fd0f05 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -561,7 +561,7 @@ void SwAddressListDialog::DetectTablesAndQueries(
pUserData->xSource = uno::Reference<XDataSource>(xComplConnection, UNO_QUERY);
uno::Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- uno::Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(xContext), UNO_QUERY );
+ uno::Reference< XInteractionHandler > xHandler( InteractionHandler::createWithParent(xContext, 0), 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 2766392..9bd1fb1 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -1580,7 +1580,7 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData
if ( xComplConnection.is() )
{
rxSource.set(xComplConnection,UNO_QUERY);
- Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
+ Reference< XInteractionHandler > xHandler( InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW );
xConnection = xComplConnection->connectWithCompletion( xHandler );
}
}
@@ -2661,7 +2661,7 @@ uno::Reference<XResultSet> SwNewDBMgr::createCursor(const ::rtl::OUString& _sDat
if ( xRowSet.is() )
{
- uno::Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(comphelper::getComponentContext(xMgr)), UNO_QUERY_THROW );
+ uno::Reference< XInteractionHandler > xHandler( InteractionHandler::createWithParent(comphelper::getComponentContext(xMgr), 0), UNO_QUERY_THROW );
xRowSet->executeWithCompletion(xHandler);
}
xResultSet = uno::Reference<XResultSet>(xRowSet, UNO_QUERY);
diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx
index d24d8e6..6d55753 100644
--- a/ucb/workben/ucb/ucbdemo.cxx
+++ b/ucb/workben/ucb/ucbdemo.cxx
@@ -1306,8 +1306,8 @@ void UcbContent::transfer( const rtl::OUString& rSourceURL, sal_Bool bMove )
if (m_rUCB.getServiceFactory().is())
xInteractionHandler
= uno::Reference< task::XInteractionHandler >(
- task::InteractionHandler::createDefault(comphelper::getComponentContext(m_rUCB.getServiceFactory())),
- uno::UNO_QUERY_THROW);
+ task::InteractionHandler::createWithParent(comphelper::getComponentContext(m_rUCB.getServiceFactory()), 0),
+ uno::UNO_QUERY_THROW);
uno::Reference< ucb::XProgressHandler > xProgressHandler(
new ProgressHandler(m_rUCB));
uno::Reference< ucb::XCommandEnvironment > xEnv(
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index bf09e7e..31d26b2 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -186,7 +186,7 @@ void getRememberModes(
void
handleAuthenticationRequest_(
Window * pParent,
- uno::Reference< task::XInteractionHandler > const & xIH,
+ uno::Reference< task::XInteractionHandler2 > const & xIH,
uno::Reference< lang::XMultiServiceFactory > const & xServiceFactory,
ucb::AuthenticationRequest const & rRequest,
uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index e09256d..09f904c 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -1107,15 +1107,13 @@ UUIInteractionHelper::getContextProperty()
return m_aContextParam;
}
-uno::Reference< task::XInteractionHandler >
+uno::Reference< task::XInteractionHandler2 >
UUIInteractionHelper::getInteractionHandler()
SAL_THROW((uno::RuntimeException))
{
- uno::Reference< task::XInteractionHandler > xIH(
- InteractionHandler::createWithParentAndContext(comphelper::getComponentContext(m_xServiceFactory),
- m_xWindowParam, m_aContextParam),
- UNO_QUERY_THROW);
- return xIH;
+ return InteractionHandler::createWithParentAndContext(
+ comphelper::getComponentContext(m_xServiceFactory), m_xWindowParam,
+ m_aContextParam);
}
namespace {
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index 3266f0b..eee7667 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -52,7 +52,7 @@ namespace com { namespace sun { namespace star {
namespace task {
class FutureDocumentVersionProductUpdateRequest;
class XInteractionContinuation;
- class XInteractionHandler;
+ class XInteractionHandler2;
class XInteractionRequest;
}
namespace ucb {
@@ -161,7 +161,7 @@ private:
getContextProperty()
SAL_THROW(());
- com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >
+ com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler2 >
getInteractionHandler()
SAL_THROW((com::sun::star::uno::RuntimeException));
diff --git a/uui/source/interactionhandler.hxx b/uui/source/interactionhandler.hxx
index 8d2147b..39acd86 100644
--- a/uui/source/interactionhandler.hxx
+++ b/uui/source/interactionhandler.hxx
@@ -20,14 +20,16 @@
#ifndef UUI_INTERACTIONHANDLER_HXX
#define UUI_INTERACTIONHANDLER_HXX
+#include "com/sun/star/lang/XInitialization.hpp"
#include "com/sun/star/lang/XServiceInfo.hpp"
#include "com/sun/star/task/XInteractionHandler2.hpp"
-#include "cppuhelper/implbase2.hxx"
+#include "cppuhelper/implbase3.hxx"
class UUIInteractionHelper;
class UUIInteractionHandler:
- public cppu::WeakImplHelper2< com::sun::star::lang::XServiceInfo,
+ public cppu::WeakImplHelper3< com::sun::star::lang::XServiceInfo,
+ com::sun::star::lang::XInitialization,
com::sun::star::task::XInteractionHandler2 >
{
public:
diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx
index 5a688c6..0005fe9 100644
--- a/uui/source/passwordcontainer.cxx
+++ b/uui/source/passwordcontainer.cxx
@@ -23,7 +23,7 @@
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/task/NoMasterException.hpp"
#include "com/sun/star/task/PasswordContainer.hpp"
-#include "com/sun/star/task/XInteractionHandler.hpp"
+#include "com/sun/star/task/XInteractionHandler2.hpp"
#include "com/sun/star/ucb/AuthenticationRequest.hpp"
#include "com/sun/star/ucb/URLAuthenticationRequest.hpp"
#include "com/sun/star/ucb/XInteractionSupplyAuthentication.hpp"
@@ -120,9 +120,11 @@ bool PasswordContainerHelper::handleAuthenticationRequest(
uno::Reference< ucb::XInteractionSupplyAuthentication > const &
xSupplyAuthentication,
rtl::OUString const & rURL,
- uno::Reference< task::XInteractionHandler > const & xIH )
+ uno::Reference< task::XInteractionHandler2 > const & xIH )
SAL_THROW((uno::RuntimeException))
{
+ uno::Reference< task::XInteractionHandler > xIH1(xIH, uno::UNO_QUERY);
+
// Is continuation even a XInteractionSupplyAuthentication2, which
// is derived from XInteractionSupplyAuthentication?
uno::Reference< ucb::XInteractionSupplyAuthentication2 >
@@ -167,12 +169,12 @@ bool PasswordContainerHelper::handleAuthenticationRequest(
{
task::UrlRecord aRec;
if ( !rURL.isEmpty() )
- aRec = m_xPasswordContainer->find(rURL, xIH);
+ aRec = m_xPasswordContainer->find(rURL, xIH1);
if ( aRec.UserList.getLength() == 0 )
{
// compat: try server name.
- aRec = m_xPasswordContainer->find(rRequest.ServerName, xIH);
+ aRec = m_xPasswordContainer->find(rRequest.ServerName, xIH1);
}
if ( fillContinuation( false,
@@ -191,13 +193,13 @@ bool PasswordContainerHelper::handleAuthenticationRequest(
task::UrlRecord aRec;
if ( !rURL.isEmpty() )
aRec = m_xPasswordContainer->findForName(
- rURL, rRequest.UserName, xIH);
+ rURL, rRequest.UserName, xIH1);
if ( aRec.UserList.getLength() == 0 )
{
// compat: try server name.
aRec = m_xPasswordContainer->findForName(
- rRequest.ServerName, rRequest.UserName, xIH);
+ rRequest.ServerName, rRequest.UserName, xIH1);
}
if ( fillContinuation( false,
@@ -223,10 +225,12 @@ bool PasswordContainerHelper::addRecord(
rtl::OUString const & rURL,
rtl::OUString const & rUsername,
uno::Sequence< rtl::OUString > const & rPasswords,
- uno::Reference< task::XInteractionHandler > const & xIH,
+ uno::Reference< task::XInteractionHandler2 > const & xIH,
bool bPersist )
SAL_THROW((uno::RuntimeException))
{
+ uno::Reference< task::XInteractionHandler > xIH1(xIH, uno::UNO_QUERY);
+
try
{
if ( !rUsername.isEmpty() )
@@ -246,13 +250,13 @@ bool PasswordContainerHelper::addRecord(
m_xPasswordContainer->addPersistent( rURL,
rUsername,
rPasswords,
- xIH );
+ xIH1 );
}
else
m_xPasswordContainer->add( rURL,
rUsername,
rPasswords,
- xIH );
+ xIH1 );
}
else
{
@@ -346,7 +350,7 @@ PasswordContainerInteractionHandler::getSupportedServiceNames_Static()
//=========================================================================
//
-// XInteractionHandler methods.
+// XInteractionHandler2 methods.
//
//=========================================================================
@@ -356,14 +360,23 @@ PasswordContainerInteractionHandler::handle(
const uno::Reference< task::XInteractionRequest >& rRequest )
throw ( uno::RuntimeException )
{
+ handleInteractionRequest( rRequest );
+}
+
+// virtual
+sal_Bool SAL_CALL
+PasswordContainerInteractionHandler::handleInteractionRequest(
+ const uno::Reference< task::XInteractionRequest >& rRequest )
+ throw ( uno::RuntimeException )
+{
if ( !rRequest.is() )
- return;
+ return false;
uno::Any aAnyRequest( rRequest->getRequest() );
ucb::AuthenticationRequest aAuthenticationRequest;
if ( !( aAnyRequest >>= aAuthenticationRequest ) )
- return;
+ return false;
rtl::OUString aURL;
ucb::URLAuthenticationRequest aURLAuthenticationRequest;
@@ -386,7 +399,7 @@ PasswordContainerInteractionHandler::handle(
}
if ( !xSupplyAuthentication.is() )
- return;
+ return false;
// Try to obtain credentials from password container.
if ( m_aPwContainerHelper.
@@ -401,7 +414,9 @@ PasswordContainerInteractionHandler::handle(
{
// successfully handled
xSupplyAuthentication->select();
+ return true;
}
+ return false;
}
//=========================================================================
diff --git a/uui/source/passwordcontainer.hxx b/uui/source/passwordcontainer.hxx
index 31434a3..af9fdb1 100644
--- a/uui/source/passwordcontainer.hxx
+++ b/uui/source/passwordcontainer.hxx
@@ -24,7 +24,7 @@
#include "com/sun/star/lang/XServiceInfo.hpp"
#include "com/sun/star/lang/XSingleServiceFactory.hpp"
-#include "com/sun/star/task/XInteractionHandler.hpp"
+#include "com/sun/star/task/XInteractionHandler2.hpp"
#include "com/sun/star/task/XPasswordContainer2.hpp"
namespace com {
@@ -90,7 +90,7 @@ public:
xSupplyAuthentication,
rtl::OUString const & rURL,
com::sun::star::uno::Reference<
- com::sun::star::task::XInteractionHandler > const & xIH )
+ com::sun::star::task::XInteractionHandler2 > const & xIH )
SAL_THROW( (com::sun::star::uno::RuntimeException) );
/** This member function adds credentials for the given URL to the password
@@ -125,7 +125,7 @@ public:
com::sun::star::uno::Sequence< rtl::OUString > const &
rPasswords,
com::sun::star::uno::Reference<
- com::sun::star::task::XInteractionHandler > const & xIH,
+ com::sun::star::task::XInteractionHandler2 > const & xIH,
bool bPersist )
SAL_THROW( (com::sun::star::uno::RuntimeException) );
@@ -140,7 +140,7 @@ private:
class PasswordContainerInteractionHandler :
public cppu::WeakImplHelper2< com::sun::star::lang::XServiceInfo,
- com::sun::star::task::XInteractionHandler >
+ com::sun::star::task::XInteractionHandler2 >
{
public:
PasswordContainerInteractionHandler(
@@ -160,12 +160,17 @@ public:
getSupportedServiceNames()
throw ( com::sun::star::uno::RuntimeException );
- // XInteractionHandler
+ // XInteractionHandler2
virtual void SAL_CALL
handle( const ::com::sun::star::uno::Reference<
::com::sun::star::task::XInteractionRequest >& Request )
throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL
+ handleInteractionRequest( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::task::XInteractionRequest >& Request )
+ throw (::com::sun::star::uno::RuntimeException);
+
// Non-UNO interfaces
static rtl::OUString
getImplementationName_Static();
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index 74ac0a3..1d72807 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -106,7 +106,7 @@ char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*arg*/ )
{
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
uno::Reference < task::XInteractionHandler2 > xInteractionHandler(
- task::InteractionHandler::createDefault(xContext) );
+ task::InteractionHandler::createWithParent(xContext, 0) );
task::PasswordRequestMode eMode = bRetry ? task::PasswordRequestMode_PASSWORD_REENTER : task::PasswordRequestMode_PASSWORD_ENTER;
::comphelper::DocPasswordRequest* pPasswordRequest = new ::comphelper::DocPasswordRequest(
commit c25cb8a641723ab098980bb842caf75c0dc9b059
Author: Noel Grandin <noel at peralex.com>
Date: Tue Oct 2 15:03:12 2012 +0200
fdo#46808, Adapt task::InteractionHandler UNO service to new style
Since we don't need to expose XInitialisation, we can make the new-style
service implement XInteractionHandler2.
Change-Id: Ib27beed1c12df17592c6472d6f58c233d2c41558
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 20b4bcd..f146118 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -50,6 +50,7 @@
#include <com/sun/star/script/XLibraryContainer2.hpp>
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
#include <com/sun/star/script/XLibraryContainerExport.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/ucb/XSimpleFileAccess2.hpp>
#include "com/sun/star/ucb/XCommandEnvironment.hpp"
@@ -1253,21 +1254,16 @@ void LibPage::ExportAsPackage( const String& aLibName )
{
// file open dialog
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
- Reference< task::XInteractionHandler > xHandler;
- Reference< XSimpleFileAccess2 > xSFA;
- Reference < XFilePicker > xFP;
- if( xMSF.is() )
- {
- xHandler = Reference< task::XInteractionHandler >( xMSF->createInstance
- ( DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ), UNO_QUERY );
+ Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createDefault(xContext), UNO_QUERY );
+ Reference< XSimpleFileAccess2 > xSFA = SimpleFileAccess::create(xContext);
- xSFA = SimpleFileAccess::create(comphelper::getProcessComponentContext());
+ Reference < XFilePicker > xFP;
+ Sequence <Any> aServiceType(1);
+ aServiceType[0] <<= TemplateDescription::FILESAVE_SIMPLE;
+ xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
- Sequence <Any> aServiceType(1);
- aServiceType[0] <<= TemplateDescription::FILESAVE_SIMPLE;
- xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
- }
xFP->setTitle( String( IDEResId( RID_STR_EXPORTPACKAGE ) ) );
// filter
@@ -1387,16 +1383,10 @@ void LibPage::ExportAsBasic( const String& aLibName )
{
// Folder picker
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
- Reference< XFolderPicker > xFolderPicker;
- Reference< task::XInteractionHandler > xHandler;
- if( xMSF.is() )
- {
- xFolderPicker = Reference< XFolderPicker >( xMSF->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" ) ) ), UNO_QUERY );
-
- xHandler = Reference< task::XInteractionHandler >( xMSF->createInstance
- ( DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ), UNO_QUERY );
- }
+ Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ Reference< XFolderPicker > xFolderPicker( xMSF->createInstance(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" ) ) ), UNO_QUERY );
+ Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
if( xFolderPicker.is() )
{
diff --git a/comphelper/inc/comphelper/ihwrapnofilter.hxx b/comphelper/inc/comphelper/ihwrapnofilter.hxx
index 539e41e..2ac1ac9 100644
--- a/comphelper/inc/comphelper/ihwrapnofilter.hxx
+++ b/comphelper/inc/comphelper/ihwrapnofilter.hxx
@@ -20,6 +20,7 @@
#ifndef _COMPHELPER_INTERACTIONHANDLERWRAPPER_HXX_
#define _COMPHELPER_INTERACTIONHANDLERWRAPPER_HXX_
+#include <com/sun/star/task/XInteractionHandler2.hpp>
#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_
#include <com/sun/star/task/XInteractionHandler.hpp>
#endif
@@ -36,14 +37,13 @@
#include <com/sun/star/frame/DoubleInitializationException.hpp>
#endif
-#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase2.hxx>
#include "comphelper/comphelperdllapi.h"
namespace comphelper {
- class COMPHELPER_DLLPUBLIC OIHWrapNoFilterDialog : public ::cppu::WeakImplHelper3
- < ::com::sun::star::task::XInteractionHandler
- , ::com::sun::star::lang::XInitialization
+ class COMPHELPER_DLLPUBLIC OIHWrapNoFilterDialog : public ::cppu::WeakImplHelper2
+ < ::com::sun::star::task::XInteractionHandler2
, ::com::sun::star::lang::XServiceInfo >
{
com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler > m_xInter;
@@ -64,6 +64,13 @@ namespace comphelper {
throw( com::sun::star::uno::RuntimeException );
//____________________________________________________________________________________________________
+ // XInteractionHandler2
+ //____________________________________________________________________________________________________
+
+ virtual sal_Bool SAL_CALL handleInteractionRequest( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest >& xRequest)
+ throw( com::sun::star::uno::RuntimeException );
+
+ //____________________________________________________________________________________________________
// XInitialization
//____________________________________________________________________________________________________
diff --git a/comphelper/source/misc/ihwrapnofilter.cxx b/comphelper/source/misc/ihwrapnofilter.cxx
index 238a2d5..57c55d8 100644
--- a/comphelper/source/misc/ihwrapnofilter.cxx
+++ b/comphelper/source/misc/ihwrapnofilter.cxx
@@ -69,6 +69,26 @@ namespace comphelper
}
//----------------------------------------------------------------------------------------------------
+ // XInteractionHandler2
+ //----------------------------------------------------------------------------------------------------
+ sal_Bool SAL_CALL OIHWrapNoFilterDialog::handleInteractionRequest( const uno::Reference< task::XInteractionRequest >& xRequest)
+ throw( com::sun::star::uno::RuntimeException )
+ {
+ if( !m_xInter.is() )
+ return sal_False;
+
+ uno::Any aRequest = xRequest->getRequest();
+ document::NoSuchFilterRequest aNoSuchFilterRequest;
+ if ( aRequest >>= aNoSuchFilterRequest )
+ return sal_False;
+ else
+ {
+ m_xInter->handle( xRequest );
+ return sal_True;
+ }
+ }
+
+ //----------------------------------------------------------------------------------------------------
// XInitialization
//----------------------------------------------------------------------------------------------------
void SAL_CALL OIHWrapNoFilterDialog::initialize( const uno::Sequence< uno::Any >& )
diff --git a/connectivity/inc/connectivity/dbtools.hxx b/connectivity/inc/connectivity/dbtools.hxx
index a0f8bc5..7f48e14 100644
--- a/connectivity/inc/connectivity/dbtools.hxx
+++ b/connectivity/inc/connectivity/dbtools.hxx
@@ -201,7 +201,7 @@ namespace dbtools
const ::rtl::OUString& _rDataSourceName,
const ::rtl::OUString& _rUser,
const ::rtl::OUString& _rPwd,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory)
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext)
SAL_THROW ( (::com::sun::star::sdbc::SQLException) );
diff --git a/connectivity/inc/connectivity/virtualdbtools.hxx b/connectivity/inc/connectivity/virtualdbtools.hxx
index dafaa45..0f6f652 100644
--- a/connectivity/inc/connectivity/virtualdbtools.hxx
+++ b/connectivity/inc/connectivity/virtualdbtools.hxx
@@ -120,7 +120,7 @@ namespace connectivity
const ::rtl::OUString& _rDataSourceName,
const ::rtl::OUString& _rUser,
const ::rtl::OUString& _rPwd,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext
) const SAL_THROW ( (::com::sun::star::sdbc::SQLException) ) = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> connectRowset(
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 4674fe4..e5800bc 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -55,7 +55,7 @@
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/task/XInteractionRequest.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/uno/XNamingService.hpp>
@@ -279,9 +279,9 @@ Reference< XConnection > getConnection_allowException(
const ::rtl::OUString& _rsTitleOrPath,
const ::rtl::OUString& _rsUser,
const ::rtl::OUString& _rsPwd,
- const Reference< XMultiServiceFactory>& _rxFactory)
+ const Reference< XComponentContext>& _rxContext)
{
- Reference< XDataSource> xDataSource( getDataSource_allowException(_rsTitleOrPath, comphelper::getComponentContext(_rxFactory)) );
+ Reference< XDataSource> xDataSource( getDataSource_allowException(_rsTitleOrPath, _rxContext) );
Reference<XConnection> xConnection;
if (xDataSource.is())
{
@@ -306,12 +306,9 @@ 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(RTL_CONSTASCII_USTRINGPARAM("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);
- }
+ Reference< XInteractionHandler > xHandler(
+ InteractionHandler::createDefault(_rxContext), UNO_QUERY_THROW );
+ xConnection = xConnectionCompletion->connectWithCompletion(xHandler);
}
}
else
@@ -325,13 +322,13 @@ Reference< XConnection > getConnection_allowException(
//------------------------------------------------------------------------------
Reference< XConnection> getConnection_withFeedback(const ::rtl::OUString& _rDataSourceName,
- const ::rtl::OUString& _rUser, const ::rtl::OUString& _rPwd, const Reference< XMultiServiceFactory>& _rxFactory)
+ const ::rtl::OUString& _rUser, const ::rtl::OUString& _rPwd, const Reference< XComponentContext>& _rxContext)
SAL_THROW ( (SQLException) )
{
Reference< XConnection > xReturn;
try
{
- xReturn = getConnection_allowException(_rDataSourceName, _rUser, _rPwd, _rxFactory);
+ xReturn = getConnection_allowException(_rDataSourceName, _rUser, _rPwd, _rxContext);
}
catch(SQLException&)
{
@@ -350,12 +347,12 @@ Reference< XConnection> getConnection(
const ::rtl::OUString& _rsTitleOrPath,
const ::rtl::OUString& _rsUser,
const ::rtl::OUString& _rsPwd,
- const Reference< XMultiServiceFactory>& _rxFactory)
+ const Reference< XComponentContext>& _rxContext)
{
Reference< XConnection > xReturn;
try
{
- xReturn = getConnection_allowException(_rsTitleOrPath, _rsUser, _rsPwd, _rxFactory);
+ xReturn = getConnection_allowException(_rsTitleOrPath, _rsUser, _rsPwd, _rxContext);
}
catch(Exception&)
{
@@ -434,7 +431,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R
if (hasProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), xRowSetProps))
xRowSetProps->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPwd;
- xPureConnection = getConnection_allowException( sDataSourceName, sUser, sPwd, _rxFactory );
+ xPureConnection = getConnection_allowException( sDataSourceName, sUser, sPwd, comphelper::getComponentContext(_rxFactory) );
}
else if (!sURL.isEmpty())
{ // the row set has no data source, but a connection url set
diff --git a/connectivity/source/simpledbt/staticdbtools_s.cxx b/connectivity/source/simpledbt/staticdbtools_s.cxx
index 797555c..1d89390 100644
--- a/connectivity/source/simpledbt/staticdbtools_s.cxx
+++ b/connectivity/source/simpledbt/staticdbtools_s.cxx
@@ -84,9 +84,9 @@ namespace connectivity
//----------------------------------------------------------------
Reference< XConnection> ODataAccessStaticTools::getConnection_withFeedback(const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rUser,
- const ::rtl::OUString& _rPwd, const Reference< XMultiServiceFactory>& _rxFactory) const SAL_THROW ( (SQLException) )
+ const ::rtl::OUString& _rPwd, const Reference< XComponentContext>& _rxContext) const SAL_THROW ( (SQLException) )
{
- return ::dbtools::getConnection_withFeedback(_rDataSourceName, _rUser, _rPwd, _rxFactory);
+ return ::dbtools::getConnection_withFeedback(_rDataSourceName, _rUser, _rPwd, _rxContext);
}
//----------------------------------------------------------------
diff --git a/connectivity/source/simpledbt/staticdbtools_s.hxx b/connectivity/source/simpledbt/staticdbtools_s.hxx
index 3132f00..a859720 100644
--- a/connectivity/source/simpledbt/staticdbtools_s.hxx
+++ b/connectivity/source/simpledbt/staticdbtools_s.hxx
@@ -70,7 +70,7 @@ namespace connectivity
const ::rtl::OUString& _rDataSourceName,
const ::rtl::OUString& _rUser,
const ::rtl::OUString& _rPwd,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext
) const SAL_THROW ( (::com::sun::star::sdbc::SQLException) );
// ------------------------------------------------
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index f0158b6..95b2eb1 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -38,7 +38,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/embed/XInsertObjectDialog.hpp>
#include <com/sun/star/ucb/CommandAbortedException.hpp>
-#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include "insdlg.hxx"
#include <dialmgr.hxx>
@@ -341,24 +341,13 @@ short SvInsertOleDlg::Execute()
aMedium[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) );
aMedium[0].Value <<= ::rtl::OUString( aFileName );
- uno::Reference< task::XInteractionHandler > xInteraction;
- uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
- if ( xFactory.is() )
- xInteraction = uno::Reference< task::XInteractionHandler >(
- xFactory->createInstance(
- DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ),
- uno::UNO_QUERY_THROW );
+ uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ uno::Reference< task::XInteractionHandler > xInteraction(
+ task::InteractionHandler::createDefault(xContext),
+ uno::UNO_QUERY_THROW );
- if ( xInteraction.is() )
- {
- aMedium[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ) );
- aMedium[1].Value <<= xInteraction;
- }
- else
- {
- OSL_FAIL( "Can not get InteractionHandler!\n" );
- aMedium.realloc( 1 );
- }
+ aMedium[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ) );
+ aMedium[1].Value <<= xInteraction;
// create object from media descriptor
if ( bLink )
diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx
index 0bfdd25..5b4ca5f 100644
--- a/cui/source/options/webconninfo.cxx
+++ b/cui/source/options/webconninfo.cxx
@@ -29,6 +29,7 @@
#include <dialmgr.hxx>
#include <cuires.hrc>
#include <sal/macros.h>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/task/PasswordContainer.hpp>
#include <com/sun/star/task/UrlRecord.hpp>
#include <com/sun/star/task/XPasswordContainer2.hpp>
@@ -187,9 +188,8 @@ void WebConnectionInfoDialog::FillPasswordList()
if ( xMasterPasswd->isPersistentStoringAllowed() )
{
uno::Reference< task::XInteractionHandler > xInteractionHandler(
- comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.InteractionHandler" ) ) ),
- uno::UNO_QUERY_THROW );
+ task::InteractionHandler::createDefault(comphelper::getProcessComponentContext()),
+ uno::UNO_QUERY_THROW);
uno::Sequence< task::UrlRecord > aURLEntries = xMasterPasswd->getAllPersistent( xInteractionHandler );
sal_Int32 nCount = 0;
@@ -297,9 +297,7 @@ IMPL_LINK_NOARG(WebConnectionInfoDialog, ChangePasswordHdl)
uno::Reference< task::XInteractionRequest > rRequest( pPasswordRequest );
uno::Reference< task::XInteractionHandler > xInteractionHandler(
- comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.task.InteractionHandler" ) ) ),
+ task::InteractionHandler::createDefault(comphelper::getProcessComponentContext()),
uno::UNO_QUERY_THROW );
xInteractionHandler->handle( rRequest );
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 4ca3712..717661d 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/task/InteractionClassification.hpp>
#include <com/sun/star/ucb/InteractiveIOException.hpp>
#include <com/sun/star/ucb/IOErrorCode.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <basic/basmgr.hxx>
@@ -362,7 +363,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const ::rtl::OUStrin
::comphelper::NamedValueCollection aArgs;
aArgs.put( "URL", _sURL );
aArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
- aArgs.put( "InteractionHandler", m_aContext.createComponent( "com.sun.star.task.InteractionHandler" ) );
+ aArgs.put( "InteractionHandler", task::InteractionHandler::createDefault(m_aContext.getUNOContext()) );
Sequence< PropertyValue > aResource( aArgs.getPropertyValues() );
xLoad->load( aResource );
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 4593269..fd1ded7 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -68,7 +68,7 @@
#include "intercept.hxx"
#include <com/sun/star/sdb/ErrorCondition.hpp>
#include <com/sun/star/sdb/XInteractionDocumentSave.hpp>
-#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/sdb/DocumentSaveRequest.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
@@ -1301,9 +1301,8 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
pRequest->addContinuation(pAbort);
// create the handler, let it handle the request
- Reference< XInteractionHandler > xHandler( m_aContext.createComponent( (::rtl::OUString)SERVICE_TASK_INTERACTION_HANDLER ), UNO_QUERY );
- if ( xHandler.is() )
- xHandler->handle(xRequest);
+ Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(m_aContext.getUNOContext()), UNO_QUERY_THROW );
+ xHandler->handle(xRequest);
if ( pAbort->wasSelected() )
return sal_False;
@@ -1376,9 +1375,8 @@ sal_Bool ODocumentDefinition::saveAs()
pRequest->addContinuation(pAbort);
// create the handler, let it handle the request
- Reference< XInteractionHandler > xHandler(m_aContext.createComponent(::rtl::OUString(SERVICE_TASK_INTERACTION_HANDLER)), UNO_QUERY);
- if ( xHandler.is() )
- xHandler->handle(xRequest);
+ Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(m_aContext.getUNOContext()), UNO_QUERY_THROW);
+ xHandler->handle(xRequest);
if ( pAbort->wasSelected() )
return sal_False;
diff --git a/dbaccess/source/ext/macromigration/docinteraction.cxx b/dbaccess/source/ext/macromigration/docinteraction.cxx
index d0554ed..f2f9dc5 100644
--- a/dbaccess/source/ext/macromigration/docinteraction.cxx
+++ b/dbaccess/source/ext/macromigration/docinteraction.cxx
@@ -21,6 +21,7 @@
#include "docinteraction.hxx"
#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/task/DocumentPasswordRequest.hpp>
#include <comphelper/componentcontext.hxx>
@@ -65,7 +66,7 @@ namespace dbmm
}
InteractionHandler_Data( const ::comphelper::ComponentContext& _rContext )
- :xHandler( _rContext.createComponent( "com.sun.star.task.InteractionHandler" ), UNO_QUERY_THROW )
+ :xHandler( ::com::sun::star::task::InteractionHandler::createDefault(_rContext.getUNOContext()), UNO_QUERY_THROW )
{
}
};
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index 8b2d393..52562d9 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -43,6 +43,7 @@
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
#include <com/sun/star/task/XJobExecutor.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list