https://bugs.freedesktop.org/show_bug.cgi?id=31405

--- Comment #16 from Lionel Elie Mamane <lio...@mamane.lu> ---
The stuff happens in
sw/source/ui/dbui/dbmgr.cxx: SwNewDBMgr::ExecuteFormLetter

The problem is that this line:
  aDescriptor[daCommandType]  >>= nCmdType;

lets nCmdType set to 0 (that is, CommandType::TABLE), but it should set it to 1
(that is, CommandType::QUERY)

The weird thing is that this is supposed to come from the rProperties argument,
but:

(gdb) print rProperties
$30 = uno::Sequence of length 3 = {{
    Name = "DataSourceName", 
    Handle = 0, 
    Value = uno::Any "BaseNom", 
    State = com::sun::star::beans::PropertyState_DIRECT_VALUE
  }, {
    Name = "Command", 
    Handle = 0, 
    Value = uno::Any "Query2", 
    State = com::sun::star::beans::PropertyState_DIRECT_VALUE
  }, {
    Name = "CommandType", 
    Handle = 0, 
    Value = uno::Any 1, 
    State = com::sun::star::beans::PropertyState_DIRECT_VALUE
  }}

The CommandType is is clearly "1", so maybe something is wrong in how
  ODataAccessDescriptor aDescriptor(rProperties);
handles stuff? Ah no:

(gdb) print aDescriptor[daCommandType]
$32 = uno::Any 1

So the problem is in the ">>="? That's weird. Ah... I found it... The Any
contains a sal_Int32, and we are trying to stuff it into a sal_Int16...
Changing nCmdType to a sal_Int32 should solve the problem.

Testing that fix...

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

Reply via email to