diff options
Diffstat (limited to 'connectivity/source/drivers')
41 files changed, 98 insertions, 191 deletions
diff --git a/connectivity/source/drivers/adabas/adabas.map b/connectivity/source/drivers/adabas/adabas.map deleted file mode 100644 index 7ce4c703e6b3..000000000000 --- a/connectivity/source/drivers/adabas/adabas.map +++ /dev/null @@ -1,8 +0,0 @@ -ADABAS_2_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/connectivity/source/drivers/adabas/makefile.mk b/connectivity/source/drivers/adabas/makefile.mk index e3e9d76ac2f2..9268f02a3b42 100644 --- a/connectivity/source/drivers/adabas/makefile.mk +++ b/connectivity/source/drivers/adabas/makefile.mk @@ -71,7 +71,7 @@ SLOFILES=\ $(SLO)$/BResultSetMetaData.obj \ $(SLO)$/BResultSet.obj -SHL1VERSIONMAP=$(TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map # --- Library ----------------------------------- diff --git a/connectivity/source/drivers/ado/ado.xcu b/connectivity/source/drivers/ado/ado.xcu index b29387edfcb7..5859d5eecf3e 100755 --- a/connectivity/source/drivers/ado/ado.xcu +++ b/connectivity/source/drivers/ado/ado.xcu @@ -154,6 +154,11 @@ <value>3</value> </prop> </node> + <node oor:name="ColumnAliasInOrderBy" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> </node> <node oor:name="Features"> <node oor:name="UseSQL92NamingConstraints" oor:op="replace"> diff --git a/connectivity/source/drivers/calc/calc.map b/connectivity/source/drivers/calc/calc.map deleted file mode 100644 index bcab8e6c9101..000000000000 --- a/connectivity/source/drivers/calc/calc.map +++ /dev/null @@ -1,8 +0,0 @@ -CALC_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/connectivity/source/drivers/calc/makefile.mk b/connectivity/source/drivers/calc/makefile.mk index 452e9a92b320..8e193524aa45 100644 --- a/connectivity/source/drivers/calc/makefile.mk +++ b/connectivity/source/drivers/calc/makefile.mk @@ -57,7 +57,7 @@ SLOFILES=\ $(SLO)$/Cservices.obj \ $(SLO)$/CDriver.obj -SHL1VERSIONMAP= $(TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map # --- Library ----------------------------------- diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index d19f419f17ae..15da50651250 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1527,6 +1527,7 @@ BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<X // Buffer mit Leerzeichen fuellen AllocBuffer(); memset(m_pBuffer, 0, m_aHeader.db_slng); + m_pBuffer[0] = ' '; // Gesamte neue Row uebernehmen: // ... und am Ende als neuen Record hinzufuegen: diff --git a/connectivity/source/drivers/dbase/dbase.map b/connectivity/source/drivers/dbase/dbase.map deleted file mode 100644 index 2c620b4f3620..000000000000 --- a/connectivity/source/drivers/dbase/dbase.map +++ /dev/null @@ -1,10 +0,0 @@ -DBASE_2_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; - - diff --git a/connectivity/source/drivers/dbase/makefile.mk b/connectivity/source/drivers/dbase/makefile.mk index dded9086bcb1..f855cf1f4554 100644 --- a/connectivity/source/drivers/dbase/makefile.mk +++ b/connectivity/source/drivers/dbase/makefile.mk @@ -89,7 +89,7 @@ EXCEPTIONSFILES +=\ .ENDIF -SHL1VERSIONMAP=$(TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map # --- Library ----------------------------------- diff --git a/connectivity/source/drivers/evoab/evoab.map b/connectivity/source/drivers/evoab/evoab.map deleted file mode 100644 index 00cf7191f143..000000000000 --- a/connectivity/source/drivers/evoab/evoab.map +++ /dev/null @@ -1,8 +0,0 @@ -EVOAB_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/connectivity/source/drivers/evoab/makefile.mk b/connectivity/source/drivers/evoab/makefile.mk index 31d654fd26a2..c1dbc21cdf1e 100644 --- a/connectivity/source/drivers/evoab/makefile.mk +++ b/connectivity/source/drivers/evoab/makefile.mk @@ -65,7 +65,7 @@ SLOFILES=\ $(SLO)$/LDebug.obj -SHL1VERSIONMAP=$(TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map # --- Library ----------------------------------- diff --git a/connectivity/source/drivers/evoab2/evoab2.map b/connectivity/source/drivers/evoab2/evoab2.map deleted file mode 100644 index 00cf7191f143..000000000000 --- a/connectivity/source/drivers/evoab2/evoab2.map +++ /dev/null @@ -1,8 +0,0 @@ -EVOAB_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/connectivity/source/drivers/evoab2/makefile.mk b/connectivity/source/drivers/evoab2/makefile.mk index 43600a379fbc..e8a1cf96cddf 100644 --- a/connectivity/source/drivers/evoab2/makefile.mk +++ b/connectivity/source/drivers/evoab2/makefile.mk @@ -65,7 +65,7 @@ SLOFILES=\ $(SLO)$/EApi.obj \ $(SLO)$/NDebug.obj -SHL1VERSIONMAP=$(TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map # --- Library ----------------------------------- diff --git a/connectivity/source/drivers/flat/flat.map b/connectivity/source/drivers/flat/flat.map deleted file mode 100644 index bf26bd0fa0fa..000000000000 --- a/connectivity/source/drivers/flat/flat.map +++ /dev/null @@ -1,8 +0,0 @@ -FLAT_2_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/connectivity/source/drivers/flat/makefile.mk b/connectivity/source/drivers/flat/makefile.mk index 312e6d6c9426..2d1f99f759c7 100644 --- a/connectivity/source/drivers/flat/makefile.mk +++ b/connectivity/source/drivers/flat/makefile.mk @@ -70,7 +70,7 @@ EXCEPTIONSFILES=\ $(SLO)$/EDriver.obj -SHL1VERSIONMAP=$(TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map # --- Library ----------------------------------- SHL1TARGET=$(TARGET)$(DLLPOSTFIX) diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 3ae0b72ff878..fdf16c8b975a 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -211,7 +211,7 @@ void SAL_CALL OHSQLTable::alterColumnByName( const ::rtl::OUString& colName, con // now we should look if the name of the column changed ::rtl::OUString sNewColumnName; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_NAME)) >>= sNewColumnName; - if ( !sNewColumnName.equalsIgnoreAsciiCase(colName) ) + if ( !sNewColumnName.equals(colName) ) { const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx index 0538073781ed..29d8c189a66e 100644 --- a/connectivity/source/drivers/jdbc/JStatement.cxx +++ b/connectivity/source/drivers/jdbc/JStatement.cxx @@ -709,38 +709,44 @@ void java_sql_Statement_Base::getFastPropertyValue( ) const { java_sql_Statement_Base* THIS = const_cast<java_sql_Statement_Base*>(this); - switch(nHandle) + try + { + switch(nHandle) + { + case PROPERTY_ID_QUERYTIMEOUT: + rValue <<= THIS->getQueryTimeOut(); + break; + case PROPERTY_ID_MAXFIELDSIZE: + rValue <<= THIS->getMaxFieldSize(); + break; + case PROPERTY_ID_MAXROWS: + rValue <<= THIS->getMaxRows(); + break; + case PROPERTY_ID_CURSORNAME: + rValue <<= THIS->getCursorName(); + break; + case PROPERTY_ID_RESULTSETCONCURRENCY: + rValue <<= THIS->getResultSetConcurrency(); + break; + case PROPERTY_ID_RESULTSETTYPE: + rValue <<= THIS->getResultSetType(); + break; + case PROPERTY_ID_FETCHDIRECTION: + rValue <<= THIS->getFetchDirection(); + break; + case PROPERTY_ID_FETCHSIZE: + rValue <<= THIS->getFetchSize(); + break; + case PROPERTY_ID_ESCAPEPROCESSING: + rValue <<= (sal_Bool)m_bEscapeProcessing; + break; + case PROPERTY_ID_USEBOOKMARKS: + default: + ; + } + } + catch(const Exception&) { - case PROPERTY_ID_QUERYTIMEOUT: - rValue <<= THIS->getQueryTimeOut(); - break; - case PROPERTY_ID_MAXFIELDSIZE: - rValue <<= THIS->getMaxFieldSize(); - break; - case PROPERTY_ID_MAXROWS: - rValue <<= THIS->getMaxRows(); - break; - case PROPERTY_ID_CURSORNAME: - rValue <<= THIS->getCursorName(); - break; - case PROPERTY_ID_RESULTSETCONCURRENCY: - rValue <<= THIS->getResultSetConcurrency(); - break; - case PROPERTY_ID_RESULTSETTYPE: - rValue <<= THIS->getResultSetType(); - break; - case PROPERTY_ID_FETCHDIRECTION: - rValue <<= THIS->getFetchDirection(); - break; - case PROPERTY_ID_FETCHSIZE: - rValue <<= THIS->getFetchSize(); - break; - case PROPERTY_ID_ESCAPEPROCESSING: - rValue <<= (sal_Bool)m_bEscapeProcessing; - break; - case PROPERTY_ID_USEBOOKMARKS: - default: - ; } } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/jdbc/jdbc.map b/connectivity/source/drivers/jdbc/jdbc.map deleted file mode 100644 index 23369ec76466..000000000000 --- a/connectivity/source/drivers/jdbc/jdbc.map +++ /dev/null @@ -1,8 +0,0 @@ -JDBC_2_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/connectivity/source/drivers/jdbc/makefile.mk b/connectivity/source/drivers/jdbc/makefile.mk index 2de63f2c0366..46619952163b 100644 --- a/connectivity/source/drivers/jdbc/makefile.mk +++ b/connectivity/source/drivers/jdbc/makefile.mk @@ -78,7 +78,7 @@ SLOFILES=\ $(SLO)$/tools.obj \ $(SLO)$/ContextClassLoader.obj -SHL1VERSIONMAP=$(JDBC_TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map # --- Library ----------------------------------- diff --git a/connectivity/source/drivers/kab/kab.map b/connectivity/source/drivers/kab/kab.map deleted file mode 100644 index 6b7216de8c11..000000000000 --- a/connectivity/source/drivers/kab/kab.map +++ /dev/null @@ -1,8 +0,0 @@ -KAB_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/connectivity/source/drivers/kab/kabdrv.map b/connectivity/source/drivers/kab/kabdrv.map index c32084ddd4ab..5de866f2e52f 100644 --- a/connectivity/source/drivers/kab/kabdrv.map +++ b/connectivity/source/drivers/kab/kabdrv.map @@ -1,4 +1,4 @@ -KAB_1_0 { +UDK_3_0_0 { global: createKabConnection; initKApplication; diff --git a/connectivity/source/drivers/kab/makefile.mk b/connectivity/source/drivers/kab/makefile.mk index 98148a29e98d..2a0dc5cd8999 100644 --- a/connectivity/source/drivers/kab/makefile.mk +++ b/connectivity/source/drivers/kab/makefile.mk @@ -61,7 +61,7 @@ DEPOBJFILES= \ # --- Library ----------------------------------- -SHL1VERSIONMAP=$(TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1TARGET= $(TARGET)$(KAB_MAJOR) SHL1OBJS=$(SLOFILES) diff --git a/connectivity/source/drivers/macab/MacabConnection.cxx b/connectivity/source/drivers/macab/MacabConnection.cxx index 58cf82f272fc..31b2bbfd6b1e 100755 --- a/connectivity/source/drivers/macab/MacabConnection.cxx +++ b/connectivity/source/drivers/macab/MacabConnection.cxx @@ -314,10 +314,11 @@ MacabAddressBook* MacabConnection::getAddressBook() const return m_pAddressBook; } // ----------------------------------------------------------------------------- -extern "C" void* SAL_CALL createMacabConnection( void* _pDriver ) +extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL createMacabConnection( void* _pDriver ) { MacabConnection* pConnection = new MacabConnection( static_cast< MacabDriver* >( _pDriver ) ); // by definition, the pointer crossing library boundaries as void ptr is acquired once pConnection->acquire(); return pConnection; } + diff --git a/connectivity/source/drivers/macab/MacabServices.cxx b/connectivity/source/drivers/macab/MacabServices.cxx index 6f48fb0a7e57..b3c303324302 100755 --- a/connectivity/source/drivers/macab/MacabServices.cxx +++ b/connectivity/source/drivers/macab/MacabServices.cxx @@ -114,7 +114,7 @@ struct ProviderRequest //--------------------------------------------------------------------------------------- -extern "C" void SAL_CALL component_getImplementationEnvironment( +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char **ppEnvTypeName, uno_Environment ** ) @@ -123,7 +123,7 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" sal_Bool SAL_CALL component_writeInfo( +extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey ) @@ -148,7 +148,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( } //--------------------------------------------------------------------------------------- -extern "C" void* SAL_CALL component_getFactory( +extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void*) diff --git a/connectivity/source/drivers/macab/macab.map b/connectivity/source/drivers/macab/macab.map deleted file mode 100755 index fe2d1ac90534..000000000000 --- a/connectivity/source/drivers/macab/macab.map +++ /dev/null @@ -1,8 +0,0 @@ -MACAB_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/connectivity/source/drivers/macab/macab.xcu b/connectivity/source/drivers/macab/macab.xcu index 7d4fa6df7d70..0845bc9a2ce2 100755 --- a/connectivity/source/drivers/macab/macab.xcu +++ b/connectivity/source/drivers/macab/macab.xcu @@ -27,7 +27,7 @@ ************************************************************************ --> <oor:component-data oor:name="Drivers" oor:package="org.openoffice.Office.DataAccess" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <node oor:name="Installed"> - <node oor:name="sdbc:address:macab:*" oor:op="replace"> + <node oor:name="sdbc:address:macab" oor:op="replace"> <prop oor:name="Driver"> <value>com.sun.star.comp.sdbc.macab.Driver</value> </prop> diff --git a/connectivity/source/drivers/macab/macabdrv.map b/connectivity/source/drivers/macab/macabdrv.map deleted file mode 100755 index d953690f6ba3..000000000000 --- a/connectivity/source/drivers/macab/macabdrv.map +++ /dev/null @@ -1,6 +0,0 @@ -MACAB_1_0 { - global: - createMacabConnection; - local: - *; -}; diff --git a/connectivity/source/drivers/macab/makefile.mk b/connectivity/source/drivers/macab/makefile.mk index 811f1fabb143..35532b15ec2d 100755 --- a/connectivity/source/drivers/macab/makefile.mk +++ b/connectivity/source/drivers/macab/makefile.mk @@ -54,8 +54,6 @@ DEPOBJFILES= \ # --- Library ----------------------------------- -SHL1VERSIONMAP=$(TARGET).map - SHL1TARGET= $(TARGET)$(MACAB_MAJOR) SHL1OBJS=$(SLOFILES) SHL1STDLIBS=\ @@ -98,8 +96,6 @@ MACAB_LIB=-framework Carbon -framework AddressBook # --- Library ----------------------------------- -SHL2VERSIONMAP=$(TARGET2).map - SHL2TARGET= $(TARGET2)$(MACAB_MAJOR) SHL2OBJS=$(SLO2FILES) SHL2STDLIBS=\ diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx index 4d9f8bb6d9eb..0c8134e69809 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx @@ -30,12 +30,6 @@ #include <MNSINIParser.hxx> #include <rtl/byteseq.hxx> -ini_Section * IniParser::getSection(OUString const & secName) -{ - if (mAllSection.find(secName) != mAllSection.end()) - return &mAllSection[secName]; - return NULL; -} IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOException ) { OUString iniUrl; diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx index 63263a2cc893..0e36308946ef 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx @@ -72,7 +72,6 @@ class IniParser IniSectionMap mAllSection; public: IniSectionMap * getAllSection(){return &mAllSection;}; - ini_Section * getSection(OUString const & secName); IniParser(OUString const & rIniName) throw(com::sun::star::io::IOException ); #if OSL_DEBUG_LEVEL > 0 void Dump(); diff --git a/connectivity/source/drivers/mozab/bootstrap/makefile.mk b/connectivity/source/drivers/mozab/bootstrap/makefile.mk index 78c1e39578c0..6a4172da205d 100644 --- a/connectivity/source/drivers/mozab/bootstrap/makefile.mk +++ b/connectivity/source/drivers/mozab/bootstrap/makefile.mk @@ -67,7 +67,7 @@ SLOFILES += \ CDEFS+=-DMINIMAL_PROFILEDISCOVER SHL1TARGET=$(TARGET) -SHL1VERSIONMAP= $(TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1OBJS=$(SLOFILES) SHL1DEF=$(MISC)$/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) diff --git a/connectivity/source/drivers/mozab/bootstrap/mozbootstrap.map b/connectivity/source/drivers/mozab/bootstrap/mozbootstrap.map deleted file mode 100644 index 750db5d4af09..000000000000 --- a/connectivity/source/drivers/mozab/bootstrap/mozbootstrap.map +++ /dev/null @@ -1,8 +0,0 @@ -MOZBOOTSTRAP_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/connectivity/source/drivers/mozab/makefile.mk b/connectivity/source/drivers/mozab/makefile.mk index ffcc41af7536..b1e12fde6f8a 100644 --- a/connectivity/source/drivers/mozab/makefile.mk +++ b/connectivity/source/drivers/mozab/makefile.mk @@ -85,7 +85,7 @@ SLOFILES=\ # --- MOZAB BASE Library ----------------------------------- -SHL1VERSIONMAP= $(TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1TARGET= $(TARGET)$(DLLPOSTFIX) SHL1OBJS=$(SLOFILES) SHL1STDLIBS=\ diff --git a/connectivity/source/drivers/mozab/mozab.map b/connectivity/source/drivers/mozab/mozab.map deleted file mode 100644 index 9f3a1f27d0f5..000000000000 --- a/connectivity/source/drivers/mozab/mozab.map +++ /dev/null @@ -1,8 +0,0 @@ -MOZAB_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/connectivity/source/drivers/mozab/mozabdrv.map b/connectivity/source/drivers/mozab/mozabdrv.map index 918cb530e1f1..a431a0737754 100644 --- a/connectivity/source/drivers/mozab/mozabdrv.map +++ b/connectivity/source/drivers/mozab/mozabdrv.map @@ -1,4 +1,4 @@ -MOZABDRV_1_0 { +UDK_3_0_0 { global: OMozabConnection_CreateInstance; OMozillaBootstrap_CreateInstance; diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index ff5666d7ffa7..72383be76c58 100644 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx @@ -281,7 +281,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); sSql += ::dbtools::quoteName(sQuote,colName); sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); - sSql += ::dbtools::createStandardColumnPart(descriptor,getConnection(),getTypeCreatePattern()); + sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(descriptor,getConnection(),getTypeCreatePattern())); executeStatement(sSql); } m_pColumns->refresh(); @@ -310,7 +310,7 @@ void OMySQLTable::alterColumnType(sal_Int32 nNewType,const ::rtl::OUString& _rCo ::comphelper::copyProperties(_xDescriptor,xProp); xProp->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE),makeAny(nNewType)); - sSql += ::dbtools::createStandardColumnPart(xProp,getConnection(),getTypeCreatePattern()); + sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(xProp,getConnection(),getTypeCreatePattern())); executeStatement(sSql); } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index d56c53a1358e..b337ddc92390 100644 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx @@ -184,12 +184,27 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) } } // ------------------------------------------------------------------------- +::rtl::OUString OTables::adjustSQL(const ::rtl::OUString& _sSql) +{ + ::rtl::OUString sSQL = _sSql; + static const ::rtl::OUString s_sUNSIGNED(RTL_CONSTASCII_USTRINGPARAM("UNSIGNED")); + sal_Int32 nIndex = sSQL.indexOf(s_sUNSIGNED); + while(nIndex != -1 ) + { + sal_Int32 nParen = sSQL.indexOf(')',nIndex); + sal_Int32 nPos = nIndex + s_sUNSIGNED.getLength(); + ::rtl::OUString sNewUnsigned( sSQL.copy(nPos,nParen - nPos + 1)); + sSQL = sSQL.replaceAt(nIndex,s_sUNSIGNED.getLength()+sNewUnsigned.getLength(),sNewUnsigned + s_sUNSIGNED); + nIndex = sSQL.indexOf(s_sUNSIGNED,nIndex + s_sUNSIGNED.getLength()+sNewUnsigned.getLength()); + } + return sSQL; +} +// ------------------------------------------------------------------------- void OTables::createTable( const Reference< XPropertySet >& descriptor ) { const Reference< XConnection > xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); static const ::rtl::OUString s_sCreatePattern(RTL_CONSTASCII_USTRINGPARAM("(M,D)")); - const ::rtl::OUString aSql = ::dbtools::createSqlCreateTableStatement(descriptor,xConnection,s_sCreatePattern); - + const ::rtl::OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,s_sCreatePattern)); Reference< XStatement > xStmt = xConnection->createStatement( ); if ( xStmt.is() ) { diff --git a/connectivity/source/drivers/mysql/makefile.mk b/connectivity/source/drivers/mysql/makefile.mk index af486c293806..fbb68321cb01 100644 --- a/connectivity/source/drivers/mysql/makefile.mk +++ b/connectivity/source/drivers/mysql/makefile.mk @@ -55,7 +55,7 @@ SLOFILES=\ $(SLO)$/YUsers.obj \ $(SLO)$/Yservices.obj -SHL1VERSIONMAP=$(MYSQL_TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map # --- Library ----------------------------------- diff --git a/connectivity/source/drivers/mysql/mysql.map b/connectivity/source/drivers/mysql/mysql.map deleted file mode 100644 index 834658431ada..000000000000 --- a/connectivity/source/drivers/mysql/mysql.map +++ /dev/null @@ -1,8 +0,0 @@ -MYSQL_2_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/connectivity/source/drivers/odbc/makefile.mk b/connectivity/source/drivers/odbc/makefile.mk index 09052f9d77a3..508cbfb6df63 100644 --- a/connectivity/source/drivers/odbc/makefile.mk +++ b/connectivity/source/drivers/odbc/makefile.mk @@ -71,7 +71,7 @@ SHL1IMPLIB= i$(ODBC_TARGET) SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) -SHL1VERSIONMAP=odbc.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map # --- Targets ---------------------------------- diff --git a/connectivity/source/drivers/odbc/odbc.map b/connectivity/source/drivers/odbc/odbc.map deleted file mode 100644 index 14e4b7110c89..000000000000 --- a/connectivity/source/drivers/odbc/odbc.map +++ /dev/null @@ -1,8 +0,0 @@ -ODBC_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx index f27bd64545be..da29bcf08c17 100644 --- a/connectivity/source/drivers/odbcbase/OResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx @@ -466,11 +466,9 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex ) thro return nRet; } - ::std::map<sal_Int32,SWORD>::iterator aFind = m_aODBCColumnTypes.find(columnIndex); - if ( aFind == m_aODBCColumnTypes.end() ) - aFind = m_aODBCColumnTypes.insert(::std::map<sal_Int32,SWORD>::value_type(columnIndex,OResultSetMetaData::getColumnODBCType(m_pStatement->getOwnConnection(),m_aStatementHandle,*this,columnIndex))).first; + const SWORD nColumnType = impl_getColumnType_nothrow(columnIndex); - switch(aFind->second) + switch(nColumnType) { case SQL_WVARCHAR: case SQL_WCHAR: @@ -479,7 +477,7 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex ) thro case SQL_CHAR: case SQL_LONGVARCHAR: { - ::rtl::OUString aRet = OTools::getStringValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,aFind->second,m_bWasNull,**this,m_nTextEncoding); + ::rtl::OUString aRet = OTools::getStringValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,nColumnType,m_bWasNull,**this,m_nTextEncoding); return Sequence<sal_Int8>(reinterpret_cast<const sal_Int8*>(aRet.getStr()),sizeof(sal_Unicode)*aRet.getLength()); } default: @@ -624,10 +622,8 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLExcept else { checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - ::std::map<sal_Int32,SWORD>::iterator aFind = m_aODBCColumnTypes.find(columnIndex); - if ( aFind == m_aODBCColumnTypes.end() ) - aFind = m_aODBCColumnTypes.insert(::std::map<sal_Int32,SWORD>::value_type(columnIndex,OResultSetMetaData::getColumnODBCType(m_pStatement->getOwnConnection(),m_aStatementHandle,*this,columnIndex))).first; - nRet = OTools::getStringValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,aFind->second,m_bWasNull,**this,m_nTextEncoding); + const SWORD nColumnType = impl_getColumnType_nothrow(columnIndex); + nRet = OTools::getStringValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,nColumnType,m_bWasNull,**this,m_nTextEncoding); } return nRet; } @@ -1502,10 +1498,8 @@ void OResultSet::fillRow(sal_Int32 _nToColumn) case DataType::LONGVARCHAR: case DataType::CLOB: { - ::std::map<sal_Int32,SWORD>::iterator aFind = m_aODBCColumnTypes.find(nColumn); - if ( aFind == m_aODBCColumnTypes.end() ) - aFind = m_aODBCColumnTypes.insert(::std::map<sal_Int32,SWORD>::value_type(nColumn,OResultSetMetaData::getColumnODBCType(m_pStatement->getOwnConnection(),m_aStatementHandle,*this,nColumn))).first; - *pColumn = OTools::getStringValue(m_pStatement->getOwnConnection(),m_aStatementHandle,nColumn,aFind->second,m_bWasNull,**this,m_nTextEncoding); + const SWORD nColumnType = impl_getColumnType_nothrow(nColumn); + *pColumn = OTools::getStringValue(m_pStatement->getOwnConnection(),m_aStatementHandle,nColumn,nColumnType,m_bWasNull,**this,m_nTextEncoding); } break; case DataType::BIGINT: @@ -1750,4 +1744,12 @@ void OResultSet::fillNeededData(SQLRETURN _nRet) while (nRet == SQL_NEED_DATA); } } +// ----------------------------------------------------------------------------- +SWORD OResultSet::impl_getColumnType_nothrow(sal_Int32 columnIndex) +{ + ::std::map<sal_Int32,SWORD>::iterator aFind = m_aODBCColumnTypes.find(columnIndex); + if ( aFind == m_aODBCColumnTypes.end() ) + aFind = m_aODBCColumnTypes.insert(::std::map<sal_Int32,SWORD>::value_type(columnIndex,OResultSetMetaData::getColumnODBCType(m_pStatement->getOwnConnection(),m_aStatementHandle,*this,columnIndex))).first; + return aFind->second; +} |