summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/componentcontext.cxx23
1 files changed, 3 insertions, 20 deletions
diff --git a/comphelper/source/misc/componentcontext.cxx b/comphelper/source/misc/componentcontext.cxx
index df7db6a16185..8ec65d33542e 100644
--- a/comphelper/source/misc/componentcontext.cxx
+++ b/comphelper/source/misc/componentcontext.cxx
@@ -18,7 +18,7 @@
*/
#include <comphelper/componentcontext.hxx>
-
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/lang/NullPointerException.hpp>
#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -53,8 +53,6 @@ namespace comphelper
{
if ( m_xContext.is() )
m_xORB = m_xContext->getServiceManager();
- if ( !m_xORB.is() )
- throw NullPointerException();
}
//------------------------------------------------------------------------
@@ -63,23 +61,8 @@ namespace comphelper
if ( !_rxLegacyFactory.is() )
throw NullPointerException();
- try
- {
- Reference< XPropertySet > xFactoryProperties( _rxLegacyFactory, UNO_QUERY_THROW );
- m_xContext = Reference< XComponentContext >(
- xFactoryProperties->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) ),
- UNO_QUERY );
- }
- catch( const RuntimeException& ) { throw; }
- catch( const Exception& )
- {
- throw RuntimeException();
- }
-
- if ( m_xContext.is() )
- m_xORB = m_xContext->getServiceManager();
- if ( !m_xORB.is() )
- throw NullPointerException();
+ m_xContext = comphelper::getComponentContext( _rxLegacyFactory );
+ m_xORB = m_xContext->getServiceManager();
}
//------------------------------------------------------------------------
r> 2016-02-09slideshow: Add shadows to the Vortex transitionEmmanuel Gil Peyrot 2016-02-09slideshow: Don't de-reference Nodes cast to const char *.Michael Meeks 2016-02-09slideshow: Only retrieve each uniform location onceEmmanuel Gil Peyrot 2016-02-09Remove excess newlinesChris Sherlock 2016-02-08vcl: cmdevt.[hc]xx -> commandevent.[hc]xxChris Sherlock 2016-02-06vcl: rename EXC_* constants to EXCEPTION_*, EXC is too much like 'execute'Chris Sherlock 2016-02-06vcl: split exception types from input typesChris Sherlock 2016-02-04loplugin:fpcomparison in slideshow/Noel Grandin 2016-02-04vcl: take into account the font width is the average font widthChris Sherlock 2016-02-02slideshow: Make sure the slide is fully opaque in HoneycombEmmanuel Gil Peyrot 2016-02-02boost::hash->std::hashNoel Grandin 2016-01-31boost::tuple -> std::tupleCaolán McNamara 2016-01-31OSL_THIS_FUNC is a rip-off of BOOST_CURRENT_FUNCTION so we can use thatCaolán McNamara 2016-01-29vcl: add text alignment functions to ImplFont and FontAttributesChris Sherlock 2016-01-25InterfaceContainer2 with vector instead of SequenceNoel Grandin 2016-01-22GCC PCH says -Werror=unused-macros BOOST_SPIRIT_DEBUGMichael Stahl 2016-01-20slideshow: Change quads into cubes in the Vortex transitionEmmanuel Gil Peyrot 2016-01-20slideshow: Relicense every shader of which I am the sole author to MPLEmmanuel Gil Peyrot 2016-01-16slideshow: Add some volume to the Honeycomb hexagons, making them look betterEmmanuel Gil Peyrot 2016-01-16slideshow: Tweak a few constants to make Glitter and Honeycomb look nicerEmmanuel Gil Peyrot 2016-01-14loplugin:unusedmethods unused return value in slideshowNoel Grandin 2016-01-11loplugin:privatebase: Make derivation from noncopyable explicitly privateStephan Bergmann 2016-01-05Fix typosAndrea Gelmini 2016-01-05slideshow: Define inverse() to bring back the GLSL version to 1.20Emmanuel Gil Peyrot 2016-01-05slideshow: Improve the Vortex transition to match PowerPoint betterEmmanuel Gil Peyrot 2016-01-05slideshow: Improve the Ripple transition to match PowerPoint betterEmmanuel Gil Peyrot 2016-01-05slideshow: Fix a few issues in the Glitter transitionEmmanuel Gil Peyrot 2016-01-05new loplugin rangedforcopy - use reference in range based forAndrzej Hunt