Hi Michael, Hi Xisco, all,
On Thu, 19 May 2011 15:05:26 +0100
Michael Meeks <michael.meeks@novell.com>
wrote:
So - if we want to use this class from Python, we need to
work out:
a) what the heck is going on in that resource.cxx class :-)
+ why is it implementing XInvocation - there seems to
be no really good reason for this.
+ particularly since getDefaultInvocation just returns
null always ;-)
I have taken a look at the class and all it does is provide
string resources via the good ol' tools ressource manager. I have
thrown out all the crap and ended up with 100 lines of code (instead of
more than 400) without the need to break the world by tweaking around
with XInvocation. It is basically just a XIndexAccess now providing the
OUString for a given ResId.
The only disadvantage as of now is that you now get each string
separate and lock the SolarMutex each time. The old implementation had a
"getStrings" function that allowed getting multiple strings with one
call. If that is an issue performancewise, we would need to define a
custom idl interface for it.
b) should we just re-write it as a clean interface, instead of
this 'orrible mess ?
Yes. I just did.
c) if so - we should unwind the mess in Wizards, explicitly
doing pointless lifting like:
final String IDString = (String)
xInvocation.invoke("getString", nIDArray, PointerArray, DummyArray);
I imagine.
Absolutely.
If the old VclStringResourceLoader implementation is not used elsewhere
anymore, we should kill it off. If there is stuff still depending on it,
we should replace that and kill it off then.
I will fixup the proof-of-concept code (which I luckily have on a local
feature branch), and will try to merge it in as soon as master isnt
broken(*).
Best,
Bjoern
(*) Hopefully, sometime this week.
--
https://launchpad.net/~bjoern-michaelsen
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.