diff options
author | obo <obo@openoffice.org> | 2010-06-22 09:56:28 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-06-22 09:56:28 +0200 |
commit | 6450c0c301a92f948ade6d616305a48cc1e16663 (patch) | |
tree | a2ca141078a4fd1e3901f6b80751958aaf12feda /svx/source | |
parent | f3153bf650c7204b8263422fba1eb972b30b78c9 (diff) | |
parent | 32a69fe0c6918c01a32c36b1281a359ea0214863 (diff) |
CWS-TOOLING: integrate CWS mba33issues01
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 88d9aba87673..483c247c064f 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -1714,8 +1714,8 @@ void SdrOle2Obj::ImpSetVisAreaSize() if ( pClient || bHasOwnClient ) { // TODO/LATER: IMHO we need to do similar things when object is UIActive or OutplaceActive?! (MBA) - if ( (nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) && - svt::EmbeddedObjectRef::TryRunningState( xObjRef.GetObject() ) + if ( ((nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) && + svt::EmbeddedObjectRef::TryRunningState( xObjRef.GetObject() )) || xObjRef->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE ) { @@ -1832,11 +1832,7 @@ void SdrOle2Obj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract // if the object needs recompose on resize // the client site should be created before the resize will take place // check whether there is no client site and create it if necessary - if ( !SfxInPlaceClient::GetClient( dynamic_cast<SfxObjectShell*>(pModel->GetPersist()), xObjRef.GetObject() ) - && !( mpImpl->pLightClient && xObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->pLightClient ) ) ) - { - AddOwnLightClient(); - } + AddOwnLightClient(); } } @@ -2197,26 +2193,32 @@ sal_Bool SdrOle2Obj::CalculateNewScaling( Fraction& aScaleWidth, Fraction& aScal sal_Bool SdrOle2Obj::AddOwnLightClient() { // The Own Light Client must be registered in object only using this method! - Connect(); - - if ( xObjRef.is() && mpImpl->pLightClient ) + if ( !SfxInPlaceClient::GetClient( dynamic_cast<SfxObjectShell*>(pModel->GetPersist()), xObjRef.GetObject() ) + && !( mpImpl->pLightClient && xObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->pLightClient ) ) ) { - Fraction aScaleWidth; - Fraction aScaleHeight; - Size aObjAreaSize; - if ( CalculateNewScaling( aScaleWidth, aScaleHeight, aObjAreaSize ) ) + Connect(); + + if ( xObjRef.is() && mpImpl->pLightClient ) { - mpImpl->pLightClient->SetSizeScale( aScaleWidth, aScaleHeight ); - try { - xObjRef->setClientSite( mpImpl->pLightClient ); - return sal_True; - } catch( uno::Exception& ) - {} + Fraction aScaleWidth; + Fraction aScaleHeight; + Size aObjAreaSize; + if ( CalculateNewScaling( aScaleWidth, aScaleHeight, aObjAreaSize ) ) + { + mpImpl->pLightClient->SetSizeScale( aScaleWidth, aScaleHeight ); + try { + xObjRef->setClientSite( mpImpl->pLightClient ); + return sal_True; + } catch( uno::Exception& ) + {} + } + } + return sal_False; } - return sal_False; + return sal_True; } ////////////////////////////////////////////////////////////////////////////// |