summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-11-06 21:32:01 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-11-07 05:22:05 +0100
commit7842c935e056c243e87856b93714b0f38eddab2c (patch)
tree18791430b73f3db7c5962fd31a497bcd9ad73e7f /sfx2
parent0bf60e32c0ac2bf79fad6c29c39c6f6a3f9ce8e8 (diff)
Simplify a bit
XDocumentDigitalSignatures::isLocationTrusted would remove segments itself, as needed; this change not only simplifies this code, but also potentially allows to define not only trusted directories, but also individuals trusted files (if the UI would be adjusted). Change-Id: I0b0d60946d84a52479fcce5ce49d368cf53283fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159009 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docmacromode.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 283b7cd49bd2..e25e97505181 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -173,9 +173,7 @@ namespace sfx2
Reference< XDocumentDigitalSignatures > xSignatures(DocumentDigitalSignatures::createDefault(::comphelper::getProcessComponentContext()));
INetURLObject aURLReferer(sURL);
- OUString aLocation;
- if ( aURLReferer.removeSegment() )
- aLocation = aURLReferer.GetMainURL( INetURLObject::DecodeMechanism::NONE );
+ OUString aLocation = aURLReferer.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( !aLocation.isEmpty() && xSignatures->isLocationTrusted( aLocation ) )
{