Rafael Dominguez wrote: > > Oops my bad, heres the patch attached > Hi Rafael,
nice improvement - two nits though: > @@ -65,6 +67,8 @@ namespace drawinglayer > /// discrete border (in 'pixels') > sal_uInt32 mnDiscreteBorder; > > + const Graphic *mpSnapshot; > + > Parent classes of MediaPrimitive2D derive from boost::noncopyable - that means you don't have to worry about having to modify mpSnapshot, which in turn means it could be const Graphic& instead. But it's even easier, since Graphic has copy-on-write behaviour - you can simply hold a Graphic by value in your primitive, it only contains a cheap ptr to an impl class, that gets, if necessary, copied & duplicated if you modify one of the many shared copies. (many bulky objects in LibO have that behaviour, including bitmaps, polygons, and metafiles (sorta)) Cheers, -- Thorsten
pgptBziKp2SAz.pgp
Description: PGP signature
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice