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 /ucb | |
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 'ucb')
-rw-r--r-- | ucb/source/cacher/cachedcontentresultset.cxx | 5 | ||||
-rw-r--r-- | ucb/source/sorter/sortdynres.cxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.cxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-neon/NeonSession.cxx | 5 |
4 files changed, 12 insertions, 8 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index 90448ff45bd5..ae000b2e79fc 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -32,6 +32,7 @@ #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/queryinterface.hxx> #include <ucbhelper/macros.hxx> +#include <tools/long.hxx> #include <memory> using namespace com::sun::star::beans; @@ -365,8 +366,8 @@ class CCRS_PropertySetInfo : std::unique_ptr<Sequence< css::beans::Property >> m_pProperties; - long m_nFetchSizePropertyHandle; - long m_nFetchDirectionPropertyHandle; + tools::Long m_nFetchSizePropertyHandle; + tools::Long m_nFetchDirectionPropertyHandle; private: sal_Int32 diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx index 401a3ef0afe7..671c61cc9501 100644 --- a/ucb/source/sorter/sortdynres.cxx +++ b/ucb/source/sorter/sortdynres.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/ucb/WelcomeDynamicResultSetStruct.hpp> #include <com/sun/star/ucb/CachedDynamicResultSetStubFactory.hpp> #include <com/sun/star/ucb/XSourceInitialization.hpp> +#include <tools/long.hxx> using namespace com::sun::star::beans; using namespace com::sun::star::lang; @@ -281,7 +282,7 @@ void SortedDynamicResultSet::impl_notify( const ListEvent& Changes ) catch (const UnknownPropertyException&) {} catch (const WrappedTargetException&) {} - long nOldCount = pCurSet->GetCount(); + tools::Long nOldCount = pCurSet->GetCount(); bool bWasFinal = false; aRet >>= bWasFinal; @@ -335,7 +336,7 @@ void SortedDynamicResultSet::impl_notify( const ListEvent& Changes ) } case ListActionType::MOVED: { - long nOffset = 0; + tools::Long nOffset = 0; if ( aAction.ActionInfo >>= nOffset ) { pCurSet->Move( aAction.Position, diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index 7fc77e44e64c..cf12bdd8409f 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -47,6 +47,7 @@ #include <o3tl/runtimetooustring.hxx> #include <sal/log.hxx> #include <tools/urlobj.hxx> +#include <tools/long.hxx> #include <ucbhelper/cancelcommandexecution.hxx> #include <ucbhelper/content.hxx> #include <ucbhelper/contentidentifier.hxx> @@ -85,8 +86,8 @@ namespace // TODO FIXME maybe we should compile with BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG // to actually get nanosecond precision in boostTime? // use this way rather than total_nanos to avoid overflows with 32-bit long - const long ticks = boostTime.time_of_day().fractional_seconds(); - long nanoSeconds = ticks * ( 1000000000 / boost::posix_time::time_duration::ticks_per_second()); + const tools::Long ticks = boostTime.time_of_day().fractional_seconds(); + tools::Long nanoSeconds = ticks * ( 1000000000 / boost::posix_time::time_duration::ticks_per_second()); unoTime.NanoSeconds = nanoSeconds; diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx index b914f41cd903..4e9012a990dc 100644 --- a/ucb/source/ucp/webdav-neon/NeonSession.cxx +++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx @@ -34,6 +34,7 @@ #include <osl/diagnose.h> #include <osl/thread.h> #include <osl/time.h> +#include <tools/long.hxx> #include <ne_socket.h> #include <ne_auth.h> #include <ne_redirect.h> @@ -1568,7 +1569,7 @@ void NeonSession::LOCK( const OUString & inPath, } // Set the lock timeout - theLock->timeout = static_cast<long>(rLock.Timeout); + theLock->timeout = static_cast<tools::Long>(rLock.Timeout); // Set the lock owner OUString aValue; @@ -1628,7 +1629,7 @@ bool NeonSession::LOCK( NeonLock * pLock, // save the current requested timeout, because ne_lock_refresh uses // pLock->timeout as an out parameter. This prevents a feedback-loop, // where we would request a shorter timeout on each refresh. - long timeout = pLock->timeout; + tools::Long timeout = pLock->timeout; const int theRetVal = ne_lock_refresh(m_pHttpSession, pLock); if (theRetVal == NE_OK) { |