diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-01-28 16:35:03 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2020-06-04 17:59:52 +0200 |
commit | fc47ce07c457f6fd252aa768582a902e99222e74 (patch) | |
tree | 9973403af157db00f178c13a6de772aae7a07662 | |
parent | 456e3ba435be284a527c3452f0b5eef71c48a09d (diff) |
sw: reformat bit of SwLinePortion::PrePaint()
Change-Id: Id088e3f73e6bda3c6b11d421a52c59c67446f8a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87706
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit ac443862c6b9599ae5776767c4a169c37e47477e)
-rw-r--r-- | sw/source/core/text/porlin.cxx | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx index ca4080becbac..864edd56115c 100644 --- a/sw/source/core/text/porlin.cxx +++ b/sw/source/core/text/porlin.cxx @@ -105,32 +105,31 @@ void SwLinePortion::PrePaint( const SwTextPaintInfo& rInf, 1800 : rInf.GetFont()->GetOrientation( rInf.GetTextFrame()->IsVertical() ); - switch ( nDir ) + if (nLastWidth > nHalfView) { - case 0 : - nPos = sal_uInt16( rInf.X() ); - if( nLastWidth > nHalfView ) + switch (nDir) + { + case 0: + nPos = sal_uInt16( rInf.X() ); nPos += nLastWidth - nHalfView; - aInf.X( nPos ); - break; - case 900 : - nPos = sal_uInt16( rInf.Y() ); - if( nLastWidth > nHalfView ) + aInf.X( nPos ); + break; + case 900: + nPos = sal_uInt16( rInf.Y() ); nPos -= nLastWidth + nHalfView; - aInf.Y( nPos ); - break; - case 1800 : - nPos = sal_uInt16( rInf.X() ); - if( nLastWidth > nHalfView ) + aInf.Y( nPos ); + break; + case 1800: + nPos = sal_uInt16( rInf.X() ); nPos -= nLastWidth + nHalfView; - aInf.X( nPos ); - break; - case 2700 : - nPos = sal_uInt16( rInf.Y() ); - if( nLastWidth > nHalfView ) + aInf.X( nPos ); + break; + case 2700: + nPos = sal_uInt16( rInf.Y() ); nPos += nLastWidth - nHalfView; - aInf.Y( nPos ); - break; + aInf.Y( nPos ); + break; + } } SwLinePortion *pThis = const_cast<SwLinePortion*>(this); |