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

Joined: 17 Mar 2012 Posts: 46
|
Posted: Mon Jul 02, 2012 9:10 pm Post subject: [Solved][Python] Importing com.sun.star.uno.AnyConverter |
|
|
Hi,
When I try to import AnyConverter using from com.sun.star.uno import AnyConverter I get the following error.
| Code: | | ERROR: Couldn't load file:///home/ishan/.libreoffice/3/user/uno_packages/cache/uno_packages/lukvbn7g.tmp_/out.oxt/CcOOoAddin.py for reason type com.sun.star.uno.AnyConverter is unknown |
I'm porting a Java extension to Python. AnyConverter has been used to do the following in the Java extension.
| Code: |
//xBitmapContainer is a XNameContainer
Object obj = xBitmapContainer.getByName("imgID");
String internalURL = AnyConverter.toString(obj);
|
Any help regarding this will be highly appreciated 
Last edited by ishanthilina on Thu Jul 05, 2012 7:04 am; edited 1 time in total |
|
| Back to top |
|
 |
hanya Super User

Joined: 04 May 2005 Posts: 543 Location: Japan
|
Posted: Tue Jul 03, 2012 4:30 am Post subject: |
|
|
There is no AnyConverter for PyUNO, it is only for Java bridge.
If you rewrite something in other language, learn both languages. See:
http://www.openoffice.org/api/docs/java/ref/overview-summary.html
In PyUNO bridge, no "any" idl type value returned by UNO methods or properties. |
|
| Back to top |
|
 |
ishanthilina General User

Joined: 17 Mar 2012 Posts: 46
|
Posted: Thu Jul 05, 2012 7:04 am Post subject: |
|
|
| Thanks for the pointer Hanya! |
|
| Back to top |
|
 |
|