summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmtools.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx
index da7f05fb5800..716d550b5679 100644
--- a/svx/source/form/fmtools.cxx
+++ b/svx/source/form/fmtools.cxx
@@ -177,8 +177,9 @@ sal_Int32 getElementPos(const Reference< ::com::sun::star::container::XIndexAcce
return nIndex;
+ Reference< XInterface > xNormalized( xElement, UNO_QUERY );
DBG_ASSERT( xElement.is(), "getElementPos: invalid element!" );
- if ( xElement.is() )
+ if ( xNormalized.is() )
{
// Feststellen an welcher Position sich das Kind befindet
nIndex = xCont->getCount();
@@ -189,7 +190,7 @@ sal_Int32 getElementPos(const Reference< ::com::sun::star::container::XIndexAcce
Reference< XInterface > xCurrent(xCont->getByIndex( nIndex ),UNO_QUERY);
DBG_ASSERT( xCurrent.get() == Reference< XInterface >( xCurrent, UNO_QUERY ).get(),
"getElementPos: container element not normalized!" );
- if ( xElement.get() == xCurrent.get() )
+ if ( xNormalized.get() == xCurrent.get() )
break;
}
catch(Exception&)