summaryrefslogtreecommitdiff
path: root/forms/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2023-01-17 23:04:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-18 05:01:26 +0000
commit7195e2740eb1c71f5bbc4322b3535d56b39e2817 (patch)
treebcea64545cf711f721c680ab0310c6016617787f /forms/source
parent29f23c0e71437303982a094040373b509afc7010 (diff)
cleanup commit for Submission
The following commit missed some stuff: commit fc41f4d58c7c0e60025c1b43127ef1b3c87fa1ac Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Sat Jan 14 12:41:58 2023 +0200 XUnoTunnel->dynamic_cast in Submission Change-Id: Ic27a813e360ae39227cd68213d2899ab64f0dee5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145688 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms/source')
-rw-r--r--forms/source/xforms/model.cxx2
-rw-r--r--forms/source/xforms/model_helper.hxx6
-rw-r--r--forms/source/xforms/submission.cxx7
-rw-r--r--forms/source/xforms/submission.hxx3
4 files changed, 4 insertions, 14 deletions
diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx
index e347c9219ac6..0bab14a61cc8 100644
--- a/forms/source/xforms/model.cxx
+++ b/forms/source/xforms/model.cxx
@@ -427,7 +427,7 @@ void SAL_CALL Model::submitWithInteraction(
if( mxSubmissions->hasItem( sID ) )
{
Submission* pSubmission =
- comphelper::getFromUnoTunnel<Submission>( mxSubmissions->getItem( sID ) );
+ dynamic_cast<Submission*>( mxSubmissions->getItem( sID ).get() );
OSL_ENSURE( pSubmission != nullptr, "no submission?" );
OSL_ENSURE( pSubmission->getModelImpl() == this,
"wrong model" );
diff --git a/forms/source/xforms/model_helper.hxx b/forms/source/xforms/model_helper.hxx
index fbb563a1300b..0ec03591bc0a 100644
--- a/forms/source/xforms/model_helper.hxx
+++ b/forms/source/xforms/model_helper.hxx
@@ -84,20 +84,20 @@ public:
virtual bool isValid( const T& t ) const override
{
- return comphelper::getFromUnoTunnel<Submission>( t ) != nullptr;
+ return dynamic_cast<Submission*>( t.get() ) != nullptr;
}
protected:
virtual void _insert( const T& t ) override
{
- auto pSubmission = comphelper::getFromUnoTunnel<Submission>( t );
+ auto pSubmission = dynamic_cast<Submission*>( t.get() );
OSL_ENSURE( pSubmission != nullptr, "invalid item?" );
pSubmission->setModel( mpModel );
}
virtual void _remove( const T& t ) override
{
- auto pSubmission = comphelper::getFromUnoTunnel<Submission>( t );
+ auto pSubmission = dynamic_cast<Submission*>( t.get() );
OSL_ENSURE( pSubmission != nullptr, "invalid item?" );
pSubmission->setModel( nullptr );
}
diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx
index fde73057b4e4..9cb97988d97e 100644
--- a/forms/source/xforms/submission.cxx
+++ b/forms/source/xforms/submission.cxx
@@ -254,13 +254,6 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler )
return ( aResult == CSubmission::SUCCESS );
}
-Sequence<sal_Int8> Submission::getUnoTunnelId()
-{
- static const comphelper::UnoIdInit aImplementationId;
- return aImplementationId.getSeq();
-}
-
-
void Submission::liveCheck()
{
bool bValid = mxModel.is();
diff --git a/forms/source/xforms/submission.hxx b/forms/source/xforms/submission.hxx
index 8dbfb2b3f1aa..b8f7fb11d87e 100644
--- a/forms/source/xforms/submission.hxx
+++ b/forms/source/xforms/submission.hxx
@@ -152,9 +152,6 @@ public:
* @returns if submission was successful */
bool doSubmit( const css::uno::Reference< css::task::XInteractionHandler >& aHandler );
- // helpers for UNO tunnel
- static css::uno::Sequence<sal_Int8> getUnoTunnelId();
-
private:
/// check whether object is live, and throw suitable exception if not