From b7bb34d74c5c764844f5b87483d09a61d3088695 Mon Sep 17 00:00:00 2001 From: Matthew Nicholls Date: Wed, 1 Apr 2015 15:43:32 +0100 Subject: tdf#88710 Kill svx dbtoolsclient Removes dynamic loading logic described in tdf#84315, similar thing removed in swdbtoolsclient. Change-Id: I8762102a7263e6933354c2ff6f9978929b760f6e Reviewed-on: https://gerrit.libreoffice.org/15147 Reviewed-by: David Tardon Tested-by: David Tardon --- connectivity/Library_dbtools.mk | 1 + connectivity/inc/simpledbt/charset_s.hxx | 54 +++++++++++++++++++++++++ connectivity/inc/simpledbt/parser_s.hxx | 60 ++++++++++++++++++++++++++++ connectivity/source/commontools/dbtools.cxx | 15 +++++++ connectivity/source/simpledbt/charset_s.cxx | 2 +- connectivity/source/simpledbt/charset_s.hxx | 54 ------------------------- connectivity/source/simpledbt/dbtfactory.cxx | 4 +- connectivity/source/simpledbt/parser_s.cxx | 2 +- connectivity/source/simpledbt/parser_s.hxx | 60 ---------------------------- 9 files changed, 134 insertions(+), 118 deletions(-) create mode 100644 connectivity/inc/simpledbt/charset_s.hxx create mode 100644 connectivity/inc/simpledbt/parser_s.hxx delete mode 100644 connectivity/source/simpledbt/charset_s.hxx delete mode 100644 connectivity/source/simpledbt/parser_s.hxx (limited to 'connectivity') diff --git a/connectivity/Library_dbtools.mk b/connectivity/Library_dbtools.mk index 7170dc008e49..d0fc36c842e0 100644 --- a/connectivity/Library_dbtools.mk +++ b/connectivity/Library_dbtools.mk @@ -19,6 +19,7 @@ $(eval $(call gb_Library_set_componentfile,dbtools,connectivity/source/dbtools/d $(eval $(call gb_Library_set_include,dbtools,\ $$(INCLUDE) \ + -I$(SRCDIR)/connectivity/inc \ -I$(SRCDIR)/connectivity/source/inc \ )) diff --git a/connectivity/inc/simpledbt/charset_s.hxx b/connectivity/inc/simpledbt/charset_s.hxx new file mode 100644 index 000000000000..25aa2bfc7630 --- /dev/null +++ b/connectivity/inc/simpledbt/charset_s.hxx @@ -0,0 +1,54 @@ +/* -*- 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_CHARSET_S_HXX +#define INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_CHARSET_S_HXX + +#include +#include + + +namespace connectivity +{ + + + + //= ODataAccessCharSet + + class ODataAccessCharSet : public simple::IDataAccessCharSet + { + protected: + ::dbtools::OCharsetMap m_aCharsetInfo; + + public: + ODataAccessCharSet() { } + + // IDataAccessCharSet + sal_Int32 getSupportedTextEncodings( + ::std::vector< rtl_TextEncoding >& /* [out] */ _rEncs + ) const SAL_OVERRIDE; + }; + + +} // namespace connectivity + + +#endif // INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_CHARSET_S_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/inc/simpledbt/parser_s.hxx b/connectivity/inc/simpledbt/parser_s.hxx new file mode 100644 index 000000000000..359ab25c6366 --- /dev/null +++ b/connectivity/inc/simpledbt/parser_s.hxx @@ -0,0 +1,60 @@ +/* -*- 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_PARSER_S_HXX +#define INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_PARSER_S_HXX + +#include +#include + + +namespace connectivity +{ + + + + //= OSimpleSQLParser + + class OSimpleSQLParser : public simple::ISQLParser + { + protected: + OSQLParser m_aFullParser; + + public: + OSimpleSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const IParseContext* _pContext); + + // ISQLParser + virtual ::rtl::Reference< simple::ISQLParseNode > predicateTree( + OUString& rErrorMessage, + const 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 SAL_OVERRIDE; + + virtual const IParseContext& getContext() const SAL_OVERRIDE; + }; + + +} // namespace connectivity + + +#endif // INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_PARSER_S_HXX + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 4f5e3950a573..557e4286a1a7 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -82,6 +82,9 @@ #include "resource/sharedresources.hxx" #include +#include "simpledbt/parser_s.hxx" +#include "simpledbt/charset_s.hxx" + #include #include #include @@ -1973,6 +1976,18 @@ 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/simpledbt/charset_s.cxx b/connectivity/source/simpledbt/charset_s.cxx index 2843b674e6f9..261a46a59c8f 100644 --- a/connectivity/source/simpledbt/charset_s.cxx +++ b/connectivity/source/simpledbt/charset_s.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "charset_s.hxx" +#include "simpledbt/charset_s.hxx" namespace connectivity diff --git a/connectivity/source/simpledbt/charset_s.hxx b/connectivity/source/simpledbt/charset_s.hxx deleted file mode 100644 index 25aa2bfc7630..000000000000 --- a/connectivity/source/simpledbt/charset_s.hxx +++ /dev/null @@ -1,54 +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_CHARSET_S_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_CHARSET_S_HXX - -#include -#include - - -namespace connectivity -{ - - - - //= ODataAccessCharSet - - class ODataAccessCharSet : public simple::IDataAccessCharSet - { - protected: - ::dbtools::OCharsetMap m_aCharsetInfo; - - public: - ODataAccessCharSet() { } - - // IDataAccessCharSet - sal_Int32 getSupportedTextEncodings( - ::std::vector< rtl_TextEncoding >& /* [out] */ _rEncs - ) const SAL_OVERRIDE; - }; - - -} // namespace connectivity - - -#endif // INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_CHARSET_S_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/simpledbt/dbtfactory.cxx b/connectivity/source/simpledbt/dbtfactory.cxx index cead9fab7fe8..85fca69453e7 100644 --- a/connectivity/source/simpledbt/dbtfactory.cxx +++ b/connectivity/source/simpledbt/dbtfactory.cxx @@ -20,10 +20,10 @@ #include #include +#include "simpledbt/parser_s.hxx" +#include "simpledbt/charset_s.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; diff --git a/connectivity/source/simpledbt/parser_s.cxx b/connectivity/source/simpledbt/parser_s.cxx index eddae295e7cb..e9194af045bf 100644 --- a/connectivity/source/simpledbt/parser_s.cxx +++ b/connectivity/source/simpledbt/parser_s.cxx @@ -18,7 +18,7 @@ */ #include -#include "parser_s.hxx" +#include "simpledbt/parser_s.hxx" #include "parsenode_s.hxx" using namespace ::com::sun::star::uno; diff --git a/connectivity/source/simpledbt/parser_s.hxx b/connectivity/source/simpledbt/parser_s.hxx deleted file mode 100644 index 359ab25c6366..000000000000 --- a/connectivity/source/simpledbt/parser_s.hxx +++ /dev/null @@ -1,60 +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_PARSER_S_HXX -#define INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_PARSER_S_HXX - -#include -#include - - -namespace connectivity -{ - - - - //= OSimpleSQLParser - - class OSimpleSQLParser : public simple::ISQLParser - { - protected: - OSQLParser m_aFullParser; - - public: - OSimpleSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const IParseContext* _pContext); - - // ISQLParser - virtual ::rtl::Reference< simple::ISQLParseNode > predicateTree( - OUString& rErrorMessage, - const 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 SAL_OVERRIDE; - - virtual const IParseContext& getContext() const SAL_OVERRIDE; - }; - - -} // namespace connectivity - - -#endif // INCLUDED_CONNECTIVITY_SOURCE_SIMPLEDBT_PARSER_S_HXX - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit