summaryrefslogtreecommitdiff
path: root/lotuswordpro/source/filter/tocread.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-19 09:46:31 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2017-06-20 22:03:12 +0200
commitda2f237ab232f01cb21c9d79c53c6921da4e0135 (patch)
tree3916387289943c255fe01ba0bf9003bde732d5dc /lotuswordpro/source/filter/tocread.cxx
parentec25aee171d77a2bc69e01c2dd7c8233075d2511 (diff)
ofz: use OString instead of bare char*
Change-Id: I2f7bfbd62c0a5477f0cbb38e86684db4fdb9c37f Reviewed-on: https://gerrit.libreoffice.org/38953 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'lotuswordpro/source/filter/tocread.cxx')
-rw-r--r--lotuswordpro/source/filter/tocread.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx
index ffd1bb52d409..be8a7b1d264c 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -296,9 +296,11 @@ CBenTOCReader::ReadTOC()
return Err;
}
+ OString sName(sBuffer, Length);
+
CUtListElmt * pPrevNamedObjectListElmt;
if (FindNamedObject(&cpContainer->GetNamedObjects(),
- sBuffer, &pPrevNamedObjectListElmt) != nullptr)
+ sName, &pPrevNamedObjectListElmt) != nullptr)
{
delete[] sAllocBuffer;
return BenErr_DuplicateName;
@@ -309,9 +311,9 @@ CBenTOCReader::ReadTOC()
if (PropertyID == BEN_PROPID_GLOBAL_PROPERTY_NAME)
pObject = new CBenPropertyName(cpContainer, ObjectID,
- pPrevObject, OString(sBuffer, Length), pPrevNamedObjectListElmt);
+ pPrevObject, sName, pPrevNamedObjectListElmt);
else pObject = new CBenTypeName(cpContainer, ObjectID,
- pPrevObject, OString(sBuffer, Length), pPrevNamedObjectListElmt);
+ pPrevObject, sName, pPrevNamedObjectListElmt);
delete[] sAllocBuffer;
}