diff options
author | Michael Stahl <mst@apache.org> | 2011-09-17 21:38:06 +0000 |
---|---|---|
committer | Michael Stahl <mst@apache.org> | 2011-09-17 21:38:06 +0000 |
commit | 2e631440ad24c0582daee5d4ba644a472daa0e3b (patch) | |
tree | 6444a17d85a4826f03b4c75eebfdbdd14e848ecc /sw | |
parent | f95e28003ead4c9947798c8c195fffa4ffd79987 (diff) |
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
Diffstat (limited to 'sw')
-rwxr-xr-x[-rw-r--r--] | sw/inc/fesh.hxx | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | sw/source/core/layout/frmtool.cxx | 10 | ||||
-rwxr-xr-x[-rw-r--r--] | sw/source/ui/inc/wrtsh.hxx | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | sw/source/ui/wrtsh/wrtsh1.cxx | 14 |
4 files changed, 21 insertions, 9 deletions
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 0d659aee244d..c8af96504d75 100644..100755 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -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 diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index aa4f6e9921a6..c51bcc078220 100644..100755 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -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 ); diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx index 010c3792f258..22f798394b39 100644..100755 --- a/sw/source/ui/inc/wrtsh.hxx +++ b/sw/source/ui/inc/wrtsh.hxx @@ -345,7 +345,8 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)(); 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 ); diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 21abeadfa5b1..83ded08037a1 100644..100755 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -701,8 +701,9 @@ void SwWrtShell::MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& 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::EmbeddedObjectRef& xObj, 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 ); } |