uui/source/secmacrowarnings.cxx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
New commits: commit bcecb778172f043239d07bb52dd5a6503ede1570 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Fri Mar 5 06:45:45 2021 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Wed Apr 7 16:44:04 2021 +0200 lok: show only the filename of the Macro Security dialog Apply the patch for desktop case too. Change-Id: Ia4cf6d2cefd0e02e11e48ca017f8af9f81600b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112003 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Jan Holesovsky <ke...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113688 Tested-by: Jenkins Reviewed-by: Henry Castro <hcas...@collabora.com> diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 932c4723ab21..7c853cf2f8e0 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -19,8 +19,6 @@ #include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp> #include <com/sun/star/security/DocumentDigitalSignatures.hpp> -#include <comphelper/documentconstants.hxx> -#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <vcl/svapp.hxx> #include <osl/file.hxx> @@ -29,8 +27,6 @@ #include <tools/debug.hxx> #include <unotools/securityoptions.hxx> #include <tools/urlobj.hxx> -#include <unotools/resmgr.hxx> -#include <com/sun/star/security/NoPasswordException.hpp> using namespace ::com::sun::star::security; @@ -92,15 +88,11 @@ IMPL_STATIC_LINK_NOARG(MacroWarning, InstallLOKNotifierHdl, void*, vcl::ILibreOf void MacroWarning::SetDocumentURL( const OUString& rDocURL ) { - OUString aAbbreviatedPath; - if (comphelper::LibreOfficeKit::isActive()) - { - osl::FileBase::getFileURLFromSystemPath(rDocURL, aAbbreviatedPath); - aAbbreviatedPath = INetURLObject(aAbbreviatedPath).GetLastName(); - } - else - osl_abbreviateSystemPath(rDocURL.pData, &aAbbreviatedPath.pData, 50, nullptr); - m_xDialog->set_primary_text(aAbbreviatedPath); + OUString aPath; + + osl::FileBase::getFileURLFromSystemPath(rDocURL, aPath); + aPath = INetURLObject(aPath).GetLastName(); + m_xDialog->set_primary_text(aPath); } IMPL_LINK_NOARG(MacroWarning, ViewSignsBtnHdl, weld::Button&, void) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits