summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/hsqldb
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/hsqldb')
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HCatalog.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HColumns.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HConnection.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HDriver.cxx38
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HStorage.hxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HStorageAccess.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HStorageMap.cxx2
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HTable.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HTables.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HTerminateListener.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HTerminateListener.hxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HTools.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HUser.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HUsers.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HView.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/HViews.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/Hservices.cxx48
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/StorageFileAccess.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/accesslog.cxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/accesslog.hxx0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/exports.dxp1
-rwxr-xr-xconnectivity/source/drivers/hsqldb/hsqldb.component35
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/hsqldb.map1
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/hsqldb.xml0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/hsqlui.hrc0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/hsqlui.src0
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/hsqldb/makefile.mk9
29 files changed, 72 insertions, 62 deletions
diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx
index 2dda469c1fb8..2dda469c1fb8 100644..100755
--- a/connectivity/source/drivers/hsqldb/HCatalog.cxx
+++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx
diff --git a/connectivity/source/drivers/hsqldb/HColumns.cxx b/connectivity/source/drivers/hsqldb/HColumns.cxx
index 798afeaf20bf..798afeaf20bf 100644..100755
--- a/connectivity/source/drivers/hsqldb/HColumns.cxx
+++ b/connectivity/source/drivers/hsqldb/HColumns.cxx
diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx
index 3f4ca4baea93..3f4ca4baea93 100644..100755
--- a/connectivity/source/drivers/hsqldb/HConnection.cxx
+++ b/connectivity/source/drivers/hsqldb/HConnection.cxx
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 2a2b33a65154..0fc2a71ac10d 100644..100755
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -276,22 +276,38 @@ namespace connectivity
if ( pStream.get() )
{
ByteString sLine;
+ ByteString sVersionString;
while ( pStream->ReadLine(sLine) )
{
- if ( sLine.Equals("version=",0,sizeof("version=")-1) )
+ if ( sLine.Len() == 0 )
+ continue;
+ const ByteString sIniKey = sLine.GetToken( 0, '=' );
+ const ByteString sValue = sLine.GetToken( 1, '=' );
+ if ( sIniKey.Equals( "hsqldb.compatible_version" ) )
{
- 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 ) )
+ sVersionString = sValue;
+ }
+ else
+ {
+ if ( sIniKey.Equals( "version" )
+ && ( sVersionString.Len() == 0 )
+ )
{
- ::connectivity::SharedResources aResources;
- sMessage = aResources.getResourceString(STR_ERROR_NEW_VERSION);
+ sVersionString = sValue;
}
- break;
+ }
+ }
+ if ( sVersionString.Len() )
+ {
+ const sal_Int32 nMajor = sVersionString.GetToken(0,'.').ToInt32();
+ const sal_Int32 nMinor = sVersionString.GetToken(1,'.').ToInt32();
+ const sal_Int32 nMicro = sVersionString.GetToken(2,'.').ToInt32();
+ if ( nMajor > 1
+ || ( nMajor == 1 && nMinor > 8 )
+ || ( nMajor == 1 && nMinor == 8 && nMicro > 0 ) )
+ {
+ ::connectivity::SharedResources aResources;
+ sMessage = aResources.getResourceString(STR_ERROR_NEW_VERSION);
}
}
}
diff --git a/connectivity/source/drivers/hsqldb/HStorage.hxx b/connectivity/source/drivers/hsqldb/HStorage.hxx
index cd7e94b44bf0..cd7e94b44bf0 100644..100755
--- a/connectivity/source/drivers/hsqldb/HStorage.hxx
+++ b/connectivity/source/drivers/hsqldb/HStorage.hxx
diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
index 1ce47beb572f..1ce47beb572f 100644..100755
--- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index 2c99cc3a50b8..6dbf7a30bbbe 100644..100755
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -138,7 +138,7 @@ namespace connectivity
::rtl::OUString StorageContainer::removeOldURLPrefix(const ::rtl::OUString& _sURL)
{
::rtl::OUString sRet = _sURL;
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
sal_Int32 nIndex = sRet.lastIndexOf('\\');
#else
sal_Int32 nIndex = sRet.lastIndexOf('/');
diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx
index 90ced7e5066c..90ced7e5066c 100644..100755
--- a/connectivity/source/drivers/hsqldb/HTable.cxx
+++ b/connectivity/source/drivers/hsqldb/HTable.cxx
diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx
index d055a87f2cbb..d055a87f2cbb 100644..100755
--- a/connectivity/source/drivers/hsqldb/HTables.cxx
+++ b/connectivity/source/drivers/hsqldb/HTables.cxx
diff --git a/connectivity/source/drivers/hsqldb/HTerminateListener.cxx b/connectivity/source/drivers/hsqldb/HTerminateListener.cxx
index 070d5e8be5cb..070d5e8be5cb 100644..100755
--- a/connectivity/source/drivers/hsqldb/HTerminateListener.cxx
+++ b/connectivity/source/drivers/hsqldb/HTerminateListener.cxx
diff --git a/connectivity/source/drivers/hsqldb/HTerminateListener.hxx b/connectivity/source/drivers/hsqldb/HTerminateListener.hxx
index b8af49d66dc8..b8af49d66dc8 100644..100755
--- a/connectivity/source/drivers/hsqldb/HTerminateListener.hxx
+++ b/connectivity/source/drivers/hsqldb/HTerminateListener.hxx
diff --git a/connectivity/source/drivers/hsqldb/HTools.cxx b/connectivity/source/drivers/hsqldb/HTools.cxx
index f3849359f80f..f3849359f80f 100644..100755
--- a/connectivity/source/drivers/hsqldb/HTools.cxx
+++ b/connectivity/source/drivers/hsqldb/HTools.cxx
diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx
index a433ed0c34a3..a433ed0c34a3 100644..100755
--- a/connectivity/source/drivers/hsqldb/HUser.cxx
+++ b/connectivity/source/drivers/hsqldb/HUser.cxx
diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx
index 8cf6f649db0b..8cf6f649db0b 100644..100755
--- a/connectivity/source/drivers/hsqldb/HUsers.cxx
+++ b/connectivity/source/drivers/hsqldb/HUsers.cxx
diff --git a/connectivity/source/drivers/hsqldb/HView.cxx b/connectivity/source/drivers/hsqldb/HView.cxx
index 86f0ddfcca46..86f0ddfcca46 100644..100755
--- a/connectivity/source/drivers/hsqldb/HView.cxx
+++ b/connectivity/source/drivers/hsqldb/HView.cxx
diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx
index edc01233dc65..edc01233dc65 100644..100755
--- a/connectivity/source/drivers/hsqldb/HViews.cxx
+++ b/connectivity/source/drivers/hsqldb/HViews.cxx
diff --git a/connectivity/source/drivers/hsqldb/Hservices.cxx b/connectivity/source/drivers/hsqldb/Hservices.cxx
index 2541c106cd2b..ac7b319ca44c 100644..100755
--- a/connectivity/source/drivers/hsqldb/Hservices.cxx
+++ b/connectivity/source/drivers/hsqldb/Hservices.cxx
@@ -31,13 +31,11 @@
#include "hsqldb/HDriver.hxx"
#include <cppuhelper/factory.hxx>
-#include <osl/diagnose.h>
using namespace connectivity::hsqldb;
using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-using ::com::sun::star::registry::XRegistryKey;
using ::com::sun::star::lang::XSingleServiceFactory;
using ::com::sun::star::lang::XMultiServiceFactory;
@@ -50,27 +48,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
rtl_ModuleCount* _pT
);
-//***************************************************************************************
-// The prescribed C-Api must be met!
-// It consists of three functions, which must be exported by the Module.
-//---------------------------------------------------------------------------------------
-void REGISTER_PROVIDER(
- const OUString& aServiceImplName,
- const Sequence< OUString>& Services,
- const Reference< ::com::sun::star::registry::XRegistryKey > & xKey)
-{
- OUString aMainKeyName;
- aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- aMainKeyName += aServiceImplName;
- aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
-
- Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) );
- OSL_ENSURE(xNewKey.is(), "ADABAS::component_writeInfo : could not create a registry key !");
-
- for (sal_Int32 i=0; i<Services.getLength(); ++i)
- xNewKey->createKey(Services[i]);
-}
-
//---------------------------------------------------------------------------------------
struct ProviderRequest
{
@@ -120,31 +97,6 @@ component_getImplementationEnvironment(
}
//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void* /*pServiceManager*/,
- void* pRegistryKey
- )
-{
- if (pRegistryKey)
- try
- {
- Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey));
-
- REGISTER_PROVIDER(
- ODriverDelegator::getImplementationName_Static(),
- ODriverDelegator::getSupportedServiceNames_Static(), xKey);
-
- return sal_True;
- }
- catch (::com::sun::star::registry::InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "ODBC::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !");
- }
-
- return sal_False;
-}
-
-//---------------------------------------------------------------------------------------
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
diff --git a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
index 5a51e6d9bb7f..5a51e6d9bb7f 100644..100755
--- a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
index b9b78a675936..b9b78a675936 100644..100755
--- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
index 4ef88ff7bdca..4ef88ff7bdca 100644..100755
--- a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
diff --git a/connectivity/source/drivers/hsqldb/accesslog.cxx b/connectivity/source/drivers/hsqldb/accesslog.cxx
index a80350eef30c..a80350eef30c 100644..100755
--- a/connectivity/source/drivers/hsqldb/accesslog.cxx
+++ b/connectivity/source/drivers/hsqldb/accesslog.cxx
diff --git a/connectivity/source/drivers/hsqldb/accesslog.hxx b/connectivity/source/drivers/hsqldb/accesslog.hxx
index d29e67c2aa37..d29e67c2aa37 100644..100755
--- a/connectivity/source/drivers/hsqldb/accesslog.hxx
+++ b/connectivity/source/drivers/hsqldb/accesslog.hxx
diff --git a/connectivity/source/drivers/hsqldb/exports.dxp b/connectivity/source/drivers/hsqldb/exports.dxp
index 7ff56f4f9977..3efc73741d24 100644..100755
--- a/connectivity/source/drivers/hsqldb/exports.dxp
+++ b/connectivity/source/drivers/hsqldb/exports.dxp
@@ -1,5 +1,4 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_openStream
Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_write__Ljava_lang_String_2Ljava_lang_String_2_3BII
diff --git a/connectivity/source/drivers/hsqldb/hsqldb.component b/connectivity/source/drivers/hsqldb/hsqldb.component
new file mode 100755
index 000000000000..eb8ae477e749
--- /dev/null
+++ b/connectivity/source/drivers/hsqldb/hsqldb.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.sdbcx.comp.hsqldb.Driver">
+ <service name="com.sun.star.sdbc.Driver"/>
+ <service name="com.sun.star.sdbcx.Driver"/>
+ </implementation>
+</component>
diff --git a/connectivity/source/drivers/hsqldb/hsqldb.map b/connectivity/source/drivers/hsqldb/hsqldb.map
index b4fc53b320ef..b611aba02d5b 100644..100755
--- a/connectivity/source/drivers/hsqldb/hsqldb.map
+++ b/connectivity/source/drivers/hsqldb/hsqldb.map
@@ -1,7 +1,6 @@
UDK_3_0_0 {
global:
component_getImplementationEnvironment;
- component_writeInfo;
component_getFactory;
Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_openStream;
Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_write__Ljava_lang_String_2Ljava_lang_String_2_3BII;
diff --git a/connectivity/source/drivers/hsqldb/hsqldb.xml b/connectivity/source/drivers/hsqldb/hsqldb.xml
index c456c253777d..c456c253777d 100644..100755
--- a/connectivity/source/drivers/hsqldb/hsqldb.xml
+++ b/connectivity/source/drivers/hsqldb/hsqldb.xml
diff --git a/connectivity/source/drivers/hsqldb/hsqlui.hrc b/connectivity/source/drivers/hsqldb/hsqlui.hrc
index 2f25d5a8c198..2f25d5a8c198 100644..100755
--- a/connectivity/source/drivers/hsqldb/hsqlui.hrc
+++ b/connectivity/source/drivers/hsqldb/hsqlui.hrc
diff --git a/connectivity/source/drivers/hsqldb/hsqlui.src b/connectivity/source/drivers/hsqldb/hsqlui.src
index 913f366429ea..913f366429ea 100644..100755
--- a/connectivity/source/drivers/hsqldb/hsqlui.src
+++ b/connectivity/source/drivers/hsqldb/hsqlui.src
diff --git a/connectivity/source/drivers/hsqldb/makefile.mk b/connectivity/source/drivers/hsqldb/makefile.mk
index 21274e8d4257..6e400696faa0 100644..100755
--- a/connectivity/source/drivers/hsqldb/makefile.mk
+++ b/connectivity/source/drivers/hsqldb/makefile.mk
@@ -103,6 +103,7 @@ SHL1STDLIBS=\
SHL1DEPN=
+SHL1CREATEJNILIB=TRUE
SHL1IMPLIB= i$(HSQLDB_TARGET)
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
@@ -115,3 +116,11 @@ DEF1EXPORTFILE= exports.dxp
.INCLUDE : $(PRJ)$/target.pmk
+
+ALLTAR : $(MISC)/hsqldb.component
+
+$(MISC)/hsqldb.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ hsqldb.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt hsqldb.component