diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-01-28 16:35:03 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-01-30 14:20:06 +0100 |
commit | ac443862c6b9599ae5776767c4a169c37e47477e (patch) | |
tree | a3292e9d379e45eddd72fc3905375e6d1f7fc66a | |
parent | 47f9cb2930e5aa530e97f7600d8ef021db11c493 (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>
-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 9c3355448fc7..0c7ff0252075 100644 --- a/sw/source/core/text/porlin.cxx +++ b/sw/source/core/text/porlin.cxx @@ -103,32 +103,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); |