Kaydet (Commit) 36baf31d authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Michael Stahl

fdo#42155: Replace the only use of CAutoUnicodeBuffer part1

Change-Id: Id6ea78148b7689199540407518f6bcb25af4450d
Reviewed-on: https://gerrit.libreoffice.org/5713Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 267ddb1c
...@@ -109,17 +109,17 @@ OUString SAL_CALL ListboxGetString( HWND hwnd, sal_Int32 aPosition ) ...@@ -109,17 +109,17 @@ OUString SAL_CALL ListboxGetString( HWND hwnd, sal_Int32 aPosition )
// without trailing '\0' that's why += 1 // without trailing '\0' that's why += 1
lItem++; lItem++;
CAutoUnicodeBuffer aBuff( lItem ); std::vector<sal_Unicode> vec(lItem);
LRESULT lRet = LRESULT lRet =
SendMessageW( SendMessageW(
hwnd, CB_GETLBTEXT, aPosition, hwnd, CB_GETLBTEXT, aPosition,
reinterpret_cast<LPARAM>(&aBuff) ); reinterpret_cast<LPARAM>(&vec[0]));
OSL_ASSERT( lRet != CB_ERR ); OSL_ASSERT( lRet != CB_ERR );
if ( CB_ERR != lRet ) if ( CB_ERR != lRet )
aString = OUString( aBuff, lRet ); aString = OUString(&vec[0], lRet);
} }
return aString; return aString;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment