sfx2/source/doc/objstor.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 65c2c9d96fa192d9fdee590bb35199a4c949247a Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Fri Feb 28 20:25:36 2025 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Mar 3 14:19:47 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/+/182428 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 42f496fe53d6..5487fc0f2156 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2073,7 +2073,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(