summaryrefslogtreecommitdiff
path: root/extensions/source/plugin/base
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-01-09 18:47:31 +0100
committerMichael Stahl <mstahl@redhat.com>2012-01-09 18:53:18 +0100
commit8f468159691f051ea2fa5d28486b989ecc75d69a (patch)
tree36c34981cfc63f458383e68506bbd89fbbe01a73 /extensions/source/plugin/base
parentce123a5c6fedb7343428033d1cd82d97aa2cef34 (diff)
extensions: plugin: try to fix Mac build:
Move everything that requires ObjectiveC stuff to the ObjC++ files in the aqua subdirectory, where it belongs.
Diffstat (limited to 'extensions/source/plugin/base')
-rw-r--r--extensions/source/plugin/base/nfuncs.cxx31
-rw-r--r--extensions/source/plugin/base/xplugin.cxx4
2 files changed, 6 insertions, 29 deletions
diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx
index d06c5b808927..69b73f52df0d 100644
--- a/extensions/source/plugin/base/nfuncs.cxx
+++ b/extensions/source/plugin/base/nfuncs.cxx
@@ -600,28 +600,11 @@ NPError SAL_CALL NP_LOADDS NPN_SetValue( NPP instance,
{
NPError nError = NPERR_NO_ERROR;
TRACEN( "NPN_SetValue ", variable );
- switch( variable )
- {
#ifdef QUARTZ
- case (NPPVariable)1000: // NPNVpluginDrawingModel
- {
- int nDrawingModel = (int)value; // ugly, but that's the way we need to do it
-
- TRACEN( "drawing model: ", nDrawingModel );
-
- XPlugin_Impl* pImpl = XPluginManager_Impl::getXPluginFromNPP( instance );
- if( pImpl )
- pImpl->getSysPlugData().m_nDrawingModel = nDrawingModel;
- }
- break;
- #endif
- case NPPVpluginNameString: // make the windows compiler happy, it needs at least one case statement
- break;
- default:
- break;
- }
- #ifndef QUARTZ
+ NPN_SetValue_Impl(instance, variable, value);
+ #else
(void)instance;
+ (void)variable;
(void)value;
#endif
return nError;
@@ -653,13 +636,7 @@ void SAL_CALL NP_LOADDS NPN_ForceRedraw(NPP instance)
{
TRACE( "NPN_ForceRedraw" );
#ifdef QUARTZ
- XPlugin_Impl* pImpl = XPluginManager_Impl::getXPluginFromNPP( instance );
- if( pImpl )
- {
- SysPlugData& rPlugData( pImpl->getSysPlugData() );
- if( rPlugData.m_pPlugView )
- [rPlugData.m_pPlugView setNeedsDisplay: YES];
- }
+ NPN_ForceRedraw_Impl(instance);
#else
(void)instance;
#endif
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index fa9798e273f8..4cce131d93e7 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -119,6 +119,7 @@ XPlugin_Impl::XPlugin_Impl( const uno::Reference< com::sun::star::lang::XMultiSe
PluginControl_Impl(),
m_xSMgr( rSMgr ),
m_pPluginComm( NULL ),
+ m_pSysPlugData( CreateSysPlugData() ),
m_aEncoding( osl_getThreadTextEncoding() ),
m_pArgv( NULL ),
m_pArgn( NULL ),
@@ -131,7 +132,6 @@ XPlugin_Impl::XPlugin_Impl( const uno::Reference< com::sun::star::lang::XMultiSe
{
memset( &m_aInstance, 0, sizeof( m_aInstance ) );
memset( &m_aNPWindow, 0, sizeof( m_aNPWindow ) );
- memset( &m_aSysPlugData, 0, sizeof( m_aSysPlugData ) );
m_xModel = new PluginModel();
uno::Reference< com::sun::star::beans::XPropertySet > xPS( m_xModel, UNO_QUERY );
@@ -566,7 +566,7 @@ void XPlugin_Impl::loadPlugin()
NULL );
#ifdef QUARTZ
// m_aNPWindow is set up in the MacPluginComm from the view
- m_aSysPlugData.m_pParentView = pEnvData->pView;
+ SetSysPlugDataParentView(pEnvData);
#elif defined( UNX )
XSync( (Display*)pEnvData->pDisplay, False );
m_aNPWindow.window = (void*)pEnvData->aWindow;