diff options
Diffstat (limited to 'cui/source/dialogs')
31 files changed, 562 insertions, 562 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index a6c628885..8ed3907ea 100755 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -100,7 +100,7 @@ struct SpellDialog_Impl namespace svx{ class SpellUndoAction_Impl : public SfxUndoAction { - USHORT m_nId; + sal_uInt16 m_nId; const Link& m_rActionLink; //undo of button enabling bool m_bEnableChangePB; @@ -119,7 +119,7 @@ class SpellUndoAction_Impl : public SfxUndoAction long m_nOffset; public: - SpellUndoAction_Impl(USHORT nId, const Link& rActionLink) : + SpellUndoAction_Impl(sal_uInt16 nId, const Link& rActionLink) : m_nId(nId), m_rActionLink( rActionLink), m_bEnableChangePB(false), @@ -135,7 +135,7 @@ public: ~SpellUndoAction_Impl(); virtual void Undo(); - virtual USHORT GetId() const; + virtual sal_uInt16 GetId() const; void SetEnableChangePB(){m_bEnableChangePB = true;} bool IsEnableChangePB(){return m_bEnableChangePB;} @@ -189,7 +189,7 @@ void SpellUndoAction_Impl::Undo() /*-- 06.11.2003 12:16:02--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT SpellUndoAction_Impl::GetId()const +sal_uInt16 SpellUndoAction_Impl::GetId()const { return m_nId; } @@ -307,7 +307,7 @@ void SpellDialog::Init_Impl() aLanguageLB.SetSelectHdl(LINK( this, SpellDialog, LanguageSelectHdl ) ); // initialize language ListBox - aLanguageLB.SetLanguageList( LANG_LIST_SPELL_USED, FALSE, FALSE, TRUE ); + aLanguageLB.SetLanguageList( LANG_LIST_SPELL_USED, sal_False, sal_False, sal_True ); // get current language UpdateBoxes_Impl(); @@ -424,7 +424,7 @@ void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence, bool bIgnoreCurrent { //remove undo if a new sentence is active aSentenceED.ResetUndo(); - aUndoPB.Enable(FALSE); + aUndoPB.Enable(sal_False); } } } @@ -439,7 +439,7 @@ IMPL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog *, EMPTYARG ) pThis->aAutoCorrPB.Show(pThis->rParent.HasAutoCorrection()); pThis->SpellContinue_Impl(); pThis->aSentenceED.ResetUndo(); - pThis->aUndoPB.Enable(FALSE); + pThis->aUndoPB.Enable(sal_False); pThis->LockFocusChanges(true); if( pThis->aChangePB.IsEnabled() ) @@ -725,7 +725,7 @@ IMPL_LINK( SpellDialog, UndoHdl, Button*, EMPTYARG ) { aSentenceED.Undo(); if(!aSentenceED.GetUndoActionCount()) - aUndoPB.Enable(FALSE); + aUndoPB.Enable(sal_False); return 0; } /*-- 06.11.2003 12:19:15--------------------------------------------------- @@ -738,14 +738,14 @@ IMPL_LINK( SpellDialog, DialogUndoHdl, SpellUndoAction_Impl*, pAction ) case SPELLUNDO_CHANGE_TEXTENGINE: { if(pAction->IsEnableChangePB()) - aChangePB.Enable(FALSE); + aChangePB.Enable(sal_False); if(pAction->IsEnableChangeAllPB()) - aChangeAllPB.Enable(FALSE); + aChangeAllPB.Enable(sal_False); } break; case SPELLUNDO_CHANGE_NEXTERROR: { - aSentenceED.MoveErrorMarkTo((USHORT)pAction->GetOldErrorStart(), (USHORT)pAction->GetOldErrorEnd(), false); + aSentenceED.MoveErrorMarkTo((sal_uInt16)pAction->GetOldErrorStart(), (sal_uInt16)pAction->GetOldErrorEnd(), false); if(pAction->IsErrorLanguageSelected()) { UpdateBoxes_Impl(); @@ -828,7 +828,7 @@ void SpellDialog::SetSelectedLang_Impl( LanguageType nLang ) LanguageType SpellDialog::GetSelectedLang_Impl() const { - INT16 nLang = aLanguageLB.GetSelectLanguage(); + sal_Int16 nLang = aLanguageLB.GetSelectLanguage(); return nLang; } /* -----------------28.10.2003 14:27----------------- @@ -960,7 +960,7 @@ void SpellDialog::InitUserDicts() delete aAddToDictMB.GetPopupMenu(); PopupMenu* pMenu = new PopupMenu; pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); - USHORT nItemId = 1; // menu items should be enumerated from 1 and not 0 + sal_uInt16 nItemId = 1; // menu items should be enumerated from 1 and not 0 for (sal_Int32 i = 0; i < nSize; ++i) { uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY ); @@ -1006,7 +1006,7 @@ IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton ) //manually changed const String aNewWord= aSentenceED.GetErrorText(); - USHORT nItemId = pButton->GetCurItemId(); + sal_uInt16 nItemId = pButton->GetCurItemId(); PopupMenu *pMenu = pButton->GetPopupMenu(); String aDicName ( pMenu->GetItemText( nItemId ) ); @@ -1018,7 +1018,7 @@ IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton ) sal_Int16 nAddRes = DIC_ERR_UNKNOWN; if (xDic.is()) { - nAddRes = linguistic::AddEntryToDic( xDic, aNewWord, FALSE, OUString(), LANGUAGE_NONE ); + nAddRes = linguistic::AddEntryToDic( xDic, aNewWord, sal_False, OUString(), LANGUAGE_NONE ); // save modified user-dictionary if it is persistent uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY ); if (xSavDic.is()) @@ -1151,7 +1151,7 @@ void SpellDialog::InvalidateDialog() sal_Int16 i = 0; while(aDisableArr[i]) { - aDisableArr[i]->Enable(FALSE); + aDisableArr[i]->Enable(sal_False); i++; } SfxModelessDialog::Deactivate(); @@ -1218,7 +1218,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) sServiceName = xNamed->getName(); SpellErrorDescription aDesc( false, aStart->xAlternatives->getWord(), aStart->xAlternatives->getLocale(), aStart->xAlternatives->getAlternatives(), 0, sServiceName); - aSentenceED.SetAttrib( SpellErrorAttrib(aDesc), 0, (USHORT) nStartPosition, (USHORT) nEndPosition ); + aSentenceED.SetAttrib( SpellErrorAttrib(aDesc), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition ); } else if(aStart->bIsGrammarError ) { @@ -1232,11 +1232,11 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) &aStart->sDialogTitle, &aStart->aGrammarError.aFullComment, &aStart->aGrammarError.aRuleIdentifier ); - aSentenceED.SetAttrib( SpellErrorAttrib(aDesc), 0, (USHORT) nStartPosition, (USHORT) nEndPosition ); + aSentenceED.SetAttrib( SpellErrorAttrib(aDesc), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition ); } if(aStart->bIsField) - aSentenceED.SetAttrib( SpellBackgroundAttrib(COL_LIGHTGRAY), 0, (USHORT) nStartPosition, (USHORT) nEndPosition ); - aSentenceED.SetAttrib( SpellLanguageAttrib(aStart->eLanguage), 0, (USHORT) nStartPosition, (USHORT) nEndPosition ); + aSentenceED.SetAttrib( SpellBackgroundAttrib(COL_LIGHTGRAY), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition ); + aSentenceED.SetAttrib( SpellLanguageAttrib(aStart->eLanguage), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition ); nStartPosition = nEndPosition; } aStart++; @@ -1245,7 +1245,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) if(!bHasReplaced) aSentenceED.ClearModifyFlag(); aSentenceED.ResetUndo(); - aUndoPB.Enable(FALSE); + aUndoPB.Enable(sal_False); bRet = nStartPosition > 0; } return bRet; @@ -1543,7 +1543,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) break; } //save the current paragraph - USHORT nCurrentLen = GetText().Len(); + sal_uInt16 nCurrentLen = GetText().Len(); if(nAction != ACTION_SELECTFIELD) pTextView->GetWindow()->KeyInput(rKeyEvt); else @@ -1564,8 +1564,8 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) if(pErrorAttrLeft) { TextAttrib* pNewError = pErrorAttrLeft->GetAttr().Clone(); - USHORT nStart = pErrorAttrLeft->GetStart(); - USHORT nEnd = pErrorAttrLeft->GetEnd(); + sal_uInt16 nStart = pErrorAttrLeft->GetStart(); + sal_uInt16 nEnd = pErrorAttrLeft->GetEnd(); pTextEngine->RemoveAttrib( 0, *pErrorAttrLeft ); SetAttrib( *pNewError, 0, nStart, ++nEnd ); //only active errors move the mark @@ -1581,13 +1581,13 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) else if(pErrorAttr) { //determine the change - USHORT nAddedChars = GetText().Len() - nCurrentLen; + sal_uInt16 nAddedChars = GetText().Len() - nCurrentLen; TextAttrib* pNewError = pErrorAttr->GetAttr().Clone(); - USHORT nStart = pErrorAttr->GetStart(); - USHORT nEnd = pErrorAttr->GetEnd(); + sal_uInt16 nStart = pErrorAttr->GetStart(); + sal_uInt16 nEnd = pErrorAttr->GetEnd(); pTextEngine->RemoveAttrib( 0, *pErrorAttr ); - nStart = nStart - (USHORT)nAddedChars; + nStart = nStart - (sal_uInt16)nAddedChars; SetAttrib( *pNewError, 0, nStart - nAddedChars, nEnd ); //only if the error is active the mark is moved here if(bIsErrorActive) @@ -1600,8 +1600,8 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) if(pBackAttrLeft) { TextAttrib* pNewBack = pBackAttrLeft->GetAttr().Clone(); - USHORT _nStart = pBackAttrLeft->GetStart(); - USHORT _nEnd = pBackAttrLeft->GetEnd(); + sal_uInt16 _nStart = pBackAttrLeft->GetStart(); + sal_uInt16 _nEnd = pBackAttrLeft->GetEnd(); pTextEngine->RemoveAttrib( 0, *pBackAttrLeft ); SetAttrib( *pNewBack, 0, _nStart, _nEnd - nAddedChars); delete pNewBack; @@ -1651,14 +1651,14 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError ) if (bIgnoreCurrentError) m_aIgnoreErrorsAt.insert( m_nErrorStart ); ExtTextEngine* pTextEngine = GetTextEngine(); - USHORT nTextLen = pTextEngine->GetTextLen(0); + sal_uInt16 nTextLen = pTextEngine->GetTextLen(0); if(m_nErrorEnd >= nTextLen - 1) return false; //if it's not already modified the modified flag has to be reset at the and of the marking bool bModified = IsModified(); bool bRet = false; - const USHORT nOldErrorStart = m_nErrorStart; - const USHORT nOldErrorEnd = m_nErrorEnd; + const sal_uInt16 nOldErrorStart = m_nErrorStart; + const sal_uInt16 nOldErrorEnd = m_nErrorEnd; //create a cursor behind the end of the last error //- or at 0 at the start of the sentence @@ -1695,7 +1695,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError ) m_nErrorEnd = pNextError->GetEnd(); ChangeMarkedWord(xEntry->getReplacementText(), SvxLocaleToLanguage( pSpellErrorDescription->aLocale )); - aCursor.GetIndex() = aCursor.GetIndex() + (USHORT)(xEntry->getReplacementText().getLength()); + aCursor.GetIndex() = aCursor.GetIndex() + (sal_uInt16)(xEntry->getReplacementText().getLength()); } else break; @@ -1734,11 +1734,11 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError ) /*-- 06.11.2003 13:30:26--------------------------------------------------- -----------------------------------------------------------------------*/ -void SentenceEditWindow_Impl::MoveErrorMarkTo(USHORT nStart, USHORT nEnd, bool bGrammarError) +void SentenceEditWindow_Impl::MoveErrorMarkTo(sal_uInt16 nStart, sal_uInt16 nEnd, bool bGrammarError) { TextEngine* pTextEngine = GetTextEngine(); - pTextEngine->RemoveAttribs( 0, (USHORT)TEXTATTR_FONTCOLOR, TRUE ); - pTextEngine->RemoveAttribs( 0, (USHORT)TEXTATTR_FONTWEIGHT, TRUE ); + pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTCOLOR, sal_True ); + pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTWEIGHT, sal_True ); pTextEngine->SetAttrib( TextAttribFontWeight(WEIGHT_BOLD), 0, nStart, nEnd ); pTextEngine->SetAttrib( TextAttribFontColor(bGrammarError ? COL_LIGHTBLUE : COL_LIGHTRED), 0, nStart, nEnd ); m_nErrorStart = nStart; @@ -1776,30 +1776,30 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT const TextCharAttrib* pLangAttrib = pTextEngine->FindCharAttrib( TextPaM(0, m_nErrorEnd), TEXTATTR_SPELL_LANGUAGE ); - USHORT nTextLen = pTextEngine->GetTextLen( 0 ); + sal_uInt16 nTextLen = pTextEngine->GetTextLen( 0 ); if(pLangAttrib && !pLangAttrib->GetStart() && pLangAttrib->GetEnd() == nTextLen) { SpellLanguageAttrib aNewLangAttrib( static_cast<const SpellLanguageAttrib&>(pLangAttrib->GetAttr()).GetLanguage()); pTextEngine->RemoveAttrib(0, *pLangAttrib); - pTextEngine->SetAttrib( aNewLangAttrib, 0, (USHORT)(m_nErrorEnd + nDiffLen) , nTextLen ); + pTextEngine->SetAttrib( aNewLangAttrib, 0, (sal_uInt16)(m_nErrorEnd + nDiffLen) , nTextLen ); } } // undo expanded attributes! if( pBackAttrib && pBackAttrib->GetStart() < m_nErrorStart && pBackAttrib->GetEnd() == m_nErrorEnd + nDiffLen) { TextAttrib* pNewBackground = pBackAttrib->GetAttr().Clone(); - USHORT nStart = pBackAttrib->GetStart(); + sal_uInt16 nStart = pBackAttrib->GetStart(); pTextEngine->RemoveAttrib(0, *pBackAttrib); pTextEngine->SetAttrib(*pNewBackground, 0, nStart, m_nErrorStart); delete pNewBackground; } - pTextEngine->SetModified(TRUE); + pTextEngine->SetModified(sal_True); //adjust end position long nEndTemp = m_nErrorEnd; nEndTemp += nDiffLen; - m_nErrorEnd = (USHORT)nEndTemp; + m_nErrorEnd = (sal_uInt16)nEndTemp; SpellUndoAction_Impl* pAction = new SpellUndoAction_Impl( SPELLUNDO_MOVE_ERROREND, GetSpellDialog()->aDialogUndoLink); @@ -1871,7 +1871,7 @@ void SentenceEditWindow_Impl::SetAlternatives( Reference< XSpellAlternatives> xA /*-- 10.09.2003 14:43:02--------------------------------------------------- -----------------------------------------------------------------------*/ -void SentenceEditWindow_Impl::SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd ) +void SentenceEditWindow_Impl::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd ) { GetTextEngine()->SetAttrib(rAttr, nPara, nStart, nEnd); } @@ -1889,10 +1889,10 @@ void SentenceEditWindow_Impl::SetText( const String& rStr ) -----------------------------------------------------------------------*/ struct LanguagePosition_Impl { - USHORT nPosition; + sal_uInt16 nPosition; LanguageType eLanguage; - LanguagePosition_Impl(USHORT nPos, LanguageType eLang) : + LanguagePosition_Impl(sal_uInt16 nPos, LanguageType eLang) : nPosition(nPos), eLanguage(eLang) {} @@ -1900,7 +1900,7 @@ struct LanguagePosition_Impl typedef std::vector<LanguagePosition_Impl> LanguagePositions_Impl; void lcl_InsertBreakPosition_Impl( - LanguagePositions_Impl& rBreakPositions, USHORT nInsert, LanguageType eLanguage) + LanguagePositions_Impl& rBreakPositions, sal_uInt16 nInsert, LanguageType eLanguage) { LanguagePositions_Impl::iterator aStart = rBreakPositions.begin(); while(aStart != rBreakPositions.end()) @@ -1931,7 +1931,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore { svx::SpellPortions aRet; ExtTextEngine* pTextEngine = GetTextEngine(); - const USHORT nTextLen = pTextEngine->GetTextLen(0); + const sal_uInt16 nTextLen = pTextEngine->GetTextLen(0); if(nTextLen) { TextPaM aCursor(0, 0); @@ -1977,7 +1977,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore LanguagePositions_Impl::iterator aStart = aBreakPositions.begin(); //start should always be Null eLang = aStart->eLanguage; - USHORT nStart = aStart->nPosition; + sal_uInt16 nStart = aStart->nPosition; DBG_ASSERT(!nStart, "invalid start position - language attribute missing?"); ++aStart; @@ -2002,11 +2002,11 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore // quick partly fix of #i71318. Correct fix needs to patch the TextEngine itself... // this one will only prevent text from disappearing. It may to not have the // correct language and will probably not spell checked... - ULONG nPara = pTextEngine->GetParagraphCount(); + sal_uLong nPara = pTextEngine->GetParagraphCount(); if (nPara > 1) { String aLeftOverText; - for (ULONG i = 1; i < nPara; ++i) + for (sal_uLong i = 1; i < nPara; ++i) { aLeftOverText.AppendAscii( "\x0a" ); // the manual line break... aLeftOverText += pTextEngine->GetText(i); @@ -2037,7 +2037,7 @@ void SentenceEditWindow_Impl::Undo() if(!GetUndoActionCount()) return; bool bSaveUndoEdit = IsUndoEditMode(); - USHORT nId; + sal_uInt16 nId; //if the undo edit mode is active then undo all changes until the UNDO_EDIT_MODE action has been found do { @@ -2058,7 +2058,7 @@ void SentenceEditWindow_Impl::ResetUndo() /*-- 06.11.2003 12:30:41--------------------------------------------------- -----------------------------------------------------------------------*/ -void SentenceEditWindow_Impl::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg ) +void SentenceEditWindow_Impl::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg ) { SfxUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager(); rUndoMgr.AddUndoAction(pAction, bTryMerg); @@ -2067,7 +2067,7 @@ void SentenceEditWindow_Impl::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMe /*-- 06.11.2003 12:38:44--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT SentenceEditWindow_Impl::GetUndoActionCount() +sal_uInt16 SentenceEditWindow_Impl::GetUndoActionCount() { return GetTextEngine()->GetUndoManager().GetUndoActionCount(); } @@ -2075,14 +2075,14 @@ USHORT SentenceEditWindow_Impl::GetUndoActionCount() /*-- 12.11.2003 12:12:38--------------------------------------------------- -----------------------------------------------------------------------*/ -void SentenceEditWindow_Impl::UndoActionStart( USHORT nId ) +void SentenceEditWindow_Impl::UndoActionStart( sal_uInt16 nId ) { GetTextEngine()->UndoActionStart(nId); } /*-- 12.11.2003 12:12:38--------------------------------------------------- -----------------------------------------------------------------------*/ -void SentenceEditWindow_Impl::UndoActionEnd( USHORT nId ) +void SentenceEditWindow_Impl::UndoActionEnd( sal_uInt16 nId ) { GetTextEngine()->UndoActionEnd(nId); } @@ -2092,9 +2092,9 @@ void SentenceEditWindow_Impl::UndoActionEnd( USHORT nId ) void SentenceEditWindow_Impl::MoveErrorEnd(long nOffset) { if(nOffset > 0) - m_nErrorEnd = m_nErrorEnd - (USHORT)nOffset; + m_nErrorEnd = m_nErrorEnd - (sal_uInt16)nOffset; else - m_nErrorEnd = m_nErrorEnd -(USHORT)- nOffset; + m_nErrorEnd = m_nErrorEnd -(sal_uInt16)- nOffset; } /*-- 13.11.2003 15:15:19--------------------------------------------------- @@ -2129,8 +2129,8 @@ void SentenceEditWindow_Impl::SetUndoEditMode(bool bSet) //remove error marks TextEngine* pTextEngine = GetTextEngine(); - pTextEngine->RemoveAttribs( 0, (USHORT)TEXTATTR_FONTCOLOR, TRUE ); - pTextEngine->RemoveAttribs( 0, (USHORT)TEXTATTR_FONTWEIGHT, TRUE ); + pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTCOLOR, sal_True ); + pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTWEIGHT, sal_True ); //put the appropriate action on the Undo-stack SpellUndoAction_Impl* pAction = new SpellUndoAction_Impl( diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 536e86c2c..dc1e36df7 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -59,26 +59,26 @@ // class SvxCharacterMap ================================================= -SvxCharacterMap::SvxCharacterMap( Window* pParent, BOOL bOne, const SfxItemSet* pSet ) : +SvxCharacterMap::SvxCharacterMap( Window* pParent, sal_Bool bOne, const SfxItemSet* pSet ) : SfxModalDialog( pParent, CUI_RES( RID_SVXDLG_CHARMAP ) ), mpCharMapData( 0 ) { - SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, FN_PARAM_1, FALSE ); + SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, FN_PARAM_1, sal_False ); if ( pItem ) bOne = pItem->GetValue(); mpCharMapData = new SvxCharMapData( this, bOne, &CUI_MGR() ); - SFX_ITEMSET_ARG( pSet, pCharItem, SfxInt32Item, SID_ATTR_CHAR, FALSE ); + SFX_ITEMSET_ARG( pSet, pCharItem, SfxInt32Item, SID_ATTR_CHAR, sal_False ); if ( pCharItem ) SetChar( pCharItem->GetValue() ); - SFX_ITEMSET_ARG( pSet, pDisableItem, SfxBoolItem, FN_PARAM_2, FALSE ); + SFX_ITEMSET_ARG( pSet, pDisableItem, SfxBoolItem, FN_PARAM_2, sal_False ); if ( pDisableItem && pDisableItem->GetValue() ) DisableFontSelection(); - SFX_ITEMSET_ARG( pSet, pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); - SFX_ITEMSET_ARG( pSet, pFontNameItem, SfxStringItem, SID_FONT_NAME, FALSE ); + SFX_ITEMSET_ARG( pSet, pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False ); + SFX_ITEMSET_ARG( pSet, pFontNameItem, SfxStringItem, SID_FONT_NAME, sal_False ); if ( pFontItem ) { Font aFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), GetCharFont().GetSize() ); @@ -170,7 +170,7 @@ short SvxCharacterMap::Execute() // class SvxShowText ===================================================== -SvxShowText::SvxShowText( Window* pParent, const ResId& rResId, BOOL bCenter ) +SvxShowText::SvxShowText( Window* pParent, const ResId& rResId, sal_Bool bCenter ) : Control( pParent, rResId ), mbCenter( bCenter) {} @@ -237,7 +237,7 @@ void SvxShowText::SetFont( const Font& rFont ) aFont.SetWeight( WEIGHT_NORMAL ); aFont.SetAlign( ALIGN_TOP ); aFont.SetSize( PixelToLogic( Size( 0, nWinHeight/2 ) ) ); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); Control::SetFont( aFont ); mnY = ( nWinHeight - GetTextHeight() ) / 2; @@ -259,7 +259,7 @@ SvxShowText::~SvxShowText() // class SvxCharacterMap ================================================= -SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pResContext ) +SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, sal_Bool bOne_, ResMgr* pResContext ) : mpDialog( pDialog ), aShowSet ( pDialog, ResId( CT_SHOWSET, *pResContext ) ), aShowText ( pDialog, ResId( CT_SHOWTEXT, *pResContext ) ), @@ -274,14 +274,14 @@ SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pRe aSubsetText ( pDialog, ResId( FT_SUBSET, *pResContext ) ), aSubsetLB ( pDialog, ResId( LB_SUBSET, *pResContext ) ), aSymbolText ( pDialog, ResId( FT_SYMBOLE, *pResContext ) ), - aShowChar ( pDialog, ResId( CT_SHOWCHAR, *pResContext ), TRUE ), + aShowChar ( pDialog, ResId( CT_SHOWCHAR, *pResContext ), sal_True ), aCharCodeText ( pDialog, ResId( FT_CHARCODE, *pResContext ) ), // aAssignText ( pDialog, ResId( FT_ASSIGN, *pResContext ) ), bOne( bOne_ ), pSubsetMap( NULL ) { aFont = pDialog->GetFont(); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aFont.SetFamily( FAMILY_DONTKNOW ); aFont.SetPitch( PITCH_DONTKNOW ); aFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW ); @@ -305,8 +305,8 @@ SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pRe if ( aFontName != aLastName ) { aLastName = aFontName; - USHORT nPos = aFontLB.InsertEntry( aFontName ); - aFontLB.SetEntryData( nPos, (void*)(ULONG)i ); + sal_uInt16 nPos = aFontLB.InsertEntry( aFontName ); + aFontLB.SetEntryData( nPos, (void*)(sal_uLong)i ); } } // the font may not be in the list => @@ -321,7 +321,7 @@ SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pRe if ( aFontLB.GetEntryPos( aToken ) != LISTBOX_ENTRY_NOTFOUND ) { aDefStr = aToken; - bFound = TRUE; + bFound = sal_True; break; } } @@ -387,7 +387,7 @@ IMPL_LINK( SvxCharMapData, OKHdl, OKButton *, EMPTYARG ) rtl::OUString aOUStr( &cChar, 1 ); aShowText.SetText( aOUStr ); } - mpDialog->EndDialog( TRUE ); + mpDialog->EndDialog( sal_True ); return 0; } @@ -395,8 +395,8 @@ IMPL_LINK( SvxCharMapData, OKHdl, OKButton *, EMPTYARG ) IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG ) { - USHORT nPos = aFontLB.GetSelectEntryPos(), - nFont = (USHORT)(ULONG)aFontLB.GetEntryData( nPos ); + sal_uInt16 nPos = aFontLB.GetSelectEntryPos(), + nFont = (sal_uInt16)(sal_uLong)aFontLB.GetEntryData( nPos ); aFont = mpDialog->GetDevFont( nFont ); aFont.SetWeight( WEIGHT_DONTKNOW ); aFont.SetItalic( ITALIC_NONE ); @@ -422,7 +422,7 @@ IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG ) delete pSubsetMap; pSubsetMap = NULL; - BOOL bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL); + sal_Bool bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL); if( bNeedSubset ) { FontCharMap aFontCharMap; @@ -436,7 +436,7 @@ IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG ) const Subset* s; while( NULL != (s = pSubsetMap->GetNextSubset( bFirst )) ) { - USHORT nPos_ = aSubsetLB.InsertEntry( s->GetName() ); + sal_uInt16 nPos_ = aSubsetLB.InsertEntry( s->GetName() ); aSubsetLB.SetEntryData( nPos_, (void*)s ); // NOTE: subset must live at least as long as the selected font if( bFirst ) @@ -444,7 +444,7 @@ IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG ) bFirst = false; } if( aSubsetLB.GetEntryCount() <= 1 ) - bNeedSubset = FALSE; + bNeedSubset = sal_False; } aSubsetText.Show( bNeedSubset); @@ -457,7 +457,7 @@ IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG ) IMPL_LINK( SvxCharMapData, SubsetSelectHdl, ListBox *, EMPTYARG ) { - USHORT nPos = aSubsetLB.GetSelectEntryPos(); + sal_uInt16 nPos = aSubsetLB.GetSelectEntryPos(); const Subset* pSubset = reinterpret_cast<const Subset*> (aSubsetLB.GetEntryData(nPos)); if( pSubset ) { @@ -472,7 +472,7 @@ IMPL_LINK( SvxCharMapData, SubsetSelectHdl, ListBox *, EMPTYARG ) IMPL_LINK( SvxCharMapData, CharDoubleClickHdl, Control *, EMPTYARG ) { - mpDialog->EndDialog( TRUE ); + mpDialog->EndDialog( sal_True ); return 0; } @@ -577,7 +577,7 @@ IMPL_LINK( SvxCharMapData, AssignHdl, PushButton *, EMPTYARG ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pOutSet->GetItemState( SID_CHARMAP, FALSE, &pItem ) ) + if( SFX_ITEM_SET == pOutSet->GetItemState( SID_CHARMAP, sal_False, &pItem ) ) { // show assigned shortcut } diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 25919a5e6..21edd1145 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -269,7 +269,7 @@ void FmSearchDialog::Init(const UniString& strVisibleFields, const UniString& sI // die Listboxen fuellen // die Methoden des Feldvergleiches - USHORT nResIds[] = { + sal_uInt16 nResIds[] = { RID_STR_SEARCH_ANYWHERE, RID_STR_SEARCH_BEGINNING, RID_STR_SEARCH_END, @@ -280,7 +280,7 @@ void FmSearchDialog::Init(const UniString& strVisibleFields, const UniString& sI m_lbPosition.SelectEntryPos(MATCHING_ANYWHERE); // die Feld-Listbox - for (USHORT i=0; i<strVisibleFields.GetTokenCount(';'); ++i) + for (sal_uInt16 i=0; i<strVisibleFields.GetTokenCount(';'); ++i) m_lbField.InsertEntry(strVisibleFields.GetToken(i, ';')); @@ -420,7 +420,7 @@ IMPL_LINK(FmSearchDialog, OnClickedSpecialSettings, Button*, pButton ) aDlg->Execute(); //CHINA001 aDlg.Execute(); - INT32 nFlags = aDlg->GetTransliterationFlags(); //CHINA001 INT32 nFlags = aDlg.GetTransliterationFlags(); + sal_Int32 nFlags = aDlg->GetTransliterationFlags(); //CHINA001 sal_Int32 nFlags = aDlg.GetTransliterationFlags(); m_pSearchEngine->SetTransliterationFlags(nFlags); m_cbCase.Check(m_pSearchEngine->GetCaseSensitive()); diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 8977abe48..8679c515c 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -132,7 +132,7 @@ void SAL_CALL SearchThread::onTerminated() void SearchThread::ImplSearch( const INetURLObject& rStartURL, const ::std::vector< String >& rFormats, - BOOL bRecursive ) + sal_Bool bRecursive ) { { ::vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -167,7 +167,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, bFolder = sal_False; if( bRecursive && bFolder ) - ImplSearch( aFoundURL, rFormats, TRUE ); + ImplSearch( aFoundURL, rFormats, sal_True ); else { sal_Bool bDocument = xRow->getBoolean( 2 ); // property "IsDocument" @@ -197,7 +197,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, LIST_APPEND ); mpBrowser->aLbxFound.InsertEntry( GetReducedString( aFoundURL, 50 ), - (USHORT) mpBrowser->aFoundList.Count() - 1 ); + (sal_uInt16) mpBrowser->aFoundList.Count() - 1 ); } } } @@ -297,9 +297,9 @@ void SAL_CALL TakeThread::run() { String aName; INetURLObject aURL; - USHORT nEntries; + sal_uInt16 nEntries; GalleryTheme* pThm = mpBrowser->GetXChgData()->pTheme; - USHORT nPos; + sal_uInt16 nPos; GalleryProgress* pStatusProgress; { @@ -309,7 +309,7 @@ void SAL_CALL TakeThread::run() pThm->LockBroadcaster(); } - for( USHORT i = 0; i < nEntries && schedule(); i++ ) + for( sal_uInt16 i = 0; i < nEntries && schedule(); i++ ) { // kompletten Filenamen aus FoundList holen if( mpBrowser->bTakeAll ) @@ -318,7 +318,7 @@ void SAL_CALL TakeThread::run() aURL = INetURLObject(*mpBrowser->aFoundList.GetObject( nPos = mpBrowser->aLbxFound.GetSelectEntryPos( i ) )); // Position in Taken-Liste uebernehmen - mrTakenList.Insert( (void*) (ULONG)nPos, LIST_APPEND ); + mrTakenList.Insert( (void*) (sal_uLong)nPos, LIST_APPEND ); { ::vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -387,12 +387,12 @@ IMPL_LINK( TakeProgress, CleanUpHdl, void*, EMPTYARG ) sal_uInt32 i, nCount; GetParent()->EnterWait(); - mpBrowser->aLbxFound.SetUpdateMode( FALSE ); + mpBrowser->aLbxFound.SetUpdateMode( sal_False ); mpBrowser->aLbxFound.SetNoSelection(); // mark all taken positions in aRemoveEntries for( i = 0UL, nCount = maTakenList.Count(); i < nCount; ++i ) - aRemoveEntries[ (ULONG) maTakenList.GetObject( i ) ] = true; + aRemoveEntries[ (sal_uLong) maTakenList.GetObject( i ) ] = true; maTakenList.Clear(); @@ -423,7 +423,7 @@ IMPL_LINK( TakeProgress, CleanUpHdl, void*, EMPTYARG ) aRemainingVector.clear(); - mpBrowser->aLbxFound.SetUpdateMode( TRUE ); + mpBrowser->aLbxFound.SetUpdateMode( sal_True ); mpBrowser->SelectFoundHdl( NULL ); GetParent()->LeaveWait(); @@ -566,7 +566,7 @@ GalleryIdDialog::GalleryIdDialog( Window* pParent, GalleryTheme* _pThm ) : GalleryTheme::InsertAllThemes( aLbResName ); - aLbResName.SelectEntryPos( (USHORT) pThm->GetId() ); + aLbResName.SelectEntryPos( (sal_uInt16) pThm->GetId() ); aLbResName.GrabFocus(); aBtnOk.SetClickHdl( LINK( this, GalleryIdDialog, ClickOkHdl ) ); @@ -577,10 +577,10 @@ GalleryIdDialog::GalleryIdDialog( Window* pParent, GalleryTheme* _pThm ) : IMPL_LINK( GalleryIdDialog, ClickOkHdl, void*, EMPTYARG ) { Gallery* pGal = pThm->GetParent(); - const ULONG nId = GetId(); - BOOL bDifferentThemeExists = FALSE; + const sal_uLong nId = GetId(); + sal_Bool bDifferentThemeExists = sal_False; - for( ULONG i = 0, nCount = pGal->GetThemeCount(); i < nCount && !bDifferentThemeExists; i++ ) + for( sal_uLong i = 0, nCount = pGal->GetThemeCount(); i < nCount && !bDifferentThemeExists; i++ ) { const GalleryThemeEntry* pInfo = pGal->GetThemeInfo( i ); @@ -595,7 +595,7 @@ IMPL_LINK( GalleryIdDialog, ClickOkHdl, void*, EMPTYARG ) InfoBox aBox( this, aStr ); aBox.Execute(); aLbResName.GrabFocus(); - bDifferentThemeExists = TRUE; + bDifferentThemeExists = sal_True; } } @@ -634,7 +634,7 @@ GalleryThemeProperties::GalleryThemeProperties( Window* pParent, ExchangeData* _ // ------------------------------------------------------------------------ -void GalleryThemeProperties::PageCreated( USHORT nId, SfxTabPage &rPage ) +void GalleryThemeProperties::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { if( RID_SVXTABPAGE_GALLERY_GENERAL == nId ) ( (TPGalleryThemeGeneral&) rPage ).SetXChgData( pData ); @@ -675,7 +675,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) String aObjStr( CUI_RES( RID_SVXSTR_GALLERYPROPS_OBJECT ) ); String aAccess; String aType( CUI_RES( RID_SVXSTR_GALLERYPROPS_GALTHEME ) ); - BOOL bReadOnly = pThm->IsReadOnly() && !pThm->IsImported(); + sal_Bool bReadOnly = pThm->IsReadOnly() && !pThm->IsImported(); aEdtMSName.SetHelpId( HID_GALLERY_EDIT_MSNAME ); aEdtMSName.SetText( pThm->GetName() ); @@ -713,7 +713,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) aFtMSShowChangeDate.SetText( aAccess ); // Image setzen - USHORT nId; + sal_uInt16 nId; if( pThm->IsImported() ) nId = RID_SVXBMP_THEME_IMPORTED_BIG; @@ -729,10 +729,10 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) // ------------------------------------------------------------------------ -BOOL TPGalleryThemeGeneral::FillItemSet( SfxItemSet& /*rSet*/ ) +sal_Bool TPGalleryThemeGeneral::FillItemSet( SfxItemSet& /*rSet*/ ) { pData->aEditedTitle = aEdtMSName.GetText(); - return TRUE; + return sal_True; } // ------------------------------------------------------------------------ @@ -758,9 +758,9 @@ TPGalleryThemeProperties::TPGalleryThemeProperties( Window* pWindow, const SfxIt aWndPreview ( this, CUI_RES( WND_BRSPRV ) ), nCurFilterPos (0), nFirstExtFilterPos (0), - bEntriesFound (FALSE), - bInputAllowed (TRUE), - bSearchRecursive (FALSE), + bEntriesFound (sal_False), + bInputAllowed (sal_True), + bSearchRecursive (sal_False), xDialogListener ( new ::svt::DialogClosedListener() ) { FreeResource(); @@ -858,7 +858,7 @@ void TPGalleryThemeProperties::FillFilterList() FilterEntry* pFilterEntry; FilterEntry* pTestEntry; sal_uInt16 i, nKeyCount; - BOOL bInList; + sal_Bool bInList; // graphic filters for( i = 0, nKeyCount = pFilter->GetImportFormatCount(); i < nKeyCount; i++ ) @@ -866,12 +866,12 @@ void TPGalleryThemeProperties::FillFilterList() aExt = pFilter->GetImportFormatShortName( i ); aName = pFilter->GetImportFormatName( i ); pTestEntry = (FilterEntry*) aFilterEntryList.First(); - bInList = FALSE; + bInList = sal_False; String aExtensions; int j = 0; String sWildcard; - while( TRUE ) + while( sal_True ) { sWildcard = pFilter->GetImportWildcard( i, j++ ); if ( !sWildcard.Len() ) @@ -889,7 +889,7 @@ void TPGalleryThemeProperties::FillFilterList() { if ( pTestEntry->aFilterName == aExt ) { - bInList = TRUE; + bInList = sal_True; break; } pTestEntry = (FilterEntry*) aFilterEntryList.Next(); @@ -932,7 +932,7 @@ void TPGalleryThemeProperties::FillFilterList() { int j = 0; String sWildcard; - while( TRUE ) + while( sal_True ) { sWildcard = pFilter->GetImportWildcard( i, j++ ); if ( !sWildcard.Len() ) @@ -1113,7 +1113,7 @@ void TPGalleryThemeProperties::DoPreview() if( aString != aPreviewString ) { INetURLObject _aURL( *aFoundList.GetObject( aLbxFound.GetEntryPos( aString ) ) ); - bInputAllowed = FALSE; + bInputAllowed = sal_False; if ( !aWndPreview.SetGraphic( _aURL ) ) { @@ -1128,7 +1128,7 @@ void TPGalleryThemeProperties::DoPreview() xMediaPlayer->start(); } - bInputAllowed = TRUE; + bInputAllowed = sal_True; aPreviewString = aString; } } @@ -1152,7 +1152,7 @@ IMPL_LINK( TPGalleryThemeProperties, ClickTakeHdl, void*, EMPTYARG ) } else { - bTakeAll = FALSE; + bTakeAll = sal_False; TakeFiles(); } } @@ -1167,7 +1167,7 @@ IMPL_LINK( TPGalleryThemeProperties, ClickTakeAllHdl, void *, EMPTYARG ) if( bInputAllowed ) { aPreviewTimer.Stop(); - bTakeAll = TRUE; + bTakeAll = sal_True; TakeFiles(); } @@ -1180,7 +1180,7 @@ IMPL_LINK( TPGalleryThemeProperties, SelectFoundHdl, void *, EMPTYARG ) { if( bInputAllowed ) { - BOOL bPreviewPossible = FALSE; + sal_Bool bPreviewPossible = sal_False; aPreviewTimer.Stop(); @@ -1189,7 +1189,7 @@ IMPL_LINK( TPGalleryThemeProperties, SelectFoundHdl, void *, EMPTYARG ) if( aLbxFound.GetSelectEntryCount() == 1 ) { aCbxPreview.Enable(); - bPreviewPossible = TRUE; + bPreviewPossible = sal_True; } else aCbxPreview.Disable(); @@ -1240,14 +1240,14 @@ IMPL_LINK( TPGalleryThemeProperties, EndSearchProgressHdl, SearchProgress *, EMP aLbxFound.SelectEntryPos( 0 ); aBtnTakeAll.Enable(); aCbxPreview.Enable(); - bEntriesFound = TRUE; + bEntriesFound = sal_True; } else { aLbxFound.InsertEntry( String( CUI_RES( RID_SVXSTR_GALLERY_NOFILES ) ) ); aBtnTakeAll.Disable(); aCbxPreview.Disable(); - bEntriesFound = FALSE; + bEntriesFound = sal_False; } return 0L; } diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index bffdd35da..f13ba2458 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -44,10 +44,10 @@ // - SvxGraphicFilter - // -------------------- /* -ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& rFilterObject ) +sal_uLong SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& rFilterObject ) { const Graphic& rGraphic = rFilterObject.GetGraphic(); - ULONG nRet; + sal_uLong nRet; if( rGraphic.GetType() == GRAPHIC_BITMAP ) { @@ -61,7 +61,7 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r case( SID_GRFFILTER_INVERT ): { if( pShell ) - pShell->SetWaitCursor( TRUE ); + pShell->SetWaitCursor( sal_True ); if( rGraphic.IsAnimated() ) { @@ -79,14 +79,14 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r } if( pShell ) - pShell->SetWaitCursor( FALSE ); + pShell->SetWaitCursor( sal_False ); } break; case( SID_GRFFILTER_SMOOTH ): { if( pShell ) - pShell->SetWaitCursor( TRUE ); + pShell->SetWaitCursor( sal_True ); if( rGraphic.IsAnimated() ) { @@ -104,14 +104,14 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r } if( pShell ) - pShell->SetWaitCursor( FALSE ); + pShell->SetWaitCursor( sal_False ); } break; case( SID_GRFFILTER_SHARPEN ): { if( pShell ) - pShell->SetWaitCursor( TRUE ); + pShell->SetWaitCursor( sal_True ); if( rGraphic.IsAnimated() ) { @@ -129,14 +129,14 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r } if( pShell ) - pShell->SetWaitCursor( FALSE ); + pShell->SetWaitCursor( sal_False ); } break; case( SID_GRFFILTER_REMOVENOISE ): { if( pShell ) - pShell->SetWaitCursor( TRUE ); + pShell->SetWaitCursor( sal_True ); if( rGraphic.IsAnimated() ) { @@ -154,14 +154,14 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r } if( pShell ) - pShell->SetWaitCursor( FALSE ); + pShell->SetWaitCursor( sal_False ); } break; case( SID_GRFFILTER_SOBEL ): { if( pShell ) - pShell->SetWaitCursor( TRUE ); + pShell->SetWaitCursor( sal_True ); if( rGraphic.IsAnimated() ) { @@ -179,13 +179,13 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r } if( pShell ) - pShell->SetWaitCursor( FALSE ); + pShell->SetWaitCursor( sal_False ); } break; case( SID_GRFFILTER_MOSAIC ): { - GraphicFilterMosaic aDlg( pWindow, rGraphic, 4, 4, FALSE ); + GraphicFilterMosaic aDlg( pWindow, rGraphic, 4, 4, sal_False ); if( aDlg.Execute() == RET_OK ) aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); @@ -213,7 +213,7 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r case( SID_GRFFILTER_POPART ): { if( pShell ) - pShell->SetWaitCursor( TRUE ); + pShell->SetWaitCursor( sal_True ); if( rGraphic.IsAnimated() ) { @@ -231,7 +231,7 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r } if( pShell ) - pShell->SetWaitCursor( FALSE ); + pShell->SetWaitCursor( sal_False ); } break; @@ -246,7 +246,7 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r case( SID_GRFFILTER_SOLARIZE ): { - GraphicFilterSolarize aDlg( pWindow, rGraphic, 128, FALSE ); + GraphicFilterSolarize aDlg( pWindow, rGraphic, 128, sal_False ); if( aDlg.Execute() == RET_OK ) aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); @@ -446,7 +446,7 @@ IMPL_LINK( GraphicFilterDialog, ImplModifyHdl, void*, EMPTYARG ) // ---------------- GraphicFilterMosaic::GraphicFilterMosaic( Window* pParent, const Graphic& rGraphic, - USHORT nTileWidth, USHORT nTileHeight, BOOL bEnhanceEdges ) : + sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges ) : GraphicFilterDialog( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_MOSAIC ), rGraphic ), maFtWidth ( this, CUI_RES( DLG_FILTERMOSAIC_FT_WIDTH ) ), maMtrWidth ( this, CUI_RES( DLG_FILTERMOSAIC_MTR_WIDTH ) ), @@ -519,7 +519,7 @@ Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic, // ------------------ GraphicFilterSolarize::GraphicFilterSolarize( Window* pParent, const Graphic& rGraphic, - BYTE cGreyThreshold, BOOL bInvert ) : + sal_uInt8 cGreyThreshold, sal_Bool bInvert ) : GraphicFilterDialog ( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_SOLARIZE ), rGraphic ), maFtThreshold ( this, CUI_RES( DLG_FILTERSOLARIZE_FT_THRESHOLD ) ), maMtrThreshold ( this, CUI_RES( DLG_FILTERSOLARIZE_MTR_THRESHOLD ) ), @@ -583,7 +583,7 @@ Graphic GraphicFilterSolarize::GetFilteredGraphic( const Graphic& rGraphic, // ---------------------- GraphicFilterSepia::GraphicFilterSepia( Window* pParent, const Graphic& rGraphic, - USHORT nSepiaPercent ) : + sal_uInt16 nSepiaPercent ) : GraphicFilterDialog ( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_SEPIA ), rGraphic ), maFtSepia ( this, CUI_RES( DLG_FILTERSEPIA_FT_SEPIA ) ), maMtrSepia ( this, CUI_RES( DLG_FILTERSEPIA_MTR_SEPIA ) ) @@ -633,7 +633,7 @@ Graphic GraphicFilterSepia::GetFilteredGraphic( const Graphic& rGraphic, // ----------------------- GraphicFilterPoster::GraphicFilterPoster( Window* pParent, const Graphic& rGraphic, - USHORT nPosterCount ) : + sal_uInt16 nPosterCount ) : GraphicFilterDialog ( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_POSTER ), rGraphic ), maFtPoster ( this, CUI_RES( DLG_FILTERPOSTER_FT_POSTER ) ), maNumPoster ( this, CUI_RES( DLG_FILTERPOSTER_NUM_POSTER ) ) @@ -659,7 +659,7 @@ Graphic GraphicFilterPoster::GetFilteredGraphic( const Graphic& rGraphic, double /*fScaleX*/, double /*fScaleY*/ ) { Graphic aRet; - const USHORT nPosterCount = GetPosterColorCount(); + const sal_uInt16 nPosterCount = GetPosterColorCount(); if( rGraphic.IsAnimated() ) { @@ -719,7 +719,7 @@ Graphic GraphicFilterEmboss::GetFilteredGraphic( const Graphic& rGraphic, double /*fScaleX*/, double /*fScaleY*/ ) { Graphic aRet; - USHORT nAzim, nElev; + sal_uInt16 nAzim, nElev; switch( maCtlLight.GetActualRP() ) { diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 83f59438e..d22cd5edc 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -48,7 +48,7 @@ using ::com::sun::star::frame::XFrame; //# # //######################################################################## -SvxHlinkCtrl::SvxHlinkCtrl( USHORT _nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg ) +SvxHlinkCtrl::SvxHlinkCtrl( sal_uInt16 _nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg ) : SfxControllerItem ( _nId, rBindings ) ,aOnlineForwarder ( SID_INTERNET_ONLINE , *this ) ,aRdOnlyForwarder ( SID_READONLY_MODE, *this ) @@ -56,7 +56,7 @@ SvxHlinkCtrl::SvxHlinkCtrl( USHORT _nId, SfxBindings & rBindings, SvxHpLinkDlg* pParent = pDlg; } -void SvxHlinkCtrl::StateChanged( USHORT nSID, SfxItemState eState, +void SvxHlinkCtrl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { if ( eState == SFX_ITEM_AVAILABLE ) @@ -75,7 +75,7 @@ void SvxHlinkCtrl::StateChanged( USHORT nSID, SfxItemState eState, break; case SID_READONLY_MODE : { - pParent->SetReadOnlyMode( ( (SfxBoolItem*)pState)->GetValue() == TRUE ); + pParent->SetReadOnlyMode( ( (SfxBoolItem*)pState)->GetValue() == sal_True ); } break; } @@ -146,7 +146,7 @@ SvxHpLinkDlg::SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings) SetInputSet (mpItemSet); // Init Dialog - Start (FALSE); + Start (sal_False); pBindings->Update( SID_READONLY_MODE ); @@ -173,12 +173,12 @@ SvxHpLinkDlg::~SvxHpLinkDlg () |* |************************************************************************/ -BOOL SvxHpLinkDlg::Close() +sal_Bool SvxHpLinkDlg::Close() { GetDispatcher()->Execute( SID_HYPERLINK_DIALOG, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD); - return TRUE; + return sal_True; } /************************************************************************* @@ -205,13 +205,13 @@ void SvxHpLinkDlg::Move() // Size of Extrawindow Size aExtraWndSize( pCurrentPage->GetSizeExtraWnd() ); - BOOL bDoInvalid ; + sal_Bool bDoInvalid ; if( aDlgPos.X()+(1.02*aDlgSize.Width())+aExtraWndSize.Width() > aWindowSize.Width() ) { if( aDlgPos.X() - ( 0.02*aDlgSize.Width() ) - aExtraWndSize.Width() < 0 ) { // Pos Extrawindow anywhere - bDoInvalid = pCurrentPage->MoveToExtraWnd( Point( 1, long(1.1*aDlgPos.Y()) ), TRUE ); + bDoInvalid = pCurrentPage->MoveToExtraWnd( Point( 1, long(1.1*aDlgPos.Y()) ), sal_True ); } else { @@ -305,9 +305,9 @@ IMPL_LINK ( SvxHpLinkDlg, ClickCloseHdl_Impl, void *, EMPTYARG ) |* |************************************************************************/ -USHORT SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem ) +sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem ) { - USHORT nPageId = RID_SVXPAGE_HYPERLINK_INTERNET; + sal_uInt16 nPageId = RID_SVXPAGE_HYPERLINK_INTERNET; String aStrURL ( pItem->GetURL() ); INetURLObject aURL ( aStrURL ); @@ -401,7 +401,7 @@ void SvxHpLinkDlg::SetReadOnlyMode( sal_Bool bRdOnly ) |* |************************************************************************/ -void SvxHpLinkDlg::PageCreated( USHORT /*nId*/, IconChoicePage& rPage ) +void SvxHpLinkDlg::PageCreated( sal_uInt16 /*nId*/, IconChoicePage& rPage ) { SvxHyperlinkTabPageBase& rHyperlinkPage = dynamic_cast< SvxHyperlinkTabPageBase& >( rPage ); Reference< XFrame > xDocumentFrame; diff --git a/cui/source/dialogs/cuitbxform.cxx b/cui/source/dialogs/cuitbxform.cxx index d8dad8be1..7b5908621 100644 --- a/cui/source/dialogs/cuitbxform.cxx +++ b/cui/source/dialogs/cuitbxform.cxx @@ -58,7 +58,7 @@ FmInputRecordNoDialog::FmInputRecordNoDialog(Window * pParent) { m_aRecordNo.SetMin(1); m_aRecordNo.SetMax(0x7FFFFFFF); - m_aRecordNo.SetStrictFormat(TRUE); + m_aRecordNo.SetStrictFormat(sal_True); m_aRecordNo.SetDecimalDigits(0); FreeResource(); diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index dba880ce3..5c62f02c5 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -216,7 +216,7 @@ IMPL_LINK_INLINE_END( SvxMessDialog, Button2Hdl, Button *, EMPTYARG ) /*************************************************************************/ -void SvxMessDialog::SetButtonText( USHORT nBtnId, const String& rNewTxt ) +void SvxMessDialog::SetButtonText( sal_uInt16 nBtnId, const String& rNewTxt ) { switch ( nBtnId ) { diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 3b5e2bd79..a4c57a07e 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -51,7 +51,7 @@ #include <comphelper/processfactory.hxx> #define HHC editeng::HangulHanjaConversion -#define LINE_CNT static_cast< USHORT >(2) +#define LINE_CNT static_cast< sal_uInt16 >(2) //............................................................................. namespace svx @@ -118,7 +118,7 @@ namespace svx PseudoRubyText( const String& _rPrimary, const String& _rSecondary, const RubyPosition _ePosition ); public: - void Paint( OutputDevice& _rDevice, const Rectangle& _rRect, USHORT _nTextStyle, + void Paint( OutputDevice& _rDevice, const Rectangle& _rRect, sal_uInt16 _nTextStyle, Rectangle* _pPrimaryLocation = NULL, Rectangle* _pSecondaryLocation = NULL, ::vcl::ControlLayoutData* _pLayoutData = NULL ); }; @@ -132,7 +132,7 @@ namespace svx } //------------------------------------------------------------------------- - void PseudoRubyText::Paint( OutputDevice& _rDevice, const Rectangle& _rRect, USHORT _nTextStyle, + void PseudoRubyText::Paint( OutputDevice& _rDevice, const Rectangle& _rRect, sal_uInt16 _nTextStyle, Rectangle* _pPrimaryLocation, Rectangle* _pSecondaryLocation, ::vcl::ControlLayoutData* _pLayoutData ) { bool bLayoutOnly = NULL != _pLayoutData; @@ -204,7 +204,7 @@ namespace svx // now draw the texts // as we already calculated the precise rectangles for the texts, we don't want to // use the alignment flags given - within it's rect, every text is centered - USHORT nDrawTextStyle( _nTextStyle ); + sal_uInt16 nDrawTextStyle( _nTextStyle ); nDrawTextStyle &= ~( TEXT_DRAW_RIGHT | TEXT_DRAW_LEFT | TEXT_DRAW_BOTTOM | TEXT_DRAW_TOP ); nDrawTextStyle |= TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER; @@ -267,7 +267,7 @@ namespace svx ++aTextRect.Top(); --aTextRect.Bottom(); // calculate the text flags for the painting - USHORT nTextStyle = TEXT_DRAW_MNEMONIC; + sal_uInt16 nTextStyle = TEXT_DRAW_MNEMONIC; WinBits nStyle = GetStyle( ); // the horizontal alignment @@ -337,7 +337,7 @@ namespace svx { OutputDevice* pDev = rUDEvt.GetDevice(); Rectangle aRect = rUDEvt.GetRect(); - USHORT nItemId = rUDEvt.GetItemId(); + sal_uInt16 nItemId = rUDEvt.GetItemId(); String sText = *static_cast< String* >( GetItemData( nItemId ) ); pDev->DrawText( aRect, sText, TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER ); @@ -345,7 +345,7 @@ namespace svx void SuggestionSet::ClearSet() { - USHORT i, nCount = GetItemCount(); + sal_uInt16 i, nCount = GetItemCount(); for ( i = 0; i < nCount; ++i ) delete static_cast< String* >( GetItemData(i) ); Clear(); @@ -441,7 +441,7 @@ namespace svx if( m_bDisplayListBox != bDisplayListBox ) { Control& rOldControl = implGetCurrentControl(); - BOOL bHasFocus = rOldControl.HasFocus(); + sal_Bool bHasFocus = rOldControl.HasFocus(); m_bDisplayListBox = bDisplayListBox; @@ -463,12 +463,12 @@ namespace svx m_bInSelectionUpdate = true; if(pControl==&m_aListBox) { - USHORT nPos = m_aListBox.GetSelectEntryPos(); + sal_uInt16 nPos = m_aListBox.GetSelectEntryPos(); m_aValueSet.SelectItem( nPos+1 ); //itemid == pos+1 (id 0 has special meaning) } else { - USHORT nPos = m_aValueSet.GetSelectItemId()-1; //itemid == pos+1 (id 0 has special meaning) + sal_uInt16 nPos = m_aValueSet.GetSelectItemId()-1; //itemid == pos+1 (id 0 has special meaning) m_aListBox.SelectEntryPos( nPos ); } m_bInSelectionUpdate = false; @@ -487,21 +487,21 @@ namespace svx } void SuggestionDisplay::InsertEntry( const XubString& rStr ) { - USHORT nItemId = m_aListBox.InsertEntry( rStr ) + 1; //itemid == pos+1 (id 0 has special meaning) + sal_uInt16 nItemId = m_aListBox.InsertEntry( rStr ) + 1; //itemid == pos+1 (id 0 has special meaning) m_aValueSet.InsertItem( nItemId ); String* pItemData = new String(rStr); m_aValueSet.SetItemData( nItemId, pItemData ); } - void SuggestionDisplay::SelectEntryPos( USHORT nPos ) + void SuggestionDisplay::SelectEntryPos( sal_uInt16 nPos ) { m_aListBox.SelectEntryPos( nPos ); m_aValueSet.SelectItem( nPos+1 ); //itemid == pos+1 (id 0 has special meaning) } - USHORT SuggestionDisplay::GetEntryCount() const + sal_uInt16 SuggestionDisplay::GetEntryCount() const { return m_aListBox.GetEntryCount(); } - XubString SuggestionDisplay::GetEntry( USHORT nPos ) const + XubString SuggestionDisplay::GetEntry( sal_uInt16 nPos ) const { return m_aListBox.GetEntry( nPos ); } @@ -754,9 +754,9 @@ namespace svx pOtherBox = &m_aHangulOnly; if (pBox && pOtherBox) { - BOOL bBoxChecked = pBox->IsChecked(); + sal_Bool bBoxChecked = pBox->IsChecked(); if (bBoxChecked) - pOtherBox->Check( FALSE ); + pOtherBox->Check( sal_False ); pOtherBox->Enable( !bBoxChecked ); } @@ -865,10 +865,10 @@ namespace svx HHC::ConversionDirection _ePrimaryConversionDirection ) { // default state: try both direction - m_aHangulOnly.Check( FALSE ); - m_aHangulOnly.Enable( TRUE ); - m_aHanjaOnly.Check( FALSE ); - m_aHanjaOnly.Enable( TRUE ); + m_aHangulOnly.Check( sal_False ); + m_aHangulOnly.Enable( sal_True ); + m_aHanjaOnly.Check( sal_False ); + m_aHanjaOnly.Enable( sal_True ); if (!_bTryBothDirections) { @@ -1109,7 +1109,7 @@ namespace svx IMPL_LINK( HangulHanjaOptionsDialog, DeleteDictHdl, void*, EMPTYARG ) { - USHORT nSelPos = m_aDictsLB.GetSelectEntryPos(); + sal_uInt16 nSelPos = m_aDictsLB.GetSelectEntryPos(); if( nSelPos != LISTBOX_ENTRY_NOTFOUND ) { Reference< XConversionDictionary > xDic( m_aDictList[ nSelPos ] ); @@ -1486,8 +1486,8 @@ namespace svx { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const KeyCode& rKeyCode = pKEvt->GetKeyCode(); - USHORT nMod = rKeyCode.GetModifier(); - USHORT nCode = rKeyCode.GetCode(); + sal_uInt16 nMod = rKeyCode.GetModifier(); + sal_uInt16 nCode = rKeyCode.GetCode(); if( nCode == KEY_TAB && ( !nMod || KEY_SHIFT == nMod ) ) { bool bUp = KEY_SHIFT == nMod; @@ -1870,7 +1870,7 @@ namespace svx aName = xDic->getName(); m_aBookLB.InsertEntry( aName ); } - m_aBookLB.SelectEntryPos( USHORT( _nSelDict ) ); + m_aBookLB.SelectEntryPos( sal_uInt16( _nSelDict ) ); FreeResource(); diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index c63ec3f46..041ca5a57 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -96,7 +96,7 @@ sal_Bool SvxHyperlinkNewDocTp::ImplGetURLObject( const String& rPath, const Stri } if ( bIsValidURL ) { - USHORT nPos = maLbDocTypes.GetSelectEntryPos(); + sal_uInt16 nPos = maLbDocTypes.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) aURLObject.SetExtension( ((DocumentTypeData*)maLbDocTypes.GetEntryData( nPos ))->aStrExt ); } @@ -124,7 +124,7 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, const SfxItemSet& { // Set HC bitmaps and disable display of bitmap names. maBtCreate.SetModeImage( Image( CUI_RES( IMG_CREATE_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maBtCreate.EnableTextDisplay (FALSE); + maBtCreate.EnableTextDisplay (sal_False); InitStdControls(); FreeResource(); @@ -147,7 +147,7 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, const SfxItemSet& SvxHyperlinkNewDocTp::~SvxHyperlinkNewDocTp () { - for ( USHORT n=0; n<maLbDocTypes.GetEntryCount(); n++ ) + for ( sal_uInt16 n=0; n<maLbDocTypes.GetEntryCount(); n++ ) { DocumentTypeData* pTypeData = (DocumentTypeData*) maLbDocTypes.GetEntryData ( n ); @@ -279,7 +279,7 @@ void SvxHyperlinkNewDocTp::SetInitFocus() |* \************************************************************************/ -BOOL SvxHyperlinkNewDocTp::AskApply() +sal_Bool SvxHyperlinkNewDocTp::AskApply() { INetURLObject aINetURLObject; sal_Bool bRet = ImplGetURLObject( maCbbPath.GetText(), maCbbPath.GetBaseURL(), aINetURLObject ); @@ -348,7 +348,7 @@ void SvxHyperlinkNewDocTp::DoApply () if ( aStrNewName != aEmptyStr ) { // get private-url - USHORT nPos = maLbDocTypes.GetSelectEntryPos(); + sal_uInt16 nPos = maLbDocTypes.GetSelectEntryPos(); if( nPos == LISTBOX_ENTRY_NOTFOUND ) nPos=0; String aStrDocName ( ( ( DocumentTypeData* ) @@ -359,7 +359,7 @@ void SvxHyperlinkNewDocTp::DoApply () SfxStringItem aReferer( SID_REFERER, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "private:user" ) ) ); SfxStringItem aFrame( SID_TARGETNAME, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "_blank" ) ) ); - //SfxBoolItem aFrame( SID_OPEN_NEW_VIEW, TRUE ); + //SfxBoolItem aFrame( SID_OPEN_NEW_VIEW, sal_True ); String aStrFlags ( sal_Unicode('S') ); if ( maRbtEditLater.IsChecked() ) @@ -429,14 +429,14 @@ IMPL_LINK ( SvxHyperlinkNewDocTp, ClickNewHdl_Impl, void *, EMPTYARG ) utl::LocalFileHelper::ConvertSystemPathToURL( aTempStrURL, maCbbPath.GetBaseURL(), aStrURL ); String aStrPath = aStrURL; - BOOL bZeroPath = ( aStrPath.Len() == 0 ); - BOOL bHandleFileName = bZeroPath; // when path has length of 0, then the rest should always be handled + sal_Bool bZeroPath = ( aStrPath.Len() == 0 ); + sal_Bool bHandleFileName = bZeroPath; // when path has length of 0, then the rest should always be handled // as file name, otherwise we do not yet know if( bZeroPath ) aStrPath = SvtPathOptions().GetWorkPath(); else if( !::utl::UCBContentHelper::IsFolder( aStrURL ) ) - bHandleFileName = TRUE; + bHandleFileName = sal_True; xFolderPicker->setDisplayDirectory( aStrPath ); DisableClose( sal_True ); @@ -467,7 +467,7 @@ IMPL_LINK ( SvxHyperlinkNewDocTp, ClickNewHdl_Impl, void *, EMPTYARG ) maLbDocTypes.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ) { // get private-url - USHORT nPos = maLbDocTypes.GetSelectEntryPos(); + sal_uInt16 nPos = maLbDocTypes.GetSelectEntryPos(); aNewURL.setExtension( ( ( DocumentTypeData* ) maLbDocTypes.GetEntryData( nPos ) )->aStrExt ); } diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index aaef6b219..486a84644 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -61,13 +61,13 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemS maFtURL ( this, CUI_RES (FT_URL) ), maFtFullURL ( this, CUI_RES (FT_FULL_URL) ), maBtBrowse ( this, CUI_RES (BTN_BROWSE) ), - mbMarkWndOpen ( FALSE ) + mbMarkWndOpen ( sal_False ) { // Set HC bitmaps and disable display of bitmap names. maBtBrowse.SetModeImage( Image( CUI_RES( IMG_BROWSE_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maBtBrowse.EnableTextDisplay (FALSE); + maBtBrowse.EnableTextDisplay (sal_False); maBtFileopen.SetModeImage( Image( CUI_RES( IMG_FILEOPEN_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maBtFileopen.EnableTextDisplay (FALSE); + maBtFileopen.EnableTextDisplay (sal_False); InitStdControls(); FreeResource(); diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 29a778c80..4687fc597 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -68,13 +68,13 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, maCbAnonymous ( this, CUI_RES (CBX_ANONYMOUS) ), maBtBrowse ( this, CUI_RES (BTN_BROWSE) ), maBtTarget ( this, CUI_RES (BTN_TARGET) ), - mbMarkWndOpen ( FALSE ) + mbMarkWndOpen ( sal_False ) { // Set HC bitmaps and display display of bitmap names. maBtBrowse.SetModeImage( Image( CUI_RES( IMG_BROWSE_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maBtBrowse.EnableTextDisplay (FALSE); + maBtBrowse.EnableTextDisplay (sal_False); maBtTarget.SetModeImage( Image( CUI_RES( IMG_TARGET_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maBtTarget.EnableTextDisplay (FALSE); + maBtTarget.EnableTextDisplay (sal_False); InitStdControls(); FreeResource(); @@ -103,12 +103,12 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, /////////////////////////////////////// // set defaults maRbtLinktypInternet.Check (); - maFtLogin.Show( FALSE ); - maFtPassword.Show( FALSE ); - maEdLogin.Show( FALSE ); - maEdPassword.Show( FALSE ); - maCbAnonymous.Show( FALSE ); - maBtTarget.Enable( FALSE ); + maFtLogin.Show( sal_False ); + maFtPassword.Show( sal_False ); + maEdLogin.Show( sal_False ); + maEdPassword.Show( sal_False ); + maCbAnonymous.Show( sal_False ); + maBtTarget.Enable( sal_False ); maBtBrowse.Enable( maStrStdDocURL != aEmptyStr ); /////////////////////////////////////// @@ -186,7 +186,7 @@ void SvxHyperlinkInternetTp::setFTPUser(const String& rUser, const String& rPass maFtPassword.Enable (); maEdLogin.Enable (); maEdPassword.Enable (); - maCbAnonymous.Check(FALSE); + maCbAnonymous.Check(sal_False); } /************************************************************************* @@ -304,11 +304,11 @@ void SvxHyperlinkInternetTp::SetScheme( const String& aScheme ) { //if aScheme is empty or unknown the default beaviour is like it where HTTP - BOOL bFTP = aScheme.SearchAscii( sFTPScheme ) == 0; - BOOL bTelnet = FALSE; + sal_Bool bFTP = aScheme.SearchAscii( sFTPScheme ) == 0; + sal_Bool bTelnet = sal_False; if( !bFTP ) bTelnet = aScheme.SearchAscii( sTelnetScheme ) == 0; - BOOL bInternet = !(bFTP || bTelnet); + sal_Bool bInternet = !(bFTP || bTelnet); //update protocol button selection: maRbtLinktypFTP.Check(bFTP); @@ -457,11 +457,11 @@ IMPL_LINK ( SvxHyperlinkInternetTp, ClickBrowseHdl_Impl, void *, EMPTYARG ) SfxStringItem aName( SID_FILE_NAME, maStrStdDocURL ); SfxStringItem aRefererItem( SID_REFERER, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "private:user" ) ) ); - SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, TRUE ); - SfxBoolItem aSilent( SID_SILENT, TRUE ); - SfxBoolItem aReadOnly( SID_DOC_READONLY, TRUE ); + SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_True ); + SfxBoolItem aSilent( SID_SILENT, sal_True ); + SfxBoolItem aReadOnly( SID_DOC_READONLY, sal_True ); - SfxBoolItem aBrowse( SID_BROWSE, TRUE ); + SfxBoolItem aBrowse( SID_BROWSE, sal_True ); const SfxPoolItem *ppItems[] = { &aName, &aNewView, &aSilent, &aReadOnly, &aRefererItem, &aBrowse, NULL }; (((SvxHpLinkDlg*)mpDialog)->GetBindings())->Execute( SID_OPENDOC, ppItems, 0, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD ); @@ -527,7 +527,7 @@ void SvxHyperlinkInternetTp::SetMarkStr ( String& aStrMark ) |* |************************************************************************/ -void SvxHyperlinkInternetTp::SetOnlineMode( BOOL /*bEnable*/ ) +void SvxHyperlinkInternetTp::SetOnlineMode( sal_Bool /*bEnable*/ ) { // State of target-button in subject to the current url-string // ( Can't display any targets in an document, if there is no @@ -538,7 +538,7 @@ void SvxHyperlinkInternetTp::SetOnlineMode( BOOL /*bEnable*/ ) if( aStrCurrentTarget == aEmptyStr || aStrCurrentTarget.EqualsIgnoreCaseAscii( sHTTPScheme ) || aStrCurrentTarget.EqualsIgnoreCaseAscii( sHTTPSScheme ) ) - maBtTarget.Enable( FALSE ); + maBtTarget.Enable( sal_False ); else - maBtTarget.Enable( TRUE ); + maBtTarget.Enable( sal_True ); } diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index cd135d65c..90c228da9 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -64,7 +64,7 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( Window *pParent, const SfxItemSet& rIte { // Set HC bitmaps and disable display of bitmap names. maBtAdrBook.SetModeImage( Image( CUI_RES( IMG_ADRESSBOOK_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maBtAdrBook.EnableTextDisplay (FALSE); + maBtAdrBook.EnableTextDisplay (sal_False); InitStdControls(); FreeResource(); @@ -212,7 +212,7 @@ void SvxHyperlinkMailTp::SetScheme( const String& aScheme ) //if aScheme is empty or unknown the default beaviour is like it where MAIL const sal_Char sNewsScheme[] = INET_NEWS_SCHEME; - BOOL bMail = aScheme.SearchAscii( sNewsScheme ) != 0; + sal_Bool bMail = aScheme.SearchAscii( sNewsScheme ) != 0; //update protocol button selection: maRbtMail.Check(bMail); diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index 95adfa4ad..bc1cfb71e 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -63,9 +63,9 @@ using namespace ::rtl; struct TargetData { OUString aUStrLinkname; - BOOL bIsTarget; + sal_Bool bIsTarget; - TargetData ( OUString aUStrLName, BOOL bTarget ) + TargetData ( OUString aUStrLName, sal_Bool bTarget ) : bIsTarget ( bTarget ) { if ( bIsTarget ) @@ -133,8 +133,8 @@ SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd( SvxHyperlinkTabPageBase *pParent ) maBtApply( this, CUI_RES (BT_APPLY) ), maBtClose( this, CUI_RES (BT_CLOSE) ), maLbTree ( this, CUI_RES (TLB_MARK) ), - mbUserMoved ( FALSE ), - mbFirst ( TRUE ), + mbUserMoved ( sal_False ), + mbFirst ( sal_True ), mpParent ( pParent ), mnError ( LERR_NOERROR ) { @@ -161,9 +161,9 @@ SvxHlinkDlgMarkWnd::~SvxHlinkDlgMarkWnd() |* |************************************************************************/ -USHORT SvxHlinkDlgMarkWnd::SetError( USHORT nError) +sal_uInt16 SvxHlinkDlgMarkWnd::SetError( sal_uInt16 nError) { - USHORT nOldError = mnError; + sal_uInt16 nOldError = mnError; mnError = nError; if( mnError != LERR_NOERROR ) @@ -180,11 +180,11 @@ USHORT SvxHlinkDlgMarkWnd::SetError( USHORT nError) |* |************************************************************************/ -BOOL SvxHlinkDlgMarkWnd::MoveTo ( Point aNewPos ) +sal_Bool SvxHlinkDlgMarkWnd::MoveTo ( Point aNewPos ) { if ( !mbUserMoved ) { - BOOL bOldStatus = mbUserMoved; + sal_Bool bOldStatus = mbUserMoved; SetPosPixel ( aNewPos ); mbUserMoved = bOldStatus; } @@ -197,12 +197,12 @@ void SvxHlinkDlgMarkWnd::Move () Window::Move(); if ( IsReallyVisible() ) - mbUserMoved = TRUE; + mbUserMoved = sal_True; } -BOOL SvxHlinkDlgMarkWnd::ConnectToDialog( BOOL bDoit ) +sal_Bool SvxHlinkDlgMarkWnd::ConnectToDialog( sal_Bool bDoit ) { - BOOL bOldStatus = mbUserMoved; + sal_Bool bOldStatus = mbUserMoved; mbUserMoved = !bDoit; @@ -249,7 +249,7 @@ void SvxHlinkDlgMarkWnd::RefreshTree ( String aStrURL ) |* |************************************************************************/ -BOOL SvxHlinkDlgMarkWnd::RefreshFromDoc( OUString aURL ) +sal_Bool SvxHlinkDlgMarkWnd::RefreshFromDoc( OUString aURL ) { mnError = LERR_NOERROR; @@ -272,7 +272,7 @@ BOOL SvxHlinkDlgMarkWnd::RefreshFromDoc( OUString aURL ) { uno::Sequence< beans::PropertyValue > aArg(1); aArg.getArray()[0].Name = OUString::createFromAscii( "Hidden" ); - aArg.getArray()[0].Value <<= (sal_Bool) TRUE; + aArg.getArray()[0].Value <<= (sal_Bool) sal_True; xComp = xLoader->loadComponentFromURL( aURL, OUString::createFromAscii( "_blank" ), 0, aArg ); } catch( const io::IOException& ) @@ -346,19 +346,19 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink { int nEntries=0; const uno::Sequence< OUString > aNames( xLinks->getElementNames() ); - const ULONG nLinks = aNames.getLength(); + const sal_uLong nLinks = aNames.getLength(); const OUString* pNames = aNames.getConstArray(); Color aMaskColor( COL_LIGHTMAGENTA ); const OUString aProp_LinkDisplayName( RTL_CONSTASCII_USTRINGPARAM( "LinkDisplayName" ) ); const OUString aProp_LinkTarget( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.LinkTarget" ) ); const OUString aProp_LinkDisplayBitmap( RTL_CONSTASCII_USTRINGPARAM( "LinkDisplayBitmap" ) ); - for( ULONG i = 0; i < nLinks; i++ ) + for( sal_uLong i = 0; i < nLinks; i++ ) { uno::Any aAny; OUString aLink( *pNames++ ); - BOOL bError = FALSE; + sal_Bool bError = sal_False; try { aAny = xLinks->getByName( aLink ); @@ -367,7 +367,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink { // if the name of the target was invalid (like empty headings) // no object can be provided - bError = TRUE; + bError = sal_True; } if(bError) continue; @@ -386,7 +386,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink // is it a target ? uno::Reference< lang::XServiceInfo > xSI( xTarget, uno::UNO_QUERY ); - BOOL bIsTarget = xSI->supportsService( aProp_LinkTarget ); + sal_Bool bIsTarget = xSI->supportsService( aProp_LinkTarget ); // create userdata TargetData *pData = new TargetData ( aLink, bIsTarget ); @@ -404,7 +404,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink pEntry = maLbTree.InsertEntry ( aStrDisplayname, aBmp, aBmp, pParentEntry, - FALSE, LIST_APPEND, + sal_False, LIST_APPEND, (void*)pData ); maLbTree.SetExpandedEntryBmp( pEntry, aBmp, BMP_COLOR_HIGHCONTRAST ); maLbTree.SetCollapsedEntryBmp( pEntry, aBmp, BMP_COLOR_HIGHCONTRAST ); @@ -415,7 +415,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink // insert Displayname into treelist without bitmaps pEntry = maLbTree.InsertEntry ( aStrDisplayname, pParentEntry, - FALSE, LIST_APPEND, + sal_False, LIST_APPEND, (void*)pData ); nEntries++; } @@ -425,7 +425,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink // insert Displayname into treelist without bitmaps pEntry = maLbTree.InsertEntry ( aStrDisplayname, pParentEntry, - FALSE, LIST_APPEND, + sal_False, LIST_APPEND, (void*)pData ); nEntries++; } @@ -472,14 +472,14 @@ void SvxHlinkDlgMarkWnd::ClearTree() SvLBoxEntry* SvxHlinkDlgMarkWnd::FindEntry ( String aStrName ) { - BOOL bFound=FALSE; + sal_Bool bFound=sal_False; SvLBoxEntry* pEntry = maLbTree.First(); while ( pEntry && !bFound ) { TargetData* pUserData = ( TargetData * ) pEntry->GetUserData (); if ( aStrName == String( pUserData->aUStrLinkname ) ) - bFound = TRUE; + bFound = sal_True; else pEntry = maLbTree.Next( pEntry ); } diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 4a3269fc8..307de4fb8 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -66,10 +66,10 @@ SvxFramesComboBox::SvxFramesComboBox ( Window* pParent, const ResId& rResId, if ( pFrame ) { pFrame->GetTargetList(*pList); - USHORT nCount = (USHORT)pList->Count(); + sal_uInt16 nCount = (sal_uInt16)pList->Count(); if( nCount ) { - USHORT i; + sal_uInt16 i; for ( i = 0; i < nCount; i++ ) { InsertEntry(*pList->GetObject(i)); @@ -98,7 +98,7 @@ SvxFramesComboBox::~SvxFramesComboBox () |* |************************************************************************/ -SvxHyperURLBox::SvxHyperURLBox( Window* pParent, INetProtocol eSmart, BOOL bAddresses ) +SvxHyperURLBox::SvxHyperURLBox( Window* pParent, INetProtocol eSmart, sal_Bool bAddresses ) : SvtURLBox ( pParent, eSmart ), DropTargetHelper ( this ), mbAccessAddress (bAddresses) @@ -140,17 +140,17 @@ Diese Methode parsed eine EMailadresse aus einem D&D-DataObjekt aus der Adre�d #define DB_DD_DELIM ((char)11) -String SvxHyperURLBox::GetAllEmailNamesFromDragItem( USHORT nItem ) +String SvxHyperURLBox::GetAllEmailNamesFromDragItem( sal_uInt16 nItem ) { #if !defined( ICC ) && !defined( SOLARIS ) String aAddress; if ( DragServer::HasFormat( nItem, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) ) { - ULONG nLen = DragServer::GetDataLen( nItem, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) - 1; - USHORT i = 0; + sal_uLong nLen = DragServer::GetDataLen( nItem, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) - 1; + sal_uInt16 i = 0; String aTxt; - char *pTxt = aTxt.AllocStrBuf( (USHORT)nLen ); + char *pTxt = aTxt.AllocStrBuf( (sal_uInt16)nLen ); DragServer::PasteData( nItem, pTxt, nLen, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ); String aDBName = aTxt.GetToken( i++, DB_DD_DELIM ); String aTableName = aTxt.GetToken( i++, DB_DD_DELIM ); @@ -171,14 +171,14 @@ String SvxHyperURLBox::GetAllEmailNamesFromDragItem( USHORT nItem ) SbaSelectionListRef pSelectionList; pSelectionList.Clear(); pSelectionList = new SbaSelectionList; - USHORT nTokCnt = aTxt.GetTokenCount( DB_DD_DELIM ); + sal_uInt16 nTokCnt = aTxt.GetTokenCount( DB_DD_DELIM ); for ( ; i < nTokCnt; ++i ) pSelectionList->Insert( - (void*)(USHORT)aTxt.GetToken( i, DB_DD_DELIM ), LIST_APPEND ); + (void*)(sal_uInt16)aTxt.GetToken( i, DB_DD_DELIM ), LIST_APPEND ); OfaDBMgr* pDBMgr = SFX_APP()->GetOfaDBMgr(); - BOOL bBasic = DBMGR_STD; + sal_Bool bBasic = DBMGR_STD; if ( !pDBMgr->OpenDB( bBasic, aDBName ) ) return aAddress; @@ -205,17 +205,17 @@ String SvxHyperURLBox::GetAllEmailNamesFromDragItem( USHORT nItem ) if ( aDBDef.Is() ) { SbaColumn* pCol = aDBDef->GetColumn("EMAIL"); - ULONG nPos = 0; + sal_uLong nPos = 0; if ( pCol ) nPos = aDBDef->GetOriginalColumns().GetPos( pCol ) + 1; for ( i = 0 ; nPos && i < pSelectionList->Count(); ++i ) { - ULONG nIndex = (ULONG)pSelectionList->GetObject(i); + sal_uLong nIndex = (sal_uLong)pSelectionList->GetObject(i); // N"achsten zu lesenden Datensatz ansteuern - BOOL bEnd = rParam.GetCursor()->IsOffRange(); + sal_Bool bEnd = rParam.GetCursor()->IsOffRange(); if ( !bEnd ) { @@ -225,7 +225,7 @@ String SvxHyperURLBox::GetAllEmailNamesFromDragItem( USHORT nItem ) if ( aRow.Is() ) { aAddress += pDBMgr-> - ImportDBField( (USHORT)nPos, &aDBDef, aRow.getBodyPtr() ); + ImportDBField( (sal_uInt16)nPos, &aDBDef, aRow.getBodyPtr() ); aAddress += ','; } else @@ -294,7 +294,7 @@ SvxHyperlinkTabPageBase::SvxHyperlinkTabPageBase ( Window *pParent, mpBtScript ( NULL ), mbIsCloseDisabled ( sal_False ), mpDialog ( pParent ), - mbStdControlsInit ( FALSE ), + mbStdControlsInit ( sal_False ), aEmptyStr() { // create bookmark-window @@ -355,10 +355,10 @@ void SvxHyperlinkTabPageBase::InitStdControls () mpBtScript->SetClickHdl ( LINK ( this, SvxHyperlinkTabPageBase, ClickScriptHdl_Impl ) ); mpBtScript->SetModeImage( Image( ResId( IMG_SCRIPT_HC, *m_pResMgr ) ), BMP_COLOR_HIGHCONTRAST ); - mpBtScript->EnableTextDisplay (FALSE); + mpBtScript->EnableTextDisplay (sal_False); } - mbStdControlsInit = TRUE; + mbStdControlsInit = sal_True; } /************************************************************************* @@ -367,12 +367,12 @@ void SvxHyperlinkTabPageBase::InitStdControls () |* \************************************************************************/ -BOOL SvxHyperlinkTabPageBase::MoveToExtraWnd( Point aNewPos, BOOL bDisConnectDlg ) +sal_Bool SvxHyperlinkTabPageBase::MoveToExtraWnd( Point aNewPos, sal_Bool bDisConnectDlg ) { - BOOL bReturn = mpMarkWnd->MoveTo ( aNewPos ); + sal_Bool bReturn = mpMarkWnd->MoveTo ( aNewPos ); if( bDisConnectDlg ) - mpMarkWnd->ConnectToDialog( FALSE ); + mpMarkWnd->ConnectToDialog( sal_False ); return ( !bReturn && IsMarkWndVisible() ); } @@ -405,7 +405,7 @@ void SvxHyperlinkTabPageBase::ShowMarkWnd () { // Pos Extrawindow anywhere MoveToExtraWnd( Point(10,10) ); // very unlikely - mpMarkWnd->ConnectToDialog( FALSE ); + mpMarkWnd->ConnectToDialog( sal_False ); } else { @@ -432,7 +432,7 @@ void SvxHyperlinkTabPageBase::ShowMarkWnd () void SvxHyperlinkTabPageBase::FillStandardDlgFields ( SvxHyperlinkItem* pHyperlinkItem ) { // Frame - USHORT nPos = mpCbbFrame->GetEntryPos ( pHyperlinkItem->GetTargetFrame() ); + sal_uInt16 nPos = mpCbbFrame->GetEntryPos ( pHyperlinkItem->GetTargetFrame() ); if ( nPos != LISTBOX_ENTRY_NOTFOUND) mpCbbFrame->SetText ( pHyperlinkItem->GetTargetFrame() ); @@ -484,10 +484,10 @@ void SvxHyperlinkTabPageBase::DoApply () |* \************************************************************************/ -BOOL SvxHyperlinkTabPageBase::AskApply () +sal_Bool SvxHyperlinkTabPageBase::AskApply () { // default-implementation - return TRUE; + return sal_True; } /************************************************************************* @@ -508,7 +508,7 @@ void SvxHyperlinkTabPageBase::SetMarkStr ( String& /*aStrMark*/ ) |* \************************************************************************/ -void SvxHyperlinkTabPageBase::SetOnlineMode( BOOL /*bEnable*/ ) +void SvxHyperlinkTabPageBase::SetOnlineMode( sal_Bool /*bEnable*/ ) { // default-implemtation : do nothing } @@ -530,7 +530,7 @@ void SvxHyperlinkTabPageBase::SetInitFocus() |* |************************************************************************/ -BOOL SvxHyperlinkTabPageBase::IsHTMLDoc() const +sal_Bool SvxHyperlinkTabPageBase::IsHTMLDoc() const { return ((SvxHpLinkDlg*)mpDialog)->IsHTMLDoc(); } @@ -576,9 +576,9 @@ IMPL_LINK ( SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, void *, EMPTYARG ) because if no JAVA is installed an error box occurs and then it is possible to close the HyperLinkDlg before its child (MacroAssignDlg) -> GPF */ - BOOL bIsInputEnabled = GetParent()->IsInputEnabled(); + sal_Bool bIsInputEnabled = GetParent()->IsInputEnabled(); if ( bIsInputEnabled ) - GetParent()->EnableInput( FALSE ); + GetParent()->EnableInput( sal_False ); // <-- SfxMacroAssignDlg aDlg( this, mxDocumentFrame, *pItemSet ); @@ -597,7 +597,7 @@ IMPL_LINK ( SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, void *, EMPTYARG ) // --> PB 2006-01-13 #123474# if ( bIsInputEnabled ) - GetParent()->EnableInput( TRUE ); + GetParent()->EnableInput( sal_True ); // <-- // execute dlg DisableClose( sal_True ); @@ -607,7 +607,7 @@ IMPL_LINK ( SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, void *, EMPTYARG ) { const SfxItemSet* pOutSet = aDlg.GetOutputItemSet(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, FALSE, &pItem )) + if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, sal_False, &pItem )) { pHyperlinkItem->SetMacroTable( ((SvxMacroItem*)pItem)->GetMacroTable() ); } @@ -624,7 +624,7 @@ IMPL_LINK ( SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, void *, EMPTYARG ) |* |************************************************************************/ -USHORT SvxHyperlinkTabPageBase::GetMacroEvents() +sal_uInt16 SvxHyperlinkTabPageBase::GetMacroEvents() { SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *) GetItemSet().GetItem (SID_HYPERLINK_GETLINK); @@ -646,9 +646,9 @@ SvxMacroTableDtor* SvxHyperlinkTabPageBase::GetMacroTable() |* |************************************************************************/ -BOOL SvxHyperlinkTabPageBase::FileExists( const INetURLObject& rURL ) +sal_Bool SvxHyperlinkTabPageBase::FileExists( const INetURLObject& rURL ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rURL.GetFull().getLength() > 0 ) { @@ -727,7 +727,7 @@ void SvxHyperlinkTabPageBase::GetDataFromCommonFields( String& aStrName, aStrFrame = mpCbbFrame->GetText(); eMode = (SvxLinkInsertMode) (mpLbForm->GetSelectEntryPos()+1); if( IsHTMLDoc() ) - eMode = (SvxLinkInsertMode) ( UINT16(eMode) | HLINK_HTMLMODE ); + eMode = (SvxLinkInsertMode) ( sal_uInt16(eMode) | HLINK_HTMLMODE ); } /************************************************************************* @@ -764,7 +764,7 @@ void SvxHyperlinkTabPageBase::Reset( const SfxItemSet& rItemSet) |* |************************************************************************/ -BOOL SvxHyperlinkTabPageBase::FillItemSet( SfxItemSet& rOut) +sal_Bool SvxHyperlinkTabPageBase::FillItemSet( SfxItemSet& rOut) { String aStrURL, aStrName, aStrIntName, aStrFrame; SvxLinkInsertMode eMode; @@ -773,14 +773,14 @@ BOOL SvxHyperlinkTabPageBase::FillItemSet( SfxItemSet& rOut) if ( !aStrName.Len() ) //automatically create a visible name if the link is created without name aStrName = CreateUiNameFromURL(aStrURL); - USHORT nEvents = GetMacroEvents(); + sal_uInt16 nEvents = GetMacroEvents(); SvxMacroTableDtor* pTable = GetMacroTable(); SvxHyperlinkItem aItem( SID_HYPERLINK_SETLINK, aStrName, aStrURL, aStrFrame, aStrIntName, eMode, nEvents, pTable ); rOut.Put (aItem); - return TRUE; + return sal_True; } String SvxHyperlinkTabPageBase::CreateUiNameFromURL( const String& aStrURL ) @@ -847,7 +847,7 @@ int SvxHyperlinkTabPageBase::DeactivatePage( SfxItemSet* _pSet) GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode); - USHORT nEvents = GetMacroEvents(); + sal_uInt16 nEvents = GetMacroEvents(); SvxMacroTableDtor* pTable = GetMacroTable(); if( _pSet ) @@ -860,11 +860,11 @@ int SvxHyperlinkTabPageBase::DeactivatePage( SfxItemSet* _pSet) return( LEAVE_PAGE ); } -BOOL SvxHyperlinkTabPageBase::ShouldOpenMarkWnd() +sal_Bool SvxHyperlinkTabPageBase::ShouldOpenMarkWnd() { - return FALSE; + return sal_False; } -void SvxHyperlinkTabPageBase::SetMarkWndShouldOpen(BOOL) +void SvxHyperlinkTabPageBase::SetMarkWndShouldOpen(sal_Bool) { } diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index a7b083880..12037243e 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -55,7 +55,7 @@ int IconcDlgCmpUS_Impl( const void* p1, const void* p2 ) #endif #endif { - return *(USHORT*)p1 - *(USHORT*)p2; + return *(sal_uInt16*)p1 - *(sal_uInt16*)p2; } // some stuff for easier changes for SvtViewOptions @@ -93,9 +93,9 @@ IconChoicePage::IconChoicePage( Window *pParent, const ResId &rResId, const SfxItemSet &rAttrSet ) : TabPage ( pParent, rResId ), pSet ( &rAttrSet ), - bHasExchangeSupport ( FALSE ), + bHasExchangeSupport ( sal_False ), pDialog ( NULL ), - bStandard ( FALSE ) + bStandard ( sal_False ) { SetStyle ( GetStyle() | WB_DIALOGCONTROL | WB_HIDE ); } @@ -135,9 +135,9 @@ void IconChoicePage::FillUserData() // ----------------------------------------------------------------------- -BOOL IconChoicePage::IsReadOnly() const +sal_Bool IconChoicePage::IsReadOnly() const { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -158,16 +158,16 @@ void IconChoicePage::ImplInitSettings() Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); SetBackground(); } else { - EnableChildTransparentMode( FALSE ); + EnableChildTransparentMode( sal_False ); SetParentClipMode( 0 ); - SetPaintTransparent( FALSE ); + SetPaintTransparent( sal_False ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); @@ -217,7 +217,7 @@ void IconChoicePage::DataChanged( const DataChangedEvent& rDCEvt ) IconChoiceDialog::IconChoiceDialog ( Window* pParent, const ResId &rResId, const EIconChoicePos ePos, - const SfxItemSet *pItemSet )//, BOOL bEditFmt, const String *pUserButtonText = 0 ) + const SfxItemSet *pItemSet )//, sal_Bool bEditFmt, const String *pUserButtonText = 0 ) : ModalDialog ( pParent, rResId ), meChoicePos ( ePos ), maIconCtrl ( this, WB_3DLOOK | WB_ICON | WB_BORDER | @@ -235,11 +235,11 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const ResId &rResId, pRanges ( NULL ), nResId ( rResId.GetId() ), - bHideResetBtn ( FALSE ), - bModal ( FALSE ), - bInOK ( FALSE ), - bModified ( FALSE ), - bItemsReset ( FALSE ) + bHideResetBtn ( sal_False ), + bModal ( sal_False ), + bInOK ( sal_False ), + bModified ( sal_False ), + bItemsReset ( sal_False ) { // IconChoiceCtrl-Settings //maIconCtrl.SetBackground ( Wallpaper( Color (146, 146, 186) ) ); @@ -248,7 +248,7 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const ResId &rResId, SetCtrlPos ( meChoicePos ); maIconCtrl.SetClickHdl ( LINK ( this, IconChoiceDialog , ChosePageHdl_Impl ) ); maIconCtrl.Show(); - maIconCtrl.SetChoiceWithCursor ( TRUE ); + maIconCtrl.SetChoiceWithCursor ( sal_True ); maIconCtrl.SetSelectionMode( SINGLE_SELECTION ); maIconCtrl.SetHelpId( HID_ICCDIALOG_CHOICECTRL ); @@ -271,14 +271,14 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const ResId &rResId, aHelpBtn.Show(); aResetBtn.Show(); - SetPosSizeCtrls ( TRUE ); + SetPosSizeCtrls ( sal_True ); } // ----------------------------------------------------------------------- /* IconChoiceDialog ::IconChoiceDialog ( SfxViewFrame *pViewFrame, Window* pParent, const ResId &rResId, - const SfxItemSet * = 0, BOOL bEditFmt = FALSE, + const SfxItemSet * = 0, sal_Bool bEditFmt = sal_False, const String *pUserButtonText = 0 ) : meChoicePos ( PosLeft ), // Default erst ma Links maIconCtrl ( this, Die_Winbits ), @@ -298,7 +298,7 @@ IconChoiceDialog ::IconChoiceDialog ( SfxViewFrame *pViewFrame, Window* pParent, IconChoiceDialog ::~IconChoiceDialog () { - ULONG i; + sal_uLong i; // save configuration at INI-Manager // and remove pages @@ -306,7 +306,7 @@ IconChoiceDialog ::~IconChoiceDialog () aTabDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)).GetBuffer() ) ); aTabDlgOpt.SetPageID( mnCurrentPageId ); - const ULONG nCount = maPageList.Count(); + const sal_uLong nCount = maPageList.Count(); for ( i = 0; i < nCount; ++i ) { @@ -334,7 +334,7 @@ IconChoiceDialog ::~IconChoiceDialog () for ( i=0; i<maIconCtrl.GetEntryCount(); i++) { SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.GetEntry ( i ); - USHORT* pUserData = (USHORT*) pEntry->GetUserData(); + sal_uInt16* pUserData = (sal_uInt16*) pEntry->GetUserData(); delete pUserData; } @@ -351,12 +351,12 @@ IconChoiceDialog ::~IconChoiceDialog () | \**********************************************************************/ -SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( USHORT nId, const String& rIconText, +SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( sal_uInt16 nId, const String& rIconText, const Image& rChoiceIcon, const Image& rChoiceIconHC, CreatePage pCreateFunc /* != 0 */, GetPageRanges pRangesFunc /* darf 0 sein */, - BOOL bItemsOnDemand, ULONG /*nPos*/ ) + sal_Bool bItemsOnDemand, sal_uLong /*nPos*/ ) { IconChoicePageData* pData = new IconChoicePageData ( nId, pCreateFunc, pRangesFunc, @@ -366,7 +366,7 @@ SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( USHORT nId, const String& pData->fnGetRanges = pRangesFunc; pData->bOnDemand = bItemsOnDemand; - USHORT *pId = new USHORT ( nId ); + sal_uInt16 *pId = new sal_uInt16 ( nId ); SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.InsertEntry( rIconText, rChoiceIcon, rChoiceIconHC ); pEntry->SetUserData ( (void*) pId ); return pEntry; @@ -382,7 +382,7 @@ void IconChoiceDialog::Paint( const Rectangle& rRect ) { Dialog::Paint ( rRect ); - for ( ULONG i=0; i<maPageList.Count(); i++ ) + for ( sal_uLong i=0; i<maPageList.Count(); i++ ) { IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i ); @@ -453,7 +453,7 @@ void IconChoiceDialog::HidePageImpl ( IconChoicePageData* pData ) // ----------------------------------------------------------------------- -void IconChoiceDialog::ShowPage( USHORT nId ) +void IconChoiceDialog::ShowPage( sal_uInt16 nId ) { bool bInvalidate = GetCurPageId() != nId; SetCurPageId( nId ); @@ -483,7 +483,7 @@ void IconChoiceDialog::Resize() } } -void IconChoiceDialog::SetPosSizeCtrls ( BOOL bInit ) +void IconChoiceDialog::SetPosSizeCtrls ( sal_Bool bInit ) { const Point aCtrlOffset ( LogicToPixel( Point( CTRLS_OFFSET, CTRLS_OFFSET ), MAP_APPFONT ) ); Size aOutSize ( GetOutputSizePixel() ); @@ -539,7 +539,7 @@ void IconChoiceDialog::SetPosSizeCtrls ( BOOL bInit ) //////////////////////////////////////// // Pages resizen & positionieren // - for ( ULONG i=0; i<maPageList.Count(); i++ ) + for ( sal_uLong i=0; i<maPageList.Count(); i++ ) { IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i ); @@ -584,7 +584,7 @@ void IconChoiceDialog::SetPosSizeCtrls ( BOOL bInit ) //////////////////////////////////////// // Buttons positionieren // - ULONG nXOffset=0; + sal_uLong nXOffset=0; if ( meChoicePos == PosRight ) nXOffset = aNewIconCtrlSize.Width()+(2*aCtrlOffset.X()); @@ -622,7 +622,7 @@ void IconChoiceDialog::SetPosSizeCtrls ( BOOL bInit ) Invalidate(); } -void IconChoiceDialog::SetPosSizePages ( USHORT nId ) +void IconChoiceDialog::SetPosSizePages ( sal_uInt16 nId ) { const Point aCtrlOffset ( LogicToPixel( Point( CTRLS_OFFSET, CTRLS_OFFSET ), MAP_APPFONT ) ); IconChoicePageData* pData = GetPageData ( nId ); @@ -678,13 +678,13 @@ void IconChoiceDialog::SetPosSizePages ( USHORT nId ) IMPL_LINK ( IconChoiceDialog , ChosePageHdl_Impl, void *, EMPTYARG ) { - ULONG nPos; + sal_uLong nPos; SvxIconChoiceCtrlEntry *pEntry = maIconCtrl.GetSelectedEntry ( nPos ); if ( !pEntry ) pEntry = maIconCtrl.GetCursor( ); - USHORT *pId = (USHORT*)pEntry->GetUserData (); + sal_uInt16 *pId = (sal_uInt16*)pEntry->GetUserData (); if( *pId != mnCurrentPageId ) { @@ -709,7 +709,7 @@ IMPL_LINK ( IconChoiceDialog , ChosePageHdl_Impl, void *, EMPTYARG ) IMPL_LINK( IconChoiceDialog, OkHdl, Button *, EMPTYARG ) { - bInOK = TRUE; + bInOK = sal_True; if ( OK_Impl() ) { @@ -801,7 +801,7 @@ void IconChoiceDialog::ActivatePageImpl () pData->pPage->Reset( *pSet ); } - pData->bRefresh = FALSE; + pData->bRefresh = sal_False; if ( pExampleSet ) pData->pPage->ActivatePage( *pExampleSet ); @@ -809,7 +809,7 @@ void IconChoiceDialog::ActivatePageImpl () SetHelpId( pData->pPage->GetHelpId() ); - BOOL bReadOnly = pData->pPage->IsReadOnly(); + sal_Bool bReadOnly = pData->pPage->IsReadOnly(); if ( bReadOnly || bHideResetBtn ) aResetBtn.Hide(); else @@ -819,7 +819,7 @@ void IconChoiceDialog::ActivatePageImpl () // ----------------------------------------------------------------------- -BOOL IconChoiceDialog::DeActivatePageImpl () +sal_Bool IconChoiceDialog::DeActivatePageImpl () { IconChoicePageData *pData = GetPageData ( mnCurrentPageId ); @@ -867,24 +867,24 @@ BOOL IconChoiceDialog::DeActivatePageImpl () pSet = GetRefreshedSet(); DBG_ASSERT( pSet, "GetRefreshedSet() liefert NULL" ); // alle Pages als neu zu initialsieren flaggen - const ULONG nCount = maPageList.Count(); + const sal_uLong nCount = maPageList.Count(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { IconChoicePageData* pObj = (IconChoicePageData*)maPageList.GetObject(i); if ( pObj->pPage != pPage ) // eigene Page nicht mehr refreshen - pObj->bRefresh = TRUE; + pObj->bRefresh = sal_True; else - pObj->bRefresh = FALSE; + pObj->bRefresh = sal_False; } } } if ( nRet & IconChoicePage::LEAVE_PAGE ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -911,7 +911,7 @@ void IconChoiceDialog::ResetPageImpl () | \**********************************************************************/ -const USHORT* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool ) +const sal_uInt16* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool ) { if ( pSet ) { @@ -922,19 +922,19 @@ const USHORT* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool ) if ( pRanges ) return pRanges; SvUShorts aUS( 16, 16 ); - ULONG nCount = maPageList.Count(); + sal_uLong nCount = maPageList.Count(); - USHORT i; + sal_uInt16 i; for ( i = 0; i < nCount; ++i ) { IconChoicePageData* pData = maPageList.GetObject (i); if ( pData->fnGetRanges ) { - const USHORT* pTmpRanges = (pData->fnGetRanges)(); - const USHORT* pIter = pTmpRanges; + const sal_uInt16* pTmpRanges = (pData->fnGetRanges)(); + const sal_uInt16* pIter = pTmpRanges; - USHORT nLen; + sal_uInt16 nLen; for( nLen = 0; *pIter; ++nLen, ++pIter ) ; aUS.Insert( pTmpRanges, nLen, aUS.Count() ); @@ -958,14 +958,14 @@ const USHORT* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool ) #if defined __SUNPRO_CC #pragma disable_warn #endif - qsort( (void*)aUS.GetData(), aUS.Count(), sizeof(USHORT), IconcDlgCmpUS_Impl ); + qsort( (void*)aUS.GetData(), aUS.Count(), sizeof(sal_uInt16), IconcDlgCmpUS_Impl ); #if defined __SUNPRO_CC #pragma enable_warn #endif } - pRanges = new USHORT[aUS.Count() + 1]; - memcpy(pRanges, aUS.GetData(), sizeof(USHORT) * aUS.Count()); + pRanges = new sal_uInt16[aUS.Count() + 1]; + memcpy(pRanges, aUS.GetData(), sizeof(sal_uInt16) * aUS.Count()); pRanges[aUS.Count()] = 0; return pRanges; @@ -988,14 +988,14 @@ void IconChoiceDialog::SetInputSet( const SfxItemSet* pInSet ) // ----------------------------------------------------------------------- -void IconChoiceDialog::PageCreated( USHORT /*nId*/, IconChoicePage& /*rPage*/ ) +void IconChoiceDialog::PageCreated( sal_uInt16 /*nId*/, IconChoicePage& /*rPage*/ ) { // not interested in } // ----------------------------------------------------------------------- -SfxItemSet* IconChoiceDialog::CreateInputItemSet( USHORT ) +SfxItemSet* IconChoiceDialog::CreateInputItemSet( sal_uInt16 ) { DBG_WARNINGFILE( "CreateInputItemSet nicht implementiert" ); @@ -1020,11 +1020,11 @@ short IconChoiceDialog::Execute() // ----------------------------------------------------------------------- -void IconChoiceDialog::Start( BOOL bShow ) +void IconChoiceDialog::Start( sal_Bool bShow ) { aCancelBtn.SetClickHdl( LINK( this, IconChoiceDialog, CancelHdl ) ); - bModal = FALSE; + bModal = sal_False; Start_Impl(); @@ -1038,8 +1038,8 @@ void IconChoiceDialog::Start( BOOL bShow ) sal_Bool IconChoiceDialog::QueryClose() { sal_Bool bRet = sal_True; - const ULONG nCount = maPageList.Count(); - for ( ULONG i = 0; i < nCount; ++i ) + const sal_uLong nCount = maPageList.Count(); + for ( sal_uLong i = 0; i < nCount; ++i ) { IconChoicePageData* pData = maPageList.GetObject(i); if ( pData->pPage && !pData->pPage->QueryClose() ) @@ -1056,7 +1056,7 @@ sal_Bool IconChoiceDialog::QueryClose() void IconChoiceDialog::Start_Impl() { Point aPos; - USHORT nActPage; + sal_uInt16 nActPage; if ( mnCurrentPageId == 0 || mnCurrentPageId == USHRT_MAX ) nActPage = maPageList.GetObject(0)->nId;//First()->nId; @@ -1072,7 +1072,7 @@ void IconChoiceDialog::Start_Impl() SetWindowState( ByteString( aTabDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); // initiale TabPage aus Programm/Hilfe/Konfig - nActPage = (USHORT)aTabDlgOpt.GetPageID(); + nActPage = (sal_uInt16)aTabDlgOpt.GetPageID(); if ( USHRT_MAX != mnCurrentPageId ) nActPage = mnCurrentPageId; @@ -1104,12 +1104,12 @@ const SfxItemSet* IconChoiceDialog::GetRefreshedSet() | \**********************************************************************/ -IconChoicePageData* IconChoiceDialog::GetPageData ( USHORT nId ) +IconChoicePageData* IconChoiceDialog::GetPageData ( sal_uInt16 nId ) { IconChoicePageData *pRet = NULL; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; - for ( ULONG i=0; i<maPageList.Count() && !bFound; i++ ) + for ( sal_uLong i=0; i<maPageList.Count() && !bFound; i++ ) { IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i ); @@ -1128,7 +1128,7 @@ IconChoicePageData* IconChoiceDialog::GetPageData ( USHORT nId ) | \**********************************************************************/ -BOOL IconChoiceDialog::OK_Impl() +sal_Bool IconChoiceDialog::OK_Impl() { IconChoicePage* pPage = GetPageData ( mnCurrentPageId )->pPage; @@ -1139,7 +1139,7 @@ BOOL IconChoiceDialog::OK_Impl() if ( pSet ) { SfxItemSet aTmp( *pSet->GetPool(), pSet->GetRanges() ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( pPage->HasExchangeSupport() ) nRet = pPage->DeactivatePage( &aTmp ); @@ -1151,7 +1151,7 @@ BOOL IconChoiceDialog::OK_Impl() pOutSet->Put( aTmp ); } else if ( bRet ) - bModified |= TRUE; + bModified |= sal_True; } else nRet = pPage->DeactivatePage( NULL ); @@ -1165,20 +1165,20 @@ BOOL IconChoiceDialog::OK_Impl() short IconChoiceDialog::Ok() { - bInOK = TRUE; + bInOK = sal_True; if ( !pOutSet ) { if ( !pExampleSet && pSet ) - pOutSet = pSet->Clone( FALSE ); // ohne Items + pOutSet = pSet->Clone( sal_False ); // ohne Items else if ( pExampleSet ) pOutSet = new SfxItemSet( *pExampleSet ); } - BOOL _bModified = FALSE; + sal_Bool _bModified = sal_False; - const ULONG nCount = maPageList.Count(); + const sal_uLong nCount = maPageList.Count(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { IconChoicePageData* pData = GetPageData ( i ); @@ -1198,7 +1198,7 @@ short IconChoiceDialog::Ok() if ( pPage->FillItemSet( aTmp ) ) { - _bModified |= TRUE; + _bModified |= sal_True; pExampleSet->Put( aTmp ); pOutSet->Put( aTmp ); } @@ -1207,20 +1207,20 @@ short IconChoiceDialog::Ok() } if ( _bModified || ( pOutSet && pOutSet->Count() > 0 ) ) - _bModified |= TRUE; + _bModified |= sal_True; return _bModified ? RET_OK : RET_CANCEL; } // ----------------------------------------------------------------------- -void IconChoiceDialog::FocusOnIcon( USHORT nId ) +void IconChoiceDialog::FocusOnIcon( sal_uInt16 nId ) { // set focus to icon for the current visible page - for ( USHORT i=0; i<maIconCtrl.GetEntryCount(); i++) + for ( sal_uInt16 i=0; i<maIconCtrl.GetEntryCount(); i++) { SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.GetEntry ( i ); - USHORT* pUserData = (USHORT*) pEntry->GetUserData(); + sal_uInt16* pUserData = (sal_uInt16*) pEntry->GetUserData(); if ( pUserData && *pUserData == nId ) { diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 741c48914..7c2013981 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -96,9 +96,9 @@ static String impl_getSvtResString( sal_uInt32 nId ) return aRet; } -BOOL InsertObjectDialog_Impl::IsCreateNew() const +sal_Bool InsertObjectDialog_Impl::IsCreateNew() const { - return FALSE; + return sal_False; } uno::Reference< io::XInputStream > InsertObjectDialog_Impl::GetIconIfIconified( ::rtl::OUString* /*pGraphicMediaType*/ ) @@ -224,7 +224,7 @@ SvInsertOleDlg::SvInsertOleDlg Link aLink( LINK( this, SvInsertOleDlg, RadioHdl ) ); aRbNewObject.SetClickHdl( aLink ); aRbObjectFromfile.SetClickHdl( aLink ); - aRbNewObject.Check( TRUE ); + aRbNewObject.Check( sal_True ); RadioHdl( NULL ); } @@ -241,10 +241,10 @@ short SvInsertOleDlg::Execute() // fill listbox and select default ListBox& rBox = GetObjectTypes(); - rBox.SetUpdateMode( FALSE ); - for ( ULONG i = 0; i < m_pServers->Count(); i++ ) + rBox.SetUpdateMode( sal_False ); + for ( sal_uLong i = 0; i < m_pServers->Count(); i++ ) rBox.InsertEntry( (*m_pServers)[i].GetHumanName() ); - rBox.SetUpdateMode( TRUE ); + rBox.SetUpdateMode( sal_True ); SelectDefault(); ::rtl::OUString aName; @@ -252,8 +252,8 @@ short SvInsertOleDlg::Execute() if ( m_xStorage.is() && ( nRet = Dialog::Execute() ) == RET_OK ) { String aFileName; - BOOL bLink = FALSE; - BOOL bCreateNew = IsCreateNew(); + sal_Bool bLink = sal_False; + sal_Bool bCreateNew = IsCreateNew(); if ( bCreateNew ) { // create and insert new embedded object @@ -472,7 +472,7 @@ SvInsertPlugInDialog::~SvInsertPlugInDialog() static void Plugin_ImplFillCommandSequence( const String& aCommands, uno::Sequence< beans::PropertyValue >& aCommandSequence ) { - USHORT nEaten; + sal_uInt16 nEaten; SvCommandList aLst; aLst.AppendCommands( aCommands, &nEaten ); @@ -642,7 +642,7 @@ short SvInsertAppletDialog::Execute() m_aClass.Erase(); m_aCommands.Erase(); - BOOL bOK = FALSE; + sal_Bool bOK = sal_False; uno::Reference < beans::XPropertySet > xSet; if ( m_xObj.is() ) { @@ -669,7 +669,7 @@ short SvInsertAppletDialog::Execute() String aText( CUI_RES( STR_EDIT_APPLET ) ); SetText( aText ); - bOK = TRUE; + bOK = sal_True; } catch ( uno::Exception& ) { @@ -698,7 +698,7 @@ short SvInsertAppletDialog::Execute() { try { - BOOL bIPActive = m_xObj->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE; + sal_Bool bIPActive = m_xObj->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE; if ( bIPActive ) m_xObj->changeState( embed::EmbedStates::RUNNING ); @@ -825,7 +825,7 @@ SfxInsertFloatingFrameDialog::SfxInsertFloatingFrameDialog( Window *pParent, con short SfxInsertFloatingFrameDialog::Execute() { short nRet = RET_OK; - BOOL bOK = FALSE; + sal_Bool bOK = sal_False; uno::Reference < beans::XPropertySet > xSet; if ( m_xObj.is() ) { @@ -848,10 +848,10 @@ short SfxInsertFloatingFrameDialog::Execute() if ( nSize == SIZE_NOT_SET ) { - aCBMarginWidthDefault.Check( TRUE ); + aCBMarginWidthDefault.Check( sal_True ); aNMMarginWidth.SetText( String::CreateFromInt32( DEFAULT_MARGIN_WIDTH ) ); - aFTMarginWidth.Enable( FALSE ); - aNMMarginWidth.Enable( FALSE ); + aFTMarginWidth.Enable( sal_False ); + aNMMarginWidth.Enable( sal_False ); } else aNMMarginWidth.SetText( String::CreateFromInt32( nSize ) ); @@ -861,17 +861,17 @@ short SfxInsertFloatingFrameDialog::Execute() if ( nSize == SIZE_NOT_SET ) { - aCBMarginHeightDefault.Check( TRUE ); + aCBMarginHeightDefault.Check( sal_True ); aNMMarginHeight.SetText( String::CreateFromInt32( DEFAULT_MARGIN_HEIGHT ) ); - aFTMarginHeight.Enable( FALSE ); - aNMMarginHeight.Enable( FALSE ); + aFTMarginHeight.Enable( sal_False ); + aNMMarginHeight.Enable( sal_False ); } else aNMMarginHeight.SetText( String::CreateFromInt32( nSize ) ); - BOOL bScrollOn = FALSE; - BOOL bScrollOff = FALSE; - BOOL bScrollAuto = FALSE; + sal_Bool bScrollOn = sal_False; + sal_Bool bScrollOff = sal_False; + sal_Bool bScrollAuto = sal_False; sal_Bool bSet = sal_False; aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoScroll") ); @@ -884,7 +884,7 @@ short SfxInsertFloatingFrameDialog::Execute() bScrollOff = !bSet; } else - bScrollAuto = TRUE; + bScrollAuto = sal_True; aRBScrollingOn.Check( bScrollOn ); aRBScrollingOff.Check( bScrollOff ); @@ -901,8 +901,8 @@ short SfxInsertFloatingFrameDialog::Execute() aRBFrameBorderOff.Check( !bSet ); } - SetUpdateMode( TRUE ); - bOK = TRUE; + SetUpdateMode( sal_True ); + bOK = sal_True; } catch ( uno::Exception& ) { @@ -942,7 +942,7 @@ short SfxInsertFloatingFrameDialog::Execute() { try { - BOOL bIPActive = m_xObj->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE; + sal_Bool bIPActive = m_xObj->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE; if ( bIPActive ) m_xObj->changeState( embed::EmbedStates::RUNNING ); diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 965aefe35..7d0a20c6b 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -74,7 +74,7 @@ static long nTabs[] = }; -SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, BOOL bHtml ) +SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, sal_Bool bHtml ) : ModalDialog( pParent, CUI_RES( MD_UPDATE_BASELINKS ) ), aFtFiles( this, CUI_RES( FT_FILES ) ), aFtLinks( this, CUI_RES( FT_LINKS ) ), @@ -148,8 +148,8 @@ SvBaseLinksDlg::~SvBaseLinksDlg() *************************************************************************/ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) { - USHORT nSelectionCount = pSvTabListBox ? - (USHORT)pSvTabListBox->GetSelectionCount() : 0; + sal_uInt16 nSelectionCount = pSvTabListBox ? + (sal_uInt16)pSvTabListBox->GetSelectionCount() : 0; if(nSelectionCount > 1) { //bei Mehrfachselektion ggf. alte Eintraege deselektieren @@ -157,16 +157,16 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) SvBaseLink* pLink = 0; pEntry = pSvTabListBox->GetHdlEntry(); pLink = (SvBaseLink*)pEntry->GetUserData(); - USHORT nObjectType = pLink->GetObjType(); + sal_uInt16 nObjectType = pLink->GetObjType(); if((OBJECT_CLIENT_FILE & nObjectType) != OBJECT_CLIENT_FILE) { - pSvTabListBox->SelectAll(FALSE); + pSvTabListBox->SelectAll(sal_False); pSvTabListBox->Select(pEntry); nSelectionCount = 1; } else { - for( USHORT i = 0; i < nSelectionCount; i++) + for( sal_uInt16 i = 0; i < nSelectionCount; i++) { pEntry = i == 0 ? pSvTabListBox->FirstSelected() : pSvTabListBox->NextSelected(pEntry); @@ -174,7 +174,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) pLink = (SvBaseLink*)pEntry->GetUserData(); DBG_ASSERT(pLink, "Wo ist der Link?"); if( (OBJECT_CLIENT_FILE & pLink->GetObjType()) != OBJECT_CLIENT_FILE ) - pSvTabListBox->Select( pEntry, FALSE ); + pSvTabListBox->Select( pEntry, sal_False ); } } @@ -187,7 +187,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) } else { - USHORT nPos; + sal_uInt16 nPos; SvBaseLink* pLink = GetSelEntry( &nPos ); if( !pLink ) return 0; @@ -239,7 +239,7 @@ IMPL_LINK_INLINE_START( SvBaseLinksDlg, AutomaticClickHdl, RadioButton *, pRadio { (void)pRadioButton; - USHORT nPos; + sal_uInt16 nPos; SvBaseLink* pLink = GetSelEntry( &nPos ); if( pLink && !( FILEOBJECT & pLink->GetObjType() ) && LINKUPDATE_ALWAYS != pLink->GetUpdateMode() ) @@ -252,7 +252,7 @@ IMPL_LINK_INLINE_START( SvBaseLinksDlg, ManualClickHdl, RadioButton *, pRadioBut { (void)pRadioButton; - USHORT nPos; + sal_uInt16 nPos; SvBaseLink* pLink = GetSelEntry( &nPos ); if( pLink && !( FILEOBJECT & pLink->GetObjType() ) && LINKUPDATE_ONCALL != pLink->GetUpdateMode()) @@ -264,17 +264,17 @@ IMPL_LINK_INLINE_END( SvBaseLinksDlg, ManualClickHdl, RadioButton *, pRadioButto IMPL_LINK( SvBaseLinksDlg, UpdateNowClickHdl, PushButton *, EMPTYARG ) { SvTabListBox& rListBox = Links(); - USHORT nSelCnt = (USHORT)rListBox.GetSelectionCount(); + sal_uInt16 nSelCnt = (sal_uInt16)rListBox.GetSelectionCount(); if( 255 < nSelCnt ) nSelCnt = 255; std::vector< SvBaseLink* > aLnkArr; - std::vector< USHORT > aPosArr; + std::vector< sal_uInt16 > aPosArr; SvLBoxEntry* pE = rListBox.FirstSelected(); while( pE ) { - USHORT nFndPos = (USHORT)rListBox.GetModel()->GetAbsPos( pE ); + sal_uInt16 nFndPos = (sal_uInt16)rListBox.GetModel()->GetAbsPos( pE ); if( LISTBOX_ENTRY_NOTFOUND != nFndPos ) { aLnkArr.push_back( static_cast< SvBaseLink* >( pE->GetUserData() ) ); @@ -285,17 +285,17 @@ IMPL_LINK( SvBaseLinksDlg, UpdateNowClickHdl, PushButton *, EMPTYARG ) if( !aLnkArr.empty() ) { - for( USHORT n = 0; n < aLnkArr.size(); ++n ) + for( sal_uInt16 n = 0; n < aLnkArr.size(); ++n ) { SvBaseLinkRef xLink = aLnkArr[ n ]; // suche erstmal im Array nach dem Eintrag - for( USHORT i = 0; i < pLinkMgr->GetLinks().Count(); ++i ) + for( sal_uInt16 i = 0; i < pLinkMgr->GetLinks().Count(); ++i ) if( &xLink == *pLinkMgr->GetLinks()[ i ] ) { - xLink->SetUseCache( FALSE ); + xLink->SetUseCache( sal_False ); SetType( *xLink, aPosArr[ n ], xLink->GetUpdateMode() ); - xLink->SetUseCache( TRUE ); + xLink->SetUseCache( sal_True ); break; } } @@ -326,7 +326,7 @@ IMPL_LINK( SvBaseLinksDlg, UpdateNowClickHdl, PushButton *, EMPTYARG ) { SvLBoxEntry* pSelEntry = rListBox.FirstSelected(); if( pE != pSelEntry ) - rListBox.Select( pSelEntry, FALSE ); + rListBox.Select( pSelEntry, sal_False ); rListBox.Select( pE ); rListBox.MakeVisible( pE ); } @@ -347,7 +347,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) { (void)pPushButton; - USHORT nSelectionCount = (USHORT)Links().GetSelectionCount(); + sal_uInt16 nSelectionCount = (sal_uInt16)Links().GetSelectionCount(); if(nSelectionCount > 1) { PathDialog aPathDlg( this ); @@ -368,7 +368,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) { String aPath = aPathDlg.GetPath(); - for( USHORT i = 0; i < nSelectionCount; i++) + for( sal_uInt16 i = 0; i < nSelectionCount; i++) { pEntry = i==0 ? Links().FirstSelected() : @@ -395,7 +395,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) } else { - USHORT nPos; + sal_uInt16 nPos; SvBaseLink* pLink = GetSelEntry( &nPos ); if ( pLink && (pLink->GetLinkSourceName().Len() != 0) ) pLink->Edit( this, LINK( this, SvBaseLinksDlg, EndEditHdl ) ); @@ -407,10 +407,10 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) { (void)pPushButton; - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if(Links().GetSelectionCount() <= 1) { - USHORT nPos; + sal_uInt16 nPos; SvBaseLinkRef xLink = GetSelEntry( &nPos ); if( !xLink.Is() ) return 0; @@ -422,7 +422,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) Links().GetModel()->Remove( Links().GetEntry( nPos ) ); // falls Object noch vorhanden, dann das schliessen - BOOL bNewLnkMgr = OBJECT_CLIENT_FILE == xLink->GetObjType(); + sal_Bool bNewLnkMgr = OBJECT_CLIENT_FILE == xLink->GetObjType(); // dem Link sagen, das er aufgeloest wird! xLink->Closed(); @@ -441,7 +441,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) if( pEntry ) Links().SetCurEntry( pEntry ); } - bModified = TRUE; + bModified = sal_True; } } else @@ -461,7 +461,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) pEntry = Links().NextSelected(pEntry); } Links().RemoveSelection(); - for( ULONG i = 0; i < aLinkList.Count(); i++ ) + for( sal_uLong i = 0; i < aLinkList.Count(); i++ ) { SvBaseLinkRef xLink = aLinkList.GetObject( i ); // dem Link sagen, das er aufgeloest wird! @@ -469,7 +469,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) // falls einer vergessen hat sich auszutragen pLinkMgr->Remove( &xLink ); - bModified = TRUE; + bModified = sal_True; } //Danach alle selektierten Eintraege entfernen } @@ -502,8 +502,8 @@ IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer ) // for( SvLBoxEntry* pBox = Links().First(); pBox; // pBox = Links().Next( pBox )) - Links().SetUpdateMode(FALSE); - for( ULONG nPos = Links().GetEntryCount(); nPos; ) + Links().SetUpdateMode(sal_False); + for( sal_uLong nPos = Links().GetEntryCount(); nPos; ) { SvLBoxEntry* pBox = Links().GetEntry( --nPos ); SvBaseLinkRef xLink( (SvBaseLink*)pBox->GetUserData() ); @@ -515,13 +515,13 @@ IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer ) Links().SetEntryText( sCur, pBox, 3 ); } } - Links().SetUpdateMode(TRUE); + Links().SetUpdateMode(sal_True); return 0; } IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) { - USHORT nPos; + sal_uInt16 nPos; GetSelEntry( &nPos ); if( _pLink && _pLink->WasLastEditOK() ) @@ -531,23 +531,23 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) // also suche den Link im Manager, wenn der nicht mehr existiert, // dann setze fuelle die Liste komplett neu. Ansonsten braucht // nur der editierte Linkt aktualisiert werden. - BOOL bLinkFnd = FALSE; - for( USHORT n = pLinkMgr->GetLinks().Count(); n; ) + sal_Bool bLinkFnd = sal_False; + for( sal_uInt16 n = pLinkMgr->GetLinks().Count(); n; ) if( _pLink == &(*pLinkMgr->GetLinks()[ --n ]) ) { - bLinkFnd = TRUE; + bLinkFnd = sal_True; break; } if( bLinkFnd ) { - Links().SetUpdateMode(FALSE); + Links().SetUpdateMode(sal_False); Links().GetModel()->Remove( Links().GetEntry( nPos ) ); SvLBoxEntry* pToUnselect = Links().FirstSelected(); InsertEntry( *_pLink, nPos, sal_True ); if(pToUnselect) - Links().Select(pToUnselect, FALSE); - Links().SetUpdateMode(TRUE); + Links().Select(pToUnselect, sal_False); + Links().SetUpdateMode(sal_True); } else { @@ -586,7 +586,7 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr ) if( pNewMgr ) // Update muss vor Clear gestoppt werden - Links().SetUpdateMode( FALSE ); + Links().SetUpdateMode( sal_False ); Links().Clear(); pLinkMgr = pNewMgr; @@ -594,7 +594,7 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr ) if( pLinkMgr ) { SvBaseLinks& rLnks = (SvBaseLinks&)pLinkMgr->GetLinks(); - for( USHORT n = 0; n < rLnks.Count(); ++n ) + for( sal_uInt16 n = 0; n < rLnks.Count(); ++n ) { SvBaseLinkRef* pLinkRef = rLnks[ n ]; if( !pLinkRef->Is() ) @@ -614,13 +614,13 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr ) Links().Select( pEntry ); LinksSelectHdl( 0 ); } - Links().SetUpdateMode( TRUE ); + Links().SetUpdateMode( sal_True ); Links().Invalidate(); } } -void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, USHORT nPos, sal_Bool bSelect ) +void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uInt16 nPos, sal_Bool bSelect ) { String aEntry, sFileNm, sLinkNm, sTypeNm, sFilter; @@ -658,12 +658,12 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, USHORT nPos, sal_Bool Links().Select(pE); } -SvBaseLink* SvBaseLinksDlg::GetSelEntry( USHORT* pPos ) +SvBaseLink* SvBaseLinksDlg::GetSelEntry( sal_uInt16* pPos ) { SvLBoxEntry* pE = Links().FirstSelected(); - USHORT nPos; + sal_uInt16 nPos; if( pE && LISTBOX_ENTRY_NOTFOUND != - ( nPos = (USHORT)Links().GetModel()->GetAbsPos( pE ) ) ) + ( nPos = (sal_uInt16)Links().GetModel()->GetAbsPos( pE ) ) ) { DBG_ASSERT( pE, "wo kommt der leere Eintrag her?" ); @@ -675,8 +675,8 @@ SvBaseLink* SvBaseLinksDlg::GetSelEntry( USHORT* pPos ) } void SvBaseLinksDlg::SetType( SvBaseLink& rLink, - USHORT nSelPos, - USHORT nType ) + sal_uInt16 nSelPos, + sal_uInt16 nType ) { rLink.SetUpdateMode( nType ); rLink.Update(); @@ -691,8 +691,8 @@ void SvBaseLinksDlg::SetActLink( SvBaseLink * pLink ) if( pLinkMgr ) { const SvBaseLinks& rLnks = pLinkMgr->GetLinks(); - USHORT nSelect = 0; - for( USHORT n = 0; n < rLnks.Count(); ++n ) + sal_uInt16 nSelect = 0; + for( sal_uInt16 n = 0; n < rLnks.Count(); ++n ) { SvBaseLinkRef* pLinkRef = rLnks[ n ]; // #109573# only visible links have been inserted into the TreeListBox, diff --git a/cui/source/dialogs/multifil.cxx b/cui/source/dialogs/multifil.cxx index 7f10f1b5e..9e4465140 100644 --- a/cui/source/dialogs/multifil.cxx +++ b/cui/source/dialogs/multifil.cxx @@ -76,13 +76,13 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) OSL_ENSURE( xID.is(), "AddHdl_Impl: invalid ID interface!" ); // ensure the content of files are valid - USHORT nCount = aPathLB.GetEntryCount(); - BOOL bDuplicated = FALSE; + sal_uInt16 nCount = aPathLB.GetEntryCount(); + sal_Bool bDuplicated = sal_False; try { if( nCount > 0 ) // start comparison { - USHORT i; + sal_uInt16 i; ::ucbhelper::Content & VContent = aContent; // temporary Content reference Reference< XContent > xVContent; Reference< XContentIdentifier > xVID; @@ -113,7 +113,7 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) { if ( 0 == xProvider->compareContentIds( xID, xVID ) ) { - bDuplicated = TRUE; + bDuplicated = sal_True; break; } } @@ -134,7 +134,7 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) } else { - USHORT nPos = aPathLB.InsertEntry( sInsFile, LISTBOX_APPEND ); + sal_uInt16 nPos = aPathLB.InsertEntry( sInsFile, LISTBOX_APPEND ); aPathLB.SetEntryData( nPos, (void*) new String( sInsFile ) ); } @@ -146,9 +146,9 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) IMPL_LINK( SvxMultiFileDialog, DelHdl_Impl, PushButton *, EMPTYARG ) { - USHORT nPos = aPathLB.GetSelectEntryPos(); + sal_uInt16 nPos = aPathLB.GetSelectEntryPos(); aPathLB.RemoveEntry( nPos ); - USHORT nCnt = aPathLB.GetEntryCount(); + sal_uInt16 nCnt = aPathLB.GetEntryCount(); if ( nCnt ) { @@ -163,7 +163,7 @@ IMPL_LINK( SvxMultiFileDialog, DelHdl_Impl, PushButton *, EMPTYARG ) // ----------------------------------------------------------------------- -SvxMultiFileDialog::SvxMultiFileDialog( Window* pParent, BOOL bEmptyAllowed ) : +SvxMultiFileDialog::SvxMultiFileDialog( Window* pParent, sal_Bool bEmptyAllowed ) : SvxMultiPathDialog( pParent, bEmptyAllowed ) diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 61209b81e..05194d5d4 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -55,23 +55,23 @@ using namespace ::com::sun::star::uno; struct MultiPath_Impl { - BOOL bEmptyAllowed; - BOOL bIsClassPathMode; + sal_Bool bEmptyAllowed; + sal_Bool bIsClassPathMode; bool bIsRadioButtonMode; - MultiPath_Impl( BOOL bAllowed ) : - bEmptyAllowed( bAllowed ), bIsClassPathMode( FALSE ), bIsRadioButtonMode( false ) {} + MultiPath_Impl( sal_Bool bAllowed ) : + bEmptyAllowed( bAllowed ), bIsClassPathMode( sal_False ), bIsRadioButtonMode( false ) {} }; // class SvxMultiPathDialog ---------------------------------------------- IMPL_LINK( SvxMultiPathDialog, SelectHdl_Impl, void *, EMPTYARG ) { - ULONG nCount = pImpl->bIsRadioButtonMode ? aRadioLB.GetEntryCount() : aPathLB.GetEntryCount(); + sal_uLong nCount = pImpl->bIsRadioButtonMode ? aRadioLB.GetEntryCount() : aPathLB.GetEntryCount(); bool bIsSelected = pImpl->bIsRadioButtonMode ? aRadioLB.FirstSelected() != NULL : aPathLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND; - BOOL bEnable = ( pImpl->bEmptyAllowed || nCount > 1 ); + sal_Bool bEnable = ( pImpl->bEmptyAllowed || nCount > 1 ); aDelBtn.Enable( bEnable && bIsSelected ); return 0; } @@ -105,7 +105,7 @@ IMPL_LINK( SvxMultiPathDialog, AddHdl_Impl, PushButton *, EMPTYARG ) if ( pImpl->bIsRadioButtonMode ) { - ULONG nPos = aRadioLB.GetEntryPos( sInsPath, 1 ); + sal_uLong nPos = aRadioLB.GetEntryPos( sInsPath, 1 ); if ( 0xffffffff == nPos ) //See svtools/source/contnr/svtabbx.cxx SvTabListBox::GetEntryPos { String sNewEntry( '\t' ); @@ -131,7 +131,7 @@ IMPL_LINK( SvxMultiPathDialog, AddHdl_Impl, PushButton *, EMPTYARG ) } else { - USHORT nPos = aPathLB.InsertEntry( sInsPath, LISTBOX_APPEND ); + sal_uInt16 nPos = aPathLB.InsertEntry( sInsPath, LISTBOX_APPEND ); aPathLB.SetEntryData( nPos, (void*)new String( aURL ) ); } } @@ -149,9 +149,9 @@ IMPL_LINK( SvxMultiPathDialog, DelHdl_Impl, PushButton *, EMPTYARG ) SvLBoxEntry* pEntry = aRadioLB.FirstSelected(); delete (String*)pEntry->GetUserData(); bool bChecked = aRadioLB.GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED; - ULONG nPos = aRadioLB.GetEntryPos( pEntry ); + sal_uLong nPos = aRadioLB.GetEntryPos( pEntry ); aRadioLB.RemoveEntry( pEntry ); - ULONG nCnt = aRadioLB.GetEntryCount(); + sal_uLong nCnt = aRadioLB.GetEntryCount(); if ( nCnt ) { nCnt--; @@ -169,9 +169,9 @@ IMPL_LINK( SvxMultiPathDialog, DelHdl_Impl, PushButton *, EMPTYARG ) } else { - USHORT nPos = aPathLB.GetSelectEntryPos(); + sal_uInt16 nPos = aPathLB.GetSelectEntryPos(); aPathLB.RemoveEntry( nPos ); - USHORT nCnt = aPathLB.GetEntryCount(); + sal_uInt16 nCnt = aPathLB.GetEntryCount(); if ( nCnt ) { @@ -188,7 +188,7 @@ IMPL_LINK( SvxMultiPathDialog, DelHdl_Impl, PushButton *, EMPTYARG ) // ----------------------------------------------------------------------- -SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, BOOL bEmptyAllowed ) : +SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed ) : ModalDialog( pParent, CUI_RES( RID_SVXDLG_MULTIPATH ) ), @@ -226,10 +226,10 @@ SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, BOOL bEmptyAllowed ) : SvxMultiPathDialog::~SvxMultiPathDialog() { - USHORT nPos = aPathLB.GetEntryCount(); + sal_uInt16 nPos = aPathLB.GetEntryCount(); while ( nPos-- ) delete (String*)aPathLB.GetEntryData(nPos); - nPos = (USHORT)aRadioLB.GetEntryCount(); + nPos = (sal_uInt16)aRadioLB.GetEntryCount(); while ( nPos-- ) { SvLBoxEntry* pEntry = aRadioLB.GetEntry( nPos ); @@ -248,7 +248,7 @@ String SvxMultiPathDialog::GetPath() const if ( pImpl->bIsRadioButtonMode ) { String sWritable; - for ( USHORT i = 0; i < aRadioLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aRadioLB.GetEntryCount(); ++i ) { SvLBoxEntry* pEntry = aRadioLB.GetEntry(i); if ( aRadioLB.GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) @@ -266,7 +266,7 @@ String SvxMultiPathDialog::GetPath() const } else { - for ( USHORT i = 0; i < aPathLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aPathLB.GetEntryCount(); ++i ) { if ( sNewPath.Len() > 0 ) sNewPath += cDelim; @@ -281,9 +281,9 @@ String SvxMultiPathDialog::GetPath() const void SvxMultiPathDialog::SetPath( const String& rPath ) { sal_Unicode cDelim = pImpl->bIsClassPathMode ? CLASSPATH_DELIMITER : SVT_SEARCHPATH_DELIMITER; - USHORT nPos, nCount = rPath.GetTokenCount( cDelim ); + sal_uInt16 nPos, nCount = rPath.GetTokenCount( cDelim ); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { String sPath = rPath.GetToken( i, cDelim ); String sSystemPath; @@ -325,7 +325,7 @@ void SvxMultiPathDialog::SetPath( const String& rPath ) void SvxMultiPathDialog::SetClassPathMode() { - pImpl->bIsClassPathMode = TRUE; + pImpl->bIsClassPathMode = sal_True; SetText( CUI_RES( RID_SVXSTR_ARCHIVE_TITLE )); aPathFL.SetText( CUI_RES( RID_SVXSTR_ARCHIVE_HEADLINE ) ); } diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index c5a371f97..27e902936 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -194,7 +194,7 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( m_aOk.SetClickHdl( LINK( this, PasswordToOpenModifyDialog_Impl, OkBtnClickHdl ) ); -// m_aOk.Enable( FALSE ); +// m_aOk.Enable( sal_False ); if (nMaxPasswdLen) { @@ -212,7 +212,7 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( m_aMoreFewerOptionsBTN.Enable( bIsPasswordToModify ); if (!bIsPasswordToModify) - m_aMoreFewerOptionsBTN.Hide( TRUE ); + m_aMoreFewerOptionsBTN.Hide( sal_True ); } diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index cbfe0ac65..203d9f1b3 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -106,8 +106,8 @@ IMPL_LINK_INLINE_END( SvPasteObjectDialog, DoubleClickHdl, ListBox *, pListBox ) void SvPasteObjectDialog::SetDefault() { - bLink = FALSE; - nAspect = (USHORT)::com::sun::star::embed::Aspects::MSOLE_CONTENT; + bLink = sal_False; + nAspect = (sal_uInt16)::com::sun::star::embed::Aspects::MSOLE_CONTENT; } SvPasteObjectDialog::~SvPasteObjectDialog() @@ -134,7 +134,7 @@ void SvPasteObjectDialog::Insert( SotFormatStringId nFormat, const String& rForm delete pStr; } -ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, +sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, const DataFlavorExVector* pFormats, const TransferableObjectDescriptor* ) { @@ -148,10 +148,10 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, //Dialogbox erzeugen und fuellen String aSourceName, aTypeName; - ULONG nSelFormat = 0; + sal_uLong nSelFormat = 0; SvGlobalName aEmptyNm; - ObjectLB().SetUpdateMode( FALSE ); + ObjectLB().SetUpdateMode( sal_False ); DataFlavorExVector::iterator aIter( ((DataFlavorExVector&)*pFormats).begin() ), aEnd( ((DataFlavorExVector&)*pFormats).end() ); @@ -168,7 +168,7 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, if( !pName && ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE_OLE || nFormat == SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ) ) { - BOOL IsClipboardObject_Impl( SotDataObject * ); + sal_Bool IsClipboardObject_Impl( SotDataObject * ); if( IsClipboardObject_Impl( pDataObj ) ) { IDataObject * pDO = NULL; @@ -188,7 +188,7 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, LPOBJECTDESCRIPTOR pOD=(LPOBJECTDESCRIPTOR)GlobalLock(stm.hGlobal); if( pOD->dwFullUserTypeName ) { - OLECHAR * pN = (OLECHAR *)(((BYTE *)pOD) + pOD->dwFullUserTypeName); + OLECHAR * pN = (OLECHAR *)(((sal_uInt8 *)pOD) + pOD->dwFullUserTypeName); aName.Append( pN ); pName = &aName; // set format to ole object @@ -196,7 +196,7 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, } if( pOD->dwSrcOfCopy ) { - OLECHAR * pN = (OLECHAR *)(((BYTE *)pOD) + pOD->dwSrcOfCopy); + OLECHAR * pN = (OLECHAR *)(((sal_uInt8 *)pOD) + pOD->dwSrcOfCopy); aSourceName.Append( *pN++ ); } else @@ -270,7 +270,7 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, } } - ObjectLB().SetUpdateMode( TRUE ); + ObjectLB().SetUpdateMode( sal_True ); SelectObject(); if( aSourceName.Len() ) @@ -291,9 +291,9 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, bLink = PasteLink().IsChecked(); if( AsIconBox().IsChecked() ) - nAspect = (USHORT)com::sun::star::embed::Aspects::MSOLE_ICON; + nAspect = (sal_uInt16)com::sun::star::embed::Aspects::MSOLE_ICON; - nSelFormat = (ULONG)ObjectLB().GetEntryData( ObjectLB().GetSelectEntryPos() ); + nSelFormat = (sal_uLong)ObjectLB().GetEntryData( ObjectLB().GetSelectEntryPos() ); } return nSelFormat; diff --git a/cui/source/dialogs/plfilter.cxx b/cui/source/dialogs/plfilter.cxx index 0be1ba2f1..eab43a6e8 100644 --- a/cui/source/dialogs/plfilter.cxx +++ b/cui/source/dialogs/plfilter.cxx @@ -71,14 +71,14 @@ void fillNetscapePluginFilters( Sequence< rtl::OUString >& rPluginNames, Sequenc Sequence<PluginDescription > aDescriptions( xPMgr->getPluginDescriptions() ); const PluginDescription * pDescriptions = aDescriptions.getConstArray(); - for ( UINT32 nPos = aDescriptions.getLength(); nPos--; ) + for ( sal_uInt32 nPos = aDescriptions.getLength(); nPos--; ) { const PluginDescription & rDescr = pDescriptions[nPos]; StrSet& rTypes = aMap[ rDescr.Description ]; String aExtension( rDescr.Extension ); - for ( USHORT nCnt = aExtension.GetTokenCount( ';' ); nCnt--; ) + for ( sal_uInt16 nCnt = aExtension.GetTokenCount( ';' ); nCnt--; ) { // no default plugins anymore String aExt( aExtension.GetToken( nCnt, ';' ) ); @@ -121,6 +121,6 @@ void fillNetscapePluginFilters( Sequence< rtl::OUString >& rPluginNames, Sequenc } else ShowServiceNotAvailableError( NULL, - String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.plugin.PluginManager" ) ), TRUE ); + String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.plugin.PluginManager" ) ), sal_True ); } diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index 758addd34..f9448c103 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -54,7 +54,7 @@ // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_TEXT, @@ -65,8 +65,8 @@ static USHORT pRanges[] = SvxPostItDialog::SvxPostItDialog( Window* pParent, const SfxItemSet& rCoreSet, - BOOL bPrevNext, - BOOL bRedline ) : + sal_Bool bPrevNext, + sal_Bool bRedline ) : SfxModalDialog( pParent, CUI_RES( RID_SVXDLG_POSTIT ) ), @@ -104,8 +104,8 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, aFont.SetWeight( WEIGHT_LIGHT ); aEditED.SetFont( aFont ); - BOOL bNew = TRUE; - USHORT nWhich = 0; + sal_Bool bNew = sal_True; + sal_uInt16 nWhich = 0; if ( !bPrevNext ) { @@ -116,9 +116,9 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ); String aAuthorStr, aDateStr, aTextStr; - if ( rSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { - bNew = FALSE; + bNew = sal_False; const SvxPostItAuthorItem& rAuthor = (const SvxPostItAuthorItem&)rSet.Get( nWhich ); aAuthorStr = rAuthor.GetValue(); @@ -128,7 +128,7 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE ); - if ( rSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { const SvxPostItDateItem& rDate = (const SvxPostItDateItem&)rSet.Get( nWhich ); @@ -142,7 +142,7 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ); - if ( rSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { const SvxPostItTextItem& rText = (const SvxPostItTextItem&)rSet.Get( nWhich ); @@ -181,14 +181,14 @@ void SvxPostItDialog::ShowLastAuthor(const String& rAuthor, const String& rDate) // ----------------------------------------------------------------------- -USHORT* SvxPostItDialog::GetRanges() +sal_uInt16* SvxPostItDialog::GetRanges() { return pRanges; } // ----------------------------------------------------------------------- -void SvxPostItDialog::EnableTravel(BOOL bNext, BOOL bPrev) +void SvxPostItDialog::EnableTravel(sal_Bool bNext, sal_Bool bPrev) { aPrevBtn.Enable(bPrev); aNextBtn.Enable(bNext); @@ -230,7 +230,7 @@ IMPL_LINK( SvxPostItDialog, Stamp, Button *, EMPTYARG ) } aStr += aLocaleWrapper.getDate(aDate); aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) ); - aStr += aLocaleWrapper.getTime(aTime, FALSE, FALSE); + aStr += aLocaleWrapper.getTime(aTime, sal_False, sal_False); aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ----\n" ) ); diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 0febc175a..db0b46196 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -166,7 +166,7 @@ void SFTreeListBox::deleteAllTree() void SFTreeListBox::Init( const ::rtl::OUString& language ) { - SetUpdateMode( FALSE ); + SetUpdateMode( sal_False ); deleteAllTree(); @@ -271,7 +271,7 @@ void SFTreeListBox::Init( const ::rtl::OUString& language ) 0, true, std::auto_ptr< SFEntry >(new SFEntry( OBJTYPE_SFROOT, langEntries, xDocumentModel )), factoryURL ); } - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); } Reference< XInterface > @@ -369,7 +369,7 @@ void SFTreeListBox:: RequestSubEntries( SvLBoxEntry* pRootEntry, Reference< ::co long SFTreeListBox::ExpandingHdl() { - return TRUE; + return sal_True; } void SFTreeListBox::ExpandAllTrees() @@ -377,7 +377,7 @@ void SFTreeListBox::ExpandAllTrees() } SvLBoxEntry * SFTreeListBox::insertEntry( - String const & rText, USHORT nBitmap, SvLBoxEntry * pParent, + String const & rText, sal_uInt16 nBitmap, SvLBoxEntry * pParent, bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData, ::rtl::OUString factoryURL ) { SvLBoxEntry * p; @@ -403,7 +403,7 @@ SvLBoxEntry * SFTreeListBox::insertEntry( } SvLBoxEntry * SFTreeListBox::insertEntry( - String const & rText, USHORT nBitmap, SvLBoxEntry * pParent, + String const & rText, sal_uInt16 nBitmap, SvLBoxEntry * pParent, bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData ) { Image aHCImage, aImage; @@ -474,7 +474,7 @@ void __EXPORT SFTreeListBox::ExpandedHdl() // ---------------------------------------------------------------------------- // InputDialog ------------------------------------------------------------ // ---------------------------------------------------------------------------- -InputDialog::InputDialog(Window * pParent, USHORT nMode ) +InputDialog::InputDialog(Window * pParent, sal_uInt16 nMode ) : ModalDialog( pParent, CUI_RES( RID_DLG_NEWLIB ) ), aText( this, CUI_RES( FT_NEWLIB ) ), aEdit( this, CUI_RES( ED_LIBNAME ) ), @@ -503,7 +503,7 @@ InputDialog::InputDialog(Window * pParent, USHORT nMode ) Size siz, newSiz; long gap; - USHORT style = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | + sal_uInt16 style = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT | TEXT_DRAW_WORDBREAK; // get dimensions of dialog instructions control @@ -919,7 +919,7 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) { ::rtl::OUString aNewName; ::rtl::OUString aNewStdName; - USHORT nMode = INPUTMODE_NEWLIB; + sal_uInt16 nMode = INPUTMODE_NEWLIB; if( aScriptsBox.GetModel()->GetDepth( pEntry ) == 0 ) { aNewStdName = ::rtl::OUString::createFromAscii( "Library" ) ; @@ -931,8 +931,8 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) } //do we need L10N for this? ie somethng like: //String aNewStdName( ResId( STR_STDMODULENAME ) ); - BOOL bValid = FALSE; - USHORT i = 1; + sal_Bool bValid = sal_False; + sal_uInt16 i = 1; Sequence< Reference< browse::XBrowseNode > > childNodes; // no children => ok to create Parcel1 or Script1 without checking @@ -942,7 +942,7 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) { aNewName = aNewStdName; aNewName += String::CreateFromInt32( i ); - bValid = TRUE; + bValid = sal_True; } else { @@ -959,7 +959,7 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) { aNewName = aNewStdName; aNewName += String::CreateFromInt32( i ); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if(childNodes.getLength() > 0 ) { ::rtl::OUString nodeName = childNodes[0]->getName(); @@ -971,7 +971,7 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) { if ( (aNewName+extn).equals( childNodes[index]->getName() ) ) { - bFound = TRUE; + bFound = sal_True; break; } } @@ -981,7 +981,7 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) } else { - bValid = TRUE; + bValid = sal_True; } } @@ -993,12 +993,12 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) if ( xNewDlg->Execute() && xNewDlg->GetObjectName().Len() ) { ::rtl::OUString aUserSuppliedName = xNewDlg->GetObjectName(); - bValid = TRUE; + bValid = sal_True; for( sal_Int32 index = 0; index < childNodes.getLength(); index++ ) { if ( (aUserSuppliedName+extn).equals( childNodes[index]->getName() ) ) { - bValid = FALSE; + bValid = sal_False; String aError( m_createErrStr ); aError.Append( m_createDupStr ); ErrorBox aErrorBox( static_cast<Window*>(this), WB_OK | RET_OK, aError ); @@ -1108,24 +1108,24 @@ void SvxScriptOrgDialog::renameEntry( SvLBoxEntry* pEntry ) extn = aNewName.copy(extnPos); aNewName = aNewName.copy(0,extnPos); } - USHORT nMode = INPUTMODE_RENAME; + sal_uInt16 nMode = INPUTMODE_RENAME; std::auto_ptr< InputDialog > xNewDlg( new InputDialog( static_cast<Window*>(this), nMode ) ); xNewDlg->SetObjectName( aNewName ); - BOOL bValid; + sal_Bool bValid; do { if ( xNewDlg->Execute() && xNewDlg->GetObjectName().Len() ) { ::rtl::OUString aUserSuppliedName = xNewDlg->GetObjectName(); - bValid = TRUE; + bValid = sal_True; /* for( sal_Int32 index = 0; index < childNodes.getLength(); index++ ) { if ( (aUserSuppliedName+extn).equals( childNodes[index]->getName() ) ) { - bValid = FALSE; + bValid = sal_False; String aError( m_createErrStr ); aError.Append( m_createDupStr ); ErrorBox aErrorBox( static_cast<Window*>(this), WB_OK | RET_OK, aError ); @@ -1230,10 +1230,10 @@ void SvxScriptOrgDialog::deleteEntry( SvLBoxEntry* pEntry ) } -BOOL SvxScriptOrgDialog::getBoolProperty( Reference< beans::XPropertySet >& xProps, +sal_Bool SvxScriptOrgDialog::getBoolProperty( Reference< beans::XPropertySet >& xProps, ::rtl::OUString& propName ) { - BOOL result = false; + sal_Bool result = false; try { sal_Bool bTemp = sal_False; @@ -1303,7 +1303,7 @@ void SvxScriptOrgDialog::RestorePreviousSelection() if( aStoredEntry.Len() <= 0 ) return; SvLBoxEntry* pEntry = 0; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while ( nIndex != STRING_NOTFOUND ) { String aTmp( aStoredEntry.GetToken( 0, ';', nIndex ) ); diff --git a/cui/source/dialogs/sdrcelldlg.cxx b/cui/source/dialogs/sdrcelldlg.cxx index 6a1c9ec1b..f91f9467f 100644 --- a/cui/source/dialogs/sdrcelldlg.cxx +++ b/cui/source/dialogs/sdrcelldlg.cxx @@ -67,7 +67,7 @@ SvxFormatCellsDialog::~SvxFormatCellsDialog() { } -void SvxFormatCellsDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx index 4298cf850..01ec9a3f7 100644 --- a/cui/source/dialogs/splitcelldlg.cxx +++ b/cui/source/dialogs/splitcelldlg.cxx @@ -59,7 +59,7 @@ SvxSplitTableDlg::SvxSplitTableDlg( Window *pParent, bool bIsTableVertical, long maVertBox.SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl )); if( mnMaxVertical < 2 ) - maVertBox.Enable(FALSE); + maVertBox.Enable(sal_False); //exchange the meaning of horizontal and vertical for vertical text if(bIsTableVertical) diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 50bf596ce..b90456978 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -86,7 +86,7 @@ SvxSearchFormatDialog::~SvxSearchFormatDialog() // ----------------------------------------------------------------------- -void SvxSearchFormatDialog::PageCreated( USHORT nId, SfxTabPage& rPage ) +void SvxSearchFormatDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) { switch ( nId ) { @@ -127,7 +127,7 @@ void SvxSearchFormatDialog::PageCreated( USHORT nId, SfxTabPage& rPage ) ( (SvxParaAlignTabPage&)rPage ).EnableJustifyExt(); break; case RID_SVXPAGE_BACKGROUND : - ( (SvxBackgroundTabPage&)rPage ).ShowParaControl(TRUE); + ( (SvxBackgroundTabPage&)rPage ).ShowParaControl(sal_True); break; } } @@ -136,7 +136,7 @@ void SvxSearchFormatDialog::PageCreated( USHORT nId, SfxTabPage& rPage ) SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent, SearchAttrItemList& rLst, - const USHORT* pWhRanges ) : + const sal_uInt16* pWhRanges ) : ModalDialog( pParent, CUI_RES( RID_SVXDLG_SEARCHATTR ) ), @@ -163,21 +163,21 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent, SfxItemPool& rPool = pSh->GetPool(); SfxItemSet aSet( rPool, pWhRanges ); SfxWhichIter aIter( aSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { - USHORT nSlot = rPool.GetSlotId( nWhich ); + sal_uInt16 nSlot = rPool.GetSlotId( nWhich ); if ( nSlot >= SID_SVX_START ) { - BOOL bChecked = FALSE, bFound = FALSE; - for ( USHORT i = 0; !bFound && i < rList.Count(); ++i ) + sal_Bool bChecked = sal_False, bFound = sal_False; + for ( sal_uInt16 i = 0; !bFound && i < rList.Count(); ++i ) { if ( nSlot == rList[i].nSlot ) { - bFound = TRUE; + bFound = sal_True; if ( IsInvalidItem( rList[i].pItem ) ) - bChecked = TRUE; + bChecked = sal_True; } } @@ -196,7 +196,7 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent, if ( pEntry ) { aAttrLB.SetCheckButtonState( pEntry, bChecked ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED ); - pEntry->SetUserData( (void*)(ULONG)nSlot ); + pEntry->SetUserData( (void*)(sal_uLong)nSlot ); } } nWhich = aIter.NextWhich(); @@ -213,12 +213,12 @@ IMPL_LINK( SvxSearchAttributeDialog, OKHdl, Button *, EMPTYARG ) SearchAttrItem aInvalidItem; aInvalidItem.pItem = (SfxPoolItem*)-1; - for ( USHORT i = 0; i < aAttrLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aAttrLB.GetEntryCount(); ++i ) { - USHORT nSlot = (USHORT)(ULONG)aAttrLB.GetEntryData(i); - BOOL bChecked = aAttrLB.IsChecked(i); + sal_uInt16 nSlot = (sal_uInt16)(sal_uLong)aAttrLB.GetEntryData(i); + sal_Bool bChecked = aAttrLB.IsChecked(i); - USHORT j; + sal_uInt16 j; for ( j = rList.Count(); j; ) { SearchAttrItem& rItem = rList[ --j ]; @@ -245,7 +245,7 @@ IMPL_LINK( SvxSearchAttributeDialog, OKHdl, Button *, EMPTYARG ) } // remove invalid items (pItem == NULL) - for ( USHORT n = rList.Count(); n; ) + for ( sal_uInt16 n = rList.Count(); n; ) if ( !rList[ --n ].pItem ) rList.Remove( n ); @@ -258,10 +258,10 @@ IMPL_LINK( SvxSearchAttributeDialog, OKHdl, Button *, EMPTYARG ) SvxSearchSimilarityDialog::SvxSearchSimilarityDialog ( Window* pParent, - BOOL bRelax, - USHORT nOther, - USHORT nShorter, - USHORT nLonger + sal_Bool bRelax, + sal_uInt16 nOther, + sal_uInt16 nShorter, + sal_uInt16 nLonger ) : ModalDialog( pParent, CUI_RES( RID_SVXDLG_SEARCHSIMILARITY ) ), diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 000b4325e..c74af3e54 100755 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -84,7 +84,7 @@ LookUpComboBox_Impl::LookUpComboBox_Impl( m_aModifyTimer.SetTimeoutHdl( LINK( this, LookUpComboBox_Impl, ModifyTimer_Hdl ) ); m_aModifyTimer.SetTimeout( 500 ); - EnableAutocomplete( FALSE ); + EnableAutocomplete( sal_False ); } @@ -145,7 +145,7 @@ void ReplaceEdit_Impl::SetText( const XubString& rStr, const Selection& rNewSele AlternativesString_Impl::AlternativesString_Impl( ThesaurusAlternativesCtrl_Impl &rControl, - SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) : + SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : // SvLBoxString( pEntry, nFlags, rStr ), m_rControlImpl( rControl ) @@ -154,7 +154,7 @@ AlternativesString_Impl::AlternativesString_Impl( void AlternativesString_Impl::Paint( const Point& rPos, - SvLBox& rDev, USHORT, + SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) { AlternativesExtraData* pData = m_rControlImpl.GetExtraData( pEntry ); @@ -367,7 +367,7 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() const sal_Int32 nMeanings = aMeanings.getLength(); const uno::Reference< linguistic2::XMeaning > *pMeanings = aMeanings.getConstArray(); - m_pAlternativesCT->SetUpdateMode( FALSE ); + m_pAlternativesCT->SetUpdateMode( sal_False ); // clear old user data of control before creating new ones via AddEntry below m_pAlternativesCT->ClearExtraData(); @@ -387,7 +387,7 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() m_pAlternativesCT->AddEntry( -1, pSynonyms[k], false ); } - m_pAlternativesCT->SetUpdateMode( TRUE ); + m_pAlternativesCT->SetUpdateMode( sal_True ); return nMeanings > 0; } @@ -419,7 +419,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn ) PopupMenu *pMenu = aLangMBtn.GetPopupMenu(); if (pMenu && pBtn) { - USHORT nItem = pBtn->GetCurItemId(); + sal_uInt16 nItem = pBtn->GetCurItemId(); String aLangText( pMenu->GetItemText( nItem ) ); LanguageType nLang = SvtLanguageTable().GetType( aLangText ); DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); @@ -457,7 +457,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, WordSelectHdl_Impl, ComboBox *, pBox ) { if (pBox && !aWordCB.IsTravelSelect()) // act only upon return key and not when traveling with cursor keys { - USHORT nPos = pBox->GetSelectEntryPos(); + sal_uInt16 nPos = pBox->GetSelectEntryPos(); String aStr( pBox->GetEntry( nPos ) ); aStr = linguistic::GetThesaurusReplaceText( aStr ); aWordCB.SetText( aStr ); @@ -704,7 +704,7 @@ SvxThesaurusDialog::SvxThesaurusDialog( } std::sort( aLangVec.begin(), aLangVec.end() ); for (size_t i = 0; i < aLangVec.size(); ++i) - pMenu->InsertItem( (USHORT)i+1, aLangVec[i] ); // menu items should be enumerated from 1 and not 0 + pMenu->InsertItem( (sal_uInt16)i+1, aLangVec[i] ); // menu items should be enumerated from 1 and not 0 m_pImpl->aLangMBtn.SetPopupMenu( pMenu ); SetWindowTitle( nLanguage ); diff --git a/cui/source/dialogs/thesdlg_impl.hxx b/cui/source/dialogs/thesdlg_impl.hxx index d92039e7a..417c8fd38 100755 --- a/cui/source/dialogs/thesdlg_impl.hxx +++ b/cui/source/dialogs/thesdlg_impl.hxx @@ -134,9 +134,9 @@ class AlternativesString_Impl : public SvLBoxString public: AlternativesString_Impl( ThesaurusAlternativesCtrl_Impl &rControl, - SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ); + SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ); - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry); + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); }; diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index e6e8fdf6c..f7b80f177 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -58,23 +58,23 @@ // static ---------------------------------------------------------------- -#define SPECIAL_FACTOR ((USHORT)0xFFFF) +#define SPECIAL_FACTOR ((sal_uInt16)0xFFFF) // class SvxZoomDialog --------------------------------------------------- -USHORT SvxZoomDialog::GetFactor() const +sal_uInt16 SvxZoomDialog::GetFactor() const { if ( a100Btn.IsChecked() ) return 100; if ( aUserBtn.IsChecked() ) - return (USHORT)aUserEdit.GetValue(); + return (sal_uInt16)aUserEdit.GetValue(); else return SPECIAL_FACTOR; } // ----------------------------------------------------------------------- -void SvxZoomDialog::SetFactor( USHORT nNewFactor, USHORT nBtnId ) +void SvxZoomDialog::SetFactor( sal_uInt16 nNewFactor, sal_uInt16 nBtnId ) { aUserEdit.Disable(); @@ -117,7 +117,7 @@ void SvxZoomDialog::SetFactor( USHORT nNewFactor, USHORT nBtnId ) // ----------------------------------------------------------------------- -void SvxZoomDialog::HideButton( USHORT nBtnId ) +void SvxZoomDialog::HideButton( sal_uInt16 nBtnId ) { switch ( nBtnId ) { @@ -140,7 +140,7 @@ void SvxZoomDialog::HideButton( USHORT nBtnId ) // ----------------------------------------------------------------------- -void SvxZoomDialog::SetLimits( USHORT nMin, USHORT nMax ) +void SvxZoomDialog::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) { DBG_ASSERT( nMin < nMax, "invalid limits" ); aUserEdit.SetMin( nMin ); @@ -177,7 +177,7 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : rSet ( rCoreSet ), pOutSet ( NULL ), - bModified ( FALSE ) + bModified ( sal_False ) { #if ENABLE_LAYOUT @@ -205,9 +205,9 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : aUserEdit.SetModifyHdl( LINK( this, SvxZoomDialog, SpinHdl ) ); // Default-Werte - USHORT nValue = 100; - USHORT nMin = 10; - USHORT nMax = 1000; + sal_uInt16 nValue = 100; + sal_uInt16 nMin = 10; + sal_uInt16 nMax = 1000; // ggf. erst den alten Wert besorgen const SfxUInt16Item* pOldUserItem = 0; @@ -235,10 +235,10 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : if ( rItem.ISA(SvxZoomItem) ) { const SvxZoomItem& rZoomItem = (const SvxZoomItem&)rItem; - const USHORT nZoom = rZoomItem.GetValue(); + const sal_uInt16 nZoom = rZoomItem.GetValue(); const SvxZoomType eType = rZoomItem.GetType(); - const USHORT nValSet = rZoomItem.GetValueSet(); - USHORT nBtnId = 0; + const sal_uInt16 nValSet = rZoomItem.GetValueSet(); + sal_uInt16 nBtnId = 0; switch ( eType ) { @@ -269,14 +269,14 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : } else { - const USHORT nZoom = ( (const SfxUInt16Item&)rItem ).GetValue(); + const sal_uInt16 nZoom = ( (const SfxUInt16Item&)rItem ).GetValue(); SetFactor( nZoom ); } const SfxPoolItem* pViewLayoutItem = 0; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_VIEWLAYOUT, FALSE, &pViewLayoutItem ) ) + if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_VIEWLAYOUT, sal_False, &pViewLayoutItem ) ) { - const USHORT nColumns = static_cast<const SvxViewLayoutItem*>(pViewLayoutItem)->GetValue(); + const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem*>(pViewLayoutItem)->GetValue(); const bool bBookMode = static_cast<const SvxViewLayoutItem*>(pViewLayoutItem)->IsBookMode(); if ( 0 == nColumns ) @@ -335,7 +335,7 @@ SvxZoomDialog::~SvxZoomDialog() IMPL_LINK( SvxZoomDialog, UserHdl, RadioButton *, pBtn ) { - bModified |= TRUE; + bModified |= sal_True; if ( pBtn == &aUserBtn ) { @@ -353,7 +353,7 @@ IMPL_LINK( SvxZoomDialog, SpinHdl, MetricField *, EMPTYARG ) { if ( !aUserBtn.IsChecked() ) return 0; - bModified |= TRUE; + bModified |= sal_True; return 0; } @@ -361,7 +361,7 @@ IMPL_LINK( SvxZoomDialog, SpinHdl, MetricField *, EMPTYARG ) IMPL_LINK( SvxZoomDialog, ViewLayoutUserHdl, RadioButton *, pBtn ) { - bModified |= TRUE; + bModified |= sal_True; if ( pBtn == &aAutomaticBtn ) { @@ -404,7 +404,7 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutSpinHdl, MetricField *, pEdt ) aBookModeChk.Disable(); } - bModified |= TRUE; + bModified |= sal_True; return 0; } @@ -416,7 +416,7 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutCheckHdl, CheckBox *, pChk ) if ( pChk == &aBookModeChk && !aColumnsBtn.IsChecked() ) return 0; - bModified |= TRUE; + bModified |= sal_True; return 0; } @@ -432,7 +432,7 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn ) if ( &aOKBtn == pBtn ) { - USHORT nFactor = GetFactor(); + sal_uInt16 nFactor = GetFactor(); if ( SPECIAL_FACTOR == nFactor ) { @@ -458,7 +458,7 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn ) } else if ( aColumnsBtn.IsChecked() ) { - aViewLayoutItem.SetValue( static_cast<USHORT>(aColumnsEdit.GetValue()) ); + aViewLayoutItem.SetValue( static_cast<sal_uInt16>(aColumnsEdit.GetValue()) ); aViewLayoutItem.SetBookMode( aBookModeChk.IsChecked() ); } } @@ -479,7 +479,7 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn ) if ( pSh ) pSh->PutItem( SfxUInt16Item( SID_ATTR_ZOOM_USER, - (UINT16)aUserEdit.GetValue() ) ); + (sal_uInt16)aUserEdit.GetValue() ) ); EndDialog( RET_OK ); } else |