sfx2/source/doc/docmacromode.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
New commits: commit 7842c935e056c243e87856b93714b0f38eddab2c Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Mon Nov 6 21:32:01 2023 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Tue Nov 7 05:22:05 2023 +0100 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.kagan...@collabora.com> 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 ) ) {