diff options
author | Kurt Zenker <kz@openoffice.org> | 2007-05-10 09:09:18 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2007-05-10 09:09:18 +0000 |
commit | be378adda10fb75b0770c6206fc7e99fdbe4b5da (patch) | |
tree | 1ced1d5558591d937ca90841d9e02959130d06c2 | |
parent | da6fbccca43196e8a1492a9206cbd4bde3287cf5 (diff) |
INTEGRATION: CWS dba23a (1.6.36); FILE MERGED
2007/03/20 08:22:28 fs 1.6.36.2: RESYNC: (1.6-1.9); FILE MERGED
2007/03/07 11:08:18 fs 1.6.36.1: #i74895# UnoControlWindowContact::doPaintObject: let painting the control depend on its visibility, not on its design mode (they do not always correlate)
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 245a8e84a690..95fb6ac185c3 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -4,9 +4,9 @@ * * $RCSfile: viewobjectcontactofunocontrol.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: obo $ $Date: 2007-03-06 14:40:01 $ + * last change: $Author: kz $ $Date: 2007-05-10 10:09:18 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1816,11 +1816,16 @@ namespace sdr { namespace contact { } #endif - // don't paint if there's a "alive control" which paints itself - SdrPageView* pPageView = _rDisplayInfo.GetPageView(); - bool bIsDesignMode = pPageView ? pPageView->GetView().IsDesignMode() : true; + // don't paint if there's a "visible control" which paints itself + bool bVisibleControl = false; + try + { + Reference< XWindow2 > xControlWindow( m_pImpl->getExistentControl(), UNO_QUERY_THROW ); + bVisibleControl = xControlWindow->isVisible(); + } + catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); } - if ( bIsDesignMode ) + if ( !bVisibleControl ) { OSL_ENSURE( _rDisplayInfo.GetOutputDevice(), "UnoControlWindowContact::doPaintObject: invalid output device!" ); if ( !_rDisplayInfo.GetOutputDevice() ) |