Names of output filters? Name of HTML output filter?

Running soffice --convert-to allows me to specify a custom output filter
name. Where can I full list of output filter names? In particular I am
looking for the name of the HTML output filter used for the HTML export
used through the UI. This filter is different from the one used when
running with --convert-to html soley.

-aj

Hi :slight_smile:

All i could find was this wiki-page
http://help.libreoffice.org/Common/About_Import_and_Export_Filters
last updated in May so i think things are likely to have moved on quite a
lot! Also i suspect there are add-ons/extensions that can add to the list.

I tried looking up release notes
http://www.libreoffice.org/download/release-notes/
http://wiki.documentfoundation.org/ReleaseNotes/3.5
which led me to
http://wiki.documentfoundation.org/Releases/3.4.4_info_about_fixes
but there is not much detail listed in there. mostly it seems
broad-brushstrokes rather than fine-grained detail .

Apols and regards from
Tom :slight_smile:

Sorry but all wiki pages don't list anything about output filter names.

-aj

Tom,
With the API and some Basic code from the good old Danny B. can do the job
gives us a 65 pages writer Doc.
Hope its helps

Greetz

Ferand

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 )

     oText.insertString( oCursor, "Filter Names", False )
     oCursor.ParaStyleName = "Heading 1"
     InsertParaBreak( oText, oCursor )
     oCursor.ParaStyleName = "Default"
     InsertParaBreak( oText, oCursor )

     ' Print the filter names into a Writer document.
     For i = LBound( oFilterNames ) To UBound( oFilterNames )
         oText.insertString( oCursor, oFilterNames(i), False )
         InsertLineBreak( oText, oCursor )
     Next
     InsertParaBreak( oText, oCursor )

     InsertParaBreak( oText, oCursor )
     oText.insertString( oCursor, "Filter Names and their Properties", False )
     oCursor.ParaStyleName = "Heading 1"
     InsertParaBreak( oText, oCursor )
     oCursor.ParaStyleName = "Default"

     ' Tab stops at:
     ' 0.25 inch (2.54 cm x 0.25)
     ' 0.50 inch (2.54 cm x 0.50)
     ' 2.00 inch (2.54 cm x 2.00)
     oCursor.ParaTabStops = Array(_
         MakeTabStop( 2540 * 0.25 ),_
         MakeTabStop( 2540 * 0.50 ),_
         MakeTabStop( 2540 * 2.00 ) )

     ' Print the filter names and their parameters.
     For i = LBound( oFilterNames ) To UBound( oFilterNames )
         InsertParaBreak( oText, oCursor )

         cFilterName = oFilterNames(i)
         aFilterProps = oFF.getByName( cFilterName )

         oText.insertString( oCursor, cFilterName, False )

         For j = LBound( aFilterProps ) To UBound( aFilterProps )
             oFilterProp = aFilterProps(j)

             InsertLineBreak( oText, oCursor )
             oText.insertString( oCursor, CHR(9)+oFilterProp.Name, False )

             nFilterPropValueVarType = VarType( oFilterProp.Value )
             If nFilterPropValueVarType = 8201 Then
                 ' VarType 8201 means a sequence of PropertyValue's.
                 oFilterPropNames = oFilterProp.Value
                 For k = LBound( oFilterPropNames ) To UBound( oFilterPropNames )
                     InsertLineBreak( oText, oCursor )
                     oText.insertString( oCursor, CHR(9)+CHR(9)+oFilterPropNames(k).Name+CHR(9)+CSTR(oFilterPropNames(k).Value), False )
                 Next k
             ElseIf nFilterPropValueVarType = 8200 Then
                 ' VarType 8200 means a sequence of Strings.
                 oFilterPropNames = oFilterProp.Value
                 For k = LBound( oFilterPropNames ) To UBound( oFilterPropNames )
                     InsertLineBreak( oText, oCursor )
                     oText.insertString( oCursor, CHR(9)+CHR(9)+oFilterPropNames(k), False )
                 Next k
             ElseIf nFilterPropValueVarType > 1 And nFilterPropValueVarType <= 12 Then
                 oText.insertString( oCursor, CHR(9)+CSTR(oFilterProp.Value), False )
             Else
                 oText.insertString( oCursor, CHR(9)+"?? unknown type ?? - "+CSTR(nFilterPropValueVarType), False )
             EndIf
         Next j

         InsertParaBreak( oText, oCursor )
     Next i

     InsertParaBreak( oText, oCursor )
End Sub

Sub InsertLineBreak( oText, oCursor )
     oText.insertControlCharacter( oCursor, com.sun.star.text.ControlCharacter.LINE_BREAK, False )
End Sub

Sub InsertParaBreak( oText, oCursor )
     oText.insertControlCharacter( oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False )
End Sub

' Create and return a tab stop.
' An array of what this function returns, is used
' to set the tab stops of a paragraph.
'
' Parameters....
' nPosition - position in tab stop, in 1000'th of cm.
' nAlign - optional, if specified, must be one of...
' com.sun.star.style.TabAlign.LEFT = 0
' com.sun.star.style.TabAlign.CENTER = 1
' com.sun.star.style.TabAlign.RIGHT = 2
' com.sun.star.style.TabAlign.DECIMAL = 3
' com.sun.star.style.TabAlign.DEFAULT = 4
' cDecimalChar - optional, if specified, only applies to a DECIMAL tab stop,
' and specified the character which is recognized as
' the decimal point separator.
' cFillChar - optional, if specified, specifies the char that fills the space
' between tab stops.
Function MakeTabStop( ByVal nPosition As Long,_
                         Optional nAlign,_
                         Optional cDecimalChar,_
                         Optional cFillChar _
                     ) As com.sun.star.style.TabStop
     If IsMissing( nAlign ) Then
         nAlign = com.sun.star.style.TabAlign.LEFT
     EndIf

     oTabStop = createUnoStruct( "com.sun.star.style.TabStop" )

     oTabStop.Position = nPosition
     oTabStop.Alignment = nAlign

     If Not IsMissing( cDecimalChar ) Then
         oTabStop.DecimalChar = cDecimalChar
     EndIf
     If Not IsMissing( cFillChar ) Then
         oTabStop.FillChar = cFillChar
     EndIf

     MakeTabStop() = oTabStop
End Function

How is this related to my question?

-aj

Hi :slight_smile:
I thought the original was asking for a list of all the filters available?

I think Fernand's coding gives a list of the filters in whichever version of libreOffice you happen to be running.  As each new release comes out extra filters may have been added and apparently it is difficult to find documentation about which version has which filters.  Sadly i have no idea how to run the coding even with the helpful comments!  Hopefully you understand this better than me.

Regards from
Tom :slight_smile:

aj,

Sorry i was thinking you where trie to find a list of all filternames :slight_smile:

Greetz

Fernand

Tom ,

Copy the code in a Basic module and run !

Greetz

Fernand

I just need the name of the mentioned filter. I am not an OO hacker.
I just the the *one* name :slight_smile:

-aj

aj,

sorry but tour original question:

Running soffice --convert-to allows me to specify a custom output filter
name.*Where can I full list* of output filter names? In particular I am
looking for the name of the HTML output filter used for the HTML export
used through the UI. This filter is different from the one used when
running with --convert-to html soley.

but after running the Basic code i found this list in LO 3.4

org.openoffice.da.writer2xhtml.epub
org.openoffice.da.calc2xhtml11
Text - txt - csv (StarCalc)
impress_svg_Export
math8
EPS - Encapsulated PostScript
StarOffice XML (Base) Report Chart
org.openoffice.da.writer2xhtml.mathml.xsl
impress_svm_Export
MS Excel 95 (StarWriter)
impress_pdf_addstream_import
JPG - JPEG
placeware_Export
StarOffice XML (Math)
T602Document
impress_jpg_Export
writer_globaldocument_StarOffice_XML_Writer
draw_emf_Export
MS Word 2003 XML
WMF - MS Windows Metafile
GIF - Graphics Interchange
writer_pdf_import
calc8
writer_globaldocument_StarOffice_XML_Writer_GlobalDocument
MS Word 97 Vorlage
impress_tif_Export
draw_xpm_Export
Calc MS Excel 2007 XML
Text (encoded)
MathML XML (Math)
MET - OS/2 Metafile
MS PowerPoint 97 AutoPlay
impress8
StarOffice XML (Calc)
calc_HTML_WebQuery
RAS - Sun Rasterfile
MS Excel 5.0 (StarWriter)
impress_png_Export
DXF - AutoCAD Interchange
impress_pct_Export
impress_met_Export
SGF - StarOffice Writer SGF
draw_eps_Export
Calc MS Excel 2007 Binary
calc8_template
Calc MS Excel 2007 XML Template
impress_pbm_Export
draw_pdf_import
Calc Office Open XML
math_pdf_Export
Rich Text Format (StarCalc)
MS PowerPoint 97 Vorlage
StarOffice XML (Base)
DIF
Impress MS PowerPoint 2007 XML Template
MS Excel 2003 XML
impress_ras_Export
draw_PCD_Photo_CD_Base16
draw_bmp_Export
WordPerfect Graphics
StarOffice XML (Writer)
PGM - Portable Graymap
Office Open XML Text Template
MS Excel 5.0/95
draw_svg_Export
draw_PCD_Photo_CD_Base4
TGA - Truevision TARGA
Quattro Pro 6.0
writer_globaldocument_pdf_Export
calc_pdf_addstream_import
writerglobal8_HTML
draw_svm_Export
HTML
EMF - MS Windows Metafile
PPM - Portable Pixelmap
Lotus
impress_ppm_Export
draw_jpg_Export
Text
TIF - Tag Image File
Impress Office Open XML AutoPlay
StarOffice XML (Base) Report
PNG - Portable Network Graphic
draw8
Rich Text Format
writer_web_StarOffice_XML_Writer_Web_Template
org.openoffice.da.writer2xhtml
MS_Works
Office Open XML Text
SVG - Scalable Vector Graphics
org.openoffice.da.writer2xhtml11
draw_tif_Export
impress_gif_Export
StarOffice XML (Draw)
StarOffice XML (Impress)
Text (encoded) (StarWriter/Web)
writer_web_pdf_Export
MediaWiki_Web
impress_pdf_Export
draw_pdf_addstream_import
draw_png_Export
HTML (StarCalc)
HTML (StarWriter)
impress_StarOffice_XML_Impress_Template
draw_pct_Export
calc_StarOffice_XML_Calc_Template
MS Excel 95 Vorlage/Template
writerglobal8_writer
MS Excel 95
draw_met_Export
dBase
MS Excel 97
MS Excel 4.0
draw_pbm_Export
impress_StarOffice_XML_Draw
Impress Office Open XML
writerweb8_writer
chart8
MediaWiki
MS Excel 4.0 Vorlage/Template
impress_wmf_Export
draw_ras_Export
writer_StarOffice_XML_Writer_Template
BMP - MS Windows
impress8_template
LotusWordPro
impress_pgm_Export
SGV - StarDraw 2.0
draw_PCD_Photo_CD_Base
draw_html_Export
writer8_template
Calc Office Open XML Template
writerglobal8
draw_flash_Export
MS Word 2007 XML Template
impress8_draw
CGM - Computer Graphics Metafile
MS PowerPoint 97
WordPerfect
impress_emf_Export
writer_pdf_Export
PSD - Adobe Photoshop
PBM - Portable Bitmap
draw_ppm_Export
writer_pdf_addstream_import
PCX - Zsoft Paintbrush
writer_web_HTML_help
MS Excel 4.0 (StarWriter)
Impress Office Open XML Template
org.openoffice.da.writer2xhtml.mathml
MathType 3.x
impress_xpm_Export
writer_web_StarOffice_XML_Writer
writerweb8_writer_template
MS Word 95
impress_html_Export
MS Word 97
draw_gif_Export
writer8
MS Excel 5.0/95 Vorlage/Template
draw8_template
StarOffice XML (Chart)
XPM
draw_pdf_Export
calc_pdf_Export
impress_eps_Export
XBM - X-Consortium
Text (encoded) (StarWriter/GlobalDocument)
writer_MIZI_Hwp_97
MS WinWord 6.0
Lotus 1-2-3 1.0 (WIN) (StarWriter)
SYLK
MS Word 2007 XML
Text (StarWriter/Web)
impress_pdf_import
MS Excel 97 Vorlage/Template
Impress MS PowerPoint 2007 XML AutoPlay
Impress MS PowerPoint 2007 XML
draw_wmf_Export
Unifa Adressbuch
org.openoffice.da.calc2xhtml
impress_bmp_Export
Lotus 1-2-3 1.0 (DOS) (StarWriter)
MS Word 95 Vorlage
MS WinWord 5
PCT - Mac Pict
SVM - StarView Metafile
draw_StarOffice_XML_Draw_Template
impress_flash_Export
draw_pgm_Export

Hi :slight_smile:
Superb.  I feel it should be on a wiki-page or somewhere now that the list has been generated and the code available so that people can find their own list for their own version of LibreOffice.  I just don't know a good place to put it. 
Regards from
Tom :slight_smile:

Since 8 years it has been here:
http://www.oooforum.org/forum/viewtopic.phtml?t=3549 with documentation,
discussion links to related topics and everything.

The above code in this thread may not run when copied from browser or mail
client. It has too many syntax errors due to additional line breaks.

Hi :slight_smile:
Ahh excellent. So there is a call for it. A wiki-page could heave a less
obscure title such as
http://wiki.documentfoundation.org/FilterList
or perhaps something that office workers might understand. How about
http://wiki.documentfoundation.org/Formats
As for the quality of the code i was pretty impressed that it appeared so
quickly.
http://nabble.documentfoundation.org/file/n3648970/good_code.png
good_code.png
Fernand Vanrie wrote the code faster than anyone was able to point to the
old link. The old link's most recent list was for OOo version 1.1 rc1 which
is a little out-of-date now. Fernand's list was for .4.x which is a lot
more up-to-date.
Regards from
Tom :slight_smile:

Tom,

I do not wrote the code, i "found" the code years ago on the web, like is mentionend the author is Danny B. (the man who disapeared but produced ton's of useful code)

Greetz

Fernand
  Ahh excellent. So there is a call for it. A wiki-page could heave a less obscure title such as http://wiki.documentfoundation.org/FilterList or perhaps something that office workers might understand. How about http://wiki.documentfoundation.org/Formats As for the quality of the code i was pretty impressed that it appeared so quickly. http://nabble.documentfoundation.org/file/n3648970/good_code.png good_code.png Fernand Vanrie wrote the code faster than anyone was able to point to the old link. The old link's most recent list was for OOo version 1.1 rc1 which is a little out-of-date now. Fernand's list was for .4.x which is a lot more up-to-date. Regards from Tom :slight_smile: -- View this message in context: http://nabble.documentfoundation.org/Names-of-output-filters-Name-of-HTML-output-filter-tp3639830p3648970.html

I just need the name of the mentioned filter. I am not an OO hacker.
I just the the *one* name :slight_smile:

-aj