[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
it will be done tomorrow