[file view] handled 'file size is 0' for odf; cleaned up code for text/md