Bug 111827 - through API created DRAW XShapes do not have proper XAccessibleComponent - Bounds and DOM position ist invalid
Summary: through API created DRAW XShapes do not have proper XAccessibleComponent - Bo...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
5.2.7.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks:
 
Reported: 2017-08-15 22:21 UTC by Jens Bornschein
Modified: 2019-06-27 02:56 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Bornschein 2017-08-15 22:21:06 UTC
If one create a XShape through the API and add them afterwards to the DRAW page to display the corresponding accessibility object is invalid. The XAccessibleComponent is added as sibling to the Draw pages and allways have a width and height of 0. Thereby you cannot use the getAccessibleAtPoint(point) function.


pseudocode (cli C#):

XMultiServiceFactory drawDocXMultiServiceFactory = DrawPagesProvider as XMultiServiceFactory;

Object shape = drawDocXMultiServiceFactory.createInstance("com.sun.star.drawing.RectangleShape");

shape.setPosition(new Point(100, 100););
shape.setSize(new Size(1000, 1000));

((XShapes)page).add(shape);


// try to get the rectangle back
var result = DrawAppWindowAccComp.getAccessibleAtPoint(new Point(newRectCenterScreenPos.X, newRectCenterScreenPos.Y));
Comment 1 Xisco Faulí 2017-08-16 00:16:23 UTC
Thank you for reporting the bug.
it seems you're using an old version of LibreOffice.
Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 2 Jens Bornschein 2017-08-16 09:28:42 UTC
"feature" is still available in version 5.4.0.3 using SDK 3.5.3

--> what this makes it so important is that visually impaired users cannot get access to automatically generated content of those documents.

Bad workaround: (through GUI operation) if you select all, cut and paste it again, the objects are available even for assistive technologies.
Comment 3 Buovjaga 2017-08-31 15:33:14 UTC
It would be great to have an example in BASIC, so QA could run it.
Comment 4 Xisco Faulí 2017-12-06 11:40:51 UTC
(In reply to Buovjaga from comment #3)
> It would be great to have an example in BASIC, so QA could run it.

Hello Jens,
Do you think it's possible to have an example of the code in BASIC?
Comment 5 Jens Bornschein 2017-12-06 12:12:42 UTC
(In reply to Xisco Faulí from comment #4)
> (In reply to Buovjaga from comment #3)
> > It would be great to have an example in BASIC, so QA could run it.
> [...]
> Do you think it's possible to have an example of the code in BASIC?

I’d already tried to prepare an example for you in BASIC. The interesting thing is that when I create objects within a BASIC macro, the objects are correctly created, with correct width and height. But I have to state out that I lack in skills to get access to the accessibility interface of the object through BASIC. But when I try to access a BASIC macro created shape with my C# cli code, it works pretty well and all parameters are valid. Creating the same shape via C# cli API, the shape-object doesn’t have a height and width in its accessibility representation. 

So you see, it does not make so much sense to provide you a BASIC example because it will not provide you the error. The Question is, what is the difference between creating shapes through BASIC macros and through the current cli API?
Comment 6 Buovjaga 2017-12-06 12:18:45 UTC
(In reply to Jens Bornschein from comment #5)
> So you see, it does not make so much sense to provide you a BASIC example
> because it will not provide you the error. The Question is, what is the
> difference between creating shapes through BASIC macros and through the
> current cli API?

What is your proposal on how we could test it?
Comment 7 Jens Bornschein 2017-12-06 12:31:58 UTC
(In reply to Buovjaga from comment #6)
> What is your proposal on how we could test it?

I can imagine that I can provide my start for the basic example to you and “one” can compensate my missing skills in getting access to the accessibility view of the shape. And on the other site I can try to extract my cli API part to provide you an example project and compiled exe to run the example … but this will take me some time because this little piece of code is part of an almost a million line of code project with several wrappings. So this will take me some days when I have spare time (which doesn’t happen so often ;-) ). But when I provide you a cli snipped, it should be as slim as possible to make sure that no “other” part have side effects. 

And, as a software engineer, I would start to check the constructors of the accessibility objects in the related view. There must be a difference in the calling hierarchy or in the parameters that differs between the cli API calls and the internal BASIC calls.
Comment 8 Xisco Faulí 2018-11-27 13:20:31 UTC
@Jens Bornschein, any update from comment 7?
Setting to NEEDINFO meanwhile...
Comment 9 QA Administrators 2019-05-27 02:47:01 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2019-06-27 02:56:15 UTC
Dear Jens Bornschein,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp