summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-03-05 06:45:45 -0400
committerHenry Castro <hcastro@collabora.com>2021-04-07 16:44:04 +0200
commitbcecb778172f043239d07bb52dd5a6503ede1570 (patch)
treebfad35e394583f192293dd7c902b3352499f24ad /uui
parentc89bfbc0d6491c02acfc391372750f787c17531b (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113688 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'uui')
-rw-r--r--uui/source/secmacrowarnings.cxx18
1 files changed, 5 insertions, 13 deletions
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)