Created attachment 65919 [details] Demo spreadsheet showing NULL CurrentController at start-up In Basic macros, ThisComponent.CurrentController is not being initialized before evaluating formulas in spreadsheet cells the first time after start-up. Consequently, if a cell formula calls a macro which tries to access the current frame, an error occurs. After start-up the problem goes away, i.e. ThisComponent.CurrentController is defined. Please open the attached demo .ods file.
Confirmed. Win 7 64-bit Version: 4.4.0.0.alpha1+ Build ID: 8b21b5cbe78945b27525b4ce78ae3d981f90590f TinderBox: Win-x86@39, Branch:master, Time: 2014-11-06_03:55:51
*** Bug 37240 has been marked as a duplicate of this bug. ***
Its basically the ctor of the controller which triggers calculation of the document and the registration is after the controller ctor. Now the thing that eventually gets set as the controller is created close enough to the calculation, so I guess it could be possible to set it as a temporary controller during the first calculation and unset it again to keep everything "as it was" before that
https://gerrit.libreoffice.org/25514 would make this possible, passes make check so plausible I guess
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=50e39c58f152888e7001a1b0e3a9fd84b691216e Resolves: tdf#53899 if there is no CurrentController, use the ScTabViewObj It will be available in 5.3.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: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d44dea9e43c0f9d3b4bada800b1f94a48728f443&h=libreoffice-5-2 Resolves: tdf#53899 if there is no CurrentController, use the ScTabViewObj It will be available in 5.2.0.1. 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: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Hi Verified on windows 7/64 and: Version: 5.2.0.1 (x64) Build ID: fcbcb4963bda8633ba72bd2108ca1e802aad557d CPU Threads: 2; OS Version: Windows 6.1; UI Render: default; Locale: fr-FR (fr_FR) Version: 5.3.0.0.alpha1+ Build ID: 8a796410ec8f440b4163b15b928347c499da7a8f CPU Threads: 2; OS Version: Windows 6.1; UI Render: default; TinderBox: Win-x86@42, Branch:master, Time: 2016-10-20_23:07:21 Locale: fr-FR (fr_FR); Calc: group Thank you :) Regards Pierre-Yves