summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-10-04 14:36:34 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-04 14:42:52 +0200
commitdd11a1e57a2565560803dc3fef5fccc9e7157105 (patch)
tree4adf17c00e21a17b0137a286ce1547b0e56bea2f /svtools
parentc25cb8a641723ab098980bb842caf75c0dc9b059 (diff)
Fixes/improvements on previous commit
* UUIInteractionHandler still needs to implement XInitialization. * Moved ambiguating InteractionHandler typedef out of the way. * Removed InteractionHandler.createDefault, as it was originally stated that "it is strongly recommended that [the "Parent"] property is supplied." * Added back documentation about Parent and Context. * Simplified some call-sites to directly use XInteractionHandler2. Change-Id: I1029b8f3cf079171c75920cafaaa44b5bbada883
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/fileview.cxx12
-rw-r--r--svtools/source/contnr/templwin.cxx9
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.cxx4
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx6
4 files changed, 15 insertions, 16 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index dc182678dd05..2087bb843649 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 9579759419b3..c6df3734e502 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 3417d5531606..411c6d4e65c5 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 a59b378746a4..ce329fa18ab4 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())