Am Donnerstag, den 06.12.2007, 10:28 -0300 schrieb Ariel
Constenla-Haile:
> Frank Schönheit - Sun Microsystems Germany escribió:
> > Hi Marc,
> > 
> >> Isn't css.ui.doalogs.FilterOptionsDialog the service to call in front of
> >> importing? (Frank?)
> > 
> > Uh, never heard of this one. (I really dislike the fact people do not
> > use [EMAIL PROTECTED] when they define new APIs. This limits others
> > to knowing-by-chance-only.)

Since 
        OpenOffice 1.1.2

> > Since the description is somewhat sparse, I am not completely sure,
> > might be it can in fact be used to open the character set selection
> > dialog for importing csv/dBase files.
> 
> Hi Frank, Marc
> 
> all I know is that this can be implemented by an export/import component:
> 
> "It should be possible to prompt the user for better values by 
> registering another component that implements the service 
> com.sun.star.ui.dialogs.FilterOptionsDialog. It is called UIComponent. 
> It enables a filter developer to query for user options before the 
> filter operation is performed. It does not show this dialog inside the 
> filter, because any UI can be suppressed, for example, an external 
> application uses the API of OpenOffice.org for scripting running in a 
> hidden mode."
> 
> http://api.openoffice.org/docs/DevelopersGuide/OfficeDev/OfficeDev.xhtml#1_2_4_2_4_Filter_Options
> 
> 
> I still didn't play with it ...

I did and things don't seem to be that simple:

That service looks like a placeholder, sort of an Interface or abstract
service that is used by each client service to tell the filter about
having to show (and name?) it's own implementation via the
mediadescriptor.

Using this test:

sub TestFilterOptionsUI
        dim args(0) as new com.sun.star.beans.PropertyValue
        args(0).Name = "FilterName"
        args(0).Value = "Text - txt - csv (StarOffice Calc)"
        dlg = CreateUNOService("com.sun.star.ui.dialogs.FilterOptionsDialog")
        dlg.setPropertyValues(args())
        dlg.execute()
end sub

only the enconding questioning dialog is shown, not the one asking csv
properties.

What I don't completly understand is where to search for the real
implementation, since the type detection configuration doesn't name real
service names. It connects this:

<node oor:name="calc_Text_txt_csv_StarCalc" oor:op="replace">
   <prop oor:name="UIName">
    <value xml:lang="en-US">Text - txt - csv (StarOffice Calc)</value>
   </prop>
   <prop oor:name="Data">
    <value>0,text/plain,,,csv;txt,0,</value>
   </prop>
</node>

with that:

<node oor:name="Text - txt - csv (StarCalc)" oor:op="replace">
   <prop oor:name="UIName">
    <value xml:lang="en-US">Text CSV</value>
   </prop>
   <prop oor:name="Data">
    
<value>22,calc_Text_txt_csv_StarCalc,com.sun.star.sheet.SpreadsheetDocument,,195,,0,,com.sun.star.comp.Calc.FilterOptionsDialog</value>
   </prop>
   <prop oor:name="Installed" oor:type="xs:boolean">
    <value>true</value>
   </prop>
</node>

in

$(OpenOffice.org1.1.3)/share/registry/data/org/openoffice/Office/TypeDetection.xcu

If the CSV-options dialog is found I could look if it can recycled for
base.

Marc


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to