summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-05-03 17:30:49 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2010-05-03 17:30:49 +0200
commit04fc19008f45159e5b655fbac82c63f63ad932f0 (patch)
treee4016ae97c30c03a69ba914417cebc302b637845 /cui
parenteed1a4cbf0088d8ceb45a1eabfe166226bf17695 (diff)
parentf4f8addcaf340d3ad05d04f40c43f80c27d7b8e3 (diff)
CWS-TOOLING: integrate CWS nspluginglobal
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/treeopt.cxx29
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 );
}
}