https://bugs.documentfoundation.org/show_bug.cgi?id=173518
Bug ID: 173518
Summary: Reporting difference with nothing selected between
ThisComponent.getCurrentSelection() and
.CurrentController.Selection
Product: LibreOffice
Version: 26.8.0.3 release
Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: UNCONFIRMED
Severity: minor
Priority: medium
Component: Draw
Assignee: [email protected]
Reporter: [email protected]
Created attachment 208493
--> https://bugs.documentfoundation.org/attachment.cgi?id=208493&action=edit
Macro demonstrates selection reporting difference.
Within a Basic macro in Draw, there is a difference in what is returned by
ThisComponent.getCurrentSelection() and
ThisComponent.CurrentController.Selection when no shape is selected.
getCurrentSelection() cleanly returns a Null value. CurrentController.Selection
raises an uncaught Basic runtime error.
The attached Draw file has a macro, CheckIfShapeSelected, which demonstrates
this difference. The macro uses both approaches. When run with no shape
selected, the getCurrentSelection() approach returns a Null. The Selection
approach will complete only if the line oSelection2 =
oDoc.CurrentController.Selection has an On Error trap. You can see the error if
you comment out the On Error lines.
I've listed this as Minor severity because getCurrentSelection() is available
with a clean exit.
--
You are receiving this mail because:
You are the assignee for the bug.