Bug 57655

Summary: com::sun::star::beans::PropertyAttribute::CONSTRAINED description false
Product: LibreOffice Reporter: Lionel Elie Mamane <lionel>
Component: sdkAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: sbergman
Version: 4.0.0.0.alpha0+ Master   
Hardware: Other   
OS: All   
Whiteboard: target:4.0.0
i915 platform: i915 features:

Description Lionel Elie Mamane 2012-11-28 16:08:25 UTC
File udkapi/com/sun/star/beans/PropertyAttribute.idl:


    /** indicates that a <type>PropertyChangeEvent</type> will be fired
        to all registered <type>XPropertyChangeListener</type>s whenever the
        value of this property changes.
     */
    const short BOUND = 2;

    //-------------------------------------------------------------------------

    /** indicates that a <type>PropertyChangeEvent</type> will be fired
        to all registered <type>XVetoableChangeListener</type>s whenever the
        value of this property changes.

            <p>This always implies that the property is <em>bound</em>, too. </p>
     */
    const short CONSTRAINED = 4;


So the description of BOUND and CONSTRAINED is essentially the same. One of them must be incorrect.

My guess is that "CONSTRAINED" means that not all values of the type of the property are acceptable. E.g. the property must be strictly positive or between 50 and 200. My guess is also that it means that setting the property can throw com::sun::star::css::beans::PropertyVetoException.

Could someone with more experience in this stuff please look at this and make a decision? Thanks.
Comment 1 Not Assigned 2012-11-29 14:40:16 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7e1b156a4103bbb6d1dc110ffac53528c00b5dd2

fdo#57655: Improve wording



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.
Comment 2 Stephan Bergmann 2012-11-29 14:48:36 UTC
(In reply to comment #0)
> So the description of BOUND and CONSTRAINED is essentially the same. One of
> them must be incorrect.

Even though both are similar, I don't see why one should be incorrect.

> My guess is that "CONSTRAINED" means that not all values of the type of the
> property are acceptable. E.g. the property must be strictly positive or
> between 50 and 200. My guess is also that it means that setting the property
> can throw com::sun::star::css::beans::PropertyVetoException.

Yes.

> Could someone with more experience in this stuff please look at this and
> make a decision? Thanks.

I updated the wording somewhat, see comment 1.
Comment 3 Lionel Elie Mamane 2012-11-29 15:31:11 UTC
(In reply to comment #2)
> (In reply to comment #0)
>> So the description of BOUND and CONSTRAINED is essentially the same. One of
>> them must be incorrect.

> Even though both are similar, I don't see why one should be incorrect.

I missed the fact that they are not the same; one refers to XPropertyChangeListener and the other to XVetoableChangeListener.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.