diff options
Diffstat (limited to 'sw/source/ui/utlui/gloslst.cxx')
-rw-r--r-- | sw/source/ui/utlui/gloslst.cxx | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx index c03a9d0e88..bf1ec6d9c7 100644 --- a/sw/source/ui/utlui/gloslst.cxx +++ b/sw/source/ui/utlui/gloslst.cxx @@ -119,7 +119,7 @@ IMPL_LINK(SwGlossDecideDlg, SelectHdl, ListBox*, EMPTYARG) SwGlossaryList::SwGlossaryList() : - bFilled(FALSE) + bFilled(sal_False) { SvtPathOptions aPathOpt; sPath = aPathOpt.GetAutoTextPath(); @@ -143,7 +143,7 @@ SwGlossaryList::~SwGlossaryList() ********************************************************************/ -BOOL SwGlossaryList::GetShortName(const String& rLongName, +sal_Bool SwGlossaryList::GetShortName(const String& rLongName, String& rShortName, String& rGroupName ) { if(!bFilled) @@ -151,13 +151,13 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName, TripleStrings aTripleStrings; - USHORT nCount = aGroupArr.Count(); - USHORT nFound = 0; - for(USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nCount = aGroupArr.Count(); + sal_uInt16 nFound = 0; + for(sal_uInt16 i = 0; i < nCount; i++ ) { AutoTextGroup* pGroup = aGroupArr.GetObject(i); if(!rGroupName.Len() || rGroupName == pGroup->sName) - for(USHORT j = 0; j < pGroup->nCount; j++) + for(sal_uInt16 j = 0; j < pGroup->nCount; j++) { String sLong = pGroup->sLongNames.GetToken(j, STRING_DELIM); if((rLongName == sLong)) @@ -171,14 +171,14 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName, } } - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; nCount = aTripleStrings.Count(); if(1 == nCount ) { TripleString* pTriple = aTripleStrings[0]; rShortName = pTriple->sShort; rGroupName = pTriple->sGroup; - bRet = TRUE; + bRet = sal_True; } else if(1 < nCount) { @@ -189,7 +189,7 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName, aDlg.SetText(sTitle); ListBox& rLB = aDlg.GetListBox(); - for(USHORT i = 0; i < nCount; i++ ) + for(sal_uInt16 i = 0; i < nCount; i++ ) rLB.InsertEntry(aTripleStrings[i]->sGroup.GetToken(0, GLOS_DELIM)); rLB.SelectEntryPos(0); @@ -199,10 +199,10 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName, TripleString* pTriple = aTripleStrings[rLB.GetSelectEntryPos()]; rShortName = pTriple->sShort; rGroupName = pTriple->sGroup; - bRet = TRUE; + bRet = sal_True; } else - bRet = FALSE; + bRet = sal_False; } return bRet; } @@ -212,7 +212,7 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName, ********************************************************************/ -USHORT SwGlossaryList::GetGroupCount() +sal_uInt16 SwGlossaryList::GetGroupCount() { if(!bFilled) Update(); @@ -224,7 +224,7 @@ USHORT SwGlossaryList::GetGroupCount() ********************************************************************/ -String SwGlossaryList::GetGroupName(USHORT nPos, BOOL bNoPath, String* pTitle) +String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* pTitle) { OSL_ENSURE(aGroupArr.Count() > nPos, "group not available"); String sRet(aEmptyStr); @@ -246,7 +246,7 @@ String SwGlossaryList::GetGroupName(USHORT nPos, BOOL bNoPath, String* pTitle) ********************************************************************/ -USHORT SwGlossaryList::GetBlockCount(USHORT nGroup) +sal_uInt16 SwGlossaryList::GetBlockCount(sal_uInt16 nGroup) { OSL_ENSURE(aGroupArr.Count() > nGroup, "group not available"); if(nGroup < aGroupArr.Count()) @@ -262,7 +262,7 @@ USHORT SwGlossaryList::GetBlockCount(USHORT nGroup) ********************************************************************/ -String SwGlossaryList::GetBlockName(USHORT nGroup, USHORT nBlock, String& rShortName) +String SwGlossaryList::GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName) { OSL_ENSURE(aGroupArr.Count() > nGroup, "group not available"); if(nGroup < aGroupArr.Count()) @@ -289,7 +289,7 @@ void SwGlossaryList::Update() if(sTemp != sPath) { sPath = sTemp; - bFilled = FALSE; + bFilled = sal_False; ClearGroups(); } SwGlossaries* pGlossaries = ::GetGlossaries(); @@ -297,11 +297,11 @@ void SwGlossaryList::Update() String sExt( SwGlossaries::GetExtension() ); if(!bFilled) { - USHORT nGroupCount = pGlossaries->GetGroupCnt(); - for(USHORT i = 0; i < nGroupCount; i++) + sal_uInt16 nGroupCount = pGlossaries->GetGroupCnt(); + for(sal_uInt16 i = 0; i < nGroupCount; i++) { String sGrpName = pGlossaries->GetGroupName(i); - USHORT nPath = (USHORT)sGrpName.GetToken(1, GLOS_DELIM).ToInt32(); + sal_uInt16 nPath = (sal_uInt16)sGrpName.GetToken(1, GLOS_DELIM).ToInt32(); if(nPath < pPathArr->Count()) { AutoTextGroup* pGroup = new AutoTextGroup; @@ -320,11 +320,11 @@ void SwGlossaryList::Update() aGroupArr.Insert( pGroup, i ); } } - bFilled = TRUE; + bFilled = sal_True; } else { - for(USHORT nPath = 0; nPath < pPathArr->Count(); nPath++) + for(sal_uInt16 nPath = 0; nPath < pPathArr->Count(); nPath++) { SvStringsDtor aFoundGroupNames; SvStrings aFiles( 16, 16 ); @@ -332,7 +332,7 @@ void SwGlossaryList::Update() SWUnoHelper::UCB_GetFileListOfFolder( *(*pPathArr)[nPath], aFiles, &sExt, &aDateTimeArr ); - for( USHORT nFiles = 0, nFEnd = aFiles.Count(); + for( sal_uInt16 nFiles = 0, nFEnd = aFiles.Count(); nFiles < nFEnd; ++nFiles ) { String* pTitle = aFiles[ nFiles ]; @@ -365,20 +365,20 @@ void SwGlossaryList::Update() delete pDT; } - USHORT nArrCount = aGroupArr.Count(); - for( USHORT i = nArrCount; i; --i) + sal_uInt16 nArrCount = aGroupArr.Count(); + for( sal_uInt16 i = nArrCount; i; --i) { // evtl. geloeschte Gruppen entfernen AutoTextGroup* pGroup = aGroupArr.GetObject(i - 1); - USHORT nGroupPath = (USHORT)pGroup->sName.GetToken( 1, + sal_uInt16 nGroupPath = (sal_uInt16)pGroup->sName.GetToken( 1, GLOS_DELIM).ToInt32(); // nur die Gruppen werden geprueft, die fuer den // aktuellen Teilpfad registriert sind if(nGroupPath == nPath) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; String sCompareGroup = pGroup->sName.GetToken(0, GLOS_DELIM); - for( USHORT j = 0; j < aFoundGroupNames.Count() && !bFound; ++j) + for( sal_uInt16 j = 0; j < aFoundGroupNames.Count() && !bFound; ++j) { bFound = sCompareGroup == *aFoundGroupNames[j]; } @@ -412,7 +412,7 @@ void SwGlossaryList::Timeout() AutoTextGroup* SwGlossaryList::FindGroup(const String& rGroupName) { - for(USHORT i = 0; i < aGroupArr.Count(); i++) + for(sal_uInt16 i = 0; i < aGroupArr.Count(); i++) { AutoTextGroup* pRet = aGroupArr.GetObject(i); if(pRet->sName == rGroupName) @@ -434,7 +434,7 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries) if(pBlock) pGroup->sTitle = pBlock->GetName(); - for(USHORT j = 0; j < pGroup->nCount; j++) + for(sal_uInt16 j = 0; j < pGroup->nCount; j++) { pGroup->sLongNames += pBlock->GetLongName(j); pGroup->sLongNames += STRING_DELIM; @@ -449,19 +449,19 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries) passendem Anfang zurueckgeben ********************************************************************/ -BOOL SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames ) +sal_Bool SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames ) { if(!bFilled) Update(); - USHORT nFound = 0; - USHORT nCount = aGroupArr.Count(); - USHORT nBeginLen = rBegin.Len(); + sal_uInt16 nFound = 0; + sal_uInt16 nCount = aGroupArr.Count(); + sal_uInt16 nBeginLen = rBegin.Len(); const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore(); - for(USHORT i = 0; i < nCount; i++ ) + for(sal_uInt16 i = 0; i < nCount; i++ ) { AutoTextGroup* pGroup = aGroupArr.GetObject(i); - for(USHORT j = 0; j < pGroup->nCount; j++) + for(sal_uInt16 j = 0; j < pGroup->nCount; j++) { String sBlock = pGroup->sLongNames.GetToken(j, STRING_DELIM); if( rSCmp.isEqual( sBlock.Copy(0, nBeginLen), rBegin ) && @@ -483,12 +483,12 @@ BOOL SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLong ********************************************************************/ void SwGlossaryList::ClearGroups() { - USHORT nCount = aGroupArr.Count(); - for( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = aGroupArr.Count(); + for( sal_uInt16 i = 0; i < nCount; ++i ) delete aGroupArr.GetObject( i ); aGroupArr.Remove( 0, nCount ); - bFilled = FALSE; + bFilled = sal_False; } |