<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
found in the API samples from OO<br>
hope it helps<br>
greetz<br>
<br>
Fernand<br>
<br>
<pre class="de1" style="font-family: monospace, monospace; padding: 0px; border: 0px none white; color: rgb(0, 0, 0); line-height: 1.2em; overflow: auto; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 1em; margin: 0px; vertical-align: top; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background: none rgb(249, 249, 249);"><span class="kw1" style="color: rgb(177, 177, 0);">REM</span> ***** BASIC *****
<span class="kw1" style="color: rgb(177, 177, 0);">Sub</span> Main
oFF <span class="sy0" style="color: rgb(102, 204, 102);">=</span> <span class="kw1" style="color: rgb(177, 177, 0);">createUnoService</span><span class="br0" style="color: rgb(102, 204, 102);">(</span> <span class="st0" style="color: rgb(255, 0, 0);">"com.sun.star.document.FilterFactory"</span> <span class="br0" style="color: rgb(102, 204, 102);">)</span>
oFilterNames <span class="sy0" style="color: rgb(102, 204, 102);">=</span> oFF.<span class="me1" style="color: rgb(0, 102, 0);">getElementNames</span><span class="br0" style="color: rgb(102, 204, 102);">(</span><span class="br0" style="color: rgb(102, 204, 102);">)</span>
<span class="co1" style="color: rgb(128, 128, 128);">' Now print the filter names.</span>
<span class="co1" style="color: rgb(128, 128, 128);">' For i = LBound( oFilterNames ) To UBound( oFilterNames )</span>
<span class="co1" style="color: rgb(128, 128, 128);">' Print oFilterNames(i)</span>
<span class="co1" style="color: rgb(128, 128, 128);">' Next</span>
<span class="co1" style="color: rgb(128, 128, 128);">' Create a Writer doc and save the filter names to it.</span>
oDoc <span class="sy0" style="color: rgb(102, 204, 102);">=</span> StarDesktop.<span class="me1" style="color: rgb(0, 102, 0);">loadComponentFromURL</span><span class="br0" style="color: rgb(102, 204, 102);">(</span> <span class="st0" style="color: rgb(255, 0, 0);">"private:factory/swriter"</span>, <span class="st0" style="color: rgb(255, 0, 0);">"_blank"</span>, <span class="nu0" style="color: rgb(204, 102, 204);">0</span>, Array<span class="br0" style="color: rgb(102, 204, 102);">(</span><span class="br0" style="color: rgb(102, 204, 102);">)</span> <span class="br0" style="color: rgb(102, 204, 102);">)</span>
oText <span class="sy0" style="color: rgb(102, 204, 102);">=</span> oDoc.<span class="me1" style="color: rgb(0, 102, 0);">getText</span><span class="br0" style="color: rgb(102, 204, 102);">(</span><span class="br0" style="color: rgb(102, 204, 102);">)</span>
oCursor <span class="sy0" style="color: rgb(102, 204, 102);">=</span> oText.<span class="me1" style="color: rgb(0, 102, 0);">createTextCursor</span><span class="br0" style="color: rgb(102, 204, 102);">(</span><span class="br0" style="color: rgb(102, 204, 102);">)</span>
oCursor.<span class="me1" style="color: rgb(0, 102, 0);">gotoEnd</span><span class="br0" style="color: rgb(102, 204, 102);">(</span> <span class="kw1" style="color: rgb(177, 177, 0);">False</span> <span class="br0" style="color: rgb(102, 204, 102);">)</span>
<span class="co1" style="color: rgb(128, 128, 128);">' Print the filter names into a Writer document.</span>
<span class="kw1" style="color: rgb(177, 177, 0);">For</span> i <span class="sy0" style="color: rgb(102, 204, 102);">=</span> LBound<span class="br0" style="color: rgb(102, 204, 102);">(</span> oFilterNames <span class="br0" style="color: rgb(102, 204, 102);">)</span> <span class="kw1" style="color: rgb(177, 177, 0);">To</span> UBound<span class="br0" style="color: rgb(102, 204, 102);">(</span> oFilterNames <span class="br0" style="color: rgb(102, 204, 102);">)</span>
oText.<span class="me1" style="color: rgb(0, 102, 0);">insertString</span><span class="br0" style="color: rgb(102, 204, 102);">(</span> oCursor, oFilterNames<span class="br0" style="color: rgb(102, 204, 102);">(</span>i<span class="br0" style="color: rgb(102, 204, 102);">)</span>, <span class="kw1" style="color: rgb(177, 177, 0);">False</span> <span class="br0" style="color: rgb(102, 204, 102);">)</span>
oText.<span class="me1" style="color: rgb(0, 102, 0);">insertControlCharacter</span><span class="br0" style="color: rgb(102, 204, 102);">(</span> oCursor, com.<span class="me1" style="color: rgb(0, 102, 0);">sun</span>.<span class="me1" style="color: rgb(0, 102, 0);">star</span>.<span class="me1" style="color: rgb(0, 102, 0);">text</span>.<span class="me1" style="color: rgb(0, 102, 0);">ControlCharacter</span>.<span class="me1" style="color: rgb(0, 102, 0);">PARAGRAPH_BREAK</span>, <span class="kw1" style="color: rgb(177, 177, 0);">False</span> <span class="br0" style="color: rgb(102, 204, 102);">)</span>
<span class="kw1" style="color: rgb(177, 177, 0);">Next</span>
<span class="kw1" style="color: rgb(177, 177, 0);">End</span> <span class="kw1" style="color: rgb(177, 177, 0);">Sub</span></pre>
<br>
<div class="moz-cite-prefix">On 16/09/2015 17:45, Pranav Kant wrote:<br>
</div>
<blockquote
cite="mid:CAA9dPQLvNzNG7XEiDmYsR_WU239kTgZk6eNGfZXLXA2Nh8GbTQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>Just wondering what is the internal API to query LO to
fetch supported document formats.</div>
<div><br>
</div>
<div>Would be great to have that exposed via LOK too.</div>
<div>
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>Regards,<br>
Pranav Kant</div>
<div><a moz-do-not-send="true"
href="http://pricked.in/" target="_blank">http://pranavk.me</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LibreOffice mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/libreoffice">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a>
</pre>
</blockquote>
<br>
</body>
</html>