summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/moduldl2.cxx
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 /basctl/source/basicide/moduldl2.cxx
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 'basctl/source/basicide/moduldl2.cxx')
-rw-r--r--basctl/source/basicide/moduldl2.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index f14611836c2d..5de042e9262f 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() )
{