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/gallery2 | |
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/gallery2')
-rw-r--r-- | svx/source/gallery2/galctrl.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/gallerybinaryengine.cxx | 5 | ||||
-rw-r--r-- | svx/source/gallery2/galobj.cxx | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 1cb99eb5ae37..78da9c640cf1 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -86,13 +86,13 @@ namespace if ( fGrfWH < fWinWH ) { - aNewSize.setWidth( static_cast<long>( aWinSize.Height() * fGrfWH ) ); + aNewSize.setWidth( static_cast<tools::Long>( aWinSize.Height() * fGrfWH ) ); aNewSize.setHeight( aWinSize.Height() ); } else { aNewSize.setWidth( aWinSize.Width() ); - aNewSize.setHeight( static_cast<long>( aWinSize.Width() / fGrfWH) ); + aNewSize.setHeight( static_cast<tools::Long>( aWinSize.Width() / fGrfWH) ); } const Point aNewPos( ( aWinSize.Width() - aNewSize.Width() ) >> 1, diff --git a/svx/source/gallery2/gallerybinaryengine.cxx b/svx/source/gallery2/gallerybinaryengine.cxx index ec68e830f79b..a4a18f0ebe6d 100644 --- a/svx/source/gallery2/gallerybinaryengine.cxx +++ b/svx/source/gallery2/gallerybinaryengine.cxx @@ -772,7 +772,7 @@ SvStream& GalleryBinaryEngine::writeGalleryTheme(SvStream& rOStm, const GalleryT rOStm.WriteUInt32(COMPAT_FORMAT('G', 'A', 'L', 'R')) .WriteUInt32(COMPAT_FORMAT('E', 'S', 'R', 'V')); - const long nReservePos = rOStm.Tell(); + const tools::Long nReservePos = rOStm.Tell(); std::unique_ptr<VersionCompat> pCompat(new VersionCompat(rOStm, StreamMode::WRITE, 2)); rOStm.WriteUInt32(rId).WriteBool(pThm->IsNameFromResource()); // From version 2 and up @@ -780,7 +780,8 @@ SvStream& GalleryBinaryEngine::writeGalleryTheme(SvStream& rOStm, const GalleryT pCompat.reset(); // Fill the rest of the buffer. - const long nRest = std::max(512L - (static_cast<long>(rOStm.Tell()) - nReservePos), 0L); + const tools::Long nRest + = std::max(512L - (static_cast<tools::Long>(rOStm.Tell()) - nReservePos), 0L); if (nRest) { diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index fea1384300e0..53bacec4709c 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -135,8 +135,8 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic ) else { const float fFactor = static_cast<float>(aBmpSize.Width()) / aBmpSize.Height(); - const Size aNewSize( std::max( static_cast<long>(fFactor < 1. ? S_THUMB * fFactor : S_THUMB), 8L ), - std::max( static_cast<long>(fFactor < 1. ? S_THUMB : S_THUMB / fFactor), 8L ) ); + const Size aNewSize( std::max( static_cast<tools::Long>(fFactor < 1. ? S_THUMB * fFactor : S_THUMB), 8L ), + std::max( static_cast<tools::Long>(fFactor < 1. ? S_THUMB : S_THUMB / fFactor), 8L ) ); if(aThumbBmp.Scale( static_cast<double>(aNewSize.Width()) / aBmpSize.Width(), static_cast<double>(aNewSize.Height()) / aBmpSize.Height(), |