If you are stubborn, or an idiot, or you just like using junky apps Open Office is for you. This is probably one of the only situations I'd suggest paying for and installing Office 2007 / 2003. It's just worth it.
I've been doing some automation in C# / Open Office [which I would love to rename Open Orface] and have been having issues porting Java code into C# - especially with this god darn UnoRuntime B.S.
So, what the fark is UnoRuntime and how the hell do I use it in Open Office. Well, I'm not going to get into the nitty gritty about it here - rather I'm going to explain how you don't use this somewhat core seeming object when building automation in C#.
As I'm sure you are aware - UnoRuntime is not available from C# - BUT - Most of the Java examples use this object heavily to query the UI layer and for object creation (or brokering I'm no expert under the Open Orface hood).
At first I took a look into Marshal.QueryInterface method just to see if I couldn't find the UnoRuntime somewhere in the COM layer - I turned around and decided to use an elaborate try catch + reflection algorithm to gain some concrete understanding of what was in the uno objects.
As you work more with Open Office you will realize the C# library uno, and unoidl namespaces merely contain gigantic unorganized transparent object proxy's that point into completely nonintuitive open office objects. Moreover, these open office objects are heavily based on the use of Interfaces - well I looked a bit deeper into the types I was calling and low and behold - they are pretty much huge junky objects that expose a countless number of interfaces - so we don't really even need the UnoRuntime (which makes me wonder why Java uses it).
The bottom line in this article is that UnoRuntime doesn't exist in C#. If you are porting Open Orface Java code into C# then forget about UnoRuntime. Do everything through casting and shut the hell up.
Here is an example of the Java to C# difference in creating a text property replacer:
xRepDesc is of interface type: XReplaceDescriptor AND XPropertyReplace so you can just cast the xRepDesc into XPropertyReplace and boom you're running.
Java:
XPropertyReplace xPropRepl = (XPropertyReplace) UnoRuntime.queryInterface(XPropertyReplace.class, xRepDesc);
C#:
XPropertyReplace xPropRepl = ((XPropertyReplace)xRepDesc);
Just in case you don't know, you create the xRepDesc object by, guess what - casting xComponent (of type - you guessed it XComponet - seriously wtf is an XComponent):
XReplaceDescriptor xRepDesc = ((unoidl.com.sun.star.util.XReplaceable)xComponent).createReplaceDescriptor();
I'm going to go ahead and call this automarshalling and be done with it. It sucks and if I had a server app I'd be tempted to write all my Open Orface automation in Java and write a high level COM abstraction to port a simple oAssWrapper.RunJunk(params) method and not have to deal with the hassle - OR - just go the Open Document route and use MS Word automation and then merely use open office to convert the document.
Over And Out
- Philosophy, Idiocy, Internet Strategy, .Net Development and JavaScript Web Development
26/02/2008
Goodbye Stage 6 - What will happen to Joox and Quick Silver Screen
As pretty much everyone knows by know, Stage 6 is being shut down on February 28th. This is truly disappointing but what can you expect from a high quality / high bandwidth site like that. I truly cannot imagine what their hosting costs must look like month over month.
There are few things that come to mind here:
1) Download the Veoh player, because when it comes to quality Veoh may be the best bet for user uploaded content. Most likely Veoh will become the new player for copyright infringement. I've used Joost & Miro (democracy player) BUT Veoh takes the cake as the superior IPTV content provider. Its really tough to find anything enjoyable on Joost / Miro but Veoh already hosts syndicated content from sites like ABC and NBC etc. Just wait on a My Veoh site launching that caters toward finding syndicated (illegal) copyright content in Veoh. This may be Joox, this may be Red Curtain Movies - infact Joox which was predominantly a Stage 6 deep linker has already declared they are revamping their site. It was amazing to see how users reacted to stage 6's closure by uploading links to pretty much their entire video library to Quick Silver Screen in Veoh format.
2) Bit Torrent sites will see traffic boosts. I can't watch a streaming movie on Google nor many of those other stupid video sites because the quality is terrible. My bet is people wanting to download content will switch to torrents (which are notoriously slow on many high speed networks due to packet shaping / throttling). If you live in Toronto Bell is faster than Rogers for torrent BUT is still nowhere near streamable speeds.
3) What will occur from the increased posts of illegal copyright content in these other movie sites? Google has yet to settle it's billion dollar copyright suits and with Stage 6 being shut down, they are likely to see an increase of illegal content on their servers and many more law suits. Being a Microsoft developer, and having watched Google revamp the internet dev vertical, (making it harder for everyone) I have every interest in seeing them get squashed by these claims.
4) The studios are playing around with digital markers in video which identify the video as being copyrighted. The technology basically read frames and look for strange shapes / overlays of shapes to be determine the source - and thereby can determine if the content is copyrighted. Moreover - they are digitally stamping screeners with unique imprints to identify the shop that leaked the film. It is just a matter of time before the USA legislates that the loophole in DMCA which provides for "take down notices" is changed OR more likely the free market will dictate that change based on the reduced costs of automation (hold on for recession everyone, it will be the next step in automation ... sorry). If I was Veoh, I'd rather automate this process than have a department that responds to take down notices. Keep in mind, torrent sites, while they may be able to determine where the leak is, they won't be able to stop the torrents from being shared.
Now if only I could run bit torrent to a video stream, then I'd be happy.
Losing Stage 6 is like losing the love of your life, no matter how hard you try to win her back, the reality is they are already gone.
Over and Out
There are few things that come to mind here:
1) Download the Veoh player, because when it comes to quality Veoh may be the best bet for user uploaded content. Most likely Veoh will become the new player for copyright infringement. I've used Joost & Miro (democracy player) BUT Veoh takes the cake as the superior IPTV content provider. Its really tough to find anything enjoyable on Joost / Miro but Veoh already hosts syndicated content from sites like ABC and NBC etc. Just wait on a My Veoh site launching that caters toward finding syndicated (illegal) copyright content in Veoh. This may be Joox, this may be Red Curtain Movies - infact Joox which was predominantly a Stage 6 deep linker has already declared they are revamping their site. It was amazing to see how users reacted to stage 6's closure by uploading links to pretty much their entire video library to Quick Silver Screen in Veoh format.
2) Bit Torrent sites will see traffic boosts. I can't watch a streaming movie on Google nor many of those other stupid video sites because the quality is terrible. My bet is people wanting to download content will switch to torrents (which are notoriously slow on many high speed networks due to packet shaping / throttling). If you live in Toronto Bell is faster than Rogers for torrent BUT is still nowhere near streamable speeds.
3) What will occur from the increased posts of illegal copyright content in these other movie sites? Google has yet to settle it's billion dollar copyright suits and with Stage 6 being shut down, they are likely to see an increase of illegal content on their servers and many more law suits. Being a Microsoft developer, and having watched Google revamp the internet dev vertical, (making it harder for everyone) I have every interest in seeing them get squashed by these claims.
4) The studios are playing around with digital markers in video which identify the video as being copyrighted. The technology basically read frames and look for strange shapes / overlays of shapes to be determine the source - and thereby can determine if the content is copyrighted. Moreover - they are digitally stamping screeners with unique imprints to identify the shop that leaked the film. It is just a matter of time before the USA legislates that the loophole in DMCA which provides for "take down notices" is changed OR more likely the free market will dictate that change based on the reduced costs of automation (hold on for recession everyone, it will be the next step in automation ... sorry). If I was Veoh, I'd rather automate this process than have a department that responds to take down notices. Keep in mind, torrent sites, while they may be able to determine where the leak is, they won't be able to stop the torrents from being shared.
Now if only I could run bit torrent to a video stream, then I'd be happy.
Losing Stage 6 is like losing the love of your life, no matter how hard you try to win her back, the reality is they are already gone.
Over and Out
21/02/2008
Queen West 6 Alarm Blaze Photos

For anyone wondering just how close the fire was to my building, here are some pictures: click hereYou can see my building in the foreground, yellow brick double wide. My unit is in the bottom right corner.
Subscribe to:
Posts (Atom)

