如何在Libre office命令中查找文件是否受密码保护?

I was working to convert some documents into PDF and I used libre office 4.0 for this, the command I used for this is,

"E:\LibreOffice 4.0\program\soffice.exe\" --convert-to pdf inputfile.xlxs --outdir PDFs/outputfile.pdf --headless

the above command works for the document like xlsx but when the document is password protected and password is unknown, it does not work. I would like to know before run this command that the input document is password protected?

can any one help me out...