sfx2/source/doc/docmacromode.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 672e519556c72cc376a1bdf1c2e6788509c6f348 Author: Mike Kaganski <[email protected]> AuthorDate: Mon Jan 2 07:34:56 2023 +0000 Commit: Mike Kaganski <[email protected]> CommitDate: Mon Jan 2 11:07:18 2023 +0000 Avoid reinterpret_cast Change-Id: I52b1f3d9fb0a3476ac1649ebc05c71aa8f2ce99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144908 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx index 44be05a06841..c2ec2fd8e417 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
