[Libreoffice-bugs] [Bug 126578] EDITING: Create as View not available before connecting to Database (open table, executing query, open form)
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sun Feb 9 10:12:13 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=126578
Julien Nabet <serval2412 at yahoo.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lionel at mamane.lu,
| |serval2412 at yahoo.fr
--- Comment #8 from Julien Nabet <serval2412 at yahoo.fr> ---
On pc Debian x86-64 with master sources updated today, I could reproduce this.
After some debugging, the pb is in:
https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/app/AppController.cxx?r=7e403195#817
808 case SID_DB_APP_CONVERTTOVIEW:
809 aReturn.bEnabled = !isDataSourceReadOnly();
810 if ( aReturn.bEnabled )
811 {
812 ElementType eType = getContainer()->getElementType();
813 aReturn.bEnabled = eType == E_QUERY &&
getContainer()->getSelectionCount() > 0;
814 if ( aReturn.bEnabled )
815 {
816 Reference<XViewsSupplier> xViewSup(
getConnection(), UNO_QUERY );
817 aReturn.bEnabled = xViewSup.is() &&
Reference<XAppend>(xViewSup->getViews(),UNO_QUERY).is();
818 }
819 }
line 817 xViewSup.is() returns false since we haven't called "ensureConnection"
yet.
Opening a query or just going to Tables pane calls "ensureConnection", that's
why "Create as View" is available then.
--
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/20200209/04107d75/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list