summaryrefslogtreecommitdiffstats
path: root/sfx2/source/doc/docfile.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:30 +0000
commita2baea7faff31d26459dab3668a39eae85e4991b (patch)
treeeaa2048ce9c715481f932dcfe20368e252b77d2f /sfx2/source/doc/docfile.cxx
parentAdding upstream version 4:24.2.0. (diff)
downloadlibreoffice-upstream/4%24.2.1.tar.xz
libreoffice-upstream/4%24.2.1.zip
Adding upstream version 4:24.2.1.upstream/4%24.2.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sfx2/source/doc/docfile.cxx')
-rw-r--r--sfx2/source/doc/docfile.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 422fa98ac3..c961733d85 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1980,10 +1980,13 @@ uno::Reference<embed::XStorage> SfxMedium::GetScriptingStorageToSign_Impl()
SAL_WARN_IF(!pImpl->m_xODFDecryptedInnerPackageStream.is(), "sfx.doc", "no inner package stream?");
if (pImpl->m_xODFDecryptedInnerPackageStream.is())
{
+ const SfxBoolItem* pRepairItem = GetItemSet().GetItem(SID_REPAIRPACKAGE, false);
+ const bool bRepairPackage = pRepairItem && pRepairItem->GetValue();
pImpl->m_xODFDecryptedInnerZipStorage =
::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(
ZIP_STORAGE_FORMAT_STRING,
- pImpl->m_xODFDecryptedInnerPackageStream->getInputStream());
+ pImpl->m_xODFDecryptedInnerPackageStream->getInputStream(), {},
+ bRepairPackage);
}
}
return pImpl->m_xODFDecryptedInnerZipStorage;
@@ -2004,15 +2007,21 @@ uno::Reference< embed::XStorage > const & SfxMedium::GetZipStorageToSign_Impl( b
try
{
+ const SfxBoolItem* pRepairItem = GetItemSet().GetItem(SID_REPAIRPACKAGE, false);
+ const bool bRepairPackage = pRepairItem && pRepairItem->GetValue();
// we can not sign document if there is no stream
// should it be possible at all?
if ( !bReadOnly && pImpl->xStream.is() )
{
- pImpl->m_xZipStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromStream( ZIP_STORAGE_FORMAT_STRING, pImpl->xStream );
+ pImpl->m_xZipStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromStream(
+ ZIP_STORAGE_FORMAT_STRING, pImpl->xStream, css::embed::ElementModes::READWRITE,
+ {}, bRepairPackage);
}
else if ( pImpl->xInputStream.is() )
{
- pImpl->m_xZipStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream( ZIP_STORAGE_FORMAT_STRING, pImpl->xInputStream );
+ pImpl->m_xZipStorage
+ = ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(
+ ZIP_STORAGE_FORMAT_STRING, pImpl->xInputStream, {}, bRepairPackage);
}
}
catch( const uno::Exception& )