Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


On 26/05/2017 11:23, Michael Meeks wrote:
Hi guys,

        Seems like people think this is a good idea; so here is what is planned
- I'd love some help with it when we're post 5.4.2 - (it's a big change
so avoiding hurting back-porting is important - with ~3k sites all over
the code).

        Three reasonably simple changes:

replace:        VclPtrInstance<Foo> pFoo( pParent );
with:           auto pFoo = VclPtr<Foo>::Create( pParent );

replace:        ScopedVclPtrInstance<Foo> pFoo( pParent );
with:           auto pFoo = ScopedVclPtr<Foo>::Create( pParent );

        s/ScopedVclPtr/VclPtrAutoDispose/g

        Unless we come up with a better name for the last sed; one suggestion
was 'guard' but guards are released - not disposed; unsure if there is a
similar UNO helper concept - Stephan ?
Hi,

To be sure we don't mixup the replace patterns, we should begin with 2nd replace (ScopedVclPtrInstance).
Here's a regexp:
sed -e 's/ScopedVclPtrInstance<\(.*\)>[ ]\(.*\)([ ]*pParent[ ]*)/auto \2 = ScopedVclPtr<\1>::Create(pParent)/g'

For VclPtrInstance one:
sed -e 's/VclPtrInstance<\(.*\)>[ ]\(.*\)([ ]*pParent[ ]*)/auto \2 = VclPtr<\1>::Create(pParent)/g'

Julien

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.