diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-01-14 12:41:27 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-01-14 12:41:27 +0100 |
commit | 13c1c67ec50995550076b7085d1a955b9df09cd0 (patch) | |
tree | 02d6eb0b5492436ffdad936fa6eff8e9b076d3a9 /cui/source/customize | |
parent | removetooltypes01: #i112600# remove tooltypes from extensions (diff) | |
download | core-13c1c67ec50995550076b7085d1a955b9df09cd0.tar.gz core-13c1c67ec50995550076b7085d1a955b9df09cd0.zip |
removetooltypes01: #i112600# remove tooltypes from cui
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 | 110 | ||||
-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, 428 insertions, 428 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 25ccabf2789b..5a1ed913b46a 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -113,7 +113,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 , @@ -573,7 +573,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 @@ -590,20 +590,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) { @@ -617,7 +617,7 @@ SfxAccCfgLBoxString_Impl::~SfxAccCfgLBoxString_Impl() //----------------------------------------------- void SfxAccCfgLBoxString_Impl::Paint(const Point& aPos , SvLBox& rDevice, - USHORT /*nFlags*/, + sal_uInt16 /*nFlags*/, SvLBoxEntry* pEntry ) { /*/ ??? realy needed !!! @@ -658,8 +658,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 ( @@ -677,8 +677,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 ) @@ -755,7 +755,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 ) @@ -888,9 +888,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]; @@ -906,7 +906,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) { @@ -914,7 +914,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; @@ -930,12 +930,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; @@ -1015,10 +1015,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)); @@ -1028,7 +1028,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(); @@ -1036,7 +1036,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 ); @@ -1047,11 +1047,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(); @@ -1066,17 +1066,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 ); } } @@ -1084,25 +1084,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 ); } @@ -1115,9 +1115,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); } @@ -1128,7 +1128,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(); @@ -1162,10 +1162,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); @@ -1234,10 +1234,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)); @@ -1388,7 +1388,7 @@ void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const String& rTi } //----------------------------------------------- -BOOL SfxAcceleratorConfigPage::FillItemSet( SfxItemSet& ) +sal_Bool SfxAcceleratorConfigPage::FillItemSet( SfxItemSet& ) { Apply(m_xAct); try @@ -1398,9 +1398,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; } //----------------------------------------------- @@ -1428,7 +1428,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 ); @@ -1436,11 +1436,11 @@ 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 ); if ( m_pStringItem ) @@ -1449,18 +1449,18 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet ) } //----------------------------------------------- -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 858564af4e40..7be7b5d88b15 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -438,9 +438,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 ) @@ -550,14 +550,14 @@ bool GetMenuItemData( } } - return TRUE; + return sal_True; } } catch ( ::com::sun::star::lang::IndexOutOfBoundsException& ) { } - return FALSE; + return sal_False; } bool GetToolbarItemData( @@ -643,9 +643,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() ) ); @@ -661,7 +661,7 @@ ConvertSvxConfigEntry( if ( tmpLabel.equals( pEntry->GetName() ) ) { - isDefaultName = TRUE; + isDefaultName = sal_True; } break; @@ -724,9 +724,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() ) ); @@ -742,7 +742,7 @@ ConvertToolbarEntry( if ( tmpLabel.equals( pEntry->GetName() ) ) { - isDefaultName = TRUE; + isDefaultName = sal_True; } break; @@ -876,7 +876,7 @@ short SvxConfigDialog::Ok() return SfxTabDialog::Ok(); } -void SvxConfigDialog::PageCreated( USHORT nId, SfxTabPage& rPage ) +void SvxConfigDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) { (void)rPage; @@ -915,9 +915,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 ) { @@ -1039,7 +1039,7 @@ Image SaveInData::GetImage( const OUString& rCommandURL ) bool SaveInData::PersistChanges( const uno::Reference< uno::XInterface >& xManager ) { - bool result = TRUE; + bool result = sal_True; try { @@ -1056,7 +1056,7 @@ bool SaveInData::PersistChanges( } catch ( com::sun::star::io::IOException& ) { - result = FALSE; + result = sal_False; } return result; @@ -1119,7 +1119,7 @@ MenuSaveInData::GetEntries() if ( pRootEntry == NULL ) { pRootEntry = new SvxConfigEntry( - String::CreateFromAscii("MainMenus"), String(), TRUE ); + String::CreateFromAscii("MainMenus"), String(), sal_True ); if ( m_xMenuSettings.is() ) { @@ -1164,7 +1164,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 ); @@ -1179,11 +1179,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 @@ -1208,7 +1208,7 @@ bool MenuSaveInData::LoadSubMenus( { // popup menu SvxConfigEntry* pEntry = new SvxConfigEntry( - aLabel, aCommandURL, TRUE ); + aLabel, aCommandURL, sal_True ); pEntry->SetUserDefined( bIsUserDefined ); @@ -1223,7 +1223,7 @@ bool MenuSaveInData::LoadSubMenus( } else { - pEntry->SetMain( TRUE ); + pEntry->SetMain( sal_True ); } subMenuTitle += stripHotKey( aLabel ); @@ -1233,7 +1233,7 @@ bool MenuSaveInData::LoadSubMenus( else { SvxConfigEntry* pEntry = new SvxConfigEntry( - aLabel, aCommandURL, FALSE ); + aLabel, aCommandURL, sal_False ); pEntry->SetUserDefined( bIsUserDefined ); pEntries->push_back( pEntry ); } @@ -1251,7 +1251,7 @@ bool MenuSaveInData::LoadSubMenus( bool MenuSaveInData::Apply() { - bool result = FALSE; + bool result = sal_False; if ( IsModified() ) { @@ -1293,7 +1293,7 @@ bool MenuSaveInData::Apply() OSL_TRACE("caught some other exception saving settings"); } - SetModified( FALSE ); + SetModified( sal_False ); result = PersistChanges( GetConfigManager() ); } @@ -1409,7 +1409,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 ); @@ -1463,7 +1463,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 ); @@ -1492,14 +1492,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 ) @@ -1519,27 +1519,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 @@ -1548,9 +1548,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; @@ -1563,11 +1563,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 ) @@ -1582,11 +1582,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 { @@ -1644,7 +1644,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 ) ), @@ -1665,8 +1665,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() @@ -1683,7 +1683,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; @@ -1729,7 +1729,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) pModuleData = CreateSaveInData( xCfgMgr, uno::Reference< css::ui::XUIConfigurationManager >(), aModuleId, - FALSE ); + sal_False ); } catch ( container::NoSuchElementException& ) { @@ -1770,7 +1770,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() ) { @@ -1781,35 +1781,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; } } @@ -1885,7 +1885,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() ) { @@ -1901,7 +1901,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) aSaveInListBox.SetSelectHdl( LINK( this, SvxConfigPage, SelectSaveInLocation ) ); - bInitialised = TRUE; + bInitialised = sal_True; Init(); } @@ -1972,11 +1972,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 ); @@ -2028,7 +2028,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() ) @@ -2039,7 +2039,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 ) @@ -2060,7 +2060,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 ); } @@ -2080,7 +2080,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 ); @@ -2129,8 +2129,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(); @@ -2190,7 +2190,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++; @@ -2213,14 +2213,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; @@ -2228,7 +2228,7 @@ SvLBoxEntry* SvxConfigPage::InsertEntryIntoUI( { pNewEntry = aContentsListBox->InsertEntry( String::CreateFromAscii( pSeparatorStr ), - 0, FALSE, nPos, pNewEntryData ); + 0, sal_False, nPos, pNewEntryData ); } else { @@ -2240,12 +2240,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() || @@ -2318,7 +2318,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 @@ -2333,9 +2333,9 @@ bool SvxConfigPage::MoveEntryData( pEntries->insert( pEntries->begin(), pSourceData ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); - return TRUE; + return sal_True; } else { @@ -2356,13 +2356,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( @@ -2417,13 +2417,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 ); @@ -2457,12 +2457,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(); @@ -2480,17 +2480,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() ); } @@ -2508,7 +2508,7 @@ void SvxMenuConfigPage::DeleteSelectedTopLevel() ReloadTopLevelListBox(); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } bool SvxMenuConfigPage::DeleteSelectedContent() @@ -2539,11 +2539,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() @@ -2619,7 +2619,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton ) ReloadTopLevelListBox(); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } // #i68101# Moemory leak (!) @@ -2643,7 +2643,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton ) ReloadTopLevelListBox( pDialog->GetSelectedEntry() ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } delete pDialog; @@ -2651,9 +2651,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 ) @@ -2675,14 +2675,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; @@ -2692,7 +2692,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; @@ -2723,7 +2723,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) pEntry->SetName( aNewName ); aContentsListBox->SetEntryText( pActEntry, aNewName ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } delete pNameDialog; @@ -2732,7 +2732,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) } default: { - return FALSE; + return sal_False; } } @@ -2741,7 +2741,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) UpdateButtonStates(); } - return TRUE; + return sal_True; } IMPL_LINK( SvxMenuConfigPage, AddFunctionHdl, @@ -2760,7 +2760,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(); @@ -2768,7 +2768,7 @@ IMPL_LINK( SvxMenuConfigPage, NewMenuHdl, Button *, pButton ) { GetSaveInData()->SetEntries( pDialog->GetEntries() ); ReloadTopLevelListBox( pDialog->GetSelectedEntry() ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } delete pDialog; @@ -2783,7 +2783,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 ) ); @@ -2827,7 +2827,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(); @@ -2866,9 +2866,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() ) ); @@ -3012,7 +3012,7 @@ IMPL_LINK( SvxMainMenuOrganizerDialog, MoveHdl, Button *, pButton ) aMenuListBox.GetModel()->Move( pSourceEntry, pTargetEntry ); aMenuListBox.MakeVisible( pSourceEntry ); - bModified = TRUE; + bModified = sal_True; } } @@ -3054,11 +3054,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 ) { @@ -3086,27 +3086,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( @@ -3151,8 +3151,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( @@ -3206,7 +3206,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 ); @@ -3225,7 +3225,7 @@ SvxToolbarConfigPage::~SvxToolbarConfigPage() void SvxToolbarConfigPage::DeleteSelectedTopLevel() { - USHORT nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); + sal_uInt16 nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); ToolbarSaveInData* pSaveInData = (ToolbarSaveInData*) GetSaveInData(); pSaveInData->RemoveToolbar( GetTopLevelSelection() ); @@ -3236,11 +3236,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 ); @@ -3292,10 +3292,10 @@ bool SvxToolbarConfigPage::DeleteSelectedContent() } } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } IMPL_LINK( SvxToolbarConfigPage, MoveHdl, Button *, pButton ) @@ -3321,7 +3321,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 ); @@ -3416,7 +3416,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(); @@ -3444,7 +3444,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) pEntry->SetName( aNewName ); aContentsListBox->SetEntryText( pActEntry, aNewName ); - bNeedsApply = TRUE; + bNeedsApply = sal_True; } delete pNameDialog; @@ -3456,10 +3456,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 ) { @@ -3479,7 +3479,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 ); @@ -3509,7 +3509,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) aContentsListBox->Select( pNewLBEntry ); aContentsListBox->MakeVisible( pNewLBEntry ); - bNeedsApply = TRUE; + bNeedsApply = sal_True; } catch ( uno::Exception& ) { @@ -3520,14 +3520,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: @@ -3553,10 +3553,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 ) { @@ -3636,10 +3636,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 ) { @@ -3691,7 +3691,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) } } - if ( bNeedsApply == TRUE ) + if ( bNeedsApply == sal_True ) { (( ToolbarSaveInData* ) GetSaveInData())->ApplyToolbar( pToolbar ); UpdateButtonStates(); @@ -3708,10 +3708,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 ); @@ -3728,7 +3728,7 @@ void SvxToolbarConfigPage::Init() m_aURLToSelect += OUString::createFromAscii( "standardbar" ); } - aTopLevelListBox.SelectEntryPos(nPos, TRUE); + aTopLevelListBox.SelectEntryPos(nPos, sal_True); aTopLevelListBox.GetSelectHdl().Call(this); } @@ -3977,7 +3977,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( @@ -4021,9 +4021,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 ) ); @@ -4033,11 +4033,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 ); @@ -4109,18 +4109,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 ); @@ -4167,14 +4167,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() @@ -4182,9 +4182,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() @@ -4232,7 +4232,7 @@ void ToolbarSaveInData::Reset() bool ToolbarSaveInData::Apply() { // toolbar changes are instantly applied - return FALSE; + return sal_False; } void ToolbarSaveInData::ApplyToolbar( @@ -4477,7 +4477,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; @@ -4494,11 +4494,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 @@ -4522,7 +4522,7 @@ bool ToolbarSaveInData::LoadToolbar( if ( xSubMenu.is() ) { SvxConfigEntry* pEntry = new SvxConfigEntry( - aLabel, aCommandURL, TRUE ); + aLabel, aCommandURL, sal_True ); pEntry->SetUserDefined( bIsUserDefined ); pEntry->SetVisible( bIsVisible ); @@ -4534,7 +4534,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 ); @@ -4563,15 +4563,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(); @@ -4583,22 +4583,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() ); } @@ -4628,16 +4628,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(); @@ -4705,8 +4705,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 ); @@ -4718,7 +4718,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 ) @@ -4732,24 +4732,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; @@ -4764,7 +4764,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 @@ -4801,7 +4801,7 @@ SvLBoxEntry* SvxToolbarConfigPage::AddFunction( if ( pEntry->IsBinding() ) { - pEntry->SetVisible( TRUE ); + pEntry->SetVisible( sal_True ); aContentsListBox->SetCheckButtonState( pNewLBEntry, SV_BUTTON_CHECKED ); } @@ -4885,8 +4885,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 ); @@ -4962,14 +4962,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(); @@ -4984,11 +4984,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; @@ -5010,11 +5010,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( @@ -5077,7 +5077,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; @@ -5101,7 +5101,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, if ( !m_xGraphProvider.is() ) { - aBtnImport.Enable( FALSE ); + aBtnImport.Enable( sal_False ); } uno::Reference< beans::XPropertySet > xPropSet( @@ -5126,7 +5126,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, } else { - aBtnImport.Enable( FALSE ); + aBtnImport.Enable( sal_False ); } aDirectory += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "soffice.cfg/import" ) ); @@ -5167,7 +5167,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() ) @@ -5247,7 +5247,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) ); @@ -5257,11 +5257,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 ) ); @@ -5277,8 +5277,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 ) ) @@ -5296,29 +5296,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; @@ -5363,11 +5363,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 ) ) { @@ -5403,7 +5403,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 ); @@ -5414,9 +5414,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& ) { @@ -5424,10 +5424,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 ) { @@ -5472,7 +5472,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); @@ -5496,7 +5496,7 @@ void SvxIconSelectorDialog::ImportGraphics( } else { - if ( ImportGraphic( rPaths[0] ) == FALSE ) + if ( ImportGraphic( rPaths[0] ) == sal_False ) { rejected[0] = rPaths[0]; rejectedCount = 1; @@ -5516,7 +5516,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 ); @@ -5531,7 +5531,7 @@ void SvxIconSelectorDialog::ImportGraphics( if ( !bHasReplaced ) { bool result = ImportGraphic( aPath ); - if ( result == FALSE ) + if ( result == sal_False ) { rejected[ rejectedCount ] = rPaths[i]; rejectedCount++; @@ -5544,7 +5544,7 @@ void SvxIconSelectorDialog::ImportGraphics( else { bool result = ImportGraphic( aSourcePath + rPaths[i] ); - if ( result == FALSE ) + if ( result == sal_False ) { rejected[ rejectedCount ] = rPaths[i]; rejectedCount++; @@ -5573,9 +5573,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 ); @@ -5583,7 +5583,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 { @@ -5598,7 +5598,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) { a >>= aSize; if ( 0 == aSize.Width || 0 == aSize.Height ) - bOK = FALSE; + bOK = sal_False; Image aImage( xGraphic ); @@ -5630,7 +5630,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) xConfigPersistence->store(); } - result = TRUE; + result = sal_True; } else { @@ -5692,7 +5692,7 @@ rtl::OUString SvxIconReplacementDialog :: ReplaceIconName( const OUString& rMess return name; } -USHORT SvxIconReplacementDialog :: ShowDialog() +sal_uInt16 SvxIconReplacementDialog :: ShowDialog() { this->Execute(); return ( this->GetCurButtonId() ); @@ -5714,8 +5714,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 b85ec24adee2..fc3e44bb4585 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -345,8 +345,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]; @@ -484,9 +484,9 @@ 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 ), bShowSF( FALSE ), bShowBasic( TRUE ), pStylesInfo(0) + , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), nMode( nConfigMode ), bShowSF( sal_False ), bShowBasic( sal_True ), pStylesInfo(0) { SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT ); SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage, BMP_COLOR_NORMAL ); @@ -504,10 +504,10 @@ SfxConfigGroupListBox_Impl::SfxConfigGroupListBox_Impl( value >>= tmp; if (tmp == sal_True) { - bShowBasic = TRUE; + bShowBasic = sal_True; } else { - bShowBasic = FALSE; + bShowBasic = sal_False; } value = ::utl::ConfigManager::GetConfigManager()->GetLocalProperty( @@ -517,10 +517,10 @@ SfxConfigGroupListBox_Impl::SfxConfigGroupListBox_Impl( value >>= tmp; if (tmp == sal_True) { - bShowSF = TRUE; + bShowSF = sal_True; } else { - bShowSF = FALSE; + bShowSF = sal_False; } } @@ -532,8 +532,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 @@ -556,7 +556,7 @@ void SfxConfigGroupListBox_Impl::ClearAll() void SfxConfigGroupListBox_Impl::SetScriptType( const String& rScriptType ) { pImp->m_aScriptType = rScriptType; - ULONG nPos=0; + sal_uLong nPos=0; SvLBoxEntry *pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ ); while ( pEntry ) { @@ -740,7 +740,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; @@ -764,7 +764,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul if ( nMode ) { pSlotPool = pPool ? pPool : &SFX_SLOTPOOL(); - for ( USHORT i=1; i<pSlotPool->GetGroupCount(); i++ ) + for ( sal_uInt16 i=1; i<pSlotPool->GetGroupCount(); i++ ) { // Gruppe anw"ahlen ( Gruppe 0 ist intern ) String aName = pSlotPool->SeekGroup( i ); @@ -776,7 +776,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul sal_Bool bActiveEntries = sal_False; while ( pSfxSlot ) { - USHORT nId = pSfxSlot->GetSlotId(); + sal_uInt16 nId = pSfxSlot->GetSlotId(); if ( pSfxSlot->GetMode() & nMode ) { bActiveEntries = sal_True; @@ -808,16 +808,16 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul // Zuerst AppBasic BasicManager *pAppBasicMgr = pSfxApp->GetBasicManager(); - BOOL bInsert = TRUE; + sal_Bool bInsert = sal_True; /* if ( pArr ) { - bInsert = FALSE; - for ( USHORT n=0; n<pArr->Count(); n++ ) + bInsert = sal_False; + for ( sal_uInt16 n=0; n<pArr->Count(); n++ ) { if ( *(*pArr)[n] == pSfxApp->GetName() ) { - bInsert = TRUE; + bInsert = sal_True; break; } } @@ -836,7 +836,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICMGR, 0, pAppBasicMgr ); // aArr.Insert( pInfo, aArr.Count() ); pEntry->SetUserData( pInfo ); - pEntry->EnableChildsOnDemand( TRUE ); + pEntry->EnableChildsOnDemand( sal_True ); // Expand( pEntry ); } } @@ -856,7 +856,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_DOCBASICMGR, 0, xDoc.get() ); pEntry->SetUserData( pInfo ); - pEntry->EnableChildsOnDemand( TRUE ); + pEntry->EnableChildsOnDemand( sal_True ); } } @@ -903,7 +903,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 @@ -915,19 +915,19 @@ 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 //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; @@ -940,14 +940,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 { @@ -993,7 +993,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(); } } @@ -1017,7 +1017,7 @@ 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 ); } /* { @@ -1029,7 +1029,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul } */ MakeVisible( GetEntry( 0,0 ) ); - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); } Image SfxConfigGroupListBox_Impl::GetImage( Reference< browse::XBrowseNode > node, Reference< XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast ) { @@ -1205,14 +1205,14 @@ 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_BASICMOD && pInfo->nKind != SFX_CFGGROUP_SCRIPTCONTAINER && pInfo->nKind != SFX_CFGGROUP_STYLES ) { - pFunctionListBox->SetUpdateMode(TRUE); + pFunctionListBox->SetUpdateMode(sal_True); return; } @@ -1220,7 +1220,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected() { case SFX_CFGGROUP_FUNCTION : { - USHORT nGroup = pInfo->nOrd; + sal_uInt16 nGroup = pInfo->nOrd; 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(); @@ -1255,7 +1255,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected() xDoc = static_cast< XModel* >( pBasInfo->pObject ); SbModule *pMod = (SbModule*) pInfo->pObject; - for ( USHORT nMeth=0; nMeth < pMod->GetMethods()->Count(); nMeth++ ) + for ( sal_uInt16 nMeth=0; nMeth < pMod->GetMethods()->Count(); nMeth++ ) { SbxMethod *pMeth = (SbxMethod*)pMod->GetMethods()->Get(nMeth); SfxMacroInfoPtr pInf = new SfxMacroInfo( !xDoc.is(), @@ -1264,7 +1264,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected() pMeth->GetName()); if ( pMeth->GetInfo() ) pInf->SetHelpText( pMeth->GetInfo()->GetComment() ); - USHORT nId = SFX_APP()->GetMacroConfig()->GetSlotId( pInf ); + sal_uInt16 nId = SFX_APP()->GetMacroConfig()->GetSlotId( pInf ); if ( !nId ) break; // Kein Slot mehr frei @@ -1373,31 +1373,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++; @@ -1419,7 +1419,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_BASICMGR : @@ -1431,14 +1431,14 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) BasicManager* pMgr( GetBasicManager( *pEntry ) ); SvLBoxEntry *pLibEntry = 0; - for ( USHORT nLib=0; nLib<pMgr->GetLibCount(); nLib++) + for ( sal_uInt16 nLib=0; nLib<pMgr->GetLibCount(); nLib++) { StarBASIC* pLib = pMgr->GetLib( nLib ); pLibEntry = InsertEntry( pMgr->GetLibName( nLib ), pEntry ); SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICLIB, nLib, pLib ); aArr.Insert( pGrpInfo, aArr.Count() ); pLibEntry->SetUserData( pGrpInfo ); - pLibEntry->EnableChildsOnDemand( TRUE ); + pLibEntry->EnableChildsOnDemand( sal_True ); } } @@ -1464,12 +1464,12 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) } SvLBoxEntry *pModEntry = 0; - for ( USHORT nMod=0; nMod<pLib->GetModules()->Count(); nMod++ ) + for ( sal_uInt16 nMod=0; nMod<pLib->GetModules()->Count(); nMod++ ) { SbModule* pMod = (SbModule*)pLib->GetModules()->Get( nMod ); - BOOL bIsStarScript = FALSE; //pMod->ISA( SbJScriptModule ); - BOOL bWantsStarScript = pImp->m_aScriptType.EqualsAscii("StarScript"); + sal_Bool bIsStarScript = sal_False; //pMod->ISA( SbJScriptModule ); + sal_Bool bWantsStarScript = pImp->m_aScriptType.EqualsAscii("StarScript"); if ( bIsStarScript != bWantsStarScript ) continue; pModEntry = InsertEntry( pMod->GetName(), pEntry ); @@ -1494,19 +1494,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; @@ -1521,11 +1521,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 ) { @@ -1561,7 +1561,7 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) { if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) { - pNewEntry->EnableChildsOnDemand( TRUE ); + pNewEntry->EnableChildsOnDemand( sal_True ); m = grandchildren.getLength(); } } @@ -1592,7 +1592,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; @@ -1636,7 +1636,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 8592dbaded5f..7b5633ddfadd 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -71,7 +71,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 )); @@ -103,7 +103,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(); @@ -112,7 +112,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 ); } } @@ -168,10 +168,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; } @@ -191,16 +191,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( @@ -227,13 +227,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 9b5453553ef3..8c69015c3a9c 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -76,11 +76,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(); } @@ -128,7 +128,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(); @@ -140,7 +140,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; @@ -197,7 +197,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 ); @@ -341,7 +341,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 { @@ -392,7 +392,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 @@ -439,12 +439,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; } @@ -459,14 +459,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 ) @@ -479,7 +479,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() ) @@ -488,7 +488,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; @@ -522,7 +522,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; @@ -591,7 +591,7 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents) rListBox.MakeVisible( pE ); } - rListBox.SetUpdateMode( TRUE ); + rListBox.SetUpdateMode( sal_True ); EnableButtons( String() ); } @@ -601,7 +601,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 ) ) ) @@ -630,7 +630,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 ) ) ) { @@ -638,7 +638,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(); @@ -696,7 +696,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(); @@ -725,7 +725,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, @@ -734,7 +734,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( String() ); return 0; @@ -774,7 +774,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()) { @@ -884,7 +884,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 3defe910f5a5..32883bd66429 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -143,8 +143,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; @@ -249,8 +249,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; @@ -327,12 +327,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; @@ -349,7 +349,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 ) ) @@ -369,7 +369,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows } else if ( !sUIName.equals( sCurrentDocTitle ) ) { - bDisplay = FALSE; + bDisplay = sal_False; } } @@ -401,7 +401,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 { @@ -414,7 +414,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows { if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) { - pNewEntry->EnableChildsOnDemand( TRUE ); + pNewEntry->EnableChildsOnDemand( sal_True ); break; } } @@ -430,7 +430,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows void SvxConfigGroupListBox_Impl::Init() { - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); ClearAll(); Reference< XComponentContext > xContext; @@ -580,7 +580,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 @@ -590,7 +590,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 ) @@ -720,12 +720,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; } @@ -896,31 +896,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++; @@ -939,7 +939,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: @@ -966,7 +966,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 ) ), @@ -1023,7 +1023,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 @@ -1116,12 +1116,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 ); } } @@ -1131,7 +1131,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 ); } @@ -1146,7 +1146,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 ); } |