https://bugs.freedesktop.org/show_bug.cgi?id=71027
--- Comment #6 from David Tardon <dtar...@redhat.com> --- > In the problematic call, mpObj.get() is NULL. But it was non-NULL before... > > mpObj is a ::tools::WeakReference< SdrObject > > > My understanding of "weak reference" is that it is a reference that does not > keep > the object from being garbage-collected (through our reference-counting > system). > So, a reference to that object must be held somewhere else; if not it will > disappear. > My guess is that this is what happens here. > > I don't have any clue what other object is supposed to hold that reference; > mpObj is initialised with a FRESH FmFormObj in the constructor of > SvxShapeControl > (which is called as such: > > SdrObject* pObj = new FmFormObj(); > xRet = > static_cast<cppu::OWeakObject*>(static_cast<SvxShape_UnoImplHelper*>(new > SvxShapeControl(pObj))); > return xRet; > > So I don't see a reference to pObj being held anywhere. There are two parallel class hierarchies: SdrObject and derived classes are internal representations of various drawing objects and SvxShape and derived are respective UNO impls. (all implementing css::drawing::XShape). Because object of either of them can be created first (SdrObject in UI, SvxShape during import), neither of them can own the other. So instead SdrObjects are owned by SdrPage and SvxShapes by some css::drawing::XShapes impl. SdrObjects are created by SdrPage::CreateSdrObject factory method as an extra init. step for SvxShape. SdrObject creates an SvxShape when needed, if it does not have one already, using css::drawing::XCustomShapeEngine impl. (typically EnhancedCustomShapeEngine). There are few more details I do not quite remember... -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs