diff options
author | Michaël Lefèvre <lefevre00@yahoo.fr> | 2014-11-16 14:18:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-18 10:40:29 +0000 |
commit | 250391009aec9930abcc57930ddd4b6f56f4df9c (patch) | |
tree | 6cb73f9306a7ef2bc99d3652932ec8405953ec72 /sw/source | |
parent | 39fe63b8b998894f4f7c3736188bdde1b4cc6c71 (diff) |
Move pFlyOnly into properties container
Change-Id: I64dcaba589f77cc5bd9241c6adb34dbe029ad9f1
Reviewed-on: https://gerrit.libreoffice.org/12481
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 4b35217a5fbc..29acc70dc33b 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -261,8 +261,6 @@ static SwSubsRects *pSpecSubsLines = 0; static SfxProgress *pProgress = 0; -static SwFlyFrm *pFlyOnlyDraw = 0; - //To optimize the expensive RetouchColor determination Color aGlobalRetoucheColor; @@ -295,8 +293,8 @@ struct SwPaintProperties { SwViewShell *pSGlobalShell; OutputDevice *pSFlyMetafileOut; SwFlyFrm *pSRetoucheFly, - *pSRetoucheFly2, - *pSFlyOnlyDraw; + *pSRetoucheFly2; + SwFlyFrm *pSFlyOnlyDraw = 0; BorderLines *pBLines; SwLineRects *pSLines; SwSubsRects *pSSubsLines; @@ -394,7 +392,7 @@ SwSavePaintStatics::SwSavePaintStatics() pSFlyMetafileOut = pFlyMetafileOut; pSRetoucheFly = pRetoucheFly; pSRetoucheFly2 = pRetoucheFly2; - pSFlyOnlyDraw = pFlyOnlyDraw; + pSFlyOnlyDraw = gProp.pSFlyOnlyDraw; pBLines = g_pBorderLines; pSLines = pLines; pSSubsLines = pSubsLines; @@ -434,7 +432,7 @@ SwSavePaintStatics::~SwSavePaintStatics() pFlyMetafileOut = pSFlyMetafileOut; pRetoucheFly = pSRetoucheFly; pRetoucheFly2 = pSRetoucheFly2; - pFlyOnlyDraw = pSFlyOnlyDraw; + gProp.pSFlyOnlyDraw = pSFlyOnlyDraw; g_pBorderLines = pBLines; pLines = pSLines; pSubsLines = pSSubsLines; @@ -3990,7 +3988,7 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) return true; //Attribute dependent, don't paint for printer or Preview - bool bPaint = pFlyOnlyDraw || + bool bPaint = gProp.pSFlyOnlyDraw || ((SwContact*)pUserCall)->GetFmt()->GetPrint().GetValue(); if ( !bPaint ) bPaint = pSh->GetWin() && !pSh->IsPreview(); @@ -4006,7 +4004,7 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) if ( pObj->ISA(SwVirtFlyDrawObj) ) { SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm(); - if ( pFlyOnlyDraw && pFlyOnlyDraw == pFly ) + if ( gProp.pSFlyOnlyDraw && gProp.pSFlyOnlyDraw == pFly ) return true; //Try to avoid displaying the intermediate stage, Flys which don't @@ -4057,7 +4055,7 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) if ( pAnch->IsInFly() ) bPaint = SwFlyFrm::IsPaint( pAnch->FindFlyFrm()->GetVirtDrawObj(), pSh ); - else if ( pFlyOnlyDraw ) + else if ( gProp.pSFlyOnlyDraw ) bPaint = false; } else @@ -7651,7 +7649,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap ) pFlyMetafileOut = pWin; SwViewImp *pImp = pSh->Imp(); - pFlyOnlyDraw = pFly; + gProp.pSFlyOnlyDraw = pFly; pLines = new SwLineRects; // OD 09.12.2002 #103045# - determine page, fly frame is on @@ -7674,7 +7672,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap ) &aSwRedirector ); pLines->PaintLines( &aDev ); DELETEZ( pLines ); - pFlyOnlyDraw = 0; + gProp.pSFlyOnlyDraw = 0; pFlyMetafileOut = 0; bFlyMetafile = false; |