summaryrefslogtreecommitdiff
path: root/connectivity/source/simpledbt
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/simpledbt')
-rw-r--r--connectivity/source/simpledbt/charset_s.cxx73
-rw-r--r--connectivity/source/simpledbt/charset_s.hxx68
-rw-r--r--connectivity/source/simpledbt/dbtfactory.cxx114
-rw-r--r--connectivity/source/simpledbt/dbtfactory.hxx81
-rw-r--r--connectivity/source/simpledbt/makefile.mk53
-rw-r--r--connectivity/source/simpledbt/parsenode_s.cxx93
-rw-r--r--connectivity/source/simpledbt/parsenode_s.hxx81
-rw-r--r--connectivity/source/simpledbt/parser_s.cxx86
-rw-r--r--connectivity/source/simpledbt/parser_s.hxx74
-rw-r--r--connectivity/source/simpledbt/refbase.cxx64
-rw-r--r--connectivity/source/simpledbt/refbase.hxx61
-rw-r--r--connectivity/source/simpledbt/staticdbtools_s.cxx212
-rw-r--r--connectivity/source/simpledbt/staticdbtools_s.hxx207
13 files changed, 1267 insertions, 0 deletions
diff --git a/connectivity/source/simpledbt/charset_s.cxx b/connectivity/source/simpledbt/charset_s.cxx
new file mode 100644
index 000000000000..ac07c6fb9a08
--- /dev/null
+++ b/connectivity/source/simpledbt/charset_s.cxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_connectivity.hxx"
+#include "charset_s.hxx"
+
+//........................................................................
+namespace connectivity
+{
+//........................................................................
+
+ using namespace ::dbtools;
+
+ //====================================================================
+ //= ODataAccessCharSet
+ //====================================================================
+ //----------------------------------------------------------------
+ oslInterlockedCount SAL_CALL ODataAccessCharSet::acquire()
+ {
+ return ORefBase::acquire();
+ }
+
+ //----------------------------------------------------------------
+ oslInterlockedCount SAL_CALL ODataAccessCharSet::release()
+ {
+ return ORefBase::release();
+ }
+
+ //--------------------------------------------------------------------
+ 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
+//........................................................................
+
diff --git a/connectivity/source/simpledbt/charset_s.hxx b/connectivity/source/simpledbt/charset_s.hxx
new file mode 100644
index 000000000000..40bf9d9dcb0c
--- /dev/null
+++ b/connectivity/source/simpledbt/charset_s.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef CONNECTIVITY_DBTOOLS_CHARSET_S_HXX
+#define CONNECTIVITY_DBTOOLS_CHARSET_S_HXX
+
+#include <connectivity/virtualdbtools.hxx>
+#include "refbase.hxx"
+#include <connectivity/dbcharset.hxx>
+
+//........................................................................
+namespace connectivity
+{
+//........................................................................
+
+ //====================================================================
+ //= ODataAccessCharSet
+ //====================================================================
+ class ODataAccessCharSet
+ :public simple::IDataAccessCharSet
+ ,public ORefBase
+ {
+ protected:
+ ::dbtools::OCharsetMap m_aCharsetInfo;
+
+ public:
+ ODataAccessCharSet() { }
+
+ // IDataAccessCharSet
+ sal_Int32 getSupportedTextEncodings(
+ ::std::vector< rtl_TextEncoding >& /* [out] */ _rEncs
+ ) const;
+
+ // disambiguate IReference
+ virtual oslInterlockedCount SAL_CALL acquire();
+ virtual oslInterlockedCount SAL_CALL release();
+ };
+
+//........................................................................
+} // namespace connectivity
+//........................................................................
+
+#endif // CONNECTIVITY_DBTOOLS_CHARSET_S_HXX
+
diff --git a/connectivity/source/simpledbt/dbtfactory.cxx b/connectivity/source/simpledbt/dbtfactory.cxx
new file mode 100644
index 000000000000..148a5270b6d2
--- /dev/null
+++ b/connectivity/source/simpledbt/dbtfactory.cxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_connectivity.hxx"
+
+#include <connectivity/virtualdbtools.hxx>
+#include <connectivity/formattedcolumnvalue.hxx>
+#include "dbtfactory.hxx"
+#include "parser_s.hxx"
+#include "staticdbtools_s.hxx"
+#include "charset_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
+extern "C" void* SAL_CALL createDataAccessToolsFactory()
+{
+ ::connectivity::ODataAccessToolsFactory* pFactory = new ::connectivity::ODataAccessToolsFactory;
+ pFactory->acquire();
+ return pFactory;
+}
+
+//........................................................................
+namespace connectivity
+{
+//........................................................................
+
+ //================================================================
+ //= ODataAccessToolsFactory
+ //================================================================
+ //----------------------------------------------------------------
+ ODataAccessToolsFactory::ODataAccessToolsFactory()
+ {
+ ODataAccessStaticTools* pStaticTools = new ODataAccessStaticTools;
+ m_xTypeConversionHelper = pStaticTools;
+ m_xToolsHelper = pStaticTools;
+ }
+
+ //----------------------------------------------------------------
+ oslInterlockedCount SAL_CALL ODataAccessToolsFactory::acquire()
+ {
+ return ORefBase::acquire();
+ }
+
+ //----------------------------------------------------------------
+ oslInterlockedCount SAL_CALL ODataAccessToolsFactory::release()
+ {
+ return ORefBase::release();
+ }
+
+ //----------------------------------------------------------------
+ ::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::auto_ptr< ::dbtools::FormattedColumnValue > ODataAccessToolsFactory::createFormattedColumnValue( const ::comphelper::ComponentContext& _rContext,
+ const Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet, const Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn )
+ {
+ ::std::auto_ptr< ::dbtools::FormattedColumnValue > pValue( new ::dbtools::FormattedColumnValue( _rContext, _rxRowSet, _rxColumn ) );
+ return pValue;
+ }
+
+ //----------------------------------------------------------------
+ ::rtl::Reference< simple::ISQLParser > ODataAccessToolsFactory::createSQLParser(const Reference< XMultiServiceFactory >& _rxServiceFactory,const IParseContext* _pContext) const
+ {
+ return new OSimpleSQLParser(_rxServiceFactory,_pContext);
+ }
+
+//........................................................................
+} // namespace connectivity
+//........................................................................
+
+
diff --git a/connectivity/source/simpledbt/dbtfactory.hxx b/connectivity/source/simpledbt/dbtfactory.hxx
new file mode 100644
index 000000000000..3ce0be0762d2
--- /dev/null
+++ b/connectivity/source/simpledbt/dbtfactory.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef CONNECTIVITY_DBTOOLS_DBTFACTORY_HXX
+#define CONNECTIVITY_DBTOOLS_DBTFACTORY_HXX
+
+#include <connectivity/virtualdbtools.hxx>
+#include "refbase.hxx"
+
+//........................................................................
+namespace connectivity
+{
+//........................................................................
+
+ //================================================================
+ //= ODataAccessToolsFactory
+ //================================================================
+ class ODataAccessToolsFactory
+ :public simple::IDataAccessToolsFactory
+ ,public ORefBase
+ {
+ protected:
+ ::rtl::Reference< simple::IDataAccessTypeConversion > m_xTypeConversionHelper;
+ ::rtl::Reference< simple::IDataAccessTools > m_xToolsHelper;
+
+ public:
+ ODataAccessToolsFactory();
+
+ // IDataAccessToolsFactory
+ virtual ::rtl::Reference< simple::ISQLParser > createSQLParser(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceFactory,
+ const IParseContext* _pContext
+ ) const;
+
+ virtual ::rtl::Reference< simple::IDataAccessCharSet > createCharsetHelper( ) const;
+
+ virtual ::rtl::Reference< simple::IDataAccessTypeConversion > getTypeConversionHelper();
+
+ virtual ::rtl::Reference< simple::IDataAccessTools > getDataAccessTools();
+
+ virtual ::std::auto_ptr< ::dbtools::FormattedColumnValue > createFormattedColumnValue(
+ const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn
+ );
+
+ // IReference
+ virtual oslInterlockedCount SAL_CALL acquire();
+ virtual oslInterlockedCount SAL_CALL release();
+ };
+
+//........................................................................
+} // namespace connectivity
+//........................................................................
+
+#endif // CONNECTIVITY_DBTOOLS_DBTFACTORY_HXX
+
diff --git a/connectivity/source/simpledbt/makefile.mk b/connectivity/source/simpledbt/makefile.mk
new file mode 100644
index 000000000000..49409e2f8672
--- /dev/null
+++ b/connectivity/source/simpledbt/makefile.mk
@@ -0,0 +1,53 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=connectivity
+TARGET=simpledbt
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/dbtools.pmk
+
+# --- Files --------------------------------------------------------
+
+EXCEPTIONSFILES=\
+ $(SLO)$/charset_s.obj \
+ $(SLO)$/staticdbtools_s.obj \
+ $(SLO)$/parsenode_s.obj \
+ $(SLO)$/parser_s.obj
+
+SLOFILES=\
+ $(EXCEPTIONSFILES) \
+ $(SLO)$/refbase.obj \
+ $(SLO)$/dbtfactory.obj \
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+
diff --git a/connectivity/source/simpledbt/parsenode_s.cxx b/connectivity/source/simpledbt/parsenode_s.cxx
new file mode 100644
index 000000000000..7a7b54307589
--- /dev/null
+++ b/connectivity/source/simpledbt/parsenode_s.cxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_connectivity.hxx"
+#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, sal_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;
+ }
+
+ //----------------------------------------------------------------
+ oslInterlockedCount SAL_CALL OSimpleParseNode::acquire()
+ {
+ return ORefBase::acquire();
+ }
+
+ //----------------------------------------------------------------
+ oslInterlockedCount SAL_CALL OSimpleParseNode::release()
+ {
+ return ORefBase::release();
+ }
+
+ //----------------------------------------------------------------
+ void OSimpleParseNode::parseNodeToStr(::rtl::OUString& _rString, const Reference< XConnection >& _rxConnection,const IParseContext* _pContext) const
+ {
+ m_pFullNode->parseNodeToStr( _rString, _rxConnection, _pContext );
+ }
+
+ //----------------------------------------------------------------
+ void OSimpleParseNode::parseNodeToPredicateStr(::rtl::OUString& _rString, const Reference< XConnection >& _rxConnection,
+ const Reference< XNumberFormatter >& _rxFormatter, const Reference< XPropertySet >& _rxField,
+ const Locale& _rIntl, const sal_Char _cDecSeparator,const IParseContext* _pContext) const
+ {
+ m_pFullNode->parseNodeToPredicateStr( _rString, _rxConnection, _rxFormatter, _rxField, _rIntl, _cDecSeparator, _pContext );
+ }
+
+//........................................................................
+} // namespace connectivity
+//........................................................................
+
+
diff --git a/connectivity/source/simpledbt/parsenode_s.hxx b/connectivity/source/simpledbt/parsenode_s.hxx
new file mode 100644
index 000000000000..b580c4e383a2
--- /dev/null
+++ b/connectivity/source/simpledbt/parsenode_s.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef CONNECTIVITY_PARSENODE_SIMPLE_HXX
+#define CONNECTIVITY_PARSENODE_SIMPLE_HXX
+
+#include <connectivity/virtualdbtools.hxx>
+#include "refbase.hxx"
+
+//........................................................................
+namespace connectivity
+{
+//........................................................................
+
+ class OSQLParseNode;
+ //================================================================
+ //= OSimpleParseNode
+ //================================================================
+ class OSimpleParseNode
+ :public simple::ISQLParseNode
+ ,public ORefBase
+ {
+ protected:
+ const OSQLParseNode* m_pFullNode;
+ sal_Bool m_bOwner;
+
+ public:
+ OSimpleParseNode(const OSQLParseNode* _pNode, sal_Bool _bTakeOwnership = sal_True);
+ ~OSimpleParseNode();
+
+ // ISQLParseNode
+ virtual void parseNodeToStr(::rtl::OUString& _rString,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
+ const IParseContext* _pContext
+ ) const;
+
+ virtual void parseNodeToPredicateStr(::rtl::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 ::com::sun::star::lang::Locale& _rIntl,
+ const sal_Char _cDecSeparator,
+ const IParseContext* _pContext
+ ) const;
+
+ // disambiguate IReference
+ virtual oslInterlockedCount SAL_CALL acquire();
+ virtual oslInterlockedCount SAL_CALL release();
+ };
+
+//........................................................................
+} // namespace connectivity
+//........................................................................
+
+#endif // CONNECTIVITY_PARSENODE_SIMPLE_HXX
+
+
diff --git a/connectivity/source/simpledbt/parser_s.cxx b/connectivity/source/simpledbt/parser_s.cxx
new file mode 100644
index 000000000000..2903776f0d3d
--- /dev/null
+++ b/connectivity/source/simpledbt/parser_s.cxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_connectivity.hxx"
+#include <connectivity/virtualdbtools.hxx>
+#include "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< XMultiServiceFactory >& _rxServiceFactory,const IParseContext* _pContext)
+ :m_aFullParser(_rxServiceFactory,_pContext)
+ {
+ }
+
+ //----------------------------------------------------------------
+ oslInterlockedCount SAL_CALL OSimpleSQLParser::acquire()
+ {
+ return ORefBase::acquire();
+ }
+
+ //----------------------------------------------------------------
+ oslInterlockedCount SAL_CALL OSimpleSQLParser::release()
+ {
+ return ORefBase::release();
+ }
+
+ //----------------------------------------------------------------
+ const IParseContext& OSimpleSQLParser::getContext() const
+ {
+ return m_aFullParser.getContext();
+ }
+
+ //----------------------------------------------------------------
+ ::rtl::Reference< simple::ISQLParseNode > OSimpleSQLParser::predicateTree(::rtl::OUString& rErrorMessage, const ::rtl::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, sal_True);
+ return pReturn;
+ }
+
+//........................................................................
+} // namespace connectivity
+//........................................................................
+
+
diff --git a/connectivity/source/simpledbt/parser_s.hxx b/connectivity/source/simpledbt/parser_s.hxx
new file mode 100644
index 000000000000..6756c703a045
--- /dev/null
+++ b/connectivity/source/simpledbt/parser_s.hxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef CONNECTIVITY_DBTOOLS_PARSER_SIMPLE_HXX
+#define CONNECTIVITY_DBTOOLS_PARSER_SIMPLE_HXX
+
+#include <connectivity/virtualdbtools.hxx>
+#include "refbase.hxx"
+#include <connectivity/sqlparse.hxx>
+
+//........................................................................
+namespace connectivity
+{
+//........................................................................
+
+ //================================================================
+ //= OSimpleSQLParser
+ //================================================================
+ class OSimpleSQLParser
+ :public simple::ISQLParser
+ ,public ORefBase
+ {
+ protected:
+ OSQLParser m_aFullParser;
+
+ public:
+ OSimpleSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceFactory,const IParseContext* _pContext);
+
+ // ISQLParser
+ virtual ::rtl::Reference< simple::ISQLParseNode > predicateTree(
+ ::rtl::OUString& rErrorMessage,
+ const ::rtl::OUString& rStatement,
+ 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;
+
+ virtual const IParseContext& getContext() const;
+
+ // disambiguate IReference
+ virtual oslInterlockedCount SAL_CALL acquire();
+ virtual oslInterlockedCount SAL_CALL release();
+ };
+
+//........................................................................
+} // namespace connectivity
+//........................................................................
+
+#endif // CONNECTIVITY_DBTOOLS_PARSER_SIMPLE_HXX
+
+
diff --git a/connectivity/source/simpledbt/refbase.cxx b/connectivity/source/simpledbt/refbase.cxx
new file mode 100644
index 000000000000..6047732bffd5
--- /dev/null
+++ b/connectivity/source/simpledbt/refbase.cxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_connectivity.hxx"
+#include "refbase.hxx"
+
+//........................................................................
+namespace connectivity
+{
+//........................................................................
+
+ //================================================================
+ //= ORefBase
+ //================================================================
+ //----------------------------------------------------------------
+ ORefBase::~ORefBase()
+ {
+ }
+
+ //----------------------------------------------------------------
+ oslInterlockedCount SAL_CALL ORefBase::acquire()
+ {
+ return osl_incrementInterlockedCount(&m_refCount);
+ }
+
+ //----------------------------------------------------------------
+ oslInterlockedCount SAL_CALL ORefBase::release()
+ {
+ oslInterlockedCount nNewRefCount = osl_decrementInterlockedCount(&m_refCount);
+ if (0 == nNewRefCount)
+ delete this;
+
+ return nNewRefCount;
+ }
+
+//........................................................................
+} // namespace connectivity
+//........................................................................
+
diff --git a/connectivity/source/simpledbt/refbase.hxx b/connectivity/source/simpledbt/refbase.hxx
new file mode 100644
index 000000000000..1ceb43a4555d
--- /dev/null
+++ b/connectivity/source/simpledbt/refbase.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef CONNECTIVITY_DBTOOLS_REFBASE_HXX
+#define CONNECTIVITY_DBTOOLS_REFBASE_HXX
+
+#include <rtl/ref.hxx>
+
+//........................................................................
+namespace connectivity
+{
+//........................................................................
+
+ //================================================================
+ //= ORefBase
+ //================================================================
+ /// base class for all objects implementing the ::rtl::IReference interface
+ class ORefBase : public ::rtl::IReference
+ {
+ protected:
+ oslInterlockedCount m_refCount;
+
+ protected:
+ ORefBase() : m_refCount(0) { }
+ virtual ~ORefBase();
+
+ virtual oslInterlockedCount SAL_CALL acquire();
+ virtual oslInterlockedCount SAL_CALL release();
+ };
+
+//........................................................................
+} // namespace connectivity
+//........................................................................
+
+#endif // CONNECTIVITY_DBTOOLS_REFBASE_HXX
+
+
diff --git a/connectivity/source/simpledbt/staticdbtools_s.cxx b/connectivity/source/simpledbt/staticdbtools_s.cxx
new file mode 100644
index 000000000000..17d052a35b6b
--- /dev/null
+++ b/connectivity/source/simpledbt/staticdbtools_s.cxx
@@ -0,0 +1,212 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_connectivity.hxx"
+#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, sal_Int16 nKeyType) const
+ {
+ return ::dbtools::DBTypeConversion::getValue(_rxVariant, rNullDate, nKeyType);
+ }
+
+ //----------------------------------------------------------------
+ ::rtl::OUString ODataAccessStaticTools::getValue(const Reference< XColumn >& _rxColumn, const Reference< XNumberFormatter >& _rxFormatter,
+ const Date& _rNullDate, sal_Int32 _nKey, sal_Int16 _nKeyType) const
+ {
+ return ::dbtools::DBTypeConversion::getValue(_rxColumn, _rxFormatter, _rNullDate, _nKey, _nKeyType);
+ }
+
+ //----------------------------------------------------------------
+ ::rtl::OUString ODataAccessStaticTools::getValue( const Reference< XPropertySet>& _rxColumn, const Reference< XNumberFormatter>& _rxFormatter,
+ const Locale& _rLocale, const Date& _rNullDate ) const
+ {
+ return ::dbtools::DBTypeConversion::getValue( _rxColumn, _rxFormatter, _rLocale, _rNullDate );
+ }
+
+ //----------------------------------------------------------------
+ oslInterlockedCount SAL_CALL ODataAccessStaticTools::acquire()
+ {
+ return ORefBase::acquire();
+ }
+
+ //----------------------------------------------------------------
+ oslInterlockedCount SAL_CALL ODataAccessStaticTools::release()
+ {
+ return ORefBase::release();
+ }
+
+ //----------------------------------------------------------------
+ Reference< XConnection> ODataAccessStaticTools::getConnection_withFeedback(const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rUser,
+ const ::rtl::OUString& _rPwd, const Reference< XMultiServiceFactory>& _rxFactory) const SAL_THROW ( (SQLException) )
+ {
+ return ::dbtools::getConnection_withFeedback(_rDataSourceName, _rUser, _rPwd, _rxFactory);
+ }
+
+ //----------------------------------------------------------------
+ Reference< XConnection> ODataAccessStaticTools::connectRowset(const Reference< XRowSet>& _rxRowSet, const Reference< XMultiServiceFactory>& _rxFactory, sal_Bool _bSetAsActiveConnection) const
+ SAL_THROW ( (SQLException, WrappedTargetException, RuntimeException) )
+ {
+ return ::dbtools::connectRowset( _rxRowSet, _rxFactory, _bSetAsActiveConnection);
+ }
+
+ // ------------------------------------------------
+ Reference< XConnection> ODataAccessStaticTools::getRowSetConnection(
+ const Reference< XRowSet>& _rxRowSet)
+ const SAL_THROW ( (RuntimeException) )
+ {
+ return ::dbtools::getConnection(_rxRowSet);
+ }
+
+ //----------------------------------------------------------------
+ Reference< XNumberFormatsSupplier> ODataAccessStaticTools::getNumberFormats(const Reference< XConnection>& _rxConn, sal_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);
+ }
+
+ //----------------------------------------------------------------
+ ::rtl::OUString ODataAccessStaticTools::quoteName(const ::rtl::OUString& _rQuote, const ::rtl::OUString& _rName) const
+ {
+ return ::dbtools::quoteName(_rQuote, _rName);
+ }
+
+ //----------------------------------------------------------------
+ ::rtl::OUString ODataAccessStaticTools::composeTableNameForSelect( const Reference< XConnection >& _rxConnection, const ::rtl::OUString& _rCatalog, const ::rtl::OUString& _rSchema, const ::rtl::OUString& _rName ) const
+ {
+ return ::dbtools::composeTableNameForSelect( _rxConnection, _rCatalog, _rSchema, _rName );
+ }
+
+ //----------------------------------------------------------------
+ ::rtl::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 ::rtl::OUString& _rContextDescription, const ::rtl::OUString& _rContextDetails) const
+ {
+ return ::dbtools::prependContextInfo(_rException, _rxContext, _rContextDescription, _rContextDetails);
+ }
+
+ //----------------------------------------------------------------
+ Reference< XDataSource > ODataAccessStaticTools::getDataSource( const ::rtl::OUString& _rsRegisteredName, const Reference< XMultiServiceFactory>& _rxFactory ) const
+ {
+ return ::dbtools::getDataSource( _rsRegisteredName, _rxFactory );
+ }
+
+ //----------------------------------------------------------------
+ sal_Bool ODataAccessStaticTools::canInsert(const Reference< XPropertySet>& _rxCursorSet) const
+ {
+ return ::dbtools::canInsert( _rxCursorSet );
+ }
+
+ //----------------------------------------------------------------
+ sal_Bool ODataAccessStaticTools::canUpdate(const Reference< XPropertySet>& _rxCursorSet) const
+ {
+ return ::dbtools::canUpdate( _rxCursorSet );
+ }
+
+ //----------------------------------------------------------------
+ sal_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 ::rtl::OUString& _rCommand,
+ Reference< XComponent >& _rxKeepFieldsAlive, ::dbtools::SQLExceptionInfo* _pErrorInfo ) SAL_THROW( ( ) )
+ {
+ return ::dbtools::getFieldsByCommandDescriptor( _rxConnection, _nCommandType, _rCommand,
+ _rxKeepFieldsAlive, _pErrorInfo );
+ }
+
+ //----------------------------------------------------------------
+ Sequence< ::rtl::OUString > ODataAccessStaticTools::getFieldNamesByCommandDescriptor(
+ const Reference< XConnection >& _rxConnection, const sal_Int32 _nCommandType,
+ const ::rtl::OUString& _rCommand, ::dbtools::SQLExceptionInfo* _pErrorInfo ) SAL_THROW( ( ) )
+ {
+ return ::dbtools::getFieldNamesByCommandDescriptor( _rxConnection, _nCommandType,
+ _rCommand, _pErrorInfo );
+ }
+
+ // ------------------------------------------------
+ bool ODataAccessStaticTools::isEmbeddedInDatabase( const Reference< XInterface >& _rxComponent, Reference< XConnection >& _rxActualConnection )
+ {
+ return ::dbtools::isEmbeddedInDatabase( _rxComponent, _rxActualConnection );
+ }
+
+//........................................................................
+} // namespace connectivity
+//........................................................................
+
diff --git a/connectivity/source/simpledbt/staticdbtools_s.hxx b/connectivity/source/simpledbt/staticdbtools_s.hxx
new file mode 100644
index 000000000000..6746ad7a0918
--- /dev/null
+++ b/connectivity/source/simpledbt/staticdbtools_s.hxx
@@ -0,0 +1,207 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef CONNECTIVITY_STATIC_DBTOOLS_SIMPLE_HXX
+#define CONNECTIVITY_STATIC_DBTOOLS_SIMPLE_HXX
+
+#include <connectivity/virtualdbtools.hxx>
+#include "refbase.hxx"
+
+//........................................................................
+namespace connectivity
+{
+//........................................................................
+
+ //================================================================
+ //= ODataAccessStaticTools
+ //================================================================
+ class ODataAccessStaticTools
+ :public simple::IDataAccessTypeConversion
+ ,public simple::IDataAccessTools
+ ,public ORefBase
+ {
+ public:
+ ODataAccessStaticTools();
+
+ // IDataAccessTypeConversion
+ // ------------------------------------------------
+ virtual ::com::sun::star::util::Date getStandardDate() const;
+
+ // ------------------------------------------------
+ virtual double getValue(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn>& _rxVariant,
+ const ::com::sun::star::util::Date& rNullDate,
+ sal_Int16 nKeyType) const;
+
+ // ------------------------------------------------
+ virtual ::rtl::OUString getValue(
+ 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;
+
+ // ------------------------------------------------
+ virtual ::rtl::OUString getValue(
+ 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;
+
+ // IDataAccessTools
+ // ------------------------------------------------
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection_withFeedback(
+ const ::rtl::OUString& _rDataSourceName,
+ const ::rtl::OUString& _rUser,
+ const ::rtl::OUString& _rPwd,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory
+ ) const SAL_THROW ( (::com::sun::star::sdbc::SQLException) );
+
+ // ------------------------------------------------
+ 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::lang::XMultiServiceFactory>& _rxFactory,
+ sal_Bool _bSetAsActiveConnection
+ ) const SAL_THROW ( ( ::com::sun::star::sdbc::SQLException
+ , ::com::sun::star::lang::WrappedTargetException
+ , ::com::sun::star::uno::RuntimeException ) );
+
+ // ------------------------------------------------
+ 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_THROW ( (::com::sun::star::uno::RuntimeException) );
+
+ // ------------------------------------------------
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier> getNumberFormats(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConn,
+ sal_Bool _bAllowDefault
+ ) const;
+
+ // ------------------------------------------------
+ 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;
+
+ // ------------------------------------------------
+ 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;
+
+ // ------------------------------------------------
+ virtual ::rtl::OUString quoteName(
+ const ::rtl::OUString& _rQuote,
+ const ::rtl::OUString& _rName
+ ) const;
+
+ // ------------------------------------------------
+ virtual ::rtl::OUString composeTableNameForSelect(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
+ const ::rtl::OUString& _rCatalog,
+ const ::rtl::OUString& _rSchema,
+ const ::rtl::OUString& _rName
+ ) const;
+
+ // ------------------------------------------------
+ virtual ::rtl::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;
+
+ // ------------------------------------------------
+ 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 ::rtl::OUString& _rContextDescription,
+ const ::rtl::OUString& _rContextDetails
+ ) const;
+
+ // ------------------------------------------------
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > getDataSource(
+ const ::rtl::OUString& _rsRegisteredName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory
+ ) const;
+
+ // ------------------------------------------------
+ /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::INSERT
+ @param _rxCursorSet the property set
+ */
+ virtual sal_Bool canInsert(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const;
+
+ // ------------------------------------------------
+ /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::UPDATE
+ @param _rxCursorSet the property set
+ */
+ virtual sal_Bool canUpdate(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const;
+
+ // ------------------------------------------------
+ /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::DELETE
+ @param _rxCursorSet the property set
+ */
+ virtual sal_Bool canDelete(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const;
+
+ // ------------------------------------------------
+ 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 ::rtl::OUString& _rCommand,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _rxKeepFieldsAlive,
+ ::dbtools::SQLExceptionInfo* _pErrorInfo = NULL
+ ) SAL_THROW( ( ) );
+
+ // ------------------------------------------------
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getFieldNamesByCommandDescriptor(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
+ const sal_Int32 _nCommandType,
+ const ::rtl::OUString& _rCommand,
+ ::dbtools::SQLExceptionInfo* _pErrorInfo = NULL
+ ) SAL_THROW( ( ) );
+
+ // ------------------------------------------------
+ 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
+ );
+
+ // disambiguate IReference
+ // ------------------------------------------------
+ virtual oslInterlockedCount SAL_CALL acquire();
+ virtual oslInterlockedCount SAL_CALL release();
+ };
+
+//........................................................................
+} // namespace connectivity
+//........................................................................
+
+#endif // CONNECTIVITY_STATIC_DBTOOLS_SIMPLE_HXX
+