Currently the VBA export is developed in the feature/vba-export branch. However the current export is quite limited and we only support normal code modules and the basic VBA structure. This task would be about implementing the password protection for the VBA export. The related part in the VBA specification (https://msdn.microsoft.com/en-us/library/office/cc313094%28v=office.12%29.aspx) is section 2.4.3. The current export code is in oox/source/ole/vbaexport.cxx
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyInteresting SkillCpp) [NinjaEdit]
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit]
(In reply to Markus Mohrhard from comment #0) > Currently the VBA export is developed in the feature/vba-export branch. > However the current export is quite limited and we only support normal code > modules and the basic VBA structure. > > This task would be about implementing the password protection for the VBA > export. The related part in the VBA specification > (https://msdn.microsoft.com/en-us/library/office/cc313094%28v=office.12%29. > aspx) is section 2.4.3. > > The current export code is in oox/source/ole/vbaexport.cxx Can you please give little more idea on this
Could someone update the requirements for this hack and maybe explain a little bit more for what needs to be done
(In reply to Markus Mohrhard from comment #0) > Currently the VBA export is developed in the feature/vba-export branch. > However the current export is quite limited and we only support normal code > modules and the basic VBA structure. > > This task would be about implementing the password protection for the VBA > export. The related part in the VBA specification > (https://msdn.microsoft.com/en-us/library/office/cc313094%28v=office.12%29. > aspx) is section 2.4.3. > > The current export code is in oox/source/ole/vbaexport.cxx Hi Markus, I want to work on this issue. I had few questions, do we have the frontend which allows to specify the password for the encryption. According to me the only changes required would be to encrypt the password hash and implementing the frontend if not present. Thanks!
(In reply to Ujjawal Kumar from comment #5) > (In reply to Markus Mohrhard from comment #0) > > Currently the VBA export is developed in the feature/vba-export branch. > > However the current export is quite limited and we only support normal code > > modules and the basic VBA structure. > > > > This task would be about implementing the password protection for the VBA > > export. The related part in the VBA specification > > (https://msdn.microsoft.com/en-us/library/office/cc313094%28v=office.12%29. > > aspx) is section 2.4.3. > > > > The current export code is in oox/source/ole/vbaexport.cxx > > Hi Markus, I want to work on this issue. I had few questions, do we have the > frontend which allows to specify the password for the encryption. According > to me the only changes required would be to encrypt the password hash and > implementing the frontend if not present. Thanks! Recent examples of work in password dialogs: https://gerrit.libreoffice.org/c/core/+/182693 https://gerrit.libreoffice.org/c/core/+/182694 Not sure, if they can be reused here, but at least it should help you in researching.
Hi, I’m a GSoC 2025 applicant who would like to work on this EasyHack. I’m currently setting up the development environment and will begin investigating the export flow for VBA macros. If this bug is still available, please assign it to me. Thanks!
(In reply to Parth Gadekar from comment #7) > Hi, I’m a GSoC 2025 applicant who would like to work on this EasyHack. I’m > currently setting up the development environment and will begin > investigating the export flow for VBA macros. If this bug is still > available, please assign it to me. Thanks! Per comment 5, Ujjawal is working on this, although no patch has been submitted yet.
Created attachment 200290 [details] - Generates ProjKey from the VBA project GUID - Encrypts the CMG, DPB, and GC values per the MS VBA specification (section 2.4.3) - Removes static/fake protection values and applies real encryption Patch for tdf#93488 - Implements password protection in VBA export using the existing VBAEncryption class. - Replaces hardcoded CMG, DPB, GC values with encrypted values generated at export time. - Uses ProjKey derived from GUID to seed encryption. - Makes password protection export-compliant per spec section 2.4.3.
(In reply to Buovjaga from comment #8) > (In reply to Parth Gadekar from comment #7) > > Hi, I’m a GSoC 2025 applicant who would like to work on this EasyHack. I’m > > currently setting up the development environment and will begin > > investigating the export flow for VBA macros. If this bug is still > > available, please assign it to me. Thanks! > > Per comment 5, Ujjawal is working on this, although no patch has been > submitted yet. Hi Buovjaga, I've uploaded a patch at https://gerrit.libreoffice.org/c/core/+/184086. Could you review it or assign appropriate reviewers. Thank you!