From 4fbd63860500b2db76df4d5aedbe5e3aa31fac69 Mon Sep 17 00:00:00 2001 From: Noel Date: Mon, 12 Oct 2020 09:52:12 +0200 Subject: 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 --- sfx2/source/control/templatelocalview.cxx | 2 +- sfx2/source/control/thumbnailview.cxx | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'sfx2') 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((nFullSteps - 1) * nScrollRatio); + tools::Long nItemHeightOffset = mnItemHeight + nVItemSpace; + tools::Long nHiddenLines = static_cast((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(mnFirstLine)*gnFineness); - long nPageSize = mnVisLines; + mxScrolledWindow->vadjustment_set_value(static_cast(mnFirstLine)*gnFineness); + tools::Long nPageSize = mnVisLines; if ( nPageSize < 1 ) nPageSize = 1; mxScrolledWindow->vadjustment_set_page_increment(nPageSize*gnFineness); -- cgit