sw/source/core/layout/paintfrm.cxx | 58 +++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 24 deletions(-)
New commits: commit b66f1edef2a64803b8ebde913c26a3c0727e9186 Author: Michaël Lefèvre <lefevr...@yahoo.fr> Date: Sun Nov 16 11:38:35 2014 +0100 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 <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 98cb0a4..bd691d5 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;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits