PKGBUILDs/extra/openoffice-base-beta/shell.patch

43 lines
1.4 KiB
Diff
Raw Normal View History

2009-10-10 02:23:22 +00:00
Index: source/unix/sysshell/systemshell.cxx
===================================================================
RCS file: /cvs/gsl/shell/source/unix/sysshell/systemshell.cxx,v
retrieving revision 1.8
diff -u -r1.8 systemshell.cxx
--- shell/source/unix/sysshell/systemshell.cxx 19 Jun 2007 16:12:44 -0000 1.8
+++ shell/source/unix/sysshell/systemshell.cxx 13 Apr 2008 15:27:22 -0000
@@ -62,6 +62,8 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#endif
+#include "uno/current_context.hxx"
+
#include "osl/module.hxx"
using namespace ::com::sun::star;
@@ -116,6 +118,25 @@
bool init_recent_manager_api()
{
+ bool bInGnome = false;
+ try
+ {
+ uno::Reference< uno::XCurrentContext > xCurrentContext(uno::getCurrentContext());
+
+ if (xCurrentContext.is())
+ {
+ uno::Any aValue = xCurrentContext->getValueByName(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "system.desktop-environment" ) ) );
+
+ rtl::OUString aDesktopEnvironment;
+ if ( (aValue >>= aDesktopEnvironment) && (aDesktopEnvironment.equalsIgnoreAsciiCaseAscii("gnome")) )
+ bInGnome = true;
+ }
+ } catch ( ... ) {}
+
+ if (!bInGnome)
+ return false;
+
oslModule hDefault;
if( osl_getModuleHandle( NULL, &hDefault ) )
{