summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-03-06 16:36:04 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-03-06 20:54:34 +0100
commit7200b461e311ec16c683ac9e9f3ff9e444e8593b (patch)
tree1664d693b6194741684375d1a8e398ea35c621d8 /sc/source/filter/excel
parentf7ea15720d4aaeb4c79c279da0f679d91c660a74 (diff)
Simplify Sequence construction
Change-Id: I52ea31734f7765176e20514c5d02cb3ee5928cdb Reviewed-on: https://gerrit.libreoffice.org/68812 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/source/filter/excel')
-rw-r--r--sc/source/filter/excel/xicontent.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index b34c6b5071aa..9dec16f865c2 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -1299,9 +1299,7 @@ void XclImpDocProtectBuffer::Apply() const
if (mnPassHash)
{
// 16-bit password hash.
- Sequence<sal_Int8> aPass(2);
- aPass[0] = (mnPassHash >> 8) & 0xFF;
- aPass[1] = mnPassHash & 0xFF;
+ Sequence<sal_Int8> aPass{sal_Int8(mnPassHash >> 8), sal_Int8(mnPassHash & 0xFF)};
pProtect->setPasswordHash(aPass, PASSHASH_XL);
}
@@ -1395,9 +1393,7 @@ void XclImpSheetProtectBuffer::Apply() const
const sal_uInt16 nHash = rSheet.mnPasswordHash;
if (nHash)
{
- Sequence<sal_Int8> aPass(2);
- aPass[0] = (nHash >> 8) & 0xFF;
- aPass[1] = nHash & 0xFF;
+ Sequence<sal_Int8> aPass{sal_Int8(nHash >> 8), sal_Int8(nHash & 0xFF)};
pProtect->setPasswordHash(aPass, PASSHASH_XL);
}