diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-05-03 17:30:49 +0200 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-05-03 17:30:49 +0200 |
commit | 04fc19008f45159e5b655fbac82c63f63ad932f0 (patch) | |
tree | e4016ae97c30c03a69ba914417cebc302b637845 /cui | |
parent | eed1a4cbf0088d8ceb45a1eabfe166226bf17695 (diff) | |
parent | f4f8addcaf340d3ad05d04f40c43f80c27d7b8e3 (diff) |
CWS-TOOLING: integrate CWS nspluginglobal
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/treeopt.cxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index f1651b0bd1dd..b63d9afc647e 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -129,6 +129,13 @@ #include <svx/drawitem.hxx> #include <rtl/uri.hxx> +#ifdef LINUX +#include <string.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#endif + using namespace ::com::sun::star; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; @@ -2195,6 +2202,28 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) if ( nPageId == RID_SVXPAGE_INET_MOZPLUGIN ) continue; #endif +#ifdef LINUX + // Disable Mozilla Plug-in tab-page on Linux if we find a + // globally installed plugin + if ( nPageId == RID_SVXPAGE_INET_MOZPLUGIN ) { + struct stat sb; + char *p; + bool bHaveSystemWidePlugin = false; + char mozpaths[]="/usr/lib/mozilla/plugins/libnpsoplugin.so:/usr/lib/firefox/plugins/libnpsoplugin.so:/usr/lib/mozilla-firefox/plugins/libnpsoplugin.so:/usr/lib/iceweasel/plugins/libnpsoplugin.so:/usr/lib/iceape/plugins/libnpsoplugin.so:/usr/lib/browser-plugins/libnpsoplugin.so:/usr/lib64/browser-plugins/libnpsoplugin.so"; + + p = strtok(mozpaths, ":"); + while (p != NULL) { + if (stat(p, &sb) != -1) { + bHaveSystemWidePlugin = true; + break; + } + p = strtok(NULL, ":"); + } + + if (bHaveSystemWidePlugin == true) + continue; + } +#endif AddTabPage( nPageId, rInetArray.GetString(i), nGroup ); } } |