| View previous topic :: View next topic |
| Author |
Message |
jaybee Newbie

Joined: 07 Oct 2011 Posts: 3
|
Posted: Fri Oct 07, 2011 10:51 am Post subject: WordPerfect filter name |
|
|
Hi,
I'm new to the forum.
I am using the technique described here:
http://user.services.openoffice.org/en/forum/viewtopic.php?t=3801
to load documents from streams, using the ''private:stream' protocol. I'm having a little trouble with the filter names...
I need to load documents of various types using streams. However, I've noticed that for some document types, there is a huge difference in speed between using a 'file:///' URL and the stream approach. For.odt and .doc types, it didn't seem to make any discernible difference, but for WordPerfect and HTML, the difference big - they were much slower when using streams.
Guessing that this is due to Open Office being forced to figure out the required filter based on the data in the stream, I have tried specifying the filter to use via the load properties. For HTML, it worked perfectly - I can now get HTML to load from a stream just as quickly as from a 'file:' URL, as long as I specify the FilterName of 'HTML'. If I take this property out, it goes back to super-slow mode again.
This seems to confirm my guess about the nature of the slowness - however, I can't get this optimization to work for WordPerfect (.wpd) files. I have used the filter name "WordPerfect", which is shown here:
http://wiki.services.openoffice.org/wiki/Framework/Article/Filter/FilterList_OOo_3_0
(I am using OO 3.1, but haven't been able to find a more up to date list. )
I know that OO can open the .wpd files extremely fast, as it does this when I use a 'file:' URL.
Can anyone shed any light on this? It seems as if the filter name "WordPerfect" is incorrect, but I don't know what it should be, if not that. Thanks! |
|
| Back to top |
|
 |
jaybee Newbie

Joined: 07 Oct 2011 Posts: 3
|
Posted: Fri Oct 07, 2011 12:41 pm Post subject: |
|
|
OK, I believe I have confirmed that 'WordPerfect' is not a recognized filter name for use with XComponentLoader.loadFromURL.
I read in the documentation somewhere (can't find the link now) that unrecognized filter names are ignored when using XComponentLoader.loadFromURL. I confirmed this anyway by using a bogus filter name, and sure enough my document still loads.
Now, if you use an valid filter name, but for the wrong document type, then the document doesn't load.
Since my document always loads when I use "WordPerfect" as a filter name - even a .odt or .html file will open when I specify that - I conclude that "WordPerfect" is not recognized as an existing filter. If it was, it then other non WordPerfect documents would fail to load when specify "WordPerfect" as the filter name.
So, anyone know the correct name of the WordPerfect filter? I know it's in there! |
|
| Back to top |
|
 |
jaybee Newbie

Joined: 07 Oct 2011 Posts: 3
|
Posted: Tue Oct 11, 2011 5:41 am Post subject: |
|
|
| Giving up. I just can't figure it out. Somehow, the loadComponentFromURL function does something that makes WordPerfect files load much more quickly, but what? It's a mystery. Thanks to all who read my question anyway! |
|
| Back to top |
|
 |
|
|
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
|