summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-10-21 07:01:53 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-10-21 08:38:41 +0200
commitc078e432903bfdcabed6ae86d585aeae82716cd1 (patch)
treefa19b62893ab876279e975eb15a5d85d13071d19
parent3e2268d46f1a716e91a1c81774622028bc8e3d70 (diff)
V519 The 'o_rKeyLength' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1276, 1279. V519 The 'o_rRC4KeyLength' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1277, 1280. Change-Id: I1dc4ba9097996201d97ef323113ed0b11f3cb913 Reviewed-on: https://gerrit.libreoffice.org/62120 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 1cd4f81993c5..1572248e8263 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -1253,17 +1253,14 @@ sal_Int32 PDFWriterImpl::computeAccessPermissions( const vcl::PDFWriter::PDFEncr
according to the table 3.15, pdf v 1.4 */
sal_Int32 nAccessPermissions = 0xfffff0c0;
- /* check permissions for 40 bit security case */
+ o_rKeyLength = SECUR_128BIT_KEY;
+ o_rRC4KeyLength = 16; // for this value see PDF spec v 1.4, algorithm 3.1 step 4, where n is 16,
+ // thus maximum permitted value is 16
+
nAccessPermissions |= ( i_rProperties.CanPrintTheDocument ) ? 1 << 2 : 0;
nAccessPermissions |= ( i_rProperties.CanModifyTheContent ) ? 1 << 3 : 0;
nAccessPermissions |= ( i_rProperties.CanCopyOrExtract ) ? 1 << 4 : 0;
nAccessPermissions |= ( i_rProperties.CanAddOrModify ) ? 1 << 5 : 0;
- o_rKeyLength = SECUR_40BIT_KEY;
- o_rRC4KeyLength = SECUR_40BIT_KEY+5; // for this value see PDF spec v 1.4, algorithm 3.1 step 4, where n is 5
-
- o_rKeyLength = SECUR_128BIT_KEY;
- o_rRC4KeyLength = 16; // for this value see PDF spec v 1.4, algorithm 3.1 step 4, where n is 16, thus maximum
- // permitted value is 16
nAccessPermissions |= ( i_rProperties.CanFillInteractive ) ? 1 << 8 : 0;
nAccessPermissions |= ( i_rProperties.CanExtractForAccessibility ) ? 1 << 9 : 0;
nAccessPermissions |= ( i_rProperties.CanAssemble ) ? 1 << 10 : 0;