Summary: | Macro: bug in CoreReflection after Split() + arrayed( Array() ) | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Kamil Landa <kamlan> |
Component: | BASIC | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | andreas.heinisch, mikekaganski |
Priority: | medium | ||
Version: | 7.4.0.0 alpha0+ | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Windows (All) | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Attachments: | OK in Watch, but error in CoreReflection |
Description
Kamil Landa
2022-01-20 12:39:49 UTC
We changed split in https://gerrit.libreoffice.org/c/core/+/123122, thid could affect the core reflection. I have to test it though. @Mike: Should we allow in [1] also non fixed variant arrays? Since the new split function [2] resets the fixed flag and changes the type to variant? Imho the GetByte function should allow all kind of retrievals. [1] https://opengrok.libreoffice.org/xref/core/basic/source/sbx/sbxstr.cxx?r=5bd55c22#87 [2] https://gerrit.libreoffice.org/c/core/+/123122/6/basic/source/runtime/methods1.cxx#1632 (In reply to Andreas Heinisch from comment #2) At https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbunoobj.cxx?r=a2eaf99e#1010, the Type for 'p' is obtained, which is typelib_TypeClass_SEQUENCE with type name '[]string'. Then in sbxToUnoValue ( https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbunoobj.cxx?r=a2eaf99e#1310 ), aElemType is retrieved from the '[]string' string (using typelib_typedescription_getByName). Then the obtained typelib_TypeClass_STRING is used to retrieve SbxVariableRef for each element of the sequence (array), using sbxToUnoValue for the elements - and that naturally fails for the elements that are *not* strings. So the question is - why p is still '[]string' after split, i.e. what is different compared to the other (commented out) way of array creation (we should improve the fix for tdf#144924 in that regard). I assume that at some point, it should change the eType in SbxArray stored in the SbxValue.aData.pObj of the 'p'. |