From 9192e5de7dd52f3864d4870569458b2d9226f2a0 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 24 Dec 2010 12:33:33 +0100 Subject: make copying aware of NULL pointers --- lotuswordpro/source/filter/lwpcharborderoverride.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lotuswordpro/source/filter/lwpcharborderoverride.cxx') diff --git a/lotuswordpro/source/filter/lwpcharborderoverride.cxx b/lotuswordpro/source/filter/lwpcharborderoverride.cxx index 927d1dd78b03..b654afdf6f58 100644 --- a/lotuswordpro/source/filter/lwpcharborderoverride.cxx +++ b/lotuswordpro/source/filter/lwpcharborderoverride.cxx @@ -64,6 +64,7 @@ #include +#include "clone.hxx" #include "lwpcharborderoverride.hxx" #include "lwpborderstuff.hxx" #include "lwpmargins.hxx" @@ -80,8 +81,8 @@ LwpCharacterBorderOverride::LwpCharacterBorderOverride(LwpCharacterBorderOverrid , m_nAboveWidth(rOther.m_nAboveWidth) , m_nBelowWidth(rOther.m_nBelowWidth) { - std::auto_ptr pBorderStuff(new LwpBorderStuff(*rOther.m_pBorderStuff)); - std::auto_ptr pMargins(new LwpMargins(*rOther.m_pMargins)); + std::auto_ptr pBorderStuff(::clone(rOther.m_pBorderStuff)); + std::auto_ptr pMargins(::clone(rOther.m_pMargins)); m_pBorderStuff = pBorderStuff.release(); m_pMargins = pMargins.release(); } -- cgit