summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-10 11:54:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-10 18:50:52 +0200
commit241bee7e4be6a205fae0d3f5508e084462c7ca55 (patch)
tree7d8771a5cbbe7021106852f1a54496faeea6ad4e /connectivity
parent36567d58115e21c111b45c011524ddbae540fd91 (diff)
convert WriteCharPtr..getStr to WriteOString
and improve the WriteOString method, we can avoid the strlen here, we already have the length One change in behaviour to be noted - if the string contains trailing zero bytes, which ARE INCLUDED IN THE STRING LENGTH, i.e. I'm not talking about the normal terminating zero, then this patch changes behaviour because we will now write those zeros to the stream. Change-Id: I4668b9b9eb877f820b1dc70d6cd10ba2623bc0a2 Reviewed-on: https://gerrit.libreoffice.org/80597 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 3f91c546fb2d..c6c6626a4965 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -1212,7 +1212,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
throwInvalidColumnType( STR_INVALID_COLUMN_NAME_LENGTH, aName );
}
- m_pFileStream->WriteCharPtr( aCol.getStr() );
+ m_pFileStream->WriteOString( aCol );
m_pFileStream->WriteBytes(aBuffer, 11 - aCol.getLength());
sal_Int32 nPrecision = 0;