[settings] add an option to sync msoffice/libreoffice tmp file

__PLEASE NOT MERGE THIS__

* add an option to sync msoffice/libreoffice tmp file
* adjust some odd-styled code
QSettings is the obvious choice for cross platforms.

I will cc you once I refine this code, thanks!