summaryrefslogtreecommitdiff
path: root/vcl/unx/source/plugadapt/salplug.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/source/plugadapt/salplug.cxx')
-rw-r--r--vcl/unx/source/plugadapt/salplug.cxx38
1 files changed, 19 insertions, 19 deletions
diff --git a/vcl/unx/source/plugadapt/salplug.cxx b/vcl/unx/source/plugadapt/salplug.cxx
index 0accb8def42f..54f9752b56bc 100644
--- a/vcl/unx/source/plugadapt/salplug.cxx
+++ b/vcl/unx/source/plugadapt/salplug.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
@@ -63,7 +63,7 @@ static const char * desktop_strings[] = { "none", "unknown", "GNOME", "KDE", "KD
static SalInstance* tryInstance( const OUString& rModuleBase )
{
SalInstance* pInst = NULL;
-
+
OUStringBuffer aModName( 128 );
aModName.appendAscii( SAL_DLLPREFIX"vclplug_" );
aModName.append( rModuleBase );
@@ -81,7 +81,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase )
{
pInst = aProc( aMod );
#if OSL_DEBUG_LEVEL > 1
- std::fprintf( stderr, "sal plugin %s produced instance %p\n",
+ std::fprintf( stderr, "sal plugin %s produced instance %p\n",
OUStringToOString( aModule, RTL_TEXTENCODING_ASCII_US ).getStr(),
pInst );
#endif
@@ -90,9 +90,9 @@ static SalInstance* tryInstance( const OUString& rModuleBase )
pCloseModule = aMod;
/*
- * Recent GTK+ versions load their modules with RTLD_LOCAL, so we can
- * not access the 'gnome_accessibility_module_shutdown' anymore.
- * So make sure libgtk+ & co are still mapped into memory when
+ * Recent GTK+ versions load their modules with RTLD_LOCAL, so we can
+ * not access the 'gnome_accessibility_module_shutdown' anymore.
+ * So make sure libgtk+ & co are still mapped into memory when
* atk-bridge's atexit handler gets called.
*/
if( rModuleBase.equalsAscii("gtk") )
@@ -107,7 +107,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase )
{
pCloseModule = NULL;
}
-
+
GetSalData()->m_pPlugin = aMod;
}
else
@@ -127,7 +127,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase )
else
std::fprintf( stderr, "could not load shared object %s\n",
OUStringToOString( aModule, RTL_TEXTENCODING_ASCII_US ).getStr() );
-#endif
+#endif
return pInst;
}
@@ -142,7 +142,7 @@ static const rtl::OUString& get_desktop_environment()
aModName.appendAscii( SAL_DLLPOSTFIX );
aModName.appendAscii( SAL_DLLEXTENSION );
OUString aModule = aModName.makeStringAndClear();
-
+
oslModule aMod = osl_loadModuleRelative(
reinterpret_cast< oslGenericFunction >( &tryInstance ), aModule.pData,
SAL_LOADMODULE_DEFAULT );
@@ -164,12 +164,12 @@ static SalInstance* autodetect_plugin()
{
"kde4", "kde", "gtk", "gen", 0
};
-
+
static const char* pStandardFallbackList[] =
{
"gtk", "gen", 0
};
-
+
static const char* pHeadlessFallbackList[] =
{
"svp", 0
@@ -178,7 +178,7 @@ static SalInstance* autodetect_plugin()
const rtl::OUString& desktop( get_desktop_environment() );
const char ** pList = pStandardFallbackList;
int nListEntry = 0;
-
+
// no server at all: dummy plugin
if ( desktop.equalsAscii( desktop_strings[DESKTOP_NONE] ) )
pList = pHeadlessFallbackList;
@@ -191,12 +191,12 @@ static SalInstance* autodetect_plugin()
}
else if( desktop.equalsAscii( desktop_strings[DESKTOP_KDE4] ) )
pList = pKDEFallbackList;
-
+
SalInstance* pInst = NULL;
while( pList[nListEntry] && pInst == NULL )
{
- rtl::OUString aTry( rtl::OUString::createFromAscii( pList[nListEntry] ) );
- pInst = tryInstance( aTry );
+ rtl::OUString aTry( rtl::OUString::createFromAscii( pList[nListEntry] ) );
+ pInst = tryInstance( aTry );
#if OSL_DEBUG_LEVEL > 1
if( pInst )
std::fprintf( stderr, "plugin autodetection: %s\n", pList[nListEntry] );
@@ -222,7 +222,7 @@ static SalInstance* check_headless_plugin()
SalInstance *CreateSalInstance()
{
- SalInstance* pInst = NULL;
+ SalInstance* pInst = NULL;
static const char* pUsePlugin = getenv( "SAL_USE_VCLPLUGIN" );
@@ -230,10 +230,10 @@ SalInstance *CreateSalInstance()
pInst = check_headless_plugin();
else
pInst = tryInstance( OUString::createFromAscii( pUsePlugin ) );
-
+
if( ! pInst )
pInst = autodetect_plugin();
-
+
// fallback, try everything
const char* pPlugin[] = { "gtk", "kde", "gen", 0 };
@@ -248,7 +248,7 @@ SalInstance *CreateSalInstance()
// acquire SolarMutex
pInst->AcquireYieldMutex( 1 );
-
+
return pInst;
}