summaryrefslogtreecommitdiff
path: root/cui/source/customize
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:13:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:22 +0100
commitb58d56c5109f4cf6cacfc8e9c424b179a65bf1f1 (patch)
treebc7dcc71437367b193cb18dc5011c98ceb8c2c8b /cui/source/customize
parent5185569e502240a064ef78d06d9de7fbbd93f3b6 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I7257532b90e3e393d56d5349531c9ad397523bca
Diffstat (limited to 'cui/source/customize')
-rw-r--r--cui/source/customize/acccfg.cxx46
-rw-r--r--cui/source/customize/cfg.cxx130
-rw-r--r--cui/source/customize/cfgutil.cxx16
-rw-r--r--cui/source/customize/macropg.cxx22
-rw-r--r--cui/source/customize/selector.cxx28
5 files changed, 121 insertions, 121 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 642f2ca18865..2d42b3c392fb 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -730,7 +730,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( vcl::Window* pParent, const
, m_pMacroInfoItem()
, m_pStringItem()
, m_pFontItem()
- , m_pFileDlg(NULL)
+ , m_pFileDlg(nullptr)
, aLoadAccelConfigStr(CUI_RES(RID_SVXSTR_LOADACCELCONFIG))
, aSaveAccelConfigStr(CUI_RES(RID_SVXSTR_SAVEACCELCONFIG))
, aFilterCfgStr(CUI_RES(RID_SVXSTR_FILTERNAME_CFG))
@@ -835,7 +835,7 @@ void SfxAcceleratorConfigPage::dispose()
m_pKeyBox->Clear();
delete m_pFileDlg;
- m_pFileDlg = NULL;
+ m_pFileDlg = nullptr;
m_pEntriesBox.clear();
m_pOfficeButton.clear();
@@ -954,7 +954,7 @@ void SfxAcceleratorConfigPage::Init(const uno::Reference<ui::XAcceleratorConfigu
if (sKey.isEmpty())
continue;
TAccInfo* pEntry = new TAccInfo(i1, nListPos, aKey);
- SvTreeListEntry* pLBEntry = m_pEntriesBox->InsertEntryToColumn(sKey, 0L, TREELIST_APPEND, 0xFFFF);
+ SvTreeListEntry* pLBEntry = m_pEntriesBox->InsertEntryToColumn(sKey, nullptr, TREELIST_APPEND, 0xFFFF);
pLBEntry->SetUserData(pEntry);
}
@@ -977,7 +977,7 @@ void SfxAcceleratorConfigPage::Init(const uno::Reference<ui::XAcceleratorConfigu
m_pEntriesBox->SetEntryText(sLabel, nPos, nCol);
- SvTreeListEntry* pLBEntry = m_pEntriesBox->GetEntry(0, nPos);
+ SvTreeListEntry* pLBEntry = m_pEntriesBox->GetEntry(nullptr, nPos);
TAccInfo* pEntry = static_cast<TAccInfo*>(pLBEntry->GetUserData());
pEntry->m_bIsConfigurable = true;
@@ -997,7 +997,7 @@ void SfxAcceleratorConfigPage::Init(const uno::Reference<ui::XAcceleratorConfigu
continue;
// Hardcoded function mapped so no ID possible and mark entry as not changeable
- SvTreeListEntry* pLBEntry = m_pEntriesBox->GetEntry(0, nPos);
+ SvTreeListEntry* pLBEntry = m_pEntriesBox->GetEntry(nullptr, nPos);
TAccInfo* pEntry = static_cast<TAccInfo*>(pLBEntry->GetUserData());
pEntry->m_bIsConfigurable = false;
@@ -1072,13 +1072,13 @@ IMPL_LINK_NOARG_TYPED(SfxAcceleratorConfigPage, Default, Button*, void)
Init(m_xAct);
m_pEntriesBox->SetUpdateMode(true);
m_pEntriesBox->Invalidate();
- m_pEntriesBox->Select(m_pEntriesBox->GetEntry(0, 0));
+ m_pEntriesBox->Select(m_pEntriesBox->GetEntry(nullptr, 0));
}
IMPL_LINK_NOARG_TYPED(SfxAcceleratorConfigPage, ChangeHdl, Button*, void)
{
sal_uLong nPos = SvTreeList::GetRelPos( m_pEntriesBox->FirstSelected() );
- TAccInfo* pEntry = static_cast<TAccInfo*>(m_pEntriesBox->GetEntry(0, nPos)->GetUserData());
+ TAccInfo* pEntry = static_cast<TAccInfo*>(m_pEntriesBox->GetEntry(nullptr, nPos)->GetUserData());
OUString sNewCommand = m_pFunctionBox->GetCurCommand();
OUString sLabel = m_pFunctionBox->GetCurLabel();
if (sLabel.isEmpty())
@@ -1095,7 +1095,7 @@ IMPL_LINK_NOARG_TYPED(SfxAcceleratorConfigPage, RemoveHdl, Button*, void)
{
// get selected entry
sal_uLong nPos = SvTreeList::GetRelPos( m_pEntriesBox->FirstSelected() );
- TAccInfo* pEntry = static_cast<TAccInfo*>(m_pEntriesBox->GetEntry(0, nPos)->GetUserData());
+ TAccInfo* pEntry = static_cast<TAccInfo*>(m_pEntriesBox->GetEntry(nullptr, nPos)->GetUserData());
// remove function name from selected entry
sal_uInt16 nCol = m_pEntriesBox->TabCount() - 1;
@@ -1112,7 +1112,7 @@ IMPL_LINK_TYPED( SfxAcceleratorConfigPage, SelectHdl, SvTreeListBox*, pListBox,
if (pListBox == m_pEntriesBox)
{
sal_uLong nPos = SvTreeList::GetRelPos( m_pEntriesBox->FirstSelected() );
- TAccInfo* pEntry = static_cast<TAccInfo*>(m_pEntriesBox->GetEntry(0, nPos)->GetUserData());
+ TAccInfo* pEntry = static_cast<TAccInfo*>(m_pEntriesBox->GetEntry(nullptr, nPos)->GetUserData());
OUString sPossibleNewCommand = m_pFunctionBox->GetCurCommand();
m_pRemoveButton->Enable( false );
@@ -1138,10 +1138,10 @@ IMPL_LINK_TYPED( SfxAcceleratorConfigPage, SelectHdl, SvTreeListBox*, pListBox,
// #i36994 First selected can return zero!
SvTreeListEntry* pLBEntry = m_pEntriesBox->FirstSelected();
- if ( pLBEntry != 0 )
+ if ( pLBEntry != nullptr )
{
sal_uLong nPos = SvTreeList::GetRelPos( pLBEntry );
- TAccInfo* pEntry = static_cast<TAccInfo*>(m_pEntriesBox->GetEntry(0, nPos)->GetUserData());
+ TAccInfo* pEntry = static_cast<TAccInfo*>(m_pEntriesBox->GetEntry(nullptr, nPos)->GetUserData());
OUString sPossibleNewCommand = m_pFunctionBox->GetCurCommand();
if (pEntry->m_bIsConfigurable)
@@ -1160,7 +1160,7 @@ IMPL_LINK_TYPED( SfxAcceleratorConfigPage, SelectHdl, SvTreeListBox*, pListBox,
if ( pUserData && pUserData->m_sCommand == sPossibleNewCommand )
{
TAccInfo* pU1 = new TAccInfo(-1, -1, pUserData->m_aKey);
- SvTreeListEntry* pE1 = m_pKeyBox->InsertEntry( pUserData->m_aKey.GetName(), 0L, true );
+ SvTreeListEntry* pE1 = m_pKeyBox->InsertEntry( pUserData->m_aKey.GetName(), nullptr, true );
pE1->SetUserData(pU1);
pE1->EnableChildrenOnDemand( false );
}
@@ -1171,10 +1171,10 @@ IMPL_LINK_TYPED( SfxAcceleratorConfigPage, SelectHdl, SvTreeListBox*, pListBox,
else
{
// goto selected "key" entry of the key box
- SvTreeListEntry* pE2 = 0;
- TAccInfo* pU2 = 0;
+ SvTreeListEntry* pE2 = nullptr;
+ TAccInfo* pU2 = nullptr;
sal_uLong nP2 = TREELIST_ENTRY_NOTFOUND;
- SvTreeListEntry* pE3 = 0;
+ SvTreeListEntry* pE3 = nullptr;
pE2 = m_pKeyBox->FirstSelected();
if (pE2)
@@ -1182,7 +1182,7 @@ IMPL_LINK_TYPED( SfxAcceleratorConfigPage, SelectHdl, SvTreeListBox*, pListBox,
if (pU2)
nP2 = MapKeyCodeToPos(pU2->m_aKey);
if (nP2 != TREELIST_ENTRY_NOTFOUND)
- pE3 = m_pEntriesBox->GetEntry( 0, nP2 );
+ pE3 = m_pEntriesBox->GetEntry( nullptr, nP2 );
if (pE3)
{
m_pEntriesBox->Select( pE3 );
@@ -1213,10 +1213,10 @@ IMPL_LINK_NOARG_TYPED(SfxAcceleratorConfigPage, RadioHdl, Button*, void)
m_pGroupLBox->Init(m_xContext, m_xFrame, m_sModuleLongName, true);
// pb: #133213# do not select NULL entries
- SvTreeListEntry* pEntry = m_pEntriesBox->GetEntry( 0, 0 );
+ SvTreeListEntry* pEntry = m_pEntriesBox->GetEntry( nullptr, 0 );
if ( pEntry )
m_pEntriesBox->Select( pEntry );
- pEntry = m_pGroupLBox->GetEntry( 0, 0 );
+ pEntry = m_pGroupLBox->GetEntry( nullptr, 0 );
if ( pEntry )
m_pGroupLBox->Select( pEntry );
@@ -1280,7 +1280,7 @@ IMPL_LINK_NOARG_TYPED(SfxAcceleratorConfigPage, LoadHdl, sfx2::FileDialogHelper*
Init(xTempAccMgr);
m_pEntriesBox->SetUpdateMode(true);
m_pEntriesBox->Invalidate();
- m_pEntriesBox->Select(m_pEntriesBox->GetEntry(0, 0));
+ m_pEntriesBox->Select(m_pEntriesBox->GetEntry(nullptr, 0));
}
@@ -1468,9 +1468,9 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet* rSet )
m_pOfficeButton->Check();
}
- RadioHdl(0);
+ RadioHdl(nullptr);
- const SfxPoolItem* pMacroItem=0;
+ const SfxPoolItem* pMacroItem=nullptr;
if( SfxItemState::SET == rSet->GetItemState( SID_MACROINFO, true, &pMacroItem ) )
{
m_pMacroInfoItem = &dynamic_cast<const SfxMacroInfoItem&>(*pMacroItem);
@@ -1478,11 +1478,11 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet* rSet )
}
else
{
- const SfxPoolItem* pStringItem=0;
+ const SfxPoolItem* pStringItem=nullptr;
if( SfxItemState::SET == rSet->GetItemState( SID_CHARMAP, true, &pStringItem ) )
m_pStringItem = dynamic_cast<const SfxStringItem*>( pStringItem );
- const SfxPoolItem* pFontItem=0;
+ const SfxPoolItem* pFontItem=nullptr;
if( SfxItemState::SET == rSet->GetItemState( SID_ATTR_SPECIALCHAR, true, &pFontItem ) )
m_pFontItem = dynamic_cast<const SfxStringItem*>( pFontItem );
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index f338b22c0433..6a823400dcfd 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -789,10 +789,10 @@ SvxConfigDialog::SvxConfigDialog(vcl::Window * pParent, const SfxItemSet* pInSet
{
InitImageType();
- m_nMenusPageId = AddTabPage("menus", CreateSvxMenuConfigPage, NULL);
- m_nKeyboardPageId = AddTabPage("keyboard", CreateKeyboardConfigPage, NULL);
- m_nToolbarsPageId = AddTabPage("toolbars", CreateSvxToolbarConfigPage, NULL);
- m_nEventsPageId = AddTabPage("events", CreateSvxEventConfigPage, NULL);
+ m_nMenusPageId = AddTabPage("menus", CreateSvxMenuConfigPage, nullptr);
+ m_nKeyboardPageId = AddTabPage("keyboard", CreateKeyboardConfigPage, nullptr);
+ m_nToolbarsPageId = AddTabPage("toolbars", CreateSvxToolbarConfigPage, nullptr);
+ m_nEventsPageId = AddTabPage("events", CreateSvxEventConfigPage, nullptr);
const SfxPoolItem* pItem =
pInSet->GetItem( pInSet->GetPool()->GetWhich( SID_CONFIG ) );
@@ -837,7 +837,7 @@ void SvxConfigDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage )
******************************************************************************/
// Initialize static variable which holds default XImageManager
-uno::Reference< css::ui::XImageManager>* SaveInData::xDefaultImgMgr = NULL;
+uno::Reference< css::ui::XImageManager>* SaveInData::xDefaultImgMgr = nullptr;
SaveInData::SaveInData(
const uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
@@ -938,7 +938,7 @@ Image SaveInData::GetImage( const OUString& rCommandURL )
{
aImage = Image( xGraphic );
}
- else if ( xDefaultImgMgr != NULL && (*xDefaultImgMgr).is() )
+ else if ( xDefaultImgMgr != nullptr && (*xDefaultImgMgr).is() )
{
xGraphic = GetGraphic( (*xDefaultImgMgr), rCommandURL );
@@ -985,7 +985,7 @@ bool SaveInData::PersistChanges(
******************************************************************************/
// Initialize static variable which holds default Menu data
-MenuSaveInData* MenuSaveInData::pDefaultData = NULL;
+MenuSaveInData* MenuSaveInData::pDefaultData = nullptr;
MenuSaveInData::MenuSaveInData(
const uno::Reference< css::ui::XUIConfigurationManager >& cfgmgr,
@@ -998,7 +998,7 @@ MenuSaveInData::MenuSaveInData(
ITEM_MENUBAR_URL ),
m_aDescriptorContainer(
ITEM_DESCRIPTOR_CONTAINER ),
- pRootEntry( 0 )
+ pRootEntry( nullptr )
{
try
{
@@ -1022,7 +1022,7 @@ MenuSaveInData::MenuSaveInData(
MenuSaveInData::~MenuSaveInData()
{
- if ( pRootEntry != NULL )
+ if ( pRootEntry != nullptr )
{
delete pRootEntry;
}
@@ -1031,7 +1031,7 @@ MenuSaveInData::~MenuSaveInData()
SvxEntries*
MenuSaveInData::GetEntries()
{
- if ( pRootEntry == NULL )
+ if ( pRootEntry == nullptr )
{
pRootEntry = new SvxConfigEntry(
OUString("MainMenus"),
@@ -1041,7 +1041,7 @@ MenuSaveInData::GetEntries()
{
LoadSubMenus( m_xMenuSettings, OUString(), pRootEntry );
}
- else if ( GetDefaultData() != NULL )
+ else if ( GetDefaultData() != nullptr )
{
// If the doc has no config settings use module config settings
LoadSubMenus( GetDefaultData()->m_xMenuSettings, OUString(), pRootEntry );
@@ -1301,7 +1301,7 @@ MenuSaveInData::Reset()
GetConfigManager()->reset();
delete pRootEntry;
- pRootEntry = NULL;
+ pRootEntry = nullptr;
try
{
@@ -1476,7 +1476,7 @@ TriState SvxMenuEntriesListBox::NotifyCopying(
if ( !m_bIsInternalDrag )
{
// if the target is NULL then add function to the start of the list
- pPage->AddFunction( pTarget, pTarget == NULL );
+ pPage->AddFunction( pTarget, pTarget == nullptr );
// AddFunction already adds the listbox entry so return TRISTATE_FALSE
// to stop another listbox entry being added
@@ -1522,9 +1522,9 @@ void SvxMenuEntriesListBox::KeyInput( const KeyEvent& rKeyEvent )
SvxConfigPage::SvxConfigPage(vcl::Window *pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "MenuAssignPage", "cui/ui/menuassignpage.ui", &rSet)
, bInitialised(false)
- , pCurrentSaveInData(0)
- , m_pContentsListBox(0)
- , m_pSelectorDlg(0)
+ , pCurrentSaveInData(nullptr)
+ , m_pContentsListBox(nullptr)
+ , m_pSelectorDlg(nullptr)
{
get(m_pTopLevel, "toplevel");
get(m_pTopLevelLabel, "toplevelft");
@@ -1616,7 +1616,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
xModuleCfgSupplier( css::ui::theModuleUIConfigurationManagerSupplier::get(xContext) );
// Set up data for module specific menus
- SaveInData* pModuleData = NULL;
+ SaveInData* pModuleData = nullptr;
try
{
@@ -1632,7 +1632,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
{
}
- if ( pModuleData != NULL )
+ if ( pModuleData != nullptr )
{
nPos = m_pSaveInListBox->InsertEntry(
utl::ConfigManager::getProductName() + " " + aModuleName );
@@ -1659,7 +1659,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
}
}
- SaveInData* pDocData = NULL;
+ SaveInData* pDocData = nullptr;
if ( xDocCfgMgr.is() )
{
pDocData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, true );
@@ -1694,7 +1694,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
{
// if the document has menu configuration settings select it
// it the SaveIn listbox, otherwise select the module data
- if ( pDocData != NULL && pDocData->HasSettings() )
+ if ( pDocData != nullptr && pDocData->HasSettings() )
{
m_pSaveInListBox->SelectEntryPos( nPos );
pCurrentSaveInData = pDocData;
@@ -1956,13 +1956,13 @@ SvxEntries* SvxConfigPage::FindParentForChild(
SvxEntries* result =
FindParentForChild( pEntryData->GetEntries(), pChildData );
- if ( result != NULL )
+ if ( result != nullptr )
{
return result;
}
}
}
- return NULL;
+ return nullptr;
}
SvTreeListEntry* SvxConfigPage::AddFunction(
@@ -1973,7 +1973,7 @@ SvTreeListEntry* SvxConfigPage::AddFunction(
if ( aURL.isEmpty() )
{
- return NULL;
+ return nullptr;
}
SvxConfigEntry* pNewEntryData =
@@ -1994,9 +1994,9 @@ SvTreeListEntry* SvxConfigPage::AddFunction(
{
// asynchronous error message, because of MsgBoxes
PostUserEvent(
- LINK( this, SvxConfigPage, AsyncInfoMsg ), NULL, true );
+ LINK( this, SvxConfigPage, AsyncInfoMsg ), nullptr, true );
delete pNewEntryData;
- return NULL;
+ return nullptr;
}
}
}
@@ -2012,16 +2012,16 @@ SvTreeListEntry* SvxConfigPage::InsertEntry(
// Grab the entries list for the currently selected menu
SvxEntries* pEntries = GetTopLevelSelection()->GetEntries();
- SvTreeListEntry* pNewEntry = NULL;
+ SvTreeListEntry* pNewEntry = nullptr;
SvTreeListEntry* pCurEntry =
- pTarget != NULL ? pTarget : m_pContentsListBox->GetCurEntry();
+ pTarget != nullptr ? pTarget : m_pContentsListBox->GetCurEntry();
if ( bFront )
{
pEntries->insert( pEntries->begin(), pNewEntryData );
pNewEntry = InsertEntryIntoUI( pNewEntryData, 0 );
}
- else if ( pCurEntry == NULL || pCurEntry == m_pContentsListBox->Last() )
+ else if ( pCurEntry == nullptr || pCurEntry == m_pContentsListBox->Last() )
{
pEntries->push_back( pNewEntryData );
pNewEntry = InsertEntryIntoUI( pNewEntryData );
@@ -2053,7 +2053,7 @@ SvTreeListEntry* SvxConfigPage::InsertEntry(
}
}
- if ( pNewEntry != NULL )
+ if ( pNewEntry != nullptr )
{
m_pContentsListBox->Select( pNewEntry );
m_pContentsListBox->MakeVisible( pNewEntry );
@@ -2067,13 +2067,13 @@ SvTreeListEntry* SvxConfigPage::InsertEntry(
SvTreeListEntry* SvxConfigPage::InsertEntryIntoUI(
SvxConfigEntry* pNewEntryData, sal_uLong nPos )
{
- SvTreeListEntry* pNewEntry = NULL;
+ SvTreeListEntry* pNewEntry = nullptr;
if (pNewEntryData->IsSeparator())
{
pNewEntry = m_pContentsListBox->InsertEntry(
OUString(aSeparatorStr),
- 0, false, nPos, pNewEntryData);
+ nullptr, false, nPos, pNewEntryData);
}
else
{
@@ -2085,12 +2085,12 @@ SvTreeListEntry* SvxConfigPage::InsertEntryIntoUI(
if ( !!aImage )
{
pNewEntry = m_pContentsListBox->InsertEntry(
- aName, aImage, aImage, 0, false, nPos, pNewEntryData );
+ aName, aImage, aImage, nullptr, false, nPos, pNewEntryData );
}
else
{
pNewEntry = m_pContentsListBox->InsertEntry(
- aName, 0, false, nPos, pNewEntryData );
+ aName, nullptr, false, nPos, pNewEntryData );
}
if ( pNewEntryData->IsPopup() ||
@@ -2122,8 +2122,8 @@ IMPL_LINK_TYPED( SvxConfigPage, MoveHdl, Button *, pButton, void )
void SvxConfigPage::MoveEntry( bool bMoveUp )
{
SvTreeListEntry *pSourceEntry = m_pContentsListBox->FirstSelected();
- SvTreeListEntry *pTargetEntry = NULL;
- SvTreeListEntry *pToSelect = NULL;
+ SvTreeListEntry *pTargetEntry = nullptr;
+ SvTreeListEntry *pToSelect = nullptr;
if ( !pSourceEntry )
{
@@ -2157,7 +2157,7 @@ bool SvxConfigPage::MoveEntryData(
SvTreeListEntry* pSourceEntry, SvTreeListEntry* pTargetEntry )
{
//#i53677#
- if (NULL == pSourceEntry || NULL == pTargetEntry)
+ if (nullptr == pSourceEntry || nullptr == pTargetEntry)
{
return false;
}
@@ -2171,7 +2171,7 @@ bool SvxConfigPage::MoveEntryData(
SvxConfigEntry* pTargetData =
static_cast<SvxConfigEntry*>(pTargetEntry->GetUserData());
- if ( pSourceData != NULL && pTargetData != NULL )
+ if ( pSourceData != nullptr && pTargetData != nullptr )
{
// remove the source entry from our list
RemoveEntry( pEntries, pSourceData );
@@ -2277,7 +2277,7 @@ void SvxMenuConfigPage::UpdateButtonStates()
// Disable Up and Down buttons depending on current selection
SvTreeListEntry* selection = m_pContentsListBox->GetCurEntry();
- if ( m_pContentsListBox->GetEntryCount() == 0 || selection == NULL )
+ if ( m_pContentsListBox->GetEntryCount() == 0 || selection == nullptr )
{
m_pMoveUpButton->Enable( false );
m_pMoveDownButton->Enable( false );
@@ -2337,7 +2337,7 @@ bool SvxMenuConfigPage::DeleteSelectedContent()
{
SvTreeListEntry *pActEntry = m_pContentsListBox->FirstSelected();
- if ( pActEntry != NULL )
+ if ( pActEntry != nullptr )
{
// get currently selected menu entry
SvxConfigEntry* pMenuEntry =
@@ -2578,7 +2578,7 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog(
vcl::Window* pParent, SvxEntries* entries,
SvxConfigEntry* selection, bool bCreateMenu )
: ModalDialog(pParent, "MoveMenuDialog", "cui/ui/movemenu.ui")
- , mpEntries(0)
+ , mpEntries(nullptr)
, bModified(false)
{
get(m_pMenuBox, "namebox");
@@ -2589,7 +2589,7 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog(
m_pMenuListBox->set_height_request(m_pMenuListBox->GetTextHeight() * 12);
// Copy the entries list passed in
- if ( entries != NULL )
+ if ( entries != nullptr )
{
mpEntries = new SvxEntries();
SvxEntries::const_iterator iter = entries->begin();
@@ -2638,7 +2638,7 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog(
}
else
{
- pNewMenuEntry = NULL;
+ pNewMenuEntry = nullptr;
// hide name label and textfield
m_pMenuBox->Hide();
@@ -2705,7 +2705,7 @@ void SvxMainMenuOrganizerDialog::UpdateButtonStates()
IMPL_LINK_TYPED( SvxMainMenuOrganizerDialog, MoveHdl, Button *, pButton, void )
{
SvTreeListEntry *pSourceEntry = m_pMenuListBox->FirstSelected();
- SvTreeListEntry *pTargetEntry = NULL;
+ SvTreeListEntry *pTargetEntry = nullptr;
if ( !pSourceEntry )
{
@@ -2723,7 +2723,7 @@ IMPL_LINK_TYPED( SvxMainMenuOrganizerDialog, MoveHdl, Button *, pButton, void )
pSourceEntry = SvTreeListBox::PrevSibling( pTargetEntry );
}
- if ( pSourceEntry != NULL && pTargetEntry != NULL )
+ if ( pSourceEntry != nullptr && pTargetEntry != nullptr )
{
SvxConfigEntry* pSourceData =
static_cast<SvxConfigEntry*>(pSourceEntry->GetUserData());
@@ -2768,7 +2768,7 @@ SvxConfigEntry::GetHelpText()
{
if ( !aCommand.isEmpty() )
{
- aHelpText = Application::GetHelp()->GetHelpText( aCommand, NULL );
+ aHelpText = Application::GetHelp()->GetHelpText( aCommand, nullptr );
}
}
@@ -2787,7 +2787,7 @@ SvxConfigEntry::SvxConfigEntry( const OUString& rDisplayName,
, bIsParentData( bParentData )
, bIsVisible( true )
, nStyle( 0 )
- , mpEntries( 0 )
+ , mpEntries( nullptr )
{
if (bPopUp)
{
@@ -2797,7 +2797,7 @@ SvxConfigEntry::SvxConfigEntry( const OUString& rDisplayName,
SvxConfigEntry::~SvxConfigEntry()
{
- if ( mpEntries != NULL )
+ if ( mpEntries != nullptr )
{
SvxEntries::const_iterator iter = mpEntries->begin();
@@ -2970,7 +2970,7 @@ bool SvxToolbarConfigPage::DeleteSelectedContent()
{
SvTreeListEntry *pActEntry = m_pContentsListBox->FirstSelected();
- if ( pActEntry != NULL )
+ if ( pActEntry != nullptr )
{
// get currently selected entry
SvxConfigEntry* pEntry =
@@ -3163,7 +3163,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo
// find position of entry within the list
for ( sal_uLong i = 0; i < m_pContentsListBox->GetEntryCount(); ++i )
{
- if ( m_pContentsListBox->GetEntry( 0, i ) == pActEntry )
+ if ( m_pContentsListBox->GetEntry( nullptr, i ) == pActEntry )
{
nSelectionPos = i;
break;
@@ -3261,7 +3261,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo
// find position of entry within the list
for ( sal_uLong i = 0; i < m_pContentsListBox->GetEntryCount(); ++i )
{
- if ( m_pContentsListBox->GetEntry( 0, i ) == pActEntry )
+ if ( m_pContentsListBox->GetEntry( nullptr, i ) == pActEntry )
{
nSelectionPos = i;
break;
@@ -3339,7 +3339,7 @@ IMPL_LINK_TYPED( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, vo
// find position of entry within the list
for ( sal_uLong i = 0; i < m_pContentsListBox->GetEntryCount(); ++i )
{
- if ( m_pContentsListBox->GetEntry( 0, i ) == pActEntry )
+ if ( m_pContentsListBox->GetEntry( nullptr, i ) == pActEntry )
{
nSelectionPos = i;
break;
@@ -3445,7 +3445,7 @@ ToolbarSaveInData::ToolbarSaveInData(
bool docConfig ) :
SaveInData ( xCfgMgr, xParentCfgMgr, aModuleId, docConfig ),
- pRootEntry ( NULL ),
+ pRootEntry ( nullptr ),
m_aDescriptorContainer ( ITEM_DESCRIPTOR_CONTAINER )
{
@@ -3473,7 +3473,7 @@ void ToolbarSaveInData::SetSystemStyle(
// this code is a temporary hack as the UI is not updating after
// changing the toolbar style via the API
uno::Reference< css::frame::XLayoutManager > xLayoutManager;
- vcl::Window *window = NULL;
+ vcl::Window *window = nullptr;
uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY );
if ( xPropSet.is() )
@@ -3497,7 +3497,7 @@ void ToolbarSaveInData::SetSystemStyle(
window = VCLUnoHelper::GetWindow( xWindow );
}
- if ( window != NULL && window->GetType() == WINDOW_TOOLBOX )
+ if ( window != nullptr && window->GetType() == WINDOW_TOOLBOX )
{
ToolBox* toolbox = static_cast<ToolBox*>(window);
@@ -3661,7 +3661,7 @@ SvxEntries* ToolbarSaveInData::GetEntries()
ToolbarInfo aToolbarInfo;
- if ( pRootEntry == NULL )
+ if ( pRootEntry == nullptr )
{
pRootEntry = new SvxConfigEntry(
@@ -3901,7 +3901,7 @@ void ToolbarSaveInData::Reset()
// now delete the root SvxConfigEntry the next call to GetEntries()
// causes it to be reinitialised
delete pRootEntry;
- pRootEntry = NULL;
+ pRootEntry = nullptr;
// reset all icons to default
try
@@ -4262,7 +4262,7 @@ void SvxToolbarConfigPage::UpdateButtonStates()
m_pDescriptionField->SetText("");
SvTreeListEntry* selection = m_pContentsListBox->GetCurEntry();
- if ( m_pContentsListBox->GetEntryCount() == 0 || selection == NULL )
+ if ( m_pContentsListBox->GetEntryCount() == 0 || selection == nullptr )
{
return;
}
@@ -4309,7 +4309,7 @@ IMPL_LINK_NOARG_TYPED( SvxToolbarConfigPage, SelectToolbar, ListBox&, void )
m_pContentsListBox->Clear();
SvxConfigEntry* pToolbar = GetTopLevelSelection();
- if ( pToolbar == NULL )
+ if ( pToolbar == nullptr )
{
m_pModifyTopLevelButton->Enable( false );
m_pModifyCommandButton->Enable( false );
@@ -4480,7 +4480,7 @@ SvTreeListEntry* SvxToolbarConfigPage::AddFunction(
// get currently selected toolbar and apply change
SvxConfigEntry* pToolbar = GetTopLevelSelection();
- if ( pToolbar != NULL )
+ if ( pToolbar != nullptr )
{
static_cast<ToolbarSaveInData*>( GetSaveInData() )->ApplyToolbar( pToolbar );
}
@@ -4505,7 +4505,7 @@ SvxToolbarEntriesListBox::~SvxToolbarEntriesListBox()
void SvxToolbarEntriesListBox::dispose()
{
delete m_pButtonData;
- m_pButtonData = NULL;
+ m_pButtonData = nullptr;
pPage.clear();
SvxMenuEntriesListBox::dispose();
@@ -4583,7 +4583,7 @@ void SvxToolbarEntriesListBox::DataChanged( const DataChangedEvent& rDCEvt )
void SvxToolbarEntriesListBox::ChangeVisibility( SvTreeListEntry* pEntry )
{
- if ( pEntry != NULL )
+ if ( pEntry != nullptr )
{
SvxConfigEntry* pEntryData =
static_cast<SvxConfigEntry*>(pEntry->GetUserData());
@@ -4635,7 +4635,7 @@ TriState SvxToolbarEntriesListBox::NotifyMoving(
{
// Instant Apply changes to UI
SvxConfigEntry* pToolbar = pPage->GetTopLevelSelection();
- if ( pToolbar != NULL )
+ if ( pToolbar != nullptr )
{
ToolbarSaveInData* pSaveInData =
static_cast<ToolbarSaveInData*>( pPage->GetSaveInData() );
@@ -4659,11 +4659,11 @@ TriState SvxToolbarEntriesListBox::NotifyCopying(
if ( !m_bIsInternalDrag )
{
// if the target is NULL then add function to the start of the list
- static_cast<SvxToolbarConfigPage*>(pPage.get())->AddFunction( pTarget, pTarget == NULL );
+ static_cast<SvxToolbarConfigPage*>(pPage.get())->AddFunction( pTarget, pTarget == nullptr );
// Instant Apply changes to UI
SvxConfigEntry* pToolbar = pPage->GetTopLevelSelection();
- if ( pToolbar != NULL )
+ if ( pToolbar != nullptr )
{
ToolbarSaveInData* pSaveInData =
static_cast<ToolbarSaveInData*>( pPage->GetSaveInData() );
@@ -4909,7 +4909,7 @@ void SvxIconSelectorDialog::dispose()
uno::XInterface* xi = static_cast< uno::XInterface* >(
pTbSymbol->GetItemData( nId ) );
- if ( xi != NULL )
+ if ( xi != nullptr )
xi->release();
}
}
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 30af1e3aaeed..1102c4c1933f 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -251,7 +251,7 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle)
SfxConfigFunctionListBox::SfxConfigFunctionListBox(vcl::Window* pParent, WinBits nStyle)
: SvTreeListBox( pParent, nStyle )
- , pStylesInfo( 0 )
+ , pStylesInfo( nullptr )
{
SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT );
GetModel()->SetSortMode( SortAscending );
@@ -303,7 +303,7 @@ void SfxConfigFunctionListBox::ClearAll()
if ( pData->nKind == SfxCfgKind::GROUP_SCRIPTCONTAINER )
{
XInterface* xi = static_cast<XInterface *>(pData->pObject);
- if (xi != NULL)
+ if (xi != nullptr)
{
xi->release();
}
@@ -393,7 +393,7 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() :
SfxConfigGroupListBox::SfxConfigGroupListBox(vcl::Window* pParent, WinBits nStyle)
: SvTreeListBox(pParent, nStyle)
- , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), pStylesInfo(0)
+ , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(nullptr), pStylesInfo(nullptr)
{
SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT );
SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage );
@@ -431,7 +431,7 @@ void SfxConfigGroupListBox::ClearAll()
if (pData->nKind == SfxCfgKind::GROUP_SCRIPTCONTAINER)
{
XInterface* xi = static_cast<XInterface *>(pData->pObject);
- if (xi != NULL)
+ if (xi != nullptr)
{
xi->release();
}
@@ -696,13 +696,13 @@ void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent
{
OUString sStyle( pImp->m_aStrGroupStyles );
SvTreeListEntry *pEntry = InsertEntry( sStyle );
- SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SfxCfgKind::GROUP_STYLES, 0, 0 ); // TODO last parameter should contain user data
+ SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SfxCfgKind::GROUP_STYLES, 0, nullptr ); // TODO last parameter should contain user data
aArr.push_back( pInfo );
pEntry->SetUserData( pInfo );
pEntry->EnableChildrenOnDemand();
}
- MakeVisible( GetEntry( 0,0 ) );
+ MakeVisible( GetEntry( nullptr,0 ) );
SetUpdateMode( true );
}
@@ -952,7 +952,7 @@ void SfxConfigGroupListBox::GroupSelected()
}
if ( pFunctionListBox->GetEntryCount() )
- pFunctionListBox->Select( pFunctionListBox->GetEntry( 0, 0 ) );
+ pFunctionListBox->Select( pFunctionListBox->GetEntry( nullptr, 0 ) );
pFunctionListBox->SetUpdateMode(true);
}
@@ -1136,7 +1136,7 @@ void SfxConfigGroupListBox::SelectMacro( const OUString& rBasic,
aModule = rMacro.getToken( nCount-2, '.' );
}
- SvTreeListEntry *pEntry = FirstChild(0);
+ SvTreeListEntry *pEntry = FirstChild(nullptr);
while ( pEntry )
{
OUString aEntryBas = GetEntryText( pEntry );
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 61f687bcf2c8..0944bb125c5b 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -52,10 +52,10 @@ static const char aVndSunStarUNO[] = "vnd.sun.star.UNO:";
static const char aVndSunStarScript[] = "vnd.sun.star.script:";
_SvxMacroTabPage_Impl::_SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet )
- : pAssignPB(NULL)
- , pAssignComponentPB(NULL)
- , pDeletePB(NULL)
- , pEventLB(NULL)
+ : pAssignPB(nullptr)
+ , pAssignComponentPB(nullptr)
+ , pDeletePB(nullptr)
+ , pEventLB(nullptr)
, bReadOnly(false)
, bIDEDialogMode(false)
{
@@ -225,8 +225,8 @@ void _SvxMacroTabPage::EnableButtons()
_SvxMacroTabPage::_SvxMacroTabPage(vcl::Window* pParent, const OString& rID,
const OUString& rUIXMLDescription, const SfxItemSet& rAttrSet)
: SfxTabPage( pParent, rID, rUIXMLDescription, &rAttrSet ),
- m_xAppEvents(0),
- m_xDocEvents(0),
+ m_xAppEvents(nullptr),
+ m_xDocEvents(nullptr),
bReadOnly(false),
bDocModified(false),
bAppEvents(false),
@@ -594,7 +594,7 @@ IMPL_LINK_TYPED( _SvxMacroTabPage, AssignDeleteHdl_Impl, Button*, pBtn, void )
IMPL_LINK_NOARG_TYPED( _SvxMacroTabPage, DoubleClickHdl_Impl, SvTreeListBox*, bool)
{
- return GenericHandler_Impl( this, NULL );
+ return GenericHandler_Impl( this, nullptr );
}
// handler for double click on the listbox, and for the assign/delete buttons
@@ -636,7 +636,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton*
}
}
- bool bDoubleClick = (pBtn == NULL);
+ bool bDoubleClick = (pBtn == nullptr);
bool bUNOAssigned = sEventURL.startsWith( aVndSunStarUNO );
if( pBtn == pImpl->pDeletePB )
{
@@ -646,7 +646,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton*
if(!pThis->bAppEvents)
pThis->bDocModified = true;
}
- else if ( ( ( pBtn != NULL )
+ else if ( ( ( pBtn != nullptr )
&& ( pBtn == pImpl->pAssignComponentPB )
)
|| ( bDoubleClick
@@ -839,7 +839,7 @@ SvxMacroTabPage::SvxMacroTabPage(vcl::Window* pParent,
InitResources();
- InitAndSetHandler( xNameReplace, Reference< container::XNameReplace>(0), Reference< util::XModifiable >(0));
+ InitAndSetHandler( xNameReplace, Reference< container::XNameReplace>(nullptr), Reference< util::XModifiable >(nullptr));
DisplayAppEvents(true);
SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox();
SvTreeListEntry* pE = rListBox.GetEntry( (sal_uLong)nSelectedIndex );
@@ -898,7 +898,7 @@ void AssignComponentDialog::dispose()
IMPL_LINK_NOARG_TYPED( SvxMacroAssignSingleTabDialog, OKHdl_Impl, Button *, void )
{
- GetTabPage()->FillItemSet( 0 );
+ GetTabPage()->FillItemSet( nullptr );
EndDialog( RET_OK );
}
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx
index 115dcab17793..a713d0d1f15a 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -77,8 +77,8 @@ using namespace ::com::sun::star::container;
*/
SvxConfigFunctionListBox::SvxConfigFunctionListBox(vcl::Window* pParent, WinBits nStyle)
: SvTreeListBox(pParent, nStyle | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT | WB_TABSTOP)
- , pCurEntry(0)
- , m_pDraggingEntry(0)
+ , pCurEntry(nullptr)
+ , m_pDraggingEntry(nullptr)
{
GetModel()->SetSortMode( SortAscending );
@@ -112,7 +112,7 @@ void SvxConfigFunctionListBox::dispose()
SvTreeListEntry* SvxConfigFunctionListBox::GetLastSelectedEntry()
{
- if ( m_pDraggingEntry != NULL )
+ if ( m_pDraggingEntry != nullptr )
{
return m_pDraggingEntry;
}
@@ -155,7 +155,7 @@ void SvxConfigFunctionListBox::ClearAll()
OUString SvxConfigFunctionListBox::GetHelpText( SvTreeListEntry *pEntry )
{
SvxGroupInfo_Impl *pInfo =
- pEntry ? static_cast<SvxGroupInfo_Impl*>(pEntry->GetUserData()): 0;
+ pEntry ? static_cast<SvxGroupInfo_Impl*>(pEntry->GetUserData()): nullptr;
if ( pInfo )
{
@@ -191,7 +191,7 @@ DragDropMode SvxConfigFunctionListBox::NotifyStartDrag(
void SvxConfigFunctionListBox::DragFinished( sal_Int8 /*nDropAction*/ )
{
- m_pDraggingEntry = NULL;
+ m_pDraggingEntry = nullptr;
}
sal_Int8
@@ -204,8 +204,8 @@ SvxConfigGroupListBox::SvxConfigGroupListBox(vcl::Window* pParent, WinBits nStyl
: SvTreeListBox(pParent, nStyle |
WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT | WB_TABSTOP)
, m_bShowSlots(false)
- , pFunctionListBox(NULL)
- , m_pImageProvider(NULL)
+ , pFunctionListBox(nullptr)
+ , m_pImageProvider(nullptr)
, m_hdImage(CUI_RES(RID_CUIIMG_HARDDISK))
, m_libImage(CUI_RES(RID_CUIIMG_LIB))
, m_macImage(CUI_RES(RID_CUIIMG_MACRO))
@@ -536,10 +536,10 @@ void SvxConfigGroupListBox::Init(bool bShowSlots, const Reference< frame::XFrame
}
else
{
- fillScriptList( rootNode, NULL, false );
+ fillScriptList( rootNode, nullptr, false );
}
}
- MakeVisible( GetEntry( 0,0 ) );
+ MakeVisible( GetEntry( nullptr,0 ) );
SetUpdateMode( true );
}
@@ -650,7 +650,7 @@ void SvxConfigGroupListBox::GroupSelected()
case SVX_CFGGROUP_FUNCTION :
{
SvTreeListEntry *_pEntry = FirstSelected();
- if ( _pEntry != NULL )
+ if ( _pEntry != nullptr )
{
SvxGroupInfo_Impl *_pInfo =
static_cast<SvxGroupInfo_Impl*>(_pEntry->GetUserData());
@@ -711,7 +711,7 @@ void SvxConfigGroupListBox::GroupSelected()
aLabel = commands[i].Command;
}
- SvTreeListEntry* pFuncEntry = NULL;
+ SvTreeListEntry* pFuncEntry = nullptr;
if ( !!aImage )
{
pFuncEntry = pFunctionListBox->InsertEntry(
@@ -803,7 +803,7 @@ void SvxConfigGroupListBox::GroupSelected()
}
if ( pFunctionListBox->GetEntryCount() )
- pFunctionListBox->Select( pFunctionListBox->GetEntry( 0, 0 ) );
+ pFunctionListBox->Select( pFunctionListBox->GetEntry( nullptr, 0 ) );
pFunctionListBox->SetUpdateMode(true);
}
@@ -959,7 +959,7 @@ void
SvxScriptSelectorDialog::UpdateUI()
{
OUString url = GetScriptURL();
- if ( url != NULL && !url.isEmpty() )
+ if ( url != nullptr && !url.isEmpty() )
{
OUString sMessage =
m_pCommands->GetHelpText(m_pCommands->FirstSelected());
@@ -1005,7 +1005,7 @@ IMPL_LINK_TYPED( SvxScriptSelectorDialog, ClickHdl, Button *, pButton, void )
SvTreeListEntry* current = m_pCommands->FirstSelected();
SvTreeListEntry* next = SvTreeListBox::NextSibling( current );
- if ( next != NULL )
+ if ( next != nullptr )
{
m_pCommands->Select( next );
}