To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=52761


User ronyf changed the following:

                  What    |Old value                 |New value
================================================================================
                    Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
                Resolution|                          |FIXED
--------------------------------------------------------------------------------




------- Additional comments from [EMAIL PROTECTED] Wed Aug 17 08:26:48 -0700 
2005 -------
Hi there,

thank you for your hint about the SDK (thought that the WWW-version was
up-to-date). 

Using Bootstrap.bootstrap() - which is documented in the SDK - solves the issue
altogether. 

Running with OOo 1.1.4 reveals that there are 594 services available, running
with 1.9.122 reveals 817. *Very* impressive!

Thank you very much for your kind efforts!

---rony

P.S.: A couple of weeks ago I tried to go after
"Bootstrap.defaultBootstrap_InitialComponentContext()", supplied the path to
OOo, but it was like opening a can of worms: after that it needed infos in
configuration files etc. so it was not a venue I could follow, because end-users
usually wouldn't be able to change their environment and configuration files on
their own (and they should not do that anyway).

P.P.S.: For those who want to copy and paste running Java code
("RgfUnoAnalyzeTest6.java"):

---------------------- cut here ---------------------
import com.sun.star.comp.helper.Bootstrap;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;

public final class RgfUnoAnalyzeTest6 {

    static String key [] = 
{"/singletons/com.sun.star.reflection.theCoreReflection",
                           
"/singletons/com.sun.star.reflection.theTypeDescriptionManager",
                            "/singletons/com.sun.star.lang.theServiceManager"
                           };
    static XComponentContext ctxt0=null;

    /** Static block to initialize static fields. */
    static {
        try
        {
                // the following does not work
            // ctxt0=Bootstrap.defaultBootstrap_InitialComponentContext(); // as
of issue-resolver

                // the following works, but has not the reflection singletons in
the context!
            // ctxt0=Bootstrap.createInitialComponentContext(null) ;   //
creates a minimal UNO environment

                // the following works on OOo 1.1.4 and 1.9.122, the singletons
are there as well! 20050817
            ctxt0=Bootstrap.bootstrap() ;   // since UDK 3.1.0

            System.err.println("ctxt0="+pp(ctxt0)+"\n---");

                // get the service manager from the context
            String [] sNames=((com.sun.star.lang.XMultiComponentFactory)
ctxt0.getServiceManager()).getAvailableServiceNames();
           
System.err.println("getServiceManager()="+pp(ctxt0.getServiceManager())+"\n---");

            for (int i=0; i<sNames.length; i++)
            {
                System.err.println("Service # "+pp(""+i)+": "+pp(sNames[i]));
            }
            System.err.println("---");


            for (int i=0; i<key.length; i++)
            {
                System.err.print(key[i]+"=");
                Object tcr2=ctxt0.getValueByName(key[i]);
                System.err.println(pp(tcr2));
            }
        }
        catch (Exception e)
        {
            System.err.println("Exception:" + pp(e) + "has occurred!");
        }
    }


    public static void main(String[] arguments) throws Exception {

        System.exit(0);
    }

    private RgfUnoAnalyzeTest6 () {}

    public static String pp(Object o)
    {
        if (o==null) return "<null>  <=== <=== <===";
        return "<"+o.toString()+">";
    }
}
---------------------- cut here ---------------------




---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to