diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-19 13:15:15 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-19 13:16:38 +0200 |
commit | 03a9f139bd9ea1a4f9096fc982e6b326def58532 (patch) | |
tree | bfb7a08bb4831a1a46b48c3bb49afa77ca436349 /oox/source | |
parent | e8a169c93d7e2443a2e56afe7e99cd0721a2c27b (diff) |
ComponentContext::getUnoContext -> getComponentContext simplification
...and some further clean-up.
Change-Id: If5dce53e382b56390c502d0d0d93fc06cbfe33ea
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/ole/olehelper.cxx | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx index b6d9376128ca..43079819f172 100644 --- a/oox/source/ole/olehelper.cxx +++ b/oox/source/ole/olehelper.cxx @@ -40,7 +40,6 @@ #include <tools/globname.hxx> #include <unotools/streamwrap.hxx> #include <comphelper/processfactory.hxx> -#include <comphelper/componentcontext.hxx> namespace oox { namespace ole { @@ -354,15 +353,6 @@ lcl_getFrame( const Reference< ::com::sun::star::frame::XModel >& rxModel ) return xFrame; } -Reference< XComponentContext > -lcl_getUnoCtx() -{ - comphelper::ComponentContext aCtx( ::comphelper::getProcessServiceFactory() ); - return aCtx.getUNOContext(); -} - - - class OleFormCtrlExportHelper { ::oox::ole::EmbeddedControl maControl; @@ -476,7 +466,7 @@ void OleFormCtrlExportHelper::exportControl( const Reference< XOutputStream >& r } } -MSConvertOCXControls::MSConvertOCXControls( const Reference< ::com::sun::star::frame::XModel >& rxModel ) : SvxMSConvertOCXControls( rxModel ), mxCtx( lcl_getUnoCtx() ), maGrfHelper( mxCtx, lcl_getFrame( rxModel ), StorageRef() ) +MSConvertOCXControls::MSConvertOCXControls( const Reference< ::com::sun::star::frame::XModel >& rxModel ) : SvxMSConvertOCXControls( rxModel ), mxCtx( comphelper::getProcessComponentContext() ), maGrfHelper( mxCtx, lcl_getFrame( rxModel ), StorageRef() ) { } @@ -589,7 +579,7 @@ sal_Bool MSConvertOCXControls::WriteOCXStream( const Reference< XModel >& rxMode { SvGlobalName aName; - OleFormCtrlExportHelper exportHelper( lcl_getUnoCtx(), rxModel, rxControlModel ); + OleFormCtrlExportHelper exportHelper( comphelper::getProcessComponentContext(), rxModel, rxControlModel ); if ( !exportHelper.isValid() ) return sal_False; |