Copy formatting from one cell to another

Hi Folks,

I have a macro that iterates over a small range copying the format from each cell in that range to a set of cells in a second range. I don’t know how to address the formatting of the cells:

sub Format

dim sht as object 
dim src as object 
dim dst as object 
dim r,c,f as integer

sht = ThisComponent.CurrentController.ActiveSheet 
src = sht.getCellRangeByName("TLFA") 
dst = sht.getCellRangeByName("TLFR")

for r = LBound( to UBound(
 	for c = LBound( to UBound(
		for f = LBound( to UBound(
 	 	 	if <= then = <== This line is a guess and it is wrong.

    			end if
 			next f
 		next c
 	next r
end sub

Thanks for the help,