summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/component
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-07-19 15:25:04 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-07-19 19:51:47 +0200
commit196ee66d4aab62678a8cfb762379909bdda16051 (patch)
treeff603c22fe107c4344eeb7346486a79a6887550d /connectivity/source/drivers/component
parent4073bc15d1aa1b46b2e0953d6316f2ab6a23dc87 (diff)
connectivity: merge OCalcPreparedStatement and OWriterPreparedStatement
Into a single OComponentPreparedStatement, as both of them just provide prepared statement functionality based on a file loaded into an LO component, so they can share code. Change-Id: Ib1074871d63de83f16861081050e57442ebf0ffa Reviewed-on: https://gerrit.libreoffice.org/40182 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers/component')
-rw-r--r--connectivity/source/drivers/component/CPreparedStatement.cxx34
1 files changed, 34 insertions, 0 deletions
diff --git a/connectivity/source/drivers/component/CPreparedStatement.cxx b/connectivity/source/drivers/component/CPreparedStatement.cxx
new file mode 100644
index 000000000000..a2b1161fb7cb
--- /dev/null
+++ b/connectivity/source/drivers/component/CPreparedStatement.cxx
@@ -0,0 +1,34 @@
+/* -*- 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 .
+ */
+
+#include "component/CPreparedStatement.hxx"
+#include "component/CResultSet.hxx"
+
+using namespace connectivity::component;
+using namespace connectivity::file;
+using namespace com::sun::star::uno;
+
+OResultSet* OComponentPreparedStatement::createResultSet()
+{
+ return new connectivity::component::OComponentResultSet(this,m_aSQLIterator);
+}
+
+IMPLEMENT_SERVICE_INFO(OComponentPreparedStatement,"com.sun.star.sdbc.driver.component.PreparedStatement","com.sun.star.sdbc.PreparedStatement");
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */