Created attachment 53965 [details]
screenshot of MySQL-specific UI
When connecting to a PostgreSQL database (through PostgreSQL-SDBC driver), we currently just ask the user to type a conninfo string. That's familiar to PostgreSQL experts, but other people would benefit from some hand-holding.
Implement a PostgreSQL-specific UI to get the connection info, along the lines of the MySQL-specific UI we already have.
The file you need to change in LibreOffice is dbaccess/source/ui/dlg/ConnectionHelper.cxx, in function
IMPL_LINK(OConnectionHelper, OnBrowseConnections, PushButton*, /*_pButton*/)
there is a big
switch ( eType )
We need to add a case for PostgreSQL. You can take inspiration from the MySQL case.
You may also need to adapt ODbDataSourceAdministrationHelper::getConnectionURL() in file DbAdminImpl.cxx, as well as ODbTypeWizDialog::determineNextState in file dbwiz to activate a new state ADDITIONAL_PAGE_PGSQL, which you have to create first.
Finally, the dialog itself would be in file dbaccess/source/ui/dlg/dbadminsetup.src, in a to-be-created section TabPage PAGE_DBWIZARD_PGSQL.
You could just generate a conninfo string from that, but I'd prefer if you set it as properties of the datasouce/database/..., so that the driver gets it through the same interface as the username and password; cf handling of these for inspiration. There is already support for that in the driver, see connectivity/source/drivers/postgresql/pq_connection.cxx, function properties2arrays. POssibly you need to extend the handling there to support more keywords.
Please *also* allow advanced users to enter a conninfo string, and mixing of entering a conninfo string (like now) and information through widgets in the specific UI. See http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html#LIBPQ-PQCONNECTDBPARAMS for an up-to-date list of all recognised connection settings. Make a decision on which of these settings make or do not make sense to give a friendly UI for.
I also renamed Date::IsValid() to Date::IsValidAndGregorian() to clarify
and added Date::IsValidDate() that does not check for the Gregorian
(In reply to comment #1)
> I also renamed Date::IsValid() to Date::IsValidAndGregorian() to clarify
> and added Date::IsValidDate() that does not check for the Gregorian
I think that was in the wrong bug.
I apologise for the noise I contributed in comment 1; I intended only to add myself to the cc of the bug. (I do not even remember having copied that text at all, let alone having pasted it.)
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.
see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Adding self to CC if not already on
Migrating Whiteboard tags to Keywords: (EasyHack SkillCpp SkillVcl TopicUI)
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC)
I sent following for this patch;
You'll need to create new dialogs (.ui files) for that. This is done with a tool called "Glade", run from a shell after doing
You can use the ones we have for MySQL as inspiration:
Please add keyword 'needsUXEval' and CC 'firstname.lastname@example.org' if input from UX is needed.
*** Bug 132476 has been marked as a duplicate of this bug. ***