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


Hi

I'm starting on this again:
https://bugs.freedesktop.org/show_bug.cgi?id=46808

Large chunks of the work are pretty mechanical, but it would make work much easier if the auto-generated C++ had some additional helper methods.


(1) Down-conversion implicit conversion operators for converting from an interface to it's sub-interfaces.
Which would help me replace this:
uno::Reference < i18n::XBreakIterator2 > xB2 = i18n::BreakIterator2::create(xContext); uno::Reference < i18n::XBreakIterator > xB1 = uno::Reference<i18n::XBreakIterator>(xB2, uno::UNO_QUERY_THROW);
with this:
uno::Reference < i18n::XBreakIterator > xB1 = i18n::BreakIterator2::create(xContext); to simplify code when converting from the new interfaces to the old interfaces, which happens a lot
because I don't want the changes to ripple out.

(2) A new version of the factory create method that uses the current process component context.
i.e. instead of
        uno::Reference< i18n::XBreakIterator > xLocalBreakIterator;
uno::Reference< uno::XComponentContext > xContext(::comphelper::getProcessComponentContext());
xLocalBreakIterator.set(i18n::BreakIterator2::create(xContext));
I could write:
        uno::Reference< i18n::XBreakIterator > xLocalBreakIterator;
xLocalBreakIterator.set(i18n::BreakIterator2::createWithProcessContext());


Thanks,
    Noel Grandin

(yes, I do indeed pride myself on being a very lazy programmer :-)

Disclaimer: http://www.peralex.com/disclaimer.html



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.