summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-03-11 18:13:51 +0200
committerNoel Grandin <noel@peralex.com>2013-03-25 10:35:04 +0200
commit905501b635db939874b3c8787b7c0677afcbd9ab (patch)
tree10d58d80b6c673dda1af4ea94c6883f894a3f4b6
parent8172eaf8dcd2da6827f0a0445e98b947d0eac9be (diff)
fdo#46808, convert sdb::CommandDefinition to new-style
the service already existed, it just needed an IDL file Change-Id: I99c08b4e3a3ee0131b6fd904803efe7273cd1694
-rw-r--r--dbaccess/source/core/dataaccess/commandcontainer.cxx5
-rw-r--r--dbaccess/source/core/dataaccess/commanddefinition.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlQuery.cxx2
-rw-r--r--dbaccess/source/inc/stringconstants.hrc1
-rw-r--r--dbaccess/source/inc/stringconstants.inc1
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/sdb/CommandDefinition.idl38
7 files changed, 44 insertions, 6 deletions
diff --git a/dbaccess/source/core/dataaccess/commandcontainer.cxx b/dbaccess/source/core/dataaccess/commandcontainer.cxx
index f665df20e53d..5052af60e759 100644
--- a/dbaccess/source/core/dataaccess/commandcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/commandcontainer.cxx
@@ -24,6 +24,7 @@
#include <tools/debug.hxx>
#include "dbastrings.hrc"
#include <com/sun/star/sdb/TableDefinition.hpp>
+#include <com/sun/star/sdb/CommandDefinition.hpp>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -80,9 +81,9 @@ Reference< XInterface > SAL_CALL OCommandContainer::createInstanceWithArguments(
Reference< XInterface > SAL_CALL OCommandContainer::createInstance( ) throw (Exception, RuntimeException)
{
if(m_bTables)
- return com::sun::star::sdb::TableDefinition::createDefault( m_aContext );
+ return css::sdb::TableDefinition::createDefault( m_aContext );
else
- return m_aContext->getServiceManager()->createInstanceWithContext(SERVICE_SDB_COMMAND_DEFINITION, m_aContext);
+ return css::sdb::CommandDefinition::create( m_aContext );
}
OUString OCommandContainer::determineContentType() const
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.cxx b/dbaccess/source/core/dataaccess/commanddefinition.cxx
index 560b97738495..8278bffe9fda 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.cxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.cxx
@@ -115,7 +115,7 @@ Sequence< OUString > OCommandDefinition::getSupportedServiceNames_static( ) thr
{
Sequence< OUString > aServices(3);
aServices.getArray()[0] = SERVICE_SDB_QUERYDEFINITION;
- aServices.getArray()[1] = SERVICE_SDB_COMMAND_DEFINITION;
+ aServices.getArray()[1] = "com.sun.star.sdb.CommandDefinition";
aServices.getArray()[2] = "com.sun.star.ucb.Content";
return aServices;
}
diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx
index dc2a403e435b..cddb57a11aac 100644
--- a/dbaccess/source/filter/xml/xmlQuery.cxx
+++ b/dbaccess/source/filter/xml/xmlQuery.cxx
@@ -44,7 +44,7 @@ OXMLQuery::OXMLQuery( ODBFilter& rImport
,const Reference< XAttributeList > & _xAttrList
,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xParentContainer
) :
- OXMLTable( rImport, nPrfx, _sLocalName,_xAttrList,_xParentContainer,SERVICE_SDB_COMMAND_DEFINITION )
+ OXMLTable( rImport, nPrfx, _sLocalName,_xAttrList,_xParentContainer, "com.sun.star.sdb.CommandDefinition" )
,m_bEscapeProcessing(sal_True)
{
DBG_CTOR(OXMLQuery,NULL);
diff --git a/dbaccess/source/inc/stringconstants.hrc b/dbaccess/source/inc/stringconstants.hrc
index 0da2d6e56632..8c60d05f2978 100644
--- a/dbaccess/source/inc/stringconstants.hrc
+++ b/dbaccess/source/inc/stringconstants.hrc
@@ -373,7 +373,6 @@ DECLARE_CONSTASCII_USTRING(SERVICE_SDB_QUERIES);
DECLARE_CONSTASCII_USTRING(SERVICE_SDBC_DRIVERMANAGER);
DECLARE_CONSTASCII_USTRING(SERVICE_FRAME_DESKTOP);
DECLARE_CONSTASCII_USTRING(SERVICE_UI_FOLDERPICKER);
-DECLARE_CONSTASCII_USTRING(SERVICE_SDB_COMMAND_DEFINITION);
DECLARE_CONSTASCII_USTRING(SERVICE_NAME_FORM);
DECLARE_CONSTASCII_USTRING(SERVICE_NAME_FORM_COLLECTION);
DECLARE_CONSTASCII_USTRING(SERVICE_NAME_REPORT);
diff --git a/dbaccess/source/inc/stringconstants.inc b/dbaccess/source/inc/stringconstants.inc
index 066cc205778b..3ce49a0d27e2 100644
--- a/dbaccess/source/inc/stringconstants.inc
+++ b/dbaccess/source/inc/stringconstants.inc
@@ -208,7 +208,6 @@ IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDBCX_TABLES, "com.sun.star.sdbcx.Tables");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDB_QUERIES, "com.sun.star.sdb.Queries");
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_SDB_COMMAND_DEFINITION, "com.sun.star.sdb.CommandDefinition");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDB_DOCUMENTDEFINITION, "com.sun.star.sdb.DocumentDefinition");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_NAME_FORM, "com.sun.star.sdb.Form");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_NAME_FORM_COLLECTION, "com.sun.star.sdb.Forms");
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index a6f899757e33..2c18bf8c84c7 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -284,6 +284,7 @@ $(eval $(call gb_ZipUnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/script/
VBAMacroResolver \
))
$(eval $(call gb_ZipUnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/sdb,\
+ CommandDefinition \
DataAccessDescriptorFactory \
DatabaseContext \
DatabaseInteractionHandler \
diff --git a/offapi/com/sun/star/sdb/CommandDefinition.idl b/offapi/com/sun/star/sdb/CommandDefinition.idl
new file mode 100644
index 000000000000..0a27a049d98a
--- /dev/null
+++ b/offapi/com/sun/star/sdb/CommandDefinition.idl
@@ -0,0 +1,38 @@
+/* -*- 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_CommandDefinition_idl__
+#define __com_sun_star_sdb_CommandDefinition_idl__
+
+#include <com/sun/star/sdbcx/XRename.idl>
+
+ module com { module sun { module star { module sdb {
+
+/**
+ @since LibreOffice 4.1
+ */
+service CommandDefinition : com::sun::star::sdbcx::XRename;
+
+
+}; }; }; };
+
+/*===========================================================================
+===========================================================================*/
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */