| View previous topic :: View next topic |
| Author |
Message |
Squall General User

Joined: 16 Feb 2007 Posts: 20
|
Posted: Fri Feb 16, 2007 7:32 am Post subject: UI Changes |
|
|
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 |
|
 |
Squall General User

Joined: 16 Feb 2007 Posts: 20
|
Posted: Sat Feb 17, 2007 1:58 pm Post subject: |
|
|
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 |
|
 |
Squall General User

Joined: 16 Feb 2007 Posts: 20
|
Posted: Thu Feb 22, 2007 5:30 am Post subject: |
|
|
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 |
|
 |
|