From 6436302f40252bc6619e304e2051115fee902e20 Mon Sep 17 00:00:00 2001 From: Noel Date: Mon, 26 Oct 2020 14:17:32 +0200 Subject: 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 --- basctl/source/basicide/baside2.cxx | 2 +- basic/source/sbx/sbxdec.cxx | 2 +- dbaccess/source/ui/app/AppIconControl.cxx | 2 +- desktop/qa/desktop_lib/test_desktop_lib.cxx | 4 +-- .../source/primitive2d/textlayoutdevice.cxx | 6 ++-- drawinglayer/source/processor2d/vclprocessor2d.cxx | 2 +- editeng/inc/editdoc.hxx | 2 +- editeng/source/editeng/impedit3.cxx | 2 +- editeng/source/misc/txtrange.cxx | 24 ++++++------- filter/source/graphicfilter/ieps/ieps.cxx | 4 +-- filter/source/svg/svgwriter.cxx | 2 +- include/editeng/txtrange.hxx | 4 +-- include/svx/xtable.hxx | 2 +- include/vcl/layout.hxx | 4 +-- include/vcl/toolkit/treelistbox.hxx | 2 +- oox/source/drawingml/fillproperties.cxx | 2 +- oox/source/export/drawingml.cxx | 2 +- reportdesign/source/ui/report/ReportWindow.cxx | 2 +- sc/inc/dpgroup.hxx | 2 +- sc/inc/dptabdat.hxx | 10 +++--- sc/inc/dptabres.hxx | 2 +- sc/inc/dptabsrc.hxx | 8 ++--- sc/source/core/data/dpgroup.cxx | 10 +++--- sc/source/core/data/dpobject.cxx | 2 +- sc/source/core/data/dptabdat.cxx | 2 +- sc/source/core/data/dptabsrc.cxx | 14 ++++---- sc/source/core/data/table2.cxx | 2 +- sc/source/core/data/table4.cxx | 2 +- sc/source/core/inc/interpre.hxx | 4 +-- sc/source/core/tool/interpr3.cxx | 6 ++-- sc/source/core/tool/interpr5.cxx | 2 +- sc/source/filter/excel/xepivotxml.cxx | 6 ++-- sc/source/ui/docshell/docsh8.cxx | 4 +-- sc/source/ui/inc/pfuncache.hxx | 4 +-- sc/source/ui/inc/preview.hxx | 6 ++-- sc/source/ui/view/output.cxx | 2 +- sc/source/ui/view/output2.cxx | 2 +- sc/source/ui/view/preview.cxx | 2 +- sc/source/ui/view/tabview.cxx | 6 ++-- sd/source/ui/view/drtxtob1.cxx | 10 +++--- sd/source/ui/view/drviewse.cxx | 4 +-- sd/source/ui/view/outlnvs2.cxx | 4 +-- sd/source/ui/view/viewshel.cxx | 4 +-- sfx2/source/sidebar/PanelLayout.cxx | 2 +- starmath/source/dialog.cxx | 4 +-- starmath/source/edit.cxx | 2 +- starmath/source/node.cxx | 4 +-- svtools/source/brwbox/brwbox1.cxx | 6 ++-- svtools/source/control/ctrlbox.cxx | 6 ++-- svx/source/dialog/fntctrl.cxx | 2 +- svx/source/dialog/framelinkarray.cxx | 10 +++--- svx/source/dialog/rulritem.cxx | 4 +-- svx/source/inc/fmshimp.hxx | 2 +- svx/source/svdraw/svdotext.cxx | 4 +-- sw/inc/redline.hxx | 2 +- sw/qa/extras/layout/layout.cxx | 20 ++++++----- sw/qa/extras/ww8export/ww8export2.cxx | 4 +-- sw/source/core/doc/DocumentStatisticsManager.cxx | 2 +- sw/source/core/layout/dbg_lay.cxx | 2 +- sw/source/core/layout/newfrm.cxx | 2 +- sw/source/core/layout/tabfrm.cxx | 2 +- sw/source/core/layout/wsfrm.cxx | 2 +- sw/source/core/table/swnewtable.cxx | 2 +- sw/source/core/table/swtable.cxx | 12 +++---- sw/source/core/text/inftxt.hxx | 6 ++-- sw/source/core/text/itrform2.cxx | 6 ++-- sw/source/core/text/porlay.cxx | 2 +- sw/source/core/text/porlay.hxx | 4 +-- sw/source/core/text/pormulti.cxx | 4 +-- sw/source/core/text/txtfly.cxx | 2 +- sw/source/filter/html/htmlcss1.cxx | 4 +-- sw/source/filter/writer/wrtswtbl.cxx | 2 +- sw/source/filter/ww8/WW8TableInfo.hxx | 2 +- sw/source/filter/ww8/ww8par.cxx | 2 +- sw/source/ui/index/cnttab.cxx | 10 +++--- sw/source/uibase/shells/tabsh.cxx | 4 +-- tools/qa/cppunit/test_bigint.cxx | 12 +++---- vcl/headless/svpbmp.cxx | 2 +- vcl/headless/svpgdi.cxx | 2 +- vcl/qa/cppunit/complextext.cxx | 9 ++--- vcl/source/app/salvtables.cxx | 6 ++-- vcl/source/bitmap/BitmapFilterStackBlur.cxx | 10 +++--- vcl/source/bitmap/BitmapScaleSuperFilter.cxx | 6 ++-- vcl/source/bitmap/bitmappaint.cxx | 40 +++++++++++----------- vcl/source/control/imp_listbox.cxx | 2 +- vcl/source/edit/texteng.cxx | 4 +-- vcl/source/gdi/bmpfast.cxx | 2 +- vcl/source/gdi/salmisc.cxx | 2 +- vcl/source/outdev/map.cxx | 2 +- vcl/source/treelist/treelistbox.cxx | 4 +-- vcl/source/window/dialog.cxx | 4 +-- vcl/source/window/layout.cxx | 14 ++++---- vcl/unx/generic/gdi/salbmp.cxx | 2 +- vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 4 +-- vcl/win/gdi/salfont.cxx | 2 +- vcl/win/gdi/salprn.cxx | 2 +- vcl/win/window/salobj.cxx | 4 +-- 97 files changed, 237 insertions(+), 232 deletions(-) diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index bccf765c786b..41c0ff4413f3 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -836,7 +836,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage ) sal_Int32 nLinespPage = aPaperSz.Height()/nLineHeight; tools::Long nXTextWidth = pPrinter->approximate_digit_width(); - sal_Int32 nCharspLine = aPaperSz.Width() / std::max(nXTextWidth, 1); + sal_Int32 nCharspLine = aPaperSz.Width() / std::max(nXTextWidth, 1); const sal_uInt32 nParas = GetEditEngine()->GetParagraphCount(); sal_Int32 nPages = nParas/nLinespPage+1; diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx index 81685f7744e2..50f509cfe87d 100644 --- a/basic/source/sbx/sbxdec.cxx +++ b/basic/source/sbx/sbxdec.cxx @@ -156,7 +156,7 @@ void SbxDecimal::setShort( sal_Int16 val ) void SbxDecimal::setLong( sal_Int32 val ) { - VarDecFromI4( static_cast(val), &maDec ); + VarDecFromI4( static_cast(val), &maDec ); } void SbxDecimal::setUShort( sal_uInt16 val ) diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx index 2a89362ec91e..21f830cc3c62 100644 --- a/dbaccess/source/ui/app/AppIconControl.cxx +++ b/dbaccess/source/ui/app/AppIconControl.cxx @@ -91,7 +91,7 @@ void OApplicationIconControl::Fill() m_nMaxWidth = std::max(m_nMaxWidth, rSize.Width()); m_nMaxHeight = std::max(m_nMaxHeight, rSize.Height()); xItem->maTitle = DBA_RES(aCategorie.pLabelResId); - m_nMaxWidth = std::max(m_nMaxWidth, GetTextWidth(xItem->maTitle)); + m_nMaxWidth = std::max(m_nMaxWidth, GetTextWidth(xItem->maTitle)); AppendItem(std::move(xItem)); } diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 858548d6b569..2d338d20014a 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -1008,7 +1008,7 @@ void DesktopLOKTest::testSheetSelections() { char* pUsedMimeType = nullptr; char* pCopiedContent = pDocument->pClass->getTextSelection(pDocument, nullptr, &pUsedMimeType); - std::vector aExpected = {5, 6, 7, 8, 9}; + std::vector aExpected = {5, 6, 7, 8, 9}; std::istringstream iss(pCopiedContent); for (size_t i = 0; i < aExpected.size(); i++) { @@ -1055,7 +1055,7 @@ void DesktopLOKTest::testSheetSelections() { char* pUsedMimeType = nullptr; char* pCopiedContent = pDocument->pClass->getTextSelection(pDocument, nullptr, &pUsedMimeType); - std::vector aExpected = { 8 }; + std::vector aExpected = { 8 }; std::istringstream iss(pCopiedContent); for (size_t i = 0; i < aExpected.size(); i++) { diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index e34fe1822fa4..f2d2e205d76b 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -349,7 +349,7 @@ namespace drawinglayer::primitive2d if(nTextLength) { aRetval.reserve(nTextLength); - std::vector aArray(nTextLength); + std::vector aArray(nTextLength); mrDevice.GetTextArray(rText, aArray.data(), nIndex, nLength); aRetval.assign(aArray.begin(), aArray.end()); } @@ -374,7 +374,7 @@ namespace drawinglayer::primitive2d if(nTextLength) { aRetval.reserve(2 * nTextLength); - std::vector aArray(2 * nTextLength); + std::vector aArray(2 * nTextLength); mrDevice.GetCaretPositions(rText, aArray.data(), nIndex, nLength); aRetval.assign(aArray.begin(), aArray.end()); } @@ -457,7 +457,7 @@ namespace drawinglayer::primitive2d // TODO: eKerning // set FontHeight and init to no FontScaling - o_rSize.setY(std::max(rFont.GetFontSize().getHeight(), 0)); + o_rSize.setY(std::max(rFont.GetFontSize().getHeight(), 0)); o_rSize.setX(o_rSize.getY()); #ifdef _WIN32 diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 9f5f5d77c0d5..e4083043f1b7 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -252,7 +252,7 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( } // create transformed integer DXArray in view coordinate system - std::vector aTransformedDXArray; + std::vector aTransformedDXArray; if (!rTextCandidate.getDXArray().empty()) { diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx index 4b4f610772a5..440221bc047b 100644 --- a/editeng/inc/editdoc.hxx +++ b/editeng/inc/editdoc.hxx @@ -457,7 +457,7 @@ class ParaPortion; class EditLine { public: - typedef std::vector CharPosArrayType; + typedef std::vector CharPosArrayType; private: CharPosArrayType aPositions; diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index d070ec660786..4ffaeec6afaa 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -818,7 +818,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) tools::Long nTmpWidth = 0; tools::Long nXWidth = nMaxLineWidth; - std::deque* pTextRanges = nullptr; + std::deque* pTextRanges = nullptr; tools::Long nTextExtraYOffset = 0; tools::Long nTextXOffset = 0; tools::Long nTextLineHeight = 0; diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx index 8ae51a790899..b8c46e0cdcba 100644 --- a/editeng/source/misc/txtrange.cxx +++ b/editeng/source/misc/txtrange.cxx @@ -93,7 +93,7 @@ namespace { class SvxBoundArgs { std::vector aBoolArr; - std::deque* pLongArr; + std::deque* pLongArr; TextRanger *pTextRanger; tools::Long nMin; tools::Long nMax; @@ -126,7 +126,7 @@ class SvxBoundArgs tools::Long A( const Point& rP ) const { return bRotate ? rP.Y() : rP.X(); } tools::Long B( const Point& rP ) const { return bRotate ? rP.X() : rP.Y(); } public: - SvxBoundArgs( TextRanger* pRanger, std::deque* pLong, const Range& rRange ); + SvxBoundArgs( TextRanger* pRanger, std::deque* pLong, const Range& rRange ); void NotePoint( const tools::Long nA ) { NoteMargin( nA - nStart, nA + nEnd ); } void NoteMargin( const tools::Long nL, const tools::Long nR ) { if( nMin > nL ) nMin = nL; if( nMax < nR ) nMax = nR; } @@ -142,7 +142,7 @@ public: } -SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, std::deque* pLong, +SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, std::deque* pLong, const Range& rRange ) : pLongArr(pLong) , pTextRanger(pRanger) @@ -488,18 +488,18 @@ void SvxBoundArgs::Concat( const tools::PolyPolygon* pPoly ) { SetConcat( true ); DBG_ASSERT( pPoly, "Nothing to do?" ); - std::deque* pOld = pLongArr; - pLongArr = new std::deque; + std::deque* pOld = pLongArr; + pLongArr = new std::deque; aBoolArr.clear(); bInner = false; Calc( *pPoly ); // Note that this updates pLongArr, which is why we swapped it out earlier. - std::deque::size_type nCount = pLongArr->size(); - std::deque::size_type nIdx = 0; - std::deque::size_type i = 0; + std::deque::size_type nCount = pLongArr->size(); + std::deque::size_type nIdx = 0; + std::deque::size_type i = 0; bool bSubtract = pTextRanger->IsInner(); while( i < nCount ) { - std::deque::size_type nOldCount = pOld->size(); + std::deque::size_type nOldCount = pOld->size(); if( nIdx == nOldCount ) { // Reached the end of the old Array... if( !bSubtract ) @@ -508,7 +508,7 @@ void SvxBoundArgs::Concat( const tools::PolyPolygon* pPoly ) } tools::Long nLeft = (*pLongArr)[ i++ ]; tools::Long nRight = (*pLongArr)[ i++ ]; - std::deque::size_type nLeftPos = nIdx + 1; + std::deque::size_type nLeftPos = nIdx + 1; while( nLeftPos < nOldCount && nLeft > (*pOld)[ nLeftPos ] ) nLeftPos += 2; if( nLeftPos >= nOldCount ) @@ -517,7 +517,7 @@ void SvxBoundArgs::Concat( const tools::PolyPolygon* pPoly ) pOld->insert( pOld->begin() + nOldCount, pLongArr->begin() + i - 2, pLongArr->end() ); break; } - std::deque::size_type nRightPos = nLeftPos - 1; + std::deque::size_type nRightPos = nLeftPos - 1; while( nRightPos < nOldCount && nRight >= (*pOld)[ nRightPos ] ) nRightPos += 2; if( nRightPos < nLeftPos ) @@ -630,7 +630,7 @@ void SvxBoundArgs::NoteUpLow( tools::Long nA, const sal_uInt8 nArea ) } } -std::deque* TextRanger::GetTextRanges( const Range& rRange ) +std::deque* TextRanger::GetTextRanges( const Range& rRange ) { DBG_ASSERT( rRange.Min() || rRange.Max(), "Zero-Range not allowed, Bye Bye" ); //Can we find the result we need in the cache? diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index 010d984d3eb0..0873bf9cff75 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -96,8 +96,8 @@ static tools::Long ImplGetNumber(sal_uInt8* &rBuf, sal_uInt32& nSecurityCount) nSecurityCount = 1; // error parsing the bounding box values else if ( bValid ) { - const bool bFail = o3tl::checked_multiply(nRetValue, 10, nRetValue) || - o3tl::checked_add(nRetValue, *rBuf - '0', nRetValue); + const bool bFail = o3tl::checked_multiply(nRetValue, 10, nRetValue) || + o3tl::checked_add(nRetValue, *rBuf - '0', nRetValue); if (bFail) return 0; } diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index f92204ac3442..7d5ac70e1a0c 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -2714,7 +2714,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText, return; tools::Polygon aPoly( 4 ); - const tools::Long nLineHeight = std::max( FRound( aMetric.GetLineHeight() * 0.05 ), 1 ); + const tools::Long nLineHeight = std::max( FRound( aMetric.GetLineHeight() * 0.05 ), 1 ); if( rFont.GetStrikeout() ) { diff --git a/include/editeng/txtrange.hxx b/include/editeng/txtrange.hxx index 1898a364966b..e6509291d388 100644 --- a/include/editeng/txtrange.hxx +++ b/include/editeng/txtrange.hxx @@ -37,7 +37,7 @@ class EDITENG_DLLPUBLIC TextRanger struct RangeCacheItem { Range range; //!< Range for which we calculated results. - std::deque results; //!< Calculated results for the range. + std::deque results; //!< Calculated results for the range. RangeCacheItem(const Range& rng) : range(rng) {}; }; std::deque mRangeCache; //!< Cached range calculations. @@ -63,7 +63,7 @@ public: sal_uInt16 nCacheSize, sal_uInt16 nLeft, sal_uInt16 nRight, bool bSimple, bool bInner, bool bVert = false ); ~TextRanger(); - std::deque* GetTextRanges( const Range& rRange ); + std::deque* GetTextRanges( const Range& rRange ); sal_uInt16 GetRight() const { return nRight; } sal_uInt16 GetLeft() const { return nLeft; } sal_uInt16 GetUpper() const { return nUpper; } diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx index d7a16f4f01ff..2c48fc7b1006 100644 --- a/include/svx/xtable.hxx +++ b/include/svx/xtable.hxx @@ -175,7 +175,7 @@ public: XPropertyListType Type() const { return meType; } tools::Long Count() const; - void Insert(std::unique_ptr pEntry, tools::Long nIndex = std::numeric_limits::max()); + void Insert(std::unique_ptr pEntry, tools::Long nIndex = std::numeric_limits::max()); void Replace(std::unique_ptr pEntry, tools::Long nIndex); void Remove(tools::Long nIndex); diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index d67ab24ffb21..e91bb629ff1d 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -222,8 +222,8 @@ private: VclButtonBoxStyle m_eLayoutStyle; struct Requisition { - std::vector m_aMainGroupDimensions; - std::vector m_aSubGroupDimensions; + std::vector m_aMainGroupDimensions; + std::vector m_aSubGroupDimensions; Size m_aMainGroupSize; Size m_aSubGroupSize; }; diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx index 379401ac7ea5..199f37c093e8 100644 --- a/include/vcl/toolkit/treelistbox.hxx +++ b/include/vcl/toolkit/treelistbox.hxx @@ -664,7 +664,7 @@ public: SvTreeListEntry* GetNextEntryInView(SvTreeListEntry*) const; void ScrollToAbsPos( tools::Long nPos ); - tools::Long getPreferredDimensions(std::vector &rWidths) const; + tools::Long getPreferredDimensions(std::vector &rWidths) const; virtual Size GetOptimalSize() const override; diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 74a5d39fe1df..fe19a556609d 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -770,7 +770,7 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe // When custom shape is rotated, bitmap have to be rotated too. if(rPropMap.hasProperty(PROP_RotateAngle)) { - tools::Long nAngle = rPropMap.getProperty(PROP_RotateAngle).get(); + tools::Long nAngle = rPropMap.getProperty(PROP_RotateAngle).get(); xGraphic = lclRotateGraphic(xGraphic, Degree10(nAngle/10) ); } diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 8b69d23ab499..8908af370e0b 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2463,7 +2463,7 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS // Add padding to get the bullet point centered in PPT Size aDestSize(64, 64); float fBulletSizeRelX = fBulletSizeRel / aGraphicSize.Height * aGraphicSize.Width; - tools::Long nPaddingX = std::max(0, std::lround((aDestSize.Width() - fBulletSizeRelX * aDestSize.Width()) / 2.f)); + tools::Long nPaddingX = std::max(0, std::lround((aDestSize.Width() - fBulletSizeRelX * aDestSize.Width()) / 2.f)); tools::Long nPaddingY = std::lround((aDestSize.Height() - fBulletSizeRel * aDestSize.Height()) / 2.f); tools::Rectangle aDestRect(nPaddingX, nPaddingY, aDestSize.Width() - nPaddingX, aDestSize.Height() - nPaddingY); diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index e6bd5325b2df..674e72da8e9c 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -178,7 +178,7 @@ void OReportWindow::Resize() aPageSize.setHeight( m_aHRuler->GetSizePixel().Height() ); const tools::Long nTermp(m_aViewsWindow->getTotalHeight() + aPageSize.Height()); - tools::Long nSectionsHeight = ::std::max(nTermp,aTotalOutputSize.Height()); + tools::Long nSectionsHeight = ::std::max(nTermp,aTotalOutputSize.Height()); m_aHRuler->SetPosSizePixel(aStartPoint,aPageSize); m_aHRuler->SetNullOffset(nLeftMargin); diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx index f30f85f6f394..720e07a3c8da 100644 --- a/sc/inc/dpgroup.hxx +++ b/sc/inc/dpgroup.hxx @@ -122,7 +122,7 @@ class ScDPGroupTableData final : public ScDPTableData pNumGroups; // array[nSourceCount] ScDocument* pDoc; - void FillGroupValues(std::vector& rItems, const std::vector& rDims); + void FillGroupValues(std::vector& rItems, const std::vector& rDims); virtual tools::Long GetSourceDim( tools::Long nDim ) override; bool IsNumGroupDimension( tools::Long nDimension ) const; diff --git a/sc/inc/dptabdat.hxx b/sc/inc/dptabdat.hxx index 8f8aa3cd578c..8ab4eb167b7f 100644 --- a/sc/inc/dptabdat.hxx +++ b/sc/inc/dptabdat.hxx @@ -69,14 +69,14 @@ public: should be passed as a const instance. */ struct SAL_DLLPRIVATE CalcInfo { - ::std::vector aColLevelDims; + ::std::vector aColLevelDims; ::std::vector aColDims; ::std::vector aColLevels; - ::std::vector aRowLevelDims; + ::std::vector aRowLevelDims; ::std::vector aRowDims; ::std::vector aRowLevels; - ::std::vector aPageDims; - ::std::vector aDataSrcCols; + ::std::vector aPageDims; + ::std::vector aDataSrcCols; ScDPInitState* pInitState; ScDPResultMember* pColRoot; @@ -154,7 +154,7 @@ protected: private: void GetItemData(const ScDPFilteredCache& rCacheTable, sal_Int32 nRow, - const ::std::vector& rDims, ::std::vector< SCROW >& rItemData); + const ::std::vector& rDims, ::std::vector< SCROW >& rItemData); }; #endif diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx index 2ea654a9c32f..7a8f23564720 100644 --- a/sc/inc/dptabres.hxx +++ b/sc/inc/dptabres.hxx @@ -105,7 +105,7 @@ struct ScDPSubTotalState class ScDPRunningTotalState { public: - typedef std::vector IndexArray; /// array of long integers terminated by -1. + typedef std::vector IndexArray; /// array of long integers terminated by -1. ScDPRunningTotalState( ScDPResultMember* pColRoot, ScDPResultMember* pRowRoot ); diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx index 692eb2a987fa..106c6cd74b66 100644 --- a/sc/inc/dptabsrc.hxx +++ b/sc/inc/dptabsrc.hxx @@ -85,10 +85,10 @@ private: rtl::Reference pDimensions; // api objects // settings: - std::vector maColDims; - std::vector maRowDims; - std::vector maDataDims; - std::vector maPageDims; + std::vector maColDims; + std::vector maRowDims; + std::vector maDataDims; + std::vector maPageDims; ScDPResultTree maResFilterSet; bool bColumnGrand; diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx index fd9b9098dd25..a54e91fe4274 100644 --- a/sc/source/core/data/dpgroup.cxx +++ b/sc/source/core/data/dpgroup.cxx @@ -553,7 +553,7 @@ OUString ScDPGroupTableData::getDimensionName(tools::Long nColumn) { if ( nColumn >= nSourceCount ) { - if ( nColumn == sal::static_int_cast( nSourceCount + aGroups.size() ) ) // data layout dimension? + if ( nColumn == sal::static_int_cast( nSourceCount + aGroups.size() ) ) // data layout dimension? nColumn = nSourceCount; // index of data layout in source data else return aGroups[nColumn - nSourceCount].GetName(); @@ -565,14 +565,14 @@ OUString ScDPGroupTableData::getDimensionName(tools::Long nColumn) bool ScDPGroupTableData::getIsDataLayoutDimension(tools::Long nColumn) { // position of data layout dimension is moved from source data - return ( nColumn == sal::static_int_cast( nSourceCount + aGroups.size() ) ); // data layout dimension? + return ( nColumn == sal::static_int_cast( nSourceCount + aGroups.size() ) ); // data layout dimension? } bool ScDPGroupTableData::IsDateDimension(tools::Long nDim) { if ( nDim >= nSourceCount ) { - if ( nDim == sal::static_int_cast( nSourceCount + aGroups.size() ) ) // data layout dimension? + if ( nDim == sal::static_int_cast( nSourceCount + aGroups.size() ) ) // data layout dimension? nDim = nSourceCount; // index of data layout in source data else nDim = aGroups[nDim - nSourceCount].GetSourceDim(); // look at original dimension @@ -585,7 +585,7 @@ sal_uInt32 ScDPGroupTableData::GetNumberFormat(tools::Long nDim) { if ( nDim >= nSourceCount ) { - if ( nDim == sal::static_int_cast( nSourceCount + aGroups.size() ) ) // data layout dimension? + if ( nDim == sal::static_int_cast( nSourceCount + aGroups.size() ) ) // data layout dimension? nDim = nSourceCount; // index of data layout in source data else nDim = aGroups[nDim - nSourceCount].GetSourceDim(); // look at original dimension @@ -801,7 +801,7 @@ void ScDPGroupTableData::ReloadCacheTable() pSourceData->ReloadCacheTable(); } -void ScDPGroupTableData::FillGroupValues(vector& rItems, const vector& rDims) +void ScDPGroupTableData::FillGroupValues(vector& rItems, const vector& rDims) { tools::Long nGroupedColumns = aGroups.size(); diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 99c974fc64b9..883913949fe1 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -2159,7 +2159,7 @@ static void lcl_FillOldFields( ScPivotFieldVector& rFields, //TODO: merge multiple occurrences (data field with different functions) //TODO: force data field in one dimension - vector aPos; + vector aPos; uno::Reference xDimsName = xSource->getDimensions(); uno::Reference xDims = new ScNameToIndexAccess( xDimsName ); diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx index c0b39a445e47..1e547a6a6242 100644 --- a/sc/source/core/data/dptabdat.cxx +++ b/sc/source/core/data/dptabdat.cxx @@ -215,7 +215,7 @@ void ScDPTableData::CalcResultsFromCacheTable(const ScDPFilteredCache& rCacheTab } void ScDPTableData::GetItemData(const ScDPFilteredCache& rCacheTable, sal_Int32 nRow, - const vector& rDims, vector& rItemData) + const vector& rDims, vector& rItemData) { sal_Int32 nDimSize = rDims.size(); rItemData.reserve(rItemData.size() + nDimSize); diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index 667d60ab9241..62ef223a8eeb 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -165,7 +165,7 @@ OUString ScDPSource::GetDataDimName(tools::Long nIndex) tools::Long ScDPSource::GetPosition(tools::Long nColumn) { - std::vector::const_iterator it, itBeg = maColDims.begin(), itEnd = maColDims.end(); + std::vector::const_iterator it, itBeg = maColDims.begin(), itEnd = maColDims.end(); it = std::find(itBeg, itEnd, nColumn); if (it != itEnd) return std::distance(itBeg, it); @@ -193,10 +193,10 @@ tools::Long ScDPSource::GetPosition(tools::Long nColumn) namespace { -bool testSubTotal( bool& rAllowed, tools::Long nColumn, const std::vector& rDims, ScDPSource* pSource ) +bool testSubTotal( bool& rAllowed, tools::Long nColumn, const std::vector& rDims, ScDPSource* pSource ) { rAllowed = true; - std::vector::const_iterator it = rDims.begin(), itEnd = rDims.end(); + std::vector::const_iterator it = rDims.begin(), itEnd = rDims.end(); for (; it != itEnd; ++it) { if (*it != nColumn) @@ -222,9 +222,9 @@ bool testSubTotal( bool& rAllowed, tools::Long nColumn, const std::vector& return false; } -void removeDim( tools::Long nRemove, std::vector& rDims ) +void removeDim( tools::Long nRemove, std::vector& rDims ) { - std::vector::iterator it = std::find(rDims.begin(), rDims.end(), nRemove); + std::vector::iterator it = std::find(rDims.begin(), rDims.end(), nRemove); if (it != rDims.end()) rDims.erase(it); } @@ -598,7 +598,7 @@ static tools::Long lcl_CountMinMembers(const vector& ppDim, cons void ScDPSource::FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool &rHasAutoShow) { - const std::vector& rDims = bIsRow ? maRowDims : maColDims; + const std::vector& rDims = bIsRow ? maRowDims : maColDims; for (const auto& rDimIndex : rDims) { ScDPDimension* pDim = GetDimensionsObject()->getByIndex(rDimIndex); @@ -957,7 +957,7 @@ void ScDPSource::FillLevelList( sheet::DataPilotFieldOrientation nOrientation, s { rList.clear(); - std::vector* pDimIndex = nullptr; + std::vector* pDimIndex = nullptr; switch (nOrientation) { case sheet::DataPilotFieldOrientation_COLUMN: diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 02f40b63507e..826c7125a89e 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -3910,7 +3910,7 @@ void ScTable::SetDrawPageSize(bool bResetStreamValid, bool bUpdateNoteCaptionPos { double fValX = GetColOffset( rDocument.MaxCol() + 1 ) * HMM_PER_TWIPS; double fValY = GetRowOffset( rDocument.MaxRow() + 1 ) * HMM_PER_TWIPS; - const tools::Long nMax = ::std::numeric_limits::max(); + const tools::Long nMax = ::std::numeric_limits::max(); // #i113884# Avoid int32 overflow with possible negative results than can cause bad effects. // If the draw page size is smaller than all rows, only the bottom of the sheet is affected. tools::Long x = ( fValX > static_cast(nMax) ) ? nMax : static_cast(fValX); diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 795dbf06c925..d947e16cddd9 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -1125,7 +1125,7 @@ OUString ScTable::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW if ( nListCount ) { sal_uLong nSub = nSrcCount - 1; // nListIndex is from last source entry - while ( nIndex < sal::static_int_cast(nSub) ) + while ( nIndex < sal::static_int_cast(nSub) ) nIndex += nListCount; sal_uLong nPos = ( nListIndex + nIndex - nSub ) % nListCount; aValue = pListData->GetSubStr(sal::static_int_cast(nPos)); diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index 46b6f49da87e..a8a5d0e1038e 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -944,8 +944,8 @@ private: double GetPercentileExclusive( ::std::vector & rArray, double fPercentile ); std::vector GetTopNumberArray( SCSIZE& rCol, SCSIZE& rRow ); void GetNumberSequenceArray( sal_uInt8 nParamCount, ::std::vector& rArray, bool bConvertTextInArray ); - void GetSortArray( sal_uInt8 nParamCount, ::std::vector& rSortArray, ::std::vector* pIndexOrder, bool bConvertTextInArray, bool bAllowEmptyArray ); - static void QuickSort(::std::vector& rSortArray, ::std::vector* pIndexOrder); + void GetSortArray( sal_uInt8 nParamCount, ::std::vector& rSortArray, ::std::vector* pIndexOrder, bool bConvertTextInArray, bool bAllowEmptyArray ); + static void QuickSort(::std::vector& rSortArray, ::std::vector* pIndexOrder); void ScModalValue(); void ScModalValue_MS( bool bSingle ); void ScAveDev(); diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 9f9f07186d50..f17e72ae0287 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -4125,7 +4125,7 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector& rSortArray, vector* pIndexOrder, bool bConvertTextInArray, bool bAllowEmptyArray ) +void ScInterpreter::GetSortArray( sal_uInt8 nParamCount, vector& rSortArray, vector* pIndexOrder, bool bConvertTextInArray, bool bAllowEmptyArray ) { GetNumberSequenceArray( nParamCount, rSortArray, bConvertTextInArray ); if (rSortArray.size() > MAX_COUNT_DOUBLE_FOR_SORT(mrDoc.GetSheetLimits())) @@ -4141,7 +4141,7 @@ void ScInterpreter::GetSortArray( sal_uInt8 nParamCount, vector& rSortAr QuickSort( rSortArray, pIndexOrder); } -static void lcl_QuickSort( tools::Long nLo, tools::Long nHi, vector& rSortArray, vector* pIndexOrder ) +static void lcl_QuickSort( tools::Long nLo, tools::Long nHi, vector& rSortArray, vector* pIndexOrder ) { // If pIndexOrder is not NULL, we assume rSortArray.size() == pIndexOrder->size(). @@ -4192,7 +4192,7 @@ static void lcl_QuickSort( tools::Long nLo, tools::Long nHi, vector& rSo } } -void ScInterpreter::QuickSort( vector& rSortArray, vector* pIndexOrder ) +void ScInterpreter::QuickSort( vector& rSortArray, vector* pIndexOrder ) { tools::Long n = static_cast(rSortArray.size()); diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 6de3e2d2150b..3930de33ba2e 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -1867,7 +1867,7 @@ void ScInterpreter::ScFrequency() return; vector aBinArray; - vector aBinIndexOrder; + vector aBinIndexOrder; GetSortArray( 1, aBinArray, &aBinIndexOrder, false, false ); SCSIZE nBinSize = aBinArray.size(); diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx index b69e4b340735..98e983459144 100644 --- a/sc/source/filter/excel/xepivotxml.cxx +++ b/sc/source/filter/excel/xepivotxml.cxx @@ -769,9 +769,9 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP aCachedDims.push_back(pDim); } - std::vector aRowFields; - std::vector aColFields; - std::vector aPageFields; + std::vector aRowFields; + std::vector aColFields; + std::vector aPageFields; std::vector aDataFields; tools::Long nDataDimCount = rSaveData.GetDataDimensionCount(); diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 9afb24ebc84c..b4a7faf5cc18 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -222,7 +222,7 @@ bool ScDocShell::IsDocument( const INetURLObject& rURL ) #if HAVE_FEATURE_DBCONNECTIVITY -static void lcl_setScalesToColumns(ScDocument& rDoc, const vector& rScales) +static void lcl_setScalesToColumns(ScDocument& rDoc, const vector& rScales) { SvNumberFormatter* pFormatter = rDoc.GetFormatTable(); if (!pFormatter) @@ -343,7 +343,7 @@ ErrCode ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncoding aProgress.SetState( 0 ); - vector aScales(nColCount, -1); + vector aScales(nColCount, -1); for (i=0; igetColumnLabel( i+1 ); diff --git a/sc/source/ui/inc/pfuncache.hxx b/sc/source/ui/inc/pfuncache.hxx index 888c60c0fd4c..7ae640834dda 100644 --- a/sc/source/ui/inc/pfuncache.hxx +++ b/sc/source/ui/inc/pfuncache.hxx @@ -87,8 +87,8 @@ class ScPrintFuncCache ScPrintSelectionStatus aSelection; ScDocShell* pDocSh; tools::Long nTotalPages; - std::vector nPages; - std::vector nFirstAttr; + std::vector nPages; + std::vector nFirstAttr; std::vector aLocations; bool bLocInitialized; diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx index ecb6a9646106..3f06121f31f1 100644 --- a/sc/source/ui/inc/preview.hxx +++ b/sc/source/ui/inc/preview.hxx @@ -41,8 +41,8 @@ private: // calculated: SCTAB nTabCount; SCTAB nTabsTested; // for how many sheets is nPages valid? - std::vector nPages; - std::vector nFirstAttr; + std::vector nPages; + std::vector nFirstAttr; SCTAB nTab; // Sheet tools::Long nTabPage; // Page of sheet tools::Long nTabStart; // First (real) page of the sheet @@ -80,7 +80,7 @@ private: bool mbHasEmptyRangeTable:1; /// we have at least one sheet with empty print range (print range set to '- none -'). ScRange aPageArea; - std::vector mvRight; + std::vector mvRight; tools::Long nLeftPosition; tools::Long mnScale; SCCOL nColNumberButtonDown; diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 4a9c035d16a2..4205db5c8fae 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -905,7 +905,7 @@ void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldI ScIconSetType eType = pOldIconSetInfo->eIconSetType; sal_Int32 nIndex = pOldIconSetInfo->nIconIndex; const BitmapEx& rIcon = getIcon(rIconSetBitmapMap, eType, nIndex); - tools::Long aOrigSize = std::max(0,std::min(rRect.GetSize().getWidth() - 4 * nOneX, rRect.GetSize().getHeight() -4 * nOneY)); + tools::Long aOrigSize = std::max(0,std::min(rRect.GetSize().getWidth() - 4 * nOneX, rRect.GetSize().getHeight() -4 * nOneY)); rRenderContext.DrawBitmapEx( Point( rRect.Left() + 2 * nOneX, rRect.Top() + 2 * nOneY), Size(aOrigSize, aOrigSize), rIcon ); } diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 564221da4ade..367d0dca1f5a 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -1488,7 +1488,7 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co // before processing the cell value. std::vector > aAltPatterns; - std::vector aDX; + std::vector aDX; tools::Long nPosY = nScrY; for (SCSIZE nArrY=1; nArrY+1& nPages ) +static tools::Long lcl_GetDisplayStart( SCTAB nTab, const ScDocument* pDoc, std::vector& nPages ) { tools::Long nDisplayStart = 0; for (SCTAB i=0; i& rGroupIndexes, - std::vector& rGroupStartPositions, OStringBuffer& rGroupsBuffer) + std::vector& rGroupStartPositions, OStringBuffer& rGroupsBuffer) { const size_t nGroupDepth = rArray.GetDepth(); // create string data for group controls @@ -2683,7 +2683,7 @@ void ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle, tools::J rJsonWriter.put("groupLevels", static_cast(nRowGroupDepth)); } - std::vector aRowGroupStartPositions(nRowGroupDepth, -nTotalPixels); + std::vector aRowGroupStartPositions(nRowGroupDepth, -nTotalPixels); for (SCROW nRow = nStartRow + 1; nRow <= nEndRow; ++nRow) { // nSize will be 0 for hidden rows. @@ -2776,7 +2776,7 @@ void ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle, tools::J rJsonWriter.put("groupLevels", static_cast(nColGroupDepth)); } - std::vector aColGroupStartPositions(nColGroupDepth, -nTotalPixels); + std::vector aColGroupStartPositions(nColGroupDepth, -nTotalPixels); nPrevSizePx = -1; for (SCCOL nCol = nStartCol + 1; nCol <= nEndCol; ++nCol) { diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 22f2eaf81d55..996265c3c9ea 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -196,7 +196,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) else { nLeft -= 1000; - nLeft = std::max( nLeft, 0 ); + nLeft = std::max<::tools::Long>( nLeft, 0 ); } pNewItem->SetLeftValue( static_cast(nLeft) ); @@ -253,7 +253,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) else { nUpper -= 100; - nUpper = std::max( nUpper, 0 ); + nUpper = std::max<::tools::Long>( nUpper, 0 ); } pNewItem->SetUpper( static_cast(nUpper) ); @@ -263,7 +263,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) else { nLower -= 100; - nLower = std::max( nLower, 0 ); + nLower = std::max<::tools::Long>( nLower, 0 ); } pNewItem->SetLower( static_cast(nLower) ); @@ -296,7 +296,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) else { nUpper -= 100; - nUpper = std::max( nUpper, 0 ); + nUpper = std::max<::tools::Long>( nUpper, 0 ); } pNewItem->SetUpper( static_cast(nUpper) ); @@ -306,7 +306,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) else { nLower -= 100; - nLower = std::max( nLower, 0 ); + nLower = std::max<::tools::Long>( nLower, 0 ); } pNewItem->SetLower( static_cast(nLower) ); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 33ed1a0ff2d6..bde926aef869 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1179,7 +1179,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) case SID_ZOOM_IN: // BASIC { mbZoomOnPage = false; - SetZoom( std::max( GetActiveWindow()->GetZoom() / 2, GetActiveWindow()->GetMinZoom() ) ); + SetZoom( std::max<::tools::Long>( GetActiveWindow()->GetZoom() / 2, GetActiveWindow()->GetMinZoom() ) ); ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); @@ -1193,7 +1193,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) case SID_ZOOM_OUT: { mbZoomOnPage = false; - SetZoom( std::min( GetActiveWindow()->GetZoom() * 2, GetActiveWindow()->GetMaxZoom() ) ); + SetZoom( std::min<::tools::Long>( GetActiveWindow()->GetZoom() * 2, GetActiveWindow()->GetMaxZoom() ) ); ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index 72626b9654ed..4acabdf2dbf7 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -127,7 +127,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) case SID_ZOOM_OUT: { - SetZoom( std::min( GetActiveWindow()->GetZoom() * 2, GetActiveWindow()->GetMaxZoom() ) ); + SetZoom( std::min<::tools::Long>( GetActiveWindow()->GetZoom() * 2, GetActiveWindow()->GetMaxZoom() ) ); ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); @@ -154,7 +154,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) case SID_ZOOM_IN: { - SetZoom( std::max( GetActiveWindow()->GetZoom() / 2, GetActiveWindow()->GetMinZoom() ) ); + SetZoom( std::max<::tools::Long>( GetActiveWindow()->GetZoom() / 2, GetActiveWindow()->GetMinZoom() ) ); ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 691e5f8a0963..f97c26ea5ece 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -721,9 +721,9 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi Point aOldMousePos = GetActiveWindow()->PixelToLogic(rCEvt.GetMousePosPixel()); if( pData->GetDelta() < 0 ) - nNewZoom = std::max( pWin->GetMinZoom(), basegfx::zoomtools::zoomOut( nOldZoom )); + nNewZoom = std::max<::tools::Long>( pWin->GetMinZoom(), basegfx::zoomtools::zoomOut( nOldZoom )); else - nNewZoom = std::min( pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom )); + nNewZoom = std::min<::tools::Long>( pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom )); SetZoom( nNewZoom ); // Keep mouse at same doc point before zoom diff --git a/sfx2/source/sidebar/PanelLayout.cxx b/sfx2/source/sidebar/PanelLayout.cxx index 5508d1a5e70d..c419403bdf79 100644 --- a/sfx2/source/sidebar/PanelLayout.cxx +++ b/sfx2/source/sidebar/PanelLayout.cxx @@ -58,7 +58,7 @@ Size PanelLayout::GetOptimalSize() const SidebarController* pController = SidebarController::GetSidebarControllerForFrame(mxFrame); if (pController) - aSize.setWidth(std::min( + aSize.setWidth(std::min( aSize.Width(), (pController->getMaximumWidth() - TabBar::GetDefaultWidth()) * GetDPIScaleFactor())); } diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index cf9616ad9980..87bf6a6c41be 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1088,8 +1088,8 @@ void SmShowSymbolSet::calccols(const vcl::RenderContext& rRenderContext) nColumns = aOutputSize.Width() / nLen; nRows = aOutputSize.Height() / nLen; - nColumns = std::max(1, nColumns); - nRows = std::max(1, nRows); + nColumns = std::max(1, nColumns); + nRows = std::max(1, nRows); nXOffset = (aOutputSize.Width() - (nColumns * nLen)) / 2; nYOffset = (aOutputSize.Height() - (nRows * nLen)) / 2; diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index 59cef03975bf..c8f82355468e 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -283,7 +283,7 @@ void SmEditWindow::Resize() if (pEditView->GetVisArea().Top() > nMaxVisAreaStart) { tools::Rectangle aVisArea(pEditView->GetVisArea() ); - aVisArea.SetTop( std::max(nMaxVisAreaStart, 0) ); + aVisArea.SetTop( std::max(nMaxVisAreaStart, 0) ); aVisArea.SetSize(pEditView->GetOutputArea().GetSize()); pEditView->SetVisArea(aVisArea); pEditView->ShowCursor(); diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 1604655c08c1..e252b83ee308 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -1921,7 +1921,7 @@ void SmMatrixNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) // initialize array that is to hold the maximum widths of all // elements (subnodes) in that column. - std::vector aColWidth(mnNumCols); + std::vector aColWidth(mnNumCols); // arrange subnodes and calculate the above arrays contents size_t nNodes = GetNumSubNodes(); @@ -1945,7 +1945,7 @@ void SmMatrixNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) nVerDist = nNormDist * rFormat.GetDistance(DIS_MATRIXROW) / 100; // build array that holds the leftmost position for each column - std::vector aColLeft(mnNumCols); + std::vector aColLeft(mnNumCols); tools::Long nX = 0; for (size_t j = 0; j < mnNumCols; ++j) { diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 5eac20c1514e..4737698d145c 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -1004,7 +1004,7 @@ tools::Long BrowseBox::ScrollRows( tools::Long nRows ) // compute new top row tools::Long nTmpMin = std::min( static_cast(nTopRow + nRows), static_cast(nRowCount - 1) ); - tools::Long nNewTopRow = std::max( nTmpMin, 0 ); + tools::Long nNewTopRow = std::max( nTmpMin, 0 ); if ( nNewTopRow == nTopRow ) return 0; @@ -1017,7 +1017,7 @@ tools::Long BrowseBox::ScrollRows( tools::Long nRows ) // compute new top row again (nTopRow might have changed!) nTmpMin = std::min( static_cast(nTopRow + nRows), static_cast(nRowCount - 1) ); - nNewTopRow = std::max( nTmpMin, 0 ); + nNewTopRow = std::max( nTmpMin, 0 ); StartScroll(); @@ -1659,7 +1659,7 @@ void BrowseBox::SelectAll() tools::Rectangle aHighlightRect; sal_uInt16 nVisibleRows = static_cast(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1); - for ( tools::Long nRow = std::max( nTopRow, uRow.pSel->FirstSelected() ); + for ( tools::Long nRow = std::max( nTopRow, uRow.pSel->FirstSelected() ); nRow != BROWSER_ENDOFSELECTION && nRow < nTopRow + nVisibleRows; nRow = uRow.pSel->NextSelected() ) aHighlightRect.Union( tools::Rectangle( diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 180fe6a9661b..cc7f1c699069 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -91,7 +91,7 @@ tools::Long BorderWidthImpl::GetLine1( tools::Long nWidth ) const { tools::Long const nConstant2 = (m_nFlags & BorderWidthImplFlags::CHANGE_LINE2) ? 0 : m_nRate2; tools::Long const nConstantD = (m_nFlags & BorderWidthImplFlags::CHANGE_DIST ) ? 0 : m_nRateGap; - result = std::max(0, + result = std::max(0, static_cast((m_nRate1 * nWidth) + 0.5) - (nConstant2 + nConstantD)); if (result == 0 && m_nRate1 > 0.0 && nWidth > 0) @@ -109,7 +109,7 @@ tools::Long BorderWidthImpl::GetLine2( tools::Long nWidth ) const { tools::Long const nConstant1 = (m_nFlags & BorderWidthImplFlags::CHANGE_LINE1) ? 0 : m_nRate1; tools::Long const nConstantD = (m_nFlags & BorderWidthImplFlags::CHANGE_DIST ) ? 0 : m_nRateGap; - result = std::max(0, + result = std::max(0, static_cast((m_nRate2 * nWidth) + 0.5) - (nConstant1 + nConstantD)); } @@ -123,7 +123,7 @@ tools::Long BorderWidthImpl::GetGap( tools::Long nWidth ) const { tools::Long const nConstant1 = (m_nFlags & BorderWidthImplFlags::CHANGE_LINE1) ? 0 : m_nRate1; tools::Long const nConstant2 = (m_nFlags & BorderWidthImplFlags::CHANGE_LINE2) ? 0 : m_nRate2; - result = std::max(0, + result = std::max(0, static_cast((m_nRateGap * nWidth) + 0.5) - (nConstant1 + nConstant2)); } diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 4d86e4974f51..edf8b7881297 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -144,7 +144,7 @@ class FontPrevWin_Impl bool mbDelPrinter; Reference mxBreak; - std::vector maTextWidth; + std::vector maTextWidth; std::deque maScriptChg; std::vector maScriptType; SvxFont maCJKFont; diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index bf89b58dfba9..c54fc5167120 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -152,7 +152,7 @@ void Cell::MirrorSelfX() } -static void lclRecalcCoordVec( std::vector& rCoords, const std::vector& rSizes ) +static void lclRecalcCoordVec( std::vector& rCoords, const std::vector& rSizes ) { DBG_ASSERT( rCoords.size() == rSizes.size() + 1, "lclRecalcCoordVec - inconsistent vectors" ); auto aCIt = rCoords.begin(); @@ -185,10 +185,10 @@ const Cell OBJ_CELL_NONE; struct ArrayImpl { CellVec maCells; - std::vector maWidths; - std::vector maHeights; - mutable std::vector maXCoords; - mutable std::vector maYCoords; + std::vector maWidths; + std::vector maHeights; + mutable std::vector maXCoords; + mutable std::vector maYCoords; size_t mnWidth; size_t mnHeight; size_t mnFirstClipCol; diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx index 7943283364e8..c9973fdd7462 100644 --- a/svx/source/dialog/rulritem.cxx +++ b/svx/source/dialog/rulritem.cxx @@ -584,8 +584,8 @@ SvxColumnDescription::SvxColumnDescription(tools::Long start, tools::Long end, t nEnd (end), bVisible (bVis), // fdo#85858 hack: clamp these to smaller value to prevent overflow - nEndMin(std::min(endMin, std::numeric_limits::max())), - nEndMax(std::min(endMax, std::numeric_limits::max())) + nEndMin(std::min(endMin, std::numeric_limits::max())), + nEndMax(std::min(endMax, std::numeric_limits::max())) {} bool SvxColumnDescription::operator==(const SvxColumnDescription& rCmp) const diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index 0c30e1b8819d..affa74dfcaf9 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -178,7 +178,7 @@ class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) FmXFormShell final : public FmXFormShe // since I want to mark an SdrObject when searching for the treatment of the "found", // I get all relevant objects before yanking up of the search dialog // (the array is thus only valid during the search process) - std::vector m_arrRelativeGridColumn; + std::vector m_arrRelativeGridColumn; ::osl::Mutex m_aMutex; ImplSVEvent * m_nInvalidationEvent; diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 8919c5d1c7dd..b7450c83a44d 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -492,7 +492,7 @@ void SdrTextObj::AdaptTextMinSize() { // Set minimum width. const tools::Long nDist = GetTextLeftDistance() + GetTextRightDistance(); - const tools::Long nW = std::max(0, maRect.GetWidth() - 1 - nDist); // text width without margins + const tools::Long nW = std::max(0, maRect.GetWidth() - 1 - nDist); // text width without margins aSet.Put(makeSdrTextMinFrameWidthItem(nW)); @@ -507,7 +507,7 @@ void SdrTextObj::AdaptTextMinSize() { // Set Minimum height. const tools::Long nDist = GetTextUpperDistance() + GetTextLowerDistance(); - const tools::Long nH = std::max(0, maRect.GetHeight() - 1 - nDist); // text height without margins + const tools::Long nH = std::max(0, maRect.GetHeight() - 1 - nDist); // text height without margins aSet.Put(makeSdrTextMinFrameHeightItem(nH)); diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index 8fbded6e61f1..35bacea29950 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -158,7 +158,7 @@ class SW_DLLPUBLIC SwRangeRedline : public SwPaM bool m_bIsVisible : 1; sal_uInt32 m_nId; - std::optional m_oLOKLastNodeTop; + std::optional m_oLOKLastNodeTop; void MoveToSection(); void CopyToSection(); diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 95891b40d7b1..4b6e9c22bd62 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -851,10 +851,14 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf137025) CPPUNIT_ASSERT(pFrameFormat); // The shape has these values to copy to the associated text frame after modification:: - const tools::Long nLPaddng = xShapeProps->getPropertyValue("TextLeftDistance").get(); - const tools::Long nRPaddng = xShapeProps->getPropertyValue("TextRightDistance").get(); - const tools::Long nTPaddng = xShapeProps->getPropertyValue("TextUpperDistance").get(); - const tools::Long nBPaddng = xShapeProps->getPropertyValue("TextLowerDistance").get(); + const tools::Long nLPaddng + = xShapeProps->getPropertyValue("TextLeftDistance").get(); + const tools::Long nRPaddng + = xShapeProps->getPropertyValue("TextRightDistance").get(); + const tools::Long nTPaddng + = xShapeProps->getPropertyValue("TextUpperDistance").get(); + const tools::Long nBPaddng + = xShapeProps->getPropertyValue("TextLowerDistance").get(); CPPUNIT_ASSERT_EQUAL(tools::Long(1000), nLPaddng); CPPUNIT_ASSERT_EQUAL(tools::Long(2000), nRPaddng); @@ -868,13 +872,13 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf137025) uno::Reference xFrameProps(xTxFrm, uno::UNO_QUERY); const tools::Long nFrameLeftPaddng - = xFrameProps->getPropertyValue("LeftBorderDistance").get(); + = xFrameProps->getPropertyValue("LeftBorderDistance").get(); const tools::Long nFrameRightPaddng - = xFrameProps->getPropertyValue("RightBorderDistance").get(); + = xFrameProps->getPropertyValue("RightBorderDistance").get(); const tools::Long nFrameTopPaddng - = xFrameProps->getPropertyValue("TopBorderDistance").get(); + = xFrameProps->getPropertyValue("TopBorderDistance").get(); const tools::Long nFrameBottomPaddng - = xFrameProps->getPropertyValue("BottomBorderDistance").get(); + = xFrameProps->getPropertyValue("BottomBorderDistance").get(); // Check if the shape and frame have different setting CPPUNIT_ASSERT_EQUAL(nLPaddng, nFrameLeftPaddng); diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx index bded9504b579..004451247cdf 100644 --- a/sw/qa/extras/ww8export/ww8export2.cxx +++ b/sw/qa/extras/ww8export/ww8export2.cxx @@ -343,8 +343,8 @@ DECLARE_WW8EXPORT_TEST(testTdf112074_RTLtableJustification, "tdf112074_RTLtableJ CPPUNIT_ASSERT_EQUAL_MESSAGE("Right To Left writing mode", text::WritingMode2::RL_TB, getProperty(xTable, "WritingMode")); CPPUNIT_ASSERT_EQUAL_MESSAGE("Horizontal Orientation", text::HoriOrientation::LEFT_AND_WIDTH, getProperty(xTable, "HoriOrient")); - CPPUNIT_ASSERT_MESSAGE("Table Indent", getProperty(xTable, "LeftMargin") > 3000); - CPPUNIT_ASSERT_MESSAGE("Table Indent is 3750", getProperty(xTable, "LeftMargin") < 4000 ); + CPPUNIT_ASSERT_MESSAGE("Table Indent", getProperty(xTable, "LeftMargin") > 3000); + CPPUNIT_ASSERT_MESSAGE("Table Indent is 3750", getProperty(xTable, "LeftMargin") < 4000 ); CPPUNIT_ASSERT_EQUAL( style::ParagraphAdjust_RIGHT, static_cast(getProperty(getParagraphOrTable(2), "ParaAdjust")) ); } diff --git a/sw/source/core/doc/DocumentStatisticsManager.cxx b/sw/source/core/doc/DocumentStatisticsManager.cxx index 91ca7aa498e9..dd67d88ea89e 100644 --- a/sw/source/core/doc/DocumentStatisticsManager.cxx +++ b/sw/source/core/doc/DocumentStatisticsManager.cxx @@ -93,7 +93,7 @@ void DocumentStatisticsManager::UpdateDocStat( bool bCompleteAsync, bool bFields { maStatsUpdateIdle.Stop(); while (IncrementalDocStatCalculate( - std::numeric_limits::max(), bFields)) {} + std::numeric_limits::max(), bFields)) {} } else if (IncrementalDocStatCalculate(5000, bFields)) maStatsUpdateIdle.Start(); diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index 7816ed9c3c0e..97a514b8c79d 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -130,7 +130,7 @@ class SwImplProtocol std::unique_ptr m_pStream; // output stream std::unique_ptr> m_pFrameIds; // which FrameIds shall be logged ( NULL == all) - std::vector m_aVars; // variables + std::vector m_aVars; // variables OStringBuffer m_aLayer; // indentation of output (" " per start/end) SwFrameType m_nTypes; // which types shall be logged sal_uInt16 m_nLineCount; // printed lines diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index 397de1daf5fb..8a62abd8aa54 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -106,7 +106,7 @@ static SwRectFnCollection aHorizontal = { /*.fnXDiff =*/&FirstMinusSecond, /*.fnYDiff =*/&FirstMinusSecond, /*.fnXInc =*/&SwIncrement, - /*.fnYInc =*/&o3tl::saturating_add, + /*.fnYInc =*/&o3tl::saturating_add, /*.fnSetLeftAndWidth =*/&SwRect::SetLeftAndWidth, /*.fnSetTopAndHeight =*/&SwRect::SetTopAndHeight diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 052b51b1b42d..b3c36051b661 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -3172,7 +3172,7 @@ SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) if ( nReal < nDist ) { - tools::Long nTmp = GetUpper()->Grow( nDist - std::max(nReal, 0), bTst, bInfo ); + tools::Long nTmp = GetUpper()->Grow( nDist - std::max(nReal, 0), bTst, bInfo ); if ( IsRestrictTableGrowth() ) { diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 3927f405048c..ae422dc2ea46 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -2150,7 +2150,7 @@ SwTwips SwContentFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) if( GetUpper() ) { if( bTst || !GetUpper()->IsFooterFrame() ) - nReal = GetUpper()->Grow( nDist - std::max(nReal, 0), + nReal = GetUpper()->Grow( nDist - std::max(nReal, 0), bTst, bInfo ); else { diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index c0e4cbf9bae2..fdafc10df49c 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -2256,7 +2256,7 @@ void SwTable::ConvertSubtableBox(sal_uInt16 const nRow, sal_uInt16 const nBox) else { newSourceRowSpan += pSubTableBox->GetTabLines().size() - 1; - newBoxRowSpan = -(newSourceRowSpan - sal::static_int_cast(i)); + newBoxRowSpan = -(newSourceRowSpan - sal::static_int_cast(i)); } pNewLine->GetTabBoxes()[nInsPos]->setRowSpan(newBoxRowSpan); if (i == pSubTableBox->GetTabLines().size() - 1) diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index c78c9ffdea89..4dda8e1d85fa 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -392,7 +392,7 @@ static void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox, { const SwTwips nWidth = rBoxes[i]->GetFrameFormat()->GetFrameSize().GetWidth(); nSum += nWidth; - const tools::Long nTmp = lcl_MulDiv64(nSum, nAct, nWish); + const tools::Long nTmp = lcl_MulDiv64(nSum, nAct, nWish); if (rBoxes[i] != pCur) { @@ -648,7 +648,7 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ) const SwTableBoxes &rBoxes = pLine->GetTabBoxes(); for ( size_t i = 0; (i < rBoxes.size()) && (rBoxes[i] != pCur); ++i) { - nLeft += lcl_MulDiv64( + nLeft += lcl_MulDiv64( rBoxes[i]->GetFrameFormat()->GetFrameSize().GetWidth(), nOldAct, rParm.nOldWish); } @@ -660,7 +660,7 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ) if ( nLeft != rParm.rOld.GetLeft() ) // There are still boxes before this. { // Right edge is left edge plus width. - const tools::Long nWidth = lcl_MulDiv64( + const tools::Long nWidth = lcl_MulDiv64( pBox->GetFrameFormat()->GetFrameSize().GetWidth(), nOldAct, rParm.nOldWish); const tools::Long nRight = nLeft + nWidth; @@ -694,7 +694,7 @@ static void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ) if ( rParm.rOld.Count() ) { // Calculate the difference to the edge touching the first box. - const tools::Long nWidth = lcl_MulDiv64( + const tools::Long nWidth = lcl_MulDiv64( pBox->GetFrameFormat()->GetFrameSize().GetWidth(), nOldAct, rParm.nOldWish); const tools::Long nTmp = nWidth + rParm.rOld.GetLeft(); @@ -1172,8 +1172,8 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew, nOldPos = rOld[i] - rParm.rOld.GetLeft(); nNewPos = rNew[i] - rParm.rNew.GetLeft(); } - nNewPos = lcl_MulDiv64(nNewPos, rParm.nNewWish, nNewWidth); - nOldPos = lcl_MulDiv64(nOldPos, rParm.nOldWish, nOldWidth); + nNewPos = lcl_MulDiv64(nNewPos, rParm.nNewWish, nNewWidth); + nOldPos = lcl_MulDiv64(nOldPos, rParm.nOldWish, nOldWidth); if( nOldPos != nNewPos && nNewPos > 0 && nOldPos > 0 ) { ColChange aChg( static_cast(nOldPos), static_cast(nNewPos) ); diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index d3ce7116407b..26eaad505161 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -347,7 +347,7 @@ class SwTextPaintInfo : public SwTextSizeInfo sw::WrongListIterator *m_pWrongList; sw::WrongListIterator *m_pGrammarCheckList; sw::WrongListIterator *m_pSmartTags; - std::vector* pSpaceAdd; + std::vector* pSpaceAdd; const SvxBrushItem *pBrushItem; // For the background SwTextFly aTextFly; // Calculate the FlyFrame Point aPos; // Paint position @@ -448,8 +448,8 @@ public: { return ( pSpaceAdd && nSpaceIdx < pSpaceAdd->size() ) ? (*pSpaceAdd)[nSpaceIdx] : 0; } - void SetpSpaceAdd( std::vector* pNew ){ pSpaceAdd = pNew; } - std::vector* GetpSpaceAdd() const { return pSpaceAdd; } + void SetpSpaceAdd( std::vector* pNew ){ pSpaceAdd = pNew; } + std::vector* GetpSpaceAdd() const { return pSpaceAdd; } void SetWrongList(sw::WrongListIterator *const pNew) { m_pWrongList = pNew; } sw::WrongListIterator* GetpWrongList() const { return m_pWrongList; } diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index aae48722464f..fb064af7d3c9 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -64,7 +64,7 @@ namespace { tools::Long lcl_CalcOptRepaint( SwTextFormatter &rThis, SwLineLayout const &rCurr, TextFrameIndex nOldLineEnd, - const std::vector &rFlyStarts ); + const std::vector &rFlyStarts ); //! Determine if we need to build hidden portions bool lcl_BuildHiddenPortion(const SwTextSizeInfo& rInf, TextFrameIndex &rPos); @@ -1592,7 +1592,7 @@ TextFrameIndex SwTextFormatter::FormatLine(TextFrameIndex const nStartPos) // before and after the BuildPortions call const bool bOptimizeRepaint = AllowRepaintOpt(); TextFrameIndex const nOldLineEnd = nStartPos + m_pCurr->GetLen(); - std::vector flyStarts; + std::vector flyStarts; // these are the conditions for a fly position comparison if ( bOptimizeRepaint && m_pCurr->IsFly() ) @@ -2772,7 +2772,7 @@ namespace { tools::Long lcl_CalcOptRepaint( SwTextFormatter &rThis, SwLineLayout const &rCurr, TextFrameIndex const nOldLineEnd, - const std::vector &rFlyStarts ) + const std::vector &rFlyStarts ) { SwTextFormatInfo& txtFormatInfo = rThis.GetInfo(); if ( txtFormatInfo.GetIdx() < txtFormatInfo.GetReformatStart() ) diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 7e9c2c25cbdc..bb3fb103260f 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -308,7 +308,7 @@ void SwLineLayout::InitSpaceAdd() void SwLineLayout::CreateSpaceAdd( const tools::Long nInit ) { - m_pLLSpaceAdd.reset( new std::vector ); + m_pLLSpaceAdd.reset( new std::vector ); SetLLSpaceAdd( nInit, 0 ); } diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx index ca2c4e0ae22f..255337d583c1 100644 --- a/sw/source/core/text/porlay.hxx +++ b/sw/source/core/text/porlay.hxx @@ -79,7 +79,7 @@ class SwLineLayout : public SwTextPortion { private: SwLineLayout *m_pNext; // The next Line - std::unique_ptr> m_pLLSpaceAdd; // Used for justified alignment + std::unique_ptr> m_pLLSpaceAdd; // Used for justified alignment std::unique_ptr> m_pKanaComp; // Used for Kana compression sal_uInt16 m_nRealHeight; // The height resulting from line spacing and register sal_uInt16 m_nTextHeight; // The max height of all non-FlyCnt portions in this Line @@ -187,7 +187,7 @@ public: } tools::Long GetLLSpaceAdd( sal_uInt16 nIdx ) { return (*m_pLLSpaceAdd)[ nIdx ]; } void RemoveFirstLLSpaceAdd() { m_pLLSpaceAdd->erase( m_pLLSpaceAdd->begin() ); } - std::vector* GetpLLSpaceAdd() const { return m_pLLSpaceAdd.get(); } + std::vector* GetpLLSpaceAdd() const { return m_pLLSpaceAdd.get(); } // Stuff for Kana compression void SetKanaComp( std::unique_ptr> pNew ){ m_pKanaComp = std::move(pNew); } diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index e61c52b295aa..8050303942c2 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -515,7 +515,7 @@ bool SwDoubleLinePortion::ChgSpaceAdd( SwLineLayout* pCurr, // pCurr->SetLLSpaceAdd( nMultiSpace, 0 ); // #i65711# SetLLSpaceAdd replaces the first value, // instead we want to insert a new first value: - std::vector* pVec = pCurr->GetpLLSpaceAdd(); + std::vector* pVec = pCurr->GetpLLSpaceAdd(); pVec->insert( pVec->begin(), nMultiSpace ); bRet = true; } @@ -1411,7 +1411,7 @@ class SwSpaceManipulator { SwTextPaintInfo& rInfo; SwMultiPortion& rMulti; - std::vector* pOldSpaceAdd; + std::vector* pOldSpaceAdd; sal_uInt16 nOldSpIdx; tools::Long nSpaceAdd; bool bSpaceChg; diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index b1f9333ba04a..46851c08d7ad 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -273,7 +273,7 @@ SwRect SwContourCache::ContourRect( const SwFormat* pFormat, Range aRange( std::min( nTmpTop, nTmpBottom ), std::max( nTmpTop, nTmpBottom ) ); - std::deque* pTmp = mvItems[0].mxTextRanger->GetTextRanges( aRange ); + std::deque* pTmp = mvItems[0].mxTextRanger->GetTextRanges( aRange ); const size_t nCount = pTmp->size(); if( 0 != nCount ) diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 69eccc08fd33..c404d77d58b1 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -2049,7 +2049,7 @@ void SwHTMLParser::SetVarSize( SvxCSS1PropertyInfo const &rPropInfo, nWidth = MINFLY; break; case SVX_CSS1_LTYPE_TWIP: - nWidth = std::max(rPropInfo.m_nWidth, MINFLY); + nWidth = std::max(rPropInfo.m_nWidth, MINFLY); nPercentWidth = 0; break; default: @@ -2063,7 +2063,7 @@ void SwHTMLParser::SetVarSize( SvxCSS1PropertyInfo const &rPropInfo, case SVX_CSS1_LTYPE_TWIP: // Netscape and MS-IE interpreting the height incorrectly as minimum height, // therefore we are doing the same. - nHeight = std::max(rPropInfo.m_nHeight, MINFLY); + nHeight = std::max(rPropInfo.m_nHeight, MINFLY); break; default: ; diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index 3c9c031c16fb..911bed91cc59 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -383,7 +383,7 @@ tools::Long SwWriteTable::GetAbsHeight(tools::Long nRawHeight, size_t const nRow } OSL_ENSURE( nRawHeight > 0, "Row Height <= 0. OK?" ); - return std::max(nRawHeight, 0); + return std::max(nRawHeight, 0); } bool SwWriteTable::ShouldExpandSub(const SwTableBox *pBox, bool /*bExpandedBefore*/, diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index ca2cfb2c9252..ce7dbbb5faa7 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -255,7 +255,7 @@ public: class WW8TableCellGrid { - typedef std::set RowTops_t; + typedef std::set RowTops_t; typedef std::map Rows_t; RowTops_t m_aRowTops; diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index c535dd054588..544baec382ad 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1246,7 +1246,7 @@ static tools::Long lcl_GetTrueMargin(const SvxLRSpaceItem &rLR, const SwNumForma const tools::Long nReverseListIndented = GetListFirstLineIndent(rFormat); tools::Long nExtraListIndent = nPseudoListBodyIndent + nReverseListIndented; - return std::max(nExtraListIndent, 0); + return std::max(nExtraListIndent, 0); } // #i103711# diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 55235e71437d..a4d005fb9a64 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -152,7 +152,7 @@ protected: virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override; virtual bool SaveModified() override; - std::vector GetOptimalColWidths() const; + std::vector GetOptimalColWidths() const; public: SwEntryBrowseBox(const css::uno::Reference &rParent); @@ -3622,7 +3622,7 @@ void SwEntryBrowseBox::Resize() SwEntryBrowseBox_Base::Resize(); tools::Long nWidth = GetSizePixel().Width(); - std::vector aWidths = GetOptimalColWidths(); + std::vector aWidths = GetOptimalColWidths(); tools::Long nNaturalWidth(std::accumulate(aWidths.begin(), aWidths.end(), 0)); tools::Long nExcess = ((nWidth - nNaturalWidth) / aWidths.size()) - 1; @@ -3630,9 +3630,9 @@ void SwEntryBrowseBox::Resize() SetColumnWidth(i+1, aWidths[i] + nExcess); } -std::vector SwEntryBrowseBox::GetOptimalColWidths() const +std::vector SwEntryBrowseBox::GetOptimalColWidths() const { - std::vector aWidths; + std::vector aWidths; tools::Long nStandardColMinWidth = approximate_digit_width() * 15; tools::Long nYesNoWidth = approximate_digit_width() * 5; @@ -3661,7 +3661,7 @@ Size SwEntryBrowseBox::GetOptimalSize() const { Size aSize = LogicToPixel(Size(276 , 175), MapMode(MapUnit::MapAppFont)); - std::vector aWidths = GetOptimalColWidths(); + std::vector aWidths = GetOptimalColWidths(); tools::Long nWidth(std::accumulate(aWidths.begin(), aWidths.end(), 0)); diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 594a018828da..ce54bdd02e31 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -873,8 +873,8 @@ void SwTableShell::Execute(SfxRequest &rReq) { tools::Long maxX = 0; tools::Long maxY = 0; - tools::Long minX = std::numeric_limits::max(); - tools::Long minY = std::numeric_limits::max(); + tools::Long minX = std::numeric_limits::max(); + tools::Long minY = std::numeric_limits::max(); tools::Long nbBoxes = aBoxes.size(); for ( tools::Long i = 0; i < nbBoxes; i++ ) { diff --git a/tools/qa/cppunit/test_bigint.cxx b/tools/qa/cppunit/test_bigint.cxx index ed3ab3cc3b63..efea3e341235 100644 --- a/tools/qa/cppunit/test_bigint.cxx +++ b/tools/qa/cppunit/test_bigint.cxx @@ -59,27 +59,27 @@ void BigIntTest::testConstructionFromLongLong() #if SAL_TYPES_SIZEOFLONG < SAL_TYPES_SIZEOFLONGLONG // positive number just fitting to long { - BigInt bi(static_cast(std::numeric_limits::max())); + BigInt bi(static_cast(std::numeric_limits::max())); CPPUNIT_ASSERT(bi.IsSet()); CPPUNIT_ASSERT(!bi.IsZero()); CPPUNIT_ASSERT(!bi.IsNeg()); CPPUNIT_ASSERT(bi.IsLong()); - CPPUNIT_ASSERT_EQUAL(std::numeric_limits::max(), static_cast(bi)); + CPPUNIT_ASSERT_EQUAL(std::numeric_limits::max(), static_cast(bi)); } // negative number just fitting to long { - BigInt bi(static_cast(std::numeric_limits::min())); + BigInt bi(static_cast(std::numeric_limits::min())); CPPUNIT_ASSERT(bi.IsSet()); CPPUNIT_ASSERT(!bi.IsZero()); CPPUNIT_ASSERT(bi.IsNeg()); CPPUNIT_ASSERT(bi.IsLong()); - CPPUNIT_ASSERT_EQUAL(std::numeric_limits::min(), static_cast(bi)); + CPPUNIT_ASSERT_EQUAL(std::numeric_limits::min(), static_cast(bi)); } // positive number not fitting to long { - BigInt bi(static_cast(std::numeric_limits::max()) + BigInt bi(static_cast(std::numeric_limits::max()) + static_cast(1)); CPPUNIT_ASSERT(bi.IsSet()); CPPUNIT_ASSERT(!bi.IsZero()); @@ -89,7 +89,7 @@ void BigIntTest::testConstructionFromLongLong() // negative number not fitting to long { - BigInt bi(static_cast(std::numeric_limits::min()) + BigInt bi(static_cast(std::numeric_limits::min()) - static_cast(1)); CPPUNIT_ASSERT(bi.IsSet()); CPPUNIT_ASSERT(!bi.IsZero()); 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 ImplCreateDIB( pDIB->mnWidth = rSize.Width(); pDIB->mnHeight = rSize.Height(); tools::Long nScanlineBase; - bool bFail = o3tl::checked_multiply(pDIB->mnWidth, nBitCount, nScanlineBase); + bool bFail = o3tl::checked_multiply(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(pDst->mnBitCount, nWidth, nScanlineBase); + const bool bFail = o3tl::checked_multiply(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 #include +#include #if HAVE_MORE_FONTS // must be declared before inclusion of test/bootstrapfixture.hxx -static std::ostream& operator<<(std::ostream& rStream, const std::vector& rVec); +static std::ostream& operator<<(std::ostream& rStream, const std::vector& rVec); #endif #include @@ -25,7 +26,7 @@ static std::ostream& operator<<(std::ostream& rStream, const std::vector& #include #if HAVE_MORE_FONTS -static std::ostream& operator<<(std::ostream& rStream, const std::vector& rVec) +static std::ostream& operator<<(std::ostream& rStream, const std::vector& 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 aRefCharWidths {6, 9, 16, 16, 22, 22, 26, 29, 32, 32, + std::vector aRefCharWidths {6, 9, 16, 16, 22, 22, 26, 29, 32, 32, 36, 40, 49, 53, 56, 63, 63, 66, 72, 72}; - std::vector aCharWidths(aOneTwoThree.getLength(), 0); + std::vector 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 aWidths; + std::vector aWidths; m_xTreeView->getPreferredDimensions(aWidths); if (aWidths.size() > 2) { @@ -3708,7 +3708,7 @@ public: virtual void set_column_fixed_widths(const std::vector& rWidths) override { - std::vector aTabPositions; + std::vector 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 aTabPositions; + std::vector 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 maStackBuffer; - std::vector maPositionTable; - std::vector maWeightTable; + std::vector maPositionTable; + std::vector maWeightTable; - std::vector mnSumVector; - std::vector mnInSumVector; - std::vector mnOutSumVector; + std::vector mnSumVector; + std::vector mnInSumVector; + std::vector 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 maMapIX; - std::vector maMapIY; + std::vector maMapIX; + std::vector maMapIY; std::vector maMapFX; std::vector maMapFY; @@ -78,7 +78,7 @@ struct ScaleContext } static void generateMap(tools::Long nSourceLength, tools::Long nDestinationLength, bool bMirrored, - std::vector & rMapIX, std::vector & rMapFX) + std::vector & rMapIX, std::vector & 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(rTransColor.GetRed() - nTol, 0, 255); - const tools::Long nMaxR = MinMax(rTransColor.GetRed() + nTol, 0, 255); - const tools::Long nMinG = MinMax(rTransColor.GetGreen() - nTol, 0, 255); - const tools::Long nMaxG = MinMax(rTransColor.GetGreen() + nTol, 0, 255); - const tools::Long nMinB = MinMax(rTransColor.GetBlue() - nTol, 0, 255); - const tools::Long nMaxB = MinMax(rTransColor.GetBlue() + nTol, 0, 255); + const tools::Long nMinR = MinMax(rTransColor.GetRed() - nTol, 0, 255); + const tools::Long nMaxR = MinMax(rTransColor.GetRed() + nTol, 0, 255); + const tools::Long nMinG = MinMax(rTransColor.GetGreen() - nTol, 0, 255); + const tools::Long nMaxG = MinMax(rTransColor.GetGreen() + nTol, 0, 255); + const tools::Long nMinB = MinMax(rTransColor.GetBlue() - nTol, 0, 255); + const tools::Long nMaxB = MinMax(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 aLine; + std::vector aLine; tools::Long nYStart(nTop); tools::Long nY(nTop); for (; nY <= nBottom; nY++) { - std::vector aNewLine; + std::vector 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(rSearchColor.GetRed() - nTol, 0, 255); - const tools::Long nMaxR = MinMax(rSearchColor.GetRed() + nTol, 0, 255); - const tools::Long nMinG = MinMax(rSearchColor.GetGreen() - nTol, 0, 255); - const tools::Long nMaxG = MinMax(rSearchColor.GetGreen() + nTol, 0, 255); - const tools::Long nMinB = MinMax(rSearchColor.GetBlue() - nTol, 0, 255); - const tools::Long nMaxB = MinMax(rSearchColor.GetBlue() + nTol, 0, 255); + const tools::Long nMinR = MinMax(rSearchColor.GetRed() - nTol, 0, 255); + const tools::Long nMaxR = MinMax(rSearchColor.GetRed() + nTol, 0, 255); + const tools::Long nMinG = MinMax(rSearchColor.GetGreen() - nTol, 0, 255); + const tools::Long nMaxG = MinMax(rSearchColor.GetGreen() + nTol, 0, 255); + const tools::Long nMinB = MinMax(rSearchColor.GetBlue() - nTol, 0, 255); + const tools::Long nMaxB = MinMax(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(rCol.GetRed() - nTol, 0, 255); - pMaxR[i] = MinMax(rCol.GetRed() + nTol, 0, 255); - pMinG[i] = MinMax(rCol.GetGreen() - nTol, 0, 255); - pMaxG[i] = MinMax(rCol.GetGreen() + nTol, 0, 255); - pMinB[i] = MinMax(rCol.GetBlue() - nTol, 0, 255); - pMaxB[i] = MinMax(rCol.GetBlue() + nTol, 0, 255); + pMinR[i] = MinMax(rCol.GetRed() - nTol, 0, 255); + pMaxR[i] = MinMax(rCol.GetRed() + nTol, 0, 255); + pMinG[i] = MinMax(rCol.GetGreen() - nTol, 0, 255); + pMaxG[i] = MinMax(rCol.GetGreen() + nTol, 0, 255); + pMinB[i] = MinMax(rCol.GetBlue() - nTol, 0, 255); + pMaxB[i] = MinMax(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::max() - nPosHeight) + if (nHeight > ::std::numeric_limits::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::max(); + : std::numeric_limits::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::max(), nTmpWidth); + mnMaxTextWidth ? mnMaxTextWidth : std::numeric_limits::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(nSrcScanlineSize, rDst.mnScanlineSize)); + memcpy( ImplGetScanline( rDst, nY ), aSrcScanline, std::min(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 StretchAndConvert( pDstBuffer->mnWidth = rTwoRect.mnDestWidth; pDstBuffer->mnHeight = rTwoRect.mnDestHeight; tools::Long nScanlineBase; - bool bFail = o3tl::checked_multiply(pDstBuffer->mnBitCount, pDstBuffer->mnWidth, nScanlineBase); + bool bFail = o3tl::checked_multiply(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::max() / nMapNum / nDPI); //detect overflows + assert(nMapNum == 0 || std::abs(n) < std::numeric_limits::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 &rWidths) const +tools::Long SvTreeListBox::getPreferredDimensions(std::vector &rWidths) const { tools::Long nHeight = 0; rWidths.clear(); @@ -3064,7 +3064,7 @@ tools::Long SvTreeListBox::getPreferredDimensions(std::vector &rWidths) co Size SvTreeListBox::GetOptimalSize() const { - std::vector aWidths; + std::vector 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(w, 640 - 15), - std::max(h, 480 - 50)); + return Size(std::max(w, 640 - 15), + std::max(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 &rG, tools::Long nAvgDimension) +static tools::Long getMaxNonOutlier(const std::vector &rG, tools::Long nAvgDimension) { tools::Long nMaxDimensionNonOutlier = 0; for (auto const& nPrimaryChildDimension : rG) @@ -431,11 +431,11 @@ static tools::Long getMaxNonOutlier(const std::vector &rG, tools::Long nAv return nMaxDimensionNonOutlier; } -static std::vector setButtonSizes(const std::vector &rG, +static std::vector setButtonSizes(const std::vector &rG, const std::vector &rNonHomogeneous, tools::Long nAvgDimension, tools::Long nMaxNonOutlier, tools::Long nMinWidth) { - std::vector aVec; + std::vector aVec; //set everything < 1.5 times the average to the same width, leave the //outliers un-touched std::vector::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 aMainGroupSizes; + std::vector aMainGroupSizes; std::vector aMainGroupNonHomogeneous; - std::vector aSubGroupSizes; + std::vector aSubGroupSizes; std::vector 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::const_iterator aPrimaryI = aReq.m_aMainGroupDimensions.begin(); - std::vector::const_iterator aSecondaryI = aReq.m_aSubGroupDimensions.begin(); + std::vector::const_iterator aPrimaryI = aReq.m_aMainGroupDimensions.begin(); + std::vector::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 X11SalBitmap::ImplCreateDIB( pDIB->mnWidth = rSize.Width(); pDIB->mnHeight = rSize.Height(); tools::Long nScanlineBase; - bool bFail = o3tl::checked_multiply(pDIB->mnWidth, nBitCount, nScanlineBase); + bool bFail = o3tl::checked_multiply(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(rSize.Width(), nMinWidth), std::max(rSize.Height(), nMinHeight)); + rSize = Size(std::max(rSize.Width(), nMinWidth), std::max(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(rControlRegion.GetHeight(), aReq.height); + tools::Long nHeight = std::max(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( d * 65536. ); + const long l = static_cast( d * 65536. ); return *reinterpret_cast(&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(pSetupData->GetDriverDataLen() - pSetupDriverData->mnDriverOffset) == nSysJobSize && + static_cast(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(LOWORD( lParam )); - pt.y = static_cast(HIWORD( lParam )); + pt.x = static_cast(LOWORD( lParam )); + pt.y = static_cast(HIWORD( lParam )); MapWindowPoints( hWnd, hWndParent, &pt, 1 ); lParam = MAKELPARAM( static_cast(pt.x), static_cast(pt.y) ); -- cgit