uui/source/secmacrowarnings.cxx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
New commits: commit 5f4ab8e319fdfef708b4500616d31355a4d444c0 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Fri Mar 5 06:45:45 2021 -0400 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Mon Mar 8 16:49:47 2021 +0100 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> diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index c1f99f3c01d9..be647c8cf509 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -21,11 +21,9 @@ #include <com/sun/star/lang/XMultiServiceFactory.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> -#include <osl/file.h> #include <sal/macros.h> #include <tools/debug.hxx> #include <tools/urlobj.hxx> @@ -92,15 +90,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