diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-12-13 23:13:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-12-14 09:52:49 +0000 |
commit | 8cbfe4e211e1aafe6cab64682b3e326153bdfb1e (patch) | |
tree | 43e56395a2ca343807abbe5a0a9d60e3a6539ac2 /connectivity | |
parent | 2b4aa9198148c1af610df024e3a7cb09752e1819 (diff) |
ByteString->rtl::OString[Buffer]
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/dbase/DTable.cxx | 8 | ||||
-rw-r--r-- | connectivity/source/drivers/dbase/dindexnode.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 8d6c4670a6a6..7200ac2da2eb 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1661,7 +1661,7 @@ Reference<XPropertySet> ODbaseTable::isUniqueByColumnName(sal_Int32 _nColumnPos) return Reference<XPropertySet>(); } //------------------------------------------------------------------ -double toDouble(const ByteString& rString) +static double toDouble(const rtl::OString& rString) { return ::rtl::math::stringToDouble( rString, '.', ',', NULL, NULL ); } @@ -1908,12 +1908,12 @@ sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,c // one, because const_cast GetFormatPrecision on SvNumberFormat is not constant, // even though it really could and should be - const ByteString aDefaultValue( ::rtl::math::doubleToString( n, rtl_math_StringFormat_F, nScale, '.', NULL, 0)); - const sal_Int32 nValueLen = aDefaultValue.Len(); + const rtl::OString aDefaultValue( ::rtl::math::doubleToString( n, rtl_math_StringFormat_F, nScale, '.', NULL, 0)); + const sal_Int32 nValueLen = aDefaultValue.getLength(); if ( nValueLen <= nLen ) { // Write value right-justified, padded with blanks to the left. - memcpy(pData+nLen-nValueLen,aDefaultValue.GetBuffer(),nValueLen); + memcpy(pData+nLen-nValueLen,aDefaultValue.getStr(),nValueLen); // write the resulting double back *rRow.get()[nPos] = toDouble(aDefaultValue); } diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 0b67e1d5c66f..c1befc432e45 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -911,7 +911,7 @@ void ONDXPage::PrintPage() } else { - OSL_TRACE("SDB: [%d,%s,%d]",rKey.GetRecord(), (const char* )ByteString(rKey.getValue().getString().getStr(), rIndex.m_pTable->getConnection()->getTextEncoding()).GetBuffer(),rNode.GetChild().GetPagePos()); + OSL_TRACE("SDB: [%d,%s,%d]",rKey.GetRecord(), rtl::OUStringToOString(rKey.getValue().getString(), rIndex.m_pTable->getConnection()->getTextEncoding()).getStr(),rNode.GetChild().GetPagePos()); } } OSL_TRACE("SDB: -----------------------------------------------"); diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index bcaa77e3cede..215c0e257b83 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -278,21 +278,21 @@ namespace connectivity ::std::auto_ptr<SvStream> pStream( ::utl::UcbStreamHelper::CreateStream(xStream) ); if ( pStream.get() ) { - ByteString sLine; + rtl::OString sLine; rtl::OString sVersionString; while ( pStream->ReadLine(sLine) ) { - if ( sLine.Len() == 0 ) + if ( sLine.getLength() == 0 ) continue; - const ByteString sIniKey = comphelper::string::getToken(sLine, 0, '='); - const ByteString sValue = comphelper::string::getToken(sLine, 1, '='); - if ( sIniKey.Equals( "hsqldb.compatible_version" ) ) + const rtl::OString sIniKey = comphelper::string::getToken(sLine, 0, '='); + const rtl::OString sValue = comphelper::string::getToken(sLine, 1, '='); + if (sIniKey.equalsL(RTL_CONSTASCII_STRINGPARAM("hsqldb.compatible_version"))) { sVersionString = sValue; } else { - if ( sIniKey.Equals( "version" ) + if (sIniKey.equalsL(RTL_CONSTASCII_STRINGPARAM("version")) && ( sVersionString.isEmpty() ) ) { |