[Libreoffice-bugs] [Bug 71027] form wizard: timestamp field does not get style applied

2014-02-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71027

Michael Stahl mst...@redhat.com changed:

   What|Removed |Added

 CC||dtar...@redhat.com,
   ||mst...@redhat.com

--- Comment #5 from Michael Stahl mst...@redhat.com ---
i think you should be asking the other David about SdrObject lifecycles :)

-- 
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


[Libreoffice-bugs] [Bug 71027] form wizard: timestamp field does not get style applied

2014-02-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71027

David Tardon dtar...@redhat.com changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|libreoffice-b...@lists.free |dtar...@redhat.com
   |desktop.org |

-- 
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


[Libreoffice-bugs] [Bug 71027] form wizard: timestamp field does not get style applied

2014-02-04 Thread bugzilla-daemon
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_castcppu::OWeakObject*(static_castSvxShape_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


[Libreoffice-bugs] [Bug 71027] form wizard: timestamp field does not get style applied

2013-11-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71027

rob...@familiegrosskopf.de changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 CC||rob...@familiegrosskopf.de
 Ever confirmed|0   |1

--- Comment #4 from rob...@familiegrosskopf.de ---
Can confirm this bug. But much better this cosmetical bug than a not-working
form-wizard with timestamp-fields.

-- 
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


[Libreoffice-bugs] [Bug 71027] form wizard: timestamp field does not get style applied

2013-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71027

--- Comment #1 from Lionel Elie Mamane lio...@mamane.lu ---
The immediate cause for this is:

java.lang.NullPointerException
at
com.sun.star.wizards.form.StyleApplier.setDBControlColors(StyleApplier.java:347)
at
com.sun.star.wizards.form.StyleApplier.applyDBControlProperties(StyleApplier.java:397)
at com.sun.star.wizards.form.StyleApplier.applyStyle(StyleApplier.java:199)
at
com.sun.star.wizards.form.FormDocument$ControlForm.initialize(FormDocument.java:417)
at
com.sun.star.wizards.form.UIControlArranger$ArrangeButtonList.itemStateChanged(UIControlArranger.java:446)
at com.sun.star.wizards.ui.ButtonList.fireItemSelected(ButtonList.java:429)
at com.sun.star.wizards.ui.ButtonList.setSelected(ButtonList.java:571)
at com.sun.star.wizards.ui.ButtonList.actionPerformed(ButtonList.java:792)
at com.sun.star.bridges.jni_uno.JNI_proxy.dispatch_call(Native Method)
at com.sun.star.bridges.jni_uno.JNI_proxy.invoke(JNI_proxy.java:183)
at sun.proxy.$Proxy76.execute(Unknown Source)
at com.sun.star.wizards.ui.UnoDialog.executeDialog(UnoDialog.java:698)
at com.sun.star.wizards.ui.UnoDialog.executeDialog(UnoDialog.java:737)
at com.sun.star.wizards.form.FormWizard.start(FormWizard.java:355)
at
com.sun.star.wizards.form.CallFormWizard$FormWizardImplementation.trigger(CallFormWizard.java:75)


which is itself caused by
  file wizards/com/sun/star/wizards/form/StyleApplier.java, function
applyDBControlProperties:
  XPropertySet xPropertySet =
oTimeStampControl.getControlofGroupShapeByIndex(i);
getControlofGroupShapeByIndex returns null, which is caused by
  file wizards/com/sun/star/wizards/document/TimeStampControl.java, function
getControlofGroupShapeByIndex

  Object oControl = xShapes.getByIndex(_i);
  XControlShape xControlShape = UnoRuntime.queryInterface(XControlShape.class,
oControl);

up to there it is fine and not null, but then xControlShape.getControl()
returns NULL.

xControlShape is a SvxShapeControl, so this ends up in
svx/source/unodraw/unoshap2.cxx,
around line 622:

Reference awt::XControlModel  SAL_CALL SvxShapeControl::getControl()
throw( uno::RuntimeException )
{
::SolarMutexGuard aGuard;

Reference awt::XControlModel  xModel;

SdrUnoObj* pUnoObj = dynamic_cast SdrUnoObj * (mpObj.get());
if( pUnoObj )
xModel = pUnoObj-GetUnoControlModel();

return xModel;
}

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_castcppu::OWeakObject*(static_castSvxShape_UnoImplHelper*(new
SvxShapeControl(pObj)));
return xRet;

So I don't see a reference to pObj being held anywhere.


The big mystery is that this exact same code worked in LibreOffice 4.1.0.1 and
as far as I can see, none of the code I quoted above changed since 4.1.0.1: not
the wizards/... java files, and not svx/source/unodraw/unoshap* and not
include/svx/unoshape.hxx.

-- 
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


[Libreoffice-bugs] [Bug 71027] form wizard: timestamp field does not get style applied

2013-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71027

Lionel Elie Mamane lio...@mamane.lu changed:

   What|Removed |Added

 CC||d.ostrov...@gmx.de,
   ||lio...@mamane.lu

--- Comment #2 from Lionel Elie Mamane lio...@mamane.lu ---
@davido: I remember you worked on lifetime issues of sdrobject stuff recently.
Could this be related?

-- 
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


[Libreoffice-bugs] [Bug 71027] form wizard: timestamp field does not get style applied

2013-10-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=71027

Lionel Elie Mamane lio...@mamane.lu changed:

   What|Removed |Added

 CC||sberg...@redhat.com

--- Comment #3 from Lionel Elie Mamane lio...@mamane.lu ---
@sbergman: you helped me out of similar cononudrums in the past; maybe you'd
have some insight here?

-- 
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