summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-03-05 06:45:45 -0400
committerJan Holesovsky <kendy@collabora.com>2021-03-08 16:49:47 +0100
commit5f4ab8e319fdfef708b4500616d31355a4d444c0 (patch)
tree4de34e5afb6a9bc002181495ca240ba8a1c86d21
parent7c0838b60b62760e46a81bdd010d8d94536232d7 (diff)
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@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--uui/source/secmacrowarnings.cxx16
1 files changed, 5 insertions, 11 deletions
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)