summaryrefslogtreecommitdiff
path: root/extensions/source/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/plugin')
-rw-r--r--extensions/source/plugin/aqua/macmgr.cxx124
-rw-r--r--extensions/source/plugin/aqua/sysplug.cxx52
-rw-r--r--extensions/source/plugin/base/context.cxx36
-rw-r--r--extensions/source/plugin/base/evtlstnr.cxx2
-rw-r--r--extensions/source/plugin/base/manager.cxx2
-rw-r--r--extensions/source/plugin/base/multiplx.cxx58
-rw-r--r--extensions/source/plugin/base/nfuncs.cxx20
-rw-r--r--extensions/source/plugin/base/plcom.cxx2
-rw-r--r--extensions/source/plugin/base/plctrl.cxx34
-rw-r--r--extensions/source/plugin/base/plmodel.cxx8
-rw-r--r--extensions/source/plugin/base/service.cxx8
-rw-r--r--extensions/source/plugin/base/xplugin.cxx50
-rw-r--r--extensions/source/plugin/inc/plugin/aqua/sysplug.hxx54
-rw-r--r--extensions/source/plugin/inc/plugin/impl.hxx152
-rw-r--r--extensions/source/plugin/inc/plugin/model.hxx6
-rw-r--r--extensions/source/plugin/inc/plugin/multiplx.hxx82
-rw-r--r--extensions/source/plugin/inc/plugin/plcom.hxx10
-rw-r--r--extensions/source/plugin/inc/plugin/plctrl.hxx78
-rw-r--r--extensions/source/plugin/inc/plugin/unx/mediator.hxx38
-rw-r--r--extensions/source/plugin/inc/plugin/unx/plugcon.hxx60
-rw-r--r--extensions/source/plugin/inc/plugin/unx/sysplug.hxx6
-rw-r--r--extensions/source/plugin/inc/plugin/win/sysplug.hxx58
-rw-r--r--extensions/source/plugin/unx/mediator.cxx4
-rw-r--r--extensions/source/plugin/unx/npnapi.cxx198
-rw-r--r--extensions/source/plugin/unx/nppapi.cxx134
-rw-r--r--extensions/source/plugin/unx/npwrap.cxx38
-rw-r--r--extensions/source/plugin/unx/plugcon.cxx64
-rw-r--r--extensions/source/plugin/unx/sysplug.cxx2
-rw-r--r--extensions/source/plugin/unx/unxmgr.cxx20
-rw-r--r--extensions/source/plugin/win/sysplug.cxx4
-rw-r--r--extensions/source/plugin/win/winmgr.cxx4
31 files changed, 704 insertions, 704 deletions
diff --git a/extensions/source/plugin/aqua/macmgr.cxx b/extensions/source/plugin/aqua/macmgr.cxx
index f1d0e3a3c99b..e17b3bde2058 100644
--- a/extensions/source/plugin/aqua/macmgr.cxx
+++ b/extensions/source/plugin/aqua/macmgr.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +40,7 @@ using namespace com::sun::star::plugin;
namespace plugstringhelper
{
-
+
rtl::OUString getString( CFStringRef i_xString )
{
rtl::OUStringBuffer aBuf;
@@ -70,7 +70,7 @@ CFMutableStringRef createString( const rtl::OUString& i_rString )
CFURLRef createURL( const rtl::OUString& i_rString )
{
-
+
CFMutableStringRef xMutableString = createString( i_rString );
CFURLRef xURL = CFURLCreateWithString( NULL, xMutableString, NULL );
CFRelease( xMutableString );
@@ -124,12 +124,12 @@ static int parsePlist( CFBundleRef i_xBundle, const rtl::OUString& i_rBundleURL
{
return 0;
}
-
+
// prepare an array of key and value refs
std::vector< CFTypeRef > aKeys( nMimetypes, CFTypeRef(NULL) );
std::vector< CFTypeRef > aValues( nMimetypes, CFTypeRef(NULL) );
CFDictionaryGetKeysAndValues(static_cast<CFDictionaryRef>(xMimeDict), &aKeys[0], &aValues[0] );
-
+
int nAdded = 0;
for( int i = 0; i < nMimetypes; i++ )
{
@@ -138,7 +138,7 @@ static int parsePlist( CFBundleRef i_xBundle, const rtl::OUString& i_rBundleURL
if( ! xKey || CFGetTypeID(xKey) != CFStringGetTypeID() )
continue;
rtl::OUString aMimetype = getString( (CFStringRef)xKey );
-
+
// the correspoding value should be a dictionary
CFTypeRef xDict = aValues[i];
if( ! xDict || CFGetTypeID( xDict ) != CFDictionaryGetTypeID() )
@@ -148,7 +148,7 @@ static int parsePlist( CFBundleRef i_xBundle, const rtl::OUString& i_rBundleURL
CFTypeRef xExtArray = CFDictionaryGetValue( (CFDictionaryRef)xDict, CFSTR("WebPluginExtensions" ) );
if( !xExtArray || CFGetTypeID( xExtArray ) != CFArrayGetTypeID() )
continue;
-
+
OUStringBuffer aExtBuf;
int nExtensions = CFArrayGetCount( (CFArrayRef)xExtArray );
for( int n = 0; n < nExtensions; n++ )
@@ -164,7 +164,7 @@ static int parsePlist( CFBundleRef i_xBundle, const rtl::OUString& i_rBundleURL
aExtBuf.append( aExt );
}
}
-
+
// get the description string
CFTypeRef xDescString = CFDictionaryGetValue( (CFDictionaryRef)xDict, CFSTR("WebPluginTypeDescription" ) );
if( !xDescString || CFGetTypeID( xDescString ) != CFStringGetTypeID() )
@@ -173,14 +173,14 @@ static int parsePlist( CFBundleRef i_xBundle, const rtl::OUString& i_rBundleURL
PluginDescription* pNew = new PluginDescription;
// set plugin name (path to library)
- pNew->PluginName = i_rBundleURL;
+ pNew->PluginName = i_rBundleURL;
// set mimetype
- pNew->Mimetype = aMimetype;
+ pNew->Mimetype = aMimetype;
// set extension line
- pNew->Extension = aExtBuf.makeStringAndClear();
+ pNew->Extension = aExtBuf.makeStringAndClear();
// set description
pNew->Description= aDescription;
-
+
io_rDescriptions.push_back( pNew );
nAdded++;
@@ -195,9 +195,9 @@ static int parsePlist( CFBundleRef i_xBundle, const rtl::OUString& i_rBundleURL
OUStringToOString( pNew->Description, RTL_TEXTENCODING_UTF8 ).getStr()
);
#endif
-
+
}
-
+
return nAdded;
}
@@ -205,12 +205,12 @@ static int parseMimeString( const rtl::OUString& i_rBundleURL , list< PluginDesc
{
if( ! i_pMime )
return 0;
-
+
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
-
+
OStringBuffer aMIME;
aMIME.append( i_pMime );
-
+
if( aMIME.getLength() < 1 )
return 0;
@@ -221,14 +221,14 @@ static int parseMimeString( const rtl::OUString& i_rBundleURL , list< PluginDesc
while( nIndex != -1 )
{
OString aType = aLine.getToken( 0, ';', nIndex );
-
+
sal_Int32 nTypeIndex = 0;
- OString aMimetype = aType.getToken( 0, ':', nTypeIndex );
- OString aExtLine = aType.getToken( 0, ':', nTypeIndex );
+ OString aMimetype = aType.getToken( 0, ':', nTypeIndex );
+ OString aExtLine = aType.getToken( 0, ':', nTypeIndex );
if( nTypeIndex < 0 ) // ensure at least three tokens
continue;
- OString aDesc = aType.getToken( 0, ':', nTypeIndex );
-
+ OString aDesc = aType.getToken( 0, ':', nTypeIndex );
+
// create extension list string
sal_Int32 nExtIndex = 0;
OStringBuffer aExtension;
@@ -241,19 +241,19 @@ static int parseMimeString( const rtl::OUString& i_rBundleURL , list< PluginDesc
if( nExtIndex != -1 )
aExtension.append( ';' );
}
-
+
PluginDescription* pNew = new PluginDescription;
// set plugin name (path to library)
- pNew->PluginName = i_rBundleURL;
+ pNew->PluginName = i_rBundleURL;
// set mimetype
- pNew->Mimetype = OStringToOUString( aMimetype, aEncoding );
+ pNew->Mimetype = OStringToOUString( aMimetype, aEncoding );
// set extension line
- pNew->Extension = OStringToOUString( aExtension.makeStringAndClear(), aEncoding );
+ pNew->Extension = OStringToOUString( aExtension.makeStringAndClear(), aEncoding );
// set description
pNew->Description= OStringToOUString( aDesc, aEncoding );
io_rDescriptions.push_back( pNew );
nAdded++;
-
+
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr,
"Inserting from mime string:\n"
@@ -295,7 +295,7 @@ static int parseMimeResource( CFBundleRef i_xBundle,
#endif
xRes = 0;
BPSupportedMIMETypes aMIMETypesStrangeStruct = {kBPSupportedMIMETypesStructVers_1, NULL, NULL};
-
+
BP_GetSupportedMIMETypesUPP pBPGetSupp = (BP_GetSupportedMIMETypesUPP)osl_getAsciiFunctionSymbol( i_rMod, "BP_GetSupportedMIMETypes" );
if( pBPGetSupp &&
noErr == pBPGetSupp( &aMIMETypesStrangeStruct, 0 ) &&
@@ -324,7 +324,7 @@ static int parseMimeResource( CFBundleRef i_xBundle,
}
}
}
-
+
if( aMIMETypesStrangeStruct.typeStrings && aMIMETypesStrangeStruct.infoStrings )
{
short nVariantCount = (**(short**)aMIMETypesStrangeStruct.typeStrings) / 2;
@@ -353,19 +353,19 @@ static int parseMimeResource( CFBundleRef i_xBundle,
if( nExtIndex != -1 )
aExtension.append( sal_Unicode(';') );
}
-
+
PluginDescription* pNew = new PluginDescription;
// set plugin name (path to library)
- pNew->PluginName = i_rBundleURL;
+ pNew->PluginName = i_rBundleURL;
// set mimetype
- pNew->Mimetype = aMimetype;
+ pNew->Mimetype = aMimetype;
// set extension line
- pNew->Extension = aExtension.makeStringAndClear();
+ pNew->Extension = aExtension.makeStringAndClear();
// set description
pNew->Description= aDescription;
io_rDescriptions.push_back( pNew );
nAdded++;
-
+
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr,
"Inserting from resource:\n"
@@ -379,8 +379,8 @@ static int parseMimeResource( CFBundleRef i_xBundle,
#endif
}
}
-
-
+
+
// clean up
if( aMIMETypesStrangeStruct.typeStrings )
{
@@ -394,7 +394,7 @@ static int parseMimeResource( CFBundleRef i_xBundle,
}
if( xRes )
CFBundleCloseBundleResourceMap( i_xBundle, xRes );
-
+
return nAdded;
}
@@ -410,9 +410,9 @@ static bool checkBlackList( CFBundleRef i_xBundle )
CFTypeRef bundleversion = CFBundleGetValueForInfoDictionaryKey( i_xBundle, CFSTR("CFBundleVersion"));
if( bundleversion && CFGetTypeID(bundleversion) == CFStringGetTypeID() )
aBundleVersion = getString( static_cast<CFStringRef>(bundleversion) );
-
+
bool bReject = false;
- // #i102735# VLC plugin prior to 1.0 tends to crash
+ // #i102735# VLC plugin prior to 1.0 tends to crash
if( aBundleName.equalsAscii( "VLC Plug-in" ) )
{
sal_Int32 nIndex = 0;
@@ -427,7 +427,7 @@ static bool checkBlackList( CFBundleRef i_xBundle )
{
bReject = true;
}
-
+
#if OSL_DEBUG_LEVEL > 1
if( bReject )
fprintf( stderr, "rejecting plugin \"%s\" version %s\n",
@@ -444,7 +444,7 @@ static int getPluginDescriptions( CFBundleRef i_xBundle , list< PluginDescriptio
int nDescriptions = 0;
if( ! i_xBundle )
return nDescriptions;
-
+
if( checkBlackList( i_xBundle ) )
return 0;
@@ -452,7 +452,7 @@ static int getPluginDescriptions( CFBundleRef i_xBundle , list< PluginDescriptio
CFURLRef xURL = CFBundleCopyBundleURL( i_xBundle );
aPlugURL = getString( xURL );
CFRelease( xURL );
-
+
#if OSL_DEBUG_LEVEL > 1
rtl::OUString aPlugName, aPlugDescription;
CFTypeRef name = CFBundleGetValueForInfoDictionaryKey( i_xBundle, CFSTR("WebPluginName"));
@@ -462,15 +462,15 @@ static int getPluginDescriptions( CFBundleRef i_xBundle , list< PluginDescriptio
CFTypeRef description = CFBundleGetValueForInfoDictionaryKey( i_xBundle, CFSTR("WebPluginDescription"));
if( description && CFGetTypeID(description) == CFStringGetTypeID() )
aPlugDescription = getString( static_cast<CFStringRef>(description) );
-
+
fprintf( stderr, "URL: %s\nname: %s\ndescription: %s\n",
rtl::OUStringToOString( aPlugURL, RTL_TEXTENCODING_UTF8 ).getStr(),
rtl::OUStringToOString( aPlugName, RTL_TEXTENCODING_UTF8 ).getStr(),
rtl::OUStringToOString( aPlugDescription, RTL_TEXTENCODING_UTF8 ).getStr()
);
#endif
-
-
+
+
// get location of plugin library
CFURLRef xLibURL = CFBundleCopyExecutableURL( i_xBundle );
if( ! xLibURL )
@@ -478,7 +478,7 @@ static int getPluginDescriptions( CFBundleRef i_xBundle , list< PluginDescriptio
// get the file system path
rtl::OUString aModuleURL( CFURLtoOSLURL( xLibURL ) );
CFRelease( xLibURL );
-
+
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "exec URL = %s\n", rtl::OUStringToOString( aModuleURL, RTL_TEXTENCODING_UTF8 ).getStr() );
#endif
@@ -506,7 +506,7 @@ static int getPluginDescriptions( CFBundleRef i_xBundle , list< PluginDescriptio
osl_unloadModule( aMod );
return nDescriptions;
}
-
+
// resolve the symbol that might get us the mimetypes
const char* (*pGetMimeDescription)() = (const char*(*)())osl_getAsciiFunctionSymbol( aMod, "_NP_GetMIMEDescription" );
if( pGetMimeDescription )
@@ -522,7 +522,7 @@ static int getPluginDescriptions( CFBundleRef i_xBundle , list< PluginDescriptio
}
}
}
-
+
// and as last resort check the resource of the bundle
nDescriptions = parseMimeResource( i_xBundle, aMod, aPlugURL, io_rDescriptions );
osl_unloadModule( aMod );
@@ -536,24 +536,24 @@ static bool CheckPlugin( const rtl::OUString& rPath, list< PluginDescription* >&
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "Trying path %s ... ", rtl::OUStringToOString( rPath, RTL_TEXTENCODING_UTF8 ).getStr() );
#endif
- CFURLRef xURL = createURL( rPath );
-
+ CFURLRef xURL = createURL( rPath );
+
CFArrayRef xBundles = CFBundleCreateBundlesFromDirectory( NULL, xURL, CFSTR("plugin") );
if( ! xBundles )
return false;
-
+
CFIndex nBundles = CFArrayGetCount( xBundles );
-
+
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "got %d bundles\n", (int)nBundles );
#endif
-
+
int nDescriptions = 0;
for( CFIndex i = 0; i < nBundles; i++ )
{
CFBundleRef xBundle = (CFBundleRef)CFArrayGetValueAtIndex( xBundles, i );
nDescriptions += getPluginDescriptions( xBundle, rDescriptions );
-
+
CFRelease( xBundle );
}
CFRelease( xBundles );
@@ -574,7 +574,7 @@ static rtl::OUString FindFolderURL( FSVolumeRefNum vRefNum, OSType folderType )
aRet = getString( xURL );
CFRelease( xURL );
}
-
+
return aRet;
}
@@ -587,7 +587,7 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th
std::list<PluginDescription*> aPlugins;
static const char* pNPXPluginPath = getenv( "MOZ_PLUGIN_PATH" );
-
+
// get directories
std::list< rtl::OUString > aPaths;
if( pNPXPluginPath )
@@ -599,7 +599,7 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th
aPaths.push_back( getString( xURL ) );
CFRelease( xURL );
}
-
+
rtl::OUString aPath = FindFolderURL( kUserDomain, kInternetPlugInFolderType );
if( aPath.getLength() )
aPaths.push_back( aPath );
@@ -609,14 +609,14 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th
aPath = FindFolderURL( kOnAppropriateDisk, kInternetPlugInFolderType );
if( aPath.getLength() )
aPaths.push_back( aPath );
-
-
+
+
const Sequence< ::rtl::OUString >& rPaths( PluginManager::getAdditionalSearchPaths() );
for( sal_Int32 i = 0; i < rPaths.getLength(); i++ )
{
aPaths.push_back( getURLFromPath( rPaths.getConstArray()[i] ) );
}
-
+
for( std::list< rtl::OUString >::const_iterator it = aPaths.begin(); it != aPaths.end(); ++it )
{
rtl::OUString aPath( *it );
@@ -625,8 +625,8 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th
#endif
CheckPlugin( aPath, aPlugins );
}
-
-
+
+
// create return value
aDescriptions = Sequence<PluginDescription>( aPlugins.size() );
#if OSL_DEBUG_LEVEL > 1
diff --git a/extensions/source/plugin/aqua/sysplug.cxx b/extensions/source/plugin/aqua/sysplug.cxx
index 39e3fc5cc4c4..3139b5cdfe45 100644
--- a/extensions/source/plugin/aqua/sysplug.cxx
+++ b/extensions/source/plugin/aqua/sysplug.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -208,7 +208,7 @@ MacPluginComm::MacPluginComm( const rtl::OUString& i_rMimetype, const rtl::OUStr
{
// initialize plugin function table
memset( &m_aNPPfuncs, 0, sizeof( m_aNPPfuncs ) );
-
+
// load the bundle
CFURLRef xURL = createURL( i_rBundle );
m_xBundle = CFBundleCreate( NULL, xURL );
@@ -247,7 +247,7 @@ MacPluginComm::MacPluginComm( const rtl::OUString& i_rMimetype, const rtl::OUStr
m_aNPPfuncs.size = sizeof( m_aNPPfuncs );
m_aNPPfuncs.version = 0;
-
+
m_eCall = eNP_Initialize;
execute();
}
@@ -277,7 +277,7 @@ BOOL MacPluginComm::retrieveFunction( const char* i_pName, void** o_ppFunc ) con
return FALSE;
*o_ppFunc = (void*)osl_getAsciiFunctionSymbol( m_hPlugLib, i_pName );
-
+
if( ! *o_ppFunc && m_xBundle )
{
rtl::OUString aName( OUString::createFromAscii( *i_pName == '_' ? i_pName+1 : i_pName ) );
@@ -295,7 +295,7 @@ BOOL MacPluginComm::retrieveFunction( const char* i_pName, void** o_ppFunc ) con
IMPL_LINK( MacPluginComm, NullTimerHdl, void*, EMPTYARG )
{
// note: this is a Timer handler, we are already protected by the SolarMutex
-
+
FakeEventRecord aRec;
aRec.what = nullEvent;
aRec.where.h = aRec.where.v = 20000;
@@ -307,7 +307,7 @@ IMPL_LINK( MacPluginComm, NullTimerHdl, void*, EMPTYARG )
if( rPlugData.m_pPlugView ) // for safety do not dispatch null events before first NPP_SetWindow
(*m_aNPPfuncs.event)( (*it)->getNPPInstance(), &aRec );
}
-
+
return 0;
}
@@ -330,8 +330,8 @@ long MacPluginComm::doIt()
NPError (*pEntry)( NPPluginFuncs* );
retrieveFunction( "NP_GetEntryPoints", (void**)&pEntry );
nErr = (*pEntry)( &m_aNPPfuncs );
-
- DBG_ASSERT( nErr == NPERR_NO_ERROR, "NP_GetEntryPoints() failed!" );
+
+ DBG_ASSERT( nErr == NPERR_NO_ERROR, "NP_GetEntryPoints() failed!" );
}
else
{
@@ -343,7 +343,7 @@ long MacPluginComm::doIt()
case eNPP_Destroy:
if( m_aNullEventClients.empty() )
delete m_pNullTimer, m_pNullTimer = NULL;
-
+
TRACE( "eNPP_Destroy" );
nRet = (m_aNPPfuncs.destroy
? (*m_aNPPfuncs.destroy)(
@@ -408,7 +408,7 @@ long MacPluginComm::doIt()
(NPP)m_aArgs[0],
(NPWindow*)m_aArgs[1] )
: NPERR_GENERIC_ERROR);
-
+
break;
}
case eNPP_HandleEvent:
@@ -419,7 +419,7 @@ long MacPluginComm::doIt()
(NPP)m_aArgs[0],
m_aArgs[1] )
: NPERR_GENERIC_ERROR);
-
+
break;
}
case eNPP_StreamAsFile:
@@ -501,9 +501,9 @@ NPError MacPluginComm::NPP_Destroy( XPlugin_Impl* i_pImpl, NPSavedData** save )
{
// remove from NullEvent timer
m_aNullEventClients.remove( i_pImpl );
-
+
NPError nErr = NPP_Destroy( i_pImpl->getNPPInstance(), save );
-
+
// release plugin view
SysPlugData& rPlugData( i_pImpl->getSysPlugData() );
if( rPlugData.m_pPlugView )
@@ -512,7 +512,7 @@ NPError MacPluginComm::NPP_Destroy( XPlugin_Impl* i_pImpl, NPSavedData** save )
[rPlugData.m_pPlugView release];
rPlugData.m_pPlugView = nil;
}
-
+
return nErr;
}
@@ -546,7 +546,7 @@ NPError MacPluginComm::NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode
if( pImpl ) // sanity check
m_aNullEventClients.push_back( pImpl );
-
+
DBG_ASSERT( m_aNPPfuncs.newp, "### NPP_New(): null pointer in NPP functions table!" );
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "NPP_New( %s. %p, %d, %d",
@@ -563,7 +563,7 @@ NPError MacPluginComm::NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode
m_aArgs[4] = (void*)argn;
m_aArgs[5] = (void*)argv;
m_aArgs[6] = (void*)saved;
-
+
return (NPError)execute();
}
@@ -703,7 +703,7 @@ void MacPluginComm::NPP_Shutdown()
NPError MacPluginComm::NPP_SetWindow( XPlugin_Impl* i_pImpl )
{
// update window NPWindow from view
- SysPlugData& rPlugData( i_pImpl->getSysPlugData() );
+ SysPlugData& rPlugData( i_pImpl->getSysPlugData() );
// update plug view
NSRect aPlugRect = [rPlugData.m_pParentView frame];
@@ -721,31 +721,31 @@ NPError MacPluginComm::NPP_SetWindow( XPlugin_Impl* i_pImpl )
NSRect aWinRect = [pWin frame];
NSRect aBounds = [rPlugData.m_pPlugView frame];
NSRect aVisibleBounds = [rPlugData.m_pPlugView visibleRect];
-
+
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "visible bounds = %d+%d+%dx%d\n",
(int)aVisibleBounds.origin.x, (int)aVisibleBounds.origin.y,
(int)aVisibleBounds.size.width, (int)aVisibleBounds.size.height );
#endif
-
+
NSPoint aViewOrigin = [rPlugData.m_pPlugView convertPoint: NSZeroPoint toView: nil];
// save view origin so we can notice movement of the view in drawView
// in case of a moved view we need to reset the port/context
rPlugData.m_aLastPlugViewOrigin = aViewOrigin;
-
+
// convert view origin to topdown coordinates
aViewOrigin.y = aWinRect.size.height - aViewOrigin.y;
-
+
// same for clipping
NSPoint aClipOrigin = [rPlugData.m_pPlugView convertPoint: aVisibleBounds.origin toView: nil];
aClipOrigin.y = aWinRect.size.height - aClipOrigin.y;
-
+
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "view origin: %d+%d, clip origin = %d+%d\n",
(int)aViewOrigin.x, (int)aViewOrigin.y,
(int)aClipOrigin.x, (int)aClipOrigin.y );
#endif
-
+
pNPWin->x = aViewOrigin.x;
pNPWin->y = aViewOrigin.y;
pNPWin->width = aBounds.size.width;
@@ -756,7 +756,7 @@ NPError MacPluginComm::NPP_SetWindow( XPlugin_Impl* i_pImpl )
pNPWin->clipRect.bottom = aClipOrigin.y + aVisibleBounds.size.height;
if( rPlugData.m_nDrawingModel == 1 )
- {
+ {
rPlugData.m_aCGContext.window = reinterpret_cast<WindowRef>([pWin windowRef]);
pNPWin->window = &rPlugData.m_aCGContext;
rPlugData.m_aCGContext.context = reinterpret_cast<CGContextRef>([[pWin graphicsContext] graphicsPort]);
@@ -776,12 +776,12 @@ NPError MacPluginComm::NPP_SetWindow( XPlugin_Impl* i_pImpl )
rPlugData.m_aNPPort.port, (int)rPlugData.m_aNPPort.portx, (int)rPlugData.m_aNPPort.porty );
#endif
}
-
+
if( pNPWin->width == 0 || pNPWin->height == 0 || [rPlugData.m_pPlugView isHiddenOrHasHiddenAncestor] )
rPlugData.m_bSetWindowOnDraw = true;
NPError nErr = NPP_SetWindow( i_pImpl->getNPPInstance(), i_pImpl->getNPWindow() );
-
+
return nErr;
}
diff --git a/extensions/source/plugin/base/context.cxx b/extensions/source/plugin/base/context.cxx
index 4d6a109d57e5..bf23f9c19113 100644
--- a/extensions/source/plugin/base/context.cxx
+++ b/extensions/source/plugin/base/context.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,19 +52,19 @@
using namespace com::sun::star::io;
namespace ext_plug {
-
+
class FileSink : public ::cppu::WeakAggImplHelper1< ::com::sun::star::io::XOutputStream >
{
private:
- Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
- FILE* fp;
- Reference< ::com::sun::star::plugin::XPlugin > m_xPlugin;
- ::rtl::OUString m_aMIMEType;
- ::rtl::OUString m_aTarget;
- ::rtl::OUString m_aFileName;
+ Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ FILE* fp;
+ Reference< ::com::sun::star::plugin::XPlugin > m_xPlugin;
+ ::rtl::OUString m_aMIMEType;
+ ::rtl::OUString m_aTarget;
+ ::rtl::OUString m_aFileName;
public:
- FileSink( const Reference< ::com::sun::star::lang::XMultiServiceFactory > &,
+ FileSink( const Reference< ::com::sun::star::lang::XMultiServiceFactory > &,
const Reference< ::com::sun::star::plugin::XPlugin > & plugin,
const ::rtl::OUString& mimetype,
const ::rtl::OUString& target,
@@ -82,8 +82,8 @@ using namespace ext_plug;
class XPluginContext_Impl : public ::cppu::WeakAggImplHelper1< ::com::sun::star::plugin::XPluginContext >
{
- Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
- rtl_TextEncoding m_aEncoding;
+ Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ rtl_TextEncoding m_aEncoding;
public:
XPluginContext_Impl( const Reference< ::com::sun::star::lang::XMultiServiceFactory > & );
@@ -142,7 +142,7 @@ void XPluginContext_Impl::getURL(const Reference< ::com::sun::star::plugin::XPlu
0, 0, (sal_Bool)(aUrl.compareToAscii( "file:", 5 ) == 0) );
return;
}
-
+
Reference< ::com::sun::star::frame::XComponentLoader > xLoader( xInst, UNO_QUERY );
XPlugin_Impl* pPlugin = XPluginManager_Impl::getPluginImplementation( plugin );
@@ -151,9 +151,9 @@ void XPluginContext_Impl::getURL(const Reference< ::com::sun::star::plugin::XPlu
try
{
::com::sun::star::beans::PropertyValue aValue;
- aValue.Name = ::rtl::OUString::createFromAscii( "Referer" );
+ aValue.Name = ::rtl::OUString::createFromAscii( "Referer" );
aValue.Value <<= pPlugin->getRefererURL();
-
+
Sequence< ::com::sun::star::beans::PropertyValue > aArgs( &aValue, 1 );
Reference< ::com::sun::star::lang::XComponent > xComp =
xLoader->loadComponentFromURL(
@@ -228,10 +228,10 @@ void XPluginContext_Impl::postURL(const Reference< ::com::sun::star::plugin::XPl
try
{
::com::sun::star::beans::PropertyValue aValues[2];
- aValues[0].Name = ::rtl::OUString::createFromAscii( "Referer" );
+ aValues[0].Name = ::rtl::OUString::createFromAscii( "Referer" );
aValues[0].Value <<= pPlugin->getRefererURL();
-
- aValues[1].Name = ::rtl::OUString::createFromAscii( "PostString" );
+
+ aValues[1].Name = ::rtl::OUString::createFromAscii( "PostString" );
aValues[1].Value <<= ::rtl::OStringToOUString( (char*)( file ? aBuf : buf ).getConstArray(), m_aEncoding );
Sequence< ::com::sun::star::beans::PropertyValue > aArgs( aValues, 2 );
Reference< ::com::sun::star::lang::XComponent > xComp =
@@ -313,7 +313,7 @@ void FileSink::closeOutput() throw()
::com::sun::star::beans::PropertyValue aValue;
aValue.Name = ::rtl::OUString::createFromAscii( "Referer" );
aValue.Value <<= pPlugin->getRefererURL();
-
+
Sequence< ::com::sun::star::beans::PropertyValue > aArgs( &aValue, 1 );
Reference< ::com::sun::star::lang::XComponent > xComp =
xLoader->loadComponentFromURL(
diff --git a/extensions/source/plugin/base/evtlstnr.cxx b/extensions/source/plugin/base/evtlstnr.cxx
index d01844aadff6..ffbf3c208031 100644
--- a/extensions/source/plugin/base/evtlstnr.cxx
+++ b/extensions/source/plugin/base/evtlstnr.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/extensions/source/plugin/base/manager.cxx b/extensions/source/plugin/base/manager.cxx
index 0ebee37244c9..4e193244d0eb 100644
--- a/extensions/source/plugin/base/manager.cxx
+++ b/extensions/source/plugin/base/manager.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/extensions/source/plugin/base/multiplx.cxx b/extensions/source/plugin/base/multiplx.cxx
index 209885f6a475..bd25b51db184 100644
--- a/extensions/source/plugin/base/multiplx.cxx
+++ b/extensions/source/plugin/base/multiplx.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,9 +31,9 @@
#include <osl/diagnose.h>
#include <plugin/multiplx.hxx>
-// ---------------------------------------------------------------------
-// class MRCListenerMultiplexerHelper
-// ---------------------------------------------------------------------
+// ---------------------------------------------------------------------
+// class MRCListenerMultiplexerHelper
+// ---------------------------------------------------------------------
MRCListenerMultiplexerHelper::MRCListenerMultiplexerHelper
(
const Reference< ::com::sun::star::awt::XWindow > & rControl
@@ -172,32 +172,32 @@ void MRCListenerMultiplexerHelper::disposing(const ::com::sun::star::lang::Event
xPeer = Reference< ::com::sun::star::awt::XWindow > ();
}
-#define MULTIPLEX( InterfaceName, MethodName, EventName ) \
-::cppu::OInterfaceContainerHelper * pCont; \
-pCont = aListenerHolder.getContainer( ::getCppuType((const Reference< InterfaceName >*)0) ); \
-if( pCont ) \
-{ \
- ::cppu::OInterfaceIteratorHelper aIt( *pCont ); \
- EventName aEvt = e; \
- /* Remark: The control is the event source not the peer. We must change */ \
- /* the source of the event */ \
+#define MULTIPLEX( InterfaceName, MethodName, EventName ) \
+::cppu::OInterfaceContainerHelper * pCont; \
+pCont = aListenerHolder.getContainer( ::getCppuType((const Reference< InterfaceName >*)0) ); \
+if( pCont ) \
+{ \
+ ::cppu::OInterfaceIteratorHelper aIt( *pCont ); \
+ EventName aEvt = e; \
+ /* Remark: The control is the event source not the peer. We must change */ \
+ /* the source of the event */ \
aEvt.Source = xControl;\
- /*.is the control not destroyed */ \
- if( aEvt.Source.is() ) \
- { \
- if( aIt.hasMoreElements() ) \
- { \
- InterfaceName * pListener = (InterfaceName *)aIt.next(); \
- try \
- { \
- pListener->MethodName( aEvt ); \
- } \
- catch( RuntimeException& ) \
- { \
- /* ignore all usr system exceptions from the listener */ \
- } \
- } \
- } \
+ /*.is the control not destroyed */ \
+ if( aEvt.Source.is() ) \
+ { \
+ if( aIt.hasMoreElements() ) \
+ { \
+ InterfaceName * pListener = (InterfaceName *)aIt.next(); \
+ try \
+ { \
+ pListener->MethodName( aEvt ); \
+ } \
+ catch( RuntimeException& ) \
+ { \
+ /* ignore all usr system exceptions from the listener */ \
+ } \
+ } \
+ } \
}
// ::com::sun::star::awt::XFocusListener
diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx
index b378795a92f1..cbfc05e423e8 100644
--- a/extensions/source/plugin/base/nfuncs.cxx
+++ b/extensions/source/plugin/base/nfuncs.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -158,9 +158,9 @@ static ::rtl::OString normalizeURL( XPlugin_Impl* plugin, const ::rtl::OString&
struct AsynchronousGetURL
{
- OUString aUrl;
- OUString aTarget;
- Reference< XEventListener > xListener;
+ OUString aUrl;
+ OUString aTarget;
+ Reference< XEventListener > xListener;
DECL_LINK( getURL, XPlugin_Impl* );
};
@@ -287,9 +287,9 @@ extern "C" {
pImpl->addPluginEventListener( pListener );
pListener = NULL;
}
- pAsync->aUrl = OStringToOUString( aLoadURL, pImpl->getTextEncoding() );
- pAsync->aTarget = OStringToOUString( target, pImpl->getTextEncoding() );
- pAsync->xListener = pListener;
+ pAsync->aUrl = OStringToOUString( aLoadURL, pImpl->getTextEncoding() );
+ pAsync->aTarget = OStringToOUString( target, pImpl->getTextEncoding() );
+ pAsync->xListener = pListener;
pImpl->setLastGetUrl( aLoadURL );
Application::PostUserEvent( LINK( pAsync, AsynchronousGetURL, getURL ), pImpl );
@@ -550,7 +550,7 @@ NPError SAL_CALL NP_LOADDS NPN_GetValue( NPP instance, NPNVariable variable, vo
if( ! pImpl )
return 0;
-
+
NPError aResult( NPERR_NO_ERROR );
switch( variable )
@@ -622,9 +622,9 @@ NPError SAL_CALL NP_LOADDS NPN_SetValue( NPP instance,
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;
diff --git a/extensions/source/plugin/base/plcom.cxx b/extensions/source/plugin/base/plcom.cxx
index 9aef0e1de458..a77145cdf573 100644
--- a/extensions/source/plugin/base/plcom.cxx
+++ b/extensions/source/plugin/base/plcom.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/extensions/source/plugin/base/plctrl.cxx b/extensions/source/plugin/base/plctrl.cxx
index 4498ecedcb3b..cf86074806f9 100644
--- a/extensions/source/plugin/base/plctrl.cxx
+++ b/extensions/source/plugin/base/plctrl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -99,11 +99,11 @@ void PluginControl_Impl::dispose(void)
void PluginControl_Impl::setPosSize( sal_Int32 nX_, sal_Int32 nY_, sal_Int32 nWidth_, sal_Int32 nHeight_, sal_Int16 nFlags )
throw( RuntimeException )
{
- _nX = nX_ >=0 ? nX_ : 0;
- _nY = nY_ >=0 ? nY_ : 0;
- _nWidth = nWidth_ >=0 ? nWidth_ : 0;
- _nHeight = nHeight_ >=0 ? nHeight_ : 0;
- _nFlags = nFlags;
+ _nX = nX_ >=0 ? nX_ : 0;
+ _nY = nY_ >=0 ? nY_ : 0;
+ _nWidth = nWidth_ >=0 ? nWidth_ : 0;
+ _nHeight = nHeight_ >=0 ? nHeight_ : 0;
+ _nFlags = nFlags;
if (_xPeerWindow.is())
_xPeerWindow->setPosSize( _nX, _nY, _nWidth, _nHeight, nFlags );
@@ -124,7 +124,7 @@ void PluginControl_Impl::setVisible( sal_Bool bVisible )
if (_xPeerWindow.is())
_xPeerWindow->setVisible( _bVisible && !_bInDesignMode );
}
-
+
//---- ::com::sun::star::awt::XWindow -------------------------------------------------------------------------------------
void PluginControl_Impl::setEnable( sal_Bool bEnable )
throw( RuntimeException )
@@ -133,7 +133,7 @@ void PluginControl_Impl::setEnable( sal_Bool bEnable )
if (_xPeerWindow.is())
_xPeerWindow->setEnable( _bEnable );
}
-
+
//---- ::com::sun::star::awt::XWindow -------------------------------------------------------------------------------------
void PluginControl_Impl::setFocus(void) throw( RuntimeException )
{
@@ -149,9 +149,9 @@ void PluginControl_Impl::releasePeer()
{
_xParentWindow->removeFocusListener( this );
_xPeerWindow->dispose();
- _pSysChild = NULL;
- _xPeerWindow = Reference< ::com::sun::star::awt::XWindow > ();
- _xPeer = Reference< ::com::sun::star::awt::XWindowPeer > ();
+ _pSysChild = NULL;
+ _xPeerWindow = Reference< ::com::sun::star::awt::XWindow > ();
+ _xPeer = Reference< ::com::sun::star::awt::XWindowPeer > ();
getMultiplexer()->setPeer( Reference< ::com::sun::star::awt::XWindow > () );
}
}
@@ -169,20 +169,20 @@ void PluginControl_Impl::createPeer( const Reference< ::com::sun::star::awt::XTo
_xParentPeer = xParentPeer;
_xParentWindow = Reference< ::com::sun::star::awt::XWindow > ( xParentPeer, UNO_QUERY );
DBG_ASSERT( _xParentWindow.is(), "### no parent peer window!" );
-
+
Window* pImpl = VCLUnoHelper::GetWindow( xParentPeer );
if (pImpl)
{
_pSysChild = new SystemChildWindow( pImpl, WB_CLIPCHILDREN );
if (pImpl->HasFocus())
_pSysChild->GrabFocus();
-
+
// get peer
- _xPeer = Reference< ::com::sun::star::awt::XWindowPeer > ( _pSysChild->GetComponentInterface() );
- _xPeerWindow = Reference< ::com::sun::star::awt::XWindow > ( _xPeer, UNO_QUERY );
+ _xPeer = Reference< ::com::sun::star::awt::XWindowPeer > ( _pSysChild->GetComponentInterface() );
+ _xPeerWindow = Reference< ::com::sun::star::awt::XWindow > ( _xPeer, UNO_QUERY );
// !_BOTH_ MUST BE VALID!
DBG_ASSERT( (_xPeer.is() && _xPeerWindow.is()), "### no peer!" );
-
+
_xParentWindow->addFocusListener( this );
_xPeerWindow->setPosSize( _nX, _nY, _nWidth, _nHeight, _nFlags );
_xPeerWindow->setEnable( _bEnable );
@@ -220,7 +220,7 @@ void PluginControl_Impl::removePaintListener( const Reference< ::com::sun::star:
}
//---- ::com::sun::star::awt::XWindow -------------------------------------------------------------------------------------
-void PluginControl_Impl::addWindowListener( const Reference< ::com::sun::star::awt::XWindowListener > & l )
+void PluginControl_Impl::addWindowListener( const Reference< ::com::sun::star::awt::XWindowListener > & l )
throw( RuntimeException )
{
getMultiplexer()->advise( ::getCppuType((const Reference< ::com::sun::star::awt::XWindowListener >*)0), l );
diff --git a/extensions/source/plugin/base/plmodel.cxx b/extensions/source/plugin/base/plmodel.cxx
index 9cd5cd0e79cc..5a7164720900 100644
--- a/extensions/source/plugin/base/plmodel.cxx
+++ b/extensions/source/plugin/base/plmodel.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -115,13 +115,13 @@ Reference< ::com::sun::star::beans::XPropertySetInfo > PluginModel::getProperty
}
sal_Bool PluginModel::convertFastPropertyValue( Any & rConvertedValue,
- Any & rOldValue,
+ Any & rOldValue,
sal_Int32 nHandle,
const Any& rValue ) throw()
{
if( nHandle == 1 || nHandle == 2 )
{
- if( rValue.getValueTypeClass() == TypeClass_STRING )
+ if( rValue.getValueTypeClass() == TypeClass_STRING )
{
rConvertedValue = rValue;
if( nHandle == 2 )
@@ -182,7 +182,7 @@ void PluginModel::dispose(void) throw()
(*it)->disposing( aEvt );
m_aDisposeListeners.clear();
-
+
disposing();
}
diff --git a/extensions/source/plugin/base/service.cxx b/extensions/source/plugin/base/service.cxx
index 1ce6dcc1a05c..0b5d8321bf22 100644
--- a/extensions/source/plugin/base/service.cxx
+++ b/extensions/source/plugin/base/service.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,17 +68,17 @@ extern "C" {
try
{
Reference< ::com::sun::star::registry::XRegistryKey > xKey( reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pXUnoKey ) );
-
+
::rtl::OUString aImplName = ::rtl::OUString::createFromAscii( "/" );
aImplName += XPluginManager_Impl::getImplementationName_Static();
aImplName += ::rtl::OUString::createFromAscii( "/UNO/SERVICES/com.sun.star.plugin.PluginManager" );
xKey->createKey( aImplName );
-
+
aImplName = ::rtl::OUString::createFromAscii( "/" );
aImplName += PluginModel::getImplementationName_Static();
aImplName += ::rtl::OUString::createFromAscii( "/UNO/SERVICES/com.sun.star.plugin.PluginModel" );
xKey->createKey( aImplName );
-
+
return sal_True;
}
catch( ::com::sun::star::registry::InvalidRegistryException& )
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index 8e8af63b94b8..610cc8dd1d91 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -283,14 +283,14 @@ void XPlugin_Impl::freeArgs()
void XPlugin_Impl::prependArg( const char* pName, const char* pValue )
{
- const char** pNewNames = new const char*[m_nArgs+1];
- const char** pNewValues = new const char*[m_nArgs+1];
+ const char** pNewNames = new const char*[m_nArgs+1];
+ const char** pNewValues = new const char*[m_nArgs+1];
- pNewNames[0] = strdup( pName );
- pNewValues[0] = strdup( pValue );
+ pNewNames[0] = strdup( pName );
+ pNewValues[0] = strdup( pValue );
for( int nIndex = 0; nIndex < m_nArgs; ++nIndex )
{
- pNewNames[nIndex+1] = m_pArgn[nIndex];
+ pNewNames[nIndex+1] = m_pArgn[nIndex];
pNewValues[nIndex+1]= m_pArgv[nIndex];
}
// free old arrays
@@ -334,23 +334,23 @@ void XPlugin_Impl::handleSpecialArgs()
m_pArgv = new const char*[m_nArgs];
// SRC
- m_pArgn[0] = strdup( "SRC" );
- m_pArgv[0] = strdup( OUStringToOString( aURL, m_aEncoding ).getStr() );
+ m_pArgn[0] = strdup( "SRC" );
+ m_pArgv[0] = strdup( OUStringToOString( aURL, m_aEncoding ).getStr() );
// WIDTH
- m_pArgn[1] = strdup( "WIDTH" );
- m_pArgv[1] = strdup( "200" );
+ m_pArgn[1] = strdup( "WIDTH" );
+ m_pArgv[1] = strdup( "200" );
// HEIGHT
- m_pArgn[2] = strdup( "HEIGHT" );
- m_pArgv[2] = strdup( "200" );
+ m_pArgn[2] = strdup( "HEIGHT" );
+ m_pArgv[2] = strdup( "200" );
// CONTROLS
- m_pArgn[3] = strdup( "CONTROLS" );
- m_pArgv[3] = strdup( "PlayButton,StopButton,ImageWindow" );
+ m_pArgn[3] = strdup( "CONTROLS" );
+ m_pArgv[3] = strdup( "PlayButton,StopButton,ImageWindow" );
// AUTOSTART
- m_pArgn[4] = strdup( "AUTOSTART" );
- m_pArgv[4] = strdup( "TRUE" );
+ m_pArgn[4] = strdup( "AUTOSTART" );
+ m_pArgv[4] = strdup( "TRUE" );
// NOJAVA
- m_pArgn[5] = strdup( "NOJAVA" );
- m_pArgv[5] = strdup( "TRUE" );
+ m_pArgn[5] = strdup( "NOJAVA" );
+ m_pArgv[5] = strdup( "TRUE" );
}
}
// #69333# special for pdf
@@ -875,14 +875,14 @@ void XPlugin_Impl::setPosSize( sal_Int32 nX_, sal_Int32 nY_, sal_Int32 nWidth_,
PluginControl_Impl::setPosSize(nX_, nY_, nWidth_, nHeight_, nFlags);
- m_aNPWindow.x = 0;
- m_aNPWindow.y = 0;
- m_aNPWindow.width = nWidth_;
- m_aNPWindow.height = nHeight_;
- m_aNPWindow.clipRect.top = 0;
- m_aNPWindow.clipRect.left = 0;
- m_aNPWindow.clipRect.right = ::sal::static_int_cast< uint16, sal_Int32 >( nWidth_ );
- m_aNPWindow.clipRect.bottom = ::sal::static_int_cast< uint16, sal_Int32 >( nHeight_ );
+ m_aNPWindow.x = 0;
+ m_aNPWindow.y = 0;
+ m_aNPWindow.width = nWidth_;
+ m_aNPWindow.height = nHeight_;
+ m_aNPWindow.clipRect.top = 0;
+ m_aNPWindow.clipRect.left = 0;
+ m_aNPWindow.clipRect.right = ::sal::static_int_cast< uint16, sal_Int32 >( nWidth_ );
+ m_aNPWindow.clipRect.bottom = ::sal::static_int_cast< uint16, sal_Int32 >( nHeight_ );
if( getPluginComm() )
getPluginComm()->NPP_SetWindow( this );
diff --git a/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx b/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx
index 01b8dafa0f2c..acabff40f123 100644
--- a/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx
+++ b/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -70,7 +70,7 @@ rtl::OUString CFURLtoOSLURL( CFURLRef i_xURL );
class MacPluginComm :
public PluginComm,
public ::vcl::SolarThreadExecutor
-
+
{
enum CallType {
eNPP_Destroy,
@@ -92,13 +92,13 @@ class MacPluginComm :
eNP_Initialize
};
- void* m_aArgs[ 8 ];
- CallType m_eCall;
-
- virtual long doIt();
+ void* m_aArgs[ 8 ];
+ CallType m_eCall;
+
+ virtual long doIt();
public:
MacPluginComm( const rtl::OUString& rMIME, const rtl::OUString& rName, NSView* pView );
- virtual ~MacPluginComm();
+ virtual ~MacPluginComm();
// FIXME:
// this actually should be from the NP headers
@@ -111,39 +111,39 @@ public:
} NP_CGContext;
public:
- virtual NPError NPP_Destroy( NPP instance, NPSavedData** save );
- virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream, NPError reason );
- virtual void * NPP_GetJavaClass();
- virtual NPError NPP_Initialize();
- virtual NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
+ virtual NPError NPP_Destroy( NPP instance, NPSavedData** save );
+ virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream, NPError reason );
+ virtual void * NPP_GetJavaClass();
+ virtual NPError NPP_Initialize();
+ virtual NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
char* argn[], char* argv[], NPSavedData *saved );
- virtual NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream,
+ virtual NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream,
NPBool seekable, uint16* stype );
- virtual void NPP_Print( NPP instance, NPPrint* platformPrint );
- virtual NPError NPP_SetWindow( NPP instance, NPWindow* window );
- virtual void NPP_Shutdown();
- virtual void NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname );
- virtual void NPP_URLNotify( NPP instance, const char* url,
+ virtual void NPP_Print( NPP instance, NPPrint* platformPrint );
+ virtual NPError NPP_SetWindow( NPP instance, NPWindow* window );
+ virtual void NPP_Shutdown();
+ virtual void NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname );
+ virtual void NPP_URLNotify( NPP instance, const char* url,
NPReason reason, void* notifyData );
- virtual int32 NPP_Write( NPP instance, NPStream* stream, int32 offset,
+ virtual int32 NPP_Write( NPP instance, NPStream* stream, int32 offset,
int32 len, void* buffer );
- virtual int32 NPP_WriteReady( NPP instance, NPStream* stream );
- virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void *ret_value );
- virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, void *ret_value );
+ virtual int32 NPP_WriteReady( NPP instance, NPStream* stream );
+ virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void *ret_value );
+ virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, void *ret_value );
virtual int16 NPP_HandleEvent( NPP instance, void* event );
virtual NPError NPP_SetWindow( XPlugin_Impl* );
virtual NPError NPP_Destroy( XPlugin_Impl*, NPSavedData** save );
-
+
void drawView( XPlugin_Impl* );
private:
- BOOL retrieveFunction( const char* i_pName, void** i_ppFunc ) const;
+ BOOL retrieveFunction( const char* i_pName, void** i_ppFunc ) const;
DECL_LINK( NullTimerHdl, void* );
-
+
private:
CFBundleRef m_xBundle;
- oslModule m_hPlugLib;
- NPPluginFuncs m_aNPPfuncs;
+ oslModule m_hPlugLib;
+ NPPluginFuncs m_aNPPfuncs;
// timer for sending nullEvents
AutoTimer* m_pNullTimer;
diff --git a/extensions/source/plugin/inc/plugin/impl.hxx b/extensions/source/plugin/inc/plugin/impl.hxx
index a11460eb384f..99bedc5da5ce 100644
--- a/extensions/source/plugin/inc/plugin/impl.hxx
+++ b/extensions/source/plugin/inc/plugin/impl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,11 +69,11 @@
#include <list>
-#ifdef WNT
+#ifdef WNT
#include "plugin/win/sysplug.hxx"
#endif
-#ifdef WNT
+#ifdef WNT
#include <plugin/win/sysplug.hxx>
#elif defined(OS2)
#include "plugin/os2/sysplug.hxx"
@@ -100,9 +100,9 @@ typedef int SysPlugData;
using namespace com::sun::star::uno;
-#define PROVIDING_NONE 0
-#define PROVIDING_NOW 1
-#define PROVIDING_MODEL_UPDATE 2
+#define PROVIDING_NONE 0
+#define PROVIDING_NOW 1
+#define PROVIDING_MODEL_UPDATE 2
// forwards
namespace ucbhelper { class Content; }
@@ -118,36 +118,36 @@ class XPlugin_Impl : public com::sun::star::plugin::XPlugin,
public com::sun::star::beans::XPropertyChangeListener
{
private:
- ::osl::Mutex m_aMutex;
- Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
- Reference< com::sun::star::plugin::XPluginContext > m_rBrowserContext;
+ ::osl::Mutex m_aMutex;
+ Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ Reference< com::sun::star::plugin::XPluginContext > m_rBrowserContext;
- PluginComm* m_pPluginComm;
- NPP_t m_aInstance;
- NPWindow m_aNPWindow;
+ PluginComm* m_pPluginComm;
+ NPP_t m_aInstance;
+ NPWindow m_aNPWindow;
SysPlugData m_aSysPlugData;
- rtl_TextEncoding m_aEncoding;
+ rtl_TextEncoding m_aEncoding;
- const char** m_pArgv;
- const char** m_pArgn;
- int m_nArgs;
- rtl::OString m_aLastGetUrl;
+ const char** m_pArgv;
+ const char** m_pArgn;
+ int m_nArgs;
+ rtl::OString m_aLastGetUrl;
- Reference< com::sun::star::awt::XControlModel > m_xModel;
+ Reference< com::sun::star::awt::XControlModel > m_xModel;
- ::com::sun::star::plugin::PluginDescription m_aDescription;
- sal_Int16 m_aPluginMode;
+ ::com::sun::star::plugin::PluginDescription m_aDescription;
+ sal_Int16 m_aPluginMode;
- int m_nProvidingState;
- int m_nCalledFromPlugin;
- PluginDisposer* m_pDisposer;
+ int m_nProvidingState;
+ int m_nCalledFromPlugin;
+ PluginDisposer* m_pDisposer;
- ::std::list<PluginInputStream*> m_aInputStreams;
- ::std::list<PluginOutputStream*> m_aOutputStreams;
- ::std::list<PluginEventListener*> m_aPEventListeners;
- ::rtl::OUString m_aURL;
+ ::std::list<PluginInputStream*> m_aInputStreams;
+ ::std::list<PluginOutputStream*> m_aOutputStreams;
+ ::std::list<PluginEventListener*> m_aPEventListeners;
+ ::rtl::OUString m_aURL;
- sal_Bool m_bIsDisposed;
+ sal_Bool m_bIsDisposed;
void prependArg( const char* pName, const char* pValue ); // arguments will be strdup'ed
void initArgs( const Sequence< rtl::OUString >& argn,
@@ -155,7 +155,7 @@ private:
sal_Int16 mode );
void freeArgs();
void handleSpecialArgs();
-
+
void loadPlugin();
void destroyInstance();
void modelChanged();
@@ -165,7 +165,7 @@ public:
virtual ~XPlugin_Impl();
::osl::Mutex& getMutex() { return m_aMutex; }
-
+
void destroyStreams();
void setLastGetUrl( const rtl::OString& rUrl ) { m_aLastGetUrl = rUrl; }
@@ -174,8 +174,8 @@ public:
::std::list<PluginInputStream*>& getInputStreams() { return m_aInputStreams; }
::std::list<PluginOutputStream*>& getOutputStreams() { return m_aOutputStreams; }
- PluginComm* getPluginComm() { return m_pPluginComm; }
- void setPluginComm( PluginComm* comm )
+ PluginComm* getPluginComm() { return m_pPluginComm; }
+ void setPluginComm( PluginComm* comm )
{
if( ! m_pPluginComm )
{
@@ -186,32 +186,32 @@ public:
Reference< com::sun::star::lang::XMultiServiceFactory > getServiceManager() { return m_xSMgr; }
const com::sun::star::plugin::PluginDescription& getDescription() const { return m_aDescription; }
rtl_TextEncoding getTextEncoding() { return m_aEncoding; }
- NPP getNPPInstance() { return &m_aInstance; }
- NPWindow* getNPWindow() { return &m_aNPWindow; }
+ NPP getNPPInstance() { return &m_aInstance; }
+ NPWindow* getNPWindow() { return &m_aNPWindow; }
SysPlugData& getSysPlugData() { return m_aSysPlugData; }
- void enterPluginCallback() { m_nCalledFromPlugin++; }
- void leavePluginCallback() { m_nCalledFromPlugin--; }
- sal_Bool isDisposable() { return m_nCalledFromPlugin < 1 ? sal_True : sal_False; }
- DECL_LINK( secondLevelDispose, XPlugin_Impl* );
+ void enterPluginCallback() { m_nCalledFromPlugin++; }
+ void leavePluginCallback() { m_nCalledFromPlugin--; }
+ sal_Bool isDisposable() { return m_nCalledFromPlugin < 1 ? sal_True : sal_False; }
+ DECL_LINK( secondLevelDispose, XPlugin_Impl* );
void addPluginEventListener( PluginEventListener* pListener )
{ m_aPEventListeners.push_back( pListener ); }
void checkListeners( const char* normalizedURL );
-
- void initInstance(
+
+ void initInstance(
const com::sun::star::plugin::PluginDescription& rDescription,
const Sequence< rtl::OUString >& argn,
const Sequence< rtl::OUString >& argv,
sal_Int16 mode );
- void initInstance(
+ void initInstance(
const rtl::OUString& rURL,
const Sequence< rtl::OUString >& argn,
const Sequence< rtl::OUString >& argv,
sal_Int16 mode );
- const rtl::OUString& getRefererURL() { return m_aURL; }
- ::rtl::OUString getCreationURL();
+ const rtl::OUString& getRefererURL() { return m_aURL; }
+ ::rtl::OUString getCreationURL();
PluginStream* getStreamFromNPStream( NPStream* );
@@ -223,11 +223,11 @@ public:
void setPluginContext( const Reference< com::sun::star::plugin::XPluginContext > & );
void secondLevelDispose();
-
-// static const Reference< com::sun::star::reflection::XIdlClass > & staticGetIdlClass();
+
+// static const Reference< com::sun::star::reflection::XIdlClass > & staticGetIdlClass();
// XInterface
- virtual Any SAL_CALL queryInterface( const Type& ) throw( com::sun::star::uno::RuntimeException );
+ virtual Any SAL_CALL queryInterface( const Type& ) throw( com::sun::star::uno::RuntimeException );
virtual void SAL_CALL acquire() throw()
{ OWeakAggObject::acquire(); }
virtual void SAL_CALL release() throw()
@@ -258,12 +258,12 @@ public:
class PluginManager
{
private:
- Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
- ::std::list<PluginComm*> m_aPluginComms;
- ::std::list<XPlugin_Impl*> m_aAllPlugins;
- ::osl::Mutex m_aPluginMutex;
+ Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ ::std::list<PluginComm*> m_aPluginComms;
+ ::std::list<XPlugin_Impl*> m_aAllPlugins;
+ ::osl::Mutex m_aPluginMutex;
- static PluginManager* pManager;
+ static PluginManager* pManager;
PluginManager();
public:
@@ -280,7 +280,7 @@ public:
class XPluginManager_Impl :
public cppu::WeakAggImplHelper1< com::sun::star::plugin::XPluginManager >
{
- Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
public:
XPluginManager_Impl( const Reference< com::sun::star::lang::XMultiServiceFactory > & );
virtual ~XPluginManager_Impl();
@@ -302,10 +302,10 @@ public:
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw();
virtual rtl::OUString SAL_CALL getImplementationName() throw();
-
+
Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( );
static Sequence< rtl::OUString > getSupportedServiceNames_Static(void) throw( );
- static rtl::OUString getImplementationName_Static() throw( )
+ static rtl::OUString getImplementationName_Static() throw( )
{
/** the soplayer uses this name in its source! maybe not after 5.2 */
return rtl::OUString::createFromAscii( "com.sun.star.extensions.PluginManager" );
@@ -318,8 +318,8 @@ enum PluginStreamType { InputStream, OutputStream };
class PluginStream
{
protected:
- XPlugin_Impl* m_pPlugin;
- NPStream m_aNPStream;
+ XPlugin_Impl* m_pPlugin;
+ NPStream m_aNPStream;
public:
PluginStream( XPlugin_Impl* pPlugin,
const char* url, sal_uInt32 len, sal_uInt32 lastmod );
@@ -339,26 +339,26 @@ class PluginInputStream :
>
{
private:
- ::ucbhelper::Content* m_pContent;
- sal_Int32 m_nMode;
- UINT32 m_nWritePos;
+ ::ucbhelper::Content* m_pContent;
+ sal_Int32 m_nMode;
+ UINT32 m_nWritePos;
- Reference< com::sun::star::io::XActiveDataSource > m_xSource;
+ Reference< com::sun::star::io::XActiveDataSource > m_xSource;
// hold a reference on input until closeOutput is called
-
- Reference< com::sun::star::io::XConnectable > m_xPredecessor;
- Reference< com::sun::star::io::XConnectable > m_xSuccessor;
+
+ Reference< com::sun::star::io::XConnectable > m_xPredecessor;
+ Reference< com::sun::star::io::XConnectable > m_xSuccessor;
// needed to hold a reference to self in NP_SEEK mode
- Reference< com::sun::star::io::XOutputStream > m_xSelf;
-
- SvFileStream m_aFileStream;
+ Reference< com::sun::star::io::XOutputStream > m_xSelf;
+
+ SvFileStream m_aFileStream;
public:
PluginInputStream( XPlugin_Impl* pPlugin,
const char* url, UINT32 len, UINT32 lastmod );
PluginInputStream() : PluginStream( NULL, NULL, 0, 0 ) {}
-
+
virtual ~PluginInputStream();
virtual PluginStreamType getStreamType();
@@ -370,7 +370,7 @@ public:
void load();
// clear reference
- bool releaseSelf()
+ bool releaseSelf()
{ bool bRet = m_xSelf.is(); m_xSelf.clear(); return bRet; }
// XOutputStream
@@ -393,7 +393,7 @@ public:
class PluginOutputStream : public PluginStream
{
private:
- Reference< com::sun::star::io::XOutputStream > m_xStream;
+ Reference< com::sun::star::io::XOutputStream > m_xStream;
public:
PluginOutputStream( XPlugin_Impl* pPlugin, const char* url,
sal_uInt32 len, sal_uInt32 lastmod );
@@ -408,11 +408,11 @@ class PluginEventListener :
public cppu::WeakAggImplHelper1< com::sun::star::lang::XEventListener >
{
private:
- XPlugin_Impl* m_pPlugin;
- Reference< com::sun::star::plugin::XPlugin > m_xPlugin; // just to hold the plugin
- char* m_pUrl;
- char* m_pNormalizedUrl;
- void* m_pNotifyData;
+ XPlugin_Impl* m_pPlugin;
+ Reference< com::sun::star::plugin::XPlugin > m_xPlugin; // just to hold the plugin
+ char* m_pUrl;
+ char* m_pNormalizedUrl;
+ void* m_pNotifyData;
public:
PluginEventListener( XPlugin_Impl*,
const char* url,
@@ -422,8 +422,8 @@ public:
const char* getURL() { return m_pUrl; }
const char* getNormalizedURL() { return m_pNormalizedUrl; }
- void* getNotifyData() { return m_pNotifyData; }
-
+ void* getNotifyData() { return m_pNotifyData; }
+
// com::sun::star::lang::XEventListener
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw();
};
diff --git a/extensions/source/plugin/inc/plugin/model.hxx b/extensions/source/plugin/inc/plugin/model.hxx
index 8832b8ed1f75..91dfea02e32f 100644
--- a/extensions/source/plugin/inc/plugin/model.hxx
+++ b/extensions/source/plugin/inc/plugin/model.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,7 +56,7 @@ public:
~BroadcasterHelperHolder() {}
::cppu::OBroadcastHelper& getHelper() { return m_aHelper; }
-
+
};
class PluginModel : public BroadcasterHelperHolder,
@@ -111,7 +111,7 @@ class PluginModel : public BroadcasterHelperHolder,
// OPropertySetHelper
virtual cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
virtual sal_Bool SAL_CALL convertFastPropertyValue( Any & rConvertedValue,
- Any & rOldValue,
+ Any & rOldValue,
sal_Int32 nHandle,
const Any& rValue ) throw();
virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle,
diff --git a/extensions/source/plugin/inc/plugin/multiplx.hxx b/extensions/source/plugin/inc/plugin/multiplx.hxx
index 27c29785721f..4544304b785e 100644
--- a/extensions/source/plugin/inc/plugin/multiplx.hxx
+++ b/extensions/source/plugin/inc/plugin/multiplx.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -63,7 +63,7 @@ struct MRCListenerMultiplexerHelper_Mutex
::osl::Mutex aMutex;
};
-class MRCListenerMultiplexerHelper :
+class MRCListenerMultiplexerHelper :
public MRCListenerMultiplexerHelper_Mutex,
public ::cppu::WeakAggImplHelper7<
@@ -79,17 +79,17 @@ public:
/**
* Create a Multiplexer of XWindowEvents.
*
- * @param rControl The control. All listeners think that this is the original
- * broadcaster.
- * @param rPeer The peer from which the original events are dispatched. Null is
- * allowed.
+ * @param rControl The control. All listeners think that this is the original
+ * broadcaster.
+ * @param rPeer The peer from which the original events are dispatched. Null is
+ * allowed.
*/
MRCListenerMultiplexerHelper( const Reference< ::com::sun::star::awt::XWindow > & rControl, const Reference< ::com::sun::star::awt::XWindow > & rPeer );
/**
* Remove all listeners from the previous set peer and add the needed listeners to rPeer.
- * @param rPeer The peer from which the original events are dispatched. Null is
- * allowed.
+ * @param rPeer The peer from which the original events are dispatched. Null is
+ * allowed.
*/
void setPeer( const Reference< ::com::sun::star::awt::XWindow > & rPeer );
@@ -108,61 +108,61 @@ public:
void unadvise(const Type& type, const Reference< XInterface > & listener);
// ::com::sun::star::lang::XEventListener
- void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw();
+ void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw();
// ::com::sun::star::awt::XFocusListener
- void SAL_CALL focusGained(const ::com::sun::star::awt::FocusEvent& e) throw();
- void SAL_CALL focusLost(const ::com::sun::star::awt::FocusEvent& e) throw();
+ void SAL_CALL focusGained(const ::com::sun::star::awt::FocusEvent& e) throw();
+ void SAL_CALL focusLost(const ::com::sun::star::awt::FocusEvent& e) throw();
// ::com::sun::star::awt::XWindowListener
- void SAL_CALL windowResized(const ::com::sun::star::awt::WindowEvent& e) throw();
- void SAL_CALL windowMoved(const ::com::sun::star::awt::WindowEvent& e) throw();
- void SAL_CALL windowShown(const ::com::sun::star::lang::EventObject& e) throw();
- void SAL_CALL windowHidden(const ::com::sun::star::lang::EventObject& e) throw();
+ void SAL_CALL windowResized(const ::com::sun::star::awt::WindowEvent& e) throw();
+ void SAL_CALL windowMoved(const ::com::sun::star::awt::WindowEvent& e) throw();
+ void SAL_CALL windowShown(const ::com::sun::star::lang::EventObject& e) throw();
+ void SAL_CALL windowHidden(const ::com::sun::star::lang::EventObject& e) throw();
// ::com::sun::star::awt::XKeyListener
- void SAL_CALL keyPressed( const ::com::sun::star::awt::KeyEvent& e ) throw();
- void SAL_CALL keyReleased( const ::com::sun::star::awt::KeyEvent& e ) throw();
+ void SAL_CALL keyPressed( const ::com::sun::star::awt::KeyEvent& e ) throw();
+ void SAL_CALL keyReleased( const ::com::sun::star::awt::KeyEvent& e ) throw();
// ::com::sun::star::awt::XMouseListener
- void SAL_CALL mousePressed(const ::com::sun::star::awt::MouseEvent& e) throw();
- void SAL_CALL mouseReleased(const ::com::sun::star::awt::MouseEvent& e) throw();
- void SAL_CALL mouseEntered(const ::com::sun::star::awt::MouseEvent& e) throw();
- void SAL_CALL mouseExited(const ::com::sun::star::awt::MouseEvent& e) throw();
+ void SAL_CALL mousePressed(const ::com::sun::star::awt::MouseEvent& e) throw();
+ void SAL_CALL mouseReleased(const ::com::sun::star::awt::MouseEvent& e) throw();
+ void SAL_CALL mouseEntered(const ::com::sun::star::awt::MouseEvent& e) throw();
+ void SAL_CALL mouseExited(const ::com::sun::star::awt::MouseEvent& e) throw();
// ::com::sun::star::awt::XMouseMotionListener
- void SAL_CALL mouseDragged(const ::com::sun::star::awt::MouseEvent& e) throw();
- void SAL_CALL mouseMoved(const ::com::sun::star::awt::MouseEvent& e) throw();
+ void SAL_CALL mouseDragged(const ::com::sun::star::awt::MouseEvent& e) throw();
+ void SAL_CALL mouseMoved(const ::com::sun::star::awt::MouseEvent& e) throw();
// ::com::sun::star::awt::XPaintListener
- void SAL_CALL windowPaint(const ::com::sun::star::awt::PaintEvent& e) throw();
+ void SAL_CALL windowPaint(const ::com::sun::star::awt::PaintEvent& e) throw();
// ::com::sun::star::awt::XTopWindowListener
- void SAL_CALL windowOpened( const ::com::sun::star::lang::EventObject& e ) throw();
- void SAL_CALL windowClosing( const ::com::sun::star::lang::EventObject& e ) throw();
- void SAL_CALL windowClosed( const ::com::sun::star::lang::EventObject& e ) throw();
- void SAL_CALL windowMinimized( const ::com::sun::star::lang::EventObject& e ) throw();
- void SAL_CALL windowNormalized( const ::com::sun::star::lang::EventObject& e ) throw();
- void SAL_CALL windowActivated( const ::com::sun::star::lang::EventObject& e ) throw();
- void SAL_CALL windowDeactivated( const ::com::sun::star::lang::EventObject& e ) throw();
+ void SAL_CALL windowOpened( const ::com::sun::star::lang::EventObject& e ) throw();
+ void SAL_CALL windowClosing( const ::com::sun::star::lang::EventObject& e ) throw();
+ void SAL_CALL windowClosed( const ::com::sun::star::lang::EventObject& e ) throw();
+ void SAL_CALL windowMinimized( const ::com::sun::star::lang::EventObject& e ) throw();
+ void SAL_CALL windowNormalized( const ::com::sun::star::lang::EventObject& e ) throw();
+ void SAL_CALL windowActivated( const ::com::sun::star::lang::EventObject& e ) throw();
+ void SAL_CALL windowDeactivated( const ::com::sun::star::lang::EventObject& e ) throw();
protected:
/**
* Remove the listener with the uik rUik from the peer rPeer.
- * @param rPeer the peer from which the listener is removed.
- * @param rUik the listener uik, which specify the type of the listener.
+ * @param rPeer the peer from which the listener is removed.
+ * @param rUik the listener uik, which specify the type of the listener.
*/
- void adviseToPeer( const Reference< ::com::sun::star::awt::XWindow > & rPeer, const Type & type );
+ void adviseToPeer( const Reference< ::com::sun::star::awt::XWindow > & rPeer, const Type & type );
/**
* Add the listener with the uik rUik to the peer rPeer.
- * @param rPeer the peer to which the listener is added.
- * @param rUik the listener uik, which specify the type of the listener.
+ * @param rPeer the peer to which the listener is added.
+ * @param rUik the listener uik, which specify the type of the listener.
*/
- void unadviseFromPeer( const Reference< ::com::sun::star::awt::XWindow > & rPeer, const Type & type );
+ void unadviseFromPeer( const Reference< ::com::sun::star::awt::XWindow > & rPeer, const Type & type );
private:
/** The source of the events. Normally this is the peer object.*/
- Reference< ::com::sun::star::awt::XWindow > xPeer;
- WeakReference< ::com::sun::star::awt::XControl > xControl;
- ::cppu::OMultiTypeInterfaceContainerHelper aListenerHolder;
+ Reference< ::com::sun::star::awt::XWindow > xPeer;
+ WeakReference< ::com::sun::star::awt::XControl > xControl;
+ ::cppu::OMultiTypeInterfaceContainerHelper aListenerHolder;
MRCListenerMultiplexerHelper( const MRCListenerMultiplexerHelper & );
MRCListenerMultiplexerHelper & operator = ( const MRCListenerMultiplexerHelper & );
};
-#endif // _MRC_MULTIPLX_HXX
+#endif // _MRC_MULTIPLX_HXX
diff --git a/extensions/source/plugin/inc/plugin/plcom.hxx b/extensions/source/plugin/inc/plugin/plcom.hxx
index b23fc6c6ada9..8775a8450e16 100644
--- a/extensions/source/plugin/inc/plugin/plcom.hxx
+++ b/extensions/source/plugin/inc/plugin/plcom.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,9 +36,9 @@ class XPlugin_Impl;
class PluginComm
{
protected:
- int m_nRefCount;
- ::rtl::OString m_aLibName;
- std::list< String > m_aFilesToDelete;
+ int m_nRefCount;
+ ::rtl::OString m_aLibName;
+ std::list< String > m_aFilesToDelete;
public:
PluginComm( const ::rtl::OString& rLibName, bool bReusable = true );
virtual ~PluginComm();
@@ -78,7 +78,7 @@ public:
virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void* value ) = 0;
virtual NPError NPP_SetValue( NPP instance, NPNVariable variable,
void *value) = 0;
-
+
virtual NPError NPP_SetWindow( XPlugin_Impl* );
virtual NPError NPP_Destroy( XPlugin_Impl*, NPSavedData** save );
};
diff --git a/extensions/source/plugin/inc/plugin/plctrl.hxx b/extensions/source/plugin/inc/plugin/plctrl.hxx
index 06ee50cb8e0a..c98199213512 100644
--- a/extensions/source/plugin/inc/plugin/plctrl.hxx
+++ b/extensions/source/plugin/inc/plugin/plctrl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,33 +80,33 @@ public:
{ _xContext = xContext; }
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getContext() throw( ::com::sun::star::uno::RuntimeException )
{ return _xContext; }
-
+
virtual sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & Model ) throw( ::com::sun::star::uno::RuntimeException ) = 0;
-// { DBG_ERROR( "### setModel() illegal on plugincontrol!" ); return sal_False; }
+// { DBG_ERROR( "### setModel() illegal on plugincontrol!" ); return sal_False; }
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel() throw( ::com::sun::star::uno::RuntimeException ) = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > SAL_CALL getView() throw( ::com::sun::star::uno::RuntimeException )
{ return (::com::sun::star::awt::XView*)this; }
-
+
virtual sal_Bool SAL_CALL isTransparent() throw( ::com::sun::star::uno::RuntimeException )
{ return sal_False; }
-
+
virtual void SAL_CALL setDesignMode( sal_Bool bOn ) throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL isDesignMode() throw( ::com::sun::star::uno::RuntimeException )
{ return _bInDesignMode; }
-
+
virtual void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > & xToolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > & Parent) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > SAL_CALL getPeer() throw( ::com::sun::star::uno::RuntimeException )
{ return _xPeer; }
-
+
// ::com::sun::star::awt::XWindow
virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setEnable( sal_Bool bEnable ) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setFocus(void) throw( ::com::sun::star::uno::RuntimeException );
-
+
virtual void SAL_CALL setPosSize( sal_Int32 nX_, sal_Int32 nY_, sal_Int32 nWidth_, sal_Int32 nHeight_, sal_Int16 nFlags ) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize(void) throw( ::com::sun::star::uno::RuntimeException );
-
+
virtual void SAL_CALL addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
@@ -125,11 +125,11 @@ public:
// ::com::sun::star::awt::XFocusListener
virtual void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent & rEvt ) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent & rEvt ) throw( ::com::sun::star::uno::RuntimeException );
-
+
// ::com::sun::star::lang::XComponent
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & l ) throw( ::com::sun::star::uno::RuntimeException );
-
+
virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException );
// ::com::sun::star::awt::XView
@@ -137,44 +137,44 @@ public:
{ return sal_False; }
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > SAL_CALL getGraphics(void) throw( ::com::sun::star::uno::RuntimeException )
{ return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > (); }
-
- virtual ::com::sun::star::awt::Size SAL_CALL getSize(void) throw( ::com::sun::star::uno::RuntimeException )
+
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize(void) throw( ::com::sun::star::uno::RuntimeException )
{ return ::com::sun::star::awt::Size(_nWidth, _nHeight); }
-
+
virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y ) throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setZoom( float ZoomX, float ZoomY ) throw( ::com::sun::star::uno::RuntimeException );
public:
PluginControl_Impl();
- virtual ~PluginControl_Impl();
-
+ virtual ~PluginControl_Impl();
+
MRCListenerMultiplexerHelper* getMultiplexer();
protected:
- void releasePeer();
-
+ void releasePeer();
+
protected:
- ::std::list< Reference< ::com::sun::star::lang::XEventListener > > _aDisposeListeners;
- MRCListenerMultiplexerHelper* _pMultiplexer;
-
- Reference< XInterface > _xContext;
-
- sal_Int32 _nX;
- sal_Int32 _nY;
- sal_Int32 _nWidth;
- sal_Int32 _nHeight;
- sal_Int16 _nFlags;
-
- sal_Bool _bVisible;
- sal_Bool _bInDesignMode;
- sal_Bool _bEnable;
-
- SystemChildWindow* _pSysChild;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > _xPeer;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > _xPeerWindow;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > _xParentWindow;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > _xParentPeer;
+ ::std::list< Reference< ::com::sun::star::lang::XEventListener > > _aDisposeListeners;
+ MRCListenerMultiplexerHelper* _pMultiplexer;
+
+ Reference< XInterface > _xContext;
+
+ sal_Int32 _nX;
+ sal_Int32 _nY;
+ sal_Int32 _nWidth;
+ sal_Int32 _nHeight;
+ sal_Int16 _nFlags;
+
+ sal_Bool _bVisible;
+ sal_Bool _bInDesignMode;
+ sal_Bool _bEnable;
+
+ SystemChildWindow* _pSysChild;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > _xPeer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > _xPeerWindow;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > _xParentWindow;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > _xParentPeer;
};
#endif
diff --git a/extensions/source/plugin/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx
index acf73c498a6c..1c847bb88e08 100644
--- a/extensions/source/plugin/inc/plugin/unx/mediator.hxx
+++ b/extensions/source/plugin/inc/plugin/unx/mediator.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,10 +44,10 @@
struct MediatorMessage
{
- ULONG m_nID;
- ULONG m_nBytes;
- char* m_pBytes;
- char* m_pRun;
+ ULONG m_nID;
+ ULONG m_nBytes;
+ char* m_pBytes;
+ char* m_pRun;
MediatorMessage() : m_nID( 0 ), m_nBytes( 0 ),
m_pBytes( NULL ), m_pRun( NULL ) {}
@@ -73,13 +73,13 @@ struct MediatorMessage
memcpy( m_pBytes, pBytes, (size_t)m_nBytes );
}
- ULONG ExtractULONG();
- char* GetString();
- UINT32 GetUINT32();
- void* GetBytes( ULONG& );
- void* GetBytes() { ULONG nBytes; return GetBytes( nBytes ); }
+ ULONG ExtractULONG();
+ char* GetString();
+ UINT32 GetUINT32();
+ void* GetBytes( ULONG& );
+ void* GetBytes() { ULONG nBytes; return GetBytes( nBytes ); }
- void Rewind() { m_pRun = NULL; }
+ void Rewind() { m_pRun = NULL; }
};
class MediatorListener;
@@ -88,22 +88,22 @@ class Mediator
{
friend class MediatorListener;
protected:
- int m_nSocket;
+ int m_nSocket;
- std::vector<MediatorMessage*> m_aMessageQueue;
+ std::vector<MediatorMessage*> m_aMessageQueue;
osl::Mutex m_aQueueMutex;
osl::Mutex m_aSendMutex;
// only one thread can send a message at any given time
osl::Condition m_aNewMessageCdtn;
- MediatorListener* m_pListener;
+ MediatorListener* m_pListener;
// thread to fill the queue
- ULONG m_nCurrentID;
+ ULONG m_nCurrentID;
// will be constantly increased with each message sent
- bool m_bValid;
+ bool m_bValid;
- Link m_aConnectionLostHdl;
- Link m_aNewMessageHdl;
+ Link m_aConnectionLostHdl;
+ Link m_aNewMessageHdl;
public:
Mediator( int nSocket );
~Mediator();
@@ -155,7 +155,7 @@ class MediatorListener : public osl::Thread
{
friend class Mediator;
private:
- Mediator* m_pMediator;
+ Mediator* m_pMediator;
::osl::Mutex m_aMutex;
MediatorListener( Mediator* );
diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
index 7db023161249..491fdf4475a5 100644
--- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
+++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,15 +39,15 @@
# define USE_MOTIF
#endif
-#define Window XLIB_Window
-#define Font XLIB_Font
-#define KeyCode XLIB_KeyCode
-#define Time XLIB_Time
-#define Cursor XLIB_Cursor
-#define Region XLIB_Region
-#define String XLIB_String
-#define Boolean XLIB_Boolean
-#define XPointer XLIB_XPointer
+#define Window XLIB_Window
+#define Font XLIB_Font
+#define KeyCode XLIB_KeyCode
+#define Time XLIB_Time
+#define Cursor XLIB_Cursor
+#define Region XLIB_Region
+#define String XLIB_String
+#define Boolean XLIB_Boolean
+#define XPointer XLIB_XPointer
#include <X11/Xlib.h>
extern "C" {
#include <X11/Intrinsic.h>
@@ -137,17 +137,17 @@ extern "C" {
class ConnectorInstance
{
public:
- NPP instance;
- NPWindow window;
- NPSetWindowCallbackStruct ws_info;
- char* pMimeType;
- void* pShell;
- void* pWidget;
- void* pForm;
-
+ NPP instance;
+ NPWindow window;
+ NPSetWindowCallbackStruct ws_info;
+ char* pMimeType;
+ void* pShell;
+ void* pWidget;
+ void* pForm;
+
GtkWidget* pGtkWindow;
GtkWidget* pGtkWidget;
-
+
bool bShouldUseXEmbed;
int nArg;
@@ -170,29 +170,29 @@ protected:
osl::Mutex m_aUserEventMutex;
static std::vector<PluginConnector*> allConnectors;
-
+
DECL_LINK( NewMessageHdl, Mediator* );
DECL_LINK( WorkOnNewMessageHdl, Mediator* );
-
+
std::vector<NPStream*> m_aNPWrapStreams;
std::vector<ConnectorInstance*> m_aInstances;
-
- ULONG FillBuffer( char*&, const char*, ULONG, va_list );
+
+ ULONG FillBuffer( char*&, const char*, ULONG, va_list );
public:
PluginConnector( int nSocket );
~PluginConnector();
virtual MediatorMessage* WaitForAnswer( ULONG nMessageID );
- MediatorMessage* Transact( const char*, ULONG, ... );
- MediatorMessage* Transact( UINT32, ... );
- void Respond( ULONG nID, char*, ULONG, ... );
- ULONG Send( UINT32, ... );
+ MediatorMessage* Transact( const char*, ULONG, ... );
+ MediatorMessage* Transact( UINT32, ... );
+ void Respond( ULONG nID, char*, ULONG, ... );
+ ULONG Send( UINT32, ... );
static const UINT32 UnknownStreamID = 0xffffffff;
static const UINT32 UnknownNPPID = 0xffffffff;
- UINT32 GetStreamID( NPStream* pStream );
- UINT32 GetNPPID( NPP );
+ UINT32 GetStreamID( NPStream* pStream );
+ UINT32 GetNPPID( NPP );
std::vector<NPStream*>& getStreamList() { return m_aNPWrapStreams; }
@@ -209,7 +209,7 @@ public:
LINK( this, PluginConnector, WorkOnNewMessageHdl ).
Call( (Mediator*)this );
}
-
+
ConnectorInstance* getInstance( NPP );
ConnectorInstance* getInstanceById( UINT32 );
};
diff --git a/extensions/source/plugin/inc/plugin/unx/sysplug.hxx b/extensions/source/plugin/inc/plugin/unx/sysplug.hxx
index df44c149e30a..69d64f7ac514 100644
--- a/extensions/source/plugin/inc/plugin/unx/sysplug.hxx
+++ b/extensions/source/plugin/inc/plugin/unx/sysplug.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,9 +37,9 @@
class UnxPluginComm : public PluginComm, public PluginConnector
{
private:
- static int nConnCounter;
+ static int nConnCounter;
- pid_t m_nCommPID;
+ pid_t m_nCommPID;
public:
UnxPluginComm( const String& mimetype,
const String& library,
diff --git a/extensions/source/plugin/inc/plugin/win/sysplug.hxx b/extensions/source/plugin/inc/plugin/win/sysplug.hxx
index 45e09d98d950..4161312b4988 100644
--- a/extensions/source/plugin/inc/plugin/win/sysplug.hxx
+++ b/extensions/source/plugin/inc/plugin/win/sysplug.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,7 +58,7 @@
class PluginComm_Impl :
public PluginComm,
public ::vcl::SolarThreadExecutor
-
+
{
enum CallType {
eNPP_Destroy,
@@ -79,45 +79,45 @@ class PluginComm_Impl :
eNP_Initialize
};
- void* m_aArgs[ 8 ];
- CallType m_eCall;
-
- virtual long doIt();
+ void* m_aArgs[ 8 ];
+ CallType m_eCall;
+
+ virtual long doIt();
public:
PluginComm_Impl( const rtl::OUString& rMIME, const rtl::OUString& rName, HWND hWnd );
- virtual ~PluginComm_Impl();
-
+ virtual ~PluginComm_Impl();
+
public:
using PluginComm::NPP_Destroy;
- virtual NPError NPP_Destroy( NPP instance, NPSavedData** save );
- virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream, NPError reason );
- virtual void * NPP_GetJavaClass();
- virtual NPError NPP_Initialize();
- virtual NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
+ virtual NPError NPP_Destroy( NPP instance, NPSavedData** save );
+ virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream, NPError reason );
+ virtual void * NPP_GetJavaClass();
+ virtual NPError NPP_Initialize();
+ virtual NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
char* argn[], char* argv[], NPSavedData *saved );
- virtual NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream,
+ virtual NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream,
NPBool seekable, uint16* stype );
- virtual void NPP_Print( NPP instance, NPPrint* platformPrint );
-
+ virtual void NPP_Print( NPP instance, NPPrint* platformPrint );
+
using PluginComm::NPP_SetWindow;
- virtual NPError NPP_SetWindow( NPP instance, NPWindow* window );
- virtual void NPP_Shutdown();
- virtual void NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname );
- virtual void NPP_URLNotify( NPP instance, const char* url,
+ virtual NPError NPP_SetWindow( NPP instance, NPWindow* window );
+ virtual void NPP_Shutdown();
+ virtual void NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname );
+ virtual void NPP_URLNotify( NPP instance, const char* url,
NPReason reason, void* notifyData );
- virtual int32 NPP_Write( NPP instance, NPStream* stream, int32 offset,
+ virtual int32 NPP_Write( NPP instance, NPStream* stream, int32 offset,
int32 len, void* buffer );
- virtual int32 NPP_WriteReady( NPP instance, NPStream* stream );
- virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void *ret_alue );
- virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, void *ret_alue );
-
+ virtual int32 NPP_WriteReady( NPP instance, NPStream* stream );
+ virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void *ret_alue );
+ virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, void *ret_alue );
+
private:
- BOOL retrieveFunction( TCHAR* pName, void** ppFunc ) const;
-
+ BOOL retrieveFunction( TCHAR* pName, void** ppFunc ) const;
+
private:
- HINSTANCE _plDLL;
+ HINSTANCE _plDLL;
- NPPluginFuncs _NPPfuncs;
+ NPPluginFuncs _NPPfuncs;
};
diff --git a/extensions/source/plugin/unx/mediator.cxx b/extensions/source/plugin/unx/mediator.cxx
index 4cbab9e0c9a2..afd42fa308bf 100644
--- a/extensions/source/plugin/unx/mediator.cxx
+++ b/extensions/source/plugin/unx/mediator.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -198,7 +198,7 @@ void MediatorListener::run()
{
ULONG nHeader[ 3 ];
int nBytes;
-
+
if( m_pMediator && ( nBytes = read( m_pMediator->m_nSocket, nHeader, sizeof( nHeader ) ) ) == sizeof( nHeader ) && nHeader[2] == MEDIATOR_MAGIC)
{
if( nHeader[ 0 ] == 0 && nHeader[ 1 ] == 0 )
diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx
index 6e862f67b2c0..f1f58fcc08bf 100644
--- a/extensions/source/plugin/unx/npnapi.cxx
+++ b/extensions/source/plugin/unx/npnapi.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,12 +61,12 @@ static void* l_NPN_MemAlloc( uint32 nBytes )
void* pMem = new char[nBytes];
return pMem;
}
-
+
static void l_NPN_MemFree( void* pMem )
{
delete [] (char*)pMem;
}
-
+
static uint32 l_NPN_MemFlush( uint32 /*nSize*/ )
{
return 0;
@@ -77,7 +77,7 @@ static NPError l_NPN_DestroyStream( NPP instance, NPStream* stream, NPError reas
UINT32 nInstance = pConnector->GetNPPID( instance );
if( nInstance == PluginConnector::UnknownNPPID )
return NPERR_GENERIC_ERROR;
-
+
UINT32 nFileID = pConnector->GetStreamID( stream );
MediatorMessage* pMes=
pConnector->
@@ -128,14 +128,14 @@ static NPError l_NPN_GetURL( NPP instance, const char* url, const char* window )
UINT32 nInstance = pConnector->GetNPPID( instance );
if( nInstance == PluginConnector::UnknownNPPID )
return NPERR_GENERIC_ERROR;
-
+
MediatorMessage* pMes=
pConnector->
Transact( eNPN_GetURL,
&nInstance, sizeof( nInstance ),
POST_STRING(url),
POST_STRING(window),
- NULL );
+ NULL );
medDebug( !pMes, "geturl: message unaswered\n" );
if( ! pMes )
return NPERR_GENERIC_ERROR;
@@ -200,7 +200,7 @@ static NPError l_NPN_NewStream( NPP instance, NPMIMEType type, const char* targe
pStream->end = pMes->GetUINT32();
pStream->lastmodified = pMes->GetUINT32();
pStream->ndata = pStream->pdata = pStream->notifyData = NULL;
-
+
pConnector->getStreamList().push_back( pStream );
*stream = pStream;
}
@@ -268,7 +268,7 @@ static NPError l_NPN_RequestRead( NPStream* stream, NPByteRange* rangeList )
nRanges++;
pRange = pRange->next;
}
-
+
UINT32* pArray = new UINT32[ 2 * nRanges ];
pRange = rangeList;
UINT32 n = 0;
@@ -305,7 +305,7 @@ static void l_NPN_Status( NPP instance, const char* message )
pConnector->Send( eNPN_Status,
&nInstance, sizeof( nInstance ),
POST_STRING( message ),
- NULL );
+ NULL );
}
static const char* l_NPN_UserAgent( NPP instance )
@@ -382,7 +382,7 @@ static int32 l_NPN_Write( NPP instance, NPStream* stream, int32 len, void* buffe
return 0;
INT32 nRet = pMes->GetUINT32();
- return nRet;
+ return nRet;
}
static void l_NPN_ReloadPlugins( NPBool /*reloadPages*/ )
@@ -519,9 +519,9 @@ static NPPluginFuncs aPluginFuncs =
oslModule pPluginLib = NULL;
-char*(*pNPP_GetMIMEDescription)() = NULL;
-NPError (*pNP_Initialize)(NPNetscapeFuncs*,NPPluginFuncs*) = NULL;
-NPError (*pNP_Shutdown)() = NULL;
+char*(*pNPP_GetMIMEDescription)() = NULL;
+NPError (*pNP_Initialize)(NPNetscapeFuncs*,NPPluginFuncs*) = NULL;
+NPError (*pNP_Shutdown)() = NULL;
std::vector< PluginConnector* > PluginConnector::allConnectors;
@@ -547,11 +547,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
{
case eNPP_DestroyStream:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- UINT32 nFileID = pMessage->GetUINT32();
- NPStream* pStream = m_aNPWrapStreams[ nFileID ];
- NPError aReason = GetNPError( pMessage );
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ UINT32 nFileID = pMessage->GetUINT32();
+ NPStream* pStream = m_aNPWrapStreams[ nFileID ];
+ NPError aReason = GetNPError( pMessage );
m_aNPWrapStreams.erase( m_aNPWrapStreams.begin() + nFileID );
aReason = aPluginFuncs.destroystream( instance, pStream, aReason );
@@ -565,7 +565,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPP_Destroy:
{
- UINT32 nInstance = pMessage->GetUINT32();
+ UINT32 nInstance = pMessage->GetUINT32();
ConnectorInstance* pInst= m_aInstances[ nInstance ];
// some plugin rely on old netscapes behaviour
@@ -573,9 +573,9 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
// the instance, so mimic that behaviour here
if( pInst->pShell )
XtDestroyWidget( (Widget)pInst->pShell );
-
+
pInst->pWidget = pInst->pShell = NULL;
-
+
// the other side will call eNPP_DestroyPhase2 after this
NPError aReason = NPERR_NO_ERROR;
Respond( pMessage->m_nID, (char*)&aReason, sizeof( aReason ), NULL );
@@ -584,9 +584,9 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
case eNPP_DestroyPhase2:
{
// now really destroy the instance
- UINT32 nInstance = pMessage->GetUINT32();
+ UINT32 nInstance = pMessage->GetUINT32();
ConnectorInstance* pInst= m_aInstances[ nInstance ];
- NPP instance = pInst->instance;
+ NPP instance = pInst->instance;
NPSavedData* pSave = NULL;
NPError aRet = aPluginFuncs.destroy( instance, &pSave );
@@ -619,15 +619,15 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPP_NewStream:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- char* pType = pMessage->GetString();
- NPStream* pStream = new NPStream;
- pStream->url = pMessage->GetString();
- pStream->end = pMessage->GetUINT32();
- pStream->lastmodified = pMessage->GetUINT32();
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ char* pType = pMessage->GetString();
+ NPStream* pStream = new NPStream;
+ pStream->url = pMessage->GetString();
+ pStream->end = pMessage->GetUINT32();
+ pStream->lastmodified = pMessage->GetUINT32();
pStream->pdata = pStream->ndata = pStream->notifyData = NULL;
- NPBool* pSeekable = (NPBool*)pMessage->GetBytes();
+ NPBool* pSeekable = (NPBool*)pMessage->GetBytes();
m_aNPWrapStreams.push_back( pStream );
uint16 nStype = NP_ASFILE;
NPError aRet = aPluginFuncs.newstream( instance, pType, pStream,
@@ -646,10 +646,10 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPP_New:
{
- char* pType = pMessage->GetString();
- uint16* pMode = (uint16*)pMessage->GetBytes();
- int16* pArgc = (int16*)pMessage->GetBytes();
- NPP instance = new NPP_t;
+ char* pType = pMessage->GetString();
+ uint16* pMode = (uint16*)pMessage->GetBytes();
+ int16* pArgc = (int16*)pMessage->GetBytes();
+ NPP instance = new NPP_t;
instance->pdata = instance->ndata = NULL;
ULONG nArgnBytes, nArgvBytes;
char* pArgn = (char*)pMessage->GetBytes( nArgnBytes );
@@ -692,7 +692,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
medDebug( 1, "should use xembed = %s\n", pInst->bShouldUseXEmbed ? "true" : "false" );
}
#endif
-
+
Respond( pMessage->m_nID,
(char*)&aRet, sizeof( aRet ),
NULL );
@@ -703,10 +703,10 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPP_SetWindow:
{
- UINT32 nInstance = pMessage->GetUINT32();
+ UINT32 nInstance = pMessage->GetUINT32();
ConnectorInstance* pInst= m_aInstances[ nInstance ];
- NPWindow* pWindow = (NPWindow*)pMessage->GetBytes();
-
+ NPWindow* pWindow = (NPWindow*)pMessage->GetBytes();
+
if( pWindow->width < 1 )
pWindow->width = 1;
if( pWindow->height < 1 )
@@ -718,7 +718,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
if( ! pInst->pGtkWidget )
{
medDebug( 1, "creating gtk plug and socket\n" );
-
+
pInst->pGtkWindow = gtk_plug_new((GdkNativeWindow)reinterpret_cast<sal_uIntPtr>(pWindow->window));
gtk_widget_show( pInst->pGtkWindow );
pInst->pGtkWidget = gtk_socket_new();
@@ -733,56 +733,56 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
XSync( pAppDisplay, False );
}
-
+
// update widget size; alas out parent is not yet really XEMBED conformant
gtk_widget_set_size_request( pInst->pGtkWidget, pWindow->width, pWindow->height );
gtk_window_resize( GTK_WINDOW(pInst->pGtkWindow), pWindow->width, pWindow->height );
-
+
GdkScreen* pGdkScreen = gtk_widget_get_screen( pInst->pGtkWidget );
Screen* pScreen = ScreenOfDisplay( pAppDisplay, gdk_screen_get_number( pGdkScreen ) );
- pInst->window.x = 0;
- pInst->window.y = 0;
- pInst->window.width = pWindow->width;
- pInst->window.height = pWindow->height;
- pInst->window.clipRect.left = 0;
- pInst->window.clipRect.top = 0;
- pInst->window.clipRect.right = pWindow->width;
- pInst->window.clipRect.bottom = pWindow->height;
- pInst->window.ws_info = &pInst->ws_info;
- pInst->window.type = NPWindowTypeWindow;
- pInst->ws_info.type = NP_SETWINDOW;
- pInst->ws_info.display = pAppDisplay;
- pInst->ws_info.visual = DefaultVisualOfScreen( pScreen );
- pInst->ws_info.colormap = DefaultColormapOfScreen( pScreen );
- pInst->ws_info.depth = DefaultDepthOfScreen( pScreen );
+ pInst->window.x = 0;
+ pInst->window.y = 0;
+ pInst->window.width = pWindow->width;
+ pInst->window.height = pWindow->height;
+ pInst->window.clipRect.left = 0;
+ pInst->window.clipRect.top = 0;
+ pInst->window.clipRect.right = pWindow->width;
+ pInst->window.clipRect.bottom = pWindow->height;
+ pInst->window.ws_info = &pInst->ws_info;
+ pInst->window.type = NPWindowTypeWindow;
+ pInst->ws_info.type = NP_SETWINDOW;
+ pInst->ws_info.display = pAppDisplay;
+ pInst->ws_info.visual = DefaultVisualOfScreen( pScreen );
+ pInst->ws_info.colormap = DefaultColormapOfScreen( pScreen );
+ pInst->ws_info.depth = DefaultDepthOfScreen( pScreen );
}
else
#endif
{
if( ! pInst->pWidget )
{
- pInst->pWidget = CreateNewShell( &(pInst->pShell), (XLIB_Window)pWindow->window );
+ pInst->pWidget = CreateNewShell( &(pInst->pShell), (XLIB_Window)pWindow->window );
}
-
+
// fill in NPWindow and NPCallbackStruct
- pInst->window.window = (void*)XtWindow( (Widget)pInst->pWidget );
- pInst->window.x = 0;
- pInst->window.y = 0;
- pInst->window.width = pWindow->width;
- pInst->window.height = pWindow->height;
- pInst->window.clipRect.left = 0;
- pInst->window.clipRect.top = 0;
- pInst->window.clipRect.right = pWindow->width;
- pInst->window.clipRect.bottom = pWindow->height;
- pInst->window.ws_info = &pInst->ws_info;
- pInst->window.type = NPWindowTypeWindow;
- pInst->ws_info.type = NP_SETWINDOW;
- pInst->ws_info.display = XtDisplay( (Widget)pInst->pWidget );
- pInst->ws_info.visual = DefaultVisualOfScreen( XtScreen( (Widget)pInst->pWidget ) );
- pInst->ws_info.colormap = DefaultColormapOfScreen( XtScreen( (Widget)pInst->pWidget ) );
- pInst->ws_info.depth = DefaultDepthOfScreen( XtScreen( (Widget)pInst->pWidget ) );
-
+ pInst->window.window = (void*)XtWindow( (Widget)pInst->pWidget );
+ pInst->window.x = 0;
+ pInst->window.y = 0;
+ pInst->window.width = pWindow->width;
+ pInst->window.height = pWindow->height;
+ pInst->window.clipRect.left = 0;
+ pInst->window.clipRect.top = 0;
+ pInst->window.clipRect.right = pWindow->width;
+ pInst->window.clipRect.bottom = pWindow->height;
+ pInst->window.ws_info = &pInst->ws_info;
+ pInst->window.type = NPWindowTypeWindow;
+ pInst->ws_info.type = NP_SETWINDOW;
+ pInst->ws_info.display = XtDisplay( (Widget)pInst->pWidget );
+ pInst->ws_info.visual = DefaultVisualOfScreen( XtScreen( (Widget)pInst->pWidget ) );
+ pInst->ws_info.colormap = DefaultColormapOfScreen( XtScreen( (Widget)pInst->pWidget ) );
+ pInst->ws_info.depth = DefaultDepthOfScreen( XtScreen( (Widget)pInst->pWidget ) );
+
XtResizeWidget( (Widget)pInst->pShell,
pInst->window.width,
pInst->window.height,
@@ -803,11 +803,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPP_StreamAsFile:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- UINT32 nFileID = pMessage->GetUINT32();
- NPStream* pStream = m_aNPWrapStreams[ nFileID ];
- char* fname = pMessage->GetString();
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ UINT32 nFileID = pMessage->GetUINT32();
+ NPStream* pStream = m_aNPWrapStreams[ nFileID ];
+ char* fname = pMessage->GetString();
medDebug( 1, "pluginapp: NPP_StreamAsFile %s\n", fname );
aPluginFuncs.asfile( instance, pStream, fname );
delete [] fname;
@@ -815,11 +815,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPP_URLNotify:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- char* url = pMessage->GetString();
- NPReason* pReason = (NPReason*)pMessage->GetBytes();
- void** notifyData = (void**)pMessage->GetBytes();
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ char* url = pMessage->GetString();
+ NPReason* pReason = (NPReason*)pMessage->GetBytes();
+ void** notifyData = (void**)pMessage->GetBytes();
aPluginFuncs.urlnotify( instance, url, *pReason, *notifyData );
delete [] url;
delete [] pReason;
@@ -828,15 +828,15 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPP_WriteReady:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- UINT32 nFileID = pMessage->GetUINT32();
- NPStream* pStream = m_aNPWrapStreams[ nFileID ];
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ UINT32 nFileID = pMessage->GetUINT32();
+ NPStream* pStream = m_aNPWrapStreams[ nFileID ];
int32 nRet = aPluginFuncs.writeready( instance, pStream );
-
+
medDebug( 1, "pluginapp: NPP_WriteReady( %p, %p ) (stream id = %d) returns %d\n",
instance, pStream, nFileID, nRet );
-
+
Respond( pMessage->m_nID,
(char*)&nRet, sizeof( nRet ),
NULL );
@@ -844,15 +844,15 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPP_Write:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- UINT32 nFileID = pMessage->GetUINT32();
- NPStream* pStream = m_aNPWrapStreams[ nFileID ];
- int32 offset = pMessage->GetUINT32();
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ UINT32 nFileID = pMessage->GetUINT32();
+ NPStream* pStream = m_aNPWrapStreams[ nFileID ];
+ int32 offset = pMessage->GetUINT32();
ULONG len;
- char* buffer = (char*)pMessage->GetBytes( len );
+ char* buffer = (char*)pMessage->GetBytes( len );
int32 nRet = aPluginFuncs.write( instance, pStream, offset, len, buffer );
-
+
medDebug( 1,"pluginapp: NPP_Write( %p, %p, %d, %d, %p ) returns %d\n"
"stream = { pdata = %p, ndata = %p, url = %s, end = %d, lastmodified = %d, notifyData = %p }\n",
instance, pStream, offset, len, buffer, nRet,
diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx
index bf0faabf15dc..c6dd6a59895d 100644
--- a/extensions/source/plugin/unx/nppapi.cxx
+++ b/extensions/source/plugin/unx/nppapi.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -109,10 +109,10 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
{
case eNPN_GetURL:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- char* pUrl = pMessage->GetString();
- char* pWindow = pMessage->GetString();
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ char* pUrl = pMessage->GetString();
+ char* pWindow = pMessage->GetString();
NPError aRet = NPN_GetURL( instance, pUrl, pWindow );
Respond( pMessage->m_nID,
(char*)(&aRet), sizeof( NPError ), NULL );
@@ -122,11 +122,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPN_GetURLNotify:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- char* pUrl = pMessage->GetString();
- char* pWindow = pMessage->GetString();
- void** pNotifyData = (void**)pMessage->GetBytes();
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ char* pUrl = pMessage->GetString();
+ char* pWindow = pMessage->GetString();
+ void** pNotifyData = (void**)pMessage->GetBytes();
NPError aRet = NPN_GetURLNotify( instance, pUrl, pWindow,
*pNotifyData );
Respond( pMessage->m_nID,
@@ -138,11 +138,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPN_DestroyStream:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- UINT32 nFileID = pMessage->GetUINT32();
- char* pUrl = pMessage->GetString();
- NPError* pReason = (NPError*)pMessage->GetBytes();
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ UINT32 nFileID = pMessage->GetUINT32();
+ char* pUrl = pMessage->GetString();
+ NPError* pReason = (NPError*)pMessage->GetBytes();
NPError aRet = NPERR_FILE_NOT_FOUND;
if( nFileID < static_cast<UINT32>(m_aNPWrapStreams.size()) )
{
@@ -169,10 +169,10 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPN_NewStream:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- NPMIMEType pType = pMessage->GetString();
- char* pTarget = pMessage->GetString();
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ NPMIMEType pType = pMessage->GetString();
+ char* pTarget = pMessage->GetString();
NPStream* pStream = NULL;
@@ -200,21 +200,21 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
&pStream->lastmodified, sizeof(UINT32),
NULL );
}
-
+
delete [] pTarget;
delete [] pType;
}
break;
case eNPN_PostURLNotify:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- char* pUrl = pMessage->GetString();
- char* pTarget = pMessage->GetString();
- UINT32 nLen = pMessage->GetUINT32();
- char* pBuf = (char*)pMessage->GetBytes();
- NPBool* pFile = (NPBool*)pMessage->GetBytes();
- void** pNData = (void**)pMessage->GetBytes();
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ char* pUrl = pMessage->GetString();
+ char* pTarget = pMessage->GetString();
+ UINT32 nLen = pMessage->GetUINT32();
+ char* pBuf = (char*)pMessage->GetBytes();
+ NPBool* pFile = (NPBool*)pMessage->GetBytes();
+ void** pNData = (void**)pMessage->GetBytes();
NPError aRet =
NPN_PostURLNotify( instance, pUrl, pTarget, nLen, pBuf, *pFile, *pNData );
Respond( pMessage->m_nID, (char*)&aRet, sizeof( aRet ), NULL );
@@ -227,13 +227,13 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPN_PostURL:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- char* pUrl = pMessage->GetString();
- char* pWindow = pMessage->GetString();
- UINT32 nLen = pMessage->GetUINT32();
- char* pBuf = (char*)pMessage->GetBytes();
- NPBool* pFile = (NPBool*)pMessage->GetBytes();
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ char* pUrl = pMessage->GetString();
+ char* pWindow = pMessage->GetString();
+ UINT32 nLen = pMessage->GetUINT32();
+ char* pBuf = (char*)pMessage->GetBytes();
+ NPBool* pFile = (NPBool*)pMessage->GetBytes();
NPError aRet =
NPN_PostURL( instance, pUrl, pWindow, nLen, pBuf, *pFile );
Respond( pMessage->m_nID, (char*)&aRet, sizeof( aRet ), NULL );
@@ -245,13 +245,13 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPN_RequestRead:
{
- UINT32 nFileID = pMessage->GetUINT32();
- NPStream* pStream = m_aNPWrapStreams[ nFileID ];
- UINT32 nRanges = pMessage->GetUINT32();
- UINT32* pArray = (UINT32*)pMessage->GetBytes();
+ UINT32 nFileID = pMessage->GetUINT32();
+ NPStream* pStream = m_aNPWrapStreams[ nFileID ];
+ UINT32 nRanges = pMessage->GetUINT32();
+ UINT32* pArray = (UINT32*)pMessage->GetBytes();
// build ranges table
NPByteRange* pFirst = new NPByteRange;
- NPByteRange* pRun = pFirst;
+ NPByteRange* pRun = pFirst;
for( UINT32 n = 0; n < nRanges; n++ )
{
pRun->offset = pArray[ 2*n ];
@@ -272,9 +272,9 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPN_Status:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- char* pString = pMessage->GetString();
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ char* pString = pMessage->GetString();
NPN_Status( instance, pString );
delete [] pString;
}
@@ -293,12 +293,12 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPN_Write:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
- UINT32 nFileID = pMessage->GetUINT32();
- NPStream* pStream = m_aNPWrapStreams[ nFileID ];
- INT32 nLen = pMessage->GetUINT32();
- void* pBuffer = pMessage->GetBytes();
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
+ UINT32 nFileID = pMessage->GetUINT32();
+ NPStream* pStream = m_aNPWrapStreams[ nFileID ];
+ INT32 nLen = pMessage->GetUINT32();
+ void* pBuffer = pMessage->GetBytes();
INT32 nRet = NPN_Write( instance, pStream, nLen, pBuffer );
Respond( pMessage->m_nID,
(char*)&nRet, sizeof( nRet ),
@@ -309,8 +309,8 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
break;
case eNPN_UserAgent:
{
- UINT32 nInstance = pMessage->GetUINT32();
- NPP instance = m_aInstances[ nInstance ]->instance;
+ UINT32 nInstance = pMessage->GetUINT32();
+ NPP instance = m_aInstances[ nInstance ]->instance;
const char* pAnswer = NPN_UserAgent( instance );
Respond( pMessage->m_nID,
(char*)pAnswer, strlen( pAnswer ),
@@ -320,7 +320,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
default:
medDebug( 1, "caught unknown NPN request %d\n", nCommand );
}
-
+
delete pMessage;
}
return 0;
@@ -342,7 +342,7 @@ NPError UnxPluginComm::NPP_Destroy( NPP instance, NPSavedData** save )
{
NPError aRet = NPERR_GENERIC_ERROR;
GET_INSTANCE_RET( aRet );
- MediatorMessage* pMes =
+ MediatorMessage* pMes =
Transact( eNPP_Destroy,
POST_INSTANCE(),
NULL );
@@ -379,8 +379,8 @@ NPError UnxPluginComm::NPP_DestroyStream( NPP instance, NPStream* stream, NPErro
UINT32 nFileID = GetStreamID( stream );
if( nFileID == PluginConnector::UnknownStreamID )
return NPERR_GENERIC_ERROR;
-
- MediatorMessage* pMes =
+
+ MediatorMessage* pMes =
Transact( eNPP_DestroyStream,
POST_INSTANCE(),
&nFileID, sizeof( nFileID ),
@@ -402,7 +402,7 @@ void* UnxPluginComm::NPP_GetJavaClass()
NPError UnxPluginComm::NPP_Initialize()
{
- MediatorMessage* pMes =
+ MediatorMessage* pMes =
Transact( eNPP_Initialize,
NULL );
if( ! pMes )
@@ -444,7 +444,7 @@ NPError UnxPluginComm::NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode
MediatorMessage* pMes;
if( saved )
- pMes =
+ pMes =
Transact( eNPP_New,
pluginType, strlen( pluginType ),
&mode, sizeof( mode ),
@@ -454,7 +454,7 @@ NPError UnxPluginComm::NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode
saved->buf, static_cast<size_t>(saved->len),
NULL );
else
- pMes =
+ pMes =
Transact( eNPP_New,
pluginType, strlen( pluginType ),
&mode, sizeof( mode ),
@@ -481,7 +481,7 @@ NPError UnxPluginComm::NPP_NewStream( NPP instance, NPMIMEType type, NPStream* s
GET_INSTANCE_RET( aRet );
m_aNPWrapStreams.push_back( stream );
- MediatorMessage* pMes =
+ MediatorMessage* pMes =
Transact( eNPP_NewStream,
POST_INSTANCE(),
type, strlen( type ),
@@ -505,14 +505,14 @@ NPError UnxPluginComm::NPP_NewStream( NPP instance, NPMIMEType type, NPStream* s
void UnxPluginComm::NPP_Print( NPP /*instance*/, NPPrint* /*platformPrint*/ )
{
-}
+}
NPError UnxPluginComm::NPP_SetWindow( NPP instance, NPWindow* window )
{
NPError aRet = NPERR_GENERIC_ERROR;
GET_INSTANCE_RET( aRet );
- MediatorMessage* pMes =
+ MediatorMessage* pMes =
Transact( eNPP_SetWindow,
POST_INSTANCE(),
window, sizeof( NPWindow ),
@@ -547,7 +547,7 @@ void UnxPluginComm::NPP_StreamAsFile( NPP instance, NPStream* stream, const char
void UnxPluginComm::NPP_URLNotify( NPP instance, const char* url, NPReason reason, void* notifyData )
{
GET_INSTANCE();
-
+
Send( eNPP_URLNotify,
POST_INSTANCE(),
url, strlen( url ),
@@ -563,7 +563,7 @@ int32 UnxPluginComm::NPP_Write( NPP instance, NPStream* stream, int32 offset, in
if( nFileID == PluginConnector::UnknownStreamID )
return -1;
- MediatorMessage* pMes =
+ MediatorMessage* pMes =
Transact( eNPP_Write,
POST_INSTANCE(),
&nFileID, sizeof( nFileID ),
@@ -575,7 +575,7 @@ int32 UnxPluginComm::NPP_Write( NPP instance, NPStream* stream, int32 offset, in
int32 aRet = pMes->GetUINT32();
delete pMes;
-
+
return aRet;
}
@@ -586,7 +586,7 @@ int32 UnxPluginComm::NPP_WriteReady( NPP instance, NPStream* stream )
if( nFileID == PluginConnector::UnknownStreamID )
return -1;
- MediatorMessage* pMes =
+ MediatorMessage* pMes =
Transact( eNPP_WriteReady,
POST_INSTANCE(),
&nFileID, sizeof( nFileID ),
@@ -597,14 +597,14 @@ int32 UnxPluginComm::NPP_WriteReady( NPP instance, NPStream* stream )
int32 aRet = pMes->GetUINT32();
delete pMes;
-
+
return aRet;
}
char* UnxPluginComm::NPP_GetMIMEDescription()
{
static char* pDesc = NULL;
- MediatorMessage* pMes =
+ MediatorMessage* pMes =
Transact( eNPP_GetMIMEDescription,
NULL );
if( ! pMes )
diff --git a/extensions/source/plugin/unx/npwrap.cxx b/extensions/source/plugin/unx/npwrap.cxx
index 7124972d8578..04f4bbbacf5a 100644
--- a/extensions/source/plugin/unx/npwrap.cxx
+++ b/extensions/source/plugin/unx/npwrap.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,9 +47,9 @@
PluginConnector* pConnector = NULL;
-int nAppArguments = 0;
-char** pAppArguments = NULL;
-Display* pAppDisplay = NULL;
+int nAppArguments = 0;
+char** pAppArguments = NULL;
+Display* pAppDisplay = NULL;
Display* pXtAppDisplay = NULL;
extern oslModule pPluginLib;
@@ -65,7 +65,7 @@ static bool bPluginAppQuit = false;
static long GlobalConnectionLostHdl( void* /*pInst*/, void* /*pArg*/ )
{
medDebug( 1, "pluginapp exiting due to connection lost\n" );
-
+
write( wakeup_fd[1], "xxxx", 4 );
return 0;
}
@@ -76,14 +76,14 @@ extern "C"
{
return 0;
}
-
+
#ifndef ENABLE_GTK
static void ThreadEventHandler( XtPointer /*client_data*/, int* /*source*/, XtInputId* id )
{
char buf[256];
// clear pipe
int len, nLast = -1;
-
+
while( (len = read( wakeup_fd[0], buf, sizeof( buf ) ) ) > 0 )
nLast = len-1;
if( ! bPluginAppQuit )
@@ -114,7 +114,7 @@ IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ )
medDebug( 1, "new message handler\n" );
write( wakeup_fd[1], "cccc", 4 );
return 0;
-
+
}
Widget createSubWidget( char* /*pPluginText*/, Widget shell, XLIB_Window aParentWindow )
@@ -145,7 +145,7 @@ Widget createSubWidget( char* /*pPluginText*/, Widget shell, XLIB_Window aParent
0, 0 );
XtMapWidget( shell );
XtMapWidget( newWidget );
- XRaiseWindow( pXtAppDisplay, XtWindow( shell ) );
+ XRaiseWindow( pXtAppDisplay, XtWindow( shell ) );
XSync( pXtAppDisplay, False );
return newWidget;
@@ -192,7 +192,7 @@ static oslModule LoadModule( const char* pPath )
static void CheckPlugin( const char* pPath )
{
oslModule pLib = LoadModule( pPath );
-
+
char*(*pNP_GetMIMEDescription)() = (char*(*)())
osl_getAsciiFunctionSymbol( pLib, "NP_GetMIMEDescription" );
if( pNP_GetMIMEDescription )
@@ -279,7 +279,7 @@ static gboolean pollXtTimerCallback(gpointer)
static gboolean prepareWakeupEvent( GSource*, gint* )
{
struct pollfd aPoll = { wakeup_fd[0], POLLIN, 0 };
- poll( &aPoll, 1, 0 );
+ poll( &aPoll, 1, 0 );
return (aPoll.revents & POLLIN ) != 0;
}
@@ -294,7 +294,7 @@ static gboolean dispatchWakeupEvent( GSource*, GSourceFunc, gpointer )
char buf[256];
// clear pipe
int len, nLast = -1;
-
+
while( (len = read( wakeup_fd[0], buf, sizeof( buf ) ) ) > 0 )
nLast = len-1;
if( ( nLast == -1 || buf[nLast] != 'x' ) && pConnector )
@@ -307,7 +307,7 @@ static gboolean dispatchWakeupEvent( GSource*, GSourceFunc, gpointer )
delete pConnector;
pConnector = NULL;
}
-
+
return TRUE;
}
@@ -359,7 +359,7 @@ int main( int argc, char **argv)
}
// initialize 'wakeup' pipe.
int flags;
-
+
// set close-on-exec descriptor flag.
if ((flags = fcntl (wakeup_fd[0], F_GETFD)) != -1)
{
@@ -371,7 +371,7 @@ int main( int argc, char **argv)
flags |= FD_CLOEXEC;
fcntl (wakeup_fd[1], F_SETFD, flags);
}
-
+
// set non-blocking I/O flag.
if ((flags = fcntl (wakeup_fd[0], F_GETFL)) != -1)
{
@@ -390,7 +390,7 @@ int main( int argc, char **argv)
exit(255);
}
int nSocket = atol( argv[1] );
-
+
#ifdef ENABLE_GTK
g_thread_init(NULL);
gtk_init(&argc, &argv);
@@ -416,7 +416,7 @@ int main( int argc, char **argv)
medDebug( 1, "could not get Xt GSource" );
return 1;
}
-
+
g_source_set_priority( pXTSource, GDK_PRIORITY_EVENTS );
g_source_set_can_recurse( pXTSource, TRUE );
g_source_attach( pXTSource, NULL );
@@ -424,7 +424,7 @@ int main( int argc, char **argv)
aXtPollDesc.events = G_IO_IN;
aXtPollDesc.revents = 0;
g_source_add_poll( pXTSource, &aXtPollDesc );
-
+
gint xt_polling_timer_id = g_timeout_add( 25, pollXtTimerCallback, NULL);
// Initialize wakeup events listener
GSource *pWakeupSource = g_source_new( &aWakeupEventFuncs, sizeof(GSource) );
@@ -491,7 +491,7 @@ int main( int argc, char **argv)
#ifdef ENABLE_GTK
g_source_remove(xt_polling_timer_id);
#endif
-
+
pNP_Shutdown();
medDebug( 1, "NP_Shutdown done\n" );
osl_unloadModule( pPluginLib );
diff --git a/extensions/source/plugin/unx/plugcon.cxx b/extensions/source/plugin/unx/plugcon.cxx
index 607ae05d9877..52be98fdae87 100644
--- a/extensions/source/plugin/unx/plugcon.cxx
+++ b/extensions/source/plugin/unx/plugcon.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -82,7 +82,7 @@ struct PtrStruct
{
char* pData;
ULONG nBytes;
-
+
PtrStruct( char* i_pData, ULONG i_nBytes )
: pData( i_pData ), nBytes( i_nBytes ) {}
};
@@ -94,7 +94,7 @@ ULONG PluginConnector::FillBuffer( char*& rpBuffer,
{
std::vector< PtrStruct > aList;
aList.reserve( 5 );
-
+
ULONG nDataSize = nFunctionLen + sizeof( ULONG );
char* pNext;
@@ -164,7 +164,7 @@ void PluginConnector::Respond( ULONG nID,
{
va_list ap;
char* pBuffer;
-
+
va_start( ap, nFunctionLen );
ULONG nSize = FillBuffer( pBuffer, pFunction, nFunctionLen, ap );
va_end( ap );
@@ -257,34 +257,34 @@ const char* GetCommandName( CommandAtoms eCommand )
{
switch( eCommand )
{
- case eNPN_GetURL: return "NPN_GetURL";
- case eNPN_GetURLNotify: return "NPN_GetURLNotify";
- case eNPN_DestroyStream: return "NPN_DestroyStream";
- case eNPN_NewStream: return "NPN_NewStream";
- case eNPN_PostURLNotify: return "NPN_PostURLNotify";
- case eNPN_PostURL: return "NPN_PostURL";
- case eNPN_RequestRead: return "NPN_RequestRead";
- case eNPN_Status: return "NPN_Status";
- case eNPN_Version: return "NPN_Version";
- case eNPN_Write: return "NPN_Write";
- case eNPN_UserAgent: return "NPN_UserAgent";
-
- case eNPP_DestroyStream: return "NPP_DestroyStream";
- case eNPP_Destroy: return "NPP_Destroy";
- case eNPP_DestroyPhase2: return "NPP_DestroyPhase2";
- case eNPP_NewStream: return "NPP_NewStream";
- case eNPP_New: return "NPP_New";
- case eNPP_SetWindow: return "NPP_SetWindow";
- case eNPP_StreamAsFile: return "NPP_StreamAsFile";
- case eNPP_URLNotify: return "NPP_URLNotify";
- case eNPP_WriteReady: return "NPP_WriteReady";
- case eNPP_Write: return "NPP_Write";
- case eNPP_GetMIMEDescription: return "NPP_GetMIMEDescription";
- case eNPP_Initialize: return "NPP_Initialize";
- case eNPP_Shutdown: return "NPP_Shutdown";
-
- case eMaxCommand: return "eMaxCommand";
- default: return "unknown command";
+ case eNPN_GetURL: return "NPN_GetURL";
+ case eNPN_GetURLNotify: return "NPN_GetURLNotify";
+ case eNPN_DestroyStream: return "NPN_DestroyStream";
+ case eNPN_NewStream: return "NPN_NewStream";
+ case eNPN_PostURLNotify: return "NPN_PostURLNotify";
+ case eNPN_PostURL: return "NPN_PostURL";
+ case eNPN_RequestRead: return "NPN_RequestRead";
+ case eNPN_Status: return "NPN_Status";
+ case eNPN_Version: return "NPN_Version";
+ case eNPN_Write: return "NPN_Write";
+ case eNPN_UserAgent: return "NPN_UserAgent";
+
+ case eNPP_DestroyStream: return "NPP_DestroyStream";
+ case eNPP_Destroy: return "NPP_Destroy";
+ case eNPP_DestroyPhase2: return "NPP_DestroyPhase2";
+ case eNPP_NewStream: return "NPP_NewStream";
+ case eNPP_New: return "NPP_New";
+ case eNPP_SetWindow: return "NPP_SetWindow";
+ case eNPP_StreamAsFile: return "NPP_StreamAsFile";
+ case eNPP_URLNotify: return "NPP_URLNotify";
+ case eNPP_WriteReady: return "NPP_WriteReady";
+ case eNPP_Write: return "NPP_Write";
+ case eNPP_GetMIMEDescription: return "NPP_GetMIMEDescription";
+ case eNPP_Initialize: return "NPP_Initialize";
+ case eNPP_Shutdown: return "NPP_Shutdown";
+
+ case eMaxCommand: return "eMaxCommand";
+ default: return "unknown command";
}
return NULL;
}
diff --git a/extensions/source/plugin/unx/sysplug.cxx b/extensions/source/plugin/unx/sysplug.cxx
index dc7be6799ae3..f5221aa027c8 100644
--- a/extensions/source/plugin/unx/sysplug.cxx
+++ b/extensions/source/plugin/unx/sysplug.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/extensions/source/plugin/unx/unxmgr.cxx b/extensions/source/plugin/unx/unxmgr.cxx
index 0ecd12b65ff7..b042815f8343 100644
--- a/extensions/source/plugin/unx/unxmgr.cxx
+++ b/extensions/source/plugin/unx/unxmgr.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -121,18 +121,18 @@ static bool CheckPlugin( const ByteString& rPath, list< PluginDescription* >& rD
if( aMIME.getLength() > 0 )
{
OString aLine = aMIME.makeStringAndClear();
-
+
sal_Int32 nIndex = 0;
while( nIndex != -1 )
{
OString aType = aLine.getToken( 0, ';', nIndex );
sal_Int32 nTypeIndex = 0;
- OString aMimetype = aType.getToken( 0, ':', nTypeIndex );
- OString aExtLine = aType.getToken( 0, ':', nTypeIndex );
+ OString aMimetype = aType.getToken( 0, ':', nTypeIndex );
+ OString aExtLine = aType.getToken( 0, ':', nTypeIndex );
if( nTypeIndex < 0 ) // ensure at least three tokens
continue;
- OString aDesc = aType.getToken( 0, ':', nTypeIndex );
+ OString aDesc = aType.getToken( 0, ':', nTypeIndex );
// create extension list string
sal_Int32 nExtIndex = 0;
@@ -149,11 +149,11 @@ static bool CheckPlugin( const ByteString& rPath, list< PluginDescription* >& rD
PluginDescription* pNew = new PluginDescription;
// set plugin name (path to library)
- pNew->PluginName = OStringToOUString( rPath, aEncoding );
+ pNew->PluginName = OStringToOUString( rPath, aEncoding );
// set mimetype
- pNew->Mimetype = OStringToOUString( aMimetype, aEncoding );
+ pNew->Mimetype = OStringToOUString( aMimetype, aEncoding );
// set extension line
- pNew->Extension = OStringToOUString( aExtension.makeStringAndClear(), aEncoding );
+ pNew->Extension = OStringToOUString( aExtension.makeStringAndClear(), aEncoding );
// set description
pNew->Description= OStringToOUString( aDesc, aEncoding );
rDescriptions.push_back( pNew );
@@ -209,7 +209,7 @@ static void CheckPluginRegistryFiles( const rtl::OString& rPath, list< PluginDes
}
fclose( fp );
}
-
+
// check subdirectories
DIR* pDIR = opendir( rPath.getStr() );
struct dirent* pDirEnt = NULL;
@@ -224,7 +224,7 @@ static void CheckPluginRegistryFiles( const rtl::OString& rPath, list< PluginDes
aBuf.append( rPath );
aBuf.append( '/' );
aBuf.append( pBaseName );
-
+
if( ! stat( aBuf.getStr(), &aStat ) )
{
if( S_ISDIR( aStat.st_mode ) )
diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx
index c992341dc947..607aa4b87f88 100644
--- a/extensions/source/plugin/win/sysplug.cxx
+++ b/extensions/source/plugin/win/sysplug.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -102,7 +102,7 @@ PluginComm_Impl::~PluginComm_Impl()
{
if (_plDLL)
{
-// NPP_Shutdown();
+// NPP_Shutdown();
NPError (WINAPI * pShutdown)();
if (retrieveFunction( _T("NP_Shutdown"), (void**)&pShutdown ))
diff --git a/extensions/source/plugin/win/winmgr.cxx b/extensions/source/plugin/win/winmgr.cxx
index db90cfbf7a45..ff9b713c6085 100644
--- a/extensions/source/plugin/win/winmgr.cxx
+++ b/extensions/source/plugin/win/winmgr.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -411,7 +411,7 @@ Sequence< PluginDescription > XPluginManager_Impl::impl_getPluginDescriptions(vo
OString aExtToken2( aExt.getToken( 0, '|', nIndex2 ) );
if( aMIMEToken.getLength() == 0 || aExtToken2.getLength() == 0 )
continue;
-
+
rDescr.Mimetype = OUString(
aMIMEToken.getStr(), aMIMEToken.getLength(), RTL_TEXTENCODING_MS_1252 );
if (! rDescr.Mimetype.getLength())