<br><br><div class="gmail_quote">On Wed, Jun 27, 2012 at 5:58 AM, Thorsten Behrens <span dir="ltr"><<a href="mailto:thb@documentfoundation.org" target="_blank">thb@documentfoundation.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Rafael Dominguez wrote:<br>
> > Oops my bad, heres the patch attached<br>
><br>
</div>Hi Rafael,<br>
<br>
nice improvement - two nits though:<br>
<br>
> @@ -65,6 +67,8 @@ namespace drawinglayer<br>
> /// discrete border (in 'pixels')<br>
> sal_uInt32 mnDiscreteBorder;<br>
><br>
> + const Graphic *mpSnapshot;<br>
> +<br>
><br>
Parent classes of MediaPrimitive2D derive from boost::noncopyable -<br>
that means you don't have to worry about having to modify mpSnapshot,<br>
which in turn means it could be const Graphic& instead.<br>
<br>
But it's even easier, since Graphic has copy-on-write behaviour -<br>
you can simply hold a Graphic by value in your primitive, it only<br>
contains a cheap ptr to an impl class, that gets, if necessary,<br>
copied & duplicated if you modify one of the many shared copies.<br>
<br>
(many bulky objects in LibO have that behaviour, including bitmaps,<br>
polygons, and metafiles (sorta))<br>
<br>
Cheers,<br>
<br>
-- Thorsten<br>
</blockquote></div><br>Thanks for the input, i took your advice and changed it, gonna push it to my branch then<br>