Kaydet (Commit) 9a49980e authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, Convert various comphelper::ComponentContext

..to regular XComponenContext

Change-Id: I08f9092ae818db5c1e37880625b83607c860680b
üst ac40f246
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include <svl/smplhint.hxx> #include <svl/smplhint.hxx>
#include <tools/diagnose_ex.h> #include <tools/diagnose_ex.h>
#include <comphelper/stl_types.hxx> #include <comphelper/stl_types.hxx>
#include <comphelper/componentcontext.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <dbaccess/dbsubcomponentcontroller.hxx> #include <dbaccess/dbsubcomponentcontroller.hxx>
#include <svx/unoshape.hxx> #include <svx/unoshape.hxx>
...@@ -277,8 +276,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv ...@@ -277,8 +276,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
{ {
if ( !m_pImpl->m_xIntrospection.is() ) if ( !m_pImpl->m_xIntrospection.is() )
{ {
::comphelper::ComponentContext aContext( m_pImpl->m_rModel.getController()->getORB() ); m_pImpl->m_xIntrospection = Introspection::create( m_pImpl->m_rModel.getController()->getORB() );
m_pImpl->m_xIntrospection = Introspection::create( aContext.getUNOContext() );
} }
Reference< XIntrospectionAccess > xIntrospection( Reference< XIntrospectionAccess > xIntrospection(
m_pImpl->m_xIntrospection->inspect( makeAny( _rEvent.Source ) ), m_pImpl->m_xIntrospection->inspect( makeAny( _rEvent.Source ) ),
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include <com/sun/star/ui/dialogs/XWizardController.hpp> #include <com/sun/star/ui/dialogs/XWizardController.hpp>
#include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase1.hxx>
#include <comphelper/componentcontext.hxx>
//...................................................................................................................... //......................................................................................................................
namespace svt { namespace uno namespace svt { namespace uno
...@@ -95,7 +94,6 @@ namespace svt { namespace uno ...@@ -95,7 +94,6 @@ namespace svt { namespace uno
virtual void destroyDialog(); virtual void destroyDialog();
private: private:
::comphelper::ComponentContext m_aContext;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int16 > > m_aWizardSteps; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int16 > > m_aWizardSteps;
::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController; ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController;
OUString m_sHelpURL; OUString m_sHelpURL;
......
...@@ -91,7 +91,6 @@ namespace svt { namespace uno ...@@ -91,7 +91,6 @@ namespace svt { namespace uno
//------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------
Wizard::Wizard( const Reference< XComponentContext >& _rxContext ) Wizard::Wizard( const Reference< XComponentContext >& _rxContext )
:Wizard_Base( _rxContext ) :Wizard_Base( _rxContext )
,m_aContext( _rxContext )
{ {
} }
......
...@@ -100,7 +100,7 @@ using namespace ::connectivity::simple; ...@@ -100,7 +100,7 @@ using namespace ::connectivity::simple;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
FormController_NewInstance_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _rxORB ) FormController_NewInstance_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _rxORB )
{ {
return *( new ::svxform::FormController( _rxORB ) ); return *( new ::svxform::FormController( comphelper::getComponentContext(_rxORB) ) );
} }
namespace svxform namespace svxform
...@@ -547,11 +547,11 @@ IMPL_LINK( FormController, OnInvalidateFeatures, void*, /*_pNotInterestedInThisP ...@@ -547,11 +547,11 @@ IMPL_LINK( FormController, OnInvalidateFeatures, void*, /*_pNotInterestedInThisP
DBG_NAME( FormController ) DBG_NAME( FormController )
//------------------------------------------------------------------ //------------------------------------------------------------------
FormController::FormController(const Reference< XMultiServiceFactory > & _rxORB ) FormController::FormController(const Reference< css::uno::XComponentContext > & _rxORB )
:FormController_BASE( m_aMutex ) :FormController_BASE( m_aMutex )
,OPropertySetHelper( FormController_BASE::rBHelper ) ,OPropertySetHelper( FormController_BASE::rBHelper )
,OSQLParserClient( comphelper::getComponentContext(_rxORB) ) ,OSQLParserClient( _rxORB )
,m_aContext( _rxORB ) ,m_xComponentContext( _rxORB )
,m_aActivateListeners(m_aMutex) ,m_aActivateListeners(m_aMutex)
,m_aModifyListeners(m_aMutex) ,m_aModifyListeners(m_aMutex)
,m_aErrorListeners(m_aMutex) ,m_aErrorListeners(m_aMutex)
...@@ -587,7 +587,7 @@ FormController::FormController(const Reference< XMultiServiceFactory > & _rxORB ...@@ -587,7 +587,7 @@ FormController::FormController(const Reference< XMultiServiceFactory > & _rxORB
::comphelper::increment(m_refCount); ::comphelper::increment(m_refCount);
{ {
m_xTabController = TabController::create( m_aContext.getUNOContext() ); m_xTabController = TabController::create( m_xComponentContext );
m_xAggregate = Reference< XAggregation >( m_xTabController, UNO_QUERY_THROW ); m_xAggregate = Reference< XAggregation >( m_xTabController, UNO_QUERY_THROW );
m_xAggregate->setDelegator( *this ); m_xAggregate->setDelegator( *this );
} }
...@@ -831,7 +831,7 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons ...@@ -831,7 +831,7 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons
{ {
Reference< XDatabaseMetaData> xMetaData(xConnection->getMetaData()); Reference< XDatabaseMetaData> xMetaData(xConnection->getMetaData());
Reference< XNumberFormatsSupplier> xFormatSupplier( aStaticTools.getNumberFormats( xConnection, sal_True ) ); Reference< XNumberFormatsSupplier> xFormatSupplier( aStaticTools.getNumberFormats( xConnection, sal_True ) );
Reference< XNumberFormatter> xFormatter( NumberFormatter::create(m_aContext.getUNOContext()), UNO_QUERY_THROW ); Reference< XNumberFormatter> xFormatter = NumberFormatter::create(m_xComponentContext);
xFormatter->attachNumberFormatsSupplier(xFormatSupplier); xFormatter->attachNumberFormatsSupplier(xFormatSupplier);
Reference< XColumnsSupplier> xSupplyCols(m_xModelAsIndex, UNO_QUERY); Reference< XColumnsSupplier> xSupplyCols(m_xModelAsIndex, UNO_QUERY);
...@@ -1466,7 +1466,7 @@ void FormController::toggleAutoFields(sal_Bool bAutoFields) ...@@ -1466,7 +1466,7 @@ void FormController::toggleAutoFields(sal_Bool bAutoFields)
{ {
OUString sServiceName; OUString sServiceName;
OSL_VERIFY( xSet->getPropertyValue( FM_PROP_DEFAULTCONTROL ) >>= sServiceName ); OSL_VERIFY( xSet->getPropertyValue( FM_PROP_DEFAULTCONTROL ) >>= sServiceName );
Reference< XControl > xNewControl( m_aContext.createComponent( sServiceName ), UNO_QUERY ); Reference< XControl > xNewControl( m_xComponentContext->getServiceManager()->createInstanceWithContext( sServiceName, m_xComponentContext ), UNO_QUERY );
replaceControl( xControl, xNewControl ); replaceControl( xControl, xNewControl );
} }
} }
...@@ -1789,7 +1789,7 @@ void FormController::focusGained(const FocusEvent& e) throw( RuntimeException ) ...@@ -1789,7 +1789,7 @@ void FormController::focusGained(const FocusEvent& e) throw( RuntimeException )
return; return;
// Control erhaelt Focus, dann eventuell in den sichtbaren Bereich // Control erhaelt Focus, dann eventuell in den sichtbaren Bereich
Reference< XFormControllerContext > xContext( m_xContext ); Reference< XFormControllerContext > xContext( m_xFormControllerContext );
Reference< XControl > xCurrentControl( m_xCurrentControl ); Reference< XControl > xCurrentControl( m_xCurrentControl );
aGuard.clear(); aGuard.clear();
// <-- SYNCHRONIZED // <-- SYNCHRONIZED
...@@ -1927,7 +1927,7 @@ void FormController::setModel(const Reference< XTabControllerModel > & Model) th ...@@ -1927,7 +1927,7 @@ void FormController::setModel(const Reference< XTabControllerModel > & Model) th
if (m_xModelAsIndex.is()) if (m_xModelAsIndex.is())
{ {
// re-create m_xFormOperations // re-create m_xFormOperations
m_xFormOperations.set( FormOperations::createWithFormController( m_aContext.getUNOContext(), this ), UNO_SET_THROW ); m_xFormOperations = FormOperations::createWithFormController( m_xComponentContext, this );
m_xFormOperations->setFeatureInvalidation( this ); m_xFormOperations->setFeatureInvalidation( this );
// adding load and ui interaction listeners // adding load and ui interaction listeners
...@@ -3061,7 +3061,7 @@ Reference< XFormControllerContext > SAL_CALL FormController::getContext() throw ...@@ -3061,7 +3061,7 @@ Reference< XFormControllerContext > SAL_CALL FormController::getContext() throw
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
impl_checkDisposed_throw(); impl_checkDisposed_throw();
return m_xContext; return m_xFormControllerContext;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -3069,7 +3069,7 @@ void SAL_CALL FormController::setContext( const Reference< XFormControllerContex ...@@ -3069,7 +3069,7 @@ void SAL_CALL FormController::setContext( const Reference< XFormControllerContex
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
impl_checkDisposed_throw(); impl_checkDisposed_throw();
m_xContext = _context; m_xFormControllerContext = _context;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -3146,7 +3146,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) ...@@ -3146,7 +3146,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos)
// need to parse criteria localized // need to parse criteria localized
OStaticDataAccessTools aStaticTools; OStaticDataAccessTools aStaticTools;
Reference< XNumberFormatsSupplier> xFormatSupplier( aStaticTools.getNumberFormats(xConnection, sal_True)); Reference< XNumberFormatsSupplier> xFormatSupplier( aStaticTools.getNumberFormats(xConnection, sal_True));
Reference< XNumberFormatter> xFormatter( NumberFormatter::create(m_aContext.getUNOContext()), UNO_QUERY_THROW ); Reference< XNumberFormatter> xFormatter = NumberFormatter::create(m_xComponentContext);
xFormatter->attachNumberFormatsSupplier(xFormatSupplier); xFormatter->attachNumberFormatsSupplier(xFormatSupplier);
Locale aAppLocale = Application::GetSettings().GetUILanguageTag().getLocale(); Locale aAppLocale = Application::GetSettings().GetUILanguageTag().getLocale();
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetUILocaleDataWrapper() ); const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetUILocaleDataWrapper() );
...@@ -3298,7 +3298,7 @@ void FormController::startFiltering() ...@@ -3298,7 +3298,7 @@ void FormController::startFiltering()
// the control we have to activate after replacement // the control we have to activate after replacement
Reference< XDatabaseMetaData > xMetaData(xConnection->getMetaData()); Reference< XDatabaseMetaData > xMetaData(xConnection->getMetaData());
Reference< XNumberFormatsSupplier > xFormatSupplier = aStaticTools.getNumberFormats(xConnection, sal_True); Reference< XNumberFormatsSupplier > xFormatSupplier = aStaticTools.getNumberFormats(xConnection, sal_True);
Reference< XNumberFormatter > xFormatter( NumberFormatter::create(m_aContext.getUNOContext()), UNO_QUERY_THROW ); Reference< XNumberFormatter > xFormatter = NumberFormatter::create(m_xComponentContext);
xFormatter->attachNumberFormatsSupplier(xFormatSupplier); xFormatter->attachNumberFormatsSupplier(xFormatSupplier);
// structure for storing the field info // structure for storing the field info
...@@ -3372,7 +3372,7 @@ void FormController::startFiltering() ...@@ -3372,7 +3372,7 @@ void FormController::startFiltering()
{ {
// create a filter control // create a filter control
Reference< XControl > xFilterControl = form::control::FilterControl::createWithFormat( Reference< XControl > xFilterControl = form::control::FilterControl::createWithFormat(
m_aContext.getUNOContext(), m_xComponentContext,
VCLUnoHelper::GetInterface( getDialogParentWindow() ), VCLUnoHelper::GetInterface( getDialogParentWindow() ),
xFormatter, xFormatter,
xModel); xModel);
...@@ -3466,7 +3466,7 @@ void FormController::stopFiltering() ...@@ -3466,7 +3466,7 @@ void FormController::stopFiltering()
{ {
OUString sServiceName; OUString sServiceName;
OSL_VERIFY( xSet->getPropertyValue( FM_PROP_DEFAULTCONTROL ) >>= sServiceName ); OSL_VERIFY( xSet->getPropertyValue( FM_PROP_DEFAULTCONTROL ) >>= sServiceName );
Reference< XControl > xNewControl( m_aContext.createComponent( sServiceName ), UNO_QUERY ); Reference< XControl > xNewControl( m_xComponentContext->getServiceManager()->createInstanceWithContext( sServiceName, m_xComponentContext ), UNO_QUERY );
replaceControl( xControl, xNewControl ); replaceControl( xControl, xNewControl );
} }
} }
...@@ -4256,8 +4256,7 @@ bool FormController::ensureInteractionHandler() ...@@ -4256,8 +4256,7 @@ bool FormController::ensureInteractionHandler()
return false; return false;
m_bAttemptedHandlerCreation = true; m_bAttemptedHandlerCreation = true;
m_xInteractionHandler.set( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0), UNO_QUERY ); m_xInteractionHandler = InteractionHandler::createWithParent(m_xComponentContext, 0);
OSL_ENSURE( m_xInteractionHandler.is(), "FormController::ensureInteractionHandler: could not create an interaction handler!" );
return m_xInteractionHandler.is(); return m_xInteractionHandler.is();
} }
......
...@@ -68,7 +68,6 @@ ...@@ -68,7 +68,6 @@
#include <com/sun/star/util/XModifyListener.hpp> #include <com/sun/star/util/XModifyListener.hpp>
#include <comphelper/broadcasthelper.hxx> #include <comphelper/broadcasthelper.hxx>
#include <comphelper/componentcontext.hxx>
#include <comphelper/proparrhlp.hxx> #include <comphelper/proparrhlp.hxx>
#include <comphelper/stl_types.hxx> #include <comphelper/stl_types.hxx>
#include <cppuhelper/propshlp.hxx> #include <cppuhelper/propshlp.hxx>
...@@ -145,11 +144,11 @@ namespace svxform ...@@ -145,11 +144,11 @@ namespace svxform
::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> m_xModelAsIndex; ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> m_xModelAsIndex;
::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager> m_xModelAsManager; ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager> m_xModelAsManager;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xParent; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xParent;
::comphelper::ComponentContext m_aContext; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xComponentContext;
// Composer used for checking filter conditions // Composer used for checking filter conditions
::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > m_xComposer; ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > m_xComposer;
::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > m_xInteractionHandler; ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > m_xInteractionHandler;
::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormControllerContext > m_xContext; ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormControllerContext > m_xFormControllerContext;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > m_aControls; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > m_aControls;
::cppu::OInterfaceContainerHelper ::cppu::OInterfaceContainerHelper
...@@ -210,7 +209,7 @@ namespace svxform ...@@ -210,7 +209,7 @@ namespace svxform
Interceptors m_aControlDispatchInterceptors; Interceptors m_aControlDispatchInterceptors;
public: public:
FormController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _rxORB ); FormController( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & _rxORB );
protected: protected:
~FormController(); ~FormController();
......
...@@ -56,9 +56,8 @@ namespace toolkit ...@@ -56,9 +56,8 @@ namespace toolkit
//= DefaultGridColumnModel //= DefaultGridColumnModel
//================================================================================================================== //==================================================================================================================
//------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------
DefaultGridColumnModel::DefaultGridColumnModel( const Reference< XComponentContext >& i_context ) DefaultGridColumnModel::DefaultGridColumnModel()
:DefaultGridColumnModel_Base( m_aMutex ) :DefaultGridColumnModel_Base( m_aMutex )
,m_aContext( i_context )
,m_aContainerListeners( m_aMutex ) ,m_aContainerListeners( m_aMutex )
,m_aColumns() ,m_aColumns()
{ {
...@@ -68,7 +67,6 @@ namespace toolkit ...@@ -68,7 +67,6 @@ namespace toolkit
DefaultGridColumnModel::DefaultGridColumnModel( DefaultGridColumnModel const & i_copySource ) DefaultGridColumnModel::DefaultGridColumnModel( DefaultGridColumnModel const & i_copySource )
:cppu::BaseMutex() :cppu::BaseMutex()
,DefaultGridColumnModel_Base( m_aMutex ) ,DefaultGridColumnModel_Base( m_aMutex )
,m_aContext( i_copySource.m_aContext )
,m_aContainerListeners( m_aMutex ) ,m_aContainerListeners( m_aMutex )
,m_aColumns() ,m_aColumns()
{ {
...@@ -377,8 +375,8 @@ namespace toolkit ...@@ -377,8 +375,8 @@ namespace toolkit
//...................................................................................................................... //......................................................................................................................
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rFactory) ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& )
{ {
return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::DefaultGridColumnModel( comphelper::getComponentContext(_rFactory) ) ); return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::DefaultGridColumnModel );
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include <cppuhelper/basemutex.hxx> #include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase2.hxx> #include <cppuhelper/compbase2.hxx>
#include <comphelper/componentcontext.hxx>
#include <vector> #include <vector>
namespace toolkit namespace toolkit
...@@ -41,7 +40,7 @@ class DefaultGridColumnModel :public ::cppu::BaseMutex ...@@ -41,7 +40,7 @@ class DefaultGridColumnModel :public ::cppu::BaseMutex
,public DefaultGridColumnModel_Base ,public DefaultGridColumnModel_Base
{ {
public: public:
DefaultGridColumnModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext ); DefaultGridColumnModel();
DefaultGridColumnModel( DefaultGridColumnModel const & i_copySource ); DefaultGridColumnModel( DefaultGridColumnModel const & i_copySource );
virtual ~DefaultGridColumnModel(); virtual ~DefaultGridColumnModel();
...@@ -72,7 +71,6 @@ public: ...@@ -72,7 +71,6 @@ public:
private: private:
typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > Columns; typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > > Columns;
::comphelper::ComponentContext m_aContext;
::cppu::OInterfaceContainerHelper m_aContainerListeners; ::cppu::OInterfaceContainerHelper m_aContainerListeners;
Columns m_aColumns; Columns m_aColumns;
}; };
......
...@@ -52,16 +52,16 @@ namespace toolkit ...@@ -52,16 +52,16 @@ namespace toolkit
//====================================================================================================================== //======================================================================================================================
namespace namespace
{ {
Reference< XGridDataModel > lcl_getDefaultDataModel_throw( ::comphelper::ComponentContext const & i_context ) Reference< XGridDataModel > lcl_getDefaultDataModel_throw( const Reference<XComponentContext> & i_context )
{ {
Reference< XMutableGridDataModel > const xDelegatorModel( DefaultGridDataModel::create( i_context.getUNOContext() ), UNO_QUERY_THROW ); Reference< XMutableGridDataModel > const xDelegatorModel( DefaultGridDataModel::create( i_context ), UNO_QUERY_THROW );
Reference< XGridDataModel > const xDataModel( SortableGridDataModel::create( i_context.getUNOContext(), xDelegatorModel ), UNO_QUERY_THROW ); Reference< XGridDataModel > const xDataModel( SortableGridDataModel::create( i_context, xDelegatorModel ), UNO_QUERY_THROW );
return xDataModel; return xDataModel;
} }
Reference< XGridColumnModel > lcl_getDefaultColumnModel_throw( ::comphelper::ComponentContext const & i_context ) Reference< XGridColumnModel > lcl_getDefaultColumnModel_throw( const Reference<XComponentContext> & i_context )
{ {
Reference< XGridColumnModel > const xColumnModel( i_context.createComponent( "com.sun.star.awt.grid.DefaultGridColumnModel" ), UNO_QUERY_THROW ); Reference< XGridColumnModel > const xColumnModel( i_context->getServiceManager()->createInstanceWithContext( "com.sun.star.awt.grid.DefaultGridColumnModel", i_context ), UNO_QUERY_THROW );
return xColumnModel; return xColumnModel;
} }
} }
......
...@@ -52,8 +52,6 @@ ...@@ -52,8 +52,6 @@
#include <com/sun/star/script/vba/XVBACompatibility.hpp> #include <com/sun/star/script/vba/XVBACompatibility.hpp>
#include <com/sun/star/util/NumberFormatsSupplier.hpp> #include <com/sun/star/util/NumberFormatsSupplier.hpp>
#include <comphelper/componentcontext.hxx>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame; using namespace ::com::sun::star::frame;
...@@ -885,8 +883,9 @@ bool ImportContext::importImageURLProperty( ...@@ -885,8 +883,9 @@ bool ImportContext::importImageURLProperty(
{ {
uno::Sequence< Any > aArgs( 1 ); uno::Sequence< Any > aArgs( 1 );
aArgs[ 0 ] <<= xDocStorage->getDocumentStorage(); aArgs[ 0 ] <<= xDocStorage->getDocumentStorage();
::comphelper::ComponentContext aContext( _pImport->getComponentContext() ); xGraphicResolver.set(
aContext.createComponentWithArguments( "com.sun.star.comp.Svx.GraphicImportHelper" , aArgs, xGraphicResolver ); _pImport->getComponentContext()->getServiceManager()->createInstanceWithArgumentsAndContext( "com.sun.star.comp.Svx.GraphicImportHelper" , aArgs, _pImport->getComponentContext() ),
UNO_QUERY );
if ( xGraphicResolver.is() ) if ( xGraphicResolver.is() )
{ {
OUString aTmp("vnd.sun.star.Package:"); OUString aTmp("vnd.sun.star.Package:");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment