https://bugs.documentfoundation.org/show_bug.cgi?id=85148
Lionel Elie Mamane <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |easyHack, skillCpp,
| |skillSql
CC| |[email protected],
| |[email protected],
| |[email protected]
--- Comment #3 from Lionel Elie Mamane <[email protected]> ---
Basically we just need to ask for user and password in the UI.
In connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu
in the
<node oor:name="sdbc:firebird:*" oor:op="replace">
...
<node oor:name="MetaData">
add a child like that:
<node oor:name="Authentication" oor:op="replace">
<prop oor:name="Value" oor:type="xs:string">
<value>UserPassword</value>
</prop>
</node>
While you are at it, change the "DriverTypeDisplayName" from "Firebird file" to
"Firebird external".
Then in connectivity/source/drivers/firebird/Connection.cxx in method
Connection::construct, in
if (url == "sdbc:embedded:firebird")
{
(...)
}
// External file AND/OR remote connection
else if (url.startsWith("sdbc:firebird:"))
{
// HERE
}
Get the username and password from the "info" parameter. See e.g.
connectivity/source/drivers/odbc/OConnection.cxx method OConnection::Construct
for an example how to do that.
Then pass the username and password to the firebird API. A bit lower you have:
if (m_bIsEmbedded || m_bIsFile)
{
strcpy(userName,"sysdba");
strcpy(userPassword,"masterkey");
}
else
{
// TODO: parse password from connection string as needed?
}
At the place of this TODO, strncpy the username and password you have extracted
from info into the userName and userPassword buffers.
For bonus points, you can implement a specific UI page just for Firebird in the
wizard, like we have for MySQL. bug 43369 contains instructions on how to do
that (for PostgreSQL, but can be adapted for Firebird).
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs