diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-12 09:52:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-26 07:35:36 +0100 |
commit | 4fbd63860500b2db76df4d5aedbe5e3aa31fac69 (patch) | |
tree | 5fa96dc262ba651e82244b0f9e508f79e88ea2df /svx/source/dialog/dlgctrl.cxx | |
parent | 62fa5bb8c1299469eacc21cb35ee670b65120713 (diff) |
switching long to a 64-bit type on 64-bit windows
(*) create a rewriting plugin to do most of the work, heavily
based on the fakebool plugin
(*) but there are still a number of "long"s in the codebase
that will need to be done by hand
(*) the plugin needs lots of handholding, due to needing to
add #include and update macros
Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/dialog/dlgctrl.cxx')
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 4a353d55033a..c15b3ebc7cb8 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -432,8 +432,8 @@ void SvxRectCtl::LoseFocus() Point SvxRectCtl::GetApproxLogPtFromPixPt( const Point& rPt ) const { Point aPt = rPt; - long x; - long y; + tools::Long x; + tools::Long y; Size aSize(GetOutputSizePixel()); @@ -579,15 +579,15 @@ css::uno::Reference< css::accessibility::XAccessible > SvxPixelCtl::CreateAccess return m_xAccess.get(); } -long SvxPixelCtl::PointToIndex(const Point &aPt) const +tools::Long SvxPixelCtl::PointToIndex(const Point &aPt) const { - long nX = aPt.X() * nLines / aRectSize.Width(); - long nY = aPt.Y() * nLines / aRectSize.Height(); + tools::Long nX = aPt.X() * nLines / aRectSize.Width(); + tools::Long nY = aPt.Y() * nLines / aRectSize.Height(); return nX + nY * nLines ; } -Point SvxPixelCtl::IndexToPoint(long nIndex) const +Point SvxPixelCtl::IndexToPoint(tools::Long nIndex) const { DBG_ASSERT(nIndex >= 0 && nIndex < nSquares ," Check Index"); @@ -601,12 +601,12 @@ Point SvxPixelCtl::IndexToPoint(long nIndex) const return aPtTl; } -long SvxPixelCtl::GetFocusPosIndex() const +tools::Long SvxPixelCtl::GetFocusPosIndex() const { return aFocusPosition.getX() + aFocusPosition.getY() * nLines ; } -long SvxPixelCtl::ShowPosition( const Point &rPt) +tools::Long SvxPixelCtl::ShowPosition( const Point &rPt) { sal_Int32 nX = rPt.X() * nLines / aRectSize.Width(); sal_Int32 nY = rPt.Y() * nLines / aRectSize.Height(); @@ -673,7 +673,7 @@ bool SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt ) GrabFocus(); } - long nIndex = ShowPosition(rMEvt.GetPosPixel()); + tools::Long nIndex = ShowPosition(rMEvt.GetPosPixel()); if(m_xAccess.is()) { @@ -751,8 +751,8 @@ void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectan //Calculate visual focus rectangle via focus position tools::Rectangle SvxPixelCtl::implCalFocusRect( const Point& aPosition ) { - long nLeft,nTop,nRight,nBottom; - long i,j; + tools::Long nLeft,nTop,nRight,nBottom; + tools::Long i,j; i = aPosition.Y(); j = aPosition.X(); nLeft = aRectSize.Width() * j / nLines + 1; @@ -820,7 +820,7 @@ bool SvxPixelCtl::KeyInput( const KeyEvent& rKEvt ) } if(m_xAccess.is()) { - long nIndex = GetFocusPosIndex(); + tools::Long nIndex = GetFocusPosIndex(); switch(nCode) { case KEY_LEFT: @@ -931,10 +931,10 @@ void SvxLineLB::Fill( const XDashListRef &pList ) // entries for dashed lines - long nCount = pList->Count(); + tools::Long nCount = pList->Count(); m_xControl->freeze(); - for( long i = 0; i < nCount; i++ ) + for( tools::Long i = 0; i < nCount; i++ ) { const XDashEntry* pEntry = pList->GetDash(i); const BitmapEx aBitmap = pList->GetUiBitmap( i ); @@ -1000,11 +1000,11 @@ void SvxLineEndLB::Fill( const XLineEndListRef &pList, bool bStart ) if( !pList.is() ) return; - long nCount = pList->Count(); + tools::Long nCount = pList->Count(); ScopedVclPtrInstance< VirtualDevice > pVD; m_xControl->freeze(); - for( long i = 0; i < nCount; i++ ) + for( tools::Long i = 0; i < nCount; i++ ) { const XLineEndEntry* pEntry = pList->GetLineEnd(i); const BitmapEx aBitmap = pList->GetUiBitmap( i ); |