sfx2/source/doc/objstor.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit eb3756d45a9cffaf3a7dc4d06113adf43df201f5 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Fri Feb 28 20:25:36 2025 +0100 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Mon Mar 3 15:26:18 2025 +0100 tdf#165115 sfx2: fix storing wholesome encrypted ODF templates Oops, hard-coded SetupStorage(bTemplate=false) which caused wrong MediaType on the root folder and: ManifestExport.cxx:131: ManifestExport::ManifestExport(): Assertion `aDocMediaType.isEmpty() || aDocMediaType == aMediaType' failed. (regression from commit 3b347664b26d58d44f685a607a5e6d10dff89cd4) Change-Id: Ia65ba39e8a853f47d0d58acdca90fd6e12b7cd7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182372 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Jenkins (cherry picked from commit 0be897258beadc77ad2fa129f12ccbdb5c956e93) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182429 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 313b4a0afd7c..18e268ff1462 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -1766,7 +1766,8 @@ bool SfxObjectShell::SaveTo_Impl assert(xOuterStorage.is()); assert(!rMedium.GetErrorCode()); // the outer storage needs the same properties as the inner one - SetupStorage(xOuterStorage, SOFFICE_FILEFORMAT_CURRENT, false); + bool const isTemplate{rMedium.GetFilter()->IsOwnTemplateFormat()}; + SetupStorage(xOuterStorage, SOFFICE_FILEFORMAT_CURRENT, isTemplate); uno::Reference<io::XStream> const xEncryptedInnerPackage = xOuterStorage->openStreamElement(