summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2010-01-21 07:52:26 +0000
committerFrank Schönheit <fs@openoffice.org>2010-01-21 07:52:26 +0000
commit853497c4a7d7a481235569ab59b511f63e1051fa (patch)
tree808c473734e48772cfe70037889ff2ac8fe2213c
parent3d62f771bcf77aaabb236b90474828577f324256 (diff)
reverting the fix for #i108325#, which caused #i108423#. Adding another, less invasive workaround. Still not the final solution, which is covered by issue 108357
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx6
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx16
2 files changed, 16 insertions, 6 deletions
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 92420fb6da3a..bb7635913dce 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -373,12 +373,6 @@ namespace drawinglayer
aOrigin.X() + basegfx::fround(aTopLeftPixel.getX()),
aOrigin.Y() + basegfx::fround(aTopLeftPixel.getY()));
}
- else if( xControlWindow.is() )
- {
- Window* pWin = VCLUnoHelper::GetWindow( rXControl->getPeer() );
- if( pWin )
- pWin->Invalidate();
- }
// restore original graphics
xControlView->setGraphics(xOriginalGraphics);
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