Kaydet (Commit) f08d0142 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix css.awt.XSystemDependentMenuPeer.getMenuHandle

...to return an ANY containing a 64-bit HYPER instead of a 32-bit LONG for
SYSTEM_WIN32 (which covers both 32-bit and 64-bit versions of Windows), so that
the HMENU value (which is effectively a void*) is not truncated for the 64-bit
build.

This should effectively be URE ABI compatible for the 32-bit build, as there the
HYPER value will fit into 32 bits, so extracting a LONG from the ANY should
still work.

Change-Id: Ief3de5924f672e8f6bbe6df08c15439456ca036f
Reviewed-on: https://gerrit.libreoffice.org/20045Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst f1132fd5
...@@ -377,7 +377,7 @@ HRESULT DocumentHolder::InPlaceActivate( ...@@ -377,7 +377,7 @@ HRESULT DocumentHolder::InPlaceActivate(
uno::UNO_QUERY); uno::UNO_QUERY);
aAny = xSDMP->getMenuHandle( aAny = xSDMP->getMenuHandle(
aProcessIdent,lang::SystemDependent::SYSTEM_WIN32); aProcessIdent,lang::SystemDependent::SYSTEM_WIN32);
sal_Int32 tmp; sal_Int64 tmp;
if( aAny >>= tmp ) if( aAny >>= tmp )
m_nMenuHandle = HMENU(tmp); m_nMenuHandle = HMENU(tmp);
m_xLayoutManager->hideElement( m_xLayoutManager->hideElement(
......
...@@ -210,7 +210,8 @@ Any SAL_CALL MenuBarManager::getMenuHandle( const Sequence< sal_Int8 >& /*Proces ...@@ -210,7 +210,8 @@ Any SAL_CALL MenuBarManager::getMenuHandle( const Sequence< sal_Int8 >& /*Proces
#ifdef _WIN32 #ifdef _WIN32
if( SystemType == SystemDependent::SYSTEM_WIN32 ) if( SystemType == SystemDependent::SYSTEM_WIN32 )
{ {
a <<= (long) aSystemMenuData.hMenu; a <<= sal_Int64(
reinterpret_cast<sal_IntPtr>(aSystemMenuData.hMenu));
} }
#else #else
(void) SystemType; (void) SystemType;
......
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