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
This commit is contained in:
parent
0f3f9cb630
commit
c25cb8a641
@ -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< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
|
||||
Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createDefault(xContext), UNO_QUERY );
|
||||
Reference< XSimpleFileAccess2 > xSFA = SimpleFileAccess::create(xContext);
|
||||
|
||||
Reference < XFilePicker > xFP;
|
||||
if( xMSF.is() )
|
||||
{
|
||||
xHandler = Reference< task::XInteractionHandler >( xMSF->createInstance
|
||||
( DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ), 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 );
|
||||
|
||||
xSFA = SimpleFileAccess::create(comphelper::getProcessComponentContext());
|
||||
|
||||
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() )
|
||||
{
|
||||
|
@ -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;
|
||||
@ -63,6 +63,13 @@ namespace comphelper {
|
||||
virtual void SAL_CALL handle( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest >& xRequest)
|
||||
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
|
||||
//____________________________________________________________________________________________________
|
||||
|
@ -68,6 +68,26 @@ namespace comphelper
|
||||
m_xInter->handle( xRequest );
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// 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
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
@ -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) );
|
||||
|
||||
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
@ -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) );
|
||||
|
||||
// ------------------------------------------------
|
||||
|
@ -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 )
|
||||
|
@ -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 );
|
||||
|
||||
|
@ -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 );
|
||||
|
@ -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;
|
||||
|
@ -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 )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -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>
|
||||
#include <com/sun/star/view/XSelectionSupplier.hpp>
|
||||
@ -428,9 +429,8 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const ::
|
||||
// not touch it.
|
||||
if ( !aMediaDesc.has( "InteractionHandler" ) )
|
||||
{
|
||||
Reference< XInteractionHandler > xHandler;
|
||||
if ( m_aContext.createComponent( "com.sun.star.task.InteractionHandler", xHandler ) )
|
||||
aMediaDesc.put( "InteractionHandler", xHandler );
|
||||
Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(m_aContext.getUNOContext()), UNO_QUERY_THROW );
|
||||
aMediaDesc.put( "InteractionHandler", xHandler );
|
||||
}
|
||||
|
||||
// it's allowed to pass an existing document
|
||||
|
@ -372,7 +372,6 @@ DECLARE_CONSTASCII_USTRING(SERVICE_SDBCX_TABLES);
|
||||
DECLARE_CONSTASCII_USTRING(SERVICE_SDB_QUERIES);
|
||||
DECLARE_CONSTASCII_USTRING(SERVICE_SDBC_DRIVERMANAGER);
|
||||
DECLARE_CONSTASCII_USTRING(SERVICE_SDBC_CONNECTIONPOOL);
|
||||
DECLARE_CONSTASCII_USTRING(SERVICE_TASK_INTERACTION_HANDLER);
|
||||
DECLARE_CONSTASCII_USTRING(SERVICE_FRAME_DESKTOP);
|
||||
DECLARE_CONSTASCII_USTRING(SERVICE_UI_FOLDERPICKER);
|
||||
DECLARE_CONSTASCII_USTRING(SERVICE_I18N_COLLATOR);
|
||||
|
@ -211,7 +211,6 @@ IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDBC_DRIVERMANAGER, "com.sun.star.sdbc.Driv
|
||||
IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDBC_CONNECTIONPOOL, "com.sun.star.sdbc.ConnectionPool");
|
||||
IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDBCX_INDEXCOLUMN, "com.sun.star.sdbcx.IndexColumn");
|
||||
IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDBCX_KEYCOLUMN, "com.sun.star.sdbcx.KeyColumn");
|
||||
IMPLEMENT_CONSTASCII_USTRING(SERVICE_TASK_INTERACTION_HANDLER, "com.sun.star.task.InteractionHandler");
|
||||
IMPLEMENT_CONSTASCII_USTRING(SERVICE_FRAME_DESKTOP, "com.sun.star.frame.Desktop");
|
||||
IMPLEMENT_CONSTASCII_USTRING(SERVICE_UI_FOLDERPICKER, "com.sun.star.ui.dialogs.FolderPicker");
|
||||
IMPLEMENT_CONSTASCII_USTRING(SERVICE_I18N_COLLATOR, "com.sun.star.i18n.Collator");
|
||||
|
@ -57,7 +57,7 @@
|
||||
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
|
||||
#include <com/sun/star/sdbcx/Privilege.hpp>
|
||||
#include <com/sun/star/sdbcx/XRowLocate.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/uno/TypeClass.hpp>
|
||||
#include <com/sun/star/util/NumberFormatter.hpp>
|
||||
#include <com/sun/star/util/XCancellable.hpp>
|
||||
@ -1471,9 +1471,8 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for
|
||||
pParamRequest->addContinuation(pAbort);
|
||||
|
||||
// create the handler, let it handle the request
|
||||
Reference< XInteractionHandler > xHandler(getORB()->createInstance(SERVICE_TASK_INTERACTION_HANDLER), UNO_QUERY);
|
||||
if (xHandler.is())
|
||||
xHandler->handle(xParamRequest);
|
||||
Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(comphelper::ComponentContext(getORB()).getUNOContext()), UNO_QUERY_THROW);
|
||||
xHandler->handle(xParamRequest);
|
||||
|
||||
if (!pParamValues->wasSelected())
|
||||
{ // canceled
|
||||
|
@ -84,12 +84,14 @@
|
||||
#include <com/sun/star/sdbcx/XDrop.hpp>
|
||||
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
|
||||
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
|
||||
#include <com/sun/star/util/XFlushable.hpp>
|
||||
#include <com/sun/star/document/MacroExecMode.hpp>
|
||||
#include <com/sun/star/frame/XComponentLoader.hpp>
|
||||
#include <com/sun/star/ui/XContextMenuInterceptor.hpp>
|
||||
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <comphelper/extract.hxx>
|
||||
#include <comphelper/sequence.hxx>
|
||||
#include <comphelper/types.hxx>
|
||||
@ -3528,11 +3530,9 @@ void SbaTableQueryBrowser::implAdministrate( SvLBoxEntry* _pApplyTo )
|
||||
|
||||
if ( xDocumentModel.is() )
|
||||
{
|
||||
Reference< XInteractionHandler > xInteractionHandler(
|
||||
getORB()->createInstance(
|
||||
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" ) ) ),
|
||||
UNO_QUERY );
|
||||
OSL_ENSURE( xInteractionHandler.is(), "SbaTableQueryBrowser::implAdministrate: no interaction handler available!" );
|
||||
Reference< XInteractionHandler2 > xInteractionHandler(
|
||||
InteractionHandler::createDefault(comphelper::getComponentContext(getORB())),
|
||||
UNO_QUERY_THROW );
|
||||
|
||||
::comphelper::NamedValueCollection aLoadArgs;
|
||||
aLoadArgs.put( "Model", xDocumentModel );
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <tools/diagnose_ex.h>
|
||||
#include "moduledbu.hxx"
|
||||
#include "dbu_dlg.hrc"
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <comphelper/interaction.hxx>
|
||||
#include <cppuhelper/exc_hlp.hxx>
|
||||
#include <toolkit/helper/vclunohelper.hxx>
|
||||
@ -38,7 +39,7 @@
|
||||
#include <com/sun/star/container/XHierarchicalNameContainer.hpp>
|
||||
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
|
||||
#include <com/sun/star/ucb/IOErrorCode.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionClassification.hpp>
|
||||
#include <com/sun/star/sdbc/SQLException.hpp>
|
||||
#include <com/sun/star/awt/XWindow.hpp>
|
||||
@ -169,23 +170,22 @@ IMPL_LINK_NOARG(OCollectionView, Save_Click)
|
||||
InteractiveAugmentedIOException aException(sTemp,Reference<XInterface>(),eClass,eError,aValues);
|
||||
|
||||
|
||||
Reference<XInitialization> xIni(m_xORB->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler"))),UNO_QUERY);
|
||||
if ( xIni.is() )
|
||||
{
|
||||
aValue.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Parent"));
|
||||
aValue.Value <<= VCLUnoHelper::GetInterface( this );
|
||||
Sequence< Any > aArgs(1);
|
||||
aArgs[0] <<= makeAny(aValue);
|
||||
xIni->initialize(aArgs);
|
||||
OInteractionRequest* pRequest = new OInteractionRequest(makeAny(aException));
|
||||
Reference< XInteractionRequest > xRequest(pRequest);
|
||||
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);
|
||||
OInteractionRequest* pRequest = new OInteractionRequest(makeAny(aException));
|
||||
Reference< XInteractionRequest > xRequest(pRequest);
|
||||
|
||||
OInteractionApprove* pApprove = new OInteractionApprove;
|
||||
pRequest->addContinuation(pApprove);
|
||||
OInteractionApprove* pApprove = new OInteractionApprove;
|
||||
pRequest->addContinuation(pApprove);
|
||||
|
||||
Reference< XInteractionHandler > xHandler(xIni,UNO_QUERY);
|
||||
xHandler->handle(xRequest);
|
||||
|
||||
Reference< XInteractionHandler > xHandler(xIni,UNO_QUERY);
|
||||
xHandler->handle(xRequest);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@
|
||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
||||
#include <com/sun/star/sdbc/XRow.hpp>
|
||||
#include <com/sun/star/awt/XWindow.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/ucb/XProgressHandler.hpp>
|
||||
#include "UITools.hxx"
|
||||
#include <unotools/localfilehelper.hxx>
|
||||
@ -71,6 +71,7 @@
|
||||
#endif //_ADO_DATALINK_BROWSE_
|
||||
|
||||
#include <com/sun/star/mozilla/XMozillaBootstrap.hpp>
|
||||
#include <comphelper/componentcontext.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
|
||||
@ -522,8 +523,8 @@ DBG_NAME(OConnectionHelper)
|
||||
::ucbhelper::Content aCheckExistence;
|
||||
sal_Bool bExists = sal_False;
|
||||
IS_PATH_EXIST eExists = PATH_NOT_EXIST;
|
||||
Reference< ::com::sun::star::task::XInteractionHandler > xInteractionHandler = Reference< ::com::sun::star::task::XInteractionHandler >(
|
||||
m_xORB->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler") ) ), UNO_QUERY );
|
||||
Reference< ::com::sun::star::task::XInteractionHandler > xInteractionHandler(
|
||||
task::InteractionHandler::createDefault(comphelper::getComponentContext(m_xORB)), UNO_QUERY_THROW );
|
||||
OFilePickerInteractionHandler* pHandler = new OFilePickerInteractionHandler(xInteractionHandler);
|
||||
xInteractionHandler = pHandler;
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <com/sun/star/sdb/SQLContext.hpp>
|
||||
#include <com/sun/star/sdbc/XDriver.hpp>
|
||||
#include <com/sun/star/sdbc/XDriverAccess.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/ucb/XInteractionSupplyAuthentication2.hpp>
|
||||
#include <com/sun/star/ucb/AuthenticationRequest.hpp>
|
||||
@ -255,9 +255,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert
|
||||
if ( !xHandler.is() )
|
||||
{
|
||||
// instantiate the default SDB interaction handler
|
||||
xHandler = Reference< XInteractionHandler >( m_xORB->createInstance( SERVICE_TASK_INTERACTION_HANDLER ), UNO_QUERY );
|
||||
if ( !xHandler.is() )
|
||||
ShowServiceNotAvailableError(m_pParent->GetParent(), String(SERVICE_TASK_INTERACTION_HANDLER), sal_True);
|
||||
xHandler = Reference< XInteractionHandler >( task::InteractionHandler::createDefault(comphelper::getComponentContext(m_xORB)), UNO_QUERY_THROW );
|
||||
}
|
||||
|
||||
String sName = pName ? pName->GetValue() : String();
|
||||
|
@ -70,6 +70,7 @@
|
||||
#include <com/sun/star/sdbc/XDriverAccess.hpp>
|
||||
#include <com/sun/star/document/MacroExecMode.hpp>
|
||||
#include <com/sun/star/ucb/IOErrorCode.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler2.hpp>
|
||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
||||
|
||||
@ -734,7 +735,7 @@ namespace
|
||||
//-------------------------------------------------------------------------
|
||||
sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
|
||||
{
|
||||
Reference< XInteractionHandler2 > xHandler( getORB()->createInstance( SERVICE_TASK_INTERACTION_HANDLER ), UNO_QUERY );
|
||||
Reference< XInteractionHandler2 > xHandler( InteractionHandler::createDefault(comphelper::getComponentContext(getORB())), UNO_QUERY_THROW );
|
||||
try
|
||||
{
|
||||
if (callSaveAsDialog() == sal_True)
|
||||
@ -993,9 +994,7 @@ 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(
|
||||
_rxORB->createInstance(
|
||||
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" ) )
|
||||
),
|
||||
InteractionHandler::createDefault(comphelper::getComponentContext(_rxORB)),
|
||||
UNO_QUERY_THROW );
|
||||
}
|
||||
catch( const Exception& )
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <svtools/imgdef.hxx>
|
||||
#include "TablesSingleDlg.hxx"
|
||||
#include <tools/diagnose_ex.h>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <cppuhelper/exc_hlp.hxx>
|
||||
#include "AutoControls.hrc"
|
||||
|
||||
@ -310,7 +311,7 @@ DBG_NAME(OTableSubscriptionPage)
|
||||
|
||||
xProp->setPropertyValue( PROPERTY_TABLETYPEFILTER, makeAny( Sequence< ::rtl::OUString >() ) );
|
||||
Reference< ::com::sun::star::lang::XEventListener> xEvt;
|
||||
aErrorInfo = ::dbaui::createConnection(xProp,m_xORB,xEvt,m_xCurrentConnection);
|
||||
aErrorInfo = ::dbaui::createConnection(xProp,comphelper::getComponentContext(m_xORB),xEvt,m_xCurrentConnection);
|
||||
|
||||
xProp->setPropertyValue(PROPERTY_TABLEFILTER,aTableFilter);
|
||||
xProp->setPropertyValue(PROPERTY_TABLETYPEFILTER,aTableTypeFilter);
|
||||
|
@ -80,7 +80,7 @@ namespace dbaui
|
||||
/** creates a new connection and appends the eventlistener
|
||||
@param _rsDataSourceName name of the datasource
|
||||
@param _xDatabaseContext the database context
|
||||
@param _rMF the multi service factory
|
||||
@param _rxContext the UNO component context
|
||||
@param _rEvtLst the eventlistener which will be added to the new created connection
|
||||
@param _rOUTConnection this parameter will be filled with the new created connection
|
||||
@return SQLExceptionInfo contains a SQLException, SQLContext or a SQLWarning when they araised else .isValid() will return false
|
||||
@ -88,19 +88,19 @@ namespace dbaui
|
||||
::dbtools::SQLExceptionInfo createConnection(
|
||||
const ::rtl::OUString& _rsDataSourceName,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xDatabaseContext,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rMF,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener>& _rEvtLst,
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rOUTConnection );
|
||||
/** creates a new connection and appends the eventlistener
|
||||
@param _xDataSource the datasource
|
||||
@param _rMF the multi service factory
|
||||
@param _rxContext the UNO component context
|
||||
@param _rEvtLst the eventlistener which will be added to the new created connection
|
||||
@param _rOUTConnection this parameter will be filled with the new created connection
|
||||
@return SQLExceptionInfo contains a SQLException, SQLContext or a SQLWarning when they araised else .isValid() will return false
|
||||
*/
|
||||
::dbtools::SQLExceptionInfo createConnection(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xDataSource,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rMF,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener>& _rEvtLst,
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rOUTConnection );
|
||||
|
||||
|
@ -281,7 +281,7 @@ void ODatabaseImportExport::initialize()
|
||||
Reference< XEventListener> xEvt((::cppu::OWeakObject*)this,UNO_QUERY);
|
||||
|
||||
Reference< XConnection > xConnection;
|
||||
SQLExceptionInfo aInfo = ::dbaui::createConnection( m_sDataSourceName, xDatabaseContext, m_xFactory, xEvt, xConnection );
|
||||
SQLExceptionInfo aInfo = ::dbaui::createConnection( m_sDataSourceName, xDatabaseContext, comphelper::getComponentContext(m_xFactory), xEvt, xConnection );
|
||||
m_xConnection.reset( xConnection );
|
||||
|
||||
if(aInfo.isValid() && aInfo.getType() == SQLExceptionInfo::SQL_EXCEPTION)
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
|
||||
#include <com/sun/star/sdbc/XResultSetMetaData.hpp>
|
||||
#include <com/sun/star/sdbc/ColumnValue.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/ucb/XContent.hpp>
|
||||
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
@ -138,7 +138,7 @@ using ::com::sun::star::frame::XModel;
|
||||
// -----------------------------------------------------------------------------
|
||||
SQLExceptionInfo createConnection( const ::rtl::OUString& _rsDataSourceName,
|
||||
const Reference< ::com::sun::star::container::XNameAccess >& _xDatabaseContext,
|
||||
const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rMF,
|
||||
const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
|
||||
Reference< ::com::sun::star::lang::XEventListener>& _rEvtLst,
|
||||
Reference< ::com::sun::star::sdbc::XConnection>& _rOUTConnection )
|
||||
{
|
||||
@ -152,11 +152,11 @@ SQLExceptionInfo createConnection( const ::rtl::OUString& _rsDataSourceName,
|
||||
}
|
||||
SQLExceptionInfo aInfo;
|
||||
|
||||
return createConnection(xProp,_rMF,_rEvtLst,_rOUTConnection);
|
||||
return createConnection(xProp,_rxContext,_rEvtLst,_rOUTConnection);
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XPropertySet>& _xDataSource,
|
||||
const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rMF,
|
||||
const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
|
||||
Reference< ::com::sun::star::lang::XEventListener>& _rEvtLst,
|
||||
Reference< ::com::sun::star::sdbc::XConnection>& _rOUTConnection )
|
||||
{
|
||||
@ -192,14 +192,8 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
|
||||
}
|
||||
else
|
||||
{ // instantiate the default SDB interaction handler
|
||||
Reference< XInteractionHandler > xHandler(_rMF->createInstance(SERVICE_TASK_INTERACTION_HANDLER), UNO_QUERY);
|
||||
if (!xHandler.is())
|
||||
{
|
||||
OSL_FAIL("createConnection: could not instantiate an interaction handler!");
|
||||
// TODO: a real parent!
|
||||
}
|
||||
else
|
||||
_rOUTConnection = xConnectionCompletion->connectWithCompletion(xHandler);
|
||||
Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(_rxContext), UNO_QUERY_THROW);
|
||||
_rOUTConnection = xConnectionCompletion->connectWithCompletion(xHandler);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
|
||||
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
|
||||
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
|
||||
#include <comphelper/extract.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
@ -683,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( m_xFactory->createInstance( SERVICE_TASK_INTERACTION_HANDLER ), UNO_QUERY);
|
||||
m_xInteractionHandler.set( InteractionHandler::createDefault(comphelper::getComponentContext(m_xFactory)), UNO_QUERY_THROW );
|
||||
|
||||
OCopyTable* pPage1( new OCopyTable( this ) );
|
||||
pPage1->disallowViews();
|
||||
|
@ -24,11 +24,12 @@
|
||||
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
|
||||
#include <com/sun/star/beans/XPropertySet.hpp>
|
||||
#include <com/sun/star/sdb/XCompletedConnection.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/frame/XModel.hpp>
|
||||
#include <com/sun/star/sdb/SQLContext.hpp>
|
||||
#include <com/sun/star/sdbc/SQLWarning.hpp>
|
||||
#include <osl/thread.h>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <comphelper/extract.hxx>
|
||||
#include <comphelper/namedvaluecollection.hxx>
|
||||
#include <connectivity/dbexception.hxx>
|
||||
@ -138,15 +139,10 @@ namespace dbaui
|
||||
if ( !xHandler.is() )
|
||||
{
|
||||
// instantiate the default SDB interaction handler
|
||||
xHandler = Reference< XInteractionHandler >( m_xORB->createInstance( SERVICE_TASK_INTERACTION_HANDLER ), UNO_QUERY );
|
||||
if ( !xHandler.is() )
|
||||
ShowServiceNotAvailableError(m_pErrorMessageParent, (::rtl::OUString)SERVICE_TASK_INTERACTION_HANDLER, sal_True);
|
||||
xHandler = Reference< XInteractionHandler >( InteractionHandler::createDefault(comphelper::getComponentContext(m_xORB)), UNO_QUERY_THROW );
|
||||
}
|
||||
|
||||
if ( xHandler.is() )
|
||||
{
|
||||
xConnection = xConnectionCompletion->connectWithCompletion(xHandler);
|
||||
}
|
||||
xConnection = xConnectionCompletion->connectWithCompletion(xHandler);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <com/sun/star/sdbc/DataType.hpp>
|
||||
#include <com/sun/star/container/XNameAccess.hpp>
|
||||
#include <com/sun/star/container/XChild.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/frame/XModel.hpp>
|
||||
#include <com/sun/star/sdb/DatabaseContext.hpp>
|
||||
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
|
||||
@ -102,6 +102,7 @@ namespace dbaui
|
||||
using ::com::sun::star::sdbc::XDataSource;
|
||||
using ::com::sun::star::container::XNameAccess;
|
||||
using ::com::sun::star::container::XChild;
|
||||
using ::com::sun::star::task::InteractionHandler;
|
||||
using ::com::sun::star::task::XInteractionHandler;
|
||||
using ::com::sun::star::frame::XModel;
|
||||
using ::com::sun::star::sdb::DatabaseContext;
|
||||
@ -1553,7 +1554,7 @@ void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments )
|
||||
);
|
||||
}
|
||||
if ( !m_xInteractionHandler.is() )
|
||||
m_xInteractionHandler.set( m_aContext.createComponent( "com.sun.star.task.InteractionHandler" ), UNO_QUERY_THROW );
|
||||
m_xInteractionHandler.set( InteractionHandler::createDefault(m_aContext.getUNOContext()), UNO_QUERY_THROW );
|
||||
|
||||
InteractionHandler xSourceDocHandler;
|
||||
Reference< XPropertySet > xSourceDescriptor( impl_ensureDataAccessDescriptor_throw( _rArguments, 0, m_xSourceConnection, xSourceDocHandler ) );
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <vcl/msgbox.hxx>
|
||||
#include <connectivity/dbexception.hxx>
|
||||
#include "sqlmessage.hxx"
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/task/XInteractionApprove.hpp>
|
||||
#include <com/sun/star/task/XInteractionDisapprove.hpp>
|
||||
#include <com/sun/star/task/XInteractionRetry.hpp>
|
||||
@ -38,6 +39,7 @@
|
||||
#include <osl/mutex.hxx>
|
||||
#include "CollectionView.hxx"
|
||||
#include "UITools.hxx"
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
|
||||
//==========================================================================
|
||||
@ -304,7 +306,7 @@ namespace dbaui
|
||||
{
|
||||
Reference< XInteractionHandler > xFallbackHandler;
|
||||
if ( m_xORB.is() )
|
||||
xFallbackHandler = xFallbackHandler.query( m_xORB->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" ) ) ) );
|
||||
xFallbackHandler = xFallbackHandler.query( InteractionHandler::createDefault(comphelper::getComponentContext(m_xORB)) );
|
||||
if ( xFallbackHandler.is() )
|
||||
{
|
||||
xFallbackHandler->handle( _rxRequest );
|
||||
|
@ -73,6 +73,9 @@ namespace dbaui
|
||||
const bool i_bFallbackToGeneric
|
||||
);
|
||||
|
||||
// XInitialization
|
||||
void SAL_CALL initialize( com::sun::star::uno::Sequence< com::sun::star::uno::Any > const & /*rArguments*/) throw (com::sun::star::uno::Exception) {}
|
||||
|
||||
// XInteractionHandler2
|
||||
virtual ::sal_Bool SAL_CALL handleInteractionRequest( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& Request ) throw (::com::sun::star::uno::RuntimeException);
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
#include <stdio.h>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@ -45,7 +46,6 @@ using rtl::OUString;
|
||||
using uno::UNO_QUERY;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
static char const CONFIGURATION_ERROR_HANDLER[] = "com.sun.star.configuration.backend.InteractionHandler";
|
||||
|
||||
// must be aligned with configmgr/source/misc/configinteractionhandler
|
||||
static char const CONFIG_ERROR_HANDLER[] = "configuration.interaction-handler";
|
||||
@ -164,17 +164,8 @@ void ConfigurationErrorHandler::deactivate()
|
||||
|
||||
ConfigurationErrorHandler::InteractionHandler ConfigurationErrorHandler::getDefaultInteractionHandler()
|
||||
{
|
||||
uno::Reference< lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory();
|
||||
|
||||
OSL_ENSURE( xServiceManager.is(),"No ServiceManager set for ConfigurationErrorHandler");
|
||||
|
||||
InteractionHandler xHandler;
|
||||
|
||||
if (xServiceManager.is())
|
||||
{
|
||||
xHandler.set( xServiceManager->createInstance(k_ERRORHANDLER), UNO_QUERY );
|
||||
}
|
||||
|
||||
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
InteractionHandler xHandler( com::sun::star::task::InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
|
||||
return xHandler;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <comphelper/synchronousdispatch.hxx>
|
||||
#include <com/sun/star/util/XCloseable.hpp>
|
||||
#include <com/sun/star/util/CloseVetoException.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/util/URL.hpp>
|
||||
#include <com/sun/star/frame/XDesktop.hpp>
|
||||
#include <com/sun/star/container/XEnumeration.hpp>
|
||||
@ -73,6 +73,7 @@ using namespace ::com::sun::star::frame;
|
||||
using namespace ::com::sun::star::container;
|
||||
using namespace ::com::sun::star::beans;
|
||||
using namespace ::com::sun::star::view;
|
||||
using namespace ::com::sun::star::task;
|
||||
|
||||
namespace desktop
|
||||
{
|
||||
@ -226,9 +227,9 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
|
||||
}
|
||||
else
|
||||
{
|
||||
Reference < com::sun::star::task::XInteractionHandler > xInteraction(
|
||||
::comphelper::getProcessServiceFactory()->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler")) ),
|
||||
com::sun::star::uno::UNO_QUERY );
|
||||
Reference < XInteractionHandler > xInteraction(
|
||||
InteractionHandler::createDefault(::comphelper::getProcessComponentContext()),
|
||||
UNO_QUERY_THROW );
|
||||
|
||||
aArgs[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
|
||||
aArgs[1].Value <<= xInteraction;
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include "com/sun/star/deployment/UpdateInformationProvider.hpp"
|
||||
#include "com/sun/star/deployment/XPackage.hpp"
|
||||
|
||||
#include "com/sun/star/task/InteractionHandler.hpp"
|
||||
#include "com/sun/star/task/XAbortChannel.hpp"
|
||||
#include "com/sun/star/task/XInteractionAbort.hpp"
|
||||
#include "com/sun/star/task/XInteractionApprove.hpp"
|
||||
@ -536,10 +537,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
|
||||
handlerArgs[ 0 ] <<= beans::PropertyValue(
|
||||
OUSTR("Context"), -1, uno::Any( m_sTitle ),
|
||||
beans::PropertyState_DIRECT_VALUE );
|
||||
m_xHandler.set( m_xContext->getServiceManager()
|
||||
->createInstanceWithArgumentsAndContext(
|
||||
OUSTR("com.sun.star.uui.InteractionHandler"),
|
||||
handlerArgs, m_xContext ), uno::UNO_QUERY_THROW );
|
||||
m_xHandler.set( task::InteractionHandler::createWithParentAndContext(m_xContext, NULL, m_sTitle), uno::UNO_QUERY_THROW );
|
||||
}
|
||||
m_xHandler->handle( xRequest );
|
||||
}
|
||||
|
@ -66,6 +66,7 @@
|
||||
#include "com/sun/star/lang/XSingleServiceFactory.hpp"
|
||||
#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
|
||||
#include "com/sun/star/system/SystemShellExecute.hpp"
|
||||
#include "com/sun/star/task/InteractionHandler.hpp"
|
||||
#include "com/sun/star/task/XAbortChannel.hpp"
|
||||
#include "com/sun/star/task/XJob.hpp"
|
||||
#include "com/sun/star/ucb/CommandAbortedException.hpp"
|
||||
@ -272,16 +273,10 @@ UpdateDialog::Thread::Thread(
|
||||
{
|
||||
if( m_context.is() )
|
||||
{
|
||||
uno::Reference< lang::XMultiComponentFactory > xServiceManager( m_context->getServiceManager() );
|
||||
|
||||
if( xServiceManager.is() )
|
||||
{
|
||||
m_xInteractionHdl = uno::Reference< task::XInteractionHandler > (
|
||||
xServiceManager->createInstanceWithContext( OUSTR( "com.sun.star.task.InteractionHandler" ), m_context),
|
||||
uno::UNO_QUERY );
|
||||
if ( m_xInteractionHdl.is() )
|
||||
m_updateInformation->setInteractionHandler( m_xInteractionHdl );
|
||||
}
|
||||
m_xInteractionHdl = uno::Reference< task::XInteractionHandler > (
|
||||
task::InteractionHandler::createDefault(m_context),
|
||||
uno::UNO_QUERY_THROW );
|
||||
m_updateInformation->setInteractionHandler( m_xInteractionHdl );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
#include <com/sun/star/embed/EmbedMapUnits.hpp>
|
||||
#include <com/sun/star/embed/XVisualObject.hpp>
|
||||
#include <com/sun/star/document/MacroExecMode.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <osl/diagnose.h>
|
||||
#include <rtl/process.h>
|
||||
|
||||
@ -114,9 +114,8 @@ void DocumentHolder::LoadDocInFrame( sal_Bool bPluginMode )
|
||||
if( xComponentLoader.is() && m_xDocument.is() )
|
||||
{
|
||||
uno::Reference< task::XInteractionHandler > xHandler(
|
||||
m_xFactory->createInstance(
|
||||
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" ) ) ),
|
||||
uno::UNO_QUERY );
|
||||
task::InteractionHandler::create(comphelper::getComponentContext(m_xFactory)),
|
||||
uno::UNO_QUERY_THROW );
|
||||
|
||||
uno::Any aAny;
|
||||
sal_Int32 nLen = 3;
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
|
||||
#include <com/sun/star/sdbc/XConnection.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/uno/XNamingService.hpp>
|
||||
|
||||
#include <comphelper/interaction.hxx>
|
||||
@ -524,13 +524,12 @@ namespace abp
|
||||
|
||||
// ................................................................
|
||||
// create the interaction handler (needed for authentication and error handling)
|
||||
static ::rtl::OUString s_sInteractionHandlerServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler"));
|
||||
Reference< XInteractionHandler > xInteractions;
|
||||
try
|
||||
{
|
||||
xInteractions = Reference< XInteractionHandler >(
|
||||
m_pImpl->xORB->createInstance( s_sInteractionHandlerServiceName ),
|
||||
UNO_QUERY
|
||||
InteractionHandler::createDefault(comphelper::getComponentContext(m_pImpl->xORB)),
|
||||
UNO_QUERY_THROW
|
||||
);
|
||||
}
|
||||
catch(const Exception&)
|
||||
@ -541,6 +540,7 @@ namespace abp
|
||||
// failure to create the interaction handler is a serious issue ...
|
||||
if (!xInteractions.is())
|
||||
{
|
||||
::rtl::OUString s_sInteractionHandlerServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler"));
|
||||
if ( _pMessageParent )
|
||||
ShowServiceNotAvailableError( _pMessageParent, s_sInteractionHandlerServiceName, sal_True );
|
||||
return sal_False;
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
|
||||
#include <com/sun/star/sdbc/XConnection.hpp>
|
||||
#include <com/sun/star/sdb/XCompletedConnection.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/form/XLoadable.hpp>
|
||||
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
|
||||
#include <com/sun/star/form/XGridColumnFactory.hpp>
|
||||
@ -96,7 +96,6 @@ Reference< XConnection > getConnection(const ::rtl::OUString& _rURL)
|
||||
// first get the sdb::DataSource corresponding to the url
|
||||
Reference< XDataSource > xDataSource;
|
||||
// is it a favorite title ?
|
||||
Reference< XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory();
|
||||
Reference<XComponentContext> xContext = comphelper::getProcessComponentContext();
|
||||
Reference< XDatabaseContext > xNamingContext = DatabaseContext::create(xContext);
|
||||
if (xNamingContext->hasByName(_rURL))
|
||||
@ -120,9 +119,7 @@ Reference< XConnection > getConnection(const ::rtl::OUString& _rURL)
|
||||
Reference< XCompletedConnection > xComplConn(xDataSource, UNO_QUERY);
|
||||
try
|
||||
{
|
||||
|
||||
Reference<XInterface> xHdl = xMgr->createInstance(C2U("com.sun.star.task.InteractionHandler"));
|
||||
Reference<task::XInteractionHandler> xIHdl(xHdl, UNO_QUERY);
|
||||
Reference<task::XInteractionHandler> xIHdl( task::InteractionHandler::createDefault(xContext), UNO_QUERY_THROW);
|
||||
xConn = xComplConn->connectWithCompletion(xIHdl);
|
||||
}
|
||||
catch (const SQLException&)
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <com/sun/star/sdb/CommandType.hpp>
|
||||
#include <com/sun/star/sdbc/SQLWarning.hpp>
|
||||
#include <com/sun/star/sdb/SQLContext.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <comphelper/types.hxx>
|
||||
#include <connectivity/dbtools.hxx>
|
||||
@ -514,16 +515,17 @@ namespace dbp
|
||||
//---------------------------------------------------------------------
|
||||
Reference< XInteractionHandler > OControlWizard::getInteractionHandler(Window* _pWindow) const
|
||||
{
|
||||
const ::rtl::OUString sInteractionHandlerServiceName("com.sun.star.task.InteractionHandler");
|
||||
Reference< XInteractionHandler > xHandler;
|
||||
try
|
||||
{
|
||||
if (getServiceFactory().is())
|
||||
xHandler = Reference< XInteractionHandler >(getServiceFactory()->createInstance(sInteractionHandlerServiceName), UNO_QUERY);
|
||||
xHandler = Reference< XInteractionHandler >( InteractionHandler::createDefault(comphelper::getComponentContext(getServiceFactory())), UNO_QUERY_THROW );
|
||||
}
|
||||
catch(const Exception&) { }
|
||||
if (!xHandler.is())
|
||||
{
|
||||
const ::rtl::OUString sInteractionHandlerServiceName("com.sun.star.task.InteractionHandler");
|
||||
ShowServiceNotAvailableError(_pWindow, sInteractionHandlerServiceName, sal_True);
|
||||
}
|
||||
return xHandler;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
|
@ -65,6 +65,7 @@
|
||||
#include "com/sun/star/frame/XDesktop.hpp"
|
||||
|
||||
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
|
||||
#include "com/sun/star/task/InteractionHandler.hpp"
|
||||
#include "com/sun/star/task/InteractionRequestStringResolver.hpp"
|
||||
|
||||
#include <com/sun/star/resource/XResourceBundleLoader.hpp>
|
||||
@ -450,12 +451,8 @@ void SAL_CALL UpdateHandler::handle( uno::Reference< task::XInteractionRequest >
|
||||
throw uno::RuntimeException( UNISTRING( "UpdateHandler: unable to obtain service manager from component context" ), *this );
|
||||
|
||||
mxInteractionHdl = uno::Reference<task::XInteractionHandler> (
|
||||
xServiceManager->createInstanceWithContext(
|
||||
UNISTRING( "com.sun.star.task.InteractionHandler" ),
|
||||
mxContext),
|
||||
task::InteractionHandler::createDefault(mxContext),
|
||||
uno::UNO_QUERY_THROW);
|
||||
if( !mxInteractionHdl.is() )
|
||||
throw uno::RuntimeException( UNISTRING( "UpdateHandler:: could not get default interaction handler" ), *this );
|
||||
}
|
||||
uno::Reference< task::XInteractionRequestStringResolver > xStrResolver =
|
||||
task::InteractionRequestStringResolver::create( mxContext );
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <com/sun/star/io/XActiveDataSource.hpp>
|
||||
#include <com/sun/star/system/SystemShellExecute.hpp>
|
||||
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
||||
#include <com/sun/star/xml/XImportFilter.hpp>
|
||||
#include <com/sun/star/xml/XExportFilter.hpp>
|
||||
@ -424,8 +424,8 @@ 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( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" )) ), UNO_QUERY );
|
||||
if( xLoader.is() && xInter.is() )
|
||||
Reference< XInteractionHandler > xInter( InteractionHandler::createDefault(comphelper::getComponentContext(mxMSF)), UNO_QUERY_THROW );
|
||||
if( xLoader.is() )
|
||||
{
|
||||
OUString aFrame( RTL_CONSTASCII_USTRINGPARAM( "_default" ) );
|
||||
Sequence< PropertyValue > aArguments(1);
|
||||
@ -619,8 +619,8 @@ 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( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" )) ), UNO_QUERY );
|
||||
if( xLoader.is() && xInter.is() )
|
||||
Reference< XInteractionHandler > xInter( InteractionHandler::createDefault(comphelper::getComponentContext(mxMSF)), UNO_QUERY_THROW );
|
||||
if( xLoader.is() )
|
||||
{
|
||||
|
||||
OUString aFrame( RTL_CONSTASCII_USTRINGPARAM( "_default" ) );
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <com/sun/star/frame/XComponentLoader.hpp>
|
||||
#include <com/sun/star/frame/FrameSearchFlag.hpp>
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <ucbhelper/content.hxx>
|
||||
|
||||
using namespace com::sun::star::uno;
|
||||
@ -129,9 +130,8 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||
if( _xHandler.is() )
|
||||
pHelper->m_aInteractionHandler = _xHandler;
|
||||
else
|
||||
pHelper->m_aInteractionHandler = CSS::uno::Reference< XInteractionHandler >(m_aFactory->createInstance(
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler") ) ), UNO_QUERY);
|
||||
OSL_ENSURE(pHelper->m_aInteractionHandler.is(), "failed to create IntreractionHandler");
|
||||
pHelper->m_aInteractionHandler = CSS::uno::Reference< XInteractionHandler >(
|
||||
InteractionHandler::createDefault(m_xContext), UNO_QUERY_THROW);
|
||||
|
||||
CProgressHandlerHelper *pProgressHelper = new CProgressHandlerHelper;
|
||||
pHelper->m_aProgressHandler = Reference< XProgressHandler >(pProgressHelper);
|
||||
|
@ -123,7 +123,7 @@ protected:
|
||||
CSS::uno::Reference< CSS::xml::xpath::XXPathObject > m_aXPathObject;
|
||||
CSS::uno::Reference< CSS::xml::dom::XDocumentFragment > m_aFragment;
|
||||
CSS::uno::Reference< CSS::io::XInputStream > m_aResultStream;
|
||||
CSS::uno::Reference< CSS::lang::XMultiServiceFactory > m_aFactory;
|
||||
CSS::uno::Reference< CSS::uno::XComponentContext > m_xContext;
|
||||
rtl::OUString m_aEncoding;
|
||||
|
||||
::std::auto_ptr< CSerialization > createSerialization(const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& aHandler
|
||||
@ -142,7 +142,7 @@ public:
|
||||
CSubmission(const rtl::OUString& aURL, const CSS::uno::Reference< CSS::xml::dom::XDocumentFragment >& aFragment)
|
||||
: m_aURLObj(aURL)
|
||||
, m_aFragment(aFragment)
|
||||
, m_aFactory(::comphelper::getProcessServiceFactory())
|
||||
, m_xContext(::comphelper::getProcessComponentContext())
|
||||
{}
|
||||
|
||||
virtual ~CSubmission() {}
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <ucbhelper/content.hxx>
|
||||
#include <com/sun/star/io/Pipe.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
|
||||
using namespace CSS::uno;
|
||||
using namespace CSS::ucb;
|
||||
@ -72,9 +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 >(m_aFactory->createInstance(
|
||||
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler"))), UNO_QUERY);
|
||||
OSL_ENSURE(pHelper->m_aInteractionHandler.is(), "failed to create IntreractionHandler");
|
||||
pHelper->m_aInteractionHandler = CSS::uno::Reference< XInteractionHandler >(
|
||||
CSS::task::InteractionHandler::createDefault(m_xContext), UNO_QUERY_THROW);
|
||||
CProgressHandlerHelper *pProgressHelper = new CProgressHandlerHelper;
|
||||
pHelper->m_aProgressHandler = CSS::uno::Reference< XProgressHandler >(pProgressHelper);
|
||||
|
||||
@ -98,8 +98,8 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const CSS::uno::Reference<
|
||||
aUTF8QueryURL.append(aQueryString.makeStringAndClear());
|
||||
}
|
||||
OUString aQueryURL = OStringToOUString(aUTF8QueryURL.makeStringAndClear(), RTL_TEXTENCODING_UTF8);
|
||||
ucbhelper::Content aContent(aQueryURL, aEnvironment, comphelper::getComponentContext(m_aFactory));
|
||||
CSS::uno::Reference< XOutputStream > aPipe( CSS::io::Pipe::create(comphelper::getComponentContext(m_aFactory)), UNO_QUERY_THROW );
|
||||
ucbhelper::Content aContent(aQueryURL, aEnvironment, m_xContext);
|
||||
CSS::uno::Reference< XOutputStream > aPipe( CSS::io::Pipe::create(m_xContext), UNO_QUERY_THROW );
|
||||
aContent.openStream(aPipe);
|
||||
// get reply
|
||||
try {
|
||||
|
@ -20,14 +20,14 @@
|
||||
#ifndef __SUBMISSION_GET_HXX
|
||||
#define __SUBMISSION_GET_HXX
|
||||
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
|
||||
#include "submission.hxx"
|
||||
|
||||
class CSubmissionGet : public CSubmission
|
||||
{
|
||||
private:
|
||||
CSS::uno::Reference< CSS::lang::XMultiServiceFactory > m_aFactory;
|
||||
CSS::uno::Reference< CSS::uno::XComponentContext > m_xContext;
|
||||
public:
|
||||
CSubmissionGet(const rtl::OUString& aURL, const CSS::uno::Reference< CSS::xml::dom::XDocumentFragment >& aFragment);
|
||||
virtual SubmissionResult submit(const CSS::uno::Reference< CSS::task::XInteractionHandler >& aInteractionHandler);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "fpsmartcontent.hxx"
|
||||
|
||||
#include <com/sun/star/container/XChild.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/ucb/ContentInfo.hpp>
|
||||
#include <com/sun/star/ucb/ContentInfoAttribute.hpp>
|
||||
#include <com/sun/star/ucb/XContent.hpp>
|
||||
@ -79,9 +80,9 @@ namespace svt
|
||||
//--------------------------------------------------------------------
|
||||
void SmartContent::enableOwnInteractionHandler(::svt::OFilePickerInteractionHandler::EInterceptedInteractions eInterceptions)
|
||||
{
|
||||
Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
|
||||
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
Reference< XInteractionHandler > xGlobalInteractionHandler = Reference< XInteractionHandler >(
|
||||
xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler") ) ), UNO_QUERY );
|
||||
InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
|
||||
|
||||
m_pOwnInteraction = new ::svt::OFilePickerInteractionHandler(xGlobalInteractionHandler);
|
||||
m_pOwnInteraction->enableInterceptions(eInterceptions);
|
||||
@ -98,9 +99,9 @@ namespace svt
|
||||
m_pOwnInteraction = NULL;
|
||||
m_xOwnInteraction = Reference< XInteractionHandler >();
|
||||
|
||||
Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
|
||||
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
Reference< XInteractionHandler > xGlobalInteractionHandler = Reference< XInteractionHandler >(
|
||||
xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler") ) ), UNO_QUERY );
|
||||
InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
|
||||
m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() );
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@
|
||||
#include <osl/file.h>
|
||||
#include <vcl/waitobj.hxx>
|
||||
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include "com/sun/star/ucb/InteractiveAugmentedIOException.hpp"
|
||||
#include "fpinteraction.hxx"
|
||||
#include <osl/process.h>
|
||||
@ -2001,13 +2001,10 @@ void SvtFileDialog::displayIOException( const String& _rURL, IOErrorCode _eCode
|
||||
pRequest->addContinuation( new ::comphelper::OInteractionAbort( ) );
|
||||
|
||||
Reference< XInteractionHandler > xHandler(
|
||||
::comphelper::getProcessServiceFactory()->createInstance(
|
||||
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler") )
|
||||
),
|
||||
UNO_QUERY
|
||||
InteractionHandler::createDefault( ::comphelper::getProcessComponentContext() ),
|
||||
UNO_QUERY_THROW
|
||||
);
|
||||
if ( xHandler.is() )
|
||||
xHandler->handle( xRequest );
|
||||
xHandler->handle( xRequest );
|
||||
}
|
||||
catch( const Exception& )
|
||||
{
|
||||
|
@ -270,6 +270,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/system,\
|
||||
SystemShellExecute \
|
||||
))
|
||||
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/task,\
|
||||
InteractionHandler \
|
||||
InteractionRequestStringResolver \
|
||||
JobExecutor \
|
||||
OfficeRestartManager \
|
||||
@ -1218,7 +1219,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/table,\
|
||||
))
|
||||
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/task,\
|
||||
AsyncJob \
|
||||
InteractionHandler \
|
||||
Job \
|
||||
))
|
||||
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/text,\
|
||||
|
@ -21,8 +21,8 @@
|
||||
#define __com_sun_star_task_InteractionHandler_idl__
|
||||
|
||||
module com { module sun { module star {
|
||||
module lang { published interface XInitialization; };
|
||||
module task { published interface XInteractionHandler; };
|
||||
module task { published interface XInteractionHandler2; };
|
||||
module awt { published interface XWindow; };
|
||||
}; }; };
|
||||
|
||||
module com { module sun { module star { module task {
|
||||
@ -147,28 +147,13 @@ module com { module sun { module star { module task {
|
||||
that the types you specify are general enough to cover all requests you want to handle, but also specific
|
||||
enough to not cover requests which other handlers might be interested in.</p>
|
||||
*/
|
||||
published service InteractionHandler
|
||||
published service InteractionHandler : XInteractionHandler2
|
||||
{
|
||||
/** Handle an interaction request.
|
||||
*/
|
||||
interface com::sun::star::task::XInteractionHandler;
|
||||
createDefault();
|
||||
|
||||
/** Initialize the interaction handler.
|
||||
createWithParent([in] com::sun::star::awt::XWindow parent);
|
||||
|
||||
<P>The arguments must be a sequence of
|
||||
<type scope="com::sun::star::beans">PropertyValue</type>s. The
|
||||
currently supported properties are:
|
||||
<UL>
|
||||
<LI><code>"Parent"</code> of type
|
||||
<type scope="com::sun::star::awt">XWindow</type> denotes the
|
||||
parent window for any GUI dialogs the interaction handler pops up;
|
||||
it is strongly recommended that this property is supplied;</LI>
|
||||
<LI><code>"Context"</code> of type <atom>string</atom> is a
|
||||
textual description of the current context (used, e.g., as a first
|
||||
line of text in error boxes); this property is optional.</LI>
|
||||
</UL></P>
|
||||
*/
|
||||
interface com::sun::star::lang::XInitialization;
|
||||
createWithParentAndContext([in] com::sun::star::awt::XWindow parent, [in] string context);
|
||||
};
|
||||
|
||||
}; }; }; };
|
||||
|
Binary file not shown.
@ -67,6 +67,7 @@
|
||||
#include <com/sun/star/style/XStyle.hpp>
|
||||
#include <com/sun/star/table/BorderLine.hpp>
|
||||
#include <com/sun/star/table/ShadowFormat.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/task/ErrorCodeIOException.hpp>
|
||||
#include <com/sun/star/task/XStatusIndicator.hpp>
|
||||
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
|
||||
@ -2649,8 +2650,8 @@ uno::Reference< embed::XStorage > OReportDefinition::getStorage() const
|
||||
// -----------------------------------------------------------------------------
|
||||
uno::Reference< task::XInteractionHandler > OReportDefinition::getInteractionHandler() const
|
||||
{
|
||||
uno::Reference< task::XInteractionHandler > xRet( m_aProps->m_xContext->getServiceManager()->createInstanceWithContext(
|
||||
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler")) ,m_aProps->m_xContext),uno::UNO_QUERY);
|
||||
uno::Reference< task::XInteractionHandler > xRet(
|
||||
task::InteractionHandler::createDefault(m_aProps->m_xContext), uno::UNO_QUERY_THROW);
|
||||
return xRet;
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -101,6 +101,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_ucalc,\
|
||||
ucb/source/core/ucb1 \
|
||||
ucb/source/ucp/file/ucpfile1 \
|
||||
unoxml/source/service/unoxml \
|
||||
uui/util/uui \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_use_configuration,sc_ucalc))
|
||||
|
@ -66,6 +66,7 @@
|
||||
#include <com/sun/star/sheet/DataPilotTablePositionData.hpp>
|
||||
#include <com/sun/star/sheet/DataPilotTablePositionType.hpp>
|
||||
#include <com/sun/star/sheet/DimensionFlags.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
|
||||
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
|
||||
@ -102,7 +103,6 @@ using ::com::sun::star::beans::XPropertySet;
|
||||
using ::rtl::OUString;
|
||||
|
||||
#define SC_SERVICE_ROWSET "com.sun.star.sdb.RowSet"
|
||||
#define SC_SERVICE_INTHANDLER "com.sun.star.task.InteractionHandler"
|
||||
|
||||
#define SC_DBPROP_DATASOURCENAME "DataSourceName"
|
||||
#define SC_DBPROP_COMMAND "Command"
|
||||
@ -3058,9 +3058,8 @@ uno::Reference<sdbc::XRowSet> ScDPCollection::DBCaches::createRowSet(
|
||||
if ( xExecute.is() )
|
||||
{
|
||||
uno::Reference<task::XInteractionHandler> xHandler(
|
||||
comphelper::getProcessServiceFactory()->createInstance(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_INTHANDLER )) ),
|
||||
uno::UNO_QUERY);
|
||||
task::InteractionHandler::createDefault(comphelper::getProcessComponentContext()),
|
||||
uno::UNO_QUERY_THROW);
|
||||
xExecute->executeWithCompletion( xHandler );
|
||||
}
|
||||
else
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <com/sun/star/sdb/DatabaseContext.hpp>
|
||||
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
|
||||
#include <com/sun/star/sdb/XCompletedConnection.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
|
||||
using namespace com::sun::star;
|
||||
|
||||
@ -54,7 +55,6 @@ using namespace com::sun::star;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#define SC_SERVICE_INTHANDLER "com.sun.star.task.InteractionHandler"
|
||||
|
||||
// entries in the "type" ListBox
|
||||
#define DP_TYPELIST_TABLE 0
|
||||
@ -165,9 +165,8 @@ void ScDataPilotDatabaseDlg::FillObjects()
|
||||
if ( !xSource.is() ) return;
|
||||
|
||||
uno::Reference<task::XInteractionHandler> xHandler(
|
||||
comphelper::getProcessServiceFactory()->createInstance(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_INTHANDLER )) ),
|
||||
uno::UNO_QUERY);
|
||||
task::InteractionHandler::createDefault(comphelper::getProcessComponentContext()),
|
||||
uno::UNO_QUERY_THROW);
|
||||
|
||||
uno::Reference<sdbc::XConnection> xConnection = xSource->connectWithCompletion( xHandler );
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <com/sun/star/sdbc/XRowSet.hpp>
|
||||
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
|
||||
#include <com/sun/star/sdbcx/XRowLocate.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/beans/XPropertySet.hpp>
|
||||
#include <com/sun/star/frame/XDispatchProvider.hpp>
|
||||
@ -66,7 +67,6 @@
|
||||
using namespace com::sun::star;
|
||||
|
||||
#define SC_SERVICE_ROWSET "com.sun.star.sdb.RowSet"
|
||||
#define SC_SERVICE_INTHANDLER "com.sun.star.task.InteractionHandler"
|
||||
|
||||
//! move to a header file?
|
||||
#define SC_DBPROP_DATASOURCENAME "DataSourceName"
|
||||
@ -252,9 +252,8 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
|
||||
if ( xExecute.is() )
|
||||
{
|
||||
uno::Reference<task::XInteractionHandler> xHandler(
|
||||
comphelper::getProcessServiceFactory()->createInstance(
|
||||
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_INTHANDLER )) ),
|
||||
uno::UNO_QUERY);
|
||||
task::InteractionHandler::createDefault(comphelper::getProcessComponentContext()),
|
||||
uno::UNO_QUERY_THROW);
|
||||
xExecute->executeWithCompletion( xHandler );
|
||||
}
|
||||
else
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <osl/mutex.hxx>
|
||||
#include <svtools/imagemgr.hxx>
|
||||
#include <svtools/miscopt.hxx>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/frame/XDispatchResultListener.hpp>
|
||||
#include <com/sun/star/frame/XNotifyingDispatch.hpp>
|
||||
#include <com/sun/star/frame/XFramesSupplier.hpp>
|
||||
@ -439,8 +439,8 @@ IMPL_STATIC_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYAR
|
||||
Sequence< PropertyValue > aArgs(3);
|
||||
|
||||
Reference < com::sun::star::task::XInteractionHandler > xInteraction(
|
||||
::comphelper::getProcessServiceFactory()->createInstance( OUString("com.sun.star.task.InteractionHandler") ),
|
||||
com::sun::star::uno::UNO_QUERY );
|
||||
task::InteractionHandler::createDefault(::comphelper::getProcessComponentContext()),
|
||||
com::sun::star::uno::UNO_QUERY_THROW );
|
||||
|
||||
aArgs[0].Name = OUString("InteractionHandler");
|
||||
aArgs[0].Value <<= xInteraction;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/sdbc/XResultSet.hpp>
|
||||
#include <com/sun/star/sdbc/XRow.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/ucb/CommandAbortedException.hpp>
|
||||
#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
|
||||
#include <com/sun/star/ucb/NameClash.hpp>
|
||||
@ -168,9 +169,9 @@ uno::Sequence< OUString > SfxContentHelper::GetHelpTreeViewContents( const Strin
|
||||
StringList_Impl* pProperties = NULL;
|
||||
try
|
||||
{
|
||||
uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
|
||||
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
uno::Reference< task::XInteractionHandler > xInteractionHandler = uno::Reference< task::XInteractionHandler > (
|
||||
xFactory->createInstance( "com.sun.star.task.InteractionHandler" ), uno::UNO_QUERY );
|
||||
task::InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
|
||||
|
||||
::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ), comphelper::getProcessComponentContext() );
|
||||
uno::Reference< sdbc::XResultSet > xResultSet;
|
||||
@ -252,9 +253,9 @@ String SfxContentHelper::GetActiveHelpString( const String& rURL )
|
||||
String aRet;
|
||||
try
|
||||
{
|
||||
uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
|
||||
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
uno::Reference< task::XInteractionHandler > xInteractionHandler = uno::Reference< task::XInteractionHandler > (
|
||||
xFactory->createInstance( "com.sun.star.task.InteractionHandler" ), uno::UNO_QUERY );
|
||||
task::InteractionHandler::createDefault(xContext), 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();
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <ucbhelper/commandenvironment.hxx>
|
||||
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/sdbc/XResultSet.hpp>
|
||||
#include <com/sun/star/sdbc/XRow.hpp>
|
||||
#include <com/sun/star/ucb/XContentAccess.hpp>
|
||||
@ -52,9 +52,9 @@ TemplateRemoteView::TemplateRemoteView (Window *pParent, WinBits nWinStyle, bool
|
||||
mpItemView->SetColor(Color(COL_WHITE));
|
||||
mpItemView->setChangeNameHdl(LINK(this,TemplateRemoteView,ChangeNameHdl));
|
||||
|
||||
Reference< XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory();
|
||||
Reference< XComponentContext > xContext = comphelper::getProcessComponentContext();
|
||||
Reference< XInteractionHandler > xGlobalInteractionHandler = Reference< XInteractionHandler >(
|
||||
xFactory->createInstance("com.sun.star.task.InteractionHandler" ), UNO_QUERY );
|
||||
InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
|
||||
|
||||
m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() );
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <com/sun/star/frame/XDispatchProvider.hpp>
|
||||
#include <com/sun/star/frame/XFrame.hpp>
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/util/URL.hpp>
|
||||
#include <com/sun/star/util/URLTransformer.hpp>
|
||||
#include <com/sun/star/util/XURLTransformer.hpp>
|
||||
@ -71,12 +71,12 @@ void SfxTemplateInfoDlg::loadDocument(const OUString &rURL)
|
||||
{
|
||||
assert(!rURL.isEmpty());
|
||||
|
||||
uno::Reference<lang::XMultiServiceFactory> xContext(comphelper::getProcessServiceFactory());
|
||||
uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
|
||||
|
||||
try
|
||||
{
|
||||
uno::Reference<task::XInteractionHandler> xInteractionHandler(
|
||||
xContext->createInstance("com.sun.star.task.InteractionHandler"), uno::UNO_QUERY );
|
||||
task::InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
|
||||
|
||||
uno::Sequence<beans::PropertyValue> aProps(1);
|
||||
aProps[0].Name = "InteractionHandler";
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "sfx2/signaturestate.hxx"
|
||||
|
||||
#include <uno/mapping.hxx>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/uno/Reference.h>
|
||||
#include <com/sun/star/ucb/XContent.hpp>
|
||||
#include <com/sun/star/container/XChild.hpp>
|
||||
@ -2526,14 +2526,10 @@ SfxMedium::GetInteractionHandler()
|
||||
return pImp->xInteraction;
|
||||
|
||||
// create default handler and cache it!
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
|
||||
if ( xFactory.is() )
|
||||
{
|
||||
pImp->xInteraction = ::com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >( xFactory->createInstance( DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ), ::com::sun::star::uno::UNO_QUERY );
|
||||
return pImp->xInteraction;
|
||||
}
|
||||
|
||||
return ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >();
|
||||
Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
pImp->xInteraction = Reference< task::XInteractionHandler >(
|
||||
task::InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
|
||||
return pImp->xInteraction;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
@ -152,7 +152,7 @@ typedef vector< NamePair_Impl* > NameList_Impl;
|
||||
typedef vector< GroupData_Impl* > GroupList_Impl;
|
||||
|
||||
//=============================================================================
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/ucb/XProgressHandler.hpp>
|
||||
|
||||
class TplTaskEnvironment : public ::cppu::WeakImplHelper1< ucb::XCommandEnvironment >
|
||||
@ -389,12 +389,10 @@ public:
|
||||
//-----------------------------------------------------------------------------
|
||||
void SfxDocTplService_Impl::init_Impl()
|
||||
{
|
||||
uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
|
||||
if ( xFactory.is() )
|
||||
{
|
||||
uno::Reference < task::XInteractionHandler > xInteractionHandler( xFactory->createInstance( DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ), uno::UNO_QUERY );
|
||||
maCmdEnv = new TplTaskEnvironment( xInteractionHandler );
|
||||
}
|
||||
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
uno::Reference < task::XInteractionHandler > xInteractionHandler(
|
||||
task::InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
|
||||
maCmdEnv = new TplTaskEnvironment( xInteractionHandler );
|
||||
|
||||
::osl::ClearableMutexGuard aGuard( maMutex );
|
||||
sal_Bool bIsInitialized = sal_False;
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <com/sun/star/document/XExporter.hpp>
|
||||
#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
|
||||
#include <com/sun/star/document/XDocumentInfo.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/util/DateTime.hpp>
|
||||
#include <com/sun/star/util/URLTransformer.hpp>
|
||||
#include <com/sun/star/util/XURLTransformer.hpp>
|
||||
@ -441,8 +441,7 @@ void ModelData_Impl::CheckInteractionHandler()
|
||||
try {
|
||||
m_aMediaDescrHM[ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) ]
|
||||
<<= uno::Reference< task::XInteractionHandler >(
|
||||
m_pOwner->GetServiceFactory()->createInstance(
|
||||
DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ),
|
||||
task::InteractionHandler::createDefault(comphelper::getComponentContext(m_pOwner->GetServiceFactory())),
|
||||
uno::UNO_QUERY );
|
||||
}
|
||||
catch( const uno::Exception& )
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
#include <com/sun/star/container/XNameAccess.hpp>
|
||||
#include <com/sun/star/document/XExporter.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/task/XStatusIndicator.hpp>
|
||||
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
|
||||
#include <com/sun/star/frame/DocumentTemplates.hpp>
|
||||
@ -554,28 +554,20 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
|
||||
SFX_REQUEST_ARG( rReq, pInteractionHandlerItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, sal_False );
|
||||
if ( !pInteractionHandlerItem )
|
||||
{
|
||||
uno::Reference< task::XInteractionHandler > xInteract;
|
||||
uno::Reference< lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory();
|
||||
if( xServiceManager.is() )
|
||||
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
uno::Reference< task::XInteractionHandler > xInteract(
|
||||
task::InteractionHandler::createDefault(xContext),
|
||||
UNO_QUERY_THROW );
|
||||
|
||||
SfxUnoAnyItem aInteractionItem( SID_INTERACTIONHANDLER, uno::makeAny( xInteract ) );
|
||||
if ( nId == SID_SAVEDOC )
|
||||
{
|
||||
xInteract = Reference< XInteractionHandler >(
|
||||
xServiceManager->createInstance( DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ),
|
||||
UNO_QUERY );
|
||||
// in case of saving it is not possible to transport the parameters from here
|
||||
// but it is not clear here whether the saving will be done or saveAs operation
|
||||
GetMedium()->GetItemSet()->Put( aInteractionItem );
|
||||
}
|
||||
|
||||
OSL_ENSURE( xInteract.is(), "Can not retrieve default status indicator!\n" );
|
||||
if ( xInteract.is() )
|
||||
{
|
||||
SfxUnoAnyItem aInteractionItem( SID_INTERACTIONHANDLER, uno::makeAny( xInteract ) );
|
||||
if ( nId == SID_SAVEDOC )
|
||||
{
|
||||
// in case of saving it is not possible to transport the parameters from here
|
||||
// but it is not clear here whether the saving will be done or saveAs operation
|
||||
GetMedium()->GetItemSet()->Put( aInteractionItem );
|
||||
}
|
||||
|
||||
rReq.AppendItem( aInteractionItem );
|
||||
}
|
||||
rReq.AppendItem( aInteractionItem );
|
||||
}
|
||||
else if ( nId == SID_SAVEDOC )
|
||||
{
|
||||
|
@ -22,9 +22,11 @@
|
||||
|
||||
#include <unotools/pathoptions.hxx>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <comphelper/string.hxx>
|
||||
#include <com/sun/star/registry/XSimpleRegistry.hpp>
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/task/MasterPasswordRequest.hpp>
|
||||
#include <com/sun/star/task/NoMasterException.hpp>
|
||||
|
||||
@ -1124,7 +1126,8 @@ sal_Bool SAL_CALL PasswordContainer::authorizateWithMasterPassword( const uno::R
|
||||
if ( !xTmpHandler.is() )
|
||||
{
|
||||
uno::Reference< lang::XMultiServiceFactory > xFactory( mComponent, uno::UNO_QUERY_THROW );
|
||||
xTmpHandler.set( xFactory->createInstance( ::rtl::OUString( "com.sun.star.task.InteractionHandler" ) ), uno::UNO_QUERY_THROW );
|
||||
uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) );
|
||||
xTmpHandler.set( InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
|
||||
}
|
||||
|
||||
if ( !m_aMasterPasswd.isEmpty() )
|
||||
@ -1168,7 +1171,8 @@ sal_Bool SAL_CALL PasswordContainer::changeMasterPassword( const uno::Reference<
|
||||
if ( !xTmpHandler.is() )
|
||||
{
|
||||
uno::Reference< lang::XMultiServiceFactory > xFactory( mComponent, uno::UNO_QUERY_THROW );
|
||||
xTmpHandler.set( xFactory->createInstance( ::rtl::OUString( "com.sun.star.task.InteractionHandler" ) ), uno::UNO_QUERY_THROW );
|
||||
uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) );
|
||||
xTmpHandler.set( InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
|
||||
}
|
||||
|
||||
sal_Bool bCanChangePassword = sal_True;
|
||||
@ -1284,7 +1288,8 @@ void SAL_CALL PasswordContainer::removeMasterPassword()
|
||||
if ( !xTmpHandler.is() )
|
||||
{
|
||||
uno::Reference< lang::XMultiServiceFactory > xFactory( mComponent, uno::UNO_QUERY_THROW );
|
||||
xTmpHandler.set( xFactory->createInstance( ::rtl::OUString( "com.sun.star.task.InteractionHandler" ) ), uno::UNO_QUERY_THROW );
|
||||
uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) );
|
||||
xTmpHandler.set( InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW );
|
||||
}
|
||||
|
||||
sal_Bool bCanChangePassword = sal_True;
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <svtools/AccessibleBrowseBoxObjType.hxx>
|
||||
#include <com/sun/star/util/DateTime.hpp>
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/ucb/XProgressHandler.hpp>
|
||||
#include <com/sun/star/sdbc/XResultSet.hpp>
|
||||
#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
|
||||
@ -698,9 +698,9 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin,
|
||||
maResetQuickSearch.SetTimeout( QUICK_SEARCH_TIMEOUT );
|
||||
maResetQuickSearch.SetTimeoutHdl( LINK( this, ViewTabListBox_Impl, ResetQuickSearch_Impl ) );
|
||||
|
||||
Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
|
||||
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
Reference< XInteractionHandler > xInteractionHandler = Reference< XInteractionHandler > (
|
||||
xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uui.InteractionHandler") ) ), UNO_QUERY );
|
||||
InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
|
||||
|
||||
mxCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
|
||||
|
||||
@ -1160,8 +1160,9 @@ SvtFileView::SvtFileView( Window* pParent, const ResId& rResId,
|
||||
if ( bMultiSelection )
|
||||
nFlags |= FILEVIEW_MULTISELECTION;
|
||||
|
||||
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
Reference< XInteractionHandler > xInteractionHandler = Reference< XInteractionHandler > (
|
||||
::comphelper::getProcessServiceFactory()->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uui.InteractionHandler") ) ), UNO_QUERY );
|
||||
InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
|
||||
Reference < XCommandEnvironment > xCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
|
||||
|
||||
mpImp = new SvtFileView_Impl( this, xCmdEnv, nFlags, bOnlyFolder );
|
||||
@ -1177,8 +1178,9 @@ SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags
|
||||
|
||||
Control( pParent, rResId )
|
||||
{
|
||||
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
Reference< XInteractionHandler > xInteractionHandler = Reference< XInteractionHandler > (
|
||||
::comphelper::getProcessServiceFactory()->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uui.InteractionHandler") ) ), UNO_QUERY );
|
||||
InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
|
||||
Reference < XCommandEnvironment > xCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
|
||||
|
||||
mpImp = new SvtFileView_Impl( this, xCmdEnv, nFlags, nFlags & FILEVIEW_ONLYFOLDER );
|
||||
|
@ -71,6 +71,7 @@
|
||||
#include <com/sun/star/script/XTypeConverter.hpp>
|
||||
#include <com/sun/star/system/SystemShellExecute.hpp>
|
||||
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <unotools/localedatawrapper.hxx>
|
||||
#include <com/sun/star/container/XNameContainer.hpp>
|
||||
#include <vcl/waitobj.hxx>
|
||||
@ -669,8 +670,9 @@ void SvtFrameWindow_Impl::ShowDocInfo( const String& rURL )
|
||||
{
|
||||
try
|
||||
{
|
||||
uno::Reference < task::XInteractionHandler > xInteractionHandler( ::comphelper::getProcessServiceFactory()->createInstance(
|
||||
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" )) ), uno::UNO_QUERY );
|
||||
uno::Reference < task::XInteractionHandler > xInteractionHandler(
|
||||
task::InteractionHandler::createDefault(::comphelper::getProcessComponentContext()),
|
||||
uno::UNO_QUERY_THROW );
|
||||
uno::Sequence < beans::PropertyValue> aProps(1);
|
||||
aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
|
||||
aProps[0].Value <<= xInteractionHandler;
|
||||
@ -752,8 +754,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( ::comphelper::getProcessServiceFactory()->createInstance(
|
||||
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" )) ), uno::UNO_QUERY );
|
||||
uno::Reference < task::XInteractionHandler > xInteractionHandler(
|
||||
task::InteractionHandler::createDefault(::comphelper::getProcessComponentContext()), uno::UNO_QUERY_THROW );
|
||||
aArgs[3].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
|
||||
aArgs[3].Value <<= xInteractionHandler;
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
|
||||
#include <com/sun/star/ucb/XContentAccess.hpp>
|
||||
#include <com/sun/star/sdbc/XResultSet.hpp>
|
||||
@ -292,9 +292,9 @@ CmisDetailsContainer::CmisDetailsContainer( ) :
|
||||
m_sUsername( ),
|
||||
m_xCmdEnv( )
|
||||
{
|
||||
Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
|
||||
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
|
||||
Reference< XInteractionHandler > xGlobalInteractionHandler = Reference< XInteractionHandler >(
|
||||
xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler") ) ), UNO_QUERY );
|
||||
InteractionHandler::createDefault(xContext), UNO_QUERY );
|
||||
m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() );
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include <com/sun/star/sdb/SQLContext.hpp>
|
||||
#include <com/sun/star/sdbc/SQLWarning.hpp>
|
||||
#include <com/sun/star/sdbc/XConnection.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
|
||||
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
|
||||
#include <com/sun/star/sdb/CommandType.hpp>
|
||||
@ -847,15 +847,17 @@ void AssignmentPersistentData::Commit()
|
||||
m_aDatasource.SaveValue();
|
||||
|
||||
// create an interaction handler (may be needed for connecting)
|
||||
const rtl::OUString sInteractionHandlerServiceName("com.sun.star.task.InteractionHandler");
|
||||
Reference< XInteractionHandler > xHandler;
|
||||
try
|
||||
{
|
||||
xHandler = Reference< XInteractionHandler >(m_xORB->createInstance(sInteractionHandlerServiceName), UNO_QUERY);
|
||||
xHandler = Reference< XInteractionHandler >(
|
||||
InteractionHandler::createDefault(comphelper::getComponentContext(m_xORB)),
|
||||
UNO_QUERY_THROW );
|
||||
}
|
||||
catch(Exception&) { }
|
||||
if (!xHandler.is())
|
||||
{
|
||||
const rtl::OUString sInteractionHandlerServiceName("com.sun.star.task.InteractionHandler");
|
||||
ShowServiceNotAvailableError(this, sInteractionHandlerServiceName, sal_True);
|
||||
return;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ namespace svxform
|
||||
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) );
|
||||
|
||||
// ------------------------------------------------
|
||||
|
@ -295,7 +295,8 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt )
|
||||
try
|
||||
{
|
||||
::rtl::OUString sSignificantSource( sDatasouce.isEmpty() ? sDatabaseLocation : sDatasouce );
|
||||
xConnection = OStaticDataAccessTools().getConnection_withFeedback(sSignificantSource, ::rtl::OUString(),::rtl::OUString(),static_cast<FmGridControl*>(GetParent())->getServiceManager());
|
||||
xConnection = OStaticDataAccessTools().getConnection_withFeedback(sSignificantSource, ::rtl::OUString(),::rtl::OUString(),
|
||||
comphelper::getComponentContext( static_cast<FmGridControl*>(GetParent())->getServiceManager() ));
|
||||
}
|
||||
catch(NoSuchElementException&)
|
||||
{ // allowed, means sDatasouce isn't a valid data source name ....
|
||||
|
@ -193,12 +193,12 @@ namespace svxform
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
Reference< XConnection> OStaticDataAccessTools::getConnection_withFeedback(const ::rtl::OUString& _rDataSourceName,
|
||||
const ::rtl::OUString& _rUser, const ::rtl::OUString& _rPwd, const Reference< XMultiServiceFactory>& _rxFactory) const
|
||||
const ::rtl::OUString& _rUser, const ::rtl::OUString& _rPwd, const Reference<XComponentContext>& _rxContext) const
|
||||
SAL_THROW ( (SQLException) )
|
||||
{
|
||||
Reference< XConnection > xReturn;
|
||||
if ( ensureLoaded() )
|
||||
xReturn = m_xDataAccessTools->getConnection_withFeedback(_rDataSourceName, _rUser, _rPwd, _rxFactory);
|
||||
xReturn = m_xDataAccessTools->getConnection_withFeedback(_rDataSourceName, _rUser, _rPwd, _rxContext);
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
|
@ -1185,7 +1185,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const ::svx::ODataAccessDescript
|
||||
sDataSource,
|
||||
::rtl::OUString(),
|
||||
::rtl::OUString(),
|
||||
m_aContext.getLegacyServiceFactory()
|
||||
m_aContext.getUNOContext()
|
||||
) );
|
||||
}
|
||||
catch (const SQLException&)
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
|
||||
#include <com/sun/star/sdbc/ColumnValue.hpp>
|
||||
#include <com/sun/star/sdbc/DataType.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/util/XURLTransformer.hpp>
|
||||
#include <com/sun/star/form/runtime/FormOperations.hpp>
|
||||
#include <com/sun/star/form/runtime/FormFeature.hpp>
|
||||
@ -199,6 +200,7 @@ namespace svxform
|
||||
using ::com::sun::star::util::URL;
|
||||
using ::com::sun::star::frame::FeatureStateEvent;
|
||||
using ::com::sun::star::form::runtime::XFormControllerContext;
|
||||
using ::com::sun::star::task::InteractionHandler;
|
||||
using ::com::sun::star::task::XInteractionHandler;
|
||||
using ::com::sun::star::form::runtime::FormOperations;
|
||||
using ::com::sun::star::container::XContainer;
|
||||
@ -4272,7 +4274,7 @@ bool FormController::ensureInteractionHandler()
|
||||
return false;
|
||||
m_bAttemptedHandlerCreation = true;
|
||||
|
||||
m_xInteractionHandler.set( m_aContext.createComponent( ::rtl::OUString( "com.sun.star.task.InteractionHandler" ) ), UNO_QUERY );
|
||||
m_xInteractionHandler.set( InteractionHandler::createDefault(m_aContext.getUNOContext()), UNO_QUERY );
|
||||
OSL_ENSURE( m_xInteractionHandler.is(), "FormController::ensureInteractionHandler: could not create an interaction handler!" );
|
||||
return m_xInteractionHandler.is();
|
||||
}
|
||||
|
@ -84,6 +84,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_odfexport,\
|
||||
ucb/source/ucp/file/ucpfile1 \
|
||||
unotools/util/utl \
|
||||
unoxml/source/service/unoxml \
|
||||
uui/util/uui \
|
||||
$(if $(filter DESKTOP,$(BUILD_TYPE)),xmlhelp/util/ucpchelp1) \
|
||||
))
|
||||
|
||||
|
@ -83,6 +83,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_odfimport,\
|
||||
ucb/source/ucp/file/ucpfile1 \
|
||||
unotools/util/utl \
|
||||
unoxml/source/service/unoxml \
|
||||
uui/util/uui \
|
||||
$(if $(filter DESKTOP,$(BUILD_TYPE)),xmlhelp/util/ucpchelp1) \
|
||||
))
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
|
||||
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
|
||||
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
|
||||
#include <com/sun/star/frame/XStorable.hpp>
|
||||
#include <swunohelper.hxx>
|
||||
@ -559,9 +560,8 @@ void SwAddressListDialog::DetectTablesAndQueries(
|
||||
m_xDBContext->getByName(m_aDBData.sDataSource) >>= xComplConnection;
|
||||
pUserData->xSource = uno::Reference<XDataSource>(xComplConnection, UNO_QUERY);
|
||||
|
||||
uno::Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
|
||||
uno::Reference< XInteractionHandler > xHandler(
|
||||
xMgr->createInstance( C2U( "com.sun.star.task.InteractionHandler" )), UNO_QUERY);
|
||||
uno::Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
|
||||
uno::Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(xContext), UNO_QUERY );
|
||||
pUserData->xConnection = SharedConnection( xComplConnection->connectWithCompletion( xHandler ) );
|
||||
}
|
||||
if(pUserData->xConnection.is())
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include <com/sun/star/container/XChild.hpp>
|
||||
#include <com/sun/star/text/MailMergeEvent.hpp>
|
||||
#include <com/sun/star/frame/XStorable.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
||||
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
||||
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
|
||||
@ -101,6 +102,7 @@
|
||||
#include <com/sun/star/sdbc/DataType.hpp>
|
||||
#include <com/sun/star/sdbc/ResultSetType.hpp>
|
||||
#include <com/sun/star/mail/MailAttachment.hpp>
|
||||
#include <comphelper/componentcontext.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <comphelper/property.hxx>
|
||||
#include <comphelper/string.hxx>
|
||||
@ -1571,7 +1573,6 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData
|
||||
uno::Reference<XDataSource>& rxSource)
|
||||
{
|
||||
Reference< sdbc::XConnection> xConnection;
|
||||
Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
|
||||
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
|
||||
try
|
||||
{
|
||||
@ -1579,9 +1580,8 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData
|
||||
if ( xComplConnection.is() )
|
||||
{
|
||||
rxSource.set(xComplConnection,UNO_QUERY);
|
||||
Reference< XInteractionHandler > xHandler(
|
||||
xMgr->createInstance( C2U( "com.sun.star.task.InteractionHandler" )), UNO_QUERY);
|
||||
xConnection = xComplConnection->connectWithCompletion( xHandler );
|
||||
Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(xContext), UNO_QUERY_THROW );
|
||||
xConnection = xComplConnection->connectWithCompletion( xHandler );
|
||||
}
|
||||
}
|
||||
catch(const Exception&)
|
||||
@ -2661,7 +2661,7 @@ uno::Reference<XResultSet> SwNewDBMgr::createCursor(const ::rtl::OUString& _sDat
|
||||
|
||||
if ( xRowSet.is() )
|
||||
{
|
||||
uno::Reference< XInteractionHandler > xHandler(xMgr->createInstance(C2U("com.sun.star.task.InteractionHandler")), UNO_QUERY);
|
||||
uno::Reference< XInteractionHandler > xHandler( InteractionHandler::createDefault(comphelper::getComponentContext(xMgr)), UNO_QUERY_THROW );
|
||||
xRowSet->executeWithCompletion(xHandler);
|
||||
}
|
||||
xResultSet = uno::Reference<XResultSet>(xRowSet, UNO_QUERY);
|
||||
|
@ -650,10 +650,8 @@ uno::Any UcbCommandProcessor::executeCommand( const rtl::OUString& rName,
|
||||
if (m_rUCB.getServiceFactory().is())
|
||||
xInteractionHandler
|
||||
= uno::Reference< task::XInteractionHandler >(
|
||||
m_rUCB.getServiceFactory()->
|
||||
createInstance(
|
||||
rtl::OUString( "com.sun.star.task.InteractionHandler")),
|
||||
uno::UNO_QUERY);
|
||||
task::InteractionHandler::create(m_rUCB.getServiceFactory()),
|
||||
uno::UNO_QUERY_THROW);
|
||||
uno::Reference< ucb::XProgressHandler >
|
||||
xProgressHandler(new ProgressHandler(m_rUCB));
|
||||
uno::Reference< ucb::XCommandEnvironment > xEnv(
|
||||
@ -1308,10 +1306,8 @@ void UcbContent::transfer( const rtl::OUString& rSourceURL, sal_Bool bMove )
|
||||
if (m_rUCB.getServiceFactory().is())
|
||||
xInteractionHandler
|
||||
= uno::Reference< task::XInteractionHandler >(
|
||||
m_rUCB.getServiceFactory()->
|
||||
createInstance(
|
||||
rtl::OUString( "com.sun.star.task.InteractionHandler")),
|
||||
uno::UNO_QUERY);
|
||||
task::InteractionHandler::createDefault(comphelper::getComponentContext(m_rUCB.getServiceFactory())),
|
||||
uno::UNO_QUERY_THROW);
|
||||
uno::Reference< ucb::XProgressHandler > xProgressHandler(
|
||||
new ProgressHandler(m_rUCB));
|
||||
uno::Reference< ucb::XCommandEnvironment > xEnv(
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
@since OOo 3.2
|
||||
*/
|
||||
/* published */ interface XInteractionHandler2 : com::sun::star::task::XInteractionHandler
|
||||
published interface XInteractionHandler2 : com::sun::star::task::XInteractionHandler
|
||||
{
|
||||
/** Handle an interaction request.
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "com/sun/star/task/ErrorCodeIOException.hpp"
|
||||
#include "com/sun/star/task/ErrorCodeRequest.hpp"
|
||||
#include "com/sun/star/task/FutureDocumentVersionProductUpdateRequest.hpp"
|
||||
#include "com/sun/star/task/InteractionHandler.hpp"
|
||||
#include "com/sun/star/task/XInteractionAbort.hpp"
|
||||
#include "com/sun/star/task/XInteractionApprove.hpp"
|
||||
#include "com/sun/star/task/XInteractionAskLater.hpp"
|
||||
@ -72,6 +73,7 @@
|
||||
#include "vcl/svapp.hxx"
|
||||
#include "unotools/configmgr.hxx"
|
||||
#include "toolkit/helper/vclunohelper.hxx"
|
||||
#include "comphelper/processfactory.hxx"
|
||||
#include "comphelper/namedvaluecollection.hxx"
|
||||
#include "typelib/typedescription.hxx"
|
||||
#include "unotools/confignode.hxx"
|
||||
@ -99,6 +101,7 @@ using ::com::sun::star::task::FutureDocumentVersionProductUpdateRequest;
|
||||
using ::com::sun::star::uno::XInterface;
|
||||
using ::com::sun::star::lang::XInitialization;
|
||||
using ::com::sun::star::uno::UNO_QUERY_THROW;
|
||||
using ::com::sun::star::task::InteractionHandler;
|
||||
using ::com::sun::star::task::XInteractionHandler2;
|
||||
using ::com::sun::star::uno::Exception;
|
||||
using ::com::sun::star::uno::Any;
|
||||
@ -129,10 +132,12 @@ public:
|
||||
|
||||
UUIInteractionHelper::UUIInteractionHelper(
|
||||
uno::Reference< lang::XMultiServiceFactory > const & rServiceFactory,
|
||||
uno::Sequence< uno::Any > const & rArguments)
|
||||
uno::Reference< awt::XWindow > const & rxWindowParam,
|
||||
const OUString & rContextParam)
|
||||
SAL_THROW(()):
|
||||
m_xServiceFactory(rServiceFactory),
|
||||
m_aProperties(rArguments)
|
||||
m_xWindowParam(rxWindowParam),
|
||||
m_aContextParam(rContextParam)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1092,58 +1097,24 @@ uno::Reference< awt::XWindow>
|
||||
UUIInteractionHelper::getParentXWindow() const
|
||||
SAL_THROW(())
|
||||
{
|
||||
osl::MutexGuard aGuard(m_aPropertyMutex);
|
||||
::comphelper::NamedValueCollection aProperties( m_aProperties );
|
||||
if ( aProperties.has( "Parent" ) )
|
||||
{
|
||||
uno::Reference< awt::XWindow > xWindow;
|
||||
OSL_VERIFY( aProperties.get( "Parent" ) >>= xWindow );
|
||||
return xWindow;
|
||||
}
|
||||
return 0;
|
||||
return m_xWindowParam;
|
||||
}
|
||||
|
||||
rtl::OUString
|
||||
UUIInteractionHelper::getContextProperty()
|
||||
SAL_THROW(())
|
||||
{
|
||||
osl::MutexGuard aGuard(m_aPropertyMutex);
|
||||
for (sal_Int32 i = 0; i < m_aProperties.getLength(); ++i)
|
||||
{
|
||||
beans::PropertyValue aProperty;
|
||||
if ((m_aProperties[i] >>= aProperty) && aProperty.Name == "Context" )
|
||||
{
|
||||
rtl::OUString aContext;
|
||||
aProperty.Value >>= aContext;
|
||||
return aContext;
|
||||
}
|
||||
}
|
||||
return rtl::OUString();
|
||||
return m_aContextParam;
|
||||
}
|
||||
|
||||
uno::Reference< task::XInteractionHandler >
|
||||
UUIInteractionHelper::getInteractionHandler()
|
||||
SAL_THROW((uno::RuntimeException))
|
||||
{
|
||||
uno::Reference< task::XInteractionHandler > xIH;
|
||||
try
|
||||
{
|
||||
xIH.set(m_xServiceFactory->createInstanceWithArguments(
|
||||
rtl::OUString(
|
||||
RTL_CONSTASCII_USTRINGPARAM(
|
||||
"com.sun.star.task.InteractionHandler")),
|
||||
m_aProperties),
|
||||
uno::UNO_QUERY);
|
||||
}
|
||||
catch (uno::Exception const &)
|
||||
{}
|
||||
|
||||
if (!xIH.is())
|
||||
throw uno::RuntimeException(
|
||||
rtl::OUString(
|
||||
RTL_CONSTASCII_USTRINGPARAM(
|
||||
"unable to instanciate Interaction Handler service")),
|
||||
uno::Reference< uno::XInterface >());
|
||||
uno::Reference< task::XInteractionHandler > xIH(
|
||||
InteractionHandler::createWithParentAndContext(comphelper::getComponentContext(m_xServiceFactory),
|
||||
m_xWindowParam, m_aContextParam),
|
||||
UNO_QUERY_THROW);
|
||||
return xIH;
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,8 @@ class UUIInteractionHelper
|
||||
private:
|
||||
mutable osl::Mutex m_aPropertyMutex;
|
||||
::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory;
|
||||
::com::sun::star::uno::Sequence< com::sun::star::uno::Any > m_aProperties;
|
||||
::com::sun::star::uno::Reference< com::sun::star::awt::XWindow > m_xWindowParam;
|
||||
const OUString m_aContextParam;
|
||||
StringHashMap m_aTypedCustomHandlers;
|
||||
UUIInteractionHelper(UUIInteractionHelper &); // not implemented
|
||||
void operator =(UUIInteractionHelper); // not implemented
|
||||
@ -97,8 +98,9 @@ public:
|
||||
UUIInteractionHelper(
|
||||
com::sun::star::uno::Reference<
|
||||
com::sun::star::lang::XMultiServiceFactory > const & rServiceFactory,
|
||||
com::sun::star::uno::Sequence<
|
||||
com::sun::star::uno::Any > const & rArguments)
|
||||
com::sun::star::uno::Reference<
|
||||
com::sun::star::awt::XWindow > const & rxWindow,
|
||||
const OUString & rContextParam)
|
||||
SAL_THROW(());
|
||||
UUIInteractionHelper(
|
||||
com::sun::star::uno::Reference<
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include "iahndl.hxx"
|
||||
#include "interactionhandler.hxx"
|
||||
#include "comphelper/namedvaluecollection.hxx"
|
||||
#include "com/sun/star/awt/XWindow.hpp"
|
||||
|
||||
using namespace com::sun::star;
|
||||
|
||||
@ -67,7 +69,21 @@ UUIInteractionHandler::initialize(
|
||||
throw (uno::Exception)
|
||||
{
|
||||
delete m_pImpl;
|
||||
m_pImpl = new UUIInteractionHelper(m_xServiceFactory, rArguments);
|
||||
|
||||
uno::Reference< awt::XWindow > xWindow;
|
||||
rtl::OUString aContext;
|
||||
::comphelper::NamedValueCollection aProperties( rArguments );
|
||||
if ( aProperties.has( "Parent" ) )
|
||||
{
|
||||
OSL_VERIFY( aProperties.get( "Parent" ) >>= xWindow );
|
||||
}
|
||||
if ( aProperties.has( "Context" ) )
|
||||
{
|
||||
OSL_VERIFY( aProperties.get( "Context" ) >>= aContext );
|
||||
}
|
||||
|
||||
|
||||
m_pImpl = new UUIInteractionHelper(m_xServiceFactory, xWindow, aContext);
|
||||
}
|
||||
|
||||
void SAL_CALL
|
||||
|
@ -20,16 +20,14 @@
|
||||
#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/implbase3.hxx"
|
||||
#include "cppuhelper/implbase2.hxx"
|
||||
|
||||
class UUIInteractionHelper;
|
||||
|
||||
class UUIInteractionHandler:
|
||||
public cppu::WeakImplHelper3< com::sun::star::lang::XServiceInfo,
|
||||
com::sun::star::lang::XInitialization,
|
||||
public cppu::WeakImplHelper2< com::sun::star::lang::XServiceInfo,
|
||||
com::sun::star::task::XInteractionHandler2 >
|
||||
{
|
||||
public:
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <comphelper/docpasswordrequest.hxx>
|
||||
#include <xmlsecurity/biginteger.hxx>
|
||||
#include <rtl/logfile.h>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <vector>
|
||||
#include "boost/scoped_array.hpp"
|
||||
#include <osl/thread.h>
|
||||
@ -104,33 +104,27 @@ struct UsageDescription
|
||||
|
||||
char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*arg*/ )
|
||||
{
|
||||
uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
|
||||
if ( xMSF.is() )
|
||||
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
|
||||
uno::Reference < task::XInteractionHandler2 > xInteractionHandler(
|
||||
task::InteractionHandler::createDefault(xContext) );
|
||||
|
||||
task::PasswordRequestMode eMode = bRetry ? task::PasswordRequestMode_PASSWORD_REENTER : task::PasswordRequestMode_PASSWORD_ENTER;
|
||||
::comphelper::DocPasswordRequest* pPasswordRequest = new ::comphelper::DocPasswordRequest(
|
||||
::comphelper::DocPasswordRequestType_STANDARD, eMode, ::rtl::OUString::createFromAscii(PK11_GetTokenName(pSlot)) );
|
||||
|
||||
uno::Reference< task::XInteractionRequest > xRequest( pPasswordRequest );
|
||||
xInteractionHandler->handle( xRequest );
|
||||
|
||||
if ( pPasswordRequest->isPassword() )
|
||||
{
|
||||
uno::Reference < task::XInteractionHandler > xInteractionHandler(
|
||||
xMSF->createInstance( rtl::OUString("com.sun.star.task.InteractionHandler") ), uno::UNO_QUERY );
|
||||
|
||||
if ( xInteractionHandler.is() )
|
||||
{
|
||||
task::PasswordRequestMode eMode = bRetry ? task::PasswordRequestMode_PASSWORD_REENTER : task::PasswordRequestMode_PASSWORD_ENTER;
|
||||
::comphelper::DocPasswordRequest* pPasswordRequest = new ::comphelper::DocPasswordRequest(
|
||||
::comphelper::DocPasswordRequestType_STANDARD, eMode, ::rtl::OUString::createFromAscii(PK11_GetTokenName(pSlot)) );
|
||||
|
||||
uno::Reference< task::XInteractionRequest > xRequest( pPasswordRequest );
|
||||
xInteractionHandler->handle( xRequest );
|
||||
|
||||
if ( pPasswordRequest->isPassword() )
|
||||
{
|
||||
rtl::OString aPassword(rtl::OUStringToOString(
|
||||
pPasswordRequest->getPassword(),
|
||||
osl_getThreadTextEncoding()));
|
||||
sal_Int32 nLen = aPassword.getLength();
|
||||
char* pPassword = (char*) PORT_Alloc( nLen+1 ) ;
|
||||
pPassword[nLen] = 0;
|
||||
memcpy( pPassword, aPassword.getStr(), nLen );
|
||||
return pPassword;
|
||||
}
|
||||
}
|
||||
rtl::OString aPassword(rtl::OUStringToOString(
|
||||
pPasswordRequest->getPassword(),
|
||||
osl_getThreadTextEncoding()));
|
||||
sal_Int32 nLen = aPassword.getLength();
|
||||
char* pPassword = (char*) PORT_Alloc( nLen+1 ) ;
|
||||
pPassword[nLen] = 0;
|
||||
memcpy( pPassword, aPassword.getStr(), nLen );
|
||||
return pPassword;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user