summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-01-02 07:34:56 +0000
committerMike Kaganski <mike.kaganski@collabora.com>2023-12-07 14:07:37 +0300
commitd1a034de8ae1a0bf7823fae1436834377c0acd00 (patch)
treece6ebc836e0200743c7ced81b93ca0d8917826d7
parent1139500fb2563f2bff1d87337cea938926d43cf3 (diff)
Avoid reinterpret_cast
Change-Id: I52b1f3d9fb0a3476ac1649ebc05c71aa8f2ce99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144908 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--sfx2/source/doc/docmacromode.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 82fe8ec1d152..b72e89da2ef4 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -39,6 +39,7 @@
#include <tools/urlobj.hxx>
#if defined(_WIN32)
+#include <o3tl/char16_t2wchar_t.hxx>
#include <officecfg/Office/Common.hxx>
#include <systools/win32/comtools.hxx>
#include <urlmon.h>
@@ -299,7 +300,7 @@ namespace sfx2
pZoneId.CoCreateInstance(CLSID_PersistentZoneIdentifier);
sal::systools::COMReference<IPersistFile> pPersist(pZoneId, sal::systools::COM_QUERY_THROW);
DWORD dwZone;
- if (!SUCCEEDED(pPersist->Load(reinterpret_cast<LPCOLESTR>(sFilePath.getStr()), STGM_READ)) ||
+ if (!SUCCEEDED(pPersist->Load(o3tl::toW(sFilePath.getStr()), STGM_READ)) ||
!SUCCEEDED(pZoneId->GetId(&dwZone)))
{
// no Security Zone info found -> assume a local file, not