Tuomas Räsänen wrote:
Carsten Driesner wrote:

Don't create your own layout manager. Every frame has its own layout manager instance and you can retrieve it using the interface com.sun.star.beans.XPropertySet and "LayoutManager" as the key.


XLayoutManager xLayoutManager = (XLayoutManager)UnoRuntime.queryInterface(XLayoutManager.class, layoutManager);

       xLayoutManager.setVisible(false);

Correct call, but using the wrong layout manager instance. The created layout manager is not associated with any frame, therefore it cannot do anything useful.

Regards,
Carsten

Thanks!! I figured it out myself this morning. :) But still, how should I have known that every frame has an instance of XLayoutManager? There isn't documented such a property in IDL Reference.
Please read service description of com.sun.star.frame.Frame. You can find the following:

//=============================================================================
/** represents the environment for a desktop component

    <p>
Frames are the anchors for the office components and they are the components' link to the outside world. They create a skeleton for the whole office api infrastructure by building frame hierarchys. These hierarchies contains all currently loaded
    documents and make it possible to walk during these trees.
A special service <type>Desktop</type> can(!) combine different of such trees
    to a global one which life time will be controlled by it.
    </p>

    @see Desktop
 */
published service Frame
{
...
//-------------------------------------------------------------------------
    /** provides access to the layout manager of the frame
    */
    [optional, property] com::sun::star::uno::XInterface LayoutManger;
};


And where can I find list of all (resource)URLs used in UNOs? I mean things like "private:resource/menubar/menubar".
Currently there is no list. You can find all user interface elements in the folders <Office installation>/share/config/module/<application module>/<ui element type>/*.xml. Use the file names as the name of the user interface elements.

Regards,
Carsten

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

Reply via email to