summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:23:17 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:38 +0100
commit28034eaf925aa50d379dd5cffccc20d7edc95aec (patch)
tree5cde1f141bc0ffc5cb04a12980d0c4bce69de0f0 /sfx2/source/dialog
parentd930b6c2e6e3dfb9e1ed19b84a3137cc0cfbfd8c (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I7213b49b09ddcb00841aa5f63343baeab0e65fa4
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/backingcomp.cxx2
-rw-r--r--sfx2/source/dialog/backingwindow.cxx6
-rw-r--r--sfx2/source/dialog/basedlgs.cxx22
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx60
-rw-r--r--sfx2/source/dialog/dockwin.cxx38
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx36
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx2
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx4
-rw-r--r--sfx2/source/dialog/infobar.cxx2
-rw-r--r--sfx2/source/dialog/itemconnect.cxx4
-rw-r--r--sfx2/source/dialog/mailmodel.cxx10
-rw-r--r--sfx2/source/dialog/mgetempl.cxx12
-rw-r--r--sfx2/source/dialog/partwnd.cxx2
-rw-r--r--sfx2/source/dialog/passwd.cxx2
-rw-r--r--sfx2/source/dialog/printopt.cxx2
-rw-r--r--sfx2/source/dialog/securitypage.cxx4
-rw-r--r--sfx2/source/dialog/splitwin.cxx12
-rw-r--r--sfx2/source/dialog/srchdlg.cxx2
-rw-r--r--sfx2/source/dialog/styledlg.cxx6
-rw-r--r--sfx2/source/dialog/tabdlg.cxx62
-rw-r--r--sfx2/source/dialog/taskpane.cxx8
-rw-r--r--sfx2/source/dialog/templateinfodlg.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx106
-rw-r--r--sfx2/source/dialog/tplcitem.cxx10
-rw-r--r--sfx2/source/dialog/versdlg.cxx14
25 files changed, 215 insertions, 215 deletions
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
index 72df7c17767d..052784d9fca8 100644
--- a/sfx2/source/dialog/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -252,7 +252,7 @@ void SAL_CALL BackingComp::release()
css::uno::Sequence< css::uno::Type > SAL_CALL BackingComp::getTypes()
throw(css::uno::RuntimeException, std::exception)
{
- static ::cppu::OTypeCollection* pTypeCollection = NULL;
+ static ::cppu::OTypeCollection* pTypeCollection = nullptr;
if (!pTypeCollection)
{
/* GLOBAL SAFE { */
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 54ac9a64dfc1..5905ff9ccdd4 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -96,7 +96,7 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
mbIsSaveMode( false ),
mbInitControls( false ),
mnHideExternalLinks( 0 ),
- mpAccExec( NULL ),
+ mpAccExec( nullptr ),
maSelTemplates(cmpSelectionItems),
maSelFolders(cmpSelectionItems)
@@ -658,7 +658,7 @@ IMPL_LINK_TYPED(BackingWindow, OpenTemplateHdl, ThumbnailViewItem*, pItem, void)
aArgs[2].Name = "UpdateDocMode";
aArgs[2].Value <<= UpdateDocMode::ACCORDING_TO_CONFIG;
aArgs[3].Name = "InteractionHandler";
- aArgs[3].Value <<= task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), 0 );
+ aArgs[3].Value <<= task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr );
TemplateViewItem *pTemplateItem = static_cast<TemplateViewItem*>(pItem);
@@ -736,7 +736,7 @@ void BackingWindow::dispatchURL( const OUString& i_rURL,
if ( xDispatch.is() )
{
ImplDelayedDispatch* pDisp = new ImplDelayedDispatch( xDispatch, aDispatchURL, i_rArgs );
- if( Application::PostUserEvent( Link<void*,void>( NULL, implDispatchDelayed ), pDisp ) == 0 )
+ if( Application::PostUserEvent( Link<void*,void>( nullptr, implDispatchDelayed ), pDisp ) == nullptr )
delete pDisp; // event could not be posted for unknown reason, at least don't leak
}
}
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index dc383e080c3f..cd86096f1416 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -46,8 +46,8 @@ using namespace ::com::sun::star::uno;
#define USERITEM_NAME "UserItem"
SingleTabDlgImpl::SingleTabDlgImpl()
- : m_pSfxPage(NULL)
- , m_pLine(NULL)
+ : m_pSfxPage(nullptr)
+ , m_pLine(nullptr)
{
}
@@ -162,8 +162,8 @@ void SfxModalDialog::init()
SfxModalDialog::SfxModalDialog(vcl::Window *pParent, const OUString& rID, const OUString& rUIXMLDescription )
: ModalDialog(pParent, rID, rUIXMLDescription),
nUniqId(0), //todo: remove this member when the ResId using ctor is removed
- pInputSet(0),
- pOutputSet(0)
+ pInputSet(nullptr),
+ pOutputSet(nullptr)
{
init();
}
@@ -368,9 +368,9 @@ SfxModelessDialog::~SfxModelessDialog()
void SfxModelessDialog::dispose()
{
if ( pImp->pMgr->GetFrame().is() && pImp->pMgr->GetFrame() == pBindings->GetActiveFrame() )
- pBindings->SetActiveFrame( NULL );
+ pBindings->SetActiveFrame( nullptr );
delete pImp;
- pImp = NULL;
+ pImp = nullptr;
ModelessDialog::dispose();
}
@@ -436,7 +436,7 @@ bool SfxFloatingWindow::Notify( NotifyEvent& rEvt )
{
if ( !HasChildPathFocus() )
{
- pBindings->SetActiveFrame( NULL );
+ pBindings->SetActiveFrame( nullptr );
pImp->pMgr->Deactivate_Impl();
}
}
@@ -520,9 +520,9 @@ SfxFloatingWindow::~SfxFloatingWindow()
void SfxFloatingWindow::dispose()
{
if ( pImp && pImp->pMgr->GetFrame() == pBindings->GetActiveFrame() )
- pBindings->SetActiveFrame( NULL );
+ pBindings->SetActiveFrame( nullptr );
delete pImp;
- pImp = NULL;
+ pImp = nullptr;
FloatingWindow::dispose();
}
@@ -683,7 +683,7 @@ IMPL_LINK_NOARG_TYPED(SfxSingleTabDialog, OKHdl_Impl, Button*, void)
SfxSingleTabDialog::SfxSingleTabDialog(vcl::Window *pParent, const SfxItemSet& rSet,
const OUString& rID, const OUString& rUIXMLDescription)
: SfxModalDialog(pParent, rID, rUIXMLDescription)
- , fnGetRanges(NULL)
+ , fnGetRanges(nullptr)
, pImpl(new SingleTabDlgImpl)
{
get(pOKBtn, "ok");
@@ -696,7 +696,7 @@ SfxSingleTabDialog::SfxSingleTabDialog(vcl::Window *pParent, const SfxItemSet& r
SfxSingleTabDialog::SfxSingleTabDialog(vcl::Window* pParent, const SfxItemSet* pInSet,
const OUString& rID, const OUString& rUIXMLDescription)
: SfxModalDialog(pParent, rID, rUIXMLDescription)
- , fnGetRanges(NULL)
+ , fnGetRanges(nullptr)
, pImpl(new SingleTabDlgImpl)
{
get(pOKBtn, "ok");
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index dd7bdd76e393..ecd40c98e4b0 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -612,7 +612,7 @@ bool SfxDocumentInfoItem::PutValue( const Any& rVal, sal_uInt8 nMemberId )
SfxDocumentDescPage::SfxDocumentDescPage( vcl::Window * pParent, const SfxItemSet& rItemSet )
: SfxTabPage(pParent, "DescriptionInfoPage", "sfx/ui/descriptioninfopage.ui", &rItemSet)
- , m_pInfoItem ( NULL )
+ , m_pInfoItem ( nullptr )
{
get(m_pTitleEd, "title");
@@ -655,10 +655,10 @@ bool SfxDocumentDescPage::FillItemSet(SfxItemSet *rSet)
}
// Generating the output data
- const SfxPoolItem* pItem = NULL;
- SfxDocumentInfoItem* pInfo = NULL;
+ const SfxPoolItem* pItem = nullptr;
+ SfxDocumentInfoItem* pInfo = nullptr;
SfxTabDialog* pDlg = GetTabDialog();
- const SfxItemSet* pExSet = NULL;
+ const SfxItemSet* pExSet = nullptr;
if ( pDlg )
pExSet = pDlg->GetExampleSet();
@@ -1143,7 +1143,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
SfxDocumentInfoDialog::SfxDocumentInfoDialog( vcl::Window* pParent,
const SfxItemSet& rItemSet )
- : SfxTabDialog(0, pParent, "DocumentPropertiesDialog",
+ : SfxTabDialog(nullptr, pParent, "DocumentPropertiesDialog",
"sfx/ui/documentpropertiesdialog.ui", &rItemSet)
, m_nDocInfoId(0)
{
@@ -1156,7 +1156,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( vcl::Window* pParent,
#endif
// Determine the Titels
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
OUString aTitle( GetText() );
if ( SfxItemState::SET !=
rItemSet.GetItemState( SID_EXPLORER_PROPS_START, false, &pItem ) )
@@ -1187,11 +1187,11 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( vcl::Window* pParent,
SetText( aTitle );
// Property Pages
- m_nDocInfoId = AddTabPage("general", SfxDocumentPage::Create, 0);
- AddTabPage("description", SfxDocumentDescPage::Create, 0);
- AddTabPage("customprops", SfxCustomPropertiesPage::Create, 0);
- AddTabPage("cmisprops", SfxCmisPropertiesPage::Create, 0);
- AddTabPage("security", SfxSecurityPage::Create, 0);
+ m_nDocInfoId = AddTabPage("general", SfxDocumentPage::Create, nullptr);
+ AddTabPage("description", SfxDocumentDescPage::Create, nullptr);
+ AddTabPage("customprops", SfxCustomPropertiesPage::Create, nullptr);
+ AddTabPage("cmisprops", SfxCmisPropertiesPage::Create, nullptr);
+ AddTabPage("security", SfxSecurityPage::Create, nullptr);
}
@@ -1204,7 +1204,7 @@ void SfxDocumentInfoDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
void SfxDocumentInfoDialog::AddFontTabPage()
{
- AddTabPage( FONT_PAGE_ID, SfxResId( STR_FONT_TABPAGE ).toString(), SfxDocumentFontsPage::Create, 0);
+ AddTabPage( FONT_PAGE_ID, SfxResId( STR_FONT_TABPAGE ).toString(), SfxDocumentFontsPage::Create, nullptr);
}
// class CustomPropertiesYesNoButton -------------------------------------
@@ -1436,7 +1436,7 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent,
m_aYesNoButton ( VclPtr<CustomPropertiesYesNoButton>::Create( this, SfxResId( SFX_WIN_PROPERTY_YESNO )) ),
m_aRemoveButton ( VclPtr<ImageButton>::Create( this, 0 ) ),
m_nScrollPos (0),
- m_pCurrentLine (NULL),
+ m_pCurrentLine (nullptr),
m_aNumberFormatter( ::comphelper::getProcessComponentContext(),
Application::GetSettings().GetLanguageTag().getLanguageType() )
@@ -1550,7 +1550,7 @@ IMPL_LINK_TYPED( CustomPropertiesWindow, RemoveHdl, Button*, pBtn, void )
vcl::Window* pWindows[] = { pLine->m_aNameBox.get(), pLine->m_aTypeBox.get(), pLine->m_aValueEdit.get(),
pLine->m_aDateField.get(), pLine->m_aTimeField.get(),
pLine->m_aDurationField.get(), pLine->m_aEditButton.get(),
- pLine->m_aYesNoButton.get(), pLine->m_aRemoveButton.get(), NULL };
+ pLine->m_aYesNoButton.get(), pLine->m_aRemoveButton.get(), nullptr };
vcl::Window** pCurrent = pWindows;
while ( *pCurrent )
{
@@ -1562,7 +1562,7 @@ IMPL_LINK_TYPED( CustomPropertiesWindow, RemoveHdl, Button*, pBtn, void )
}
}
- m_aRemovedHdl.Call(0);
+ m_aRemovedHdl.Call(nullptr);
}
IMPL_LINK_TYPED( CustomPropertiesWindow, EditLoseFocusHdl, Control&, rControl, void )
@@ -1658,7 +1658,7 @@ bool CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa
pHeaderBar->SetItemSize( HI_VALUE, nItemWidth );
pHeaderBar->SetItemSize( HI_ACTION, nButtonWidth );
- vcl::Window* pWindows[] = { m_aNameBox.get(), m_aTypeBox.get(), m_aValueEdit.get(), m_aRemoveButton.get(), NULL };
+ vcl::Window* pWindows[] = { m_aNameBox.get(), m_aTypeBox.get(), m_aValueEdit.get(), m_aRemoveButton.get(), nullptr };
vcl::Window** pCurrent = pWindows;
sal_uInt16 nPos = 0;
while ( *pCurrent )
@@ -1723,7 +1723,7 @@ void CustomPropertiesWindow::updateLineWidth()
vcl::Window* pWindows[] = { m_aNameBox.get(), m_aTypeBox.get(), m_aValueEdit.get(),
m_aDateField.get(), m_aTimeField.get(),
m_aDurationField.get(), m_aEditButton.get(),
- m_aYesNoButton.get(), m_aRemoveButton.get(), NULL };
+ m_aYesNoButton.get(), m_aRemoveButton.get(), nullptr };
for (std::vector< CustomPropertyLine* >::iterator aI =
m_aCustomPropertiesLines.begin(), aEnd = m_aCustomPropertiesLines.end();
@@ -1735,7 +1735,7 @@ void CustomPropertiesWindow::updateLineWidth()
{ pNewLine->m_aNameBox.get(), pNewLine->m_aTypeBox.get(), pNewLine->m_aValueEdit.get(),
pNewLine->m_aDateField.get(), pNewLine->m_aTimeField.get(),
pNewLine->m_aDurationField.get(), pNewLine->m_aEditButton.get(),
- pNewLine->m_aYesNoButton.get(), pNewLine->m_aRemoveButton.get(), NULL };
+ pNewLine->m_aYesNoButton.get(), pNewLine->m_aRemoveButton.get(), nullptr };
vcl::Window** pCurrent = pWindows;
vcl::Window** pNewCurrent = pNewWindows;
@@ -1777,12 +1777,12 @@ void CustomPropertiesWindow::AddLine( const OUString& sName, Any& rAny )
vcl::Window* pWindows[] = { m_aNameBox.get(), m_aTypeBox.get(), m_aValueEdit.get(),
m_aDateField.get(), m_aTimeField.get(),
m_aDurationField.get(), m_aEditButton.get(),
- m_aYesNoButton.get(), m_aRemoveButton.get(), NULL };
+ m_aYesNoButton.get(), m_aRemoveButton.get(), nullptr };
vcl::Window* pNewWindows[] =
{ pNewLine->m_aNameBox.get(), pNewLine->m_aTypeBox.get(), pNewLine->m_aValueEdit.get(),
pNewLine->m_aDateField.get(), pNewLine->m_aTimeField.get(),
pNewLine->m_aDurationField.get(), pNewLine->m_aEditButton.get(),
- pNewLine->m_aYesNoButton.get(), pNewLine->m_aRemoveButton.get(), NULL };
+ pNewLine->m_aYesNoButton.get(), pNewLine->m_aRemoveButton.get(), nullptr };
vcl::Window** pCurrent = pWindows;
vcl::Window** pNewCurrent = pNewWindows;
while ( *pCurrent )
@@ -1922,7 +1922,7 @@ void CustomPropertiesWindow::DoScroll( sal_Int32 nNewPos )
continue;
vcl::Window* pWindows[] = { pLine->m_aNameBox.get(), pLine->m_aTypeBox.get(), pLine->m_aValueEdit.get(), pLine->m_aDateField.get(), pLine->m_aTimeField.get(),
- pLine->m_aDurationField.get(), pLine->m_aEditButton.get(), pLine->m_aYesNoButton.get(), pLine->m_aRemoveButton.get(), NULL };
+ pLine->m_aDurationField.get(), pLine->m_aEditButton.get(), pLine->m_aYesNoButton.get(), pLine->m_aRemoveButton.get(), nullptr };
vcl::Window** pCurrent = pWindows;
while ( *pCurrent )
{
@@ -2017,11 +2017,11 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c
CustomPropertiesControl::CustomPropertiesControl(vcl::Window* pParent)
: Window(pParent, WB_HIDE | WB_CLIPCHILDREN | WB_TABSTOP | WB_DIALOGCONTROL | WB_BORDER)
- , m_pVBox(NULL)
- , m_pHeaderBar(NULL)
- , m_pBody(NULL)
- , m_pPropertiesWin(NULL)
- , m_pVertScroll(NULL)
+ , m_pVBox(nullptr)
+ , m_pHeaderBar(nullptr)
+ , m_pBody(nullptr)
+ , m_pPropertiesWin(nullptr)
+ , m_pVertScroll(nullptr)
, m_nThumbPos(0)
{
}
@@ -2178,8 +2178,8 @@ IMPL_LINK_NOARG_TYPED(SfxCustomPropertiesPage, AddHdl, Button*, void)
bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet )
{
bool bModified = false;
- const SfxPoolItem* pItem = NULL;
- SfxDocumentInfoItem* pInfo = NULL;
+ const SfxPoolItem* pItem = nullptr;
+ SfxDocumentInfoItem* pInfo = nullptr;
bool bMustDelete = false;
if ( GetTabDialog() && GetTabDialog()->GetExampleSet() )
@@ -2648,8 +2648,8 @@ SfxCmisPropertiesPage::SfxCmisPropertiesPage( vcl::Window* pParent, const SfxIte
bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet* rSet )
{
- const SfxPoolItem* pItem = NULL;
- SfxDocumentInfoItem* pInfo = NULL;
+ const SfxPoolItem* pItem = nullptr;
+ SfxDocumentInfoItem* pInfo = nullptr;
bool bMustDelete = false;
if ( GetTabDialog() && GetTabDialog()->GetExampleSet() )
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 0f350658f0ca..e4d71dd12770 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -322,7 +322,7 @@ static SfxWorkWindow* lcl_getWorkWindowFromXFrame( const uno::Reference< frame::
{
// We need to find the corresponding SfxFrame of our XFrame
SfxFrame* pFrame = SfxFrame::GetFirst();
- SfxFrame* pXFrame = 0;
+ SfxFrame* pXFrame = nullptr;
while ( pFrame )
{
uno::Reference< frame::XFrame > xViewShellFrame( pFrame->GetFrameInterface() );
@@ -339,7 +339,7 @@ static SfxWorkWindow* lcl_getWorkWindowFromXFrame( const uno::Reference< frame::
if ( pXFrame )
return pXFrame->GetWorkWindow_Impl();
else
- return NULL;
+ return nullptr;
}
/** Factory function used by the framework layout manager to "create" a docking window with a special name.
@@ -504,7 +504,7 @@ bool SfxDockingWindow::PrepareToggleFloatingMode()
{
// The DockingWindow is inside a SplitWindow and will be teared of.
pImp->pSplitWin->RemoveWindow(this/*, sal_False*/);
- pImp->pSplitWin = 0;
+ pImp->pSplitWin = nullptr;
}
}
else if ( pMgr )
@@ -825,7 +825,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
DockingWindow (pParent, nWinBits),
pBindings(pBindinx),
pMgr(pCW),
- pImp(NULL)
+ pImp(nullptr)
{
if ( !GetHelpId().isEmpty() )
{
@@ -836,7 +836,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
{
SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame();
SfxSlotPool* pSlotPool = pViewFrame->GetObjectShell()->GetModule()->GetSlotPool();
- const SfxSlot* pSlot = pCW ? pSlotPool->GetSlot( pCW->GetType() ) : NULL;
+ const SfxSlot* pSlot = pCW ? pSlotPool->GetSlot( pCW->GetType() ) : nullptr;
if ( pSlot )
{
OString aCmd("SFXDOCKINGWINDOW_");
@@ -847,7 +847,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp = new SfxDockingWindow_Impl;
pImp->bConstructed = false;
- pImp->pSplitWin = 0;
+ pImp->pSplitWin = nullptr;
pImp->bEndDocked = false;
pImp->bDockingPrevented = false;
@@ -870,7 +870,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
DockingWindow(pParent, rResId),
pBindings(pBindinx),
pMgr(pCW),
- pImp(NULL)
+ pImp(nullptr)
{
if ( !GetHelpId().isEmpty() )
{
@@ -881,7 +881,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
{
SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame();
SfxSlotPool* pSlotPool = pViewFrame->GetObjectShell()->GetModule()->GetSlotPool();
- const SfxSlot* pSlot = pCW ? pSlotPool->GetSlot( pCW->GetType() ) : NULL;
+ const SfxSlot* pSlot = pCW ? pSlotPool->GetSlot( pCW->GetType() ) : nullptr;
if ( pSlot )
{
OString aCmd("SFXDOCKINGWINDOW_");
@@ -892,7 +892,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp = new SfxDockingWindow_Impl;
pImp->bConstructed = false;
- pImp->pSplitWin = 0;
+ pImp->pSplitWin = nullptr;
pImp->bEndDocked = false;
pImp->bDockingPrevented = false;
@@ -915,7 +915,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
: DockingWindow(pParent, rID, rUIXMLDescription)
, pBindings(pBindinx)
, pMgr(pCW)
- , pImp(NULL)
+ , pImp(nullptr)
{
if ( !GetHelpId().isEmpty() )
{
@@ -926,7 +926,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
{
SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame();
SfxSlotPool* pSlotPool = pViewFrame->GetObjectShell()->GetModule()->GetSlotPool();
- const SfxSlot* pSlot = pCW ? pSlotPool->GetSlot( pCW->GetType() ) : NULL;
+ const SfxSlot* pSlot = pCW ? pSlotPool->GetSlot( pCW->GetType() ) : nullptr;
if ( pSlot )
{
OString aCmd("SFXDOCKINGWINDOW_");
@@ -937,7 +937,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp = new SfxDockingWindow_Impl;
pImp->bConstructed = false;
- pImp->pSplitWin = 0;
+ pImp->pSplitWin = nullptr;
pImp->bEndDocked = false;
pImp->bDockingPrevented = false;
@@ -1225,19 +1225,19 @@ SfxDockingWindow::~SfxDockingWindow()
void SfxDockingWindow::dispose()
{
ReleaseChildWindow_Impl();
- delete pImp; pImp = NULL;
+ delete pImp; pImp = nullptr;
DockingWindow::dispose();
}
void SfxDockingWindow::ReleaseChildWindow_Impl()
{
if ( pMgr && pMgr->GetFrame() == pBindings->GetActiveFrame() )
- pBindings->SetActiveFrame( NULL );
+ pBindings->SetActiveFrame( nullptr );
if ( pMgr && pImp->pSplitWin && pImp->pSplitWin->IsItemValid( GetType() ) )
pImp->pSplitWin->RemoveWindow(this);
- pMgr=NULL;
+ pMgr=nullptr;
}
/** This method calculates a resulting alignment for the given mouse position
@@ -1732,12 +1732,12 @@ bool SfxDockingWindow::Notify( NotifyEvent& rEvt )
if ( rEvt.GetType() == MouseNotifyEvent::GETFOCUS )
{
- if (pMgr != NULL)
+ if (pMgr != nullptr)
pBindings->SetActiveFrame( pMgr->GetFrame() );
if ( pImp->pSplitWin )
pImp->pSplitWin->SetActiveWindow_Impl( this );
- else if (pMgr != NULL)
+ else if (pMgr != nullptr)
pMgr->Activate_Impl();
// In VCL Notify goes first to the window itself, also call the
@@ -1756,8 +1756,8 @@ bool SfxDockingWindow::Notify( NotifyEvent& rEvt )
}
else if ( rEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && !HasChildPathFocus() )
{
- pBindings->SetActiveFrame( NULL );
- if (pMgr != NULL)
+ pBindings->SetActiveFrame( nullptr );
+ if (pMgr != nullptr)
pMgr->Deactivate_Impl();
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index fa8db6c62f8b..540f8c2c9623 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -136,7 +136,7 @@ const OUString* GetLastFilterConfigId( FileDialogHelper::Context _eContext )
static const OUString aSI_EXPORT_IDENTIFIER("SiExportLastFilter");
static const OUString aSW_EXPORT_IDENTIFIER("SwExportLastFilter");
- const OUString* pRet = NULL;
+ const OUString* pRet = nullptr;
switch( _eContext )
{
@@ -206,7 +206,7 @@ void FileDialogHelper_Impl::handleFileSelectionChanged( const FilePickerEvent& )
void FileDialogHelper_Impl::handleDirectoryChanged( const FilePickerEvent& )
{
if ( mbShowPreview )
- TimeOutHdl_Impl( NULL );
+ TimeOutHdl_Impl( nullptr );
}
OUString FileDialogHelper_Impl::handleHelpRequested( const FilePickerEvent& aEvent )
@@ -271,7 +271,7 @@ OUString FileDialogHelper_Impl::handleHelpRequested( const FilePickerEvent& aEve
OUString aHelpText;
Help* pHelp = Application::GetHelp();
if ( pHelp )
- aHelpText = pHelp->GetHelpText( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), NULL );
+ aHelpText = pHelp->GetHelpText( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), nullptr );
return aHelpText;
}
@@ -297,7 +297,7 @@ void FileDialogHelper_Impl::handleControlStateChanged( const FilePickerEvent& aE
void FileDialogHelper_Impl::handleDialogSizeChanged()
{
if ( mbShowPreview )
- TimeOutHdl_Impl( NULL );
+ TimeOutHdl_Impl( nullptr );
}
// XEventListener Methods
@@ -366,7 +366,7 @@ const SfxFilter* FileDialogHelper_Impl::getCurentSfxFilter()
{
OUString aFilterName = getCurrentFilterUIName();
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
if ( mpMatcher && !aFilterName.isEmpty() )
pFilter = mpMatcher->GetFilter4UIName( aFilterName, m_nMustFlags, m_nDontFlags );
@@ -586,7 +586,7 @@ void FileDialogHelper_Impl::updatePreviewState( bool _bUpdatePreviewWindow )
xFilePreview->setShowState( mbShowPreview );
if ( _bUpdatePreviewWindow )
- TimeOutHdl_Impl( NULL );
+ TimeOutHdl_Impl( nullptr );
}
}
catch( const Exception& )
@@ -769,14 +769,14 @@ ErrCode FileDialogHelper_Impl::getGraphic( const OUString& rURL,
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( rURL, StreamMode::READ );
if( pStream )
- nRet = mpGraphicFilter->ImportGraphic( rGraphic, rURL, *pStream, nFilter, NULL, nFilterImportFlags );
+ nRet = mpGraphicFilter->ImportGraphic( rGraphic, rURL, *pStream, nFilter, nullptr, nFilterImportFlags );
else
- nRet = mpGraphicFilter->ImportGraphic( rGraphic, aURLObj, nFilter, NULL, nFilterImportFlags );
+ nRet = mpGraphicFilter->ImportGraphic( rGraphic, aURLObj, nFilter, nullptr, nFilterImportFlags );
delete pStream;
}
else
{
- nRet = mpGraphicFilter->ImportGraphic( rGraphic, aURLObj, nFilter, NULL, nFilterImportFlags );
+ nRet = mpGraphicFilter->ImportGraphic( rGraphic, aURLObj, nFilter, nullptr, nFilterImportFlags );
}
return nRet;
@@ -857,7 +857,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
:m_nDialogType ( nDialogType )
,meContext ( FileDialogHelper::UNKNOWN_CONTEXT )
{
- const char* pServiceName=0;
+ const char* pServiceName=nullptr;
switch (nDialog)
{
case SFX2_IMPL_DIALOG_SYSTEM:
@@ -909,9 +909,9 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
m_nMustFlags = SfxFilterFlags::EXPORT;
- mpMatcher = NULL;
- mpGraphicFilter = NULL;
- mnPostUserEventId = 0;
+ mpMatcher = nullptr;
+ mpGraphicFilter = nullptr;
+ mnPostUserEventId = nullptr;
// create the picker component
mxFileDlg.set(xFactory->createInstance( aService ), css::uno::UNO_QUERY);
@@ -1121,7 +1121,7 @@ FileDialogHelper_Impl::~FileDialogHelper_Impl()
// Remove user event if we haven't received it yet
if ( mnPostUserEventId )
Application::RemoveUserEvent( mnPostUserEventId );
- mnPostUserEventId = 0;
+ mnPostUserEventId = nullptr;
delete mpGraphicFilter;
@@ -1166,7 +1166,7 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con
IMPL_LINK_NOARG_TYPED( FileDialogHelper_Impl, InitControls, void*, void )
{
- mnPostUserEventId = 0;
+ mnPostUserEventId = nullptr;
enablePasswordBox( true );
updateFilterOptionsBox( );
updateSelectionBox( );
@@ -1375,7 +1375,7 @@ ErrCode FileDialogHelper_Impl::execute( std::vector<OUString>& rpURLList,
if( mbHasPassword )
{
const SfxBoolItem* pPassItem = SfxItemSet::GetItem<SfxBoolItem>(rpSet, SID_PASSWORDINTERACTION, false);
- mbPwdCheckBoxState = ( pPassItem != NULL && pPassItem->GetValue() );
+ mbPwdCheckBoxState = ( pPassItem != nullptr && pPassItem->GetValue() );
// in case the document has password to modify, the dialog should be shown
const SfxUnoAnyItem* pPassToModifyItem = SfxItemSet::GetItem<SfxUnoAnyItem>(rpSet, SID_MODIFYPASSWORDINFO, false);
@@ -2236,7 +2236,7 @@ FileDialogHelper::FileDialogHelper(
const css::uno::Sequence< OUString >& rBlackList)
: m_nError(0)
{
- mpImp = new FileDialogHelper_Impl( this, nDialogType, nFlags, nDialog, NULL, rStandardDir, rBlackList );
+ mpImp = new FileDialogHelper_Impl( this, nDialogType, nFlags, nDialog, nullptr, rStandardDir, rBlackList );
mxImp = mpImp;
// create the list of filters
@@ -2602,7 +2602,7 @@ ErrCode FileOpenDialog_Impl( sal_Int16 nDialogType,
ErrCode RequestPassword(const SfxFilter* pCurrentFilter, OUString& aURL, SfxItemSet* pSet)
{
- uno::Reference < task::XInteractionHandler2 > xInteractionHandler = task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), 0 );
+ uno::Reference < task::XInteractionHandler2 > xInteractionHandler = task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr );
// TODO: need a save way to distinguish MS filters from other filters
// for now MS-filters are the only alien filters that support encryption
bool bMSType = !pCurrentFilter->IsOwnFormat();
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index 9d50903d51da..f4a49efdd20d 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -175,7 +175,7 @@ namespace sfx2
const short nDialogType,
sal_Int64 nFlags,
sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG,
- vcl::Window* _pPreferredParentWindow = NULL,
+ vcl::Window* _pPreferredParentWindow = nullptr,
const OUString& sStandardDir = OUString(),
const css::uno::Sequence< OUString >& rBlackList = css::uno::Sequence< OUString >()
);
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index 3fb2ff5ea7b8..c9a3d4310c1a 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -899,10 +899,10 @@ namespace sfx2
const SfxFilter* TSortedFilterList::impl_getFilter(sal_Int32 nIndex)
{
if (nIndex<0 || nIndex>=(sal_Int32)m_lFilters.size())
- return 0;
+ return nullptr;
const OUString& sFilterName = m_lFilters[nIndex];
if (sFilterName.isEmpty())
- return 0;
+ return nullptr;
return SfxFilter::GetFilterByName(sFilterName);
}
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index a88aaf774255..fbf1e4f21740 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -275,7 +275,7 @@ SfxInfoBarWindow* SfxInfoBarContainerWindow::getInfoBar(const OUString& sId)
if ((*it)->getId() == sId)
return it->get();
}
- return NULL;
+ return nullptr;
}
void SfxInfoBarContainerWindow::removeInfoBar(SfxInfoBarWindow* pInfoBar)
diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx
index 832766028963..54446c61d5dc 100644
--- a/sfx2/source/dialog/itemconnect.cxx
+++ b/sfx2/source/dialog/itemconnect.cxx
@@ -52,7 +52,7 @@ bool ItemWrapperHelper::IsKnownItem( const SfxItemSet& rItemSet, sal_uInt16 nSlo
const SfxPoolItem* ItemWrapperHelper::GetUniqueItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
{
sal_uInt16 nWhich = GetWhichId( rItemSet, nSlot );
- return (rItemSet.GetItemState( nWhich ) >= SfxItemState::DEFAULT) ? rItemSet.GetItem( nWhich ) : 0;
+ return (rItemSet.GetItemState( nWhich ) >= SfxItemState::DEFAULT) ? rItemSet.GetItem( nWhich ) : nullptr;
}
const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
@@ -95,7 +95,7 @@ void DummyWindowWrapper::SetControlDontKnow( bool )
void* DummyWindowWrapper::GetControlValue() const
{
- return 0;
+ return nullptr;
}
void DummyWindowWrapper::SetControlValue( void* )
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 95ff121dbfd3..86771ec52a35 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -477,7 +477,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
// This makes it possible to store the file for "send document as e-mail"
// with the original file name. We cannot use the original file as
// some mail programs need exclusive access.
- ::utl::TempFile aTempDir( NULL, true );
+ ::utl::TempFile aTempDir( nullptr, true );
INetURLObject aFilePathObj( aTempDir.GetURL() );
aFilePathObj.insertName( aFileName );
@@ -649,9 +649,9 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
}
SfxMailModel::SfxMailModel() :
- mpToList ( NULL ),
- mpCcList ( NULL ),
- mpBccList ( NULL )
+ mpToList ( nullptr ),
+ mpCcList ( nullptr ),
+ mpBccList ( nullptr )
{
}
@@ -667,7 +667,7 @@ void SfxMailModel::AddAddress( const OUString& rAddress, AddressRole eRole )
// don't add a empty address
if ( !rAddress.isEmpty() )
{
- AddressList_Impl* pList = NULL;
+ AddressList_Impl* pList = nullptr;
if ( ROLE_TO == eRole )
{
if ( !mpToList )
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index bbd0a5af11e6..0c69f24a4ac7 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -51,7 +51,7 @@
SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const SfxItemSet& rAttrSet)
: SfxTabPage(pParent, "ManageStylePage", "sfx/ui/managestylepage.ui", &rAttrSet)
, pStyle(&static_cast<SfxStyleDialog*>(GetParentDialog())->GetStyleSheet())
- , pItem(0)
+ , pItem(nullptr)
, bModified(false)
, aName(pStyle->GetName())
, aFollow(pStyle->GetFollow())
@@ -99,7 +99,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx
OSL_ENSURE( pResMgr, "No ResMgr in Module" );
pFamilies = new SfxStyleFamilies( ResId( DLG_STYLE_DESIGNER, *pResMgr ) );
- SfxStyleSheetBasePool* pPool = 0;
+ SfxStyleSheetBasePool* pPool = nullptr;
SfxObjectShell* pDocShell = SfxObjectShell::Current();
if ( pDocShell )
@@ -223,7 +223,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx
if ( !m_pFilterLb->GetEntryCount() || !pStyle->IsUserDefined() )
{
- pItem = 0;
+ pItem = nullptr;
m_pFilterFt->Disable();
m_pFilterLb->Disable();
}
@@ -259,8 +259,8 @@ void SfxManageStyleSheetPage::dispose()
m_pNameRw->SetGetFocusHdl( Link<Control&,void>() );
m_pNameRw->SetLoseFocusHdl( Link<Control&,void>() );
delete pFamilies;
- pItem = 0;
- pStyle = 0;
+ pItem = nullptr;
+ pStyle = nullptr;
m_pNameRo.clear();
m_pNameRw.clear();
m_pAutoCB.clear();
@@ -398,7 +398,7 @@ bool SfxManageStyleSheetPage::Execute_Impl(
if ( !rRefStr.isEmpty() )
pItems[ nCount++ ] = &aRefName;
- pItems[ nCount++ ] = 0;
+ pItems[ nCount++ ] = nullptr;
sal_uInt16 nModi = pModifier ? *pModifier : 0;
const SfxPoolItem* mpItem = rDispatcher.Execute(
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index d5f738f2b131..08dfbe6228b3 100644
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -85,7 +85,7 @@ SfxPartChildWnd_Impl::~SfxPartChildWnd_Impl()
SfxPartDockWnd_Impl* pWin = static_cast<SfxPartDockWnd_Impl*>(GetWindow());
if ( pWin && xFrame == pWin->GetBindings().GetActiveFrame() )
- pWin->GetBindings().SetActiveFrame( NULL );
+ pWin->GetBindings().SetActiveFrame( nullptr );
}
bool SfxPartChildWnd_Impl::QueryClose()
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index c5397355aebd..0bc687c7842e 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -172,7 +172,7 @@ void SfxPasswordDialog::SetMinLen( sal_uInt16 nLen )
{
mnMinLen = nLen;
SetPasswdText();
- ModifyHdl( NULL );
+ ModifyHdl( nullptr );
}
void SfxPasswordDialog::ShowMinLengthText(bool bShow)
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index a78cbf679ff6..e68ab4cd6827 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -266,7 +266,7 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt
{
pCurrentOptions->SetPDFAsStandardPrintJobFormat( m_pPDFCB->IsChecked() );
svtools::executeRestartDialog(
- comphelper::getProcessComponentContext(), 0,
+ comphelper::getProcessComponentContext(), nullptr,
svtools::RESTART_REASON_PDF_AS_STANDARD_JOB_FORMAT);
}
}
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 8236a6ed50ba..29ff9e2a551c 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -434,7 +434,7 @@ bool SfxSecurityPage::FillItemSet( SfxItemSet * rItemSet )
{
bool bModified = false;
DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" );
- if (m_pImpl.get() != 0)
+ if (m_pImpl.get() != nullptr)
bModified = m_pImpl->FillItemSet_Impl( *rItemSet );
return bModified;
}
@@ -443,7 +443,7 @@ bool SfxSecurityPage::FillItemSet( SfxItemSet * rItemSet )
void SfxSecurityPage::Reset( const SfxItemSet * rItemSet )
{
DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" );
- if (m_pImpl.get() != 0)
+ if (m_pImpl.get() != nullptr)
m_pImpl->Reset_Impl( *rItemSet );
}
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index e3e38b29dd0d..567fdee700c8 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -205,8 +205,8 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl,
pDockArr( new SfxDockArr_Impl ),
bLocked(false),
bPinned(true),
- pEmptyWin(NULL),
- pActive(NULL)
+ pEmptyWin(nullptr),
+ pActive(nullptr)
{
if ( bWithButtons )
{
@@ -267,7 +267,7 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl,
for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxDock_Impl *pDock = new SfxDock_Impl;
- pDock->pWin = 0;
+ pDock->pWin = nullptr;
pDock->bNewLine = false;
pDock->bHide = true;
pDock->nType = (sal_uInt16) aWinData.getToken(i++, ',').toInt32();
@@ -316,7 +316,7 @@ void SfxSplitWindow::dispose()
{
// Set pOwner to NULL, otherwise try to delete pEmptyWin once more. The
// window that is just being docked is always deleted from the outside.
- pEmptyWin->pOwner = NULL;
+ pEmptyWin->pOwner = nullptr;
}
pEmptyWin.disposeAndClear();
@@ -472,7 +472,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
sal_uInt16 nPos = 0;
bool bNewLine = true;
bool bSaveConfig = false;
- SfxDock_Impl *pFoundDock=0;
+ SfxDock_Impl *pFoundDock=nullptr;
sal_uInt16 nCount = pDockArr->size();
for ( sal_uInt16 n=0; n<nCount; n++ )
{
@@ -842,7 +842,7 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, bool bHide )
SfxDock_Impl& rDock = (*pDockArr)[n];
if ( rDock.nType == pDockWin->GetType() )
{
- rDock.pWin = 0;
+ rDock.pWin = nullptr;
rDock.bHide = bHide;
break;
}
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index 8a57056e4c7d..d0e953011f98 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -68,7 +68,7 @@ SearchDialog::~SearchDialog()
void SearchDialog::dispose()
{
SaveConfig();
- m_aCloseHdl.Call( NULL );
+ m_aCloseHdl.Call( nullptr );
m_pSearchEdit.clear();
m_pWholeWordsBox.clear();
m_pMatchCaseBox.clear();
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index d96b80ba07ac..e6711fb9cc9d 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -51,7 +51,7 @@ SfxStyleDialog::SfxStyleDialog
if (!rStyle.HasParentSupport())
RemoveStandardButton();
- m_nOrganizerId = AddTabPage("organizer", SfxManageStyleSheetPage::Create, 0);
+ m_nOrganizerId = AddTabPage("organizer", SfxManageStyleSheetPage::Create, nullptr);
// With new template always set the management page as the current page
@@ -83,8 +83,8 @@ SfxStyleDialog::~SfxStyleDialog()
void SfxStyleDialog::dispose()
{
- pExampleSet = 0;
- pStyle = 0;
+ pExampleSet = nullptr;
+ pStyle = nullptr;
SfxTabDialog::dispose();
}
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index b1ab185a0f15..b2575dae91be 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -71,7 +71,7 @@ struct Data_Impl
nId ( Id ),
fnCreatePage( fnPage ),
fnGetRanges ( fnRanges ),
- pTabPage ( 0 ),
+ pTabPage ( nullptr ),
bOnDemand ( bDemand ),
bRefresh ( false )
{
@@ -105,7 +105,7 @@ SfxPoolItem* SfxTabDialogItem::Clone(SfxItemPool* pToPool) const
SfxPoolItem* SfxTabDialogItem::Create(SvStream& /*rStream*/, sal_uInt16 /*nVersion*/) const
{
OSL_FAIL( "Use it only in UI!" );
- return NULL;
+ return nullptr;
}
typedef std::vector<Data_Impl*> SfxTabDlgData_Impl;
@@ -131,7 +131,7 @@ struct TabDlg_Impl
};
-static Data_Impl* Find( const SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt16* pPos = 0)
+static Data_Impl* Find( const SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt16* pPos = nullptr)
{
const sal_uInt16 nCount = rArr.size();
@@ -146,7 +146,7 @@ static Data_Impl* Find( const SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt
return pObj;
}
}
- return 0;
+ return nullptr;
}
void SfxTabPage::SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame)
@@ -178,7 +178,7 @@ SfxTabPage::~SfxTabPage()
void SfxTabPage::dispose()
{
delete pImpl;
- pImpl = NULL;
+ pImpl = nullptr;
TabPage::dispose();
}
@@ -258,7 +258,7 @@ const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot
{
const SfxItemPool* pPool = rSet.GetPool();
sal_uInt16 nWh = pPool->GetWhich( nSlot, bDeep );
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
rSet.GetItemState( nWh, true, &pItem );
if ( !pItem && nWh != nSlot )
@@ -279,7 +279,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
{
const SfxItemSet& rOldSet = GetItemSet();
sal_uInt16 nWh = GetWhich( nSlot, bDeep );
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if ( pImpl->mbStandard && rOldSet.GetParent() )
pItem = GetItem( *rOldSet.GetParent(), nSlot );
@@ -323,13 +323,13 @@ SfxTabDialog::SfxTabDialog
)
: TabDialog(pParent, rID, rUIXMLDescription)
, pFrame(pViewFrame)
- , pSet(pItemSet ? new SfxItemSet(*pItemSet) : 0)
- , pOutSet(0)
- , pRanges(0)
+ , pSet(pItemSet ? new SfxItemSet(*pItemSet) : nullptr)
+ , pOutSet(nullptr)
+ , pRanges(nullptr)
, nAppPageId(USHRT_MAX)
, bItemsReset(false)
, bStandardPushed(false)
- , pExampleSet(0)
+ , pExampleSet(nullptr)
{
Init_Impl(bEditFmt);
}
@@ -351,14 +351,14 @@ SfxTabDialog::SfxTabDialog
bool bEditFmt // when yes -> additional Button for standard
)
: TabDialog(pParent, rID, rUIXMLDescription)
- , pFrame(0)
- , pSet(pItemSet ? new SfxItemSet(*pItemSet) : 0)
- , pOutSet(0)
- , pRanges(0)
+ , pFrame(nullptr)
+ , pSet(pItemSet ? new SfxItemSet(*pItemSet) : nullptr)
+ , pOutSet(nullptr)
+ , pRanges(nullptr)
, nAppPageId(USHRT_MAX)
, bItemsReset(false)
, bStandardPushed(false)
- , pExampleSet(0)
+ , pExampleSet(nullptr)
{
Init_Impl(bEditFmt);
SAL_INFO( "sfx.config", "Please use the Construtor with the ViewFrame" );
@@ -404,19 +404,19 @@ void SfxTabDialog::dispose()
pDataObject->pTabPage.disposeAndClear();
}
delete pDataObject;
- pDataObject = NULL;
+ pDataObject = nullptr;
}
delete pImpl;
- pImpl = NULL;
+ pImpl = nullptr;
delete pSet;
- pSet = NULL;
+ pSet = nullptr;
delete pOutSet;
- pOutSet = NULL;
+ pOutSet = nullptr;
delete pExampleSet;
- pExampleSet = NULL;
+ pExampleSet = nullptr;
delete [] pRanges;
- pRanges = NULL;
+ pRanges = nullptr;
if (m_bOwnsBaseFmtBtn)
m_pBaseFmtBtn.disposeAndClear();
@@ -614,7 +614,7 @@ void SfxTabDialog::Start_Impl()
void SfxTabDialog::AddTabPage( sal_uInt16 nId, const OUString &rRiderText, bool bItemsOnDemand, sal_uInt16 nPos )
{
- AddTabPage( nId, rRiderText, 0, 0, bItemsOnDemand, nPos );
+ AddTabPage( nId, rRiderText, nullptr, nullptr, bItemsOnDemand, nPos );
}
/*
@@ -782,7 +782,7 @@ SfxTabPage* SfxTabDialog::GetTabPage( sal_uInt16 nPageId ) const
if ( pDataObject )
return pDataObject->pTabPage;
- return NULL;
+ return nullptr;
}
void SfxTabDialog::SavePosAndId()
@@ -959,7 +959,7 @@ bool SfxTabDialog::PrepareLeaveCurrentPage()
if ( pPage->HasExchangeSupport() )
nRet = pPage->DeactivatePage( &aTmp );
else
- nRet = pPage->DeactivatePage( NULL );
+ nRet = pPage->DeactivatePage( nullptr );
if ( ( SfxTabPage::LEAVE_PAGE & nRet ) == SfxTabPage::LEAVE_PAGE
&& aTmp.Count() )
@@ -969,7 +969,7 @@ bool SfxTabDialog::PrepareLeaveCurrentPage()
}
}
else
- nRet = pPage->DeactivatePage( NULL );
+ nRet = pPage->DeactivatePage( nullptr );
bEnd = nRet;
}
@@ -1146,7 +1146,7 @@ IMPL_LINK_TYPED( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl, void )
// Create TabPage if possible:
if ( !pTabPage )
{
- const SfxItemSet* pTmpSet = 0;
+ const SfxItemSet* pTmpSet = nullptr;
if ( pSet )
{
@@ -1250,7 +1250,7 @@ IMPL_LINK_TYPED( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl, bool )
if ( pPage->HasExchangeSupport() )
nRet = pPage->DeactivatePage( &aTmp );
else
- nRet = pPage->DeactivatePage( NULL );
+ nRet = pPage->DeactivatePage( nullptr );
if ( ( SfxTabPage::LEAVE_PAGE & nRet ) == SfxTabPage::LEAVE_PAGE &&
aTmp.Count() )
{
@@ -1271,7 +1271,7 @@ IMPL_LINK_TYPED( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl, bool )
nRet = pPage->DeactivatePage( pExampleSet );
}
else
- nRet = pPage->DeactivatePage( NULL );
+ nRet = pPage->DeactivatePage( nullptr );
}
if ( nRet & SfxTabPage::REFRESH_SET )
@@ -1387,9 +1387,9 @@ void SfxTabDialog::SetInputSet( const SfxItemSet* pInSet )
*/
{
- bool bSet = ( pSet != NULL );
+ bool bSet = ( pSet != nullptr );
delete pSet;
- pSet = pInSet ? new SfxItemSet(*pInSet) : 0;
+ pSet = pInSet ? new SfxItemSet(*pInSet) : nullptr;
if (!bSet && !pExampleSet && !pOutSet && pSet)
{
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index e73b79c9e18f..434e986c9274 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -495,7 +495,7 @@ namespace sfx2
Reference< XAccessible > CustomToolPanel::CreatePanelAccessible( const Reference< XAccessible >& i_rParentAccessible )
{
- ENSURE_OR_RETURN( m_aCustomPanel.is(), "no panel to ask!", NULL );
+ ENSURE_OR_RETURN( m_aCustomPanel.is(), "no panel to ask!", nullptr );
Reference< XAccessible > xPanelAccessible;
try
@@ -671,7 +671,7 @@ namespace sfx2
{
const ::svt::PDeckLayouter pLayouter( m_aPanelDeck->GetLayouter() );
const ::svt::DrawerDeckLayouter* pDrawerLayouter = dynamic_cast< const ::svt::DrawerDeckLayouter* >( pLayouter.get() );
- if ( pDrawerLayouter != NULL )
+ if ( pDrawerLayouter != nullptr )
// already have the proper layout
return;
m_aPanelDeck->SetLayouter( new ::svt::DrawerDeckLayouter( *m_aPanelDeck.get(), *m_aPanelDeck.get() ) );
@@ -682,7 +682,7 @@ namespace sfx2
{
::svt::PDeckLayouter pLayouter( m_aPanelDeck->GetLayouter() );
::svt::TabDeckLayouter* pTabLayouter = dynamic_cast< ::svt::TabDeckLayouter* >( pLayouter.get() );
- if ( ( pTabLayouter != NULL )
+ if ( ( pTabLayouter != nullptr )
&& ( pTabLayouter->GetTabAlignment() == i_eTabAlignment )
&& ( pTabLayouter->GetTabItemContent() == i_eTabContent )
)
@@ -1171,7 +1171,7 @@ namespace sfx2
{
::std::unique_ptr<PopupMenu> pMenu( new PopupMenu );
FloatingWindow* pMenuWindow = static_cast< FloatingWindow* >( pMenu->GetWindow() );
- if ( pMenuWindow != NULL )
+ if ( pMenuWindow != nullptr )
{
pMenuWindow->SetPopupModeFlags ( pMenuWindow->GetPopupModeFlags() | FloatWinPopupFlags::NoMouseUpClose );
}
diff --git a/sfx2/source/dialog/templateinfodlg.cxx b/sfx2/source/dialog/templateinfodlg.cxx
index fc2de4f7b449..379d7047f2f3 100644
--- a/sfx2/source/dialog/templateinfodlg.cxx
+++ b/sfx2/source/dialog/templateinfodlg.cxx
@@ -76,7 +76,7 @@ void SfxTemplateInfoDlg::loadDocument(const OUString &rURL)
try
{
uno::Reference<task::XInteractionHandler2> xInteractionHandler(
- task::InteractionHandler::createWithParent(xContext, 0) );
+ task::InteractionHandler::createWithParent(xContext, nullptr) );
uno::Sequence<beans::PropertyValue> aProps(1);
aProps[0].Name = "InteractionHandler";
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 2f26a82a0c8b..edf73b61c9ee 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -106,7 +106,7 @@ public:
StyleLBoxString::StyleLBoxString(SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& sText, const SfxStyleFamily& eStyleFamily)
: SvLBoxString(pEntry, nFlags, sText)
, meStyleFamily(eStyleFamily)
- , mpViewData(NULL)
+ , mpViewData(nullptr)
{}
StyleLBoxString::~StyleLBoxString()
@@ -204,7 +204,7 @@ public:
// Signal that the dialog was deleted
void signal()
{
- m_pDialog = 0;
+ m_pDialog = nullptr;
if (m_pPrevious)
m_pPrevious->signal();
}
@@ -212,7 +212,7 @@ public:
// Return true if the dialog was deleted
operator bool_type() const
{
- return m_pDialog ? 0 : &DeletionWatcher::signal;
+ return m_pDialog ? nullptr : &DeletionWatcher::signal;
}
private:
@@ -224,7 +224,7 @@ void DropListBox_Impl::MouseButtonDown( const MouseEvent& rMEvt )
{
nModifier = rMEvt.GetModifier();
- bool bHitEmptySpace = ( NULL == GetEntry( rMEvt.GetPosPixel(), true ) );
+ bool bHitEmptySpace = ( nullptr == GetEntry( rMEvt.GetPosPixel(), true ) );
if( bHitEmptySpace && ( rMEvt.GetClicks() == 2 ) && rMEvt.IsMod1() )
Control::MouseButtonDown( rMEvt );
else
@@ -268,7 +268,7 @@ sal_Int8 DropListBox_Impl::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
if ( aDesc.maClassName == pDocShell->GetFactory().GetClassId() )
{
- PostUserEvent( LINK( this, DropListBox_Impl, OnAsyncExecuteDrop ), 0, true );
+ PostUserEvent( LINK( this, DropListBox_Impl, OnAsyncExecuteDrop ), nullptr, true );
bFormatFound = true;
nRet = rEvt.mnAction;
@@ -299,7 +299,7 @@ bool DropListBox_Impl::Notify( NotifyEvent& rNEvt )
{
if( pDialog->bCanDel && KEY_DELETE == rKeyCode.GetCode())
{
- pDialog->DeleteHdl( NULL );
+ pDialog->DeleteHdl( nullptr );
bRet = true;
}
else if( KEY_RETURN == rKeyCode.GetCode())
@@ -348,7 +348,7 @@ SfxTemplatePanelControl::SfxTemplatePanelControl(SfxBindings* pBindings, vcl::Wi
, pImpl(new SfxTemplateDialog_Impl(pBindings, this))
, mpBindings(pBindings)
{
- OSL_ASSERT(mpBindings!=NULL);
+ OSL_ASSERT(mpBindings!=nullptr);
pImpl->updateNonFamilyImages();
@@ -512,13 +512,13 @@ void StyleTreeListBox_Impl::ExpandedHdl()
SvTreeListEntry *pEntry = GetHdlEntry();
if(!IsExpanded(pEntry) && pCurEntry != GetCurEntry())
SelectAll( false );
- pCurEntry = 0;
+ pCurEntry = nullptr;
}
/** Constructor StyleTreeListBox_Impl */
StyleTreeListBox_Impl::StyleTreeListBox_Impl(SfxCommonTemplateDialog_Impl* pParent, WinBits nWinStyle)
: DropListBox_Impl(pParent->GetWindow(), nWinStyle, pParent)
- , pCurEntry(0)
+ , pCurEntry(nullptr)
{
EnableContextMenuHandling();
}
@@ -662,15 +662,15 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, vcl
: mbIgnoreSelect(false)
, pBindings(pB)
, pWindow(pW)
- , pModule(NULL)
- , pIdle(NULL)
- , m_pStyleFamiliesId(NULL)
- , pStyleFamilies(NULL)
- , pStyleSheetPool(NULL)
- , pTreeBox(NULL)
- , pCurObjShell(NULL)
+ , pModule(nullptr)
+ , pIdle(nullptr)
+ , m_pStyleFamiliesId(nullptr)
+ , pStyleFamilies(nullptr)
+ , pStyleSheetPool(nullptr)
+ , pTreeBox(nullptr)
+ , pCurObjShell(nullptr)
, xModuleManager(frame::ModuleManager::create(::comphelper::getProcessComponentContext()))
- , m_pDeletionWatcher(NULL)
+ , m_pDeletionWatcher(nullptr)
, aFmtLb( VclPtr<SfxActionListBox>::Create(this, WB_BORDER | WB_TABSTOP | WB_SORT | WB_QUICK_SEARCH) )
, aFilterLb( VclPtr<ListBox>::Create(pW, WB_BORDER | WB_DROPDOWN | WB_TABSTOP) )
@@ -726,12 +726,12 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
{
// Read global user resource
for(sal_uInt16 i = 0; i < MAX_FAMILIES; ++i)
- pFamilyState[i] = 0;
+ pFamilyState[i] = nullptr;
SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
pCurObjShell = pViewFrame->GetObjectShell();
- pModule = pCurObjShell ? pCurObjShell->GetModule() : NULL;
- ResMgr* pMgr = pModule ? pModule->GetResMgr() : NULL;
+ pModule = pCurObjShell ? pCurObjShell->GetModule() : nullptr;
+ ResMgr* pMgr = pModule ? pModule->GetResMgr() : nullptr;
if (pMgr)
{
ResId aFamId( DLG_STYLE_DESIGNER, *pMgr );
@@ -794,7 +794,7 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
pBindings->LEAVEREGISTRATIONS();
for(; i < COUNT_BOUND_FUNC; ++i)
- pBoundItems[i] = 0;
+ pBoundItems[i] = nullptr;
StartListening(*pBindings);
@@ -836,13 +836,13 @@ void SfxCommonTemplateDialog_Impl::ClearResource()
void SfxCommonTemplateDialog_Impl::impl_clear()
{
delete pStyleFamilies;
- pStyleFamilies = NULL;
+ pStyleFamilies = nullptr;
sal_uInt16 i;
for ( i = 0; i < MAX_FAMILIES; ++i )
DELETEX(SfxTemplateItem, pFamilyState[i]);
for ( i = 0; i < COUNT_BOUND_FUNC; ++i )
delete pBoundItems[i];
- pCurObjShell = NULL;
+ pCurObjShell = nullptr;
DELETEZ( m_pStyleFamiliesId );
}
@@ -889,7 +889,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
impl_clear();
if ( pStyleSheetPool )
EndListening(*pStyleSheetPool);
- pStyleSheetPool = NULL;
+ pStyleSheetPool = nullptr;
pTreeBox.disposeAndClear();
delete pIdle;
if ( m_pDeletionWatcher )
@@ -938,13 +938,13 @@ const SfxStyleFamilyItem *SfxCommonTemplateDialog_Impl::GetFamilyItem_Impl() con
if(nId == nActFamily)
return pItem;
}
- return 0;
+ return nullptr;
}
SfxStyleSheetBase *SfxCommonTemplateDialog_Impl::GetSelectedStyle() const
{
if (!IsInitialized() || !pStyleSheetPool || !HasSelectedStyle())
- return NULL;
+ return nullptr;
const OUString aTemplName( GetSelectedEntry() );
const SfxStyleFamilyItem* pItem = GetFamilyItem_Impl();
return pStyleSheetPool->Find( aTemplName, pItem->GetFamily() );
@@ -958,8 +958,8 @@ SfxStyleSheetBase *SfxCommonTemplateDialog_Impl::GetSelectedStyle() const
*/
bool SfxCommonTemplateDialog_Impl::IsSafeForWaterCan() const
{
- if ( pTreeBox.get() != NULL )
- return pTreeBox->FirstSelected() != 0;
+ if ( pTreeBox.get() != nullptr )
+ return pTreeBox->FirstSelected() != nullptr;
else
return aFmtLb->GetSelectionCount() == 1;
}
@@ -1022,7 +1022,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const OUString &rStr)
aFmtLb->SelectAll(false);
aFmtLb->Select( pEntry );
bWaterDisabled = !IsSafeForWaterCan();
- FmtSelectHdl( NULL );
+ FmtSelectHdl( nullptr );
}
}
}
@@ -1133,7 +1133,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
bool SfxCommonTemplateDialog_Impl::HasSelectedStyle() const
{
- return pTreeBox? pTreeBox->FirstSelected() != 0:
+ return pTreeBox? pTreeBox->FirstSelected() != nullptr:
aFmtLb->GetSelectionCount() != 0;
}
@@ -1162,7 +1162,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
const SfxStyleFamily eFam = pItem->GetFamily();
- SfxFilterTupel* pT = ( nActFilter < pItem->GetFilterList().size() ? pItem->GetFilterList()[nActFilter] : NULL );
+ SfxFilterTupel* pT = ( nActFilter < pItem->GetFilterList().size() ? pItem->GetFilterList()[nActFilter] : nullptr );
sal_uInt16 nFilter = pT ? pT->nFlags : 0;
if(!nFilter) // automatic
nFilter = nAppFilter;
@@ -1193,7 +1193,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
{
nActFilter = 0;
aFilterLb->SelectEntryPos(1);
- SfxFilterTupel* pActT = ( nActFilter < rFilter.size() ) ? rFilter[ nActFilter ] : NULL;
+ SfxFilterTupel* pActT = ( nActFilter < rFilter.size() ) ? rFilter[ nActFilter ] : nullptr;
sal_uInt16 nFilterFlags = pActT ? pActT->nFlags : 0;
pStyleSheetPool->SetSearchMask(eFam, nFilterFlags);
}
@@ -1259,7 +1259,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
for(nPos = 0; nPos < nCount; ++nPos)
{
- SvTreeListEntry* pTreeListEntry = aFmtLb->InsertEntry(aStrings[nPos], 0, false, nPos);
+ SvTreeListEntry* pTreeListEntry = aFmtLb->InsertEntry(aStrings[nPos], nullptr, false, nPos);
if (officecfg::Office::Common::StylesAndFormatting::Preview::get())
{
std::unique_ptr<StyleLBoxString> pStyleLBoxString(
@@ -1292,7 +1292,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
// Updated display: Watering the house
void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
{
- bWaterDisabled = (pItem == 0);
+ bWaterDisabled = (pItem == nullptr);
if(!bWaterDisabled)
//make sure the watercan is only activated when there is (only) one selection
@@ -1350,7 +1350,7 @@ void SfxCommonTemplateDialog_Impl::SetFamilyState( sal_uInt16 nSlotId, const Sfx
void SfxCommonTemplateDialog_Impl::Update_Impl()
{
bool bDocChanged=false;
- SfxStyleSheetBasePool* pNewPool = NULL;
+ SfxStyleSheetBasePool* pNewPool = nullptr;
SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
SfxObjectShell* pDocShell = pViewFrame->GetObjectShell();
if( pDocShell )
@@ -1367,7 +1367,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
if ( pStyleSheetPool )
{
EndListening(*pStyleSheetPool);
- pStyleSheetPool = 0;
+ pStyleSheetPool = nullptr;
}
if ( pNewPool )
@@ -1389,9 +1389,9 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
// nothing is allowed
return;
- SfxTemplateItem *pItem = 0;
+ SfxTemplateItem *pItem = nullptr;
// current region not within the allowed region or default
- if(nActFamily == 0xffff || 0 == (pItem = pFamilyState[nActFamily-1] ) )
+ if(nActFamily == 0xffff || nullptr == (pItem = pFamilyState[nActFamily-1] ) )
{
CheckItem(nActFamily, false);
SfxTemplateItem **ppItem = pFamilyState;
@@ -1534,7 +1534,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
case SFX_HINT_DYING:
{
EndListening(*pStyleSheetPool);
- pStyleSheetPool=0;
+ pStyleSheetPool=nullptr;
break;
}
}
@@ -1574,7 +1574,7 @@ void SfxCommonTemplateDialog_Impl::FilterSelect(
nActFilter = nEntry;
SfxObjectShell *const pDocShell = SaveSelection();
SfxStyleSheetBasePool *pOldStyleSheetPool = pStyleSheetPool;
- pStyleSheetPool = pDocShell? pDocShell->GetStyleSheetPool(): 0;
+ pStyleSheetPool = pDocShell? pDocShell->GetStyleSheetPool(): nullptr;
if ( pOldStyleSheetPool != pStyleSheetPool )
{
if ( pOldStyleSheetPool )
@@ -1616,7 +1616,7 @@ bool SfxCommonTemplateDialog_Impl::Execute_Impl(
if ( !rRefStr.isEmpty() )
pItems[ nCount++ ] = &aRefName;
- pItems[ nCount++ ] = 0;
+ pItems[ nCount++ ] = nullptr;
DeletionWatcher aDeleted(*this);
sal_uInt16 nModi = pModifier ? *pModifier : 0;
@@ -2078,7 +2078,7 @@ void SfxCommonTemplateDialog_Impl::ResetFocus()
{
SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
SfxViewShell *pVu = pViewFrame->GetViewShell();
- vcl::Window *pAppWin = pVu ? pVu->GetWindow(): 0;
+ vcl::Window *pAppWin = pVu ? pVu->GetWindow(): nullptr;
if(pAppWin)
pAppWin->GrabFocus();
}
@@ -2094,14 +2094,14 @@ IMPL_LINK_NOARG_TYPED( SfxCommonTemplateDialog_Impl, TreeListApplyHdl, SvTreeLis
IMPL_LINK_NOARG_TYPED( SfxCommonTemplateDialog_Impl, ApplyHdl, LinkParamNone*, void )
{
// only if that region is allowed
- if ( IsInitialized() && 0 != pFamilyState[nActFamily-1] &&
+ if ( IsInitialized() && nullptr != pFamilyState[nActFamily-1] &&
!GetSelectedEntry().isEmpty() )
{
sal_uInt16 nModifier = aFmtLb->GetModifier();
Execute_Impl(SID_STYLE_APPLY,
GetSelectedEntry(), OUString(),
( sal_uInt16 )GetFamilyItem_Impl()->GetFamily(),
- 0, 0, &nModifier );
+ 0, nullptr, &nModifier );
}
ResetFocus();
}
@@ -2116,7 +2116,7 @@ IMPL_LINK_TYPED( SfxCommonTemplateDialog_Impl, FmtSelectHdl, SvTreeListBox *, pL
if ( IsInitialized() &&
IsCheckedItem(SID_STYLE_WATERCAN) &&
// only if that region is allowed
- 0 != pFamilyState[nActFamily-1] && (pTreeBox || aFmtLb->GetSelectionCount() <= 1) )
+ nullptr != pFamilyState[nActFamily-1] && (pTreeBox || aFmtLb->GetSelectionCount() <= 1) )
{
Execute_Impl(SID_STYLE_WATERCAN,
"", "", 0);
@@ -2161,11 +2161,11 @@ IMPL_LINK_TYPED( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu*, pMenu, bool
IMPL_LINK_NOARG_TYPED( SfxCommonTemplateDialog_Impl, MenuSelectAsyncHdl, void*, void )
{
switch(nLastItemId) {
- case ID_NEW: NewHdl(0); break;
- case ID_EDIT: EditHdl(0); break;
- case ID_DELETE: DeleteHdl(0); break;
- case ID_HIDE: HideHdl(0); break;
- case ID_SHOW: ShowHdl(0); break;
+ case ID_NEW: NewHdl(nullptr); break;
+ case ID_EDIT: EditHdl(nullptr); break;
+ case ID_DELETE: DeleteHdl(nullptr); break;
+ case ID_HIDE: HideHdl(nullptr); break;
+ case ID_SHOW: ShowHdl(nullptr); break;
}
}
@@ -2324,7 +2324,7 @@ void SfxTemplateDialog_Impl::LoadedFamilies()
void SfxTemplateDialog_Impl::Resize()
{
SfxDockingWindow* pDockingWindow = dynamic_cast<SfxDockingWindow*>(m_pFloat.get());
- FloatingWindow *pF = pDockingWindow!=NULL ? pDockingWindow->GetFloatingWindow() : NULL;
+ FloatingWindow *pF = pDockingWindow!=nullptr ? pDockingWindow->GetFloatingWindow() : nullptr;
if (pF)
{
m_bZoomIn = pF->IsRollUp();
@@ -2556,7 +2556,7 @@ void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl()
SfxObjectShell *pDocShell = pViewFrame->GetObjectShell();
SfxStyleSheetBasePool *pOldStyleSheetPool = pStyleSheetPool;
- pStyleSheetPool = pDocShell? pDocShell->GetStyleSheetPool(): 0;
+ pStyleSheetPool = pDocShell? pDocShell->GetStyleSheetPool(): nullptr;
if ( pOldStyleSheetPool != pStyleSheetPool )
{
if ( pOldStyleSheetPool )
@@ -2585,7 +2585,7 @@ void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl()
if (IsCheckedItem(SID_STYLE_WATERCAN) &&
// only if that area is allowed
- 0 != pFamilyState[nActFamily - 1])
+ nullptr != pFamilyState[nActFamily - 1])
{
Execute_Impl(SID_STYLE_APPLY,
GetSelectedEntry(),
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 42764ecab279..19b194db40ae 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -41,7 +41,7 @@ SfxTemplateControllerItem::SfxTemplateControllerItem(
SfxControllerItem(nSlotId, rBindings),
rTemplateDlg(rDlg),
nWaterCanState(0xff),
- nUserEventId(0)
+ nUserEventId(nullptr)
{
}
@@ -68,10 +68,10 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta
{
bool bAvailable = SfxItemState::DEFAULT == eState;
if ( !bAvailable )
- rTemplateDlg.SetFamilyState(GetId(), 0);
+ rTemplateDlg.SetFamilyState(GetId(), nullptr);
else {
const SfxTemplateItem *pStateItem = dynamic_cast< const SfxTemplateItem* >(pItem);
- DBG_ASSERT(pStateItem != 0, "SfxTemplateItem expected");
+ DBG_ASSERT(pStateItem != nullptr, "SfxTemplateItem expected");
rTemplateDlg.SetFamilyState( GetId(), pStateItem );
}
bool bDisable = eState == SfxItemState::DISABLED;
@@ -155,8 +155,8 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta
IMPL_LINK_NOARG_TYPED(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl, void*, void)
{
- nUserEventId = 0;
- SfxBoolItem* pState = 0;
+ nUserEventId = nullptr;
+ SfxBoolItem* pState = nullptr;
switch(nWaterCanState)
{
case 0 :
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 2114dd1ec0fc..02029f6486f6 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -191,9 +191,9 @@ void SfxVersionsTabListBox_Impl::setColSizes()
}
SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersionOnClose )
- : SfxModalDialog(NULL, "VersionsOfDialog", "sfx/ui/versionsofdialog.ui")
+ : SfxModalDialog(nullptr, "VersionsOfDialog", "sfx/ui/versionsofdialog.ui")
, pViewFrame(pVwFrame)
- , m_pTable(NULL)
+ , m_pTable(nullptr)
, m_bIsSaveVersionOnClose(bIsSaveVersionOnClose)
{
get(m_pSaveButton, "save");
@@ -377,13 +377,13 @@ IMPL_LINK_NOARG_TYPED(SfxVersionDialog, DClickHdl_Impl, SvTreeListBox*, bool)
IMPL_LINK_NOARG_TYPED(SfxVersionDialog, SelectHdl_Impl, SvTreeListBox*, void)
{
- bool bEnable = ( m_pVersionBox->FirstSelected() != NULL );
+ bool bEnable = ( m_pVersionBox->FirstSelected() != nullptr );
SfxObjectShell* pObjShell = pViewFrame->GetObjectShell();
m_pDeleteButton->Enable(bEnable && !pObjShell->IsReadOnly());
m_pOpenButton->Enable(bEnable);
m_pViewButton->Enable(bEnable);
- const SfxPoolItem *pDummy=NULL;
+ const SfxPoolItem *pDummy=nullptr;
pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_MERGE, pDummy );
SfxItemState eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_COMPARE, pDummy );
m_pCompareButton->Enable(bEnable && eState >= SfxItemState::DEFAULT);
@@ -410,7 +410,7 @@ IMPL_LINK_TYPED( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton, void )
pObjShell->SetModified();
const SfxPoolItem* aItems[2];
aItems[0] = &aComment;
- aItems[1] = NULL;
+ aItems[1] = nullptr;
pViewFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, aItems );
m_pVersionBox->SetUpdateMode( false );
m_pVersionBox->Clear();
@@ -524,9 +524,9 @@ IMPL_LINK_TYPED(SfxViewVersionDialog_Impl, ButtonHdl, Button*, pButton, void)
}
SfxCmisVersionsDialog::SfxCmisVersionsDialog ( SfxViewFrame* pVwFrame )
- : SfxModalDialog(NULL, "VersionsCmisDialog", "sfx/ui/versionscmis.ui")
+ : SfxModalDialog(nullptr, "VersionsCmisDialog", "sfx/ui/versionscmis.ui")
, pViewFrame(pVwFrame)
- , m_pTable(NULL)
+ , m_pTable(nullptr)
{
get(m_pOpenButton, "open");
get(m_pViewButton, "show");