diff options
Diffstat (limited to 'cui/source/customize')
-rw-r--r-- | cui/source/customize/acccfg.cxx | 102 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 506 | ||||
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 66 | ||||
-rw-r--r-- | cui/source/customize/eventdlg.cxx | 22 | ||||
-rw-r--r-- | cui/source/customize/eventdlg.hxx | 4 | ||||
-rw-r--r-- | cui/source/customize/macropg.cxx | 50 | ||||
-rw-r--r-- | cui/source/customize/macropg_impl.hxx | 4 | ||||
-rw-r--r-- | cui/source/customize/selector.cxx | 58 |
8 files changed, 406 insertions, 406 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 6fc47499b003..80847fd8ae27 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -112,7 +112,7 @@ static ::rtl::OUString MEDIATYPE_PROPNAME = ::rtl::OUString::creat static ::rtl::OUString MEDIATYPE_UICONFIG = ::rtl::OUString::createFromAscii("application/vnd.sun.xml.ui.configuration" ); //----------------------------------------------- -static USHORT __FAR_DATA KEYCODE_ARRAY[] = +static sal_uInt16 __FAR_DATA KEYCODE_ARRAY[] = { KEY_F1 , KEY_F2 , @@ -572,7 +572,7 @@ static USHORT __FAR_DATA KEYCODE_ARRAY[] = KEY_DELETE | KEY_SHIFT | KEY_MOD1 | KEY_MOD2 }; -static USHORT KEYCODE_ARRAY_SIZE = (sizeof(KEYCODE_ARRAY) / sizeof(KEYCODE_ARRAY[0])); +static sal_uInt16 KEYCODE_ARRAY_SIZE = (sizeof(KEYCODE_ARRAY) / sizeof(KEYCODE_ARRAY[0])); //----------------------------------------------- // seems to be needed to layout the list box, which shows all @@ -589,20 +589,20 @@ class SfxAccCfgLBoxString_Impl : public SvLBoxString { public: SfxAccCfgLBoxString_Impl( SvLBoxEntry* pEntry, - USHORT nFlags, + sal_uInt16 nFlags, const String& sText ); virtual ~SfxAccCfgLBoxString_Impl(); virtual void Paint(const Point& aPos , SvLBox& rDevice, - USHORT nFlags , + sal_uInt16 nFlags , SvLBoxEntry* pEntry ); }; //----------------------------------------------- SfxAccCfgLBoxString_Impl::SfxAccCfgLBoxString_Impl( SvLBoxEntry* pEntry, - USHORT nFlags, + sal_uInt16 nFlags, const String& sText ) : SvLBoxString(pEntry, nFlags, sText) { @@ -616,7 +616,7 @@ SfxAccCfgLBoxString_Impl::~SfxAccCfgLBoxString_Impl() //----------------------------------------------- void SfxAccCfgLBoxString_Impl::Paint(const Point& aPos , SvLBox& rDevice, - USHORT /*nFlags*/, + sal_uInt16 /*nFlags*/, SvLBoxEntry* pEntry ) { /*/ ??? realy needed !!! @@ -657,8 +657,8 @@ void SfxAccCfgTabListBox_Impl::InitEntry( SvLBoxEntry* pEntry , void SfxAccCfgTabListBox_Impl::KeyInput(const KeyEvent& aKey) { KeyCode aCode1 = aKey.GetKeyCode(); - USHORT nCode1 = aCode1.GetCode(); - USHORT nMod1 = aCode1.GetModifier(); + sal_uInt16 nCode1 = aCode1.GetCode(); + sal_uInt16 nMod1 = aCode1.GetModifier(); // is it related to our list box ? if ( @@ -676,8 +676,8 @@ void SfxAccCfgTabListBox_Impl::KeyInput(const KeyEvent& aKey) TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData(); if (pUserData) { - USHORT nCode2 = pUserData->m_aKey.GetCode(); - USHORT nMod2 = pUserData->m_aKey.GetModifier(); + sal_uInt16 nCode2 = pUserData->m_aKey.GetCode(); + sal_uInt16 nMod2 = pUserData->m_aKey.GetModifier(); if ( (nCode1 == nCode2) && (nMod1 == nMod2 ) @@ -754,7 +754,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( Window* pParent, const SfxIt // detect max keyname width long nMaxWidth = 0; - for ( USHORT i = 0; i < KEYCODE_ARRAY_SIZE; ++i ) + for ( sal_uInt16 i = 0; i < KEYCODE_ARRAY_SIZE; ++i ) { long nTmp = GetTextWidth( KeyCode( KEYCODE_ARRAY[i] ).GetName() ); if ( nTmp > nMaxWidth ) @@ -887,9 +887,9 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler // Insert all editable accelerators into list box. It is possible // that some accelerators are not mapped on the current system/keyboard // but we don't want to lose these mappings. - USHORT c1 = KEYCODE_ARRAY_SIZE; - USHORT i1 = 0; - USHORT nListPos = 0; + sal_uInt16 c1 = KEYCODE_ARRAY_SIZE; + sal_uInt16 i1 = 0; + sal_uInt16 nListPos = 0; for (i1=0; i1<c1; ++i1) { KeyCode aKey = KEYCODE_ARRAY[i1]; @@ -905,7 +905,7 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler css::uno::Sequence< css::awt::KeyEvent > lKeys = xAccMgr->getAllKeyEvents(); sal_Int32 c2 = lKeys.getLength(); sal_Int32 i2 = 0; - USHORT nCol = aEntriesBox.TabCount()-1; + sal_uInt16 nCol = aEntriesBox.TabCount()-1; for (i2=0; i2<c2; ++i2) { @@ -913,7 +913,7 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler ::rtl::OUString sCommand = xAccMgr->getCommandByKeyEvent(aAWTKey); String sLabel = GetLabel4Command(sCommand); KeyCode aKeyCode = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(aAWTKey); - USHORT nPos = MapKeyCodeToPos(aKeyCode); + sal_uInt16 nPos = MapKeyCodeToPos(aKeyCode); if (nPos == LISTBOX_ENTRY_NOTFOUND) continue; @@ -929,12 +929,12 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler } // Map the VCL hardcoded key codes and mark them as not changeable - ULONG c3 = Application::GetReservedKeyCodeCount(); - ULONG i3 = 0; + sal_uLong c3 = Application::GetReservedKeyCodeCount(); + sal_uLong i3 = 0; for (i3=0; i3<c3; ++i3) { const KeyCode* pKeyCode = Application::GetReservedKeyCode(i3); - USHORT nPos = MapKeyCodeToPos(*pKeyCode); + sal_uInt16 nPos = MapKeyCodeToPos(*pKeyCode); if (nPos == LISTBOX_ENTRY_NOTFOUND) continue; @@ -1014,10 +1014,10 @@ IMPL_LINK(SfxAcceleratorConfigPage, Default, PushButton*, EMPTYARG) if (xReset.is()) xReset->reset(); - aEntriesBox.SetUpdateMode(FALSE); + aEntriesBox.SetUpdateMode(sal_False); ResetConfig(); Init(m_xAct); - aEntriesBox.SetUpdateMode(TRUE); + aEntriesBox.SetUpdateMode(sal_True); aEntriesBox.Invalidate(); aEntriesBox.Select(aEntriesBox.GetEntry(0, 0)); @@ -1027,7 +1027,7 @@ IMPL_LINK(SfxAcceleratorConfigPage, Default, PushButton*, EMPTYARG) //----------------------------------------------- IMPL_LINK( SfxAcceleratorConfigPage, ChangeHdl, Button*, EMPTYARG ) { - USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); + sal_uInt16 nPos = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); String sNewCommand = pFunctionBox->GetCurCommand(); String sLabel = pFunctionBox->GetCurLabel(); @@ -1035,7 +1035,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, ChangeHdl, Button*, EMPTYARG ) sLabel = GetLabel4Command(sNewCommand); pEntry->m_sCommand = sNewCommand; - USHORT nCol = aEntriesBox.TabCount() - 1; + sal_uInt16 nCol = aEntriesBox.TabCount() - 1; aEntriesBox.SetEntryText(sLabel, nPos, nCol); ((Link &) pFunctionBox->GetSelectHdl()).Call( pFunctionBox ); @@ -1046,11 +1046,11 @@ IMPL_LINK( SfxAcceleratorConfigPage, ChangeHdl, Button*, EMPTYARG ) IMPL_LINK( SfxAcceleratorConfigPage, RemoveHdl, Button *, EMPTYARG ) { // get selected entry - USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); + sal_uInt16 nPos = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); // remove function name from selected entry - USHORT nCol = aEntriesBox.TabCount() - 1; + sal_uInt16 nCol = aEntriesBox.TabCount() - 1; aEntriesBox.SetEntryText( String(), nPos, nCol ); pEntry->m_sCommand = ::rtl::OUString(); @@ -1065,17 +1065,17 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox ) Help::ShowBalloon( this, Point(), String() ); if ( pListBox == &aEntriesBox ) { - USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); + sal_uInt16 nPos = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); ::rtl::OUString sPossibleNewCommand = pFunctionBox->GetCurCommand(); - aRemoveButton.Enable( FALSE ); - aChangeButton.Enable( FALSE ); + aRemoveButton.Enable( sal_False ); + aChangeButton.Enable( sal_False ); if (pEntry->m_bIsConfigurable) { if (pEntry->isConfigured()) - aRemoveButton.Enable( TRUE ); + aRemoveButton.Enable( sal_True ); aChangeButton.Enable( pEntry->m_sCommand != sPossibleNewCommand ); } } @@ -1083,25 +1083,25 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox ) { pGroupLBox->GroupSelected(); if ( !pFunctionBox->FirstSelected() ) - aChangeButton.Enable( FALSE ); + aChangeButton.Enable( sal_False ); } else if ( pListBox == pFunctionBox ) { - aRemoveButton.Enable( FALSE ); - aChangeButton.Enable( FALSE ); + aRemoveButton.Enable( sal_False ); + aChangeButton.Enable( sal_False ); // #i36994 First selected can return zero! SvLBoxEntry* pLBEntry = aEntriesBox.FirstSelected(); if ( pLBEntry != 0 ) { - USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( pLBEntry ); + sal_uInt16 nPos = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( pLBEntry ); TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); ::rtl::OUString sPossibleNewCommand = pFunctionBox->GetCurCommand(); if (pEntry->m_bIsConfigurable) { if (pEntry->isConfigured()) - aRemoveButton.Enable( TRUE ); + aRemoveButton.Enable( sal_True ); aChangeButton.Enable( pEntry->m_sCommand != sPossibleNewCommand ); } @@ -1114,9 +1114,9 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox ) if ( pUserData && pUserData->m_sCommand == sPossibleNewCommand ) { TAccInfo* pU1 = new TAccInfo(-1, -1, pUserData->m_aKey); - SvLBoxEntry* pE1 = aKeyBox.InsertEntry( pUserData->m_aKey.GetName(), 0L, TRUE, LIST_APPEND ); + SvLBoxEntry* pE1 = aKeyBox.InsertEntry( pUserData->m_aKey.GetName(), 0L, sal_True, LIST_APPEND ); pE1->SetUserData(pU1); - pE1->EnableChildsOnDemand( FALSE ); + pE1->EnableChildsOnDemand( sal_False ); } pIt = aEntriesBox.Next(pIt); } @@ -1127,7 +1127,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox ) // goto selected "key" entry of the key box SvLBoxEntry* pE2 = 0; TAccInfo* pU2 = 0; - USHORT nP2 = LISTBOX_ENTRY_NOTFOUND; + sal_uInt16 nP2 = LISTBOX_ENTRY_NOTFOUND; SvLBoxEntry* pE3 = 0; pE2 = aKeyBox.FirstSelected(); @@ -1161,10 +1161,10 @@ IMPL_LINK( SfxAcceleratorConfigPage, RadioHdl, RadioButton *, EMPTYARG ) if ( m_xAct.is() && ( xOld == m_xAct ) ) return 0; - aEntriesBox.SetUpdateMode( FALSE ); + aEntriesBox.SetUpdateMode( sal_False ); ResetConfig(); Init(m_xAct); - aEntriesBox.SetUpdateMode( TRUE ); + aEntriesBox.SetUpdateMode( sal_True ); aEntriesBox.Invalidate(); pGroupLBox->Init(m_xSMGR, m_xFrame, m_sModuleLongName); @@ -1233,10 +1233,10 @@ IMPL_LINK( SfxAcceleratorConfigPage, LoadHdl, sfx2::FileDialogHelper*, EMPTYARG // open the configuration and update our UI css::uno::Reference< css::ui::XAcceleratorConfiguration > xTempAccMgr(xCfgMgr->getShortCutManager(), css::uno::UNO_QUERY_THROW); - aEntriesBox.SetUpdateMode(FALSE); + aEntriesBox.SetUpdateMode(sal_False); ResetConfig(); Init(xTempAccMgr); - aEntriesBox.SetUpdateMode(TRUE); + aEntriesBox.SetUpdateMode(sal_True); aEntriesBox.Invalidate(); aEntriesBox.Select(aEntriesBox.GetEntry(0, 0)); @@ -1387,7 +1387,7 @@ void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const String& rTi } //----------------------------------------------- -BOOL SfxAcceleratorConfigPage::FillItemSet( SfxItemSet& ) +sal_Bool SfxAcceleratorConfigPage::FillItemSet( SfxItemSet& ) { Apply(m_xAct); try @@ -1397,9 +1397,9 @@ BOOL SfxAcceleratorConfigPage::FillItemSet( SfxItemSet& ) catch(const css::uno::RuntimeException& exRun) { throw exRun; } catch(const css::uno::Exception&) - { return FALSE; } + { return sal_False; } - return TRUE; + return sal_True; } //----------------------------------------------- @@ -1427,7 +1427,7 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet ) RadioHdl(0); const SfxPoolItem* pMacroItem=0; - if( SFX_ITEM_SET == rSet.GetItemState( SID_MACROINFO, TRUE, &pMacroItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_MACROINFO, sal_True, &pMacroItem ) ) { m_pMacroInfoItem = PTR_CAST( SfxMacroInfoItem, pMacroItem ); pGroupLBox->SelectMacro( m_pMacroInfoItem ); @@ -1435,28 +1435,28 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet ) else { const SfxPoolItem* pStringItem=0; - if( SFX_ITEM_SET == rSet.GetItemState( SID_CHARMAP, TRUE, &pStringItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_CHARMAP, sal_True, &pStringItem ) ) m_pStringItem = PTR_CAST( SfxStringItem, pStringItem ); const SfxPoolItem* pFontItem=0; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_SPECIALCHAR, TRUE, &pFontItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_SPECIALCHAR, sal_True, &pFontItem ) ) m_pFontItem = PTR_CAST( SfxStringItem, pFontItem ); } } //----------------------------------------------- -USHORT SfxAcceleratorConfigPage::MapKeyCodeToPos(const KeyCode& aKey) const +sal_uInt16 SfxAcceleratorConfigPage::MapKeyCodeToPos(const KeyCode& aKey) const { - USHORT nCode1 = aKey.GetCode()+aKey.GetModifier(); + sal_uInt16 nCode1 = aKey.GetCode()+aKey.GetModifier(); SvLBoxEntry* pEntry = aEntriesBox.First(); - USHORT i = 0; + sal_uInt16 i = 0; while (pEntry) { TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData(); if (pUserData) { - USHORT nCode2 = pUserData->m_aKey.GetCode()+pUserData->m_aKey.GetModifier(); + sal_uInt16 nCode2 = pUserData->m_aKey.GetCode()+pUserData->m_aKey.GetModifier(); if (nCode1 == nCode2) return i; } diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 4c46f5d0f259..359d4417fae1 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -437,9 +437,9 @@ SvxConfigPage::CanConfig( const OUString& aModuleId ) || aModuleId.equalsAscii( "com.sun.star.frame.Bibliography" ) ) { - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } OUString GetModuleName( const OUString& aModuleId ) @@ -549,14 +549,14 @@ bool GetMenuItemData( } } - return TRUE; + return sal_True; } } catch ( ::com::sun::star::lang::IndexOutOfBoundsException& ) { } - return FALSE; + return sal_False; } bool GetToolbarItemData( @@ -642,9 +642,9 @@ ConvertSvxConfigEntry( // as an empty string. // It will be initialised again later using the command to label map. aPropSeq[2].Name = aDescriptorLabel; - if ( pEntry->HasChangedName() == FALSE && pEntry->GetCommand().getLength() ) + if ( pEntry->HasChangedName() == sal_False && pEntry->GetCommand().getLength() ) { - BOOL isDefaultName = FALSE; + sal_Bool isDefaultName = sal_False; try { uno::Any a( xCommandToLabelMap->getByName( pEntry->GetCommand() ) ); @@ -660,7 +660,7 @@ ConvertSvxConfigEntry( if ( tmpLabel.equals( pEntry->GetName() ) ) { - isDefaultName = TRUE; + isDefaultName = sal_True; } break; @@ -723,9 +723,9 @@ ConvertToolbarEntry( // as an empty string. // It will be initialised again later using the command to label map. aPropSeq[2].Name = aDescriptorLabel; - if ( pEntry->HasChangedName() == FALSE && pEntry->GetCommand().getLength() ) + if ( pEntry->HasChangedName() == sal_False && pEntry->GetCommand().getLength() ) { - BOOL isDefaultName = FALSE; + sal_Bool isDefaultName = sal_False; try { uno::Any a( xCommandToLabelMap->getByName( pEntry->GetCommand() ) ); @@ -741,7 +741,7 @@ ConvertToolbarEntry( if ( tmpLabel.equals( pEntry->GetName() ) ) { - isDefaultName = TRUE; + isDefaultName = sal_True; } break; @@ -875,7 +875,7 @@ short SvxConfigDialog::Ok() return SfxTabDialog::Ok(); } -void SvxConfigDialog::PageCreated( USHORT nId, SfxTabPage& rPage ) +void SvxConfigDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) { (void)rPage; @@ -914,9 +914,9 @@ SaveInData::SaveInData( const OUString& aModuleId, bool isDocConfig ) : - bModified( FALSE ), + bModified( sal_False ), bDocConfig( isDocConfig ), - bReadOnly( FALSE ), + bReadOnly( sal_False ), m_xCfgMgr( xCfgMgr ), m_xParentCfgMgr( xParentCfgMgr ) { @@ -1038,7 +1038,7 @@ Image SaveInData::GetImage( const OUString& rCommandURL ) bool SaveInData::PersistChanges( const uno::Reference< uno::XInterface >& xManager ) { - bool result = TRUE; + bool result = sal_True; try { @@ -1055,7 +1055,7 @@ bool SaveInData::PersistChanges( } catch ( com::sun::star::io::IOException& ) { - result = FALSE; + result = sal_False; } return result; @@ -1118,7 +1118,7 @@ MenuSaveInData::GetEntries() if ( pRootEntry == NULL ) { pRootEntry = new SvxConfigEntry( - String::CreateFromAscii("MainMenus"), String(), TRUE ); + String::CreateFromAscii("MainMenus"), String(), sal_True ); if ( m_xMenuSettings.is() ) { @@ -1163,7 +1163,7 @@ bool MenuSaveInData::LoadSubMenus( uno::Reference< container::XIndexAccess > xSubMenu; OUString aCommandURL; OUString aLabel; - bool bIsUserDefined = TRUE; + bool bIsUserDefined = sal_True; sal_uInt16 nType( css::ui::ItemType::DEFAULT ); @@ -1178,11 +1178,11 @@ bool MenuSaveInData::LoadSubMenus( try { a = m_xCommandToLabelMap->getByName( aCommandURL ); - bIsUserDefined = FALSE; + bIsUserDefined = sal_False; } catch ( container::NoSuchElementException& ) { - bIsUserDefined = TRUE; + bIsUserDefined = sal_True; } // If custom label not set retrieve it from the command @@ -1207,7 +1207,7 @@ bool MenuSaveInData::LoadSubMenus( { // popup menu SvxConfigEntry* pEntry = new SvxConfigEntry( - aLabel, aCommandURL, TRUE ); + aLabel, aCommandURL, sal_True ); pEntry->SetUserDefined( bIsUserDefined ); @@ -1222,7 +1222,7 @@ bool MenuSaveInData::LoadSubMenus( } else { - pEntry->SetMain( TRUE ); + pEntry->SetMain( sal_True ); } subMenuTitle += stripHotKey( aLabel ); @@ -1232,7 +1232,7 @@ bool MenuSaveInData::LoadSubMenus( else { SvxConfigEntry* pEntry = new SvxConfigEntry( - aLabel, aCommandURL, FALSE ); + aLabel, aCommandURL, sal_False ); pEntry->SetUserDefined( bIsUserDefined ); pEntries->push_back( pEntry ); } @@ -1250,7 +1250,7 @@ bool MenuSaveInData::LoadSubMenus( bool MenuSaveInData::Apply() { - bool result = FALSE; + bool result = sal_False; if ( IsModified() ) { @@ -1292,7 +1292,7 @@ bool MenuSaveInData::Apply() OSL_TRACE("caught some other exception saving settings"); } - SetModified( FALSE ); + SetModified( sal_False ); result = PersistChanges( GetConfigManager() ); } @@ -1408,7 +1408,7 @@ public: ~PopupPainter() { } void Paint( const Point& rPos, SvLBox& rOutDev, - USHORT nViewDataEntryFlags, SvLBoxEntry* pEntry ) + sal_uInt16 nViewDataEntryFlags, SvLBoxEntry* pEntry ) { SvLBoxString::Paint( rPos, rOutDev, nViewDataEntryFlags, pEntry ); @@ -1462,7 +1462,7 @@ SvxMenuEntriesListBox::SvxMenuEntriesListBox( Window* pParent, const ResId& rResId) : SvTreeListBox( pParent, rResId ) , pPage( (SvxMenuConfigPage*) pParent ) - , m_bIsInternalDrag( FALSE ) + , m_bIsInternalDrag( sal_False ) { SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HIDESELECTION ); @@ -1491,14 +1491,14 @@ DragDropMode SvxMenuEntriesListBox::NotifyStartDrag( (void)aTransferDataContainer; (void)pEntry; - m_bIsInternalDrag = TRUE; + m_bIsInternalDrag = sal_True; return GetDragDropMode(); } void SvxMenuEntriesListBox::DragFinished( sal_Int8 nDropAction ) { (void)nDropAction; - m_bIsInternalDrag = FALSE; + m_bIsInternalDrag = sal_False; } sal_Int8 SvxMenuEntriesListBox::AcceptDrop( const AcceptDropEvent& rEvt ) @@ -1518,27 +1518,27 @@ sal_Int8 SvxMenuEntriesListBox::AcceptDrop( const AcceptDropEvent& rEvt ) return SvTreeListBox::AcceptDrop( aNewAcceptDropEvent ); } -BOOL SvxMenuEntriesListBox::NotifyAcceptDrop( SvLBoxEntry* ) +sal_Bool SvxMenuEntriesListBox::NotifyAcceptDrop( SvLBoxEntry* ) { - return TRUE; + return sal_True; } -BOOL SvxMenuEntriesListBox::NotifyMoving( +sal_Bool SvxMenuEntriesListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pSource, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos) + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos) { // only try to do a move if we are dragging within the list box if ( m_bIsInternalDrag ) { - if ( pPage->MoveEntryData( pSource, pTarget ) == TRUE ) + if ( pPage->MoveEntryData( pSource, pTarget ) == sal_True ) { SvTreeListBox::NotifyMoving( pTarget, pSource, rpNewParent, rNewChildPos ); - return TRUE; + return sal_True; } else { - return FALSE; + return sal_False; } } else @@ -1547,9 +1547,9 @@ BOOL SvxMenuEntriesListBox::NotifyMoving( } } -BOOL SvxMenuEntriesListBox::NotifyCopying( +sal_Bool SvxMenuEntriesListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pSource, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos) + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos) { (void)pSource; (void)rpNewParent; @@ -1562,11 +1562,11 @@ BOOL SvxMenuEntriesListBox::NotifyCopying( // AddFunction already adds the listbox entry so return FALSE // to stop another listbox entry being added - return FALSE; + return sal_False; } // Copying is only allowed from external controls, not within the listbox - return FALSE; + return sal_False; } void SvxMenuEntriesListBox::KeyInput( const KeyEvent& rKeyEvent ) @@ -1581,11 +1581,11 @@ void SvxMenuEntriesListBox::KeyInput( const KeyEvent& rKeyEvent ) // support CTRL+UP and CTRL+DOWN for moving selected entries else if ( keycode.GetCode() == KEY_UP && keycode.IsMod1() ) { - pPage->MoveEntry( TRUE ); + pPage->MoveEntry( sal_True ); } else if ( keycode.GetCode() == KEY_DOWN && keycode.IsMod1() ) { - pPage->MoveEntry( FALSE ); + pPage->MoveEntry( sal_False ); } else { @@ -1643,7 +1643,7 @@ SvxConfigPage::SvxConfigPage( Window *pParent, const SfxItemSet& rSet ) : SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_MENUS ), rSet ), - bInitialised( FALSE ), + bInitialised( sal_False ), pCurrentSaveInData( 0 ), aTopLevelSeparator( this, CUI_RES( GRP_MENUS ) ), aTopLevelLabel( this, CUI_RES( FT_MENUS ) ), @@ -1664,8 +1664,8 @@ SvxConfigPage::SvxConfigPage( pSelectorDlg( 0 ) { aDescriptionField.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() ); - aDescriptionField.SetAutoScroll( TRUE ); - aDescriptionField.EnableCursor( FALSE ); + aDescriptionField.SetAutoScroll( sal_True ); + aDescriptionField.EnableCursor( sal_False ); } SvxConfigPage::~SvxConfigPage() @@ -1682,7 +1682,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) // all other open documents of the same module type if ( !bInitialised ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; uno::Reference < css::ui::XUIConfigurationManager > xCfgMgr; uno::Reference < css::ui::XUIConfigurationManager > xDocCfgMgr; @@ -1728,7 +1728,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) pModuleData = CreateSaveInData( xCfgMgr, uno::Reference< css::ui::XUIConfigurationManager >(), aModuleId, - FALSE ); + sal_False ); } catch ( container::NoSuchElementException& ) { @@ -1769,7 +1769,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) SaveInData* pDocData = NULL; if ( xDocCfgMgr.is() ) { - pDocData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, TRUE ); + pDocData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, sal_True ); if ( !pDocData->IsReadOnly() ) { @@ -1780,35 +1780,35 @@ void SvxConfigPage::Reset( const SfxItemSet& ) // if an item to select has been passed in (eg. the ResourceURL for a // toolbar) then try to select the SaveInData entry that has that item - bool bURLToSelectFound = FALSE; + bool bURLToSelectFound = sal_False; if ( m_aURLToSelect.getLength() != 0 ) { if ( pDocData != NULL && pDocData->HasURL( m_aURLToSelect ) ) { - aSaveInListBox.SelectEntryPos( nPos, TRUE ); + aSaveInListBox.SelectEntryPos( nPos, sal_True ); pCurrentSaveInData = pDocData; - bURLToSelectFound = TRUE; + bURLToSelectFound = sal_True; } else if ( pModuleData->HasURL( m_aURLToSelect ) ) { - aSaveInListBox.SelectEntryPos( 0, TRUE ); + aSaveInListBox.SelectEntryPos( 0, sal_True ); pCurrentSaveInData = pModuleData; - bURLToSelectFound = TRUE; + bURLToSelectFound = sal_True; } } - if ( bURLToSelectFound == FALSE ) + if ( bURLToSelectFound == sal_False ) { // if the document has menu configuration settings select it // it the SaveIn listbox, otherwise select the module data if ( pDocData != NULL && pDocData->HasSettings() ) { - aSaveInListBox.SelectEntryPos( nPos, TRUE ); + aSaveInListBox.SelectEntryPos( nPos, sal_True ); pCurrentSaveInData = pDocData; } else { - aSaveInListBox.SelectEntryPos( 0, TRUE ); + aSaveInListBox.SelectEntryPos( 0, sal_True ); pCurrentSaveInData = pModuleData; } } @@ -1884,7 +1884,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) if ( xDocCfgMgr.is() ) { - pData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, TRUE ); + pData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, sal_True ); if ( pData && !pData->IsReadOnly() ) { @@ -1900,7 +1900,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) aSaveInListBox.SetSelectHdl( LINK( this, SvxConfigPage, SelectSaveInLocation ) ); - bInitialised = TRUE; + bInitialised = sal_True; Init(); } @@ -1971,11 +1971,11 @@ void SvxConfigPage::Reset( const SfxItemSet& ) return sModuleID; } -BOOL SvxConfigPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxConfigPage::FillItemSet( SfxItemSet& ) { - bool result = FALSE; + bool result = sal_False; - for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) { SaveInData* pData = (SaveInData*) aSaveInListBox.GetEntryData( i ); @@ -2027,7 +2027,7 @@ IMPL_LINK( SvxConfigPage, SelectSaveInLocation, ListBox *, pBox ) void SvxConfigPage::ReloadTopLevelListBox( SvxConfigEntry* pToSelect ) { - USHORT nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); + sal_uInt16 nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); aTopLevelListBox.Clear(); if ( GetSaveInData() && GetSaveInData()->GetEntries() ) @@ -2038,7 +2038,7 @@ void SvxConfigPage::ReloadTopLevelListBox( SvxConfigEntry* pToSelect ) for ( ; iter != end; iter++ ) { SvxConfigEntry* pEntryData = *iter; - USHORT nPos = aTopLevelListBox.InsertEntry( stripHotKey( pEntryData->GetName() ) ); + sal_uInt16 nPos = aTopLevelListBox.InsertEntry( stripHotKey( pEntryData->GetName() ) ); aTopLevelListBox.SetEntryData( nPos, pEntryData ); if ( pEntryData == pToSelect ) @@ -2059,7 +2059,7 @@ void SvxConfigPage::ReloadTopLevelListBox( SvxConfigEntry* pToSelect ) nSelectionPos = nSelectionPos < aTopLevelListBox.GetEntryCount() ? nSelectionPos : aTopLevelListBox.GetEntryCount() - 1; - aTopLevelListBox.SelectEntryPos( nSelectionPos, TRUE ); + aTopLevelListBox.SelectEntryPos( nSelectionPos, sal_True ); aTopLevelListBox.GetSelectHdl().Call( this ); } @@ -2079,7 +2079,7 @@ void SvxConfigPage::AddSubMenusToUI( subMenuTitle += OUString::createFromAscii( pMenuSeparatorStr ); subMenuTitle += stripHotKey( pEntryData->GetName() ); - USHORT nPos = aTopLevelListBox.InsertEntry( subMenuTitle ); + sal_uInt16 nPos = aTopLevelListBox.InsertEntry( subMenuTitle ); aTopLevelListBox.SetEntryData( nPos, pEntryData ); AddSubMenusToUI( subMenuTitle, pEntryData ); @@ -2128,8 +2128,8 @@ SvLBoxEntry* SvxConfigPage::AddFunction( } SvxConfigEntry* pNewEntryData = - new SvxConfigEntry( aDisplayName, aURL, FALSE ); - pNewEntryData->SetUserDefined( TRUE ); + new SvxConfigEntry( aDisplayName, aURL, sal_False ); + pNewEntryData->SetUserDefined( sal_True ); // check that this function is not already in the menu SvxConfigEntry* pParent = GetTopLevelSelection(); @@ -2189,7 +2189,7 @@ SvLBoxEntry* SvxConfigPage::InsertEntry( SvxEntries::const_iterator end = pEntries->end(); // Advance the iterator to the data for currently selected entry - USHORT nPos = 0; + sal_uInt16 nPos = 0; while (*iter != pEntryData && ++iter != end) { nPos++; @@ -2212,14 +2212,14 @@ SvLBoxEntry* SvxConfigPage::InsertEntry( aContentsListBox->Select( pNewEntry ); aContentsListBox->MakeVisible( pNewEntry ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } return pNewEntry; } SvLBoxEntry* SvxConfigPage::InsertEntryIntoUI( - SvxConfigEntry* pNewEntryData, ULONG nPos ) + SvxConfigEntry* pNewEntryData, sal_uLong nPos ) { SvLBoxEntry* pNewEntry = NULL; @@ -2227,7 +2227,7 @@ SvLBoxEntry* SvxConfigPage::InsertEntryIntoUI( { pNewEntry = aContentsListBox->InsertEntry( String::CreateFromAscii( pSeparatorStr ), - 0, FALSE, nPos, pNewEntryData ); + 0, sal_False, nPos, pNewEntryData ); } else { @@ -2239,12 +2239,12 @@ SvLBoxEntry* SvxConfigPage::InsertEntryIntoUI( if ( !!aImage ) { pNewEntry = aContentsListBox->InsertEntry( - aName, aImage, aImage, 0, FALSE, nPos, pNewEntryData ); + aName, aImage, aImage, 0, sal_False, nPos, pNewEntryData ); } else { pNewEntry = aContentsListBox->InsertEntry( - aName, 0, FALSE, nPos, pNewEntryData ); + aName, 0, sal_False, nPos, pNewEntryData ); } if ( pNewEntryData->IsPopup() || @@ -2317,7 +2317,7 @@ bool SvxConfigPage::MoveEntryData( //modified by shizhoubo for issue53677 if ( NULL == pSourceEntry || NULL == pTargetEntry ) { - return FALSE; + return sal_False; } // Grab the entries list for the currently selected menu @@ -2332,9 +2332,9 @@ bool SvxConfigPage::MoveEntryData( pEntries->insert( pEntries->begin(), pSourceData ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); - return TRUE; + return sal_True; } else { @@ -2355,13 +2355,13 @@ bool SvxConfigPage::MoveEntryData( // insert the source entry at the position after the target pEntries->insert( ++iter, pSourceData ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } SvxMenuConfigPage::SvxMenuConfigPage( @@ -2416,13 +2416,13 @@ void SvxMenuConfigPage::Init() ReloadTopLevelListBox(); - aTopLevelListBox.SelectEntryPos(0, TRUE); + aTopLevelListBox.SelectEntryPos(0, sal_True); aTopLevelListBox.GetSelectHdl().Call(this); } SvxMenuConfigPage::~SvxMenuConfigPage() { - for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) { MenuSaveInData* pData = (MenuSaveInData*) aSaveInListBox.GetEntryData( i ); @@ -2456,12 +2456,12 @@ void SvxMenuConfigPage::UpdateButtonStates() if ( aContentsListBox->GetEntryCount() == 0 || selection == NULL ) { - aMoveUpButton.Enable( FALSE ); - aMoveDownButton.Enable( FALSE ); + aMoveUpButton.Enable( sal_False ); + aMoveDownButton.Enable( sal_False ); - pPopup->EnableItem( ID_BEGIN_GROUP, TRUE ); - pPopup->EnableItem( ID_RENAME, FALSE ); - pPopup->EnableItem( ID_DELETE, FALSE ); + pPopup->EnableItem( ID_BEGIN_GROUP, sal_True ); + pPopup->EnableItem( ID_RENAME, sal_False ); + pPopup->EnableItem( ID_DELETE, sal_False ); aDescriptionField.Clear(); @@ -2479,17 +2479,17 @@ void SvxMenuConfigPage::UpdateButtonStates() if ( pEntryData->IsSeparator() ) { - pPopup->EnableItem( ID_DELETE, TRUE ); - pPopup->EnableItem( ID_BEGIN_GROUP, FALSE ); - pPopup->EnableItem( ID_RENAME, FALSE ); + pPopup->EnableItem( ID_DELETE, sal_True ); + pPopup->EnableItem( ID_BEGIN_GROUP, sal_False ); + pPopup->EnableItem( ID_RENAME, sal_False ); aDescriptionField.Clear(); } else { - pPopup->EnableItem( ID_BEGIN_GROUP, TRUE ); - pPopup->EnableItem( ID_DELETE, TRUE ); - pPopup->EnableItem( ID_RENAME, TRUE ); + pPopup->EnableItem( ID_BEGIN_GROUP, sal_True ); + pPopup->EnableItem( ID_DELETE, sal_True ); + pPopup->EnableItem( ID_RENAME, sal_True ); aDescriptionField.SetNewText( pEntryData->GetHelpText() ); } @@ -2507,7 +2507,7 @@ void SvxMenuConfigPage::DeleteSelectedTopLevel() ReloadTopLevelListBox(); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } bool SvxMenuConfigPage::DeleteSelectedContent() @@ -2538,11 +2538,11 @@ bool SvxMenuConfigPage::DeleteSelectedContent() // delete data for menu entry delete pMenuEntry; - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } short SvxMenuConfigPage::QueryReset() @@ -2618,7 +2618,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton ) ReloadTopLevelListBox(); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } // #i68101# Moemory leak (!) @@ -2642,7 +2642,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton ) ReloadTopLevelListBox( pDialog->GetSelectedEntry() ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } delete pDialog; @@ -2650,9 +2650,9 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton ) break; } default: - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) @@ -2674,14 +2674,14 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) pNameDialog->GetName(aNewName); SvxConfigEntry* pNewEntryData = - new SvxConfigEntry( aNewName, aNewName, TRUE ); - pNewEntryData->SetUserDefined( TRUE ); + new SvxConfigEntry( aNewName, aNewName, sal_True ); + pNewEntryData->SetUserDefined( sal_True ); InsertEntry( pNewEntryData ); ReloadTopLevelListBox(); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } delete pNameDialog; @@ -2691,7 +2691,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) case ID_BEGIN_GROUP: { SvxConfigEntry* pNewEntryData = new SvxConfigEntry; - pNewEntryData->SetUserDefined( TRUE ); + pNewEntryData->SetUserDefined( sal_True ); InsertEntry( pNewEntryData ); break; @@ -2722,7 +2722,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) pEntry->SetName( aNewName ); aContentsListBox->SetEntryText( pActEntry, aNewName ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } delete pNameDialog; @@ -2731,7 +2731,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) } default: { - return FALSE; + return sal_False; } } @@ -2740,7 +2740,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) UpdateButtonStates(); } - return TRUE; + return sal_True; } IMPL_LINK( SvxMenuConfigPage, AddFunctionHdl, @@ -2759,7 +2759,7 @@ IMPL_LINK( SvxMenuConfigPage, NewMenuHdl, Button *, pButton ) SvxMainMenuOrganizerDialog* pDialog = new SvxMainMenuOrganizerDialog( 0, - GetSaveInData()->GetEntries(), NULL, TRUE ); + GetSaveInData()->GetEntries(), NULL, sal_True ); bool ret = pDialog->Execute(); @@ -2767,7 +2767,7 @@ IMPL_LINK( SvxMenuConfigPage, NewMenuHdl, Button *, pButton ) { GetSaveInData()->SetEntries( pDialog->GetEntries() ); ReloadTopLevelListBox( pDialog->GetSelectedEntry() ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } delete pDialog; @@ -2782,7 +2782,7 @@ IMPL_LINK( SvxMenuConfigPage, AddCommandsHdl, Button *, pButton ) if ( pSelectorDlg == NULL ) { // Create Script Selector which also shows builtin commands - pSelectorDlg = new SvxScriptSelectorDialog( this, TRUE, m_xFrame ); + pSelectorDlg = new SvxScriptSelectorDialog( this, sal_True, m_xFrame ); pSelectorDlg->SetAddHdl( LINK( this, SvxMenuConfigPage, AddFunctionHdl ) ); @@ -2826,7 +2826,7 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog( aOKButton( this, CUI_RES( BTN_MENU_ADD ) ), aCloseButton( this, CUI_RES( BTN_MENU_CLOSE ) ), aHelpButton( this, CUI_RES( BTN_MENU_HELP ) ), - bModified( FALSE ) + bModified( sal_False ) { FreeResource(); @@ -2865,9 +2865,9 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog( OUString newurl = generateCustomMenuURL( pEntries ); SvxConfigEntry* pNewEntryData = - new SvxConfigEntry( newname, newurl, TRUE ); - pNewEntryData->SetUserDefined( TRUE ); - pNewEntryData->SetMain( TRUE ); + new SvxConfigEntry( newname, newurl, sal_True ); + pNewEntryData->SetUserDefined( sal_True ); + pNewEntryData->SetMain( sal_True ); pNewMenuEntry = aMenuListBox.InsertEntry( stripHotKey( pNewEntryData->GetName() ) ); @@ -3011,7 +3011,7 @@ IMPL_LINK( SvxMainMenuOrganizerDialog, MoveHdl, Button *, pButton ) aMenuListBox.GetModel()->Move( pSourceEntry, pTargetEntry ); aMenuListBox.MakeVisible( pSourceEntry ); - bModified = TRUE; + bModified = sal_True; } } @@ -3053,11 +3053,11 @@ SvxConfigEntry::SvxConfigEntry( const OUString& rDisplayName, , aLabel(rDisplayName) , aCommand(rCommandURL) , bPopUp(bPopup) - , bStrEdited( FALSE ) - , bIsUserDefined( FALSE ) - , bIsMain( FALSE ) + , bStrEdited( sal_False ) + , bIsUserDefined( sal_False ) + , bIsMain( sal_False ) , bIsParentData( bParentData ) - , bIsVisible( TRUE ) + , bIsVisible( sal_True ) , nStyle( 0 ) , pEntries( 0 ) { @@ -3085,27 +3085,27 @@ bool SvxConfigEntry::IsMovable() { if ( IsPopup() && !IsMain() ) { - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } bool SvxConfigEntry::IsDeletable() { if ( IsMain() && !IsUserDefined() ) { - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } bool SvxConfigEntry::IsRenamable() { if ( IsMain() && !IsUserDefined() ) { - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } SvxToolbarConfigPage::SvxToolbarConfigPage( @@ -3150,8 +3150,8 @@ SvxToolbarConfigPage::SvxToolbarConfigPage( aMoveDownButton.SetClickHdl ( LINK( this, SvxToolbarConfigPage, MoveHdl) ); // Always enable Up and Down buttons // added for issue i53677 by shizhoubo - aMoveDownButton.Enable( TRUE ); - aMoveUpButton.Enable( TRUE ); + aMoveDownButton.Enable( sal_True ); + aMoveUpButton.Enable( sal_True ); PopupMenu* pMenu = new PopupMenu( CUI_RES( MODIFY_TOOLBAR ) ); pMenu->SetMenuFlags( @@ -3205,7 +3205,7 @@ SvxToolbarConfigPage::SvxToolbarConfigPage( SvxToolbarConfigPage::~SvxToolbarConfigPage() { - for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) { ToolbarSaveInData* pData = (ToolbarSaveInData*) aSaveInListBox.GetEntryData( i ); @@ -3224,7 +3224,7 @@ SvxToolbarConfigPage::~SvxToolbarConfigPage() void SvxToolbarConfigPage::DeleteSelectedTopLevel() { - USHORT nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); + sal_uInt16 nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); ToolbarSaveInData* pSaveInData = (ToolbarSaveInData*) GetSaveInData(); pSaveInData->RemoveToolbar( GetTopLevelSelection() ); @@ -3235,11 +3235,11 @@ void SvxToolbarConfigPage::DeleteSelectedTopLevel() // subtract one from the entry count if ( nSelectionPos != aTopLevelListBox.GetEntryCount() - 1 ) { - aTopLevelListBox.SelectEntryPos( nSelectionPos + 1, TRUE ); + aTopLevelListBox.SelectEntryPos( nSelectionPos + 1, sal_True ); } else { - aTopLevelListBox.SelectEntryPos( nSelectionPos - 1, TRUE ); + aTopLevelListBox.SelectEntryPos( nSelectionPos - 1, sal_True ); } aTopLevelListBox.GetSelectHdl().Call( this ); @@ -3291,10 +3291,10 @@ bool SvxToolbarConfigPage::DeleteSelectedContent() } } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } IMPL_LINK( SvxToolbarConfigPage, MoveHdl, Button *, pButton ) @@ -3320,7 +3320,7 @@ void SvxToolbarConfigPage::MoveEntry( bool bMoveUp ) IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton ) { - USHORT nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); + sal_uInt16 nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); SvxConfigEntry* pToolbar = (SvxConfigEntry*)aTopLevelListBox.GetEntryData( nSelectionPos ); @@ -3415,7 +3415,7 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton ) IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) { - bool bNeedsApply = FALSE; + bool bNeedsApply = sal_False; // get currently selected toolbar SvxConfigEntry* pToolbar = GetTopLevelSelection(); @@ -3443,7 +3443,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) pEntry->SetName( aNewName ); aContentsListBox->SetEntryText( pActEntry, aNewName ); - bNeedsApply = TRUE; + bNeedsApply = sal_True; } delete pNameDialog; @@ -3455,10 +3455,10 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) SvxConfigEntry* pEntry = (SvxConfigEntry*) pActEntry->GetUserData(); - USHORT nSelectionPos = 0; + sal_uInt16 nSelectionPos = 0; // find position of entry within the list - for ( USHORT i = 0; i < aContentsListBox->GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0; i < aContentsListBox->GetEntryCount(); i++ ) { if ( aContentsListBox->GetEntry( 0, i ) == pActEntry ) { @@ -3478,7 +3478,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) pEntry->SetName( aSystemName ); aContentsListBox->SetEntryText( pActEntry, stripHotKey( aSystemName ) ); - bNeedsApply = TRUE; + bNeedsApply = sal_True; } uno::Sequence< OUString > aURLSeq( 1 ); @@ -3508,7 +3508,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) aContentsListBox->Select( pNewLBEntry ); aContentsListBox->MakeVisible( pNewLBEntry ); - bNeedsApply = TRUE; + bNeedsApply = sal_True; } catch ( uno::Exception& ) { @@ -3519,14 +3519,14 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) case ID_BEGIN_GROUP: { SvxConfigEntry* pNewEntryData = new SvxConfigEntry; - pNewEntryData->SetUserDefined( TRUE ); + pNewEntryData->SetUserDefined( sal_True ); SvLBoxEntry* pNewLBEntry = InsertEntry( pNewEntryData ); aContentsListBox->SetCheckButtonState( pNewLBEntry, SV_BUTTON_TRISTATE ); - bNeedsApply = TRUE; + bNeedsApply = sal_True; break; } case ID_DELETE: @@ -3552,10 +3552,10 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) SvxConfigEntry* pEntry = (SvxConfigEntry*) pActEntry->GetUserData(); - USHORT nSelectionPos = 0; + sal_uInt16 nSelectionPos = 0; // find position of entry within the list - for ( USHORT i = 0; i < aContentsListBox->GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0; i < aContentsListBox->GetEntryCount(); i++ ) { if ( aContentsListBox->GetEntry( 0, i ) == pActEntry ) { @@ -3635,10 +3635,10 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) SvxConfigEntry* pEntry = (SvxConfigEntry*) pActEntry->GetUserData(); - USHORT nSelectionPos = 0; + sal_uInt16 nSelectionPos = 0; // find position of entry within the list - for ( USHORT i = 0; i < aContentsListBox->GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0; i < aContentsListBox->GetEntryCount(); i++ ) { if ( aContentsListBox->GetEntry( 0, i ) == pActEntry ) { @@ -3690,7 +3690,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) } } - if ( bNeedsApply == TRUE ) + if ( bNeedsApply == sal_True ) { (( ToolbarSaveInData* ) GetSaveInData())->ApplyToolbar( pToolbar ); UpdateButtonStates(); @@ -3707,10 +3707,10 @@ void SvxToolbarConfigPage::Init() ReloadTopLevelListBox(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; if ( m_aURLToSelect.getLength() != 0 ) { - for ( USHORT i = 0 ; i < aTopLevelListBox.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0 ; i < aTopLevelListBox.GetEntryCount(); i++ ) { SvxConfigEntry* pData = (SvxConfigEntry*) aTopLevelListBox.GetEntryData( i ); @@ -3727,7 +3727,7 @@ void SvxToolbarConfigPage::Init() m_aURLToSelect += OUString::createFromAscii( "standardbar" ); } - aTopLevelListBox.SelectEntryPos(nPos, TRUE); + aTopLevelListBox.SelectEntryPos(nPos, sal_True); aTopLevelListBox.GetSelectHdl().Call(this); } @@ -3976,7 +3976,7 @@ SvxEntries* ToolbarSaveInData::GetEntries() { pRootEntry = new SvxConfigEntry( - String::CreateFromAscii("MainToolbars"), String(), TRUE ); + String::CreateFromAscii("MainToolbars"), String(), sal_True ); uno::Sequence< uno::Sequence < beans::PropertyValue > > info = GetConfigManager()->getUIElementsInfo( @@ -4020,9 +4020,9 @@ SvxEntries* ToolbarSaveInData::GetEntries() } SvxConfigEntry* pEntry = new SvxConfigEntry( - uiname, url, TRUE ); + uiname, url, sal_True ); - pEntry->SetMain( TRUE ); + pEntry->SetMain( sal_True ); pEntry->SetStyle( GetSystemStyle( url ) ); @@ -4032,11 +4032,11 @@ SvxEntries* ToolbarSaveInData::GetEntries() OUString custom = OUString::createFromAscii(CUSTOM_TOOLBAR_STR); if ( systemname.indexOf( custom ) == 0 ) { - pEntry->SetUserDefined( TRUE ); + pEntry->SetUserDefined( sal_True ); } else { - pEntry->SetUserDefined( FALSE ); + pEntry->SetUserDefined( sal_False ); } pRootEntry->GetEntries()->push_back( pEntry ); @@ -4108,18 +4108,18 @@ SvxEntries* ToolbarSaveInData::GetEntries() } SvxConfigEntry* pEntry = new SvxConfigEntry( - uiname, url, TRUE, TRUE ); + uiname, url, sal_True, sal_True ); - pEntry->SetMain( TRUE ); + pEntry->SetMain( sal_True ); pEntry->SetStyle( GetSystemStyle( url ) ); if ( systemname.indexOf( custom ) == 0 ) { - pEntry->SetUserDefined( TRUE ); + pEntry->SetUserDefined( sal_True ); } else { - pEntry->SetUserDefined( FALSE ); + pEntry->SetUserDefined( sal_False ); } pRootEntry->GetEntries()->push_back( pEntry ); @@ -4166,14 +4166,14 @@ ToolbarSaveInData::HasURL( const OUString& rURL ) if ( pEntry->GetCommand().equals( rURL ) ) { if ( pEntry->IsParentData() ) - return FALSE; + return sal_False; else - return TRUE; + return sal_True; } iter++; } - return FALSE; + return sal_False; } bool ToolbarSaveInData::HasSettings() @@ -4181,9 +4181,9 @@ bool ToolbarSaveInData::HasSettings() // return true if there is at least one toolbar entry if ( GetEntries()->size() > 0 ) { - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void ToolbarSaveInData::Reset() @@ -4231,7 +4231,7 @@ void ToolbarSaveInData::Reset() bool ToolbarSaveInData::Apply() { // toolbar changes are instantly applied - return FALSE; + return sal_False; } void ToolbarSaveInData::ApplyToolbar( @@ -4476,7 +4476,7 @@ bool ToolbarSaveInData::LoadToolbar( uno::Reference< container::XIndexAccess > xSubMenu; OUString aCommandURL; OUString aLabel; - bool bIsUserDefined = TRUE; + bool bIsUserDefined = sal_True; sal_Bool bIsVisible; sal_Int32 nStyle; @@ -4493,11 +4493,11 @@ bool ToolbarSaveInData::LoadToolbar( try { a = m_xCommandToLabelMap->getByName( aCommandURL ); - bIsUserDefined = FALSE; + bIsUserDefined = sal_False; } catch ( container::NoSuchElementException& ) { - bIsUserDefined = TRUE; + bIsUserDefined = sal_True; } // If custom label not set retrieve it from the command @@ -4521,7 +4521,7 @@ bool ToolbarSaveInData::LoadToolbar( if ( xSubMenu.is() ) { SvxConfigEntry* pEntry = new SvxConfigEntry( - aLabel, aCommandURL, TRUE ); + aLabel, aCommandURL, sal_True ); pEntry->SetUserDefined( bIsUserDefined ); pEntry->SetVisible( bIsVisible ); @@ -4533,7 +4533,7 @@ bool ToolbarSaveInData::LoadToolbar( else { SvxConfigEntry* pEntry = new SvxConfigEntry( - aLabel, aCommandURL, FALSE ); + aLabel, aCommandURL, sal_False ); pEntry->SetUserDefined( bIsUserDefined ); pEntry->SetVisible( bIsVisible ); pEntry->SetStyle( nStyle ); @@ -4562,15 +4562,15 @@ IMPL_LINK( SvxToolbarConfigPage, SelectToolbarEntry, Control *, pBox ) void SvxToolbarConfigPage::UpdateButtonStates() { PopupMenu* pPopup = aModifyCommandButton.GetPopupMenu(); - pPopup->EnableItem( ID_RENAME, FALSE ); - pPopup->EnableItem( ID_DELETE, FALSE ); - pPopup->EnableItem( ID_BEGIN_GROUP, FALSE ); - pPopup->EnableItem( ID_DEFAULT_COMMAND, FALSE ); - pPopup->EnableItem( ID_ICON_ONLY, FALSE ); - pPopup->EnableItem( ID_ICON_AND_TEXT, FALSE ); - pPopup->EnableItem( ID_TEXT_ONLY, FALSE ); - pPopup->EnableItem( ID_CHANGE_SYMBOL, FALSE ); - pPopup->EnableItem( ID_RESET_SYMBOL, FALSE ); + pPopup->EnableItem( ID_RENAME, sal_False ); + pPopup->EnableItem( ID_DELETE, sal_False ); + pPopup->EnableItem( ID_BEGIN_GROUP, sal_False ); + pPopup->EnableItem( ID_DEFAULT_COMMAND, sal_False ); + pPopup->EnableItem( ID_ICON_ONLY, sal_False ); + pPopup->EnableItem( ID_ICON_AND_TEXT, sal_False ); + pPopup->EnableItem( ID_TEXT_ONLY, sal_False ); + pPopup->EnableItem( ID_CHANGE_SYMBOL, sal_False ); + pPopup->EnableItem( ID_RESET_SYMBOL, sal_False ); aDescriptionField.Clear(); @@ -4582,22 +4582,22 @@ void SvxToolbarConfigPage::UpdateButtonStates() SvxConfigEntry* pEntryData = (SvxConfigEntry*) selection->GetUserData(); if ( pEntryData->IsSeparator() ) - pPopup->EnableItem( ID_DELETE, TRUE ); + pPopup->EnableItem( ID_DELETE, sal_True ); else { - pPopup->EnableItem( ID_BEGIN_GROUP, TRUE ); - pPopup->EnableItem( ID_DELETE, TRUE ); - pPopup->EnableItem( ID_RENAME, TRUE ); - pPopup->EnableItem( ID_ICON_ONLY, TRUE ); - pPopup->EnableItem( ID_ICON_AND_TEXT, TRUE ); - pPopup->EnableItem( ID_TEXT_ONLY, TRUE ); - pPopup->EnableItem( ID_CHANGE_SYMBOL, TRUE ); + pPopup->EnableItem( ID_BEGIN_GROUP, sal_True ); + pPopup->EnableItem( ID_DELETE, sal_True ); + pPopup->EnableItem( ID_RENAME, sal_True ); + pPopup->EnableItem( ID_ICON_ONLY, sal_True ); + pPopup->EnableItem( ID_ICON_AND_TEXT, sal_True ); + pPopup->EnableItem( ID_TEXT_ONLY, sal_True ); + pPopup->EnableItem( ID_CHANGE_SYMBOL, sal_True ); if ( !pEntryData->IsUserDefined() ) - pPopup->EnableItem( ID_DEFAULT_COMMAND, TRUE ); + pPopup->EnableItem( ID_DEFAULT_COMMAND, sal_True ); if ( pEntryData->IsIconModified() ) - pPopup->EnableItem( ID_RESET_SYMBOL, TRUE ); + pPopup->EnableItem( ID_RESET_SYMBOL, sal_True ); aDescriptionField.SetNewText( pEntryData->GetHelpText() ); } @@ -4627,16 +4627,16 @@ IMPL_LINK( SvxToolbarConfigPage, SelectToolbar, ListBox *, pBox ) SvxConfigEntry* pToolbar = GetTopLevelSelection(); if ( pToolbar == NULL ) { - aModifyTopLevelButton.Enable( FALSE ); - aModifyCommandButton.Enable( FALSE ); - aAddCommandsButton.Enable( FALSE ); + aModifyTopLevelButton.Enable( sal_False ); + aModifyCommandButton.Enable( sal_False ); + aAddCommandsButton.Enable( sal_False ); return 0; } - aModifyTopLevelButton.Enable( TRUE ); - aModifyCommandButton.Enable( TRUE ); - aAddCommandsButton.Enable( TRUE ); + aModifyTopLevelButton.Enable( sal_True ); + aModifyCommandButton.Enable( sal_True ); + aAddCommandsButton.Enable( sal_True ); PopupMenu* pPopup = aModifyTopLevelButton.GetPopupMenu(); @@ -4704,8 +4704,8 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton ) SvxNewToolbarDialog* pNameDialog = new SvxNewToolbarDialog( 0, aNewName ); - USHORT nInsertPos; - for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) + sal_uInt16 nInsertPos; + for ( sal_uInt16 i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) { SaveInData* pData = (SaveInData*) aSaveInListBox.GetEntryData( i ); @@ -4717,7 +4717,7 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton ) } pNameDialog->aSaveInListBox.SelectEntryPos( - aSaveInListBox.GetSelectEntryPos(), TRUE ); + aSaveInListBox.GetSelectEntryPos(), sal_True ); bool ret = pNameDialog->Execute(); if ( ret == RET_OK ) @@ -4731,24 +4731,24 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton ) if ( GetSaveInData() != pData ) { - aSaveInListBox.SelectEntryPos( nInsertPos, TRUE ); + aSaveInListBox.SelectEntryPos( nInsertPos, sal_True ); aSaveInListBox.GetSelectHdl().Call(this); } SvxConfigEntry* pToolbar = - new SvxConfigEntry( aNewName, aNewURL, TRUE ); + new SvxConfigEntry( aNewName, aNewURL, sal_True ); - pToolbar->SetUserDefined( TRUE ); - pToolbar->SetMain( TRUE ); + pToolbar->SetUserDefined( sal_True ); + pToolbar->SetMain( sal_True ); pData->CreateToolbar( pToolbar ); nInsertPos = aTopLevelListBox.InsertEntry( pToolbar->GetName() ); aTopLevelListBox.SetEntryData( nInsertPos, pToolbar ); - aTopLevelListBox.SelectEntryPos( nInsertPos, TRUE ); + aTopLevelListBox.SelectEntryPos( nInsertPos, sal_True ); aTopLevelListBox.GetSelectHdl().Call(this); - pData->SetModified( TRUE ); + pData->SetModified( sal_True ); } delete pNameDialog; @@ -4763,7 +4763,7 @@ IMPL_LINK( SvxToolbarConfigPage, AddCommandsHdl, Button *, pButton ) if ( pSelectorDlg == NULL ) { // Create Script Selector which shows slot commands - pSelectorDlg = new SvxScriptSelectorDialog( this, TRUE, m_xFrame ); + pSelectorDlg = new SvxScriptSelectorDialog( this, sal_True, m_xFrame ); // Position the Script Selector over the Add button so it is // beside the menu contents list and does not obscure it @@ -4800,7 +4800,7 @@ SvLBoxEntry* SvxToolbarConfigPage::AddFunction( if ( pEntry->IsBinding() ) { - pEntry->SetVisible( TRUE ); + pEntry->SetVisible( sal_True ); aContentsListBox->SetCheckButtonState( pNewLBEntry, SV_BUTTON_CHECKED ); } @@ -4884,8 +4884,8 @@ Image SvxToolbarEntriesListBox::GetSizedImage( // Position image at the center of (width-2),(height) rectangle. // We need 2 pixels to have a bigger border to the next button image - USHORT nPosX = std::max( (USHORT) (((( aNewSize.Width() - 2 ) - aImage.GetSizePixel().Width() ) / 2 ) - 1), (USHORT) 0 ); - USHORT nPosY = std::max( (USHORT) (((( aNewSize.Height() - 2 ) - aImage.GetSizePixel().Height() ) / 2 ) + 1), (USHORT) 0 ); + sal_uInt16 nPosX = std::max( (sal_uInt16) (((( aNewSize.Width() - 2 ) - aImage.GetSizePixel().Width() ) / 2 ) - 1), (sal_uInt16) 0 ); + sal_uInt16 nPosY = std::max( (sal_uInt16) (((( aNewSize.Height() - 2 ) - aImage.GetSizePixel().Height() ) / 2 ) + 1), (sal_uInt16) 0 ); Point aPos( nPosX > 0 ? nPosX : 0, nPosY > 0 ? nPosY : 0 ); aDev.SetFillColor( aFillColor ); aDev.SetLineColor( aFillColor ); @@ -4961,14 +4961,14 @@ void SvxToolbarEntriesListBox::KeyInput( const KeyEvent& rKeyEvent ) } } -BOOL SvxToolbarEntriesListBox::NotifyMoving( +sal_Bool SvxToolbarEntriesListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pSource, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos) + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos) { bool result = SvxMenuEntriesListBox::NotifyMoving( pTarget, pSource, rpNewParent, rNewChildPos ); - if ( result == TRUE ) + if ( result == sal_True ) { // Instant Apply changes to UI SvxConfigEntry* pToolbar = pPage->GetTopLevelSelection(); @@ -4983,11 +4983,11 @@ BOOL SvxToolbarEntriesListBox::NotifyMoving( return result; } -BOOL SvxToolbarEntriesListBox::NotifyCopying( +sal_Bool SvxToolbarEntriesListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pSource, SvLBoxEntry*& rpNewParent, - ULONG& rNewChildPos) + sal_uLong& rNewChildPos) { (void)pSource; (void)rpNewParent; @@ -5009,11 +5009,11 @@ BOOL SvxToolbarEntriesListBox::NotifyCopying( // AddFunction already adds the listbox entry so return FALSE // to stop another listbox entry being added - return FALSE; + return sal_False; } // Copying is only allowed from external controls, not within the listbox - return FALSE; + return sal_False; } SvxNewToolbarDialog::SvxNewToolbarDialog( @@ -5076,7 +5076,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ImageInfo; - aTbSymbol.SetPageScroll( TRUE ); + aTbSymbol.SetPageScroll( sal_True ); bool bLargeIcons = GetImageType() & css::ui::ImageType::SIZE_LARGE; m_nExpectedSize = bLargeIcons ? 26 : 16; @@ -5100,7 +5100,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, if ( !m_xGraphProvider.is() ) { - aBtnImport.Enable( FALSE ); + aBtnImport.Enable( sal_False ); } uno::Reference< beans::XPropertySet > xPropSet( @@ -5125,7 +5125,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, } else { - aBtnImport.Enable( FALSE ); + aBtnImport.Enable( sal_False ); } aDirectory += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "soffice.cfg/import" ) ); @@ -5166,7 +5166,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, for ( sal_Int32 n = 0; n < names.getLength(); n++ ) mImageInfo.insert( ImageInfo::value_type( names[n], false )); } - USHORT nId = 1; + sal_uInt16 nId = 1; ImageInfo::const_iterator pConstIter = mImageInfo.begin(); uno::Sequence< OUString > name( 1 ); while ( pConstIter != mImageInfo.end() ) @@ -5246,7 +5246,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, ++pConstIter; } - aBtnDelete.Enable( FALSE ); + aBtnDelete.Enable( sal_False ); aTbSymbol.SetSelectHdl( LINK(this, SvxIconSelectorDialog, SelectHdl) ); aBtnImport.SetClickHdl( LINK(this, SvxIconSelectorDialog, ImportHdl) ); aBtnDelete.SetClickHdl( LINK(this, SvxIconSelectorDialog, DeleteHdl) ); @@ -5256,11 +5256,11 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, SvxIconSelectorDialog::~SvxIconSelectorDialog() { - USHORT nCount = aTbSymbol.GetItemCount(); + sal_uInt16 nCount = aTbSymbol.GetItemCount(); - for (USHORT n = 0; n < nCount; n++ ) + for (sal_uInt16 n = 0; n < nCount; n++ ) { - USHORT nId = aTbSymbol.GetItemId(n); + sal_uInt16 nId = aTbSymbol.GetItemId(n); uno::XInterface* xi = static_cast< uno::XInterface* >( aTbSymbol.GetItemData( nId ) ); @@ -5276,8 +5276,8 @@ uno::Reference< graphic::XGraphic> SvxIconSelectorDialog::GetSelectedIcon() { uno::Reference< graphic::XGraphic > result; - USHORT nId; - for ( USHORT n = 0; n < aTbSymbol.GetItemCount(); n++ ) + sal_uInt16 nId; + for ( sal_uInt16 n = 0; n < aTbSymbol.GetItemCount(); n++ ) { nId = aTbSymbol.GetItemId( n ); if ( aTbSymbol.IsItemChecked( nId ) ) @@ -5295,29 +5295,29 @@ IMPL_LINK( SvxIconSelectorDialog, SelectHdl, ToolBox *, pToolBox ) { (void)pToolBox; - USHORT nCount = aTbSymbol.GetItemCount(); + sal_uInt16 nCount = aTbSymbol.GetItemCount(); - for (USHORT n = 0; n < nCount; n++ ) + for (sal_uInt16 n = 0; n < nCount; n++ ) { - USHORT nId = aTbSymbol.GetItemId( n ); + sal_uInt16 nId = aTbSymbol.GetItemId( n ); if ( aTbSymbol.IsItemChecked( nId ) ) { - aTbSymbol.CheckItem( nId, FALSE ); + aTbSymbol.CheckItem( nId, sal_False ); } } - USHORT nId = aTbSymbol.GetCurItemId(); + sal_uInt16 nId = aTbSymbol.GetCurItemId(); aTbSymbol.CheckItem( nId ); ::rtl::OUString aSelImageText = aTbSymbol.GetItemText( nId ); if ( m_xImportedImageManager->hasImage( GetImageType(), aSelImageText ) ) { - aBtnDelete.Enable( TRUE ); + aBtnDelete.Enable( sal_True ); } else { - aBtnDelete.Enable( FALSE ); + aBtnDelete.Enable( sal_False ); } return 0; @@ -5362,11 +5362,11 @@ IMPL_LINK( SvxIconSelectorDialog, DeleteHdl, PushButton *, pButton ) if ( ret == RET_OK ) { - USHORT nCount = aTbSymbol.GetItemCount(); + sal_uInt16 nCount = aTbSymbol.GetItemCount(); - for (USHORT n = 0; n < nCount; n++ ) + for (sal_uInt16 n = 0; n < nCount; n++ ) { - USHORT nId = aTbSymbol.GetItemId( n ); + sal_uInt16 nId = aTbSymbol.GetItemId( n ); if ( aTbSymbol.IsItemChecked( nId ) ) { @@ -5402,7 +5402,7 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem( aMediaProps[0].Value <<= aURL; com::sun::star::awt::Size aSize; - bool bOK = FALSE; + bool bOK = sal_False; try { xGraphic = m_xGraphProvider->queryGraphic( aMediaProps ); @@ -5413,9 +5413,9 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem( OUString::createFromAscii("SizePixel") ); a >>= aSize; if (0 == aSize.Width || 0 == aSize.Height) - return FALSE; + return sal_False; else - bOK = TRUE; + bOK = sal_True; } catch ( uno::Exception& ) { @@ -5423,10 +5423,10 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem( } bool bResult( false ); - USHORT nCount = aTbSymbol.GetItemCount(); - for (USHORT n = 0; n < nCount; n++ ) + sal_uInt16 nCount = aTbSymbol.GetItemCount(); + for (sal_uInt16 n = 0; n < nCount; n++ ) { - USHORT nId = aTbSymbol.GetItemId( n ); + sal_uInt16 nId = aTbSymbol.GetItemId( n ); if ( OUString( aTbSymbol.GetItemText( nId ) ) == aURL ) { @@ -5471,7 +5471,7 @@ void SvxIconSelectorDialog::ImportGraphics( uno::Sequence< OUString > rejected( rPaths.getLength() ); sal_Int32 rejectedCount = 0; - USHORT ret = 0; + sal_uInt16 ret = 0; sal_Int32 aIndex; OUString aIconName; uno::Sequence< OUString > URLs(1); @@ -5495,7 +5495,7 @@ void SvxIconSelectorDialog::ImportGraphics( } else { - if ( ImportGraphic( rPaths[0] ) == FALSE ) + if ( ImportGraphic( rPaths[0] ) == sal_False ) { rejected[0] = rPaths[0]; rejectedCount = 1; @@ -5515,7 +5515,7 @@ void SvxIconSelectorDialog::ImportGraphics( { aIndex = rPaths[i].lastIndexOf( '/' ); aIconName = rPaths[i].copy( aIndex+1 ); - ret = SvxIconReplacementDialog( this, aIconName, TRUE ).ShowDialog(); + ret = SvxIconReplacementDialog( this, aIconName, sal_True ).ShowDialog(); if ( ret == 2 ) { ReplaceGraphicItem( aPath ); @@ -5530,7 +5530,7 @@ void SvxIconSelectorDialog::ImportGraphics( if ( !bHasReplaced ) { bool result = ImportGraphic( aPath ); - if ( result == FALSE ) + if ( result == sal_False ) { rejected[ rejectedCount ] = rPaths[i]; rejectedCount++; @@ -5543,7 +5543,7 @@ void SvxIconSelectorDialog::ImportGraphics( else { bool result = ImportGraphic( aSourcePath + rPaths[i] ); - if ( result == FALSE ) + if ( result == sal_False ) { rejected[ rejectedCount ] = rPaths[i]; rejectedCount++; @@ -5572,9 +5572,9 @@ void SvxIconSelectorDialog::ImportGraphics( bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) { - bool result = FALSE; + bool result = sal_False; - USHORT nId = m_nNextId; + sal_uInt16 nId = m_nNextId; ++m_nNextId; uno::Sequence< beans::PropertyValue > aMediaProps( 1 ); @@ -5582,7 +5582,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) uno::Reference< graphic::XGraphic > xGraphic; com::sun::star::awt::Size aSize; - bool bOK = TRUE; + bool bOK = sal_True; aMediaProps[0].Value <<= aURL; try { @@ -5597,7 +5597,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) { a >>= aSize; if ( 0 == aSize.Width || 0 == aSize.Height ) - bOK = FALSE; + bOK = sal_False; Image aImage( xGraphic ); @@ -5629,7 +5629,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) xConfigPersistence->store(); } - result = TRUE; + result = sal_True; } else { @@ -5691,7 +5691,7 @@ rtl::OUString SvxIconReplacementDialog :: ReplaceIconName( const OUString& rMess return name; } -USHORT SvxIconReplacementDialog :: ShowDialog() +sal_uInt16 SvxIconReplacementDialog :: ShowDialog() { this->Execute(); return ( this->GetCurButtonId() ); @@ -5713,8 +5713,8 @@ SvxIconChangeDialog::SvxIconChangeDialog( FreeResource(); aFImageInfo.SetImage(InfoBox::GetStandardImage()); aLineEditDescription.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() ); - aLineEditDescription.SetAutoScroll( TRUE ); - aLineEditDescription.EnableCursor( FALSE ); + aLineEditDescription.SetAutoScroll( sal_True ); + aLineEditDescription.EnableCursor( sal_False ); aLineEditDescription.SetText(aMessage); } diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index ceb6b8f1e30e..59fc088abe1e 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -344,8 +344,8 @@ void SfxConfigFunctionListBox_Impl::ClearAll() vorhandenen MacroInfos. */ { - USHORT nCount = aArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = aArr.Count(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { SfxGroupInfo_Impl *pData = aArr[i]; @@ -473,7 +473,7 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() : } SfxConfigGroupListBox_Impl::SfxConfigGroupListBox_Impl( - Window* pParent, const ResId& rResId, ULONG nConfigMode ) + Window* pParent, const ResId& rResId, sal_uLong nConfigMode ) : SvTreeListBox( pParent, rResId ) , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), nMode( nConfigMode ), pStylesInfo(0) { @@ -490,8 +490,8 @@ SfxConfigGroupListBox_Impl::~SfxConfigGroupListBox_Impl() void SfxConfigGroupListBox_Impl::ClearAll() { - USHORT nCount = aArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = aArr.Count(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { SfxGroupInfo_Impl *pData = aArr[i]; if ( pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER @@ -639,7 +639,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul const css::uno::Reference< css::frame::XFrame >& xFrame , const ::rtl::OUString& sModuleLongName) { - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); ClearAll(); // Remove all old entries from treelist box m_xFrame = xFrame; @@ -694,7 +694,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul String aTitle(pImp->m_sDlgMacros); SvLBoxEntry *pNewEntry = InsertEntry( aTitle, NULL ); pNewEntry->SetUserData( pInfo ); - pNewEntry->EnableChildsOnDemand( TRUE ); + pNewEntry->EnableChildsOnDemand( sal_True ); aArr.Insert( pInfo, aArr.Count() ); } else @@ -706,13 +706,13 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul { Sequence< Reference< browse::XBrowseNode > > children = rootNode->getChildNodes(); - BOOL bIsRootNode = FALSE; + sal_Bool bIsRootNode = sal_False; ::rtl::OUString user = ::rtl::OUString::createFromAscii("user"); ::rtl::OUString share = ::rtl::OUString::createFromAscii("share"); if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") )) { - bIsRootNode = TRUE; + bIsRootNode = sal_True; } //To mimic current starbasic behaviour we @@ -731,14 +731,14 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul for ( sal_Int32 n = 0; n < children.getLength(); n++ ) { Reference< browse::XBrowseNode >& theChild = children[n]; - BOOL bDisplay = TRUE; + sal_Bool bDisplay = sal_True; ::rtl::OUString uiName = theChild->getName(); if ( bIsRootNode ) { if ( ! ((theChild->getName().equals( user ) || theChild->getName().equals( share ) || theChild->getName().equals( currentDocTitle ) ) ) ) { - bDisplay=FALSE; + bDisplay=sal_False; } else { @@ -784,7 +784,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul { if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) { - pNewEntry->EnableChildsOnDemand( TRUE ); + pNewEntry->EnableChildsOnDemand( sal_True ); m = grandchildren.getLength(); } } @@ -807,11 +807,11 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_STYLES, 0, 0 ); // TODO last parameter should contain user data aArr.Insert( pInfo, aArr.Count() ); pEntry->SetUserData( pInfo ); - pEntry->EnableChildsOnDemand( TRUE ); + pEntry->EnableChildsOnDemand( sal_True ); } MakeVisible( GetEntry( 0,0 ) ); - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); } Image SfxConfigGroupListBox_Impl::GetImage( Reference< browse::XBrowseNode > node, Reference< XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast ) { @@ -987,13 +987,13 @@ void SfxConfigGroupListBox_Impl::GroupSelected() { SvLBoxEntry *pEntry = FirstSelected(); SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData(); - pFunctionListBox->SetUpdateMode(FALSE); + pFunctionListBox->SetUpdateMode(sal_False); pFunctionListBox->ClearAll(); if ( pInfo->nKind != SFX_CFGGROUP_FUNCTION && pInfo->nKind != SFX_CFGGROUP_SCRIPTCONTAINER && pInfo->nKind != SFX_CFGGROUP_STYLES ) { - pFunctionListBox->SetUpdateMode(TRUE); + pFunctionListBox->SetUpdateMode(sal_True); return; } @@ -1001,7 +1001,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected() { case SFX_CFGGROUP_FUNCTION : { - USHORT nGroup = pInfo->nUniqueID; + sal_uInt16 nGroup = pInfo->nUniqueID; css::uno::Reference< css::frame::XDispatchInformationProvider > xProvider (m_xFrame, css::uno::UNO_QUERY_THROW); css::uno::Sequence< css::frame::DispatchInformation > lCommands = xProvider->getConfigurableDispatchInformation(nGroup); sal_Int32 c = lCommands.getLength(); @@ -1110,31 +1110,31 @@ void SfxConfigGroupListBox_Impl::GroupSelected() if ( pFunctionListBox->GetEntryCount() ) pFunctionListBox->Select( pFunctionListBox->GetEntry( 0, 0 ) ); - pFunctionListBox->SetUpdateMode(TRUE); + pFunctionListBox->SetUpdateMode(sal_True); } -BOOL SfxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) +sal_Bool SfxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) { - BOOL bRet = SvTreeListBox::Expand( pParent ); + sal_Bool bRet = SvTreeListBox::Expand( pParent ); if ( bRet ) { // Wieviele Entries k"onnen angezeigt werden ? - ULONG nEntries = GetOutputSizePixel().Height() / GetEntryHeight(); + sal_uLong nEntries = GetOutputSizePixel().Height() / GetEntryHeight(); // Wieviele Kinder sollen angezeigt werden ? - ULONG nChildCount = GetVisibleChildCount( pParent ); + sal_uLong nChildCount = GetVisibleChildCount( pParent ); // Passen alle Kinder und der parent gleichzeitig in die View ? if ( nChildCount+1 > nEntries ) { // Wenn nicht, wenigstens parent ganz nach oben schieben - MakeVisible( pParent, TRUE ); + MakeVisible( pParent, sal_True ); } else { // An welcher relativen ViewPosition steht der aufzuklappende parent SvLBoxEntry *pEntry = GetFirstEntryInView(); - ULONG nParentPos = 0; + sal_uLong nParentPos = 0; while ( pEntry && pEntry != pParent ) { nParentPos++; @@ -1156,7 +1156,7 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) */ { SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData(); - pInfo->bWasOpened = TRUE; + pInfo->bWasOpened = sal_True; switch ( pInfo->nKind ) { case SFX_CFGGROUP_SCRIPTCONTAINER: @@ -1171,19 +1171,19 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) { Sequence< Reference< browse::XBrowseNode > > children = rootNode->getChildNodes(); - BOOL bIsRootNode = FALSE; + sal_Bool bIsRootNode = sal_False; ::rtl::OUString user = ::rtl::OUString::createFromAscii("user"); ::rtl::OUString share = ::rtl::OUString::createFromAscii("share"); if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") )) { - bIsRootNode = TRUE; + bIsRootNode = sal_True; } /* To mimic current starbasic behaviour we need to make sure that only the current document is displayed in the config tree. Tests below - set the bDisplay flag to FALSE if the current + set the bDisplay flag to sal_False if the current node is a first level child of the Root and is NOT either the current document, user or share */ ::rtl::OUString currentDocTitle; @@ -1198,11 +1198,11 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) { Reference< browse::XBrowseNode >& theChild = children[n]; ::rtl::OUString aName( theChild->getName() ); - BOOL bDisplay = TRUE; + sal_Bool bDisplay = sal_True; if ( bIsRootNode ) { if ( !( (aName.equals(user) || aName.equals(share) || aName.equals(currentDocTitle) ) ) ) - bDisplay=FALSE; + bDisplay=sal_False; } if ( children[n].is() && children[n]->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay ) { @@ -1238,7 +1238,7 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) { if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) { - pNewEntry->EnableChildsOnDemand( TRUE ); + pNewEntry->EnableChildsOnDemand( sal_True ); m = grandchildren.getLength(); } } @@ -1269,7 +1269,7 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_STYLES, 0, pFamily ); aArr.Insert( pGrpInfo, aArr.Count() ); pStyleEntry->SetUserData( pGrpInfo ); - pStyleEntry->EnableChildsOnDemand( FALSE ); + pStyleEntry->EnableChildsOnDemand( sal_False ); } } break; @@ -1294,7 +1294,7 @@ void SfxConfigGroupListBox_Impl::SelectMacro( const String& rBasic, aBasicName += ' '; aBasicName += pImp->m_sMacros; String aLib, aModule, aMethod; - USHORT nCount = rMacro.GetTokenCount('.'); + sal_uInt16 nCount = rMacro.GetTokenCount('.'); aMethod = rMacro.GetToken( nCount-1, '.' ); if ( nCount > 2 ) { diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index be7658957535..de4b8dcbf462 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -70,7 +70,7 @@ SvxEventConfigPage::SvxEventConfigPage( Window *pParent, const SfxItemSet& rSet, _SvxMacroTabPage( pParent, CUI_RES(RID_SVXPAGE_EVENTS), rSet ), aSaveInText( this, CUI_RES( TXT_SAVEIN ) ), aSaveInListBox( this, CUI_RES( LB_SAVEIN ) ), - bAppConfig ( TRUE ) + bAppConfig ( sal_True ) { mpImpl->pStrEvent = new String( CUI_RES( STR_EVENT )); mpImpl->pAssignedMacro = new String( CUI_RES( STR_ASSMACRO )); @@ -102,7 +102,7 @@ SvxEventConfigPage::SvxEventConfigPage( Window *pParent, const SfxItemSet& rSet, "com.sun.star.frame.GlobalEventBroadcaster" ) ), uno::UNO_QUERY ); - USHORT nPos(0); + sal_uInt16 nPos(0); if ( xSupplier.is() ) { m_xAppEvents = xSupplier->getEvents(); @@ -111,7 +111,7 @@ SvxEventConfigPage::SvxEventConfigPage( Window *pParent, const SfxItemSet& rSet, utl::ConfigManager::PRODUCTNAME ) >>= label; nPos = aSaveInListBox.InsertEntry( label ); aSaveInListBox.SetEntryData( nPos, new bool(true) ); - aSaveInListBox.SelectEntryPos( nPos, TRUE ); + aSaveInListBox.SelectEntryPos( nPos, sal_True ); } } @@ -167,10 +167,10 @@ void SvxEventConfigPage::ImplInitDocument() m_xDocumentModifiable = m_xDocumentModifiable.query( xModel ); OUString aTitle = ::comphelper::DocumentInfo::getDocumentTitle( xModel ); - USHORT nPos = aSaveInListBox.InsertEntry( aTitle ); + sal_uInt16 nPos = aSaveInListBox.InsertEntry( aTitle ); aSaveInListBox.SetEntryData( nPos, new bool(false) ); - aSaveInListBox.SelectEntryPos( nPos, TRUE ); + aSaveInListBox.SelectEntryPos( nPos, sal_True ); bAppConfig = false; } @@ -190,16 +190,16 @@ IMPL_LINK( SvxEventConfigPage, SelectHdl_Impl, ListBox *, pBox ) bool* bApp = (bool*) aSaveInListBox.GetEntryData( aSaveInListBox.GetSelectEntryPos()); - mpImpl->pEventLB->SetUpdateMode( FALSE ); + mpImpl->pEventLB->SetUpdateMode( sal_False ); bAppConfig = *bApp; if ( *bApp ) { - SetReadOnly( FALSE ); + SetReadOnly( sal_False ); _SvxMacroTabPage::DisplayAppEvents( true ); } else { - bool isReadonly = FALSE; + bool isReadonly = sal_False; uno::Reference< frame::XFramesSupplier > xFramesSupplier( ::comphelper::getProcessServiceFactory()->createInstance( @@ -226,13 +226,13 @@ IMPL_LINK( SvxEventConfigPage, SelectHdl_Impl, ListBox *, pBox ) _SvxMacroTabPage::DisplayAppEvents( false ); } - mpImpl->pEventLB->SetUpdateMode( TRUE ); - return TRUE; + mpImpl->pEventLB->SetUpdateMode( sal_True ); + return sal_True; } // ----------------------------------------------------------------------- -BOOL SvxEventConfigPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxEventConfigPage::FillItemSet( SfxItemSet& rSet ) { return _SvxMacroTabPage::FillItemSet( rSet ); } diff --git a/cui/source/customize/eventdlg.hxx b/cui/source/customize/eventdlg.hxx index dc2e657d65fb..26e4f5848134 100644 --- a/cui/source/customize/eventdlg.hxx +++ b/cui/source/customize/eventdlg.hxx @@ -48,7 +48,7 @@ class SvxEventConfigPage : public _SvxMacroTabPage ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > m_xDocumentEvents; ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifiable > m_xDocumentModifiable; - BOOL bAppConfig; + sal_Bool bAppConfig; DECL_LINK( SelectHdl_Impl, ListBox* ); @@ -65,7 +65,7 @@ public: void LateInit( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame ); protected: - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet& ); using _SvxMacroTabPage::Reset; diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 8b9bd789c48f..3d0763b8d378 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -75,11 +75,11 @@ _SvxMacroTabPage_Impl::_SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet ) : pStrEvent( NULL ), pAssignedMacro( NULL ), pEventLB( NULL ), - bReadOnly( FALSE ), - bIDEDialogMode( FALSE ) + bReadOnly( sal_False ), + bIDEDialogMode( sal_False ) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == rAttrSet.GetItemState( SID_ATTR_MACROITEM, FALSE, &pItem ) ) + if ( SFX_ITEM_SET == rAttrSet.GetItemState( SID_ATTR_MACROITEM, sal_False, &pItem ) ) bIDEDialogMode = ((const SfxBoolItem*)pItem)->GetValue(); } @@ -127,7 +127,7 @@ IMPL_LINK( _HeaderTabListBox, HeaderEndDrag_Impl, HeaderBar*, pBar ) if( !maHeaderBar.IsItemMode() ) { Size aSz; - USHORT _nTabs = maHeaderBar.GetItemCount(); + sal_uInt16 _nTabs = maHeaderBar.GetItemCount(); long nTmpSz = 0; long nWidth = maHeaderBar.GetItemSize( ITEMID_EVENT ); long nBarWidth = maHeaderBar.GetSizePixel().Width(); @@ -139,7 +139,7 @@ IMPL_LINK( _HeaderTabListBox, HeaderEndDrag_Impl, HeaderBar*, pBar ) { long _nWidth; - for( USHORT i = 1 ; i < _nTabs ; ++i ) + for( sal_uInt16 i = 1 ; i < _nTabs ; ++i ) { _nWidth = maHeaderBar.GetItemSize( i ); aSz.Width() = _nWidth + nTmpSz; @@ -196,7 +196,7 @@ void _HeaderTabListBox::ConnectElements( void ) maListBox.InitHeaderBar( &maHeaderBar ); } -void _HeaderTabListBox::Show( BOOL bVisible, USHORT nFlags ) +void _HeaderTabListBox::Show( sal_Bool bVisible, sal_uInt16 nFlags ) { maListBox.Show( bVisible, nFlags ); maHeaderBar.Show( bVisible, nFlags ); @@ -340,7 +340,7 @@ void _SvxMacroTabPage::InitResources() // the following method is called when the user clicks OK // We use the contents of the hashes to replace the settings -BOOL _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) +sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) { try { @@ -391,7 +391,7 @@ BOOL _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) { } // what is the return value about?? - return FALSE; + return sal_False; } // the following method clears the bindings in the hashes for both doc & app @@ -438,12 +438,12 @@ void _SvxMacroTabPage::Reset() DisplayAppEvents(bAppEvents); } -void _SvxMacroTabPage::SetReadOnly( BOOL bSet ) +void _SvxMacroTabPage::SetReadOnly( sal_Bool bSet ) { mpImpl->bReadOnly = bSet; } -BOOL _SvxMacroTabPage::IsReadOnly() const +sal_Bool _SvxMacroTabPage::IsReadOnly() const { return mpImpl->bReadOnly; } @@ -458,14 +458,14 @@ class IconLBoxString : public SvLBoxString int m_nxImageOffset; public: - IconLBoxString( SvLBoxEntry* pEntry, USHORT nFlags, const String& sText, + IconLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& sText, Image* pMacroImg, Image* pComponentImg, Image* pMacroImg_h, Image* pComponentImg_h ); - virtual void Paint(const Point& aPos, SvLBox& aDevice, USHORT nFlags, SvLBoxEntry* pEntry ); + virtual void Paint(const Point& aPos, SvLBox& aDevice, sal_uInt16 nFlags, SvLBoxEntry* pEntry ); }; -IconLBoxString::IconLBoxString( SvLBoxEntry* pEntry, USHORT nFlags, const String& sText, +IconLBoxString::IconLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& sText, Image* pMacroImg, Image* pComponentImg, Image* pMacroImg_h, Image* pComponentImg_h ) : SvLBoxString( pEntry, nFlags, sText ) , m_pMacroImg( pMacroImg ) @@ -478,7 +478,7 @@ IconLBoxString::IconLBoxString( SvLBoxEntry* pEntry, USHORT nFlags, const String //=============================================== void IconLBoxString::Paint( const Point& aPos, SvLBox& aDevice, - USHORT /*nFlags*/, SvLBoxEntry* /*pEntry*/ ) + sal_uInt16 /*nFlags*/, SvLBoxEntry* /*pEntry*/ ) { String aTxt( GetText() ); if( aTxt.Len() ) @@ -487,7 +487,7 @@ void IconLBoxString::Paint( const Point& aPos, SvLBox& aDevice, sal_Int32 nIndex = aURL.indexOf( aVndSunStarUNO ); bool bUNO = nIndex == 0; - BOOL bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode(); const Image* pImg; if( bHC ) pImg = bUNO ? m_pComponentImg_h : m_pMacroImg_h; @@ -521,7 +521,7 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents) bAppEvents = appEvents; SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); - mpImpl->pEventLB->SetUpdateMode( FALSE ); + mpImpl->pEventLB->SetUpdateMode( sal_False ); rListBox.Clear(); SvLBoxEntry* pE = rListBox.GetEntry( 0 ); EventsHash* eventsHash; @@ -590,7 +590,7 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents) rListBox.MakeVisible( pE ); } - rListBox.SetUpdateMode( TRUE ); + rListBox.SetUpdateMode( sal_True ); EnableButtons(); } @@ -600,7 +600,7 @@ IMPL_STATIC_LINK( _SvxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG ) _SvxMacroTabPage_Impl* pImpl = pThis->mpImpl; SvHeaderTabListBox& rListBox = pImpl->pEventLB->GetListBox(); SvLBoxEntry* pE = rListBox.FirstSelected(); - ULONG nPos; + sal_uLong nPos; if( !pE || LISTBOX_ENTRY_NOTFOUND == ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) ) @@ -629,7 +629,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* _SvxMacroTabPage_Impl* pImpl = pThis->mpImpl; SvHeaderTabListBox& rListBox = pImpl->pEventLB->GetListBox(); SvLBoxEntry* pE = rListBox.FirstSelected(); - ULONG nPos; + sal_uLong nPos; if( !pE || LISTBOX_ENTRY_NOTFOUND == ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) ) { @@ -637,7 +637,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* return 0; } - const BOOL bAssEnabled = pBtn != pImpl->pDeletePB && pImpl->pAssignPB->IsEnabled(); + const sal_Bool bAssEnabled = pBtn != pImpl->pDeletePB && pImpl->pAssignPB->IsEnabled(); ::rtl::OUString* pEventName = (::rtl::OUString*)pE->GetUserData(); @@ -695,7 +695,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* else if( bAssEnabled ) { // assign pressed - SvxScriptSelectorDialog* pDlg = new SvxScriptSelectorDialog( pThis, FALSE, pThis->GetFrame() ); + SvxScriptSelectorDialog* pDlg = new SvxScriptSelectorDialog( pThis, sal_False, pThis->GetFrame() ); if( pDlg ) { short ret = pDlg->Execute(); @@ -724,7 +724,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* } // update the listbox entry - pImpl->pEventLB->SetUpdateMode( FALSE ); + pImpl->pEventLB->SetUpdateMode( sal_False ); // pE->ReplaceItem( new SvLBoxString( pE, 0, sEventURL ), LB_MACROS_ITEMPOS ); pE->ReplaceItem( new IconLBoxString( pE, 0, sEventURL, pImpl->pMacroImg, pImpl->pComponentImg, @@ -733,7 +733,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* rListBox.GetModel()->InvalidateEntry( pE ); rListBox.Select( pE ); rListBox.MakeVisible( pE ); - rListBox.SetUpdateMode( TRUE ); + rListBox.SetUpdateMode( sal_True ); pThis->EnableButtons(); return 0; @@ -773,7 +773,7 @@ void _SvxMacroTabPage::InitAndSetHandler( Reference< container::XNameReplace> xA mpImpl->pEventLB->GetListBox().SetEntryHeight( sal::static_int_cast< short >(nMinLineHeight) ); - mpImpl->pEventLB->Enable( TRUE ); + mpImpl->pEventLB->Enable( sal_True ); if(!m_xAppEvents.is()) { @@ -883,7 +883,7 @@ SvxMacroTabPage::SvxMacroTabPage( Window* pParent, const Reference< frame::XFram InitAndSetHandler( xNameReplace, Reference< container::XNameReplace>(0), Reference< util::XModifiable >(0)); DisplayAppEvents(true); SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); - SvLBoxEntry* pE = rListBox.GetEntry( (ULONG)nSelectedIndex ); + SvLBoxEntry* pE = rListBox.GetEntry( (sal_uLong)nSelectedIndex ); if( pE ) rListBox.Select(pE); } diff --git a/cui/source/customize/macropg_impl.hxx b/cui/source/customize/macropg_impl.hxx index 63c977cf2422..3ecf625419a4 100644 --- a/cui/source/customize/macropg_impl.hxx +++ b/cui/source/customize/macropg_impl.hxx @@ -45,8 +45,8 @@ public: String* pStrEvent; String* pAssignedMacro; _HeaderTabListBox* pEventLB; - BOOL bReadOnly; - BOOL bIDEDialogMode; + sal_Bool bReadOnly; + sal_Bool bIDEDialogMode; }; class AssignComponentDialog : public ModalDialog diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 1bdd559d8f14..5a1cc3b91e29 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -142,8 +142,8 @@ IMPL_LINK( SvxConfigFunctionListBox_Impl, TimerHdl, Timer*, EMPTYARG) void SvxConfigFunctionListBox_Impl::ClearAll() { - USHORT nCount = aArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = aArr.Count(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { SvxGroupInfo_Impl *pData = aArr[i]; delete pData; @@ -248,8 +248,8 @@ SvxConfigGroupListBox_Impl::~SvxConfigGroupListBox_Impl() void SvxConfigGroupListBox_Impl::ClearAll() { - USHORT nCount = aArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = aArr.Count(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { SvxGroupInfo_Impl *pData = aArr[i]; delete pData; @@ -326,12 +326,12 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows Sequence< Reference< browse::XBrowseNode > > children = _rxRootNode->getChildNodes(); - BOOL bIsRootNode = _rxRootNode->getName().equalsAscii("Root"); + sal_Bool bIsRootNode = _rxRootNode->getName().equalsAscii("Root"); /* To mimic current starbasic behaviour we need to make sure that only the current document is displayed in the config tree. Tests below - set the bDisplay flag to FALSE if the current + set the bDisplay flag to sal_False if the current node is a first level child of the Root and is NOT either the current document, user or share */ OUString sCurrentDocTitle; @@ -348,7 +348,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows if ( !theChild.is() ) continue; ::rtl::OUString sUIName = theChild->getName(); - BOOL bDisplay = TRUE; + sal_Bool bDisplay = sal_True; if ( bIsRootNode || ( m_bShowSlots && _pParentEntry && ( GetModel()->GetDepth( _pParentEntry ) == 0 ) ) @@ -368,7 +368,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows } else if ( !sUIName.equals( sCurrentDocTitle ) ) { - bDisplay = FALSE; + bDisplay = sal_False; } } @@ -400,7 +400,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows * way to determine if a basic lib had children * without having to ask for them (which forces * the library to be loaded */ - pNewEntry->EnableChildsOnDemand( TRUE ); + pNewEntry->EnableChildsOnDemand( sal_True ); } else { @@ -413,7 +413,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows { if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) { - pNewEntry->EnableChildsOnDemand( TRUE ); + pNewEntry->EnableChildsOnDemand( sal_True ); break; } } @@ -429,7 +429,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows void SvxConfigGroupListBox_Impl::Init() { - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); ClearAll(); Reference< XComponentContext > xContext; @@ -579,7 +579,7 @@ void SvxConfigGroupListBox_Impl::Init() SvLBoxEntry *pNewEntry = InsertEntry( aTitle, NULL ); pNewEntry->SetUserData( pInfo ); - pNewEntry->EnableChildsOnDemand( TRUE ); + pNewEntry->EnableChildsOnDemand( sal_True ); aArr.Insert( pInfo, aArr.Count() ); } else @@ -589,7 +589,7 @@ void SvxConfigGroupListBox_Impl::Init() } } MakeVisible( GetEntry( 0,0 ) ); - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); } Image SvxConfigGroupListBox_Impl::GetImage( Reference< browse::XBrowseNode > node, Reference< XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast ) @@ -719,12 +719,12 @@ void SvxConfigGroupListBox_Impl::GroupSelected() { SvLBoxEntry *pEntry = FirstSelected(); SvxGroupInfo_Impl *pInfo = (SvxGroupInfo_Impl*) pEntry->GetUserData(); - pFunctionListBox->SetUpdateMode(FALSE); + pFunctionListBox->SetUpdateMode(sal_False); pFunctionListBox->ClearAll(); if ( pInfo->nKind != SVX_CFGGROUP_FUNCTION && pInfo->nKind != SVX_CFGGROUP_SCRIPTCONTAINER ) { - pFunctionListBox->SetUpdateMode(TRUE); + pFunctionListBox->SetUpdateMode(sal_True); return; } @@ -895,31 +895,31 @@ void SvxConfigGroupListBox_Impl::GroupSelected() if ( pFunctionListBox->GetEntryCount() ) pFunctionListBox->Select( pFunctionListBox->GetEntry( 0, 0 ) ); - pFunctionListBox->SetUpdateMode(TRUE); + pFunctionListBox->SetUpdateMode(sal_True); } -BOOL SvxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) +sal_Bool SvxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) { - BOOL bRet = SvTreeListBox::Expand( pParent ); + sal_Bool bRet = SvTreeListBox::Expand( pParent ); if ( bRet ) { // Wieviele Entries k"onnen angezeigt werden ? - ULONG nEntries = GetOutputSizePixel().Height() / GetEntryHeight(); + sal_uLong nEntries = GetOutputSizePixel().Height() / GetEntryHeight(); // Wieviele Kinder sollen angezeigt werden ? - ULONG nChildCount = GetVisibleChildCount( pParent ); + sal_uLong nChildCount = GetVisibleChildCount( pParent ); // Passen alle Kinder und der parent gleichzeitig in die View ? if ( nChildCount+1 > nEntries ) { // Wenn nicht, wenigstens parent ganz nach oben schieben - MakeVisible( pParent, TRUE ); + MakeVisible( pParent, sal_True ); } else { // An welcher relativen ViewPosition steht der aufzuklappende parent SvLBoxEntry *pEntry = GetFirstEntryInView(); - ULONG nParentPos = 0; + sal_uLong nParentPos = 0; while ( pEntry && pEntry != pParent ) { nParentPos++; @@ -938,7 +938,7 @@ BOOL SvxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) void SvxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) { SvxGroupInfo_Impl *pInfo = (SvxGroupInfo_Impl*) pEntry->GetUserData(); - pInfo->bWasOpened = TRUE; + pInfo->bWasOpened = sal_True; switch ( pInfo->nKind ) { case SVX_CFGGROUP_SCRIPTCONTAINER: @@ -965,7 +965,7 @@ void SvxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) */ SvxScriptSelectorDialog::SvxScriptSelectorDialog( - Window* pParent, BOOL bShowSlots, const Reference< frame::XFrame >& xFrame ) + Window* pParent, sal_Bool bShowSlots, const Reference< frame::XFrame >& xFrame ) : ModelessDialog( pParent, CUI_RES( RID_DLG_SCRIPTSELECTOR ) ), aDialogDescription( this, CUI_RES( TXT_SELECTOR_DIALOG_DESCRIPTION ) ), @@ -1022,7 +1022,7 @@ void SvxScriptSelectorDialog::ResizeControls() Size s, news; 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 @@ -1115,12 +1115,12 @@ SvxScriptSelectorDialog::UpdateUI() aCommands.GetHelpText( aCommands.FirstSelected() ); aDescriptionText.SetText( rMessage ); - aOKButton.Enable( TRUE ); + aOKButton.Enable( sal_True ); } else { aDescriptionText.SetText( String() ); - aOKButton.Enable( FALSE ); + aOKButton.Enable( sal_False ); } } @@ -1130,7 +1130,7 @@ IMPL_LINK( SvxScriptSelectorDialog, ClickHdl, Button *, pButton ) { // If we are displaying Slot API commands then the dialog is being // run from Tools/Configure and we should not close it, just hide it - if ( m_bShowSlots == FALSE ) + if ( m_bShowSlots == sal_False ) { EndDialog( RET_CANCEL ); } @@ -1145,7 +1145,7 @@ IMPL_LINK( SvxScriptSelectorDialog, ClickHdl, Button *, pButton ) // If we are displaying Slot API commands then this the dialog is being // run from Tools/Configure and we should not close it - if ( m_bShowSlots == FALSE ) + if ( m_bShowSlots == sal_False ) { EndDialog( RET_OK ); } |