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

            Bug ID: 150257
           Summary: [PyUNO] uno.isInstance(obj) returns 0
           Product: LibreOffice
           Version: 7.3.5.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: sdk
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: ville...@t-online.de

Description:
As said in the summary, I get nothing but 0.
Expected result: True if the given object is an UNO object.

See also:
https://ask.libreoffice.org/t/c-s-s-text-mailmergetype-shell-4/80148/9

Steps to Reproduce:
1. A Python script:
import uno
def test_isInstance():
    doc = XSCRIPTCONTEXT.getDocument()
    print(uno.isInstance(doc)
2. store the script under <profile>/Scripts/python/testInstance.py

3. Start the office from a terminal window, load any kind of document and run
the macro.

Actual Results:
prints 0 to the terminal

Expected Results:
print True to the terminal since XSCRIPTCONTEXT.getDocument() refers to the
currently active document model which is certainly an UNO object.


Reproducible: Always


User Profile Reset: No



Additional Info:
I tested this with various UNO objects that occur in my current project. Always
0.

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

Reply via email to