[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
Sun Nov 29 13:25:40 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=54021
--- Comment #42 from Julien Nabet <serval2412 at yahoo.fr> ---
After some debugging it seems copy starts after workaround because
right click calls ensureRowSetConnection:
#0
dbtools::lcl_connectRowSet(com::sun::star::uno::Reference<com::sun::star::sdbc::XRowSet>
const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&, bool, com::sun::star::uno::Reference<com::sun::star::awt::XWindow>
const&)
(_rxRowSet=uno::Reference to (frm::ODatabaseForm *) 0x7be7ef8,
_rxContext=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *)
0x127a070, _bAttachAutoDisposer=false, _rxParent=empty uno::Reference) at
connectivity/source/commontools/dbtools.cxx:368
#1 0x00007f705f95ef61 in
dbtools::ensureRowSetConnection(com::sun::star::uno::Reference<com::sun::star::sdbc::XRowSet>
const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&, com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&)
(_rxRowSet=uno::Reference to (frm::ODatabaseForm *) 0x7be7ef8,
_rxContext=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *)
0x127a070, _rxParent=empty uno::Reference)
at connectivity/source/commontools/dbtools.cxx:483
#2 0x00007f704fa1e2b5 in dbaui::SbaGridControl::IsReadOnlyDB() const
(this=0x858f290) at dbaccess/source/ui/browser/sbagrid.cxx:914
#3 0x00007f704fa2297e in
dbaui::SbaGridHeader::PreExecuteColumnContextMenu(unsigned short, PopupMenu&)
(this=0x32bd3a0, nColId=2, rMenu=...) at
dbaccess/source/ui/browser/sbagrid.cxx:551
#4 0x00007f706800e914 in FmGridHeader::triggerColumnContextMenu(Point const&)
(this=0x32bd3a0, _rPreferredPos=Point = {...}) at
svx/source/fmcomp/fmgridcl.cxx:992
Indeed without this connection, you go in the if block there:
244 if ( sFieldName.isEmpty()
245 || sCommand.isEmpty()
246 || ( sDatasource.isEmpty()
247 && sDatabaseLocation.isEmpty()
248 && !xConnection.is()
249 )
250 )
251 {
252 OSL_FAIL( "FmGridHeader::ExecuteDrop: somebody started a
nonsense drag operation!!" );
253 return DND_ACTION_NONE;
254 }
It can be fixed with this:
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx
b/dbaccess/source/ui/browser/sbagrid.cxx
index 41a30c9df178..cdbdf265cad2 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -1046,6 +1046,7 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos)
{
Reference< XPropertySet > xDataSource = getDataSource();
OSL_ENSURE(xDataSource.is(), "SbaGridControl::DoColumnDrag : invalid data
source !");
+ ::dbtools::ensureRowSetConnection( Reference< XRowSet
>(getDataSource(),UNO_QUERY), getContext(), nullptr );
Reference< XPropertySet > xAffectedCol;
Reference< XPropertySet > xAffectedField;
So now, there's still the initial move pb.
--
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/20201129/1ae75c25/attachment.htm>
More information about the Libreoffice-bugs
mailing list