diff options
author | Michaël Lefèvre <lefevre00@yahoo.fr> | 2014-11-16 11:38:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-18 10:31:40 +0000 |
commit | b66f1edef2a64803b8ebde913c26a3c0727e9186 (patch) | |
tree | 95ff7d3aba10cdbde07dddce2d283912e5b21fa0 /sw | |
parent | 29a91e4739496e1db5995fdece6a3ffa89e42774 (diff) |
Put properties in their own structure
The structure will be the entry point for static variables in latter patches
Change-Id: Iaa072591b1c900598c4f8ebf386e9b51342967dd
Reviewed-on: https://gerrit.libreoffice.org/12477
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 98cb0a4a5bf7..bd691d5f2e35 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -352,10 +352,9 @@ void SwCalcPixStatics( OutputDevice *pOut ) } /** - * To be able to save the statics so the paint is more or lees reentrant + * */ -class SwSavePaintStatics -{ +struct SwPaintProperties { bool bSFlyMetafile; SwViewShell *pSGlobalShell; OutputDevice *pSFlyMetafileOut; @@ -376,33 +375,43 @@ class SwSavePaintStatics Color aSGlobalRetoucheColor; double aSScaleX, aSScaleY; +}; + +/** + * To be able to save the statics so the paint is more or lees reentrant + */ +class SwSavePaintStatics : public SwPaintProperties +{ public: SwSavePaintStatics(); ~SwSavePaintStatics(); }; -SwSavePaintStatics::SwSavePaintStatics() : - bSFlyMetafile ( bFlyMetafile ), - pSGlobalShell ( pGlobalShell ), - pSFlyMetafileOut ( pFlyMetafileOut ), - pSRetoucheFly ( pRetoucheFly ), - pSRetoucheFly2 ( pRetoucheFly2 ), - pSFlyOnlyDraw ( pFlyOnlyDraw ), - pBLines ( g_pBorderLines ), - pSLines ( pLines ), - pSSubsLines ( pSubsLines ), - pSSpecSubsLines ( pSpecSubsLines ), - pSProgress ( pProgress ), - nSPixelSzW ( nPixelSzW ), - nSPixelSzH ( nPixelSzH ), - nSHalfPixelSzW ( nHalfPixelSzW ), - nSHalfPixelSzH ( nHalfPixelSzH ), - nSMinDistPixelW ( nMinDistPixelW ), - nSMinDistPixelH ( nMinDistPixelH ), - aSGlobalRetoucheColor( aGlobalRetoucheColor ), - aSScaleX ( aScaleX ), - aSScaleY ( aScaleY ) +SwSavePaintStatics::SwSavePaintStatics() { + // Saving globales + bSFlyMetafile = bFlyMetafile; + pSGlobalShell = pGlobalShell; + pSFlyMetafileOut = pFlyMetafileOut; + pSRetoucheFly = pRetoucheFly; + pSRetoucheFly2 = pRetoucheFly2; + pSFlyOnlyDraw = pFlyOnlyDraw; + pBLines = g_pBorderLines; + pSLines = pLines; + pSSubsLines = pSubsLines; + pSSpecSubsLines = pSpecSubsLines; + pSProgress = pProgress; + nSPixelSzW = nPixelSzW; + nSPixelSzH = nPixelSzH; + nSHalfPixelSzW = nHalfPixelSzW; + nSHalfPixelSzH = nHalfPixelSzH; + nSMinDistPixelW = nMinDistPixelW; + nSMinDistPixelH = nMinDistPixelH ; + aSGlobalRetoucheColor = aGlobalRetoucheColor; + aSScaleX = aScaleX; + aSScaleY = aScaleY; + + // Restoring globales to default bFlyMetafile = false; pFlyMetafileOut = 0; pRetoucheFly = 0; @@ -422,6 +431,7 @@ SwSavePaintStatics::SwSavePaintStatics() : SwSavePaintStatics::~SwSavePaintStatics() { + // Restoring globales to saved one pGlobalShell = pSGlobalShell; bFlyMetafile = bSFlyMetafile; pFlyMetafileOut = pSFlyMetafileOut; |