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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/control/templatelocalview.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index 1acd11556f43..76f6f331d266 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -71,7 +71,7 @@ bool ViewFilter_Application::operator () (const ThumbnailViewItem *pItem) return true; } -void TemplateLocalView::updateThumbnailDimensions(long itemMaxSize) +void TemplateLocalView::updateThumbnailDimensions(tools::Long itemMaxSize) { mnThumbnailWidth = itemMaxSize; mnThumbnailHeight = itemMaxSize; diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 4ac54a950afb..82a6670e3e4a 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -394,18 +394,18 @@ void ThumbnailView::CalculateItemPositions(bool bScrollBarUsed) mbHasVisibleItems = true; - long nFullSteps = (mnLines > mnVisLines) ? mnLines - mnVisLines + 1 : 1; + tools::Long nFullSteps = (mnLines > mnVisLines) ? mnLines - mnVisLines + 1 : 1; - long nItemHeightOffset = mnItemHeight + nVItemSpace; - long nHiddenLines = static_cast<long>((nFullSteps - 1) * nScrollRatio); + tools::Long nItemHeightOffset = mnItemHeight + nVItemSpace; + tools::Long nHiddenLines = static_cast<tools::Long>((nFullSteps - 1) * nScrollRatio); // calculate offsets - long nStartX = nHItemSpace; - long nStartY = nVItemSpace; + tools::Long nStartX = nHItemSpace; + tools::Long nStartY = nVItemSpace; // calculate and draw items - long x = nStartX; - long y = nStartY - ((nFullSteps - 1) * nScrollRatio - nHiddenLines) * nItemHeightOffset; + tools::Long x = nStartX; + tools::Long y = nStartY - ((nFullSteps - 1) * nScrollRatio - nHiddenLines) * nItemHeightOffset; // draw items // Unless we are scrolling (via scrollbar) we just use the precalculated @@ -483,8 +483,8 @@ void ThumbnailView::CalculateItemPositions(bool bScrollBarUsed) mxScrolledWindow->vadjustment_set_upper(mnLines * gnFineness); mxScrolledWindow->vadjustment_set_page_size(mnVisLines * gnFineness); if (!bScrollBarUsed) - mxScrolledWindow->vadjustment_set_value(static_cast<long>(mnFirstLine)*gnFineness); - long nPageSize = mnVisLines; + mxScrolledWindow->vadjustment_set_value(static_cast<tools::Long>(mnFirstLine)*gnFineness); + tools::Long nPageSize = mnVisLines; if ( nPageSize < 1 ) nPageSize = 1; mxScrolledWindow->vadjustment_set_page_increment(nPageSize*gnFineness); |