diff options
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/misc/InterfaceContainer.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index 1301c08c255d..e908d75472c1 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -149,12 +149,8 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIn break; rtl::OUString sCodeName; - { - Reference<XInterface> xThis = static_cast<XContainer*>(this); - sal_Int32 nPageIndex = xNameQuery->getPageIndexForObject(xThis); - if (nPageIndex >= 0) - sCodeName = xNameQuery->getCodeNameByIndex(nPageIndex); - } + Reference<XInterface> xThis = static_cast<XContainer*>(this); + sCodeName = xNameQuery->getCodeNameForObject(xThis, xElement); Reference< XPropertySet > xProps( xElement, UNO_QUERY_THROW ); ::rtl::OUString sServiceName; |