Correctly indent code with Notepad++
Install Indent by Fold plugin. It works well with XML (or, derivatives) tags.
You can use TextFX plugin to reindent code for you. If you don't have it, you will need to install in from your plugin manager. Once in place > just use the menu "TextFX" > "TextFX Edit" > "Reindent C++ code".
Probably it won't convert a single line, but actual code with miss-indentations will be handled well.
You will find more info and other plugins explained here.