summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorPierre-André Jacquod <pjacquod@alumni.ethz.ch>2010-11-21 15:28:10 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-11-22 12:10:30 +0000
commitf3eb77586e067a46211334a78987652815f47744 (patch)
tree640886220e29602e113c0553286a70bf38e389ba /extensions
parent9140ff3adcb0d34bdaef8fb8b73c96947c592ec0 (diff)
further removing of dead code
Hello, here in components some other pieces to delete. Again some small parts in case I was to generous in deleting. regards >From 1535d5e774e7d1ef08696344be8fcdfc6828f2c3 Mon Sep 17 00:00:00 2001 From: pjacquod <pjacquod@alumni.ethz.ch> Date: Sun, 21 Nov 2010 12:10:15 +0100 Subject: [PATCH 1/5] remove dead code components workben
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/plugin/base/nfuncs.cxx14
-rw-r--r--extensions/source/plugin/base/xplugin.cxx14
-rw-r--r--extensions/source/plugin/unx/npnapi.cxx21
-rw-r--r--extensions/workben/testpgp.cxx93
4 files changed, 3 insertions, 139 deletions
diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx
index b378795a92f1..af7bd4dc2071 100644
--- a/extensions/source/plugin/base/nfuncs.cxx
+++ b/extensions/source/plugin/base/nfuncs.cxx
@@ -583,22 +583,10 @@ NPError SAL_CALL NP_LOADDS NPN_GetValue( NPP instance, NPNVariable variable, vo
*(NPBool*)value = false;
break;
}
+
/*
provisional code should there ever be NPNVariables that we actually
want to query from the PluginContext
- ::rtl::OUString aValue;
- try
- {
- pImpl->enterPluginCallback();
- aValue = pImpl->getPluginContext()->
- getValue( pImpl, (::com::sun::star::plugin::PluginVariable)variable );
- pImpl->leavePluginCallback();
- }
- catch( ::com::sun::star::plugin::PluginException& e )
- {
- pImpl->leavePluginCallback();
- return e.ErrorCode;
- }
*/
return aResult;
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index 8e8af63b94b8..a98fc3f58aac 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -725,20 +725,6 @@ sal_Bool XPlugin_Impl::provideNewStream(const OUString& mimetype,
// but currently none are known. Since this file opening/seeking/closing
// is rather costly, it is #if'ed out. If there are plugins known to
// make use of the file length, simply put it in
-#if 0
- if( isfile && ! length )
- {
- osl::File aFile( url );
- if( aFile.open( OpenFlag_Read ) == FileBase::E_None )
- {
- aFile.setPos( Pos_End, 0 );
- sal_uInt64 nPos = 0;
- if( aFile.getPos( nPos ) == FileBase::E_None )
- length = nPos;
- aFile.close();
- }
- }
-#endif
PluginInputStream* pStream = new PluginInputStream( this, aURL.getStr(),
length, lastmodified );
diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx
index 6e862f67b2c0..d4cb19e3bce0 100644
--- a/extensions/source/plugin/unx/npnapi.cxx
+++ b/extensions/source/plugin/unx/npnapi.cxx
@@ -340,27 +340,6 @@ static const char* l_NPN_UserAgent( NPP instance )
return pAgent;
}
-#if 0
-static void l_NPN_Version( int* major, int* minor, int* net_major, int* net_minor )
-{
- MediatorMessage* pMes = pConnector->
- Transact( eNPN_Version,
- NULL );
-
- if( ! pMes )
- return;
-
- *major = pMes->GetUINT32();
- *minor = pMes->GetUINT32();
- *net_major = pMes->GetUINT32();
- *net_minor = pMes->GetUINT32();
-
- medDebug( 1, "pluginapp: NPN_Version: results %d %d, %d %d\n", *major, *minor, *net_major, *net_minor );
-
- delete pMes;
-}
-#endif
-
static int32 l_NPN_Write( NPP instance, NPStream* stream, int32 len, void* buffer )
{
UINT32 nFileID = pConnector->GetStreamID( stream );
diff --git a/extensions/workben/testpgp.cxx b/extensions/workben/testpgp.cxx
index 6027a68e4d70..0773dc711646 100644
--- a/extensions/workben/testpgp.cxx
+++ b/extensions/workben/testpgp.cxx
@@ -512,75 +512,6 @@ inline rtl::OWString S2U (const sal_Char *ascii)
return rtl::OWString::createFromAscii (ascii);
}
-#if 0 /* OLD */
-
-/*
- * queryModuleActivator.
- */
-BOOL queryModuleActivator (
- const XServiceManagerRef &rxManager,
- XServiceActivatorRef &rxActivator)
-{
- XServiceProviderRef xProv;
- XInterfaceRef xProvInst;
-
- xProv = rxManager->queryServiceProvider (
- L"stardiv.uno.ServiceActivator.module");
- if (!xProv.is())
- {
- printf ("Error: no ServiceActivator service.\n");
- return FALSE;
- }
-
- xProvInst = xProv->createInstance();
- if (!xProvInst.is())
- {
- printf ("Error: no ServiceActivator instance.\n");
- return FALSE;
- }
-
- return xProvInst->queryInterface (
- XServiceActivator::getSmartUik(), rxActivator);
-}
-
-/*
- * install.
- */
-BOOL install (
- const XServiceActivatorRef &rxActivator,
- const char *prefix)
-{
- String aModule ("module://");
- char pBuffer[1024];
-
- vos:ORealDynamicLoader::computeModuleName (
- prefix, pBuffer, sizeof(pBuffer));
- aModule += pBuffer;
-
- return rxActivator->install (
- StringToUString (aModule, CHARSET_SYSTEM));
-}
-
-/*
- * uninstall.
- */
-BOOL uninstall (
- const XServiceActivatorRef &rxActivator,
- const char *prefix)
-{
- String aModule ("module://");
- char pBuffer[1024];
-
- vos::ORealDynamicLoader::computeModuleName (
- prefix, pBuffer, sizeof(pBuffer));
- aModule += pBuffer;
-
- return rxActivator->deinstall (
- StringToUString (aModule, CHARSET_SYSTEM));
-}
-
-#endif /* OLD */
-
/*
* main.
*/
@@ -675,17 +606,7 @@ int SAL_CALL main (int argc, char **argv)
if (nOptions & OPTION_INSTALL)
{
-#if 0 /* OLD */
- XServiceActivatorRef xActivator;
- if (queryModuleActivator (xManager, xActivator))
- {
- if (install (xActivator, "pgp"))
- printf ("Module PGP installed.\n");
- else
- printf ("Error: module PGP not installed.\n");
- }
- nOptions &= ~OPTION_INSTALL;
-#endif /* OLD */
+
}
if (nOptions & (OPTION_DECRYPT | OPTION_ENCRYPT | OPTION_SIGN))
@@ -823,17 +744,7 @@ int SAL_CALL main (int argc, char **argv)
if (nOptions & OPTION_UNINSTALL)
{
-#if 0 /* OLD */
- XServiceActivatorRef xActivator;
- if (queryModuleActivator (xManager, xActivator))
- {
- if (uninstall (xActivator, "pgp"))
- printf ("Module PGP uninstalled.\n");
- else
- printf ("Error: module PGP not uninstalled.\n");
- }
- nOptions &= ~OPTION_UNINSTALL;
-#endif /* OLD */
+
}
return 0;