diff options
Diffstat (limited to 'lotuswordpro/source/filter/tocread.cxx')
-rw-r--r-- | lotuswordpro/source/filter/tocread.cxx | 8 |
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; } |