getting help with Bug 71248 - Excel VBA: ActiveDocument is not tracking currently selected document

Noel Power nopower at suse.com
Tue Sep 30 02:00:02 PDT 2014


On 30/09/14 03:05, Justin Luth wrote:
> On 10/09/14 04:58, Noel Power wrote:
[...]
> Noel, Thanks for that information.  I've attached a diff that seems to
> fix the problem of the GlobalUNOConstant/Standard library names
> 'ThisWordDoc' and 'ThisExcelDoc' not being updated when the active
> document changes.
>
> Are you willing to review this and enter it into master/4.3 if it is
> good?  I spent two weeks just trying to understand what is going on
> here, so I don't feel competent to try and submit the patch myself.
so you got it to work, with libreoffice code that's an achievement in
itself :-) well done for that
However... I don't think this is the correct fix (it's close though) and
it gave me some hints to look quickly a little more. Also to submit
patches you should investigate using gerrit
(https://wiki.documentfoundation.org/Development/gerrit)

I see in the bug comments you point to lclGetVBAGlobalConstName,
SC_UNO_VBAGLOBNAME and the fact they don't seem to be set/used anywhere,
this is probably the root cause. It looks like there is a disconnect
between the name of the property in calc (SC_UNO_VBAGLOBNAME which is
equal to "VBAGlobalConstantName") used to transport the name of the
basic constant to track the current document and the name used in
'lclGetVBAGlobalConstName' to retrieve the the name of the basic
constant ("ThisVBADocObj"). I would imagine the name used should be the
same for things to work. It would be worth testing if that fixes it,
also would be worth chasing whether writer documents set up the same
property correctly
>
> Thanks,
> Justin
> https://bugs.freedesktop.org/show_bug.cgi?id=71248
Noel


More information about the LibreOffice mailing list