diff options
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 23 | ||||
-rw-r--r-- | sj2/source/jscpp/sjapplet_impl.cxx | 37 |
2 files changed, 26 insertions, 34 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index bde93eb4cf..6944acaf2d 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -101,6 +101,13 @@ #include <uielement/menubarmerger.hxx> #include <dispatch/uieventloghelper.hxx> +#ifdef WNT +#include <tools/prewin.h> +#include <windows.h> +#include <tools/postwin.h> +#endif +#include <vcl/sysdata.hxx> + //_________________________________________________________________________________________________________________ // namespace //_________________________________________________________________________________________________________________ @@ -135,12 +142,6 @@ const sal_Int32 LEN_DESCRIPTOR_DISPATCHPROVIDER = 16; const sal_uInt16 ADDONMENU_MERGE_ITEMID_START = 1500; -struct SystemMenuData -{ - unsigned long nSize; // size in bytes of this structure - long aMenu; // ??? -}; - class StringLength : public ::cppu::WeakImplHelper1< ::com::sun::star::util::XStringWidth > { public: @@ -463,14 +464,18 @@ Any SAL_CALL MenuBarManager::getMenuHandle( const ::com::sun::star::uno::Sequenc aSystemMenuData.nSize = sizeof( SystemMenuData ); m_pVCLMenu->GetSystemMenuData( &aSystemMenuData ); -#ifdef UNX - if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_XWINDOW ) +#ifdef QUARTZ + if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_MAC ) { } #elif (defined WNT) if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_WIN32 ) { - a <<= aSystemMenuData.aMenu; + a <<= (long) aSystemMenuData.hMenu; + } +#elif (defined UNX) + if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_XWINDOW ) + { } #endif } diff --git a/sj2/source/jscpp/sjapplet_impl.cxx b/sj2/source/jscpp/sjapplet_impl.cxx index ee2ee6f45e..31a419e154 100644 --- a/sj2/source/jscpp/sjapplet_impl.cxx +++ b/sj2/source/jscpp/sjapplet_impl.cxx @@ -30,10 +30,18 @@ #include "sjapplet_impl.hxx" -#ifndef OS2 -#define HWND int -#define HMENU int -#define HDC int +#ifdef WNT +#include <tools/prewin.h> +#include <windows.h> +#include <tools/postwin.h> +#elif (defined QUARTZ) +#include "premac.h" +#include <Cocoa/Cocoa.h> +#include "postmac.h" +#elif (defined UNX) +#include <tools/prex.h> +#include "X11/Xlib.h" +#include <tools/postx.h> #endif #include "rtl/ustring.hxx" @@ -45,12 +53,6 @@ #include <svtools/ownlist.hxx> -#ifdef QUARTZ -#include "premac.h" -#include <Cocoa/Cocoa.h> -#include "postmac.h" -#endif - #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <vcl/wrkwin.hxx> @@ -61,21 +63,6 @@ #include "com/sun/star/uno/XComponentContext.hpp" #include "jvmaccess/classpath.hxx" -#if defined(UNX) && !defined(QUARTZ) -#define Time xlib_time -#define Window xlib_window -#define Font xlib_font -#define Cursor xlib_cursor -#define KeyCode xlib_keycode - -#include "X11/Xlib.h" -#undef Time -#undef Window -#undef Font -#undef Cursor -#undef KeyCode -#endif - using namespace ::rtl; using namespace ::osl; #ifdef SOLAR_JAVA |