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


On Fri, May 16, 2014 at 11:30:15AM +0200, Jean-Pierre Ledure wrote:
On 15/05/2014 12:30, Lionel Elie Mamane wrote:

one might hope that when loading the library, one source is
always preferred over the other.

After a test the behaviour of LibreOffice is found sane: when installing an
extension with the same name as a pre-installed one, the extension gets
INSTALLED but cannot be ENABLED.
So the pre-existing one keeps the precedence.

I took a deeper look at it; actually, the problem is different. A
user-installed extension *is* allowed to override a Basic script (or
dialog) library from a *bundled* *extension*, or from a *system*
(installed as "for all users") extension. *But* not to override a
script (or dialog) library that forms an integral part of
LibreOffice. And access2base is (in LibreOffice 4.2) not a bundled
extension, but a "standard" part of LibreOffice.

The code that enforces that is:

desktop/source/deployment/registry/script/dp_script.cxx around line 350:

            if (sOriginalUrl.match("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE")
                || sOriginalUrl.match("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE")
                || sOriginalUrl.match("vnd.sun.star.expand:$BUNDLED_EXTENSIONS"))
            {
                xScriptLibs->removeLibrary(rName);
                bCanAdd = true;
            }
            else
            {
                bCanAdd = false;
            }

However, if I direct the code flow into the if branch anyway with gdb,
then everything goes well, the built-in access2base is disabled and
the one from the user-installed extension takes over.

So, the question is "why does this code enforce this condition, and
can we change it"? Can we just remove the condition altogether, or
should we add this case:

                || sOriginalUrl.match("$(INST)")

Noel? Uray? You are our Basic "FindTheExpert"s. What's your opinion on
this?

-- 
Lionel

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.