On Sun, Jul 07, 2013 at 11:19:11AM -0700, =?ISO-8859-1?Q?Zolnai_Tam=E1s_ <zolnaitamas2000@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.
Attachment:
signature.asc
Description: Digital signature