diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-19 10:46:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-19 13:52:32 +0200 |
commit | 73b115b1a399f57efd727eb71d7ef9e4a27afbc9 (patch) | |
tree | d92dd80efaec35fd7850f5073ba1586dfbd72b5c /svl | |
parent | 2471d6f44c7e8ecbe86a90eeb593b899a08a7408 (diff) |
use tools::Long in svl
Change-Id: Ic63d3c0ebd1e58d7bab5b0fd6313cabddc16eb98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104517
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/crypto/cryptosign.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/imageitm.cxx | 6 | ||||
-rw-r--r-- | svl/source/items/intitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/poolitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 11 | ||||
-rw-r--r-- | svl/source/undo/undo.cxx | 3 | ||||
-rw-r--r-- | svl/unx/source/svdde/ddedummy.cxx | 17 |
7 files changed, 23 insertions, 20 deletions
diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx index 202d2d1ac42f..64f0fe4b59e0 100644 --- a/svl/source/crypto/cryptosign.cxx +++ b/svl/source/crypto/cryptosign.cxx @@ -1099,7 +1099,7 @@ bool Signing::Sign(OStringBuffer& rCMSHexBuffer) return false; } - if ((rc = curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, static_cast<long>(timestamp_request->len))) != CURLE_OK || + if ((rc = curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, static_cast<tools::Long>(timestamp_request->len))) != CURLE_OK || (rc = curl_easy_setopt(curl, CURLOPT_POSTFIELDS, timestamp_request->data)) != CURLE_OK) { SAL_WARN("svl.crypto", "curl_easy_setopt(CURLOPT_POSTFIELDSIZE or CURLOPT_POSTFIELDS) failed: " << curl_easy_strerror(rc)); diff --git a/svl/source/items/imageitm.cxx b/svl/source/items/imageitm.cxx index 4959914b152d..0fa250fc043b 100644 --- a/svl/source/items/imageitm.cxx +++ b/svl/source/items/imageitm.cxx @@ -27,7 +27,7 @@ SfxPoolItem* SfxImageItem::CreateDefault() { return new SfxImageItem; } struct SfxImageItem_Impl { OUString aURL; - long nAngle; + tools::Long nAngle; bool bMirrored; bool operator == ( const SfxImageItem_Impl& rOther ) const { return nAngle == rOther.nAngle && bMirrored == rOther.bMirrored; } @@ -94,12 +94,12 @@ bool SfxImageItem::PutValue( const css::uno::Any& rVal, sal_uInt8 ) return false; } -void SfxImageItem::SetRotation( long nValue ) +void SfxImageItem::SetRotation( tools::Long nValue ) { pImpl->nAngle = nValue; } -long SfxImageItem::GetRotation() const +tools::Long SfxImageItem::GetRotation() const { return pImpl->nAngle; } diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx index c0c4831a5c3d..072de0501f40 100644 --- a/svl/source/items/intitem.cxx +++ b/svl/source/items/intitem.cxx @@ -165,7 +165,7 @@ SfxMetricItem::SfxMetricItem(sal_uInt16 which, sal_uInt32 nValue): } // virtual -void SfxMetricItem::ScaleMetrics(long nMult, long nDiv) +void SfxMetricItem::ScaleMetrics(tools::Long nMult, tools::Long nDiv) { BigInt aTheValue(GetValue()); aTheValue *= nMult; diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx index 25f2720b547c..0d6513f70483 100644 --- a/svl/source/items/poolitem.cxx +++ b/svl/source/items/poolitem.cxx @@ -620,7 +620,7 @@ bool SfxVoidItem::IsVoidItem() const return true; } -void SfxPoolItem::ScaleMetrics( long /*lMult*/, long /*lDiv*/ ) +void SfxPoolItem::ScaleMetrics( tools::Long /*lMult*/, tools::Long /*lDiv*/ ) { } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index ae9055852fdf..4974fe9d5ac4 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -23,6 +23,7 @@ #include <comphelper/string.hxx> #include <sal/log.hxx> #include <tools/debug.hxx> +#include <tools/long.hxx> #include <i18nlangtag/mslangid.hxx> #include <rtl/math.hxx> #include <unotools/charclass.hxx> @@ -95,17 +96,17 @@ sal_Int32 SvNumberformat::InsertBlanks( OUStringBuffer& r, sal_Int32 nPos, sal_U return nPos; } -static long GetPrecExp( double fAbsVal ) +static tools::Long GetPrecExp( double fAbsVal ) { DBG_ASSERT( fAbsVal > 0.0, "GetPrecExp: fAbsVal <= 0.0" ); if ( fAbsVal < 1e-7 || fAbsVal > 1e7 ) { // Shear: whether it's faster or not, falls in between 1e6 and 1e7 - return static_cast<long>(floor( log10( fAbsVal ) )) + 1; + return static_cast<tools::Long>(floor( log10( fAbsVal ) )) + 1; } else { - long nPrecExp = 1; + tools::Long nPrecExp = 1; while( fAbsVal < 1 ) { fAbsVal *= 10; @@ -4273,7 +4274,7 @@ bool SvNumberformat::ImpGetNumberOutput(double fNumber, { // Special formatting only if no GENERAL keyword in format code const sal_uInt16 nThousand = rInfo.nThousand; - long nPrecExp; + tools::Long nPrecExp; for (i = 0; i < nThousand; i++) { if (fNumber > D_MIN_M_BY_1000) @@ -4298,7 +4299,7 @@ bool SvNumberformat::ImpGetNumberOutput(double fNumber, if ((rInfo.nCntPost + nPrecExp) > 15 && nPrecExp < 15) { sStr = ::rtl::math::doubleToUString( fNumber, rtl_math_StringFormat_F, 15-nPrecExp, '.'); - for (long l = 15-nPrecExp; l < static_cast<long>(rInfo.nCntPost); l++) + for (tools::Long l = 15-nPrecExp; l < static_cast<tools::Long>(rInfo.nCntPost); l++) { sStr.append('0'); } diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index b678fba83948..2ce8fa84bf17 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -25,6 +25,7 @@ #include <sal/log.hxx> #include <comphelper/flagguard.hxx> #include <tools/diagnose_ex.h> +#include <tools/long.hxx> #include <libxml/xmlwriter.h> #include <boost/property_tree/json_parser.hpp> #include <unotools/datetime.hxx> @@ -388,7 +389,7 @@ void SfxUndoManager::SetMaxUndoActionCount( size_t nMaxUndoActionCount ) // Both redo and undo action entries will be removed until we reached the // new nMaxUndoActionCount. - long nNumToDelete = m_xData->pActUndoArray->maUndoActions.size() - nMaxUndoActionCount; + tools::Long nNumToDelete = m_xData->pActUndoArray->maUndoActions.size() - nMaxUndoActionCount; while ( nNumToDelete > 0 ) { size_t nPos = m_xData->pActUndoArray->maUndoActions.size(); diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx index 613bfe4ab471..fa5aef5faaef 100644 --- a/svl/unx/source/svdde/ddedummy.cxx +++ b/svl/unx/source/svdde/ddedummy.cxx @@ -19,6 +19,7 @@ #include <svl/svdde.hxx> #include <rtl/instance.hxx> +#include <tools/long.hxx> struct Conversation { @@ -44,7 +45,7 @@ DdeData::DdeData(DdeData&&) noexcept { } -DdeData::DdeData( const void*, long, SotClipboardFormatId) +DdeData::DdeData( const void*, tools::Long, SotClipboardFormatId) { } @@ -71,7 +72,7 @@ DdeData& DdeData::operator=(DdeData&&) noexcept return *this; } -long DdeData::getSize() const +tools::Long DdeData::getSize() const { return 0L; } @@ -83,7 +84,7 @@ void const * DdeData::getData() const struct DdeImp {}; -long DdeConnection::GetError() const +tools::Long DdeConnection::GetError() const { return 0L; } @@ -108,7 +109,7 @@ OUString DdeConnection::GetTopicName() const return OUString(); } -DdeTransaction::DdeTransaction( DdeConnection& rConnection, const OUString&, long ) +DdeTransaction::DdeTransaction( DdeConnection& rConnection, const OUString&, tools::Long ) : rDde(rConnection) , pName(nullptr) , nType(0) @@ -134,17 +135,17 @@ DdeTransaction::~DdeTransaction() { } -DdeRequest::DdeRequest( DdeConnection& rConnection, const OUString& rString, long lLong ) +DdeRequest::DdeRequest( DdeConnection& rConnection, const OUString& rString, tools::Long lLong ) : DdeTransaction( rConnection, rString, lLong ) { } -DdeExecute::DdeExecute( DdeConnection& rConnection, const OUString& rString, long lLong ) +DdeExecute::DdeExecute( DdeConnection& rConnection, const OUString& rString, tools::Long lLong ) : DdeTransaction( rConnection, rString, lLong ) { } -DdePoke::DdePoke( DdeConnection& rConnection, const OUString& rString, const DdeData&, long lLong ) +DdePoke::DdePoke( DdeConnection& rConnection, const OUString& rString, const DdeData&, tools::Long lLong ) : DdeTransaction( rConnection, rString, lLong ) { } @@ -308,7 +309,7 @@ void DdeGetPutItem::AdviseLoop( SAL_UNUSED_PARAMETER bool ) { } -DdeLink::DdeLink( DdeConnection& rConnection, const OUString& rString, long l ) +DdeLink::DdeLink( DdeConnection& rConnection, const OUString& rString, tools::Long l ) : DdeTransaction( rConnection, rString, l ) { } |