Hi Frank (again!), hi people
Frank Schönheit - Sun Microsystems Germany escribió:
The conclusion here is also that a FilePicker is not enough: we must
show the user all the sheets and database ranges in the spreadsheet
document so that s/he chooses one before we can instantiate the
CopyTableWizard.
Hmm. Would be nice to have this in the wizard, as first page, wouldn't
it?
:-( don't know if really needed: ANY "real" implementation of the
CTWiz. "in the real world" would need to preview another wiz./options
dialog for the user to make some choices, so this task could/should
belong to the extension/client, not to the CTWiz.
At least that's the conclusion I made after testing with different
sources.. and I didn't mention that we can also use directly a pure JDBC
source with no ODB encapsulating connection properties, so we would need
also a Java driver class name ... == quite the whole
com.sun.star.sdb.DatabaseWizardDialog should be "mapped" in a [very
complete] import-export extension...
That is, if only a connection is provided, but no Command/Type, then
prepend a page which allows selecting a table/query to copy.
(named ranges in a spreadsheet are exposed as tables by the driver,
IIRC, so effectively selecting from the tables would include them.)
I might add this - in a later version :).
A canonical extension would be to select multiple tables to import, but
in this case, we need a separate dialog before - if you would select
multiple tables in the wizard, the current UI for field matching would
not be able to cope with this anymore. So, perhaps a beforehand-dialog
asking for tables to copy (and potential other settings) is better,
anyway. It would then invoke the Copy Table wizard for every single
table. Not sure.
Well, I came to the conclusion that a beforehand-dialog (with at least
two steps) + FilePicker is needed (not very good from the user
experience I guess, but I see no other option), AND one should give the
user the chance to import-export more than one file/table at the same
time (executing the CTWiz looping the selected files/tables)
For any extension developer a 100%-OOO-like-Wiz. is a very "simple"
task: an OOoBasic clone is very easy [1], and one can "copy" form the
Java wiz. sources [2] or the C++ native source code[3].
On the medium run, I would like to make the UI from
Edit/Database/Properties available via UNO, too. More precise, I would
like the driver for a certain backend to provide its own UI [...]
... if a driver is installed as an *extension* (like the one for
PostgreSQL) now the driver developer has the *Options* *Dialog*: he can
add a leaf to his driver in OOoBase's node.
For the native drivers, I always wonder why there is no config. in the
Options dialog, so the user can set the default behavior when creating a
new ODB with a datasource using this driver [..well..I answer myself:
who ever uses this almost "hidden" dialog!]
The last time I realized this need was yesterday when testing the CTWiz
on Windows: I used the same NB project and samples, all using UTF-8
encoding and so the XDriveManager connection info, but when importing to
HSQLDB embedded on Win the copied tables turned out with the default
destination encoding, so the tables result useless (as the Spanish is
full of accents: "Andrés" turned out "Andrés", etc).
From the Options dialog the user could [if he ever uses that dialog]
choose: "I want always my HSQLDB embedded databases with UTF-8 encoding"
[...] (where
currently, we have hard-coded UI for all known drivers, but completely
separated from the drivers.). This implies this driver-provided UI is
available via UI, in some way (not necessarily as service, but perhaps
also as UI description, together with a service which can render the UI).
When this happens (if ever :), then an extension would be able to raise
the settings-UI for, say, text/csv, doing all the settings, create a
connection from those settings, and pass this connection to the wizard.
in the mean time OOo AWT is an "excellent" option (..well, for those
used to Java Swing: a rather "primitive" option, but that's what we've
got! and besides, Java windows look/behave horrible in the OOo windowing
system)
Regards
Ariel.
---------------------------------------------------------------------------
Just for those interested in copying OOo wizards:
[1] I've made an OOo Basic clone for the Spanish OOo community:
http://www.arielconstenlahaile.com.ar/ooo/imagenes/Roadmap_Dlg_OOoBasic.png
http://www.arielconstenlahaile.com.ar/ooo/docs/ARIEL_OOoBASIC_RoadMap_Dialogo.odt
[2] Java source to copy
OOoSourceCore/wizards/com/sun/star/wizards/ui/UnoDialog.java et al.
[3] C++ source to get "ideas" (you can not copy "as it is", because it
is not 100% UNO):
OOoSourceCore/svtools/source/dialogs/roadmapwizard.cxx et al.
OOoSourceCore/dbaccess/source/ui/dlg/dbwiz.cxx
OOoSourceCore/dbaccess/source/ui/dlg/dbwizsetup.cxx et al.
["registration class" at:
OOoSourceCore/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx]
--
Ariel Constenla-Haile
La Plata, Argentina
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.arielconstenlahaile.com.ar/ooo/
"Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter."
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]