[Libreoffice-bugs] [Bug 54021] EDITING: Fields in tablecontrols of a form could not be moved/sorted
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sat Dec 5 16:55:19 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=54021
--- Comment #47 from Julien Nabet <serval2412 at yahoo.fr> ---
(In reply to Lionel Elie Mamane from comment #22)
> Created attachment 112455 [details]
> reproduction example in Writer
On pc Debian x86-64 with master sources updated today, I still can reproduce
this.
There's still:
warn:legacy.osl:33190:33190:svx/source/fmcomp/fmgridcl.cxx:252:
FmGridHeader::ExecuteDrop: somebody started a nonsense drag operation!!
The commit
https://cgit.freedesktop.org/libreoffice/core/commit/?id=44f1ed1928d4d32b1a1962f413df69e2ae851789
"Related tdf#54021: Fields in tablecontrols of a form could not be copied
See https://bugs.documentfoundation.org/show_bug.cgi?id=54021#c42
for more details.
Of course there's still the main pb to fix, moving columns
"
isn't sufficient here.
Indeed, LO retrieves:
- no existing connection
- no datasource name
- no URL
I noticed you used registered database "Bibliography".
So I tried to retrieve it and use it as url but got 2 problems:
1) I used "Bibliography" directly in the code because I didn't know how to
retrieve the name of used registered database from the odb file
2) I got url:
file:///home/julien/lo/libreoffice/instdir/user/database/biblio.odb (which
exists)
but it still couldn't create a connection from it.
Here's a quick dirty test patch:
diff --git a/connectivity/source/commontools/dbtools.cxx
b/connectivity/source/commontools/dbtools.cxx
index d8ce3f42136e..c27de79809ef 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -20,6 +20,7 @@
#include <connectivity/CommonTools.hxx>
#include <TConnection.hxx>
#include <ParameterCont.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
@@ -46,6 +47,7 @@
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
#include <com/sun/star/sdbc/ConnectionPool.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
+#include <com/sun/star/sdb/DatabaseContext.hpp>
#include <com/sun/star/sdbc/XConnection.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
#include <com/sun/star/sdbc/XParameters.hpp>
@@ -413,9 +415,20 @@ static SharedConnection lcl_connectRowSet(const Reference<
XRowSet>& _rxRowSet,
xPureConnection = getConnection_allowException( sDataSourceName,
sUser, sPwd, _rxContext, _rxParent );
}
- else if (!sURL.isEmpty())
+ else
{ // the row set has no data source, but a connection url set
// -> try to connection with that url
+ if (sURL.isEmpty())
+ {
+ Reference< XDatabaseContext > xRegistrations(
+ DatabaseContext::create(
+ comphelper::getProcessComponentContext()));
+ OUString sName("Bibliography");
+ if (xRegistrations->hasRegisteredDatabase( sName ) )
+ {
+ sURL = xRegistrations->getDatabaseLocation( sName );
+ }
+ }
Reference< XConnectionPool > xDriverManager;
try {
xDriverManager = ConnectionPool::create( _rxContext );
I'm a bit stuck here.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201205/2b04fa80/attachment.htm>
More information about the Libreoffice-bugs
mailing list