summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-10-13 17:41:05 +0200
committerAndras Timar <atimar@suse.com>2012-10-13 17:41:05 +0200
commite5ce011c3f32f53ef073aec5485450b2588b656a (patch)
tree8a838a53bcdd70cc3d4cdbca0ebe07504790952e /dbaccess
parentc6b26144c93aa5222e4260c5b0ef45ce5bdc18d2 (diff)
parente74fc93e4aba7887e6a278cc44c4bc0962471065 (diff)
Merge branch 'master' into feature/killsdf
Conflicts: Makefile.top Module_tail_build.mk RepositoryExternal.mk RepositoryFixes.mk accessibility/source/standard/vclxaccessibletoolbox.cxx basic/source/uno/dlgcont.cxx connectivity/Library_ado.mk cross_tail_build/prj/build.lst desktop/source/offacc/acceptor.cxx filter/Library_PptImporter.mk filter/source/t602/filterenv.cxx i18npool/Library_textconv_dict.mk ooo.lst.in saxon/ExternalProject_saxon.mk saxon/build.xml sc/sdi/scalc.sdi sc/source/filter/xml/xmlstyli.cxx sc/source/ui/condformat/condformatdlg.cxx sc/source/ui/condformat/condformatmgr.cxx sc/source/ui/view/cellsh1.cxx sdext/source/pdfimport/misc/pwdinteract.cxx shell/qa/zip/makefile.mk shell/qa/zip/testimpl/makefile.mk solenv/gbuild/CppunitTest.mk solenv/gbuild/gbuild.mk solenv/gbuild/platform/android.mk solenv/gbuild/platform/com_GCC_defs.mk solenv/gbuild/platform/macosx.mk soltools/Executable_adjustvisibility.mk soltools/Executable_checkdll.mk soltools/Executable_cpp.mk soltools/Executable_javadep.mk soltools/Executable_makedepend.mk sw/qa/extras/rtfimport/rtfimport.cxx tail_build/prj/build.lst tomcat/ExternalProject_tomcat.mk ucb/source/ucp/webdav/webdavcontent.cxx xml2cmp/Executable_xml2cmp.mk
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/Library_sdbt.mk3
-rw-r--r--dbaccess/source/core/api/RowSet.cxx6
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx2
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx4
-rw-r--r--dbaccess/source/core/api/TableDeco.cxx3
-rw-r--r--dbaccess/source/core/api/querycomposer.cxx4
-rw-r--r--dbaccess/source/core/api/querydescriptor.cxx3
-rw-r--r--dbaccess/source/core/api/table.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/ContentHelper.cxx3
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx5
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx12
-rw-r--r--dbaccess/source/core/recovery/storagexmlstream.cxx5
-rw-r--r--dbaccess/source/ext/macromigration/docinteraction.cxx3
-rw-r--r--dbaccess/source/filter/xml/dbloader2.cxx6
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx23
-rw-r--r--dbaccess/source/inc/stringconstants.hrc1
-rw-r--r--dbaccess/source/inc/stringconstants.inc1
-rw-r--r--dbaccess/source/ui/app/AppController.cxx2
-rw-r--r--dbaccess/source/ui/app/AppControllerDnD.cxx2
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.hxx2
-rw-r--r--dbaccess/source/ui/app/AppDetailView.hxx2
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx7
-rw-r--r--dbaccess/source/ui/browser/dbtreemodel.hxx2
-rw-r--r--dbaccess/source/ui/browser/dbtreeview.cxx2
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx3
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx11
-rw-r--r--dbaccess/source/ui/control/listviewitems.cxx6
-rw-r--r--dbaccess/source/ui/dlg/CollectionView.cxx26
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx7
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx6
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx12
-rw-r--r--dbaccess/source/ui/dlg/odbcconfig.cxx4
-rw-r--r--dbaccess/source/ui/dlg/odbcconfig.hxx2
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx2
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx5
-rw-r--r--dbaccess/source/ui/inc/TableWindowListBox.hxx2
-rw-r--r--dbaccess/source/ui/inc/UITools.hxx8
-rw-r--r--dbaccess/source/ui/inc/dbtreelistbox.hxx2
-rw-r--r--dbaccess/source/ui/inc/indexdialog.hxx2
-rw-r--r--dbaccess/source/ui/inc/listviewitems.hxx4
-rw-r--r--dbaccess/source/ui/inc/marktree.hxx1
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx18
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx3
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx4
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx2
-rw-r--r--dbaccess/source/ui/misc/datasourceconnector.cxx12
-rw-r--r--dbaccess/source/ui/querydesign/JoinExchange.cxx2
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx28
-rw-r--r--dbaccess/source/ui/uno/dbinteraction.cxx7
-rw-r--r--dbaccess/source/ui/uno/dbinteraction.hxx3
51 files changed, 138 insertions, 153 deletions
diff --git a/dbaccess/Library_sdbt.mk b/dbaccess/Library_sdbt.mk
index cc80dca441d5..5e4faa314cee 100644
--- a/dbaccess/Library_sdbt.mk
+++ b/dbaccess/Library_sdbt.mk
@@ -27,8 +27,9 @@
$(eval $(call gb_Library_Library,sdbt))
-$(eval $(call gb_Library_use_package,sdbt,\
+$(eval $(call gb_Library_use_packages,sdbt,\
dbaccess_inc \
+ svl_inc \
))
$(eval $(call gb_Library_set_include,sdbt,\
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 136992e1750d..1042d84531bc 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
+#include <string.h>
#include "RowSet.hxx"
#include "dbastrings.hrc"
#include "sdbcoretools.hxx"
@@ -455,7 +455,7 @@ void SAL_CALL ORowSet::release() throw()
// com::sun::star::XUnoTunnel
sal_Int64 SAL_CALL ORowSet::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
- if (rId.getLength() == 16 && 0 == rtl_compareMemory(getImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
+ if (rId.getLength() == 16 && 0 == memcmp(getImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return reinterpret_cast<sal_Int64>(this);
return 0;
@@ -2909,7 +2909,7 @@ Sequence< sal_Int8 > ORowSetClone::getUnoTunnelImplementationId()
// com::sun::star::XUnoTunnel
sal_Int64 SAL_CALL ORowSetClone::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
- if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
+ if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return reinterpret_cast<sal_Int64>(this);
return 0;
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index c1787138ddbf..0a18b04af516 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -479,7 +479,7 @@ Reference< XResultSetMetaData > ORowSetCache::getMetaData( )
return m_xMetaData;
}
-Any lcl_getBookmark(ORowSetValue& i_aValue,OCacheSet* i_pCacheSet)
+static Any lcl_getBookmark(ORowSetValue& i_aValue,OCacheSet* i_pCacheSet)
{
switch ( i_aValue.getTypeKind() )
{
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index a3d35e281162..faef30832cc1 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
+#include <string.h>
#include "composertools.hxx"
#include "core_resource.hrc"
#include "core_resource.hxx"
@@ -318,7 +318,7 @@ IMPLEMENT_PROPERTYCONTAINER_DEFAULTS(OSingleSelectQueryComposer)
sal_Int64 SAL_CALL OSingleSelectQueryComposer::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getSomething" );
- if (rId.getLength() == 16 && 0 == rtl_compareMemory(getImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
+ if (rId.getLength() == 16 && 0 == memcmp(getImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return reinterpret_cast<sal_Int64>(this);
return sal_Int64(0);
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index c7a9a12a2621..30eee81a9976 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <string.h>
#include "TableDeco.hxx"
#include <definitioncolumn.hxx>
@@ -496,7 +497,7 @@ Reference< XNameAccess> ODBTableDecorator::getColumns() throw (RuntimeException)
sal_Int64 SAL_CALL ODBTableDecorator::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getSomething" );
- if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
+ if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return reinterpret_cast<sal_Int64>(this);
sal_Int64 nRet = 0;
diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx
index 1c72c7800e84..d84e771560dd 100644
--- a/dbaccess/source/core/api/querycomposer.cxx
+++ b/dbaccess/source/core/api/querycomposer.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
+#include <string.h>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/util/XNumberFormatter.hpp>
#include <com/sun/star/sdbc/ColumnSearch.hpp>
@@ -115,7 +115,7 @@ Sequence< sal_Int8 > SAL_CALL OQueryComposer::getImplementationId() throw (Runti
sal_Int64 SAL_CALL OQueryComposer::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getSomething" );
- if (rId.getLength() == 16 && 0 == rtl_compareMemory(getImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
+ if (rId.getLength() == 16 && 0 == memcmp(getImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return reinterpret_cast<sal_Int64>(this);
return 0;
diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx
index a1bef51c0a7b..8b6db104e3c3 100644
--- a/dbaccess/source/core/api/querydescriptor.cxx
+++ b/dbaccess/source/core/api/querydescriptor.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <string.h>
#include "querydescriptor.hxx"
#include "apitools.hxx"
@@ -154,7 +155,7 @@ sal_Int64 SAL_CALL OQueryDescriptor_Base::getSomething( const Sequence< sal_Int8
if (_rIdentifier.getLength() != 16)
return 0;
- if (0 == rtl_compareMemory(getImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) )
+ if (0 == memcmp(getImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) )
return reinterpret_cast<sal_Int64>(this);
return 0;
diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx
index 818a388a45c1..2bb0e7d53a7a 100644
--- a/dbaccess/source/core/api/table.cxx
+++ b/dbaccess/source/core/api/table.cxx
@@ -18,6 +18,8 @@
*/
+#include <string.h>
+
#include "table.hxx"
#include <definitioncolumn.hxx>
#include "dbastrings.hrc"
@@ -343,7 +345,7 @@ sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId ) thr
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getSomething" );
sal_Int64 nRet(0);
- if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
+ if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
nRet = reinterpret_cast<sal_Int64>(this);
else
nRet = OTable_Base::getSomething(rId);
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index 5cbf8c6524a3..08cdd7e9c7ec 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <string.h>
#include "ContentHelper.hxx"
#include <ucbhelper/cancelcommandexecution.hxx>
#include <comphelper/property.hxx>
@@ -590,7 +591,7 @@ void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent
// com::sun::star::lang::XUnoTunnel
sal_Int64 OContentHelper::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException)
{
- if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
+ if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return reinterpret_cast<sal_Int64>(this);
return 0;
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 4d8f3babc9a8..798262f941a6 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/task/InteractionClassification.hpp>
#include <com/sun/star/ucb/InteractiveIOException.hpp>
#include <com/sun/star/ucb/IOErrorCode.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <basic/basmgr.hxx>
@@ -362,7 +363,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const ::rtl::OUStrin
::comphelper::NamedValueCollection aArgs;
aArgs.put( "URL", _sURL );
aArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
- aArgs.put( "InteractionHandler", m_aContext.createComponent( "com.sun.star.task.InteractionHandler" ) );
+ aArgs.put( "InteractionHandler", task::InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
Sequence< PropertyValue > aResource( aArgs.getPropertyValues() );
xLoad->load( aResource );
@@ -720,7 +721,7 @@ void ODatabaseContext::databaseDocumentURLChange( const ::rtl::OUString& _rOldUR
sal_Int64 SAL_CALL ODatabaseContext::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
- if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
+ if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return reinterpret_cast<sal_Int64>(this);
return 0;
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 4593269de978..5abe8f8bb8d9 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -68,7 +68,7 @@
#include "intercept.hxx"
#include <com/sun/star/sdb/ErrorCondition.hpp>
#include <com/sun/star/sdb/XInteractionDocumentSave.hpp>
-#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/sdb/DocumentSaveRequest.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
@@ -1301,9 +1301,8 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
pRequest->addContinuation(pAbort);
// create the handler, let it handle the request
- Reference< XInteractionHandler > xHandler( m_aContext.createComponent( (::rtl::OUString)SERVICE_TASK_INTERACTION_HANDLER ), UNO_QUERY );
- if ( xHandler.is() )
- xHandler->handle(xRequest);
+ Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
+ 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< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
+ xHandler->handle(xRequest);
if ( pAbort->wasSelected() )
return sal_False;
diff --git a/dbaccess/source/core/recovery/storagexmlstream.cxx b/dbaccess/source/core/recovery/storagexmlstream.cxx
index ad5dec9df070..14b76e7eedb1 100644
--- a/dbaccess/source/core/recovery/storagexmlstream.cxx
+++ b/dbaccess/source/core/recovery/storagexmlstream.cxx
@@ -22,7 +22,7 @@
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
-#include <com/sun/star/xml/sax/XParser.hpp>
+#include <com/sun/star/xml/sax/Parser.hpp>
#include <comphelper/componentcontext.hxx>
#include <cppuhelper/implbase1.hxx>
@@ -55,6 +55,7 @@ namespace dbaccess
using ::com::sun::star::io::XStream;
using ::com::sun::star::io::XOutputStream;
using ::com::sun::star::io::XActiveDataSource;
+ using ::com::sun::star::xml::sax::Parser;
using ::com::sun::star::xml::sax::XParser;
using ::com::sun::star::xml::sax::InputSource;
/** === end UNO using === **/
@@ -163,7 +164,7 @@ namespace dbaccess
:StorageInputStream( i_rContext, i_rParentStorage, i_rStreamName )
,m_pData( new StorageXMLInputStream_Data )
{
- m_pData->xParser.set( i_rContext.createComponent( "com.sun.star.xml.sax.Parser" ), UNO_QUERY_THROW );
+ m_pData->xParser.set( Parser::create(i_rContext.getUNOContext()) );
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/dbaccess/source/ext/macromigration/docinteraction.cxx b/dbaccess/source/ext/macromigration/docinteraction.cxx
index d0554ed0c3cd..9e21ef418541 100644
--- a/dbaccess/source/ext/macromigration/docinteraction.cxx
+++ b/dbaccess/source/ext/macromigration/docinteraction.cxx
@@ -21,6 +21,7 @@
#include "docinteraction.hxx"
#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/task/DocumentPasswordRequest.hpp>
#include <comphelper/componentcontext.hxx>
@@ -65,7 +66,7 @@ namespace dbmm
}
InteractionHandler_Data( const ::comphelper::ComponentContext& _rContext )
- :xHandler( _rContext.createComponent( "com.sun.star.task.InteractionHandler" ), UNO_QUERY_THROW )
+ :xHandler( ::com::sun::star::task::InteractionHandler::createWithParent(_rContext.getUNOContext(), 0), UNO_QUERY )
{
}
};
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index 8b2d3939b767..07fe9f25229c 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -43,6 +43,7 @@
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
#include <com/sun/star/task/XJobExecutor.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#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< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
+ aMediaDesc.put( "InteractionHandler", xHandler );
}
// it's allowed to pass an existing document
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index f25f7818d184..990e5ae4edaf 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -33,7 +33,7 @@
#include <xmloff/nmspmap.hxx>
#include <rtl/logfile.hxx>
#include <com/sun/star/xml/sax/InputSource.hpp>
-#include <com/sun/star/xml/sax/XParser.hpp>
+#include <com/sun/star/xml/sax/Parser.hpp>
#include <xmloff/ProgressBarHelper.hxx>
#include <sfx2/docfile.hxx>
#include <com/sun/star/io/XInputStream.hpp>
@@ -55,6 +55,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/diagnose_ex.h>
#include <osl/diagnose.h>
+#include <comphelper/processfactory.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/mimeconfighelper.hxx>
#include <comphelper/documentconstants.hxx>
@@ -213,12 +214,12 @@ namespace dbaxml
sal_Int32 ReadThroughComponent(
const uno::Reference<XInputStream>& xInputStream,
const uno::Reference<XComponent>& xModelComponent,
- const uno::Reference<XMultiServiceFactory> & rFactory,
+ const uno::Reference<XComponentContext> & rxContext,
const uno::Reference< XDocumentHandler >& _xFilter )
{
OSL_ENSURE(xInputStream.is(), "input stream missing");
OSL_ENSURE(xModelComponent.is(), "document missing");
- OSL_ENSURE(rFactory.is(), "factory missing");
+ OSL_ENSURE(rxContext.is(), "factory missing");
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "dbaxml", "oj", "ReadThroughComponent" );
@@ -227,13 +228,7 @@ sal_Int32 ReadThroughComponent(
aParserInput.aInputStream = xInputStream;
// get parser
- uno::Reference< XParser > xParser(
- rFactory->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser"))),
- UNO_QUERY );
- OSL_ENSURE( xParser.is(), "Can't create parser" );
- if( !xParser.is() )
- return 1;
+ uno::Reference< XParser > xParser = Parser::create(rxContext);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "parser created" );
// get filter
@@ -294,7 +289,7 @@ sal_Int32 ReadThroughComponent(
const uno::Reference<XComponent>& xModelComponent,
const sal_Char* pStreamName,
const sal_Char* pCompatibilityStreamName,
- const uno::Reference<XMultiServiceFactory> & rFactory,
+ const uno::Reference<XComponentContext> & rxContext,
const uno::Reference< XDocumentHandler >& _xFilter)
{
OSL_ENSURE( xStorage.is(), "Need storage!");
@@ -350,7 +345,7 @@ sal_Int32 ReadThroughComponent(
// read from the stream
return ReadThroughComponent( xInputStream
,xModelComponent
- ,rFactory
+ ,rxContext
,_xFilter );
}
@@ -462,7 +457,7 @@ sal_Bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
,xModel
,"settings.xml"
,"Settings.xml"
- ,getServiceFactory()
+ ,comphelper::getComponentContext(getServiceFactory())
,this
);
@@ -471,7 +466,7 @@ sal_Bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
,xModel
,"content.xml"
,"Content.xml"
- ,getServiceFactory()
+ ,comphelper::getComponentContext(getServiceFactory())
,this
);
diff --git a/dbaccess/source/inc/stringconstants.hrc b/dbaccess/source/inc/stringconstants.hrc
index d24bdffa7710..d8a9ceb6ff8d 100644
--- a/dbaccess/source/inc/stringconstants.hrc
+++ b/dbaccess/source/inc/stringconstants.hrc
@@ -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);
diff --git a/dbaccess/source/inc/stringconstants.inc b/dbaccess/source/inc/stringconstants.inc
index 515ab6748b7c..133a06038360 100644
--- a/dbaccess/source/inc/stringconstants.inc
+++ b/dbaccess/source/inc/stringconstants.inc
@@ -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");
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index aaa71c380db0..72520aa7e42f 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -66,7 +66,7 @@
#include <svl/urihelper.hxx>
#include <svl/filenotation.hxx>
-#include <svtools/svtreebx.hxx>
+#include <svtools/treelistbox.hxx>
#include <svtools/transfer.hxx>
#include <svtools/cliplistener.hxx>
#include <svtools/svlbitm.hxx>
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 0225c000af04..6ed5db02d53f 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -69,7 +69,7 @@
#include "dbexchange.hxx"
#include "UITools.hxx"
#include <algorithm>
-#include <svtools/svtreebx.hxx>
+#include <svtools/treelistbox.hxx>
#include <com/sun/star/sdb/XReportDocumentsSupplier.hpp>
#include <com/sun/star/sdb/XFormDocumentsSupplier.hpp>
#include <unotools/pathoptions.hxx>
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index 00a2725bb8d1..8b34d8c4a6ff 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -26,7 +26,7 @@
#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
#include <com/sun/star/ucb/XContent.hpp>
#include "AppElementType.hxx"
-#include <svtools/svtreebx.hxx>
+#include <svtools/treelistbox.hxx>
#include <svtools/DocumentInfoPreview.hxx>
#include <vcl/fixed.hxx>
#include <vcl/toolbox.hxx>
diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx
index 497c050281b0..220b31f10f2a 100644
--- a/dbaccess/source/ui/app/AppDetailView.hxx
+++ b/dbaccess/source/ui/app/AppDetailView.hxx
@@ -30,7 +30,7 @@
#include "IClipBoardTest.hxx"
#include "AppTitleWindow.hxx"
#include "AppElementType.hxx"
-#include <svtools/svtreebx.hxx>
+#include <svtools/treelistbox.hxx>
#include "VertSplitView.hxx"
#include <vector>
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index c918fa04a3b8..460b09354860 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -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< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(comphelper::getComponentContext(getORB()), 0) );
+ xHandler->handle(xParamRequest);
if (!pParamValues->wasSelected())
{ // canceled
diff --git a/dbaccess/source/ui/browser/dbtreemodel.hxx b/dbaccess/source/ui/browser/dbtreemodel.hxx
index 5da08ba7f0eb..b939ac31e8ef 100644
--- a/dbaccess/source/ui/browser/dbtreemodel.hxx
+++ b/dbaccess/source/ui/browser/dbtreemodel.hxx
@@ -21,8 +21,6 @@
#define DBAUI_DBTREEMODEL_HXX
#include <com/sun/star/container/XNameAccess.hpp>
-#include <svtools/svlbox.hxx>
-#include <svtools/svlbitm.hxx>
#include "unodatbr.hxx"
#include "commontypes.hxx"
diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx
index b557766fe3d3..6f26f6c063f3 100644
--- a/dbaccess/source/ui/browser/dbtreeview.cxx
+++ b/dbaccess/source/ui/browser/dbtreeview.cxx
@@ -19,7 +19,7 @@
#include "dbtreeview.hxx"
-#include <svtools/svtreebx.hxx>
+#include <svtools/treelistbox.hxx>
#include "dbtreelistbox.hxx"
#include "dbtreemodel.hxx"
#include "dbaccess_helpid.hrc"
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index a77df938f369..3a8ac73c81bb 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -69,7 +69,6 @@
#include <connectivity/dbtools.hxx>
#include <connectivity/dbconversion.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <rtl/memory.h>
#include <comphelper/extract.hxx>
#include <comphelper/servicehelper.hxx>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
@@ -588,7 +587,7 @@ Sequence< Type > SAL_CALL SbaXGridPeer::getTypes() throw (RuntimeException)
//------------------------------------------------------------------
sal_Int64 SAL_CALL SbaXGridPeer::getSomething( const Sequence< sal_Int8 > & rId ) throw(::com::sun::star::uno::RuntimeException)
{
- if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) )
+ if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) )
return reinterpret_cast< sal_Int64 >( this );
return FmXGridPeer::getSomething(rId);
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 2b47defe48ad..5e0b0075e98f 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -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>
@@ -104,7 +106,7 @@
#include <svl/intitem.hxx>
#include <unotools/moduleoptions.hxx>
#include <svtools/svlbitm.hxx>
-#include <svtools/svtreebx.hxx>
+#include <svtools/treelistbox.hxx>
#include <svx/algitem.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <svx/databaseregistrationui.hxx>
@@ -3528,11 +3530,8 @@ 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::createWithParent(comphelper::getComponentContext(getORB()), 0) );
::comphelper::NamedValueCollection aLoadArgs;
aLoadArgs.put( "Model", xDocumentModel );
diff --git a/dbaccess/source/ui/control/listviewitems.cxx b/dbaccess/source/ui/control/listviewitems.cxx
index 0e884a82f0a1..aaf208db812c 100644
--- a/dbaccess/source/ui/control/listviewitems.cxx
+++ b/dbaccess/source/ui/control/listviewitems.cxx
@@ -28,7 +28,7 @@ namespace dbaui
// class OBoldListboxString
//========================================================================
//------------------------------------------------------------------------
- void OBoldListboxString::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* _pViewData)
+ void OBoldListboxString::InitViewData( SvTreeListBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* _pViewData)
{
SvLBoxString::InitViewData( pView, pEntry, _pViewData );
if ( !m_bEmphasized )
@@ -38,7 +38,7 @@ namespace dbaui
pView->Push(PUSH_ALL);
Font aFont( pView->GetFont());
aFont.SetWeight(WEIGHT_BOLD);
- pView->SetFont( aFont );
+ pView->Control::SetFont( aFont );
_pViewData->aSize = Size(pView->GetTextWidth(GetText()), pView->GetTextHeight());
pView->Pop();
}
@@ -50,7 +50,7 @@ namespace dbaui
}
//------------------------------------------------------------------------
- void OBoldListboxString::Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry )
+ void OBoldListboxString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry )
{
if (m_bEmphasized)
{
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);
diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx b/dbaccess/source/ui/inc/TableWindowListBox.hxx
index 1bec9757ed0d..890f69887e6e 100644
--- a/dbaccess/source/ui/inc/TableWindowListBox.hxx
+++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx
@@ -19,7 +19,7 @@
#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#define DBAUI_TABLEWINDOWLISTBOX_HXX
-#include <svtools/svtreebx.hxx>
+#include <svtools/treelistbox.hxx>
#include "callbacks.hxx"
struct AcceptDropEvent;
diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx
index 574b3ad231e7..df0c4b18b675 100644
--- a/dbaccess/source/ui/inc/UITools.hxx
+++ b/dbaccess/source/ui/inc/UITools.hxx
@@ -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 );
diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx
index 7ef0cd1a328c..f5948baee4cd 100644
--- a/dbaccess/source/ui/inc/dbtreelistbox.hxx
+++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx
@@ -24,7 +24,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <svtools/svtreebx.hxx>
+#include <svtools/treelistbox.hxx>
#include <vcl/timer.hxx>
#include <set>
diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx
index 1a0ab7e7709a..61ae42971402 100644
--- a/dbaccess/source/ui/inc/indexdialog.hxx
+++ b/dbaccess/source/ui/inc/indexdialog.hxx
@@ -29,7 +29,7 @@
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <vcl/toolbox.hxx>
-#include <svtools/svtreebx.hxx>
+#include <svtools/treelistbox.hxx>
#include <unotools/viewoptions.hxx>
#include "indexes.hxx"
#include "ToolBoxHelper.hxx"
diff --git a/dbaccess/source/ui/inc/listviewitems.hxx b/dbaccess/source/ui/inc/listviewitems.hxx
index 6fb05f0a1a20..99aca2095a40 100644
--- a/dbaccess/source/ui/inc/listviewitems.hxx
+++ b/dbaccess/source/ui/inc/listviewitems.hxx
@@ -45,8 +45,8 @@ namespace dbaui
virtual sal_uInt16 IsA();
- virtual void Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
- virtual void InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* _pViewData);
+ virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
+ virtual void InitViewData( SvTreeListBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* _pViewData);
sal_Bool isEmphasized() const { return m_bEmphasized; }
void emphasize(sal_Bool _bEmphasize) { m_bEmphasized = _bEmphasize; }
diff --git a/dbaccess/source/ui/inc/marktree.hxx b/dbaccess/source/ui/inc/marktree.hxx
index 12db88750880..adda68952197 100644
--- a/dbaccess/source/ui/inc/marktree.hxx
+++ b/dbaccess/source/ui/inc/marktree.hxx
@@ -22,6 +22,7 @@
#include "dbtreelistbox.hxx"
+#include "svtools/svlbitm.hxx"
//.........................................................................
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 16615e4c478b..90522f2e8f80 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -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)
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 0ac020f5e792..d43e4cdd7752 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -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::createWithParent(_rxContext, 0), UNO_QUERY);
+ _rOUTConnection = xConnectionCompletion->connectWithCompletion(xHandler);
}
}
else
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 025e7d14cef1..bf3c9d35e7d4 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -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::createWithParent(comphelper::getComponentContext(m_xFactory), 0), UNO_QUERY );
OCopyTable* pPage1( new OCopyTable( this ) );
pPage1->disallowViews();
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 569a7a7caed0..b68b329a3162 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -335,10 +335,10 @@ public:
{
}
- virtual void Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
+ virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
};
//------------------------------------------------------------------------
-void OColumnString::Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 /*nFlags*/, SvLBoxEntry* /*pEntry*/ )
+void OColumnString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 /*nFlags*/, SvLBoxEntry* /*pEntry*/ )
{
if(m_bReadOnly)
{
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 4b3078b2cb3e..0a40d8e22c0c 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -112,7 +112,7 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
{
case FIELD_PRPOERTY_COLUMNNAME:
{
- OCopyTableWizard* pWiz = static_cast<OCopyTableWizard*>(GetParent()->GetParent());
+ OCopyTableWizard* pWiz = static_cast<OCopyTableWizard*>(GetParentDialog());
// first we have to check if this name already exists
sal_Bool bDoubleName = sal_False;
sal_Bool bCase = sal_True;
diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx
index 38a84b5451d9..b4b4187038d6 100644
--- a/dbaccess/source/ui/misc/datasourceconnector.cxx
+++ b/dbaccess/source/ui/misc/datasourceconnector.cxx
@@ -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::createWithParent(comphelper::getComponentContext(m_xORB), 0), UNO_QUERY );
}
- if ( xHandler.is() )
- {
- xConnection = xConnectionCompletion->connectWithCompletion(xHandler);
- }
+ xConnection = xConnectionCompletion->connectWithCompletion(xHandler);
}
else
{
diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx
index 82100a1e053a..9614c49c94db 100644
--- a/dbaccess/source/ui/querydesign/JoinExchange.cxx
+++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx
@@ -112,7 +112,7 @@ namespace dbaui
//------------------------------------------------------------------------
sal_Int64 SAL_CALL OJoinExchObj::getSomething( const Sequence< sal_Int8 >& _rIdentifier ) throw(RuntimeException)
{
- if (_rIdentifier.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) )
+ if (_rIdentifier.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) )
return reinterpret_cast<sal_Int64>(this);
return 0;
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 820569a903af..252564d610d8 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -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;
@@ -135,7 +136,6 @@ namespace dbaui
namespace DataType = ::com::sun::star::sdbc::DataType;
typedef ::utl::SharedUNOComponent< XConnection > SharedConnection;
- typedef Reference< XInteractionHandler > InteractionHandler;
//=========================================================================
//= CopyTableWizard
@@ -238,7 +238,7 @@ namespace dbaui
const Sequence< Any >& _rAllArgs,
const sal_Int16 _nArgPos,
SharedConnection& _out_rxConnection,
- InteractionHandler& _out_rxDocInteractionHandler
+ Reference< XInteractionHandler >& _out_rxDocInteractionHandler
) const;
/** extracts the source object (table or query) described by the given descriptor,
@@ -292,7 +292,7 @@ namespace dbaui
SharedConnection
impl_extractConnection_throw(
const Reference< XPropertySet >& _rxDataSourceDescriptor,
- InteractionHandler& _out_rxDocInteractionHandler
+ Reference< XInteractionHandler >& _out_rxDocInteractionHandler
) const;
/** actually copies the table
@@ -357,7 +357,7 @@ private:
SharedConnection m_xDestConnection;
// other
- InteractionHandler m_xInteractionHandler;
+ Reference< XInteractionHandler > m_xInteractionHandler;
::cppu::OInterfaceContainerHelper
m_aCopyTableListeners;
sal_Int16 m_nOverrideExecutionResult;
@@ -634,9 +634,9 @@ namespace
if it occures during invoking any of the data source's methods, or if any of the involved
components violates its contract by not providing the required interfaces
*/
- InteractionHandler lcl_getInteractionHandler_throw( const Reference< XDataSource >& _rxDataSource, const InteractionHandler& _rFallback )
+ Reference< XInteractionHandler > lcl_getInteractionHandler_throw( const Reference< XDataSource >& _rxDataSource, const Reference< XInteractionHandler >& _rFallback )
{
- InteractionHandler xHandler( _rFallback );
+ Reference< XInteractionHandler > xHandler( _rFallback );
// try to obtain the document model
Reference< XModel > xDocumentModel;
@@ -663,7 +663,7 @@ namespace
if it occures during invoking any of the data source's methods, or if any of the involved
components violates its contract by not providing the required interfaces
*/
- InteractionHandler lcl_getInteractionHandler_throw( const Reference< XConnection >& _rxConnection, const InteractionHandler& _rFallback )
+ Reference< XInteractionHandler > lcl_getInteractionHandler_throw( const Reference< XConnection >& _rxConnection, const Reference< XInteractionHandler >& _rFallback )
{
// try whether there is a data source which the connection belongs to
Reference< XDataSource > xDataSource;
@@ -681,7 +681,7 @@ namespace
//-------------------------------------------------------------------------
Reference< XPropertySet > CopyTableWizard::impl_ensureDataAccessDescriptor_throw(
const Sequence< Any >& _rAllArgs, const sal_Int16 _nArgPos, SharedConnection& _out_rxConnection,
- InteractionHandler& _out_rxDocInteractionHandler ) const
+ Reference< XInteractionHandler >& _out_rxDocInteractionHandler ) const
{
Reference< XPropertySet > xDescriptor;
_rAllArgs[ _nArgPos ] >>= xDescriptor;
@@ -878,7 +878,7 @@ void CopyTableWizard::impl_extractSourceResultSet_throw( const Reference< XPrope
//-------------------------------------------------------------------------
SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference< XPropertySet >& _rxDataSourceDescriptor,
- InteractionHandler& _out_rxDocInteractionHandler ) const
+ Reference< XInteractionHandler >& _out_rxDocInteractionHandler ) const
{
SharedConnection xConnection;
@@ -886,7 +886,7 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference<
if ( !_rxDataSourceDescriptor.is() )
return xConnection;
- InteractionHandler xInteractionHandler;
+ Reference< XInteractionHandler > xInteractionHandler;
do
{
@@ -1553,15 +1553,15 @@ 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::createWithParent(m_aContext.getUNOContext(), 0), UNO_QUERY );
- InteractionHandler xSourceDocHandler;
+ Reference< XInteractionHandler > xSourceDocHandler;
Reference< XPropertySet > xSourceDescriptor( impl_ensureDataAccessDescriptor_throw( _rArguments, 0, m_xSourceConnection, xSourceDocHandler ) );
impl_checkForUnsupportedSettings_throw( xSourceDescriptor );
m_pSourceObject = impl_extractSourceObject_throw( xSourceDescriptor, m_nCommandType );
impl_extractSourceResultSet_throw( xSourceDescriptor );
- InteractionHandler xDestDocHandler;
+ Reference< XInteractionHandler > xDestDocHandler;
impl_ensureDataAccessDescriptor_throw( _rArguments, 1, m_xDestConnection, xDestDocHandler );
if ( xDestDocHandler.is() && !m_xInteractionHandler.is() )
diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx
index 0b31334810f7..8cb12b91397a 100644
--- a/dbaccess/source/ui/uno/dbinteraction.cxx
+++ b/dbaccess/source/ui/uno/dbinteraction.cxx
@@ -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>
//==========================================================================
@@ -302,11 +304,10 @@ namespace dbaui
//-------------------------------------------------------------------------
bool BasicInteractionHandler::implHandleUnknown( const Reference< XInteractionRequest >& _rxRequest )
{
- Reference< XInteractionHandler > xFallbackHandler;
if ( m_xORB.is() )
- xFallbackHandler = xFallbackHandler.query( m_xORB->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" ) ) ) );
- if ( xFallbackHandler.is() )
{
+ Reference< XInteractionHandler2 > xFallbackHandler(
+ InteractionHandler::createWithParent(comphelper::getComponentContext(m_xORB), 0) );
xFallbackHandler->handle( _rxRequest );
return true;
}
diff --git a/dbaccess/source/ui/uno/dbinteraction.hxx b/dbaccess/source/ui/uno/dbinteraction.hxx
index 216c566d1101..f5e7496de485 100644
--- a/dbaccess/source/ui/uno/dbinteraction.hxx
+++ b/dbaccess/source/ui/uno/dbinteraction.hxx
@@ -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);