diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-21 12:23:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-21 14:26:32 +0100 |
commit | 91e181ea585855bea97a07823f7334d0b98b20d5 (patch) | |
tree | 2578b79ddca097390802b5d2f5d5676d6a7821ff /svx | |
parent | 958f7b512cff932f7f2d52d128c297d0f0ab6354 (diff) |
remove uses of COMPARE_*
Change-Id: Icdc36b4b24d2f399f481065df3200feb98025135
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/ctredlin.cxx | 16 | ||||
-rw-r--r-- | svx/source/form/fmshimp.cxx | 2 | ||||
-rw-r--r-- | svx/source/sidebar/nbdtmg.cxx | 9 | ||||
-rw-r--r-- | svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 12 | ||||
-rw-r--r-- | svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx | 2 |
5 files changed, 19 insertions, 22 deletions
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index 082421eb4997..254dad624d08 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -148,16 +148,16 @@ SvxRedlinTable::~SvxRedlinTable() delete pCommentSearcher; } -StringCompare SvxRedlinTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* pRight) +sal_Int32 SvxRedlinTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* pRight) { - StringCompare eCompare=COMPARE_EQUAL; + sal_Int32 nCompare = 0; if(aColCompareLink.IsSet()) { SvSortData aRedlinCompare; aRedlinCompare.pLeft=pLeft; aRedlinCompare.pRight=pRight; - eCompare=(StringCompare) aColCompareLink.Call(&aRedlinCompare); + nCompare = aColCompareLink.Call(&aRedlinCompare); } else { @@ -170,24 +170,24 @@ StringCompare SvxRedlinTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* { if(pLeftData->aDateTime < pRightData->aDateTime) { - eCompare=COMPARE_LESS; + nCompare = -1; } else if(pLeftData->aDateTime > pRightData->aDateTime) { - eCompare=COMPARE_GREATER; + nCompare = 1; } } else - eCompare=SvSimpleTable::ColCompare(pLeft,pRight); + nCompare = SvSimpleTable::ColCompare(pLeft,pRight); } else { - eCompare=SvSimpleTable::ColCompare(pLeft,pRight); + nCompare = SvSimpleTable::ColCompare(pLeft,pRight); } } - return eCompare; + return nCompare; } void SvxRedlinTable::SetCalcView(sal_Bool bFlag) { diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 52a531ca8424..2a1cd955cdd7 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -425,7 +425,7 @@ namespace const OUString* pMethodsNames = aMethodsNames.getConstArray(); for (k=0; k<aMethodsNames.getLength(); ++k, ++pMethodsNames) { - if ((*pMethodsNames).compareTo(pCurrent->EventMethod) != COMPARE_EQUAL) + if ((*pMethodsNames) != pCurrent->EventMethod) // the current ScriptEventDescriptor doesn't match the current listeners current method continue; diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 54af4a1c1b10..da61e05cdf57 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -370,7 +370,7 @@ sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLe { if ( (cChar == pActualBullets[i]->cBulletChar|| (cChar == 9830 && 57356 == pActualBullets[i]->cBulletChar) || - (cChar == 9632 && 57354 == pActualBullets[i]->cBulletChar)))// && pFont && (pFont->GetName().CompareTo(pActualBullets[i]->aFont.GetName())==COMPARE_EQUAL)) + (cChar == 9632 && 57354 == pActualBullets[i]->cBulletChar))) { return i+1; } @@ -638,13 +638,12 @@ sal_uInt16 GraphyicBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uI if ( pGrf ) { - //const String* pGrfName = pBrsh->GetGraphicLink(); Graphic aGraphic; for (sal_uInt16 i=0; i < aGrfDataLst.size(); ++i) { GrfBulDataRelation* pEntry = aGrfDataLst[i]; sal_Bool bExist = sal_False; - if ( pEntry) // && pEntry->sGrfName.CompareTo(*pGrfName)==COMPARE_EQUAL ) + if ( pEntry) bExist = GalleryExplorer::GetGraphicObj(GALLERY_THEME_BULLETS, pEntry->nGallaryIndex,&aGraphic); if (bExist) { Bitmap aSum=pGrf->GetBitmap(); @@ -988,7 +987,6 @@ sal_uInt16 MixBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 if ( (cChar == ((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->cBulletChar|| (cChar == 9830 && 57356 == ((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->cBulletChar) || (cChar == 9632 && 57354 == ((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->cBulletChar)))//&& - //(pFont && pFont->GetName().CompareTo(((BulletsSettings_Impl*)(pActualBullets[i]->pBullets))->aFont.GetName())==COMPARE_EQUAL) ) { return pActualBullets[i]->nIndex; } @@ -1016,8 +1014,7 @@ sal_uInt16 MixBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 { return pActualBullets[i]->nIndex; } - }else { //if ( pEntry && pGrfName && pEntry->sGrfName.CompareTo(*pGrfName)==COMPARE_EQUAL ) - //bExist = GalleryExplorer::GetGraphicObj(GALLERY_THEME_BULLETS, pActualBullets[i]->nIndexDefault-1,pSrGrf); + }else { Graphic aSrGrf; if (pEntry) GalleryExplorer::GetGraphicObj(GALLERY_THEME_BULLETS, pActualBullets[i]->nIndexDefault,&aSrGrf); diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 301acda9aaa1..5f2d1388d906 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -372,9 +372,9 @@ IMPL_LINK( DictionaryList, CompareHdl, SvSortData*, pData ) return (long) ColumnCompare(pLeft,pRight); } -StringCompare DictionaryList::ColumnCompare( SvTreeListEntry* pLeft, SvTreeListEntry* pRight ) +sal_Int32 DictionaryList::ColumnCompare( SvTreeListEntry* pLeft, SvTreeListEntry* pRight ) { - StringCompare eCompare=COMPARE_EQUAL; + sal_Int32 nCompare = 0; SvLBoxItem* pLeftItem = getItemAtColumn( pLeft, m_nSortColumnIndex ); SvLBoxItem* pRightItem = getItemAtColumn( pRight, m_nSortColumnIndex ); @@ -390,14 +390,14 @@ StringCompare DictionaryList::ColumnCompare( SvTreeListEntry* pLeft, SvTreeListE IntlWrapper aIntlWrapper( Application::GetSettings().GetLanguageTag() ); const CollatorWrapper* pCollator = aIntlWrapper.getCaseCollator(); - eCompare=(StringCompare)pCollator->compareString( ((SvLBoxString*)pLeftItem)->GetText(), + nCompare = pCollator->compareString( ((SvLBoxString*)pLeftItem)->GetText(), ((SvLBoxString*)pRightItem)->GetText()); - if(eCompare==COMPARE_EQUAL) - eCompare=COMPARE_LESS; + if (nCompare == 0) + nCompare = -1; } } - return eCompare; + return nCompare; } SvLBoxItem* DictionaryList::getItemAtColumn( SvTreeListEntry* pEntry, sal_uInt16 nColumn ) const diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx index ac645eb7faf1..7d76e36974aa 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx @@ -99,7 +99,7 @@ private: OUString makeTabString( const DictionaryEntry& rEntry ) const; DECL_LINK( CompareHdl, SvSortData* ); - StringCompare ColumnCompare( SvTreeListEntry* pLeft, SvTreeListEntry* pRight ); + sal_Int32 ColumnCompare( SvTreeListEntry* pLeft, SvTreeListEntry* pRight ); SvLBoxItem* getItemAtColumn( SvTreeListEntry* pEntry, sal_uInt16 nColumn ) const; public: |