summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/excel.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index 79e4c9073627..44fe3b31a0b1 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -185,9 +185,8 @@ ErrCode ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument*
rtl::Reference<SotStorageStream> xDRMStrm = ScfTools::OpenStorageStreamRead(xRootStrg, u"\011DRMContent"_ustr);
if (xDRMStrm.is())
{
- auto pDecryptedStorage = lcl_DRMDecrypt(rMedium, xRootStrg, aNewStorageStrm);
- if (pDecryptedStorage)
- xRootStrg = pDecryptedStorage;
+ if (auto xDecryptedStorage = lcl_DRMDecrypt(rMedium, xRootStrg, aNewStorageStrm))
+ xRootStrg = std::move(xDecryptedStorage);
else
{
bUnableToDecryptContent = true;