summaryrefslogtreecommitdiff
path: root/forms/source/xforms/model.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-09-14 08:19:47 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-15 06:07:36 +0200
commit05bc93db2de56000f65764d7e394d03747cac23d (patch)
tree975de9ae83572aac8a5c3ea8db281e1017ee5be0 /forms/source/xforms/model.cxx
parent8cbb414ed737f9ffc76e1258e6671769bf63fc6c (diff)
Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1
The header got some changes: 1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace 2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace of uses of OImplementationId with it, including in XTypeProvider 3. Introduce convenience functions 'getSomething_cast' to cast between sal_Int64 and object pointers uniformly. 4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make it a bit shorter, and to reflect its function better. Templatize it to take also css::uno::Any for convenience. 5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it handle cases both with and without fallback to parent. 6. Adjust UNO3_GETIMPLEMENTATION_* macros TODO (in separate commits): - Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation - Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'forms/source/xforms/model.cxx')
-rw-r--r--forms/source/xforms/model.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx
index 6320ff732229..f3bad8a5f323 100644
--- a/forms/source/xforms/model.cxx
+++ b/forms/source/xforms/model.cxx
@@ -230,7 +230,7 @@ void Model::rebind()
sal_Int32 nCount = mxBindings->countItems();
for( sal_Int32 i = 0; i < nCount; i++ )
{
- Binding* pBind = comphelper::getUnoTunnelImplementation<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) );
+ Binding* pBind = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) );
OSL_ENSURE( pBind != nullptr, "binding?" );
pBind->update();
}
@@ -243,7 +243,7 @@ void Model::deferNotifications( bool bDefer )
sal_Int32 nCount = mxBindings->countItems();
for( sal_Int32 i = 0; i < nCount; i++ )
{
- Binding* pBind = comphelper::getUnoTunnelImplementation<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) );
+ Binding* pBind = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) );
OSL_ENSURE( pBind != nullptr, "binding?" );
pBind->deferNotifications( bDefer );
}
@@ -366,7 +366,7 @@ bool Model::isValid() const
sal_Int32 nCount = mxBindings->countItems();
for( sal_Int32 i = 0; bValid && i < nCount; i++ )
{
- Binding* pBind = comphelper::getUnoTunnelImplementation<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) );
+ Binding* pBind = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) );
OSL_ENSURE( pBind != nullptr, "binding?" );
bValid = pBind->isValid();
}
@@ -434,7 +434,7 @@ void SAL_CALL Model::submitWithInteraction(
if( mxSubmissions->hasItem( sID ) )
{
Submission* pSubmission =
- comphelper::getUnoTunnelImplementation<Submission>( mxSubmissions->getItem( sID ) );
+ comphelper::getFromUnoTunnel<Submission>( mxSubmissions->getItem( sID ) );
OSL_ENSURE( pSubmission != nullptr, "no submission?" );
OSL_ENSURE( pSubmission->getModel() == Reference<XModel>( this ),
"wrong model" );