Hi,
I recently asked a question and got no answer. The following answer
would have been useful:
> ...
>
> What does not work is the corresponding media detect service. After
> adding my package to the package manager, OO requests the factories
> for both services (filter and media detect):
>
> ...
>
> Unfortunately, when I try to open a SVG document, the detect service
> is neither instantiated nor called. The result is that I alway get a
> lengthy (... not alphabetically sorted...) filter list. I feel that
> I've tried each combination of parameter names and values in the
> filter and type descriptors. ...
The SVG type is pre-installed in OO. Its "correct" type name is
"svg_Scalable_Vector_Graphics". Do not declare your own type, but
refere to the existing one with
<prop oor:name="Type">
<value>svg_Scalable_Vector_Graphics</value></prop>
Best regards, Bernhard.
>
> --- my service and implementation names ---
>
> SVG import filter:
>
> service: haui.office.uno.filter.svgimport
> implementation: haui.office.uno.filter.svgimport.SVGImportService
>
> SVG media detect:
>
> service: haui.office.uno.mediadetect
> implementation: haui.office.uno.mediadetect.svg.DetectService
>
>
> ---- the SVG type descriptor ----
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <oor:component-data
> xmlns:oor="http://openoffice.org/2001/registry"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> oor:package="org.openoffice.TypeDetection"
> oor:name="Filter"
>
> <node oor:name="Types">
> <node oor:name="svg" oor:op="replace">
> <prop oor:name="UIName">
> <value xml:lang="en-US">Scalable Vector Graphics</value></prop>
> <prop oor:name="UIOrder">
> <value>0</value></prop>
> <prop oor:name="URLPattern"/>
> <prop oor:name="Extensions">
> <value>svg</value></prop>
> <prop oor:name="MediaType">
> <value>image/svg</value></prop>
> <prop oor:name="Preferred">
> <value>true</value></prop>
> <prop oor:name="DetectService">
> <value>haui.office.uno.mediadetect</value></prop>
> </node>
> </node>
>
> </oor:component-data>
>
> --- the SVG import filter descriptor ---
>
> <?xml version="1.0" encoding="UTF-8"?>
> <oor:component-data
> xmlns:oor="http://openoffice.org/2001/registry"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> oor:package="org.openoffice.TypeDetection"
> oor:name="Filter"
>
> <node oor:name="Filters">
> <node oor:name="svg-import" oor:op="replace">
> <prop oor:name="RealFilterName">
> <value>svg-import</value></prop>
> <prop oor:name="FormatName">
> <value>svg</value></prop>
> <prop oor:name="UIName">
> <value xml:lang="en-US">Scalable Vector Graphics Import</value>
> </prop>
> <prop oor:name="UIComponent"/>
> <prop oor:name="Type">
> <value>svg</value></prop>
> <prop oor:name="FileFormatVersion">
> <value>0</value></prop>
> <prop oor:name="DocumentService">
> <value>com.sun.star.drawing.DrawingDocument</value></prop>
> <prop oor:name="FilterService">
> <value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
> <prop oor:name="UserData">
> <value
> oor:separator=",">haui.office.uno.filter.svgimport,,com.sun.star.comp.Draw.XMLOasisImporter,com.sun.star.comp.Draw.XMLOasisExporter,,</value></prop>
> <prop oor:name="TemplateName"/>
> <prop oor:name="Flags">
> <value>IMPORT 3RDPARTYFILTER</value></prop>
> </node>
> </node>
> </oor:component-data>
>
> ---
>
>
> Looking forward to your response
>
> Bernhard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]