MinGW-Port: Problems with UnoUrlResolver

Stephan Bergmann sbergman at redhat.com
Mon Feb 27 07:49:36 PST 2012


On 02/27/2012 01:07 PM, Helmar Spangenberg wrote:
> Anyway - using the older toolchain I got a working testing environment and
> proceded a little bit. I have the impression that the difficulties rise
> building the local context. As far as I could debug it, everything looks fine
> until a UnoUrlResolver instance shall be created using the local context. That
> fails - obviously when checking "the_instance.is()".
>
> So my guess is, the created local context is incomplete.
>
> Checking a little further, it seems that the file "uno.ini" in my actual
> working directory is analyzed to set up te local context (unfortunately I do
> not understand the entries in that file - any hint?); but a little bit further
> down in the code my debugs signal a NULL context, so that something else is
> created as local context.
>
> I tried to find out where the ini-file is analyzed and/or the local context is
> created, but I got stuck  - the code as a whole is somewhat confusing...
> Is there anybody who can tell where I should seek to find the context creation
> functions?

Calling defaultBootstrap_InitialComponentContext() (i.e., the variant 
without arguments) causes the code to pick up a "uno" ini file next to 
the cppuhelper dynamic library (see get_unorc in 
cppuhelper/source/bootstrap.cxx).

For the relevant entries in that ini file see "UNO Deployment Variables" 
in ure/source/README.

Setting up a UNO environment manually for an application is difficult 
and error prone.  The easiest approach is to use the wrapper provided by 
the SDK, see 
<http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/Transparent_Use_of_Office_UNO_Components>.

Stephan


More information about the LibreOffice mailing list