summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-03-12 13:37:25 +0200
committerNoel Grandin <noel@peralex.com>2013-04-08 13:53:01 +0200
commit002aab309055b7feeeeeb25c1835b6abe6646729 (patch)
treed0256d93cd7c27c85b7d5f4d7c0ec9c555dc307e
parent18af827875cd587552767dea747f3dafa47bd963 (diff)
fdo#46808, convert sdb::tools::ConnectionTools to new style
service already existed, just needed an IDL file Change-Id: I9000cff76056efecf7ac748bcfc6dd5b8e902e65
-rw-r--r--dbaccess/source/core/dataaccess/connection.cxx5
-rw-r--r--offapi/UnoApi_offapi.mk3
-rw-r--r--offapi/com/sun/star/sdb/tools/ConnectionTools.idl36
3 files changed, 41 insertions, 3 deletions
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index 5fa53ae58541..e243e5ad83e4 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -32,6 +32,7 @@
#include "sdbcoretools.hxx"
#include <com/sun/star/sdb/CommandType.hpp>
+#include <com/sun/star/sdb/tools/ConnectionTools.hpp>
#include <com/sun/star/sdbc/XDriverAccess.hpp>
#include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp>
#include <com/sun/star/reflection/ProxyFactory.hpp>
@@ -756,9 +757,7 @@ void OConnection::impl_loadConnectionTools_throw()
Sequence< Any > aArguments( 1 );
aArguments[0] <<= NamedValue( "Connection" , makeAny( Reference< XConnection >( this ) ) );
- m_xConnectionTools.set(
- m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.sdb.tools.ConnectionTools", aArguments, m_aContext),
- UNO_QUERY_THROW );
+ m_xConnectionTools = css::sdb::tools::ConnectionTools::create( m_aContext );
}
Reference< XTableName > SAL_CALL OConnection::createTableName( ) throw (RuntimeException)
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index bf8a7307d91d..d04c8ffc6c08 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -303,6 +303,9 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/sdb/applic
CopyTableWizard \
MacroMigrationWizard \
))
+$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/sdb/tools,\
+ ConnectionTools \
+))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/sdbc,\
ConnectionPool \
DriverManager \
diff --git a/offapi/com/sun/star/sdb/tools/ConnectionTools.idl b/offapi/com/sun/star/sdb/tools/ConnectionTools.idl
new file mode 100644
index 000000000000..741a469649c6
--- /dev/null
+++ b/offapi/com/sun/star/sdb/tools/ConnectionTools.idl
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_sdb_tools_ConnectionTools_idl__
+#define __com_sun_star_sdb_tools_ConnectionTools_idl__
+
+#include <com/sun/star/sdb/tools/XConnectionTools.idl>
+
+module com { module sun { module star { module sdb { module tools {
+
+/**
+ @since LibreOffice 4.1
+*/
+service ConnectionTools : XConnectionTools;
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */