dtrans/source/win32/dtobj/FmtFilter.cxx |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 538f7d66b17bfde94e5270b9e2b2fb9850e0d65e
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Apr 1 13:48:06 2019 +0100
Commit:     Mike Kaganski <mike.kagan...@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.kagan...@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)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to