summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-27 20:37:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-28 09:55:03 +0000
commit6f33482f8f4329b6c9874397bdb67c1b958b69c2 (patch)
treeba19bc4bff6ddbd87354f90a61615cf5f4892c5a /connectivity
parentc95a10ca2079cdc33d09189aef0a8788eab274ff (diff)
ByteString->rtl::OUStringToOString
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/dbase/DIndex.cxx6
-rw-r--r--connectivity/source/drivers/dbase/dindexnode.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index 99df624e5a94..0e22387bff3f 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -416,7 +416,7 @@ void ODbaseIndex::createINFEntry()
}
}
}
- aInfFile.WriteKey(aNewEntry,ByteString(sEntry,m_pTable->getConnection()->getTextEncoding()));
+ aInfFile.WriteKey(aNewEntry, rtl::OUStringToOString(sEntry, m_pTable->getConnection()->getTextEncoding()));
}
// -------------------------------------------------------------------------
sal_Bool ODbaseIndex::DropImpl()
@@ -563,8 +563,8 @@ sal_Bool ODbaseIndex::CreateImpl()
m_pFileStream->SetStreamSize(PAGE_SIZE);
- ByteString aCol(aName,m_pTable->getConnection()->getTextEncoding());
- strncpy(m_aHeader.db_name,aCol.GetBuffer(),std::min((sal_uInt16)sizeof(m_aHeader.db_name), aCol.Len()));
+ rtl::OString aCol(rtl::OUStringToOString(aName, m_pTable->getConnection()->getTextEncoding()));
+ strncpy(m_aHeader.db_name, aCol.getStr(), std::min<size_t>(sizeof(m_aHeader.db_name), aCol.getLength()));
m_aHeader.db_unique = m_IsUnique ? 1: 0;
m_aHeader.db_keyrec = m_aHeader.db_keylen + 8;
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index 2c96d463c575..0b67e1d5c66f 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -710,8 +710,8 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
if (!aKey.getValue().isNull())
{
::rtl::OUString sValue = aKey.getValue();
- ByteString aText(sValue.getStr(), rIndex.m_pTable->getConnection()->getTextEncoding());
- strncpy(aData,aText.GetBuffer(),std::min(rIndex.getHeader().db_keylen, aText.Len()));
+ rtl::OString aText(rtl::OUStringToOString(sValue, rIndex.m_pTable->getConnection()->getTextEncoding()));
+ strncpy(aData, aText.getStr(), std::min<size_t>(rIndex.getHeader().db_keylen, aText.getLength()));
}
rStream.Write((sal_uInt8*)aData,rIndex.getHeader().db_keylen);
}