diff options
Diffstat (limited to 'sw/source/ui/misc')
-rw-r--r-- | sw/source/ui/misc/bookmark.cxx | 42 | ||||
-rw-r--r-- | sw/source/ui/misc/docfnote.cxx | 52 | ||||
-rw-r--r-- | sw/source/ui/misc/glosbib.cxx | 88 | ||||
-rw-r--r-- | sw/source/ui/misc/glosdoc.cxx | 14 | ||||
-rw-r--r-- | sw/source/ui/misc/glossary.cxx | 22 | ||||
-rw-r--r-- | sw/source/ui/misc/glshell.cxx | 26 | ||||
-rw-r--r-- | sw/source/ui/misc/impfnote.hxx | 8 | ||||
-rw-r--r-- | sw/source/ui/misc/insfnote.cxx | 52 | ||||
-rw-r--r-- | sw/source/ui/misc/insrule.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/misc/linenum.cxx | 28 | ||||
-rw-r--r-- | sw/source/ui/misc/num.cxx | 164 | ||||
-rw-r--r-- | sw/source/ui/misc/numberingtypelistbox.cxx | 20 | ||||
-rw-r--r-- | sw/source/ui/misc/outline.cxx | 220 | ||||
-rw-r--r-- | sw/source/ui/misc/pgfnote.cxx | 46 | ||||
-rw-r--r-- | sw/source/ui/misc/pggrid.cxx | 18 | ||||
-rw-r--r-- | sw/source/ui/misc/redlndlg.cxx | 226 | ||||
-rw-r--r-- | sw/source/ui/misc/srtdlg.cxx | 82 | ||||
-rw-r--r-- | sw/source/ui/misc/swmodalredlineacceptdlg.cxx | 16 |
18 files changed, 566 insertions, 566 deletions
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index feae6a64398a..77ce091d454b 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -53,17 +53,17 @@ const String BookmarkCombo::aForbiddenChars = String::CreateFromAscii("/\\@:*?\" IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox ) { - BOOL bSelEntries = pBox->GetSelectEntryCount() != 0; + sal_Bool bSelEntries = pBox->GetSelectEntryCount() != 0; // if a string has been pasted from the clipboard then // there may be illegal characters in the box if(!bSelEntries) { String sTmp = pBox->GetText(); - USHORT nLen = sTmp.Len(); + sal_uInt16 nLen = sTmp.Len(); String sMsg; - for(USHORT i = 0; i < BookmarkCombo::aForbiddenChars.Len(); i++) + for(sal_uInt16 i = 0; i < BookmarkCombo::aForbiddenChars.Len(); i++) { - USHORT nTmpLen = sTmp.Len(); + sal_uInt16 nTmpLen = sTmp.Len(); sTmp.EraseAllChars(BookmarkCombo::aForbiddenChars.GetChar(i)); if(sTmp.Len() != nTmpLen) sMsg += BookmarkCombo::aForbiddenChars.GetChar(i); @@ -93,11 +93,11 @@ IMPL_LINK( SwInsertBookmarkDlg, DeleteHdl, Button *, EMPTYARG ) { // Textmarken aus der ComboBox entfernen - for (USHORT i = aBookmarkBox.GetSelectEntryCount(); i; i-- ) + for (sal_uInt16 i = aBookmarkBox.GetSelectEntryCount(); i; i-- ) aBookmarkBox.RemoveEntry(aBookmarkBox.GetSelectEntryPos(i - 1)); aBookmarkBox.SetText(aEmptyStr); - aDeleteBtn.Enable(FALSE); // keine weiteren Eintraege vorhanden + aDeleteBtn.Enable(sal_False); // keine weiteren Eintraege vorhanden // aBookmarkBox.SetText(aEmptyStr); aOkBtn.Enable(); // Im OK Handler wird geloescht @@ -115,7 +115,7 @@ void SwInsertBookmarkDlg::Apply() { //at first remove deleted bookmarks to prevent multiple bookmarks with the same //name - for (USHORT nCount = aBookmarkBox.GetRemovedCount(); nCount > 0; nCount--) + for (sal_uInt16 nCount = aBookmarkBox.GetRemovedCount(); nCount > 0; nCount--) { String sRemoved = aBookmarkBox.GetRemovedEntry( nCount -1 ).GetName(); IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess(); @@ -126,7 +126,7 @@ void SwInsertBookmarkDlg::Apply() } // Textmarke einfuegen - USHORT nLen = aBookmarkBox.GetText().Len(); + sal_uInt16 nLen = aBookmarkBox.GetText().Len(); SwBoxEntry aTmpEntry(aBookmarkBox.GetText(), 0 ); if ( nLen && (aBookmarkBox.GetEntryPos(aTmpEntry) == COMBOBOX_ENTRY_NOTFOUND) ) @@ -162,14 +162,14 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRe rReq( rRequest ) { aBookmarkBox.SetModifyHdl(LINK(this, SwInsertBookmarkDlg, ModifyHdl)); - aBookmarkBox.EnableMultiSelection(TRUE); - aBookmarkBox.EnableAutocomplete( TRUE, TRUE ); + aBookmarkBox.EnableMultiSelection(sal_True); + aBookmarkBox.EnableAutocomplete( sal_True, sal_True ); aDeleteBtn.SetClickHdl(LINK(this, SwInsertBookmarkDlg, DeleteHdl)); // Combobox mit vorhandenen Bookmarks fuellen IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess(); - USHORT nId = 0; + sal_uInt16 nId = 0; for( IDocumentMarkAccess::const_iterator_t ppBookmark = pMarkAccess->getBookmarksBegin(); ppBookmark != pMarkAccess->getBookmarksEnd(); ppBookmark++) @@ -202,7 +202,7 @@ BookmarkCombo::BookmarkCombo( Window* pWin, const ResId& rResId ) : Beschreibung: -----------------------------------------------------------------------*/ -USHORT BookmarkCombo::GetFirstSelEntryPos() const +sal_uInt16 BookmarkCombo::GetFirstSelEntryPos() const { return GetSelEntryPos(0); } @@ -211,7 +211,7 @@ USHORT BookmarkCombo::GetFirstSelEntryPos() const Beschreibung: -----------------------------------------------------------------------*/ -USHORT BookmarkCombo::GetNextSelEntryPos(USHORT nPos) const +sal_uInt16 BookmarkCombo::GetNextSelEntryPos(sal_uInt16 nPos) const { return GetSelEntryPos(nPos + 1); } @@ -220,11 +220,11 @@ USHORT BookmarkCombo::GetNextSelEntryPos(USHORT nPos) const Beschreibung: -----------------------------------------------------------------------*/ -USHORT BookmarkCombo::GetSelEntryPos(USHORT nPos) const +sal_uInt16 BookmarkCombo::GetSelEntryPos(sal_uInt16 nPos) const { sal_Unicode cSep = GetMultiSelectionSeparator(); - USHORT nCnt = GetText().GetTokenCount(cSep); + sal_uInt16 nCnt = GetText().GetTokenCount(cSep); for (; nPos < nCnt; nPos++) { @@ -242,11 +242,11 @@ USHORT BookmarkCombo::GetSelEntryPos(USHORT nPos) const Beschreibung: -----------------------------------------------------------------------*/ -USHORT BookmarkCombo::GetSelectEntryCount() const +sal_uInt16 BookmarkCombo::GetSelectEntryCount() const { - USHORT nCnt = 0; + sal_uInt16 nCnt = 0; - USHORT nPos = GetFirstSelEntryPos(); + sal_uInt16 nPos = GetFirstSelEntryPos(); while (nPos != COMBOBOX_ENTRY_NOTFOUND) { nPos = GetNextSelEntryPos(nPos); @@ -260,10 +260,10 @@ USHORT BookmarkCombo::GetSelectEntryCount() const Beschreibung: Position in der Listbox (der ComboBox) -----------------------------------------------------------------------*/ -USHORT BookmarkCombo::GetSelectEntryPos( USHORT nSelIndex ) const +sal_uInt16 BookmarkCombo::GetSelectEntryPos( sal_uInt16 nSelIndex ) const { - USHORT nCnt = 0; - USHORT nPos = GetFirstSelEntryPos(); + sal_uInt16 nCnt = 0; + sal_uInt16 nPos = GetFirstSelEntryPos(); while (nPos != COMBOBOX_ENTRY_NOTFOUND) { diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 67fc32bcf1c9..9e2b1caa3894 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -81,7 +81,7 @@ SwFootNoteOptionDlg::SwFootNoteOptionDlg( Window *pParent, SwWrtShell &rS ) : AddTabPage( TP_ENDNOTEOPTION, SwEndNoteOptionPage::Create, 0 ); } -void SwFootNoteOptionDlg::PageCreated( USHORT /*nId*/, SfxTabPage &rPage ) +void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage ) { ((SwEndNoteOptionPage&)rPage).SetShell( rSh ); } @@ -107,7 +107,7 @@ IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn ) //---------------------------------------------------------------------- -SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN, +SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, sal_Bool bEN, const SfxItemSet &rSet ) : SfxTabPage( pParent, SW_RES(bEN ? TP_ENDNOTEOPTION : TP_FOOTNOTEOPTION), rSet ), aNumTypeFT (this, SW_RES( FT_NUMTYPE )), @@ -147,7 +147,7 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN, aNumPage(aNumCountBox.GetEntry(FTNNUM_PAGE)), aNumChapter(aNumCountBox.GetEntry(FTNNUM_CHAPTER)), pSh( 0 ), - bPosDoc(FALSE), + bPosDoc(sal_False), bEndNote( bEN ) { FreeResource(); @@ -163,7 +163,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo( pSh->GetEndNoteInfo() ) : new SwFtnInfo( pSh->GetFtnInfo() ); SfxObjectShell * pDocSh = SfxObjectShell::Current(); - USHORT i; + sal_uInt16 i; if(PTR_CAST(SwWebDocShell, pDocSh)) { @@ -188,7 +188,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) aContFromLbl.Hide(); aContFromEdit.Hide(); aContFL.Hide(); - bPosDoc = TRUE; + bPosDoc = sal_True; } else { @@ -197,15 +197,15 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) if ( rInf.ePos == FTNPOS_PAGE ) { aPosPageBox.Check(); - aPageTemplLbl.Enable(FALSE); - aPageTemplBox.Enable(FALSE); + aPageTemplLbl.Enable(sal_False); + aPageTemplBox.Enable(sal_False); } else // if ( rInf.ePos == FTNPOS_CHAPTER ) { aPosChapterBox.Check(); aNumCountBox.RemoveEntry(aNumPage); aNumCountBox.RemoveEntry(aNumChapter); - bPosDoc = TRUE; + bPosDoc = sal_True; } // Verweistexte aContEdit.SetText(rInf.aQuoVadis); @@ -254,7 +254,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) else { ASSERT(!pColl->IsDefault(), "Defaultvorlage fuer Fussnoten ist falsch."); - const USHORT nPos = aParaTemplBox.GetEntryPos(pColl->GetName()); + const sal_uInt16 nPos = aParaTemplBox.GetEntryPos(pColl->GetName()); if( LISTBOX_ENTRY_NOTFOUND != nPos ) aParaTemplBox.SelectEntryPos( nPos ); else @@ -268,7 +268,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) for( i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i ) aPageTemplBox.InsertEntry(SwStyleNameMapper::GetUIName( i, aEmptyStr )); - USHORT nCount = pSh->GetPageDescCnt(); + sal_uInt16 nCount = pSh->GetPageDescCnt(); for(i = 0; i < nCount; ++i) { const SwPageDesc &rPageDesc = pSh->GetPageDesc(i); @@ -286,7 +286,7 @@ SwEndNoteOptionPage::~SwEndNoteOptionPage() SfxTabPage *SwEndNoteOptionPage::Create( Window *pParent, const SfxItemSet &rSet ) { - return new SwEndNoteOptionPage( pParent, TRUE, rSet ); + return new SwEndNoteOptionPage( pParent, sal_True, rSet ); } /*------------------------------------------------------------------------ @@ -322,7 +322,7 @@ void SwEndNoteOptionPage::SelectNumbering(int eNum) int SwEndNoteOptionPage::GetNumbering() const { - const USHORT nPos = aNumCountBox.GetSelectEntryPos(); + const sal_uInt16 nPos = aNumCountBox.GetSelectEntryPos(); return (int) bPosDoc? nPos + 1: nPos; } @@ -353,15 +353,15 @@ void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell ) IMPL_LINK( SwEndNoteOptionPage, PosPageHdl, Button *, EMPTYARG ) { const SwFtnNum eNum = (const SwFtnNum)GetNumbering(); - bPosDoc = FALSE; + bPosDoc = sal_False; if(LISTBOX_ENTRY_NOTFOUND == aNumCountBox.GetEntryPos(aNumPage)) { aNumCountBox.InsertEntry(aNumPage, FTNNUM_PAGE); aNumCountBox.InsertEntry(aNumChapter, FTNNUM_CHAPTER); SelectNumbering(eNum); } - aPageTemplLbl.Enable(FALSE); - aPageTemplBox.Enable(FALSE); + aPageTemplLbl.Enable(sal_False); + aPageTemplBox.Enable(sal_False); return 0; } @@ -373,10 +373,10 @@ IMPL_LINK( SwEndNoteOptionPage, PosPageHdl, Button *, EMPTYARG ) IMPL_LINK( SwEndNoteOptionPage, NumCountHdl, ListBox*, EMPTYARG ) { - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; if( aNumCountBox.GetEntryCount() - 1 != aNumCountBox.GetSelectEntryPos() ) { - bEnable = FALSE; + bEnable = sal_False; aOffsetFld.SetValue(1); } aOffsetLbl.Enable(bEnable); @@ -397,7 +397,7 @@ IMPL_LINK_INLINE_START( SwEndNoteOptionPage, PosChapterHdl, Button *, EMPTYARG ) if ( !bPosDoc ) SelectNumbering(FTNNUM_DOC); - bPosDoc = TRUE; + bPosDoc = sal_True; aNumCountBox.RemoveEntry(aNumPage); aNumCountBox.RemoveEntry(aNumChapter); aPageTemplLbl.Enable(); @@ -409,8 +409,8 @@ IMPL_LINK_INLINE_END( SwEndNoteOptionPage, PosChapterHdl, Button *, EMPTYARG ) SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const String& rCharFmtName ) { SwCharFmt* pFmt = 0; - USHORT nChCount = pSh->GetCharFmtCount(); - for(USHORT i = 0; i< nChCount; i++) + sal_uInt16 nChCount = pSh->GetCharFmtCount(); + for(sal_uInt16 i = 0; i< nChCount; i++) { SwCharFmt& rChFmt = pSh->GetCharFmt(i); if(rChFmt.GetName() == rCharFmtName ) @@ -431,11 +431,11 @@ SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const String& rCharFmtName ) return pFmt; } -BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & ) +sal_Bool SwEndNoteOptionPage::FillItemSet( SfxItemSet & ) { SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo() : new SwFtnInfo(); - pInf->nFtnOffset = static_cast< USHORT >(aOffsetFld.GetValue() -1); + pInf->nFtnOffset = static_cast< sal_uInt16 >(aOffsetFld.GetValue() -1); pInf->aFmt.SetNumberingType(aNumViewBox.GetSelectedNumberingType() ); pInf->SetPrefix(aPrefixED.GetText()); pInf->SetSuffix(aSuffixED.GetText()); @@ -446,7 +446,7 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & ) aFtnCharAnchorTemplBox.GetSelectEntry() ) ); // Absatzvorlage - USHORT nPos = aParaTemplBox.GetSelectEntryPos(); + sal_uInt16 nPos = aParaTemplBox.GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nPos) { const String aFmtName( aParaTemplBox.GetSelectEntry() ); @@ -457,7 +457,7 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & ) // Seitenvorlage pInf->ChgPageDesc( pSh->FindPageDescByName( - aPageTemplBox.GetSelectEntry(), TRUE ) ); + aPageTemplBox.GetSelectEntry(), sal_True ) ); if ( bEndNote ) { @@ -475,11 +475,11 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & ) pSh->SetFtnInfo( *pI ); } delete pInf; - return TRUE; + return sal_True; } SwFootNoteOptionPage::SwFootNoteOptionPage( Window *pParent, const SfxItemSet &rSet ) : - SwEndNoteOptionPage( pParent, FALSE, rSet ) + SwEndNoteOptionPage( pParent, sal_False, rSet ) { } diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index e462eb7530b6..64392b6a6d6f 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -96,7 +96,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, pRenamedArr(0), pGlosHdl(pHdl) { - USHORT i; + sal_uInt16 i; FreeResource(); @@ -121,7 +121,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, INetURLObject aTempURL(sPath); sPath = aTempURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET ); aPathLB.InsertEntry(sPath); - ULONG nCaseReadonly = 0; + sal_uLong nCaseReadonly = 0; utl::TempFile aTempFile(&sPath); aTempFile.EnableKillingFile(); if(!aTempFile.IsValid()) @@ -131,9 +131,9 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, aPathLB.SetEntryData(i, (void*)nCaseReadonly); } aPathLB.SelectEntryPos(0); - aPathLB.Enable(TRUE); + aPathLB.Enable(sal_True); - const USHORT nCount = pHdl->GetGroupCnt(); + const sal_uInt16 nCount = pHdl->GetGroupCnt(); for(i = 0; i < nCount; ++i) { String sTitle; @@ -146,7 +146,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, String sTemp(sTitle); //sGroup.GetToken(0, GLOS_DELIM) sTemp += '\t'; - pData->sPath = aPathLB.GetEntry((USHORT)sGroup.GetToken(1, GLOS_DELIM).ToInt32()); + pData->sPath = aPathLB.GetEntry((sal_uInt16)sGroup.GetToken(1, GLOS_DELIM).ToInt32()); sTemp += pData->sPath; SvLBoxEntry* pEntry = aGroupTLB.InsertEntry(sTemp); pEntry->SetUserData(pData); @@ -192,8 +192,8 @@ void __EXPORT SwGlossaryGroupDlg::Apply() if(pRemovedArr && pRemovedArr->Count()) { - USHORT nCount = pRemovedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pRemovedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const String* pDelEntry = (*pRemovedArr)[i]; const String sDelGroup = pDelEntry->GetToken(0, '\t'); @@ -224,8 +224,8 @@ void __EXPORT SwGlossaryGroupDlg::Apply() //erst umbenennen, falls es schon eins gab if(pRenamedArr && pRenamedArr->Count()) { - USHORT nCount = pRenamedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pRenamedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { String * pEntry = (*pRenamedArr)[i]; xub_StrLen nStrSttPos = 0; @@ -239,8 +239,8 @@ void __EXPORT SwGlossaryGroupDlg::Apply() } if(pInsertedArr && pInsertedArr->Count()) { - USHORT nCount = pInsertedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pInsertedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { String sNewGroup = *(*pInsertedArr)[i]; String sNewTitle = sNewGroup.GetToken(0, GLOS_DELIM); @@ -258,15 +258,15 @@ void __EXPORT SwGlossaryGroupDlg::Apply() --------------------------------------------------*/ IMPL_LINK( SwGlossaryGroupDlg, SelectHdl, SvTabListBox*, EMPTYARG ) { - aNewPB.Enable(FALSE); + aNewPB.Enable(sal_False); SvLBoxEntry* pFirstEntry = aGroupTLB.FirstSelected(); if(pFirstEntry) { GlosBibUserData* pUserData = (GlosBibUserData*)pFirstEntry->GetUserData(); String sEntry(pUserData->sGroupName); String sName(aNameED.GetText()); - BOOL bExists = FALSE; - ULONG nPos = aGroupTLB.GetEntryPos(sName, 0); + sal_Bool bExists = sal_False; + sal_uLong nPos = aGroupTLB.GetEntryPos(sName, 0); if( 0xffffffff > nPos) { SvLBoxEntry* pEntry = aGroupTLB.GetEntry(nPos); @@ -318,24 +318,24 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton ) SvLBoxEntry* pEntry = aGroupTLB.FirstSelected(); if(!pEntry) { - pButton->Enable(FALSE); + pButton->Enable(sal_False); return 0; } GlosBibUserData* pUserData = (GlosBibUserData*)pEntry->GetUserData(); String sEntry(pUserData->sGroupName); // befindet sich der zu loeschende Name schon unter den // den neuen - dann weg damit - BOOL bDelete = TRUE; + sal_Bool bDelete = sal_True; if(pInsertedArr && pInsertedArr->Count()) { - USHORT nCount = pInsertedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pInsertedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const String* pTemp = (*pInsertedArr)[i]; if(*pTemp == sEntry) { pInsertedArr->Remove(i); - bDelete = FALSE; + bDelete = sal_False; break; } @@ -346,15 +346,15 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton ) { if(pRenamedArr && pRenamedArr->Count()) { - USHORT nCount = pRenamedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pRenamedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const String* pTemp = (*pRenamedArr)[i]; String sTemp( pTemp->GetToken(0, RENAME_TOKEN_DELIM )); if(sTemp == sEntry) { pRenamedArr->Remove(i); - bDelete = FALSE; + bDelete = sal_False; break; } } @@ -372,7 +372,7 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton ) delete pUserData; aGroupTLB.GetModel()->Remove(pEntry); if(!aGroupTLB.First()) - pButton->Enable(FALSE); + pButton->Enable(sal_False); //the content must be deleted - otherwise the new handler would be called in Apply() aNameED.SetText(aEmptyStr); return 0; @@ -397,18 +397,18 @@ IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG ) // befindet sich der umzubenennende Name unter den // den neuen - dann austauschen - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if(pInsertedArr && pInsertedArr->Count()) { - USHORT nCount = pInsertedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pInsertedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const String* pTemp = (*pInsertedArr)[i]; if(*pTemp == sEntry) { pInsertedArr->Remove(i); pInsertedArr->Insert(new String(sNewName), pInsertedArr->Count()); - bDone = TRUE; + bDone = sal_True; break; } } @@ -447,17 +447,17 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG ) { String sEntry(aNameED.GetText()); // sEntry.ToLower(); - BOOL bEnableNew = TRUE; - BOOL bEnableDel = FALSE; - ULONG nCaseReadonly = - (ULONG)aPathLB.GetEntryData(aPathLB.GetSelectEntryPos()); - BOOL bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY); + sal_Bool bEnableNew = sal_True; + sal_Bool bEnableDel = sal_False; + sal_uLong nCaseReadonly = + (sal_uLong)aPathLB.GetEntryData(aPathLB.GetSelectEntryPos()); + sal_Bool bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY); if(!sEntry.Len() || bDirReadonly) - bEnableNew = FALSE; + bEnableNew = sal_False; else if(sEntry.Len()) { - ULONG nPos = 0xffffffff; + sal_uLong nPos = 0xffffffff; nPos = aGroupTLB.GetEntryPos(sEntry, 0); @@ -465,12 +465,12 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG ) if( 0xffffffff == nPos) { const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore(); - for(USHORT i = 0; i < aGroupTLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < aGroupTLB.GetEntryCount(); i++) { String sTemp = aGroupTLB.GetEntryText( i, 0 ); - nCaseReadonly = (ULONG)aPathLB.GetEntryData( + nCaseReadonly = (sal_uLong)aPathLB.GetEntryData( aPathLB.GetEntryPos(aGroupTLB.GetEntryText(i,1))); - BOOL bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE); + sal_Bool bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE); if( !bCase && rSCmp.isEqual( sTemp, sEntry )) { @@ -481,7 +481,7 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG ) } if( 0xffffffff > nPos) { - bEnableNew = FALSE; + bEnableNew = sal_False; aGroupTLB.Select(aGroupTLB.GetEntry( nPos )); aGroupTLB.MakeVisible(aGroupTLB.GetEntry( nPos )); } @@ -508,23 +508,23 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG ) Beschreibung: ------------------------------------------------------------------------*/ -BOOL SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup) +sal_Bool SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup) { - BOOL bDel = (!pGlosHdl->IsReadOnly(&rGroup)); + sal_Bool bDel = (!pGlosHdl->IsReadOnly(&rGroup)); // OM: befindet sich der Name unter den den neuen Bereichsnamen, // dann ist er auch loeschbar! Bei noch nicht existenten Bereichsnamen - // liefert ReadOnly naemlich TRUE. + // liefert ReadOnly naemlich sal_True. if(pInsertedArr && pInsertedArr->Count()) { - USHORT nCount = pInsertedArr->Count(); - for(USHORT i = 0; i < nCount; ++i) + sal_uInt16 nCount = pInsertedArr->Count(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const String* pTemp = (*pInsertedArr)[i]; if(*pTemp == rGroup) { - bDel = TRUE; + bDel = sal_True; break; } } diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx index 6ed886fb3974..2545da326b11 100644 --- a/sw/source/ui/misc/glosdoc.cxx +++ b/sw/source/ui/misc/glosdoc.cxx @@ -87,7 +87,7 @@ String lcl_CheckFileName( const String& rNewFilePath, sRet.EraseLeadingChars(); sRet.EraseTrailingChars(); - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; if( sRet.Len() ) { String sTmpDir(rNewFilePath); @@ -270,7 +270,7 @@ sal_Bool SwGlossaries::RenameGroupDoc( sOldFileURL += INET_PATH_TOKEN; sOldFileURL += rOldGroup.GetToken(0, GLOS_DELIM); sOldFileURL += SwGlossaries::GetExtension(); - BOOL bExist = FStatHelper::IsDocument( sOldFileURL ); + sal_Bool bExist = FStatHelper::IsDocument( sOldFileURL ); DBG_ASSERT(bExist, "Gruppe existiert nicht!"); if(bExist) { @@ -290,8 +290,8 @@ sal_Bool SwGlossaries::RenameGroupDoc( DBG_ASSERT(!bExist, "Gruppe existiert bereits!"); if(!bExist) { - BOOL bCopyCompleted = SWUnoHelper::UCB_CopyFile( - sOldFileURL, sTempNewFilePath, TRUE ); + sal_Bool bCopyCompleted = SWUnoHelper::UCB_CopyFile( + sOldFileURL, sTempNewFilePath, sal_True ); if(bCopyCompleted) { bRet = sal_True; @@ -341,7 +341,7 @@ sal_Bool SwGlossaries::DelGroupDoc(const String &rName) // Auch, wenn das File nicht existiert, muss es aus der Liste // der Textbausteinbereiche entfernt werden // Kein && wegen CFfront - BOOL bRemoved = SWUnoHelper::UCB_DeleteFile( sFileURL ); + sal_Bool bRemoved = SWUnoHelper::UCB_DeleteFile( sFileURL ); DBG_ASSERT(bRemoved, "file has not been removed"); RemoveFileFromList( aName ); return bRemoved; @@ -389,7 +389,7 @@ SwTextBlocks* SwGlossaries::GetGlosDoc( const String &rName, sal_Bool bCreate ) sFileURL += INET_PATH_TOKEN; sFileURL += aTmp; - BOOL bExist = FALSE; + sal_Bool bExist = sal_False; if(!bCreate) bExist = FStatHelper::IsDocument( sFileURL ); @@ -427,7 +427,7 @@ SvStrings* SwGlossaries::GetNameList() SWUnoHelper::UCB_GetFileListOfFolder( *(*m_pPathArr)[i], aFiles, &sExt ); - for( USHORT nFiles = 0, nFEnd = aFiles.Count(); + for( sal_uInt16 nFiles = 0, nFEnd = aFiles.Count(); nFiles < nFEnd; ++nFiles ) { String* pTitle = aFiles[ nFiles ]; diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 2d2c1989d65c..eba08da76c56 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -134,11 +134,11 @@ struct GroupUserData { String sGroupName; sal_uInt16 nPathIdx; - BOOL bReadonly; + sal_Bool bReadonly; GroupUserData() : nPathIdx(0), - bReadonly(FALSE) {} + bReadonly(sal_False) {} }; /*------------------------------------------------------------------------ @@ -710,9 +710,9 @@ IMPL_LINK( SwGlossaryDlg, BibHdl, Button *, EMPTYARG ) //check if at least one glossary path is write enabled SvtPathOptions aPathOpt; String sGlosPath( aPathOpt.GetAutoTextPath() ); - USHORT nPaths = sGlosPath.GetTokenCount(';'); - BOOL bIsWritable = FALSE; - for(USHORT nPath = 0; nPath < nPaths; nPath++) + sal_uInt16 nPaths = sGlosPath.GetTokenCount(';'); + sal_Bool bIsWritable = sal_False; + for(sal_uInt16 nPath = 0; nPath < nPaths; nPath++) { String sPath = URIHelper::SmartRel2Abs( INetURLObject(), sGlosPath.GetToken(nPath, ';'), @@ -878,7 +878,7 @@ IMPL_LINK_INLINE_START( SwGlossaryDlg, EditHdl, Button *, EMPTYARG ) if(aEditBtn.GetCurItemId() == FN_GL_EDIT ) { SwTextBlocks *pGroup = ::GetGlossaries()->GetGroupDoc ( GetCurrGrpName () ); - BOOL bRet = pGlossaryHdl->ConvertToNew ( *pGroup ); + sal_Bool bRet = pGlossaryHdl->ConvertToNew ( *pGroup ); delete pGroup; if ( bRet ) EndDialog(RET_EDIT); @@ -1073,7 +1073,7 @@ sal_Bool SwGlTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry) sal_Bool SwGlTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& /*rpNewParent*/, - ULONG& /*rNewChildPos*/ + sal_uLong& /*rNewChildPos*/ ) { pDragEntry = 0; @@ -1121,7 +1121,7 @@ sal_Bool SwGlTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, sal_Bool SwGlTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& /*rpNewParent*/, - ULONG& /*rNewChildPos*/ + sal_uLong& /*rNewChildPos*/ ) { pDragEntry = 0; @@ -1230,7 +1230,7 @@ IMPL_LINK( SwGlossaryDlg, ShowPreviewHdl, CheckBox *, pBox ) } } - BOOL bShow = pBox->IsChecked() && !bCreated; + sal_Bool bShow = pBox->IsChecked() && !bCreated; aExampleWIN.Show( bShow ); aExampleDummyWIN.Show(!bShow); if( ::GetCurrGlosGroup() ) @@ -1243,7 +1243,7 @@ IMPL_LINK( SwGlossaryDlg, ShowPreviewHdl, CheckBox *, pBox ) --------------------------------------------------*/ IMPL_LINK( SwGlossaryDlg, PreviewLoadedHdl, void *, EMPTYARG ) { - BOOL bShow = aShowExampleCB.IsChecked(); + sal_Bool bShow = aShowExampleCB.IsChecked(); aExampleWIN.Show( bShow ); aExampleDummyWIN.Show(!bShow); ResumeShowAutoText(); @@ -1259,7 +1259,7 @@ void SwGlossaryDlg::ShowAutoText(const String& rGroup, const String& rShortName) { SetResumeData(rGroup, rShortName); //try to make an Undo() - pExampleFrame->ClearDocument( TRUE ); + pExampleFrame->ClearDocument( sal_True ); } } /* -----------------------------21.12.00 11:33-------------------------------- diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx index 4d93f8d7542f..e656070796b2 100644 --- a/sw/source/ui/misc/glshell.cxx +++ b/sw/source/ui/misc/glshell.cxx @@ -105,7 +105,7 @@ void lcl_Execute( SwDocShell& rSh, SfxRequest& rReq ) void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet ) { - if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, FALSE )) + if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, sal_False )) { if( !rSh.GetDoc()->IsModified() ) rSet.DisableItem( SID_SAVEDOC ); @@ -115,7 +115,7 @@ void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet ) } -BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName, +sal_Bool lcl_Save( SwWrtShell& rSh, const String& rGroupName, const String& rShortNm, const String& rLongNm ) { const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get(); @@ -128,7 +128,7 @@ BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName, pGlosHdl = rSh.GetView().GetGlosHdl(); pGlosHdl->GetMacros( rShortNm, aStart, aEnd, pBlock ); - USHORT nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm, + sal_uInt16 nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm, pCfg->IsSaveRelFile(), pBlock->IsOnlyTextBlock( rShortNm ) ); @@ -193,7 +193,7 @@ void SwGlosDocShell::GetState( SfxItemSet& rSet ) --------------------------------------------------------------------*/ -BOOL SwGlosDocShell::Save() +sal_Bool SwGlosDocShell::Save() { // In case of an API object which holds this document, it is possible that the WrtShell is already // dead. For instance, if the doc is modified via this API object, and then, upon office shutdown, @@ -204,8 +204,8 @@ BOOL SwGlosDocShell::Save() return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName ); else { - SetModified( FALSE ); - return FALSE; + SetModified( sal_False ); + return sal_False; } } @@ -256,15 +256,15 @@ void SwWebGlosDocShell::GetState( SfxItemSet& rSet ) --------------------------------------------------------------------*/ -BOOL SwWebGlosDocShell::Save() +sal_Bool SwWebGlosDocShell::Save() { // same comment as in SwGlosDocShell::Save - see there if ( GetWrtShell() ) return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName ); else { - SetModified( FALSE ); - return FALSE; + SetModified( sal_False ); + return sal_False; } } @@ -274,7 +274,7 @@ BOOL SwWebGlosDocShell::Save() SV_IMPL_REF ( SwDocShell ) -SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, BOOL bShow ) +SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, sal_Bool bShow ) { SwDocShellRef xDocSh; @@ -283,7 +283,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS { // erfrage welche View registriert ist. Im WebWriter gibts es keine // normale View - USHORT nViewId = 0 != &SwView::Factory() ? 2 : 6; + sal_uInt16 nViewId = 0 != &SwView::Factory() ? 2 : 6; String sLongName = pGroup->GetLongName(pGroup->GetIndex( rShortName )); if( 6 == nViewId ) @@ -311,8 +311,8 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS aDocTitle += ' '; aDocTitle += sLongName; - BOOL bDoesUndo = xDocSh->GetDoc()->DoesUndo(); - xDocSh->GetDoc()->DoUndo( FALSE ); + sal_Bool bDoesUndo = xDocSh->GetDoc()->DoesUndo(); + xDocSh->GetDoc()->DoUndo( sal_False ); xDocSh->GetWrtShell()->InsertGlossary( *pGroup, rShortName ); if( !xDocSh->GetDoc()->getPrinter( false ) ) diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx index a1b305b3b7db..26255d0e3d48 100644 --- a/sw/source/ui/misc/impfnote.hxx +++ b/sw/source/ui/misc/impfnote.hxx @@ -83,8 +83,8 @@ class SwEndNoteOptionPage : public SfxTabPage String aNumPage; String aNumChapter; SwWrtShell *pSh; - BOOL bPosDoc; - BOOL bEndNote; + sal_Bool bPosDoc; + sal_Bool bEndNote; inline void SelectNumbering(int eNum); int GetNumbering() const; @@ -95,12 +95,12 @@ class SwEndNoteOptionPage : public SfxTabPage public: - SwEndNoteOptionPage( Window *pParent, BOOL bEndNote, + SwEndNoteOptionPage( Window *pParent, sal_Bool bEndNote, const SfxItemSet &rSet ); ~SwEndNoteOptionPage(); static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet); - virtual BOOL FillItemSet(SfxItemSet &rSet); + virtual sal_Bool FillItemSet(SfxItemSet &rSet); virtual void Reset( const SfxItemSet& ); void SetShell( SwWrtShell &rShell ); diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index 5cc82f8473eb..adc18f0daa6b 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -52,7 +52,7 @@ #include <svx/dialogs.hrc> #include <sfx2/viewfrm.hxx> -static BOOL bFootnote = TRUE; +static sal_Bool bFootnote = sal_True; /*------------------------------------------------------------------------ Beschreibung: Einfuegen der Fussnote durch OK @@ -68,14 +68,14 @@ void __EXPORT SwInsFootNoteDlg::Apply() if ( bEdit ) { rSh.StartAction(); - rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); rSh.StartUndo( UNDO_START ); SwFmtFtn aNote( aEndNoteBtn.IsChecked() ); aNote.SetNumStr( aStr ); if( rSh.SetCurFtn( aNote ) && bExtCharAvailable ) { - rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE ); + rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); @@ -84,8 +84,8 @@ void __EXPORT SwInsFootNoteDlg::Apply() eCharSet, RES_CHRATR_FONT ); aSet.Put( aFont ); rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND ); - rSh.ResetSelect(0, FALSE); - rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + rSh.ResetSelect(0, sal_False); + rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); } rSh.EndUndo( UNDO_END ); rSh.EndAction(); @@ -98,7 +98,7 @@ void __EXPORT SwInsFootNoteDlg::Apply() if ( bExtCharAvailable ) { - rSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE ); + rSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetAttr( aSet ); SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); @@ -108,7 +108,7 @@ void __EXPORT SwInsFootNoteDlg::Apply() aSet.Put( aFont ); rSh.SetAttr( aSet, SETATTR_DONTEXPAND ); // zur Bearbeitung des Fussnotentextes - rSh.ResetSelect(0, FALSE); + rSh.ResetSelect(0, sal_False); rSh.GotoFtnTxt(); } rSh.EndUndo( UNDO_UI_INSERT_FOOTNOTE ); @@ -137,7 +137,7 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberCharHdl, Button *, EMPTYARG ) IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG ) { - aNumberCharBtn.Check( TRUE ); + aNumberCharBtn.Check( sal_True ); aOkBtn.Enable( 0 != aNumberCharEdit.GetText().Len() ); return 0; @@ -150,7 +150,7 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG ) IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG ) { - aOkBtn.Enable( TRUE ); + aOkBtn.Enable( sal_True ); return 0; } IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG ) @@ -161,14 +161,14 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG ) IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG ) { - aNumberCharBtn.Check( TRUE ); + aNumberCharBtn.Check( sal_True ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); SfxAllItemSet aAllSet( rSh.GetAttrPool() ); - aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) ); + aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) ); aAllSet.Put( rFont ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -176,8 +176,8 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG ) rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if (RET_OK == pDlg->Execute()) { - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE ); - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, sal_False ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False ); if ( pItem ) { String sExtChars(pItem->GetValue()); @@ -193,7 +193,7 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG ) aNumberCharEdit.SetFont( aFont ); } - bExtCharAvailable = TRUE; + bExtCharAvailable = sal_True; aOkBtn.Enable(0 != aNumberCharEdit.GetText().Len()); } } @@ -211,7 +211,7 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn ) Apply(); // Hier zur naechsten Fuss/Endnote wandern - rSh.ResetSelect(0, FALSE); + rSh.ResetSelect(0, sal_False); if (pBtn == &aNextBT) rSh.GotoNextFtnAnchor(); else @@ -226,12 +226,12 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn ) Beschreibung: ------------------------------------------------------------------------*/ -SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, BOOL bEd) : +SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, sal_Bool bEd) : SvxStandardDialog(pParent,SW_RES(DLG_INS_FOOTNOTE)), rSh(rShell), - bExtCharAvailable(FALSE), + bExtCharAvailable(sal_False), bEdit(bEd), aNumberAutoBtn (this,SW_RES(RB_NUMBER_AUTO)), aNumberCharBtn (this,SW_RES(RB_NUMBER_CHAR)), @@ -281,7 +281,7 @@ SwInsFootNoteDlg::~SwInsFootNoteDlg() rSh.SetCareWin(0); if (bEdit) - rSh.ResetSelect(0, FALSE); + rSh.ResetSelect(0, sal_False); } /*------------------------------------------------------------------------ @@ -293,7 +293,7 @@ void SwInsFootNoteDlg::Init() SwFmtFtn aFtnNote; String sNumStr; Font aFont; - bExtCharAvailable = FALSE; + bExtCharAvailable = sal_False; rSh.StartAction(); @@ -303,7 +303,7 @@ void SwInsFootNoteDlg::Init() { sNumStr = aFtnNote.GetNumStr(); - rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE ); + rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); @@ -313,14 +313,14 @@ void SwInsFootNoteDlg::Init() eCharSet = rFont.GetCharSet(); aFont.SetName(aFontName); aFont.SetCharSet(eCharSet); - bExtCharAvailable = TRUE; - rSh.Left( CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + bExtCharAvailable = sal_True; + rSh.Left( CRSR_SKIP_CHARS, sal_False, 1, sal_False ); } bFootnote = !aFtnNote.IsEndNote(); } aNumberCharEdit.SetFont(aFont); - BOOL bNumChar = sNumStr.Len() != 0; + sal_Bool bNumChar = sNumStr.Len() != 0; aNumberCharEdit.SetText(sNumStr); aNumberCharBtn.Check(bNumChar); @@ -333,12 +333,12 @@ void SwInsFootNoteDlg::Init() else aEndNoteBtn.Check(); - BOOL bNext = rSh.GotoNextFtnAnchor(); + sal_Bool bNext = rSh.GotoNextFtnAnchor(); if (bNext) rSh.GotoPrevFtnAnchor(); - BOOL bPrev = rSh.GotoPrevFtnAnchor(); + sal_Bool bPrev = rSh.GotoPrevFtnAnchor(); if (bPrev) rSh.GotoNextFtnAnchor(); @@ -346,7 +346,7 @@ void SwInsFootNoteDlg::Init() aPrevBT.Enable(bPrev); aNextBT.Enable(bNext); - rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE ); + rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False ); rSh.EndAction(); } diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx index c053030201ad..2409b773850a 100644 --- a/sw/source/ui/misc/insrule.cxx +++ b/sw/source/ui/misc/insrule.cxx @@ -82,7 +82,7 @@ SwInsertGrfRulerDlg::SwInsertGrfRulerDlg( Window* pParent ) : pExampleVS->InsertItem( 1, 1); pExampleVS->SetItemText( 1, sSimple); - for(USHORT i = 1; i <= aGrfNames.Count(); i++) + for(sal_uInt16 i = 1; i <= aGrfNames.Count(); i++) { pExampleVS->InsertItem( i + 1, i); pExampleVS->SetItemText( i + 1, *((String*)aGrfNames.GetObject(i-1))); @@ -107,7 +107,7 @@ SwInsertGrfRulerDlg::~SwInsertGrfRulerDlg() String SwInsertGrfRulerDlg::GetGraphicName() { String sRet; - USHORT nSel = nSelPos - 2; //align selection position with ValueSet index + sal_uInt16 nSel = nSelPos - 2; //align selection position with ValueSet index if(nSel < aGrfNames.Count()) sRet = URIHelper::SmartRel2Abs( INetURLObject(), *(String*) aGrfNames.GetObject(nSel), @@ -147,7 +147,7 @@ void __EXPORT SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt ) { Rectangle aRect = rUDEvt.GetRect(); OutputDevice* pDev = rUDEvt.GetDevice(); - USHORT nItemId = rUDEvt.GetItemId(); + sal_uInt16 nItemId = rUDEvt.GetItemId(); Point aBLPos = aRect.TopLeft(); // Itemzaehlung beginnt bei 1, und die 1. ist die einfache Linie @@ -189,7 +189,7 @@ void __EXPORT SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt ) } else { - SetGrfNotFound(TRUE); + SetGrfNotFound(sal_True); } } else diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index 213c0e99e413..60c6662511c0 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -163,7 +163,7 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& ) IDocumentStylePoolAccess* pIDSPA = pSh->getIDocumentStylePoolAccess(); String sStyleName(rInf.GetCharFmt( *pIDSPA )->GetName()); - const USHORT nPos = aCharStyleLB.GetEntryPos(sStyleName); + const sal_uInt16 nPos = aCharStyleLB.GetEntryPos(sStyleName); if (nPos != LISTBOX_ENTRY_NOTFOUND) aCharStyleLB.SelectEntryPos(nPos); @@ -178,13 +178,13 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& ) // Format // SwFldMgr aMgr( pSh ); - USHORT nSelFmt = rInf.GetNumType().GetNumberingType(); -// USHORT nCnt = aMgr.GetFormatCount( TYP_SEQFLD, FALSE ); + sal_uInt16 nSelFmt = rInf.GetNumType().GetNumberingType(); +// sal_uInt16 nCnt = aMgr.GetFormatCount( TYP_SEQFLD, sal_False ); -// for( USHORT i = 0; i < nCnt; i++) +// for( sal_uInt16 i = 0; i < nCnt; i++) // { // aFormatLB.InsertEntry(aMgr.GetFormatStr( TYP_SEQFLD, i)); -// USHORT nFmtId = aMgr.GetFormatId( TYP_SEQFLD, i ); +// sal_uInt16 nFmtId = aMgr.GetFormatId( TYP_SEQFLD, i ); // aFormatLB.SetEntryData( i, (void*)nFmtId ); // if( nFmtId == nSelFmt ) // aFormatLB.SelectEntryPos( i ); @@ -195,10 +195,10 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& ) // aFormatLB.SelectEntryPos(aFormatLB.GetEntryCount() - 1); // Position - aPosLB.SelectEntryPos((USHORT)rInf.GetPos()); + aPosLB.SelectEntryPos((sal_uInt16)rInf.GetPos()); // Offset - USHORT nOffset = rInf.GetPosFromLeft(); + sal_uInt16 nOffset = rInf.GetPosFromLeft(); if (nOffset == USHRT_MAX) nOffset = 0; @@ -232,7 +232,7 @@ void __EXPORT SwLineNumberingPage::Reset( const SfxItemSet& ) IMPL_LINK( SwLineNumberingPage, ModifyHdl, Edit *, EMPTYARG ) { - BOOL bHasValue = aDivisorED.GetText().Len() != 0; + sal_Bool bHasValue = aDivisorED.GetText().Len() != 0; aDivIntervalFT.Enable(bHasValue); aDivIntervalNF.Enable(bHasValue); @@ -247,7 +247,7 @@ IMPL_LINK( SwLineNumberingPage, ModifyHdl, Edit *, EMPTYARG ) IMPL_LINK( SwLineNumberingPage, LineOnOffHdl, CheckBox *, EMPTYARG ) { - BOOL bEnable = aNumberingOnCB.IsChecked(); + sal_Bool bEnable = aNumberingOnCB.IsChecked(); aCharStyleFT.Enable(bEnable); aCharStyleLB.Enable(bEnable); @@ -279,7 +279,7 @@ IMPL_LINK( SwLineNumberingPage, LineOnOffHdl, CheckBox *, EMPTYARG ) Beschreibung: -----------------------------------------------------------------------*/ -BOOL __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& ) +sal_Bool __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& ) { SwLineNumberInfo aInf(pSh->GetLineNumberInfo()); @@ -309,16 +309,16 @@ BOOL __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& ) aInf.SetPos((LineNumberPosition)aPosLB.GetSelectEntryPos()); // Offset - aInf.SetPosFromLeft((USHORT)aOffsetMF.Denormalize(aOffsetMF.GetValue(FUNIT_TWIP))); + aInf.SetPosFromLeft((sal_uInt16)aOffsetMF.Denormalize(aOffsetMF.GetValue(FUNIT_TWIP))); // Numerierungsoffset - aInf.SetCountBy((USHORT)aNumIntervalNF.GetValue()); + aInf.SetCountBy((sal_uInt16)aNumIntervalNF.GetValue()); // Teiler aInf.SetDivider(aDivisorED.GetText()); // Teileroffset - aInf.SetDividerCountBy((USHORT)aDivIntervalNF.GetValue()); + aInf.SetDividerCountBy((sal_uInt16)aDivIntervalNF.GetValue()); // Zaehlen aInf.SetCountBlankLines(aCountEmptyLinesCB.IsChecked()); @@ -329,7 +329,7 @@ BOOL __EXPORT SwLineNumberingPage::FillItemSet( SfxItemSet& ) pSh->SetLineNumberInfo(aInf); - return FALSE; + return sal_False; } diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 43c92a72a3f7..62f9b19380d0 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -93,7 +93,7 @@ #include <svl/aeitem.hxx> #include <svl/slstitm.hxx> -static BOOL bLastRelative = FALSE; +static sal_Bool bLastRelative = sal_False; /*-----------------03.12.97 10:02------------------- @@ -134,8 +134,8 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent, pSaveNum(0), pWrtSh(0), pOutlineDlg(0), - bPreset( FALSE ), - bInInintControl(FALSE), + bPreset( sal_False ), + bInInintControl(sal_False), // --> OD 2008-02-01 #newlistlevelattrs# bLabelAlignmentPosAndSpaceModeActive( false ) // <-- @@ -148,7 +148,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent, aAlignLB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl)); // --> OD 2008-02-01 #newlistlevelattrs# aAlign2LB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl)); - for ( USHORT i = 0; i < aAlignLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aAlignLB.GetEntryCount(); ++i ) { aAlign2LB.InsertEntry( aAlignLB.GetEntry( i ) ); } @@ -192,7 +192,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent, aStandardPB.SetClickHdl(LINK(this, SwNumPositionTabPage, StandardHdl)); // Ebenen einfuegen - for(USHORT i = 1; i <= MAXLEVEL; i++) + for(sal_uInt16 i = 1; i <= MAXLEVEL; i++) aLevelLB.InsertEntry(String::CreateFromInt32(i)); String sEntry(String::CreateFromAscii("1 - ")); sEntry += String::CreateFromInt32(MAXLEVEL); @@ -214,7 +214,7 @@ SwNumPositionTabPage::~SwNumPositionTabPage() --------------------------------------------------*/ void SwNumPositionTabPage::InitControls() { - bInInintControl = TRUE; + bInInintControl = sal_True; // --> OD 2008-02-01 #newlistlevelattrs# const bool bRelative = !bLabelAlignmentPosAndSpaceModeActive && aRelativeCB.IsEnabled() && aRelativeCB.IsChecked(); @@ -242,11 +242,11 @@ void SwNumPositionTabPage::InitControls() const SwNumFmt* aNumFmtArr[MAXLEVEL]; const SwFmtVertOrient* pFirstOrient = 0; - USHORT nMask = 1; - USHORT nLvl = USHRT_MAX; + sal_uInt16 nMask = 1; + sal_uInt16 nLvl = USHRT_MAX; long nFirstBorderText = 0; long nFirstBorderTextRelative = -1; - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { aNumFmtArr[i] = &pActNum->Get(i); if(nActNumLvl & nMask) @@ -329,7 +329,7 @@ void SwNumPositionTabPage::InitControls() aDistBorderMF.SetValue(aDistBorderMF.Normalize(nDistBorderNum),FUNIT_TWIP); } else - bSetDistEmpty = TRUE; + bSetDistEmpty = sal_True; if(bSameDist) aDistNumMF .SetValue(aDistNumMF.Normalize(aNumFmtArr[nLvl]->GetCharTextDistance()), FUNIT_TWIP); @@ -342,7 +342,7 @@ void SwNumPositionTabPage::InitControls() if(bSameAdjust) { - USHORT nPos = 1; // zentriert + sal_uInt16 nPos = 1; // zentriert if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT) nPos = 0; else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT) @@ -363,7 +363,7 @@ void SwNumPositionTabPage::InitControls() // --> OD 2008-02-01 #newlistlevelattrs# if ( bSameLabelFollowedBy ) { - USHORT nPos = 0; // LISTTAB + sal_uInt16 nPos = 0; // LISTTAB if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE ) { nPos = 1; @@ -422,10 +422,10 @@ void SwNumPositionTabPage::InitControls() } // <-- - if(TRUE == bSetDistEmpty) + if(sal_True == bSetDistEmpty) aDistBorderMF.SetText(aEmptyStr); - bInInintControl = FALSE; + bInInintControl = sal_False; } /*-----------------03.12.97 10:02------------------- @@ -434,10 +434,10 @@ void SwNumPositionTabPage::InitControls() void SwNumPositionTabPage::ActivatePage(const SfxItemSet& ) { const SfxPoolItem* pItem; - UINT16 nTmpNumLvl = + sal_uInt16 nTmpNumLvl = pOutlineDlg ? pOutlineDlg->GetActNumLevel() : 0; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); - if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, FALSE, &pItem)) + if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, sal_False, &pItem)) { bPreset = ((const SfxBoolItem*)pItem)->GetValue(); } @@ -448,18 +448,18 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& ) { *pActNum = *pSaveNum; nActNumLvl = nTmpNumLvl; - USHORT nMask = 1; - aLevelLB.SetUpdateMode(FALSE); + sal_uInt16 nMask = 1; + aLevelLB.SetUpdateMode(sal_False); aLevelLB.SetNoSelection(); aLevelLB.SelectEntryPos( MAXLEVEL, nActNumLvl == USHRT_MAX); if(nActNumLvl != USHRT_MAX) - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) - aLevelLB.SelectEntryPos( i, TRUE); + aLevelLB.SelectEntryPos( i, sal_True); nMask <<= 1 ; } - aLevelLB.SetUpdateMode(TRUE); + aLevelLB.SetUpdateMode(sal_True); // --> OD 2008-02-01 #newlistlevelattrs# InitPosAndSpaceMode(); @@ -480,14 +480,14 @@ int SwNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet) SwOutlineTabDialog::SetActNumLevel(nActNumLvl); if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } /*-----------------03.12.97 10:02------------------- --------------------------------------------------*/ -BOOL SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) { if(pOutlineDlg) *pOutlineDlg->GetNumRule() = *pActNum; @@ -495,7 +495,7 @@ BOOL SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) { *pSaveNum = *pActNum; rSet.Put(SwUINumRuleItem( *pSaveNum )); - rSet.Put(SfxBoolItem(FN_PARAM_NUM_PRESET, FALSE)); + rSet.Put(SfxBoolItem(FN_PARAM_NUM_PRESET, sal_False)); } return bModified; } @@ -509,27 +509,27 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet ) if(pOutlineDlg) { pSaveNum = pOutlineDlg->GetNumRule(); - aLevelLB.EnableMultiSelection(FALSE); + aLevelLB.EnableMultiSelection(sal_False); } - else if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_ACT_NUMBER, FALSE, &pItem)) + else if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_ACT_NUMBER, sal_False, &pItem)) pSaveNum = ((SwUINumRuleItem*)pItem)->GetNumRule(); nActNumLvl = SwOutlineTabDialog::GetActNumLevel(); - USHORT nMask = 1; - aLevelLB.SetUpdateMode(FALSE); + sal_uInt16 nMask = 1; + aLevelLB.SetUpdateMode(sal_False); aLevelLB.SetNoSelection(); if(nActNumLvl == USHRT_MAX) { - aLevelLB.SelectEntryPos( MAXLEVEL, TRUE); + aLevelLB.SelectEntryPos( MAXLEVEL, sal_True); } else - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) - aLevelLB.SelectEntryPos( i, TRUE); + aLevelLB.SelectEntryPos( i, sal_True); nMask <<= 1; } - aLevelLB.SetUpdateMode(TRUE); + aLevelLB.SetUpdateMode(sal_True); if(!pActNum) pActNum = new SwNumRule(*pSaveNum); @@ -541,7 +541,7 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet ) ShowControlsDependingOnPosAndSpaceMode(); // <-- InitControls(); - bModified = FALSE; + bModified = sal_False; } // --> OD 2008-01-11 #newlistlevelattrs# @@ -556,8 +556,8 @@ void SwNumPositionTabPage::InitPosAndSpaceMode() SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode = SvxNumberFormat::LABEL_ALIGNMENT; - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { if(nActNumLvl & nMask) { @@ -667,15 +667,15 @@ void SwNumPositionTabPage::SetWrtShell(SwWrtShell* pSh) --------------------------------------------------*/ IMPL_LINK( SwNumPositionTabPage, EditModifyHdl, Edit *, EMPTYARG ) { - USHORT nMask = 1; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) { SwNumFmt aNumFmt(pActNum->Get(i)); // --> OD 2008-02-01 #newlistlevelattrs# - const USHORT nPos = aAlignLB.IsVisible() + const sal_uInt16 nPos = aAlignLB.IsVisible() ? aAlignLB.GetSelectEntryPos() : aAlign2LB.GetSelectEntryPos(); // <-- @@ -697,33 +697,33 @@ IMPL_LINK( SwNumPositionTabPage, EditModifyHdl, Edit *, EMPTYARG ) --------------------------------------------------*/ IMPL_LINK( SwNumPositionTabPage, LevelHdl, ListBox *, pBox ) { - USHORT nSaveNumLvl = nActNumLvl; + sal_uInt16 nSaveNumLvl = nActNumLvl; nActNumLvl = 0; if(pBox->IsEntryPosSelected( MAXLEVEL ) && (pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff)) { nActNumLvl = 0xFFFF; - pBox->SetUpdateMode(FALSE); - for( USHORT i = 0; i < MAXLEVEL; i++ ) - pBox->SelectEntryPos( i, FALSE ); - pBox->SetUpdateMode(TRUE); + pBox->SetUpdateMode(sal_False); + for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) + pBox->SelectEntryPos( i, sal_False ); + pBox->SetUpdateMode(sal_True); } else if(pBox->GetSelectEntryCount()) { - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) { if(pBox->IsEntryPosSelected( i )) nActNumLvl |= nMask; nMask <<= 1; } - pBox->SelectEntryPos( MAXLEVEL, FALSE ); + pBox->SelectEntryPos( MAXLEVEL, sal_False ); } else { nActNumLvl = nSaveNumLvl; - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) { if(nActNumLvl & nMask) { @@ -750,8 +750,8 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) if(bInInintControl) return 0; long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP))); - USHORT nMask = 1; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) { @@ -764,7 +764,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) if(0 == i) { long nTmp = aNumFmt.GetFirstLineOffset(); - aNumFmt.SetAbsLSpace( USHORT(nValue - nTmp)); + aNumFmt.SetAbsLSpace( sal_uInt16(nValue - nTmp)); } else { @@ -772,7 +772,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) pActNum->Get( i - 1 ).GetFirstLineOffset() - pActNum->Get( i ).GetFirstLineOffset(); - aNumFmt.SetAbsLSpace( USHORT(nValue + nTmp)); + aNumFmt.SetAbsLSpace( sal_uInt16(nValue + nTmp)); } } else @@ -789,7 +789,7 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) //jetzt muss mit dem FirstLineOffset auch der AbsLSpace veraendert werden long nDiff = nValue + aNumFmt.GetFirstLineOffset(); long nAbsLSpace = aNumFmt.GetAbsLSpace(); - aNumFmt.SetAbsLSpace(USHORT(nAbsLSpace + nDiff)); + aNumFmt.SetAbsLSpace(sal_uInt16(nAbsLSpace + nDiff)); aNumFmt.SetFirstLineOffset( -(short)nValue ); } @@ -810,16 +810,16 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) --------------------------------------------------*/ IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox ) { - BOOL bOn = pBox->IsChecked(); - BOOL bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl; - BOOL bSetValue = FALSE; + sal_Bool bOn = pBox->IsChecked(); + sal_Bool bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl; + sal_Bool bSetValue = sal_False; long nValue = 0; if(bOn || bSingleSelection) { - USHORT nMask = 1; - BOOL bFirst = TRUE; - bSetValue = TRUE; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + sal_Bool bFirst = sal_True; + bSetValue = sal_True; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) { @@ -832,7 +832,7 @@ IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox ) } else bSetValue = nValue == rNumFmt.GetAbsLSpace() - pActNum->Get(i - 1).GetAbsLSpace(); - bFirst = FALSE; + bFirst = sal_False; } nMask <<= 1; } @@ -854,7 +854,7 @@ IMPL_LINK( SwNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG ) SvxNumberFormat::SvxNumLabelFollowedBy eLabelFollowedBy = SvxNumberFormat::LISTTAB; { - const USHORT nPos = aLabelFollowedByLB.GetSelectEntryPos(); + const sal_uInt16 nPos = aLabelFollowedByLB.GetSelectEntryPos(); if ( nPos == 1 ) { eLabelFollowedBy = SvxNumberFormat::SPACE; @@ -867,9 +867,9 @@ IMPL_LINK( SwNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG ) // set value at the chosen list levels bool bSameListtabPos = true; - USHORT nFirstLvl = USHRT_MAX; - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; ++i ) + sal_uInt16 nFirstLvl = USHRT_MAX; + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { if ( nActNumLvl & nMask ) { @@ -918,8 +918,8 @@ IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pFld ) const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP))); // set value at the chosen list levels - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { if ( nActNumLvl & nMask ) { @@ -943,8 +943,8 @@ IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pFld ) const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP))); // set value at the chosen list levels - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { if ( nActNumLvl & nMask ) { @@ -969,8 +969,8 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld ) const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP))); // set value at the chosen list levels - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { if ( nActNumLvl & nMask ) { @@ -996,8 +996,8 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld ) --------------------------------------------------*/ IMPL_LINK( SwNumPositionTabPage, StandardHdl, PushButton *, EMPTYARG ) { - USHORT nMask = 1; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) { @@ -1037,9 +1037,9 @@ IMPL_LINK( SwNumPositionTabPage, StandardHdl, PushButton *, EMPTYARG ) } #if OSL_DEBUG_LEVEL > 1 -void SwNumPositionTabPage::SetModified(BOOL bRepaint) +void SwNumPositionTabPage::SetModified(sal_Bool bRepaint) { - bModified = TRUE; + bModified = sal_True; if(bRepaint) { aPreviewWIN.SetLevel(nActNumLvl); @@ -1057,7 +1057,7 @@ void SwNumPositionTabPage::SetModified(BOOL bRepaint) SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell & rSh) : - SfxTabDialog(pParent, SW_RES(DLG_SVXTEST_NUM_BULLET), pSwItemSet, FALSE, &aEmptyStr), + SfxTabDialog(pParent, SW_RES(DLG_SVXTEST_NUM_BULLET), pSwItemSet, sal_False, &aEmptyStr), rWrtSh(rSh), sRemoveText(SW_RES(ST_RESET)), nRetOptionsDialog(USHRT_MAX) @@ -1067,7 +1067,7 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(Window* pParent, GetUserButton()->SetHelpId(HID_NUM_RESET); GetUserButton()->SetClickHdl(LINK(this, SwSvxNumBulletTabDialog, RemoveNumberingHdl)); if(!rWrtSh.GetCurNumRule()) - GetUserButton()->Enable(FALSE); + GetUserButton()->Enable(sal_False); AddTabPage( RID_SVXPAGE_PICK_SINGLE_NUM ); AddTabPage( RID_SVXPAGE_PICK_BULLET ); AddTabPage( RID_SVXPAGE_PICK_NUM ); @@ -1088,7 +1088,7 @@ SwSvxNumBulletTabDialog::~SwSvxNumBulletTabDialog() --------------------------------------------------*/ -void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage) +void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) { //Namen der Vorlagen und Metric setzen String sNumCharFmt, sBulletCharFmt; @@ -1125,7 +1125,7 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage) SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell(); ::FillCharStyleListBox(rCharFmtLB, pDocShell); List aList; - for(USHORT j = 0; j < rCharFmtLB.GetEntryCount(); j++) + for(sal_uInt16 j = 0; j < rCharFmtLB.GetEntryCount(); j++) { aList.Insert( new XubString(rCharFmtLB.GetEntry(j)), LIST_APPEND ); @@ -1133,9 +1133,9 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage) aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ; FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell)); - aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric) ) ); + aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric) ) ); rPage.PageCreated(aSet); - for( USHORT i = (USHORT)aList.Count(); i; --i ) + for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i ) delete (XubString*)aList.Remove(i); aList.Clear(); } @@ -1145,7 +1145,7 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage) SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell(); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell)); SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric)) ); + aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)) ); rPage.PageCreated(aSet); // ((SvxNumPositionTabPage&)rPage).SetWrtShell(&rWrtSh); } diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx index 964d04738755..39186bb6de60 100644 --- a/sw/source/ui/misc/numberingtypelistbox.cxx +++ b/sw/source/ui/misc/numberingtypelistbox.cxx @@ -53,7 +53,7 @@ struct SwNumberingTypeListBox_Impl ---------------------------------------------------------------------------*/ SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, const ResId& rResId, - USHORT nTypeFlags ) : + sal_uInt16 nTypeFlags ) : ListBox(pWin, rResId), pImpl(new SwNumberingTypeListBox_Impl) { @@ -76,7 +76,7 @@ SwNumberingTypeListBox::~SwNumberingTypeListBox() /* -----------------------------01.03.01 16:02-------------------------------- ---------------------------------------------------------------------------*/ -void SwNumberingTypeListBox::Reload(USHORT nTypeFlags) +void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags) { Clear(); uno::Sequence<sal_Int16> aTypes; @@ -95,7 +95,7 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags) { long nValue = rNames.GetValue(i); sal_Bool bInsert = sal_True; - USHORT nPos = LISTBOX_APPEND; + sal_uInt16 nPos = LISTBOX_APPEND; switch(nValue) { case style::NumberingType::NUMBER_NONE: @@ -125,7 +125,7 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags) } if(bInsert) { - USHORT nEntry = InsertEntry(rNames.GetString(i), nPos); + sal_uInt16 nEntry = InsertEntry(rNames.GetString(i), nPos); SetEntryData( nEntry, (void*)nValue ); } } @@ -138,11 +138,11 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags) sal_Int16 nCurrent = pTypes[nType]; if(nCurrent > style::NumberingType::CHARS_LOWER_LETTER_N) { - if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos((void*)(ULONG)nCurrent)) + if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos((void*)(sal_uLong)nCurrent)) { OUString aIdent = pImpl->xInfo->getNumberingIdentifier( nCurrent ); - USHORT nPos = InsertEntry(aIdent); - SetEntryData(nPos,(void*)(ULONG)nCurrent); + sal_uInt16 nPos = InsertEntry(aIdent); + SetEntryData(nPos,(void*)(sal_uLong)nCurrent); } } } @@ -156,9 +156,9 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags) sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType() { sal_Int16 nRet = 0; - USHORT nSelPos = GetSelectEntryPos(); + sal_uInt16 nSelPos = GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nSelPos) - nRet = (sal_Int16)(ULONG)GetEntryData(nSelPos); + nRet = (sal_Int16)(sal_uLong)GetEntryData(nSelPos); #ifdef DBG_UTIL else DBG_ERROR("SwNumberingTypeListBox not selected"); @@ -170,7 +170,7 @@ sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType() ---------------------------------------------------------------------------*/ sal_Bool SwNumberingTypeListBox::SelectNumberingType(sal_Int16 nType) { - USHORT nPos = GetEntryPos((void*)(ULONG)nType); + sal_uInt16 nPos = GetEntryPos((void*)(sal_uLong)nType); SelectEntryPos( nPos ); return LISTBOX_ENTRY_NOTFOUND != nPos; } diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 5380a00afbaf..8658c0024b18 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -118,7 +118,7 @@ public: ~SwNumNamesDlg(); void SetUserNames(const String *pList[]); String GetName() const { return aFormEdit.GetText(); } - USHORT GetCurEntryPos() const { return aFormBox.GetSelectEntryPos(); } + sal_uInt16 GetCurEntryPos() const { return aFormBox.GetSelectEntryPos(); } }; /*------------------------------------------------------------------------ @@ -143,8 +143,8 @@ IMPL_LINK_INLINE_END( SwNumNamesDlg, SelectHdl, ListBox *, pBox ) void SwNumNamesDlg::SetUserNames(const String *pList[]) { - USHORT nSelect = 0; - for(USHORT i = 0; i < SwBaseNumRules::nMaxRules; ++i) + sal_uInt16 nSelect = 0; + for(sal_uInt16 i = 0; i < SwBaseNumRules::nMaxRules; ++i) { if(pList[i]) { @@ -210,10 +210,10 @@ __EXPORT SwNumNamesDlg::~SwNumNamesDlg() {} /* -----------------08.07.98 08:46------------------- * * --------------------------------------------------*/ -USHORT lcl_BitToLevel(USHORT nActLevel) +sal_uInt16 lcl_BitToLevel(sal_uInt16 nActLevel) { - USHORT nTmp = nActLevel; - USHORT nTmpLevel = 0; + sal_uInt16 nTmp = nActLevel; + sal_uInt16 nTmpLevel = 0; while( 0 != (nTmp >>= 1) ) nTmpLevel++; return nTmpLevel; @@ -222,12 +222,12 @@ USHORT lcl_BitToLevel(USHORT nActLevel) /* -----------------07.07.98 14:13------------------- * * --------------------------------------------------*/ -USHORT SwOutlineTabDialog::nNumLevel = 1; +sal_uInt16 SwOutlineTabDialog::nNumLevel = 1; SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell &rSh) : //der UserString wird danach richtig gesetzt - SfxTabDialog(pParent, SW_RES(DLG_TAB_OUTLINE), pSwItemSet, FALSE, &aEmptyStr), + SfxTabDialog(pParent, SW_RES(DLG_TAB_OUTLINE), pSwItemSet, sal_False, &aEmptyStr), aNullStr(C2S("____")), aFormMenu(SW_RES(MN_FORM)), rWrtSh(rSh), @@ -250,7 +250,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, AddTabPage(TP_OUTLINE_NUM , &SwOutlineSettingsTabPage::Create, 0); String sHeadline; - USHORT i; + sal_uInt16 i; for( i = 0; i < MAXLEVEL; ++i ) { @@ -262,13 +262,13 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, } // Erfragen der Gliederungsebenen der Textvorlagen - const USHORT nCount = rWrtSh.GetTxtFmtCollCount(); + const sal_uInt16 nCount = rWrtSh.GetTxtFmtCollCount(); for(i = 0; i < nCount; ++i ) { SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i); if(!rTxtColl.IsDefault()) { - //BYTE nOutLevel = rTxtColl.GetOutlineLevel(); //<-#outline level, removed out by zhaojianwei + //sal_uInt8 nOutLevel = rTxtColl.GetOutlineLevel(); //<-#outline level, removed out by zhaojianwei //if(nOutLevel != NO_NUMBERING) //->added by zhaojianwei if(rTxtColl.IsAssignedToListLevelOfOutlineStyle()) @@ -292,7 +292,7 @@ SwOutlineTabDialog::~SwOutlineTabDialog() /* -----------------07.07.98 14:13------------------- * * --------------------------------------------------*/ -void SwOutlineTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage) +void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) { switch ( nPageId ) { @@ -321,7 +321,7 @@ IMPL_LINK( SwOutlineTabDialog, CancelHdl, Button *, EMPTYARG ) IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn ) { //PopupMenu auffuellen - for( USHORT i = 0; i < SwChapterNumRules::nMaxRules; ++i ) + for( sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i ) { const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i); if( pRules ) @@ -337,7 +337,7 @@ IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn ) * --------------------------------------------------*/ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu ) { - BYTE nLevelNo = 0; + sal_uInt8 nLevelNo = 0; switch(pMenu->GetCurItemId()) { case MN_FORM1: nLevelNo = 1; break; @@ -354,7 +354,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu ) { SwNumNamesDlg *pDlg = new SwNumNamesDlg(this); const String *aStrArr[SwChapterNumRules::nMaxRules]; - for(USHORT i = 0; i < SwChapterNumRules::nMaxRules; ++i) + for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i) { const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i); if(pRules) @@ -389,7 +389,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu ) *pNumRule = *rWrtSh.GetOutlineNumRule(); } - USHORT nPageId = GetCurPageId(); + sal_uInt16 nPageId = GetCurPageId(); SfxTabPage* pPage = GetTabPage( nPageId ); pPage->Reset(*GetOutputItemSet()); @@ -398,9 +398,9 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu ) /* -----------------07.07.98 14:19------------------- * * --------------------------------------------------*/ -USHORT SwOutlineTabDialog::GetLevel(const String &rFmtName) const +sal_uInt16 SwOutlineTabDialog::GetLevel(const String &rFmtName) const { - for(USHORT i = 0; i < MAXLEVEL; ++i) + for(sal_uInt16 i = 0; i < MAXLEVEL; ++i) { if(aCollNames[i] == rFmtName) return i; @@ -426,18 +426,18 @@ short SwOutlineTabDialog::Ok() const SwNumRule * pOutlineRule = rWrtSh.GetOutlineNumRule(); - USHORT i, nCount = rWrtSh.GetTxtFmtCollCount(); + sal_uInt16 i, nCount = rWrtSh.GetTxtFmtCollCount(); for( i = 0; i < nCount; ++i ) { SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i); if( !rTxtColl.IsDefault() ) { - //rTxtColl.SetOutlineLevel( (BYTE)GetLevel(rTxtColl.GetName()));//#outline level,removed by zhaojianwei + //rTxtColl.SetOutlineLevel( (sal_uInt8)GetLevel(rTxtColl.GetName()));//#outline level,removed by zhaojianwei const SfxPoolItem & rItem = - rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, FALSE); + rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, sal_False); - //if ((BYTE)GetLevel(rTxtColl.GetName()) == NO_NUMBERING) //#outline level,removed by zhaojianwei + //if ((sal_uInt8)GetLevel(rTxtColl.GetName()) == NO_NUMBERING) //#outline level,removed by zhaojianwei //{ // if (static_cast<const SwNumRuleItem &>(rItem).GetValue() == // pOutlineRule->GetName()) @@ -454,7 +454,7 @@ short SwOutlineTabDialog::Ok() // rTxtColl.SetFmtAttr(aItem); // } //} - if ((BYTE)GetLevel(rTxtColl.GetName()) == MAXLEVEL) //add by zhaojianwei + if ((sal_uInt8)GetLevel(rTxtColl.GetName()) == MAXLEVEL) //add by zhaojianwei { if(rTxtColl.IsAssignedToListLevelOfOutlineStyle()) { @@ -491,7 +491,7 @@ short SwOutlineTabDialog::Ok() //if( !aCollNames[i].Len() ) //#outline level,removed by zhaojianwei //{ // SwTxtFmtColl* pTxtColl = rWrtSh.GetTxtCollFromPool( - // static_cast< USHORT >(RES_POOLCOLL_HEADLINE1 + i) ); + // static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i) ); // pTxtColl->SetOutlineLevel( NO_NUMBERING ); // pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE); //} @@ -501,7 +501,7 @@ short SwOutlineTabDialog::Ok() // aCollNames[i], SwWrtShell::GETSTYLE_CREATESOME); // if(pTxtColl) // { - // pTxtColl->SetOutlineLevel( static_cast< BYTE >(i) ); + // pTxtColl->SetOutlineLevel( static_cast< sal_uInt8 >(i) ); // SwNumRuleItem aItem(pOutlineRule->GetName()); // pTxtColl->SetFmtAttr(aItem); @@ -510,7 +510,7 @@ short SwOutlineTabDialog::Ok() if(aCollNames[i] != sHeadline)//->added by zhaojianwei { SwTxtFmtColl* pTxtColl = rWrtSh.GetTxtCollFromPool( - static_cast< USHORT >(RES_POOLCOLL_HEADLINE1 + i) ); + static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i) ); pTxtColl->DeleteAssignmentToListLevelOfOutlineStyle(); pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE); @@ -593,17 +593,17 @@ void SwOutlineSettingsTabPage::Update() aCollBox.Enable(USHRT_MAX != nActLevel); if(USHRT_MAX == nActLevel) { - BOOL bSamePrefix = TRUE; - BOOL bSameSuffix = TRUE; - BOOL bSameType = TRUE; - BOOL bSameComplete = TRUE; - BOOL bSameStart = TRUE; - BOOL bSameCharFmt = TRUE; + sal_Bool bSamePrefix = sal_True; + sal_Bool bSameSuffix = sal_True; + sal_Bool bSameType = sal_True; + sal_Bool bSameComplete = sal_True; + sal_Bool bSameStart = sal_True; + sal_Bool bSameCharFmt = sal_True; const SwNumFmt* aNumFmtArr[MAXLEVEL]; const SwCharFmt* pFirstFmt = 0; - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { aNumFmtArr[ i ] = &pNumRule->Get(i); @@ -649,8 +649,8 @@ void SwOutlineSettingsTabPage::Update() else aCharFmtLB.SetNoSelection(); - aAllLevelFT.Enable(TRUE); - aAllLevelNF.Enable(TRUE); + aAllLevelFT.Enable(sal_True); + aAllLevelNF.Enable(sal_True); aAllLevelNF.SetMax(MAXLEVEL); if(bSameComplete) { @@ -663,7 +663,7 @@ void SwOutlineSettingsTabPage::Update() } else { - USHORT nTmpLevel = lcl_BitToLevel(nActLevel); + sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); String aColl(pCollNames[nTmpLevel]); if(aColl.Len()) aCollBox.SelectEntry(aColl); @@ -682,16 +682,16 @@ void SwOutlineSettingsTabPage::Update() if(nTmpLevel) { - aAllLevelFT.Enable(TRUE); - aAllLevelNF.Enable(TRUE); + aAllLevelFT.Enable(sal_True); + aAllLevelNF.Enable(sal_True); aAllLevelNF.SetMax(nTmpLevel + 1); aAllLevelNF.SetValue(rFmt.GetIncludeUpperLevels()); } else { aAllLevelNF.SetText(aEmptyStr); - aAllLevelNF.Enable(FALSE); - aAllLevelFT.Enable(FALSE); + aAllLevelNF.Enable(sal_False); + aAllLevelFT.Enable(sal_False); } CheckForStartValue_Impl(rFmt.GetNumberingType()); aStartEdit.SetValue( rFmt.GetStart() ); @@ -711,8 +711,8 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox ) } else { - USHORT nMask = 1; - for( USHORT i = 0; i < MAXLEVEL; i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) { if(pBox->IsEntryPosSelected( i )) nActLevel |= nMask; @@ -727,14 +727,14 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox ) * --------------------------------------------------*/ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld ) { - USHORT nMask = 1; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) { SwNumFmt aNumFmt(pNumRule->Get(i)); - aNumFmt.SetIncludeUpperLevels( Min( (BYTE)pFld->GetValue(), - (BYTE)(i + 1)) ); + aNumFmt.SetIncludeUpperLevels( Min( (sal_uInt8)pFld->GetValue(), + (sal_uInt8)(i + 1)) ); pNumRule->Set(i, aNumFmt); } nMask <<= 1; @@ -747,11 +747,11 @@ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld ) * --------------------------------------------------*/ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox ) { - BYTE i; + sal_uInt8 i; const String aCollName(pBox->GetSelectEntry()); //0xFFFF darf hier nicht sein (disable) - USHORT nTmpLevel = lcl_BitToLevel(nActLevel); + sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); String sOldName( pCollNames[nTmpLevel] ); for( i = 0; i < MAXLEVEL; ++i) @@ -774,7 +774,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox ) if( aSaveCollNames[ i ] == sOldName && i != nTmpLevel && !pCollNames[ i ].Len() ) { - BYTE n; + sal_uInt8 n; for( n = 0; n < MAXLEVEL; ++n ) if( pCollNames[ n ] == sOldName ) break; @@ -790,7 +790,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox ) IMPL_LINK( SwOutlineSettingsTabPage, CollSelectGetFocus, ListBox *, EMPTYARG ) { - for( BYTE i = 0; i < MAXLEVEL; ++i) + for( sal_uInt8 i = 0; i < MAXLEVEL; ++i) aSaveCollNames[i] = pCollNames[i]; return 0; } @@ -800,9 +800,9 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelectGetFocus, ListBox *, EMPTYARG ) * --------------------------------------------------*/ IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBox ) { - USHORT nMask = 1; - sal_Int16 nNumberType = pBox->GetSelectedNumberingType();//(sal_Int16)(ULONG)pBox->GetEntryData(pBox->GetSelectEntryPos()); - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + sal_Int16 nNumberType = pBox->GetSelectedNumberingType();//(sal_Int16)(sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos()); + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) { @@ -821,8 +821,8 @@ IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBo * --------------------------------------------------*/ IMPL_LINK( SwOutlineSettingsTabPage, DelimModify, Edit *, EMPTYARG ) { - USHORT nMask = 1; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) { @@ -841,13 +841,13 @@ IMPL_LINK( SwOutlineSettingsTabPage, DelimModify, Edit *, EMPTYARG ) * --------------------------------------------------*/ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld ) { - USHORT nMask = 1; - for(USHORT i = 0; i < MAXLEVEL; i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) { SwNumFmt aNumFmt(pNumRule->Get(i)); - aNumFmt.SetStart( (USHORT)pFld->GetValue() ); + aNumFmt.SetStart( (sal_uInt16)pFld->GetValue() ); pNumRule->Set(i, aNumFmt); } nMask <<= 1; @@ -860,15 +860,15 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld ) * --------------------------------------------------*/ IMPL_LINK( SwOutlineSettingsTabPage, CharFmtHdl, ListBox *, EMPTYARG ) { -// bAutomaticCharStyles = FALSE; +// bAutomaticCharStyles = sal_False; String sEntry = aCharFmtLB.GetSelectEntry(); - USHORT nMask = 1; - BOOL bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone; + sal_uInt16 nMask = 1; + sal_Bool bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone; SwCharFmt* pFmt = 0; if(!bFormatNone) { - USHORT nChCount = pSh->GetCharFmtCount(); - for(USHORT i = 0; i < nChCount; i++) + sal_uInt16 nChCount = pSh->GetCharFmtCount(); + for(sal_uInt16 i = 0; i < nChCount; i++) { SwCharFmt& rChFmt = pSh->GetCharFmt(i); if(rChFmt.GetName() == sEntry) @@ -889,7 +889,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CharFmtHdl, ListBox *, EMPTYARG ) } } - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) { @@ -925,13 +925,13 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) aPreviewWIN.SetNumRule(pNumRule); aPreviewWIN.SetOutlineNames(pCollNames); // Startwert setzen - nActLevel muss hier 1 sein - USHORT nTmpLevel = lcl_BitToLevel(nActLevel); + sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); const SwNumFmt& rNumFmt = pNumRule->Get( nTmpLevel ); aStartEdit.SetValue( rNumFmt.GetStart() ); // Poolformate fuer Ueberschriften anlegen String sStr; - USHORT i; + sal_uInt16 i; for( i = 0; i < MAXLEVEL; ++i ) { aCollBox.InsertEntry( SwStyleNameMapper::GetUIName( @@ -943,7 +943,7 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) aLevelLB.InsertEntry( sStr ); // Erfragen der Gliederungsebenen der Textvorlagen - const USHORT nCount = pSh->GetTxtFmtCollCount(); + const sal_uInt16 nCount = pSh->GetTxtFmtCollCount(); for( i = 0; i < nCount; ++i ) { SwTxtFmtColl &rTxtColl = pSh->GetTxtFmtColl(i); @@ -956,11 +956,11 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) } aNumberBox.SelectNumberingType(rNumFmt.GetNumberingType()); - USHORT nOutlinePos = pSh->GetOutlinePos(MAXLEVEL); - USHORT nTmp = 0; + sal_uInt16 nOutlinePos = pSh->GetOutlinePos(MAXLEVEL); + sal_uInt16 nTmp = 0; if(nOutlinePos != USHRT_MAX) { - nTmp = static_cast<USHORT>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos)); + nTmp = static_cast<sal_uInt16>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos)); } aLevelLB.SelectEntryPos(nTmp-1);//nTmp);//#outline level,zhaojianwei @@ -996,9 +996,9 @@ int SwOutlineSettingsTabPage::DeactivatePage(SfxItemSet*) /* -----------------07.07.98 14:19------------------- * * --------------------------------------------------*/ -BOOL SwOutlineSettingsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SwOutlineSettingsTabPage::FillItemSet( SfxItemSet& ) { - return TRUE; + return sal_True; } /* -----------------07.07.98 14:19------------------- * @@ -1020,8 +1020,8 @@ SfxTabPage* SwOutlineSettingsTabPage::Create( Window* pParent, * --------------------------------------------------*/ void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType) { - BOOL bIsNull = aStartEdit.GetValue() == 0; - BOOL bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC || + sal_Bool bIsNull = aStartEdit.GetValue() == 0; + sal_Bool bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC || SVX_NUM_CHARS_UPPER_LETTER_N == nNumberingType || SVX_NUM_CHARS_LOWER_LETTER_N == nNumberingType; aStartEdit.SetMin(bNoZeroAllowed ? 1 : 0); @@ -1031,19 +1031,19 @@ void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType /*-----------------09.12.97 11:54------------------- --------------------------------------------------*/ -USHORT lcl_DrawBullet(VirtualDevice* pVDev, - const SwNumFmt& rFmt, USHORT nXStart, - USHORT nYStart, const Size& rSize) +sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev, + const SwNumFmt& rFmt, sal_uInt16 nXStart, + sal_uInt16 nYStart, const Size& rSize) { Font aTmpFont(pVDev->GetFont()); Font aFont(*rFmt.GetBulletFont()); aFont.SetSize(rSize); - aFont.SetTransparent(TRUE); + aFont.SetTransparent(sal_True); pVDev->SetFont( aFont ); String aText(rFmt.GetBulletChar()); pVDev->DrawText( Point(nXStart, nYStart), aText ); - USHORT nRet = (USHORT)pVDev->GetTextWidth(aText); + sal_uInt16 nRet = (sal_uInt16)pVDev->GetTextWidth(aText); pVDev->SetFont(aTmpFont); return nRet; @@ -1051,11 +1051,11 @@ USHORT lcl_DrawBullet(VirtualDevice* pVDev, /*-----------------09.12.97 11:49------------------- --------------------------------------------------*/ -USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, USHORT nXStart, - USHORT nYStart, USHORT nDivision) +sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, sal_uInt16 nXStart, + sal_uInt16 nYStart, sal_uInt16 nDivision) { const SvxBrushItem* pBrushItem = rFmt.GetBrush(); - USHORT nRet = 0; + sal_uInt16 nRet = 0; if(pBrushItem) { const Graphic* pGrf = pBrushItem->GetGraphic(); @@ -1063,7 +1063,7 @@ USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, USHORT nXStar { Size aGSize( rFmt.GetGraphicSize()); aGSize.Width() /= nDivision; - nRet = (USHORT)aGSize.Width(); + nRet = (sal_uInt16)aGSize.Width(); aGSize.Height() /= nDivision; pGrf->Draw( pVDev, Point(nXStart,nYStart), pVDev->PixelToLogic( aGSize ) ); @@ -1091,10 +1091,10 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) if(pActNum) { - USHORT nWidthRelation; + sal_uInt16 nWidthRelation; if(nPageWidth) { - nWidthRelation = USHORT (nPageWidth / aSize.Width()); + nWidthRelation = sal_uInt16 (nPageWidth / aSize.Width()); if(bPosition) nWidthRelation = nWidthRelation * 2 / 3; else @@ -1104,11 +1104,11 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) nWidthRelation = 30; // Kapiteldialog //Hoehe pro Ebene - USHORT nXStep = USHORT(aSize.Width() / (3 * MAXLEVEL)); + sal_uInt16 nXStep = sal_uInt16(aSize.Width() / (3 * MAXLEVEL)); if(MAXLEVEL < 10) nXStep /= 2; - USHORT nYStart = 4; - USHORT nYStep = USHORT((aSize.Height() - 6)/ MAXLEVEL); + sal_uInt16 nYStart = 4; + sal_uInt16 nYStep = sal_uInt16((aSize.Height() - 6)/ MAXLEVEL); aStdFont = OutputDevice::GetDefaultFont( DEFAULTFONT_UI_SANS, (LanguageType)GetAppLanguage(), DEFAULTFONT_FLAGS_ONLYONE, this ); @@ -1116,17 +1116,17 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) aStdFont.SetColor( SwViewOption::GetFontColor() ); // - USHORT nFontHeight = nYStep * 6 / 10; + sal_uInt16 nFontHeight = nYStep * 6 / 10; if(bPosition) nFontHeight = nYStep * 15 / 10; aStdFont.SetSize(Size( 0, nFontHeight )); - USHORT nPreNum = pActNum->Get(0).GetStart(); + sal_uInt16 nPreNum = pActNum->Get(0).GetStart(); if(bPosition) { - USHORT nLineHeight = nFontHeight * 8 / 7; - BYTE nStart = 0; + sal_uInt16 nLineHeight = nFontHeight * 8 / 7; + sal_uInt8 nStart = 0; while( !(nActLevel & (1<<nStart)) ) { nStart++; @@ -1135,22 +1135,22 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) nStart--; SwNumberTree::tNumberVector aNumVector; - BYTE nEnd = Min( (BYTE)(nStart + 3), MAXLEVEL ); - for( BYTE nLevel = nStart; nLevel < nEnd; ++nLevel ) + sal_uInt8 nEnd = Min( (sal_uInt8)(nStart + 3), MAXLEVEL ); + for( sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel ) { const SwNumFmt &rFmt = pActNum->Get(nLevel); aNumVector.push_back(rFmt.GetStart()); // --> OD 2008-02-01 #newlistlevelattrs# - USHORT nXStart( 0 ); + sal_uInt16 nXStart( 0 ); short nTextOffset( 0 ); - USHORT nNumberXPos( 0 ); + sal_uInt16 nNumberXPos( 0 ); if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nXStart = rFmt.GetAbsLSpace() / nWidthRelation; nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation; nNumberXPos = nXStart; - USHORT nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation; + sal_uInt16 nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation; if(nFirstLineOffset <= nNumberXPos) nNumberXPos = nNumberXPos - nFirstLineOffset; @@ -1168,12 +1168,12 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) } else { - nNumberXPos = static_cast<USHORT>(nTmpNumberXPos); + nNumberXPos = static_cast<sal_uInt16>(nTmpNumberXPos); } } // <-- - USHORT nBulletWidth = 0; + sal_uInt16 nBulletWidth = 0; if( SVX_NUM_BITMAP == rFmt.GetNumberingType() ) { nBulletWidth = lcl_DrawGraphic(pVDev, rFmt, @@ -1193,7 +1193,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) String aText(pActNum->MakeNumString( aNumVector )); // <-- pVDev->DrawText( Point(nNumberXPos, nYStart), aText ); - nBulletWidth = (USHORT)pVDev->GetTextWidth(aText); + nBulletWidth = (sal_uInt16)pVDev->GetTextWidth(aText); nPreNum++; } // --> OD 2008-02-01 #newlistlevelattrs# @@ -1203,12 +1203,12 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) pVDev->SetFont(aStdFont); String aText(' '); pVDev->DrawText( Point(nNumberXPos, nYStart), aText ); - nBulletWidth = nBulletWidth + (USHORT)pVDev->GetTextWidth(aText); + nBulletWidth = nBulletWidth + (sal_uInt16)pVDev->GetTextWidth(aText); } // <-- // --> OD 2008-02-01 #newlistlevelattrs# - USHORT nTextXPos( 0 ); + sal_uInt16 nTextXPos( 0 ); if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nTextXPos = nXStart; @@ -1223,7 +1223,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) { case SvxNumberFormat::LISTTAB: { - nTextXPos = static_cast<USHORT>( + nTextXPos = static_cast<sal_uInt16>( rFmt.GetListtabPos() / nWidthRelation ); if ( nTextXPos < nNumberXPos + nBulletWidth ) { @@ -1239,7 +1239,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) break; } - nXStart = static_cast<USHORT>( rFmt.GetIndentAt() / nWidthRelation ); + nXStart = static_cast<sal_uInt16>( rFmt.GetIndentAt() / nWidthRelation ); } // <-- @@ -1256,14 +1256,14 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) else { SwNumberTree::tNumberVector aNumVector; - USHORT nLineHeight = nFontHeight * 3 / 2; - for( BYTE nLevel = 0; nLevel < MAXLEVEL; + sal_uInt16 nLineHeight = nFontHeight * 3 / 2; + for( sal_uInt8 nLevel = 0; nLevel < MAXLEVEL; ++nLevel, nYStart = nYStart + nYStep ) { const SwNumFmt &rFmt = pActNum->Get(nLevel); aNumVector.push_back(rFmt.GetStart()); // --> OD 2008-02-01 #newlistlevelattrs# - USHORT nXStart( 0 ); + sal_uInt16 nXStart( 0 ); if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nXStart = rFmt.GetAbsLSpace() / nWidthRelation; @@ -1279,13 +1279,13 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) } else { - nXStart = static_cast<USHORT>(nTmpXStart); + nXStart = static_cast<sal_uInt16>(nTmpXStart); } } nXStart /= 2; nXStart += 2; // <-- - USHORT nTextOffset = 2 * nXStep; + sal_uInt16 nTextOffset = 2 * nXStep; if( SVX_NUM_BITMAP == rFmt.GetNumberingType() ) { lcl_DrawGraphic(pVDev, rFmt, nXStart, nYStart, nWidthRelation); @@ -1305,7 +1305,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ ) String aText(pActNum->MakeNumString( aNumVector )); // <-- pVDev->DrawText( Point(nXStart, nYStart), aText ); - nTextOffset = (USHORT)pVDev->GetTextWidth(aText); + nTextOffset = (sal_uInt16)pVDev->GetTextWidth(aText); nTextOffset = nTextOffset + nXStep; nPreNum++; } diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 9d940b33d332..facd2cb583ef 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -70,7 +70,7 @@ Beschreibung: vordefinierte Linien in Point --------------------------------------------------------------------*/ -static const USHORT __FAR_DATA nLines[] = { +static const sal_uInt16 __FAR_DATA nLines[] = { 0, 50, 100, @@ -79,9 +79,9 @@ static const USHORT __FAR_DATA nLines[] = { 500 }; -static const USHORT nLineCount = sizeof(nLines) / sizeof(nLines[0]); +static const sal_uInt16 nLineCount = sizeof(nLines) / sizeof(nLines[0]); -static USHORT __FAR_DATA aPageRg[] = { +static sal_uInt16 __FAR_DATA aPageRg[] = { FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO, 0 }; @@ -93,13 +93,13 @@ static USHORT __FAR_DATA aPageRg[] = { ------------------------------------------------------------------------*/ -BOOL lcl_HasLineWidth(USHORT nWidth) +sal_Bool lcl_HasLineWidth(sal_uInt16 nWidth) { - for(USHORT i = 0; i < nLineCount; ++i) { + for(sal_uInt16 i = 0; i < nLineCount; ++i) { if(nLines[i] == nWidth) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /*------------------------------------------------------------------------ @@ -111,7 +111,7 @@ BOOL lcl_HasLineWidth(USHORT nWidth) IMPL_LINK_INLINE_START( SwFootNotePage, HeightPage, Button *, EMPTYARG ) { - aMaxHeightEdit.Enable(FALSE); + aMaxHeightEdit.Enable(sal_False); return 0; } IMPL_LINK_INLINE_END( SwFootNotePage, HeightPage, Button *, EMPTYARG ) @@ -177,7 +177,7 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) : FreeResource(); SetExchangeSupport(); - FieldUnit aMetric = ::GetDfltMetric(FALSE); + FieldUnit aMetric = ::GetDfltMetric(sal_False); SetMetric( aMaxHeightEdit, aMetric ); SetMetric( aDistEdit, aMetric ); SetMetric( aLineDistEdit, aMetric ); @@ -225,12 +225,12 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet) if(lHeight) { aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(lHeight),FUNIT_TWIP); - aMaxHeightBtn.Check(TRUE); + aMaxHeightBtn.Check(sal_True); } else { - aMaxHeightPageBtn.Check(TRUE); - aMaxHeightEdit.Enable(FALSE); + aMaxHeightPageBtn.Check(sal_True); + aMaxHeightEdit.Enable(sal_False); } aMaxHeightPageBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightPage)); aMaxHeightBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightMetric)); @@ -240,16 +240,16 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet) aLineDistEdit.SetLoseFocusHdl( aLk ); // Trennlinie - for(USHORT i = 0; i < nLineCount; ++i) + for(sal_uInt16 i = 0; i < nLineCount; ++i) aLineTypeBox.InsertEntry(nLines[i]); - const USHORT nWidth = (USHORT)pFtnInfo->GetLineWidth() * TWIP_TO_LBOX; + const sal_uInt16 nWidth = (sal_uInt16)pFtnInfo->GetLineWidth() * TWIP_TO_LBOX; if ( !lcl_HasLineWidth(nWidth) ) aLineTypeBox.InsertEntry(nWidth); aLineTypeBox.SelectEntry(nWidth); // Position - aLinePosBox.SelectEntryPos( static_cast< USHORT >(pFtnInfo->GetAdj()) ); + aLinePosBox.SelectEntryPos( static_cast< sal_uInt16 >(pFtnInfo->GetAdj()) ); // Breite Fraction aTmp( 100, 1 ); @@ -269,7 +269,7 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet) --------------------------------------------------------------------*/ -BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet) +sal_Bool SwFootNotePage::FillItemSet(SfxItemSet &rSet) { SwPageFtnInfoItem aItem((const SwPageFtnInfoItem&)GetItemSet().Get(FN_PARAM_FTN_INFO)); @@ -290,7 +290,7 @@ BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet) aLineDistEdit.Denormalize(aLineDistEdit.GetValue(FUNIT_TWIP)))); // Trennlinie - const USHORT nPos = aLineTypeBox.GetSelectEntryPos(); + const sal_uInt16 nPos = aLineTypeBox.GetSelectEntryPos(); if( LISTBOX_ENTRY_NOTFOUND != nPos ) rFtnInfo.SetLineWidth(nLines[nPos] / TWIP_TO_LBOX); @@ -305,7 +305,7 @@ BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet) aItem != *pOldItem ) rSet.Put(aItem); - return TRUE; + return sal_True; } void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) @@ -314,7 +314,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) lMaxHeight = rSize.GetSize().Height(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), sal_False, &pItem ) ) { const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); const SfxBoolItem& rHeaderOn = @@ -329,7 +329,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) } if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_FOOTERSET), - FALSE, &pItem ) ) + sal_False, &pItem ) ) { const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); const SfxBoolItem& rFooterOn = @@ -343,7 +343,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) } } - if ( rSet.GetItemState( RES_UL_SPACE , FALSE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( RES_UL_SPACE , sal_False ) == SFX_ITEM_SET ) { const SvxULSpaceItem &rUL = (const SvxULSpaceItem&)rSet.Get( RES_UL_SPACE ); lMaxHeight -= rUL.GetUpper() + rUL.GetLower(); @@ -361,10 +361,10 @@ int SwFootNotePage::DeactivatePage( SfxItemSet* _pSet) if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } -USHORT* SwFootNotePage::GetRanges() +sal_uInt16* SwFootNotePage::GetRanges() { return aPageRg; } diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index a6e20cc56dc3..90d600301a56 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -149,14 +149,14 @@ SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) : XColorTable* pColorTbl = XColorTable::GetStdColorTable(); aColorLB.InsertAutomaticEntry(); - for( USHORT i = 0; i < pColorTbl->Count(); ++i ) + for( sal_uInt16 i = 0; i < pColorTbl->Count(); ++i ) { XColorEntry* pEntry = pColorTbl->GetColor( i ); Color aColor = pEntry->GetColor(); String sName = pEntry->GetName(); aColorLB.InsertEntry( aColor, sName ); } - aColorLB.SetUpdateMode( TRUE ); + aColorLB.SetUpdateMode( sal_True ); //Get the default paper mode SwView *pView = ::GetActiveView(); if( pView ) @@ -202,9 +202,9 @@ SfxTabPage *SwTextGridPage::Create(Window *pParent, const SfxItemSet &rSet) /*-- 06.02.2002 15:25:40--------------------------------------------------- -----------------------------------------------------------------------*/ -BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SwTextGridPage::FillItemSet(SfxItemSet &rSet) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if(aNoGridRB.GetSavedValue() != aNoGridRB.IsChecked()|| aLinesGridRB.GetSavedValue() != aLinesGridRB.IsChecked()|| aLinesPerPageNF.GetSavedValue().ToInt32() @@ -221,7 +221,7 @@ BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet) aColorLB.GetSavedValue() != aColorLB.GetSelectEntryPos()) { PutGridItem(rSet); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -231,7 +231,7 @@ BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet) -----------------------------------------------------------------------*/ void SwTextGridPage::Reset(const SfxItemSet &rSet) { - if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, TRUE)) + if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, sal_True)) { const SwTextGridItem& rGridItem = (const SwTextGridItem&)rSet.Get(RES_TEXTGRID); RadioButton* pButton = 0; @@ -315,7 +315,7 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet) ---------------------------------------------------------------------------*/ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet) { - if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, TRUE )) + if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, sal_True )) { const SvxFrameDirectionItem& rDirItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR); @@ -374,9 +374,9 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet) /* -----------------------------06.02.2002 15:24------------------------------ ---------------------------------------------------------------------------*/ -USHORT* SwTextGridPage::GetRanges() +sal_uInt16* SwTextGridPage::GetRanges() { - static USHORT __FAR_DATA aPageRg[] = { + static sal_uInt16 __FAR_DATA aPageRg[] = { RES_TEXTGRID, RES_TEXTGRID, 0}; return aPageRg; diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx index 0101e92a0081..9cb595be6302 100644 --- a/sw/source/ui/misc/redlndlg.cxx +++ b/sw/source/ui/misc/redlndlg.cxx @@ -102,15 +102,15 @@ SV_IMPL_OP_PTRARR_SORT(SwRedlineDataParentSortArr, SwRedlineDataParentPtr) SV_IMPL_PTRARR(SwRedlineDataChildArr, SwRedlineDataChildPtr) SV_IMPL_PTRARR(SvLBoxEntryArr, SvLBoxEntryPtr) -static USHORT nSortMode = 0xffff; -static BOOL bSortDir = TRUE; +static sal_uInt16 nSortMode = 0xffff; +static sal_Bool bSortDir = sal_True; /*------------------------------------------------------------------------ Beschreibung: ------------------------------------------------------------------------*/ SwRedlineAcceptChild::SwRedlineAcceptChild( Window* _pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : SwChildWinWrapper( _pParent, nId ) @@ -124,11 +124,11 @@ SwRedlineAcceptChild::SwRedlineAcceptChild( Window* _pParent, Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren --------------------------------------------------------------------*/ -BOOL SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh) +sal_Bool SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh) { - BOOL bRet; + sal_Bool bRet; - if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // Sofort aktualisieren, Dok-Wechsel + if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // Sofort aktualisieren, Dok-Wechsel ((SwModelessRedlineAcceptDlg*)GetWindow())->Activate(); return bRet; @@ -164,13 +164,13 @@ void SwModelessRedlineAcceptDlg::Activate() if (pChildWin->GetOldDocShell() != pDocSh) { // Dok-Wechsel - SwWait aWait( *pDocSh, FALSE ); + SwWait aWait( *pDocSh, sal_False ); SwWrtShell* pSh = pView->GetWrtShellPtr(); pChildWin->SetOldDocShell(pDocSh); // Rekursion vermeiden (durch Modified-Hdl) - BOOL bMod = pSh->IsModified(); - SfxBoolItem aShow(FN_REDLINE_SHOW, TRUE); + sal_Bool bMod = pSh->IsModified(); + SfxBoolItem aShow(FN_REDLINE_SHOW, sal_True); pSh->GetView().GetViewFrame()->GetDispatcher()->Execute( FN_REDLINE_SHOW, SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, &aShow, 0L); if (!bMod) @@ -229,7 +229,7 @@ SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg() Beschreibung: ------------------------------------------------------------------------*/ -SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) : +SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt) : pParentDlg (pParent), aTabPagesCTRL (pParent, SW_RES(CTRL_TABPAGES)), aPopup (SW_RES(MN_REDLINE_POPUP)), @@ -239,8 +239,8 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) : sTableChgd (SW_RES(STR_REDLINE_TABLECHG)), sFmtCollSet (SW_RES(STR_REDLINE_FMTCOLLSET)), sAutoFormat (SW_RES(STR_REDLINE_AUTOFMT)), - bOnlyFormatedRedlines( FALSE ), - bHasReadonlySel ( FALSE ), + bOnlyFormatedRedlines( sal_False ), + bHasReadonlySel ( sal_False ), bRedlnAutoFmt (bAutoFmt), bInhibitActivate( false ) { @@ -267,7 +267,7 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) : { pActLB->InsertEntry(sFmtCollSet); pActLB->InsertEntry(sAutoFormat); - pTPView->ShowUndo(TRUE); + pTPView->ShowUndo(sal_True); pTPView->DisableUndo(); // Noch gibts keine UNDO-Events } @@ -327,11 +327,11 @@ SwRedlineAcceptDlg::~SwRedlineAcceptDlg() Beschreibung: ------------------------------------------------------------------------*/ -void SwRedlineAcceptDlg::Init(USHORT nStart) +void SwRedlineAcceptDlg::Init(sal_uInt16 nStart) { - SwWait aWait( *::GetActiveView()->GetDocShell(), FALSE ); - pTable->SetUpdateMode(FALSE); - aUsedSeqNo.Remove((USHORT)0, aUsedSeqNo.Count()); + SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False ); + pTable->SetUpdateMode(sal_False); + aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count()); if (nStart) RemoveParents(nStart, aRedlineParents.Count() - 1); @@ -346,7 +346,7 @@ void SwRedlineAcceptDlg::Init(USHORT nStart) InsertParents(nStart); InitAuthors(); - pTable->SetUpdateMode(TRUE); + pTable->SetUpdateMode(sal_True); // #i69618# this moves the list box to the right position, visually SvLBoxEntry* pSelEntry = pTable->FirstSelected(); if( pSelEntry ) @@ -369,12 +369,12 @@ void SwRedlineAcceptDlg::InitAuthors() pFilterPage->ClearAuthors(); String sParent; - USHORT nCount = pSh->GetRedlineCount(); + sal_uInt16 nCount = pSh->GetRedlineCount(); - bOnlyFormatedRedlines = TRUE; - bHasReadonlySel = FALSE; - BOOL bIsNotFormated = FALSE; - USHORT i; + bOnlyFormatedRedlines = sal_True; + bHasReadonlySel = sal_False; + sal_Bool bIsNotFormated = sal_False; + sal_uInt16 i; // Autoren ermitteln for ( i = 0; i < nCount; i++) @@ -382,17 +382,17 @@ void SwRedlineAcceptDlg::InitAuthors() const SwRedline& rRedln = pSh->GetRedline(i); if( bOnlyFormatedRedlines && nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType() ) - bOnlyFormatedRedlines = FALSE; + bOnlyFormatedRedlines = sal_False; //JP 27.9.2001: make no sense if we handle readonly sections // if( !bHasReadonlySel && rRedln.HasReadonlySel() ) -// bHasReadonlySel = TRUE; +// bHasReadonlySel = sal_True; String *pAuthor = new String(rRedln.GetAuthorString()); if (!aStrings.Insert(pAuthor)) delete pAuthor; - for (USHORT nStack = 1; nStack < rRedln.GetStackCount(); nStack++) + for (sal_uInt16 nStack = 1; nStack < rRedln.GetStackCount(); nStack++) { pAuthor = new String(rRedln.GetAuthorString(nStack)); if (!aStrings.Insert(pAuthor)) @@ -406,13 +406,13 @@ void SwRedlineAcceptDlg::InitAuthors() if (pFilterPage->SelectAuthor(sOldAuthor) == LISTBOX_ENTRY_NOTFOUND && aStrings.Count()) pFilterPage->SelectAuthor(*aStrings[0]); - BOOL bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength(); - BOOL bSel = pTable->FirstSelected() != 0; + sal_Bool bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength(); + sal_Bool bSel = pTable->FirstSelected() != 0; SvLBoxEntry* pSelEntry = pTable->FirstSelected(); while (pSelEntry) { - USHORT nPos = GetRedlinePos(*pSelEntry); + sal_uInt16 nPos = GetRedlinePos(*pSelEntry); const SwRedline& rRedln = pSh->GetRedline( nPos ); bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType(); @@ -431,7 +431,7 @@ void SwRedlineAcceptDlg::InitAuthors() ------------------------------------------------------------------------*/ String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln, - DateTime &rDateTime, USHORT nStack) + DateTime &rDateTime, sal_uInt16 nStack) { String sEntry(GetActionText(rRedln, nStack)); sEntry += '\t'; @@ -453,7 +453,7 @@ String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln, Beschreibung: ------------------------------------------------------------------------*/ -const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, USHORT nStack) +const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, sal_uInt16 nStack) { switch( rRedln.GetType(nStack) ) { @@ -495,9 +495,9 @@ void SwRedlineAcceptDlg::Activate() return; SwView *pView = ::GetActiveView(); - SwWait aWait( *pView->GetDocShell(), FALSE ); + SwWait aWait( *pView->GetDocShell(), sal_False ); - aUsedSeqNo.Remove((USHORT)0, aUsedSeqNo.Count()); + aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count()); if (!pView) // Kann passieren, wenn man auf eine andere App umschaltet, wenn return; // vorher eine Listbox im Dialog den Focus hatte (eigentlich THs Bug) @@ -510,11 +510,11 @@ void SwRedlineAcceptDlg::Activate() // Hat sich was geaendert? SwWrtShell* pSh = pView->GetWrtShellPtr(); - USHORT nCount = pSh->GetRedlineCount(); + sal_uInt16 nCount = pSh->GetRedlineCount(); // Anzahl und Pointer ueberpruefen SwRedlineDataParent *pParent = 0; - USHORT i; + sal_uInt16 i; for ( i = 0; i < nCount; i++) { @@ -531,7 +531,7 @@ void SwRedlineAcceptDlg::Activate() if (&rRedln.GetRedlineData() != pParent->pData) { // Redline-Parents wurden eingefuegt, geaendert oder geloescht - if ((i = CalcDiff(i, FALSE)) == USHRT_MAX) + if ((i = CalcDiff(i, sal_False)) == USHRT_MAX) return; continue; } @@ -542,7 +542,7 @@ void SwRedlineAcceptDlg::Activate() if (!pRedlineData && pBackupData) { // Redline-Childs wurden geloescht - if ((i = CalcDiff(i, TRUE)) == USHRT_MAX) + if ((i = CalcDiff(i, sal_True)) == USHRT_MAX) return; continue; } @@ -553,7 +553,7 @@ void SwRedlineAcceptDlg::Activate() if (pRedlineData != pBackupData->pChild) { // Redline-Childs wurden eingefuegt, geaendert oder geloescht - if ((i = CalcDiff(i, TRUE)) == USHRT_MAX) + if ((i = CalcDiff(i, sal_True)) == USHRT_MAX) return; continue; } @@ -597,7 +597,7 @@ void SwRedlineAcceptDlg::Activate() * * --------------------------------------------------*/ -USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild) +sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild) { if (!nStart) { @@ -605,10 +605,10 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild) return USHRT_MAX; } - pTable->SetUpdateMode(FALSE); + pTable->SetUpdateMode(sal_False); SwView *pView = ::GetActiveView(); SwWrtShell* pSh = pView->GetWrtShellPtr(); - USHORT nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0; + sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0; SwRedlineDataParent *pParent = aRedlineParents[nStart]; const SwRedline& rRedln = pSh->GetRedline(nStart); @@ -632,26 +632,26 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild) // Neue Childs einfuegen InsertChilds(pParent, rRedln, nAutoFmt); - pTable->SetUpdateMode(TRUE); + pTable->SetUpdateMode(sal_True); return nStart; } // Wurden Eintraege geloescht? const SwRedlineData *pRedlineData = &rRedln.GetRedlineData(); - USHORT i; + sal_uInt16 i; for ( i = nStart + 1; i < aRedlineParents.Count(); i++) { if (aRedlineParents[i]->pData == pRedlineData) { // Eintraege von nStart bis i-1 entfernen RemoveParents(nStart, i - 1); - pTable->SetUpdateMode(TRUE); + pTable->SetUpdateMode(sal_True); return nStart - 1; } } // Wurden Eintraege eingefuegt? - USHORT nCount = pSh->GetRedlineCount(); + sal_uInt16 nCount = pSh->GetRedlineCount(); pRedlineData = aRedlineParents[nStart]->pData; for (i = nStart + 1; i < nCount; i++) @@ -660,12 +660,12 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild) { // Eintraege von nStart bis i-1 einfuegen InsertParents(nStart, i - 1); - pTable->SetUpdateMode(TRUE); + pTable->SetUpdateMode(sal_True); return nStart - 1; } } - pTable->SetUpdateMode(TRUE); + pTable->SetUpdateMode(sal_True); Init(nStart); // Alle Eintraege bis zum Ende abgleichen return USHRT_MAX; } @@ -674,19 +674,19 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild) * * --------------------------------------------------*/ -void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const USHORT nAutoFmt) +void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const sal_uInt16 nAutoFmt) { String sChild; SwRedlineDataChild *pLastRedlineChild = 0; const SwRedlineData *pRedlineData = &rRedln.GetRedlineData(); - BOOL bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0; + sal_Bool bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0; const String *pAction = &GetActionText(rRedln); - BOOL bValidParent = !sFilterAction.Len() || sFilterAction == *pAction; + sal_Bool bValidParent = !sFilterAction.Len() || sFilterAction == *pAction; bValidParent = bValidParent && pTable->IsValidEntry(&rRedln.GetAuthorString(), &rRedln.GetTimeStamp(), &rRedln.GetComment()); if (nAutoFmt) { - USHORT nPos; + sal_uInt16 nPos; if (pParent->pData->GetSeqNo() && !aUsedSeqNo.Insert(pParent, nPos)) // Gibts schon { @@ -700,9 +700,9 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl } bValidParent = bValidParent && bAutoFmt; } - BOOL bValidTree = bValidParent; + sal_Bool bValidTree = bValidParent; - for (USHORT nStack = 1; nStack < rRedln.GetStackCount(); nStack++) + for (sal_uInt16 nStack = 1; nStack < rRedln.GetStackCount(); nStack++) { pRedlineData = pRedlineData->Next(); @@ -716,7 +716,7 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl pParent->pNext = pRedlineChild; pAction = &GetActionText(rRedln, nStack); - BOOL bValidChild = !sFilterAction.Len() || sFilterAction == *pAction; + sal_Bool bValidChild = !sFilterAction.Len() || sFilterAction == *pAction; bValidChild = bValidChild && pTable->IsValidEntry(&rRedln.GetAuthorString(nStack), &rRedln.GetTimeStamp(nStack), &rRedln.GetComment()); if (nAutoFmt) bValidChild = bValidChild && bAutoFmt; @@ -726,7 +726,7 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl { RedlinData *pData = new RedlinData; pData->pData = pRedlineChild; - pData->bDisabled = TRUE; + pData->bDisabled = sal_True; sChild = GetRedlineText(rRedln, pData->aDateTime, nStack); SvLBoxEntry* pChild = pTable->InsertEntry(sChild, pData, pParent->pTLBParent); @@ -757,22 +757,22 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl * * --------------------------------------------------*/ -void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd) +void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd) { SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr(); - USHORT nCount = pSh->GetRedlineCount(); + sal_uInt16 nCount = pSh->GetRedlineCount(); SvLBoxEntryArr aLBoxArr; // Wegen Bug der TLB, die bei Remove den SelectHandler IMMER ruft: pTable->SetSelectHdl(aOldSelectHdl); pTable->SetDeselectHdl(aOldDeselectHdl); - BOOL bChildsRemoved = FALSE; - pTable->SelectAll(FALSE); + sal_Bool bChildsRemoved = sal_False; + pTable->SelectAll(sal_False); // Hinter dem letzten Eintrag Cursor setzen, da sonst Performance-Problem in TLB. // TLB wuerde sonst bei jedem Remove den Cursor erneut umsetzen (teuer) - USHORT nPos = Min((USHORT)nCount, (USHORT)aRedlineParents.Count()); + sal_uInt16 nPos = Min((sal_uInt16)nCount, (sal_uInt16)aRedlineParents.Count()); SvLBoxEntry *pCurEntry = NULL; while( ( pCurEntry == NULL ) && ( nPos > 0 ) ) { @@ -785,16 +785,16 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd) SvLBoxTreeList* pModel = pTable->GetModel(); - for (USHORT i = nStart; i <= nEnd; i++) + for (sal_uInt16 i = nStart; i <= nEnd; i++) { if (!bChildsRemoved && aRedlineParents[i]->pNext) { SwRedlineDataChildPtr pChildPtr = (SwRedlineDataChildPtr)aRedlineParents[i]->pNext; - USHORT nChildPos = aRedlineChilds.GetPos(pChildPtr); + sal_uInt16 nChildPos = aRedlineChilds.GetPos(pChildPtr); if (nChildPos != USHRT_MAX) { - USHORT nChilds = 0; + sal_uInt16 nChilds = 0; while (pChildPtr) { @@ -803,30 +803,30 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd) } aRedlineChilds.DeleteAndDestroy(nChildPos, nChilds); - bChildsRemoved = TRUE; + bChildsRemoved = sal_True; } } SvLBoxEntry *pEntry = aRedlineParents[i]->pTLBParent; if (pEntry) { long nIdx = aLBoxArr.Count() - 1L; - ULONG nAbsPos = pModel->GetAbsPos(pEntry); + sal_uLong nAbsPos = pModel->GetAbsPos(pEntry); while (nIdx >= 0 && - pModel->GetAbsPos(aLBoxArr[ static_cast< USHORT >(nIdx) ]) > nAbsPos) + pModel->GetAbsPos(aLBoxArr[ static_cast< sal_uInt16 >(nIdx) ]) > nAbsPos) nIdx--; - aLBoxArr.Insert( pEntry, static_cast< USHORT >(++nIdx) ); + aLBoxArr.Insert( pEntry, static_cast< sal_uInt16 >(++nIdx) ); } } // TLB von hinten abraeumen long nIdx = (long)aLBoxArr.Count() - 1L; while (nIdx >= 0) - pTable->RemoveEntry(aLBoxArr[ static_cast< USHORT >(nIdx--) ]); + pTable->RemoveEntry(aLBoxArr[ static_cast< sal_uInt16 >(nIdx--) ]); pTable->SetSelectHdl(LINK(this, SwRedlineAcceptDlg, SelectHdl)); pTable->SetDeselectHdl(LINK(this, SwRedlineAcceptDlg, DeselectHdl)); // Durch Remove wurde leider wieder dauernd von der TLB selektiert... - pTable->SelectAll(FALSE); + pTable->SelectAll(sal_False); aRedlineParents.DeleteAndDestroy( nStart, nEnd - nStart + 1); } @@ -835,15 +835,15 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd) * * --------------------------------------------------*/ -void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd) +void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd) { SwView *pView = ::GetActiveView(); SwWrtShell* pSh = pView->GetWrtShellPtr(); - USHORT nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0; + sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0; String sParent; - USHORT nCount = pSh->GetRedlineCount(); - nEnd = Min((USHORT)nEnd, (USHORT)(nCount - 1)); // Handelt auch nEnd=USHRT_MAX (bis zum Ende) ab + sal_uInt16 nCount = pSh->GetRedlineCount(); + nEnd = Min((sal_uInt16)nEnd, (sal_uInt16)(nCount - 1)); // Handelt auch nEnd=USHRT_MAX (bis zum Ende) ab if (nEnd == USHRT_MAX) return; // Keine Redlines im Dokument @@ -860,13 +860,13 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd) pSh->SwCrsrShell::Push(); if( 0 == (pCurrRedline = pSh->SelNextRedline())) pCurrRedline = pSh->SelPrevRedline(); - pSh->SwCrsrShell::Pop( FALSE ); + pSh->SwCrsrShell::Pop( sal_False ); } } else pCurrRedline = 0; - for (USHORT i = nStart; i <= nEnd; i++) + for (sal_uInt16 i = nStart; i <= nEnd; i++) { const SwRedline& rRedln = pSh->GetRedline(i); const SwRedlineData *pRedlineData = &rRedln.GetRedlineData(); @@ -881,7 +881,7 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd) pData = new RedlinData; pData->pData = pRedlineParent; - pData->bDisabled = FALSE; + pData->bDisabled = sal_False; sParent = GetRedlineText(rRedln, pData->aDateTime); pParent = pTable->InsertEntry(sParent, pData, 0, i); @@ -902,11 +902,11 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd) * * --------------------------------------------------*/ -void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept ) +void SwRedlineAcceptDlg::CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept ) { SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr(); SvLBoxEntry* pEntry = bSelect ? pTable->FirstSelected() : pTable->First(); - ULONG nPos = LONG_MAX; + sal_uLong nPos = LONG_MAX; typedef std::vector<SvLBoxEntry*> ListBoxEntries_t; ListBoxEntries_t aRedlines; @@ -933,11 +933,11 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept ) pEntry = bSelect ? pTable->NextSelected(pEntry) : pTable->Next(pEntry); } - BOOL (SwEditShell:: *FnAccRej)( USHORT ) = &SwEditShell::AcceptRedline; + sal_Bool (SwEditShell:: *FnAccRej)( sal_uInt16 ) = &SwEditShell::AcceptRedline; if( !bAccept ) FnAccRej = &SwEditShell::RejectRedline; - SwWait aWait( *pSh->GetView().GetDocShell(), TRUE ); + SwWait aWait( *pSh->GetView().GetDocShell(), sal_True ); pSh->StartAction(); // #111827# @@ -968,7 +968,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept ) aIter != aEnd; aIter++ ) { - USHORT nPosition = GetRedlinePos( **aIter ); + sal_uInt16 nPosition = GetRedlinePos( **aIter ); if( nPosition != USHRT_MAX ) (pSh->*FnAccRej)( nPosition ); } @@ -1003,7 +1003,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept ) Beschreibung: --------------------------------------------------------------------*/ -USHORT SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const +sal_uInt16 SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const { SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr(); return pSh->FindRedlineOfData( *((SwRedlineDataParent*)((RedlinData *) @@ -1016,7 +1016,7 @@ USHORT SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const IMPL_LINK( SwRedlineAcceptDlg, AcceptHdl, void*, EMPTYARG) { - CallAcceptReject( TRUE, TRUE ); + CallAcceptReject( sal_True, sal_True ); return 0; } @@ -1026,7 +1026,7 @@ IMPL_LINK( SwRedlineAcceptDlg, AcceptHdl, void*, EMPTYARG) IMPL_LINK( SwRedlineAcceptDlg, AcceptAllHdl, void*, EMPTYARG ) { - CallAcceptReject( FALSE, TRUE ); + CallAcceptReject( sal_False, sal_True ); return 0; } @@ -1036,7 +1036,7 @@ IMPL_LINK( SwRedlineAcceptDlg, AcceptAllHdl, void*, EMPTYARG ) IMPL_LINK( SwRedlineAcceptDlg, RejectHdl, void*, EMPTYARG ) { - CallAcceptReject( TRUE, FALSE ); + CallAcceptReject( sal_True, sal_False ); return 0; } @@ -1046,7 +1046,7 @@ IMPL_LINK( SwRedlineAcceptDlg, RejectHdl, void*, EMPTYARG ) IMPL_LINK( SwRedlineAcceptDlg, RejectAllHdl, void*, EMPTYARG ) { - CallAcceptReject( FALSE, FALSE ); + CallAcceptReject( sal_False, sal_False ); return 0; } @@ -1117,9 +1117,9 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG ) SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr(); aSelectTimer.Stop(); - BOOL bIsNotFormated = FALSE; - BOOL bSel = FALSE; -// BOOL bReadonlySel = FALSE; + sal_Bool bIsNotFormated = sal_False; + sal_Bool bSel = sal_False; +// sal_Bool bReadonlySel = sal_False; //#98883# don't select redlines while the dialog is not focussed //#107938# But not only ask pTable if it has the focus. To move @@ -1150,10 +1150,10 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG ) } } else - bSel = TRUE; + bSel = sal_True; // #98864# find the selected redline (ignore, if the redline is already gone) - USHORT nPos = GetRedlinePos(*pActEntry); + sal_uInt16 nPos = GetRedlinePos(*pActEntry); if( nPos != USHRT_MAX ) { @@ -1162,9 +1162,9 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG ) //JP 27.9.2001: make no sense if we handle readonly sections // if( !bReadonlySel && rRedln.HasReadonlySel() ) -// bReadonlySel = TRUE; +// bReadonlySel = sal_True; - if (pSh->GotoRedline(nPos, TRUE)) + if (pSh->GotoRedline(nPos, sal_True)) { pSh->SetInSelect(); pSh->EnterAddMode(); @@ -1178,7 +1178,7 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG ) pSh->EndAction(); pSh->SetCareWin(NULL); } - BOOL bEnable = !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength(); + sal_Bool bEnable = !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength(); pTPView->EnableAccept( bEnable && bSel /*&& !bReadonlySel*/ ); pTPView->EnableReject( bEnable && bSel && bIsNotFormated /*&& !bReadonlySel*/ ); pTPView->EnableRejectAll( bEnable && !bOnlyFormatedRedlines && !bHasReadonlySel ); @@ -1209,10 +1209,10 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG ) if (pTable->GetParent(pEntry)) pTopEntry = pTable->GetParent(pEntry); - USHORT nPos = GetRedlinePos(*pTopEntry); + sal_uInt16 nPos = GetRedlinePos(*pTopEntry); // Bei geschuetzten Bereichen kommentieren disablen - if ((pRed = pSh->GotoRedline(nPos, TRUE)) != 0) + if ((pRed = pSh->GotoRedline(nPos, sal_True)) != 0) { if( pSh->IsCrsrPtAtEnd() ) pSh->SwapPam(); @@ -1228,20 +1228,20 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG ) ); aPopup.EnableItem( MN_SUB_SORT, pTable->First() != 0 ); - USHORT nColumn = pTable->GetSortedCol(); + sal_uInt16 nColumn = pTable->GetSortedCol(); if (nColumn == 0xffff) nColumn = 4; PopupMenu *pSubMenu = aPopup.GetPopupMenu(MN_SUB_SORT); if (pSubMenu) { - for (USHORT i = MN_SORT_ACTION; i < MN_SORT_ACTION + 5; i++) - pSubMenu->CheckItem(i, FALSE); + for (sal_uInt16 i = MN_SORT_ACTION; i < MN_SORT_ACTION + 5; i++) + pSubMenu->CheckItem(i, sal_False); pSubMenu->CheckItem(nColumn + MN_SORT_ACTION); } - USHORT nRet = aPopup.Execute(pTable, aCEvt.GetMousePosPixel()); + sal_uInt16 nRet = aPopup.Execute(pTable, aCEvt.GetMousePosPixel()); switch( nRet ) { @@ -1253,7 +1253,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG ) if (pTable->GetParent(pEntry)) pEntry = pTable->GetParent(pEntry); - USHORT nPos = GetRedlinePos(*pEntry); + sal_uInt16 nPos = GetRedlinePos(*pEntry); const SwRedline &rRedline = pSh->GetRedline(nPos); @@ -1278,12 +1278,12 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG ) rRedline.GetRedlineData().GetTimeStamp() ), SID_ATTR_POSTIT_DATE )); - AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, FALSE ); + AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, sal_False ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); pDlg->HideAuthor(); - USHORT nResId = 0; + sal_uInt16 nResId = 0; switch( rRedline.GetType() ) { case nsRedlineType_t::REDLINE_INSERT: @@ -1331,7 +1331,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG ) case MN_SORT_COMMENT: case MN_SORT_POSITION: { - bSortDir = TRUE; + bSortDir = sal_True; if (nRet - MN_SORT_ACTION == 4 && pTable->GetSortedCol() == 0xffff) break; // Haben wir schon @@ -1342,7 +1342,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG ) if (pTable->GetSortedCol() == nSortMode) bSortDir = !pTable->GetSortDirection(); - SwWait aWait( *::GetActiveView()->GetDocShell(), FALSE ); + SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False ); pTable->SortByCol(nSortMode, bSortDir); if (nSortMode == 0xffff) Init(); // Alles neu fuellen @@ -1364,16 +1364,16 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData) { if (rExtraData.Len()) { - USHORT nPos = rExtraData.Search(C2S("AcceptChgDat:")); + sal_uInt16 nPos = rExtraData.Search(C2S("AcceptChgDat:")); // Versuche, den Alignment-String "ALIGN:(...)" einzulesen; wenn // er nicht vorhanden ist, liegt eine "altere Version vor if (nPos != STRING_NOTFOUND) { - USHORT n1 = rExtraData.Search('(', nPos); + sal_uInt16 n1 = rExtraData.Search('(', nPos); if (n1 != STRING_NOTFOUND) { - USHORT n2 = rExtraData.Search(')', n1); + sal_uInt16 n2 = rExtraData.Search(')', n1); if (n2 != STRING_NOTFOUND) { // Alignment-String herausschneiden @@ -1382,11 +1382,11 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData) if (aStr.Len()) { - USHORT nCount = static_cast< USHORT >(aStr.ToInt32()); + sal_uInt16 nCount = static_cast< sal_uInt16 >(aStr.ToInt32()); - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { - USHORT n3 = aStr.Search(';'); + sal_uInt16 n3 = aStr.Search(';'); aStr.Erase(0, n3 + 1); pTable->SetTab(i, aStr.ToInt32(), MAP_PIXEL); } @@ -1405,11 +1405,11 @@ void SwRedlineAcceptDlg::FillInfo(String &rExtraData) const { rExtraData.AppendAscii("AcceptChgDat:("); - USHORT nCount = pTable->TabCount(); + sal_uInt16 nCount = pTable->TabCount(); rExtraData += String::CreateFromInt32(nCount); rExtraData += ';'; - for(USHORT i = 0; i < nCount; i++) + for(sal_uInt16 i = 0; i < nCount; i++) { rExtraData += String::CreateFromInt32( pTable->GetTab(i) ); rExtraData += ';'; diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index be7622319626..ee879ea8e645 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -60,25 +60,25 @@ SV_IMPL_PTRARR( _FndBoxes, _FndBox* ) SV_IMPL_PTRARR( _FndLines, _FndLine* ) -static BOOL bCheck1 = TRUE; -static BOOL bCheck2 = FALSE; -static BOOL bCheck3 = FALSE; +static sal_Bool bCheck1 = sal_True; +static sal_Bool bCheck2 = sal_False; +static sal_Bool bCheck3 = sal_False; -static USHORT nCol1 = 1; -static USHORT nCol2 = 1; -static USHORT nCol3 = 1; +static sal_uInt16 nCol1 = 1; +static sal_uInt16 nCol2 = 1; +static sal_uInt16 nCol3 = 1; -static USHORT nType1 = 0; -static USHORT nType2 = 0; -static USHORT nType3 = 0; +static sal_uInt16 nType1 = 0; +static sal_uInt16 nType2 = 0; +static sal_uInt16 nType3 = 0; -static USHORT nLang = LANGUAGE_NONE; +static sal_uInt16 nLang = LANGUAGE_NONE; -static BOOL bAsc1 = TRUE; -static BOOL bAsc2 = TRUE; -static BOOL bAsc3 = TRUE; -static BOOL bCol = FALSE; -static BOOL bCsSens= FALSE; +static sal_Bool bAsc1 = sal_True; +static sal_Bool bAsc2 = sal_True; +static sal_Bool bAsc3 = sal_True; +static sal_Bool bCol = sal_False; +static sal_Bool bCsSens= sal_False; static sal_Unicode cDeli = '\t'; @@ -90,7 +90,7 @@ using ::rtl::OUString; void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox ) { void* pDel; - for( USHORT n = 0, nEnd = rLstBox.GetEntryCount(); n < nEnd; ++n ) + for( sal_uInt16 n = 0, nEnd = rLstBox.GetEntryCount(); n < nEnd; ++n ) if( 0 != ( pDel = rLstBox.GetEntryData( n )) ) delete (String*)pDel; rLstBox.Clear(); @@ -102,11 +102,11 @@ void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox ) --------------------------------------------------------------------*/ -BOOL lcl_GetSelTbl( SwWrtShell &rSh, USHORT& rX, USHORT& rY ) +sal_Bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY ) { const SwTableNode* pTblNd = rSh.IsCrsrInTbl(); if( !pTblNd ) - return FALSE; + return sal_False; _FndBox aFndBox( 0, 0 ); @@ -120,10 +120,10 @@ BOOL lcl_GetSelTbl( SwWrtShell &rSh, USHORT& rX, USHORT& rY ) } rX = aFndBox.GetLines().Count(); if( !rX ) - return FALSE; + return sal_False; rY = aFndBox.GetLines()[0]->GetBoxes().Count(); - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -192,14 +192,14 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : aColumnRB.Check(bCol); aColLbl.SetText(bCol ? aRowTxt : aColTxt); aRowRB.Check(!bCol); - aDelimTabRB.Enable(FALSE); - aDelimFreeRB.Enable(FALSE); - aDelimEdt.Enable(FALSE); + aDelimTabRB.Enable(sal_False); + aDelimFreeRB.Enable(sal_False); + aDelimEdt.Enable(sal_False); } else { - aColumnRB.Enable(FALSE); - aRowRB.Check(TRUE); + aColumnRB.Enable(sal_False); + aRowRB.Check(sal_True); aColLbl.SetText(aColTxt); } @@ -227,9 +227,9 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : // first initialise the language, then select the if( LANGUAGE_NONE == nLang || LANGUAGE_DONTKNOW == nLang ) - nLang = (USHORT)GetAppLanguage(); + nLang = (sal_uInt16)GetAppLanguage(); - aLangLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, TRUE, FALSE); + aLangLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, sal_True, sal_False); aLangLB.SelectLanguage( nLang ); LanguageHdl( 0 ); @@ -248,7 +248,7 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : if(!aDelimTabRB.IsChecked()) { aDelimEdt.SetText(cDeli); - aDelimFreeRB.Check(TRUE); + aDelimFreeRB.Check(sal_True); DelimHdl(&aDelimFreeRB); } else @@ -257,7 +257,7 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) : FreeResource(); if( ::lcl_GetSelTbl( rSh, nX, nY) ) { - USHORT nMax = aRowRB.IsChecked()? nY : nX; + sal_uInt16 nMax = aRowRB.IsChecked()? nY : nX; aColEdt1.SetMax(nMax); aColEdt2.SetMax(nMax); aColEdt3.SetMax(nMax); @@ -295,9 +295,9 @@ void SwSortDlg::Apply() bCheck2 = aKeyCB2.IsChecked(); bCheck3 = aKeyCB3.IsChecked(); - nCol1 = (USHORT)aColEdt1.GetValue(); - nCol2 = (USHORT)aColEdt2.GetValue(); - nCol3 = (USHORT)aColEdt3.GetValue(); + nCol1 = (sal_uInt16)aColEdt1.GetValue(); + nCol2 = (sal_uInt16)aColEdt2.GetValue(); + nCol3 = (sal_uInt16)aColEdt3.GetValue(); nType1 = aTypDLB1.GetSelectEntryPos(); nType2 = aTypDLB2.GetSelectEntryPos(); @@ -361,9 +361,9 @@ void SwSortDlg::Apply() aOptions.bTable = rSh.IsTableMode(); aOptions.bIgnoreCase = !bCsSens; - BOOL bRet; + sal_Bool bRet; { - SwWait aWait( *rSh.GetView().GetDocShell(), TRUE ); + SwWait aWait( *rSh.GetView().GetDocShell(), sal_True ); rSh.StartAllAction(); if( 0 != (bRet = rSh.Sort( aOptions ))) rSh.SetModified(); @@ -379,7 +379,7 @@ void SwSortDlg::Apply() * --------------------------------------------------*/ IMPL_LINK( SwSortDlg, DelimHdl, RadioButton*, pButton ) { - BOOL bEnable = pButton == &aDelimFreeRB && aDelimFreeRB.IsEnabled(); + sal_Bool bEnable = pButton == &aDelimFreeRB && aDelimFreeRB.IsEnabled(); aDelimEdt.Enable( bEnable ); aDelimPB.Enable( bEnable ); return 0; @@ -396,7 +396,7 @@ IMPL_LINK( SwSortDlg, DelimCharHdl, PushButton*, EMPTYARG ) rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if( RET_OK == pMap->Execute() ) { - SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, FALSE ); + SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, sal_False ); if ( pItem ) aDelimEdt.SetText( sal_Unicode ( pItem->GetValue() ) ); } @@ -427,7 +427,7 @@ IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck ) else if(!aKeyCB1.IsChecked() && !aKeyCB2.IsChecked() && !aKeyCB3.IsChecked()) - pCheck->Check(TRUE); + pCheck->Check(sal_True); return 0; } @@ -440,11 +440,11 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox ) if( !pColRes ) pColRes = new CollatorRessource(); - const USHORT nLstBoxCnt = 3; + const sal_uInt16 nLstBoxCnt = 3; ListBox* aLstArr[ nLstBoxCnt ] = { &aTypDLB1, &aTypDLB2, &aTypDLB3 }; - USHORT* aTypeArr[ nLstBoxCnt ] = { &nType1, &nType2, &nType3 }; + sal_uInt16* aTypeArr[ nLstBoxCnt ] = { &nType1, &nType2, &nType3 }; String aOldStrArr[ nLstBoxCnt ]; - USHORT n; + sal_uInt16 n; void* pUserData; for( n = 0; n < nLstBoxCnt; ++n ) @@ -455,7 +455,7 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox ) ::lcl_ClearLstBoxAndDelUserData( *pL ); } - USHORT nInsPos; + sal_uInt16 nInsPos; String sAlg, sUINm; for( long nCnt = 0, nEnd = aSeq.getLength(); nCnt <= nEnd; ++nCnt ) { diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx index 954d1a017a77..08ac516e4b31 100644 --- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx +++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx @@ -87,7 +87,7 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) : SfxModalDialog(pParent, SW_RES(DLG_MOD_REDLINE_ACCEPT)) { - pImplDlg = new SwRedlineAcceptDlg(this, TRUE); + pImplDlg = new SwRedlineAcceptDlg(this, sal_True); pImplDlg->Initialize(GetExtraData()); pImplDlg->Activate(); // Zur Initialisierung der Daten @@ -101,7 +101,7 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) : SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg() { - AcceptAll(FALSE); // Alles uebriggebliebene ablehnen + AcceptAll(sal_False); // Alles uebriggebliebene ablehnen pImplDlg->FillInfo(GetExtraData()); delete pImplDlg; @@ -129,19 +129,19 @@ void SwModalRedlineAcceptDlg::Resize() Beschreibung: ------------------------------------------------------------------------*/ -void SwModalRedlineAcceptDlg::AcceptAll( BOOL bAccept ) +void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept ) { SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage(); if (pFilterTP->IsDate() || pFilterTP->IsAuthor() || pFilterTP->IsRange() || pFilterTP->IsAction()) { - pFilterTP->CheckDate(FALSE); // Alle Filter abschalten - pFilterTP->CheckAuthor(FALSE); - pFilterTP->CheckRange(FALSE); - pFilterTP->CheckAction(FALSE); + pFilterTP->CheckDate(sal_False); // Alle Filter abschalten + pFilterTP->CheckAuthor(sal_False); + pFilterTP->CheckRange(sal_False); + pFilterTP->CheckAction(sal_False); pImplDlg->FilterChangedHdl(); } - pImplDlg->CallAcceptReject( FALSE, bAccept ); + pImplDlg->CallAcceptReject( sal_False, bAccept ); } |