Issue 127604 - Basic command thiscomponent.currentselection(0).name returns wrong name of grouped Draw objects
Summary: Basic command thiscomponent.currentselection(0).name returns wrong name of gr...
Status: UNCONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 4.1.2
Hardware: Other Linux, all
: P5 (lowest) Normal
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-24 21:28 UTC by Kai Struck
Modified: 2017-12-30 14:27 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Names_of_grouped_Draw_objects2.odt (11.53 KB, application/vnd.oasis.opendocument.text)
2017-11-24 21:28 UTC, Kai Struck
no flags Details
Screenshot to show result (127.55 KB, image/png)
2017-11-24 21:57 UTC, oooforum (fr)
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Kai Struck 2017-11-24 21:28:16 UTC
Created attachment 86267 [details]
Names_of_grouped_Draw_objects2.odt

Note: This Bug is fixed in LibreOffice 5.4.4
Here is the LibreOffice BugReport:
https://bugs.documentfoundation.org/show_bug.cgi?id=113615

Description:
the BASIC command thiscomponent.currentselection(0).name returns the wrong name of grouped Draw Objects.
In Writer: If multiple Draw objects are grouped and this grouped object is given a name (e.g. "linegroup") the above command should return this grouped object name but it returns the name of one of the elements instead e.g "line1".
This error occurs in all tested OpenOffice-Versions on most Linux systems like Linux Mint, Ubuntu. Both 64bit and 32bit versions. It works correctly on Lubuntu, Windows,OSX. 

Steps to Reproduce:
1. create 2 draw lines and give each a name. eg."line1" and "line2"
2. group the 2 lines
3. give the grouped object a name e.g. "linegroup"
4. select the object and run the basic program:
sub showname
msgbox thiscomponent.currentselection(0).name
end sub

It should show the name of the grouped object: "linegroup"
5. insert and delete texts. Save, try again.
At some point the error will occur and it will show the name of one of the elements e.g. "line2" instead of the grouped object ("linegroup")

Because it may not appear immediately try it with the attached files:
File2: Names_of_grouped_Draw_objects2.odt

Actual Results:  
At some point the error will occur and it will show the name of one of the elements e.g. "line2" instead of the grouped object ("linegroup")

Expected Results:
It always should show the name of the grouped object ("linegroup")


Reproducible: Always
Comment 1 oooforum (fr) 2017-11-24 21:57:06 UTC
Created attachment 86268 [details]
Screenshot to show result

Not reproduce with AOO 4.1.4 (fr) and Windows 7 x64 Pro
After lines selection, I click on "show name" button.
Then, msgbox displays "linegroup2" (see attached screenshot).
Comment 2 Kai Struck 2017-11-24 22:24:38 UTC
Thank you for testing.
It works ok on Windows,OSX and Lubuntu.
The Bug is OS-and GUI-dependent and shows on Ubuntu and Linux Mint.
Comment 3 oooforum (fr) 2017-11-27 11:23:31 UTC
(In reply to Kai Struck from comment #2)
> The Bug is OS-and GUI-dependent and shows on Ubuntu and Linux Mint.
Could you be more precise and give exact OS version for these distros?
Comment 4 Kai Struck 2017-11-27 12:30:50 UTC
Linux Mint 18 Mate 64bit
Ubuntu 17.10 64bit
Comment 5 oooforum (fr) 2017-12-29 16:43:19 UTC
(In reply to Kai Struck from comment #2)
> It works ok on Windows,OSX and Lubuntu.
> The Bug is OS-and GUI-dependent and shows on Ubuntu and Linux Mint.
So weird because Lubuntu, Ubuntu and Mint use same .DEB
Comment 6 Kai Struck 2017-12-30 11:34:09 UTC
Yes, sounds weird but is a bug.
The LibreOffice Bug Report can help finding out what's wrong
https://bugs.documentfoundation.org/show_bug.cgi?id=113615

It was supposed to be related to gtk3 as it generally appears when running OO or LO with a gtk3-gui but:
Cited from above link:
Caolán McNamara wrote
"I think this isn't gtk3 specific, but an underlying bug which is easier to run into with gtk3"
and provided the patch that solves the problem in LO.
Comment 7 oooforum (fr) 2017-12-30 11:41:59 UTC
Well, maybe contact the LibO dev and ask him to set his patch for AOO.
Comment 8 Kai Struck 2017-12-30 13:18:54 UTC
I'm really trying to provide as much information as possible to get the bug solved for OO.
This is the LO-patch:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=74030e2aebb68218d829724329744e6992d6543b
Comment 9 Marcus 2017-12-30 13:35:57 UTC
The problem is not the patch but the incompatible license. LibreOffice (GPL v3) can include patches from OpenOffice (AL v2) but not the other way around. Therefore the question to ask the LO developer for license agreement.
Comment 10 Patricia Shanahan 2017-12-30 14:27:38 UTC
Is there any way to delete the comments containing links to LO web pages and comments about them?

Although I have not followed any of the links, I have no way of proving that and may be influenced by the comments about them. As a result, I do not feel comfortable working on this bug. If the risky comments were deleted, future developers who have not seen them may be able to fix it.

Of course, there is no problem if LibreOffice and/or the originating developer grant their patch to ASF under the AVL2 license.