https://bugs.documentfoundation.org/show_bug.cgi?id=75280

--- Comment #62 from Michael Stahl (allotropia) <michael.st...@allotropia.de> 
---

have just reviewed the remaining usages, the situation is much improved...

these are inappropriate, although not in the way mentioned in the description:
here some value is extracted out of an uno::Any, and there are easier to use
functions such as uno::Any::get<sal_Int32>() to do this.

editeng/source/accessibility/AccessibleEditableTextPara.cxx:               
Color crChar(ColorTransparency, static_cast<sal_uInt32>(
reinterpret_cast<sal_uIntPtr>(anyChar.pReserved)));
editeng/source/accessibility/AccessibleEditableTextPara.cxx:               
Color crCharUnderLine(ColorTransparency, static_cast<sal_uInt32>(
reinterpret_cast<sal_uIntPtr>( anyCharUnderLine.pReserved)));
sw/source/core/access/accpara.cxx:            sal_uInt32 crBack =
static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
sw/source/core/access/accpara.cxx:            sal_uInt32 crChar =
static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
sw/source/core/access/accpara.cxx:            sal_uInt32 crUnderline =
static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));

these are probably inappropriate sal_uIntPtr that should be other integer
types:

include/svx/svdoedge.hxx:        sal_uIntPtr* pnQuality, SdrEdgeInfoRec* pInfo)
const;
svx/source/gallery2/codec.cxx:        sal_uIntPtr   nIndex = 0, nCountByte,
nRunByte;
svx/source/svdraw/svdhdl.cxx:    sal_uIntPtr nNewHdlNum(nNewHdl);
svx/source/svdraw/svdoedge.cxx:    sal_uIntPtr nBestQual=0xFFFFFFFF;
svx/source/svdraw/svdoedge.cxx:                        sal_uIntPtr nQual=0;
svx/source/svdraw/svdoedge.cxx:    sal_uIntPtr* pnQuality, SdrEdgeInfoRec*
pInfo) const
svx/source/svdraw/svdoedge.cxx:        sal_uIntPtr nQual=0;
svx/source/svdraw/svdoedge.cxx:        sal_uIntPtr nQual0=nQual; // prevent
overruns
svx/source/svdraw/svdoedge.cxx:            sal_uIntPtr
n1=std::abs(aXP1[1].X()-aXP1[0].X())+std::abs(aXP1[1].Y()-aXP1[0].Y());
svx/source/svdraw/svdoedge.cxx:            sal_uIntPtr
n2=std::abs(aXP1[2].X()-aXP1[1].X())+std::abs(aXP1[2].Y()-aXP1[1].Y());
svx/source/svdraw/svdoedge.cxx:            sal_uIntPtr
n3=std::abs(aXP1[3].X()-aXP1[2].X())+std::abs(aXP1[3].Y()-aXP1[2].Y());
svx/source/svdraw/svdoedge.cxx:            sal_uIntPtr nBesser=0;
svx/source/svdraw/svdoedge.cxx:           
nQual+=static_cast<sal_uIntPtr>(nTmp)*0x01000000;
svx/source/svdraw/svdoedge.cxx:       
nQual+=static_cast<sal_uIntPtr>(nIntersections)*0x10000000;
svx/source/svdraw/svdoedge.cxx:                sal_uIntPtr
nBestDist=0xFFFFFFFF;
svx/source/svdraw/svdoedge.cxx:                        sal_uIntPtr
nDist=static_cast<sal_uIntPtr>(std::abs(aConPos.X()-rPt.X()))+static_cast<sal_uIntPtr>(std::abs(aConPos.Y()-rPt.Y()));

there is also the sal_IntPtr type (signed) with similar problem.
these are probably inappropriate sal_IntPtr that should be other integer types:

include/vcl/toolkit/treelistbox.hxx:    sal_IntPtr      GetTabPos(const
SvTreeListEntry*, const SvLBoxTab*) const;
svx/source/sidebar/line/LineWidthPopup.cxx:        sal_IntPtr nVal =
OutputDevice::LogicToLogic(
svx/source/sidebar/line/LineWidthPopup.cxx:           
reinterpret_cast<sal_IntPtr>(m_xVSWidth->GetItemData(iPos)), MapUnit::MapPoint,
sw/inc/authfld.hxx:    mutable sal_IntPtr  m_nTempSequencePos;
sw/inc/authfld.hxx:    mutable sal_IntPtr  m_nTempSequencePosRLHidden; ///<
hidden redlines
sw/source/core/fields/authfld.cxx:        sal_IntPtr &
rnTempSequencePos(pLayout && pLayout->IsHideRedlines()
sw/source/core/fields/authfld.cxx:        sal_IntPtr &
rnTempSequencePos(pLayout && pLayout->IsHideRedlines()
sw/source/uibase/utlui/uitool.cxx:            sal_IntPtr nPoolId =
SwStyleNameMapper::GetPoolIdFromUIName( pBase->GetName(),
SwGetPoolIdFromName::ChrFmt );
ucb/source/sorter/sortdynres.cxx:void EventList::AddEvent( sal_IntPtr nType,
sal_Int32 nPos )
ucb/source/sorter/sortresult.cxx:    sal_IntPtr  mnCurPos;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr  mnOldPos;
ucb/source/sorter/sortresult.cxx:    explicit SortListData( sal_IntPtr nPos );
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nCompare = 0;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr  nCompare = 0;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nIndexOne;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nIndexTwo;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nCompare;
ucb/source/sorter/sortresult.cxx:                               sal_IntPtr
_nStart, sal_IntPtr _nEnd )
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nStart = _nStart;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nEnd   = _nEnd;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nMid = 0, nCompare = 0;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr i, nCount;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nIndex = 1;
ucb/source/sorter/sortresult.cxx:            sal_IntPtr nPos   = FindPos(
pData.get(), 1, nIndex-1 );
ucb/source/sorter/sortresult.cxx:    sal_IntPtr      i, nEnd;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr        nOldLastSort;
ucb/source/sorter/sortresult.cxx:    for ( sal_IntPtr i=0; i < nCount; i++ )
ucb/source/sorter/sortresult.cxx:        sal_IntPtr nSortPos = m_O2S[nPos];
ucb/source/sorter/sortresult.cxx:            sal_IntPtr nVal = m_O2S[j];
ucb/source/sorter/sortresult.cxx:    sal_IntPtr i, nSortPos, nTo;
ucb/source/sorter/sortresult.cxx:        sal_IntPtr nStart = nPos + nCount;
ucb/source/sorter/sortresult.cxx:        sal_IntPtr nEnd = nStart + nOffset;
ucb/source/sorter/sortresult.cxx:    std::unique_ptr<sal_IntPtr[]> pTmpArr(new
sal_IntPtr[ nCount ]);
ucb/source/sorter/sortresult.cxx:        sal_IntPtr nFrom = nPos - 1;
ucb/source/sorter/sortresult.cxx:            sal_IntPtr const nVal =
m_O2S[nFrom + i];
ucb/source/sorter/sortresult.cxx:        sal_IntPtr nStart = nPos + nCount;
ucb/source/sorter/sortresult.cxx:            sal_IntPtr const nVal =
m_O2S[nStart + i];
ucb/source/sorter/sortresult.cxx:    for ( sal_IntPtr i=0; i<nCount; i++ )
ucb/source/sorter/sortresult.cxx:        sal_IntPtr const nSortPos =
m_O2S[nPos];
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nCompare, nCurPos, nNewPos;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr nStart, nEnd, nOffset, nVal;
ucb/source/sorter/sortresult.cxx:    sal_IntPtr            i, nNewPos, nVal;
ucb/source/sorter/sortresult.cxx:        for ( i = mnLastSort;
i<static_cast<sal_IntPtr>(maS2O.Count()); i++ )
ucb/source/sorter/sortresult.cxx:SortListData::SortListData( sal_IntPtr nPos )
ucb/source/sorter/sortresult.cxx:    if ( nPos <
static_cast<sal_IntPtr>(maData.size()) )
ucb/source/sorter/sortresult.cxx:    if ( nPos <
static_cast<sal_IntPtr>(maData.size()) )
ucb/source/sorter/sortresult.cxx:    if ( nPos <
static_cast<sal_IntPtr>(maData.size()) )
ucb/source/sorter/sortresult.cxx:    if ( nPos <
static_cast<sal_IntPtr>(maData.size()) )
ucb/source/sorter/sortresult.hxx:    void            AddEvent( sal_IntPtr
nType, sal_Int32 nPos );
ucb/source/sorter/sortresult.hxx:    std::deque<sal_IntPtr> m_O2S;       ///
maps the original Entries to the sorted ones
ucb/source/sorter/sortresult.hxx:    sal_Int32          FindPos( SortListData
const *pEntry, sal_IntPtr nStart, sal_IntPtr nEnd );
vcl/source/treelist/treelistbox.cxx:sal_IntPtr SvTreeListBox::GetTabPos(const
SvTreeListEntry* pEntry, const SvLBoxTab* pTab) const
vcl/source/treelist/treelistbox.cxx:    sal_IntPtr nPos = pTab->GetPos();
vcl/source/treelist/treelistbox.cxx:        nPos +=
static_cast<sal_IntPtr>(nDepth);

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to