Kaydet (Commit) 62ce3cfe authored tarafından Matteo Casalin's avatar Matteo Casalin

sal_uInt16 to more proper types + some const

Change-Id: I8b24a8fc3e636684b280b1aef1b8f522bfb7296e
üst dee85384
...@@ -618,7 +618,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, uno::DeploymentExc ...@@ -618,7 +618,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, uno::DeploymentExc
SwFmtColl * SwFmtColl *
SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional) SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional)
{ {
static const sal_uInt16 nMaxLookup = 1000; static const sal_uLong nMaxLookup = 1000;
SwFmtColl *pFmt = 0; SwFmtColl *pFmt = 0;
// if ( GetCrsrCnt() > nMaxLookup ) // if ( GetCrsrCnt() > nMaxLookup )
...@@ -2412,8 +2412,8 @@ lcl_EnumerateIds(sal_uInt16 const* pIdRange, std::set<sal_uInt16> &rWhichIds) ...@@ -2412,8 +2412,8 @@ lcl_EnumerateIds(sal_uInt16 const* pIdRange, std::set<sal_uInt16> &rWhichIds)
{ {
while (*pIdRange) while (*pIdRange)
{ {
const sal_uInt16 nStart = sal::static_int_cast<sal_uInt16>(*pIdRange++); const sal_uInt16 nStart = *pIdRange++;
const sal_uInt16 nEnd = sal::static_int_cast<sal_uInt16>(*pIdRange++); const sal_uInt16 nEnd = *pIdRange++;
for (sal_uInt16 nId = nStart + 1; nId <= nEnd; ++nId) for (sal_uInt16 nId = nStart + 1; nId <= nEnd; ++nId)
{ {
rWhichIds.insert( rWhichIds.end(), nId ); rWhichIds.insert( rWhichIds.end(), nId );
......
...@@ -172,7 +172,7 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, ...@@ -172,7 +172,7 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
// search all borders, images, and OLEs that are connected to the paragraph // search all borders, images, and OLEs that are connected to the paragraph
SwDoc* pDoc = rIdx.GetNode().GetDoc(); SwDoc* pDoc = rIdx.GetNode().GetDoc();
sal_uInt16 nChkType = static_cast< sal_uInt16 >((_bAtCharAnchoredObjs) const sal_uInt16 nChkType = static_cast< sal_uInt16 >((_bAtCharAnchoredObjs)
? FLY_AT_CHAR : FLY_AT_PARA); ? FLY_AT_CHAR : FLY_AT_PARA);
const SwCntntFrm* pCFrm; const SwCntntFrm* pCFrm;
const SwCntntNode* pCNd; const SwCntntNode* pCNd;
...@@ -184,7 +184,7 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, ...@@ -184,7 +184,7 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
if( pObjs ) if( pObjs )
{ {
std::list<SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc); std::list<SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
for( sal_uInt16 i = 0; i < pObjs->Count(); ++i ) for( sal_uInt32 i = 0; i < pObjs->Count(); ++i )
{ {
SwAnchoredObject* pAnchoredObj = (*pObjs)[i]; SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt(); SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
...@@ -212,8 +212,8 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, ...@@ -212,8 +212,8 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
else else
{ {
const SwFrmFmts& rFmts = *pDoc->GetSpzFrmFmts(); const SwFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
sal_uInt16 nSize = rFmts.size(); const size_t nSize = rFmts.size();
for ( sal_uInt16 i = 0; i < nSize; i++) for ( size_t i = 0; i < nSize; i++)
{ {
const SwFrmFmt* pFmt = rFmts[ i ]; const SwFrmFmt* pFmt = rFmts[ i ];
const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
...@@ -346,7 +346,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam, ...@@ -346,7 +346,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam, void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam,
SfxItemSet & rSet, const bool bOnlyTxtAttr, const bool bGetFromChrFmt) SfxItemSet & rSet, const bool bOnlyTxtAttr, const bool bGetFromChrFmt)
{ {
static const sal_uInt16 nMaxLookup = 1000; static const sal_uLong nMaxLookup = 1000;
SfxItemSet aSet( *rSet.GetPool(), rSet.GetRanges() ); SfxItemSet aSet( *rSet.GetPool(), rSet.GetRanges() );
SfxItemSet *pSet = &rSet; SfxItemSet *pSet = &rSet;
SwPaM *pCurrent = & rPam; SwPaM *pCurrent = & rPam;
...@@ -1224,9 +1224,9 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos) ...@@ -1224,9 +1224,9 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos)
break; break;
case SwFootnoteStartNode: case SwFootnoteStartNode:
{ {
const sal_uInt16 nFtnCnt = rDoc.GetFtnIdxs().size(); const size_t nFtnCnt = rDoc.GetFtnIdxs().size();
uno::Reference< text::XFootnote > xRef; uno::Reference< text::XFootnote > xRef;
for (sal_uInt16 n = 0; n < nFtnCnt; ++n ) for (size_t n = 0; n < nFtnCnt; ++n )
{ {
const SwTxtFtn* pTxtFtn = rDoc.GetFtnIdxs()[ n ]; const SwTxtFtn* pTxtFtn = rDoc.GetFtnIdxs()[ n ];
const SwFmtFtn& rFtn = pTxtFtn->GetFtn(); const SwFmtFtn& rFtn = pTxtFtn->GetFtn();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment