Bug 107029 - xray ThisComponent no longer works, take two
Summary: xray ThisComponent no longer works, take two
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:5.4.0
Keywords: bibisected, bisected, regression
Depends on:
Reported: 2017-04-08 13:29 UTC by Miklos Vajna
Modified: 2017-04-10 11:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Miklos Vajna 2017-04-08 13:29:36 UTC
The problem is the same as in bug 105735, except that the root cause is probably different here.

The daily bibisect repo points out this range:


Bisect to a single commit is in progress.
Comment 1 Miklos Vajna 2017-04-08 17:01:25 UTC
$ git bisect good
0fe6f1a196b70f0ba4c948389b2ef9b1e77187b8 is the first bad commit
commit 0fe6f1a196b70f0ba4c948389b2ef9b1e77187b8
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date:   Mon Apr 3 10:55:16 2017 +0200

    use actual UNO enums in vcl..xmlsecurity
    Change-Id: Id862544f27ebcbe8363f93dc83192d0f0cddb5cc
    Reviewed-on: https://gerrit.libreoffice.org/36041
    Tested-by: Jenkins <ci@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>

:040000 040000 7b2c725ea27e0debb899c56957ed6059eec4e7a4 3b6c5e5a55fb17992968eeed9d19a16c261119fb M      vcl
:040000 040000 daa21216259300dd2c68660910ee2aa8698885b3 8f2f87121b73f14d076a89338e27a9e35a0fae9b M      winaccessibility
:040000 040000 4138649700232d568e097b43c110858650076497 685e13f420d48c30251d561487fab8cba8c19081 M      writerfilter
:040000 040000 af8109305ff3569bd7224bb3441a717e7e01ab3c 9d48d97c8aa394c5c0d372492e837ac9109639da M      writerperfect
:040000 040000 354eac87d923cbfc1ea64dfe9afd236575803995 1ee2157c4385b1ac03dc11810000f1d898f735e1 M      xmlscript
:040000 040000 0db816ba14fcf1f45d108a0331db2f1252d1b605 bb66a9d38fad114206836db898372622208a0e0d M      xmlsecurity

Adding Cc: to Noel Grandin

Could you please look at this?

Additional info: actually if you set macro security to low, and click on the button in the xray installer document to install xray, even that one doesn't work -- but I bisected with installing xray using an older version and testing when 'xray ThisComponent' broke. Quite possibly the two broke due to the same root cause, though.
Comment 2 Miklos Vajna 2017-04-08 17:14:54 UTC
This fixes the problem for me:

diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index 32edd32..f5606ff 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -1092,7 +1092,7 @@ bool ImportContext::importButtonTypeProperty(
             throw xml::sax::SAXException( "invalid button-type value!", Reference< XInterface >(), Any() );
-        _xControlModel->setPropertyValue( rPropName, makeAny( nButtonType ) );
+        _xControlModel->setPropertyValue( rPropName, makeAny( (sal_Int16)nButtonType ) );
         return true;
     return false;

Noel, does this look correct to you? If so, I'll push a proper patch to gerrit when I get to the machine where I have my keys. :-)
Comment 3 Noel Grandin 2017-04-10 06:57:31 UTC
vmiklos, yes, that looks like the right fix, thanks!
Comment 4 Commit Notification 2017-04-10 11:12:41 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":


tdf#107029 xmlscript: fix enum conversion

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.