How do i write a macro that will increase / decrease font size within a cell in Calc?

How do i write a macro that will increase / decrease font size within a cell in Calc?

EDIT ebot: yelling off

Could you please explain what Get SUM result depending on filter result in calc got to do with (yelling) HOW DO i WRITE A MACRO THAT WILL INCREASE / DECREASE FONT SIZE WITHIN A CELL IN CALC?

changed summary

The “within” is doubtable. The font size (.CharHeight) is generally set for a CellStyle or by direct formatting for a cell or cell range. To set it inside (within) a cell for textportions requires to describe these portions.
I read “for” in place of “within”.

Concerning cell attributes: The relevant question is, how to pass the SheetCell (or SheetCellRange) on which to operate, to the “macro”. This done, it’s easy: SCR.CharHeight = yourNewValue (in points).
(SCR being the SheetCellRange object, probably a single cell.)

===Edit 2019-12-28 about 14:40UTC===
For those wanting to do it for the CurrentSelection which may be a multirange selection I want to add that the selection object ScCellRangesObj (Regard the plural!) also supports the service “” and therefore gives setting acces to .CharHeight “and everything”. You don’t need to roam the single ranges.
===End Edit===

Concerning the sum applied to filtered ranges: =SUBTOTAL(109;yourRangeReference) (see help).
Not wrong, but no longer subsumable under the edited question.

Thanks for your assistance, my apologies for shouting and posting in the wrong place!
How do I get the character height from the active cell?

The “active cell” seems to be something often used in Excel-VBA.
In cases where there is selected exactly one cell (whether highlighted or not) get something alike as the documents current selection (ThisComponent.CurrentSelection). In cases where a range is selected (or multiple ranges) exactly one cell has the keyboard focus (or is prepared to get it if a non-cell object gives it back). To get this cell requires slightly obscure means - or trusting in Option VBAsupport 1 which is a bit more than just experimental. Under this option ActiveCell.CellRange.CharHeight should return what you want.
Please ask a new question for more details.