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

Here is complete list of Filter names in OOo 1.1rc1

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
DannyB
Moderator
Moderator


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

PostPosted: Tue Oct 28, 2003 9:49 am    Post subject: Here is complete list of Filter names in OOo 1.1rc1 Reply with quote

I've posted this information twice in the past...

http://www.oooforum.org/forum/viewtopic.php?p=11744#11744

http://www.oooforum.org/forum/viewtopic.php?p=10311#10311

but nobody knows about it because you would not guess that you would find such information within these two particular threads.

I've just given the same information twice this morning.

So, for the benefit of all, I'm posting the complete filter list in OOo 1.1RC1 as a top level thread with a descriptive subject.

List of filter names in OOo 1.1rc1.

'AportisDoc Palm DB',
'BMP - MS Windows',
'CGM - Computer Graphics Metafile',
'DIF',
'DXF - AutoCAD Interchange',
'DocBook File',
'EMF - MS Windows Metafile',
'EPS - Encapsulated PostScript',
'Flat XML File',
'GIF - Graphics Interchange',
'HTML',
'HTML (StarCalc)',
'HTML (StarWriter)',
'JPG - JPEG',
'Lotus',
'MET - OS/2 Metafile',
'MS Excel 4.0',
'MS Excel 4.0 Vorlage/Template',
'MS Excel 5.0/95',
'MS Excel 5.0/95 Vorlage/Template',
'MS Excel 95',
'MS Excel 95 Vorlage/Template',
'MS Excel 97',
'MS Excel 97 Vorlage/Template',
'MS PowerPoint 97',
'MS PowerPoint 97 Vorlage',
'MS WinWord 6.0',
'MS Word 95',
'MS Word 95 Vorlage',
'MS Word 97',
'MS Word 97 Vorlage',
'MathML XML (Math)',
'MathType 3.x',
'Microsoft Word 2003 XML',
'PBM - Portable Bitmap',
'PCT - Mac Pict',
'PCX - Zsoft Paintbrush',
'PGM - Portable Graymap',
'PNG - Portable Network Graphic',
'PPM - Portable Pixelmap',
'PSD - Adobe Photoshop',
'RAS - Sun Rasterfile',
'Rich Text Format',
'Rich Text Format (StarCalc)',
'SGF - StarOffice Writer SGF',
'SGV - StarDraw 2.0',
'SVM - StarView Metafile',
'SYLK',
'StarCalc 1.0',
'StarCalc 3.0',
'StarCalc 3.0 Vorlage/Template',
'StarCalc 4.0',
'StarCalc 4.0 Vorlage/Template',
'StarCalc 5.0',
'StarCalc 5.0 Vorlage/Template',
'StarChart 3.0',
'StarChart 4.0',
'StarChart 5.0',
'StarDraw 3.0',
'StarDraw 3.0 (StarImpress)',
'StarDraw 3.0 Vorlage',
'StarDraw 3.0 Vorlage (StarImpress)',
'StarDraw 5.0',
'StarDraw 5.0 (StarImpress)',
'StarDraw 5.0 Vorlage',
'StarDraw 5.0 Vorlage (StarImpress)',
'StarImpress 4.0',
'StarImpress 4.0 Vorlage',
'StarImpress 5.0',
'StarImpress 5.0 (packed)',
'StarImpress 5.0 Vorlage',
'StarMath 2.0',
'StarMath 3.0',
'StarMath 4.0',
'StarMath 5.0',
'StarOffice XML (Calc)',
'StarOffice XML (Chart)',
'StarOffice XML (Draw)',
'StarOffice XML (Impress)',
'StarOffice XML (Math)',
'StarOffice XML (Writer)',
'StarWriter 1.0',
'StarWriter 2.0',
'StarWriter 3.0',
'StarWriter 3.0 (StarWriter/GlobalDocument)',
'StarWriter 3.0 (StarWriter/Web)',
'StarWriter 3.0 Vorlage/Template',
'StarWriter 4.0',
'StarWriter 4.0 (StarWriter/GlobalDocument)',
'StarWriter 4.0 (StarWriter/Web)',
'StarWriter 4.0 Vorlage/Template',
'StarWriter 4.0/GlobalDocument',
'StarWriter 5.0',
'StarWriter 5.0 (StarWriter/GlobalDocument)',
'StarWriter 5.0 (StarWriter/Web)',
'StarWriter 5.0 Vorlage/Template',
'StarWriter 5.0/GlobalDocument',
'StarWriter DOS',
'StarWriter/Web 4.0 Vorlage/Template',
'StarWriter/Web 5.0 Vorlage/Template',
'TGA - Truevision TARGA',
'TIF - Tag Image File',
'Text',
'Text (StarWriter/Web)',
'Text (encoded)',
'Text (encoded) (StarWriter/GlobalDocument)',
'Text (encoded) (StarWriter/Web)',
'Text - txt - csv (StarCalc)',
'WMF - MS Windows Metafile',
'XBM - X-Consortium',
'XHTML File',
'XPM',
'bmp_Export',
'bmp_Import',
'calc_HTML_WebQuery',
'calc_StarOffice_XML_Calc_Template',
'calc_pdf_Export',
'dBase',
'draw_PCD_Photo_CD_Base',
'draw_PCD_Photo_CD_Base16',
'draw_PCD_Photo_CD_Base4',
'draw_StarOffice_XML_Draw_Template',
'draw_bmp_Export',
'draw_emf_Export',
'draw_eps_Export',
'draw_flash_Export',
'draw_gif_Export',
'draw_html_Export',
'draw_jpg_Export',
'draw_met_Export',
'draw_pbm_Export',
'draw_pct_Export',
'draw_pdf_Export',
'draw_pgm_Export',
'draw_png_Export',
'draw_ppm_Export',
'draw_ras_Export',
'draw_svg_Export',
'draw_svm_Export',
'draw_tif_Export',
'draw_wmf_Export',
'draw_xpm_Export',
'dxf_Import',
'emf_Export',
'emf_Import',
'eps_Export',
'eps_Import',
'gif_Export',
'gif_Import',
'impress_StarOffice_XML_Draw',
'impress_StarOffice_XML_Impress_Template',
'impress_bmp_Export',
'impress_emf_Export',
'impress_eps_Export',
'impress_flash_Export',
'impress_gif_Export',
'impress_html_Export',
'impress_jpg_Export',
'impress_met_Export',
'impress_pbm_Export',
'impress_pct_Export',
'impress_pdf_Export',
'impress_pgm_Export',
'impress_png_Export',
'impress_ppm_Export',
'impress_ras_Export',
'impress_svg_Export',
'impress_svm_Export',
'impress_tif_Export',
'impress_wmf_Export',
'impress_xpm_Export',
'jpg_Export',
'jpg_Import',
'math_pdf_Export',
'met_Export',
'met_Import',
'pbm_Export',
'pbm_Import',
'pcd_Import_Base',
'pcd_Import_Base16',
'pcd_Import_Base4',
'pct_Export',
'pct_Import',
'pcx_Import',
'pgm_Export',
'pgm_Import',
'placeware_Export',
'png_Export',
'png_Import',
'ppm_Export',
'ppm_Import',
'psd_Import',
'ras_Export',
'ras_Import',
'sgf_Import',
'sgv_Import',
'svg_Export',
'svm_Export',
'svm_Import',
'tga_Import',
'tif_Export',
'tif_Import',
'wmf_Export',
'wmf_Import',
'writer_StarOffice_XML_Writer_Template',
'writer_globaldocument_StarOffice_XML_Writer',
'writer_globaldocument_StarOffice_XML_Writer_GlobalDocument',
'writer_globaldocument_pdf_Export',
'writer_pdf_Export',
'writer_web_HTML_help',
'writer_web_StarOffice_XML_Writer',
'writer_web_StarOffice_XML_Writer_Web_Template',
'writer_web_pdf_Export',
'xbm_Import',
'xpm_Export',
'xpm_Import'


How do you come by such a list?

Code:
Sub Main
   oFF = createUnoService( "com.sun.star.document.FilterFactory" )
   oFilterNames = oFF.getElementNames()
   
   ' Now print the filter names.
'   For i = LBound( oFilterNames ) To UBound( oFilterNames )
'      Print oFilterNames(i)
'   Next
   
   ' Create a Writer doc and save the filter names to it.
   oDoc = StarDesktop.loadComponentFromURL( "private:factory/swriter", "_blank", 0, Array() )
   oText = oDoc.getText()
   oCursor = oText.createTextCursor()
   oCursor.gotoEnd( False )
   
   ' Print the filter names into a Writer document.
   For i = LBound( oFilterNames ) To UBound( oFilterNames )
      oText.insertString( oCursor, oFilterNames(i), False )
      oText.insertControlCharacter( oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False )
   Next
End Sub


In my opinion, this list is truly impressive. An amazing amount of work is represented by this list, and in some cases, reverse engineering.

I hope this information is useful to someone.
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
marc_o
General User
General User


Joined: 12 Sep 2003
Posts: 6

PostPosted: Fri Oct 31, 2003 5:37 am    Post subject: Re: Here is complete list of Filter names in OOo 1.1rc1 Reply with quote

DannyB wrote:


How do you come by such a list?

Code:
Sub Main
   oFF = createUnoService( "com.sun.star.document.FilterFactory" )
   oFilterNames = oFF.getElementNames()

   ...



How have you found about the getElementNames()-object? according to the IDL/API i can only find those X-interfaces... but no objects?

...marc olejak...
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


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

PostPosted: Fri Oct 31, 2003 7:10 am    Post subject: Reply with quote

marc_o wrote:
How have you found about the getElementNames()-object? according to the IDL/API i can only find those X-interfaces... but no objects?


I hope I understand your question correctly. I think you are wanting to know how I could know that the getElementNames() method was available on the com.sun.star.document.FilterFactory service?

It's all in the IDL API documentation.

Let's start with the service com.sun.star.document.FilterFactory here.

http://api.openoffice.org/docs/common/ref/com/sun/star/document/FilterFactory.html

As you can see....
1. a Service can have Interfaces.
2. Interface names always begin with an X.

Let me state some additional facts...
3. Methods are always and only found in Interfaces.
4. Properties are always and only found in Services.
5. The objects you get hold of are always Services never Interfaces. Some method call may return an interface, but there is some concrete service that implements the interface.
6. A Service can inherit from zero or one Service.
7. A Service can include zero or more Services.
8. A Service can include zero or more Interfaces.
9. A Service can have Properties but never Methods (i.e. Functions).
10. An Interface can inherit from zero or one Interface.
11. An Interface can include zero or more Interfaces.
12. An Interface can have Methods but never Properties.

Now looking more closely at the FilterFactory interface, you can see that it includes several interfaces. (Fact 8 and fact 1.) One of those interfaces is com.sun.star.container.XNameContainer. Follow the link to the description of that interface which is here...

http://api.openoffice.org/docs/common/ref/com/sun/star/container/XNameContainer.html

XNameContainer has several methods (an interface can have methods, fact 12).

Code:
void insertByName( string aName, any aElement )
void removeByName( string Name )


But also notice that XNameContainer inherits from several other interfaces. (Fact 10) XNameContainer directly inherits from XNameReplace, which inherits from XNameAccess, which inherits from XElementAccess. So in fact, XNameContainer has all of the methods it inherits from its ancestor interfaces. Therefore XNameContainer has these methods....

From XNameContainer: insertByName(), removeByName()
Inherited from XNameReplace: replaceByName()
Inherited from XNameAccess: getByName(), getElementNames(), hasByName()
Inherited from XElementAccess: getElementType(), hasElements()
Inherited from XInterface: (other methods we won't discuss here)

As you can see in the list above, the getElementNames() was available from the XNameContainer interface (by inheritance). Since FilterFactory implements the XNameContainer interface, all of the methods in the above list are therefore available in any FilterFactory service as well. Plus whatever other methods are accessible via. other interfaces provided by FilterFactory [fact 8].

This brief explanation of how to navigate through the API docs is brought to you by the number 2856.
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Oct 31, 2003 7:32 am    Post subject: Reply with quote

DannyB wrote:
I hope I understand your question correctly. I think you are wanting to know how I could know that the getElementNames() method was available on the com.sun.star.document.FilterFactory service?


uh. sorry for my bad english. especially the case trying to explain the difference between objects and methods... it has been a long time since turbo pascal and OOP... you correctly understood my problem.

DannyB wrote:
It's all in the IDL API documentation.


i did know that, but flipping through the API since 2 days - i did not get the concept of following deeper X-interfaces - but your step-by-step-example does it.

(being a double-newbie[python, OOo]) - THX!

...marc olejak...
Back to top
marc_o
General User
General User


Joined: 12 Sep 2003
Posts: 6

PostPosted: Fri Oct 31, 2003 7:35 am    Post subject: ot Reply with quote

...damn cookies...

thx, dannyb

...marc olejak...
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


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

PostPosted: Sat Nov 22, 2003 11:15 am    Post subject: Reply with quote

I have expanded the program I gave above so that it generates a Writer document with two sections.
1. All filter names.
2. Filter names and their properties.

See this message where I posted the source code...
http://www.oooforum.org/forum/viewtopic.php?p=15416#15416

Or, you can download this code, ready to run, from here...
http://kosh.datateamsys.com/~danny/OOo/Examples/System/
download the document named FilterNamesListing.

Open the document, and click the button. You'll have a listing of all of the filters, and their properties.
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
Venom
Guest





PostPosted: Wed Jun 02, 2004 6:01 am    Post subject: Export Filters Reply with quote

First of all, it's just a mind bug not having some offline documentation in Ctrl+Space format in the Basic editor or some manual. Take a hint from the php's CHM manual!

All I want is to write a macro which prompts the user for an excel file, load it, switch the sheet and save it as a tab-separated file with a different encoding.

After some 5 hours of searching through the help and openoffice.org I figured out almost everything (filepicker with the right filter to open, document loading, saving with the correct filter again) except for how to specify the Character Set (windows baltic), Field Delimiter ({tab}) and Text Delimiter ("")?
Is there any way to set these properties?
Back to top
DannyB
Moderator
Moderator


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

PostPosted: Wed Jun 02, 2004 8:39 am    Post subject: Re: Export Filters Reply with quote

Venom wrote:
how to specify the Character Set (windows baltic), Field Delimiter ({tab}) and Text Delimiter ("")?
Is there any way to set these properties?


Here are some pointers on setting the FilterOptions for the CSV export filter. See the first one in particular.

Convert SXC to CSV from commandline
http://www.oooforum.org/forum/viewtopic.php?t=6987

Opening CSV file
http://www.oooforum.org/forum/viewtopic.php?t=4428
http://www.oooforum.org/forum/viewtopic.php?p=15403#15403
http://www.oooforum.org/forum/viewtopic.php?t=3810

Developer's guide about writing CSV filter options
http://api.openoffice.org/docs/DevelopersGuide/Spreadsheet/Spreadsheet.htm#1+2+2+3+Filter+Options

Function to get a Stock price
http://www.oooforum.org/forum/viewtopic.php?t=4103
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
Venom
Guest





PostPosted: Mon Jun 07, 2004 3:33 am    Post subject: Reply with quote

The samples were useful, this is what I figured out:

sub Main
' create open file dialog
oFileDialog = CreateUnoService( "com.sun.star.ui.dialogs.FilePicker" )
oFileDialog.setTitle("Open DATA file")
oFileDialog.appendFilter( "Reports of data for iLink (*.xls)", "*.xls;" )
oFileDialog.execute()
oFilesList = oFileDialog().getFiles()
'j.i.c. (just in case)
if oFilesList(0)="" or IsMissing(oFilesList) then
exit Sub
end if
' load the file
oDoc=StarDesktop.LoadComponentFromURL(oFilesList(0), "_blank", 0, Array() )
' free dialog
oFileDialog.Dispose()
' run the save as dialog
oFileDialog = CreateUnoService( "com.sun.star.ui.dialogs.FilePicker" )
oFileDialog.setTitle("Save tab separated export")
oFileDialog.Initialize ( Array(com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION )
oFileDialog.appendFilter( "Tab-separated data for iLink import (*.csv)", "*.csv;" )
oFileDialog.execute()
oFilesList=oFileDialog().getFiles()
if oFilesList(0)="" or IsMissing(oFilesList) then
exit Sub
end if
cDestName=oFilesList(0)
' free dialog instance
oFileDialog.Dispose()
if Right(oFilesList(0),4)<>".csv" then
cDestName = cDestName + ".csv"
endif
'activate sheet to save
oDoc.getSheets().getByName( "Saraksts" )
' prepare arguments for export automation
dim expArg(2) as new com.sun.star.beans.PropertyValue
expArg(0).Name = "URL"
expArg(0).Value = cDestName
expArg(1).Name = "FilterName"
expArg(1).Value = "Text - txt - csv (StarCalc)"
expArg(2).Name = "FilterOptions"
'tab separated,not enclosed,baltic win encoded text
expArg(2).Value = "9,,MS_1257,0,2/2/2/2/2/2/2/2/2/2/2/2/2/2/2/2"
'save to dest. file
oDoc.StoreToURL(cDestName,expArg())
'close without prompt of 'only selected sheet was saved' etc
oDoc.Close(True)
End Sub

But still, the file doesn't get win-1257 encoded, like it is used to when everything is done manually. The thing that I have one column win-dos encoded (actually it comes from a Fox dbf, where there is no way to enter win-1257) and the other 5 text columns in win-1257. I want to import the file to MySQL through csv where the "dos" column is being corrected with only some queries (UPDATE table SET field='correct_string' WHERE field LIKE 'startwith%'). I also tried changing all the options where I could to baltic and according fonts, still. But I have a feeling that somewhere between the different code versions I could get the encodings as I wanted. It ticks to me that back then I just loaded the file into the existing document (but not created a new component, as it's done now) - could this be correct? Trying to reverse the code while waiting for a reply Wink
Back to top
amitjind
Newbie
Newbie


Joined: 21 Jun 2004
Posts: 3

PostPosted: Fri Apr 08, 2005 1:27 pm    Post subject: description about the filters Reply with quote

Hi,

Iis there a detailed description of each fitler, as it hard to understand the functionality of each filter by just looking at the name?

many regards,
amit
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


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

PostPosted: Sat Apr 09, 2005 8:03 am    Post subject: Re: description about the filters Reply with quote

amitjind wrote:
Iis there a detailed description of each fitler, as it hard to understand the functionality of each filter by just looking at the name?

I answered your duplicate question over here.
http://www.oooforum.org/forum/viewtopic.phtml?p=73714#73714
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


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

PostPosted: Sat Jun 25, 2005 10:27 am    Post subject: Reply with quote

Cross Reference.....
http://www.oooforum.org/forum/viewtopic.phtml?p=83175#83175
http://www.oooforum.org/forum/viewtopic.phtml?p=15416#15416
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
johnson33445
Newbie
Newbie


Joined: 17 May 2013
Posts: 4
Location: Pakistan

PostPosted: Fri May 17, 2013 7:46 pm    Post subject: Reply with quote

lot of many links at your thread i can't understand your code word writing
_________________
Allen123
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API 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