summaryrefslogtreecommitdiff
path: root/toolkit/source/helper/unowrapper.cxx
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2011-03-28 17:00:24 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2011-03-28 17:00:24 +0200
commitb2863c6cd0e9804e3435a8d07fc96ab7a5f0cb64 (patch)
treec6194901daf5f7ccfb8209dcaa105ed3c8ed5918 /toolkit/source/helper/unowrapper.cxx
parent2b03086e2e34909791b51f106b0d356a517ce137 (diff)
parent3c86157dcd78c3dfcef84a9aa5ed0cfb97ac7a11 (diff)
CWS-TOOLING: integrate CWS fwk167
Diffstat (limited to 'toolkit/source/helper/unowrapper.cxx')
-rw-r--r--toolkit/source/helper/unowrapper.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index 943723ea5910..9612e450ee81 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -179,11 +179,13 @@ void UnoWrapper::SetWindowInterface( Window* pWindow, ::com::sun::star::uno::Ref
DBG_ASSERT( pVCLXWindow, "SetComponentInterface - unsupported type" );
if ( pVCLXWindow )
{
- if( pWindow->GetWindowPeer() )
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer> xPeer = pWindow->GetWindowPeer();
+ if( xPeer.is() )
{
- int i = 0;
- i++;
- // DBG_ERROR( "UnoWrapper::SetWindowInterface: there already *is* a WindowInterface for this window!" );
+ bool bSameInstance( pVCLXWindow == dynamic_cast< VCLXWindow* >( xPeer.get() ));
+ DBG_ASSERT( bSameInstance, "UnoWrapper::SetWindowInterface: there already *is* a WindowInterface for this window!" );
+ if ( bSameInstance )
+ return;
}
pVCLXWindow->SetWindow( pWindow );
pWindow->SetWindowPeer( xIFace, pVCLXWindow );