Writer: Apply Formula on Mail Merge Field

I have a Mail Merge database file which contains a numeric field Stars.
Dependent of the number, I’d like to print as many characters.

Example: The field Stars contains the number 5 => in the document the string ***** should be inserted.