From 7611eaa1ef0cf89e96e1c30c92b10a7e2737b7ee Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Fri, 9 Oct 2009 08:46:48 +0000 Subject: #i105716# end chars with 0 --- connectivity/source/drivers/file/quotedstring.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'connectivity') diff --git a/connectivity/source/drivers/file/quotedstring.cxx b/connectivity/source/drivers/file/quotedstring.cxx index abd2d3b51e44..765c42eeeae2 100644 --- a/connectivity/source/drivers/file/quotedstring.cxx +++ b/connectivity/source/drivers/file/quotedstring.cxx @@ -152,7 +152,6 @@ namespace connectivity // Vorzeitiger Abbruch der Schleife moeglich, denn // wir haben, was wir wollten. nStartPos = i+1; - *pData = 0; break; } else @@ -161,6 +160,7 @@ namespace connectivity } } } // for( xub_StrLen i = nStartPos; i < nLen; ++i ) + *pData = 0; _rStr.ReleaseBufferAccess(xub_StrLen(pData - pStart)); } } -- cgit From ad7c9894af526fead64f1d134ec38172b105546f Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Tue, 13 Oct 2009 06:40:52 +0000 Subject: #i105825# throw exception when database was written by newer version --- connectivity/source/drivers/hsqldb/HDriver.cxx | 43 ++++++++++++++++++++++++ connectivity/source/drivers/hsqldb/makefile.mk | 1 + connectivity/source/inc/resource/hsqldb_res.hrc | 1 + connectivity/source/resource/conn_shared_res.src | 5 +++ 4 files changed, 50 insertions(+) (limited to 'connectivity') diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 1e80a96cf682..4c9577497525 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -55,6 +55,7 @@ #include #include #include +#include #include "resource/hsqldb_res.hrc" #include "resource/sharedresources.hxx" @@ -70,6 +71,8 @@ namespace connectivity using namespace ::com::sun::star::frame; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::embed; + using namespace ::com::sun::star::io; + using namespace ::com::sun::star::task; using namespace ::com::sun::star::reflection; namespace hsqldb @@ -260,6 +263,46 @@ namespace connectivity ); aProperties.put( "SystemProperties", Sequence< NamedValue >( &aPermittedClasses, 1 ) ); + ::rtl::OUString sProperties( RTL_CONSTASCII_USTRINGPARAM( "properties" ) ); + try + { + if ( !bIsNewDatabase && xStorage->isStreamElement(sProperties) ) + { + Reference xStream = xStorage->openStreamElement(sProperties,ElementModes::READ); + if ( xStream.is() ) + { + ::std::auto_ptr pStream( ::utl::UcbStreamHelper::CreateStream(xStream) ); + if ( pStream.get() ) + { + ByteString sLine; + while ( pStream->ReadLine(sLine) ) + { + if ( sLine.Equals("version=",0,sizeof("version=")-1) ) + { + sLine = sLine.GetToken(1,'='); + const sal_Int32 nMajor = sLine.GetToken(0,'.').ToInt32(); + const sal_Int32 nMinor = sLine.GetToken(1,'.').ToInt32(); + const sal_Int32 nMicro = sLine.GetToken(2,'.').ToInt32(); + if ( nMajor > 1 + || ( nMajor == 1 && nMinor > 8 ) + || ( nMajor == 1 && nMinor == 8 && nMicro > 0 ) ) + { + ::connectivity::SharedResources aResources; + const ::rtl::OUString sMessage = aResources.getResourceString(STR_ERROR_NEW_VERSION); + ::dbtools::throwGenericSQLException(sMessage ,*this); + } + break; + } + } + } + } // if ( xStream.is() ) + ::comphelper::disposeComponent(xStream); + } + } + catch(Exception&) + { + } + // readonly? Reference xProp(xStorage,UNO_QUERY); if ( xProp.is() ) diff --git a/connectivity/source/drivers/hsqldb/makefile.mk b/connectivity/source/drivers/hsqldb/makefile.mk index 9ed5acb17d4c..c61e4b297ba4 100644 --- a/connectivity/source/drivers/hsqldb/makefile.mk +++ b/connectivity/source/drivers/hsqldb/makefile.mk @@ -102,6 +102,7 @@ SHL1STDLIBS=\ $(DBTOOLSLIB) \ $(JVMFWKLIB) \ $(COMPHELPERLIB) \ + $(TOOLSLIB) \ $(UNOTOOLSLIB) diff --git a/connectivity/source/inc/resource/hsqldb_res.hrc b/connectivity/source/inc/resource/hsqldb_res.hrc index 3b7b9ef15c0a..b9066488d425 100644 --- a/connectivity/source/inc/resource/hsqldb_res.hrc +++ b/connectivity/source/inc/resource/hsqldb_res.hrc @@ -44,6 +44,7 @@ #define STR_NO_TABLE_EDITOR_DIALOG ( STR_HSQLDB_BASE + 3 ) #define STR_NO_TABLENAME ( STR_HSQLDB_BASE + 4 ) #define STR_NO_DOCUMENTUI ( STR_HSQLDB_BASE + 5 ) +#define STR_ERROR_NEW_VERSION ( STR_HSQLDB_BASE + 6 ) #endif // CONNECTIVITY_RESOURCE_HSQLDB_HRC diff --git a/connectivity/source/resource/conn_shared_res.src b/connectivity/source/resource/conn_shared_res.src index d143dad1ba0f..48ab06f0f635 100644 --- a/connectivity/source/resource/conn_shared_res.src +++ b/connectivity/source/resource/conn_shared_res.src @@ -645,3 +645,8 @@ String STR_NO_DOCUMENTUI { Text [ en-US ] = "The provided DocumentUI is not allowed to be NULL."; }; +String STR_ERROR_NEW_VERSION +{ + Text = "The connection could not be established. The database was created by a newer version of %PRODUCTNAME."; +}; + -- cgit From 99efc0ba1f080e9d04d7c2035cb0d92d7b8e448b Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Wed, 14 Oct 2009 18:48:09 +0000 Subject: CWS-TOOLING: integrate CWS dba32h 2009-10-12 12:21:44 +0200 msc r276827 : remove warning for issue 102712 because the issue is fixed 2009-10-05 07:14:20 +0200 oj r276658 : #105585# add missing dependency for OOO_UI 2009-10-02 12:50:19 +0200 fs r276632 : #i105505# If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized. In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl call attachResource. This ensures that the model is initialized completely, including firing the necessary events. 2009-10-02 12:46:12 +0200 fs r276631 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document 2009-10-01 13:09:07 +0200 fs r276596 : do not rely on the name 'Standard' for the one and only form in a document 2009-10-01 12:35:56 +0200 fs r276589 : #i105509# don't rely on default form component names, use indexes 2009-10-01 11:19:18 +0200 fs r276584 : copying the fix for #i105082# into this CWS 2009-10-01 11:13:22 +0200 fs r276583 : improved logs 2009-10-01 11:10:44 +0200 fs r276581 : #i105505# 2009-10-01 08:07:57 +0200 fs r276575 : manual merge of trunk, to allow cwslocalize to run 2009-09-30 22:48:30 +0200 fs r276574 : removed that strange ONLOAD definition 2009-09-30 12:58:18 +0200 fs r276553 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS 2009-09-30 12:56:45 +0200 fs r276552 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS 2009-09-30 11:47:45 +0200 fs r276549 : #i105235# 2009-09-29 12:27:40 +0200 fs r276521 : #i105367# 2009-09-28 12:08:17 +0200 oj r276485 : #i105371# export version in manifest.xml as well 2009-09-28 12:07:02 +0200 oj r276484 : #i105371# export version in manifest.xml as well 2009-09-28 09:48:01 +0200 oj r276481 : #i105366# init drivers when not empty 2009-09-25 14:31:27 +0200 fs r276466 : CWS-TOOLING: rebase CWS dba32h to trunk@276429 (milestone: DEV300:m60) 2009-09-24 13:52:54 +0200 fs r276422 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document) 2009-09-24 11:42:03 +0200 fs r276413 : #i105234# proper zoom handling for the nav bar 2009-09-24 11:41:40 +0200 fs r276412 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double 2009-09-23 12:21:22 +0200 oj r276377 : remove dos lineends 2009-09-23 11:44:52 +0200 oj r276376 : #i105216# load config on demand 2009-09-23 11:44:19 +0200 oj r276375 : #i105216# load config on demand 2009-09-23 11:43:35 +0200 oj r276374 : #i105216# load config on demand 2009-09-21 09:13:03 +0200 oj r276307 : #i105158# use Thread support 2009-09-18 13:06:50 +0200 fs r276277 : #i105147# 2009-09-18 11:48:23 +0200 oj r276271 : #i105158# new method for thread safety 2009-09-18 10:42:56 +0200 fs r276266 : CWS-TOOLING: rebase CWS dba32h to trunk@276192 (milestone: DEV300:m59) 2009-09-18 08:30:03 +0200 oj r276263 : #i105016# load correct ldap so 2009-09-17 13:42:31 +0200 oj r276240 : change count of check boxes 2009-09-17 13:32:59 +0200 oj r276239 : revert false to true for currency 2009-09-17 09:14:46 +0200 oj r276220 : #i104901# add patch for every issue 2009-09-17 09:10:29 +0200 oj r276219 : #i104901# add patch for every issue 2009-09-11 13:47:49 +0200 oj r276060 : #i104901# fix for indentity 2009-09-11 12:14:14 +0200 fs r276056 : #i104594# allow to render controls without an SdrPageView 2009-09-11 11:49:31 +0200 fs r276055 : CWS-TOOLING: rebase CWS dba32h to trunk@276043 (milestone: DEV300:m58) 2009-09-10 08:41:40 +0200 oj r276021 : #i104911# export variable-set not for repeating sections --- connectivity/inc/connectivity/DriversConfig.hxx | 179 +++++++++++----------- connectivity/inc/connectivity/dbmetadata.hxx | 6 + connectivity/source/commontools/DriversConfig.cxx | 60 ++++---- connectivity/source/commontools/dbmetadata.cxx | 16 ++ connectivity/source/drivers/jdbc/jdbc.xcu | 2 +- 5 files changed, 147 insertions(+), 116 deletions(-) (limited to 'connectivity') diff --git a/connectivity/inc/connectivity/DriversConfig.hxx b/connectivity/inc/connectivity/DriversConfig.hxx index bd86e9ce4397..da68443bb68e 100755 --- a/connectivity/inc/connectivity/DriversConfig.hxx +++ b/connectivity/inc/connectivity/DriversConfig.hxx @@ -1,92 +1,95 @@ -/************************************************************************* - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: makefile,v $ - * - * $Revision: 1.1 $ - * - * last change: $Author: st $ $Date: 2000/11/22 02:32:00 $ - * - * The Contents of this file are made available subject to - * the terms of GNU Lesser General Public License Version 2.1. - * - * - * GNU Lesser General Public License Version 2.1 - * ============================================= - * Copyright 2005 by Sun Microsystems, Inc. - * 901 San Antonio Road, Palo Alto, CA 94303, USA - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software Foundation. - * - * This library 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 for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - * - ************************************************************************/ -#ifndef CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED -#define CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED - -#include -#include -#include -#include -#include "connectivity/dbtoolsdllapi.hxx" -#include -#include -#include - -namespace connectivity -{ - typedef struct - { - ::comphelper::NamedValueCollection aProperties; - ::comphelper::NamedValueCollection aFeatures; - ::comphelper::NamedValueCollection aMetaData; - ::rtl::OUString sDriverFactory; - ::rtl::OUString sDriverTypeDisplayName; - } TInstalledDriver; - DECLARE_STL_USTRINGACCESS_MAP( TInstalledDriver, TInstalledDrivers); - +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: makefile,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: st $ $Date: 2000/11/22 02:32:00 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ +#ifndef CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED +#define CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED + +#include +#include +#include +#include +#include "connectivity/dbtoolsdllapi.hxx" +#include +#include +#include + +namespace connectivity +{ + typedef struct + { + ::comphelper::NamedValueCollection aProperties; + ::comphelper::NamedValueCollection aFeatures; + ::comphelper::NamedValueCollection aMetaData; + ::rtl::OUString sDriverFactory; + ::rtl::OUString sDriverTypeDisplayName; + } TInstalledDriver; + DECLARE_STL_USTRINGACCESS_MAP( TInstalledDriver, TInstalledDrivers); + class DriversConfigImpl { - ::utl::OConfigurationTreeRoot m_aInstalled; + mutable ::utl::OConfigurationTreeRoot m_aInstalled; + mutable TInstalledDrivers m_aDrivers; + void Load(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB) const; public: DriversConfigImpl(); - void Load(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,TInstalledDrivers& _rDrivers); - }; - // - // Allows to access all driver which are located in the configuration - // - class OOO_DLLPUBLIC_DBTOOLS DriversConfig - { - typedef salhelper::SingletonRef OSharedConfigNode; - - const ::comphelper::NamedValueCollection& impl_get(const ::rtl::OUString& _sURL,sal_Int32 _nProps) const; - public: - DriversConfig(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); - ~DriversConfig(); - - DriversConfig( const DriversConfig& ); - DriversConfig& operator=( const DriversConfig& ); - - ::rtl::OUString getDriverFactoryName(const ::rtl::OUString& _sUrl) const; - ::rtl::OUString getDriverTypeDisplayName(const ::rtl::OUString& _sUrl) const; - const ::comphelper::NamedValueCollection& getProperties(const ::rtl::OUString& _sURL) const; - const ::comphelper::NamedValueCollection& getFeatures(const ::rtl::OUString& _sURL) const; - const ::comphelper::NamedValueCollection& getMetaData(const ::rtl::OUString& _sURL) const; - ::com::sun::star::uno::Sequence< ::rtl::OUString > getURLs() const; - private: - TInstalledDrivers m_aDrivers; - OSharedConfigNode m_aNode; - }; -} -#endif // CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED + + const TInstalledDrivers& getInstalledDrivers(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB) const { Load(_rxORB); return m_aDrivers; } + }; + // + // Allows to access all driver which are located in the configuration + // + class OOO_DLLPUBLIC_DBTOOLS DriversConfig + { + typedef salhelper::SingletonRef OSharedConfigNode; + + const ::comphelper::NamedValueCollection& impl_get(const ::rtl::OUString& _sURL,sal_Int32 _nProps) const; + public: + DriversConfig(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); + ~DriversConfig(); + + DriversConfig( const DriversConfig& ); + DriversConfig& operator=( const DriversConfig& ); + + ::rtl::OUString getDriverFactoryName(const ::rtl::OUString& _sUrl) const; + ::rtl::OUString getDriverTypeDisplayName(const ::rtl::OUString& _sUrl) const; + const ::comphelper::NamedValueCollection& getProperties(const ::rtl::OUString& _sURL) const; + const ::comphelper::NamedValueCollection& getFeatures(const ::rtl::OUString& _sURL) const; + const ::comphelper::NamedValueCollection& getMetaData(const ::rtl::OUString& _sURL) const; + ::com::sun::star::uno::Sequence< ::rtl::OUString > getURLs() const; + private: + OSharedConfigNode m_aNode; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB; + }; +} +#endif // CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED diff --git a/connectivity/inc/connectivity/dbmetadata.hxx b/connectivity/inc/connectivity/dbmetadata.hxx index 32662c5c157a..1ee1718247ae 100644 --- a/connectivity/inc/connectivity/dbmetadata.hxx +++ b/connectivity/inc/connectivity/dbmetadata.hxx @@ -177,6 +177,12 @@ namespace dbtools /** determines whether in the application UI, empty table folders (aka catalogs/schemas) should be displayed */ bool displayEmptyTableFolders() const; + + /** determines that threads are supported. + * + * \return when threads are supported, otherwise + */ + bool supportsThreads() const; }; //........................................................................ diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx index a72816d6427b..30c822b6f169 100755 --- a/connectivity/source/commontools/DriversConfig.cxx +++ b/connectivity/source/commontools/DriversConfig.cxx @@ -112,32 +112,35 @@ DriversConfigImpl::DriversConfigImpl() { } // ----------------------------------------------------------------------------- -void DriversConfigImpl::Load(const uno::Reference< lang::XMultiServiceFactory >& _rxORB,TInstalledDrivers& _rDrivers) +void DriversConfigImpl::Load(const uno::Reference< lang::XMultiServiceFactory >& _rxORB) const { - if ( !m_aInstalled.isValid() ) + if ( m_aDrivers.empty() ) { - static const ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess.Drivers/Installed")); ///Installed - m_aInstalled = ::utl::OConfigurationTreeRoot::createWithServiceFactory(_rxORB, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY); - } - - if ( m_aInstalled.isValid() ) - { - const uno::Sequence< ::rtl::OUString > aURLPatterns = m_aInstalled.getNodeNames(); - const ::rtl::OUString* pPatternIter = aURLPatterns.getConstArray(); - const ::rtl::OUString* pPatternEnd = pPatternIter + aURLPatterns.getLength(); - for (;pPatternIter != pPatternEnd ; ++pPatternIter) + if ( !m_aInstalled.isValid() ) { - TInstalledDriver aInstalledDriver; - lcl_readURLPatternNode(m_aInstalled,*pPatternIter,aInstalledDriver); - if ( aInstalledDriver.sDriverFactory.getLength() ) - _rDrivers.insert(TInstalledDrivers::value_type(*pPatternIter,aInstalledDriver)); + static const ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess.Drivers/Installed")); ///Installed + m_aInstalled = ::utl::OConfigurationTreeRoot::createWithServiceFactory(_rxORB, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY); } + + if ( m_aInstalled.isValid() ) + { + const uno::Sequence< ::rtl::OUString > aURLPatterns = m_aInstalled.getNodeNames(); + const ::rtl::OUString* pPatternIter = aURLPatterns.getConstArray(); + const ::rtl::OUString* pPatternEnd = pPatternIter + aURLPatterns.getLength(); + for (;pPatternIter != pPatternEnd ; ++pPatternIter) + { + TInstalledDriver aInstalledDriver; + lcl_readURLPatternNode(m_aInstalled,*pPatternIter,aInstalledDriver); + if ( aInstalledDriver.sDriverFactory.getLength() ) + m_aDrivers.insert(TInstalledDrivers::value_type(*pPatternIter,aInstalledDriver)); + } + } // if ( m_aInstalled.isValid() ) } } // ----------------------------------------------------------------------------- DriversConfig::DriversConfig(const uno::Reference< lang::XMultiServiceFactory >& _rxORB) +:m_xORB(_rxORB) { - m_aNode->Load(_rxORB,m_aDrivers); } // ----------------------------------------------------------------------------- @@ -156,7 +159,6 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs ) { if ( this != &_rhs ) { - m_aDrivers = _rhs.m_aDrivers; m_aNode = _rhs.m_aNode; } return *this; @@ -165,10 +167,11 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs ) // ----------------------------------------------------------------------------- ::rtl::OUString DriversConfig::getDriverFactoryName(const ::rtl::OUString& _sURL) const { + const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); ::rtl::OUString sRet; ::rtl::OUString sOldPattern; - TInstalledDrivers::const_iterator aIter = m_aDrivers.begin(); - TInstalledDrivers::const_iterator aEnd = m_aDrivers.end(); + TInstalledDrivers::const_iterator aIter = rDrivers.begin(); + TInstalledDrivers::const_iterator aEnd = rDrivers.end(); for(;aIter != aEnd;++aIter) { WildCard aWildCard(aIter->first); @@ -184,10 +187,11 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs ) // ----------------------------------------------------------------------------- ::rtl::OUString DriversConfig::getDriverTypeDisplayName(const ::rtl::OUString& _sURL) const { + const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); ::rtl::OUString sRet; ::rtl::OUString sOldPattern; - TInstalledDrivers::const_iterator aIter = m_aDrivers.begin(); - TInstalledDrivers::const_iterator aEnd = m_aDrivers.end(); + TInstalledDrivers::const_iterator aIter = rDrivers.begin(); + TInstalledDrivers::const_iterator aEnd = rDrivers.end(); for(;aIter != aEnd;++aIter) { WildCard aWildCard(aIter->first); @@ -218,10 +222,11 @@ const ::comphelper::NamedValueCollection& DriversConfig::getMetaData(const ::rtl // ----------------------------------------------------------------------------- const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const ::rtl::OUString& _sURL,sal_Int32 _nProps) const { + const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); const ::comphelper::NamedValueCollection* pRet = NULL; ::rtl::OUString sOldPattern; - TInstalledDrivers::const_iterator aIter = m_aDrivers.begin(); - TInstalledDrivers::const_iterator aEnd = m_aDrivers.end(); + TInstalledDrivers::const_iterator aIter = rDrivers.begin(); + TInstalledDrivers::const_iterator aEnd = rDrivers.end(); for(;aIter != aEnd;++aIter) { WildCard aWildCard(aIter->first); @@ -252,10 +257,11 @@ const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const ::rtl::O // ----------------------------------------------------------------------------- uno::Sequence< ::rtl::OUString > DriversConfig::getURLs() const { - uno::Sequence< ::rtl::OUString > aRet(m_aDrivers.size()); + const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); + uno::Sequence< ::rtl::OUString > aRet(rDrivers.size()); ::rtl::OUString* pIter = aRet.getArray(); - TInstalledDrivers::const_iterator aIter = m_aDrivers.begin(); - TInstalledDrivers::const_iterator aEnd = m_aDrivers.end(); + TInstalledDrivers::const_iterator aIter = rDrivers.begin(); + TInstalledDrivers::const_iterator aEnd = rDrivers.end(); for(;aIter != aEnd;++aIter,++pIter) { *pIter = aIter->first; diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx index 70220b1cd563..c5b65a9d113b 100644 --- a/connectivity/source/commontools/dbmetadata.cxx +++ b/connectivity/source/commontools/dbmetadata.cxx @@ -407,6 +407,22 @@ namespace dbtools #endif return doDisplay; } + //-------------------------------------------------------------------- + bool DatabaseMetaData::supportsThreads() const + { + bool bSupported( true ); + try + { + Reference< XDatabaseMetaData > xMeta( m_pImpl->xConnectionMetaData, UNO_SET_THROW ); + ::rtl::OUString sConnectionURL( xMeta->getURL() ); + bSupported = sConnectionURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "sdbc:mysql:mysqlc" ) ) != 0; + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return bSupported; + } //........................................................................ } // namespace dbtools diff --git a/connectivity/source/drivers/jdbc/jdbc.xcu b/connectivity/source/drivers/jdbc/jdbc.xcu index 73fe2e9adc55..ae1bbad227e7 100755 --- a/connectivity/source/drivers/jdbc/jdbc.xcu +++ b/connectivity/source/drivers/jdbc/jdbc.xcu @@ -174,7 +174,7 @@ - false + true -- cgit From 9543c83ef655a978a66634e71267c26837a122cf Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Wed, 28 Oct 2009 07:12:38 +0000 Subject: #i105825# try catch in the wrong place --- connectivity/source/drivers/hsqldb/HDriver.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 4c9577497525..7e97d27e1d86 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -263,7 +263,8 @@ namespace connectivity ); aProperties.put( "SystemProperties", Sequence< NamedValue >( &aPermittedClasses, 1 ) ); - ::rtl::OUString sProperties( RTL_CONSTASCII_USTRINGPARAM( "properties" ) ); + const ::rtl::OUString sProperties( RTL_CONSTASCII_USTRINGPARAM( "properties" ) ); + ::rtl::OUString sMessage; try { if ( !bIsNewDatabase && xStorage->isStreamElement(sProperties) ) @@ -288,8 +289,7 @@ namespace connectivity || ( nMajor == 1 && nMinor == 8 && nMicro > 0 ) ) { ::connectivity::SharedResources aResources; - const ::rtl::OUString sMessage = aResources.getResourceString(STR_ERROR_NEW_VERSION); - ::dbtools::throwGenericSQLException(sMessage ,*this); + sMessage = aResources.getResourceString(STR_ERROR_NEW_VERSION); } break; } @@ -302,6 +302,10 @@ namespace connectivity catch(Exception&) { } + if ( sMessage.getLength() ) + { + ::dbtools::throwGenericSQLException(sMessage ,*this); + } // readonly? Reference xProp(xStorage,UNO_QUERY); -- cgit From fc02f9b3673187ccada1a09f79ad042065578af0 Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Fri, 30 Oct 2009 13:46:50 +0000 Subject: #i105959# replace boolean_term with search_condition and add extra () --- connectivity/source/parse/sqlnode.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index a1fd44014314..8d869c2dea0a 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -2074,18 +2074,18 @@ void OSQLParseNode::absorptions(OSQLParseNode*& pSearchCondition) if ( SQL_ISRULE(p2ndSearch,boolean_primary) ) p2ndSearch = p2ndSearch->getChild(1); - if ( *p2ndSearch->getChild(0) == *pSearchCondition->getChild(2-nPos) ) + if ( *p2ndSearch->getChild(0) == *pSearchCondition->getChild(2-nPos) ) // a and ( a or b) -> a or b { pNewNode = pSearchCondition->removeAt((sal_uInt32)0); replaceAndReset(pSearchCondition,pNewNode); } - else if ( *p2ndSearch->getChild(2) == *pSearchCondition->getChild(2-nPos) ) + else if ( *p2ndSearch->getChild(2) == *pSearchCondition->getChild(2-nPos) ) // a and ( b or a) -> a or b { pNewNode = pSearchCondition->removeAt((sal_uInt32)2); replaceAndReset(pSearchCondition,pNewNode); } - else if ( p2ndSearch->getByRule(OSQLParseNode::boolean_term) ) + else if ( p2ndSearch->getByRule(OSQLParseNode::search_condition) ) { // a and ( b or c ) -> ( a and b ) or ( a and c ) // ( b or c ) and a -> ( a and b ) or ( a and c ) @@ -2096,7 +2096,13 @@ void OSQLParseNode::absorptions(OSQLParseNode*& pSearchCondition) OSQLParseNode* p1stAnd = MakeANDNode(pA,pB); OSQLParseNode* p2ndAnd = MakeANDNode(new OSQLParseNode(*pA),pC); pNewNode = MakeORNode(p1stAnd,p2ndAnd); - replaceAndReset(pSearchCondition,pNewNode); + OSQLParseNode* pNode = new OSQLParseNode(::rtl::OUString(),SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::boolean_primary)); + pNode->append(new OSQLParseNode(::rtl::OUString::createFromAscii("("),SQL_NODE_PUNCTUATION)); + pNode->append(pNewNode); + pNode->append(new OSQLParseNode(::rtl::OUString::createFromAscii(")"),SQL_NODE_PUNCTUATION)); + OSQLParseNode::eraseBraces(p1stAnd); + OSQLParseNode::eraseBraces(p2ndAnd); + replaceAndReset(pSearchCondition,pNode); } } // a or a and b || a or b and a -- cgit From d5c799bd36d600f4ebbce76f12333324bc1f6c09 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Fri, 27 Nov 2009 12:39:32 +0000 Subject: dba33a: summary migration from SVN 2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test 2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test 2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ... 2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in 2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs) 2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing 2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing 2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript 2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test 2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test 2009-11-03 14:25:44 +0000 fs r277324 : #i10000# 2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs 2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ... 2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM) 2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion 2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense 2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE 2009-10-21 07:08:35 +0000 fs r277075 : spare useless call 2009-10-20 21:26:31 +0000 fs r277072 : #i10000# 2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62) 2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch 2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks. 2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk) 2009-10-15 12:52:39 +0000 fs r276939 : #i10000# 2009-10-15 12:44:26 +0000 fs r276938 : #i10000# 2009-10-15 12:00:33 +0000 fs r276936 : #i10000# 2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg 2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const 2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#: introduce an option to the layout manager to preserve, if possible, the size of the content window when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing. (the option is incompatible with in-place editing, anyway) This is because such embedded objects couple the (content) window size to the VisAreaSize, in that both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize, and restores it upon next open. This, however, leads to different content window sizes when the window is closed with another toolbar set than used during opening. This patch here prevents those different content window sizes. Also, now the content window size doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content window size stays the same, and the container window size is adjusted. 2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows 2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable) 2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows 2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service 2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist 2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties 2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified 2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command 2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol 2009-10-07 12:59:17 +0000 fs r276754 : #i87693# 2009-10-07 11:19:22 +0000 fs r276752 : #i10000# 2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller) 2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for issue #i105371# 2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for issue #i105371# 2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion 2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol 2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release: when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing the ref count, again. This ensures that our adapter cannot create references to the dying object anymore. (A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous release/dispose/destroy pattern, namely WeakComponentImplHelperBase) 2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying 2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool) 2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked 2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails 2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet revealed some inconsistencies, in whether the objects are cached by their URL, or by their registration name. This has been changed to caching by registration name. 2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case 2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed 2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable (timing-dependent) results/failures. Instead, every test sets up a new odb file. Also, did some re-factoring, improved the cleanup code, and caught a few more errors. 2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now 2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose 2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now 2009-10-06 12:49:22 +0000 fs r276707 : typo 2009-10-06 12:49:03 +0000 fs r276706 : typo 2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class 2009-10-06 12:48:02 +0000 fs r276704 : typo 2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably 2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence 2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope 2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create 2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope 2009-10-05 09:46:17 +0000 fs r276671 : #i10000# 2009-10-05 08:43:58 +0000 fs r276664 : #i105505# release: dispose the (base classes) weak connection point before disposing ourself, and in particular before temporarily incrementing our ref count, again. This way, we prevent that a separate thread re-surrects us (using the weak connection point's queryAdapted) while we're in the process of destruction 2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release) 2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead 2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics 2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants 2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign 2009-10-04 19:53:30 +0000 fs r276657 : #105560# remove unused code thanks to cmc@openoffice.org for submitting the patch 2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc) 2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60) 2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ... 2009-10-02 10:52:24 +0000 fs r276634 : #i105505# If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized. In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl call attachResource. This ensures that the model is initialized completely, including firing the necessary events. 2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document 2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document 2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes 2009-10-01 09:12:20 +0000 fs r276582 : #i105505# 2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion 2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods 2009-09-30 06:35:59 +0000 fs r276538 : #i10000# 2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113# 2009-09-29 10:27:10 +0000 fs r276520 : #i105367# 2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles 2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc 2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE... 2009-09-28 20:53:36 +0000 fs r276503 : #i104117# cleaned up the mess with help IDs in module extensions. Formerly, extensions used to use help IDs which were declared in module svx, and vice versa. Also, help ID ranges were not respected. 2009-09-28 11:25:36 +0000 fs r276489 : typo 2009-09-28 11:25:10 +0000 fs r276488 : #i105235# 2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document) 2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar 2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double 2009-09-16 11:11:43 +0000 fs r276195 : #i105082# consolidated the sub storage handling, by delegating more functionality into the DocumentStorageAccess class. As a result, there won't be that many unnecessary commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages and DocumentStorageAccess::m_aExposedStorages) have been consolidated. This is not really part of the fix of issue 105082, but it helped reducing the calls to the storage/package implementation. 2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures) 2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved 2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error 2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS 2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models 2009-09-14 10:33:02 +0000 fs r276106 : removed dead file 2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor 2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text 2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g) --- .../qa/connectivity/tools/DbaseDatabase.java | 3 +- .../qa/connectivity/tools/HsqlDatabase.java | 3 +- .../source/commontools/TDatabaseMetaDataBase.cxx | 4 +- .../source/drivers/mozab/bootstrap/makefile.mk | 113 ++---------------- connectivity/source/drivers/mozab/makefile.mk | 44 +++---- .../source/drivers/mozab/makefile_mozab.mk | 128 +++++++++++++++++++++ .../source/drivers/mozab/mozillasrc/makefile.mk | 101 +--------------- 7 files changed, 166 insertions(+), 230 deletions(-) create mode 100644 connectivity/source/drivers/mozab/makefile_mozab.mk (limited to 'connectivity') diff --git a/connectivity/qa/connectivity/tools/DbaseDatabase.java b/connectivity/qa/connectivity/tools/DbaseDatabase.java index 9c1d6ea47411..8846c3995f56 100755 --- a/connectivity/qa/connectivity/tools/DbaseDatabase.java +++ b/connectivity/qa/connectivity/tools/DbaseDatabase.java @@ -65,7 +65,8 @@ public class DbaseDatabase extends AbstractDatabase private void createDBDocument() throws Exception { final File documentFile = File.createTempFile("dbase", ".odb"); - documentFile.deleteOnExit(); + if ( documentFile.exists() ) + documentFile.delete(); final File subPath = new File(documentFile.getParent() + File.separator + documentFile.getName().replaceAll(".odb", "") + File.separator ); subPath.mkdir(); //subPath.deleteOnExit(); diff --git a/connectivity/qa/connectivity/tools/HsqlDatabase.java b/connectivity/qa/connectivity/tools/HsqlDatabase.java index d27816cf4b7e..593a5ad95981 100644 --- a/connectivity/qa/connectivity/tools/HsqlDatabase.java +++ b/connectivity/qa/connectivity/tools/HsqlDatabase.java @@ -71,7 +71,8 @@ public class HsqlDatabase extends AbstractDatabase private void createDBDocument() throws Exception { final File documentFile = File.createTempFile("testdb", ".odb"); - documentFile.deleteOnExit(); + if ( documentFile.exists() ) + documentFile.delete(); m_databaseDocumentFile = URLHelper.getFileURLFromSystemPath(documentFile); m_databaseDocument = (XOfficeDatabaseDocument) UnoRuntime.queryInterface( diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx index b3cbb4ae67c7..4c3f3db8b754 100644 --- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx +++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx @@ -145,6 +145,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) throw(SQ } } + ::connectivity::ODatabaseMetaDataResultSet::ORows aTypeInfoRows; while( xRet->next() ) { ::connectivity::ODatabaseMetaDataResultSet::ORow aRow; @@ -169,8 +170,9 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) throw(SQ else ++aIter; } - m_aTypeInfoRows.push_back(aRow); + aTypeInfoRows.push_back(aRow); } + m_aTypeInfoRows = aTypeInfoRows; } } ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo); diff --git a/connectivity/source/drivers/mozab/bootstrap/makefile.mk b/connectivity/source/drivers/mozab/bootstrap/makefile.mk index 9b4b05868cd2..00f76ddeb8fd 100644 --- a/connectivity/source/drivers/mozab/bootstrap/makefile.mk +++ b/connectivity/source/drivers/mozab/bootstrap/makefile.mk @@ -30,37 +30,35 @@ #************************************************************************* CALL_CDECL=TRUE -#mozilla specific stuff. -MOZ_LIB=$(SOLARVERSION)$/$(INPATH)$/lib$(UPDMINOREXT) -MOZ_INC=$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla -#End of mozilla specific stuff. - PRJ=..$/..$/..$/.. PRJINC=..$/..$/.. PRJNAME=connectivity TARGET=mozbootstrap -USE_DEFFILE=TRUE -ENABLE_EXCEPTIONS=TRUE -VISIBILITY_HIDDEN=TRUE - .IF "$(OS)" == "OS2" all: @echo " Not building under OS/2" .ENDIF # --- Settings ---------------------------------- -.IF "$(DBGUTIL_OJ)"!="" -ENVCFLAGS+=/FR$(SLO)$/ -.ENDIF +USE_DEFFILE=TRUE +ENABLE_EXCEPTIONS=TRUE +VISIBILITY_HIDDEN=TRUE + +# --- begin of mozilla specific stuff +MOZ_LIB=$(SOLARVERSION)$/$(INPATH)$/lib$(UPDMINOREXT) +MOZ_INC=$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla +# --- end of mozilla specific stuff .INCLUDE : settings.mk .INCLUDE : $(PRJ)$/version.mk +.INCLUDE : ../makefile_mozab.mk + +INCPRE += -I../mozillasrc -#mozilla specific stuff. # --- Files ------------------------------------- SLOFILES += \ @@ -93,95 +91,6 @@ SLOFILES += \ $(SLO)$/MNSProfileDirServiceProvider.obj .ENDIF -CDEFS += -DMOZILLA_INTERNAL_API - -.IF "$(GUI)"=="UNX" -.IF "$(COMNAME)"=="sunpro5" -CFLAGS += -features=tmplife -#This flag is needed to build mozilla 1.7 code -.ENDIF # "$(COMNAME)"=="sunpro5" -.ENDIF - -MOZINC = . -I.. -I..$/mozillasrc -I$(MOZ_INC) -I$(MOZ_INC)$/nspr -I$(MOZ_INC)$/xpcom \ - -I$(MOZ_INC)$/string -I$(MOZ_INC)$/rdf -I$(MOZ_INC)$/msgbase \ - -I$(MOZ_INC)$/addrbook -I$(MOZ_INC)$/mork -I$(MOZ_INC)$/locale \ - -I$(MOZ_INC)$/pref -I$(MOZ_INC)$/mime -I$(MOZ_INC)$/chrome \ - -I$(MOZ_INC)$/necko -I$(MOZ_INC)$/intl -I$(MOZ_INC)$/profile \ - -I$(MOZ_INC)$/embed_base -I$(MOZ_INC)$/mozldap -I$(MOZ_INC)$/uconv\ - -I$(MOZ_INC)$/xpcom_obsolete -I$(MOZ_INC)$/content - -.IF "$(GUI)" == "WNT" -.IF "$(COM)" == "GCC" -INCPOST += $(MOZINC) -CDEFS += -DWINVER=0x400 -DMOZILLA_CLIENT \ - -DNS_NET_FILE -DCookieManagement -DSingleSignon -DClientWallet \ - -DTRACING -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS \ - -DNS_MT_SUPPORTED -DNETLIB_THREAD \ - -DOJI -DWIN32 -D_X86_ -D_WINDOWS \ - -DMOZ_XUL -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP \ - -DNSPR20 -DOS_HAS_DLL -DNO_JNI_STUBS \ - -DNETSCAPE -DMOZILLA_CLIENT -DJS_THREADSAFE -DNECKO -DINCLUDE_XUL -CFLAGSCXX += \ - -fno-rtti -Wall -Wconversion -Wpointer-arith \ - -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -.ELSE -.IF "$(DBG_LEVEL)" == "0" -INCPRE += $(MOZINC) -CDEFS += -DWINVER=0x400 -DMOZILLA_CLIENT \ - -DNS_NET_FILE -DCookieManagement -DSingleSignon -DClientWallet \ - -DTRACING -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS \ - -DDMSVC4 -DNS_MT_SUPPORTED -DNETLIB_THREAD \ - -DOJI -DWIN32 -D_X86_ -D_WINDOWS \ - -DMOZ_XUL -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP \ - -DNSPR20 -DOS_HAS_DLL -DNO_JNI_STUBS \ - -DNETSCAPE -DMOZILLA_CLIENT -DJS_THREADSAFE -DNECKO -DINCLUDE_XUL \ - -UDEBUG -CFLAGS += -GR- -W3 -Gy -MD -UDEBUG -.ELSE -INCPRE += $(MOZINC) -CDEFS += -DWINVER=0x400 -DMOZILLA_CLIENT \ - -DNS_NET_FILE -DCookieManagement -DSingleSignon -DClientWallet \ - -DTRACING -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS \ - -DDMSVC4 -DDEVELOPER_DEBUG -DNS_MT_SUPPORTED -DNETLIB_THREAD \ - -DOJI -DWIN32 -D_X86_ -D_WINDOWS \ - -DMOZ_XUL -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP \ - -DDEBUG_Administrator -DNSPR20 -DOS_HAS_DLL -DNO_JNI_STUBS \ - -DNETSCAPE -DMOZILLA_CLIENT -DJS_THREADSAFE -DNECKO -DINCLUDE_XUL \ - -UDEBUG -CFLAGS += -Zi -GR- -W3 -Gy -MDd -UDEBUG -.IF "$(CCNUMVER)" >= "001399999999" -CDEFS += -D_STL_NOFORCE_MANIFEST -.ENDIF -.ENDIF -.ENDIF -.ENDIF -.IF "$(GUI)" == "UNX" -INCPOST += $(MOZINC) -CDEFS+= -DMOZILLA_CLIENT \ - -DXP_UNIX -.IF "$(OS)" == "LINUX" -CFLAGS += -fPIC -g -CDEFS+= -DOJI - -CFLAGSCXX += \ - -fno-rtti -Wconversion -Wpointer-arith \ - -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -pthread -CDEFS += -DTRACING -.ELIF "$(OS)" == "NETBSD" || "$(OS)" == "MACOSX" -CFLAGS += -fPIC -CFLAGSCXX += \ - -fno-rtti -Wconversion -Wpointer-arith \ - -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -Wno-deprecated -CDEFS += -DTRACING -.ENDIF - -SHL1TARGET_NAME=$(TARGET)$(MOZAB_MAJOR) - -.ENDIF # MACOSX - # --- Targets ---------------------------------- .INCLUDE : target.mk diff --git a/connectivity/source/drivers/mozab/makefile.mk b/connectivity/source/drivers/mozab/makefile.mk index 677e605096c4..76161dc32119 100644 --- a/connectivity/source/drivers/mozab/makefile.mk +++ b/connectivity/source/drivers/mozab/makefile.mk @@ -43,38 +43,28 @@ all: @echo " see http://www.mozilla.org/issues/show_bug.cgi?id=91209" .ENDIF -#mozilla specific stuff. +# --- begin of mozilla specific stuff MOZ_LIB=$(SOLARVERSION)$/$(INPATH)$/lib$(UPDMINOREXT) MOZ_INC=$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla .IF "$(OS)"=="WNT" -.IF "$(USE_SHELL)"=="4nt" -MOZ_EMBED_LIB := $(shell @+-dir /ba:f $(MOZ_LIB)$/embed_base_s.lib 2>NUL ) -MOZ_REG_LIB := $(shell @+-dir /ba:f $(MOZ_LIB)$/mozreg_s.lib 2>NUL ) -.ELSE #"$(USE_SHELL)"=="4nt" -MOZ_EMBED_LIB := $(shell @-test -f $(MOZ_LIB)$/embed_base_s.lib && echo $(MOZ_LIB)$/embed_base_s.lib ) -MOZ_REG_LIB := $(shell @-test -f $(MOZ_LIB)$/mozreg_s.lib && echo $(MOZ_LIB)$/mozreg_s.lib ) -.ENDIF + MOZ_EMBED_LIB := $(shell @-test -f $(MOZ_LIB)$/embed_base_s.lib && echo $(MOZ_LIB)$/embed_base_s.lib ) + MOZ_REG_LIB := $(shell @-test -f $(MOZ_LIB)$/mozreg_s.lib && echo $(MOZ_LIB)$/mozreg_s.lib ) -.IF X"$(MOZ_EMBED_LIB)"=="X" -MOZ_EMBED_LIB := $(MOZ_LIB)$/baseembed_s.lib -.ENDIF -.IF X"$(MOZ_REG_LIB)" == "X" -MOZ_REG_LIB := $(MOZ_LIB)$/mozreg.lib -.ENDIF -.ENDIF + MOZ_EMBED_LIB *:= $(MOZ_LIB)$/baseembed_s.lib + MOZ_REG_LIB *:= $(MOZ_LIB)$/mozreg.lib + + .IF "$(COM)"=="GCC" + MOZ_LIB_XPCOM= -L$(MOZ_LIB) -lembed_base_s -lnspr4 -lmozreg_s -lxpcom -lxpcom_core + .ELSE + LIB += $(MOZ_LIB) + MOZ_LIB_XPCOM= $(MOZ_EMBED_LIB) $(MOZ_LIB)$/nspr4.lib $(MOZ_REG_LIB) $(MOZ_LIB)$/xpcom.lib $(MOZ_LIB)$/xpcom_core.lib + .ENDIF -.IF "$(OS)"=="WNT" -.IF "$(COM)"=="GCC" -MOZ_LIB_XPCOM= -L$(MOZ_LIB) -lembed_base_s -lnspr4 -lmozreg_s -lxpcom -lxpcom_core -.ELSE -LIB += $(MOZ_LIB) -MOZ_LIB_XPCOM= $(MOZ_EMBED_LIB) $(MOZ_LIB)$/nspr4.lib $(MOZ_REG_LIB) $(MOZ_LIB)$/xpcom.lib $(MOZ_LIB)$/xpcom_core.lib -.ENDIF .ELSE "$(OS)"=="WNT" -MOZ_LIB_XPCOM= -L$(MOZ_LIB) -lnspr4 -lxpcom_core -lmozreg_s -lembed_base_s + MOZ_LIB_XPCOM = -L$(MOZ_LIB) -lnspr4 -lxpcom_core -lmozreg_s -lembed_base_s .ENDIF -#End of mozilla specific stuff. +# --- end of mozilla specific stuff USE_DEFFILE=TRUE ENABLE_EXCEPTIONS=TRUE @@ -87,10 +77,6 @@ COMPONENT_CONFIG_SCHEMA=$(TARGET)2.xcs # --- Settings ---------------------------------- -.IF "$(DBGUTIL_OJ)"!="" -ENVCFLAGS+=/FR$(SLO)$/ -.ENDIF - .INCLUDE : $(PRJ)$/makefile.pmk .INCLUDE : $(PRJ)$/version.mk @@ -121,7 +107,6 @@ DEF1NAME= $(SHL1TARGET) DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \ $(SLB)$/$(TARGET).lib DEFLIB1NAME=$(TARGET) -#DEF1EXPORTFILE= exports.dxp # --- Files ------------------------------------- @@ -165,6 +150,7 @@ DEPOBJFILES=$(SLO2FILES) # --- MOZAB BASE Library ----------------------------------- SHL2VERSIONMAP= $(TARGET2).map +SHL2NOCHECK=TRUE SHL2TARGET= $(TARGET2)$(DLLPOSTFIX) SHL2OBJS=$(SLO2FILES) SHL2STDLIBS=\ diff --git a/connectivity/source/drivers/mozab/makefile_mozab.mk b/connectivity/source/drivers/mozab/makefile_mozab.mk new file mode 100644 index 000000000000..28b56ec2a84a --- /dev/null +++ b/connectivity/source/drivers/mozab/makefile_mozab.mk @@ -0,0 +1,128 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# 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 +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +CDEFS += -DMOZILLA_INTERNAL_API + +.IF "$(GUI)"=="UNX" + .IF "$(COMNAME)"=="sunpro5" + CFLAGS += -features=tmplife + #This flag is needed to build mozilla 1.7 code + .ENDIF # "$(COMNAME)"=="sunpro5" +.ENDIF + +MOZINC = . \ + -I.. \ + -I$(MOZ_INC) \ + -I$(MOZ_INC)$/nspr \ + -I$(MOZ_INC)$/xpcom \ + -I$(MOZ_INC)$/string \ + -I$(MOZ_INC)$/rdf \ + -I$(MOZ_INC)$/msgbase \ + -I$(MOZ_INC)$/addrbook \ + -I$(MOZ_INC)$/mork \ + -I$(MOZ_INC)$/locale \ + -I$(MOZ_INC)$/pref \ + -I$(MOZ_INC)$/mime \ + -I$(MOZ_INC)$/chrome \ + -I$(MOZ_INC)$/necko \ + -I$(MOZ_INC)$/intl \ + -I$(MOZ_INC)$/profile \ + -I$(MOZ_INC)$/embed_base \ + -I$(MOZ_INC)$/mozldap \ + -I$(MOZ_INC)$/uconv \ + -I$(MOZ_INC)$/xpcom_obsolete \ + -I$(MOZ_INC)$/content + +.IF "$(GUI)" == "WNT" + CDEFS += \ + -DMOZILLA_CLIENT \ + -DXP_PC \ + -DXP_WIN \ + -DXP_WIN32 \ + -DOJI \ + -DWIN32 \ + -D_X86_ \ + -D_WINDOWS \ + -DMOZ_XUL \ + -DMOZ_REFLOW_PERF \ + -DMOZ_REFLOW_PERF_DSP + .IF "$(COM)" == "GCC" + INCPOST += $(MOZINC) + CFLAGSCXX += \ + -fno-rtti \ + -Wall \ + -Wconversion \ + -Wpointer-arith \ + -Wcast-align \ + -Woverloaded-virtual \ + -Wsynth \ + -Wno-long-long + .ELSE # .IF "$(COM)" == "GCC" + INCPRE += $(MOZINC) + .IF "$(DBG_LEVEL)" != "0" + .IF "$(CCNUMVER)" >= "001399999999" + CDEFS += -D_STL_NOFORCE_MANIFEST + .ENDIF # .IF "$(CCNUMVER)" >= "001399999999" + .ENDIF # .IF "$(DBG_LEVEL)" != "0" + .ENDIF # .IF "$(COM)" == "GCC" +.ENDIF # .IF "$(GUI)" == "WNT" + +.IF "$(GUI)" == "UNX" + INCPOST += $(MOZINC) + CDEFS+= -DMOZILLA_CLIENT \ + -DXP_UNIX + .IF "$(OS)" == "LINUX" + CFLAGS += -fPIC -g + CDEFS += -DOJI + CFLAGSCXX += \ + -fno-rtti \ + -Wconversion \ + -Wpointer-arith \ + -Wcast-align \ + -Woverloaded-virtual \ + -Wsynth \ + -Wno-long-long \ + -pthread + CDEFS += -DTRACING + .ELIF "$(OS)" == "NETBSD" || "$(OS)" == "MACOSX" + CFLAGS += -fPIC + CFLAGSCXX += \ + -fno-rtti \ + -Wconversion \ + -Wpointer-arith \ + -Wcast-align \ + -Woverloaded-virtual \ + -Wsynth \ + -Wno-long-long \ + -Wno-deprecated + CDEFS += -DTRACING + .ENDIF # "$(OS)" == "NETBSD" || "$(OS)" == "MACOSX" + + SHL1TARGET_NAME=$(TARGET)$(MOZAB_MAJOR) + +.ENDIF # "$(GUI)" == "UNX" + diff --git a/connectivity/source/drivers/mozab/mozillasrc/makefile.mk b/connectivity/source/drivers/mozab/mozillasrc/makefile.mk index e31d4c7e412b..1e5b39e0f140 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/makefile.mk +++ b/connectivity/source/drivers/mozab/mozillasrc/makefile.mk @@ -40,16 +40,12 @@ PRJINC=..$/..$/.. PRJNAME=connectivity TARGET=mozabsrc +# --- Settings ---------------------------------- + USE_DEFFILE=TRUE ENABLE_EXCEPTIONS=TRUE VISIBILITY_HIDDEN=TRUE -# --- Settings ---------------------------------- -.IF "$(DBGUTIL_OJ)"!="" -ENVCFLAGS+=/FR$(SLO)$/ -.ENDIF - - .INCLUDE : settings.mk .IF ("$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES") || "$(WITH_MOZILLA)" == "NO" || "$(OS)" == "OS2" @@ -61,8 +57,10 @@ dummy: .INCLUDE : $(PRJ)$/version.mk +.INCLUDE : ../makefile_mozab.mk + +INCPRE += -I../bootstrap -#mozilla specific stuff. # --- Files ------------------------------------- SLOFILES = \ @@ -74,98 +72,9 @@ SLOFILES = \ $(SLO)$/MNSMozabProxy.obj \ $(SLO)$/MNSTerminateListener.obj \ $(SLO)$/MLdapAttributeMap.obj \ - - -CDEFS += -DMOZILLA_INTERNAL_API -.IF "$(GUI)"=="UNX" -.IF "$(COMNAME)"=="sunpro5" -CFLAGS += -features=tmplife -#This flag is needed to build mozilla 1.7 code -.ENDIF # "$(COMNAME)"=="sunpro5" .ENDIF -MOZINC = . -I.. -I..$/bootstrap -I$(MOZ_INC) -I$(MOZ_INC)$/nspr -I$(MOZ_INC)$/xpcom \ - -I$(MOZ_INC)$/string -I$(MOZ_INC)$/rdf -I$(MOZ_INC)$/msgbase \ - -I$(MOZ_INC)$/addrbook -I$(MOZ_INC)$/mork -I$(MOZ_INC)$/locale \ - -I$(MOZ_INC)$/pref -I$(MOZ_INC)$/mime -I$(MOZ_INC)$/chrome \ - -I$(MOZ_INC)$/necko -I$(MOZ_INC)$/intl -I$(MOZ_INC)$/profile \ - -I$(MOZ_INC)$/embed_base -I$(MOZ_INC)$/mozldap -I$(MOZ_INC)$/uconv\ - -I$(MOZ_INC)$/xpcom_obsolete -I$(MOZ_INC)$/content - -.IF "$(GUI)" == "WNT" -.IF "$(COM)"=="GCC" -INCPOST += $(MOZINC) -CDEFS += -DWINVER=0x400 -DMOZILLA_CLIENT \ - -DNS_NET_FILE -DCookieManagement -DSingleSignon -DClientWallet \ - -DTRACING -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS \ - -DNS_MT_SUPPORTED -DNETLIB_THREAD \ - -DOJI -DWIN32 -D_X86_ -D_WINDOWS \ - -DMOZ_XUL -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP \ - -DNSPR20 -DOS_HAS_DLL -DNO_JNI_STUBS \ - -DNETSCAPE -DMOZILLA_CLIENT -DJS_THREADSAFE -DNECKO -DINCLUDE_XUL -CFLAGSCXX += \ - -fno-rtti -Wall -Wconversion -Wpointer-arith \ - -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -.ELSE -.IF "$(DBG_LEVEL)" == "0" -INCPRE += $(MOZINC) -CDEFS += -DWINVER=0x400 -DMOZILLA_CLIENT \ - -DNS_NET_FILE -DCookieManagement -DSingleSignon -DClientWallet \ - -DTRACING -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS \ - -DDMSVC4 -DNS_MT_SUPPORTED -DNETLIB_THREAD \ - -DOJI -DWIN32 -D_X86_ -D_WINDOWS \ - -DMOZ_XUL -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP \ - -DNSPR20 -DOS_HAS_DLL -DNO_JNI_STUBS \ - -DNETSCAPE -DMOZILLA_CLIENT -DJS_THREADSAFE -DNECKO -DINCLUDE_XUL \ - -UDEBUG -CFLAGS += -GR- -W3 -Gy -MD -UDEBUG -.ELSE -INCPRE += $(MOZINC) -CDEFS += -DWINVER=0x400 -DMOZILLA_CLIENT \ - -DNS_NET_FILE -DCookieManagement -DSingleSignon -DClientWallet \ - -DTRACING -DXP_PC -DXP_WIN -DXP_WIN32 -DHW_THREADS \ - -DDMSVC4 -DDEVELOPER_DEBUG -DNS_MT_SUPPORTED -DNETLIB_THREAD \ - -DOJI -DWIN32 -D_X86_ -D_WINDOWS \ - -DMOZ_XUL -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP \ - -DDEBUG_Administrator -DNSPR20 -DOS_HAS_DLL -DNO_JNI_STUBS \ - -DNETSCAPE -DMOZILLA_CLIENT -DJS_THREADSAFE -DNECKO -DINCLUDE_XUL \ - -UDEBUG -CFLAGS += -Zi -GR- -W3 -Gy -MDd -UDEBUG -.IF "$(CCNUMVER)" >= "001399999999" -CDEFS += -D_STL_NOFORCE_MANIFEST -.ENDIF -.ENDIF -.ENDIF -.ENDIF -.IF "$(GUI)" == "UNX" -INCPOST += $(MOZINC) -CDEFS+= -DMOZILLA_CLIENT \ - -DXP_UNIX -.IF "$(OS)" == "LINUX" -CFLAGS += -fPIC -g -CDEFS+= -DOJI - -CFLAGSCXX += \ - -fno-rtti -Wconversion -Wpointer-arith \ - -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -pthread -CDEFS += -DTRACING -.ELIF "$(OS)" == "NETBSD" || "$(OS)" == "MACOSX" -CFLAGS += -fPIC -CFLAGSCXX += \ - -fno-rtti -Wconversion -Wpointer-arith \ - -Wcast-align -Woverloaded-virtual -Wsynth \ - -Wno-long-long -Wno-deprecated -CDEFS += -DTRACING -.ENDIF -.ENDIF - -SHL1TARGET_NAME=$(TARGET)$(MOZAB_MAJOR) - -.ENDIF # MACOSX - # --- Targets ---------------------------------- .INCLUDE : target.mk -- cgit From dd7703d3d5da474f2ccdb6b193d875141ea21a7c Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Tue, 1 Dec 2009 09:53:35 +0000 Subject: CWS-TOOLING: integrate CWS dba32j 2009-11-26 09:30:10 +0100 msc r277648 : #100000 fix urgent testscript error 2009-11-25 10:27:56 +0100 msc r277625 : #i100000 fix urgent testscript error 2009-11-17 22:16:46 +0100 fs r277544 : CWS-TOOLING: rebase CWS dba32j to branches/OOO320@277531 (milestone: OOO320:m5) 2009-11-17 14:26:47 +0100 fs r277535 : ooops, didn't mean to commit this uncommented line 2009-11-14 20:50:29 +0100 fs r277505 : add a --disable-pango switch to SM's configure options, and add a patch which makes certain code respect it (well, respect it better than currently, by not using some pango_x_* functions, which are not always available, even when pango itself is present) 2009-11-14 20:47:41 +0100 fs r277504 : spelling 2009-11-13 14:04:00 +0100 fs r277502 : #i100764# (commit approved by ab@openoffice.org): getModelFromBasic: do not start with the parent's parent when looking for ThisComponent, but walk up the anchestor chain, starting with the immediate parent 2009-11-13 11:04:15 +0100 fs r277496 : #i100764# better heuristics for determining whether or not to participate in the ThisComponent game 2009-11-13 11:02:30 +0100 fs r277495 : #i100764# set the WB_EXT_DOCUMENT style at the backing component's container window, when creating it without the TaskCreator (which would normally do this) 2009-11-11 13:49:11 +0100 fs r277452 : #i106816# 2009-11-11 13:48:53 +0100 fs r277451 : fix the CREATETARBAL target, which is expected to create the zips used as prebuilts. The *inc.zip missed the NSS files in case NSS was built externally 2009-11-11 12:15:34 +0100 fs r277449 : update ignore list 2009-11-11 12:09:23 +0100 fs r277448 : add a link to the Mozilla build tools download location 2009-11-11 12:07:16 +0100 fs r277447 : add a link to the Mozilla build tools download location 2009-11-06 16:23:12 +0100 fs r277393 : #i106643# 2009-11-03 23:20:29 +0100 fs r277328 : #i106574# reverted the recent fix for issue #i105235#, and implemented a better one. 2009-11-02 12:59:48 +0100 fs r277294 : #i106550# errorOccured: also display the error when we're not in a nested form action - form actions are allowed to be triggered by other instances as well --- connectivity/inc/connectivity/FValue.hxx | 12 +++ connectivity/source/commontools/FValue.cxx | 154 ++++++++++++++++++++++++----- 2 files changed, 141 insertions(+), 25 deletions(-) (limited to 'connectivity') diff --git a/connectivity/inc/connectivity/FValue.hxx b/connectivity/inc/connectivity/FValue.hxx index 4196e8d843d9..22a169f4025d 100644 --- a/connectivity/inc/connectivity/FValue.hxx +++ b/connectivity/inc/connectivity/FValue.hxx @@ -44,9 +44,15 @@ #include #include #include +#include namespace connectivity { + namespace detail + { + class IValueSource; + } + class OOO_DLLPUBLIC_DBTOOLS ORowSetValue { union @@ -361,6 +367,12 @@ namespace connectivity const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow>& _xRow); void fill(const ::com::sun::star::uno::Any& _rValue); + + void fill( const sal_Int32 _nType, + const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XColumn >& _rxColumn ); + + private: + void impl_fill( const sal_Int32 _nType, sal_Bool _bNullable, const detail::IValueSource& _rValueSource ); }; /// ORowSetValueDecorator decorates a ORowSetValue so the value is "refcounted" diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index cd09efa227fe..f7943fc4cf45 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -40,13 +40,16 @@ #include #include -using namespace connectivity; -using namespace dbtools; +using namespace ::dbtools; using namespace ::com::sun::star::sdbc; +using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; using namespace ::com::sun::star::io; +namespace connectivity +{ + namespace { static sal_Bool isStorageCompatible(sal_Int32 _eType1, sal_Int32 _eType2) { @@ -1809,6 +1812,107 @@ void ORowSetValue::setSigned(sal_Bool _bMod) } } } + +// ----------------------------------------------------------------------------- +namespace detail +{ + class SAL_NO_VTABLE IValueSource + { + public: + virtual ::rtl::OUString getString() const = 0; + virtual sal_Bool getBoolean() const = 0; + virtual sal_Int8 getByte() const = 0; + virtual sal_Int16 getShort() const = 0; + virtual sal_Int32 getInt() const = 0; + virtual sal_Int64 getLong() const = 0; + virtual float getFloat() const = 0; + virtual double getDouble() const = 0; + virtual Date getDate() const = 0; + virtual Time getTime() const = 0; + virtual DateTime getTimestamp() const = 0; + virtual Sequence< sal_Int8 > getBytes() const = 0; + virtual Reference< XInputStream > getBinaryStream() const = 0; + virtual Reference< XInputStream > getCharacterStream() const = 0; + virtual sal_Bool wasNull() const = 0; + + virtual ~IValueSource() { } + }; + + class RowValue : public IValueSource + { + public: + RowValue( const Reference< XRow >& _xRow, const sal_Int32 _nPos ) + :m_xRow( _xRow ) + ,m_nPos( _nPos ) + { + } + + // IValueSource + virtual ::rtl::OUString getString() const { return m_xRow->getString( m_nPos ); }; + virtual sal_Bool getBoolean() const { return m_xRow->getBoolean( m_nPos ); }; + virtual sal_Int8 getByte() const { return m_xRow->getByte( m_nPos ); }; + virtual sal_Int16 getShort() const { return m_xRow->getShort( m_nPos ); } + virtual sal_Int32 getInt() const { return m_xRow->getInt( m_nPos ); } + virtual sal_Int64 getLong() const { return m_xRow->getLong( m_nPos ); } + virtual float getFloat() const { return m_xRow->getFloat( m_nPos ); }; + virtual double getDouble() const { return m_xRow->getDouble( m_nPos ); }; + virtual Date getDate() const { return m_xRow->getDate( m_nPos ); }; + virtual Time getTime() const { return m_xRow->getTime( m_nPos ); }; + virtual DateTime getTimestamp() const { return m_xRow->getTimestamp( m_nPos ); }; + virtual Sequence< sal_Int8 > getBytes() const { return m_xRow->getBytes( m_nPos ); }; + virtual Reference< XInputStream > getBinaryStream() const { return m_xRow->getBinaryStream( m_nPos ); }; + virtual Reference< XInputStream > getCharacterStream() const { return m_xRow->getCharacterStream( m_nPos ); }; + virtual sal_Bool wasNull() const { return m_xRow->wasNull( ); }; + + private: + const Reference< XRow > m_xRow; + const sal_Int32 m_nPos; + }; + + class ColumnValue : public IValueSource + { + public: + ColumnValue( const Reference< XColumn >& _rxColumn ) + :m_xColumn( _rxColumn ) + { + } + + // IValueSource + virtual ::rtl::OUString getString() const { return m_xColumn->getString(); }; + virtual sal_Bool getBoolean() const { return m_xColumn->getBoolean(); }; + virtual sal_Int8 getByte() const { return m_xColumn->getByte(); }; + virtual sal_Int16 getShort() const { return m_xColumn->getShort(); } + virtual sal_Int32 getInt() const { return m_xColumn->getInt(); } + virtual sal_Int64 getLong() const { return m_xColumn->getLong(); } + virtual float getFloat() const { return m_xColumn->getFloat(); }; + virtual double getDouble() const { return m_xColumn->getDouble(); }; + virtual Date getDate() const { return m_xColumn->getDate(); }; + virtual Time getTime() const { return m_xColumn->getTime(); }; + virtual DateTime getTimestamp() const { return m_xColumn->getTimestamp(); }; + virtual Sequence< sal_Int8 > getBytes() const { return m_xColumn->getBytes(); }; + virtual Reference< XInputStream > getBinaryStream() const { return m_xColumn->getBinaryStream(); }; + virtual Reference< XInputStream > getCharacterStream() const { return m_xColumn->getCharacterStream(); }; + virtual sal_Bool wasNull() const { return m_xColumn->wasNull( ); }; + + private: + const Reference< XColumn > m_xColumn; + }; +} + +// ----------------------------------------------------------------------------- +void ORowSetValue::fill( const sal_Int32 _nType, const Reference< XColumn >& _rxColumn ) +{ + detail::ColumnValue aColumnValue( _rxColumn ); + impl_fill( _nType, sal_True, aColumnValue ); +} + +// ----------------------------------------------------------------------------- +void ORowSetValue::fill( sal_Int32 _nPos, sal_Int32 _nType, sal_Bool _bNullable, const Reference< XRow>& _xRow ) +{ + detail::RowValue aRowValue( _xRow, _nPos ); + impl_fill( _nType, _bNullable, aRowValue ); +} + // ----------------------------------------------------------------------------- void ORowSetValue::fill(sal_Int32 _nPos, sal_Int32 _nType, @@ -1819,10 +1923,8 @@ void ORowSetValue::fill(sal_Int32 _nPos, } // ----------------------------------------------------------------------------- -void ORowSetValue::fill(sal_Int32 _nPos, - sal_Int32 _nType, - sal_Bool _bNullable, - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow>& _xRow) +void ORowSetValue::impl_fill( const sal_Int32 _nType, sal_Bool _bNullable, const detail::IValueSource& _rValueSource ) + { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbtools", "Ocke.Janssen@sun.com", "ORowSetValue::fill (2)" ); sal_Bool bReadData = sal_True; @@ -1833,63 +1935,63 @@ void ORowSetValue::fill(sal_Int32 _nPos, case DataType::DECIMAL: case DataType::NUMERIC: case DataType::LONGVARCHAR: - (*this) = _xRow->getString(_nPos); + (*this) = _rValueSource.getString(); break; case DataType::BIGINT: if ( isSigned() ) - (*this) = _xRow->getLong(_nPos); + (*this) = _rValueSource.getLong(); else - (*this) = _xRow->getString(_nPos); + (*this) = _rValueSource.getString(); break; case DataType::FLOAT: - (*this) = _xRow->getFloat(_nPos); + (*this) = _rValueSource.getFloat(); break; case DataType::DOUBLE: case DataType::REAL: - (*this) = _xRow->getDouble(_nPos); + (*this) = _rValueSource.getDouble(); break; case DataType::DATE: - (*this) = _xRow->getDate(_nPos); + (*this) = _rValueSource.getDate(); break; case DataType::TIME: - (*this) = _xRow->getTime(_nPos); + (*this) = _rValueSource.getTime(); break; case DataType::TIMESTAMP: - (*this) = _xRow->getTimestamp(_nPos); + (*this) = _rValueSource.getTimestamp(); break; case DataType::BINARY: case DataType::VARBINARY: case DataType::LONGVARBINARY: - (*this) = _xRow->getBytes(_nPos); + (*this) = _rValueSource.getBytes(); break; case DataType::BIT: case DataType::BOOLEAN: - (*this) = _xRow->getBoolean(_nPos); + (*this) = _rValueSource.getBoolean(); break; case DataType::TINYINT: if ( isSigned() ) - (*this) = _xRow->getByte(_nPos); + (*this) = _rValueSource.getByte(); else - (*this) = _xRow->getShort(_nPos); + (*this) = _rValueSource.getShort(); break; case DataType::SMALLINT: if ( isSigned() ) - (*this) = _xRow->getShort(_nPos); + (*this) = _rValueSource.getShort(); else - (*this) = _xRow->getInt(_nPos); + (*this) = _rValueSource.getInt(); break; case DataType::INTEGER: if ( isSigned() ) - (*this) = _xRow->getInt(_nPos); + (*this) = _rValueSource.getInt(); else - (*this) = _xRow->getLong(_nPos); + (*this) = _rValueSource.getLong(); break; case DataType::CLOB: - (*this) = ::com::sun::star::uno::makeAny(_xRow->getCharacterStream(_nPos)); + (*this) = ::com::sun::star::uno::makeAny(_rValueSource.getCharacterStream()); setTypeKind(DataType::CLOB); break; case DataType::BLOB: - (*this) = ::com::sun::star::uno::makeAny(_xRow->getBinaryStream(_nPos)); + (*this) = ::com::sun::star::uno::makeAny(_rValueSource.getBinaryStream()); setTypeKind(DataType::BLOB); break; default: @@ -1897,7 +1999,7 @@ void ORowSetValue::fill(sal_Int32 _nPos, bReadData = false; break; } - if ( bReadData && _bNullable && _xRow->wasNull() ) + if ( bReadData && _bNullable && _rValueSource.wasNull() ) setNull(); setTypeKind(_nType); } @@ -2043,3 +2145,5 @@ void ORowSetValue::fill(const Any& _rValue) break; } } + +} // namespace connectivity -- cgit