diff options
author | Jian Hong Cheng <chengjh@apache.org> | 2012-12-03 14:09:34 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-01 11:23:56 +0000 |
commit | d0b30f90d4be58ba78fded099f25a75d3cf88d56 (patch) | |
tree | 3f15a7c9ca98f25edcbe6cbcb344b730c5a0ecb5 | |
parent | 40543e5321c8f618c125fd6f7f9a24b87431277a (diff) |
Made some changes to remove the compile warnings...
on the comparison between un-uniform data types
(cherry picked from commit e0705e2a87726c6d8a04eae624d4f032c5d596ce)
Conflicts:
sw/source/filter/ww8/wrtw8esh.cxx
sw/source/filter/ww8/wrtww8.cxx
sw/source/filter/ww8/ww8par.cxx
sw/source/filter/ww8/ww8par.hxx
sw/source/filter/ww8/ww8par3.cxx
Change-Id: I1e6931e01fdcce6c1a4e98a86fcbc08f5e0933bd
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 15 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 |
3 files changed, 16 insertions, 11 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 24ab7c4f9328..627ed854a0f4 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -305,7 +305,7 @@ void WW8_WrtBookmarks::MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo) { if (aItr->second) { - if (aItr->second->first == nFrom) + if (aItr->second->first == (long)nFrom) { aItr->second->second.first = true; aItr->second->first = nTo; @@ -1407,8 +1407,8 @@ int MSWordExportBase::CollectGrfsOfBullets() if ( pDoc ) { - int nCountRule = pDoc->GetNumRuleTbl().size(); - for (int n = 0; n < nCountRule; ++n) + size_t nCountRule = pDoc->GetNumRuleTbl().size(); + for (size_t n = 0; n < nCountRule; ++n) { const SwNumRule &rRule = *( pDoc->GetNumRuleTbl().at(n) ); sal_uInt16 nLevels = rRule.IsContinusNum() ? 1 : 9; @@ -1423,7 +1423,7 @@ int MSWordExportBase::CollectGrfsOfBullets() if ( pGraf ) { bool bHas = false; - for (unsigned i = 0; i < m_vecBulletPic.size(); ++i) + for (size_t i = 0; i < m_vecBulletPic.size(); ++i) { if (m_vecBulletPic[i]->GetChecksum() == pGraf->GetChecksum()) { @@ -1522,7 +1522,7 @@ int MSWordExportBase::GetGrfIndex(const SvxBrushItem& rBrush) int nIndex = -1; if ( rBrush.GetGraphic() ) { - for (unsigned i = 0; i < m_vecBulletPic.size(); ++i) + for (size_t i = 0; i < m_vecBulletPic.size(); ++i) { if (m_vecBulletPic[i]->GetChecksum() == rBrush.GetGraphic()->GetChecksum()) { diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index c74f8bda1180..6ff803e90020 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -2589,12 +2589,17 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) && pData->GetId() == SW_UD_IMAPDATA) { SwMacroInfo* macInf = dynamic_cast<SwMacroInfo*>(pData); - if( macInf && macInf->GetShapeId() == pF->nSpId) + + if( macInf )// && macInf->GetShapeId() == pF->nSpId) { - lnName = macInf->GetHlink(); - aObjName = macInf->GetName(); - aTarFrm = macInf->GetTarFrm(); - break; + sal_Int32 nShapeId = macInf->GetShapeId(); + if ( nShapeId == pF->nSpId ) + { + lnName = macInf->GetHlink(); + aObjName = macInf->GetName(); + aTarFrm = macInf->GetTarFrm(); + break; + } } } } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 038287378d03..cc4336f9655a 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5194,7 +5194,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) for (size_t i = 0; i < nCount; ++i) { SwNumRule* pRule = pLstManager->GetNumRule(i); - for (int j = 0; j < MAXLEVEL; ++j) + for (sal_uInt16 j = 0; j < MAXLEVEL; ++j) { SwNumFmt aNumFmt(pRule->Get(j)); const sal_Int16 nType = aNumFmt.GetNumberingType(); |