Created attachment 200338 [details] Sample DOCX Open DOCX in LO, MSO, see it can be edited. In LO save and reopen in MSO See that saved DOCX is restricted in MSO, for example comment cannot be inserted.
Resolved in master 25.8+ with https://gerrit.libreoffice.org/c/core/+/184042
Regression from 6.0: http://cgit.freedesktop.org/libreoffice/core/commit/?id=2694162969cf86ef366d3ce812fccd0630acc800 author Serge Krot <Serge.Krot@cib.de> 2017-09-29 18:01:54 +0200 committer Thorsten Behrens <Thorsten.Behrens@CIB.de> 2017-10-06 08:06:59 +0200 commit 2694162969cf86ef366d3ce812fccd0630acc800 (patch) tdf#66398 Import/export docx document protection properties Added: + import/export of all doc protection properties + unit test If there is the line: <w:documentProtection w:edit="forms" w:enforcement="0"/> the export make it: <w:documentProtection w:edit="forms" w:cryptProviderType="rsaAES" w:cryptAlgorithmClass="hash" w:cryptAlgorithmType="typeAny" w:cryptAlgorithmSid="" w:cryptSpinCount="0" w:hash="" w:salt=""/> So this rather seems as implementationError.
Resolved in master 25.8+ with https://gerrit.libreoffice.org/c/core/+/184042 Adding also the commit for future search: 29c7e73d132154ef7e83b15f6ff39938fb927fe5 sw: always export enforcement attribute of documentProtection otherwise: (in word/settings.xml) - if a docx document has w:enforcement="0", LO will not import it. Hence, LO will not export it, too. - this will cause a lack of enforcement attr. - which will make the docx "protected" after export from LO - in MSO Word. Therefore, we have to import enforcement attr. even if it's value is "0".
Bayram Çiçek committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/89fdd81f17ac24b007bda26ce5176a5b2f65b1d7 tdf#166173: add a unittest for enforcement attribute It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
also ported to libreoffice-25-2 : https://gerrit.libreoffice.org/c/core/+/184205
Bayram Çiçek committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/7f871c4ce43a85dc3296c81453cbf828b09352a5 tdf#166173: add a unittest for enforcement attribute It will be available in 25.2.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.