Skip to content
Merged
Prev Previous commit
Next Next commit
DEMO: reset IEnumVARIANT object before using it to retrieve child count
s. discussion in
#9310
  • Loading branch information
michaelweghorn authored and LeonarddeR committed Sep 18, 2021
commit 2db3707fd05e5f7971cf44675e6fd2c36416a0c6
1 change: 1 addition & 0 deletions source/NVDAObjects/IAccessible/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,7 @@ def _getSelectedItemsCount_accSelection(self, maxCount):
# Call the rawmethod for IEnumVARIANT::Next as COMTypes' overloaded version does not allow limiting the amount of items returned
numItemsFetched=ctypes.c_ulong()
itemsBuf=(VARIANT*(maxCount+1))()
enumObj.Reset()
res=enumObj._IEnumVARIANT__com_Next(maxCount,itemsBuf,ctypes.byref(numItemsFetched))
# IEnumVARIANT returns S_FALSE if the buffer is too small, although it still writes as many as it can.
# For our purposes, we can treat both S_OK and S_FALSE as success.
Expand Down
4 changes: 0 additions & 4 deletions source/appModules/soffice.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,6 @@ def _get_cellCoordsText(self):

class SymphonyTable(IAccessible):

def _getSelectedItemsCount_accSelection(self, maxCount):
# accSelection is broken in LibreOffice.
raise NotImplementedError

def event_selectionWithIn(self):
curFocus = api.getFocusObject()
if self == curFocus.table:
Expand Down