diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-26 14:17:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-28 07:21:59 +0100 |
commit | 6436302f40252bc6619e304e2051115fee902e20 (patch) | |
tree | a32659b4fecc9fbf8fad3e379ddd8645a2a52e0b /vcl | |
parent | 35f16614ee7ddf518d4c01de6b1d800f5ff1ba7e (diff) |
convert some more long -> tools::Long
grepping for stuff in template params this time
Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/headless/svpbmp.cxx | 2 | ||||
-rw-r--r-- | vcl/headless/svpgdi.cxx | 2 | ||||
-rw-r--r-- | vcl/qa/cppunit/complextext.cxx | 9 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 6 | ||||
-rw-r--r-- | vcl/source/bitmap/BitmapFilterStackBlur.cxx | 10 | ||||
-rw-r--r-- | vcl/source/bitmap/BitmapScaleSuperFilter.cxx | 6 | ||||
-rw-r--r-- | vcl/source/bitmap/bitmappaint.cxx | 40 | ||||
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/edit/texteng.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/bmpfast.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/salmisc.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/map.cxx | 2 | ||||
-rw-r--r-- | vcl/source/treelist/treelistbox.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/layout.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salbmp.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 4 | ||||
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 2 | ||||
-rw-r--r-- | vcl/win/gdi/salprn.cxx | 2 | ||||
-rw-r--r-- | vcl/win/window/salobj.cxx | 4 |
20 files changed, 62 insertions, 61 deletions
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx index b5748e560d2c..7dfa5a89eb41 100644 --- a/vcl/headless/svpbmp.cxx +++ b/vcl/headless/svpbmp.cxx @@ -102,7 +102,7 @@ static std::unique_ptr<BitmapBuffer> ImplCreateDIB( pDIB->mnWidth = rSize.Width(); pDIB->mnHeight = rSize.Height(); tools::Long nScanlineBase; - bool bFail = o3tl::checked_multiply<long>(pDIB->mnWidth, nBitCount, nScanlineBase); + bool bFail = o3tl::checked_multiply<tools::Long>(pDIB->mnWidth, nBitCount, nScanlineBase); if (bFail) { SAL_WARN("vcl.gdi", "checked multiply failed"); diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 7116cf70f7b2..d878527562c2 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -186,7 +186,7 @@ namespace pDst->maPalette = pSrc->maPalette; tools::Long nScanlineBase; - const bool bFail = o3tl::checked_multiply<long>(pDst->mnBitCount, nWidth, nScanlineBase); + const bool bFail = o3tl::checked_multiply<tools::Long>(pDst->mnBitCount, nWidth, nScanlineBase); if (bFail) { SAL_WARN("vcl.gdi", "checked multiply failed"); diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx index 887f8d187fb1..bfe3b98523b9 100644 --- a/vcl/qa/cppunit/complextext.cxx +++ b/vcl/qa/cppunit/complextext.cxx @@ -11,10 +11,11 @@ #include <ostream> #include <vector> +#include <tools/long.hxx> #if HAVE_MORE_FONTS // must be declared before inclusion of test/bootstrapfixture.hxx -static std::ostream& operator<<(std::ostream& rStream, const std::vector<long>& rVec); +static std::ostream& operator<<(std::ostream& rStream, const std::vector<tools::Long>& rVec); #endif #include <test/bootstrapfixture.hxx> @@ -25,7 +26,7 @@ static std::ostream& operator<<(std::ostream& rStream, const std::vector<long>& #include <salgdi.hxx> #if HAVE_MORE_FONTS -static std::ostream& operator<<(std::ostream& rStream, const std::vector<long>& rVec) +static std::ostream& operator<<(std::ostream& rStream, const std::vector<tools::Long>& rVec) { rStream << "{ "; for (size_t i = 0; i < rVec.size() - 1; i++) @@ -75,9 +76,9 @@ void VclComplexTextTest::testArabic() pOutDev->SetFont( aFont ); // absolute character widths AKA text array. - std::vector<long> aRefCharWidths {6, 9, 16, 16, 22, 22, 26, 29, 32, 32, + std::vector<tools::Long> aRefCharWidths {6, 9, 16, 16, 22, 22, 26, 29, 32, 32, 36, 40, 49, 53, 56, 63, 63, 66, 72, 72}; - std::vector<long> aCharWidths(aOneTwoThree.getLength(), 0); + std::vector<tools::Long> aCharWidths(aOneTwoThree.getLength(), 0); tools::Long nTextWidth = pOutDev->GetTextArray(aOneTwoThree, aCharWidths.data()); CPPUNIT_ASSERT_EQUAL(aRefCharWidths, aCharWidths); diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 303907501e96..61a1e52211c3 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3681,7 +3681,7 @@ public: virtual void columns_autosize() override { - std::vector<long> aWidths; + std::vector<tools::Long> aWidths; m_xTreeView->getPreferredDimensions(aWidths); if (aWidths.size() > 2) { @@ -3708,7 +3708,7 @@ public: virtual void set_column_fixed_widths(const std::vector<int>& rWidths) override { - std::vector<long> aTabPositions; + std::vector<tools::Long> aTabPositions; aTabPositions.push_back(0); for (size_t i = 0; i < rWidths.size(); ++i) aTabPositions.push_back(aTabPositions[i] + rWidths[i]); @@ -5036,7 +5036,7 @@ IMPL_LINK_NOARG(SalInstanceTreeView, DoubleClickHdl, SvTreeListBox*, bool) IMPL_LINK(SalInstanceTreeView, EndDragHdl, HeaderBar*, pHeaderBar, void) { - std::vector<long> aTabPositions; + std::vector<tools::Long> aTabPositions; aTabPositions.push_back(0); for (int i = 0; i < pHeaderBar->GetItemCount() - 1; ++i) aTabPositions.push_back(aTabPositions[i] diff --git a/vcl/source/bitmap/BitmapFilterStackBlur.cxx b/vcl/source/bitmap/BitmapFilterStackBlur.cxx index 66645077eb0f..9bf4b810ac60 100644 --- a/vcl/source/bitmap/BitmapFilterStackBlur.cxx +++ b/vcl/source/bitmap/BitmapFilterStackBlur.cxx @@ -74,12 +74,12 @@ struct BlurArrays BlurSharedData maShared; std::vector<sal_uInt8> maStackBuffer; - std::vector<long> maPositionTable; - std::vector<long> maWeightTable; + std::vector<tools::Long> maPositionTable; + std::vector<tools::Long> maWeightTable; - std::vector<long> mnSumVector; - std::vector<long> mnInSumVector; - std::vector<long> mnOutSumVector; + std::vector<tools::Long> mnSumVector; + std::vector<tools::Long> mnInSumVector; + std::vector<tools::Long> mnOutSumVector; BlurArrays(BlurSharedData const& rShared) : maShared(rShared) diff --git a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx index 3d5fe51d1c5d..95c86f038dd9 100644 --- a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx +++ b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx @@ -53,8 +53,8 @@ struct ScaleContext tools::Long mnDestW; bool mbHMirr; bool mbVMirr; - std::vector<long> maMapIX; - std::vector<long> maMapIY; + std::vector<tools::Long> maMapIX; + std::vector<tools::Long> maMapIY; std::vector<BilinearWeightType> maMapFX; std::vector<BilinearWeightType> maMapFY; @@ -78,7 +78,7 @@ struct ScaleContext } static void generateMap(tools::Long nSourceLength, tools::Long nDestinationLength, bool bMirrored, - std::vector<long> & rMapIX, std::vector<BilinearWeightType> & rMapFX) + std::vector<tools::Long> & rMapIX, std::vector<BilinearWeightType> & rMapFX) { const double fRevScale = (nDestinationLength > 1) ? double(nSourceLength - 1) / (nDestinationLength - 1) : 0.0; diff --git a/vcl/source/bitmap/bitmappaint.cxx b/vcl/source/bitmap/bitmappaint.cxx index f9dff4ee0b26..f1c849bd5787 100644 --- a/vcl/source/bitmap/bitmappaint.cxx +++ b/vcl/source/bitmap/bitmappaint.cxx @@ -538,12 +538,12 @@ Bitmap Bitmap::CreateMask(const Color& rTransColor, sal_uInt8 nTol) const { BitmapColor aCol; tools::Long nR, nG, nB; - const tools::Long nMinR = MinMax<long>(rTransColor.GetRed() - nTol, 0, 255); - const tools::Long nMaxR = MinMax<long>(rTransColor.GetRed() + nTol, 0, 255); - const tools::Long nMinG = MinMax<long>(rTransColor.GetGreen() - nTol, 0, 255); - const tools::Long nMaxG = MinMax<long>(rTransColor.GetGreen() + nTol, 0, 255); - const tools::Long nMinB = MinMax<long>(rTransColor.GetBlue() - nTol, 0, 255); - const tools::Long nMaxB = MinMax<long>(rTransColor.GetBlue() + nTol, 0, 255); + const tools::Long nMinR = MinMax<tools::Long>(rTransColor.GetRed() - nTol, 0, 255); + const tools::Long nMaxR = MinMax<tools::Long>(rTransColor.GetRed() + nTol, 0, 255); + const tools::Long nMinG = MinMax<tools::Long>(rTransColor.GetGreen() - nTol, 0, 255); + const tools::Long nMaxG = MinMax<tools::Long>(rTransColor.GetGreen() + nTol, 0, 255); + const tools::Long nMinB = MinMax<tools::Long>(rTransColor.GetBlue() - nTol, 0, 255); + const tools::Long nMaxB = MinMax<tools::Long>(rTransColor.GetBlue() + nTol, 0, 255); if (pReadAcc->HasPalette()) { @@ -632,13 +632,13 @@ vcl::Region Bitmap::CreateRegion(const Color& rColor, const tools::Rectangle& rR const tools::Long nBottom = aRect.Bottom(); const BitmapColor aMatch(pReadAcc->GetBestMatchingColor(rColor)); - std::vector<long> aLine; + std::vector<tools::Long> aLine; tools::Long nYStart(nTop); tools::Long nY(nTop); for (; nY <= nBottom; nY++) { - std::vector<long> aNewLine; + std::vector<tools::Long> aNewLine; tools::Long nX(nLeft); Scanline pScanlineRead = pReadAcc->GetScanline(nY); @@ -863,12 +863,12 @@ bool Bitmap::Replace(const Color& rSearchColor, const Color& rReplaceColor, sal_ if (pAcc) { - const tools::Long nMinR = MinMax<long>(rSearchColor.GetRed() - nTol, 0, 255); - const tools::Long nMaxR = MinMax<long>(rSearchColor.GetRed() + nTol, 0, 255); - const tools::Long nMinG = MinMax<long>(rSearchColor.GetGreen() - nTol, 0, 255); - const tools::Long nMaxG = MinMax<long>(rSearchColor.GetGreen() + nTol, 0, 255); - const tools::Long nMinB = MinMax<long>(rSearchColor.GetBlue() - nTol, 0, 255); - const tools::Long nMaxB = MinMax<long>(rSearchColor.GetBlue() + nTol, 0, 255); + const tools::Long nMinR = MinMax<tools::Long>(rSearchColor.GetRed() - nTol, 0, 255); + const tools::Long nMaxR = MinMax<tools::Long>(rSearchColor.GetRed() + nTol, 0, 255); + const tools::Long nMinG = MinMax<tools::Long>(rSearchColor.GetGreen() - nTol, 0, 255); + const tools::Long nMaxG = MinMax<tools::Long>(rSearchColor.GetGreen() + nTol, 0, 255); + const tools::Long nMinB = MinMax<tools::Long>(rSearchColor.GetBlue() - nTol, 0, 255); + const tools::Long nMaxB = MinMax<tools::Long>(rSearchColor.GetBlue() + nTol, 0, 255); if (pAcc->HasPalette()) { @@ -940,12 +940,12 @@ bool Bitmap::Replace(const Color* pSearchColors, const Color* pReplaceColors, sa const Color& rCol = pSearchColors[i]; const sal_uInt8 nTol = pTols[i]; - pMinR[i] = MinMax<long>(rCol.GetRed() - nTol, 0, 255); - pMaxR[i] = MinMax<long>(rCol.GetRed() + nTol, 0, 255); - pMinG[i] = MinMax<long>(rCol.GetGreen() - nTol, 0, 255); - pMaxG[i] = MinMax<long>(rCol.GetGreen() + nTol, 0, 255); - pMinB[i] = MinMax<long>(rCol.GetBlue() - nTol, 0, 255); - pMaxB[i] = MinMax<long>(rCol.GetBlue() + nTol, 0, 255); + pMinR[i] = MinMax<tools::Long>(rCol.GetRed() - nTol, 0, 255); + pMaxR[i] = MinMax<tools::Long>(rCol.GetRed() + nTol, 0, 255); + pMinG[i] = MinMax<tools::Long>(rCol.GetGreen() - nTol, 0, 255); + pMaxG[i] = MinMax<tools::Long>(rCol.GetGreen() + nTol, 0, 255); + pMinB[i] = MinMax<tools::Long>(rCol.GetBlue() - nTol, 0, 255); + pMaxB[i] = MinMax<tools::Long>(rCol.GetBlue() + nTol, 0, 255); } } else diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index f9ba50513178..2125e0780afa 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -296,7 +296,7 @@ tools::Long ImplEntryList::GetAddedHeight( sal_Int32 i_nEndIndex, sal_Int32 i_nB while( nIndex != LISTBOX_ENTRY_NOTFOUND && nIndex < nStop ) { tools::Long nPosHeight = GetEntryPtr( nIndex )->getHeightWithMargin(); - if (nHeight > ::std::numeric_limits<long>::max() - nPosHeight) + if (nHeight > ::std::numeric_limits<tools::Long>::max() - nPosHeight) { SAL_WARN( "vcl", "ImplEntryList::GetAddedHeight: truncated"); break; diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index e03a203ddb60..4455b6651d58 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -1519,7 +1519,7 @@ void TextEngine::FormatDoc() // otherwise remains Empty() for Paperwidth 0 (AutoPageSize) const tools::Long nWidth = mnMaxTextWidth ? mnMaxTextWidth - : std::numeric_limits<long>::max(); + : std::numeric_limits<tools::Long>::max(); const Range aInvRange( GetInvalidYOffsets( nPara ) ); maInvalidRect = tools::Rectangle( Point( 0, nY+aInvRange.Min() ), Size( nWidth, aInvRange.Len() ) ); @@ -2146,7 +2146,7 @@ bool TextEngine::CreateLines( sal_uInt32 nPara ) tools::Long nTmpWidth = mpDoc->GetLeftMargin(); // do not subtract margin; it is included in TmpWidth tools::Long nXWidth = std::max( - mnMaxTextWidth ? mnMaxTextWidth : std::numeric_limits<long>::max(), nTmpWidth); + mnMaxTextWidth ? mnMaxTextWidth : std::numeric_limits<tools::Long>::max(), nTmpWidth); // search for Portion that does not fit anymore into line TETextPortion* pPortion = nullptr; diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx index e28f4de0c60a..b39ca1fe6a34 100644 --- a/vcl/source/gdi/bmpfast.cxx +++ b/vcl/source/gdi/bmpfast.cxx @@ -525,7 +525,7 @@ bool ImplFastCopyScanline( tools::Long nY, BitmapBuffer& rDst, ConstScanline aSr // special handling of trivial cases if( nSrcFormat == nDstFormat ) { - memcpy( ImplGetScanline( rDst, nY ), aSrcScanline, std::min<long>(nSrcScanlineSize, rDst.mnScanlineSize)); + memcpy( ImplGetScanline( rDst, nY ), aSrcScanline, std::min<tools::Long>(nSrcScanlineSize, rDst.mnScanlineSize)); return true; } diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx index 434e94865aa3..1bb094291e86 100644 --- a/vcl/source/gdi/salmisc.cxx +++ b/vcl/source/gdi/salmisc.cxx @@ -308,7 +308,7 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert( pDstBuffer->mnWidth = rTwoRect.mnDestWidth; pDstBuffer->mnHeight = rTwoRect.mnDestHeight; tools::Long nScanlineBase; - bool bFail = o3tl::checked_multiply<long>(pDstBuffer->mnBitCount, pDstBuffer->mnWidth, nScanlineBase); + bool bFail = o3tl::checked_multiply<tools::Long>(pDstBuffer->mnBitCount, pDstBuffer->mnWidth, nScanlineBase); if (bFail) { SAL_WARN("vcl.gdi", "checked multiply failed"); diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 3a581c050a05..2a1b46ae0b72 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -363,7 +363,7 @@ static tools::Long ImplLogicToPixel( tools::Long n, tools::Long nDPI, tools::Lon #else (void) nThres; assert(nMapNum >= 0); - assert(nMapNum == 0 || std::abs(n) < std::numeric_limits<long>::max() / nMapNum / nDPI); //detect overflows + assert(nMapNum == 0 || std::abs(n) < std::numeric_limits<tools::Long>::max() / nMapNum / nDPI); //detect overflows #endif { sal_Int64 n64 = n; diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index 7240215049b9..bbafb2a4ba95 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -3033,7 +3033,7 @@ SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, tools::Long nX return pItemClicked; } -tools::Long SvTreeListBox::getPreferredDimensions(std::vector<long> &rWidths) const +tools::Long SvTreeListBox::getPreferredDimensions(std::vector<tools::Long> &rWidths) const { tools::Long nHeight = 0; rWidths.clear(); @@ -3064,7 +3064,7 @@ tools::Long SvTreeListBox::getPreferredDimensions(std::vector<long> &rWidths) co Size SvTreeListBox::GetOptimalSize() const { - std::vector<long> aWidths; + std::vector<tools::Long> aWidths; Size aRet(0, getPreferredDimensions(aWidths)); for (tools::Long aWidth : aWidths) aRet.AdjustWidth(aWidth ); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index ed6e18a8cba1..5618af225d4c 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -706,8 +706,8 @@ Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize) else h -= 100; - return Size(std::max<long>(w, 640 - 15), - std::max<long>(h, 480 - 50)); + return Size(std::max<tools::Long>(w, 640 - 15), + std::max<tools::Long>(h, 480 - 50)); #else // Don't bother with ancient magic numbers of unclear relevance on non-desktop apps anyway. It // seems that at least currently in the iOS app, this function is called just once per dialog, diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 4c98d7a88ad5..676fae9dbc4f 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -417,7 +417,7 @@ Size VclButtonBox::addReqGroups(const VclButtonBox::Requisition &rReq) const return aRet; } -static tools::Long getMaxNonOutlier(const std::vector<long> &rG, tools::Long nAvgDimension) +static tools::Long getMaxNonOutlier(const std::vector<tools::Long> &rG, tools::Long nAvgDimension) { tools::Long nMaxDimensionNonOutlier = 0; for (auto const& nPrimaryChildDimension : rG) @@ -431,11 +431,11 @@ static tools::Long getMaxNonOutlier(const std::vector<long> &rG, tools::Long nAv return nMaxDimensionNonOutlier; } -static std::vector<long> setButtonSizes(const std::vector<long> &rG, +static std::vector<tools::Long> setButtonSizes(const std::vector<tools::Long> &rG, const std::vector<bool> &rNonHomogeneous, tools::Long nAvgDimension, tools::Long nMaxNonOutlier, tools::Long nMinWidth) { - std::vector<long> aVec; + std::vector<tools::Long> aVec; //set everything < 1.5 times the average to the same width, leave the //outliers un-touched std::vector<bool>::const_iterator aJ = rNonHomogeneous.begin(); @@ -470,9 +470,9 @@ VclButtonBox::Requisition VclButtonBox::calculatePrimarySecondaryRequisitions() bool bIgnoreSecondaryPacking = (m_eLayoutStyle == VclButtonBoxStyle::Spread || m_eLayoutStyle == VclButtonBoxStyle::Center); - std::vector<long> aMainGroupSizes; + std::vector<tools::Long> aMainGroupSizes; std::vector<bool> aMainGroupNonHomogeneous; - std::vector<long> aSubGroupSizes; + std::vector<tools::Long> aSubGroupSizes; std::vector<bool> aSubGroupNonHomogeneous; for (const vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); pChild; pChild = pChild->GetWindow(GetWindowType::Next)) @@ -666,8 +666,8 @@ void VclButtonBox::setAllocation(const Size &rAllocation) Size aChildSize; setSecondaryDimension(aChildSize, getSecondaryDimension(rAllocation)); - std::vector<long>::const_iterator aPrimaryI = aReq.m_aMainGroupDimensions.begin(); - std::vector<long>::const_iterator aSecondaryI = aReq.m_aSubGroupDimensions.begin(); + std::vector<tools::Long>::const_iterator aPrimaryI = aReq.m_aMainGroupDimensions.begin(); + std::vector<tools::Long>::const_iterator aSecondaryI = aReq.m_aSubGroupDimensions.begin(); bool bIgnoreSecondaryPacking = (m_eLayoutStyle == VclButtonBoxStyle::Spread || m_eLayoutStyle == VclButtonBoxStyle::Center); for (vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); pChild; pChild = pChild->GetWindow(GetWindowType::Next)) { diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx index 9e76a48c08e2..ac3b704f870b 100644 --- a/vcl/unx/generic/gdi/salbmp.cxx +++ b/vcl/unx/generic/gdi/salbmp.cxx @@ -169,7 +169,7 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB( pDIB->mnWidth = rSize.Width(); pDIB->mnHeight = rSize.Height(); tools::Long nScanlineBase; - bool bFail = o3tl::checked_multiply<long>(pDIB->mnWidth, nBitCount, nScanlineBase); + bool bFail = o3tl::checked_multiply<tools::Long>(pDIB->mnWidth, nBitCount, nScanlineBase); if (bFail) { SAL_WARN("vcl.gdi", "checked multiply failed"); diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index 64096f805065..57b26ca65c98 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -239,7 +239,7 @@ namespace nMinWidth += margin.left + margin.right + border.left + border.right + padding.left + padding.right; nMinHeight += margin.top + margin.bottom + border.top + border.bottom + padding.top + padding.bottom; - rSize = Size(std::max<long>(rSize.Width(), nMinWidth), std::max<long>(rSize.Height(), nMinHeight)); + rSize = Size(std::max<tools::Long>(rSize.Width(), nMinWidth), std::max<tools::Long>(rSize.Height(), nMinHeight)); } } @@ -1935,7 +1935,7 @@ static tools::Rectangle GetWidgetSize(const tools::Rectangle& rControlRegion, Gt { GtkRequisition aReq; gtk_widget_get_preferred_size(widget, nullptr, &aReq); - tools::Long nHeight = std::max<long>(rControlRegion.GetHeight(), aReq.height); + tools::Long nHeight = std::max<tools::Long>(rControlRegion.GetHeight(), aReq.height); return tools::Rectangle(rControlRegion.TopLeft(), Size(rControlRegion.GetWidth(), nHeight)); } diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 7b4c0f042d9e..ac9316a8ca29 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -67,7 +67,7 @@ using namespace vcl; static FIXED FixedFromDouble( double d ) { - const long l = static_cast<long>( d * 65536. ); + const long l = static_cast<tools::Long>( d * 65536. ); return *reinterpret_cast<FIXED const *>(&l); } diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx index 9d205b1d9daf..ea48833d4c3c 100644 --- a/vcl/win/gdi/salprn.cxx +++ b/vcl/win/gdi/salprn.cxx @@ -328,7 +328,7 @@ static bool ImplTestSalJobSetup( WinSalInfoPrinter const * pPrinter, if ( (pSetupData->GetSystem() == JOBSETUP_SYSTEM_WINDOWS) && (pPrinter->maDriverName == pSetupData->GetDriver()) && (pSetupData->GetDriverDataLen() > sizeof( SalDriverData )) && - static_cast<long>(pSetupData->GetDriverDataLen() - pSetupDriverData->mnDriverOffset) == nSysJobSize && + static_cast<tools::Long>(pSetupData->GetDriverDataLen() - pSetupDriverData->mnDriverOffset) == nSysJobSize && pSetupDriverData->mnSysSignature == SAL_DRIVERDATA_SYSSIGN ) { if( pDevModeW && diff --git a/vcl/win/window/salobj.cxx b/vcl/win/window/salobj.cxx index 0cf2fa8ada37..de9a7e45fb90 100644 --- a/vcl/win/window/salobj.cxx +++ b/vcl/win/window/salobj.cxx @@ -431,8 +431,8 @@ static LRESULT CALLBACK SalSysObjChildWndProc( HWND hWnd, UINT nMsg, WPARAM wPar // transform coordinates POINT pt; - pt.x = static_cast<long>(LOWORD( lParam )); - pt.y = static_cast<long>(HIWORD( lParam )); + pt.x = static_cast<tools::Long>(LOWORD( lParam )); + pt.y = static_cast<tools::Long>(HIWORD( lParam )); MapWindowPoints( hWnd, hWndParent, &pt, 1 ); lParam = MAKELPARAM( static_cast<WORD>(pt.x), static_cast<WORD>(pt.y) ); |