Bug 97790 - [pyuno] unavailable exported functions and attributes
Summary: [pyuno] unavailable exported functions and attributes
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
Depends on:
Blocks:
 
Reported: 2016-02-12 10:09 UTC by Olivier R.
Modified: 2019-07-25 14:14 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier R. 2016-02-12 10:09:15 UTC
I made an implementation of a grammar checker in Python (a Lightproof derivative).
But my own functions implemented in the class are not exported when I call it.


class Lightproof (unohelper.Base, XProofreader, XServiceInfo, XServiceName, XServiceDisplayName, XSupportedLocales):

    def __init__ (self, ctx, *args):

    # XServiceName method implementations
    def getServiceName (self):

    # XServiceInfo method implementations
    def getImplementationName (self):
    def supportsService (self, ServiceName):
    def getSupportedServiceNames (self):

    # XSupportedLocales
    def hasLocale (self, aLocale):

    # XProofreader
    def isSpellChecker (self):
    def doProofreading (self, nDocId, rText, rLocale, nStartOfSentencePos, nSuggestedSentenceEndPos, rProperties):
    def ignoreRule (self, rid, aLocale):
    def resetIgnoreRules (self):

    # XServiceDisplayName
    def getServiceDisplayName (self, aLocale):

    # My own functions
    def getDictionary (self):



Then when I call the service with:

    gc = ctx.ServiceManager.createInstanceWithContext("my.grammarchecker…", ctx)


My own functions are not exported anymore.

If I display attributes of 'gc' with  "print(dir(gc))", I get the following result:

['ImplementationId', 'ImplementationName', 'Locales', 'ServiceName', 'SupportedServiceNames', 'Types', 'doProofreading', 'getImplementationId', 'getImplementationName', 'getLocales', 'getServiceDisplayName', 'getServiceName', 'getSupportedServiceNames', 'getTypes', 'hasLocale', 'ignoreRule', 'isSpellChecker', 'queryInterface', 'resetIgnoreRules', 'supportsService']

The function 'getDictionary' has disappeard.


With LO 5, if I list attributes of 'gc', 'getDictionary' is there as many other attributes.
Comment 1 Olivier R. 2016-02-28 16:32:24 UTC
Could be related to : https://bugs.documentfoundation.org/show_bug.cgi?id=50470
Comment 2 Xisco Faulí 2017-06-11 15:27:48 UTC
Thank you for reporting the bug.
Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 3 Olivier R. 2017-06-13 20:15:06 UTC
Bug still present.
Comment 4 Xisco Faulí 2018-11-26 19:06:08 UTC
(In reply to Olivier R. from comment #3)
> Bug still present.

Dear Oliver R,
Which version did you try? Is it still reproducible in 6.1.3.2 ?
Comment 5 QA Administrators 2019-05-26 02:52:49 UTC Comment hidden (obsolete)
Comment 6 Olivier R. 2019-05-26 05:15:35 UTC
The bug is still reproduced with LibreOffice 6.2.4.2 (x64)
Comment 7 Arnaud Versini 2019-07-06 12:20:38 UTC
Confirmed,

FYI the "__class__" attribute of the object is now "None" and was "uno_component.LightProof". We are bibisecting the bug right now !
Comment 8 Olivier R. 2019-07-11 07:40:50 UTC
Unfortunately, I didn’t succeed to make Python extension works with the Bibisect archives.