incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r1172107 - in /incubator/ooo/trunk/main/sw: inc/fesh.hxx source/core/layout/frmtool.cxx source/ui/inc/wrtsh.hxx source/ui/wrtsh/wrtsh1.cxx
Date Sat, 17 Sep 2011 22:38:06 GMT
Author: mst
Date: Sat Sep 17 22:38:06 2011
New Revision: 1172107

URL: http://svn.apache.org/viewvc?rev=1172107&view=rev
Log:
sw34bf06: #i117189# - method <SwWrtShell::CalcAndSetScale(..)> - refine condition for
non-resizable objects to apply its size back via new parameter <bNoTxtFrmPrtAreaChanged>.
Otherwise non-resizable objects are always reloaded.

# HG changeset patch
# User Oliver-Rainer Wittmann <od@openoffice.org>
# Date 1301571927 -7200
# Node ID 9b8527da302b0f080fe88c245209ef93081429ed
# Parent  75d6ff8443f1f268780d970c67855d963c781566

Modified:
    incubator/ooo/trunk/main/sw/inc/fesh.hxx   (contents, props changed)
    incubator/ooo/trunk/main/sw/source/core/layout/frmtool.cxx   (contents, props changed)
    incubator/ooo/trunk/main/sw/source/ui/inc/wrtsh.hxx   (contents, props changed)
    incubator/ooo/trunk/main/sw/source/ui/wrtsh/wrtsh1.cxx   (contents, props changed)

Modified: incubator/ooo/trunk/main/sw/inc/fesh.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/inc/fesh.hxx?rev=1172107&r1=1172106&r2=1172107&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/inc/fesh.hxx (original)
+++ incubator/ooo/trunk/main/sw/inc/fesh.hxx Sat Sep 17 22:38:06 2011
@@ -420,7 +420,8 @@ public:
 	//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

Propchange: incubator/ooo/trunk/main/sw/inc/fesh.hxx
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/ooo/trunk/main/sw/source/core/layout/frmtool.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/core/layout/frmtool.cxx?rev=1172107&r1=1172106&r2=1172107&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/core/layout/frmtool.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/core/layout/frmtool.cxx Sat Sep 17 22:38:06 2011
@@ -889,6 +889,12 @@ SwCntntNotify::~SwCntntNotify()
 				 (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();
@@ -915,7 +921,9 @@ SwCntntNotify::~SwCntntNotify()
                         // 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 );

Propchange: incubator/ooo/trunk/main/sw/source/core/layout/frmtool.cxx
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/ooo/trunk/main/sw/source/ui/inc/wrtsh.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/ui/inc/wrtsh.hxx?rev=1172107&r1=1172106&r2=1172107&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/ui/inc/wrtsh.hxx (original)
+++ incubator/ooo/trunk/main/sw/source/ui/inc/wrtsh.hxx Sat Sep 17 22:38:06 2011
@@ -345,7 +345,8 @@ typedef sal_Bool (SwWrtShell:: *FNSimple
 	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 );
 

Propchange: incubator/ooo/trunk/main/sw/source/ui/inc/wrtsh.hxx
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/ooo/trunk/main/sw/source/ui/wrtsh/wrtsh1.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/ui/wrtsh/wrtsh1.cxx?rev=1172107&r1=1172106&r2=1172107&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/ui/wrtsh/wrtsh1.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/ui/wrtsh/wrtsh1.cxx Sat Sep 17 22:38:06 2011
@@ -701,8 +701,9 @@ void SwWrtShell::MoveObjectIfActive( svt
 
 
 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.
@@ -784,12 +785,13 @@ void SwWrtShell::CalcAndSetScale( svt::E
     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 );
         }

Propchange: incubator/ooo/trunk/main/sw/source/ui/wrtsh/wrtsh1.cxx
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message