You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/10/24 10:10:51 UTC

[Bug 121264] New: XPropertyChangeListener does not get fired when changing properties

https://issues.apache.org/ooo/show_bug.cgi?id=121264

          Priority: P3
            Bug ID: 121264
          Assignee: ooo-issues@incubator.apache.org
           Summary: XPropertyChangeListener does not get fired when
                    changing properties
          Severity: major
        Issue Type: DEFECT
    Classification: Unclassified
                OS: Windows 7
          Reporter: jens.bornschein@tu-dresden.de
          Hardware: PC
            Status: UNCONFIRMED
           Version: AOO 3.4.1
         Component: api
           Product: app dev

XPropertyChangeListener does not get fired when changing properties, e.g. of an
XLayer. The web is full of threads for not using this listener because it
doesn’t get fired at all, even on dispose. This could be linked to the bug
61522 which seems to be the same problem. The Events have to get fired on every
changes made on the properties.


Sample code C#

    class DrawDocLayerManager : XPropertyChangeListener,
XVetoableChangeListener, XPropertyStateChangeListener,
XPropertySetInfoChangeListener, XPropertiesChangeListener 
    {       
        private readonly XNameAccess _layerManger;

        public DrawDocLayerManager(XLayerSupplier drwaDoc)
        {
            if (drwaDoc == null)
                throw new ArgumentNullException("drwaDoc", "The XLayerSupplier
is null");

            _layerManger = drwaDoc.getLayerManager();
            XIndexAccess xIndexAccess = (XIndexAccess)_layerManger;

            //Add PropertychangeListener to all Layer
            for (int i = 0; i < xIndexAccess.getCount(); i++)
            {
                try
                {
                    XLayer xLayer = (XLayer)xIndexAccess.getByIndex(i).Value;

                    xLayer.addPropertyChangeListener("Name", this);
                    xLayer.addVetoableChangeListener("Name", this);
                    xLayer.addPropertyChangeListener("", this);
                    xLayer.addVetoableChangeListener("", this);

                    ((XPropertySet)xLayer).setPropertyValue("Name", new
Any("foo"));

                }
                catch (System.Exception e)
                {
                    Console.WriteLine(e);
                }


            }


        }

        public void disposing(EventObject Source)
        {
             throw new NotImplementedException();
        }

        public void propertiesChange(PropertyChangeEvent[] aEvent)
        {
            throw new NotImplementedException();
        }

        public void propertySetInfoChange(PropertySetInfoChangeEvent evt)
        {
            throw new NotImplementedException();
        }

        public void propertyStateChange(PropertyStateChangeEvent aEvent)
        {
            throw new NotImplementedException();
        }

        public void vetoableChange(PropertyChangeEvent aEvent)
        {
            throw new NotImplementedException();
        }

        public void propertyChange(PropertyChangeEvent evt)
        {
            throw new NotImplementedException();
        }
    }
}

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

[Bug 121264] XPropertyChangeListener does not get fired when changing properties

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121264

Marcus <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Marcus <ma...@apache.org> ---
.

*** This bug has been marked as a duplicate of bug 121263 ***

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

[Bug 121264] XPropertyChangeListener does not get fired when changing properties

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121264

Marcus <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

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