fdo#46808, Convert comphelper::ComponentContext in forms module
Change-Id: I8a9913d964633381f00c0a4885cc655805fa1974
This commit is contained in:
parent
2838b8eb5e
commit
d209e13319
@ -42,9 +42,8 @@ namespace dbtools
|
||||
//= FilterManager
|
||||
//====================================================================
|
||||
//--------------------------------------------------------------------
|
||||
FilterManager::FilterManager( const Reference< XMultiServiceFactory >& _rxORB )
|
||||
:m_xORB( _rxORB )
|
||||
,m_aFilterComponents( FC_COMPONENT_COUNT )
|
||||
FilterManager::FilterManager( )
|
||||
:m_aFilterComponents( FC_COMPONENT_COUNT )
|
||||
,m_bApplyPublicFilter( true )
|
||||
{
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ DatabaseDataProvider::DatabaseDataProvider(uno::Reference< uno::XComponentContex
|
||||
context, static_cast< Implements >(
|
||||
IMPLEMENTS_PROPERTY_SET), uno::Sequence< OUString >()),
|
||||
m_aParameterManager( m_aMutex, context ),
|
||||
m_aFilterManager( uno::Reference< lang::XMultiServiceFactory >(context->getServiceManager(),uno::UNO_QUERY) ),
|
||||
m_aFilterManager(),
|
||||
m_xContext(context),
|
||||
m_CommandType(sdb::CommandType::COMMAND), // #i94114
|
||||
m_RowLimit(0),
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <comphelper/streamsection.hxx>
|
||||
#include <comphelper/basicio.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <tools/diagnose_ex.h>
|
||||
#include <tools/debug.hxx>
|
||||
#include <tools/urlobj.hxx>
|
||||
@ -55,11 +56,11 @@ DBG_NAME(OButtonModel)
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OButtonModel(_rxFactory));
|
||||
return *(new OButtonModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OButtonModel::OButtonModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OButtonModel::OButtonModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OClickableImageBaseModel( _rxFactory, VCL_CONTROLMODEL_COMMANDBUTTON, FRM_SUN_CONTROL_COMMANDBUTTON )
|
||||
// use the old control name for compatibility reasons
|
||||
,m_aResetHelper( *this, m_aMutex )
|
||||
@ -88,7 +89,7 @@ Sequence< Type > OButtonModel::_getTypes()
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OButtonModel::OButtonModel( const OButtonModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OButtonModel::OButtonModel( const OButtonModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OClickableImageBaseModel( _pOriginal, _rxFactory )
|
||||
,m_aResetHelper( *this, m_aMutex )
|
||||
,m_eDefaultState( _pOriginal->m_eDefaultState )
|
||||
@ -339,7 +340,7 @@ void OButtonModel::impl_resetNoBroadcast_nothrow()
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OButtonControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OButtonControl(_rxFactory));
|
||||
return *(new OButtonControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -364,7 +365,7 @@ StringSequence OButtonControl::getSupportedServiceNames() throw()
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
OButtonControl::OButtonControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OButtonControl::OButtonControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OClickableImageBaseControl(_rxFactory, VCL_CONTROL_COMMANDBUTTON)
|
||||
,OFormNavigationHelper( _rxFactory )
|
||||
,m_nClickEvent( 0 )
|
||||
@ -681,7 +682,7 @@ sal_Int16 OButtonControl::getModelUrlFeatureId( ) const
|
||||
// is it a feature URL?
|
||||
if ( isFormControllerURL( sUrl ) )
|
||||
{
|
||||
OFormNavigationMapper aMapper( m_aContext.getLegacyServiceFactory() );
|
||||
OFormNavigationMapper aMapper( m_xContext );
|
||||
nFeatureId = aMapper.getFeatureId( sUrl );
|
||||
}
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ protected:
|
||||
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
||||
|
||||
public:
|
||||
OButtonControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OButtonControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
virtual ~OButtonControl();
|
||||
|
||||
// XServiceInfo
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "services.hxx"
|
||||
#include <tools/debug.hxx>
|
||||
#include <comphelper/basicio.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
//.........................................................................
|
||||
namespace frm
|
||||
@ -45,7 +46,7 @@ using namespace ::com::sun::star::form::binding;
|
||||
//==================================================================
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OCheckBoxControl::OCheckBoxControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OCheckBoxControl::OCheckBoxControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControl(_rxFactory, VCL_CONTROL_CHECKBOX)
|
||||
{
|
||||
}
|
||||
@ -53,7 +54,7 @@ OCheckBoxControl::OCheckBoxControl(const Reference<XMultiServiceFactory>& _rxFac
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OCheckBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
|
||||
{
|
||||
return *(new OCheckBoxControl(_rxFactory));
|
||||
return *(new OCheckBoxControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -74,13 +75,13 @@ StringSequence SAL_CALL OCheckBoxControl::getSupportedServiceNames() throw(::com
|
||||
//==================================================================
|
||||
InterfaceRef SAL_CALL OCheckBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
|
||||
{
|
||||
return *(new OCheckBoxModel(_rxFactory));
|
||||
return *(new OCheckBoxModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( OCheckBoxModel )
|
||||
//------------------------------------------------------------------
|
||||
OCheckBoxModel::OCheckBoxModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OCheckBoxModel::OCheckBoxModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_SUN_CONTROL_CHECKBOX, sal_True )
|
||||
// use the old control name for compytibility reasons
|
||||
{
|
||||
@ -91,7 +92,7 @@ OCheckBoxModel::OCheckBoxModel(const Reference<XMultiServiceFactory>& _rxFactory
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OCheckBoxModel::OCheckBoxModel( const OCheckBoxModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OCheckBoxModel::OCheckBoxModel( const OCheckBoxModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OReferenceValueComponent( _pOriginal, _rxFactory )
|
||||
{
|
||||
DBG_CTOR( OCheckBoxModel, NULL );
|
||||
|
@ -68,7 +68,7 @@ protected:
|
||||
class OCheckBoxControl : public OBoundControl
|
||||
{
|
||||
public:
|
||||
OCheckBoxControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OCheckBoxControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext);
|
||||
|
||||
// XServiceInfo
|
||||
IMPLEMENTATION_NAME(OCheckBoxControl);
|
||||
|
@ -200,11 +200,10 @@ Any SAL_CALL OGridColumn::queryAggregation( const Type& _rType ) throw (RuntimeE
|
||||
|
||||
DBG_NAME(OGridColumn);
|
||||
//------------------------------------------------------------------------------
|
||||
OGridColumn::OGridColumn( const comphelper::ComponentContext& _rContext, const OUString& _sModelName )
|
||||
OGridColumn::OGridColumn( const Reference<XComponentContext>& _rContext, const OUString& _sModelName )
|
||||
:OGridColumn_BASE(m_aMutex)
|
||||
,OPropertySetAggregationHelper(OGridColumn_BASE::rBHelper)
|
||||
,m_aHidden( makeAny( sal_False ) )
|
||||
,m_aContext( _rContext )
|
||||
,m_aModelName(_sModelName)
|
||||
{
|
||||
DBG_CTOR(OGridColumn,NULL);
|
||||
@ -215,7 +214,7 @@ OGridColumn::OGridColumn( const comphelper::ComponentContext& _rContext, const O
|
||||
increment( m_refCount );
|
||||
|
||||
{
|
||||
m_xAggregate.set( m_aContext.createComponent( m_aModelName ), UNO_QUERY );
|
||||
m_xAggregate.set( _rContext->getServiceManager()->createInstanceWithContext( m_aModelName, _rContext ), UNO_QUERY );
|
||||
setAggregation( m_xAggregate );
|
||||
}
|
||||
|
||||
@ -233,7 +232,6 @@ OGridColumn::OGridColumn( const comphelper::ComponentContext& _rContext, const O
|
||||
OGridColumn::OGridColumn( const OGridColumn* _pOriginal )
|
||||
:OGridColumn_BASE( m_aMutex )
|
||||
,OPropertySetAggregationHelper( OGridColumn_BASE::rBHelper )
|
||||
,m_aContext( _pOriginal->m_aContext )
|
||||
{
|
||||
DBG_CTOR(OGridColumn,NULL);
|
||||
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <com/sun/star/util/XCloneable.hpp>
|
||||
|
||||
#include <comphelper/broadcasthelper.hxx>
|
||||
#include <comphelper/componentcontext.hxx>
|
||||
#include <comphelper/propagg.hxx>
|
||||
#include <comphelper/proparrhlp.hxx>
|
||||
#include <comphelper/uno3.hxx>
|
||||
@ -60,7 +59,6 @@ protected:
|
||||
::com::sun::star::uno::Any m_aHidden; // column hidden?
|
||||
// [properties]
|
||||
|
||||
::comphelper::ComponentContext m_aContext;
|
||||
OUString m_aModelName;
|
||||
|
||||
// [properties]
|
||||
@ -68,7 +66,7 @@ protected:
|
||||
// [properties]
|
||||
|
||||
public:
|
||||
OGridColumn(const ::comphelper::ComponentContext& _rContext, const OUString& _sModelName = OUString());
|
||||
OGridColumn(const css::uno::Reference<css::uno::XComponentContext>& _rContext, const OUString& _sModelName = OUString());
|
||||
OGridColumn(const OGridColumn* _pOriginal );
|
||||
virtual ~OGridColumn();
|
||||
|
||||
@ -125,7 +123,7 @@ class ClassName
|
||||
,public OAggregationArrayUsageHelper< ClassName > \
|
||||
{ \
|
||||
public: \
|
||||
ClassName(const ::comphelper::ComponentContext& _rContext ); \
|
||||
ClassName(const css::uno::Reference<css::uno::XComponentContext>& _rContext ); \
|
||||
ClassName(const ClassName* _pCloneFrom); \
|
||||
\
|
||||
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException); \
|
||||
@ -141,7 +139,7 @@ public:
|
||||
|
||||
|
||||
#define IMPL_COLUMN(ClassName, Model, bAllowDropDown) \
|
||||
ClassName::ClassName( const ::comphelper::ComponentContext& _rContext ) \
|
||||
ClassName::ClassName( const css::uno::Reference<css::uno::XComponentContext>& _rContext ) \
|
||||
:OGridColumn(_rContext, Model) \
|
||||
{ \
|
||||
} \
|
||||
|
@ -40,6 +40,7 @@
|
||||
|
||||
#include <comphelper/numbers.hxx>
|
||||
#include <comphelper/basicio.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <connectivity/dbtools.hxx>
|
||||
#include <connectivity/dbconversion.hxx>
|
||||
#include <cppuhelper/queryinterface.hxx>
|
||||
@ -74,7 +75,7 @@ using namespace ::com::sun::star::form::binding;
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OComboBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
|
||||
{
|
||||
return (*new OComboBoxModel(_rxFactory));
|
||||
return (*new OComboBoxModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -125,12 +126,12 @@ Any SAL_CALL OComboBoxModel::queryAggregation(const Type& _rType) throw (Runtime
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( OComboBoxModel )
|
||||
//------------------------------------------------------------------
|
||||
OComboBoxModel::OComboBoxModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OComboBoxModel::OComboBoxModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_COMBOBOX, FRM_SUN_CONTROL_COMBOBOX, sal_True, sal_True, sal_True )
|
||||
// use the old control name for compytibility reasons
|
||||
,OEntryListHelper( (OControlModel&)*this )
|
||||
,OErrorBroadcaster( OComponentHelper::rBHelper )
|
||||
,m_aListRowSet( getContext() )
|
||||
,m_aListRowSet()
|
||||
,m_eListSourceType(ListSourceType_TABLE)
|
||||
,m_bEmptyIsNull(sal_True)
|
||||
{
|
||||
@ -141,11 +142,11 @@ OComboBoxModel::OComboBoxModel(const Reference<XMultiServiceFactory>& _rxFactory
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OComboBoxModel::OComboBoxModel( const OComboBoxModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OComboBoxModel::OComboBoxModel( const OComboBoxModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OBoundControlModel( _pOriginal, _rxFactory )
|
||||
,OEntryListHelper( *_pOriginal, (OControlModel&)*this )
|
||||
,OErrorBroadcaster( OComponentHelper::rBHelper )
|
||||
,m_aListRowSet( getContext() )
|
||||
,m_aListRowSet()
|
||||
,m_aListSource( _pOriginal->m_aListSource )
|
||||
,m_aDefaultText( _pOriginal->m_aDefaultText )
|
||||
,m_eListSourceType( _pOriginal->m_eListSourceType )
|
||||
@ -628,7 +629,7 @@ void OComboBoxModel::loadData( bool _bForce )
|
||||
if ( !xDataField.is() )
|
||||
return;
|
||||
|
||||
::dbtools::FormattedColumnValue aValueFormatter( getContext().getUNOContext(), xForm, xDataField );
|
||||
::dbtools::FormattedColumnValue aValueFormatter( getContext(), xForm, xDataField );
|
||||
|
||||
// Fill Lists
|
||||
sal_Int16 i = 0;
|
||||
@ -684,7 +685,7 @@ void OComboBoxModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm
|
||||
{
|
||||
Reference<XPropertySet> xField = getField();
|
||||
if ( xField.is() )
|
||||
m_pValueFormatter.reset( new ::dbtools::FormattedColumnValue( getContext().getUNOContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
|
||||
m_pValueFormatter.reset( new ::dbtools::FormattedColumnValue( getContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
|
||||
getPropertyValue( PROPERTY_STRINGITEMLIST ) >>= m_aDesignModeStringItems;
|
||||
|
||||
// Only load data if a ListSource was supplied
|
||||
@ -875,12 +876,12 @@ void SAL_CALL OComboBoxModel::disposing( const EventObject& _rSource ) throw ( R
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OComboBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
|
||||
{
|
||||
return *(new OComboBoxControl(_rxFactory));
|
||||
return *(new OComboBoxControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
OComboBoxControl::OComboBoxControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
:OBoundControl(_rxFactory, VCL_CONTROL_COMBOBOX)
|
||||
OComboBoxControl::OComboBoxControl(const Reference<XComponentContext>& _rxContext)
|
||||
:OBoundControl(_rxContext, VCL_CONTROL_COMBOBOX)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ protected:
|
||||
class OComboBoxControl : public OBoundControl
|
||||
{
|
||||
public:
|
||||
OComboBoxControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OComboBoxControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext);
|
||||
|
||||
// XServiceInfo
|
||||
IMPLEMENTATION_NAME(OComboBoxControl);
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <unotools/localedatawrapper.hxx>
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <unotools/syslocale.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
//.........................................................................
|
||||
namespace frm
|
||||
@ -43,7 +44,7 @@ using namespace ::com::sun::star::util;
|
||||
// OCurrencyControl
|
||||
//==================================================================
|
||||
//------------------------------------------------------------------
|
||||
OCurrencyControl::OCurrencyControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OCurrencyControl::OCurrencyControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControl(_rxFactory, VCL_CONTROL_CURRENCYFIELD)
|
||||
{
|
||||
}
|
||||
@ -51,7 +52,7 @@ OCurrencyControl::OCurrencyControl(const Reference<XMultiServiceFactory>& _rxFac
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OCurrencyControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OCurrencyControl(_rxFactory));
|
||||
return *(new OCurrencyControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -77,7 +78,7 @@ StringSequence SAL_CALL OCurrencyControl::getSupportedServiceNames() throw()
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OCurrencyModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OCurrencyModel(_rxFactory));
|
||||
return *(new OCurrencyModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -134,7 +135,7 @@ void OCurrencyModel::implConstruct()
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( OCurrencyModel )
|
||||
//------------------------------------------------------------------
|
||||
OCurrencyModel::OCurrencyModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OCurrencyModel::OCurrencyModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_CURRENCYFIELD, FRM_SUN_CONTROL_CURRENCYFIELD, sal_False, sal_True )
|
||||
// use the old control name for compytibility reasons
|
||||
{
|
||||
@ -147,7 +148,7 @@ OCurrencyModel::OCurrencyModel(const Reference<XMultiServiceFactory>& _rxFactory
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OCurrencyModel::OCurrencyModel( const OCurrencyModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OCurrencyModel::OCurrencyModel( const OCurrencyModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OEditBaseModel( _pOriginal, _rxFactory )
|
||||
{
|
||||
DBG_CTOR( OCurrencyModel, NULL );
|
||||
|
@ -79,7 +79,7 @@ protected:
|
||||
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
||||
|
||||
public:
|
||||
OCurrencyControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OCurrencyControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext);
|
||||
// ::com::sun::star::lang::XServiceInfo
|
||||
IMPLEMENTATION_NAME(OCurrencyControl);
|
||||
virtual StringSequence SAL_CALL getSupportedServiceNames() throw();
|
||||
|
@ -216,7 +216,7 @@ void OFormSubmitResetThread::processEvent(
|
||||
//------------------------------------------------------------------
|
||||
Reference< XInterface > SAL_CALL ODatabaseForm::Create( const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
{
|
||||
return *( new ODatabaseForm( _rxFactory ) );
|
||||
return *( new ODatabaseForm( comphelper::getComponentContext(_rxFactory) ) );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -278,8 +278,8 @@ Any SAL_CALL ODatabaseForm::queryAggregation(const Type& _rType) throw(RuntimeEx
|
||||
|
||||
DBG_NAME(ODatabaseForm);
|
||||
//------------------------------------------------------------------
|
||||
ODatabaseForm::ODatabaseForm(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
:OFormComponents(_rxFactory)
|
||||
ODatabaseForm::ODatabaseForm(const Reference<XComponentContext>& _rxContext)
|
||||
:OFormComponents(_rxContext)
|
||||
,OPropertySetAggregationHelper(OComponentHelper::rBHelper)
|
||||
,OPropertyChangeListener(m_aMutex)
|
||||
,m_aLoadListeners(m_aMutex)
|
||||
@ -291,8 +291,8 @@ ODatabaseForm::ODatabaseForm(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
,m_aPropertyBagHelper( *this )
|
||||
,m_pAggregatePropertyMultiplexer(NULL)
|
||||
,m_pGroupManager( NULL )
|
||||
,m_aParameterManager( m_aMutex, comphelper::getComponentContext(_rxFactory) )
|
||||
,m_aFilterManager( _rxFactory )
|
||||
,m_aParameterManager( m_aMutex, _rxContext )
|
||||
,m_aFilterManager()
|
||||
,m_pLoadTimer(NULL)
|
||||
,m_pThread(NULL)
|
||||
,m_nResetsPending(0)
|
||||
@ -331,8 +331,8 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource )
|
||||
,m_aPropertyBagHelper( *this )
|
||||
,m_pAggregatePropertyMultiplexer( NULL )
|
||||
,m_pGroupManager( NULL )
|
||||
,m_aParameterManager( m_aMutex, comphelper::getComponentContext(_cloneSource.m_xServiceFactory) )
|
||||
,m_aFilterManager( _cloneSource.m_xServiceFactory )
|
||||
,m_aParameterManager( m_aMutex, _cloneSource.m_xContext )
|
||||
,m_aFilterManager()
|
||||
,m_pLoadTimer( NULL )
|
||||
,m_pThread( NULL )
|
||||
,m_nResetsPending( 0 )
|
||||
@ -418,7 +418,7 @@ void ODatabaseForm::impl_construct()
|
||||
// aggregate a row set
|
||||
increment(m_refCount);
|
||||
{
|
||||
m_xAggregate = Reference< XAggregation >( m_xServiceFactory->createInstance( SRV_SDB_ROWSET ), UNO_QUERY_THROW );
|
||||
m_xAggregate = Reference< XAggregation >( m_xContext->getServiceManager()->createInstanceWithContext(SRV_SDB_ROWSET, m_xContext), UNO_QUERY_THROW );
|
||||
m_xAggregateAsRowSet.set( m_xAggregate, UNO_QUERY_THROW );
|
||||
setAggregation( m_xAggregate );
|
||||
}
|
||||
@ -2227,7 +2227,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com:
|
||||
if (!xFrame.is())
|
||||
return;
|
||||
|
||||
Reference<XURLTransformer> xTransformer(URLTransformer::create(comphelper::getComponentContext(m_xServiceFactory)));
|
||||
Reference<XURLTransformer> xTransformer(URLTransformer::create(m_xContext));
|
||||
|
||||
// URL encoding
|
||||
if( eSubmitEncoding == FormSubmitEncoding_URL )
|
||||
@ -2839,7 +2839,7 @@ sal_Bool ODatabaseForm::implEnsureConnection()
|
||||
{
|
||||
Reference< XConnection > xConnection = connectRowset(
|
||||
Reference<XRowSet> (m_xAggregate, UNO_QUERY),
|
||||
comphelper::getComponentContext(m_xServiceFactory),
|
||||
m_xContext,
|
||||
sal_True // set a calculated connection as ActiveConnection
|
||||
);
|
||||
return xConnection.is();
|
||||
|
@ -218,7 +218,7 @@ class ODatabaseForm :public OFormComponents
|
||||
sal_Bool m_bSharingConnection : 1; // sal_True if the connection we're using is shared with out parent
|
||||
|
||||
public:
|
||||
ODatabaseForm(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
ODatabaseForm(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
ODatabaseForm( const ODatabaseForm& _cloneSource );
|
||||
~ODatabaseForm();
|
||||
|
||||
|
@ -45,7 +45,7 @@ using namespace ::com::sun::star::io;
|
||||
using namespace ::com::sun::star::lang;
|
||||
|
||||
//------------------------------------------------------------------
|
||||
ODateControl::ODateControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
ODateControl::ODateControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControl(_rxFactory, VCL_CONTROL_DATEFIELD)
|
||||
{
|
||||
}
|
||||
@ -53,7 +53,7 @@ ODateControl::ODateControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL ODateControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new ODateControl(_rxFactory));
|
||||
return *(new ODateControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -77,7 +77,7 @@ StringSequence SAL_CALL ODateControl::getSupportedServiceNames() throw()
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL ODateModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new ODateModel(_rxFactory));
|
||||
return *(new ODateModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -89,10 +89,10 @@ Sequence<Type> ODateModel::_getTypes()
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( ODateModel )
|
||||
//------------------------------------------------------------------
|
||||
ODateModel::ODateModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
ODateModel::ODateModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_DATEFIELD, FRM_SUN_CONTROL_DATEFIELD, sal_True, sal_True )
|
||||
// use the old control name for compytibility reasons
|
||||
,OLimitedFormats( comphelper::getComponentContext(_rxFactory), FormComponentType::DATEFIELD )
|
||||
,OLimitedFormats( _rxFactory, FormComponentType::DATEFIELD )
|
||||
{
|
||||
DBG_CTOR( ODateModel, NULL );
|
||||
|
||||
@ -115,9 +115,9 @@ ODateModel::ODateModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
ODateModel::ODateModel( const ODateModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
ODateModel::ODateModel( const ODateModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OEditBaseModel( _pOriginal, _rxFactory )
|
||||
,OLimitedFormats( comphelper::getComponentContext(_rxFactory), FormComponentType::DATEFIELD )
|
||||
,OLimitedFormats( _rxFactory, FormComponentType::DATEFIELD )
|
||||
{
|
||||
DBG_CTOR( ODateModel, NULL );
|
||||
|
||||
|
@ -109,7 +109,7 @@ protected:
|
||||
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
||||
|
||||
public:
|
||||
ODateControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
ODateControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
DECLARE_UNO3_AGG_DEFAULTS(ODateControl, OBoundControl);
|
||||
|
||||
// ::com::sun::star::lang::XServiceInfo
|
||||
|
@ -40,6 +40,7 @@
|
||||
|
||||
#include <comphelper/container.hxx>
|
||||
#include <comphelper/numbers.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
using namespace dbtools;
|
||||
|
||||
@ -62,7 +63,7 @@ using namespace ::com::sun::star::form::binding;
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OEditControl_CreateInstance(const Reference< XMultiServiceFactory > & _rxFactory)
|
||||
{
|
||||
return *(new OEditControl(_rxFactory));
|
||||
return *(new OEditControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -89,7 +90,7 @@ Any SAL_CALL OEditControl::queryAggregation(const Type& _rType) throw (RuntimeEx
|
||||
|
||||
DBG_NAME(OEditControl);
|
||||
//------------------------------------------------------------------------------
|
||||
OEditControl::OEditControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OEditControl::OEditControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControl( _rxFactory, FRM_SUN_CONTROL_RICHTEXTCONTROL )
|
||||
,m_aChangeListeners(m_aMutex)
|
||||
,m_nKeyEvent( 0 )
|
||||
@ -276,7 +277,7 @@ void SAL_CALL OEditControl::createPeer( const Reference< XToolkit>& _rxToolkit,
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OEditModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OEditModel(_rxFactory));
|
||||
return *(new OEditModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -288,7 +289,7 @@ Sequence<Type> OEditModel::_getTypes()
|
||||
|
||||
DBG_NAME(OEditModel);
|
||||
//------------------------------------------------------------------
|
||||
OEditModel::OEditModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OEditModel::OEditModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OEditBaseModel( _rxFactory, FRM_SUN_COMPONENT_RICHTEXTCONTROL, FRM_SUN_CONTROL_TEXTFIELD, sal_True, sal_True )
|
||||
,m_bMaxTextLenModified(sal_False)
|
||||
,m_bWritingFormattedFake(sal_False)
|
||||
@ -300,7 +301,7 @@ OEditModel::OEditModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OEditModel::OEditModel( const OEditModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OEditModel::OEditModel( const OEditModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OEditBaseModel( _pOriginal, _rxFactory )
|
||||
,m_bMaxTextLenModified(sal_False)
|
||||
,m_bWritingFormattedFake(sal_False)
|
||||
@ -508,7 +509,7 @@ void OEditModel::writeAggregate( const Reference< XObjectOutputStream >& _rxOutS
|
||||
// but for compatibility, we need to use an "old" aggregate for writing and reading
|
||||
|
||||
Reference< XPropertySet > xFakedAggregate(
|
||||
getContext().createComponent( (OUString)VCL_CONTROLMODEL_EDIT ),
|
||||
getContext()->getServiceManager()->createInstanceWithContext( (OUString)VCL_CONTROLMODEL_EDIT, getContext() ),
|
||||
UNO_QUERY
|
||||
);
|
||||
OSL_ENSURE( xFakedAggregate.is(), "OEditModel::writeAggregate: could not create an old EditControlModel!" );
|
||||
@ -530,7 +531,7 @@ void OEditModel::readAggregate( const Reference< XObjectInputStream >& _rxInStre
|
||||
// but for compatibility, we need to use an "old" aggregate for writing and reading
|
||||
|
||||
Reference< XPropertySet > xFakedAggregate(
|
||||
getContext().createComponent( (OUString)VCL_CONTROLMODEL_EDIT ),
|
||||
getContext()->getServiceManager()->createInstanceWithContext( (OUString)VCL_CONTROLMODEL_EDIT, getContext() ),
|
||||
UNO_QUERY
|
||||
);
|
||||
Reference< XPersistObject > xFakedPersist( xFakedAggregate, UNO_QUERY );
|
||||
@ -611,7 +612,7 @@ void OEditModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
|
||||
Reference< XPropertySet > xField = getField();
|
||||
if ( xField.is() )
|
||||
{
|
||||
m_pValueFormatter.reset( new ::dbtools::FormattedColumnValue( getContext().getUNOContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
|
||||
m_pValueFormatter.reset( new ::dbtools::FormattedColumnValue( getContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
|
||||
|
||||
if ( m_pValueFormatter->getKeyType() != NumberFormat::SCIENTIFIC )
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ class OEditControl : public OBoundControl
|
||||
sal_uInt32 m_nKeyEvent;
|
||||
|
||||
public:
|
||||
OEditControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OEditControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext);
|
||||
virtual ~OEditControl();
|
||||
|
||||
DECLARE_UNO3_AGG_DEFAULTS(OEditControl, OBoundControl);
|
||||
|
@ -48,7 +48,7 @@ const sal_uInt16 FILTERPROPOSAL = 0x0004;
|
||||
|
||||
DBG_NAME( OEditBaseModel )
|
||||
//------------------------------------------------------------------
|
||||
OEditBaseModel::OEditBaseModel( const Reference< XMultiServiceFactory >& _rxFactory, const OUString& rUnoControlModelName,
|
||||
OEditBaseModel::OEditBaseModel( const Reference< XComponentContext >& _rxFactory, const OUString& rUnoControlModelName,
|
||||
const OUString& rDefault, const sal_Bool _bSupportExternalBinding, const sal_Bool _bSupportsValidation )
|
||||
:OBoundControlModel( _rxFactory, rUnoControlModelName, rDefault, sal_True, _bSupportExternalBinding, _bSupportsValidation )
|
||||
,m_nLastReadVersion(0)
|
||||
@ -59,7 +59,7 @@ OEditBaseModel::OEditBaseModel( const Reference< XMultiServiceFactory >& _rxFact
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OEditBaseModel::OEditBaseModel( const OEditBaseModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
OEditBaseModel::OEditBaseModel( const OEditBaseModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
|
||||
:OBoundControlModel( _pOriginal, _rxFactory )
|
||||
,m_nLastReadVersion(0)
|
||||
{
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <comphelper/container.hxx>
|
||||
#include <comphelper/basicio.hxx>
|
||||
#include <comphelper/guarding.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
//.........................................................................
|
||||
namespace frm
|
||||
@ -47,7 +48,7 @@ using namespace ::com::sun::star::util;
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OFileControlModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OFileControlModel(_rxFactory));
|
||||
return *(new OFileControlModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -84,7 +85,7 @@ StringSequence OFileControlModel::getSupportedServiceNames() throw(RuntimeExcep
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( OFileControlModel )
|
||||
//------------------------------------------------------------------
|
||||
OFileControlModel::OFileControlModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OFileControlModel::OFileControlModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OControlModel(_rxFactory, VCL_CONTROLMODEL_FILECONTROL)
|
||||
,m_aResetListeners(m_aMutex)
|
||||
{
|
||||
@ -93,7 +94,7 @@ OFileControlModel::OFileControlModel(const Reference<XMultiServiceFactory>& _rxF
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OFileControlModel::OFileControlModel( const OFileControlModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OFileControlModel::OFileControlModel( const OFileControlModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OControlModel( _pOriginal, _rxFactory )
|
||||
,m_aResetListeners( m_aMutex )
|
||||
{
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "property.hrc"
|
||||
#include "property.hxx"
|
||||
#include <tools/debug.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
//.........................................................................
|
||||
namespace frm
|
||||
@ -41,13 +42,13 @@ using namespace ::com::sun::star::util;
|
||||
//------------------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OFixedTextModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
|
||||
{
|
||||
return *(new OFixedTextModel(_rxFactory));
|
||||
return *(new OFixedTextModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( OFixedTextModel )
|
||||
//------------------------------------------------------------------
|
||||
OFixedTextModel::OFixedTextModel( const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OFixedTextModel::OFixedTextModel( const Reference<XComponentContext>& _rxFactory )
|
||||
:OControlModel(_rxFactory, VCL_CONTROLMODEL_FIXEDTEXT)
|
||||
|
||||
{
|
||||
@ -56,7 +57,7 @@ OFixedTextModel::OFixedTextModel( const Reference<XMultiServiceFactory>& _rxFact
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OFixedTextModel::OFixedTextModel( const OFixedTextModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OFixedTextModel::OFixedTextModel( const OFixedTextModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OControlModel( _pOriginal, _rxFactory )
|
||||
|
||||
{
|
||||
|
@ -132,9 +132,9 @@ namespace frm
|
||||
//=============================================================================
|
||||
DBG_NAME(frm_OControl)
|
||||
//------------------------------------------------------------------------------
|
||||
OControl::OControl( const Reference< XMultiServiceFactory >& _rxFactory, const OUString& _rAggregateService, const sal_Bool _bSetDelegator )
|
||||
OControl::OControl( const Reference< XComponentContext >& _rxContext, const OUString& _rAggregateService, const sal_Bool _bSetDelegator )
|
||||
:OComponentHelper(m_aMutex)
|
||||
,m_aContext( _rxFactory )
|
||||
,m_xContext( _rxContext )
|
||||
{
|
||||
DBG_CTOR(frm_OControl, NULL);
|
||||
// VCL-Control aggregieren
|
||||
@ -142,7 +142,7 @@ OControl::OControl( const Reference< XMultiServiceFactory >& _rxFactory, const O
|
||||
// das Aggregat selbst den Refcount erhoeht
|
||||
increment( m_refCount );
|
||||
{
|
||||
m_xAggregate = m_xAggregate.query( _rxFactory->createInstance( _rAggregateService ) );
|
||||
m_xAggregate = m_xAggregate.query( _rxContext->getServiceManager()->createInstanceWithContext(_rAggregateService, _rxContext) );
|
||||
m_xControl = m_xControl.query( m_xAggregate );
|
||||
}
|
||||
decrement( m_refCount );
|
||||
@ -390,9 +390,9 @@ sal_Bool SAL_CALL OControl::isTransparent() throw ( RuntimeException)
|
||||
//==================================================================
|
||||
DBG_NAME(frm_OBoundControl);
|
||||
//------------------------------------------------------------------
|
||||
OBoundControl::OBoundControl( const Reference< XMultiServiceFactory >& _rxFactory,
|
||||
OBoundControl::OBoundControl( const Reference< XComponentContext >& _rxContext,
|
||||
const OUString& _rAggregateService, const sal_Bool _bSetDelegator )
|
||||
:OControl( _rxFactory, _rAggregateService, _bSetDelegator )
|
||||
:OControl( _rxContext, _rAggregateService, _bSetDelegator )
|
||||
,m_bLocked(sal_False)
|
||||
,m_aOriginalFont( EmptyFontDescriptor() )
|
||||
,m_nOriginalTextLineColor( 0 )
|
||||
@ -573,12 +573,12 @@ void OControlModel::writeHelpTextCompatibly(const staruno::Reference< stario::XO
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OControlModel::OControlModel(
|
||||
const Reference<com::sun::star::lang::XMultiServiceFactory>& _rxFactory,
|
||||
const Reference<XComponentContext>& _rxContext,
|
||||
const OUString& _rUnoControlModelTypeName,
|
||||
const OUString& rDefault, const sal_Bool _bSetDelegator)
|
||||
:OComponentHelper(m_aMutex)
|
||||
,OPropertySetAggregationHelper(OComponentHelper::rBHelper)
|
||||
,m_aContext( _rxFactory )
|
||||
,m_xContext( _rxContext )
|
||||
,m_lockCount( 0 )
|
||||
,m_aPropertyBagHelper( *this )
|
||||
,m_nTabIndex(FRM_DEFAULT_TABINDEX)
|
||||
@ -595,7 +595,7 @@ OControlModel::OControlModel(
|
||||
increment(m_refCount);
|
||||
|
||||
{
|
||||
m_xAggregate = Reference<XAggregation>(_rxFactory->createInstance(_rUnoControlModelTypeName), UNO_QUERY);
|
||||
m_xAggregate = Reference<XAggregation>(m_xContext->getServiceManager()->createInstanceWithContext(_rUnoControlModelTypeName, m_xContext), UNO_QUERY);
|
||||
setAggregation(m_xAggregate);
|
||||
|
||||
if ( m_xAggregateSet.is() )
|
||||
@ -622,10 +622,10 @@ OControlModel::OControlModel(
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference< XMultiServiceFactory>& _rxFactory, const sal_Bool _bCloneAggregate, const sal_Bool _bSetDelegator )
|
||||
OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference< XComponentContext>& _rxFactory, const sal_Bool _bCloneAggregate, const sal_Bool _bSetDelegator )
|
||||
:OComponentHelper( m_aMutex )
|
||||
,OPropertySetAggregationHelper( OComponentHelper::rBHelper )
|
||||
,m_aContext( _rxFactory )
|
||||
,m_xContext( _rxFactory )
|
||||
,m_lockCount( 0 )
|
||||
,m_aPropertyBagHelper( *this )
|
||||
,m_nTabIndex( FRM_DEFAULT_TABINDEX )
|
||||
@ -1227,7 +1227,7 @@ Any SAL_CALL OBoundControlModel::queryAggregation( const Type& _rType ) throw (R
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OBoundControlModel::OBoundControlModel(
|
||||
const Reference< XMultiServiceFactory>& _rxFactory,
|
||||
const Reference< XComponentContext>& _rxFactory,
|
||||
const OUString& _rUnoControlModelTypeName, const OUString& _rDefault,
|
||||
const sal_Bool _bCommitable, const sal_Bool _bSupportExternalBinding, const sal_Bool _bSupportsValidation )
|
||||
:OControlModel( _rxFactory, _rUnoControlModelTypeName, _rDefault, sal_False )
|
||||
@ -1264,7 +1264,7 @@ OBoundControlModel::OBoundControlModel(
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OBoundControlModel::OBoundControlModel(
|
||||
const OBoundControlModel* _pOriginal, const Reference< XMultiServiceFactory>& _rxFactory )
|
||||
const OBoundControlModel* _pOriginal, const Reference< XComponentContext>& _rxFactory )
|
||||
:OControlModel( _pOriginal, _rxFactory, sal_True, sal_False )
|
||||
,OPropertyChangeListener( m_aMutex )
|
||||
,m_xField()
|
||||
|
@ -182,7 +182,7 @@ void StandardFormatsSupplier::notifyTermination()
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OFormattedControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OFormattedControl(_rxFactory));
|
||||
return *(new OFormattedControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
@ -206,7 +206,7 @@ Any SAL_CALL OFormattedControl::queryAggregation(const Type& _rType) throw (Runt
|
||||
|
||||
DBG_NAME(OFormattedControl);
|
||||
//------------------------------------------------------------------------------
|
||||
OFormattedControl::OFormattedControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OFormattedControl::OFormattedControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControl(_rxFactory, VCL_CONTROL_FORMATTEDFIELD)
|
||||
,m_nKeyEvent(0)
|
||||
{
|
||||
@ -356,7 +356,7 @@ void OFormattedModel::implConstruct()
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OFormattedModel::OFormattedModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OFormattedModel::OFormattedModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_FORMATTEDFIELD, FRM_SUN_CONTROL_FORMATTEDFIELD, sal_True, sal_True )
|
||||
// use the old control name for compytibility reasons
|
||||
,OErrorBroadcaster( OComponentHelper::rBHelper )
|
||||
@ -370,7 +370,7 @@ OFormattedModel::OFormattedModel(const Reference<XMultiServiceFactory>& _rxFacto
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OFormattedModel::OFormattedModel( const OFormattedModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
OFormattedModel::OFormattedModel( const OFormattedModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
|
||||
:OEditBaseModel( _pOriginal, _rxFactory )
|
||||
,OErrorBroadcaster( OComponentHelper::rBHelper )
|
||||
{
|
||||
@ -654,14 +654,14 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co
|
||||
Reference< XRowSet > xRowSet( xNextParentForm, UNO_QUERY );
|
||||
Reference< XNumberFormatsSupplier > xSupplier;
|
||||
if (xRowSet.is())
|
||||
xSupplier = getNumberFormats( getConnection(xRowSet), sal_True, getContext().getUNOContext() );
|
||||
xSupplier = getNumberFormats( getConnection(xRowSet), sal_True, getContext() );
|
||||
return xSupplier;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
Reference< XNumberFormatsSupplier > OFormattedModel::calcDefaultFormatsSupplier() const
|
||||
{
|
||||
return StandardFormatsSupplier::get( getContext().getUNOContext() );
|
||||
return StandardFormatsSupplier::get( getContext() );
|
||||
}
|
||||
|
||||
// XBoundComponent
|
||||
|
@ -154,7 +154,7 @@ namespace frm
|
||||
sal_uInt32 m_nKeyEvent;
|
||||
|
||||
public:
|
||||
OFormattedControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OFormattedControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext);
|
||||
virtual ~OFormattedControl();
|
||||
|
||||
DECLARE_UNO3_AGG_DEFAULTS(OFormattedControl, OBoundControl);
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "services.hxx"
|
||||
#include <connectivity/dbtools.hxx>
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
//.........................................................................
|
||||
namespace frm
|
||||
@ -46,23 +47,23 @@ using namespace ::com::sun::star::util;
|
||||
//==================================================================
|
||||
DBG_NAME(OFormattedFieldWrapper)
|
||||
|
||||
InterfaceRef SAL_CALL OFormattedFieldWrapper_CreateInstance_ForceFormatted(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
Reference<XInterface> SAL_CALL OFormattedFieldWrapper_CreateInstance_ForceFormatted(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return OFormattedFieldWrapper::createFormattedFieldWrapper(_rxFactory, true);
|
||||
return OFormattedFieldWrapper::createFormattedFieldWrapper( comphelper::getComponentContext(_rxFactory), true);
|
||||
}
|
||||
|
||||
InterfaceRef SAL_CALL OFormattedFieldWrapper_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return OFormattedFieldWrapper::createFormattedFieldWrapper(_rxFactory, false);
|
||||
return OFormattedFieldWrapper::createFormattedFieldWrapper( comphelper::getComponentContext(_rxFactory), false);
|
||||
}
|
||||
|
||||
OFormattedFieldWrapper::OFormattedFieldWrapper(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
:m_xServiceFactory(_rxFactory)
|
||||
OFormattedFieldWrapper::OFormattedFieldWrapper(const Reference<XComponentContext>& _rxFactory)
|
||||
:m_xContext(_rxFactory)
|
||||
{
|
||||
DBG_CTOR(OFormattedFieldWrapper, NULL);
|
||||
}
|
||||
|
||||
InterfaceRef OFormattedFieldWrapper::createFormattedFieldWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory, bool bActAsFormatted)
|
||||
InterfaceRef OFormattedFieldWrapper::createFormattedFieldWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory, bool bActAsFormatted)
|
||||
{
|
||||
OFormattedFieldWrapper *pRef = new OFormattedFieldWrapper(_rxFactory);
|
||||
|
||||
@ -72,7 +73,7 @@ InterfaceRef OFormattedFieldWrapper::createFormattedFieldWrapper(const ::com::su
|
||||
InterfaceRef xFormattedModel;
|
||||
// (instantiate it directly ..., as the OFormattedModel isn't
|
||||
// registered for any service names anymore)
|
||||
OFormattedModel* pModel = new OFormattedModel(pRef->m_xServiceFactory);
|
||||
OFormattedModel* pModel = new OFormattedModel(pRef->m_xContext);
|
||||
query_interface(static_cast<XWeak*>(pModel), xFormattedModel);
|
||||
|
||||
pRef->m_xAggregate = Reference<XAggregation> (xFormattedModel, UNO_QUERY);
|
||||
@ -80,7 +81,7 @@ InterfaceRef OFormattedFieldWrapper::createFormattedFieldWrapper(const ::com::su
|
||||
|
||||
// _before_ setting the delegator, give it to the member references
|
||||
query_interface(xFormattedModel, pRef->m_xFormattedPart);
|
||||
pRef->m_pEditPart = rtl::Reference< OEditModel >(new OEditModel(pRef->m_xServiceFactory));
|
||||
pRef->m_pEditPart = rtl::Reference< OEditModel >(new OEditModel(pRef->m_xContext));
|
||||
}
|
||||
|
||||
increment(pRef->m_refCount);
|
||||
@ -100,7 +101,7 @@ Reference< XCloneable > SAL_CALL OFormattedFieldWrapper::createClone() throw (Ru
|
||||
{
|
||||
ensureAggregate();
|
||||
|
||||
rtl::Reference< OFormattedFieldWrapper > xRef(new OFormattedFieldWrapper(m_xServiceFactory));
|
||||
rtl::Reference< OFormattedFieldWrapper > xRef(new OFormattedFieldWrapper(m_xContext));
|
||||
|
||||
Reference< XCloneable > xCloneAccess;
|
||||
query_aggregation( m_xAggregate, xCloneAccess );
|
||||
@ -116,7 +117,7 @@ Reference< XCloneable > SAL_CALL OFormattedFieldWrapper::createClone() throw (Ru
|
||||
|
||||
if ( m_pEditPart.is() )
|
||||
{
|
||||
xRef->m_pEditPart = rtl::Reference< OEditModel >( new OEditModel(m_pEditPart.get(), m_xServiceFactory));
|
||||
xRef->m_pEditPart = rtl::Reference< OEditModel >( new OEditModel(m_pEditPart.get(), m_xContext));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -301,7 +302,7 @@ void SAL_CALL OFormattedFieldWrapper::read(const Reference<XObjectInputStream>&
|
||||
|
||||
{
|
||||
// let an OEditModel do the reading
|
||||
rtl::Reference< OEditModel > pBasicReader(new OEditModel(m_xServiceFactory));
|
||||
rtl::Reference< OEditModel > pBasicReader(new OEditModel(m_xContext));
|
||||
pBasicReader->read(_rxInStream);
|
||||
|
||||
// was it really an edit model ?
|
||||
@ -313,7 +314,7 @@ void SAL_CALL OFormattedFieldWrapper::read(const Reference<XObjectInputStream>&
|
||||
else
|
||||
{ // no -> substitute it with a formatted model
|
||||
// let the formmatted model do the reading
|
||||
m_xFormattedPart = Reference< XPersistObject >(new OFormattedModel(m_xServiceFactory));
|
||||
m_xFormattedPart = Reference< XPersistObject >(new OFormattedModel(m_xContext));
|
||||
m_xFormattedPart->read(_rxInStream);
|
||||
m_pEditPart = pBasicReader;
|
||||
m_xAggregate = Reference< XAggregation >( m_xFormattedPart, UNO_QUERY );
|
||||
@ -338,11 +339,11 @@ void OFormattedFieldWrapper::ensureAggregate()
|
||||
{
|
||||
// instantiate an EditModel (the only place where we are allowed to decide that we're an FormattedModel
|
||||
// is in ::read)
|
||||
InterfaceRef xEditModel = m_xServiceFactory->createInstance(FRM_SUN_COMPONENT_TEXTFIELD);
|
||||
InterfaceRef xEditModel = m_xContext->getServiceManager()->createInstanceWithContext(FRM_SUN_COMPONENT_TEXTFIELD, m_xContext);
|
||||
if (!xEditModel.is())
|
||||
{
|
||||
// arghhh ... instantiate it directly ... it's dirty, but we really need this aggregate
|
||||
OEditModel* pModel = new OEditModel(m_xServiceFactory);
|
||||
OEditModel* pModel = new OEditModel(m_xContext);
|
||||
query_interface(static_cast<XWeak*>(pModel), xEditModel);
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ typedef ::cppu::WeakAggImplHelper3 < ::com::sun::star::io::XPersistObject
|
||||
|
||||
class OFormattedFieldWrapper : public OFormattedFieldWrapper_Base
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xServiceFactory;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xContext;
|
||||
|
||||
protected:
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation> m_xAggregate;
|
||||
@ -52,10 +52,10 @@ protected:
|
||||
// to read and write the FormattedModel part
|
||||
// if bActAsFormatted is false, the state is undetermined until somebody calls
|
||||
// ::read or does anything which requires a living aggregate
|
||||
static InterfaceRef createFormattedFieldWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory, bool bActAsFormatted);
|
||||
static InterfaceRef createFormattedFieldWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory, bool bActAsFormatted);
|
||||
|
||||
private:
|
||||
OFormattedFieldWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OFormattedFieldWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
|
||||
protected:
|
||||
virtual ~OFormattedFieldWrapper();
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "FormsCollection.hxx"
|
||||
#include "services.hxx"
|
||||
#include <comphelper/sequence.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <tools/debug.hxx>
|
||||
#include <com/sun/star/form/XForm.hpp>
|
||||
|
||||
@ -39,7 +40,7 @@ DBG_NAME(OFormsCollection)
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OFormsCollection_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OFormsCollection(_rxFactory));
|
||||
return *(new OFormsCollection( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -61,7 +62,7 @@ Sequence<Type> SAL_CALL OFormsCollection::getTypes() throw(RuntimeException)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OFormsCollection::OFormsCollection(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OFormsCollection::OFormsCollection(const Reference<XComponentContext>& _rxFactory)
|
||||
:FormsCollectionComponentBase( m_aMutex )
|
||||
,OInterfaceContainer( _rxFactory, m_aMutex, XForm::static_type() )
|
||||
,OFormsCollection_BASE()
|
||||
|
@ -52,7 +52,7 @@ class OFormsCollection
|
||||
::comphelper::InterfaceRef m_xParent; // Parent
|
||||
|
||||
public:
|
||||
OFormsCollection(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OFormsCollection(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
OFormsCollection( const OFormsCollection& _cloneSource );
|
||||
virtual ~OFormsCollection();
|
||||
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <comphelper/basicio.hxx>
|
||||
#include <comphelper/container.hxx>
|
||||
#include <comphelper/extract.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <cppuhelper/queryinterface.hxx>
|
||||
#include <toolkit/helper/vclunohelper.hxx>
|
||||
#include <vcl/svapp.hxx>
|
||||
@ -72,12 +73,12 @@ const sal_uInt16 BACKGROUNDCOLOR = 0x0100;
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OGridControlModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OGridControlModel(_rxFactory));
|
||||
return *(new OGridControlModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
DBG_NAME(OGridControlModel);
|
||||
//------------------------------------------------------------------
|
||||
OGridControlModel::OGridControlModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OGridControlModel::OGridControlModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OControlModel(_rxFactory, OUString())
|
||||
,OInterfaceContainer(_rxFactory, m_aMutex, ::getCppuType(static_cast<Reference<XPropertySet>*>(NULL)))
|
||||
,OErrorBroadcaster( OComponentHelper::rBHelper )
|
||||
@ -103,7 +104,7 @@ OGridControlModel::OGridControlModel(const Reference<XMultiServiceFactory>& _rxF
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OGridControlModel::OGridControlModel( const OGridControlModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
OGridControlModel::OGridControlModel( const OGridControlModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
|
||||
:OControlModel( _pOriginal, _rxFactory )
|
||||
,OInterfaceContainer( _rxFactory, m_aMutex, ::getCppuType( static_cast<Reference<XPropertySet>*>( NULL ) ) )
|
||||
,OErrorBroadcaster( OComponentHelper::rBHelper )
|
||||
@ -148,7 +149,7 @@ OGridControlModel::~OGridControlModel()
|
||||
//------------------------------------------------------------------------------
|
||||
Reference< XCloneable > SAL_CALL OGridControlModel::createClone( ) throw (RuntimeException)
|
||||
{
|
||||
OGridControlModel* pClone = new OGridControlModel( this, getContext().getLegacyServiceFactory() );
|
||||
OGridControlModel* pClone = new OGridControlModel( this, getContext() );
|
||||
osl_atomic_increment( &pClone->m_refCount );
|
||||
pClone->OControlModel::clonedFrom( this );
|
||||
// do not call OInterfaceContainer::clonedFrom, it would clone the elements aka columns, which is
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "property.hrc"
|
||||
#include "services.hxx"
|
||||
#include <tools/debug.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
//.........................................................................
|
||||
namespace frm
|
||||
@ -45,13 +46,13 @@ using namespace ::com::sun::star::util;
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OGroupBoxModel_CreateInstance(const Reference<starlang::XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
|
||||
{
|
||||
return *(new OGroupBoxModel(_rxFactory));
|
||||
return *(new OGroupBoxModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( OGroupBoxModel )
|
||||
//------------------------------------------------------------------
|
||||
OGroupBoxModel::OGroupBoxModel(const Reference<starlang::XMultiServiceFactory>& _rxFactory)
|
||||
OGroupBoxModel::OGroupBoxModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OControlModel(_rxFactory, VCL_CONTROLMODEL_GROUPBOX, VCL_CONTROL_GROUPBOX)
|
||||
{
|
||||
DBG_CTOR( OGroupBoxModel, NULL );
|
||||
@ -59,7 +60,7 @@ OGroupBoxModel::OGroupBoxModel(const Reference<starlang::XMultiServiceFactory>&
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OGroupBoxModel::OGroupBoxModel( const OGroupBoxModel* _pOriginal, const Reference<starlang::XMultiServiceFactory>& _rxFactory )
|
||||
OGroupBoxModel::OGroupBoxModel( const OGroupBoxModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OControlModel( _pOriginal, _rxFactory )
|
||||
{
|
||||
DBG_CTOR( OGroupBoxModel, NULL );
|
||||
@ -137,11 +138,11 @@ void SAL_CALL OGroupBoxModel::read(const Reference< XObjectInputStream>& _rxInSt
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OGroupBoxControl_CreateInstance(const Reference<starlang::XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
|
||||
{
|
||||
return *(new OGroupBoxControl(_rxFactory));
|
||||
return *(new OGroupBoxControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
OGroupBoxControl::OGroupBoxControl(const Reference<starlang::XMultiServiceFactory>& _rxFactory)
|
||||
OGroupBoxControl::OGroupBoxControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OControl(_rxFactory, VCL_CONTROL_GROUPBOX)
|
||||
{
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ protected:
|
||||
class OGroupBoxControl : public OControl
|
||||
{
|
||||
public:
|
||||
OGroupBoxControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OGroupBoxControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
|
||||
// XServiceInfo
|
||||
IMPLEMENTATION_NAME(OGroupBoxControl);
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "services.hxx"
|
||||
#include <tools/debug.hxx>
|
||||
#include <comphelper/basicio.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
//.........................................................................
|
||||
namespace frm
|
||||
@ -42,13 +43,13 @@ using namespace ::com::sun::star::util;
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OHiddenModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
|
||||
{
|
||||
return *(new OHiddenModel(_rxFactory));
|
||||
return *(new OHiddenModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( OHiddenModel )
|
||||
//------------------------------------------------------------------
|
||||
OHiddenModel::OHiddenModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OHiddenModel::OHiddenModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OControlModel(_rxFactory, OUString())
|
||||
{
|
||||
DBG_CTOR( OHiddenModel, NULL );
|
||||
@ -56,7 +57,7 @@ OHiddenModel::OHiddenModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OHiddenModel::OHiddenModel( const OHiddenModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OHiddenModel::OHiddenModel( const OHiddenModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OControlModel( _pOriginal, _rxFactory )
|
||||
{
|
||||
DBG_CTOR( OHiddenModel, NULL );
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <osl/mutex.hxx>
|
||||
#include <comphelper/basicio.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <com/sun/star/awt/MouseButton.hpp>
|
||||
|
||||
//.........................................................................
|
||||
@ -48,11 +49,11 @@ DBG_NAME(OImageButtonModel)
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OImageButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OImageButtonModel(_rxFactory));
|
||||
return *(new OImageButtonModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OImageButtonModel::OImageButtonModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OImageButtonModel::OImageButtonModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OClickableImageBaseModel( _rxFactory, VCL_CONTROLMODEL_IMAGEBUTTON, FRM_SUN_CONTROL_IMAGEBUTTON )
|
||||
// use the old control name for compytibility reasons
|
||||
{
|
||||
@ -61,7 +62,7 @@ OImageButtonModel::OImageButtonModel(const Reference<XMultiServiceFactory>& _rxF
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OImageButtonModel::OImageButtonModel( const OImageButtonModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OImageButtonModel::OImageButtonModel( const OImageButtonModel* _pOriginal, const Reference<XComponentContext>& _rxFactory)
|
||||
:OClickableImageBaseModel( _pOriginal, _rxFactory )
|
||||
{
|
||||
DBG_CTOR(OImageButtonModel, NULL);
|
||||
@ -168,7 +169,7 @@ void OImageButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) t
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OImageButtonControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OImageButtonControl(_rxFactory));
|
||||
return *(new OImageButtonControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -192,7 +193,7 @@ StringSequence OImageButtonControl::getSupportedServiceNames() throw()
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
OImageButtonControl::OImageButtonControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OImageButtonControl::OImageButtonControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OClickableImageBaseControl(_rxFactory, VCL_CONTROL_IMAGEBUTTON)
|
||||
{
|
||||
increment(m_refCount);
|
||||
|
@ -67,7 +67,7 @@ protected:
|
||||
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
||||
|
||||
public:
|
||||
OImageButtonControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OImageButtonControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
|
||||
// XServiceInfo
|
||||
IMPLEMENTATION_NAME(OImageButtonControl);
|
||||
|
@ -52,6 +52,7 @@
|
||||
#include <unotools/streamhelper.hxx>
|
||||
#include <comphelper/extract.hxx>
|
||||
#include <comphelper/guarding.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <unotools/ucbstreamhelper.hxx>
|
||||
#include <svl/urihelper.hxx>
|
||||
|
||||
@ -124,7 +125,7 @@ namespace
|
||||
//------------------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OImageControlModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OImageControlModel(_rxFactory));
|
||||
return *(new OImageControlModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -138,7 +139,7 @@ Sequence<Type> OImageControlModel::_getTypes()
|
||||
|
||||
DBG_NAME(OImageControlModel)
|
||||
//------------------------------------------------------------------
|
||||
OImageControlModel::OImageControlModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OImageControlModel::OImageControlModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_IMAGECONTROL, FRM_SUN_CONTROL_IMAGECONTROL, sal_False, sal_False, sal_False )
|
||||
// use the old control name for compytibility reasons
|
||||
,m_pImageProducer( NULL )
|
||||
@ -155,7 +156,7 @@ OImageControlModel::OImageControlModel(const Reference<XMultiServiceFactory>& _r
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
|
||||
:OBoundControlModel( _pOriginal, _rxFactory )
|
||||
// use the old control name for compytibility reasons
|
||||
,m_pImageProducer( NULL )
|
||||
@ -283,7 +284,7 @@ void OImageControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, con
|
||||
m_xGraphicObject.clear();
|
||||
else
|
||||
{
|
||||
m_xGraphicObject = GraphicObject::create( m_aContext.getUNOContext() );
|
||||
m_xGraphicObject = GraphicObject::create( m_xContext );
|
||||
m_xGraphicObject->setGraphic( xGraphic );
|
||||
}
|
||||
|
||||
@ -420,7 +421,7 @@ sal_Bool OImageControlModel::impl_updateStreamForURL_lck( const OUString& _rURL,
|
||||
|
||||
if ( ::svt::GraphicAccess::isSupportedURL( _rURL ) )
|
||||
{
|
||||
xImageStream = ::svt::GraphicAccess::getImageXStream( getContext().getUNOContext(), _rURL );
|
||||
xImageStream = ::svt::GraphicAccess::getImageXStream( getContext(), _rURL );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -701,7 +702,7 @@ IMPL_LINK( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic )
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OImageControlControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OImageControlControl(_rxFactory));
|
||||
return *(new OImageControlControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -714,7 +715,7 @@ Sequence<Type> OImageControlControl::_getTypes()
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
OImageControlControl::OImageControlControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OImageControlControl::OImageControlControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControl(_rxFactory, VCL_CONTROL_IMAGECONTROL)
|
||||
,m_aModifyListeners( m_aMutex )
|
||||
{
|
||||
@ -903,7 +904,7 @@ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent&
|
||||
// is this a request for a context menu?
|
||||
if ( e.PopupTrigger )
|
||||
{
|
||||
Reference< XPopupMenu > xMenu( awt::PopupMenu::create( m_aContext.getUNOContext() ) );
|
||||
Reference< XPopupMenu > xMenu( awt::PopupMenu::create( m_xContext ) );
|
||||
DBG_ASSERT( xMenu.is(), "OImageControlControl::mousePressed: could not create a popup menu!" );
|
||||
|
||||
Reference< XWindowPeer > xWindowPeer = getPeer();
|
||||
|
@ -159,7 +159,7 @@ private:
|
||||
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
||||
|
||||
public:
|
||||
OImageControlControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OImageControlControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
|
||||
// UNO
|
||||
DECLARE_UNO3_AGG_DEFAULTS( OImageControlControl, OBoundControl );
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <comphelper/basicio.hxx>
|
||||
#include <comphelper/container.hxx>
|
||||
#include <comphelper/numbers.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <comphelper/listenernotification.hxx>
|
||||
#include <connectivity/dbtools.hxx>
|
||||
#include <connectivity/formattedcolumnvalue.hxx>
|
||||
@ -133,7 +134,7 @@ namespace frm
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OListBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
|
||||
{
|
||||
return *(new OListBoxModel(_rxFactory));
|
||||
return *(new OListBoxModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -154,12 +155,12 @@ namespace frm
|
||||
|
||||
DBG_NAME(OListBoxModel);
|
||||
//------------------------------------------------------------------
|
||||
OListBoxModel::OListBoxModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OListBoxModel::OListBoxModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_LISTBOX, FRM_SUN_CONTROL_LISTBOX, sal_True, sal_True, sal_True )
|
||||
// use the old control name for compatibility reasons
|
||||
,OEntryListHelper( (OControlModel&)*this )
|
||||
,OErrorBroadcaster( OComponentHelper::rBHelper )
|
||||
,m_aListRowSet( getContext() )
|
||||
,m_aListRowSet()
|
||||
,m_nNULLPos(-1)
|
||||
,m_nBoundColumnType( DataType::SQLNULL )
|
||||
{
|
||||
@ -174,11 +175,11 @@ namespace frm
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OListBoxModel::OListBoxModel( const OListBoxModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OListBoxModel::OListBoxModel( const OListBoxModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OBoundControlModel( _pOriginal, _rxFactory )
|
||||
,OEntryListHelper( *_pOriginal, (OControlModel&)*this )
|
||||
,OErrorBroadcaster( OComponentHelper::rBHelper )
|
||||
,m_aListRowSet( getContext() )
|
||||
,m_aListRowSet()
|
||||
,m_eListSourceType( _pOriginal->m_eListSourceType )
|
||||
,m_aBoundColumn( _pOriginal->m_aBoundColumn )
|
||||
,m_aListSourceValues( _pOriginal->m_aListSourceValues )
|
||||
@ -877,7 +878,7 @@ namespace frm
|
||||
if ( !xDataField.is() )
|
||||
return;
|
||||
|
||||
::dbtools::FormattedColumnValue aValueFormatter( getContext().getUNOContext(), m_xCursor, xDataField );
|
||||
::dbtools::FormattedColumnValue aValueFormatter( getContext(), m_xCursor, xDataField );
|
||||
|
||||
// Get the field of BoundColumn of the ResultSet
|
||||
m_nBoundColumnType = DataType::SQLNULL;
|
||||
@ -1709,7 +1710,7 @@ namespace frm
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OListBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
|
||||
{
|
||||
return *(new OListBoxControl(_rxFactory));
|
||||
return *(new OListBoxControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -1736,7 +1737,7 @@ namespace frm
|
||||
|
||||
DBG_NAME(OListBoxControl);
|
||||
//------------------------------------------------------------------------------
|
||||
OListBoxControl::OListBoxControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OListBoxControl::OListBoxControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControl( _rxFactory, VCL_CONTROL_LISTBOX, sal_False )
|
||||
,m_aChangeListeners( m_aMutex )
|
||||
,m_aItemListeners( m_aMutex )
|
||||
|
@ -271,7 +271,7 @@ protected:
|
||||
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
||||
|
||||
public:
|
||||
OListBoxControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OListBoxControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
virtual ~OListBoxControl();
|
||||
|
||||
// UNO Anbindung
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "Numeric.hxx"
|
||||
#include <tools/debug.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
//.........................................................................
|
||||
namespace frm
|
||||
@ -42,7 +43,7 @@ using namespace ::com::sun::star::form::binding;
|
||||
//==================================================================
|
||||
|
||||
//------------------------------------------------------------------
|
||||
ONumericControl::ONumericControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
ONumericControl::ONumericControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControl(_rxFactory, VCL_CONTROL_NUMERICFIELD)
|
||||
{
|
||||
}
|
||||
@ -62,7 +63,7 @@ StringSequence ONumericControl::getSupportedServiceNames() throw()
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL ONumericControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new ONumericControl(_rxFactory));
|
||||
return *(new ONumericControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -77,7 +78,7 @@ Sequence<Type> ONumericControl::_getTypes()
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL ONumericModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new ONumericModel(_rxFactory));
|
||||
return *(new ONumericModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -89,7 +90,7 @@ Sequence<Type> ONumericModel::_getTypes()
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( ONumericModel )
|
||||
//------------------------------------------------------------------
|
||||
ONumericModel::ONumericModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
ONumericModel::ONumericModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_NUMERICFIELD, FRM_SUN_CONTROL_NUMERICFIELD, sal_True, sal_True )
|
||||
// use the old control name for compytibility reasons
|
||||
{
|
||||
@ -100,7 +101,7 @@ ONumericModel::ONumericModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
ONumericModel::ONumericModel( const ONumericModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
ONumericModel::ONumericModel( const ONumericModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OEditBaseModel( _pOriginal, _rxFactory )
|
||||
{
|
||||
DBG_CTOR( ONumericModel, NULL );
|
||||
|
@ -76,7 +76,7 @@ protected:
|
||||
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
||||
|
||||
public:
|
||||
ONumericControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
ONumericControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
|
||||
// ::com::sun::star::lang::XServiceInfo
|
||||
IMPLEMENTATION_NAME(ONumericControl);
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "Pattern.hxx"
|
||||
#include "comphelper/processfactory.hxx"
|
||||
|
||||
//.........................................................................
|
||||
namespace frm
|
||||
@ -28,6 +29,7 @@ namespace frm
|
||||
using ::com::sun::star::lang::XMultiServiceFactory;
|
||||
using ::com::sun::star::uno::Sequence;
|
||||
using ::com::sun::star::uno::Type;
|
||||
using ::com::sun::star::uno::XComponentContext;
|
||||
using ::com::sun::star::beans::Property;
|
||||
using ::com::sun::star::uno::Exception;
|
||||
using ::com::sun::star::uno::XInterface;
|
||||
@ -42,7 +44,7 @@ namespace frm
|
||||
// OPatternControl
|
||||
//==================================================================
|
||||
//------------------------------------------------------------------
|
||||
OPatternControl::OPatternControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OPatternControl::OPatternControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControl(_rxFactory, VCL_CONTROL_PATTERNFIELD)
|
||||
{
|
||||
}
|
||||
@ -50,7 +52,7 @@ OPatternControl::OPatternControl(const Reference<XMultiServiceFactory>& _rxFacto
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OPatternControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OPatternControl(_rxFactory));
|
||||
return *(new OPatternControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -76,7 +78,7 @@ StringSequence OPatternControl::getSupportedServiceNames() throw()
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OPatternModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OPatternModel(_rxFactory));
|
||||
return *(new OPatternModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -88,7 +90,7 @@ Sequence<Type> OPatternModel::_getTypes()
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( OPatternModel )
|
||||
//------------------------------------------------------------------
|
||||
OPatternModel::OPatternModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OPatternModel::OPatternModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_PATTERNFIELD, FRM_SUN_CONTROL_PATTERNFIELD, sal_False, sal_False )
|
||||
// use the old control name for compytibility reasons
|
||||
{
|
||||
@ -99,7 +101,7 @@ OPatternModel::OPatternModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OPatternModel::OPatternModel( const OPatternModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OPatternModel::OPatternModel( const OPatternModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OEditBaseModel( _pOriginal, _rxFactory )
|
||||
{
|
||||
DBG_CTOR( OPatternModel, NULL );
|
||||
@ -189,7 +191,7 @@ void OPatternModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm
|
||||
if ( !xField.is() )
|
||||
return;
|
||||
|
||||
m_pFormattedValue.reset( new ::dbtools::FormattedColumnValue( getContext().getUNOContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
|
||||
m_pFormattedValue.reset( new ::dbtools::FormattedColumnValue( getContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -85,7 +85,7 @@ protected:
|
||||
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
||||
|
||||
public:
|
||||
OPatternControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OPatternControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
|
||||
// ::com::sun::star::lang::XServiceInfo
|
||||
IMPLEMENTATION_NAME(OPatternControl);
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <tools/debug.hxx>
|
||||
#include <comphelper/extract.hxx>
|
||||
#include <comphelper/basicio.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <com/sun/star/container/XIndexAccess.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
|
||||
@ -48,7 +49,7 @@ using namespace ::com::sun::star::form::binding;
|
||||
//------------------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL ORadioButtonControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
|
||||
{
|
||||
return *(new ORadioButtonControl(_rxFactory));
|
||||
return *(new ORadioButtonControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -64,7 +65,7 @@ StringSequence SAL_CALL ORadioButtonControl::getSupportedServiceNames() throw(Ru
|
||||
|
||||
|
||||
//------------------------------------------------------------------
|
||||
ORadioButtonControl::ORadioButtonControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
ORadioButtonControl::ORadioButtonControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControl(_rxFactory, VCL_CONTROL_RADIOBUTTON)
|
||||
{
|
||||
}
|
||||
@ -93,13 +94,13 @@ void SAL_CALL ORadioButtonControl::createPeer(const Reference<starawt::XToolkit>
|
||||
//==================================================================
|
||||
InterfaceRef SAL_CALL ORadioButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
|
||||
{
|
||||
return *(new ORadioButtonModel(_rxFactory));
|
||||
return *(new ORadioButtonModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( ORadioButtonModel )
|
||||
//------------------------------------------------------------------
|
||||
ORadioButtonModel::ORadioButtonModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
ORadioButtonModel::ORadioButtonModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_RADIOBUTTON, FRM_SUN_CONTROL_RADIOBUTTON,sal_True )
|
||||
// use the old control name for compytibility reasons
|
||||
{
|
||||
@ -112,7 +113,7 @@ ORadioButtonModel::ORadioButtonModel(const Reference<XMultiServiceFactory>& _rxF
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
ORadioButtonModel::ORadioButtonModel( const ORadioButtonModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
ORadioButtonModel::ORadioButtonModel( const ORadioButtonModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OReferenceValueComponent( _pOriginal, _rxFactory )
|
||||
{
|
||||
DBG_CTOR( ORadioButtonModel, NULL );
|
||||
|
@ -86,7 +86,7 @@ private:
|
||||
class ORadioButtonControl: public OBoundControl
|
||||
{
|
||||
public:
|
||||
ORadioButtonControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
ORadioButtonControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
|
||||
// XServiceInfo
|
||||
IMPLEMENTATION_NAME(ORadioButtonControl);
|
||||
|
@ -52,7 +52,7 @@ using namespace ::com::sun::star::lang;
|
||||
//= OTimeControl
|
||||
//==================================================================
|
||||
//------------------------------------------------------------------
|
||||
OTimeControl::OTimeControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OTimeControl::OTimeControl(const Reference<XComponentContext>& _rxFactory)
|
||||
:OBoundControl(_rxFactory, VCL_CONTROL_TIMEFIELD)
|
||||
{
|
||||
}
|
||||
@ -60,7 +60,7 @@ OTimeControl::OTimeControl(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OTimeControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OTimeControl(_rxFactory));
|
||||
return *(new OTimeControl( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -86,7 +86,7 @@ StringSequence SAL_CALL OTimeControl::getSupportedServiceNames() throw()
|
||||
//------------------------------------------------------------------
|
||||
InterfaceRef SAL_CALL OTimeModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
{
|
||||
return *(new OTimeModel(_rxFactory));
|
||||
return *(new OTimeModel( comphelper::getComponentContext(_rxFactory) ));
|
||||
}
|
||||
|
||||
// XServiceInfo
|
||||
@ -122,10 +122,10 @@ Sequence<Type> OTimeModel::_getTypes()
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( OTimeModel )
|
||||
//------------------------------------------------------------------
|
||||
OTimeModel::OTimeModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OTimeModel::OTimeModel(const Reference<XComponentContext>& _rxFactory)
|
||||
:OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_TIMEFIELD, FRM_SUN_CONTROL_TIMEFIELD, sal_True, sal_True )
|
||||
// use the old control name for compytibility reasons
|
||||
,OLimitedFormats( comphelper::getComponentContext(_rxFactory), FormComponentType::TIMEFIELD)
|
||||
,OLimitedFormats( _rxFactory, FormComponentType::TIMEFIELD)
|
||||
{
|
||||
DBG_CTOR( OTimeModel, NULL );
|
||||
|
||||
@ -136,9 +136,9 @@ OTimeModel::OTimeModel(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
OTimeModel::OTimeModel( const OTimeModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OTimeModel::OTimeModel( const OTimeModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OEditBaseModel( _pOriginal, _rxFactory )
|
||||
,OLimitedFormats( comphelper::getComponentContext(_rxFactory), FormComponentType::TIMEFIELD )
|
||||
,OLimitedFormats( _rxFactory, FormComponentType::TIMEFIELD )
|
||||
{
|
||||
DBG_CTOR( OTimeModel, NULL );
|
||||
|
||||
|
@ -109,7 +109,7 @@ protected:
|
||||
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
||||
|
||||
public:
|
||||
OTimeControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OTimeControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
DECLARE_UNO3_AGG_DEFAULTS(OTimeControl, OBoundControl);
|
||||
|
||||
// ::com::sun::star::lang::XServiceInfo
|
||||
|
@ -40,6 +40,7 @@ namespace frm
|
||||
using ::com::sun::star::uno::UNO_SET_THROW;
|
||||
using ::com::sun::star::uno::Exception;
|
||||
using ::com::sun::star::uno::RuntimeException;
|
||||
using ::com::sun::star::uno::XComponentContext;
|
||||
using ::com::sun::star::sdbc::XConnection;
|
||||
using ::com::sun::star::lang::XComponent;
|
||||
using ::com::sun::star::beans::XPropertySet;
|
||||
@ -58,16 +59,14 @@ namespace frm
|
||||
//====================================================================
|
||||
struct CachedRowSet_Data
|
||||
{
|
||||
::comphelper::ComponentContext aContext;
|
||||
OUString sCommand;
|
||||
sal_Bool bEscapeProcessing;
|
||||
Reference< XConnection > xConnection;
|
||||
|
||||
bool bStatementDirty;
|
||||
|
||||
CachedRowSet_Data( const ::comphelper::ComponentContext& _rContext )
|
||||
:aContext( _rContext )
|
||||
,sCommand()
|
||||
CachedRowSet_Data()
|
||||
:sCommand()
|
||||
,bEscapeProcessing( sal_False )
|
||||
,xConnection()
|
||||
,bStatementDirty( true )
|
||||
@ -79,8 +78,8 @@ namespace frm
|
||||
//= CachedRowSet
|
||||
//====================================================================
|
||||
//--------------------------------------------------------------------
|
||||
CachedRowSet::CachedRowSet( const ::comphelper::ComponentContext& _rContext )
|
||||
:m_pData( new CachedRowSet_Data( _rContext ) )
|
||||
CachedRowSet::CachedRowSet()
|
||||
:m_pData( new CachedRowSet_Data )
|
||||
{
|
||||
}
|
||||
|
||||
@ -176,7 +175,7 @@ namespace frm
|
||||
{
|
||||
try
|
||||
{
|
||||
m_pData.reset( new CachedRowSet_Data( m_pData->aContext ) );
|
||||
m_pData.reset( new CachedRowSet_Data );
|
||||
}
|
||||
catch( const Exception& )
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ namespace frm
|
||||
class CachedRowSet
|
||||
{
|
||||
public:
|
||||
CachedRowSet( const ::comphelper::ComponentContext& _rContext );
|
||||
CachedRowSet();
|
||||
~CachedRowSet();
|
||||
|
||||
public:
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "services.hxx"
|
||||
#include <comphelper/container.hxx>
|
||||
#include <comphelper/listenernotification.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <svtools/imageresourceaccess.hxx>
|
||||
#define LOCAL_URL_PREFIX '#'
|
||||
|
||||
@ -77,7 +78,7 @@ namespace frm
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
OClickableImageBaseControl::OClickableImageBaseControl(const Reference<XMultiServiceFactory>& _rxFactory, const OUString& _aService)
|
||||
OClickableImageBaseControl::OClickableImageBaseControl(const Reference<XComponentContext>& _rxFactory, const OUString& _aService)
|
||||
:OControl(_rxFactory, _aService)
|
||||
,m_pThread(NULL)
|
||||
,m_aSubmissionVetoListeners( m_aMutex )
|
||||
@ -448,7 +449,7 @@ namespace frm
|
||||
//------------------------------------------------------------------
|
||||
DBG_NAME( OClickableImageBaseModel )
|
||||
//------------------------------------------------------------------
|
||||
OClickableImageBaseModel::OClickableImageBaseModel( const Reference< XMultiServiceFactory >& _rxFactory, const OUString& _rUnoControlModelTypeName,
|
||||
OClickableImageBaseModel::OClickableImageBaseModel( const Reference< XComponentContext >& _rxFactory, const OUString& _rUnoControlModelTypeName,
|
||||
const OUString& rDefault )
|
||||
:OControlModel( _rxFactory, _rUnoControlModelTypeName, rDefault )
|
||||
,OPropertyChangeListener(m_aMutex)
|
||||
@ -464,7 +465,7 @@ namespace frm
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
OClickableImageBaseModel::OClickableImageBaseModel( const OClickableImageBaseModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OClickableImageBaseModel::OClickableImageBaseModel( const OClickableImageBaseModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
|
||||
:OControlModel( _pOriginal, _rxFactory )
|
||||
,OPropertyChangeListener( m_aMutex )
|
||||
,m_pMedium( NULL )
|
||||
|
@ -203,7 +203,7 @@ namespace frm
|
||||
|
||||
public:
|
||||
OClickableImageBaseControl(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory,
|
||||
const OUString& _aService);
|
||||
virtual ~OClickableImageBaseControl();
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <comphelper/streamsection.hxx>
|
||||
#include <comphelper/basicio.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
extern "C" void SAL_CALL createRegistryInfo_ONavigationBarModel()
|
||||
@ -57,7 +58,7 @@ namespace frm
|
||||
//==================================================================
|
||||
DBG_NAME( ONavigationBarModel )
|
||||
//------------------------------------------------------------------
|
||||
ONavigationBarModel::ONavigationBarModel( const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
ONavigationBarModel::ONavigationBarModel( const Reference< XComponentContext >& _rxFactory )
|
||||
:OControlModel( _rxFactory, OUString() )
|
||||
,FontControlModel( true )
|
||||
{
|
||||
@ -81,7 +82,7 @@ namespace frm
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
ONavigationBarModel::ONavigationBarModel( const ONavigationBarModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
ONavigationBarModel::ONavigationBarModel( const ONavigationBarModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
|
||||
:OControlModel( _pOriginal, _rxFactory )
|
||||
,FontControlModel( _pOriginal )
|
||||
{
|
||||
@ -191,7 +192,7 @@ namespace frm
|
||||
//------------------------------------------------------------------
|
||||
Reference< XInterface > SAL_CALL ONavigationBarModel::Create( const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
{
|
||||
return *( new ONavigationBarModel( _rxFactory ) );
|
||||
return *( new ONavigationBarModel( comphelper::getComponentContext(_rxFactory) ) );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
|
@ -37,7 +37,7 @@ namespace frm
|
||||
//=
|
||||
//====================================================================
|
||||
//--------------------------------------------------------------------
|
||||
OReferenceValueComponent::OReferenceValueComponent( const Reference< XMultiServiceFactory>& _rxFactory, const OUString& _rUnoControlModelTypeName, const OUString& _rDefault, sal_Bool _bSupportNoCheckRefValue )
|
||||
OReferenceValueComponent::OReferenceValueComponent( const Reference< XComponentContext >& _rxFactory, const OUString& _rUnoControlModelTypeName, const OUString& _rDefault, sal_Bool _bSupportNoCheckRefValue )
|
||||
:OBoundControlModel( _rxFactory, _rUnoControlModelTypeName, _rDefault, sal_False, sal_True, sal_True )
|
||||
,m_eDefaultChecked( STATE_NOCHECK )
|
||||
,m_bSupportSecondRefValue( _bSupportNoCheckRefValue )
|
||||
@ -45,7 +45,7 @@ namespace frm
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
OReferenceValueComponent::OReferenceValueComponent( const OReferenceValueComponent* _pOriginal, const Reference< XMultiServiceFactory>& _rxFactory )
|
||||
OReferenceValueComponent::OReferenceValueComponent( const OReferenceValueComponent* _pOriginal, const Reference< XComponentContext>& _rxFactory )
|
||||
:OBoundControlModel( _pOriginal, _rxFactory )
|
||||
{
|
||||
m_sReferenceValue = _pOriginal->m_sReferenceValue;
|
||||
|
@ -55,7 +55,7 @@ namespace frm
|
||||
|
||||
protected:
|
||||
OReferenceValueComponent(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory,
|
||||
const OUString& _rUnoControlModelTypeName,
|
||||
const OUString& _rDefault,
|
||||
sal_Bool _bSupportNoCheckRefValue = sal_False
|
||||
|
@ -100,7 +100,7 @@ namespace frm
|
||||
//--------------------------------------------------------------------
|
||||
DBG_NAME( OScrollBarModel )
|
||||
//--------------------------------------------------------------------
|
||||
OScrollBarModel::OScrollBarModel( const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OScrollBarModel::OScrollBarModel( const Reference<XComponentContext>& _rxFactory )
|
||||
:OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_SCROLLBAR, VCL_CONTROL_SCROLLBAR, sal_True, sal_True, sal_False )
|
||||
,m_nDefaultScrollValue( 0 )
|
||||
{
|
||||
@ -111,7 +111,7 @@ namespace frm
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
OScrollBarModel::OScrollBarModel( const OScrollBarModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
OScrollBarModel::OScrollBarModel( const OScrollBarModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
|
||||
:OBoundControlModel( _pOriginal, _rxFactory )
|
||||
{
|
||||
DBG_CTOR( OScrollBarModel, NULL );
|
||||
|
@ -56,7 +56,7 @@ namespace frm
|
||||
//--------------------------------------------------------------------
|
||||
DBG_NAME( OSpinButtonModel )
|
||||
//--------------------------------------------------------------------
|
||||
OSpinButtonModel::OSpinButtonModel( const Reference<XMultiServiceFactory>& _rxFactory )
|
||||
OSpinButtonModel::OSpinButtonModel( const Reference<XComponentContext>& _rxFactory )
|
||||
:OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_SPINBUTTON, VCL_CONTROL_SPINBUTTON, sal_True, sal_True, sal_False )
|
||||
,m_nDefaultSpinValue( 0 )
|
||||
{
|
||||
@ -67,7 +67,7 @@ namespace frm
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
OSpinButtonModel::OSpinButtonModel( const OSpinButtonModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
OSpinButtonModel::OSpinButtonModel( const OSpinButtonModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
|
||||
:OBoundControlModel( _pOriginal, _rxFactory )
|
||||
{
|
||||
DBG_CTOR( OSpinButtonModel, NULL );
|
||||
|
@ -44,6 +44,7 @@ namespace frm
|
||||
using ::com::sun::star::uno::makeAny;
|
||||
using ::com::sun::star::uno::Sequence;
|
||||
using ::com::sun::star::uno::Type;
|
||||
using ::com::sun::star::uno::XComponentContext;
|
||||
using ::com::sun::star::frame::XModel;
|
||||
using ::com::sun::star::ui::XImageManager;
|
||||
using ::com::sun::star::ui::XUIConfigurationManagerSupplier;
|
||||
@ -62,7 +63,7 @@ namespace frm
|
||||
class DocumentCommandImageProvider : public ICommandImageProvider
|
||||
{
|
||||
public:
|
||||
DocumentCommandImageProvider( const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument )
|
||||
DocumentCommandImageProvider( const Reference<XComponentContext>& _rContext, const Reference< XModel >& _rxDocument )
|
||||
{
|
||||
impl_init_nothrow( _rContext, _rxDocument );
|
||||
}
|
||||
@ -74,7 +75,7 @@ namespace frm
|
||||
virtual CommandImages getCommandImages( const CommandURLs& _rCommandURLs, const bool _bLarge ) const;
|
||||
|
||||
private:
|
||||
void impl_init_nothrow( const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument );
|
||||
void impl_init_nothrow( const Reference<XComponentContext>& _rContext, const Reference< XModel >& _rxDocument );
|
||||
|
||||
private:
|
||||
Reference< XImageManager > m_xDocumentImageManager;
|
||||
@ -82,7 +83,7 @@ namespace frm
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
void DocumentCommandImageProvider::impl_init_nothrow( const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument )
|
||||
void DocumentCommandImageProvider::impl_init_nothrow( const Reference<XComponentContext>& _rContext, const Reference< XModel >& _rxDocument )
|
||||
{
|
||||
OSL_ENSURE( _rxDocument.is(), "DocumentCommandImageProvider::impl_init_nothrow: no document => no images!" );
|
||||
if ( !_rxDocument.is() )
|
||||
@ -103,11 +104,11 @@ namespace frm
|
||||
// obtain the image manager or the module
|
||||
try
|
||||
{
|
||||
Reference< XModuleManager2 > xModuleManager( ModuleManager::create(_rContext.getUNOContext()) );
|
||||
Reference< XModuleManager2 > xModuleManager( ModuleManager::create(_rContext) );
|
||||
OUString sModuleID = xModuleManager->identify( _rxDocument );
|
||||
|
||||
Reference< XModuleUIConfigurationManagerSupplier > xSuppUIConfig(
|
||||
ModuleUIConfigurationManagerSupplier::create(_rContext.getUNOContext()) );
|
||||
ModuleUIConfigurationManagerSupplier::create(_rContext) );
|
||||
Reference< XUIConfigurationManager > xUIConfig(
|
||||
xSuppUIConfig->getUIConfigurationManager( sModuleID ), UNO_SET_THROW );
|
||||
m_xModuleImageManager.set( xUIConfig->getImageManager(), UNO_QUERY_THROW );
|
||||
@ -159,7 +160,7 @@ namespace frm
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
PCommandImageProvider createDocumentCommandImageProvider(
|
||||
const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument )
|
||||
const Reference<XComponentContext>& _rContext, const Reference< XModel >& _rxDocument )
|
||||
{
|
||||
PCommandImageProvider pImageProvider( new DocumentCommandImageProvider( _rContext, _rxDocument ) );
|
||||
return pImageProvider;
|
||||
|
@ -34,7 +34,7 @@ namespace frm
|
||||
//= ControlFeatureInterception
|
||||
//====================================================================
|
||||
//--------------------------------------------------------------------
|
||||
ControlFeatureInterception::ControlFeatureInterception( const Reference< XMultiServiceFactory >& _rxORB )
|
||||
ControlFeatureInterception::ControlFeatureInterception( const Reference< XComponentContext >& _rxORB )
|
||||
:m_pUrlTransformer( new UrlTransformer( _rxORB ) )
|
||||
{
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ namespace frm
|
||||
//==================================================================
|
||||
DBG_NAME( OFormNavigationHelper )
|
||||
//------------------------------------------------------------------
|
||||
OFormNavigationHelper::OFormNavigationHelper( const Reference< XMultiServiceFactory >& _rxORB )
|
||||
OFormNavigationHelper::OFormNavigationHelper( const Reference< XComponentContext >& _rxORB )
|
||||
:m_xORB( _rxORB )
|
||||
,m_nConnectedFeatures( 0 )
|
||||
{
|
||||
@ -379,7 +379,7 @@ namespace frm
|
||||
//= OFormNavigationMapper
|
||||
//==================================================================
|
||||
//------------------------------------------------------------------
|
||||
OFormNavigationMapper::OFormNavigationMapper( const Reference< XMultiServiceFactory >& _rxORB )
|
||||
OFormNavigationMapper::OFormNavigationMapper( const Reference< XComponentContext >& _rxORB )
|
||||
{
|
||||
m_pUrlTransformer.reset( new UrlTransformer( _rxORB ) );
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ namespace frm
|
||||
//= UrlTransformer
|
||||
//====================================================================
|
||||
//--------------------------------------------------------------------
|
||||
UrlTransformer::UrlTransformer( const Reference< XMultiServiceFactory >& _rxORB )
|
||||
UrlTransformer::UrlTransformer( const Reference< XComponentContext >& _rxORB )
|
||||
:m_xORB( _rxORB )
|
||||
,m_bTriedToCreateTransformer( false )
|
||||
{
|
||||
@ -51,7 +51,7 @@ namespace frm
|
||||
{
|
||||
if ( m_xORB.is() )
|
||||
{
|
||||
m_xTransformer.set(URLTransformer::create(comphelper::getComponentContext(m_xORB)));
|
||||
m_xTransformer.set(URLTransformer::create(m_xORB));
|
||||
}
|
||||
|
||||
m_bTriedToCreateTransformer = true;
|
||||
|
@ -59,7 +59,6 @@
|
||||
#include <com/sun/star/util/XModifyListener.hpp>
|
||||
#include <com/sun/star/form/XLoadable.hpp>
|
||||
|
||||
#include <comphelper/componentcontext.hxx>
|
||||
#include <comphelper/propagg.hxx>
|
||||
#include <comphelper/propertybag.hxx>
|
||||
#include <comphelper/propmultiplex.hxx>
|
||||
@ -173,7 +172,8 @@ protected:
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation>
|
||||
m_xAggregate;
|
||||
|
||||
::comphelper::ComponentContext m_aContext;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
|
||||
m_xContext;
|
||||
WindowStateGuard m_aWindowStateGuard;
|
||||
|
||||
public:
|
||||
@ -202,7 +202,7 @@ public:
|
||||
the <type>OControl</type> itself.
|
||||
*/
|
||||
OControl(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rFactory,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rFactory,
|
||||
const OUString& _rAggregateService,
|
||||
const sal_Bool _bSetDelegator = sal_True
|
||||
);
|
||||
@ -295,7 +295,7 @@ protected:
|
||||
|
||||
public:
|
||||
OBoundControl(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
|
||||
const OUString& _rAggregateService,
|
||||
const sal_Bool _bSetDelegator = sal_True
|
||||
);
|
||||
@ -347,7 +347,7 @@ class OControlModel :public ::cppu::OComponentHelper
|
||||
{
|
||||
|
||||
protected:
|
||||
::comphelper::ComponentContext m_aContext;
|
||||
css::uno::Reference<css::uno::XComponentContext> m_xContext;
|
||||
|
||||
::osl::Mutex m_aMutex;
|
||||
oslInterlockedCount m_lockCount;
|
||||
@ -356,8 +356,8 @@ protected:
|
||||
OImplementationIdsRef m_aHoldIdHelper;
|
||||
PropertyBagHelper m_aPropertyBagHelper;
|
||||
|
||||
const ::comphelper::ComponentContext&
|
||||
getContext() const { return m_aContext; }
|
||||
const css::uno::Reference<css::uno::XComponentContext>&
|
||||
getContext() const { return m_xContext; }
|
||||
|
||||
// <properties>
|
||||
OUString m_aName; // name of the control
|
||||
@ -371,14 +371,14 @@ protected:
|
||||
|
||||
protected:
|
||||
OControlModel(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rFactory, // factory to create the aggregate with
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rFactory, // factory to create the aggregate with
|
||||
const OUString& _rUnoControlModelTypeName, // service name of te model to aggregate
|
||||
const OUString& rDefault = OUString(), // service name of the default control
|
||||
const sal_Bool _bSetDelegator = sal_True // set to sal_False if you want to call setDelegator later (after returning from this ctor)
|
||||
);
|
||||
OControlModel(
|
||||
const OControlModel* _pOriginal, // the original object to clone
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rFactory, // factory to create the aggregate with
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rFactory, // factory to create the aggregate with
|
||||
const sal_Bool _bCloneAggregate = sal_True, // should the aggregate of the original be cloned, too?
|
||||
const sal_Bool _bSetDelegator = sal_True // set to sal_False if you want to call setDelegator later (after returning from this ctor)
|
||||
);
|
||||
@ -535,13 +535,13 @@ public:
|
||||
#define DECLARE_DEFAULT_CLONE_CTOR( classname ) \
|
||||
classname( \
|
||||
const classname* _pOriginal, \
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory \
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory \
|
||||
); \
|
||||
|
||||
// all xtors for an inner class of the object hierarchy
|
||||
#define DECLARE_DEFAULT_XTOR( classname ) \
|
||||
classname( \
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory, \
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory, \
|
||||
const OUString& _rUnoControlModelTypeName, \
|
||||
const OUString& _rDefault \
|
||||
); \
|
||||
@ -551,7 +551,7 @@ public:
|
||||
// all xtors for an inner class of the object hierarchy which is *bound*
|
||||
#define DECLARE_DEFAULT_BOUND_XTOR( classname ) \
|
||||
classname( \
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory, \
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory, \
|
||||
const OUString& _rUnoControlModelTypeName, \
|
||||
const OUString& _rDefault, \
|
||||
const sal_Bool _bSupportExternalBinding, \
|
||||
@ -563,11 +563,11 @@ public:
|
||||
// all xtors for a leas class of the object hierarchy
|
||||
#define DECLARE_DEFAULT_LEAF_XTOR( classname ) \
|
||||
classname( \
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory \
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory \
|
||||
); \
|
||||
classname( \
|
||||
const classname* _pOriginal, \
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory \
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory \
|
||||
); \
|
||||
DECLARE_DEFAULT_DTOR( classname ) \
|
||||
|
||||
@ -579,7 +579,7 @@ public:
|
||||
#define IMPLEMENT_DEFAULT_CLONING( classname ) \
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL classname::createClone( ) throw (::com::sun::star::uno::RuntimeException) \
|
||||
{ \
|
||||
classname* pClone = new classname( this, getContext().getLegacyServiceFactory() ); \
|
||||
classname* pClone = new classname( this, getContext() ); \
|
||||
pClone->clonedFrom( this ); \
|
||||
return pClone; \
|
||||
}
|
||||
@ -696,7 +696,7 @@ protected:
|
||||
protected:
|
||||
|
||||
OBoundControlModel(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rFactory,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext,
|
||||
// factory to create the aggregate with
|
||||
const OUString& _rUnoControlModelTypeName, // service name of te model to aggregate
|
||||
const OUString& _rDefault, // service name of the default control
|
||||
@ -706,7 +706,7 @@ protected:
|
||||
);
|
||||
OBoundControlModel(
|
||||
const OBoundControlModel* _pOriginal, // the original object to clone
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rFactory
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext
|
||||
// factory to create the aggregate with
|
||||
);
|
||||
virtual ~OBoundControlModel();
|
||||
|
@ -101,7 +101,7 @@ protected:
|
||||
|
||||
const ::com::sun::star::uno::Type m_aElementType;
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xServiceFactory;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xContext;
|
||||
|
||||
|
||||
// EventManager
|
||||
@ -109,7 +109,7 @@ protected:
|
||||
|
||||
public:
|
||||
OInterfaceContainer(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory,
|
||||
::osl::Mutex& _rMutex,
|
||||
const ::com::sun::star::uno::Type& _rElementType);
|
||||
|
||||
@ -292,7 +292,7 @@ protected:
|
||||
::comphelper::InterfaceRef m_xParent;
|
||||
|
||||
public:
|
||||
OFormComponents(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
|
||||
OFormComponents(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
|
||||
OFormComponents( const OFormComponents& _cloneSource );
|
||||
virtual ~OFormComponents();
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
#define COMMANDIMAGEPROVIDER_HXX
|
||||
|
||||
#include <com/sun/star/frame/XModel.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
|
||||
#include <comphelper/componentcontext.hxx>
|
||||
#include <vcl/image.hxx>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
@ -57,7 +57,7 @@ namespace frm
|
||||
//=====================================================================
|
||||
PCommandImageProvider
|
||||
createDocumentCommandImageProvider(
|
||||
const ::comphelper::ComponentContext& _rContext,
|
||||
const css::uno::Reference<css::uno::XComponentContext>& _rContext,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxDocument
|
||||
);
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -58,7 +59,7 @@ namespace frm
|
||||
const UrlTransformer& getTransformer() const { return *m_pUrlTransformer; }
|
||||
|
||||
public:
|
||||
ControlFeatureInterception( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB );
|
||||
ControlFeatureInterception( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB );
|
||||
|
||||
// XDispatchProviderInterception
|
||||
void SAL_CALL registerDispatchProviderInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException );
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
|
||||
#include <com/sun/star/frame/XStatusListener.hpp>
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
#include <com/sun/star/util/XURLTransformer.hpp>
|
||||
#include <cppuhelper/implbase2.hxx>
|
||||
#include "featuredispatcher.hxx"
|
||||
@ -63,7 +64,7 @@ namespace frm
|
||||
typedef ::std::map< sal_Int16, FeatureInfo > FeatureMap;
|
||||
|
||||
private:
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
|
||||
m_xORB;
|
||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||
::std::auto_ptr< ControlFeatureInterception >
|
||||
@ -76,11 +77,11 @@ namespace frm
|
||||
sal_Int32 m_nConnectedFeatures;
|
||||
|
||||
protected:
|
||||
inline const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&
|
||||
inline const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
|
||||
getORB( ) const { return m_xORB; }
|
||||
|
||||
protected:
|
||||
OFormNavigationHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB );
|
||||
OFormNavigationHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB );
|
||||
virtual ~OFormNavigationHelper();
|
||||
|
||||
// XComponent
|
||||
@ -189,7 +190,7 @@ namespace frm
|
||||
|
||||
public:
|
||||
OFormNavigationMapper(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
|
||||
);
|
||||
~OFormNavigationMapper( );
|
||||
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <com/sun/star/registry/XRegistryKey.hpp>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <rtl/string.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
|
||||
//.........................................................................
|
||||
namespace FORMS_MODULE_NAMESPACE
|
||||
@ -231,7 +232,7 @@ namespace FORMS_MODULE_NAMESPACE
|
||||
{ return OUString( "com.sun.star.comp.forms."#classname ); } \
|
||||
\
|
||||
Reference< XInterface > SAL_CALL classname::Create( const Reference< XMultiServiceFactory >& _rxFactory ) \
|
||||
{ return static_cast< XServiceInfo* >( new classname( _rxFactory ) ); } \
|
||||
{ return static_cast< XServiceInfo* >( new classname( comphelper::getComponentContext(_rxFactory) ) ); } \
|
||||
\
|
||||
|
||||
#define IMPLEMENT_SERVICE_REGISTRATION_1( classname, baseclass, service1 ) \
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <com/sun/star/util/XURLTransformer.hpp>
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
#include <com/sun/star/util/URL.hpp>
|
||||
|
||||
//........................................................................
|
||||
@ -35,14 +36,14 @@ namespace frm
|
||||
class UrlTransformer
|
||||
{
|
||||
private:
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
|
||||
m_xORB;
|
||||
mutable ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >
|
||||
m_xTransformer;
|
||||
mutable bool m_bTriedToCreateTransformer;
|
||||
|
||||
public:
|
||||
UrlTransformer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB );
|
||||
UrlTransformer( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB );
|
||||
|
||||
/** returns an URL object for the given URL string
|
||||
*/
|
||||
|
@ -148,7 +148,7 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIn
|
||||
OUString sServiceName;
|
||||
xProps->getPropertyValue( OUString("DefaultControl") ) >>= sServiceName;
|
||||
|
||||
Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( m_xServiceFactory->createInstance( OUString("ooo.vba.VBAToOOEventDesc") ), UNO_QUERY_THROW );
|
||||
Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( m_xContext->getServiceManager()->createInstanceWithContext("ooo.vba.VBAToOOEventDesc", m_xContext), UNO_QUERY_THROW );
|
||||
Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( sServiceName , sCodeName );
|
||||
|
||||
// register the vba script events
|
||||
@ -184,14 +184,14 @@ ElementDescription::~ElementDescription()
|
||||
//==================================================================
|
||||
//------------------------------------------------------------------
|
||||
OInterfaceContainer::OInterfaceContainer(
|
||||
const Reference<XMultiServiceFactory>& _rxFactory,
|
||||
const Reference<XComponentContext>& _rxContext,
|
||||
::osl::Mutex& _rMutex,
|
||||
const Type& _rElementType)
|
||||
:OInterfaceContainer_BASE()
|
||||
,m_rMutex(_rMutex)
|
||||
,m_aContainerListeners(_rMutex)
|
||||
,m_aElementType(_rElementType)
|
||||
,m_xServiceFactory(_rxFactory)
|
||||
,m_xContext(_rxContext)
|
||||
{
|
||||
impl_createEventAttacher_nothrow();
|
||||
}
|
||||
@ -202,7 +202,7 @@ OInterfaceContainer::OInterfaceContainer( ::osl::Mutex& _rMutex, const OInterfac
|
||||
,m_rMutex( _rMutex )
|
||||
,m_aContainerListeners( _rMutex )
|
||||
,m_aElementType( _cloneSource.m_aElementType )
|
||||
,m_xServiceFactory( _cloneSource.m_xServiceFactory )
|
||||
,m_xContext( _cloneSource.m_xContext )
|
||||
{
|
||||
impl_createEventAttacher_nothrow();
|
||||
}
|
||||
@ -236,7 +236,7 @@ void OInterfaceContainer::impl_createEventAttacher_nothrow()
|
||||
{
|
||||
try
|
||||
{
|
||||
m_xEventAttacher.set( ::comphelper::createEventAttacherManager( comphelper::getComponentContext(m_xServiceFactory) ), UNO_SET_THROW );
|
||||
m_xEventAttacher.set( ::comphelper::createEventAttacherManager( m_xContext ), UNO_SET_THROW );
|
||||
}
|
||||
catch( const Exception& )
|
||||
{
|
||||
@ -510,9 +510,9 @@ void SAL_CALL OInterfaceContainer::write( const Reference< XObjectOutputStream >
|
||||
//------------------------------------------------------------------------------
|
||||
namespace
|
||||
{
|
||||
Reference< XPersistObject > lcl_createPlaceHolder( const Reference< XMultiServiceFactory >& _rxORB )
|
||||
Reference< XPersistObject > lcl_createPlaceHolder( const Reference< XComponentContext >& _rxORB )
|
||||
{
|
||||
Reference< XPersistObject > xObject( _rxORB->createInstance( FRM_COMPONENT_HIDDENCONTROL ), UNO_QUERY );
|
||||
Reference< XPersistObject > xObject( _rxORB->getServiceManager()->createInstanceWithContext(FRM_COMPONENT_HIDDENCONTROL, _rxORB), UNO_QUERY );
|
||||
DBG_ASSERT( xObject.is(), "lcl_createPlaceHolder: could not create a substitute for the unknown object!" );
|
||||
if ( xObject.is() )
|
||||
{
|
||||
@ -564,7 +564,7 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >&
|
||||
{
|
||||
// the object could not be read
|
||||
// create a object (so the readEvents below will assign the events to the right controls)
|
||||
xObj = lcl_createPlaceHolder( m_xServiceFactory );
|
||||
xObj = lcl_createPlaceHolder( m_xContext );
|
||||
if ( !xObj.is() )
|
||||
// couldn't handle it
|
||||
throw;
|
||||
@ -596,7 +596,7 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >&
|
||||
{
|
||||
OSL_FAIL( "OInterfaceContainerHelper::read: reading succeeded, but not inserting!" );
|
||||
// create a placeholder
|
||||
xElement = xElement.query( lcl_createPlaceHolder( m_xServiceFactory ) );
|
||||
xElement = xElement.query( lcl_createPlaceHolder( m_xContext ) );
|
||||
if ( !xElement.is() )
|
||||
// couldn't handle it
|
||||
throw;
|
||||
@ -612,7 +612,7 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >&
|
||||
{
|
||||
try
|
||||
{
|
||||
m_xEventAttacher = ::comphelper::createEventAttacherManager( comphelper::getComponentContext(m_xServiceFactory) );
|
||||
m_xEventAttacher = ::comphelper::createEventAttacherManager( m_xContext );
|
||||
OSL_ENSURE( m_xEventAttacher.is(), "OInterfaceContainer::read: could not create an event attacher manager!" );
|
||||
}
|
||||
catch( const Exception& )
|
||||
@ -1305,7 +1305,7 @@ Sequence<Type> SAL_CALL OFormComponents::getTypes() throw(RuntimeException)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
OFormComponents::OFormComponents(const Reference<XMultiServiceFactory>& _rxFactory)
|
||||
OFormComponents::OFormComponents(const Reference<XComponentContext>& _rxFactory)
|
||||
:FormComponentsBase( m_aMutex )
|
||||
,OInterfaceContainer( _rxFactory, m_aMutex, XFormComponent::static_type() )
|
||||
,OFormComponents_BASE()
|
||||
|
@ -60,7 +60,7 @@ namespace frm
|
||||
//====================================================================
|
||||
DBG_NAME( ORichTextModel )
|
||||
//--------------------------------------------------------------------
|
||||
ORichTextModel::ORichTextModel( const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
ORichTextModel::ORichTextModel( const Reference< XComponentContext >& _rxFactory )
|
||||
:OControlModel ( _rxFactory, OUString() )
|
||||
,FontControlModel ( true )
|
||||
,m_pEngine ( RichTextEngine::Create() )
|
||||
@ -93,7 +93,7 @@ namespace frm
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
ORichTextModel::ORichTextModel( const ORichTextModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
ORichTextModel::ORichTextModel( const ORichTextModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
|
||||
:OControlModel ( _pOriginal, _rxFactory, sal_False )
|
||||
,FontControlModel ( _pOriginal )
|
||||
,m_pEngine ( NULL )
|
||||
|
@ -55,6 +55,7 @@
|
||||
#include <comphelper/container.hxx>
|
||||
#include <comphelper/property.hxx>
|
||||
#include <comphelper/namedvaluecollection.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <cppuhelper/exc_hlp.hxx>
|
||||
#include <osl/mutex.hxx>
|
||||
#include <sal/macros.h>
|
||||
@ -123,9 +124,9 @@ namespace frm
|
||||
//= FormOperations
|
||||
//====================================================================
|
||||
//--------------------------------------------------------------------
|
||||
FormOperations::FormOperations( const Reference< XMultiServiceFactory >& _rxContext )
|
||||
FormOperations::FormOperations( const Reference< XComponentContext >& _rxContext )
|
||||
:FormOperations_Base( m_aMutex )
|
||||
,m_aContext( _rxContext )
|
||||
,m_xContext( _rxContext )
|
||||
,m_bInitializedParser( false )
|
||||
,m_bActiveControlModified( false )
|
||||
,m_bConstructed( false )
|
||||
@ -157,7 +158,7 @@ namespace frm
|
||||
//--------------------------------------------------------------------
|
||||
Reference< XInterface > SAL_CALL FormOperations::Create(const Reference< XMultiServiceFactory >& _rxFactory )
|
||||
{
|
||||
return *new FormOperations( _rxFactory );
|
||||
return *new FormOperations( comphelper::getComponentContext(_rxFactory) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
@ -1710,12 +1711,12 @@ namespace frm
|
||||
Reference< XExecutableDialog> xDialog;
|
||||
if ( _bFilter )
|
||||
{
|
||||
xDialog = com::sun::star::sdb::FilterDialog::createWithQuery(m_aContext.getUNOContext(), m_xParser, m_xCursor,
|
||||
xDialog = com::sun::star::sdb::FilterDialog::createWithQuery(m_xContext, m_xParser, m_xCursor,
|
||||
Reference<com::sun::star::awt::XWindow>());
|
||||
}
|
||||
else
|
||||
{
|
||||
xDialog = com::sun::star::sdb::OrderDialog::createWithQuery(m_aContext.getUNOContext(), m_xParser, m_xCursorProperties);
|
||||
xDialog = com::sun::star::sdb::OrderDialog::createWithQuery(m_xContext, m_xParser, m_xCursorProperties);
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,8 +30,7 @@
|
||||
#include <com/sun/star/container/XIndexAccess.hpp>
|
||||
#include <com/sun/star/lang/XInitialization.hpp>
|
||||
#include <com/sun/star/sdb/SQLFilterOperator.hpp>
|
||||
|
||||
#include <comphelper/componentcontext.hxx>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
|
||||
#include <cppuhelper/basemutex.hxx>
|
||||
#include <cppuhelper/compbase6.hxx>
|
||||
@ -59,7 +58,7 @@ namespace frm
|
||||
class MethodGuard;
|
||||
|
||||
private:
|
||||
::comphelper::ComponentContext m_aContext;
|
||||
css::uno::Reference<css::uno::XComponentContext> m_xContext;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > m_xController;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xCursor;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > m_xUpdateCursor;
|
||||
@ -79,7 +78,7 @@ namespace frm
|
||||
#endif
|
||||
|
||||
public:
|
||||
FormOperations( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxContext );
|
||||
FormOperations( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext );
|
||||
|
||||
// XServiceInfo - static versions
|
||||
static OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
|
||||
|
@ -145,7 +145,7 @@ namespace frm
|
||||
}
|
||||
|
||||
// create the peer
|
||||
ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW), pParentWin, getModel() );
|
||||
ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( m_xContext, pParentWin, getModel() );
|
||||
DBG_ASSERT( pPeer, "ONavigationBarControl::createPeer: invalid peer returned!" );
|
||||
if ( pPeer )
|
||||
// by definition, the returned component is aquired once
|
||||
@ -236,7 +236,7 @@ namespace frm
|
||||
//==================================================================
|
||||
DBG_NAME( ONavigationBarPeer )
|
||||
//------------------------------------------------------------------
|
||||
ONavigationBarPeer* ONavigationBarPeer::Create( const Reference< XMultiServiceFactory >& _rxORB,
|
||||
ONavigationBarPeer* ONavigationBarPeer::Create( const Reference< XComponentContext >& _rxORB,
|
||||
Window* _pParentWindow, const Reference< XControlModel >& _rxModel )
|
||||
{
|
||||
DBG_TESTSOLARMUTEX();
|
||||
@ -251,7 +251,7 @@ namespace frm
|
||||
_pParentWindow,
|
||||
lcl_getWinBits_nothrow( _rxModel ),
|
||||
createDocumentCommandImageProvider( _rxORB, xContextDocument ),
|
||||
createDocumentCommandDescriptionProvider( comphelper::getComponentContext(_rxORB), xContextDocument )
|
||||
createDocumentCommandDescriptionProvider( _rxORB, xContextDocument )
|
||||
);
|
||||
|
||||
// some knittings
|
||||
@ -271,7 +271,7 @@ namespace frm
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
ONavigationBarPeer::ONavigationBarPeer( const Reference< XMultiServiceFactory >& _rxORB )
|
||||
ONavigationBarPeer::ONavigationBarPeer( const Reference< XComponentContext >& _rxORB )
|
||||
:OFormNavigationHelper( _rxORB )
|
||||
{
|
||||
DBG_CTOR( ONavigationBarPeer, NULL );
|
||||
|
@ -97,14 +97,14 @@ namespace frm
|
||||
a new ONavigationBarPeer instance, which has been aquired once!
|
||||
*/
|
||||
static ONavigationBarPeer* Create(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB,
|
||||
Window* _pParentWindow,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxModel
|
||||
);
|
||||
|
||||
protected:
|
||||
ONavigationBarPeer(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
|
||||
);
|
||||
~ONavigationBarPeer();
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
#ifndef CONNECTIVITY_FILTERMANAGER_HXX
|
||||
#define CONNECTIVITY_FILTERMANAGER_HXX
|
||||
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/beans/XPropertySet.hpp>
|
||||
#include <com/sun/star/sdb/XSQLQueryComposer.hpp>
|
||||
#include <com/sun/star/sdbc/XConnection.hpp>
|
||||
@ -70,18 +69,14 @@ namespace dbtools
|
||||
};
|
||||
|
||||
private:
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
|
||||
m_xORB;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
|
||||
m_xComponentAggregate;
|
||||
::std::vector< OUString > m_aFilterComponents;
|
||||
::std::vector< OUString > m_aFilterComponents;
|
||||
sal_Bool m_bApplyPublicFilter;
|
||||
|
||||
public:
|
||||
/// ctor
|
||||
explicit FilterManager(
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
|
||||
);
|
||||
explicit FilterManager();
|
||||
|
||||
/// late ctor
|
||||
void initialize(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxComponentAggregate );
|
||||
|
Loading…
x
Reference in New Issue
Block a user