diff options
author | Noel Grandin <noel@peralex.com> | 2013-06-24 11:04:14 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-06-24 11:05:04 +0200 |
commit | 44b2fb6164aeffcc0c5bfbf53dac12f7b53fb0d4 (patch) | |
tree | 18dd9ca443064db14591f3234c856da7f1228c66 /svx | |
parent | 34f50399f1bc896849a0e3fc3598ab1225d760c5 (diff) |
fix exception in DbGridColumn::impl_toggleScriptManager_nothrow
The messages would look like this:
warn:legacy.osl:28639:1:svx/source/fmcomp/gridcell.cxx:255: caught an exception!
I introduced this bug in commit 6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37
"Use the new type-checking Reference constructor to reduce code noise"
Change-Id: I922d46f7c7eefbc12892a2525b30dcb798619a8b
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/fmtools.cxx | 5 |
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&) |