summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorMatthew Nicholls <matthew.nicholls95@hotmail.co.uk>2015-04-19 17:12:43 +0100
committerDavid Tardon <dtardon@redhat.com>2015-04-22 07:25:17 +0000
commita1a25f4c6c99c0c519cc60d842041d56ae8a6f1c (patch)
treeb673a96ed3bf88c107b4a6049b9373af772026fb /connectivity/source
parent81f9281de0b5b42d5f4e8f1c4ecb3a780c74ff95 (diff)
tdf#88710 Cleanup after removing dbtoolsclient
Removes "virtualdbtools" and its implementation under "simpledbt", which are mostly wrappers around various dbtools functions and classes, previously aiding the now removed dynamic loading logic. Removes IDataAccessTools, IDataAccessTypeConversion and IDataAccessToolsFactory interfaces and their accompanying implementations which are completely unused. Removes IDataAccessCharSet (implemented by ODataAccessCharSet) and moves the implementation into a function which replaces ODataAccessCharsetHelper. Removes ISQLParseNode and ISQLParser and their implementation in OSimpleParseNode and OSimpleSQLParser, which simply wrap around OSQLParseNode and OSQLParser respectively. To avoid including "sqlbison.hxx" unnecessarily, includes to "sqlbison.hxx" are now only used where needed. Change-Id: Id882dfbf43514d84a1eaffc1f916d627830c8cd6 Reviewed-on: https://gerrit.libreoffice.org/15450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/commontools/dbtools.cxx15
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx1
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx1
-rw-r--r--connectivity/source/drivers/file/fcode.cxx1
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx1
-rw-r--r--connectivity/source/drivers/macab/MacabStatement.cxx1
-rw-r--r--connectivity/source/drivers/mork/MResultSet.cxx1
-rw-r--r--connectivity/source/drivers/mork/MStatement.cxx1
-rw-r--r--connectivity/source/parse/sqliterator.cxx1
-rw-r--r--connectivity/source/simpledbt/charset_s.cxx52
-rw-r--r--connectivity/source/simpledbt/dbtfactory.cxx95
-rw-r--r--connectivity/source/simpledbt/dbtfactory.hxx69
-rw-r--r--connectivity/source/simpledbt/parsenode_s.cxx73
-rw-r--r--connectivity/source/simpledbt/parsenode_s.hxx68
-rw-r--r--connectivity/source/simpledbt/parser_s.cxx65
-rw-r--r--connectivity/source/simpledbt/staticdbtools_s.cxx190
-rw-r--r--connectivity/source/simpledbt/staticdbtools_s.hxx190
17 files changed, 8 insertions, 817 deletions
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 557e4286a1a7..4f5e3950a573 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -82,9 +82,6 @@
#include "resource/sharedresources.hxx"
#include <connectivity/OSubComponent.hxx>
-#include "simpledbt/parser_s.hxx"
-#include "simpledbt/charset_s.hxx"
-
#include <algorithm>
#include <iterator>
#include <set>
@@ -1976,18 +1973,6 @@ void getBooleanComparisonPredicate( const OUString& _rExpression, const bool _bV
}
}
-simple::ISQLParser* createSQLParser(
- const Reference< XComponentContext >& rxContext,
- const IParseContext* _pContext )
-{
- return new OSimpleSQLParser(rxContext, _pContext);
-}
-
-simple::IDataAccessCharSet* createCharsetHelper( )
-{
- return new ODataAccessCharSet;
-}
-
} // namespace dbtools
namespace connectivity
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 68893053df95..3dedc867a44f 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -23,6 +23,7 @@
#endif
#include <connectivity/sdbcx/VColumn.hxx>
#include "file/FResultSet.hxx"
+#include "sqlbison.hxx"
#include "file/FResultSetMetaData.hxx"
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index cf7e93475569..f3b3e5d6f6db 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -20,6 +20,7 @@
#include <osl/diagnose.h>
#include "file/FStatement.hxx"
#include "file/FConnection.hxx"
+#include "sqlbison.hxx"
#include "file/FDriver.hxx"
#include "file/FResultSet.hxx"
#include <comphelper/property.hxx>
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 0894d95f9f8e..73a72421903d 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -20,6 +20,7 @@
#include "file/fcode.hxx"
#include <osl/diagnose.h>
#include <connectivity/sqlparse.hxx>
+#include "sqlbison.hxx"
#include <i18nlangtag/mslangid.hxx>
#include "TConnection.hxx"
#include <com/sun/star/sdb/SQLFilterOperator.hpp>
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index 8926b945f140..a2f8c65a6d88 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -34,6 +34,7 @@
#include "file/FDateFunctions.hxx"
#include "file/FNumericFunctions.hxx"
#include "file/FConnection.hxx"
+#include "sqlbison.hxx"
using namespace connectivity;
using namespace connectivity::file;
diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx
index e82a43eb90bc..a7ece0a27cf3 100644
--- a/connectivity/source/drivers/macab/MacabStatement.cxx
+++ b/connectivity/source/drivers/macab/MacabStatement.cxx
@@ -19,6 +19,7 @@
#include "MacabStatement.hxx"
+#include "sqlbison.hxx"
#include "MacabConnection.hxx"
#include "MacabAddressBook.hxx"
#include "MacabDriver.hxx"
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index 4bd102d7ad7b..5c1a1713b8fb 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -38,6 +38,7 @@
#include <vector>
#include <algorithm>
#include "MResultSet.hxx"
+#include "sqlbison.hxx"
#include "MResultSetMetaData.hxx"
#include "FDatabaseMetaDataResultSet.hxx"
diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx
index 423d6c528a90..01fc1fc79ba7 100644
--- a/connectivity/source/drivers/mork/MStatement.cxx
+++ b/connectivity/source/drivers/mork/MStatement.cxx
@@ -42,6 +42,7 @@
#include "diagnose_ex.h"
#include "MDriver.hxx"
#include "MStatement.hxx"
+#include "sqlbison.hxx"
#include "MConnection.hxx"
#include "MResultSet.hxx"
#include "MDatabaseMetaData.hxx"
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index dbe05776d656..cab5ca8d2ea3 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -20,6 +20,7 @@
#include <connectivity/sqliterator.hxx>
#include <connectivity/sdbcx/VTable.hxx>
#include <connectivity/sqlparse.hxx>
+#include "sqlbison.hxx"
#include <connectivity/dbtools.hxx>
#include <connectivity/sqlerror.hxx>
#include <com/sun/star/sdbc/ColumnValue.hpp>
diff --git a/connectivity/source/simpledbt/charset_s.cxx b/connectivity/source/simpledbt/charset_s.cxx
deleted file mode 100644
index 261a46a59c8f..000000000000
--- a/connectivity/source/simpledbt/charset_s.cxx
+++ /dev/null
@@ -1,52 +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 "simpledbt/charset_s.hxx"
-
-
-namespace connectivity
-{
-
-
- using namespace ::dbtools;
-
-
- //= ODataAccessCharSet
-
-
- sal_Int32 ODataAccessCharSet::getSupportedTextEncodings( ::std::vector< rtl_TextEncoding >& _rEncs ) const
- {
- _rEncs.clear();
-
- OCharsetMap::const_iterator aLoop = m_aCharsetInfo.begin();
- OCharsetMap::const_iterator aLoopEnd = m_aCharsetInfo.end();
- while (aLoop != aLoopEnd)
- {
- _rEncs.push_back( (*aLoop).getEncoding() );
- ++aLoop;
- }
-
- return _rEncs.size();
- }
-
-
-} // namespace connectivity
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/simpledbt/dbtfactory.cxx b/connectivity/source/simpledbt/dbtfactory.cxx
deleted file mode 100644
index 85fca69453e7..000000000000
--- a/connectivity/source/simpledbt/dbtfactory.cxx
+++ /dev/null
@@ -1,95 +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 <connectivity/virtualdbtools.hxx>
-#include <connectivity/formattedcolumnvalue.hxx>
-#include "simpledbt/parser_s.hxx"
-#include "simpledbt/charset_s.hxx"
-#include "dbtfactory.hxx"
-#include "staticdbtools_s.hxx"
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-
-
-// the entry point for load-on-call usage of the DBTOOLS lib
-#if HAVE_FEATURE_DESKTOP
-extern "C" void* SAL_CALL createDataAccessToolsFactory()
-{
- ::connectivity::ODataAccessToolsFactory* pFactory = new ::connectivity::ODataAccessToolsFactory;
- pFactory->acquire();
- return pFactory;
-}
-#endif
-
-namespace connectivity
-{
-
-
-
- //= ODataAccessToolsFactory
-
-
- ODataAccessToolsFactory::ODataAccessToolsFactory()
- {
- ODataAccessStaticTools* pStaticTools = new ODataAccessStaticTools;
- m_xTypeConversionHelper = pStaticTools;
- m_xToolsHelper = pStaticTools;
- }
-
-
- ::rtl::Reference< simple::IDataAccessTypeConversion > ODataAccessToolsFactory::getTypeConversionHelper()
- {
- return m_xTypeConversionHelper;
- }
-
-
- ::rtl::Reference< simple::IDataAccessCharSet > ODataAccessToolsFactory::createCharsetHelper( ) const
- {
- return new ODataAccessCharSet;
- }
-
-
- ::rtl::Reference< simple::IDataAccessTools > ODataAccessToolsFactory::getDataAccessTools()
- {
- return m_xToolsHelper;
- }
-
-
- ::std::unique_ptr< ::dbtools::FormattedColumnValue > ODataAccessToolsFactory::createFormattedColumnValue(
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
- const Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet, const Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn )
- {
- ::std::unique_ptr< ::dbtools::FormattedColumnValue > pValue( new ::dbtools::FormattedColumnValue( _rxContext, _rxRowSet, _rxColumn ) );
- return pValue;
- }
-
-
- ::rtl::Reference< simple::ISQLParser > ODataAccessToolsFactory::createSQLParser(const Reference< XComponentContext >& rxContext, const IParseContext* _pContext) const
- {
- return new OSimpleSQLParser(rxContext, _pContext);
- }
-
-
-} // namespace connectivity
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/simpledbt/dbtfactory.hxx b/connectivity/source/simpledbt/dbtfactory.hxx
deleted file mode 100644
index 7631606a4892..000000000000
--- a/connectivity/source/simpledbt/dbtfactory.hxx
+++ /dev/null
@@ -1,69 +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_SIMPLEDBT_DBTFACTORY_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_DBTFACTORY_HXX
-
-#include <connectivity/virtualdbtools.hxx>
-
-
-namespace connectivity
-{
-
-
-
- //= ODataAccessToolsFactory
-
- class ODataAccessToolsFactory : public simple::IDataAccessToolsFactory
- {
- protected:
- ::rtl::Reference< simple::IDataAccessTypeConversion > m_xTypeConversionHelper;
- ::rtl::Reference< simple::IDataAccessTools > m_xToolsHelper;
-
- public:
- ODataAccessToolsFactory();
- virtual ~ODataAccessToolsFactory() {}
-
- // IDataAccessToolsFactory
- virtual ::rtl::Reference< simple::ISQLParser > createSQLParser(
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
- const IParseContext* _pContext
- ) const SAL_OVERRIDE;
-
- virtual ::rtl::Reference< simple::IDataAccessCharSet > createCharsetHelper( ) const SAL_OVERRIDE;
-
- virtual ::rtl::Reference< simple::IDataAccessTypeConversion > getTypeConversionHelper() SAL_OVERRIDE;
-
- virtual ::rtl::Reference< simple::IDataAccessTools > getDataAccessTools() SAL_OVERRIDE;
-
- virtual ::std::unique_ptr< ::dbtools::FormattedColumnValue > createFormattedColumnValue(
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet,
- const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn
- ) SAL_OVERRIDE;
-
- };
-
-
-} // namespace connectivity
-
-
-#endif // INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_DBTFACTORY_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/simpledbt/parsenode_s.cxx b/connectivity/source/simpledbt/parsenode_s.cxx
deleted file mode 100644
index 07e1402797f9..000000000000
--- a/connectivity/source/simpledbt/parsenode_s.cxx
+++ /dev/null
@@ -1,73 +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 <connectivity/virtualdbtools.hxx>
-#include "parsenode_s.hxx"
-#include <connectivity/sqlnode.hxx>
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::sdbc;
-
-
-namespace connectivity
-{
-
-
-
- //= OSimpleParseNode
-
-
- OSimpleParseNode::OSimpleParseNode(const OSQLParseNode* _pNode, bool _bTakeOwnership)
- :m_pFullNode(_pNode)
- ,m_bOwner(_bTakeOwnership)
- {
- OSL_ENSURE(m_pFullNode, "OSimpleParseNode::OSimpleParseNode: invalid node given!");
- }
-
-
- OSimpleParseNode::~OSimpleParseNode()
- {
- if (m_bOwner)
- delete m_pFullNode;
- }
-
- void OSimpleParseNode::parseNodeToStr(OUString& _rString, const Reference< XConnection >& _rxConnection,const IParseContext* _pContext) const
- {
- m_pFullNode->parseNodeToStr( _rString, _rxConnection, _pContext );
- }
-
-
- void OSimpleParseNode::parseNodeToPredicateStr(OUString& _rString, const Reference< XConnection >& _rxConnection,
- const Reference< XNumberFormatter >& _rxFormatter, const Reference< XPropertySet >& _rxField,
- const OUString &_sPredicateTableAlias,
- const Locale& _rIntl, const sal_Char _cDecSeparator,const IParseContext* _pContext) const
- {
- m_pFullNode->parseNodeToPredicateStr( _rString, _rxConnection, _rxFormatter, _rxField, _sPredicateTableAlias,
- _rIntl, _cDecSeparator, _pContext );
- }
-
-
-} // namespace connectivity
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/simpledbt/parsenode_s.hxx b/connectivity/source/simpledbt/parsenode_s.hxx
deleted file mode 100644
index 42e47be228c5..000000000000
--- a/connectivity/source/simpledbt/parsenode_s.hxx
+++ /dev/null
@@ -1,68 +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_SIMPLEDBT_PARSENODE_S_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_PARSENODE_S_HXX
-
-#include <connectivity/virtualdbtools.hxx>
-
-
-namespace connectivity
-{
-
-
- class OSQLParseNode;
-
- //= OSimpleParseNode
-
- class OSimpleParseNode : public simple::ISQLParseNode
- {
- protected:
- const OSQLParseNode* m_pFullNode;
- bool m_bOwner;
-
- public:
- OSimpleParseNode(const OSQLParseNode* _pNode, bool _bTakeOwnership = true);
- virtual ~OSimpleParseNode();
-
- // ISQLParseNode
- virtual void parseNodeToStr(OUString& _rString,
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
- const IParseContext* _pContext
- ) const SAL_OVERRIDE;
-
- virtual void parseNodeToPredicateStr(OUString& _rString,
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
- const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter,
- const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxField,
- const OUString &_sPredicateTableAlias,
- const ::com::sun::star::lang::Locale& _rIntl,
- const sal_Char _cDecSeparator,
- const IParseContext* _pContext
- ) const SAL_OVERRIDE;
- };
-
-
-} // namespace connectivity
-
-
-#endif // INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_PARSENODE_S_HXX
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/simpledbt/parser_s.cxx b/connectivity/source/simpledbt/parser_s.cxx
deleted file mode 100644
index e9194af045bf..000000000000
--- a/connectivity/source/simpledbt/parser_s.cxx
+++ /dev/null
@@ -1,65 +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 <connectivity/virtualdbtools.hxx>
-#include "simpledbt/parser_s.hxx"
-#include "parsenode_s.hxx"
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::lang;
-
-
-namespace connectivity
-{
-
-
-
- //= OSimpleSQLParser
-
-
- OSimpleSQLParser::OSimpleSQLParser(const Reference< XComponentContext >& rxContext, const IParseContext* _pContext)
- :m_aFullParser(rxContext, _pContext)
- {
- }
-
-
- const IParseContext& OSimpleSQLParser::getContext() const
- {
- return m_aFullParser.getContext();
- }
-
-
- ::rtl::Reference< simple::ISQLParseNode > OSimpleSQLParser::predicateTree(OUString& rErrorMessage, const OUString& rStatement,
- const Reference< XNumberFormatter >& _rxFormatter, const Reference< XPropertySet >& _rxField) const
- {
- OSimpleParseNode* pReturn = NULL;
- OSQLParseNode* pFullNode = const_cast<OSimpleSQLParser*>(this)->m_aFullParser.predicateTree(rErrorMessage, rStatement, _rxFormatter, _rxField);
- if (pFullNode)
- pReturn = new OSimpleParseNode(pFullNode, true);
- return pReturn;
- }
-
-
-} // namespace connectivity
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/simpledbt/staticdbtools_s.cxx b/connectivity/source/simpledbt/staticdbtools_s.cxx
deleted file mode 100644
index fb5587f02db7..000000000000
--- a/connectivity/source/simpledbt/staticdbtools_s.cxx
+++ /dev/null
@@ -1,190 +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 <connectivity/virtualdbtools.hxx>
-#include "staticdbtools_s.hxx"
-#include <connectivity/dbconversion.hxx>
-#include <connectivity/dbtools.hxx>
-#include <com/sun/star/sdb/SQLContext.hpp>
-
-
-namespace connectivity
-{
-
-
- using namespace ::com::sun::star::util;
- using namespace ::com::sun::star::uno;
- using namespace ::com::sun::star::sdb;
- using namespace ::com::sun::star::lang;
- using namespace ::com::sun::star::sdbc;
- using namespace ::com::sun::star::beans;
- using namespace ::com::sun::star::container;
-
-
- //= ODataAccessStaticTools
-
-
- ODataAccessStaticTools::ODataAccessStaticTools()
- {
- }
-
-
- Date ODataAccessStaticTools::getStandardDate() const
- {
- return ::dbtools::DBTypeConversion::getStandardDate();
- }
-
-
- double ODataAccessStaticTools::getValue(const Reference< XColumn>& _rxVariant, const Date& rNullDate ) const
- {
- return ::dbtools::DBTypeConversion::getValue( _rxVariant, rNullDate );
- }
-
-
- OUString ODataAccessStaticTools::getFormattedValue(const Reference< XColumn >& _rxColumn, const Reference< XNumberFormatter >& _rxFormatter,
- const Date& _rNullDate, sal_Int32 _nKey, sal_Int16 _nKeyType) const
- {
- return ::dbtools::DBTypeConversion::getFormattedValue(_rxColumn, _rxFormatter, _rNullDate, _nKey, _nKeyType);
- }
-
-
- OUString ODataAccessStaticTools::getFormattedValue( const Reference< XPropertySet>& _rxColumn, const Reference< XNumberFormatter>& _rxFormatter,
- const Locale& _rLocale, const Date& _rNullDate ) const
- {
- return ::dbtools::DBTypeConversion::getFormattedValue( _rxColumn, _rxFormatter, _rLocale, _rNullDate );
- }
-
-
- Reference< XConnection> ODataAccessStaticTools::getConnection_withFeedback(const OUString& _rDataSourceName, const OUString& _rUser,
- const OUString& _rPwd, const Reference< XComponentContext>& _rxContext) const
- {
- return ::dbtools::getConnection_withFeedback(_rDataSourceName, _rUser, _rPwd, _rxContext);
- }
-
-
- Reference< XConnection> ODataAccessStaticTools::connectRowset(const Reference< XRowSet>& _rxRowSet, const Reference< XComponentContext >& _rxContext, bool _bSetAsActiveConnection) const
- {
- return ::dbtools::connectRowset( _rxRowSet, _rxContext, _bSetAsActiveConnection);
- }
-
-
- Reference< XConnection> ODataAccessStaticTools::getRowSetConnection(
- const Reference< XRowSet>& _rxRowSet)
- const
- {
- return ::dbtools::getConnection(_rxRowSet);
- }
-
-
- Reference< XNumberFormatsSupplier> ODataAccessStaticTools::getNumberFormats(const Reference< XConnection>& _rxConn, bool _bAllowDefault) const
- {
- return ::dbtools::getNumberFormats(_rxConn, _bAllowDefault);
- }
-
-
- sal_Int32 ODataAccessStaticTools::getDefaultNumberFormat( const Reference< XPropertySet >& _rxColumn, const Reference< XNumberFormatTypes >& _rxTypes,
- const Locale& _rLocale ) const
- {
- return ::dbtools::getDefaultNumberFormat( _rxColumn, _rxTypes, _rLocale );
- }
-
-
- void ODataAccessStaticTools::TransferFormComponentProperties(const Reference< XPropertySet>& _rxOld, const Reference< XPropertySet>& _rxNew, const Locale& _rLocale) const
- {
- ::dbtools::TransferFormComponentProperties(_rxOld, _rxNew, _rLocale);
- }
-
-
- OUString ODataAccessStaticTools::quoteName(const OUString& _rQuote, const OUString& _rName) const
- {
- return ::dbtools::quoteName(_rQuote, _rName);
- }
-
-
- OUString ODataAccessStaticTools::composeTableNameForSelect( const Reference< XConnection >& _rxConnection, const OUString& _rCatalog, const OUString& _rSchema, const OUString& _rName ) const
- {
- return ::dbtools::composeTableNameForSelect( _rxConnection, _rCatalog, _rSchema, _rName );
- }
-
-
- OUString ODataAccessStaticTools::composeTableNameForSelect( const Reference< XConnection >& _rxConnection, const Reference< XPropertySet>& _xTable ) const
- {
- return ::dbtools::composeTableNameForSelect( _rxConnection, _xTable );
- }
-
-
- SQLContext ODataAccessStaticTools::prependContextInfo(SQLException& _rException, const Reference< XInterface >& _rxContext,
- const OUString& _rContextDescription, const OUString& _rContextDetails) const
- {
- return ::dbtools::prependContextInfo(_rException, _rxContext, _rContextDescription, _rContextDetails);
- }
-
-
- Reference< XDataSource > ODataAccessStaticTools::getDataSource( const OUString& _rsRegisteredName, const Reference< XComponentContext>& _rxContext ) const
- {
- return ::dbtools::getDataSource( _rsRegisteredName, _rxContext );
- }
-
-
- bool ODataAccessStaticTools::canInsert(const Reference< XPropertySet>& _rxCursorSet) const
- {
- return ::dbtools::canInsert( _rxCursorSet );
- }
-
-
- bool ODataAccessStaticTools::canUpdate(const Reference< XPropertySet>& _rxCursorSet) const
- {
- return ::dbtools::canUpdate( _rxCursorSet );
- }
-
-
- bool ODataAccessStaticTools::canDelete(const Reference< XPropertySet>& _rxCursorSet) const
- {
- return ::dbtools::canDelete( _rxCursorSet );
- }
-
-
- Reference< XNameAccess > ODataAccessStaticTools::getFieldsByCommandDescriptor( const Reference< XConnection >& _rxConnection,
- const sal_Int32 _nCommandType, const OUString& _rCommand,
- Reference< XComponent >& _rxKeepFieldsAlive, ::dbtools::SQLExceptionInfo* _pErrorInfo )
- {
- return ::dbtools::getFieldsByCommandDescriptor( _rxConnection, _nCommandType, _rCommand,
- _rxKeepFieldsAlive, _pErrorInfo );
- }
-
-
- Sequence< OUString > ODataAccessStaticTools::getFieldNamesByCommandDescriptor(
- const Reference< XConnection >& _rxConnection, const sal_Int32 _nCommandType,
- const OUString& _rCommand, ::dbtools::SQLExceptionInfo* _pErrorInfo )
- {
- return ::dbtools::getFieldNamesByCommandDescriptor( _rxConnection, _nCommandType,
- _rCommand, _pErrorInfo );
- }
-
-
- bool ODataAccessStaticTools::isEmbeddedInDatabase( const Reference< XInterface >& _rxComponent, Reference< XConnection >& _rxActualConnection )
- {
- return ::dbtools::isEmbeddedInDatabase( _rxComponent, _rxActualConnection );
- }
-
-
-} // namespace connectivity
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/simpledbt/staticdbtools_s.hxx b/connectivity/source/simpledbt/staticdbtools_s.hxx
deleted file mode 100644
index ce240b11312e..000000000000
--- a/connectivity/source/simpledbt/staticdbtools_s.hxx
+++ /dev/null
@@ -1,190 +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_SIMPLEDBT_STATICDBTOOLS_S_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_STATICDBTOOLS_S_HXX
-
-#include <connectivity/virtualdbtools.hxx>
-
-
-namespace connectivity
-{
-
-
-
- //= ODataAccessStaticTools
-
- class ODataAccessStaticTools
- :public simple::IDataAccessTypeConversion
- ,public simple::IDataAccessTools
- {
- public:
- ODataAccessStaticTools();
-
- // IDataAccessTypeConversion
-
- virtual ::com::sun::star::util::Date getStandardDate() const SAL_OVERRIDE;
-
-
- virtual double getValue(
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn>& _rxVariant,
- const ::com::sun::star::util::Date& rNullDate ) const SAL_OVERRIDE;
-
-
- virtual OUString getFormattedValue(
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxColumn,
- const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter,
- const ::com::sun::star::util::Date& _rNullDate,
- sal_Int32 _nKey,
- sal_Int16 _nKeyType) const SAL_OVERRIDE;
-
-
- virtual OUString getFormattedValue(
- const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxColumn,
- const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter>& _rxFormatter,
- const ::com::sun::star::lang::Locale& _rLocale,
- const ::com::sun::star::util::Date& _rNullDate
- ) const SAL_OVERRIDE;
-
- // IDataAccessTools
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection_withFeedback(
- const OUString& _rDataSourceName,
- const OUString& _rUser,
- const OUString& _rPwd,
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext
- ) const SAL_OVERRIDE;
-
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> connectRowset(
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet,
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext,
- bool _bSetAsActiveConnection
- ) const SAL_OVERRIDE;
-
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getRowSetConnection(
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet)
- const SAL_OVERRIDE;
-
-
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier> getNumberFormats(
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConn,
- bool _bAllowDefault
- ) const SAL_OVERRIDE;
-
-
- virtual sal_Int32 getDefaultNumberFormat(
- const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn,
- const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatTypes >& _rxTypes,
- const ::com::sun::star::lang::Locale& _rLocale
- ) const SAL_OVERRIDE;
-
-
- virtual void TransferFormComponentProperties(
- const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxOld,
- const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxNew,
- const ::com::sun::star::lang::Locale& _rLocale
- ) const SAL_OVERRIDE;
-
-
- virtual OUString quoteName(
- const OUString& _rQuote,
- const OUString& _rName
- ) const SAL_OVERRIDE;
-
-
- virtual OUString composeTableNameForSelect(
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
- const OUString& _rCatalog,
- const OUString& _rSchema,
- const OUString& _rName
- ) const SAL_OVERRIDE;
-
-
- virtual OUString composeTableNameForSelect(
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
- const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xTable
- ) const SAL_OVERRIDE;
-
-
- virtual ::com::sun::star::sdb::SQLContext prependContextInfo(
- ::com::sun::star::sdbc::SQLException& _rException,
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContext,
- const OUString& _rContextDescription,
- const OUString& _rContextDetails
- ) const SAL_OVERRIDE;
-
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > getDataSource(
- const OUString& _rsRegisteredName,
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext
- ) const SAL_OVERRIDE;
-
-
- /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::INSERT
- @param _rxCursorSet the property set
- */
- virtual bool canInsert(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const SAL_OVERRIDE;
-
-
- /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::UPDATE
- @param _rxCursorSet the property set
- */
- virtual bool canUpdate(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const SAL_OVERRIDE;
-
-
- /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::DELETE
- @param _rxCursorSet the property set
- */
- virtual bool canDelete(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const SAL_OVERRIDE;
-
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
- getFieldsByCommandDescriptor(
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
- const sal_Int32 _nCommandType,
- const OUString& _rCommand,
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _rxKeepFieldsAlive,
- ::dbtools::SQLExceptionInfo* _pErrorInfo = NULL
- ) SAL_OVERRIDE;
-
-
- virtual ::com::sun::star::uno::Sequence< OUString >
- getFieldNamesByCommandDescriptor(
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
- const sal_Int32 _nCommandType,
- const OUString& _rCommand,
- ::dbtools::SQLExceptionInfo* _pErrorInfo = NULL
- ) SAL_OVERRIDE;
-
-
- virtual bool isEmbeddedInDatabase(
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent,
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxActualConnection
- ) SAL_OVERRIDE;
- };
-
-
-} // namespace connectivity
-
-
-#endif // INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_STATICDBTOOLS_S_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */