Commits

Anonymous committed 5438b9c Merge

sw34bf06: merge

Comments (0)

Files changed (4)

 	//besorgt.
     virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
 								  const SwRect *pFlyPrtRect = 0,
-								  const SwRect *pFlyFrmRect = 0 ) = 0;
+                                  const SwRect *pFlyFrmRect = 0,
+                                  const bool bNoTxtFrmPrtAreaChanged = false ) = 0;
 
 	//Objekte mit ActivateWhenVisible werden beim Paint Connected.
 	//gerufen von notxtfrm::Paint, impl in wrtsh

sw/source/core/layout/frmtool.cxx

 				 (pNd->GetOLEObj().IsOleRef() ||
 				  pNd->IsOLESizeInvalid()) )
 			{
+                // --> OD #i117189#
+                const bool bNoTxtFrmPrtAreaChanged = 
+                        ( aPrt.SSize().Width() != 0 && 
+                          aPrt.SSize().Height() != 0 ) &&
+                        aPrt.SSize() != pCnt->Prt().SSize();
+                // <--
 				ASSERT( pCnt->IsInFly(), "OLE not in FlyFrm" );
 				SwFlyFrm *pFly = pCnt->FindFlyFrm();
                 svt::EmbeddedObjectRef& xObj = pNd->GetOLEObj().GetObject();
                         // uiview/view.cxx.
                         if ( !pNd->IsOLESizeInvalid() &&
                              !pSh->GetDoc()->IsUpdateExpFld() )
-							pFESh->CalcAndSetScale( xObj, &pFly->Prt(), &pFly->Frm());
+                            pFESh->CalcAndSetScale( xObj, 
+                                                    &pFly->Prt(), &pFly->Frm(),
+                                                    bNoTxtFrmPrtAreaChanged );
 					}
 					pTmp = (ViewShell*)pTmp->GetNext();
 				} while ( pTmp != pSh );

sw/source/ui/inc/wrtsh.hxx

 	virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset );
     virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
 								  const SwRect *pFlyPrtRect = 0,
-								  const SwRect *pFlyFrmRect = 0 );
+                                  const SwRect *pFlyFrmRect = 0,
+                                  const bool bNoTxtFrmPrtAreaChanged = false );
     virtual void ConnectObj( svt::EmbeddedObjectRef&  xIPObj, const SwRect &rPrt,
 							 const SwRect &rFrm );
 

sw/source/ui/wrtsh/wrtsh1.cxx

 
 
 void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
-							 const SwRect *pFlyPrtRect,
-							 const SwRect *pFlyFrmRect )
+                                  const SwRect *pFlyPrtRect,
+                                  const SwRect *pFlyFrmRect,
+                                  const bool bNoTxtFrmPrtAreaChanged )
 {
 	//Einstellen der Skalierung am Client. Diese ergibt sich aus der Differenz
 	//zwischen der VisArea des Objektes und der ObjArea.
     SfxInPlaceClient* pCli = GetView().FindIPClient( xObj.GetObject(), &GetView().GetEditWin() );
     if ( !pCli )
     {
-        if ( (embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY & nMisc) || bLinkingChart
+        if ( (embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY & nMisc) 
+             || bLinkingChart
             // TODO/LATER: ResizeOnPrinterChange
              //|| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xObj->GetMiscStatus()
-             || nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE // non-resizable objects need to be
-                                                            // set the size back by this method
-             )
+             // --> OD #i117189# - refine condition for non-resizable objects                
+             // non-resizable objects need to be set the size back by this method
+             || ( bNoTxtFrmPrtAreaChanged && nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE ) )
         {
             pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
         }