diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-01-28 16:35:03 +0100 |
---|---|---|
committer | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2020-12-07 12:00:40 +0300 |
commit | baa0c7e69f4aa87b5c0efc11ceb1693ae38e9978 (patch) | |
tree | f372ab9b0918f77e08af1e1c5401a73fd7244fa1 /sw | |
parent | e480c5b28c37148581fcf69f9f9813da14c8790c (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)
Diffstat (limited to 'sw')
-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 e34ff7333d40..054e4750b2e7 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); |