combining two macros query

I’m using macro

Sub restoreTabColor
Dim oSheet As Variant
    For Each oSheet In ThisComponent.getSheets()
        oSheet.TabColor = -1
    Next oSheet
End Sub

as well as

Sub demo()
doc = ThisComponent
rgs = doc.createInstance("com.sun.star.sheet.SheetCellRanges")
Dim aRgA As New com.sun.star.table.CellRangeAddress
With aRgA
  .StartColumn = 2
  .EndColumn = 22
  .StartRow = 1
  .EndRow = 1298
  For j = 0 To 22
    .sheet = j
    rgs.addRangeAddress(aRgA, False)
  Next j
End With
rgs.clearContents(1023) REM To clear all content
End Sub

and I’m trying to combine the two into one so both functions will be accomplished at once, any idea how I should combine the two?

Sub demo()
    doc = ThisComponent
    sheets = doc.Sheets
    rgs = doc.createInstance("com.sun.star.sheet.SheetCellRanges")
    Dim aRgA As New com.sun.star.table.CellRangeAddress
    With aRgA
         .StartColumn = 2
         .EndColumn = 22
         .StartRow = 1
         .EndRow = 1298
         For j = 0 To 22
             .sheet = j
             rgs.addRangeAddress(aRgA, False)
             sheets.getbyindex(j).TabColor = -1
         Next j
    End With
    rgs.clearContents(1023) REM To clear all content
End Sub