https://bugs.documentfoundation.org/show_bug.cgi?id=170930

            Bug ID: 170930
           Summary: theServiceDocumenter singleton getter doesn’t work
           Product: LibreOffice
           Version: 5.1 all versions
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: sdk
          Assignee: [email protected]
          Reporter: [email protected]

Description:
The theServiceDocumenter singleton is in the namespace com::sun::star::script
so the generated getter in the C++ header calls ctx->getValueByName with the
name “/singletons/com.sun.star.script.theServiceDocumenter”. However, the
actual name for the singleton defined in utl.component is
“com.sun.star.util.theServiceDocumenter” (ie, “util” instead of “script”) so if
you try to use the getter it can’t find the singleton, throws a
DeploymentException and the program aborts. This also means the documentation
for the singleton has the wrong name so even if you try to get it via
getValueByName it would be difficult to guess the correct name. 

Steps to Reproduce:
You can reproduce this with LibreOffice BASIC too:

1. Create a new writer document
2. Tools -> Macros -> Edit Macros
3. Replace the macro source code that pops up with:

REM  *****  BASIC  *****

Sub Main
        ctx=GetDefaultContext()
        documenter = com.sun.star.script.theServiceDocumenter.get(ctx)
        documenter.showCoreDocs(documenter)
End Sub

4. Press the play button to run the macro.

Actual Results:
A dialog pops up saying “BASIC runtime error. Object variable not set.”.

Expected Results:
It should try to open the documentation for the service in the browser.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.8.4.2 (X86_64)
Build ID: 580(Build:2)
CPU threads: 8; OS: Linux 6.18; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to