OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Filter list at runtime

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
maurix
General User
General User


Joined: 20 Oct 2004
Posts: 5

PostPosted: Wed Oct 20, 2004 7:52 am    Post subject: Filter list at runtime Reply with quote

Hi all,
is possible with java api to get at runtime list of import and export filter for document in open office?

maurix
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Wed Oct 20, 2004 8:10 am    Post subject: Reply with quote

I believe that the answer is: Yes, it is possible.

I have written code in Basic before to get a list of filters at runtime, but not filters specific to a particular document type. See this....
http://www.oooforum.org/forum/viewtopic.php?p=15416#15416

A more primitive version of the program is here....
http://www.oooforum.org/forum/viewtopic.php?t=3549


Let's focus on the first Basic program I linked above.

Copy and paste the Basic code from the above, into your Basic IDE and click Run. Look at the Writer document it produces. On my system, the Writer document is about 82 pages long. Here is an excerpt....

Danny's Basic program wrote:
DIF
Name DIF
Type calc_DIF
UIName Data Interchange Format
UINames
en-US Data Interchange Format
DocumentService com.sun.star.sheet.SpreadsheetDocument
FilterService
Flags 195
UserData

FileFormatVersion 0
TemplateName
Order 3
UIComponent com.sun.star.comp.Calc.FilterOptionsDialog

DXF - AutoCAD Interchange
Name DXF - AutoCAD Interchange
Type dxf_AutoCAD_Interchange
UIName DXF - AutoCAD Interchange Format
UINames
en-US DXF - AutoCAD Interchange Format
DocumentService com.sun.star.drawing.DrawingDocument
FilterService
Flags 65
UserData

FileFormatVersion 0
TemplateName
Order 3
UIComponent

DocBook File
Name DocBook File
Type writer_DocBook_File
UIName DocBook (simplified)
UINames
en-US DocBook (simplified)
DocumentService com.sun.star.text.TextDocument
FilterService com.sun.star.comp.Writer.XmlFilterAdaptor
Flags 524355
UserData
com.sun.star.documentconversion.XSLTFilter

com.sun.star.comp.Writer.XMLImporter
com.sun.star.comp.Writer.XMLExporter
../share/xslt/docbook/docbooktosoffheadings.xsl
../share/xslt/docbook/sofftodocbookheadings.xsl
FileFormatVersion 0
TemplateName ../share/xslt/docbook/DocBookTemplate.stw
Order 0
UIComponent

EMF - MS Windows Metafile
Name EMF - MS Windows Metafile
Type emf_MS_Windows_Metafile
UIName EMF - Enhanced Metafile
UINames
en-US EMF - Enhanced Metafile
DocumentService com.sun.star.drawing.DrawingDocument
FilterService
Flags 65
UserData

FileFormatVersion 0
TemplateName
Order 4
UIComponent


See how each filter's DocumentService property identifies a particular document type?

If you go to the first link I provided (above) and then scroll UP, I think you'll find some interesting Java code.
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
maurix
General User
General User


Joined: 20 Oct 2004
Posts: 5

PostPosted: Wed Oct 20, 2004 8:26 am    Post subject: Reply with quote

Ok!! thanks a lot for your tips!! I'm new to openoffice sdk e i have some problem with poor
java documentation api,
maurix
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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