[Libreoffice-commits] core.git: dtrans/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Mon Apr 1 14:00:29 UTC 2019
dtrans/source/win32/dtobj/FmtFilter.cxx | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
New commits:
commit 538f7d66b17bfde94e5270b9e2b2fb9850e0d65e
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Apr 1 13:48:06 2019 +0100
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Apr 1 16:00:07 2019 +0200
IShellLinkA -> IShellLinkW
Change-Id: If07d7e0d2a3a33f0bcc96352ea40ff83a2f483ed
Reviewed-on: https://gerrit.libreoffice.org/70062
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx
index a38c6204ef25..0b60cb51c109 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.cxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.cxx
@@ -301,9 +301,9 @@ static std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
try
{
- sal::systools::COMReference<IShellLinkA> pIShellLink;
+ sal::systools::COMReference<IShellLinkW> pIShellLink;
HRESULT hr = CoCreateInstance(
- CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast<LPVOID*>(&pIShellLink));
+ CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLinkW, reinterpret_cast<LPVOID*>(&pIShellLink));
if (FAILED(hr))
return target;
@@ -318,14 +318,12 @@ static std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
if (FAILED(hr))
return target;
- char pathA[MAX_PATH];
- WIN32_FIND_DATA wfd;
- hr = pIShellLink->GetPath(pathA, MAX_PATH, &wfd, SLGP_RAWPATH);
+ wchar_t pathW[MAX_PATH];
+ WIN32_FIND_DATAW wfd;
+ hr = pIShellLink->GetPath(pathW, MAX_PATH, &wfd, SLGP_RAWPATH);
if (FAILED(hr))
return target;
- wchar_t pathW[MAX_PATH];
- MultiByteToWideChar(CP_ACP, 0, pathA, -1, pathW, MAX_PATH);
target = pathW;
}
catch(sal::systools::ComError& ex)
More information about the Libreoffice-commits
mailing list