Internal API for LO supported formats

SOS sos at pmg.be
Wed Sep 16 08:50:29 PDT 2015


found in the API samples from OO
hope it helps
greetz

Fernand

REM   *****  BASIC  *****
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


On 16/09/2015 17:45, Pranav Kant wrote:
> Hi,
>
> Just wondering what is the internal API to query LO to fetch supported 
> document formats.
>
> Would be great to have that exposed via LOK too.
>
> -- 
> Regards,
> Pranav Kant
> http://pranavk.me <http://pricked.in/>
>
>
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150916/79bd03c3/attachment.html>


More information about the LibreOffice mailing list