[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - uui/source

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 8 15:50:23 UTC 2021


 uui/source/secmacrowarnings.cxx |   16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

New commits:
commit 5f4ab8e319fdfef708b4500616d31355a4d444c0
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Fri Mar 5 06:45:45 2021 -0400
Commit:     Jan Holesovsky <kendy at 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 <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at 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)


More information about the Libreoffice-commits mailing list