[Libreoffice-commits] core.git: embedserv/source framework/source

Stephan Bergmann sbergman at redhat.com
Wed Nov 18 13:11:28 PST 2015


 embedserv/source/embed/docholder.cxx          |    2 +-
 framework/source/uielement/menubarmanager.cxx |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit f08d0142afbcb45c12604988022bb3da18be1d84
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 18 17:01:13 2015 +0100

    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/20045
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx
index e373986..a88b1ba 100644
--- a/embedserv/source/embed/docholder.cxx
+++ b/embedserv/source/embed/docholder.cxx
@@ -377,7 +377,7 @@ HRESULT DocumentHolder::InPlaceActivate(
                     uno::UNO_QUERY);
                 aAny = xSDMP->getMenuHandle(
                     aProcessIdent,lang::SystemDependent::SYSTEM_WIN32);
-                sal_Int32 tmp;
+                sal_Int64 tmp;
                 if( aAny >>= tmp )
                     m_nMenuHandle = HMENU(tmp);
                 m_xLayoutManager->hideElement(
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 3f44ebe..5f2b85a 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -210,7 +210,8 @@ Any SAL_CALL MenuBarManager::getMenuHandle( const Sequence< sal_Int8 >& /*Proces
 #ifdef _WIN32
         if( SystemType == SystemDependent::SYSTEM_WIN32 )
         {
-            a <<= (long) aSystemMenuData.hMenu;
+            a <<= sal_Int64(
+                reinterpret_cast<sal_IntPtr>(aSystemMenuData.hMenu));
         }
 #else
         (void) SystemType;


More information about the Libreoffice-commits mailing list