[Libreoffice-commits] core.git: vcl/source

Chris Sherlock (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 31 09:24:29 UTC 2021


 vcl/source/outdev/outdevstate.cxx |   55 +++++++++++++++++---------------------
 1 file changed, 26 insertions(+), 29 deletions(-)

New commits:
commit f2f8445c9dca13cc343dbfb08a5ab236e25155eb
Author:     Chris Sherlock <chris.sherlock79 at gmail.com>
AuthorDate: Wed Aug 25 14:40:47 2021 +1000
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Aug 31 11:23:55 2021 +0200

    vcl: cleanup OutputDevice::Push()
    
    Change-Id: I705fdf35b96ab598c2ddb4e34d0a2b7d0bdd9ab4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121013
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index 108d57dff9e2..0568f2d3c577 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -19,8 +19,8 @@
 
 #include <sal/config.h>
 #include <sal/log.hxx>
-
 #include <tools/debug.hxx>
+
 #include <vcl/gdimtf.hxx>
 #include <vcl/metaact.hxx>
 #include <vcl/outdevstate.hxx>
@@ -31,11 +31,10 @@
 #include <drawmode.hxx>
 #include <salgdi.hxx>
 
-void OutputDevice::Push( PushFlags nFlags )
+void OutputDevice::Push(PushFlags nFlags)
 {
-
-    if ( mpMetaFile )
-        mpMetaFile->AddAction( new MetaPushAction( nFlags ) );
+    if (mpMetaFile)
+        mpMetaFile->AddAction(new MetaPushAction(nFlags));
 
     maOutDevStateStack.emplace_back();
     OutDevState& rState = maOutDevStateStack.back();
@@ -43,58 +42,56 @@ void OutputDevice::Push( PushFlags nFlags )
     rState.mnFlags = nFlags;
 
     if (nFlags & PushFlags::LINECOLOR && mbLineColor)
-    {
         rState.mpLineColor = maLineColor;
-    }
+
     if (nFlags & PushFlags::FILLCOLOR && mbFillColor)
-    {
         rState.mpFillColor = maFillColor;
-    }
-    if ( nFlags & PushFlags::FONT )
+
+    if (nFlags & PushFlags::FONT)
         rState.mpFont = maFont;
-    if ( nFlags & PushFlags::TEXTCOLOR )
+
+    if (nFlags & PushFlags::TEXTCOLOR)
         rState.mpTextColor = GetTextColor();
+
     if (nFlags & PushFlags::TEXTFILLCOLOR && IsTextFillColor())
-    {
         rState.mpTextFillColor = GetTextFillColor();
-    }
+
     if (nFlags & PushFlags::TEXTLINECOLOR && IsTextLineColor())
-    {
         rState.mpTextLineColor = GetTextLineColor();
-    }
+
     if (nFlags & PushFlags::OVERLINECOLOR && IsOverlineColor())
-    {
         rState.mpOverlineColor = GetOverlineColor();
-    }
-    if ( nFlags & PushFlags::TEXTALIGN )
+
+    if (nFlags & PushFlags::TEXTALIGN)
         rState.meTextAlign = GetTextAlign();
-    if( nFlags & PushFlags::TEXTLAYOUTMODE )
+
+    if (nFlags & PushFlags::TEXTLAYOUTMODE)
         rState.mnTextLayoutMode = GetLayoutMode();
-    if( nFlags & PushFlags::TEXTLANGUAGE )
+
+    if (nFlags & PushFlags::TEXTLANGUAGE)
         rState.meTextLanguage = GetDigitLanguage();
-    if ( nFlags & PushFlags::RASTEROP )
+
+    if (nFlags & PushFlags::RASTEROP)
         rState.meRasterOp = GetRasterOp();
-    if ( nFlags & PushFlags::MAPMODE )
+
+    if (nFlags & PushFlags::MAPMODE)
     {
         rState.mpMapMode = maMapMode;
         rState.mbMapActive = mbMap;
     }
+
     if (nFlags & PushFlags::CLIPREGION && mbClipRegion)
-    {
-        rState.mpClipRegion.reset( new vcl::Region( maRegion ) );
-    }
+        rState.mpClipRegion.reset(new vcl::Region(maRegion));
+
     if (nFlags & PushFlags::REFPOINT && mbRefPoint)
-    {
         rState.mpRefPoint = maRefPoint;
-    }
 
-    if( mpAlphaVDev )
+    if (mpAlphaVDev)
         mpAlphaVDev->Push();
 }
 
 void OutputDevice::Pop()
 {
-
     if( mpMetaFile )
         mpMetaFile->AddAction( new MetaPopAction() );
 


More information about the Libreoffice-commits mailing list