[Libreoffice-commits] core.git: Branch 'feature/gsoc-writer-char-borders' - 3 commits - include/drawinglayer sw/inc sw/source

Zolnai Tamás zolnaitamas2000 at gmail.com
Mon Jul 8 08:52:06 PDT 2013


2013/7/8 Miklos Vajna <vmiklos at vmiklos.hu>

> On Sun, Jul 07, 2013 at 11:19:11AM -0700, =?ISO-8859-1?Q?Zolnai_Tam=E1s_ <
> zolnaitamas2000 at gmail.com>, ?= wrote:
> > +    // character borders
> > +    editeng::SvxBorderLine*     m_pTopBorder;
> > +    editeng::SvxBorderLine*     m_pBottomBorder;
> > +    editeng::SvxBorderLine*     m_pRightBorder;
> > +    editeng::SvxBorderLine*     m_pLeftBorder;
> > +
> ....
> > +void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
> > +{
> > +    delete m_pLeftBorder;
> > +    if( pLeftBorder )
> > +        m_pLeftBorder = new editeng::SvxBorderLine(*pLeftBorder);
> > +    else
> > +        m_pLeftBorder = 0;
> > +    bFntChg = sal_True;
> > +}
>
> Hmm, what's the benefit or manual memory management here? If you need a
> pointer, you could use boost::shared_ptr here. Though I'm not sure you
> really need a pointer here. If you just want optional members,
> boost::optional is better.
>

You're right, boost::optional will be better. I'll correct it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130708/46bf6ccf/attachment.html>


More information about the LibreOffice mailing list