diff options
author | skswales <stuart.swales.croftnuisk@gmail.com> | 2016-06-20 18:53:58 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-06-22 19:52:27 +0000 |
commit | 6a17c118f312699ab26147148cd2e7844c41a777 (patch) | |
tree | 41cfa79d2ed2a104af844689e12207e2fcfd0f95 /fpicker/source/win32/filepicker/PreviewCtrl.cxx | |
parent | dd3e8ad79d5a9757c9a0ed2b0fe82f3bb00dbba4 (diff) |
Work towards tdf#72606 EasyHack _tstring/TCHAR elimination
fpicker module TCHAR elimination and A/W clarity
NB fpicker was already being compiled as UNICODE
Use SendMessageW() as appropriate for clarity
Use SAL_N_ELEMENTS for buffer capacity (number of WCHAR) when retrieving class name
Change-Id: Ie6d0b1df1b9a2fb18f4cdfc51e5d4c3c55c9ca17
Reviewed-on: https://gerrit.libreoffice.org/26526
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'fpicker/source/win32/filepicker/PreviewCtrl.cxx')
-rw-r--r-- | fpicker/source/win32/filepicker/PreviewCtrl.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fpicker/source/win32/filepicker/PreviewCtrl.cxx b/fpicker/source/win32/filepicker/PreviewCtrl.cxx index 0fbb50cbd91f..a8ffc837b776 100644 --- a/fpicker/source/win32/filepicker/PreviewCtrl.cxx +++ b/fpicker/source/win32/filepicker/PreviewCtrl.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <tchar.h> #include "PreviewCtrl.hxx" #include <osl/diagnose.h> @@ -31,7 +30,7 @@ #include <ocidl.h> #include <olectl.h> -#define PREVIEWWND_CLASS_NAME TEXT("PreviewWnd###") +#define PREVIEWWND_CLASS_NAME L"PreviewWnd###" #define HIMETRIC_INCH 2540 @@ -235,16 +234,16 @@ CFilePreview::CFilePreview( // if the dll is unloaded // Win2000 - the window class must be unregistered manually // if the dll is unloaded - m_atomPrevWndClass = RegisterClassEx(&wndClsEx); + m_atomPrevWndClass = RegisterClassExW(&wndClsEx); if ( !m_atomPrevWndClass ) throw CPreviewException( ); // create the preview window in invisible state sal_uInt32 dwStyle = bShow ? (WS_CHILD | WS_VISIBLE) : WS_CHILD; - m_hwnd = CreateWindowEx( + m_hwnd = CreateWindowExW( WS_EX_CLIENTEDGE, PREVIEWWND_CLASS_NAME, - TEXT(""), + L"", dwStyle, ulCorner.x, ulCorner.y, @@ -263,8 +262,8 @@ CFilePreview::CFilePreview( CFilePreview::~CFilePreview( ) { // unregister preview window class - sal_Bool bRet = UnregisterClass( - (LPCTSTR)(DWORD_PTR)MAKELONG( m_atomPrevWndClass, 0 ), + sal_Bool bRet = UnregisterClassW( + (PCWSTR)(DWORD_PTR)MAKELONG( m_atomPrevWndClass, 0 ), m_hInstance ); SAL_WARN_IF( !bRet, "fpicker", "Unregister preview window class failed" ); } @@ -469,7 +468,7 @@ sal_Bool CFilePreview::loadFile( const OUString& aFileName ) sal_uInt32 fszExtra; sal_uInt32 fsize; - hFile = CreateFile( + hFile = CreateFileW( aFileName.getStr( ), GENERIC_READ, 0, |