How to decrypt an encrypted docx file using LibreOffice SDK for C++?

Hi all,

I am a developer working with a lot of MS Office files. I have a with encrypted docx file and want to decrypt it (i know the password) and save to another file (without a password). When i open this encrypted file by Libre UI (i install version 5.0), it asked me to enter password. When password is given, Libre can decrypt that file and show the content. Howerver, when I try to use soffice.exe to decrypt that file by command line, I cannot find any option that support decrypt for docx.
So i downloaded Libre SDK (version 5.0.4) and try to use it to decrypt that file. However I don’t know how to use your SDK to do that job.
Can you give me some sample code in C++ using your SDK to decrypt an encrypted docx file?

I’m looking forward to hearing from you
Thank you so much