summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-07-17 14:17:32 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-07-18 09:03:39 +0200
commit60020f61339e5836f5a481909c1183af2734f569 (patch)
tree8540c817685462fa10dc6e07583f814f38581fcf
parent6fb3e3a9c1dd1aec8a1ba90fea51e32048e609bf (diff)
connectivity writer driver: add Tables implementation
But leave OWriterTables::createObject() as a stub for now. Change-Id: I8a05d698e565cefded1286decdfbdfece8c2237b
-rw-r--r--connectivity/Library_writer.mk1
-rw-r--r--connectivity/source/drivers/writer/WCatalog.cxx3
-rw-r--r--connectivity/source/drivers/writer/WTables.cxx48
-rw-r--r--connectivity/source/inc/writer/WTables.hxx45
4 files changed, 96 insertions, 1 deletions
diff --git a/connectivity/Library_writer.mk b/connectivity/Library_writer.mk
index 06f505a66cb9..a55d5f50a695 100644
--- a/connectivity/Library_writer.mk
+++ b/connectivity/Library_writer.mk
@@ -41,6 +41,7 @@ $(eval $(call gb_Library_add_exception_objects,writer,\
connectivity/source/drivers/writer/WConnection \
connectivity/source/drivers/writer/WDatabaseMetaData \
connectivity/source/drivers/writer/WDriver \
+ connectivity/source/drivers/writer/WTables \
connectivity/source/drivers/writer/Wservices \
))
diff --git a/connectivity/source/drivers/writer/WCatalog.cxx b/connectivity/source/drivers/writer/WCatalog.cxx
index c038d3d3ed77..0cf4a1626e40 100644
--- a/connectivity/source/drivers/writer/WCatalog.cxx
+++ b/connectivity/source/drivers/writer/WCatalog.cxx
@@ -18,6 +18,7 @@
*/
#include "writer/WCatalog.hxx"
+#include "writer/WTables.hxx"
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
@@ -53,7 +54,7 @@ void OWriterCatalog::refreshTables()
if (m_pTables)
m_pTables->reFill(aVector);
else
- SAL_WARN("connectivity.writer", "TODO implement OWriterCatalog::refreshTables()");
+ m_pTables = new OWriterTables(m_xMetaData, *this, m_aMutex, aVector);
}
} // namespace writer
diff --git a/connectivity/source/drivers/writer/WTables.cxx b/connectivity/source/drivers/writer/WTables.cxx
new file mode 100644
index 000000000000..5f450cd802e6
--- /dev/null
+++ b/connectivity/source/drivers/writer/WTables.cxx
@@ -0,0 +1,48 @@
+/* -*- 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 "writer/WTables.hxx"
+
+#include <sal/config.h>
+
+#include <comphelper/types.hxx>
+
+#include <writer/WConnection.hxx>
+#include "file/FCatalog.hxx"
+#include "file/FConnection.hxx"
+#include "writer/WCatalog.hxx"
+
+using namespace ::com::sun::star;
+
+namespace connectivity
+{
+namespace writer
+{
+
+sdbcx::ObjectType OWriterTables::createObject(const OUString& /*rName*/)
+{
+ sdbcx::ObjectType xRet;
+ SAL_WARN("connectivity.writer", "TODO implement OWriterTables::createObject()");
+ return xRet;
+}
+
+} // namespace writer
+} // namespace connectivity
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/inc/writer/WTables.hxx b/connectivity/source/inc/writer/WTables.hxx
new file mode 100644
index 000000000000..0f9b61e0de3e
--- /dev/null
+++ b/connectivity/source/inc/writer/WTables.hxx
@@ -0,0 +1,45 @@
+/* -*- 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 INCLUDED_CONNECTIVITY_SOURCE_INC_WRITER_WTABLES_HXX
+#define INCLUDED_CONNECTIVITY_SOURCE_INC_WRITER_WTABLES_HXX
+
+#include "file/FTables.hxx"
+
+namespace connectivity
+{
+namespace writer
+{
+typedef file::OTables OWriterTables_BASE;
+
+class OWriterTables : public OWriterTables_BASE
+{
+protected:
+ virtual sdbcx::ObjectType createObject(const OUString& _rName) override;
+public:
+ OWriterTables(const css::uno::Reference<css::sdbc::XDatabaseMetaData>& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
+ const TStringVector& _rVector) : OWriterTables_BASE(_rMetaData,_rParent,_rMutex,_rVector)
+ {}
+};
+}
+}
+
+#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_WRITER_WTABLES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */