OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

UI Changes

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Squall
General User
General User


Joined: 16 Feb 2007
Posts: 20

PostPosted: Fri Feb 16, 2007 7:32 am    Post subject: UI Changes Reply with quote

Hi,

im currently trying to change the UI from swriter. The Users shall only see some options(like bold, italic, etc) but not the Fonts,...

(For some background, i want to load a document in the writer(i can do that now) and display it in a C# Form(embedded). Then the user can make some changes and save the document.)

Could you be so kind to show me a sample for C# or point me to something that could help me? Ive been searching quite a while now but i didnt manage to make some real progress.

Thanks in advance,

Squall.
Back to top
View user's profile Send private message
Squall
General User
General User


Joined: 16 Feb 2007
Posts: 20

PostPosted: Sat Feb 17, 2007 1:58 pm    Post subject: Reply with quote

Hi,

could i load a template with says what menüs schould be visible and then import my RTF file? Would that file be correctly parsed while the menues stay the same?

Thanks for answers.

Squall
Back to top
View user's profile Send private message
Squall
General User
General User


Joined: 16 Feb 2007
Posts: 20

PostPosted: Thu Feb 22, 2007 5:30 am    Post subject: Reply with quote

Hi,

i would like to start the swriter doc hidden, im able to do this, make changes and set it visible.

But if i start the doc hidden im not able to get a Frame for my layoutmanager. It returns null.

Code:
XComponentContext xComponentContext = uno.util.Bootstrap.bootstrap();
            xMultiServiceFactory = (unoidl.com.sun.star.lang.XMultiServiceFactory)xComponentContext.getServiceManager();
           
            xdesktop = (XDesktop)xMultiServiceFactory.createInstance(
                        "com.sun.star.frame.Desktop");

            cLoader = (XComponentLoader)xMultiServiceFactory.createInstance("com.sun.star.frame.Desktop");
            String path = PathConverter(this.args[0]);
            unoidl.com.sun.star.beans.PropertyValue[] propertyValue = new unoidl.com.sun.star.beans.PropertyValue[1];
            propertyValue[0] = new unoidl.com.sun.star.beans.PropertyValue(); 
            propertyValue[0].Name = "Hidden";
            propertyValue[0].Value = new uno.Any(typeof(Boolean), false);
            textdocument = cLoader.loadComponentFromURL(path, "_blank",
                        0, propertyValue);//private:factory/swriter for a blank doc
           
            frame = xdesktop.getCurrentFrame();


And how can i set the doc visible again? From the document i dont seem to be able to get properties as well as from the frame or the controller.

Martin
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group