Kaydet (Commit) dd891ec4 authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Noel Grandin

cppcheck: memleak (false positive)

but manage ownership from start

Change-Id: Ia9d29cc0e0676173c231c8b68b7681cc1b3dff86
Reviewed-on: https://gerrit.libreoffice.org/33392Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 38f90827
......@@ -1404,11 +1404,11 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
aNewFontItem.SetFamilyName( GetFontToSubsFontName( hConv ) );
// Replace the existing attribute with a new one.
XEditAttribute* pNewAttr = CreateAttrib(aNewFontItem, rAttr.GetStart(), rAttr.GetEnd());
pC->maCharAttribs[nAttr] =
std::unique_ptr<XEditAttribute>(CreateAttrib(aNewFontItem, rAttr.GetStart(), rAttr.GetEnd()));
pPool->Remove(*rAttr.GetItem());
pC->maCharAttribs[nAttr] = std::unique_ptr<XEditAttribute>(pNewAttr);
XEditAttribute* pNewAttr = pC->maCharAttribs[nAttr].get();
for ( sal_uInt16 nChar = pNewAttr->GetStart(); nChar < pNewAttr->GetEnd(); nChar++ )
{
sal_Unicode cOld = pC->GetText()[ nChar ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment