diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-29 14:16:17 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-29 14:16:17 +0100 |
commit | 129f67da173f62089ba43b00d4a7c1891d138ef5 (patch) | |
tree | 20aacc0077bbb4f9be9a0a6110361550eec033e9 /svx/source/sdr | |
parent | 36c6c955b8de37162aaf076f55c5af4d94bdd84e (diff) | |
parent | 853497c4a7d7a481235569ab59b511f63e1051fa (diff) |
CWS-TOOLING: integrate CWS dba32z_DEV300
Diffstat (limited to 'svx/source/sdr')
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 5f7bf41386e0..81d19df1e2fa 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -238,6 +238,8 @@ namespace sdr { namespace contact { getGraphics() const { return m_xControlView->getGraphics(); } inline void draw( const Point& _rTopLeft ) const { m_xControlView->draw( _rTopLeft.X(), _rTopLeft.Y() ); } + void invalidate() const; + public: inline const Reference< XControl >& getControl() const { return m_xControl; } }; @@ -298,6 +300,15 @@ namespace sdr { namespace contact { } //-------------------------------------------------------------------- + void ControlHolder::invalidate() const + { + Window* pWindow = VCLUnoHelper::GetWindow( m_xControl->getPeer() ); + OSL_ENSURE( pWindow, "ControlHolder::invalidate: no implementation access!" ); + if ( pWindow ) + pWindow->Invalidate(); + } + + //-------------------------------------------------------------------- ::basegfx::B2DVector ControlHolder::getZoom() const { // no check whether we're valid, this is the responsibility of the caller @@ -1666,6 +1677,8 @@ namespace sdr { namespace contact { double fRotate, fShearX; _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX ); #endif + const bool bHadControl = m_pVOCImpl->getExistentControl().is(); + // force control here to make it a VCL ChildWindow. Will be fetched // and used below by getExistentControl() m_pVOCImpl->ensureControl( &_rViewInformation.getObjectToViewTransformation() ); @@ -1676,6 +1689,9 @@ namespace sdr { namespace contact { Reference< XControlModel > xControlModel( rViewContactOfUnoControl.GetSdrUnoObj().GetUnoControlModel() ); const ControlHolder& rControl( m_pVOCImpl->getExistentControl() ); + if ( !bHadControl && rControl.is() && rControl.isVisible() ) + rControl.invalidate(); + // check if we already have an XControl. if ( !xControlModel.is() || !rControl.is() ) // use the default mechanism. This will create a ControlPrimitive2D without |