Tools/Options.../Editor/Language/(Language Delphi)/Block Indent --> 4, Save;
Select a piece of code (the finished fragment), press Ctrl+D;
If the formatter didn't work, transfer the piece of code to another page of the editor and repeat formatting there.
PS: Additional formatting options:
Tools/Options.../Language/Formatter/Delphi