I think the following code will effectively cope with this task.
When analyzing the code, the wonderful book by Andrew Pitonyak OpenOffice.org Macros Explained
(OOME_4_1.odt ) can help.
Option Explicit
Sub Test
Dim oDoc as Object
Dim oRanges as Object
Dim oNamedRanges as Object
Dim dataArray, rowArray, rangeName
oDoc = ThisComponent
oRanges = oDoc.createInstance("com.sun.star.sheet.SheetCellRanges")
oNamedRanges=oDoc.NamedRanges
On Error Goto ErrLabel
' Loop through cells that contain names of ranges to be cleared
dataArray = oDoc.getSheets().getByName("Sheet A").getCellRangeByName("A22:B31").getDataArray()
For each rowArray In dataArray
For each rangeName In rowArray
' Add the address of the named range to the oRanges object
oRanges.addRangeAddress oNamedRanges.getByName(rangeName).ReferredCells.RangeAddress, False
Next rangeName
Next rowArray
' In one method call we clear all ranges included in oRanges
oRanges.clearContents -1
Exit Sub
ErrLabel:
Msgbox "Error processing range with name " & rangeName
End Sub