I want to build an app, using Libreoffice api to open office documents(word, excel, powerpoint) in the same application window, writen by C#.
Can you give me some suggestions?
Thanks.
[Solved] Integration of LibreOffice with WPF
-
- Posts: 3
- Joined: Tue Feb 25, 2014 9:46 am
[Solved] Integration of LibreOffice with WPF
Last edited by shinnguyen5589 on Thu Feb 27, 2014 8:40 am, edited 2 times in total.
OpenOffice 3.1 on Windows 7
Re: Integration of LibreOffice with WPF
OpenOffice documents have nothing to do with Word, Excel nor Powerpoint. Nobody here knows what WTF C# means.
OpenOffice can attach all types of supported documents (including some foreign ones) to its own window tool set. http://www.oooforum.org/forum/viewtopic.phtml?p=36664
OpenOffice can attach all types of supported documents (including some foreign ones) to its own window tool set. http://www.oooforum.org/forum/viewtopic.phtml?p=36664
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Integration of LibreOffice with WPF
For information: WPF seems to stand for Windows Presentation Foundation (WPF), which links to Visual C#.
Google is your friend: start with
How to: Create a C# WPF Application
Google is your friend: start with
How to: Create a C# WPF Application
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
-
- Posts: 3
- Joined: Tue Feb 25, 2014 9:46 am
Re: Integration of LibreOffice with WPF
I built an C# WPF application, this app using Libreoffice api to open office documents. But documents always open in another window. My expectation is open documents in the same window with main app.
Can you give me some suggestions?
Thanks.
Can you give me some suggestions?
Thanks.
OpenOffice 3.1 on Windows 7
Re: Integration of LibreOffice with WPF
Can you do that trick with some typical Windows application?
If it has to be OpenOffcie or LibreOffice, I have suggested a working solution.
If it has to be OpenOffcie or LibreOffice, I have suggested a working solution.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Posts: 3
- Joined: Tue Feb 25, 2014 9:46 am
Re: Integration of LibreOffice with WPF
Hi Villeroy, I don't know exactly what you mean.
This is code I use to open document
//Get a ComponentContext
unoidl.com.sun.star.uno.XComponentContext xLocalContext =
uno.util.Bootstrap.bootstrap();
//Get MultiServiceFactory
unoidl.com.sun.star.lang.XMultiServiceFactory xRemoteFactory =
(unoidl.com.sun.star.lang.XMultiServiceFactory)xLocalContext.getServiceManager();
//Get a ComponentLoader
unoidl.com.sun.star.frame.XComponentLoader xLoader = (unoidl.com.sun.star.frame.XComponentLoader)xRemoteFactory.createInstance("com.sun.star.frame.Desktop");
//Open document
unoidl.com.sun.star.beans.PropertyValue[] Args = new unoidl.com.sun.star.beans.PropertyValue[1];
XComponent xComponent = xLoader.loadComponentFromURL(@"file:///C:/Users/Documents/demo.odt", "_blank", 0, Args);
This is code I use to open document
//Get a ComponentContext
unoidl.com.sun.star.uno.XComponentContext xLocalContext =
uno.util.Bootstrap.bootstrap();
//Get MultiServiceFactory
unoidl.com.sun.star.lang.XMultiServiceFactory xRemoteFactory =
(unoidl.com.sun.star.lang.XMultiServiceFactory)xLocalContext.getServiceManager();
//Get a ComponentLoader
unoidl.com.sun.star.frame.XComponentLoader xLoader = (unoidl.com.sun.star.frame.XComponentLoader)xRemoteFactory.createInstance("com.sun.star.frame.Desktop");
//Open document
unoidl.com.sun.star.beans.PropertyValue[] Args = new unoidl.com.sun.star.beans.PropertyValue[1];
XComponent xComponent = xLoader.loadComponentFromURL(@"file:///C:/Users/Documents/demo.odt", "_blank", 0, Args);
OpenOffice 3.1 on Windows 7
Re: [Solved] Integration of LibreOffice with WPF
Hi! I have your same problem. Can you help me? I want to open office file in a user control WPF C#.
Thanks a lot
Gabriele
Thanks a lot
Gabriele
shinnguyen5589 wrote:I want to build an app, using Libreoffice api to open office documents(word, excel, powerpoint) in the same application window, writen by C#.
Can you give me some suggestions?
Thanks.
OpenOffice 3.1 Windows Vista