diff options
Diffstat (limited to 'dbaccess/source/ui/dlg')
-rw-r--r-- | dbaccess/source/ui/dlg/CollectionView.cxx | 26 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionHelper.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwizsetup.cxx | 12 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/odbcconfig.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/odbcconfig.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/tablespage.cxx | 5 |
8 files changed, 29 insertions, 35 deletions
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index 5dd965614e77..7123db850014 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -23,12 +23,12 @@ #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> #include <svtools/QueryFolderName.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/beans/PropertyValue.hpp> @@ -38,7 +38,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 +169,15 @@ 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<XInteractionHandler2> xHandler( + InteractionHandler::createWithParent(comphelper::getComponentContext(m_xORB), VCLUnoHelper::GetInterface( this ))); + OInteractionRequest* pRequest = new OInteractionRequest(makeAny(aException)); + Reference< XInteractionRequest > xRequest(pRequest); - OInteractionApprove* pApprove = new OInteractionApprove; - pRequest->addContinuation(pApprove); + OInteractionApprove* pApprove = new OInteractionApprove; + pRequest->addContinuation(pApprove); + xHandler->handle(xRequest); - Reference< XInteractionHandler > xHandler(xIni,UNO_QUERY); - xHandler->handle(xRequest); - } return 0; } } diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 26b32f24a33a..ac7e55f21a55 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -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::createWithParent(comphelper::getComponentContext(m_xORB), 0), UNO_QUERY ); OFilePickerInteractionHandler* pHandler = new OFilePickerInteractionHandler(xInteractionHandler); xInteractionHandler = pHandler; diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 2150c6b283a3..9082417c97ca 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -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::createWithParent(comphelper::getComponentContext(m_xORB), 0), UNO_QUERY ); } String sName = pName ? pName->GetValue() : String(); diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 9f05b4e298d9..1f34d54c47df 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -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::createWithParent(comphelper::getComponentContext(getORB()), 0) ); try { if (callSaveAsDialog() == sal_True) @@ -964,7 +965,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() private: Reference< XComponentLoader > m_xFrameLoader; Reference< XDesktop > m_xDesktop; - Reference< XInteractionHandler > m_xInteractionHandler; + Reference< XInteractionHandler2 > m_xInteractionHandler; ::rtl::OUString m_sURL; OAsyncronousLink m_aAsyncCaller; @@ -992,11 +993,8 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() { m_xDesktop.set( _rxORB->createInstance( SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW ); m_xFrameLoader.set( m_xDesktop, UNO_QUERY_THROW ); - m_xInteractionHandler.set( - _rxORB->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" ) ) - ), - UNO_QUERY_THROW ); + m_xInteractionHandler = + InteractionHandler::createWithParent(comphelper::getComponentContext(_rxORB), 0); } catch( const Exception& ) { diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx index 5adbbf36b4af..c6047a15639d 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.cxx +++ b/dbaccess/source/ui/dlg/odbcconfig.cxx @@ -133,6 +133,8 @@ sal_Bool OOdbcLibWrapper::load(const sal_Char* _pLibPath) // load the module m_pOdbcLib = osl_loadModule(m_sLibPath.pData, SAL_LOADMODULE_NOW); return (NULL != m_pOdbcLib); +#else + return sal_False; #endif } @@ -289,6 +291,8 @@ void OOdbcEnumeration::getDatasourceNames(StringBag& _rNames) _rNames.insert(aCurrentDsn); } } +#else + (void) _rNames; #endif } diff --git a/dbaccess/source/ui/dlg/odbcconfig.hxx b/dbaccess/source/ui/dlg/odbcconfig.hxx index d24b57afd6ab..7ecadd29c9e9 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.hxx +++ b/dbaccess/source/ui/dlg/odbcconfig.hxx @@ -22,7 +22,7 @@ #include "commontypes.hxx" -#if defined(WNT) || defined (UNX) +#if defined(WNT) || (defined (UNX) && !defined(ANDROID) && !defined(IOS)) #define HAVE_ODBC_SUPPORT #endif diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index af4f3e332b94..323d819ef61d 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -25,7 +25,7 @@ #include <com/sun/star/sdb/SQLContext.hpp> #include <vcl/fixed.hxx> #include <osl/diagnose.h> -#include <svtools/svtreebx.hxx> +#include <svtools/treelistbox.hxx> #include <svtools/svmedit.hxx> #include <connectivity/dbexception.hxx> #include <connectivity/sqlerror.hxx> diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 19eba7de6f98..3259a87d3f28 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -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); @@ -335,7 +336,7 @@ DBG_NAME(OTableSubscriptionPage) if (aErrorInfo.isValid()) { // establishing the connection failed. Show an error window and exit. - OSQLMessageBox aMessageBox( GetParent()->GetParent(), aErrorInfo ); + OSQLMessageBox aMessageBox( GetParentDialog(), aErrorInfo ); aMessageBox.Execute(); m_aTables.Enable(sal_False); m_aTablesList.Enable(sal_False); |