summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2019-11-13 09:19:42 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-12-04 17:19:54 +0100
commit204b7d65f3cee79ec07d911d7d398bf4fc52be67 (patch)
tree62f03d04fe4d770e1b66e0f7c3f96633c7de5c0f
parent97ac37b02a80508a0ef4b35285d768dc06d50767 (diff)
ms doc: pass additional arguments to encryption service
XPackageEncryption mplementation should distingush types of files fo possibility to encrypt them in a different way. So additional parameter is provided to resolve this issue. Change-Id: I3cdff6c6b85f2483138ad5ddba7799fb7bf8be95
-rw-r--r--sc/source/filter/excel/excel.cxx3
-rw-r--r--sd/source/filter/sdpptwrp.cxx3
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx3
3 files changed, 6 insertions, 3 deletions
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index 2e4015e34569..463afe74b90a 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -261,7 +261,8 @@ static ErrCode lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument,
if (sCryptoType.getLength())
{
uno::Reference<uno::XComponentContext> xComponentContext(comphelper::getProcessComponentContext());
- uno::Sequence<uno::Any> aArguments;
+ uno::Sequence<uno::Any> aArguments(1);
+ aArguments[0] = uno::makeAny(beans::NamedValue("Binary", uno::makeAny(true)));
xPackageEncryption.set(
xComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext(
"com.sun.star.comp.oox.crypto." + sCryptoType, aArguments, xComponentContext), uno::UNO_QUERY);
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index f2ec9038c7b1..1678a1f04451 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -268,7 +268,8 @@ bool SdPPTFilter::Export()
if (sCryptoType.getLength())
{
Reference<XComponentContext> xComponentContext(comphelper::getProcessComponentContext());
- Sequence<Any> aArguments;
+ Sequence<Any> aArguments(1);
+ aArguments[0] = makeAny(NamedValue("Binary", makeAny(true)));
xPackageEncryption.set(
xComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext(
"com.sun.star.comp.oox.crypto." + sCryptoType, aArguments, xComponentContext), UNO_QUERY);
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 04f770ea858c..c65fb7298aa3 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3561,7 +3561,8 @@ ErrCode SwWW8Writer::WriteStorage()
if (sCryptoType.getLength())
{
uno::Reference<uno::XComponentContext> xComponentContext(comphelper::getProcessComponentContext());
- uno::Sequence<uno::Any> aArguments;
+ uno::Sequence<uno::Any> aArguments(1);
+ aArguments[0] = uno::makeAny(beans::NamedValue("Binary", uno::makeAny(true)));
xPackageEncryption.set(
xComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext(
"com.sun.star.comp.oox.crypto." + sCryptoType, aArguments, xComponentContext), uno::UNO_QUERY);