summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign/ConnectionLine.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:25:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:25:56 +0100
commitd597bb77b271a0e9f2c3f4789517435f6b63f170 (patch)
treececc96dcd43d96a3a56b9ec28d55a2f844af0476 /dbaccess/source/ui/querydesign/ConnectionLine.cxx
parent029149e9b7aa8ad66dca2972e26385c831153c80 (diff)
More loplugin:cstylecast: dbaccess
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I96df8923f7791288bbd350d75582a9220006ece6
Diffstat (limited to 'dbaccess/source/ui/querydesign/ConnectionLine.cxx')
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLine.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
index 2809c4d761e1..9c276b804bec 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
@@ -91,10 +91,10 @@ namespace
if( nEntryPos >= 0 )
{
_rNewConPos.Y() += nEntryPos;
- _rNewConPos.Y() += (long)( 0.5 * nRowHeight );
+ _rNewConPos.Y() += static_cast<long>( 0.5 * nRowHeight );
}
else
- _rNewConPos.Y() -= (long)( 0.5 * nRowHeight );
+ _rNewConPos.Y() -= static_cast<long>( 0.5 * nRowHeight );
long nListBoxBottom = _pWin->GetPosPixel().Y()
+ pListBox->GetPosPixel().Y()
@@ -221,8 +221,8 @@ bool OConnectionLine::RecalcLine()
Point aSourceCenter( 0, 0 );
Point aDestCenter( 0, 0 );
- aSourceCenter.X() = pSourceWin->GetPosPixel().X() + (long)( 0.5*pSourceWin->GetSizePixel().Width() );
- aDestCenter.X() = pDestWin->GetPosPixel().X() + (long)( 0.5*pDestWin->GetSizePixel().Width() );
+ aSourceCenter.X() = pSourceWin->GetPosPixel().X() + static_cast<long>( 0.5*pSourceWin->GetSizePixel().Width() );
+ aDestCenter.X() = pDestWin->GetPosPixel().X() + static_cast<long>( 0.5*pDestWin->GetSizePixel().Width() );
const OTableWindow* pFirstWin = pDestWin;
const OTableWindow* pSecondWin = pSourceWin;
@@ -296,7 +296,7 @@ double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Point& q)
{
Point v(p2 - p1);
Point w(pM - p1);
- double a = sqrt((double)(v.X()*v.X() + v.Y()*v.Y()));
+ double a = sqrt(static_cast<double>(v.X()*v.X() + v.Y()*v.Y()));
double l = (v.X() * w.Y() - v.Y() * w.X()) / a;
double a2 = w.X()*v.X()+w.Y()*v.Y();
a = a2 / (a * a);