2010-10-12 15:53:47 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-15 17:28:16 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2004-05-10 12:00:40 +00:00
|
|
|
|
2013-08-19 00:41:12 +03:00
|
|
|
#include <config_features.h>
|
|
|
|
|
2004-05-10 12:00:40 +00:00
|
|
|
#include "desktopcontext.hxx"
|
|
|
|
|
|
|
|
#include <vcl/svapp.hxx>
|
2005-07-07 12:20:21 +00:00
|
|
|
#include <svtools/javainteractionhandler.hxx>
|
2004-05-10 12:00:40 +00:00
|
|
|
|
|
|
|
using namespace com::sun::star::uno;
|
|
|
|
using namespace com::sun::star::task;
|
|
|
|
|
2011-02-26 15:34:48 +01:00
|
|
|
|
2004-05-10 12:00:40 +00:00
|
|
|
namespace desktop
|
|
|
|
{
|
|
|
|
|
|
|
|
DesktopContext::DesktopContext( const Reference< XCurrentContext > & ctx )
|
|
|
|
: m_xNextContext( ctx )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-02-25 21:31:58 +01:00
|
|
|
Any SAL_CALL DesktopContext::getValueByName( const OUString& Name) throw (RuntimeException, std::exception)
|
2004-05-10 12:00:40 +00:00
|
|
|
{
|
|
|
|
Any retVal;
|
|
|
|
|
2012-04-06 15:05:52 +02:00
|
|
|
if ( Name == JAVA_INTERACTION_HANDLER_NAME )
|
2004-05-10 12:00:40 +00:00
|
|
|
{
|
2013-08-19 00:41:12 +03:00
|
|
|
#if HAVE_FEATURE_JAVA
|
2005-07-07 12:20:21 +00:00
|
|
|
retVal = makeAny( Reference< XInteractionHandler >( new svt::JavaInteractionHandler()) );
|
2013-04-04 22:46:53 +02:00
|
|
|
#endif
|
2004-05-10 12:00:40 +00:00
|
|
|
}
|
|
|
|
else if( m_xNextContext.is() )
|
|
|
|
{
|
|
|
|
// Call next context in chain if found
|
|
|
|
retVal = m_xNextContext->getValueByName( Name );
|
|
|
|
}
|
|
|
|
return retVal;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2010-10-12 15:53:47 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|