[Libreoffice-commits] core.git: connectivity/Library_calc.mk connectivity/Library_file.mk connectivity/Library_writer.mk connectivity/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Jul 19 17:50:10 UTC 2017


 connectivity/Library_calc.mk                              |    1 
 connectivity/Library_file.mk                              |    1 
 connectivity/Library_writer.mk                            |    1 
 connectivity/source/drivers/calc/CPreparedStatement.cxx   |    4 
 connectivity/source/drivers/calc/CStatement.cxx           |    4 
 connectivity/source/drivers/component/CResultSet.cxx      |   56 ++--
 connectivity/source/drivers/writer/WPreparedStatement.cxx |    4 
 connectivity/source/drivers/writer/WResultSet.cxx         |  165 --------------
 connectivity/source/drivers/writer/WStatement.cxx         |    4 
 connectivity/source/inc/component/CResultSet.hxx          |   25 +-
 connectivity/source/inc/writer/WResultSet.hxx             |   86 -------
 11 files changed, 50 insertions(+), 301 deletions(-)

New commits:
commit e473d49acc127ece76eb31cb3610e3950f35d9d9
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jul 19 14:16:05 2017 +0200

    connectivity: merge OCalcResultSet and OWriterResultSet
    
    Into a single OComponentResultSet, as both of them just provide data
    source functionality based on a file loaded into an LO component, so
    they can share code.
    
    Change-Id: I19352e592a45d7a58d834e72645dec72d77ce7c9
    Reviewed-on: https://gerrit.libreoffice.org/40180
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/connectivity/Library_calc.mk b/connectivity/Library_calc.mk
index 440306b563ca..441f0305de9e 100644
--- a/connectivity/Library_calc.mk
+++ b/connectivity/Library_calc.mk
@@ -39,7 +39,6 @@ $(eval $(call gb_Library_use_libraries,calc,\
 ))
 
 $(eval $(call gb_Library_add_exception_objects,calc,\
-	connectivity/source/drivers/calc/CResultSet \
 	connectivity/source/drivers/calc/CStatement \
 	connectivity/source/drivers/calc/CPreparedStatement \
 	connectivity/source/drivers/calc/CDatabaseMetaData \
diff --git a/connectivity/Library_file.mk b/connectivity/Library_file.mk
index daacb41838bb..57f9ff733166 100644
--- a/connectivity/Library_file.mk
+++ b/connectivity/Library_file.mk
@@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_libraries,file,\
 ))
 
 $(eval $(call gb_Library_add_exception_objects,file,\
+	connectivity/source/drivers/component/CResultSet \
 	connectivity/source/drivers/file/FCatalog \
 	connectivity/source/drivers/file/FColumns \
 	connectivity/source/drivers/file/FConnection \
diff --git a/connectivity/Library_writer.mk b/connectivity/Library_writer.mk
index 95d6f28bf8d1..dd74110c824a 100644
--- a/connectivity/Library_writer.mk
+++ b/connectivity/Library_writer.mk
@@ -43,7 +43,6 @@ $(eval $(call gb_Library_add_exception_objects,writer,\
 	connectivity/source/drivers/writer/WDatabaseMetaData \
 	connectivity/source/drivers/writer/WDriver \
 	connectivity/source/drivers/writer/WPreparedStatement \
-	connectivity/source/drivers/writer/WResultSet \
 	connectivity/source/drivers/writer/WStatement \
 	connectivity/source/drivers/writer/WTable \
 	connectivity/source/drivers/writer/WTables \
diff --git a/connectivity/source/drivers/calc/CPreparedStatement.cxx b/connectivity/source/drivers/calc/CPreparedStatement.cxx
index 96eb9a2672a8..387366ecdd73 100644
--- a/connectivity/source/drivers/calc/CPreparedStatement.cxx
+++ b/connectivity/source/drivers/calc/CPreparedStatement.cxx
@@ -18,7 +18,7 @@
  */
 
 #include "calc/CPreparedStatement.hxx"
-#include "calc/CResultSet.hxx"
+#include "component/CResultSet.hxx"
 
 using namespace connectivity::calc;
 using namespace connectivity::file;
@@ -26,7 +26,7 @@ using namespace com::sun::star::uno;
 
 OResultSet* OCalcPreparedStatement::createResultSet()
 {
-    return new OCalcResultSet(this,m_aSQLIterator);
+    return new connectivity::component::OComponentResultSet(this,m_aSQLIterator);
 }
 
 IMPLEMENT_SERVICE_INFO(OCalcPreparedStatement,"com.sun.star.sdbc.driver.calc.PreparedStatement","com.sun.star.sdbc.PreparedStatement");
diff --git a/connectivity/source/drivers/calc/CStatement.cxx b/connectivity/source/drivers/calc/CStatement.cxx
index 15d4e45a04b8..f826642f566d 100644
--- a/connectivity/source/drivers/calc/CStatement.cxx
+++ b/connectivity/source/drivers/calc/CStatement.cxx
@@ -18,7 +18,7 @@
  */
 
 #include "calc/CStatement.hxx"
-#include "calc/CResultSet.hxx"
+#include "component/CResultSet.hxx"
 
 using namespace connectivity::calc;
 using namespace connectivity::file;
@@ -26,7 +26,7 @@ using namespace com::sun::star::uno;
 
 OResultSet* OCalcStatement::createResultSet()
 {
-    return new OCalcResultSet(this,m_aSQLIterator);
+    return new connectivity::component::OComponentResultSet(this,m_aSQLIterator);
 }
 
 IMPLEMENT_SERVICE_INFO(OCalcStatement,"com.sun.star.sdbc.driver.calc.Statement","com.sun.star.sdbc.Statement");
diff --git a/connectivity/source/drivers/calc/CResultSet.cxx b/connectivity/source/drivers/component/CResultSet.cxx
similarity index 65%
rename from connectivity/source/drivers/calc/CResultSet.cxx
rename to connectivity/source/drivers/component/CResultSet.cxx
index b13f14a037f0..be5cfb6b904d 100644
--- a/connectivity/source/drivers/calc/CResultSet.cxx
+++ b/connectivity/source/drivers/component/CResultSet.cxx
@@ -18,7 +18,7 @@
  */
 
 #include <com/sun/star/sdbcx/CompareBookmark.hpp>
-#include "calc/CResultSet.hxx"
+#include "component/CResultSet.hxx"
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <comphelper/sequence.hxx>
 #include <comphelper/types.hxx>
@@ -26,7 +26,7 @@
 #include <connectivity/dbexception.hxx>
 
 using namespace ::comphelper;
-using namespace connectivity::calc;
+using namespace connectivity::component;
 using namespace connectivity::file;
 using namespace ::cppu;
 using namespace com::sun::star::uno;
@@ -36,19 +36,19 @@ using namespace com::sun::star::sdbc;
 using namespace com::sun::star::sdbcx;
 
 
-OCalcResultSet::OCalcResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator)
+OComponentResultSet::OComponentResultSet( OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator& _aSQLIterator)
                 : file::OResultSet(pStmt,_aSQLIterator)
                 ,m_bBookmarkable(true)
 {
     registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISBOOKMARKABLE),         PROPERTY_ID_ISBOOKMARKABLE,       PropertyAttribute::READONLY,&m_bBookmarkable,                cppu::UnoType<bool>::get());
 }
 
-OUString SAL_CALL OCalcResultSet::getImplementationName(  )
+OUString SAL_CALL OComponentResultSet::getImplementationName(  )
 {
-    return OUString("com.sun.star.sdbcx.calc.ResultSet");
+    return OUString("com.sun.star.sdbcx.component.ResultSet");
 }
 
-Sequence< OUString > SAL_CALL OCalcResultSet::getSupportedServiceNames(  )
+Sequence< OUString > SAL_CALL OComponentResultSet::getSupportedServiceNames(  )
 {
      Sequence< OUString > aSupported(2);
     aSupported[0] = "com.sun.star.sdbc.ResultSet";
@@ -56,25 +56,25 @@ Sequence< OUString > SAL_CALL OCalcResultSet::getSupportedServiceNames(  )
     return aSupported;
 }
 
-sal_Bool SAL_CALL OCalcResultSet::supportsService( const OUString& _rServiceName )
+sal_Bool SAL_CALL OComponentResultSet::supportsService( const OUString& _rServiceName )
 {
     return cppu::supportsService(this, _rServiceName);
 }
 
-Any SAL_CALL OCalcResultSet::queryInterface( const Type & rType )
+Any SAL_CALL OComponentResultSet::queryInterface( const Type & rType )
 {
     Any aRet = OResultSet::queryInterface(rType);
-    return aRet.hasValue() ? aRet : OCalcResultSet_BASE::queryInterface(rType);
+    return aRet.hasValue() ? aRet : OComponentResultSet_BASE::queryInterface(rType);
 }
 
- Sequence<  Type > SAL_CALL OCalcResultSet::getTypes(  )
+ Sequence<  Type > SAL_CALL OComponentResultSet::getTypes(  )
 {
-    return ::comphelper::concatSequences(OResultSet::getTypes(),OCalcResultSet_BASE::getTypes());
+    return ::comphelper::concatSequences(OResultSet::getTypes(),OComponentResultSet_BASE::getTypes());
 }
 
 
 // XRowLocate
-Any SAL_CALL OCalcResultSet::getBookmark(  )
+Any SAL_CALL OComponentResultSet::getBookmark(  )
 {
      ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
@@ -83,7 +83,7 @@ Any SAL_CALL OCalcResultSet::getBookmark(  )
     return makeAny((sal_Int32)(m_aRow->get())[0]->getValue());
 }
 
-sal_Bool SAL_CALL OCalcResultSet::moveToBookmark( const  Any& bookmark )
+sal_Bool SAL_CALL OComponentResultSet::moveToBookmark( const  Any& bookmark )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
@@ -94,7 +94,7 @@ sal_Bool SAL_CALL OCalcResultSet::moveToBookmark( const  Any& bookmark )
     return Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),true);
 }
 
-sal_Bool SAL_CALL OCalcResultSet::moveRelativeToBookmark( const  Any& bookmark, sal_Int32 rows )
+sal_Bool SAL_CALL OComponentResultSet::moveRelativeToBookmark( const  Any& bookmark, sal_Int32 rows )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
@@ -108,17 +108,17 @@ sal_Bool SAL_CALL OCalcResultSet::moveRelativeToBookmark( const  Any& bookmark,
 }
 
 
-sal_Int32 SAL_CALL OCalcResultSet::compareBookmarks( const Any& lhs, const  Any& rhs )
+sal_Int32 SAL_CALL OComponentResultSet::compareBookmarks( const Any& lhs, const  Any& rhs )
 {
     return (lhs == rhs) ? CompareBookmark::EQUAL : CompareBookmark::NOT_EQUAL;
 }
 
-sal_Bool SAL_CALL OCalcResultSet::hasOrderedBookmarks(  )
+sal_Bool SAL_CALL OComponentResultSet::hasOrderedBookmarks(  )
 {
     return true;
 }
 
-sal_Int32 SAL_CALL OCalcResultSet::hashBookmark( const  Any& bookmark )
+sal_Int32 SAL_CALL OComponentResultSet::hashBookmark( const  Any& bookmark )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
@@ -128,7 +128,7 @@ sal_Int32 SAL_CALL OCalcResultSet::hashBookmark( const  Any& bookmark )
 }
 
 // XDeleteRows
-Sequence< sal_Int32 > SAL_CALL OCalcResultSet::deleteRows( const  Sequence<  Any >& /*rows*/ )
+Sequence< sal_Int32 > SAL_CALL OComponentResultSet::deleteRows( const  Sequence<  Any >& /*rows*/ )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
@@ -137,18 +137,18 @@ Sequence< sal_Int32 > SAL_CALL OCalcResultSet::deleteRows( const  Sequence<  Any
     return Sequence< sal_Int32 >();
 }
 
-bool OCalcResultSet::fillIndexValues(const Reference< XColumnsSupplier> &/*_xIndex*/)
+bool OComponentResultSet::fillIndexValues(const Reference< XColumnsSupplier> &/*_xIndex*/)
 {
-    //  Calc table has no index
+    //  Writer or Calc table has no index
     return false;
 }
 
-::cppu::IPropertyArrayHelper & OCalcResultSet::getInfoHelper()
+::cppu::IPropertyArrayHelper & OComponentResultSet::getInfoHelper()
 {
-    return *OCalcResultSet_BASE3::getArrayHelper();
+    return *OComponentResultSet_BASE3::getArrayHelper();
 }
 
-::cppu::IPropertyArrayHelper* OCalcResultSet::createArrayHelper() const
+::cppu::IPropertyArrayHelper* OComponentResultSet::createArrayHelper() const
 {
     Sequence< Property > aProps;
     describeProperties(aProps);
@@ -156,17 +156,17 @@ bool OCalcResultSet::fillIndexValues(const Reference< XColumnsSupplier> &/*_xInd
 }
 
 
-void SAL_CALL OCalcResultSet::acquire() throw()
+void SAL_CALL OComponentResultSet::acquire() throw()
 {
-    OCalcResultSet_BASE2::acquire();
+    OComponentResultSet_BASE2::acquire();
 }
 
-void SAL_CALL OCalcResultSet::release() throw()
+void SAL_CALL OComponentResultSet::release() throw()
 {
-    OCalcResultSet_BASE2::release();
+    OComponentResultSet_BASE2::release();
 }
 
-css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OCalcResultSet::getPropertySetInfo(  )
+css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OComponentResultSet::getPropertySetInfo(  )
 {
     return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
 }
diff --git a/connectivity/source/drivers/writer/WPreparedStatement.cxx b/connectivity/source/drivers/writer/WPreparedStatement.cxx
index 9328d15be765..c23a272d8241 100644
--- a/connectivity/source/drivers/writer/WPreparedStatement.cxx
+++ b/connectivity/source/drivers/writer/WPreparedStatement.cxx
@@ -19,7 +19,7 @@
 
 #include "writer/WPreparedStatement.hxx"
 
-#include "writer/WResultSet.hxx"
+#include "component/CResultSet.hxx"
 
 using namespace com::sun::star;
 
@@ -30,7 +30,7 @@ namespace writer
 
 file::OResultSet* OWriterPreparedStatement::createResultSet()
 {
-    return new OWriterResultSet(this, m_aSQLIterator);
+    return new component::OComponentResultSet(this, m_aSQLIterator);
 }
 
 IMPLEMENT_SERVICE_INFO(OWriterPreparedStatement,"com.sun.star.sdbc.driver.writer.PreparedStatement", "com.sun.star.sdbc.PreparedStatement");
diff --git a/connectivity/source/drivers/writer/WResultSet.cxx b/connectivity/source/drivers/writer/WResultSet.cxx
deleted file mode 100644
index 93919657aad5..000000000000
--- a/connectivity/source/drivers/writer/WResultSet.cxx
+++ /dev/null
@@ -1,165 +0,0 @@
-/* -*- 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/WResultSet.hxx"
-
-#include <com/sun/star/sdbcx/CompareBookmark.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <comphelper/sequence.hxx>
-#include <comphelper/types.hxx>
-#include <cppuhelper/supportsservice.hxx>
-#include <connectivity/dbexception.hxx>
-
-using namespace com::sun::star;
-
-namespace connectivity
-{
-namespace writer
-{
-
-OWriterResultSet::OWriterResultSet(file::OStatement_Base* pStmt, connectivity::OSQLParseTreeIterator& _aSQLIterator)
-    : file::OResultSet(pStmt,_aSQLIterator)
-    ,m_bBookmarkable(true)
-{
-    registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISBOOKMARKABLE), PROPERTY_ID_ISBOOKMARKABLE, beans::PropertyAttribute::READONLY,&m_bBookmarkable, cppu::UnoType<bool>::get());
-}
-
-OUString SAL_CALL OWriterResultSet::getImplementationName()
-{
-    return OUString("com.sun.star.sdbcx.writer.ResultSet");
-}
-
-uno::Sequence<OUString> SAL_CALL OWriterResultSet::getSupportedServiceNames()
-{
-    uno::Sequence<OUString> aSupported(2);
-    aSupported[0] = "com.sun.star.sdbc.ResultSet";
-    aSupported[1] = "com.sun.star.sdbcx.ResultSet";
-    return aSupported;
-}
-
-sal_Bool SAL_CALL OWriterResultSet::supportsService(const OUString& _rServiceName)
-{
-    return cppu::supportsService(this, _rServiceName);
-}
-
-uno::Any SAL_CALL OWriterResultSet::queryInterface(const uno::Type& rType)
-{
-    uno::Any aRet = OResultSet::queryInterface(rType);
-    return aRet.hasValue() ? aRet : OWriterResultSet_BASE::queryInterface(rType);
-}
-
-uno::Sequence<uno::Type> SAL_CALL OWriterResultSet::getTypes()
-{
-    return ::comphelper::concatSequences(OResultSet::getTypes(), OWriterResultSet_BASE::getTypes());
-}
-
-uno::Any SAL_CALL OWriterResultSet::getBookmark()
-{
-    ::osl::MutexGuard aGuard(m_aMutex);
-    checkDisposed(file::OResultSet_BASE::rBHelper.bDisposed);
-
-    return uno::makeAny((sal_Int32)(m_aRow->get())[0]->getValue());
-}
-
-sal_Bool SAL_CALL OWriterResultSet::moveToBookmark(const uno::Any& bookmark)
-{
-    ::osl::MutexGuard aGuard(m_aMutex);
-    checkDisposed(file::OResultSet_BASE::rBHelper.bDisposed);
-
-    m_bRowDeleted = m_bRowInserted = m_bRowUpdated = false;
-
-    return Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),true);
-}
-
-sal_Bool SAL_CALL OWriterResultSet::moveRelativeToBookmark(const uno::Any& bookmark, sal_Int32 rows)
-{
-    ::osl::MutexGuard aGuard(m_aMutex);
-    checkDisposed(file::OResultSet_BASE::rBHelper.bDisposed);
-
-    m_bRowDeleted = m_bRowInserted = m_bRowUpdated = false;
-
-    Move(IResultSetHelper::BOOKMARK,comphelper::getINT32(bookmark),false);
-
-    return relative(rows);
-}
-
-sal_Int32 SAL_CALL OWriterResultSet::compareBookmarks(const uno::Any& lhs, const uno::Any& rhs)
-{
-    return (lhs == rhs) ? css::sdbcx::CompareBookmark::EQUAL : css::sdbcx::CompareBookmark::NOT_EQUAL;
-}
-
-sal_Bool SAL_CALL OWriterResultSet::hasOrderedBookmarks()
-{
-    return true;
-}
-
-sal_Int32 SAL_CALL OWriterResultSet::hashBookmark(const uno::Any& bookmark)
-{
-    ::osl::MutexGuard aGuard(m_aMutex);
-    checkDisposed(file::OResultSet_BASE::rBHelper.bDisposed);
-
-    return comphelper::getINT32(bookmark);
-}
-
-uno::Sequence<sal_Int32> SAL_CALL OWriterResultSet::deleteRows(const uno::Sequence<uno::Any>& /*rows*/)
-{
-    ::osl::MutexGuard aGuard(m_aMutex);
-    checkDisposed(file::OResultSet_BASE::rBHelper.bDisposed);
-
-    ::dbtools::throwFeatureNotImplementedSQLException("XDeleteRows::deleteRows", *this);
-    return uno::Sequence<sal_Int32>();
-}
-
-bool OWriterResultSet::fillIndexValues(const uno::Reference<css::sdbcx::XColumnsSupplier>& /*_xIndex*/)
-{
-    // Writer table have no index.
-    return false;
-}
-
-::cppu::IPropertyArrayHelper& OWriterResultSet::getInfoHelper()
-{
-    return *OWriterResultSet_BASE3::getArrayHelper();
-}
-
-cppu::IPropertyArrayHelper* OWriterResultSet::createArrayHelper() const
-{
-    uno::Sequence<beans::Property> aProps;
-    describeProperties(aProps);
-    return new cppu::OPropertyArrayHelper(aProps);
-}
-
-void SAL_CALL OWriterResultSet::acquire() throw()
-{
-    OWriterResultSet_BASE2::acquire();
-}
-
-void SAL_CALL OWriterResultSet::release() throw()
-{
-    OWriterResultSet_BASE2::release();
-}
-
-css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL OWriterResultSet::getPropertySetInfo()
-{
-    return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
-}
-
-} // namespace writer
-} // namespace connectivity
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/writer/WStatement.cxx b/connectivity/source/drivers/writer/WStatement.cxx
index b64579f87ea9..fcb9c8a4f28a 100644
--- a/connectivity/source/drivers/writer/WStatement.cxx
+++ b/connectivity/source/drivers/writer/WStatement.cxx
@@ -18,7 +18,7 @@
  */
 
 #include "writer/WStatement.hxx"
-#include "writer/WResultSet.hxx"
+#include "component/CResultSet.hxx"
 
 using namespace com::sun::star;
 
@@ -29,7 +29,7 @@ namespace writer
 
 file::OResultSet* OWriterStatement::createResultSet()
 {
-    return new OWriterResultSet(this, m_aSQLIterator);
+    return new component::OComponentResultSet(this, m_aSQLIterator);
 }
 
 IMPLEMENT_SERVICE_INFO(OWriterStatement, "com.sun.star.sdbc.driver.writer.Statement", "com.sun.star.sdbc.Statement");
diff --git a/connectivity/source/inc/calc/CResultSet.hxx b/connectivity/source/inc/component/CResultSet.hxx
similarity index 79%
rename from connectivity/source/inc/calc/CResultSet.hxx
rename to connectivity/source/inc/component/CResultSet.hxx
index 32bc4aa11865..1779412c6c1d 100644
--- a/connectivity/source/inc/calc/CResultSet.hxx
+++ b/connectivity/source/inc/component/CResultSet.hxx
@@ -16,8 +16,8 @@
  *   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_CALC_CRESULTSET_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_INC_CALC_CRESULTSET_HXX
+#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_COMPONENT_CRESULTSET_HXX
+#define INCLUDED_CONNECTIVITY_SOURCE_INC_COMPONENT_CRESULTSET_HXX
 
 #include "file/FResultSet.hxx"
 #include <com/sun/star/sdbcx/XRowLocate.hpp>
@@ -26,19 +26,20 @@
 
 namespace connectivity
 {
-    namespace calc
+    namespace component
     {
-        class OCalcResultSet;
+        class OComponentResultSet;
         // these typedef's are only necessary for the compiler
         typedef ::cppu::ImplHelper2<  css::sdbcx::XRowLocate,
-                                      css::sdbcx::XDeleteRows> OCalcResultSet_BASE;
-        typedef file::OResultSet                                            OCalcResultSet_BASE2;
-        typedef ::comphelper::OPropertyArrayUsageHelper<OCalcResultSet> OCalcResultSet_BASE3;
+                                      css::sdbcx::XDeleteRows> OComponentResultSet_BASE;
+        typedef file::OResultSet                                            OComponentResultSet_BASE2;
+        typedef ::comphelper::OPropertyArrayUsageHelper<OComponentResultSet> OComponentResultSet_BASE3;
 
 
-        class OCalcResultSet : public OCalcResultSet_BASE2,
-                                public OCalcResultSet_BASE,
-                                public OCalcResultSet_BASE3
+        /// ResultSet implementation for Writer tables and Calc sheets.
+        class OOO_DLLPUBLIC_FILE OComponentResultSet : public OComponentResultSet_BASE2,
+                                public OComponentResultSet_BASE,
+                                public OComponentResultSet_BASE3
         {
             bool m_bBookmarkable;
         protected:
@@ -50,7 +51,7 @@ namespace connectivity
         public:
             DECLARE_SERVICE_INFO();
 
-            OCalcResultSet( file::OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator&   _aSQLIterator);
+            OComponentResultSet( file::OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator&   _aSQLIterator);
 
         private:
             // XInterface
@@ -78,6 +79,6 @@ namespace connectivity
     }
 }
 
-#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_CALC_CRESULTSET_HXX
+#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_COMPONENT_CRESULTSET_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/inc/writer/WResultSet.hxx b/connectivity/source/inc/writer/WResultSet.hxx
deleted file mode 100644
index c97b4519bacf..000000000000
--- a/connectivity/source/inc/writer/WResultSet.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- 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_WRESULTSET_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_INC_WRITER_WRESULTSET_HXX
-
-#include "file/FResultSet.hxx"
-#include <com/sun/star/sdbcx/XRowLocate.hpp>
-#include <com/sun/star/sdbcx/XDeleteRows.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-namespace connectivity
-{
-namespace writer
-{
-class OWriterResultSet;
-// these typedef's are only necessary for the compiler
-typedef ::cppu::ImplHelper2<  css::sdbcx::XRowLocate,
-        css::sdbcx::XDeleteRows> OWriterResultSet_BASE;
-typedef file::OResultSet                                            OWriterResultSet_BASE2;
-typedef ::comphelper::OPropertyArrayUsageHelper<OWriterResultSet> OWriterResultSet_BASE3;
-
-
-class OWriterResultSet : public OWriterResultSet_BASE2,
-    public OWriterResultSet_BASE,
-    public OWriterResultSet_BASE3
-{
-    bool m_bBookmarkable;
-protected:
-    // OPropertyArrayUsageHelper
-    virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override;
-    // OPropertySetHelper
-    virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
-    virtual bool fillIndexValues(const css::uno::Reference< css::sdbcx::XColumnsSupplier>& _xIndex) override;
-public:
-    DECLARE_SERVICE_INFO();
-
-    OWriterResultSet(file::OStatement_Base* pStmt,connectivity::OSQLParseTreeIterator&   _aSQLIterator);
-
-private:
-    // XInterface
-    virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& rType) override;
-    virtual void SAL_CALL acquire() throw() override;
-    virtual void SAL_CALL release() throw() override;
-    //XTypeProvider
-    virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
-    // XPropertySet
-    virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
-
-    // XRowLocate
-    virtual css::uno::Any SAL_CALL getBookmark() override;
-    virtual sal_Bool SAL_CALL moveToBookmark(const css::uno::Any& bookmark) override;
-    virtual sal_Bool SAL_CALL moveRelativeToBookmark(const css::uno::Any& bookmark, sal_Int32 rows) override;
-    virtual sal_Int32 SAL_CALL compareBookmarks(const css::uno::Any& first, const css::uno::Any& second) override;
-    virtual sal_Bool SAL_CALL hasOrderedBookmarks() override;
-    virtual sal_Int32 SAL_CALL hashBookmark(const css::uno::Any& bookmark) override;
-    // XDeleteRows
-    virtual css::uno::Sequence< sal_Int32 > SAL_CALL deleteRows(const css::uno::Sequence< css::uno::Any >& rows) override;
-
-    virtual bool isRowDeleted() const override
-    {
-        return false;
-    }
-
-};
-} // namespace writer
-} // namespace connectivity
-
-#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_WRITER_WRESULTSET_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list