https://bugs.freedesktop.org/show_bug.cgi?id=75339
Lionel Elie Mamane <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected], | |[email protected] --- Comment #8 from Lionel Elie Mamane <[email protected]> --- Stephan? I'm having a difficulty with yet another subtelty of Reference in treating this bug. Consider this code (file svx/source/form/formcontroller.cxx): 308 bool lcl_isBoundTo( const Reference< XPropertySet >& _rxControlModel, const Reference< XInterface >& _rxNormDBField ) 309 { 310 Reference< XInterface > xNormBoundField( _rxControlModel->getPropertyValue( FM_PROP_BOUNDFIELD ), UNO_QUERY ); 311 return ( xNormBoundField.get() == _rxNormDBField.get() ); 312 } Consider this gdb trace: Breakpoint 5, svxform::(anonymous namespace)::lcl_isBoundTo ( _rxControlModel=uno::Reference to (frm::FormattedFieldColumn *) 0x5f0f128, _rxNormDBField=uno::Reference to (dbaccess::ORowSetDataColumn *) 0x2e44a88) at /home/master/src/libreoffice/workdirs/libreoffice-4-4/svx/source/form/formcontroller.cxx:311 (gdb) print xNormBoundField.get() $50 = (dbaccess::ORowSetDataColumn *) 0x2e448d0 (gdb) print _rxNormDBField.get() $51 = (dbaccess::ORowSetDataColumn *) 0x2e448d0 (gdb) print xNormBoundField $52 = uno::Reference to (dbaccess::ORowSetDataColumn *) 0x2e448d0 (gdb) print _rxNormDBField $53 = uno::Reference to (dbaccess::ORowSetDataColumn *) 0x2e44a88 (gdb) set print pretty off (gdb) set print object off (gdb) print _rxNormDBField.get() $54 = (com::sun::star::uno::XInterface *) 0x2e44a88 (gdb) print xNormBoundField.get() $55 = (com::sun::star::uno::XInterface *) 0x2e448d0 (gdb) finish Run till exit from #0 svxform::(anonymous namespace)::lcl_isBoundTo ( _rxControlModel=uno::Reference to (frm::FormattedFieldColumn *) 0x5f0f128, _rxNormDBField=uno::Reference to (dbaccess::ORowSetDataColumn *) 0x2e44a88) at /home/master/src/libreoffice/workdirs/libreoffice-4-4/svx/source/form/formcontroller.cxx:311 0x00007f88104df38d in svxform::ColumnInfoCache::initializeControls (this=0x2ef9ae0, _rControls=uno::Sequence of length 1 = {...}) at /home/master/src/libreoffice/workdirs/libreoffice-4-4/svx/source/form/formcontroller.cxx:378 Value returned is $56 = false The expectation of the code is that lcl_isBoundTo returns "true", but it returns false. Has something changed in 4.2 (compared to 4.1 and earlier) that breaks this assumption? How can we achieve the effect the code expects? I don't think we can commit to one particular implementation of "Column Model". -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
