summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2021-08-25 14:40:47 +1000
committerTomaž Vajngerl <quikee@gmail.com>2021-08-31 11:23:55 +0200
commitf2f8445c9dca13cc343dbfb08a5ab236e25155eb (patch)
treecf448ba149885e26fcc629a425e0f2719badcc06
parent04117f78f235a60094f8d92ce983ebcc495ecc49 (diff)
vcl: cleanup OutputDevice::Push()
Change-Id: I705fdf35b96ab598c2ddb4e34d0a2b7d0bdd9ab4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121013 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r--vcl/source/outdev/outdevstate.cxx55
1 files changed, 26 insertions, 29 deletions
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() );