summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:25:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:53 +0100
commit01b49802c7cda7fd4d5ba71263cef7bc95234b89 (patch)
treeb8d92f1c6abf5ac548d0bcb0c581ebfcffd8bfac /sw/source/uibase
parent6cd7bf2043146a630925a2e49336f02c802f707a (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/appenv.cxx6
-rw-r--r--sw/source/uibase/app/apphdl.cxx50
-rw-r--r--sw/source/uibase/app/applab.cxx8
-rw-r--r--sw/source/uibase/app/appopt.cxx14
-rw-r--r--sw/source/uibase/app/docsh.cxx34
-rw-r--r--sw/source/uibase/app/docsh2.cxx32
-rw-r--r--sw/source/uibase/app/docshini.cxx10
-rw-r--r--sw/source/uibase/app/docst.cxx22
-rw-r--r--sw/source/uibase/app/docstyle.cxx154
-rw-r--r--sw/source/uibase/app/mainwn.cxx12
-rw-r--r--sw/source/uibase/app/swdll.cxx6
-rw-r--r--sw/source/uibase/app/swmodul1.cxx6
-rw-r--r--sw/source/uibase/app/swmodule.cxx44
-rw-r--r--sw/source/uibase/config/StoredChapterNumbering.cxx10
-rw-r--r--sw/source/uibase/config/dbconfig.cxx4
-rw-r--r--sw/source/uibase/config/modcfg.cxx40
-rw-r--r--sw/source/uibase/config/uinums.cxx20
-rw-r--r--sw/source/uibase/config/usrpref.cxx2
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx58
-rw-r--r--sw/source/uibase/dbui/dbtree.cxx22
-rw-r--r--sw/source/uibase/dbui/maildispatcher.cxx2
-rw-r--r--sw/source/uibase/dbui/mailmergehelper.cxx2
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx14
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx44
-rw-r--r--sw/source/uibase/dialog/regionsw.cxx6
-rw-r--r--sw/source/uibase/dialog/swabstdlg.cxx4
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx16
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx106
-rw-r--r--sw/source/uibase/docvw/AnchorOverlayObject.cxx2
-rw-r--r--sw/source/uibase/docvw/AnnotationWin.cxx14
-rw-r--r--sw/source/uibase/docvw/FrameControlsManager.cxx8
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx4
-rw-r--r--sw/source/uibase/docvw/OverlayRanges.cxx4
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx56
-rw-r--r--sw/source/uibase/docvw/ShadowOverlayObject.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControlAcc.cxx4
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx48
-rw-r--r--sw/source/uibase/docvw/edtdd.cxx16
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx176
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx4
-rw-r--r--sw/source/uibase/docvw/frmsidebarwincontainer.cxx2
-rw-r--r--sw/source/uibase/docvw/romenu.cxx16
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx18
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx30
-rw-r--r--sw/source/uibase/fldui/fldwrap.cxx2
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx6
-rw-r--r--sw/source/uibase/inc/PageBreakWin.hxx2
-rw-r--r--sw/source/uibase/inc/caption.hxx2
-rw-r--r--sw/source/uibase/inc/cfgitems.hxx10
-rw-r--r--sw/source/uibase/inc/chrdlg.hxx2
-rw-r--r--sw/source/uibase/inc/colex.hxx4
-rw-r--r--sw/source/uibase/inc/content.hxx8
-rw-r--r--sw/source/uibase/inc/conttree.hxx2
-rw-r--r--sw/source/uibase/inc/convert.hxx4
-rw-r--r--sw/source/uibase/inc/dbtree.hxx2
-rw-r--r--sw/source/uibase/inc/edtwin.hxx2
-rw-r--r--sw/source/uibase/inc/envimg.hxx2
-rw-r--r--sw/source/uibase/inc/envlop.hxx2
-rw-r--r--sw/source/uibase/inc/fldmgr.hxx20
-rw-r--r--sw/source/uibase/inc/frmdlg.hxx2
-rw-r--r--sw/source/uibase/inc/gloshdl.hxx8
-rw-r--r--sw/source/uibase/inc/instable.hxx4
-rw-r--r--sw/source/uibase/inc/labimg.hxx2
-rw-r--r--sw/source/uibase/inc/linenum.hxx2
-rw-r--r--sw/source/uibase/inc/mailmergehelper.hxx6
-rw-r--r--sw/source/uibase/inc/mailmrge.hxx2
-rw-r--r--sw/source/uibase/inc/numpara.hxx2
-rw-r--r--sw/source/uibase/inc/numprevw.hxx4
-rw-r--r--sw/source/uibase/inc/optload.hxx2
-rw-r--r--sw/source/uibase/inc/pgfnote.hxx2
-rw-r--r--sw/source/uibase/inc/pggrid.hxx2
-rw-r--r--sw/source/uibase/inc/pview.hxx4
-rw-r--r--sw/source/uibase/inc/regionsw.hxx2
-rw-r--r--sw/source/uibase/inc/srcedtw.hxx2
-rw-r--r--sw/source/uibase/inc/swdtflvr.hxx12
-rw-r--r--sw/source/uibase/inc/swuicnttab.hxx6
-rw-r--r--sw/source/uibase/inc/swuiidxmrk.hxx2
-rw-r--r--sw/source/uibase/inc/swuipardlg.hxx2
-rw-r--r--sw/source/uibase/inc/swwrtshitem.hxx2
-rw-r--r--sw/source/uibase/inc/tablemgr.hxx4
-rw-r--r--sw/source/uibase/inc/tautofmt.hxx2
-rw-r--r--sw/source/uibase/inc/tmpdlg.hxx2
-rw-r--r--sw/source/uibase/inc/toxmgr.hxx22
-rw-r--r--sw/source/uibase/inc/uiitems.hxx16
-rw-r--r--sw/source/uibase/inc/uivwimp.hxx4
-rw-r--r--sw/source/uibase/inc/unoatxt.hxx2
-rw-r--r--sw/source/uibase/inc/unomod.hxx2
-rw-r--r--sw/source/uibase/inc/unotools.hxx4
-rw-r--r--sw/source/uibase/inc/unotxvw.hxx2
-rw-r--r--sw/source/uibase/inc/wrtsh.hxx60
-rw-r--r--sw/source/uibase/index/toxmgr.cxx18
-rw-r--r--sw/source/uibase/lingu/hhcwrp.cxx14
-rw-r--r--sw/source/uibase/lingu/hyp.cxx2
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx4
-rw-r--r--sw/source/uibase/lingu/sdrhhcwrap.cxx8
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx10
-rw-r--r--sw/source/uibase/misc/glshell.cxx6
-rw-r--r--sw/source/uibase/misc/numberingtypelistbox.cxx2
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx44
-rw-r--r--sw/source/uibase/ribbar/conrect.cxx2
-rw-r--r--sw/source/uibase/ribbar/drawbase.cxx4
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx12
-rw-r--r--sw/source/uibase/ribbar/tbxanchr.cxx10
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx8
-rw-r--r--sw/source/uibase/shells/annotsh.cxx32
-rw-r--r--sw/source/uibase/shells/basesh.cxx66
-rw-r--r--sw/source/uibase/shells/drawdlg.cxx8
-rw-r--r--sw/source/uibase/shells/drawsh.cxx16
-rw-r--r--sw/source/uibase/shells/drformsh.cxx2
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx40
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx6
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx16
-rw-r--r--sw/source/uibase/shells/frmsh.cxx34
-rw-r--r--sw/source/uibase/shells/grfsh.cxx14
-rw-r--r--sw/source/uibase/shells/langhelper.cxx12
-rw-r--r--sw/source/uibase/shells/mediash.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx30
-rw-r--r--sw/source/uibase/shells/textfld.cxx26
-rw-r--r--sw/source/uibase/shells/textglos.cxx2
-rw-r--r--sw/source/uibase/shells/textidx.cxx12
-rw-r--r--sw/source/uibase/shells/textsh.cxx16
-rw-r--r--sw/source/uibase/shells/textsh1.cxx20
-rw-r--r--sw/source/uibase/shells/textsh2.cxx16
-rw-r--r--sw/source/uibase/shells/txtattr.cxx14
-rw-r--r--sw/source/uibase/shells/txtcrsr.cxx16
-rw-r--r--sw/source/uibase/shells/txtnum.cxx22
-rw-r--r--sw/source/uibase/sidebar/PageColumnControl.cxx20
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.cxx10
-rw-r--r--sw/source/uibase/sidebar/PageOrientationControl.cxx8
-rw-r--r--sw/source/uibase/sidebar/PagePropertyPanel.cxx32
-rw-r--r--sw/source/uibase/sidebar/PageSizeControl.cxx2
-rw-r--r--sw/source/uibase/sidebar/StylePresetsPanel.cxx10
-rw-r--r--sw/source/uibase/sidebar/SwPanelFactory.cxx10
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.cxx10
-rw-r--r--sw/source/uibase/sidebar/WrapPropertyPanel.cxx10
-rw-r--r--sw/source/uibase/table/chartins.cxx4
-rw-r--r--sw/source/uibase/table/tablemgr.cxx2
-rw-r--r--sw/source/uibase/table/tablepg.hxx6
-rw-r--r--sw/source/uibase/uiview/formatclipboard.cxx38
-rw-r--r--sw/source/uibase/uiview/pview.cxx22
-rw-r--r--sw/source/uibase/uiview/srcview.cxx4
-rw-r--r--sw/source/uibase/uiview/swcli.cxx6
-rw-r--r--sw/source/uibase/uiview/uivwimp.cxx14
-rw-r--r--sw/source/uibase/uiview/view.cxx52
-rw-r--r--sw/source/uibase/uiview/view0.cxx4
-rw-r--r--sw/source/uibase/uiview/view1.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx28
-rw-r--r--sw/source/uibase/uiview/viewcoll.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdlg.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdlg2.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx20
-rw-r--r--sw/source/uibase/uiview/viewfunc.hxx4
-rw-r--r--sw/source/uibase/uiview/viewling.cxx16
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx6
-rw-r--r--sw/source/uibase/uiview/viewport.cxx2
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx6
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx22
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx26
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx12
-rw-r--r--sw/source/uibase/uno/SwXDocumentSettings.cxx26
-rw-r--r--sw/source/uibase/uno/SwXFilterOptions.cxx6
-rw-r--r--sw/source/uibase/uno/dlelstnr.cxx10
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx52
-rw-r--r--sw/source/uibase/uno/unodefaults.cxx2
-rw-r--r--sw/source/uibase/uno/unodispatch.cxx12
-rw-r--r--sw/source/uibase/uno/unofreg.cxx2
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx22
-rw-r--r--sw/source/uibase/uno/unomod.cxx20
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx124
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx46
-rw-r--r--sw/source/uibase/utlui/content.cxx92
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx106
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx2
-rw-r--r--sw/source/uibase/utlui/initui.cxx16
-rw-r--r--sw/source/uibase/utlui/navipi.cxx64
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx8
-rw-r--r--sw/source/uibase/utlui/prcntfld.cxx2
-rw-r--r--sw/source/uibase/utlui/tmplctrl.cxx2
-rw-r--r--sw/source/uibase/utlui/uiitems.cxx2
-rw-r--r--sw/source/uibase/utlui/uitool.cxx16
-rw-r--r--sw/source/uibase/utlui/unotools.cxx8
-rw-r--r--sw/source/uibase/utlui/viewlayoutctrl.cxx2
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx8
-rw-r--r--sw/source/uibase/wrtsh/move.cxx16
-rw-r--r--sw/source/uibase/wrtsh/select.cxx10
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx46
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx18
-rw-r--r--sw/source/uibase/wrtsh/wrtsh3.cxx6
-rw-r--r--sw/source/uibase/wrtsh/wrtundo.cxx2
190 files changed, 1571 insertions, 1571 deletions
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index efa59c5fd6fd..cb1436177854 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -156,7 +156,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
// Get current shell
pMyDocSh = static_cast<SwDocShell*>( SfxObjectShell::Current());
- pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : 0;
+ pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : nullptr;
// Create new document (don't show!)
SfxObjectShellLock xDocSh( new SwDocShell( SfxObjectCreateMode::STANDARD ) );
@@ -207,7 +207,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
}
- vcl::Window *pParent = pOldSh ? pOldSh->GetWin() : 0;
+ vcl::Window *pParent = pOldSh ? pOldSh->GetWin() : nullptr;
std::unique_ptr<SfxAbstractTabDialog> pDlg;
short nMode = ENV_INSERT;
@@ -250,7 +250,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
}
SwWrtShell *pTmp = nMode == ENV_INSERT ? pOldSh : pSh;
- const SwPageDesc* pFollow = 0;
+ const SwPageDesc* pFollow = nullptr;
SwTextFormatColl *pSend = pTmp->GetTextCollFromPool( RES_POOLCOLL_SENDADRESS ),
*pAddr = pTmp->GetTextCollFromPool( RES_POOLCOLL_JAKETADRESS);
const OUString sSendMark = pSend->GetName();
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 4d600a4db9a6..42ea0433027e 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -181,7 +181,7 @@ void SwModule::StateOther(SfxItemSet &rSet)
break;
case FN_EDIT_FORMULA:
{
- SwWrtShell* pSh = 0;
+ SwWrtShell* pSh = nullptr;
int nSelection = 0;
if( pActView )
pSh = &pActView->GetWrtShell();
@@ -217,7 +217,7 @@ namespace
SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL)
{
- SwView* pNewView = 0;
+ SwView* pNewView = nullptr;
if(!rURL.isEmpty())
{
SfxStringItem aURL(SID_FILE_NAME, rURL);
@@ -227,14 +227,14 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL)
const SfxObjectItem* pItem = static_cast<const SfxObjectItem*>(pView->GetViewFrame()->GetDispatcher()->
Execute(SID_OPENDOC, SfxCallMode::SYNCHRON,
&aURL, &aHidden, &aReferer, &aTargetFrameName, 0L));
- SfxShell* pShell = pItem ? pItem->GetShell() : 0;
+ SfxShell* pShell = pItem ? pItem->GetShell() : nullptr;
if(pShell)
{
SfxViewShell* pViewShell = pShell->GetViewShell();
if(pViewShell)
{
- if( 0!= dynamic_cast<SwView*>(pViewShell) )
+ if( nullptr!= dynamic_cast<SwView*>(pViewShell) )
{
pNewView = dynamic_cast< SwView* >(pViewShell);
pNewView->GetViewFrame()->GetFrame().Appear();
@@ -252,9 +252,9 @@ SwView* lcl_LoadDoc(SwView* pView, const OUString& rURL)
const SfxFrameItem* pItem = static_cast<const SfxFrameItem*>(
pView->GetViewFrame()->GetDispatcher()->Execute(SID_NEWDOCDIRECT,
SfxCallMode::SYNCHRON, &aFactory, 0L));
- SfxFrame* pFrm = pItem ? pItem->GetFrame() : 0;
- SfxViewFrame* pFrame = pFrm ? pFrm->GetCurrentViewFrame() : 0;
- pNewView = pFrame ? dynamic_cast<SwView*>( pFrame->GetViewShell() ) : 0;
+ SfxFrame* pFrm = pItem ? pItem->GetFrame() : nullptr;
+ SfxViewFrame* pFrame = pFrm ? pFrm->GetCurrentViewFrame() : nullptr;
+ pNewView = pFrame ? dynamic_cast<SwView*>( pFrame->GetViewShell() ) : nullptr;
}
return pNewView;
@@ -284,17 +284,17 @@ public:
};
SwMailMergeWizardExecutor::SwMailMergeWizardExecutor()
- : m_pView( 0 ),
- m_pView2Close( NULL ),
- m_pMMConfig( 0 ),
- m_pWizard( 0 )
+ : m_pView( nullptr ),
+ m_pView2Close( nullptr ),
+ m_pMMConfig( nullptr ),
+ m_pWizard( nullptr )
{
}
SwMailMergeWizardExecutor::~SwMailMergeWizardExecutor()
{
- OSL_ENSURE( m_pWizard == 0, "SwMailMergeWizardExecutor: m_pWizard must be Null!" );
- OSL_ENSURE( m_pMMConfig == 0, "SwMailMergeWizardExecutor: m_pMMConfig must be Null!" );
+ OSL_ENSURE( m_pWizard == nullptr, "SwMailMergeWizardExecutor: m_pWizard must be Null!" );
+ OSL_ENSURE( m_pMMConfig == nullptr, "SwMailMergeWizardExecutor: m_pMMConfig must be Null!" );
}
void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs )
@@ -310,7 +310,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
OUString sInteraction;
xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, sInteraction);
SolarMutexGuard aGuard;
- executeRestartDialog(comphelper::getProcessComponentContext(), NULL, RESTART_REASON_MAILMERGE_INSTALL);
+ executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, RESTART_REASON_MAILMERGE_INSTALL);
}
catch (const css::uno::Exception & e)
{
@@ -345,7 +345,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
nRestartPage = m_pView->GetMailMergeRestartPage();
if(m_pView->IsMailMergeSourceView())
m_pMMConfig->SetSourceView( m_pView );
- m_pView->SetMailMergeConfigItem(0, 0, true);
+ m_pView->SetMailMergeConfigItem(nullptr, 0, true);
SfxViewFrame* pViewFrame = m_pView->GetViewFrame();
pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, false);
OSL_ENSURE(m_pMMConfig, "no MailMergeConfigItem available");
@@ -358,7 +358,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
m_pMMConfig->SetSourceView(m_pView);
//set the first used database as default source on the config item
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pArgs && SfxItemState::SET == pArgs->GetItemState(
FN_PARAM_DATABASE_PROPERTIES, false, &pItem))
{
@@ -424,7 +424,7 @@ void SwMailMergeWizardExecutor::ExecutionFinished( bool bDeleteConfigItem )
if ( bDeleteConfigItem ) // owner?
delete m_pMMConfig;
- m_pMMConfig = 0;
+ m_pMMConfig = nullptr;
// release/destroy asynchronously
Application::PostUserEvent( LINK( this, SwMailMergeWizardExecutor, DestroyDialogHdl ) );
@@ -523,7 +523,7 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
pSourceView->GetViewFrame()->GetFrame().AppearWithUpdate();
// the current view has be set when the target is destroyed
m_pView = pSourceView;
- m_pMMConfig->SetTargetView(0);
+ m_pMMConfig->SetTargetView(nullptr);
// destroy wizard asynchronously
Application::PostUserEvent(
@@ -571,7 +571,7 @@ IMPL_LINK_NOARG_TYPED( SwMailMergeWizardExecutor, EndDialogHdl, Dialog&, void )
IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, DestroyDialogHdl, void*, void)
{
delete m_pWizard;
- m_pWizard = 0;
+ m_pWizard = nullptr;
release();
}
@@ -586,16 +586,16 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, CancelHdl, void*, void)
if(m_pMMConfig->GetTargetView())
{
m_pMMConfig->GetTargetView()->GetViewFrame()->DoClose();
- m_pMMConfig->SetTargetView(0);
+ m_pMMConfig->SetTargetView(nullptr);
}
if(m_pMMConfig->GetSourceView())
m_pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().AppearWithUpdate();
m_pMMConfig->Commit();
delete m_pMMConfig;
- m_pMMConfig = 0;
+ m_pMMConfig = nullptr;
// m_pWizard already deleted by closing the target view
- m_pWizard = 0;
+ m_pWizard = nullptr;
release();
}
@@ -604,7 +604,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, CloseFrameHdl, void*, void)
if ( m_pView2Close )
{
m_pView2Close->GetViewFrame()->DoClose();
- m_pView2Close = NULL;
+ m_pView2Close = nullptr;
}
}
@@ -615,7 +615,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, CloseFrameHdl, void*, void)
void SwModule::ExecOther(SfxRequest& rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
sal_uInt16 nWhich = rReq.GetSlot();
switch (nWhich)
@@ -703,7 +703,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
const SfxBoolItem* pTemplateItem = SfxItemSet::GetItem<SfxBoolItem>(pDocSh->GetMedium()->GetItemSet(), SID_TEMPLATE, false);
if (pTemplateItem && pTemplateItem->GetValue())
{
- pDocSh->GetDoc()->getIDocumentFieldsAccess().SetFixFields(false, 0);
+ pDocSh->GetDoc()->getIDocumentFieldsAccess().SetFixFields(false, nullptr);
}
}
break;
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index 68a46258cd04..2ed4f30e23e8 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -159,7 +159,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
#if HAVE_FEATURE_DBCONNECTIVITY
// Create DB-Manager
- std::unique_ptr<SwDBManager> pDBManager(new SwDBManager(0));
+ std::unique_ptr<SwDBManager> pDBManager(new SwDBManager(nullptr));
#endif
// Read SwLabItem from Config
@@ -172,7 +172,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
SwAbstractDialogFactory* pDialogFactory = SwAbstractDialogFactory::Create();
OSL_ENSURE(pDialogFactory, "SwAbstractDialogFactory fail!");
- std::unique_ptr<AbstractSwLabDlg> pDlg(pDialogFactory->CreateSwLabDlg(0, aSet,
+ std::unique_ptr<AbstractSwLabDlg> pDlg(pDialogFactory->CreateSwLabDlg(nullptr, aSet,
#if HAVE_FEATURE_DBCONNECTIVITY
pDBManager.get(),
#else
@@ -301,7 +301,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
pFormat->SetFormatAttr( aFrmNoULSpace );
pFormat->SetFormatAttr( aFrmNoLRSpace );
- const SwFrameFormat *pFirstFlyFormat = 0;
+ const SwFrameFormat *pFirstFlyFormat = nullptr;
if ( rItem.m_bPage )
{
SwFormatVertOrient aFrmVertOrient( pFormat->GetVertOrient() );
@@ -327,7 +327,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
// don't leave the fly!!!
pSh->Push();
pSh->SttDoc();
- bool bInFly = 0 != pSh->WizardGetFly();
+ bool bInFly = nullptr != pSh->WizardGetFly();
pSh->Pop( bInFly );
if( bInFly )
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index f39e02c1159b..51ca86c97b31 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -81,7 +81,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
// no MakeUsrPref, because only options from textdoks can be used here
SwView* pAppView = GetView();
if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
- pAppView = 0;
+ pAppView = nullptr;
if(pAppView)
{
// if Text then no WebView and vice versa
@@ -91,7 +91,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
aViewOpt = *pAppView->GetWrtShell().GetViewOptions();
}
else
- pAppView = 0; // with View, there's nothing to win here
+ pAppView = nullptr; // with View, there's nothing to win here
}
// Options/Edit
@@ -170,7 +170,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
}
if(bTextDialog)
pRet->Put(SwPtrItem(FN_PARAM_STDFONTS, GetStdFontConfig()));
- if( dynamic_cast<SwPagePreview*>( SfxViewShell::Current())!=0 )
+ if( dynamic_cast<SwPagePreview*>( SfxViewShell::Current())!=nullptr )
{
SfxBoolItem aBool(SfxBoolItem(SID_PRINTPREVIEW, true));
pRet->Put(aBool);
@@ -219,7 +219,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
// Options for PrintTabPage
const SwPrintData* pOpt = pAppView ?
&pAppView->GetWrtShell().getIDocumentDeviceAccess().getPrintData() :
- 0;
+ nullptr;
if(!pOpt)
pOpt = GetPrtOptions(!bTextDialog);
@@ -243,13 +243,13 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
bool bTextDialog = nId == SID_SW_EDITOPTIONS;
SwView* pAppView = GetView();
if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
- pAppView = 0;
+ pAppView = nullptr;
if(pAppView)
{
// the text dialog mustn't apply data to the web view and vice versa
bool bWebView = dynamic_cast<SwWebView*>( pAppView ) != nullptr;
if(bWebView == bTextDialog)
- pAppView = 0;
+ pAppView = nullptr;
}
SwViewOption aViewOpt = *GetUsrPref(!bTextDialog);
@@ -257,7 +257,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
const SfxPoolItem* pItem;
SfxBindings *pBindings = pAppView ? &pAppView->GetViewFrame()->GetBindings()
- : NULL;
+ : nullptr;
// Interpret the page Documentview
if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_DOCDISP, false, &pItem ))
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index e88a8e88f8c8..3a6fb3e4c8fb 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -150,8 +150,8 @@ bool SwDocShell::InsertGeneratedStream(SfxMedium & rMedium,
if (!::sw::XTextRangeToSwPaM(aPam, xInsertPosition))
return false;
// similar to SwView::InsertMedium
- SwReader *pReader(0);
- Reader *const pRead = StartConvertFrom(rMedium, &pReader, 0, &aPam);
+ SwReader *pReader(nullptr);
+ Reader *const pRead = StartConvertFrom(rMedium, &pReader, nullptr, &aPam);
if (!pRead)
return false;
sal_uLong const nError = pReader->Read(*pRead);
@@ -167,7 +167,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
bool bAPICall = false;
const SfxPoolItem* pApiItem;
const SfxItemSet* pMedSet;
- if( 0 != ( pMedSet = rMedium.GetItemSet() ) && SfxItemState::SET ==
+ if( nullptr != ( pMedSet = rMedium.GetItemSet() ) && SfxItemState::SET ==
pMedSet->GetItemState( FN_API_CALL, true, &pApiItem ) )
bAPICall = static_cast<const SfxBoolItem*>(pApiItem)->GetValue();
@@ -178,12 +178,12 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
{
ScopedVclPtr<InfoBox>::Create( nullptr, SW_RESSTR(STR_CANTOPEN))->Execute();
}
- return 0;
+ return nullptr;
}
OUString aFileName( rMedium.GetName() );
SwRead pRead = SwReaderWriter::GetReader( pFlt->GetUserData() );
if( !pRead )
- return 0;
+ return nullptr;
if( rMedium.IsStorage()
? SW_STORAGE_READER & pRead->GetReaderType()
@@ -195,7 +195,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
: new SwReader( rMedium, aFileName, m_pDoc );
}
else
- return 0;
+ return nullptr;
// #i30171# set the UpdateDocMode at the SwDocShell
const SfxUInt16Item* pUpdateDocItem = SfxItemSet::GetItem<SfxUInt16Item>(rMedium.GetItemSet(), SID_UPDATEDOCMODE, false);
@@ -204,13 +204,13 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
if (!pFlt->GetDefaultTemplate().isEmpty())
pRead->SetTemplateName( pFlt->GetDefaultTemplate() );
- if( pRead == ReadAscii && 0 != rMedium.GetInStream() &&
+ if( pRead == ReadAscii && nullptr != rMedium.GetInStream() &&
pFlt->GetUserData() == FILTER_TEXT_DLG )
{
SwAsciiOptions aOpt;
const SfxItemSet* pSet;
const SfxPoolItem* pItem;
- if( 0 != ( pSet = rMedium.GetItemSet() ) && SfxItemState::SET ==
+ if( nullptr != ( pSet = rMedium.GetItemSet() ) && SfxItemState::SET ==
pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) )
aOpt.ReadUserData( static_cast<const SfxStringItem*>(pItem)->GetValue() );
@@ -270,7 +270,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
}
UpdateFontList();
- InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : 0);
+ InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : nullptr);
delete pRdr;
@@ -529,7 +529,7 @@ static SwSrcView* lcl_GetSourceView( SwDocShell* pSh )
{
// are we in SourceView?
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst( pSh );
- SfxViewShell* pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
+ SfxViewShell* pViewShell = pVFrame ? pVFrame->GetViewShell() : nullptr;
return dynamic_cast<SwSrcView*>( pViewShell );
}
@@ -702,7 +702,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
OUString sItemOpt;
const SfxItemSet* pSet;
const SfxPoolItem* pItem;
- if( 0 != ( pSet = rMedium.GetItemSet() ) )
+ if( nullptr != ( pSet = rMedium.GetItemSet() ) )
{
if( SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS,
true, &pItem ) )
@@ -815,7 +815,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
// reconnect it after PrtOle2. We don't use an empty JobSetup because
// that would only lead to questionable results after expensive
// reformatting (Preview!)
- JobSetup *pOrig = 0;
+ JobSetup *pOrig = nullptr;
if ( !rSetup.GetPrinterName().isEmpty() && ASPECT_THUMBNAIL != nAspect )
{
pOrig = const_cast<JobSetup*>(m_pDoc->getIDocumentDeviceAccess().getJobsetup());
@@ -907,7 +907,7 @@ void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter )
if ( pNewPrinter )
GetDoc()->getIDocumentDeviceAccess().setJobsetup( pNewPrinter->GetJobSetup() );
else
- GetDoc()->getIDocumentDeviceAccess().setPrinter( 0, true, true );
+ GetDoc()->getIDocumentDeviceAccess().setPrinter( nullptr, true, true );
}
sal_uLong SwDocShell::GetMiscStatus() const
@@ -1104,7 +1104,7 @@ void SwDocShell::SetView(SwView* pVw)
if (m_pView)
m_pWrtShell = &m_pView->GetWrtShell();
else
- m_pWrtShell = 0;
+ m_pWrtShell = nullptr;
}
void SwDocShell::PrepareReload()
@@ -1262,7 +1262,7 @@ OUString SwDocShell::GetEventName( sal_Int32 nIndex )
const ::sfx2::IXmlIdRegistry* SwDocShell::GetXmlIdRegistry() const
{
- return m_pDoc ? &m_pDoc->GetXmlIdRegistry() : 0;
+ return m_pDoc ? &m_pDoc->GetXmlIdRegistry() : nullptr;
}
bool SwDocShell::IsChangeRecording() const
@@ -1290,7 +1290,7 @@ bool SwDocShell::SetProtectionPassword( const OUString &rNewPassword )
{
const SfxAllItemSet aSet( GetPool() );
const SfxItemSet* pArgs = &aSet;
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
IDocumentRedlineAccess& rIDRA = m_pWrtShell->getIDocumentRedlineAccess();
Sequence< sal_Int8 > aPasswd = rIDRA.GetRedlinePassword();
@@ -1325,7 +1325,7 @@ bool SwDocShell::GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPas
const SfxAllItemSet aSet( GetPool() );
const SfxItemSet* pArgs = &aSet;
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
IDocumentRedlineAccess& rIDRA = m_pWrtShell->getIDocumentRedlineAccess();
Sequence< sal_Int8 > aPasswdHash( rIDRA.GetRedlinePassword() );
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 484b86b9c0e7..5b2d95aa3b3e 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -150,7 +150,7 @@ VclPtr<SfxDocumentInfoDialog> SwDocShell::CreateDocumentInfoDialog(
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg->AddFontTabPage();
- pDlg->AddTabPage(TP_DOC_STAT, SW_RESSTR(STR_DOC_STAT),pFact->GetTabPageCreatorFunc( TP_DOC_STAT ),0);
+ pDlg->AddTabPage(TP_DOC_STAT, SW_RESSTR(STR_DOC_STAT),pFact->GetTabPageCreatorFunc( TP_DOC_STAT ),nullptr);
}
}
return pDlg;
@@ -366,12 +366,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
SfxItemSet aSet( pApp->GetPool(), SID_AUTO_CORRECT_DLG, SID_AUTO_CORRECT_DLG, SID_OPEN_SMARTTAGOPTIONS, SID_OPEN_SMARTTAGOPTIONS, 0 );
aSet.Put( aSwOptions );
- const SfxPoolItem* pOpenSmartTagOptionsItem = 0;
+ const SfxPoolItem* pOpenSmartTagOptionsItem = nullptr;
if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, false, &pOpenSmartTagOptionsItem ) )
aSet.Put( *static_cast<const SfxBoolItem*>(pOpenSmartTagOptionsItem) );
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- SfxAbstractTabDialog* pDlg = pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, NULL, &aSet, NULL );
+ SfxAbstractTabDialog* pDlg = pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, nullptr, &aSet, nullptr );
pDlg->Execute();
delete pDlg;
@@ -384,7 +384,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
rACW.CheckChangedList( aTmpLst );
// clear the temp WordList pointer
- pAFlags->m_pAutoCompleteList = 0;
+ pAFlags->m_pAutoCompleteList = nullptr;
}
// remove all pointer we never delete the strings
aTmpLst.clear();
@@ -638,8 +638,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
// the SourceView is not the 1 for SwWebDocShell
sal_uInt16 nSlot = SID_VIEWSHELL1;
bool bSetModified = false;
- SfxPrinter* pSavePrinter = 0;
- if( 0 != pSrcView)
+ SfxPrinter* pSavePrinter = nullptr;
+ if( nullptr != pSrcView)
{
SfxPrinter* pTemp = GetDoc()->getIDocumentDeviceAccess().getPrinter( false );
if(pTemp)
@@ -692,7 +692,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<AbstractSwInsertAbstractDlg> pDlg(pFact->CreateSwInsertAbstractDlg(0));
+ std::unique_ptr<AbstractSwInsertAbstractDlg> pDlg(pFact->CreateSwInsertAbstractDlg(nullptr));
OSL_ENSURE(pDlg, "Dialog creation failed!");
if(RET_OK == pDlg->Execute())
{
@@ -814,7 +814,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
pClipCntnr->CopyAnyData( SotClipboardFormatId::RTF, static_cast<sal_Char const *>(
pStrm->GetData()), pStrm->GetEndOfData() );
pClipCntnr->CopyToClipboard(
- GetView()? &GetView()->GetEditWin() : 0 );
+ GetView()? &GetView()->GetEditWin() : nullptr );
delete pStrm;
}
}
@@ -832,7 +832,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
//pWrtShell is not set in page preview
if (m_pWrtShell)
m_pWrtShell->StartAllAction();
- m_pDoc->getIDocumentFieldsAccess().UpdateFields( NULL, false );
+ m_pDoc->getIDocumentFieldsAccess().UpdateFields( nullptr, false );
m_pDoc->getIDocumentLinksAdministration().EmbedAllLinks();
m_IsRemovedInvisibleContent
= officecfg::Office::Security::HiddenContent::RemoveHiddenContent::get();
@@ -1057,7 +1057,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
else
{
- const SwTextFormatColl* pSplitColl = 0;
+ const SwTextFormatColl* pSplitColl = nullptr;
if ( !aTemplateName.isEmpty() )
pSplitColl = m_pDoc->FindTextFormatCollByName(aTemplateName);
bDone = bCreateHtml
@@ -1110,7 +1110,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
// iterate over Views and put the State to FormShells
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst( this );
- SfxViewShell* pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
+ SfxViewShell* pViewShell = pVFrame ? pVFrame->GetViewShell() : nullptr;
SwView* pCurrView = dynamic_cast< SwView* >( pViewShell );
while(pCurrView)
{
@@ -1118,7 +1118,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if(pFormShell)
pFormShell->SetY2KState(nYear2K);
pVFrame = SfxViewFrame::GetNext( *pVFrame, this );
- pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
+ pViewShell = pVFrame ? pVFrame->GetViewShell() : nullptr;
pCurrView = dynamic_cast<SwView*>( pViewShell );
}
m_pDoc->GetNumberFormatter()->SetYear2000(nYear2K);
@@ -1382,7 +1382,7 @@ sal_uLong SwDocShell::LoadStylesFromFile( const OUString& rURL,
// search for filter in WebDocShell, too
SfxMedium aMed( rURL, STREAM_STD_READ );
- const SfxFilter* pFlt = 0;
+ const SfxFilter* pFlt = nullptr;
aMatcher.DetectFilter( aMed, &pFlt, false );
if(!pFlt)
{
@@ -1460,7 +1460,7 @@ sal_uLong SwDocShell::LoadStylesFromFile( const OUString& rURL,
// Get a client for an embedded object if possible.
SfxInPlaceClient* SwDocShell::GetIPClient( const ::svt::EmbeddedObjectRef& xObjRef )
{
- SfxInPlaceClient* pResult = NULL;
+ SfxInPlaceClient* pResult = nullptr;
SwWrtShell* pShell = GetWrtShell();
if ( pShell )
@@ -1500,7 +1500,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh,
// Iterate over the DocShell and get the ones with the name
SfxObjectShell* pShell = pDestSh;
- bool bFirst = 0 != pShell;
+ bool bFirst = nullptr != pShell;
if( !bFirst )
// No DocShell passed, starting with the first from the DocShell list
@@ -1539,7 +1539,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh,
if( INetProtocol::File == aTmpObj.GetProtocol() )
pMed->Download(); // Touch the medium (download it)
- const SfxFilter* pSfxFlt = 0;
+ const SfxFilter* pSfxFlt = nullptr;
if( !pMed->GetError() )
{
SfxFilterMatcher aMatcher( OUString::createFromAscii(SwDocShell::Factory().GetShortName()) );
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index c716ca3f51d6..a9183054bce6 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -265,7 +265,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
nFontHeightWhich = RES_CHRATR_CTL_FONTSIZE;
eLanguage = static_cast<const SvxLanguageItem&>(m_pDoc->GetDefault( RES_CHRATR_CTL_LANGUAGE )).GetLanguage();
}
- SwTextFormatColl *pColl = 0;
+ SwTextFormatColl *pColl = nullptr;
if(!pStdFont->IsFontDefault(aFontIdPoolId[nIdx]))
{
sEntry = pStdFont->GetFontFor(aFontIdPoolId[nIdx]);
@@ -465,10 +465,10 @@ void SwDocShell::RemoveLink()
}
sal_Int8 nRefCt = static_cast< sal_Int8 >(m_pDoc->release());
m_pDoc->SetOle2Link(Link<bool,void>());
- m_pDoc->SetDocShell( 0 );
+ m_pDoc->SetDocShell( nullptr );
if( !nRefCt )
delete m_pDoc;
- m_pDoc = 0; // we don't have the Doc anymore!!
+ m_pDoc = nullptr; // we don't have the Doc anymore!!
}
}
void SwDocShell::InvalidateModel()
@@ -565,7 +565,7 @@ bool SwDocShell::Load( SfxMedium& rMedium )
}
UpdateFontList();
- InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : 0);
+ InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : nullptr);
SetError( nErr, OSL_LOG_PREFIX );
bRet = !IsError( nErr );
@@ -631,7 +631,7 @@ void SwDocShell::SubInitNew()
OSL_ENSURE( !m_xBasePool.is(), "who hasn't destroyed their Pool?" );
m_xBasePool = new SwDocStyleSheetPool( *m_pDoc, SfxObjectCreateMode::ORGANIZER == GetCreateMode() );
UpdateFontList();
- InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : 0);
+ InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : nullptr);
m_pDoc->getIDocumentSettingAccess().setLinkUpdateMode( GLOBALSETTING );
m_pDoc->getIDocumentSettingAccess().setFieldUpdateFlags( AUTOUPD_GLOBALSETTING );
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 8ab012ea2e93..2dcb6f944397 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -108,7 +108,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
else
{
SfxViewFrame* pFrame = pShell->GetView().GetViewFrame();
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
pFrame->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem);
if (pFamilyItem)
@@ -169,7 +169,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
nMask = SWSTYLEBIT_HTML;
else
{
- const FrmTypeFlags nSelection = pShell->GetFrmType(0,true);
+ const FrmTypeFlags nSelection = pShell->GetFrmType(nullptr,true);
if(pShell->GetCurTOX())
nMask = SWSTYLEBIT_IDX ;
else if(nSelection & FrmTypeFlags::HEADER ||
@@ -296,7 +296,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
if (sName.isEmpty() && m_xBasePool.get())
sName = SfxStyleDialog::GenerateUnusedName(*m_xBasePool);
- nRet = Edit( sName, sParent, nFamily, nMask, true, OString(), 0, rReq.IsAPI() );
+ nRet = Edit( sName, sParent, nFamily, nMask, true, OString(), nullptr, rReq.IsAPI() );
}
break;
@@ -346,7 +346,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
OUString aParam;
sal_uInt16 nFamily = SFX_STYLE_FAMILY_PARA;
sal_uInt16 nMask = 0;
- SwWrtShell* pActShell = 0;
+ SwWrtShell* pActShell = nullptr;
if( !pArgs )
{
@@ -518,7 +518,7 @@ public:
DECL_LINK_TYPED( ApplyHdl, LinkParamNone*, void );
void apply()
{
- ApplyHdl(NULL);
+ ApplyHdl(nullptr);
}
sal_uInt16 getRet() const { return m_nRet; }
private:
@@ -579,7 +579,7 @@ IMPL_LINK_NOARG_TYPED(ApplyStyle, ApplyHdl, LinkParamNone*, void)
if( SFX_STYLE_FAMILY_PAGE == m_nFamily && SvtLanguageOptions().IsCTLFontEnabled() )
{
- const SfxPoolItem *pItem = NULL;
+ const SfxPoolItem *pItem = nullptr;
if( aTmpSet.GetItemState( m_rDocSh.GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, false ) , true, &pItem ) == SfxItemState::SET )
SwChartHelper::DoUpdateAllCharts( pDoc );
}
@@ -624,7 +624,7 @@ sal_uInt16 SwDocShell::Edit(
const bool bBasic )
{
assert( GetWrtShell() );
- SfxStyleSheetBase *pStyle = 0;
+ SfxStyleSheetBase *pStyle = nullptr;
sal_uInt16 nRet = nMask;
bool bModified = m_pDoc->getIDocumentState().IsModified();
@@ -731,7 +731,7 @@ sal_uInt16 SwDocShell::Edit(
{
//Get the undo id for the type of style that was created in order to re-use that comment for the grouped
//create style + change style operations
- m_pWrtShell->GetLastUndoInfo(0, &nNewStyleUndoId);
+ m_pWrtShell->GetLastUndoInfo(nullptr, &nNewStyleUndoId);
}
}
else
@@ -789,7 +789,7 @@ sal_uInt16 SwDocShell::Edit(
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert( pFact );
std::unique_ptr<SfxAbstractApplyTabDialog> pDlg(pFact->CreateTemplateDialog(
- 0, *(xTmp.get()), nFamily, sPage,
+ nullptr, *(xTmp.get()), nFamily, sPage,
pActShell ? pActShell : m_pWrtShell, bNew));
assert( pDlg );
ApplyStyle aApplyStyleHelper(*this, bNew, pStyle, nRet, xTmp, nFamily, pDlg.get(), m_xBasePool, bModified);
@@ -1087,7 +1087,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const OUString &rName, sal_uInt16 nFamily, Sw
{
const SwNumRule* pCurRule;
if( pStyle->GetNumRule() &&
- 0 != ( pCurRule = pCurrWrtShell->GetNumRuleAtCurrCrsrPos() ))
+ nullptr != ( pCurRule = pCurrWrtShell->GetNumRuleAtCurrCrsrPos() ))
{
SwNumRule aRule( *pCurRule );
// #i91400#
@@ -1281,7 +1281,7 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, bool bPreserveCurrentDocu
// of the template, update all the Source's
// FixFields once.
if(!bPreserveCurrentDocument)
- static_cast<SwDocShell&>(rSource).m_pDoc->getIDocumentFieldsAccess().SetFixFields(false, NULL);
+ static_cast<SwDocShell&>(rSource).m_pDoc->getIDocumentFieldsAccess().SetFixFields(false, nullptr);
if (m_pWrtShell)
{
// rhbz#818557, fdo#58893: EndAllAction will call SelectShell(),
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index a9c70c29f185..cedea9b48b8c 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -94,12 +94,12 @@ public:
};
SwImplShellAction::SwImplShellAction( SwDoc& rDoc )
- : pCurrSh( 0 )
+ : pCurrSh( nullptr )
{
if( rDoc.GetDocShell() )
pSh = rDoc.GetDocShell()->GetWrtShell();
else
- pSh = 0;
+ pSh = nullptr;
if( pSh )
{
@@ -121,10 +121,10 @@ SwImplShellAction::~SwImplShellAction()
// possibly fill Style
static SwCharFormat* lcl_FindCharFormat( SwDoc& rDoc,
const OUString& rName,
- SwDocStyleSheet* pStyle = 0,
+ SwDocStyleSheet* pStyle = nullptr,
bool bCreate = true )
{
- SwCharFormat* pFormat = 0;
+ SwCharFormat* pFormat = nullptr;
if (!rName.isEmpty())
{
pFormat = rDoc.FindCharFormatByName( rName );
@@ -163,10 +163,10 @@ static SwCharFormat* lcl_FindCharFormat( SwDoc& rDoc,
// fill Style
static SwTextFormatColl* lcl_FindParaFormat( SwDoc& rDoc,
const OUString& rName,
- SwDocStyleSheet* pStyle = 0,
+ SwDocStyleSheet* pStyle = nullptr,
bool bCreate = true )
{
- SwTextFormatColl* pColl = 0;
+ SwTextFormatColl* pColl = nullptr;
if (!rName.isEmpty())
{
@@ -201,10 +201,10 @@ static SwTextFormatColl* lcl_FindParaFormat( SwDoc& rDoc,
// Border formats
static SwFrameFormat* lcl_FindFrameFormat( SwDoc& rDoc,
const OUString& rName,
- SwDocStyleSheet* pStyle = 0,
+ SwDocStyleSheet* pStyle = nullptr,
bool bCreate = true )
{
- SwFrameFormat* pFormat = 0;
+ SwFrameFormat* pFormat = nullptr;
if( !rName.isEmpty() )
{
pFormat = rDoc.FindFrameFormatByName( rName );
@@ -235,10 +235,10 @@ static SwFrameFormat* lcl_FindFrameFormat( SwDoc& rDoc,
// Page descriptors
static const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
const OUString& rName,
- SwDocStyleSheet* pStyle = 0,
+ SwDocStyleSheet* pStyle = nullptr,
bool bCreate = true )
{
- const SwPageDesc* pDesc = 0;
+ const SwPageDesc* pDesc = nullptr;
if (!rName.isEmpty())
{
@@ -269,10 +269,10 @@ static const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
static const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
const OUString& rName,
- SwDocStyleSheet* pStyle = 0,
+ SwDocStyleSheet* pStyle = nullptr,
bool bCreate = true )
{
- const SwNumRule* pRule = 0;
+ const SwNumRule* pRule = nullptr;
if (!rName.isEmpty())
{
@@ -381,11 +381,11 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
sal_uInt16 _nMask) :
SfxStyleSheetBase( rName, _rPool, eFam, _nMask ),
- pCharFormat(0),
- pColl(0),
- pFrameFormat(0),
- pDesc(0),
- pNumRule(0),
+ pCharFormat(nullptr),
+ pColl(nullptr),
+ pFrameFormat(nullptr),
+ pDesc(nullptr),
+ pNumRule(nullptr),
rDoc(rDocument),
aCoreSet(GetPool().GetPool(), //UUUU sorted by indices, one double removed
@@ -453,7 +453,7 @@ void SwDocStyleSheet::SetGrabBagItem(const uno::Any& rVal)
if (!bPhysical)
FillStyleSheet(FillPhysical);
- SwFormat* pFormat = 0;
+ SwFormat* pFormat = nullptr;
switch (nFamily)
{
case SFX_STYLE_FAMILY_CHAR:
@@ -498,7 +498,7 @@ void SwDocStyleSheet::SetGrabBagItem(const uno::Any& rVal)
void SwDocStyleSheet::GetGrabBagItem(uno::Any& rVal) const
{
- SwFormat* pFormat = 0;
+ SwFormat* pFormat = nullptr;
switch (nFamily)
{
case SFX_STYLE_FAMILY_CHAR:
@@ -529,7 +529,7 @@ void SwDocStyleSheet::SetHidden( bool bValue )
if(!bPhysical)
FillStyleSheet( FillPhysical );
- SwFormat* pFormat = 0;
+ SwFormat* pFormat = nullptr;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR:
@@ -597,7 +597,7 @@ bool SwDocStyleSheet::IsHidden( ) const
{
bool bRet = false;
- SwFormat* pFormat = 0;
+ SwFormat* pFormat = nullptr;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR:
@@ -637,7 +637,7 @@ const OUString& SwDocStyleSheet::GetParent() const
if( !bPhysical )
{
// check if it's already in document
- SwFormat* pFormat = 0;
+ SwFormat* pFormat = nullptr;
SwGetPoolIdFromName eGetType;
switch(nFamily)
{
@@ -1067,24 +1067,24 @@ bool SwDocStyleSheet::SetName(const OUString& rStr, bool bReindexNow)
// hierarchy of deduction
bool SwDocStyleSheet::SetParent( const OUString& rStr)
{
- SwFormat* pFormat = 0, *pParent = 0;
+ SwFormat* pFormat = nullptr, *pParent = nullptr;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR :
OSL_ENSURE( pCharFormat, "SwCharFormat missing!" );
- if( 0 != ( pFormat = pCharFormat ) && !rStr.isEmpty() )
+ if( nullptr != ( pFormat = pCharFormat ) && !rStr.isEmpty() )
pParent = lcl_FindCharFormat(rDoc, rStr);
break;
case SFX_STYLE_FAMILY_PARA :
OSL_ENSURE( pColl, "Collektion missing!");
- if( 0 != ( pFormat = pColl ) && !rStr.isEmpty() )
+ if( nullptr != ( pFormat = pColl ) && !rStr.isEmpty() )
pParent = lcl_FindParaFormat( rDoc, rStr );
break;
case SFX_STYLE_FAMILY_FRAME:
OSL_ENSURE(pFrameFormat, "FrameFormat missing!");
- if( 0 != ( pFormat = pFrameFormat ) && !rStr.isEmpty() )
+ if( nullptr != ( pFormat = pFrameFormat ) && !rStr.isEmpty() )
pParent = lcl_FindFrameFormat( rDoc, rStr );
break;
@@ -1130,7 +1130,7 @@ bool SwDocStyleSheet::SetFollow( const OUString& rStr)
if( pColl )
{
SwTextFormatColl* pFollow = pColl;
- if( !rStr.isEmpty() && 0 == (pFollow = lcl_FindParaFormat(rDoc, rStr) ))
+ if( !rStr.isEmpty() && nullptr == (pFollow = lcl_FindParaFormat(rDoc, rStr) ))
pFollow = pColl;
pColl->SetNextTextFormatColl(*pFollow);
@@ -1144,7 +1144,7 @@ bool SwDocStyleSheet::SetFollow( const OUString& rStr)
{
const SwPageDesc* pFollowDesc = !rStr.isEmpty()
? lcl_FindPageDesc(rDoc, rStr)
- : 0;
+ : nullptr;
size_t nId = 0;
if (pFollowDesc != pDesc->GetFollow() && rDoc.FindPageDesc(pDesc->GetName(), &nId))
{
@@ -1364,8 +1364,8 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_INSFMTATTR, &aRewriter );
}
- SwFormat* pFormat = 0;
- SwPageDesc* pNewDsc = 0;
+ SwFormat* pFormat = nullptr;
+ SwPageDesc* pNewDsc = nullptr;
size_t nPgDscPos = 0;
switch(nFamily)
@@ -1389,14 +1389,14 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
const SwCondCollItem* pCondItem;
if( SfxItemState::SET != rSet.GetItemState( FN_COND_COLL, false,
reinterpret_cast<const SfxPoolItem**>(&pCondItem) ))
- pCondItem = 0;
+ pCondItem = nullptr;
if( RES_CONDTXTFMTCOLL == pColl->Which() && pCondItem )
{
const CommandStruct* pCmds = SwCondCollItem::GetCmds();
for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++)
{
- SwCollCondition aCond( 0, pCmds[ i ].nCnd, pCmds[ i ].nSubCond );
+ SwCollCondition aCond( nullptr, pCmds[ i ].nCnd, pCmds[ i ].nSubCond );
static_cast<SwConditionTextFormatColl*>(pColl)->RemoveCondition( aCond );
const OUString sStyle = pCondItem->GetStyle( i );
if (sStyle.isEmpty())
@@ -1456,7 +1456,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
// we have to create a physical instance of the numbering style. If we do not and
// neither the paragraph style nor the numbering style is used in the document
// the numbering style will not be saved with the document and the assignment got lost.
- const SfxPoolItem* pNumRuleItem = 0;
+ const SfxPoolItem* pNumRuleItem = nullptr;
if( SfxItemState::SET == rSet.GetItemState( RES_PARATR_NUMRULE, false, &pNumRuleItem ) )
{ // Setting a numbering rule?
const OUString sNumRule = static_cast<const SwNumRuleItem*>(pNumRuleItem)->GetValue();
@@ -1623,7 +1623,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
if (rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
+ rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
}
}
@@ -1767,7 +1767,7 @@ bool SwDocStyleSheet::FillStyleSheet(
{
bool bRet = false;
sal_uInt16 nPoolId = USHRT_MAX;
- SwFormat* pFormat = 0;
+ SwFormat* pFormat = nullptr;
bool bCreate = FillPhysical == eFType;
bool bDeleteInfo = false;
@@ -1779,7 +1779,7 @@ bool SwDocStyleSheet::FillStyleSheet(
{
case SFX_STYLE_FAMILY_CHAR:
pCharFormat = lcl_FindCharFormat(rDoc, aName, this, bCreate );
- bPhysical = 0 != pCharFormat;
+ bPhysical = nullptr != pCharFormat;
if( bFillOnlyInfo && !bPhysical )
{
// create style (plus all needed parents) and clean it up
@@ -1800,16 +1800,16 @@ bool SwDocStyleSheet::FillStyleSheet(
nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
}
- bRet = 0 != pCharFormat || USHRT_MAX != nPoolId;
+ bRet = nullptr != pCharFormat || USHRT_MAX != nPoolId;
if( bDeleteInfo )
- pCharFormat = 0;
+ pCharFormat = nullptr;
break;
case SFX_STYLE_FAMILY_PARA:
{
pColl = lcl_FindParaFormat(rDoc, aName, this, bCreate);
- bPhysical = 0 != pColl;
+ bPhysical = nullptr != pColl;
if( bFillOnlyInfo && !bPhysical )
{
::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo());
@@ -1824,16 +1824,16 @@ bool SwDocStyleSheet::FillStyleSheet(
else if( !bCreate )
nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
- bRet = 0 != pColl || USHRT_MAX != nPoolId;
+ bRet = nullptr != pColl || USHRT_MAX != nPoolId;
if( bDeleteInfo )
- pColl = 0;
+ pColl = nullptr;
}
break;
case SFX_STYLE_FAMILY_FRAME:
pFrameFormat = lcl_FindFrameFormat(rDoc, aName, this, bCreate);
- bPhysical = 0 != pFrameFormat;
+ bPhysical = nullptr != pFrameFormat;
if (bFillOnlyInfo && !bPhysical)
{
::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo());
@@ -1845,15 +1845,15 @@ bool SwDocStyleSheet::FillStyleSheet(
if( !bCreate && !pFormat )
nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT );
- bRet = 0 != pFrameFormat || USHRT_MAX != nPoolId;
+ bRet = nullptr != pFrameFormat || USHRT_MAX != nPoolId;
if( bDeleteInfo )
- pFrameFormat = 0;
+ pFrameFormat = nullptr;
break;
case SFX_STYLE_FAMILY_PAGE:
pDesc = lcl_FindPageDesc(rDoc, aName, this, bCreate);
- bPhysical = 0 != pDesc;
+ bPhysical = nullptr != pDesc;
if( bFillOnlyInfo && !pDesc )
{
::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo());
@@ -1875,14 +1875,14 @@ bool SwDocStyleSheet::FillStyleSheet(
nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
SetMask( USER_FMT & nPoolId ? SFXSTYLEBIT_USERDEF : 0 );
- bRet = 0 != pDesc || USHRT_MAX != nPoolId;
+ bRet = nullptr != pDesc || USHRT_MAX != nPoolId;
if( bDeleteInfo )
- pDesc = 0;
+ pDesc = nullptr;
break;
case SFX_STYLE_FAMILY_PSEUDO:
pNumRule = lcl_FindNumRule(rDoc, aName, this, bCreate);
- bPhysical = 0 != pNumRule;
+ bPhysical = nullptr != pNumRule;
if( bFillOnlyInfo && !pNumRule )
{
::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo());
@@ -1904,10 +1904,10 @@ bool SwDocStyleSheet::FillStyleSheet(
nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
SetMask( USER_FMT & nPoolId ? SFXSTYLEBIT_USERDEF : 0 );
- bRet = 0 != pNumRule || USHRT_MAX != nPoolId;
+ bRet = nullptr != pNumRule || USHRT_MAX != nPoolId;
if( bDeleteInfo )
- pNumRule = 0;
+ pNumRule = nullptr;
break;
default:; //prevent warning
}
@@ -2015,7 +2015,7 @@ void SwDocStyleSheet::Create()
{
const OUString sTmpNm( aName.isEmpty() ? rDoc.GetUniqueNumRuleName() : aName );
SwNumRule* pRule = rDoc.GetNumRuleTable()[
- rDoc.MakeNumRule( sTmpNm, 0, false,
+ rDoc.MakeNumRule( sTmpNm, nullptr, false,
// #i89178#
numfunc::GetDefaultPositionAndSpaceMode() ) ];
pRule->SetAutoRule( false );
@@ -2090,10 +2090,10 @@ void SwDocStyleSheet::SetPhysical(bool bPhys)
if(!bPhys)
{
- pCharFormat = 0;
- pColl = 0;
- pFrameFormat = 0;
- pDesc = 0;
+ pCharFormat = nullptr;
+ pColl = nullptr;
+ pFrameFormat = nullptr;
+ pDesc = nullptr;
}
}
@@ -2141,12 +2141,12 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile )
rFile = "swrhlppi.hlp";
- const SwFormat* pTmpFormat = 0;
+ const SwFormat* pTmpFormat = nullptr;
switch( nFamily )
{
case SFX_STYLE_FAMILY_CHAR :
if( !pCharFormat &&
- 0 == (pCharFormat = lcl_FindCharFormat( rDoc, aName, 0, false )) )
+ nullptr == (pCharFormat = lcl_FindCharFormat( rDoc, aName, nullptr, false )) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
return USHRT_MAX == nId ? 0 : nId;
@@ -2156,7 +2156,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile )
case SFX_STYLE_FAMILY_PARA:
if( !pColl &&
- 0 == ( pColl = lcl_FindParaFormat( rDoc, aName, 0, false )) )
+ nullptr == ( pColl = lcl_FindParaFormat( rDoc, aName, nullptr, false )) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
return USHRT_MAX == nId ? 0 : nId;
@@ -2166,7 +2166,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile )
case SFX_STYLE_FAMILY_FRAME:
if( !pFrameFormat &&
- 0 == ( pFrameFormat = lcl_FindFrameFormat( rDoc, aName, 0, false ) ) )
+ nullptr == ( pFrameFormat = lcl_FindFrameFormat( rDoc, aName, nullptr, false ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT );
return USHRT_MAX == nId ? 0 : nId;
@@ -2176,7 +2176,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile )
case SFX_STYLE_FAMILY_PAGE:
if( !pDesc &&
- 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, false ) ) )
+ nullptr == ( pDesc = lcl_FindPageDesc( rDoc, aName, nullptr, false ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
return USHRT_MAX == nId ? 0 : nId;
@@ -2189,7 +2189,7 @@ sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile )
case SFX_STYLE_FAMILY_PSEUDO:
if( !pNumRule &&
- 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, false ) ) )
+ nullptr == ( pNumRule = lcl_FindNumRule( rDoc, aName, nullptr, false ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
return USHRT_MAX == nId ? 0 : nId;
@@ -2237,7 +2237,7 @@ void SwDocStyleSheet::SetHelpId( const OUString& r, sal_uLong nId )
sal_uInt8 nFileId = static_cast< sal_uInt8 >(rDoc.SetDocPattern( r ));
sal_uInt16 nHId = static_cast< sal_uInt16 >(nId); //!! SFX changed over to ULONG arbitrarily!
- SwFormat* pTmpFormat = 0;
+ SwFormat* pTmpFormat = nullptr;
switch( nFamily )
{
case SFX_STYLE_FAMILY_CHAR : pTmpFormat = pCharFormat; break;
@@ -2305,14 +2305,14 @@ SfxStyleSheetBase& SwDocStyleSheetPool::Make( const OUString& rName,
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOrg*/)
{
OSL_ENSURE(false , "Create im SW-Stylesheet-Pool geht nicht" );
- return NULL;
+ return nullptr;
}
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const OUString &,
SfxStyleFamily, sal_uInt16 )
{
OSL_ENSURE( false, "Create im SW-Stylesheet-Pool geht nicht" );
- return NULL;
+ return nullptr;
}
SfxStyleSheetIteratorPtr SwDocStyleSheetPool::CreateIterator( SfxStyleFamily eFam, sal_uInt16 _nMask )
@@ -2337,21 +2337,21 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
{
case SFX_STYLE_FAMILY_CHAR:
{
- SwCharFormat* pFormat = lcl_FindCharFormat(rDoc, sName, 0, false );
+ SwCharFormat* pFormat = lcl_FindCharFormat(rDoc, sName, nullptr, false );
if(pFormat)
rDoc.DelCharFormat(pFormat);
}
break;
case SFX_STYLE_FAMILY_PARA:
{
- SwTextFormatColl* pColl = lcl_FindParaFormat(rDoc, sName, 0, false );
+ SwTextFormatColl* pColl = lcl_FindParaFormat(rDoc, sName, nullptr, false );
if(pColl)
rDoc.DelTextFormatColl(pColl);
}
break;
case SFX_STYLE_FAMILY_FRAME:
{
- SwFrameFormat* pFormat = lcl_FindFrameFormat(rDoc, sName, 0, false );
+ SwFrameFormat* pFormat = lcl_FindFrameFormat(rDoc, sName, nullptr, false );
if(pFormat)
rDoc.DelFrameFormat(pFormat);
}
@@ -2382,21 +2382,21 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
const OUString &rStyle, const OUString &rParent )
{
- SwFormat* pFormat = 0, *pParent = 0;
+ SwFormat* pFormat = nullptr, *pParent = nullptr;
switch( eFam )
{
case SFX_STYLE_FAMILY_CHAR :
- if( 0 != ( pFormat = lcl_FindCharFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
+ if( nullptr != ( pFormat = lcl_FindCharFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
pParent = lcl_FindCharFormat(rDoc, rParent );
break;
case SFX_STYLE_FAMILY_PARA :
- if( 0 != ( pFormat = lcl_FindParaFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
+ if( nullptr != ( pFormat = lcl_FindParaFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
pParent = lcl_FindParaFormat( rDoc, rParent );
break;
case SFX_STYLE_FAMILY_FRAME:
- if( 0 != ( pFormat = lcl_FindFrameFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
+ if( nullptr != ( pFormat = lcl_FindFrameFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
pParent = lcl_FindFrameFormat( rDoc, rParent );
break;
@@ -2453,7 +2453,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName,
}
const bool bSearchUsed = ( n != SFXSTYLEBIT_ALL && n & SFXSTYLEBIT_USED );
- const SwModify* pMod = 0;
+ const SwModify* pMod = nullptr;
mxStyleSheet->SetPhysical( false );
mxStyleSheet->PresetName( rName );
@@ -2511,7 +2511,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName,
: bSearchUsed )
bFnd = false;
}
- return bFnd ? mxStyleSheet.get() : 0;
+ return bFnd ? mxStyleSheet.get() : nullptr;
}
SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
@@ -2900,7 +2900,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
nLastPos = SAL_MAX_UINT32;
return Next();
}
- return 0;
+ return nullptr;
}
SfxStyleSheetBase* SwStyleSheetIterator::Next()
@@ -2915,11 +2915,11 @@ SfxStyleSheetBase* SwStyleSheetIterator::Next()
if(mxIterSheet->pSet)
{
mxIterSheet->pSet->ClearItem();
- mxIterSheet->pSet= 0;
+ mxIterSheet->pSet= nullptr;
}
return mxIterSheet.get();
}
- return 0;
+ return nullptr;
}
SfxStyleSheetBase* SwStyleSheetIterator::Find(const OUString& rName)
@@ -2940,7 +2940,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find(const OUString& rName)
return mxStyleSheet.get();
}
- return 0;
+ return nullptr;
}
void SwStyleSheetIterator::AppendStyleList(const ::std::vector<OUString>& rList,
diff --git a/sw/source/uibase/app/mainwn.cxx b/sw/source/uibase/app/mainwn.cxx
index 8413077f398c..4e4c32bbb36c 100644
--- a/sw/source/uibase/app/mainwn.cxx
+++ b/sw/source/uibase/app/mainwn.cxx
@@ -34,7 +34,7 @@ struct SwProgress
SfxProgress *pProgress;
};
-static std::vector<SwProgress*> *pProgressContainer = 0;
+static std::vector<SwProgress*> *pProgressContainer = nullptr;
static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell )
{
@@ -44,7 +44,7 @@ static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell )
if ( pTmp->pDocShell == pDocShell )
return pTmp;
}
- return 0;
+ return nullptr;
}
void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue,
@@ -52,13 +52,13 @@ void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue,
{
if( !SW_MOD()->IsEmbeddedLoadSave() )
{
- SwProgress *pProgress = 0;
+ SwProgress *pProgress = nullptr;
if ( !pProgressContainer )
pProgressContainer = new std::vector<SwProgress*>;
else
{
- if ( 0 != (pProgress = lcl_SwFindProgress( pDocShell )) )
+ if ( nullptr != (pProgress = lcl_SwFindProgress( pDocShell )) )
++pProgress->nStartCount;
}
if ( !pProgress )
@@ -91,7 +91,7 @@ void EndProgress( SwDocShell *pDocShell )
{
if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() )
{
- SwProgress *pProgress = 0;
+ SwProgress *pProgress = nullptr;
sal_uInt16 i;
for ( i = 0; i < pProgressContainer->size(); ++i )
{
@@ -112,7 +112,7 @@ void EndProgress( SwDocShell *pDocShell )
//#112337# it may happen that the container has been removed
//while rescheduling
if ( pProgressContainer && pProgressContainer->empty() )
- delete pProgressContainer, pProgressContainer = 0;
+ delete pProgressContainer, pProgressContainer = nullptr;
}
}
}
diff --git a/sw/source/uibase/app/swdll.cxx b/sw/source/uibase/app/swdll.cxx
index ae6862d2924d..6fcda50c66d9 100644
--- a/sw/source/uibase/app/swdll.cxx
+++ b/sw/source/uibase/app/swdll.cxx
@@ -89,8 +89,8 @@ SwDLL::SwDLL()
std::unique_ptr<SvtModuleOptions> xOpt;
if (!utl::ConfigManager::IsAvoidConfig())
xOpt.reset(new SvtModuleOptions);
- SfxObjectFactory* pDocFact = 0;
- SfxObjectFactory* pGlobDocFact = 0;
+ SfxObjectFactory* pDocFact = nullptr;
+ SfxObjectFactory* pGlobDocFact = nullptr;
if (xOpt && xOpt->IsWriter())
{
pDocFact = &SwDocShell::Factory();
@@ -156,7 +156,7 @@ SwDLL::~SwDLL()
{
// fdo#86494 SwAutoCorrect must be deleted before _FinitCore
SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
- rACfg.SetAutoCorrect(0); // delete SwAutoCorrect before exit handlers
+ rACfg.SetAutoCorrect(nullptr); // delete SwAutoCorrect before exit handlers
}
// Pool has to be deleted before statics are
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx
index 7427473aa21d..649937193ea2 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -111,7 +111,7 @@ SwWrtShell* GetActiveWrtShell()
SwView *pActive = ::GetActiveView();
if( pActive )
return &pActive->GetWrtShell();
- return 0;
+ return nullptr;
}
SwView* GetActiveView()
@@ -139,7 +139,7 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
sal_uInt16 nDest )
{
SwView* pCurrView = pActView;
- SwViewShell* pSh = pCurrView ? &pCurrView->GetWrtShell() : 0;
+ SwViewShell* pSh = pCurrView ? &pCurrView->GetWrtShell() : nullptr;
SwMasterUsrPref* pPref = const_cast<SwMasterUsrPref*>(GetUsrPref(
nDest == VIEWOPT_DEST_WEB
@@ -150,7 +150,7 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
bool bViewOnly = VIEWOPT_DEST_VIEW_ONLY == nDest;
// fob Preview off
SwPagePreview* pPPView;
- if( !pCurrView && 0 != (pPPView = dynamic_cast<SwPagePreview*>( SfxViewShell::Current())) )
+ if( !pCurrView && nullptr != (pPPView = dynamic_cast<SwPagePreview*>( SfxViewShell::Current())) )
{
if(!bViewOnly)
pPref->SetUIOptions( rUsrPref );
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index d2d99939dd50..2a2d7c98b518 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -124,7 +124,7 @@
#include <app.hrc>
#include <svx/xmlsecctrl.hxx>
-ResMgr *pSwResMgr = 0;
+ResMgr *pSwResMgr = nullptr;
bool g_bNoInterrupt = false;
#include <sfx2/app.hxx>
@@ -147,27 +147,27 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
SfxObjectFactory* pGlobalFact )
: SfxModule( ResMgr::CreateResMgr( "sw" ), false, pWebFact,
pFact, pGlobalFact, NULL ),
- m_pModuleConfig(0),
- m_pUsrPref(0),
- m_pWebUsrPref(0),
- m_pPrintOptions(0),
- m_pWebPrintOptions(0),
- m_pChapterNumRules(0),
- m_pStdFontConfig(0),
- m_pNavigationConfig(0),
- m_pToolbarConfig(0),
- m_pWebToolbarConfig(0),
- m_pDBConfig(0),
- m_pColorConfig(0),
- m_pAccessibilityOptions(0),
- m_pCTLOptions(0),
- m_pUserOptions(0),
- m_pAttrPool(0),
- m_pView(0),
+ m_pModuleConfig(nullptr),
+ m_pUsrPref(nullptr),
+ m_pWebUsrPref(nullptr),
+ m_pPrintOptions(nullptr),
+ m_pWebPrintOptions(nullptr),
+ m_pChapterNumRules(nullptr),
+ m_pStdFontConfig(nullptr),
+ m_pNavigationConfig(nullptr),
+ m_pToolbarConfig(nullptr),
+ m_pWebToolbarConfig(nullptr),
+ m_pDBConfig(nullptr),
+ m_pColorConfig(nullptr),
+ m_pAccessibilityOptions(nullptr),
+ m_pCTLOptions(nullptr),
+ m_pUserOptions(nullptr),
+ m_pAttrPool(nullptr),
+ m_pView(nullptr),
m_bAuthorInitialised(false),
m_bEmbeddedLoadSave( false ),
- m_pDragDrop( 0 ),
- m_pXSelection( 0 )
+ m_pDragDrop( nullptr ),
+ m_pXSelection( nullptr )
{
SetName( "StarWriter" );
pSwResMgr = GetResMgr();
@@ -390,13 +390,13 @@ void SwDLL::RegisterControls()
void SwModule::InitAttrPool()
{
OSL_ENSURE(!m_pAttrPool, "Pool already exists!");
- m_pAttrPool = new SwAttrPool(0);
+ m_pAttrPool = new SwAttrPool(nullptr);
SetPool(m_pAttrPool);
}
void SwModule::RemoveAttrPool()
{
- SetPool(0);
+ SetPool(nullptr);
SfxItemPool::Free(m_pAttrPool);
}
diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx
index 78b859bc9203..c620f5bc1ef0 100644
--- a/sw/source/uibase/config/StoredChapterNumbering.cxx
+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx
@@ -124,8 +124,8 @@ public:
{
return uno::Any();
}
- SwNumFormat const* pNumFormat(0);
- OUString const* pCharStyleName(0);
+ SwNumFormat const* pNumFormat(nullptr);
+ OUString const* pCharStyleName(nullptr);
pRules->GetNumFormat(nIndex, pNumFormat, pCharStyleName);
if (!pNumFormat)
{ // the dialog only fills in those levels that are non-default
@@ -159,7 +159,7 @@ public:
SwXNumberingRules::SetPropertiesToNumFormat(
aNumberFormat,
charStyleName,
- 0, 0, 0, 0, 0,
+ nullptr, nullptr, nullptr, nullptr, nullptr,
props);
SwNumRulesWithName *const pRules(GetOrCreateRules());
pRules->SetNumFormat(nIndex, aNumberFormat, charStyleName);
@@ -438,8 +438,8 @@ void ExportStoredChapterNumberingRules(SwChapterNumRules & rRules,
{
for (size_t j = 0; j < MAXLEVEL; ++j)
{
- SwNumFormat const* pDummy(0);
- OUString const* pCharStyleName(0);
+ SwNumFormat const* pDummy(nullptr);
+ OUString const* pCharStyleName(nullptr);
pRule->GetNumFormat(j, pDummy, pCharStyleName);
if (pCharStyleName && !pCharStyleName->isEmpty())
{
diff --git a/sw/source/uibase/config/dbconfig.cxx b/sw/source/uibase/config/dbconfig.cxx
index 3aee9f4f8d80..843b9bf24737 100644
--- a/sw/source/uibase/config/dbconfig.cxx
+++ b/sw/source/uibase/config/dbconfig.cxx
@@ -54,8 +54,8 @@ const Sequence<OUString>& SwDBConfig::GetPropertyNames()
SwDBConfig::SwDBConfig() :
ConfigItem("Office.DataAccess",
ConfigItemMode::DelayedUpdate|ConfigItemMode::ReleaseTree),
- pAdrImpl(0),
- pBibImpl(0)
+ pAdrImpl(nullptr),
+ pBibImpl(nullptr)
{
};
diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx
index d932fea3d70a..2e40ba7c94fb 100644
--- a/sw/source/uibase/config/modcfg.cxx
+++ b/sw/source/uibase/config/modcfg.cxx
@@ -56,7 +56,7 @@ InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalNa
return &rObj;
}
- return NULL;
+ return nullptr;
}
void InsCaptionOptArr::Insert(InsCaptionOpt* pObj)
@@ -70,7 +70,7 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
if(bHTML)
{
OSL_FAIL("no caption option in sw/web!");
- return 0;
+ return nullptr;
}
else
{
@@ -588,8 +588,8 @@ const Sequence<OUString>& SwInsertConfig::GetPropertyNames()
SwInsertConfig::SwInsertConfig(bool bWeb) :
ConfigItem(bWeb ? OUString("Office.WriterWeb/Insert") : OUString("Office.Writer/Insert"),
ConfigItemMode::DelayedUpdate|ConfigItemMode::ReleaseTree),
- pCapOptions(0),
- pOLEMiscOpt(0),
+ pCapOptions(nullptr),
+ pOLEMiscOpt(nullptr),
bInsWithCaption( false ),
bCaptionOrderNumberingFirst( false ),
aInsTableOpts(0,0),
@@ -639,14 +639,14 @@ void SwInsertConfig::ImplCommit()
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
- const InsCaptionOpt* pWriterTableOpt = 0;
- const InsCaptionOpt* pWriterFrameOpt = 0;
- const InsCaptionOpt* pWriterGraphicOpt = 0;
- const InsCaptionOpt* pOLECalcOpt = 0;
- const InsCaptionOpt* pOLEImpressOpt = 0;
- const InsCaptionOpt* pOLEChartOpt = 0;
- const InsCaptionOpt* pOLEFormulaOpt = 0;
- const InsCaptionOpt* pOLEDrawOpt = 0;
+ const InsCaptionOpt* pWriterTableOpt = nullptr;
+ const InsCaptionOpt* pWriterFrameOpt = nullptr;
+ const InsCaptionOpt* pWriterGraphicOpt = nullptr;
+ const InsCaptionOpt* pOLECalcOpt = nullptr;
+ const InsCaptionOpt* pOLEImpressOpt = nullptr;
+ const InsCaptionOpt* pOLEChartOpt = nullptr;
+ const InsCaptionOpt* pOLEFormulaOpt = nullptr;
+ const InsCaptionOpt* pOLEDrawOpt = nullptr;
if(pCapOptions)
{
pWriterTableOpt = pCapOptions->Find(TABLE_CAP);
@@ -873,14 +873,14 @@ void SwInsertConfig::Load()
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
assert(aValues.getLength() == aNames.getLength());
- InsCaptionOpt* pWriterTableOpt = 0;
- InsCaptionOpt* pWriterFrameOpt = 0;
- InsCaptionOpt* pWriterGraphicOpt = 0;
- InsCaptionOpt* pOLECalcOpt = 0;
- InsCaptionOpt* pOLEImpressOpt = 0;
- InsCaptionOpt* pOLEChartOpt = 0;
- InsCaptionOpt* pOLEFormulaOpt = 0;
- InsCaptionOpt* pOLEDrawOpt = 0;
+ InsCaptionOpt* pWriterTableOpt = nullptr;
+ InsCaptionOpt* pWriterFrameOpt = nullptr;
+ InsCaptionOpt* pWriterGraphicOpt = nullptr;
+ InsCaptionOpt* pOLECalcOpt = nullptr;
+ InsCaptionOpt* pOLEImpressOpt = nullptr;
+ InsCaptionOpt* pOLEChartOpt = nullptr;
+ InsCaptionOpt* pOLEFormulaOpt = nullptr;
+ InsCaptionOpt* pOLEDrawOpt = nullptr;
if (pCapOptions)
{
pWriterTableOpt = pCapOptions->Find(TABLE_CAP);
diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx
index bc33fb86d2f7..4c5f874a34a6 100644
--- a/sw/source/uibase/config/uinums.cxx
+++ b/sw/source/uibase/config/uinums.cxx
@@ -80,7 +80,7 @@ SwChapterNumRules::~SwChapterNumRules()
void SwChapterNumRules::Init()
{
for(sal_uInt16 i = 0; i < nMaxRules; ++i )
- pNumRules[i] = 0;
+ pNumRules[i] = nullptr;
OUString sNm(CHAPTER_FILENAME);
SvtPathOptions aOpt;
@@ -119,7 +119,7 @@ SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy,
if( pFormat )
aFormats[ n ] = new _SwNumFormatGlobal( *pFormat );
else
- aFormats[ n ] = 0;
+ aFormats[ n ] = nullptr;
}
}
@@ -153,7 +153,7 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName
if( pFormat )
aFormats[ n ] = new _SwNumFormatGlobal( *pFormat );
else
- aFormats[ n ] = 0;
+ aFormats[ n ] = nullptr;
}
}
return *this;
@@ -167,7 +167,7 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const
for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
_SwNumFormatGlobal* pFormat = aFormats[ n ];
- if( 0 != pFormat)
+ if( nullptr != pFormat)
{
SwNumFormat aNew;
pFormat->ChgNumFormat( rSh, aNew );
@@ -179,8 +179,8 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const
void SwNumRulesWithName::GetNumFormat(
size_t const nIndex, SwNumFormat const*& rpNumFormat, OUString const*& rpName) const
{
- rpNumFormat = (aFormats[nIndex]) ? &aFormats[nIndex]->aFormat : 0;
- rpName = (aFormats[nIndex]) ? &aFormats[nIndex]->sCharFormatName : 0;
+ rpNumFormat = (aFormats[nIndex]) ? &aFormats[nIndex]->aFormat : nullptr;
+ rpName = (aFormats[nIndex]) ? &aFormats[nIndex]->sCharFormatName : nullptr;
}
void SwNumRulesWithName::SetNumFormat(
@@ -216,7 +216,7 @@ SwNumRulesWithName::_SwNumFormatGlobal::_SwNumFormatGlobal( const SwNumFormat& r
}
}
- aFormat.SetCharFormat( 0 );
+ aFormat.SetCharFormat( nullptr );
}
}
@@ -239,7 +239,7 @@ SwNumRulesWithName::_SwNumFormatGlobal::~_SwNumFormatGlobal()
void SwNumRulesWithName::_SwNumFormatGlobal::ChgNumFormat( SwWrtShell& rSh,
SwNumFormat& rNew ) const
{
- SwCharFormat* pFormat = 0;
+ SwCharFormat* pFormat = nullptr;
if( !sCharFormatName.isEmpty() )
{
// at first, look for the name
@@ -250,7 +250,7 @@ void SwNumRulesWithName::_SwNumFormatGlobal::ChgNumFormat( SwWrtShell& rSh,
if (pFormat->GetName()==sCharFormatName)
// exists, so leave attributes as they are!
break;
- pFormat = 0;
+ pFormat = nullptr;
}
if( !pFormat )
@@ -275,7 +275,7 @@ void SwNumRulesWithName::_SwNumFormatGlobal::ChgNumFormat( SwWrtShell& rSh,
const_cast<SwNumFormat&>(aFormat).SetCharFormat( pFormat );
rNew = aFormat;
if( pFormat )
- const_cast<SwNumFormat&>(aFormat).SetCharFormat( 0 );
+ const_cast<SwNumFormat&>(aFormat).SetCharFormat( nullptr );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx
index 657ee2a3a897..e5d6df837447 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -55,7 +55,7 @@ SwMasterUsrPref::SwMasterUsrPref(bool bWeb) :
aLayoutConfig(bWeb, *this),
aGridConfig(bWeb, *this),
aCursorConfig(*this),
- pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : 0),
+ pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : nullptr),
bApplyCharUnit(false)
{
if (utl::ConfigManager::IsAvoidConfig())
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 02f296e3a3ee..eb2ef3c7b676 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -200,7 +200,7 @@ public:
explicit SwConnectionDisposedListener_Impl(SwDBManager& rMgr);
virtual ~SwConnectionDisposedListener_Impl();
- void Dispose() { m_pDBManager = 0; }
+ void Dispose() { m_pDBManager = nullptr; }
};
@@ -279,7 +279,7 @@ void SwDataSourceRemovedListener::disposing(const lang::EventObject& /*rObject*/
void SwDataSourceRemovedListener::Dispose()
{
- m_pDBManager = 0;
+ m_pDBManager = nullptr;
}
struct SwDBManager_Impl
@@ -290,8 +290,8 @@ struct SwDBManager_Impl
rtl::Reference<SwDataSourceRemovedListener> m_xDataSourceRemovedListener;
explicit SwDBManager_Impl(SwDBManager& rDBManager)
- :pMergeData(0)
- ,pMergeDialog(0)
+ :pMergeData(nullptr)
+ ,pMergeDialog(nullptr)
, m_xDisposeListener(new SwConnectionDisposedListener_Impl(rDBManager))
{}
@@ -781,7 +781,7 @@ SwDBManager::SwDBManager(SwDoc* pDoc)
, bMergeSilent(false)
, bMergeLock(false)
, pImpl(new SwDBManager_Impl(*this))
- , pMergeEvtSrc(NULL)
+ , pMergeEvtSrc(nullptr)
, m_pDoc(pDoc)
{
}
@@ -914,7 +914,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
OUString sBodyMimeType;
rtl_TextEncoding eEncoding = ::osl_getThreadTextEncoding();
- static const char *sMaxDumpDocs = 0;
+ static const char *sMaxDumpDocs = nullptr;
static sal_Int32 nMaxDumpDocs = 0;
if (!sMaxDumpDocs)
{
@@ -973,7 +973,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
const SfxFilter* pStoreToFilter = SwIoSystem::GetFileFilter(
pSourceDocSh->GetMedium()->GetURLObject().GetMainURL(INetURLObject::NO_DECODE));
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
- const OUString* pStoreToFilterOptions = 0;
+ const OUString* pStoreToFilterOptions = nullptr;
// if a save_to filter is set then use it - otherwise use the default
if( bEMail && !rMergeDescriptor.bSendAsAttachment )
@@ -995,12 +995,12 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
bCancel = false;
// in case of creating a single resulting file this has to be created here
- SwWrtShell* pTargetShell = 0;
- SwDoc* pTargetDoc = 0;
+ SwWrtShell* pTargetShell = nullptr;
+ SwDoc* pTargetDoc = nullptr;
SfxObjectShellRef xTargetDocShell;
- SwView* pTargetView = 0;
+ SwView* pTargetView = nullptr;
std::unique_ptr< utl::TempFile > aTempFile;
bool createTempFile = ( rMergeDescriptor.nMergeType == DBMGR_MERGE_EMAIL || rMergeDescriptor.nMergeType == DBMGR_MERGE_FILE );
OUString sModifiedStartingPageDesc;
@@ -1008,7 +1008,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
sal_uInt16 nStartingPageNo = 0;
bool bPageStylesWithHeaderFooter = false;
- vcl::Window *pSourceWindow = 0;
+ vcl::Window *pSourceWindow = nullptr;
VclPtr<CancelableDialog> pProgressDlg;
if (!IsMergeSilent()) {
@@ -1104,9 +1104,9 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
// The SfxObjectShell will be closed explicitly later but it is more safe to use SfxObjectShellLock here
SfxObjectShellLock xWorkDocSh;
// a view frame for the document
- SwView* pWorkView = NULL;
- SwDoc* pWorkDoc = NULL;
- SwDBManager* pOldDBManager = NULL;
+ SwView* pWorkView = nullptr;
+ SwDoc* pWorkDoc = nullptr;
+ SwDBManager* pOldDBManager = nullptr;
do
{
@@ -1241,7 +1241,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
//#i72517# put the styles to the target document
//if the source uses headers or footers each new copy need to copy a new page styles
- SwPageDesc* pTargetPageDesc(NULL);
+ SwPageDesc* pTargetPageDesc(nullptr);
if(bPageStylesWithHeaderFooter)
{
//create a new pagestyle
@@ -1430,7 +1430,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
{
pWorkDoc->SetDBManager( pOldDBManager );
xWorkDocSh->DoClose();
- xWorkDocSh = NULL;
+ xWorkDocSh = nullptr;
}
}
}
@@ -1819,7 +1819,7 @@ uno::Reference< sdbc::XConnection> SwDBManager::GetConnection(const OUString& rD
if ( xComplConnection.is() )
{
rxSource.set(xComplConnection, uno::UNO_QUERY);
- uno::Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
+ uno::Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createWithParent(xContext, nullptr), uno::UNO_QUERY_THROW );
xConnection = xComplConnection->connectWithCompletion( xHandler );
}
}
@@ -1981,7 +1981,7 @@ bool SwDBManager::GetColumnCnt(const OUString& rSourceName, const OUString& rTab
OUString& rResult, double* pNumber)
{
bool bRet = false;
- SwDSParam* pFound = 0;
+ SwDSParam* pFound = nullptr;
//check if it's the merge data source
if(pImpl->pMergeData &&
rSourceName == pImpl->pMergeData->sDataSource &&
@@ -2132,7 +2132,7 @@ bool SwDBManager::FillCalcWithMergeData( SvNumberFormatter *pDocFormatter,
bool SwDBManager::ToNextRecord(
const OUString& rDataSource, const OUString& rCommand, sal_Int32 /*nCommandType*/)
{
- SwDSParam* pFound = 0;
+ SwDSParam* pFound = nullptr;
if(pImpl->pMergeData &&
rDataSource == pImpl->pMergeData->sDataSource &&
rCommand == pImpl->pMergeData->sCommand)
@@ -2285,9 +2285,9 @@ bool SwDBManager::OpenDataSource(const OUString& rDataSource, const OUString& rT
}
catch (const uno::Exception&)
{
- pFound->xResultSet = 0;
- pFound->xStatement = 0;
- pFound->xConnection = 0;
+ pFound->xResultSet = nullptr;
+ pFound->xStatement = nullptr;
+ pFound->xConnection = nullptr;
}
}
return pFound->xResultSet.is();
@@ -2387,7 +2387,7 @@ SwDSParam* SwDBManager::FindDSData(const SwDBData& rData, bool bCreate)
return pImpl->pMergeData;
}
- SwDSParam* pFound = 0;
+ SwDSParam* pFound = nullptr;
for (size_t nPos = m_DataSourceParams.size(); nPos; nPos--)
{
SwDSParam* pParam = m_DataSourceParams[nPos - 1].get();
@@ -2432,7 +2432,7 @@ SwDSParam* SwDBManager::FindDSConnection(const OUString& rDataSource, bool bCre
{
return pImpl->pMergeData;
}
- SwDSParam* pFound = 0;
+ SwDSParam* pFound = nullptr;
for (auto & pParam : m_DataSourceParams)
{
if(rDataSource == pParam->sDataSource)
@@ -2524,7 +2524,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(SwDocShell* pDocShell)
if( xSettingsDlg->execute() )
aSettings.set( uno::Reference < beans::XPropertySet >( xSettingsDlg, uno::UNO_QUERY_THROW ) );
}
- sFind = LoadAndRegisterDataSource( type, aURLAny, DBCONN_FLAT == type ? &aSettings : 0, aURI, 0, 0, pDocShell );
+ sFind = LoadAndRegisterDataSource( type, aURLAny, DBCONN_FLAT == type ? &aSettings : nullptr, aURI, nullptr, nullptr, pDocShell );
}
return sFind;
}
@@ -2805,7 +2805,7 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
}
//always create a connection for the dialog and dispose it after the dialog has been closed
- SwDSParam* pFound = 0;
+ SwDSParam* pFound = nullptr;
if(!xConnection.is())
{
xConnection = SwDBManager::RegisterConnection(sDataSource);
@@ -2819,7 +2819,7 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
sDataTableOrQuery,
nCmdType,
xConnection,
- bWithDataSourceBrowser ? 0 : &aSelection);
+ bWithDataSourceBrowser ? nullptr : &aSelection);
OSL_ENSURE(pImpl->pMergeDialog, "Dialog creation failed!");
if(pImpl->pMergeDialog->Execute() == RET_OK)
{
@@ -2909,7 +2909,7 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), rSh.GetView().GetViewFrame()->GetObjectShell()));
// reset the cursor inside
- xResSet = NULL;
+ xResSet = nullptr;
aDescriptor[svx::daCursor] <<= xResSet;
}
if(pFound)
@@ -3046,7 +3046,7 @@ uno::Reference<sdbc::XResultSet> SwDBManager::createCursor(const OUString& _sDat
if ( xRowSet.is() )
{
- uno::Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createWithParent(comphelper::getComponentContext(xMgr), 0), uno::UNO_QUERY_THROW );
+ uno::Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createWithParent(comphelper::getComponentContext(xMgr), nullptr), uno::UNO_QUERY_THROW );
xRowSet->executeWithCompletion(xHandler);
}
xResultSet.set(xRowSet, uno::UNO_QUERY);
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 9cb14f9a0e82..26106097cfdf 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -119,7 +119,7 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (Ru
void SwDBTreeList_Impl::disposing( const EventObject& ) throw (RuntimeException, std::exception)
{
- m_xDatabaseContext = 0;
+ m_xDatabaseContext = nullptr;
}
void SwDBTreeList_Impl::elementReplaced( const ContainerEvent& rEvent ) throw (RuntimeException, std::exception)
@@ -153,7 +153,7 @@ SwDBTreeList::SwDBTreeList(vcl::Window *pParent, WinBits nStyle)
, aImageList(SW_RES(ILIST_DB_DLG))
, bInitialized(false)
, bShowColumns(false)
- , pImpl(new SwDBTreeList_Impl(NULL))
+ , pImpl(new SwDBTreeList_Impl(nullptr))
{
if (IsVisible())
InitTreeList();
@@ -181,7 +181,7 @@ SwDBTreeList::~SwDBTreeList()
void SwDBTreeList::dispose()
{
delete pImpl;
- pImpl = NULL;
+ pImpl = nullptr;
SvTreeListBox::dispose();
}
@@ -208,7 +208,7 @@ void SwDBTreeList::InitTreeList()
for(long i = 0; i < nCount; i++)
{
OUString sDBName(pDBNames[i]);
- InsertEntry(sDBName, aImg, aImg, NULL, true);
+ InsertEntry(sDBName, aImg, aImg, nullptr, true);
}
OUString sDBName(sDefDBName.getToken(0, DB_DELIM));
OUString sTableName(sDefDBName.getToken(1, DB_DELIM));
@@ -221,7 +221,7 @@ void SwDBTreeList::InitTreeList()
void SwDBTreeList::AddDataSource(const OUString& rSource)
{
Image aImg = aImageList.GetImage(IMG_DB);
- SvTreeListEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, true);
+ SvTreeListEntry* pEntry = InsertEntry(rSource, aImg, aImg, nullptr, true);
SvTreeListBox::Select(pEntry);
}
@@ -244,7 +244,7 @@ void SwDBTreeList::ShowColumns(bool bShowCol)
Collapse(pEntry); // zuklappen
SvTreeListEntry* pChild;
- while ((pChild = FirstChild(pEntry)) != 0L)
+ while ((pChild = FirstChild(pEntry)) != nullptr)
GetModel()->Remove(pChild);
pEntry = Next(pEntry);
@@ -273,7 +273,7 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent)
if(!pImpl->GetContext()->hasByName(sSourceName))
return;
Reference<XConnection> xConnection = pImpl->GetConnection(sSourceName);
- bool bTable = pParent->GetUserData() == 0;
+ bool bTable = pParent->GetUserData() == nullptr;
Reference<XColumnsSupplier> xColsSupplier;
if(bTable)
{
@@ -409,7 +409,7 @@ OUString SwDBTreeList::GetDBName(OUString& rTableName, OUString& rColumnName, sa
sDBName = GetEntryText(GetParent(pEntry));
if(pbIsTable)
{
- *pbIsTable = pEntry->GetUserData() == 0;
+ *pbIsTable = pEntry->GetUserData() == nullptr;
}
rTableName = GetEntryText(pEntry);
}
@@ -424,13 +424,13 @@ void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, c
sal_uInt16 nParent = 0;
sal_uInt16 nChild = 0;
- while ((pParent = GetEntry(nParent++)) != NULL)
+ while ((pParent = GetEntry(nParent++)) != nullptr)
{
if (rDBName == GetEntryText(pParent))
{
if (!pParent->HasChildren())
RequestingChildren(pParent);
- while ((pChild = GetEntry(pParent, nChild++)) != NULL)
+ while ((pChild = GetEntry(pParent, nChild++)) != nullptr)
{
if (rTableName == GetEntryText(pChild))
{
@@ -443,7 +443,7 @@ void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, c
if (!pParent->HasChildren())
RequestingChildren(pParent);
- while ((pChild = GetEntry(pParent, nChild++)) != NULL)
+ while ((pChild = GetEntry(pParent, nChild++)) != nullptr)
if (rColumnName == GetEntryText(pChild))
break;
}
diff --git a/sw/source/uibase/dbui/maildispatcher.cxx b/sw/source/uibase/dbui/maildispatcher.cxx
index 6fd88f64923b..46c7f3657d4e 100644
--- a/sw/source/uibase/dbui/maildispatcher.cxx
+++ b/sw/source/uibase/dbui/maildispatcher.cxx
@@ -269,7 +269,7 @@ void MailDispatcher::onTerminated()
{
//keep the reference until the end of onTerminated() because of the call order in the
//_threadFunc() from osl/thread.hxx
- m_xSelfReference = 0;
+ m_xSelfReference = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index 1b49433d0f4d..9fd1325cd093 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -466,7 +466,7 @@ OUString SwAddressPreview::FillData(
//exchange the placeholder (like <Firstname>) with the database content
//unassigned columns are expanded to <not assigned>
Reference< XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), UNO_QUERY);
- Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
+ Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
Sequence< OUString> aAssignment = pAssignments ?
*pAssignments :
rConfigItem.GetColumnAssignment(
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 027821c4acec..5e4396502894 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -723,7 +723,7 @@ void SwMailMergeConfigItem_Impl::SetCurrentGreeting(
namespace
{
- static SwMailMergeConfigItem_Impl* pOptions = NULL;
+ static SwMailMergeConfigItem_Impl* pOptions = nullptr;
static sal_Int32 nRefCount = 0;
class theMailMergeConfigMutex : public rtl::Static<osl::Mutex, theMailMergeConfigMutex> {};
@@ -736,8 +736,8 @@ SwMailMergeConfigItem::SwMailMergeConfigItem() :
m_nGreetingMoves(0),
m_nStartPrint(0),
m_nEndPrint(0),
- m_pSourceView(0),
- m_pTargetView(0)
+ m_pSourceView(nullptr),
+ m_pTargetView(nullptr)
{
// Global access, must be guarded (multithreading)
::osl::MutexGuard aGuard( theMailMergeConfigMutex::get() );
@@ -839,7 +839,7 @@ void SwMailMergeConfigItem::SetCurrentConnection(
m_pImpl->m_xConnection = rConnection ;
m_pImpl->m_xColumnsSupplier = xColumnsSupplier;
m_pImpl->m_aDBData = rDBData;
- m_pImpl->m_xResultSet = 0;
+ m_pImpl->m_xResultSet = nullptr;
m_pImpl->m_nResultSetCursorPos = 0;
m_pImpl->SetModified();
}
@@ -877,8 +877,8 @@ void SwMailMergeConfigItem::SetCurrentDBData( const SwDBData& rDBData)
{
m_pImpl->m_aDBData = rDBData;
m_pImpl->m_xConnection.clear();
- m_pImpl->m_xSource = 0;
- m_pImpl->m_xColumnsSupplier = 0;
+ m_pImpl->m_xSource = nullptr;
+ m_pImpl->m_xColumnsSupplier = nullptr;
m_pImpl->SetModified();
}
}
@@ -1612,7 +1612,7 @@ static SwView* lcl_ExistsView(SwView* pView)
pViewShell = SfxViewShell::GetNext( *pViewShell, false, checkSfxViewShell<SwView> );
}
- return 0;
+ return nullptr;
}
SwView* SwMailMergeConfigItem::GetTargetView()
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 230202341a86..9093b6a5cc24 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -104,17 +104,17 @@ struct SpellState
m_bOtherSpelled(false),
m_bStartedInOther(false),
m_bStartedInSelection(false),
- pOtherCursor(0),
+ pOtherCursor(nullptr),
m_bDrawingsSpelled(false),
- m_pStartDrawing(0),
+ m_pStartDrawing(nullptr),
m_bRestartDrawing(false),
m_eSelMode(SHELL_MODE_OBJECT), // initially invalid
- m_pPointNode(0),
- m_pMarkNode(0),
+ m_pPointNode(nullptr),
+ m_pMarkNode(nullptr),
m_nPointPos(0),
m_nMarkPos(0),
- m_pOutliner(0),
+ m_pOutliner(nullptr),
m_bTextObjectsCollected(false)
{}
@@ -124,14 +124,14 @@ struct SpellState
void Reset()
{ m_bInitialCall = true;
m_bBodySpelled = m_bOtherSpelled = m_bDrawingsSpelled = false;
- m_xStartRange = 0;
- m_pStartDrawing = 0;
+ m_xStartRange = nullptr;
+ m_pStartDrawing = nullptr;
m_bRestartDrawing = false;
m_bTextObjectsCollected = false;
m_aTextObjects.clear();
m_bStartedInOther = false;
delete pOtherCursor;
- pOtherCursor = 0;
+ pOtherCursor = nullptr;
}
};
@@ -226,7 +226,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
m_pSpellState->m_bStartedInSelection = true;
}
// determine if the selection is outside of the body text
- bOtherText = !(pWrtShell->GetFrmType(0,true) & FrmTypeFlags::BODY);
+ bOtherText = !(pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY);
m_pSpellState->m_SpellStartPosition = bOtherText ? SPELL_START_OTHER : SPELL_START_BODY;
if(bOtherText)
{
@@ -323,14 +323,14 @@ The code below would only be part of the solution.
if (!m_pSpellState->m_bStartedInSelection)
{
// find out which text has been spelled body or other
- bOtherText = !(pWrtShell->GetFrmType(0,true) & FrmTypeFlags::BODY);
+ bOtherText = !(pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY);
if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor)
{
m_pSpellState->m_bStartedInOther = false;
pWrtShell->SetSelection(*m_pSpellState->pOtherCursor);
pWrtShell->SpellEnd();
delete m_pSpellState->pOtherCursor;
- m_pSpellState->pOtherCursor = 0;
+ m_pSpellState->pOtherCursor = nullptr;
pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART );
(void)pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn);
}
@@ -404,7 +404,7 @@ The code below would only be part of the solution.
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
pWrtShell->SpellEnd();
}
- m_pSpellState->m_xStartRange = 0;
+ m_pSpellState->m_xStartRange = nullptr;
LockFocusNotification( false );
// take care that the now valid selection is stored
LoseFocus();
@@ -507,7 +507,7 @@ void SwSpellDialogChildWindow::SetGrammarChecking(bool bOn)
else if( bDrawText )
{
SdrView* pSdrView = pWrtShell->GetDrawView();
- SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : 0;
+ SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : nullptr;
OSL_ENSURE(pOutliner, "No Outliner in SwSpellDialogChildWindow::SetGrammarChecking");
if(pOutliner)
{
@@ -552,7 +552,7 @@ void SwSpellDialogChildWindow::GetFocus()
case SHELL_MODE_DRAWTEXT:
{
SdrView* pSdrView = pWrtShell->GetDrawView();
- SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : 0;
+ SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : nullptr;
if(!pOutliner || m_pSpellState->m_pOutliner != pOutliner)
bInvalidate = true;
else
@@ -586,9 +586,9 @@ void SwSpellDialogChildWindow::LoseFocus()
if(pWrtShell)
{
m_pSpellState->m_eSelMode = pWrtShell->GetView().GetShellMode();
- m_pSpellState->m_pPointNode = m_pSpellState->m_pMarkNode = 0;
+ m_pSpellState->m_pPointNode = m_pSpellState->m_pMarkNode = nullptr;
m_pSpellState->m_nPointPos = m_pSpellState->m_nMarkPos = 0;
- m_pSpellState->m_pOutliner = 0;
+ m_pSpellState->m_pOutliner = nullptr;
switch(m_pSpellState->m_eSelMode)
{
@@ -630,7 +630,7 @@ void SwSpellDialogChildWindow::InvalidateSpellDialog()
{
SwWrtShell* pWrtShell = GetWrtShell_Impl();
if(!m_pSpellState->m_bInitialCall && pWrtShell)
- pWrtShell->SpellEnd(0, false);
+ pWrtShell->SpellEnd(nullptr, false);
m_pSpellState->Reset();
svx::SpellDialogChildWindow::InvalidateSpellDialog();
}
@@ -638,19 +638,19 @@ void SwSpellDialogChildWindow::InvalidateSpellDialog()
SwWrtShell* SwSpellDialogChildWindow::GetWrtShell_Impl()
{
SfxDispatcher* pDispatch = GetBindings().GetDispatcher();
- SwView* pView = 0;
+ SwView* pView = nullptr;
if(pDispatch)
{
sal_uInt16 nShellIdx = 0;
SfxShell* pShell;
- while(0 != (pShell = pDispatch->GetShell(nShellIdx++)))
+ while(nullptr != (pShell = pDispatch->GetShell(nShellIdx++)))
if(dynamic_cast< const SwView *>( pShell ) != nullptr)
{
pView = static_cast<SwView* >(pShell);
break;
}
}
- return pView ? pView->GetWrtShellPtr(): 0;
+ return pView ? pView->GetWrtShellPtr(): nullptr;
}
// set the cursor into the body text - necessary if any object is selected
@@ -732,7 +732,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
SwDoc* pDoc = rView.GetDocShell()->GetDoc();
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
// start at the current draw object - if there is any selected
- SdrTextObj* pCurrentTextObj = 0;
+ SdrTextObj* pCurrentTextObj = nullptr;
if ( rMarkList.GetMarkCount() == 1 )
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
@@ -812,7 +812,7 @@ bool SwSpellDialogChildWindow::SpellDrawText_Impl(SwWrtShell& rSh, svx::SpellPor
{
bool bRet = false;
SdrView* pSdrView = rSh.GetDrawView();
- SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : 0;
+ SdrOutliner* pOutliner = pSdrView ? pSdrView->GetTextEditOutliner() : nullptr;
OSL_ENSURE(pOutliner, "No Outliner in SwSpellDialogChildWindow::SpellDrawText_Impl");
if(pOutliner)
{
diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx
index e2d984b7678a..4d632cf70564 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -91,7 +91,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
}
else
{
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
OUString aTmpStr;
if ( SfxItemState::SET ==
pSet->GetItemState(FN_PARAM_REGION_NAME, true, &pItem) )
@@ -169,7 +169,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
aSection.SetType( FILE_LINK_SECTION );
aSection.SetLinkFileName(sLinkFileName);
}
- rSh.InsertSection(aSection, aSet.Count() ? &aSet : 0);
+ rSh.InsertSection(aSection, aSet.Count() ? &aSet : nullptr);
rReq.Done();
}
}
@@ -206,7 +206,7 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pArgs)
pArgs->GetItemState(nSlot, false, &pItem);
SwWrtShell& rWrtShell = GetShell();
diff --git a/sw/source/uibase/dialog/swabstdlg.cxx b/sw/source/uibase/dialog/swabstdlg.cxx
index 449e584f499e..0d1ee6633c86 100644
--- a/sw/source/uibase/dialog/swabstdlg.cxx
+++ b/sw/source/uibase/dialog/swabstdlg.cxx
@@ -37,7 +37,7 @@ extern "C" SwAbstractDialogFactory* SwCreateDialogFactory();
SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
{
- SwFuncPtrCreateDialogFactory fp = 0;
+ SwFuncPtrCreateDialogFactory fp = nullptr;
#if HAVE_FEATURE_DESKTOP
#ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary;
@@ -52,7 +52,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
#endif
if ( fp )
return fp();
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx
index 4ac121b940e2..da8e5ce86944 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -315,7 +315,7 @@ bool SwGlossaryHdl::NewGlossary(const OUString& rName, const OUString& rShortNam
return false;
OUString sOnlyText;
- OUString* pOnlyText = 0;
+ OUString* pOnlyText = nullptr;
if( bNoAttr )
{
if( !pWrtShell->GetSelectedText( sOnlyText, GETSELTXT_PARABRK_TO_ONLYCR ))
@@ -443,7 +443,7 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName,
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
- std::unique_ptr<AbstractSwSelGlossaryDlg> pDlg(pFact->CreateSwSelGlossaryDlg(0, aShortName));
+ std::unique_ptr<AbstractSwSelGlossaryDlg> pDlg(pFact->CreateSwSelGlossaryDlg(nullptr, aShortName));
assert(pDlg && "Dialog creation failed!");
for(size_t i = 0; i < aFoundArr.size(); ++i)
{
@@ -625,7 +625,7 @@ SwGlossaryHdl::SwGlossaryHdl(SfxViewFrame* pVwFrm, SwWrtShell *pSh)
aCurGrp( SwGlossaries::GetDefName() ),
pViewFrame( pVwFrm ),
pWrtShell( pSh ),
- pCurGrp( 0 )
+ pCurGrp( nullptr )
{
}
@@ -662,7 +662,7 @@ bool SwGlossaryHdl::Rename(const OUString& rOldShort, const OUString& rNewShortN
bool SwGlossaryHdl::IsReadOnly( const OUString* pGrpNm ) const
{
- SwTextBlocks *pGlossary = 0;
+ SwTextBlocks *pGlossary = nullptr;
if (pGrpNm)
pGlossary = rStatGlossaries.GetGroupDoc( *pGrpNm );
@@ -713,16 +713,16 @@ bool SwGlossaryHdl::ImportGlossaries( const OUString& rName )
bool bRet = false;
if( !rName.isEmpty() )
{
- const SfxFilter* pFilter = 0;
- std::unique_ptr<SfxMedium> pMed(new SfxMedium( rName, StreamMode::READ, 0, 0 ));
+ const SfxFilter* pFilter = nullptr;
+ std::unique_ptr<SfxMedium> pMed(new SfxMedium( rName, StreamMode::READ, nullptr, nullptr ));
SfxFilterMatcher aMatcher( OUString("swriter") );
pMed->UseInteractionHandler( true );
if (!aMatcher.GuessFilter(*pMed, &pFilter, SfxFilterFlags::NONE))
{
- SwTextBlocks *pGlossary = NULL;
+ SwTextBlocks *pGlossary = nullptr;
pMed->SetFilter( pFilter );
Reader* pR = SwReaderWriter::GetReader( pFilter->GetUserData() );
- if( pR && 0 != ( pGlossary = pCurGrp ? pCurGrp
+ if( pR && nullptr != ( pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp)) )
{
SwReader aReader( *pMed, rName );
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 2f7d5c5d6686..bff00a0c9519 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -187,7 +187,7 @@ class SwTrnsfrActionAndUndo
SwUndoId eUndoId;
public:
SwTrnsfrActionAndUndo( SwWrtShell *pS, SwUndoId nId,
- const SwRewriter * pRewriter = 0,
+ const SwRewriter * pRewriter = nullptr,
bool bDelSel = false)
: pSh( pS ), eUndoId( nId )
{
@@ -205,14 +205,14 @@ public:
SwTransferable::SwTransferable( SwWrtShell& rSh )
: m_pWrtShell( &rSh ),
- m_pCreatorView( 0 ),
- m_pClpDocFac( 0 ),
- m_pClpGraphic( 0 ),
- m_pClpBitmap( 0 ),
- m_pOrigGraphic( 0 ),
- m_pBookmark( 0 ),
- m_pImageMap( 0 ),
- m_pTargetURL( 0 ),
+ m_pCreatorView( nullptr ),
+ m_pClpDocFac( nullptr ),
+ m_pClpGraphic( nullptr ),
+ m_pClpBitmap( nullptr ),
+ m_pOrigGraphic( nullptr ),
+ m_pBookmark( nullptr ),
+ m_pImageMap( nullptr ),
+ m_pTargetURL( nullptr ),
m_eBufferType( TRNSFR_NONE )
{
rSh.GetView().AddTransferable(*this);
@@ -244,7 +244,7 @@ SwTransferable::~SwTransferable()
m_xDdeLink.Clear();
}
- m_pWrtShell = 0;
+ m_pWrtShell = nullptr;
// release reference to the document so that aDocShellRef will delete
// it (if aDocShellRef is set). Otherwise, the OLE nodes keep references
@@ -265,9 +265,9 @@ SwTransferable::~SwTransferable()
if(pMod)
{
if ( pMod->m_pDragDrop == this )
- pMod->m_pDragDrop = 0;
+ pMod->m_pDragDrop = nullptr;
else if ( pMod->m_pXSelection == this )
- pMod->m_pXSelection = 0;
+ pMod->m_pXSelection = nullptr;
}
delete m_pClpGraphic;
@@ -296,9 +296,9 @@ void SwTransferable::ObjectReleased()
{
SwModule *pMod = SW_MOD();
if( this == pMod->m_pDragDrop )
- pMod->m_pDragDrop = 0;
+ pMod->m_pDragDrop = nullptr;
else if( this == pMod->m_pXSelection )
- pMod->m_pXSelection = 0;
+ pMod->m_pXSelection = nullptr;
}
void SwTransferable::AddSupportedFormats()
@@ -350,7 +350,7 @@ const Graphic* SwTransferable::FindOLEReplacementGraphic() const
}
}
- return NULL;
+ return nullptr;
}
void SwTransferable::RemoveDDELinkFormat( const vcl::Window& rWin )
@@ -409,7 +409,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
// 1) we have data for this format
// 2) we have either a clipboard document (pClpDocFac), or
// we have a SwWrtShell (so we can generate a new clipboard document)
- if( !HasFormat( nFormat ) || ( m_pClpDocFac == NULL && m_pWrtShell == NULL ) )
+ if( !HasFormat( nFormat ) || ( m_pClpDocFac == nullptr && m_pWrtShell == nullptr ) )
return false;
if( !m_pClpDocFac )
@@ -566,7 +566,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
case SotClipboardFormatId::BITMAP:
case SotClipboardFormatId::PNG:
// Neither pClpBitmap nor pClpGraphic are necessarily set
- if( (m_eBufferType & TRNSFR_GRAPHIC) && (m_pClpBitmap != 0 || m_pClpGraphic != 0))
+ if( (m_eBufferType & TRNSFR_GRAPHIC) && (m_pClpBitmap != nullptr || m_pClpGraphic != nullptr))
bOK = SetBitmapEx( (m_pClpBitmap ? m_pClpBitmap : m_pClpGraphic)->GetBitmapEx(), rFlavor );
break;
@@ -819,7 +819,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
AddFormat( SotClipboardFormatId::BITMAP );
}
m_eBufferType = TRNSFR_GRAPHIC;
- m_pWrtShell->GetGrfNms( &sGrfNm, 0 );
+ m_pWrtShell->GetGrfNms( &sGrfNm, nullptr );
}
else if ( nSelection == nsSelectionType::SEL_OLE )
{
@@ -969,7 +969,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
// at Cut, DDE-Link doesn't make sense!!
SwDocShell* pDShell;
if( !bIsCut && bDDELink &&
- 0 != ( pDShell = m_pWrtShell->GetDoc()->GetDocShell()) &&
+ nullptr != ( pDShell = m_pWrtShell->GetDoc()->GetDocShell()) &&
SfxObjectCreateMode::STANDARD == pDShell->GetCreateMode() )
{
AddFormat( SotClipboardFormatId::LINK );
@@ -1099,7 +1099,7 @@ bool SwTransferable::IsPaste( const SwWrtShell& rSh,
// If _only_ the internal format can be pasted, this check will
// yield 'true', while the one below would give a (wrong) result 'false'.
- bool bIsPaste = ( GetSwTransferable( rData ) != NULL );
+ bool bIsPaste = ( GetSwTransferable( rData ) != nullptr );
// if it's not our own data, we need to have a closer look:
if( ! bIsPaste )
@@ -1241,14 +1241,14 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
if( bDelSel )
// #i34830#
- pAction.reset(new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD, NULL,
+ pAction.reset(new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD, nullptr,
true ));
}
- SwTransferable *pTrans=0, *pTunneledTrans=GetSwTransferable( rData );
+ SwTransferable *pTrans=nullptr, *pTunneledTrans=GetSwTransferable( rData );
// check for private drop
- bool bPrivateDrop(pPt && (bPasteSelection ? 0 != (pTrans = pMod->m_pXSelection) : 0 != (pTrans = pMod->m_pDragDrop)));
+ bool bPrivateDrop(pPt && (bPasteSelection ? nullptr != (pTrans = pMod->m_pXSelection) : nullptr != (pTrans = pMod->m_pDragDrop)));
bool bNeedToSelectBeforePaste(false);
if(bPrivateDrop && DND_ACTION_LINK == nDropAction)
@@ -1291,7 +1291,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
}
// in Drag&Drop MessageBoxes must not be showed
- bool bMsg = 0 == pPt;
+ bool bMsg = nullptr == pPt;
sal_uInt8 nActionFlags = static_cast< sal_uInt8 >(( nAction >> 8 ) & 0xFF);
sal_uInt16 nClearedAction = ( nAction & EXCHG_ACTION_MASK );
@@ -1379,7 +1379,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
: EXCHG_IN_ACTION_LINK == nClearedAction
? SwPasteSdr::SetAttr
: SwPasteSdr::Insert),
- pPt, nActionFlags, bMsg, 0 );
+ pPt, nActionFlags, bMsg, nullptr );
break;
case SotClipboardFormatId::FILE_LIST:
@@ -1564,7 +1564,7 @@ SotExchangeDest SwTransferable::GetSotDestination( const SwWrtShell& rSh,
ObjCntType eOType;
if( pPt )
{
- SdrObject *pObj = 0;
+ SdrObject *pObj = nullptr;
eOType = rSh.GetObjCntType( *pPt, pObj );
}
else
@@ -1577,15 +1577,15 @@ SotExchangeDest SwTransferable::GetSotDestination( const SwWrtShell& rSh,
bool bIMap, bLink;
if( pPt )
{
- bIMap = 0 != rSh.GetFormatFromObj( *pPt )->GetURL().GetMap();
+ bIMap = nullptr != rSh.GetFormatFromObj( *pPt )->GetURL().GetMap();
OUString aDummy;
rSh.GetGrfAtPos( *pPt, aDummy, bLink );
}
else
{
- bIMap = 0 != rSh.GetFlyFrameFormat()->GetURL().GetMap();
+ bIMap = nullptr != rSh.GetFlyFrameFormat()->GetURL().GetMap();
OUString aDummy;
- rSh.GetGrfNms( &aDummy, 0 );
+ rSh.GetGrfNms( &aDummy, nullptr );
bLink = !aDummy.isEmpty();
}
@@ -1635,8 +1635,8 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
MSE40HTMLClipFormatObj aMSE40ClpObj;
tools::SvRef<SotStorageStream> xStrm;
- SvStream* pStream = 0;
- SwRead pRead = 0;
+ SvStream* pStream = nullptr;
+ SwRead pRead = nullptr;
OUString sData;
switch( nFormat )
{
@@ -1729,7 +1729,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
TransferableObjectDescriptor aObjDesc;
uno::Reference < io::XInputStream > xStrm;
uno::Reference < embed::XStorage > xStore;
- Reader* pRead = 0;
+ Reader* pRead = nullptr;
// Get the preferred format
SotClipboardFormatId nId;
@@ -1769,7 +1769,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
{
uno::Reference < lang::XComponent > xComp( xStore, uno::UNO_QUERY );
xComp->dispose();
- xStore = 0;
+ xStore = nullptr;
}
catch (const uno::Exception&)
{
@@ -1936,7 +1936,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
if( bRet && ( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ))
- SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, 0, false );
+ SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, nullptr, false );
// let the object be unloaded if possible
SwOLEObj::UnloadObject( xObj, rSh.GetDoc(), embed::Aspects::MSOLE_CONTENT );
@@ -2107,7 +2107,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
return bRet;
}
- SwFieldType* pTyp = 0;
+ SwFieldType* pTyp = nullptr;
size_t i = 1;
size_t j;
OUString aName;
@@ -2173,7 +2173,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
{
if( bMsg )
ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_TABLE_TOO_LARGE), VCL_MESSAGE_INFO)->Execute();
- pDDETyp = 0;
+ pDDETyp = nullptr;
break;
}
@@ -2182,7 +2182,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
{
if( bMsg )
ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_NO_TABLE), VCL_MESSAGE_INFO)->Execute();
- pDDETyp = 0;
+ pDDETyp = nullptr;
break;
}
@@ -2201,7 +2201,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
aSect.SetProtectFlag(true);
rWrtShell.InsertSection( aSect );
- pDDETyp = 0; // remove FieldTypes again
+ pDDETyp = nullptr; // remove FieldTypes again
}
else
{
@@ -2213,7 +2213,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
} while( false );
}
else
- pDDETyp = 0; // remove FieldTypes again
+ pDDETyp = nullptr; // remove FieldTypes again
if( !pDDETyp && !bDoublePaste )
{
@@ -2251,7 +2251,7 @@ bool SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
if( bRet && ( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ))
- SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, 0, false );
+ SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, nullptr, false );
}
return bRet;
}
@@ -2442,7 +2442,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
if( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) )
- SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, 0, false );
+ SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, nullptr, false );
}
else if( bCheckForImageMap )
{
@@ -2451,7 +2451,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
SfxMedium aMed( INetURLObject(aBkmk.GetURL()).GetFull(),
STREAM_STD_READ );
SvStream* pStream = aMed.GetInStream();
- if( pStream != NULL &&
+ if( pStream != nullptr &&
!pStream->GetError() &&
// mba: no BaseURL for clipboard functionality
aMap.Read( *pStream, IMAP_FORMAT_DETECT, OUString() ) == IMAP_ERR_OK &&
@@ -2547,7 +2547,7 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData,
{
bool bRet = SwTransferable::_PasteGrf( rData, rSh, nFormat, nAction,
pPt, nActionFlags, 0, false);
- if (graphicInserted != 0) {
+ if (graphicInserted != nullptr) {
*graphicInserted = bRet;
}
if( !bRet )
@@ -2580,7 +2580,7 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData,
//Own FileFormat? --> insert, not for StarWriter/Web
OUString sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), sFile, Link<OUString *, bool>(), false );
const SfxFilter* pFlt = SwPasteSdr::SetAttr == nAction
- ? 0 : SwIoSystem::GetFileFilter(sFileURL);
+ ? nullptr : SwIoSystem::GetFileFilter(sFileURL);
if( pFlt && dynamic_cast< const SwWebDocShell *>( rSh.GetView().GetDocShell() ) == nullptr )
{
// and then pull up the insert-region-dialog by PostUser event
@@ -2662,7 +2662,7 @@ bool SwTransferable::_PasteDBData( TransferableDataHelper& rData,
if(pFmView) {
const OXFormsDescriptor &rDesc = OXFormsTransferable::extractDescriptor(rData);
SdrObject* pObj = pFmView->CreateXFormsControl(rDesc);
- if(0 != pObj)
+ if(nullptr != pObj)
{
rSh.SwFEShell::InsertDrawObj( *pObj, *pDragPt );
}
@@ -2718,7 +2718,7 @@ bool SwTransferable::_PasteDBData( TransferableDataHelper& rData,
if (pFmView && bHaveColumnDescriptor)
{
SdrObject* pObj = pFmView->CreateFieldControl( OColumnTransferable::extractColumnDescriptor(rData) );
- if ( 0 != pObj)
+ if ( nullptr != pObj)
rSh.SwFEShell::InsertDrawObj( *pObj, *pDragPt );
}
}
@@ -2750,7 +2750,7 @@ bool SwTransferable::_PasteFileList( TransferableDataHelper& rData,
TransferableDataHelper aData( pHlp );
if( SwTransferable::_PasteFileName( aData, rSh, SotClipboardFormatId::SIMPLE_FILE, nAct,
- pPt, 0, bMsg, 0 ))
+ pPt, 0, bMsg, nullptr ))
{
if( bLink )
{
@@ -3036,7 +3036,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
AddFormat( SotClipboardFormatId::BITMAP );
}
m_eBufferType = TRNSFR_GRAPHIC;
- m_pWrtShell->GetGrfNms( &sGrfNm, 0 );
+ m_pWrtShell->GetGrfNms( &sGrfNm, nullptr );
}
else if( nsSelectionType::SEL_OLE == nSelection )
{
@@ -3260,7 +3260,7 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell )
}
if ( nSelection & nsSelectionType::SEL_DRW) //unselect hovering graphics
{
- rShell.ResetSelect(NULL,false);
+ rShell.ResetSelect(nullptr,false);
}
bool bInWrd = false, bEndWrd = false, bSttWrd = false,
@@ -3605,7 +3605,7 @@ sal_Int64 SwTransferable::getSomething( const Sequence< sal_Int8 >& rId ) throw(
SwTransferable* SwTransferable::GetSwTransferable( const TransferableDataHelper& rData )
{
- SwTransferable* pSwTransferable = NULL;
+ SwTransferable* pSwTransferable = nullptr;
uno::Reference<XUnoTunnel> xTunnel( rData.GetTransferable(), UNO_QUERY );
if ( xTunnel.is() )
@@ -3621,7 +3621,7 @@ SwTransferable* SwTransferable::GetSwTransferable( const TransferableDataHelper&
SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
: rTrnsfr(rTrans)
- , pDocShell(0)
+ , pDocShell(nullptr)
, nOldTimeOut(0)
, bDelBookmrk(false)
, bInDisconnect(false)
@@ -3658,7 +3658,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
}
if( !sName.isEmpty() &&
- 0 != ( pDocShell = rSh.GetDoc()->GetDocShell() ) )
+ nullptr != ( pDocShell = rSh.GetDoc()->GetDocShell() ) )
{
// then we create our "server" and connect to it
refObj = pDocShell->DdeCreateLinkSource( sName );
@@ -3818,7 +3818,7 @@ bool SwTrnsfrDdeLink::FindDocShell()
pTmpSh = SfxObjectShell::GetNext( *pTmpSh, checkSfxObjectShell<SwDocShell> );
}
- pDocShell = 0;
+ pDocShell = nullptr;
return false;
}
diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.cxx b/sw/source/uibase/docvw/AnchorOverlayObject.cxx
index 1e0157434940..67f4e3bcda9e 100644
--- a/sw/source/uibase/docvw/AnchorOverlayObject.cxx
+++ b/sw/source/uibase/docvw/AnchorOverlayObject.cxx
@@ -235,7 +235,7 @@ ImplPrimitive2DIDBlock(AnchorPrimitive, PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE)
const Point& aLineEnd,
const Color& aColorAnchor )
{
- AnchorOverlayObject* pAnchorOverlayObject( 0 );
+ AnchorOverlayObject* pAnchorOverlayObject( nullptr );
if ( rDocView.GetDrawView() )
{
SdrPaintWindow* pPaintWindow = rDocView.GetDrawView()->GetPaintWindow(0);
diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx
index ea9d50da3d1b..8c03679510b7 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -64,7 +64,7 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin,
: SwSidebarWin( rEditWin, nBits, aMgr, aBits, rSidebarItem )
, mpFormatField(aField)
, mpField( static_cast<SwPostItField*>(aField->GetField()))
- , mpButtonPopup(0)
+ , mpButtonPopup(nullptr)
{
if (SupportsDoubleBuffering())
// When double-buffering, allow parents to paint on our area. That's
@@ -139,12 +139,12 @@ void SwAnnotationWin::UpdateData()
SwPosition aPosition( pTextField->GetTextNode() );
aPosition.nContent = pTextField->GetStart();
rUndoRedo.AppendUndo(
- new SwUndoFieldFromDoc(aPosition, *pOldField, *mpField, 0, true));
+ new SwUndoFieldFromDoc(aPosition, *pOldField, *mpField, nullptr, true));
}
// so we get a new layout of notes (anchor position is still the same and we would otherwise not get one)
Mgr().SetLayout();
// #i98686# if we have several views, all notes should update their text
- mpFormatField->Broadcast(SwFormatFieldHint( 0, SwFormatFieldHintWhich::CHANGED));
+ mpFormatField->Broadcast(SwFormatFieldHint( nullptr, SwFormatFieldHintWhich::CHANGED));
DocView().GetDocShell()->SetModified();
}
Engine()->ClearModifyFlag();
@@ -186,7 +186,7 @@ bool SwAnnotationWin::CalcFollow()
pTextField->GetTextNode().GetTextAttrForCharAt(
aPosition.nContent.GetIndex() - 1,
RES_TXTATR_ANNOTATION );
- const SwField* pField = pTextAttr ? pTextAttr->GetFormatField().GetField() : 0;
+ const SwField* pField = pTextAttr ? pTextAttr->GetFormatField().GetField() : nullptr;
return pField && (pField->Which()== RES_POSTITFLD);
}
@@ -203,7 +203,7 @@ sal_uInt32 SwAnnotationWin::CountFollowing()
RES_TXTATR_ANNOTATION );
SwField* pField = pTextAttr
? const_cast<SwField*>(pTextAttr->GetFormatField().GetField())
- : 0;
+ : nullptr;
while ( pField && ( pField->Which()== RES_POSTITFLD ) )
{
aCount++;
@@ -212,7 +212,7 @@ sal_uInt32 SwAnnotationWin::CountFollowing()
RES_TXTATR_ANNOTATION );
pField = pTextAttr
? const_cast<SwField*>(pTextAttr->GetFormatField().GetField())
- : 0;
+ : nullptr;
}
return aCount - 1;
}
@@ -281,7 +281,7 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText)
SwPosition aPosition( pTextField->GetTextNode() );
aPosition.nContent = pTextField->GetStart();
rUndoRedo.AppendUndo(
- new SwUndoFieldFromDoc(aPosition, *pOldField, *mpField, 0, true));
+ new SwUndoFieldFromDoc(aPosition, *pOldField, *mpField, nullptr, true));
}
Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) );
Engine()->ClearModifyFlag();
diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx
index 2ea7de480d7d..3735ef9217eb 100644
--- a/sw/source/uibase/docvw/FrameControlsManager.cxx
+++ b/sw/source/uibase/docvw/FrameControlsManager.cxx
@@ -129,7 +129,7 @@ void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrm* pPageFrm,
Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrm->Frm().SVRect() );
SwHeaderFooterWin* pWin = dynamic_cast<SwHeaderFooterWin *>(pControl->GetWindow());
- assert( pWin != NULL) ;
+ assert( pWin != nullptr) ;
assert( pWin->IsHeader() == bHeader );
pWin->SetOffset( aOffset, aPageRect.Left(), aPageRect.Right() );
@@ -160,7 +160,7 @@ void SwFrameControlsManager::SetPageBreakControl( const SwPageFrm* pPageFrm )
}
SwPageBreakWin* pWin = dynamic_cast<SwPageBreakWin *>(pControl->GetWindow());
- assert (pWin != NULL);
+ assert (pWin != nullptr);
pWin->UpdatePosition();
if (!pWin->IsVisible())
pControl->ShowAll( true );
@@ -181,7 +181,7 @@ const SwPageFrm* SwFrameMenuButtonBase::GetPageFrame()
void SwFrameMenuButtonBase::dispose()
{
m_pEditWin.clear();
- m_pFrm = NULL;
+ m_pFrm = nullptr;
MenuButton::dispose();
}
@@ -194,7 +194,7 @@ SwFrameControl::SwFrameControl( const VclPtr<vcl::Window> &pWindow )
SwFrameControl::~SwFrameControl()
{
- mpIFace = NULL;
+ mpIFace = nullptr;
mxWindow.disposeAndClear();
}
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index c0ef493cc4f4..2531c5d8ae5b 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -127,8 +127,8 @@ namespace
SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwFrm *pFrm, bool bHeader ) :
SwFrameMenuButtonBase( pEditWin, pFrm ),
m_bIsHeader( bHeader ),
- m_pPopupMenu( NULL ),
- m_pLine( NULL ),
+ m_pPopupMenu( nullptr ),
+ m_pLine( nullptr ),
m_bIsAppearing( false ),
m_nFadeRate( 100 ),
m_aFadeTimer( )
diff --git a/sw/source/uibase/docvw/OverlayRanges.cxx b/sw/source/uibase/docvw/OverlayRanges.cxx
index 7b44a9b3bdb9..2f0c4c9e083e 100644
--- a/sw/source/uibase/docvw/OverlayRanges.cxx
+++ b/sw/source/uibase/docvw/OverlayRanges.cxx
@@ -109,10 +109,10 @@ namespace sw
const std::vector< basegfx::B2DRange >& rRanges,
const bool bShowSolidBorder )
{
- OverlayRanges* pOverlayRanges = NULL;
+ OverlayRanges* pOverlayRanges = nullptr;
SdrView* pView = rDocView.GetDrawView();
- if ( pView != NULL )
+ if ( pView != nullptr )
{
SdrPaintWindow* pCandidate = pView->GetPaintWindow(0);
rtl::Reference<sdr::overlay::OverlayManager> xTargetOverlay = pCandidate->GetOverlayManager();
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index a80ab3614133..08bb106eca2a 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -129,17 +129,17 @@ SwPostItMgr::SwPostItMgr(SwView* pView)
: mpView(pView)
, mpWrtShell(mpView->GetDocShell()->GetWrtShell())
, mpEditWin(&mpView->GetEditWin())
- , mnEventId(0)
+ , mnEventId(nullptr)
, mbWaitingForCalcRects(false)
- , mpActivePostIt(0)
+ , mpActivePostIt(nullptr)
, mbLayout(false)
, mbLayoutHeight(0)
, mbLayouting(false)
, mbReadOnly(mpView->GetDocShell()->IsReadOnly())
, mbDeleteNote(true)
- , mpAnswer(0)
+ , mpAnswer(nullptr)
, mbIsShowAnchor( false )
- , mpFrmSidebarWinContainer( 0 )
+ , mpFrmSidebarWinContainer( nullptr )
{
if(!mpView->GetDrawView() )
mpView->GetWrtShell().MakeDrawView();
@@ -178,7 +178,7 @@ SwPostItMgr::~SwPostItMgr()
mPages.clear();
delete mpFrmSidebarWinContainer;
- mpFrmSidebarWinContainer = 0;
+ mpFrmSidebarWinContainer = nullptr;
}
void SwPostItMgr::CheckForRemovedPostIts()
@@ -192,7 +192,7 @@ void SwPostItMgr::CheckForRemovedPostIts()
SwSidebarItem* p = (*it);
mvPostItFields.remove(*it);
if (GetActiveSidebarWin() == p->pPostIt)
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
p->pPostIt.disposeAndClear();
delete p;
bRemoved = true;
@@ -241,7 +241,7 @@ void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast )
{
SwSidebarItem* p = (*i);
if (GetActiveSidebarWin() == p->pPostIt)
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
p->pPostIt.disposeAndClear();
mvPostItFields.erase(i);
delete p;
@@ -441,7 +441,7 @@ bool SwPostItMgr::CalcRects()
// if CalcRects() was forced and an event is still pending: remove it
// it is superfluous and also may cause reentrance problems if triggered while layouting
Application::RemoveUserEvent( mnEventId );
- mnEventId = 0;
+ mnEventId = nullptr;
}
bool bChange = false;
@@ -655,7 +655,7 @@ void SwPostItMgr::LayoutPostIts()
if (pPostIt->CalcFollow()) //do we really have another note in front of this one
static_cast<sw::annotation::SwAnnotationWin*>(pPostIt)->InitAnswer(mpAnswer);
delete mpAnswer;
- mpAnswer = 0;
+ mpAnswer = nullptr;
}
}
@@ -791,7 +791,7 @@ void SwPostItMgr::LayoutPostIts()
(*i)->pPostIt->HideNote();
if ((*i)->pPostIt->HasChildPathFocus())
{
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
(*i)->pPostIt->GrabFocusToDocument();
}
}
@@ -1346,7 +1346,7 @@ void SwPostItMgr::Delete(const OUString& rAuthor)
mpWrtShell->StartAllAction();
if (HasActiveSidebarWin() && (GetActiveSidebarWin()->GetAuthor() == rAuthor))
{
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
}
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_DELETE_AUTHOR_NOTES) + rAuthor);
@@ -1370,7 +1370,7 @@ void SwPostItMgr::Delete(const OUString& rAuthor)
void SwPostItMgr::Delete()
{
mpWrtShell->StartAllAction();
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, SW_RES(STR_DELETE_ALL_NOTES) );
mpWrtShell->StartUndo( UNDO_DELETE, &aRewriter );
@@ -1638,7 +1638,7 @@ void SwPostItMgr::SetShadowState(const SwPostItField* pField,bool bCursor)
if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT))
{
pOldPostIt->SetViewState(ViewState::NORMAL);
- mShadowState.mpShadowField = 0;
+ mShadowState.mpShadowField = nullptr;
}
}
}
@@ -1754,7 +1754,7 @@ void SwPostItMgr::CorrectPositions()
return;
// find first valid note
- SwSidebarWin *pFirstPostIt = 0;
+ SwSidebarWin *pFirstPostIt = nullptr;
for(SwSidebarItem_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i)
{
pFirstPostIt = (*i)->pPostIt;
@@ -1886,13 +1886,13 @@ void SwPostItMgr::SetActiveSidebarWin( SwSidebarWin* p)
if (pActive)
{
pActive->DeactivatePostIt();
- mShadowState.mpShadowField = 0;
+ mShadowState.mpShadowField = nullptr;
}
if (mpActivePostIt)
{
mpActivePostIt->GotoPos();
mpView->SetAnnotationMode(true);
- mpView->AttrChangedNotify(0);
+ mpView->AttrChangedNotify(nullptr);
mpView->SetAnnotationMode(false);
mpActivePostIt->ActivatePostIt();
}
@@ -1901,7 +1901,7 @@ void SwPostItMgr::SetActiveSidebarWin( SwSidebarWin* p)
IMPL_LINK_NOARG_TYPED( SwPostItMgr, CalcHdl, void*, void )
{
- mnEventId = 0;
+ mnEventId = nullptr;
if ( mbLayouting )
{
OSL_FAIL("Reentrance problem in Layout Manager!");
@@ -1981,7 +1981,7 @@ sal_uInt16 SwPostItMgr::Replace(SvxSearchItem* pItem)
SwSidebarWin* pWin = GetActiveSidebarWin();
sal_uInt16 aResult = pWin->GetOutlinerView()->StartSearchAndReplace( *pItem );
if (!aResult)
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
return aResult;
}
@@ -1993,7 +1993,7 @@ sal_uInt16 SwPostItMgr::FinishSearchReplace(const css::util::SearchOptions& rSea
aItem.SetBackward(!bSrchForward);
sal_uInt16 aResult = pWin->GetOutlinerView()->StartSearchAndReplace( aItem );
if (!aResult)
- SetActiveSidebarWin(0);
+ SetActiveSidebarWin(nullptr);
return aResult;
}
@@ -2056,7 +2056,7 @@ bool SwPostItMgr::HasActiveSidebarWin() const
bool SwPostItMgr::HasActiveAnnotationWin() const
{
return HasActiveSidebarWin() &&
- dynamic_cast<sw::annotation::SwAnnotationWin*>(mpActivePostIt.get()) != 0;
+ dynamic_cast<sw::annotation::SwAnnotationWin*>(mpActivePostIt.get()) != nullptr;
}
void SwPostItMgr::GrabFocusOnActiveSidebarWin()
@@ -2103,7 +2103,7 @@ void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm,
const SwFormatField& rFormatField,
SwSidebarWin& rSidebarWin )
{
- if ( mpFrmSidebarWinContainer == 0 )
+ if ( mpFrmSidebarWinContainer == nullptr )
{
mpFrmSidebarWinContainer = new SwFrmSidebarWinContainer();
}
@@ -2112,20 +2112,20 @@ void SwPostItMgr::ConnectSidebarWinToFrm( const SwFrm& rFrm,
if ( bInserted &&
mpWrtShell->GetAccessibleMap() )
{
- mpWrtShell->GetAccessibleMap()->InvalidatePosOrSize( 0, 0, &rSidebarWin, SwRect() );
+ mpWrtShell->GetAccessibleMap()->InvalidatePosOrSize( nullptr, nullptr, &rSidebarWin, SwRect() );
}
}
void SwPostItMgr::DisconnectSidebarWinFromFrm( const SwFrm& rFrm,
SwSidebarWin& rSidebarWin )
{
- if ( mpFrmSidebarWinContainer != 0 )
+ if ( mpFrmSidebarWinContainer != nullptr )
{
const bool bRemoved = mpFrmSidebarWinContainer->remove( rFrm, rSidebarWin );
if ( bRemoved &&
mpWrtShell->GetAccessibleMap() )
{
- mpWrtShell->GetAccessibleMap()->Dispose( 0, 0, &rSidebarWin );
+ mpWrtShell->GetAccessibleMap()->Dispose( nullptr, nullptr, &rSidebarWin );
}
}
}
@@ -2134,7 +2134,7 @@ bool SwPostItMgr::HasFrmConnectedSidebarWins( const SwFrm& rFrm )
{
bool bRet( false );
- if ( mpFrmSidebarWinContainer != 0 )
+ if ( mpFrmSidebarWinContainer != nullptr )
{
bRet = !mpFrmSidebarWinContainer->empty( rFrm );
}
@@ -2145,9 +2145,9 @@ bool SwPostItMgr::HasFrmConnectedSidebarWins( const SwFrm& rFrm )
vcl::Window* SwPostItMgr::GetSidebarWinForFrmByIndex( const SwFrm& rFrm,
const sal_Int32 nIndex )
{
- vcl::Window* pSidebarWin( 0 );
+ vcl::Window* pSidebarWin( nullptr );
- if ( mpFrmSidebarWinContainer != 0 )
+ if ( mpFrmSidebarWinContainer != nullptr )
{
pSidebarWin = mpFrmSidebarWinContainer->get( rFrm, nIndex );
}
@@ -2158,7 +2158,7 @@ vcl::Window* SwPostItMgr::GetSidebarWinForFrmByIndex( const SwFrm& rFrm,
void SwPostItMgr::GetAllSidebarWinForFrm( const SwFrm& rFrm,
std::vector< vcl::Window* >* pChildren )
{
- if ( mpFrmSidebarWinContainer != 0 )
+ if ( mpFrmSidebarWinContainer != nullptr )
{
mpFrmSidebarWinContainer->getAll( rFrm, pChildren );
}
diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.cxx b/sw/source/uibase/docvw/ShadowOverlayObject.cxx
index 8ac92cb2d2a7..c4700f9baa67 100644
--- a/sw/source/uibase/docvw/ShadowOverlayObject.cxx
+++ b/sw/source/uibase/docvw/ShadowOverlayObject.cxx
@@ -167,7 +167,7 @@ ImplPrimitive2DIDBlock(ShadowPrimitive, PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE)
/* static */ ShadowOverlayObject* ShadowOverlayObject::CreateShadowOverlayObject( SwView& rDocView )
{
- ShadowOverlayObject* pShadowOverlayObject( 0 );
+ ShadowOverlayObject* pShadowOverlayObject( nullptr );
if ( rDocView.GetDrawView() )
{
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index d864b40114c4..4ab884bbad47 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -382,7 +382,7 @@ void SidebarTextControl::Command( const CommandEvent& rCEvt )
}
else
{
- HandleScrollCommand( rCEvt, 0 , mrSidebarWin.Scrollbar());
+ HandleScrollCommand( rCEvt, nullptr , mrSidebarWin.Scrollbar());
}
}
else
diff --git a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
index 24bd2cad4ea0..208c880cf1c2 100644
--- a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
@@ -161,7 +161,7 @@ class SidebarTextControlAccessibleContext : public VCLXAccessibleComponent
SidebarTextControlAccessibleContext::SidebarTextControlAccessibleContext( SidebarTextControl& rSidebarTextControl )
: VCLXAccessibleComponent( rSidebarTextControl.GetWindowPeer() )
, mrSidebarTextControl( rSidebarTextControl )
- , mpAccessibleTextHelper( 0 )
+ , mpAccessibleTextHelper( nullptr )
, maMutex()
{
mpAccessibleTextHelper = new ::accessibility::AccessibleTextHelper( o3tl::make_unique<SidebarTextEditSource>(mrSidebarTextControl) );
@@ -176,7 +176,7 @@ SidebarTextControlAccessibleContext::~SidebarTextControlAccessibleContext()
void SidebarTextControlAccessibleContext::defunc()
{
delete mpAccessibleTextHelper;
- mpAccessibleTextHelper = 0;
+ mpAccessibleTextHelper = nullptr;
}
sal_Int32 SAL_CALL SidebarTextControlAccessibleContext::getAccessibleChildCount()
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 21f5a6e94d8a..0682f0ba392f 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -99,14 +99,14 @@ SwSidebarWin::SwSidebarWin(SwEditWin& rEditWin,
, mrMgr(aMgr)
, mrView(rEditWin.GetView())
, nFlags(aBits)
- , mnEventId(0)
- , mpOutlinerView(0)
- , mpOutliner(0)
- , mpSidebarTextControl(0)
- , mpVScrollbar(0)
- , mpMetadataAuthor(0)
- , mpMetadataDate(0)
- , mpMenuButton(0)
+ , mnEventId(nullptr)
+ , mpOutlinerView(nullptr)
+ , mpOutliner(nullptr)
+ , mpSidebarTextControl(nullptr)
+ , mpVScrollbar(nullptr)
+ , mpMetadataAuthor(nullptr)
+ , mpMetadataDate(nullptr)
+ , mpMenuButton(nullptr)
, mpAnchor(nullptr)
, mpShadow(nullptr)
, mpTextRangeOverlay(nullptr)
@@ -155,7 +155,7 @@ void SwSidebarWin::dispose()
{
if ( mpOutlinerView )
{
- mpOutlinerView->SetWindow( 0 );
+ mpOutlinerView->SetWindow( nullptr );
}
}
mpSidebarTextControl.disposeAndClear();
@@ -163,13 +163,13 @@ void SwSidebarWin::dispose()
if ( mpOutlinerView )
{
delete mpOutlinerView;
- mpOutlinerView = 0;
+ mpOutlinerView = nullptr;
}
if (mpOutliner)
{
delete mpOutliner;
- mpOutliner = 0;
+ mpOutliner = nullptr;
}
if (mpMetadataAuthor)
@@ -1073,7 +1073,7 @@ void SwSidebarWin::DeactivatePostIt()
if ( !IsProtected() && Engine()->GetEditEngine().GetText().isEmpty() )
{
- mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0, true );
+ mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), nullptr, true );
}
}
@@ -1109,7 +1109,7 @@ void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot)
mrMgr.RegisterAnswer(pPara);
}
if (mrMgr.HasActiveSidebarWin())
- mrMgr.SetActiveSidebarWin(0);
+ mrMgr.SetActiveSidebarWin(nullptr);
SwitchToFieldPos();
mrView.GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
break;
@@ -1117,13 +1117,13 @@ void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot)
case FN_DELETE_COMMENT:
//Delete(); // do not kill the parent of our open popup menu
- mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0, true );
+ mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), nullptr, true );
break;
case FN_FORMAT_ALL_NOTES:
case FN_DELETE_ALL_NOTES:
case FN_HIDE_ALL_NOTES:
// not possible as slot as this would require that "this" is the active postit
- mrView.GetViewFrame()->GetBindings().Execute( nSlot, 0, 0, SfxCallMode::ASYNCHRON );
+ mrView.GetViewFrame()->GetBindings().Execute( nSlot, nullptr, 0, SfxCallMode::ASYNCHRON );
break;
case FN_DELETE_NOTE_AUTHOR:
case FN_HIDE_NOTE_AUTHOR:
@@ -1132,7 +1132,7 @@ void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot)
SfxStringItem aItem( nSlot, GetAuthor() );
const SfxPoolItem* aItems[2];
aItems[0] = &aItem;
- aItems[1] = 0;
+ aItems[1] = nullptr;
mrView.GetViewFrame()->GetBindings().Execute( nSlot, aItems, 0, SfxCallMode::ASYNCHRON );
}
break;
@@ -1206,12 +1206,12 @@ void SwSidebarWin::Delete()
{
if ( mrMgr.GetActiveSidebarWin() == this)
{
- mrMgr.SetActiveSidebarWin(0);
+ mrMgr.SetActiveSidebarWin(nullptr);
// if the note is empty, the previous line will send a delete event, but we are already there
if (mnEventId)
{
Application::RemoveUserEvent( mnEventId );
- mnEventId = 0;
+ mnEventId = nullptr;
}
}
}
@@ -1229,7 +1229,7 @@ IMPL_LINK_NOARG_TYPED(SwSidebarWin, ModifyHdl, LinkParamNone*, void)
IMPL_LINK_NOARG_TYPED(SwSidebarWin, DeleteHdl, void*, void)
{
- mnEventId = 0;
+ mnEventId = nullptr;
Delete();
}
@@ -1336,7 +1336,7 @@ void SwSidebarWin::SetViewState(ViewState bViewState)
SwSidebarWin* pTopWinSelf = GetTopReplyNote();
SwSidebarWin* pTopWinActive = mrMgr.HasActiveSidebarWin()
? mrMgr.GetActiveSidebarWin()->GetTopReplyNote()
- : 0;
+ : nullptr;
// #i111964#
if ( pTopWinSelf && ( pTopWinSelf != pTopWinActive ) &&
pTopWinSelf->Anchor() )
@@ -1369,12 +1369,12 @@ void SwSidebarWin::SetViewState(ViewState bViewState)
SwSidebarWin* SwSidebarWin::GetTopReplyNote()
{
- SwSidebarWin* pTopNote = 0;
- SwSidebarWin* pSidebarWin = IsFollow() ? mrMgr.GetNextPostIt(KEY_PAGEUP, this) : 0;
+ SwSidebarWin* pTopNote = nullptr;
+ SwSidebarWin* pSidebarWin = IsFollow() ? mrMgr.GetNextPostIt(KEY_PAGEUP, this) : nullptr;
while (pSidebarWin)
{
pTopNote = pSidebarWin;
- pSidebarWin = pSidebarWin->IsFollow() ? mrMgr.GetNextPostIt(KEY_PAGEUP, pSidebarWin) : 0;
+ pSidebarWin = pSidebarWin->IsFollow() ? mrMgr.GetNextPostIt(KEY_PAGEUP, pSidebarWin) : nullptr;
}
return pTopNote;
}
@@ -1382,7 +1382,7 @@ SwSidebarWin* SwSidebarWin::GetTopReplyNote()
void SwSidebarWin::SwitchToFieldPos()
{
if ( mrMgr.GetActiveSidebarWin() == this )
- mrMgr.SetActiveSidebarWin(0);
+ mrMgr.SetActiveSidebarWin(nullptr);
GotoPos();
sal_uInt32 aCount = MoveCaret();
if (aCount)
diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx
index 0070daefbee5..0ab6174779e4 100644
--- a/sw/source/uibase/docvw/edtdd.cxx
+++ b/sw/source/uibase/docvw/edtdd.cxx
@@ -82,7 +82,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
if ( !m_pApplyTempl && !rSh.IsDrawCreate() && !IsDrawAction())
{
bool bStart = false, bDelSelect = false;
- SdrObject *pObj = NULL;
+ SdrObject *pObj = nullptr;
Point aDocPos( PixelToLogic( rPosPixel ) );
if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, true, true))
//We are not selecting and aren't at a selection
@@ -174,8 +174,8 @@ void SwEditWin::CleanupDropUserMarker()
if ( m_pUserMarker )
{
delete m_pUserMarker;
- m_pUserMarker = 0;
- m_pUserMarkerObj = 0;
+ m_pUserMarker = nullptr;
+ m_pUserMarkerObj = nullptr;
}
}
@@ -195,11 +195,11 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
//A Drop to an open OutlinerView doesn't concern us (also see QueryDrop)
SwWrtShell &rSh = m_rView.GetWrtShell();
const Point aDocPt( PixelToLogic( rEvt.maPosPixel ));
- SdrObject *pObj = 0;
+ SdrObject *pObj = nullptr;
OutlinerView* pOLV;
rSh.GetObjCntType( aDocPt, pObj );
- if( pObj && 0 != ( pOLV = rSh.GetDrawView()->GetTextEditOutlinerView() ))
+ if( pObj && nullptr != ( pOLV = rSh.GetDrawView()->GetTextEditOutlinerView() ))
{
Rectangle aRect( pOLV->GetOutputArea() );
aRect.Union( pObj->GetLogicRect() );
@@ -250,7 +250,7 @@ SotExchangeDest SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject *
|| rSh.DocPtInsideInputField( aDocPt ) )
return SotExchangeDest::NONE;
- SdrObject *pObj = NULL;
+ SdrObject *pObj = nullptr;
const ObjCntType eType = rSh.GetObjCntType( aDocPt, pObj );
//Drop to OutlinerView (TextEdit in Drawing) should decide it on its own!
@@ -278,7 +278,7 @@ SotExchangeDest SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject *
case OBJCNT_GRF:
{
bool bLink,
- bIMap = 0 != rSh.GetFormatFromObj( aDocPt )->GetURL().GetMap();
+ bIMap = nullptr != rSh.GetFormatFromObj( aDocPt )->GetURL().GetMap();
OUString aDummy;
rSh.GetGrfAtPos( aDocPt, aDummy, bLink );
if ( bLink && bIMap )
@@ -368,7 +368,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
m_bOldIdleSet = false;
}
- SdrObject *pObj = NULL;
+ SdrObject *pObj = nullptr;
m_nDropDestination = GetDropDestination( aPixPt, &pObj );
if( !bool(m_nDropDestination) )
return DND_ACTION_NONE;
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 83e022479370..502620f5c1c9 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -179,7 +179,7 @@ bool g_bFlushCharBuffer = false;
bool g_bDDINetAttr = false;
SdrHdlKind g_eSdrMoveHdl = HDL_USER;
-QuickHelpData* SwEditWin::m_pQuickHlpData = 0;
+QuickHelpData* SwEditWin::m_pQuickHlpData = nullptr;
long SwEditWin::m_nDDStartPosY = 0;
long SwEditWin::m_nDDStartPosX = 0;
@@ -339,7 +339,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
if ( rSh.IsOverReadOnlyPos( rLPt ) )
{
delete m_pUserMarker;
- m_pUserMarker = 0L;
+ m_pUserMarker = nullptr;
eStyle = PointerStyle::NotAllowed;
}
@@ -347,7 +347,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
{
SwRect aRect;
SwRect* pRect = &aRect;
- const SwFrameFormat* pFormat = 0;
+ const SwFrameFormat* pFormat = nullptr;
bool bFrameIsValidTarget = false;
if( m_pApplyTempl->m_pFormatClipboard )
@@ -356,7 +356,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
bFrameIsValidTarget = ( m_pApplyTempl->eType == SFX_STYLE_FAMILY_FRAME );
if( bFrameIsValidTarget &&
- 0 !=(pFormat = rSh.GetFormatFromObj( rLPt, &pRect )) &&
+ nullptr !=(pFormat = rSh.GetFormatFromObj( rLPt, &pRect )) &&
dynamic_cast<const SwFlyFrameFormat*>( pFormat) )
{
//turn on highlight for frame
@@ -370,7 +370,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
else
{
delete m_pUserMarker;
- m_pUserMarker = 0L;
+ m_pUserMarker = nullptr;
}
rSh.SwCrsrShell::SetVisCrsr( rLPt );
@@ -402,7 +402,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
else
{
delete m_pUserMarker;
- m_pUserMarker = 0L;
+ m_pUserMarker = nullptr;
}
SetPointer( eStyle );
@@ -431,7 +431,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
PointerStyle eStyle = PointerStyle::Text;
if ( !pSdrView )
bCntAtPos = true;
- else if ( (bHitHandle = pSdrView->PickHandle( rLPt ) != 0) )
+ else if ( (bHitHandle = pSdrView->PickHandle( rLPt ) != nullptr) )
{
m_aActHitType = SDRHIT_OBJECT;
bPrefSdrPointer = true;
@@ -563,10 +563,10 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
// Is edit inline input field
if (SwContentAtPos::SW_FIELD == aSwContentAtPos.eContentAtPos)
{
- if ( aSwContentAtPos.pFndTextAttr != NULL
+ if ( aSwContentAtPos.pFndTextAttr != nullptr
&& aSwContentAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD)
{
- const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : NULL;
+ const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : nullptr;
if (!(pCrsrField && pCrsrField == aSwContentAtPos.pFndTextAttr->GetFormatField().GetField()))
eStyle = PointerStyle::RefHand;
}
@@ -675,7 +675,7 @@ void SwEditWin::LeaveArea(const Point &rPos)
JustifyAreaTimer();
if( !m_aTimer.IsActive() )
m_aTimer.Start();
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
}
inline void SwEditWin::EnterArea()
@@ -717,7 +717,7 @@ void SwEditWin::StopInsFrm()
if (m_rView.GetDrawFuncPtr())
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
}
m_rView.LeaveDrawCreate(); // leave construction mode
m_bInsFrm = false;
@@ -1253,7 +1253,7 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
const SdrHdlList& rHdlList = pSdrView->GetHdlList();
SdrHdl* pHdl = rHdlList.GetFocusHdl();
rSh.StartAllAction();
- if(0L == pHdl)
+ if(nullptr == pHdl)
{
// now move the selected draw objects
// if the object's position is not protected
@@ -1293,7 +1293,7 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
const SdrDragStat& rDragStat = pSdrView->GetDragStat();
// start dragging
- pSdrView->BegDragObj(aStartPoint, 0, pHdl, 0);
+ pSdrView->BegDragObj(aStartPoint, nullptr, pHdl, 0);
if(pSdrView->IsDragObj())
{
@@ -1342,7 +1342,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
else if ( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE &&
rSh.IsHeaderFooterEdit( ) )
{
- bool bHeader = bool(FrmTypeFlags::HEADER & rSh.GetFrmType(0,false));
+ bool bHeader = bool(FrmTypeFlags::HEADER & rSh.GetFrmType(nullptr,false));
if ( bHeader )
rSh.SttPg();
else
@@ -1356,7 +1356,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
// running on a document, no order is being taken
return;
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
m_aKeyInputFlushTimer.Stop();
bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() &&
@@ -1518,8 +1518,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
return;
}
- SvxAutoCorrCfg* pACfg = 0;
- SvxAutoCorrect* pACorr = 0;
+ SvxAutoCorrCfg* pACfg = nullptr;
+ SvxAutoCorrect* pACorr = nullptr;
uno::Reference< frame::XDispatchRecorder > xRecorder =
m_rView.GetViewFrame()->GetBindings().GetRecorder();
@@ -1931,7 +1931,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
const bool bOnlyBackspaceKey( KEY_BACKSPACE == rKeyCode.GetFullCode() );
if ( rSh.IsSttPara()
&& !rSh.HasSelection()
- && ( rSh.GetNumRuleAtCurrCrsrPos() == NULL
+ && ( rSh.GetNumRuleAtCurrCrsrPos() == nullptr
|| ( rSh.IsNoNum() && bOnlyBackspaceKey ) ) )
{
bDone = rSh.TryRemoveIndent();
@@ -1986,7 +1986,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
&& !rSh.HasSelection() )
{
const SwNumRule* pCurrNumRule( rSh.GetNumRuleAtCurrCrsrPos() );
- if ( pCurrNumRule != NULL
+ if ( pCurrNumRule != nullptr
&& pCurrNumRule != rSh.GetOutlineNumRule() )
{
bCallNumOrNoNum = true;
@@ -2388,7 +2388,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
const bool bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
- const bool bRunNext = pACorr != NULL && pACorr->HasRunNext();
+ const bool bRunNext = pACorr != nullptr && pACorr->HasRunNext();
if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
pACfg->IsAutoFormatByInput() &&
(( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) &&
@@ -2532,7 +2532,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
m_rView.GetDrawFuncPtr() )
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
m_rView.AttrChangedNotify( &rSh );
}
@@ -2745,7 +2745,7 @@ void SwEditWin::MoveCursor( SwWrtShell &rSh, const Point& rDocPos,
void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
SwWrtShell &rSh = m_rView.GetWrtShell();
- const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : NULL;
+ const SwField *pCrsrField = rSh.CrsrInsideInputField() ? rSh.GetCurField( true ) : nullptr;
// We have to check if a context menu is shown and we have an UI
// active inplace client. In that case we have to ignore the mouse
@@ -2764,7 +2764,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (m_rView.GetPostItMgr()->IsHit(rMEvt.GetPosPixel()))
return;
- m_rView.GetPostItMgr()->SetActiveSidebarWin(0);
+ m_rView.GetPostItMgr()->SetActiveSidebarWin(nullptr);
GrabFocus();
@@ -2777,8 +2777,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
_rMEvt.GetMode(), _rMEvt.GetButtons() );
}
- m_bWasShdwCrsr = 0 != m_pShadCrsr;
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ m_bWasShdwCrsr = nullptr != m_pShadCrsr;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
const Point aDocPos( PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -2831,8 +2831,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (!rSh.GetViewOptions()->IsHideWhitespaceMode())
{
SwPaM aPam(*rSh.GetCurrentShellCursor().GetPoint());
- const bool bWasInHeader = aPam.GetPoint()->nNode.GetNode().FindHeaderStartNode() != NULL;
- const bool bWasInFooter = aPam.GetPoint()->nNode.GetNode().FindFooterStartNode() != NULL;
+ const bool bWasInHeader = aPam.GetPoint()->nNode.GetNode().FindHeaderStartNode() != nullptr;
+ const bool bWasInFooter = aPam.GetPoint()->nNode.GetNode().FindFooterStartNode() != nullptr;
// Is the cursor in a part like similar to the one we clicked on? For example,
// if the cursor is in a header and we click on an empty header... don't change anything to
@@ -2994,7 +2994,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( RulerMarginDrag( rMEvt,
SwFEShell::IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPos ) ) )
{
- m_rView.SetNumRuleNodeFromDoc( NULL );
+ m_rView.SetNumRuleNodeFromDoc( nullptr );
m_rView.InvalidateRulerPos();
rBind.Update();
bCallBase = false;
@@ -3003,7 +3003,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
// Make sure the pointer is set to 0, otherwise it may point to
// nowhere after deleting the corresponding text node.
- m_rView.SetNumRuleNodeFromDoc( NULL );
+ m_rView.SetNumRuleNodeFromDoc( nullptr );
return;
}
}
@@ -3036,7 +3036,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if( !bIsDocReadOnly &&
!m_pAnchorMarker &&
pSdrView &&
- 0 != ( pHdl = pSdrView->PickHandle(aDocPos) ) &&
+ nullptr != ( pHdl = pSdrView->PickHandle(aDocPos) ) &&
( pHdl->GetKind() == HDL_ANCHOR ||
pHdl->GetKind() == HDL_ANCHOR_TR ) )
{
@@ -3168,7 +3168,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (rSh.IsFrmSelected() && m_rView.GetDrawFuncPtr())
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
m_rView.AttrChangedNotify( &rSh );
}
@@ -3194,7 +3194,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
m_rView.NoRotate();
SdrHdl *pHdl;
- if( !bIsDocReadOnly && !m_pAnchorMarker && 0 !=
+ if( !bIsDocReadOnly && !m_pAnchorMarker && nullptr !=
( pHdl = pSdrView->PickHandle(aDocPos) ) &&
( pHdl->GetKind() == HDL_ANCHOR ||
pHdl->GetKind() == HDL_ANCHOR_TR ) )
@@ -3242,7 +3242,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
m_rView.GetDrawFuncPtr() )
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
m_rView.AttrChangedNotify( &rSh );
}
@@ -3274,7 +3274,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (!rSh.isTiledRendering())
{
GetView().GetViewFrame()->GetBindings().Execute(
- FN_FORMAT_GRAFIC_DLG, 0, 0,
+ FN_FORMAT_GRAFIC_DLG, nullptr, 0,
SfxCallMode::RECORD|SfxCallMode::SLOT);
}
return;
@@ -3293,7 +3293,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if (!rSh.isTiledRendering())
{
GetView().GetViewFrame()->GetBindings().Execute(
- FN_FORMAT_FRAME_DLG, 0, 0,
+ FN_FORMAT_FRAME_DLG, nullptr, 0,
SfxCallMode::RECORD|SfxCallMode::SLOT);
}
return;
@@ -3316,7 +3316,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
bool bFootnote = false;
if( !bIsDocReadOnly &&
- ( 0 != ( pField = rSh.GetCurField() ) ||
+ ( nullptr != ( pField = rSh.GetCurField() ) ||
( bFootnote = rSh.GetCurFootnote() ) ) )
{
RstMBDownFlags();
@@ -3514,7 +3514,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.SelectObj(aDocPos, SW_ADD_SELECT);
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
- if (rMarkList.GetMark(0) == NULL)
+ if (rMarkList.GetMark(0) == nullptr)
{
rSh.LeaveSelFrmMode();
m_rView.AttrChangedNotify(&rSh);
@@ -3611,7 +3611,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// Are we clicking on a field?
if (rSh.GetContentAtPos(aDocPos, aFieldAtPos))
{
- bool bEditableField = (aFieldAtPos.pFndTextAttr != NULL
+ bool bEditableField = (aFieldAtPos.pFndTextAttr != nullptr
&& aFieldAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD);
if (!bEditableField)
@@ -3640,7 +3640,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = false;
if( !bOverSelect )
- bOverURLGrf = bOverSelect = 0 != rSh.IsURLGrfAtPos( aDocPos );
+ bOverURLGrf = bOverSelect = nullptr != rSh.IsURLGrfAtPos( aDocPos );
if ( !bOverSelect )
{
@@ -3686,7 +3686,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// Are we clicking on a field?
if (g_bValidCrsrPos
&& rSh.GetContentAtPos(aDocPos, aFieldAtPos)
- && aFieldAtPos.pFndTextAttr != NULL
+ && aFieldAtPos.pFndTextAttr != nullptr
&& aFieldAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD
&& (!pCrsrField || pCrsrField != aFieldAtPos.pFndTextAttr->GetFormatField().GetField()))
{
@@ -3726,7 +3726,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
return ;
if( m_pShadCrsr && 0 != (rMEvt.GetModifier() + rMEvt.GetButtons() ) )
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly();
@@ -3758,7 +3758,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
const bool bInsWin = rSh.VisArea().IsInside( aDocPt ) || rSh.isTiledRendering();
if( m_pShadCrsr && !bInsWin )
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
if( bInsWin && m_pRowColumnSelectionStart )
{
@@ -3901,8 +3901,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
const Point aOld = m_pAnchorMarker->GetPosForHitTest( *(rSh.GetOut()) );
Point aNew = rSh.FindAnchorPos( aDocPt );
SdrHdl* pHdl;
- if( pSdrView && (0!=( pHdl = pSdrView->PickHandle( aOld ) )||
- 0 !=(pHdl = pSdrView->PickHandle( m_pAnchorMarker->GetHdlPos()) ) ) &&
+ if( pSdrView && (nullptr!=( pHdl = pSdrView->PickHandle( aOld ) )||
+ nullptr !=(pHdl = pSdrView->PickHandle( m_pAnchorMarker->GetHdlPos()) ) ) &&
( pHdl->GetKind() == HDL_ANCHOR ||
pHdl->GetKind() == HDL_ANCHOR_TR ) )
{
@@ -3916,7 +3916,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
else
{
delete m_pAnchorMarker;
- m_pAnchorMarker = NULL;
+ m_pAnchorMarker = nullptr;
}
}
if ( m_bInsDraw )
@@ -3976,8 +3976,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
? SW_EVENT_FRM_MOVE
: SW_EVENT_FRM_RESIZE;
- if( 0 != ( pFlyFormat = rSh.GetFlyFrameFormat() ) &&
- 0 != ( pMacro = pFlyFormat->GetMacro().GetMacroTable().
+ if( nullptr != ( pFlyFormat = rSh.GetFlyFrameFormat() ) &&
+ nullptr != ( pMacro = pFlyFormat->GetMacro().GetMacroTable().
Get( nEvent )) &&
// or notify only e.g. every 20 Twip?
m_aRszMvHdlPt != aDocPt )
@@ -4114,10 +4114,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
m_rView.GetPostItMgr()->SetShadowState(reinterpret_cast<const SwPostItField*>(pField),false);
}
else
- m_rView.GetPostItMgr()->SetShadowState(0,false);
+ m_rView.GetPostItMgr()->SetShadowState(nullptr,false);
}
else
- m_rView.GetPostItMgr()->SetShadowState(0,false);
+ m_rView.GetPostItMgr()->SetShadowState(nullptr,false);
}
// no break;
case KEY_SHIFT:
@@ -4129,8 +4129,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
UpdatePointer( aDocPt, rMEvt.GetModifier() );
- const SwFrameFormat* pFormat = 0;
- const SwFormatINetFormat* pINet = 0;
+ const SwFrameFormat* pFormat = nullptr;
+ const SwFormatINetFormat* pINet = nullptr;
SwContentAtPos aContentAtPos( SwContentAtPos::SW_INETATTR );
if( rSh.GetContentAtPos( aDocPt, aContentAtPos ) )
pINet = static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr);
@@ -4138,7 +4138,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
const void* pTmp = pINet;
if( pINet ||
- 0 != ( pTmp = pFormat = rSh.GetFormatFromAnyObj( aDocPt )))
+ nullptr != ( pTmp = pFormat = rSh.GetFormatFromAnyObj( aDocPt )))
{
bTstShdwCrsr = false;
if( pTmp == pINet )
@@ -4206,7 +4206,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
if( bDelShadCrsr && m_pShadCrsr )
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
m_bWasShdwCrsr = false;
}
@@ -4220,7 +4220,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
bool bCallShadowCrsr = m_bWasShdwCrsr;
m_bWasShdwCrsr = false;
if( m_pShadCrsr )
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
if( m_pRowColumnSelectionStart )
DELETEZ( m_pRowColumnSelectionStart );
@@ -4230,7 +4230,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
// preventively reset
m_rView.SetTabColFromDoc( false );
- m_rView.SetNumRuleNodeFromDoc(NULL);
+ m_rView.SetNumRuleNodeFromDoc(nullptr);
SwWrtShell &rSh = m_rView.GetWrtShell();
SET_CURR_SHELL( &rSh );
@@ -4320,7 +4320,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if (!m_rView.IsDrawMode())
{
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
SfxBindings& rBind = m_rView.GetViewFrame()->GetBindings();
rBind.Invalidate( SID_ATTR_SIZE );
rBind.Invalidate( SID_TABLE_CELL );
@@ -4417,8 +4417,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
? SW_EVENT_FRM_MOVE
: SW_EVENT_FRM_RESIZE;
- if( 0 != ( pFlyFormat = rSh.GetFlyFrameFormat() ) &&
- 0 != ( pMacro = pFlyFormat->GetMacro().GetMacroTable().
+ if( nullptr != ( pFlyFormat = rSh.GetFlyFrameFormat() ) &&
+ nullptr != ( pMacro = pFlyFormat->GetMacro().GetMacroTable().
Get( nEvent )) )
{
const Point aSttPt( PixelToLogic( m_aStartPos ) );
@@ -4449,7 +4449,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
ReleaseMouse();
- rSh.ExecMacro( *pMacro, 0, &xArgs );
+ rSh.ExecMacro( *pMacro, nullptr, &xArgs );
CaptureMouse();
}
@@ -4549,7 +4549,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
bAddMode = true;
rSh.EnterAddMode();
}
- if ( aContentAtPos.pFndTextAttr != NULL
+ if ( aContentAtPos.pFndTextAttr != nullptr
&& aContentAtPos.pFndTextAttr->Which() == RES_TXTATR_INPUTFIELD )
{
if (!rSh.IsInSelect())
@@ -4586,8 +4586,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
else if ( SwContentAtPos::SW_FORMCTRL == aContentAtPos.eContentAtPos )
{
- OSL_ENSURE( aContentAtPos.aFnd.pFieldmark != NULL, "where is my field ptr???");
- if ( aContentAtPos.aFnd.pFieldmark != NULL)
+ OSL_ENSURE( aContentAtPos.aFnd.pFieldmark != nullptr, "where is my field ptr???");
+ if ( aContentAtPos.aFnd.pFieldmark != nullptr)
{
IFieldmark *fieldBM = const_cast< IFieldmark* > ( aContentAtPos.aFnd.pFieldmark );
if ( fieldBM->GetFieldname( ) == ODF_FORMCHECKBOX )
@@ -4654,7 +4654,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
rSh.VisArea().IsInside( aDocPt ))
{
SwUndoId nLastUndoId(UNDO_EMPTY);
- if (rSh.GetLastUndoInfo(0, & nLastUndoId))
+ if (rSh.GetLastUndoInfo(nullptr, & nLastUndoId))
{
if (UNDO_INS_FROM_SHADOWCRSR == nLastUndoId)
{
@@ -4692,7 +4692,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
//get some parameters
SwWrtShell& rWrtShell = m_rView.GetWrtShell();
- SfxStyleSheetBasePool* pPool=0;
+ SfxStyleSheetBasePool* pPool=nullptr;
bool bNoCharacterFormats = false;
bool bNoParagraphFormats = true;
{
@@ -4933,12 +4933,12 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView):
DragSourceHelper( this ),
m_eBufferLanguage(LANGUAGE_DONTKNOW),
- m_pApplyTempl(0),
- m_pAnchorMarker( 0 ),
- m_pUserMarker( 0 ),
- m_pUserMarkerObj( 0 ),
- m_pShadCrsr( 0 ),
- m_pRowColumnSelectionStart( 0 ),
+ m_pApplyTempl(nullptr),
+ m_pAnchorMarker( nullptr ),
+ m_pUserMarker( nullptr ),
+ m_pUserMarkerObj( nullptr ),
+ m_pShadCrsr( nullptr ),
+ m_pRowColumnSelectionStart( nullptr ),
m_rView( rMyView ),
@@ -5016,24 +5016,24 @@ void SwEditWin::dispose()
m_aKeyInputTimer.Stop();
delete m_pShadCrsr;
- m_pShadCrsr = NULL;
+ m_pShadCrsr = nullptr;
delete m_pRowColumnSelectionStart;
- m_pRowColumnSelectionStart = NULL;
+ m_pRowColumnSelectionStart = nullptr;
if( m_pQuickHlpData->m_bIsDisplayed && m_rView.GetWrtShellPtr() )
m_pQuickHlpData->Stop( m_rView.GetWrtShell() );
g_bExecuteDrag = false;
delete m_pApplyTempl;
- m_pApplyTempl = NULL;
+ m_pApplyTempl = nullptr;
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
delete m_pUserMarker;
- m_pUserMarker = NULL;
+ m_pUserMarker = nullptr;
delete m_pAnchorMarker;
- m_pAnchorMarker = NULL;
+ m_pAnchorMarker = nullptr;
m_pFrameControlsManager->dispose();
delete m_pFrameControlsManager;
@@ -5052,7 +5052,7 @@ void SwEditWin::EnterDrawTextMode( const Point& aDocPos )
if (m_rView.GetDrawFuncPtr())
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
}
m_rView.NoRotate();
@@ -5209,7 +5209,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
aEvent.SourceWindow = VCLUnoHelper::GetInterface( this );
aEvent.ExecutePosition.X = aPixPos.X();
aEvent.ExecutePosition.Y = aPixPos.Y();
- Menu* pMenu = 0;
+ Menu* pMenu = nullptr;
OUString sMenuName("private:resource/ReadonlyContextMenu");
if( GetView().TryContextMenuInterception( *pROPopup, sMenuName, pMenu, aEvent ) )
{
@@ -5240,7 +5240,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
case CommandEventId::StartAutoScroll:
case CommandEventId::AutoScroll:
if( m_pShadCrsr )
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
bCallBase = !m_rView.HandleWheelCommands( rCEvt );
break;
@@ -5564,7 +5564,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
SfxBindings& rBind = m_rView.GetViewFrame()->GetBindings();
rBind.Invalidate( SID_ATTR_SIZE );
@@ -5658,7 +5658,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if (rSh.IsFrmSelected() && m_rView.GetDrawFuncPtr())
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
m_rView.AttrChangedNotify( &rSh );
}
@@ -5716,7 +5716,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
m_rView.GetDrawFuncPtr() )
{
m_rView.GetDrawFuncPtr()->Deactivate();
- m_rView.SetDrawFuncPtr(NULL);
+ m_rView.SetDrawFuncPtr(nullptr);
m_rView.LeaveDrawCreate();
m_rView.AttrChangedNotify( &rSh );
}
@@ -5738,7 +5738,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = false;
if( !bOverSelect )
- bOverURLGrf = bOverSelect = 0 != rSh.IsURLGrfAtPos( aDocPos );
+ bOverURLGrf = bOverSelect = nullptr != rSh.IsURLGrfAtPos( aDocPos );
if ( !bOverSelect )
{
@@ -5819,7 +5819,7 @@ void SwEditWin::SetChainMode( bool bOn )
if ( m_pUserMarker )
{
delete m_pUserMarker;
- m_pUserMarker = 0L;
+ m_pUserMarker = nullptr;
}
m_bChainMode = bOn;
@@ -5915,7 +5915,7 @@ void QuickHelpData::Start( SwWrtShell& rSh, sal_uInt16 nWrdLen )
void QuickHelpData::Stop( SwWrtShell& rSh )
{
if( !m_bIsTip )
- rSh.DeleteExtTextInput( 0, false );
+ rSh.DeleteExtTextInput( nullptr, false );
else if( nTipId )
Help::HideTip( nTipId );
ClearContent();
@@ -6145,7 +6145,7 @@ bool SwEditWin::IsOverHeaderFooterFly( const Point& rDocPos, FrameControlType& r
Point aPt( rDocPos );
SwWrtShell &rSh = m_rView.GetWrtShell();
SwPaM aPam( *rSh.GetCurrentShellCursor().GetPoint() );
- rSh.GetLayout()->GetCrsrOfst( aPam.GetPoint(), aPt, NULL, true );
+ rSh.GetLayout()->GetCrsrOfst( aPam.GetPoint(), aPt, nullptr, true );
const SwStartNode* pStartFly = aPam.GetPoint()->nNode.GetNode().FindFlyStartNode();
if ( pStartFly )
@@ -6157,8 +6157,8 @@ bool SwEditWin::IsOverHeaderFooterFly( const Point& rDocPos, FrameControlType& r
const SwPosition* pAnchor = pFlyFormat->GetAnchor( ).GetContentAnchor( );
if ( pAnchor )
{
- bool bInHeader = pAnchor->nNode.GetNode( ).FindHeaderStartNode( ) != NULL;
- bool bInFooter = pAnchor->nNode.GetNode( ).FindFooterStartNode( ) != NULL;
+ bool bInHeader = pAnchor->nNode.GetNode( ).FindHeaderStartNode( ) != nullptr;
+ bool bInFooter = pAnchor->nNode.GetNode( ).FindFooterStartNode( ) != nullptr;
bRet = bInHeader || bInFooter;
if ( bInHeader )
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index c527e1244eea..c7d7be51932c 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -121,7 +121,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( pSdrView )
{
SdrPageView* pPV = pSdrView->GetSdrPageView();
- SwDPage* pPage = pPV ? static_cast<SwDPage*>(pPV->GetPage()) : 0;
+ SwDPage* pPage = pPV ? static_cast<SwDPage*>(pPV->GetPage()) : nullptr;
bContinue = pPage && pPage->RequestHelp(this, pSdrView, rEvt);
}
}
@@ -452,7 +452,7 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
// fully resides inside?
if( rRect.IsInside( aRect ) )
// dann aufheben
- delete m_pShadCrsr, m_pShadCrsr = 0;
+ delete m_pShadCrsr, m_pShadCrsr = nullptr;
else if( rRect.IsOver( aRect ))
{
// resides somewhat above, then everything is clipped outside
diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
index dd4193bec003..43f1fd332841 100644
--- a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
+++ b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx
@@ -155,7 +155,7 @@ bool SwFrmSidebarWinContainer::empty( const SwFrm& rFrm )
SwSidebarWin* SwFrmSidebarWinContainer::get( const SwFrm& rFrm,
const sal_Int32 nIndex )
{
- SwSidebarWin* pRet( 0 );
+ SwSidebarWin* pRet( nullptr );
FrmKey aFrmKey( &rFrm );
FrmSidebarWinContainer::iterator aFrmIter = mpFrmSidebarWinContainer->find( aFrmKey );
diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx
index 8cac9180b002..f7abc6a90d2b 100644
--- a/sw/source/uibase/docvw/romenu.cxx
+++ b/sw/source/uibase/docvw/romenu.cxx
@@ -59,7 +59,7 @@ SwReadOnlyPopup::~SwReadOnlyPopup()
void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rDis )
{
- SfxPoolItem *_pItem = 0;
+ SfxPoolItem *_pItem = nullptr;
SfxItemState eState = rDis.GetBindings()->QueryState( nSID, _pItem );
if (eState >= SfxItemState::DEFAULT)
{
@@ -85,8 +85,8 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
rView ( rV ),
aBrushItem(RES_BACKGROUND),
rDocPos( rDPos ),
- pImageMap( 0 ),
- pTargetURL( 0 )
+ pImageMap( nullptr ),
+ pTargetURL( nullptr )
{
bGrfToGalleryAsLnk = SW_MOD()->GetModuleConfig()->IsGrfToGalleryAsLnk();
SwWrtShell &rSh = rView.GetWrtShell();
@@ -105,7 +105,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
bool bLink = false;
const Graphic *pGrf;
- if ( 0 == (pGrf = rSh.GetGrfAtPos( rDocPos, sGrfName, bLink )) )
+ if ( nullptr == (pGrf = rSh.GetGrfAtPos( rDocPos, sGrfName, bLink )) )
{
EnableItem( MN_READONLY_SAVEGRAPHIC, false );
EnableItem( MN_READONLY_COPYGRAPHIC, false );
@@ -182,7 +182,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
else
EnableItem( MN_READONLY_LOADGRAPHIC, false );
- bool bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame();
+ bool bReloadFrame = nullptr != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame();
EnableItem( MN_READONLY_RELOAD_FRAME,
bReloadFrame );
EnableItem( MN_READONLY_RELOAD, !bReloadFrame);
@@ -198,14 +198,14 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
Check( MN_READONLY_OPENURL, SID_OPENDOC, rDis );
Check( MN_READONLY_OPENURLNEW, SID_OPENDOC, rDis );
- SfxPoolItem* pState = NULL;
+ SfxPoolItem* pState = nullptr;
SfxItemState eState = pVFrame->GetBindings().QueryState( SID_COPY, pState );
Check( MN_READONLY_COPY, SID_COPY, rDis );
if(eState < SfxItemState::DEFAULT)
EnableItem( MN_READONLY_COPY, false );
delete pState;
- pState = NULL;
+ pState = nullptr;
eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState );
if (
@@ -266,7 +266,7 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, sal_uInt16 nId )
return;
}
- TransferDataContainer* pClipCntnr = 0;
+ TransferDataContainer* pClipCntnr = nullptr;
sal_uInt16 nExecId = USHRT_MAX;
sal_uInt16 nFilter = USHRT_MAX;
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 6ad94fe373b9..041acaf960cb 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -239,11 +239,11 @@ private:
SwSrcEditWindow::SwSrcEditWindow( vcl::Window* pParent, SwSrcView* pParentView ) :
Window( pParent, WB_BORDER|WB_CLIPCHILDREN ),
- pTextEngine(0),
+ pTextEngine(nullptr),
- pOutWin(0),
- pHScrollbar(0),
- pVScrollbar(0),
+ pOutWin(nullptr),
+ pHScrollbar(nullptr),
+ pVScrollbar(nullptr),
pSrcView(pParentView),
@@ -289,7 +289,7 @@ void SwSrcEditWindow::dispose()
}
aSyntaxIdle.Stop();
if ( pOutWin )
- pOutWin->SetTextView( NULL );
+ pOutWin->SetTextView( nullptr );
if ( pTextEngine )
{
@@ -297,9 +297,9 @@ void SwSrcEditWindow::dispose()
pTextEngine->RemoveView( pTextView );
delete pTextView;
- pTextView = NULL;
+ pTextView = nullptr;
delete pTextEngine;
- pTextEngine = NULL;
+ pTextEngine = nullptr;
}
pHScrollbar.disposeAndClear();
pVScrollbar.disposeAndClear();
@@ -596,7 +596,7 @@ IMPL_LINK_TYPED(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll, void)
IMPL_LINK_TYPED( SwSrcEditWindow, SyntaxTimerHdl, Idle *, pIdle, void )
{
tools::Time aSyntaxCheckStart( tools::Time::SYSTEM );
- SAL_WARN_IF(pTextView == 0, "sw", "No View yet, but syntax highlighting?!");
+ SAL_WARN_IF(pTextView == nullptr, "sw", "No View yet, but syntax highlighting?!");
bHighlighting = true;
sal_uInt16 nCount = 0;
@@ -661,7 +661,7 @@ void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara )
ImpDoHighlight( aSource, nPara );
TextView* pTmp = pTextEngine->GetActiveView();
pTmp->SetAutoScroll(false);
- pTextEngine->SetActiveView(0);
+ pTextEngine->SetActiveView(nullptr);
pTextEngine->SetUpdateMode( true );
pTextEngine->SetActiveView(pTmp);
pTmp->SetAutoScroll(true);
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index fa6ecca7d6d8..cd0c9a0a9d18 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -207,18 +207,18 @@ static const SwFieldPack aSwFields[] =
static SwWrtShell* lcl_GetShell()
{
SwView* pView;
- if ( 0 != (pView = ::GetActiveView()) )
+ if ( nullptr != (pView = ::GetActiveView()) )
return pView->GetWrtShellPtr();
OSL_FAIL("no current shell found!");
- return 0;
+ return nullptr;
}
inline sal_uInt16 GetPackCount() { return sizeof(aSwFields) / sizeof(SwFieldPack); }
// FieldManager controls inserting and updating of fields
SwFieldMgr::SwFieldMgr(SwWrtShell* pSh ) :
- pModule(0),
- pMacroItem(0),
+ pModule(nullptr),
+ pMacroItem(nullptr),
pWrtShell(pSh),
bEvalExp(true)
{
@@ -244,7 +244,7 @@ bool SwFieldMgr::CanInsertRefMark( const OUString& rStr )
if( 1 < nCnt && !pSh->SwCrsrShell::HasSelection() )
--nCnt;
- bRet = 2 > nCnt && 0 == pSh->GetRefMark( rStr );
+ bRet = 2 > nCnt && nullptr == pSh->GetRefMark( rStr );
}
return bRet;
}
@@ -269,14 +269,14 @@ SwFieldType* SwFieldMgr::GetFieldType(sal_uInt16 nResId, size_t nField) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
OSL_ENSURE(pSh, "no SwWrtShell found");
- return pSh ? pSh->GetFieldType(nField, nResId) : 0;
+ return pSh ? pSh->GetFieldType(nField, nResId) : nullptr;
}
SwFieldType* SwFieldMgr::GetFieldType(sal_uInt16 nResId, const OUString& rName) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
OSL_ENSURE(pSh, "no SwWrtShell found");
- return pSh ? pSh->GetFieldType(nResId, rName) : 0;
+ return pSh ? pSh->GetFieldType(nResId, rName) : nullptr;
}
// determine current field
@@ -286,7 +286,7 @@ SwField* SwFieldMgr::GetCurField()
if ( pSh )
pCurField = pSh->GetCurField( true );
else
- pCurField = NULL;
+ pCurField = nullptr;
// initialise strings and format
aCurPar1.clear();
@@ -295,7 +295,7 @@ SwField* SwFieldMgr::GetCurField()
nCurFormat = 0;
if(!pCurField)
- return 0;
+ return nullptr;
// preprocess current values; determine parameter 1 and parameter 2
// as well as the format
@@ -731,7 +731,7 @@ bool SwFieldMgr::GoNextPrev( bool bNext, SwFieldType* pTyp )
if (pTyp && pTyp->Which() == RES_DBFLD)
{
// for fieldcommand-edit (hop to all DB fields)
- return pSh->MoveFieldType( 0, bNext, RES_DBFLD );
+ return pSh->MoveFieldType( nullptr, bNext, RES_DBFLD );
}
return pTyp && pSh && pSh->MoveFieldType( pTyp, bNext );
@@ -756,7 +756,7 @@ sal_uInt16 SwFieldMgr::GetCurTypeId() const
bool SwFieldMgr::InsertField(
const SwInsertField_Data& rData)
{
- SwField* pField = 0;
+ SwField* pField = nullptr;
bool bExp = false;
bool bTable = false;
bool bPageVar = false;
@@ -1255,7 +1255,7 @@ bool SwFieldMgr::InsertField(
case TYP_FORMELFLD:
{
- if(pCurShell->GetFrmType(0,false) & FrmTypeFlags::TABLE)
+ if(pCurShell->GetFrmType(nullptr,false) & FrmTypeFlags::TABLE)
{
pCurShell->StartAllAction();
@@ -1349,7 +1349,7 @@ bool SwFieldMgr::InsertField(
else if( bPageVar )
static_cast<SwRefPageGetFieldType*>(pCurShell->GetFieldType( 0, RES_REFPAGEGETFLD ))->UpdateFields();
else if( TYP_GETREFFLD == rData.m_nTypeId )
- pField->GetTyp()->ModifyNotification( 0, 0 );
+ pField->GetTyp()->ModifyNotification( nullptr, nullptr );
// delete temporary field
delete pField;
@@ -1369,7 +1369,7 @@ void SwFieldMgr::UpdateCurField(sal_uLong nFormat,
bool bDelete = false;
SwField *pTmpField; // mb: fixed memory leak
- if (NULL != _pTmpField)
+ if (nullptr != _pTmpField)
{
pTmpField = _pTmpField;
}
@@ -1538,7 +1538,7 @@ void SwFieldMgr::UpdateCurField(sal_uLong nFormat,
// explicitly evaluate ExpressionFields
void SwFieldMgr::EvalExpFields(SwWrtShell* pSh)
{
- if (pSh == NULL)
+ if (pSh == nullptr)
pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
if(pSh)
diff --git a/sw/source/uibase/fldui/fldwrap.cxx b/sw/source/uibase/fldui/fldwrap.cxx
index bf189929abdb..0501e0e602f3 100644
--- a/sw/source/uibase/fldui/fldwrap.cxx
+++ b/sw/source/uibase/fldui/fldwrap.cxx
@@ -39,7 +39,7 @@ SFX_IMPL_CHILDWINDOW_WITHID(SwFieldDlgWrapper, FN_INSERT_FIELD)
SwChildWinWrapper::SwChildWinWrapper(vcl::Window *pParentWindow, sal_uInt16 nId) :
SfxChildWindow(pParentWindow, nId),
- m_pDocSh(0)
+ m_pDocSh(nullptr)
{
// avoid flickering of buttons:
m_aUpdateTimer.SetTimeout(200);
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index bd3c326429f0..8e6cbdd805d2 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -113,7 +113,7 @@ void SwFlyFrmAttrMgr::UpdateAttrMgr()
void SwFlyFrmAttrMgr::_UpdateFlyFrm()
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if (m_aSet.GetItemState(FN_SET_FRM_NAME, false, &pItem) == SfxItemState::SET)
m_pOwnSh->SetFlyName(static_cast<const SfxStringItem *>(pItem)->GetValue());
@@ -163,7 +163,7 @@ bool SwFlyFrmAttrMgr::InsertFlyFrm()
{
m_pOwnSh->StartAllAction();
- bool bRet = 0 != m_pOwnSh->NewFlyFrm( m_aSet );
+ bool bRet = nullptr != m_pOwnSh->NewFlyFrm( m_aSet );
// turn on the right mode at the shell, frame got selected automatically.
if ( bRet )
@@ -259,7 +259,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
rVal.nVRelOrient,
pToCharContentPos,
rVal.bFollowTextFlow,
- rVal.bMirror, NULL, &rVal.aPercentSize,
+ rVal.bMirror, nullptr, &rVal.aPercentSize,
&rSize);
if (bOnlyPercentRefValue)
diff --git a/sw/source/uibase/inc/PageBreakWin.hxx b/sw/source/uibase/inc/PageBreakWin.hxx
index 23a3a134a0c7..2302966cb991 100644
--- a/sw/source/uibase/inc/PageBreakWin.hxx
+++ b/sw/source/uibase/inc/PageBreakWin.hxx
@@ -42,7 +42,7 @@ public:
virtual void MouseMove( const MouseEvent& rMEvt ) override;
virtual void Activate( ) override;
- void UpdatePosition( const Point* pEvtPt = NULL );
+ void UpdatePosition( const Point* pEvtPt = nullptr );
virtual void ShowAll( bool bShow ) override;
virtual bool Contains( const Point &rDocPt ) const override;
diff --git a/sw/source/uibase/inc/caption.hxx b/sw/source/uibase/inc/caption.hxx
index 9fcb72bc816e..446114af66eb 100644
--- a/sw/source/uibase/inc/caption.hxx
+++ b/sw/source/uibase/inc/caption.hxx
@@ -43,7 +43,7 @@ private:
bool bCopyAttributes; // -""-
public:
- InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = 0);
+ InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = nullptr);
InsCaptionOpt(const InsCaptionOpt&);
~InsCaptionOpt();
diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx
index e6c9793501c7..e21869810765 100644
--- a/sw/source/uibase/inc/cfgitems.hxx
+++ b/sw/source/uibase/inc/cfgitems.hxx
@@ -64,7 +64,7 @@ public:
SwDocDisplayItem( const SwViewOption& rVOpt,
sal_uInt16 nWhich );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void operator=( const SwDocDisplayItem& );
void FillViewOptions( SwViewOption& rVOpt) const;
@@ -95,7 +95,7 @@ public:
SwElemItem(const SwElemItem& rElemItem);
SwElemItem(const SwViewOption& rVOpt, sal_uInt16 nWhich);
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void operator=( const SwElemItem& );
@@ -117,7 +117,7 @@ public:
SwAddPrinterItem( sal_uInt16 nWhich, const SwPrintData& rPrtData );
SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem);
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
@@ -135,7 +135,7 @@ public:
SwShadowCursorItem( const SwShadowCursorItem& rElemItem );
SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 nWhich );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void operator=( const SwShadowCursorItem& );
@@ -173,7 +173,7 @@ public:
SfxPoolItem(_nWhich){};
SwTestItem( const SwTestItem& pTestItem);
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
};
diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx
index 4de3e0a4e913..cc6199355338 100644
--- a/sw/source/uibase/inc/chrdlg.hxx
+++ b/sw/source/uibase/inc/chrdlg.hxx
@@ -50,7 +50,7 @@ class SwCharDlg: public SfxTabDialog
public:
SwCharDlg(vcl::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- sal_uInt8 nDialogMode, const OUString* pFormatStr = 0);
+ sal_uInt8 nDialogMode, const OUString* pFormatStr = nullptr);
virtual ~SwCharDlg();
diff --git a/sw/source/uibase/inc/colex.hxx b/sw/source/uibase/inc/colex.hxx
index 3e5f122ec2fa..76c5ee383af5 100644
--- a/sw/source/uibase/inc/colex.hxx
+++ b/sw/source/uibase/inc/colex.hxx
@@ -56,7 +56,7 @@ protected:
public:
SwPageGridExample(vcl::Window* pPar)
: SwPageExample(pPar)
- , pGridItem(0)
+ , pGridItem(nullptr)
{}
virtual ~SwPageGridExample();
@@ -79,7 +79,7 @@ protected:
public:
SwColExample(vcl::Window* pPar)
: SwPageExample(pPar)
- , pColMgr(0)
+ , pColMgr(nullptr)
{
}
diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx
index 07cd57b3588d..85a20ec1bd77 100644
--- a/sw/source/uibase/inc/content.hxx
+++ b/sw/source/uibase/inc/content.hxx
@@ -99,7 +99,7 @@ public:
long nYPos )
: SwContent(pCnt, rName, nYPos)
, pField(pFormatField)
- , pRedline(NULL)
+ , pRedline(nullptr)
, mbPostIt(true)
{}
SwPostItContent( const SwContentType* pCnt,
@@ -107,7 +107,7 @@ public:
SwRangeRedline* pRed,
long nYPos )
: SwContent(pCnt, rName, nYPos)
- , pField(NULL)
+ , pField(nullptr)
, pRedline(pRed)
, mbPostIt(false)
{}
@@ -167,8 +167,8 @@ public:
SwContentType(SwWrtShell* pParent, ContentTypeId nType, sal_uInt8 nLevel );
virtual ~SwContentType();
- void Init(bool* pbInvalidateWindow = 0);
- void FillMemberList(bool* pbLevelChanged = NULL);
+ void Init(bool* pbInvalidateWindow = nullptr);
+ void FillMemberList(bool* pbLevelChanged = nullptr);
size_t GetMemberCount() const
{return nMemberCount;};
ContentTypeId GetType() const {return nContentType;}
diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx
index a46ec993d541..010b3475b8f0 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -317,7 +317,7 @@ public:
void TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox);
void InsertRegion( const SwGlblDocContent* pCont,
- const OUString* pFileName = 0 );
+ const OUString* pFileName = nullptr );
void EditContent(const SwGlblDocContent* pCont );
void ShowTree();
diff --git a/sw/source/uibase/inc/convert.hxx b/sw/source/uibase/inc/convert.hxx
index 8609c30a003f..cc2ae88e4417 100644
--- a/sw/source/uibase/inc/convert.hxx
+++ b/sw/source/uibase/inc/convert.hxx
@@ -57,8 +57,8 @@ class SwConvertTableDlg: public SfxModalDialog
DECL_LINK_TYPED( AutoFormatHdl, Button*, void );
DECL_LINK_TYPED( BtnHdl, Button*, void );
- DECL_LINK_TYPED( CheckBoxHdl, Button* = 0, void );
- DECL_LINK_TYPED( ReapeatHeaderCheckBoxHdl, Button* = 0, void );
+ DECL_LINK_TYPED( CheckBoxHdl, Button* = nullptr, void );
+ DECL_LINK_TYPED( ReapeatHeaderCheckBoxHdl, Button* = nullptr, void );
public:
SwConvertTableDlg( SwView& rView, bool bToTable );
diff --git a/sw/source/uibase/inc/dbtree.hxx b/sw/source/uibase/inc/dbtree.hxx
index 1e6f69adbb63..c2d3b6236fac 100644
--- a/sw/source/uibase/inc/dbtree.hxx
+++ b/sw/source/uibase/inc/dbtree.hxx
@@ -57,7 +57,7 @@ public:
virtual void dispose() override;
virtual Size GetOptimalSize() const override;
- OUString GetDBName( OUString& rTableName, OUString& rColumnName, sal_Bool* pbIsTable = 0);
+ OUString GetDBName( OUString& rTableName, OUString& rColumnName, sal_Bool* pbIsTable = nullptr);
void Select( const OUString& rDBName, const OUString& rTableName,
const OUString& rColumnName );
diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx
index 5e8f7571e06e..56cc43888832 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -156,7 +156,7 @@ friend void PageNumNotify( SwViewShell* pVwSh,
void DropCleanup();
void CleanupDropUserMarker();
SotExchangeDest GetDropDestination( const Point& rPixPnt,
- SdrObject ** ppObj = 0 );
+ SdrObject ** ppObj = nullptr );
//select the object/cursor at the mouse position of the context menu request
bool SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos );
diff --git a/sw/source/uibase/inc/envimg.hxx b/sw/source/uibase/inc/envimg.hxx
index 66fd1438e9fc..62dc0bcc2d7e 100644
--- a/sw/source/uibase/inc/envimg.hxx
+++ b/sw/source/uibase/inc/envimg.hxx
@@ -62,7 +62,7 @@ public:
virtual bool operator ==(const SfxPoolItem& rItem) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = 0) const override;
+ virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
};
diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx
index b8ab936ce842..ca2e7a1ae400 100644
--- a/sw/source/uibase/inc/envlop.hxx
+++ b/sw/source/uibase/inc/envlop.hxx
@@ -109,7 +109,7 @@ public:
static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- virtual sfxpg DeactivatePage(SfxItemSet* pSet = 0) override;
+ virtual sfxpg DeactivatePage(SfxItemSet* pSet = nullptr) override;
void FillItem(SwEnvItem& rItem);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx
index 5beab7aac8cf..a8bdfc427c8e 100644
--- a/sw/source/uibase/inc/fldmgr.hxx
+++ b/sw/source/uibase/inc/fldmgr.hxx
@@ -79,7 +79,7 @@ struct SwInsertField_Data
VclPtr<vcl::Window> m_pParent; // parent dialog used for SwWrtShell::StartInputFieldDlg()
SwInsertField_Data(sal_uInt16 nType, sal_uInt16 nSub, const OUString& rPar1, const OUString& rPar2,
- sal_uLong nFormatId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', bool bIsAutoLanguage = true) :
+ sal_uLong nFormatId, SwWrtShell* pShell = nullptr, sal_Unicode cSep = ' ', bool bIsAutoLanguage = true) :
m_nTypeId(nType),
m_nSubType(nSub),
m_sPar1(rPar1),
@@ -88,10 +88,10 @@ struct SwInsertField_Data
m_pSh(pShell),
m_cSeparator(cSep),
m_bIsAutomaticLanguage(bIsAutoLanguage),
- m_pParent(0) {}
+ m_pParent(nullptr) {}
SwInsertField_Data() :
- m_pSh(0),
+ m_pSh(nullptr),
m_cSeparator(' '),
m_bIsAutomaticLanguage(true){}
};
@@ -120,7 +120,7 @@ private:
SAL_DLLPRIVATE css::uno::Reference<css::text::XNumberingTypeInfo> GetNumberingInfo()const;
public:
- explicit SwFieldMgr(SwWrtShell* pSh = 0);
+ explicit SwFieldMgr(SwWrtShell* pSh = nullptr);
~SwFieldMgr();
void SetWrtShell( SwWrtShell* pShell )
@@ -133,7 +133,7 @@ public:
void UpdateCurField(sal_uLong nFormat,
const OUString& rPar1,
const OUString& rPar2,
- SwField * _pField = 0);
+ SwField * _pField = nullptr);
OUString GetCurFieldPar1() const { return aCurPar1; }
OUString GetCurFieldPar2() const { return aCurPar2; }
@@ -149,9 +149,9 @@ public:
inline OUString GetMacroName() const { return sMacroName; }
// previous and next of the same type
- bool GoNextPrev( bool bNext = true, SwFieldType* pTyp = 0 );
- bool GoNext( SwFieldType* pTyp = 0 ) { return GoNextPrev( true, pTyp ); }
- bool GoPrev( SwFieldType* pTyp = 0 ) { return GoNextPrev( false, pTyp ); }
+ bool GoNextPrev( bool bNext = true, SwFieldType* pTyp = nullptr );
+ bool GoNext( SwFieldType* pTyp = nullptr ) { return GoNextPrev( true, pTyp ); }
+ bool GoPrev( SwFieldType* pTyp = nullptr ) { return GoNextPrev( false, pTyp ); }
bool IsDBNumeric(const OUString& rDBName, const OUString& rTableQryName,
bool bIsTable, const OUString& rFieldName);
@@ -189,13 +189,13 @@ public:
sal_uInt16 GetFormatCount(sal_uInt16 nTypeId, bool bIsText, bool bHtmlMode = false) const;
OUString GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const;
sal_uInt16 GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const;
- sal_uLong GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberFormatter* pFormatter, double* pVal = 0L);
+ sal_uLong GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberFormatter* pFormatter, double* pVal = nullptr);
// turn off evaluation of expression fields for insertation
// of many expressino fields (see labels)
inline void SetEvalExpFields(bool bEval);
- void EvalExpFields(SwWrtShell* pSh = NULL);
+ void EvalExpFields(SwWrtShell* pSh = nullptr);
};
inline void SwFieldMgr::SetEvalExpFields(bool bEval)
diff --git a/sw/source/uibase/inc/frmdlg.hxx b/sw/source/uibase/inc/frmdlg.hxx
index 8b95826a1b98..387ba8853498 100644
--- a/sw/source/uibase/inc/frmdlg.hxx
+++ b/sw/source/uibase/inc/frmdlg.hxx
@@ -56,7 +56,7 @@ public:
const OUString& sResType = OUString("FrameDialog"),
bool bFormat = false,
const OString& sDefPage = OString(),
- const OUString* pFormatStr = 0);
+ const OUString* pFormatStr = nullptr);
virtual ~SwFrmDlg();
diff --git a/sw/source/uibase/inc/gloshdl.hxx b/sw/source/uibase/inc/gloshdl.hxx
index 1a70091903e2..6d23af7f20e1 100644
--- a/sw/source/uibase/inc/gloshdl.hxx
+++ b/sw/source/uibase/inc/gloshdl.hxx
@@ -45,7 +45,7 @@ public:
void GlossaryDlg();
size_t GetGroupCnt() const;
- OUString GetGroupName( size_t, OUString* pTitle = 0 );
+ OUString GetGroupName( size_t, OUString* pTitle = nullptr );
bool NewGroup(OUString & rGroupName, const OUString& rTitle);
bool DelGroup(const OUString &);
bool RenameGroup(const OUString& rOld, OUString& rNew, const OUString& rNewTitle);
@@ -74,13 +74,13 @@ public:
void SetMacros(const OUString& rName,
const SvxMacro* pStart,
const SvxMacro* pEnd,
- SwTextBlocks *pGlossary = 0 );
+ SwTextBlocks *pGlossary = nullptr );
void GetMacros(const OUString& rShortName,
SvxMacro& rStart,
SvxMacro& rEnd,
- SwTextBlocks* pGlossary = 0 );
+ SwTextBlocks* pGlossary = nullptr );
- bool IsReadOnly( const OUString* = 0 ) const;
+ bool IsReadOnly( const OUString* = nullptr ) const;
bool IsOld() const;
bool FindGroupName(OUString& rGroup); // find group without path index
diff --git a/sw/source/uibase/inc/instable.hxx b/sw/source/uibase/inc/instable.hxx
index a838a89c1122..bd84cdd5103a 100644
--- a/sw/source/uibase/inc/instable.hxx
+++ b/sw/source/uibase/inc/instable.hxx
@@ -59,8 +59,8 @@ class SwInsTableDlg : public SfxModalDialog
DECL_LINK_TYPED( ModifyRowCol, Edit&, void );
DECL_LINK_TYPED( AutoFormatHdl, Button*, void );
DECL_LINK_TYPED( OKHdl, Button*, void);
- DECL_LINK_TYPED( CheckBoxHdl, Button* = 0, void);
- DECL_LINK_TYPED( ReapeatHeaderCheckBoxHdl, Button* = 0, void);
+ DECL_LINK_TYPED( CheckBoxHdl, Button* = nullptr, void);
+ DECL_LINK_TYPED( ReapeatHeaderCheckBoxHdl, Button* = nullptr, void);
DECL_LINK_TYPED( ModifyRepeatHeaderNF_Hdl, Edit&, void );
public:
diff --git a/sw/source/uibase/inc/labimg.hxx b/sw/source/uibase/inc/labimg.hxx
index 4207c38b8b8e..4a11b248020c 100644
--- a/sw/source/uibase/inc/labimg.hxx
+++ b/sw/source/uibase/inc/labimg.hxx
@@ -38,7 +38,7 @@ public:
virtual bool operator ==(const SfxPoolItem& rItem) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = 0) const override;
+ virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
OUString m_aLstMake; // remember last selection
OUString m_aLstType;
diff --git a/sw/source/uibase/inc/linenum.hxx b/sw/source/uibase/inc/linenum.hxx
index 7db3ed8fdb85..f12e8e886794 100644
--- a/sw/source/uibase/inc/linenum.hxx
+++ b/sw/source/uibase/inc/linenum.hxx
@@ -49,7 +49,7 @@ private:
VclPtr<CheckBox> m_pNumberingOnCB;
VclPtr<CheckBox> m_pNumberingOnFooterHeader;
DECL_LINK_TYPED(OKHdl, Button*, void);
- DECL_LINK_TYPED(LineOnOffHdl, Button* = 0, void);
+ DECL_LINK_TYPED(LineOnOffHdl, Button* = nullptr, void);
DECL_LINK_TYPED(ModifyHdl, Edit&, void);
public:
diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx
index a1cdbf66f2a9..b8613a78a153 100644
--- a/sw/source/uibase/inc/mailmergehelper.hxx
+++ b/sw/source/uibase/inc/mailmergehelper.hxx
@@ -50,7 +50,7 @@ namespace SwMailMergeHelper
css::uno::Reference<css::mail::XMailService>& xInMailService,
const OUString& rInMailServerPassword,
const OUString& rOutMailServerPassword,
- vcl::Window* pDialogParentWindow = 0);
+ vcl::Window* pDialogParentWindow = nullptr);
}
struct SwAddressPreview_Impl;
@@ -107,7 +107,7 @@ public:
// fill the actual data into a string (address block or greeting)
static OUString FillData(const OUString& rAddress, SwMailMergeConfigItem& rConfigItem,
- const css::uno::Sequence<OUString>* pAssignments = 0);
+ const css::uno::Sequence<OUString>* pAssignments = nullptr);
void SetSelectHdl (const Link<LinkParamNone*,void>& rLink) { m_aSelectHdl = rLink; }
};
@@ -146,7 +146,7 @@ class SW_DLLPUBLIC SwAuthenticator :
VclPtr<vcl::Window> m_pParentWindow;
public:
SwAuthenticator()
- : m_pParentWindow(0)
+ : m_pParentWindow(nullptr)
{}
SwAuthenticator(const OUString& username, const OUString& password, vcl::Window* pParent)
: m_aUserName(username)
diff --git a/sw/source/uibase/inc/mailmrge.hxx b/sw/source/uibase/inc/mailmrge.hxx
index b0ab3ba771e0..f4d1aae66ce2 100644
--- a/sw/source/uibase/inc/mailmrge.hxx
+++ b/sw/source/uibase/inc/mailmrge.hxx
@@ -120,7 +120,7 @@ public:
const OUString& rTableName,
sal_Int32 nCommandType,
const css::uno::Reference< css::sdbc::XConnection>& xConnection,
- css::uno::Sequence< css::uno::Any >* pSelection = 0);
+ css::uno::Sequence< css::uno::Any >* pSelection = nullptr);
virtual ~SwMailMergeDlg();
virtual void dispose() override;
diff --git a/sw/source/uibase/inc/numpara.hxx b/sw/source/uibase/inc/numpara.hxx
index 741d6dfcce57..6b794a724d13 100644
--- a/sw/source/uibase/inc/numpara.hxx
+++ b/sw/source/uibase/inc/numpara.hxx
@@ -64,7 +64,7 @@ class SwParagraphNumTabPage : public SfxTabPage
protected:
static bool ExecuteEditNumStyle_Impl( sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr,
sal_uInt16 nFamily, sal_uInt16 nMask = 0,
- const sal_uInt16* pModifier = NULL );
+ const sal_uInt16* pModifier = nullptr );
public:
SwParagraphNumTabPage(vcl::Window* pParent, const SfxItemSet& rSet );
diff --git a/sw/source/uibase/inc/numprevw.hxx b/sw/source/uibase/inc/numprevw.hxx
index 1fae3ac8ab32..0792b6090c69 100644
--- a/sw/source/uibase/inc/numprevw.hxx
+++ b/sw/source/uibase/inc/numprevw.hxx
@@ -40,14 +40,14 @@ class NumberingPreview : public vcl::Window
public:
NumberingPreview(vcl::Window* pParent, const ResId& rResId)
: Window(pParent, rResId),
- pActNum(0),nPageWidth(0), pOutlineNames(0),
+ pActNum(nullptr),nPageWidth(0), pOutlineNames(nullptr),
bPosition(false), nActLevel(USHRT_MAX)
{
}
NumberingPreview(vcl::Window* pParent)
: Window(pParent)
- , pActNum(0),nPageWidth(0), pOutlineNames(0),
+ , pActNum(nullptr),nPageWidth(0), pOutlineNames(nullptr),
bPosition(false), nActLevel(USHRT_MAX)
{
}
diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx
index c05902aeb1e4..162357a0133b 100644
--- a/sw/source/uibase/inc/optload.hxx
+++ b/sw/source/uibase/inc/optload.hxx
@@ -161,7 +161,7 @@ private:
DECL_LINK_TYPED(SaveEntryHdl, SvTreeListBox*, void);
void DelUserData();
- void SetOptions(const sal_uLong nPos, const SwCapObjType eType, const SvGlobalName *pOleId = 0);
+ void SetOptions(const sal_uLong nPos, const SwCapObjType eType, const SvGlobalName *pOleId = nullptr);
void SaveEntry(SvTreeListEntry* pEntry);
void InvalidatePreview();
diff --git a/sw/source/uibase/inc/pgfnote.hxx b/sw/source/uibase/inc/pgfnote.hxx
index 4ea911d56ef2..fcb35a1a4eb4 100644
--- a/sw/source/uibase/inc/pgfnote.hxx
+++ b/sw/source/uibase/inc/pgfnote.hxx
@@ -69,7 +69,7 @@ private:
using SfxTabPage::DeactivatePage;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
};
diff --git a/sw/source/uibase/inc/pggrid.hxx b/sw/source/uibase/inc/pggrid.hxx
index 56ef67b36131..d57c3f2bd5a0 100644
--- a/sw/source/uibase/inc/pggrid.hxx
+++ b/sw/source/uibase/inc/pggrid.hxx
@@ -95,7 +95,7 @@ public:
virtual void Reset(const SfxItemSet *rSet) override;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
};
#endif
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index a59f37f87f23..88af21b6da6a 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -192,7 +192,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
bool mbResetFormDesignMode:1;
bool mbFormDesignModeToReset:1;
- SAL_DLLPRIVATE void Init(const SwViewOption* = 0);
+ SAL_DLLPRIVATE void Init(const SwViewOption* = nullptr);
SAL_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
SAL_DLLPRIVATE int _CreateScrollbar( bool bHori);
@@ -217,7 +217,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
optional input parameter - pointer to the <SfxRequest> instance, if existing.
*/
SAL_DLLPRIVATE void _ExecPgUpAndPgDown( const bool _bPgUp,
- SfxRequest* _pReq = 0 );
+ SfxRequest* _pReq = nullptr );
protected:
virtual void InnerResizePixel( const Point &rOfs, const Size &rSize ) override;
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index f615299e7285..fa4453ddc60e 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -126,7 +126,7 @@ class SwEditRegionDlg : public SfxModalDialog
DECL_LINK_TYPED( DlgClosedHdl, sfx2::FileDialogHelper*, void );
DECL_LINK_TYPED( SubRegionEventHdl, VclWindowEvent&, void );
- bool CheckPasswd(CheckBox* pBox = 0);
+ bool CheckPasswd(CheckBox* pBox = nullptr);
public:
SwEditRegionDlg( vcl::Window* pParent, SwWrtShell& rWrtSh );
diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx
index d8d6d34be93a..09a436689275 100644
--- a/sw/source/uibase/inc/srcedtw.hxx
+++ b/sw/source/uibase/inc/srcedtw.hxx
@@ -53,7 +53,7 @@ protected:
public:
TextViewOutWin(vcl::Window* pParent, WinBits nBits) :
- Window(pParent, nBits), pTextView(0){}
+ Window(pParent, nBits), pTextView(nullptr){}
void SetTextView( ExtTextView* pView ) {pTextView = pView;}
diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx
index b755b7bc9ef1..4b8b238a7a02 100644
--- a/sw/source/uibase/inc/swdtflvr.hxx
+++ b/sw/source/uibase/inc/swdtflvr.hxx
@@ -85,7 +85,7 @@ class SW_DLLPUBLIC SwTransferable : public TransferableHelper
static SwTransferable* GetSwTransferable( const TransferableDataHelper& rData );
static void SetSelInShell( SwWrtShell& , bool , const Point* );
static bool _CheckForURLOrLNKFile( TransferableDataHelper& rData,
- OUString& rFileName, OUString* pTitle = 0 );
+ OUString& rFileName, OUString* pTitle = nullptr );
static bool _TestAllowedFormat( const TransferableDataHelper& rData,
SotClipboardFormatId nFormat, SotExchangeDest nDestination );
@@ -150,7 +150,7 @@ public:
SwTransferable( SwWrtShell& );
virtual ~SwTransferable();
- static SotExchangeDest GetSotDestination( const SwWrtShell& rSh, const Point* = 0 );
+ static SotExchangeDest GetSotDestination( const SwWrtShell& rSh, const Point* = nullptr );
// set properties on the document, like PageMargin, VisArea.
// And set real Size
@@ -173,7 +173,7 @@ public:
SwWrtShell& rSh, sal_uInt16 nAction, SotClipboardFormatId nFormat,
SotExchangeDest nDestination, bool bIsPasteFormat,
bool bIsDefault,
- const Point* pDDPos = 0, sal_Int8 nDropAction = 0,
+ const Point* pDDPos = nullptr, sal_Int8 nDropAction = 0,
bool bPasteSelection = false );
static bool IsPasteSpecial( const SwWrtShell& rWrtShell,
@@ -196,12 +196,12 @@ public:
// Interfaces for Selection
/* #96392# Added pCreator to distinguish SwFrameShell from SwWrtShell. */
static void CreateSelection( SwWrtShell & rSh,
- const SwFrameShell * pCreator = NULL );
+ const SwFrameShell * pCreator = nullptr );
static void ClearSelection( SwWrtShell& rSh,
- const SwFrameShell * pCreator = NULL );
+ const SwFrameShell * pCreator = nullptr );
// the related SwView is being closed and the SwTransferable is invalid now
- void Invalidate() {m_pWrtShell = 0;}
+ void Invalidate() {m_pWrtShell = nullptr;}
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) throw( css::uno::RuntimeException, std::exception ) override;
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index 50847c0889ba..29aabdf5d4f0 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -228,7 +228,7 @@ public:
virtual void Reset( const SfxItemSet* ) override;
virtual void ActivatePage( const SfxItemSet& ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
@@ -443,7 +443,7 @@ public:
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
virtual void ActivatePage( const SfxItemSet& ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
@@ -491,7 +491,7 @@ public:
virtual void Reset( const SfxItemSet* ) override;
virtual void ActivatePage( const SfxItemSet& ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet);
diff --git a/sw/source/uibase/inc/swuiidxmrk.hxx b/sw/source/uibase/inc/swuiidxmrk.hxx
index 86bc063acd57..90d49fe10485 100644
--- a/sw/source/uibase/inc/swuiidxmrk.hxx
+++ b/sw/source/uibase/inc/swuiidxmrk.hxx
@@ -145,7 +145,7 @@ public:
~SwIndexMarkPane();
- void ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark = 0);
+ void ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark = nullptr);
bool IsTOXType(const OUString& rName)
{return LISTBOX_ENTRY_NOTFOUND != m_pTypeDCB->GetEntryPos(rName);}
};
diff --git a/sw/source/uibase/inc/swuipardlg.hxx b/sw/source/uibase/inc/swuipardlg.hxx
index 874c090c5f93..4fb29dc5a52c 100644
--- a/sw/source/uibase/inc/swuipardlg.hxx
+++ b/sw/source/uibase/inc/swuipardlg.hxx
@@ -44,7 +44,7 @@ public:
SwView& rVw,
const SfxItemSet&,
sal_uInt8 nDialogMode,
- const OUString *pCollName = 0,
+ const OUString *pCollName = nullptr,
bool bDraw = false,
const OString& sDefPage = OString());
virtual ~SwParaDlg();
diff --git a/sw/source/uibase/inc/swwrtshitem.hxx b/sw/source/uibase/inc/swwrtshitem.hxx
index 99c678764c75..a0474a77c1a2 100644
--- a/sw/source/uibase/inc/swwrtshitem.hxx
+++ b/sw/source/uibase/inc/swwrtshitem.hxx
@@ -34,7 +34,7 @@ public:
SwWrtShellItem( const SwWrtShellItem& );
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
SwWrtShell* GetValue() const { return pWrtSh; }
diff --git a/sw/source/uibase/inc/tablemgr.hxx b/sw/source/uibase/inc/tablemgr.hxx
index 796b5c0dce5b..eb512826605b 100644
--- a/sw/source/uibase/inc/tablemgr.hxx
+++ b/sw/source/uibase/inc/tablemgr.hxx
@@ -69,12 +69,12 @@ public:
/// @return the XModel of the newly inserted chart if successful
css::uno::Reference< css::frame::XModel >
- InsertChart( css::uno::Reference< css::chart2::data::XDataProvider > &rxDataProvider, bool bFillWithData, const OUString &rCellRange, SwFlyFrameFormat** ppFlyFrameFormat = 0 );
+ InsertChart( css::uno::Reference< css::chart2::data::XDataProvider > &rxDataProvider, bool bFillWithData, const OUString &rCellRange, SwFlyFrameFormat** ppFlyFrameFormat = nullptr );
};
inline SwTableFUNC::SwTableFUNC(SwFrameFormat &rFormat) :
pFormat(&rFormat),
- pSh(0),
+ pSh(nullptr),
bCopy(false)
{
}
diff --git a/sw/source/uibase/inc/tautofmt.hxx b/sw/source/uibase/inc/tautofmt.hxx
index 523f1aebd052..24fb0e6041b8 100644
--- a/sw/source/uibase/inc/tautofmt.hxx
+++ b/sw/source/uibase/inc/tautofmt.hxx
@@ -80,7 +80,7 @@ class SwAutoFormatDlg : public SfxModalDialog
public:
SwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pShell,
bool bSetAutoFormat = true,
- const SwTableAutoFormat* pSelFormat = 0 );
+ const SwTableAutoFormat* pSelFormat = nullptr );
virtual ~SwAutoFormatDlg();
virtual void dispose() override;
diff --git a/sw/source/uibase/inc/tmpdlg.hxx b/sw/source/uibase/inc/tmpdlg.hxx
index db280d42c315..b339757b7554 100644
--- a/sw/source/uibase/inc/tmpdlg.hxx
+++ b/sw/source/uibase/inc/tmpdlg.hxx
@@ -73,7 +73,7 @@ public:
SfxStyleSheetBase& rBase,
sal_uInt16 nRegion,
const OString& sPage = OString(),
- SwWrtShell* pActShell = 0,
+ SwWrtShell* pActShell = nullptr,
bool bNew = false );
virtual void RefreshInputSet() override;
diff --git a/sw/source/uibase/inc/toxmgr.hxx b/sw/source/uibase/inc/toxmgr.hxx
index 48bb27406b88..d9c57bf22ed5 100644
--- a/sw/source/uibase/inc/toxmgr.hxx
+++ b/sw/source/uibase/inc/toxmgr.hxx
@@ -68,9 +68,9 @@ public:
// single argument ctors shall be explicit.
explicit SwTOXDescription(TOXTypes eType) :
eTOXType(eType),
- pTitle(0),
- pTOUName(0),
- pForm(0),
+ pTitle(nullptr),
+ pTOUName(nullptr),
+ pForm(nullptr),
nContent(nsSwTOXElement::TOX_MARK | nsSwTOXElement::TOX_OUTLINELEVEL),
nIndexOptions(nsSwTOIOptions::TOI_SAME_ENTRY|nsSwTOIOptions::TOI_FF|nsSwTOIOptions::TOI_CASE_SENSITIVE),
nOLEOptions(0),
@@ -194,13 +194,13 @@ public:
eTOXType(eType),
nLevel(0),
bMainEntry(false),
- pPrimKey(0),
- pSecKey(0),
- pAltStr(0),
- pTOUName(0),
- pPhoneticReadingOfAltStr(0),
- pPhoneticReadingOfPrimKey(0),
- pPhoneticReadingOfSecKey(0)
+ pPrimKey(nullptr),
+ pSecKey(nullptr),
+ pAltStr(nullptr),
+ pTOUName(nullptr),
+ pPhoneticReadingOfAltStr(nullptr),
+ pPhoneticReadingOfPrimKey(nullptr),
+ pPhoneticReadingOfSecKey(nullptr)
{
}
~SwTOXMarkDescription()
@@ -282,7 +282,7 @@ public:
// methods for directories
- bool UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = 0, const SfxItemSet* pSet = 0);
+ bool UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = nullptr, const SfxItemSet* pSet = nullptr);
const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const;
const SwTOXBase* GetCurTOX();
diff --git a/sw/source/uibase/inc/uiitems.hxx b/sw/source/uibase/inc/uiitems.hxx
index 1e573e915344..a1b4414f5c66 100644
--- a/sw/source/uibase/inc/uiitems.hxx
+++ b/sw/source/uibase/inc/uiitems.hxx
@@ -39,13 +39,13 @@ public:
SwPageFootnoteInfoItem(const SwPageFootnoteInfoItem& rItem );
virtual ~SwPageFootnoteInfoItem();
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper* pIntl = 0 ) const override;
+ const IntlWrapper* pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
@@ -59,10 +59,10 @@ class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem
void* pMisc;
public:
- SwPtrItem( const sal_uInt16 nId = FN_PARAM_GRF_DIALOG, void* pPtr = 0);
+ SwPtrItem( const sal_uInt16 nId = FN_PARAM_GRF_DIALOG, void* pPtr = nullptr);
SwPtrItem( const SwPtrItem& rItem );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void* GetValue() const { return pMisc; }
@@ -77,7 +77,7 @@ public:
SwUINumRuleItem( const SwUINumRuleItem& rItem );
virtual ~SwUINumRuleItem();
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
@@ -92,7 +92,7 @@ class SwBackgroundDestinationItem : public SfxUInt16Item
public:
SwBackgroundDestinationItem(sal_uInt16 nWhich, sal_uInt16 nValue);
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class SW_DLLPUBLIC SwPaMItem : public SfxPoolItem
@@ -100,10 +100,10 @@ class SW_DLLPUBLIC SwPaMItem : public SfxPoolItem
SwPaM* m_pPaM;
public:
- SwPaMItem( const sal_uInt16 nId = FN_PARAM_PAM, SwPaM* pPaM = NULL);
+ SwPaMItem( const sal_uInt16 nId = FN_PARAM_PAM, SwPaM* pPaM = nullptr);
SwPaMItem( const SwPaMItem& rItem );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
SwPaM* GetValue() const { return m_pPaM; }
diff --git a/sw/source/uibase/inc/uivwimp.hxx b/sw/source/uibase/inc/uivwimp.hxx
index b95cb12f6d80..3ae07ead1bd2 100644
--- a/sw/source/uibase/inc/uivwimp.hxx
+++ b/sw/source/uibase/inc/uivwimp.hxx
@@ -59,7 +59,7 @@ public:
virtual void SAL_CALL disposing(
const css::lang::EventObject& rEventObject ) throw(css::uno::RuntimeException, std::exception) override;
- void ViewDestroyed() { pView = 0; }
+ void ViewDestroyed() { pView = nullptr; }
};
// Clipboard EventListener
@@ -81,7 +81,7 @@ public:
SwClipboardChangeListener( SwView& rView ) : pView( &rView ) {}
virtual ~SwClipboardChangeListener();
- void ViewDestroyed() { pView = 0; }
+ void ViewDestroyed() { pView = nullptr; }
void AddRemoveListener( bool bAdd );
};
diff --git a/sw/source/uibase/inc/unoatxt.hxx b/sw/source/uibase/inc/unoatxt.hxx
index b8c57ad10c9a..75924b8ea62d 100644
--- a/sw/source/uibase/inc/unoatxt.hxx
+++ b/sw/source/uibase/inc/unoatxt.hxx
@@ -232,7 +232,7 @@ public:
// XEventsSupplier
virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents( ) throw( css::uno::RuntimeException, std::exception ) override;
- void Invalidate() {pGlossaries = 0;}
+ void Invalidate() {pGlossaries = nullptr;}
const SwGlossaries* GetGlossaries() { return pGlossaries; }
const OUString& GetGroupName() {return sGroupName;}
const OUString& GetEntryName() {return sEntryName;}
diff --git a/sw/source/uibase/inc/unomod.hxx b/sw/source/uibase/inc/unomod.hxx
index 630f40c463b9..055167216cad 100644
--- a/sw/source/uibase/inc/unomod.hxx
+++ b/sw/source/uibase/inc/unomod.hxx
@@ -114,7 +114,7 @@ protected:
virtual ~SwXPrintSettings()
throw();
public:
- SwXPrintSettings( SwXPrintSettingsType eType, SwDoc * pDoc = NULL );
+ SwXPrintSettings( SwXPrintSettingsType eType, SwDoc * pDoc = nullptr );
//XServiceInfo
virtual OUString SAL_CALL getImplementationName()
diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx
index 5e37a4ce2f96..4164dd6dfe6d 100644
--- a/sw/source/uibase/inc/unotools.hxx
+++ b/sw/source/uibase/inc/unotools.hxx
@@ -98,8 +98,8 @@ class SW_DLLPUBLIC SwOneExampleFrame
public:
SwOneExampleFrame(vcl::Window& rWin,
sal_uInt32 nStyleFlags = EX_SHOW_ONLINE_LAYOUT,
- const Link<SwOneExampleFrame&,void>* pInitalizedLink = 0,
- const OUString* pURL = 0);
+ const Link<SwOneExampleFrame&,void>* pInitalizedLink = nullptr,
+ const OUString* pURL = nullptr);
~SwOneExampleFrame();
css::uno::Reference< css::frame::XModel > & GetModel() {return _xModel;}
diff --git a/sw/source/uibase/inc/unotxvw.hxx b/sw/source/uibase/inc/unotxvw.hxx
index f94a55f31482..d95c8e635b57 100644
--- a/sw/source/uibase/inc/unotxvw.hxx
+++ b/sw/source/uibase/inc/unotxvw.hxx
@@ -322,7 +322,7 @@ public:
//XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException, std::exception) override;
- void Invalidate(){m_pView = 0;}
+ void Invalidate(){m_pView = nullptr;}
// ITextCursorHelper
virtual const SwPaM* GetPaM() const override;
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index ef2f1c934be2..4fef61f60165 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -115,7 +115,7 @@ public:
inline void ResetCursorStack();
SelectionType GetSelectionType() const;
- bool IsModePushed() const { return 0 != m_pModeStack; }
+ bool IsModePushed() const { return nullptr != m_pModeStack; }
void PushMode();
void PopMode();
@@ -151,7 +151,7 @@ public:
bool IsInsMode() const { return m_bIns; }
void SetRedlineModeAndCheckInsMode( sal_uInt16 eMode );
- void EnterSelFrmMode(const Point *pStartDrag = 0);
+ void EnterSelFrmMode(const Point *pStartDrag = nullptr);
void LeaveSelFrmMode();
bool IsSelFrmMode() const { return m_bLayoutMode; }
// reset selection of frames
@@ -177,10 +177,10 @@ public:
// select word / sentence
bool SelNearestWrd();
- bool SelWrd (const Point * = 0, bool bProp=false );
+ bool SelWrd (const Point * = nullptr, bool bProp=false );
// #i32329# Enhanced selection
- void SelSentence (const Point * = 0, bool bProp=false );
- void SelPara (const Point * = 0, bool bProp=false );
+ void SelSentence (const Point * = nullptr, bool bProp=false );
+ void SelPara (const Point * = nullptr, bool bProp=false );
long SelAll();
// basecursortravelling
@@ -220,12 +220,12 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
{ return SimpleMove( &SwWrtShell::_BwdSentence, bSelect ); }
// #i20126# Enhanced table selection
- bool SelectTableRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
+ bool SelectTableRowCol( const Point& rPt, const Point* pEnd = nullptr, bool bRowDrag = false );
bool SelectTableRow();
bool SelectTableCol();
bool SelectTableCell();
- bool SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr = 0 );
+ bool SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr = nullptr );
// per column jumps
bool StartOfColumn ( bool bSelect = false );
@@ -247,7 +247,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
bool PageCrsr(SwTwips lOffset, bool bSelect);
// update fields
- void UpdateInputFields( SwInputFieldList* pLst = 0 );
+ void UpdateInputFields( SwInputFieldList* pLst = nullptr );
void NoEdit(bool bHideCrsr = true);
void Edit();
@@ -290,11 +290,11 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
void Insert(const OUString &);
// graphic
void Insert( const OUString &rPath, const OUString &rFilter,
- const Graphic &, SwFlyFrmAttrMgr * = 0,
+ const Graphic &, SwFlyFrmAttrMgr * = nullptr,
bool bRule = false );
void InsertByWord( const OUString & );
- void InsertPageBreak(const OUString *pPageDesc = 0, const ::boost::optional<sal_uInt16>& rPgNum = boost::none);
+ void InsertPageBreak(const OUString *pPageDesc = nullptr, const ::boost::optional<sal_uInt16>& rPgNum = boost::none);
void InsertLineBreak();
void InsertColumnBreak();
void InsertFootnote(const OUString &, bool bEndNote = false, bool bEdit = true );
@@ -302,8 +302,8 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
bool CanInsert();
// indexes
- void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
- bool UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
+ void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = nullptr);
+ bool UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = nullptr);
// numbering and bullets
/**
@@ -320,16 +320,16 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
//OLE
void InsertObject( /*SvInPlaceObjectRef *pObj, */ // != 0 for clipboard
const svt::EmbeddedObjectRef&,
- SvGlobalName *pName = 0, // != 0 create object accordingly
+ SvGlobalName *pName = nullptr, // != 0 create object accordingly
bool bActivate = true,
sal_uInt16 nSlotId = 0); // SlotId for dialog
- bool InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrameFormat **pFlyFrameFormat = 0 );
+ bool InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrameFormat **pFlyFrameFormat = nullptr );
void LaunchOLEObj( long nVerb = 0 ); // start server
virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset ) override;
virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
- const SwRect *pFlyPrtRect = 0,
- const SwRect *pFlyFrmRect = 0,
+ const SwRect *pFlyPrtRect = nullptr,
+ const SwRect *pFlyFrmRect = nullptr,
const bool bNoTextFrmPrtAreaChanged = false ) override;
virtual void ConnectObj( svt::EmbeddedObjectRef& xIPObj, const SwRect &rPrt,
const SwRect &rFrm ) override;
@@ -371,14 +371,14 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
sal_uLong SearchTempl (const OUString &rTempl,
SwDocPositions eStart, SwDocPositions eEnd,
FindRanges eFlags = FND_IN_BODY,
- const OUString* pReplTempl = 0 );
+ const OUString* pReplTempl = nullptr );
sal_uLong SearchAttr (const SfxItemSet& rFindSet,
bool bNoColls,
SwDocPositions eStart, SwDocPositions eEnd,
FindRanges eFlags = FND_IN_BODY,
- const css::util::SearchOptions* pSearchOpt = 0,
- const SfxItemSet* pReplaceSet = 0);
+ const css::util::SearchOptions* pSearchOpt = nullptr,
+ const SfxItemSet* pReplaceSet = nullptr);
void AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar );
@@ -387,9 +387,9 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
void MoveCrsr( bool bWithSelect = false );
// update input fields
- bool StartInputFieldDlg(SwField*, bool bNextButton, vcl::Window* pParentWin = 0, OString* pWindowState = 0);
+ bool StartInputFieldDlg(SwField*, bool bNextButton, vcl::Window* pParentWin = nullptr, OString* pWindowState = nullptr);
// update DropDown fields
- bool StartDropDownFieldDlg(SwField*, bool bNextButton, OString* pWindowState = 0);
+ bool StartDropDownFieldDlg(SwField*, bool bNextButton, OString* pWindowState = nullptr);
//"Handler" for changes at DrawView - for controls.
virtual void DrawSelChanged( ) override;
@@ -414,10 +414,10 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
SwView& GetView() { return m_rView; }
// Because nobody else is doing it, here is a ExecMacro()
- void ExecMacro( const SvxMacro& rMacro, OUString* pRet = 0, SbxArray* pArgs = 0 );
+ void ExecMacro( const SvxMacro& rMacro, OUString* pRet = nullptr, SbxArray* pArgs = nullptr );
// call into the dark Basic/JavaScript
sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
- bool bCheckPtr = false, SbxArray* pArgs = 0 );
+ bool bCheckPtr = false, SbxArray* pArgs = nullptr );
// a click at the given field. the cursor is on it.
// execute the predefined actions.
@@ -437,7 +437,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
// automatic update of styles
void AutoUpdateFrame(SwFrameFormat* pFormat, const SfxItemSet& rStyleSet);
- void AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM = NULL );
+ void AutoUpdatePara(SwTextFormatColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM = nullptr );
// link for inserting ranges via Drag&Drop/Clipboard
DECL_LINK_TYPED( InsertRegionDialog, void*, void );
@@ -445,7 +445,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
// ctor, the first one is a kind of a controlled copy ctor for more views of a document
SwWrtShell( SwWrtShell&, vcl::Window *pWin, SwView &rShell);
SwWrtShell( SwDoc& rDoc, vcl::Window *pWin, SwView &rShell,
- const SwViewOption *pViewOpt = 0);
+ const SwViewOption *pViewOpt = nullptr);
virtual ~SwWrtShell();
bool TryRemoveIndent(); // #i23725#
@@ -463,7 +463,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
bool GotoRegion( const OUString& rName );
bool GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType = 0,
sal_uInt16 nSeqNo = 0 );
- bool GotoNextTOXBase( const OUString* pName = 0);
+ bool GotoNextTOXBase( const OUString* pName = nullptr);
bool GotoTable( const OUString& rName );
bool GotoFormatField( const SwFormatField& rField );
const SwRangeRedline* GotoRedline( sal_uInt16 nArrPos, bool bSelect = false);
@@ -526,7 +526,7 @@ private:
Point m_aDest;
bool m_bDestOnStack;
- bool HasCrsrStack() const { return 0 != m_pCrsrStack; }
+ bool HasCrsrStack() const { return nullptr != m_pCrsrStack; }
SAL_DLLPRIVATE bool PushCrsr(SwTwips lOffset, bool bSelect);
SAL_DLLPRIVATE bool PopCrsr(bool bUpdate, bool bSelect = false);
@@ -586,9 +586,9 @@ private:
SAL_DLLPRIVATE void LeaveExtSel() { m_bSelWrd = m_bSelLn = false;}
- SAL_DLLPRIVATE bool GoStart(bool KeepArea = false, bool * = 0,
+ SAL_DLLPRIVATE bool GoStart(bool KeepArea = false, bool * = nullptr,
bool bSelect = false, bool bDontMoveRegion = false);
- SAL_DLLPRIVATE bool GoEnd(bool KeepArea = false, bool * = 0);
+ SAL_DLLPRIVATE bool GoEnd(bool KeepArea = false, bool * = nullptr);
enum BookMarkMove
{
@@ -598,7 +598,7 @@ private:
BOOKMARK_LAST_LAST_ENTRY
};
- SAL_DLLPRIVATE bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=NULL);
+ SAL_DLLPRIVATE bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=nullptr);
};
inline void SwWrtShell::ResetCursorStack()
diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx
index 9bde8b126487..1e309ffb0b0e 100644
--- a/sw/source/uibase/index/toxmgr.cxx
+++ b/sw/source/uibase/index/toxmgr.cxx
@@ -46,17 +46,17 @@ SwTOXMark* SwTOXMgr::GetTOXMark(sal_uInt16 nId)
{
if(!aCurMarks.empty())
return aCurMarks[nId];
- return 0;
+ return nullptr;
}
void SwTOXMgr::DeleteTOXMark()
{
- SwTOXMark* pNext = 0;
+ SwTOXMark* pNext = nullptr;
if( pCurTOXMark )
{
pNext = const_cast<SwTOXMark*>(&pSh->GotoTOXMark( *pCurTOXMark, TOX_NXT ));
if( pNext == pCurTOXMark )
- pNext = 0;
+ pNext = nullptr;
pSh->DeleteTOXMark( pCurTOXMark );
pSh->SetModified();
@@ -67,7 +67,7 @@ void SwTOXMgr::DeleteTOXMark()
void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc)
{
- SwTOXMark* pMark = 0;
+ SwTOXMark* pMark = nullptr;
switch(rDesc.GetTOXType())
{
case TOX_CONTENT:
@@ -212,7 +212,7 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc)
pSh->DeleteTOXMark(pCurTOXMark);
aCpy.SetAlternativeText( *rDesc.GetAltStr() );
pSh->SwEditShell::Insert( aCpy );
- pCurTOXMark = 0;
+ pCurTOXMark = nullptr;
}
}
pSh->SetModified();
@@ -274,7 +274,7 @@ const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
void SwTOXMgr::SetCurTOXMark(sal_uInt16 nId)
{
- pCurTOXMark = (nId < aCurMarks.size()) ? aCurMarks[nId] : 0;
+ pCurTOXMark = (nId < aCurMarks.size()) ? aCurMarks[nId] : nullptr;
}
bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
@@ -286,7 +286,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
const SwTOXBase* pCurTOX = ppBase && *ppBase ? *ppBase : GetCurTOX();
SwTOXBase* pTOX = const_cast<SwTOXBase*>(pCurTOX);
- SwTOXBase * pNewTOX = NULL;
+ SwTOXBase * pNewTOX = nullptr;
if (pTOX)
pNewTOX = new SwTOXBase(*pTOX);
@@ -440,7 +440,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, nullptr);
}
pDoc->ChgTOX(*pTOX, *pNewTOX);
@@ -451,7 +451,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, nullptr);
}
}
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx
index d4c2479c564b..79cf3464c38b 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -98,7 +98,7 @@ SwHHCWrapper::SwHHCWrapper(
, m_pView( pSwView )
, m_pWin( &pSwView->GetEditWin() )
, m_rWrtShell( pSwView->GetWrtShell() )
- , m_pConvArgs( 0 )
+ , m_pConvArgs( nullptr )
, m_nLastPos( 0 )
, m_nUnitOffset( 0 )
, m_nPageCount( 0 )
@@ -116,7 +116,7 @@ SwHHCWrapper::~SwHHCWrapper()
{
delete m_pConvArgs;
- SwViewShell::SetCareWin( NULL );
+ SwViewShell::SetCareWin( nullptr );
// check for existence of a draw view which means that there are
// (or previously were) draw objects present in the document.
@@ -376,7 +376,7 @@ void SwHHCWrapper::ReplaceUnit(
OUString aOrigText( m_rWrtShell.GetSelText() );
OUString aNewText( rReplaceWith );
OSL_ENSURE( aOrigText == rOrigText, "!! text mismatch !!" );
- SwFormatRuby *pRuby = 0;
+ SwFormatRuby *pRuby = nullptr;
bool bRubyBelow = false;
OUString aNewOrigText;
switch (eAction)
@@ -429,7 +429,7 @@ void SwHHCWrapper::ReplaceUnit(
{
// according to FT we currently should not bother about keeping
// attributes in Hangul/Hanja conversion
- ChangeText( aNewOrigText, rOrigText, NULL, NULL );
+ ChangeText( aNewOrigText, rOrigText, nullptr, nullptr );
//!! since Delete, Insert in 'ChangeText' do not set the WrtShells
//!! bInSelect flag
@@ -465,7 +465,7 @@ void SwHHCWrapper::ReplaceUnit(
if (bIsChineseConversion)
ChangeText( aNewText, rOrigText, &rOffsets, m_rWrtShell.GetCrsr() );
else
- ChangeText( aNewText, rOrigText, NULL, NULL );
+ ChangeText( aNewText, rOrigText, nullptr, nullptr );
// change language and font if necessary
if (bIsChineseConversion)
@@ -518,7 +518,7 @@ bool SwHHCWrapper::HasRubySupport() const
void SwHHCWrapper::Convert()
{
- OSL_ENSURE( m_pConvArgs == 0, "NULL pointer expected" );
+ OSL_ENSURE( m_pConvArgs == nullptr, "NULL pointer expected" );
{
SwPaM *pCrsr = m_pView->GetWrtShell().GetCrsr();
SwPosition* pSttPos = pCrsr->Start();
@@ -701,7 +701,7 @@ bool SwHHCWrapper::ConvContinue_impl( SwConversionArgs *pConversionArgs )
bool bProgress = !m_bIsDrawObj && !m_bIsSelection;
(pConversionArgs->aConvText).clear();
pConversionArgs->nConvTextLang = LANGUAGE_NONE;
- m_pView->GetWrtShell().SpellContinue( &m_nPageCount, bProgress ? &m_nPageStart : NULL, pConversionArgs );
+ m_pView->GetWrtShell().SpellContinue( &m_nPageCount, bProgress ? &m_nPageStart : nullptr, pConversionArgs );
return !pConversionArgs->aConvText.isEmpty();
}
diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx
index 2abb2d4876e5..aee0bcfd5ff9 100644
--- a/sw/source/uibase/lingu/hyp.cxx
+++ b/sw/source/uibase/lingu/hyp.cxx
@@ -80,7 +80,7 @@ bool SwHyphWrapper::SpellContinue()
}
uno::Reference< uno::XInterface > xHyphWord = bInSelection ?
- PSH->HyphContinue( NULL, NULL ) :
+ PSH->HyphContinue( nullptr, nullptr ) :
PSH->HyphContinue( &nPageCount, &nPageStart );
SetLast( xHyphWord );
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index aa95a1763234..3202dcee2250 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -850,7 +850,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
else if (nId == MN_SET_SELECTION_MORE)
{
//Open Format/Character Dialog
- sw_CharDialog( *m_pSh, true, SID_ATTR_CHAR_FONT, 0, 0 );
+ sw_CharDialog( *m_pSh, true, SID_ATTR_CHAR_FONT, nullptr, nullptr );
}
else if (MN_SET_LANGUAGE_PARAGRAPH_START <= nId && nId <= MN_SET_LANGUAGE_PARAGRAPH_END)
{
@@ -882,7 +882,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
m_pSh->Push(); // save cursor
SwLangHelper::SelectCurrentPara( *m_pSh );
//Open Format/Character Dialog
- sw_CharDialog( *m_pSh, true, SID_ATTR_CHAR_FONT, 0, 0 );
+ sw_CharDialog( *m_pSh, true, SID_ATTR_CHAR_FONT, nullptr, nullptr );
m_pSh->Pop( false ); // restore cursor
}
}
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index 956e7a576180..5395ffe7656a 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -56,8 +56,8 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw,
GetDrawOutliner().GetEmptyItemSet().GetPool(),
OUTLINERMODE_TEXTOBJECT ),
pView( pVw ),
- pTextObj( NULL ),
- pOutlView( NULL ),
+ pTextObj( nullptr ),
+ pOutlView( nullptr ),
nOptions( nConvOptions ),
nDocIndex( 0 ),
nSourceLang( nSourceLanguage ),
@@ -119,7 +119,7 @@ bool SdrHHCWrapper::ConvertNextDocument()
pOutlView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) );
SetPaperSize( Size(1, 1) );
Clear();
- pTextObj = NULL;
+ pTextObj = nullptr;
}
const auto n = nDocIndex;
@@ -164,7 +164,7 @@ bool SdrHHCWrapper::ConvertNextDocument()
}
if ( !bNextDoc )
- pTextObj = NULL;
+ pTextObj = nullptr;
else
break;
}
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index 6b147080a178..badc48d938d5 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -278,7 +278,7 @@ SwGlossaries::~SwGlossaries()
SwTextBlocks* SwGlossaries::GetGlosDoc( const OUString &rName, bool bCreate ) const
{
sal_uInt16 nPath = (sal_uInt16)rName.getToken(1, GLOS_DELIM).toInt32();
- SwTextBlocks *pTmp = 0;
+ SwTextBlocks *pTmp = nullptr;
if (static_cast<size_t>(nPath) < m_PathArr.size())
{
const OUString sFileURL =
@@ -468,7 +468,7 @@ void SwGlossaries::RemoveFileFromList( const OUString& rGroup )
{
Reference< lang::XUnoTunnel > xEntryTunnel( aLoop->get(), UNO_QUERY );
- SwXAutoTextEntry* pEntry = NULL;
+ SwXAutoTextEntry* pEntry = nullptr;
if ( xEntryTunnel.is() )
pEntry = reinterpret_cast< SwXAutoTextEntry* >(
xEntryTunnel->getSomething( SwXAutoTextEntry::getUnoTunnelId() ) );
@@ -536,7 +536,7 @@ void SwGlossaries::InvalidateUNOOjects()
)
{
Reference< lang::XUnoTunnel > xEntryTunnel( aEntryLoop->get(), UNO_QUERY );
- SwXAutoTextEntry* pEntry = NULL;
+ SwXAutoTextEntry* pEntry = nullptr;
if ( xEntryTunnel.is() )
pEntry = reinterpret_cast< SwXAutoTextEntry* >(
xEntryTunnel->getSomething( SwXAutoTextEntry::getUnoTunnelId() ) );
@@ -561,7 +561,7 @@ Reference< text::XAutoTextGroup > SwGlossaries::GetAutoTextGroup( const OUString
{
Reference< lang::XUnoTunnel > xGroupTunnel( aSearch->get(), UNO_QUERY );
- SwXAutoTextGroup* pSwGroup = 0;
+ SwXAutoTextGroup* pSwGroup = nullptr;
if ( xGroupTunnel.is() )
pSwGroup = reinterpret_cast< SwXAutoTextGroup* >( xGroupTunnel->getSomething( SwXAutoTextGroup::getUnoTunnelId() ) );
@@ -628,7 +628,7 @@ Reference< text::XAutoTextEntry > SwGlossaries::GetAutoTextEntry(
{
Reference< lang::XUnoTunnel > xEntryTunnel( aSearch->get(), UNO_QUERY );
- SwXAutoTextEntry* pEntry = NULL;
+ SwXAutoTextEntry* pEntry = nullptr;
if ( xEntryTunnel.is() )
pEntry = reinterpret_cast< SwXAutoTextEntry* >( xEntryTunnel->getSomething( SwXAutoTextEntry::getUnoTunnelId() ) );
else
diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx
index 38fe702238f1..be79bafab709 100644
--- a/sw/source/uibase/misc/glshell.cxx
+++ b/sw/source/uibase/misc/glshell.cxx
@@ -120,8 +120,8 @@ static bool lcl_Save( SwWrtShell& rSh, const OUString& rGroupName,
if(aStart.HasMacro() || aEnd.HasMacro() )
{
- SvxMacro* pStart = aStart.HasMacro() ? &aStart : 0;
- SvxMacro* pEnd = aEnd.HasMacro() ? &aEnd : 0;
+ SvxMacro* pStart = aStart.HasMacro() ? &aStart : nullptr;
+ SvxMacro* pEnd = aEnd.HasMacro() ? &aEnd : nullptr;
pGlosHdl->SetMacros( rShortNm, pStart, pEnd, pBlock.get() );
}
@@ -208,7 +208,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const OUString& rGroup, const OUString
if (pGroup && pGroup->GetCount())
{
// query which view is registered. In WebWriter there is no normal view
- sal_uInt16 nViewId = 0 != SwView::Factory() ? 2 : 6;
+ sal_uInt16 nViewId = nullptr != SwView::Factory() ? 2 : 6;
const OUString sLongName = pGroup->GetLongName(pGroup->GetIndex( rShortName ));
if( 6 == nViewId )
diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx
index 1f1e47a4eee1..faf6f3215eb4 100644
--- a/sw/source/uibase/misc/numberingtypelistbox.cxx
+++ b/sw/source/uibase/misc/numberingtypelistbox.cxx
@@ -78,7 +78,7 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
{
Clear();
uno::Sequence<sal_Int16> aTypes;
- const sal_Int16* pTypes = NULL;
+ const sal_Int16* pTypes = nullptr;
if(0 != (nTypeFlags&INSERT_NUM_EXTENDED_TYPES) )
{
if(pImpl->xInfo.is())
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 81429200ab72..694b7b0ed3da 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -123,7 +123,7 @@ void SwModelessRedlineAcceptDlg::Activate()
void SwModelessRedlineAcceptDlg::Initialize(SfxChildWinInfo *pInfo)
{
- if (pInfo != NULL)
+ if (pInfo != nullptr)
pImplDlg->Initialize(pInfo->aExtraString);
SfxModelessDialog::Initialize(pInfo);
@@ -303,7 +303,7 @@ void SwRedlineAcceptDlg::InitAuthors()
pFilterPage->SelectAuthor(aStrings[0]);
bool bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess().GetRedlinePassword().getLength();
- bool bSel = pTable->FirstSelected() != 0;
+ bool bSel = pTable->FirstSelected() != nullptr;
SvTreeListEntry* pSelEntry = pTable->FirstSelected();
while (pSelEntry)
@@ -515,7 +515,7 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, bool bChild)
}
pBackupData = pNext;
}
- pParent->pNext = 0;
+ pParent->pNext = nullptr;
// insert new children
InsertChildren(pParent, rRedln, nAutoFormat);
@@ -560,7 +560,7 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, bool bChild)
void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRangeRedline& rRedln, const sal_uInt16 nAutoFormat)
{
OUString sChild;
- SwRedlineDataChild *pLastRedlineChild = 0;
+ SwRedlineDataChild *pLastRedlineChild = nullptr;
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
bool bAutoFormat = (rRedln.GetRealType() & nAutoFormat) != 0;
@@ -581,7 +581,7 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRa
pTable->SetEntryText(
sAutoFormat, (*ret.first)->pTLBParent, 0);
pTable->RemoveEntry(pParent->pTLBParent);
- pParent->pTLBParent = 0;
+ pParent->pTLBParent = nullptr;
}
return;
}
@@ -625,18 +625,18 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRa
pTable->Expand(pParent->pTLBParent);
}
else
- pRedlineChild->pTLBChild = 0;
+ pRedlineChild->pTLBChild = nullptr;
pLastRedlineChild = pRedlineChild;
}
if (pLastRedlineChild)
- pLastRedlineChild->pNext = 0;
+ pLastRedlineChild->pNext = nullptr;
if (!bValidTree && pParent->pTLBParent)
{
pTable->RemoveEntry(pParent->pTLBParent);
- pParent->pTLBParent = 0;
+ pParent->pTLBParent = nullptr;
if (nAutoFormat)
aUsedSeqNo.erase(pParent);
}
@@ -658,8 +658,8 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
// set the cursor after the last entry because otherwise performance problem in TLB.
// TLB would otherwise reset the cursor at every Remove (expensive)
sal_uInt16 nPos = std::min((sal_uInt16)nCount, (sal_uInt16)m_RedlineParents.size());
- SvTreeListEntry *pCurEntry = NULL;
- while( ( pCurEntry == NULL ) && ( nPos > 0 ) )
+ SvTreeListEntry *pCurEntry = nullptr;
+ while( ( pCurEntry == nullptr ) && ( nPos > 0 ) )
{
--nPos;
pCurEntry = m_RedlineParents[nPos]->pTLBParent;
@@ -741,13 +741,13 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
if( !pCurrRedline )
{
pSh->SwCrsrShell::Push();
- if( 0 == (pCurrRedline = pSh->SelNextRedline()))
+ if( nullptr == (pCurrRedline = pSh->SelNextRedline()))
pCurrRedline = pSh->SelPrevRedline();
pSh->SwCrsrShell::Pop( false );
}
}
else
- pCurrRedline = 0;
+ pCurrRedline = nullptr;
for (sal_uInt16 i = nStart; i <= nEnd; i++)
{
@@ -756,7 +756,7 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
pRedlineParent = new SwRedlineDataParent;
pRedlineParent->pData = pRedlineData;
- pRedlineParent->pNext = 0;
+ pRedlineParent->pNext = nullptr;
OUString sComment(rRedln.GetComment());
pRedlineParent->sComment = sComment.replace('\n', ' ');
m_RedlineParents.insert(m_RedlineParents.begin() + i,
@@ -767,7 +767,7 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
pData->bDisabled = false;
sParent = GetRedlineText(rRedln, pData->aDateTime);
- pParent = pTable->InsertEntry(GetActionImage(rRedln), sParent, pData, 0, i);
+ pParent = pTable->InsertEntry(GetActionImage(rRedln), sParent, pData, nullptr, i);
if( pCurrRedline == &rRedln )
{
pTable->SetCurEntry( pParent );
@@ -910,7 +910,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, UndoHdl, SvxTPView*, void)
SwView * pView = ::GetActiveView();
pView->GetViewFrame()->GetDispatcher()->
Execute(SID_UNDO, SfxCallMode::SYNCHRON);
- pTPView->EnableUndo(pView->GetSlotState(SID_UNDO) != 0);
+ pTPView->EnableUndo(pView->GetSlotState(SID_UNDO) != nullptr);
Activate();
}
@@ -956,7 +956,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, GotoHdl, Timer *, void)
//#107938# But not only ask pTable if it has the focus. To move
// the selection to the selected redline any child of pParentDlg
// may the focus.
- SvTreeListEntry* pSelEntry = 0;
+ SvTreeListEntry* pSelEntry = nullptr;
if (pParentDlg->HasChildPathFocus())
pSelEntry = pTable->FirstSelected();
@@ -1003,7 +1003,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, GotoHdl, Timer *, void)
pSh->LeaveAddMode();
pSh->EndAction();
- SwViewShell::SetCareWin(NULL);
+ SwViewShell::SetCareWin(nullptr);
}
bool bEnable = !pSh->getIDocumentRedlineAccess().GetRedlinePassword().getLength();
pTPView->EnableAccept( bEnable && bSel /*&& !bReadonlySel*/ );
@@ -1021,7 +1021,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
SvTreeListEntry* pEntry = pTable->FirstSelected();
- const SwRangeRedline *pRed = 0;
+ const SwRangeRedline *pRed = nullptr;
if (pEntry)
{
@@ -1033,7 +1033,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
sal_uInt16 nPos = GetRedlinePos(*pTopEntry);
// disable commenting for protected areas
- if (nPos != USHRT_MAX && (pRed = pSh->GotoRedline(nPos, true)) != 0)
+ if (nPos != USHRT_MAX && (pRed = pSh->GotoRedline(nPos, true)) != nullptr)
{
if( pSh->IsCrsrPtAtEnd() )
pSh->SwapPam();
@@ -1048,7 +1048,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
// && pRed->HasReadonlySel()
);
- aPopup.EnableItem( MN_SUB_SORT, pTable->First() != 0 );
+ aPopup.EnableItem( MN_SUB_SORT, pTable->First() != nullptr );
sal_uInt16 nColumn = pTable->GetSortedCol();
if (nColumn == 0xffff)
nColumn = 4;
@@ -1142,7 +1142,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
}
pDlg.reset();
- SwViewShell::SetCareWin(NULL);
+ SwViewShell::SetCareWin(nullptr);
}
}
@@ -1250,7 +1250,7 @@ SwRedlineAcceptPanel::~SwRedlineAcceptPanel()
void SwRedlineAcceptPanel::dispose()
{
delete mpImplDlg;
- mpImplDlg = NULL;
+ mpImplDlg = nullptr;
PanelLayout::dispose();
}
diff --git a/sw/source/uibase/ribbar/conrect.cxx b/sw/source/uibase/ribbar/conrect.cxx
index bf6ada4d650d..0913d101cf68 100644
--- a/sw/source/uibase/ribbar/conrect.cxx
+++ b/sw/source/uibase/ribbar/conrect.cxx
@@ -70,7 +70,7 @@ bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
SdrView *pSdrView = m_pSh->GetDrawView();
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
SdrObject* pObj = rMarkList.GetMark(0) ? rMarkList.GetMark(0)->GetMarkedSdrObj()
- : 0;
+ : nullptr;
switch( m_pWin->GetSdrDrawMode() )
{
case OBJ_TEXT:
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index e302afa0b5da..684a5d9360a5 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -140,7 +140,7 @@ bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
// Select gluepoint
if (pSdrView->HasMarkablePoints() && (!pSdrView->IsPointMarked(*aVEvt.pHdl) || rMEvt.IsShift()))
{
- SdrHdl* pHdl = NULL;
+ SdrHdl* pHdl = nullptr;
if (!rMEvt.IsShift())
{
@@ -152,7 +152,7 @@ bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
if (pSdrView->IsPointMarked(*aVEvt.pHdl))
{
bReturn = pSdrView->UnmarkPoint(*aVEvt.pHdl);
- pHdl = NULL;
+ pHdl = nullptr;
}
else
{
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 6720fe92210c..c27b2e32d4a6 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -61,9 +61,9 @@ SwInputWindow::SwInputWindow( vcl::Window* pParent )
aPos( VclPtr<Edit>::Create(this, SW_RES(ED_POS))),
aEdit( VclPtr<InputEdit>::Create(this, WB_3DLOOK|WB_TABSTOP|WB_BORDER|WB_NOHIDESELECTION)),
aPopMenu( SW_RES(MN_CALC_POPUP)),
- pMgr(0),
- pWrtShell(0),
- pView(0),
+ pMgr(nullptr),
+ pWrtShell(nullptr),
+ pView(nullptr),
aAktTableName(aEmptyOUStr)
, m_bDoesUndo(true)
, m_bResetUndo(false)
@@ -80,7 +80,7 @@ SwInputWindow::SwInputWindow( vcl::Window* pParent )
pManager->RegisterToolBox(this);
pView = ::GetActiveView();
- pWrtShell = pView ? pView->GetWrtShellPtr() : 0;
+ pWrtShell = pView ? pView->GetWrtShellPtr() : nullptr;
InsertWindow( ED_POS, aPos.get(), ToolBoxItemBits::NONE, 0);
SetItemText(ED_POS, SW_RESSTR(STR_ACCESS_FORMULA_TYPE));
@@ -225,7 +225,7 @@ void SwInputWindow::ShowWin()
aPos->SetText(SW_RESSTR(STR_TBL_FORMULA));
// Edit current field
- OSL_ENSURE(pMgr == 0, "FieldManager not deleted");
+ OSL_ENSURE(pMgr == nullptr, "FieldManager not deleted");
pMgr = new SwFieldMgr;
// Formular should always begin with "=" , so set here
@@ -391,7 +391,7 @@ void SwInputWindow::ApplyFormula()
pView->GetEditWin().GrabFocus();
const SfxPoolItem* aArgs[2];
aArgs[0] = &aParam;
- aArgs[1] = 0;
+ aArgs[1] = nullptr;
pView->GetViewFrame()->GetBindings().Execute( FN_EDIT_FORMULA, aArgs, 0, SfxCallMode::ASYNCHRON );
}
diff --git a/sw/source/uibase/ribbar/tbxanchr.cxx b/sw/source/uibase/ribbar/tbxanchr.cxx
index e7b0d05db45f..deb2b7400822 100644
--- a/sw/source/uibase/ribbar/tbxanchr.cxx
+++ b/sw/source/uibase/ribbar/tbxanchr.cxx
@@ -65,15 +65,15 @@ void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const
VclPtr<SfxPopupWindow> SwTbxAnchor::CreatePopupWindow()
{
SwTbxAnchor::Click();
- return 0;
+ return nullptr;
}
void SwTbxAnchor::Click()
{
PopupMenu aPopMenu(SW_RES(MN_ANCHOR_POPUP));
- SfxViewFrame* pViewFrame( 0 );
- SfxDispatcher* pDispatch( 0 );
+ SfxViewFrame* pViewFrame( nullptr );
+ SfxDispatcher* pDispatch( nullptr );
SfxViewShell* pCurSh( SfxViewShell::Current() );
if ( pCurSh )
@@ -83,7 +83,7 @@ void SwTbxAnchor::Click()
pDispatch = pViewFrame->GetDispatcher();
}
- SwView* pActiveView = 0;
+ SwView* pActiveView = nullptr;
if(pViewFrame)
{
SwView* pView = static_cast<SwView*>(SfxViewShell::GetFirst(true, checkSfxViewShell<SwView>));
@@ -103,7 +103,7 @@ void SwTbxAnchor::Click()
return;
}
SwWrtShell* pWrtShell = pActiveView->GetWrtShellPtr();
- aPopMenu.EnableItem( FN_TOOL_ANCHOR_FRAME, 0 != pWrtShell->IsFlyInFly() );
+ aPopMenu.EnableItem( FN_TOOL_ANCHOR_FRAME, nullptr != pWrtShell->IsFlyInFly() );
Rectangle aRect(GetToolBox().GetItemRect(GetId()));
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 9b8276d6bd2c..8217ad8e31d9 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -72,7 +72,7 @@ SwTbxAutoTextCtrl::SwTbxAutoTextCtrl(
sal_uInt16 nId,
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
- pPopup(0)
+ pPopup(nullptr)
{
rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
}
@@ -128,7 +128,7 @@ VclPtr<SfxPopupWindow> SwTbxAutoTextCtrl::CreatePopupWindow()
}
GetToolBox().EndSelection();
DelPopup();
- return 0;
+ return nullptr;
}
@@ -172,7 +172,7 @@ void SwTbxAutoTextCtrl::DelPopup()
delete pSubPopup;
}
delete pPopup;
- pPopup = 0;
+ pPopup = nullptr;
}
}
@@ -221,7 +221,7 @@ VclPtr<SfxPopupWindow> SwTbxFieldCtrl::CreatePopupWindow()
GetToolBox().EndSelection();
- return 0;
+ return nullptr;
}
void SwTbxFieldCtrl::StateChanged( sal_uInt16,
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 5f68f0c57b73..e0239fd1bb48 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -170,7 +170,7 @@ SwAnnotationShell::~SwAnnotationShell()
!pPostItMgr->HasActiveSidebarWin() )
{
OSL_ENSURE(pPostItMgr,"PostItMgr::Layout(): We are looping forever");
- return 0;
+ return nullptr;
}
return &pPostItMgr->GetActiveSidebarWin()->GetOutlinerView()->GetOutliner()->GetUndoManager();
}
@@ -384,7 +384,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
break;
case SID_HYPERLINK_SETLINK:
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pNewAttrs)
pNewAttrs->GetItemState(nSlot, false, &pItem);
@@ -439,7 +439,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
}
case FN_INSERT_STRING:
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if (pNewAttrs)
pNewAttrs->GetItemState(nSlot, false, &pItem );
if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
@@ -544,7 +544,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr,DLG_STD, 0, true ));
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr,DLG_STD, nullptr, true ));
OSL_ENSURE(pDlg, "Dialog creation failed!");
sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
@@ -721,7 +721,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
case FN_SET_SUB_SCRIPT:
{
sal_uInt16 nEsc = 0;
- const SfxPoolItem *pEscItem = 0;
+ const SfxPoolItem *pEscItem = nullptr;
if (nWhich==FN_SET_SUPER_SCRIPT)
nEsc = SVX_ESCAPEMENT_SUPERSCRIPT;
else
@@ -741,7 +741,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
case SID_ATTR_PARA_ADJUST_CENTER:
case SID_ATTR_PARA_ADJUST_BLOCK:
{
- const SfxPoolItem *pAdjust = 0;
+ const SfxPoolItem *pAdjust = nullptr;
int eAdjust = 0;
if (nWhich==SID_ATTR_PARA_ADJUST_LEFT)
@@ -771,7 +771,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
case SID_ATTR_PARA_LINESPACE_15:
case SID_ATTR_PARA_LINESPACE_20:
{
- const SfxPoolItem *pLSpace = 0;
+ const SfxPoolItem *pLSpace = nullptr;
int nLSpace = 0;
if (nWhich==SID_ATTR_PARA_LINESPACE_10)
@@ -1237,7 +1237,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
break;
}
case SID_HANGUL_HANJA_CONVERSION:
- pOLV->StartTextConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, NULL,
+ pOLV->StartTextConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, nullptr,
i18n::TextConversionOption::CHARACTER_BY_CHARACTER, true, false );
break;
@@ -1259,7 +1259,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
if( xInit.is() )
{
// initialize dialog
- Reference< awt::XWindow > xDialogParentWindow(0);
+ Reference< awt::XWindow > xDialogParentWindow(nullptr);
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
@@ -1472,7 +1472,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
sal_uInt16 nId = rReq.GetSlot();
sal_uInt16 nCnt = 1;
- const SfxPoolItem* pItem=0;
+ const SfxPoolItem* pItem=nullptr;
if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pItem ) )
nCnt = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
switch( nId )
@@ -1553,7 +1553,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
sal_uInt16 nCount = pUndoManager ? pUndoManager->GetUndoActionCount() : 0;
if ( nCount )
pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
- else if (rSh.GetLastUndoInfo(0, 0))
+ else if (rSh.GetLastUndoInfo(nullptr, nullptr))
{
rSet.Put( SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::UNDO)) );
}
@@ -1566,7 +1566,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
sal_uInt16 nCount = pUndoManager ? pUndoManager->GetRedoActionCount() : 0;
if ( nCount )
pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
- else if (rSh.GetFirstRedoInfo(0))
+ else if (rSh.GetFirstRedoInfo(nullptr))
{
rSet.Put(SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::REDO)) );
}
@@ -1602,12 +1602,12 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
SfxStringListItem aItem( nWhich );
if ((nWhich == SID_GETUNDOSTRINGS) &&
- rSh.GetLastUndoInfo(0, 0))
+ rSh.GetLastUndoInfo(nullptr, nullptr))
{
rSh.GetDoStrings( SwWrtShell::UNDO, aItem );
}
else if ((nWhich == SID_GETREDOSTRINGS) &&
- (rSh.GetFirstRedoInfo(0)))
+ (rSh.GetFirstRedoInfo(nullptr)))
{
rSh.GetDoStrings( SwWrtShell::UNDO, aItem );
}
@@ -1656,7 +1656,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView();
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( pArgs )
pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
@@ -1665,7 +1665,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
if ( pItem )
{
sSym = static_cast<const SfxStringItem*>(pItem)->GetValue();
- const SfxPoolItem* pFtItem = NULL;
+ const SfxPoolItem* pFtItem = nullptr;
pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem );
if ( pFontItem )
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index f6fe41d6b321..8949cea9121b 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -138,13 +138,13 @@ namespace
SfxChildWindow *pChildWindow = rView.GetViewFrame()->GetChildWindow(
SvxContourDlgChildWindow::GetChildWindowId());
- return pChildWindow ? static_cast<SvxContourDlg*>(pChildWindow->GetWindow()) : NULL;
+ return pChildWindow ? static_cast<SvxContourDlg*>(pChildWindow->GetWindow()) : nullptr;
}
SvxIMapDlg* GetIMapDlg(SwView &rView)
{
SfxChildWindow* pWnd = rView.GetViewFrame()->GetChildWindow(SvxIMapDlgChildWindow::GetChildWindowId());
- return pWnd ? static_cast<SvxIMapDlg*>(pWnd->GetWindow()) : NULL;
+ return pWnd ? static_cast<SvxIMapDlg*>(pWnd->GetWindow()) : nullptr;
}
}
@@ -168,7 +168,7 @@ static void lcl_UpdateIMapDlg( SwWrtShell& rSh )
Graphic aGrf( rSh.GetIMapGraphic() );
GraphicType nGrfType = aGrf.GetType();
void* pEditObj = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType
- ? rSh.GetIMapInventor() : 0;
+ ? rSh.GetIMapInventor() : nullptr;
std::unique_ptr<TargetList> pList(new TargetList);
rSh.GetView().GetViewFrame()->GetTopFrame().GetTargetList(*pList);
@@ -188,7 +188,7 @@ static bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
{
OUString aGrfName;
if ( nSel & nsSelectionType::SEL_GRF )
- rSh.GetGrfNms( &aGrfName, 0 );
+ rSh.GetGrfNms( &aGrfName, nullptr );
SvxContourDlg *pDlg = GetContourDlg(rSh.GetView());
if (pDlg)
@@ -517,7 +517,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
{
case SID_UNDO:
{
- if (rSh.GetLastUndoInfo(0, 0))
+ if (rSh.GetLastUndoInfo(nullptr, nullptr))
{
rSet.Put( SfxStringItem(nWhich,
rSh.GetDoString(SwWrtShell::UNDO)));
@@ -528,7 +528,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
}
case SID_REDO:
{
- if (rSh.GetFirstRedoInfo(0))
+ if (rSh.GetFirstRedoInfo(nullptr))
{
rSet.Put(SfxStringItem(nWhich,
rSh.GetDoString(SwWrtShell::REDO)));
@@ -539,9 +539,9 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
}
case SID_REPEAT:
{ // Repeat is only possible if no REDO is possible - UI-Restriction
- if ((!rSh.GetFirstRedoInfo(0)) &&
+ if ((!rSh.GetFirstRedoInfo(nullptr)) &&
!rSh.IsSelFrmMode() &&
- (UNDO_EMPTY != rSh.GetRepeatInfo(0)))
+ (UNDO_EMPTY != rSh.GetRepeatInfo(nullptr)))
{
rSet.Put(SfxStringItem(nWhich, rSh.GetRepeatString()));
}
@@ -551,7 +551,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
}
case SID_GETUNDOSTRINGS:
- if (rSh.GetLastUndoInfo(0, 0))
+ if (rSh.GetLastUndoInfo(nullptr, nullptr))
{
SfxStringListItem aStrLst( nWhich );
rSh.GetDoStrings( SwWrtShell::UNDO, aStrLst );
@@ -562,7 +562,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
break;
case SID_GETREDOSTRINGS:
- if (rSh.GetFirstRedoInfo(0))
+ if (rSh.GetFirstRedoInfo(nullptr))
{
SfxStringListItem aStrLst( nWhich );
rSh.GetDoStrings( SwWrtShell::REDO, aStrLst );
@@ -671,7 +671,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.EndSelect();
}
bool bRet = rSh.MoveFieldType( pFieldType, nSlot == FN_GOTO_NEXT_MARK );
- SwField* pCurField = bRet ? rSh.GetCurField() : 0;
+ SwField* pCurField = bRet ? rSh.GetCurField() : nullptr;
if (pCurField)
rSh.ClickToField(*pCurField);
rReq.SetReturnValue(SfxBoolItem( nSlot, bRet));
@@ -776,10 +776,10 @@ void SwBaseShell::Execute(SfxRequest &rReq)
sal_Unicode cDelim = 0;
bool bToTable = false;
if( nSlot == FN_CONVERT_TEXT_TO_TABLE ||
- ( nSlot == FN_CONVERT_TEXT_TABLE && 0 == rSh.GetTableFormat() ))
+ ( nSlot == FN_CONVERT_TEXT_TABLE && nullptr == rSh.GetTableFormat() ))
bToTable = true;
SwInsertTableOptions aInsTableOpts( tabopts::ALL_TBL_INS_ATTR, 1 );
- SwTableAutoFormat const* pTAFormat = 0;
+ SwTableAutoFormat const* pTAFormat = nullptr;
std::unique_ptr<SwTableAutoFormatTable> pAutoFormatTable;
bool bDeleteFormat = true;
if(pArgs && SfxItemState::SET == pArgs->GetItemState( FN_PARAM_1, true, &pItem))
@@ -1114,16 +1114,16 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case FN_XFORMS_DESIGN_MODE:
- if( pArgs != NULL
+ if( pArgs != nullptr
&& pArgs->GetItemState( nSlot, true, &pItem ) == SfxItemState::SET
- && pItem != NULL
+ && pItem != nullptr
&& dynamic_cast< const SfxBoolItem *>( pItem ) != nullptr )
{
bool bDesignMode =
static_cast<const SfxBoolItem*>( pItem )->GetValue();
// set form design mode
- OSL_ENSURE( GetView().GetFormShell() != NULL, "form shell?" );
+ OSL_ENSURE( GetView().GetFormShell() != nullptr, "form shell?" );
SfxRequest aReq( GetView().GetViewFrame(), SID_FM_DESIGN_MODE );
aReq.AppendItem( SfxBoolItem( SID_FM_DESIGN_MODE, bDesignMode ) );
GetView().GetFormShell()->Execute( aReq );
@@ -1141,7 +1141,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
if(bMore && pArgs)
{
- pItem = 0;
+ pItem = nullptr;
pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
if(pItem)
switch(nSlot)
@@ -1241,9 +1241,9 @@ IMPL_LINK_NOARG_TYPED(SwBaseShell, GraphicArrivedHdl, SwCrsrShell&, void)
{
sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
SfxChildWindow *pChildWindow = pVFrame->HasChildWindow(nId) ?
- pVFrame->GetChildWindow(nId) : 0;
+ pVFrame->GetChildWindow(nId) : nullptr;
SvxIMapDlg *pDlg = pChildWindow ?
- static_cast<SvxIMapDlg*>(pChildWindow->GetWindow()) : 0;
+ static_cast<SvxIMapDlg*>(pChildWindow->GetWindow()) : nullptr;
if( pDlg && ( SID_IMAP_EXEC == nSlot ||
( SID_IMAP == nSlot && !bProtect)) &&
@@ -1251,7 +1251,7 @@ IMPL_LINK_NOARG_TYPED(SwBaseShell, GraphicArrivedHdl, SwCrsrShell&, void)
lcl_UpdateIMapDlg( rSh );
if( !bProtect && SID_IMAP == nSlot )
- bSetState = true, bState = 0 != pDlg;
+ bSetState = true, bState = nullptr != pDlg;
}
break;
@@ -1260,15 +1260,15 @@ IMPL_LINK_NOARG_TYPED(SwBaseShell, GraphicArrivedHdl, SwCrsrShell&, void)
{
sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
SfxChildWindow *pChildWindow = pVFrame->HasChildWindow(nId) ?
- pVFrame->GetChildWindow(nId) : 0;
+ pVFrame->GetChildWindow(nId) : nullptr;
SvxIMapDlg *pDlg = pChildWindow ?
- static_cast<SvxIMapDlg*>(pChildWindow->GetWindow()) : 0;
+ static_cast<SvxIMapDlg*>(pChildWindow->GetWindow()) : nullptr;
if( pDlg && pDlg->GetEditingObject() !=
rSh.GetIMapInventor() )
lcl_UpdateContourDlg( rSh, nsSelectionType::SEL_GRF );
bSetState = true;
- bState = 0 != pDlg;
+ bState = nullptr != pDlg;
}
break;
@@ -1349,7 +1349,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
case FN_CONVERT_TABLE_TO_TEXT:
{
- FrmTypeFlags eFrmType = rSh.GetFrmType(0,true);
+ FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true);
if( (eFrmType & FrmTypeFlags::FOOTNOTE) ||
!rSh.GetTableFormat() )
rSet.DisableItem( nWhich );
@@ -1357,7 +1357,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TEXT_TO_TABLE:
{
- FrmTypeFlags eFrmType = rSh.GetFrmType(0,true);
+ FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true);
if( (eFrmType & FrmTypeFlags::FOOTNOTE) ||
!rSh.IsTextToTableAvailable() )
rSet.DisableItem( nWhich );
@@ -1365,7 +1365,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TEXT_TABLE:
{
- FrmTypeFlags eFrmType = rSh.GetFrmType(0,true);
+ FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true);
if( (eFrmType & FrmTypeFlags::FOOTNOTE) ||
(!rSh.GetTableFormat() && !rSh.IsTextToTableAvailable() ) )
rSet.DisableItem( nWhich );
@@ -1753,7 +1753,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
}
nWhich = aIter.NextWhich();
}
- pGetStateSet = 0;
+ pGetStateSet = nullptr;
}
// Disable the slots with this status methode
@@ -1908,7 +1908,7 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
SwBaseShell::SwBaseShell(SwView& rVw) :
SfxShell( &rVw ),
rView(rVw),
- pGetStateSet(0)
+ pGetStateSet(nullptr)
{
SwWrtShell& rWrtSh = rView.GetWrtShell();
@@ -2345,11 +2345,11 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
vcl::Window *pMDI = &GetView().GetViewFrame()->GetWindow();
// So that from the basic no dialogues for the background views are called:
bool bBackground = (&GetView() != GetActiveView());
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const SfxItemSet* pArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
- const SfxItemSet* pOutSet = 0;
+ const SfxItemSet* pOutSet = nullptr;
bool bDone = false;
if(pArgs)
pArgs->GetItemState( GetPool().GetWhich(nSlot), false, &pItem );
@@ -2544,7 +2544,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
const SfxItemSet* pArgs = _rRequest.GetArgs();
SwWrtShell& rSh = GetShell();
- if ( !( rSh.GetFrmType( 0, true ) & FrmTypeFlags::FOOTNOTE ) )
+ if ( !( rSh.GetFrmType( nullptr, true ) & FrmTypeFlags::FOOTNOTE ) )
{
SwView &rTempView = GetView(); // Because GetView() does not work after the shell exchange
bool bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON);
@@ -2572,7 +2572,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
SwInsertTableOptions aInsTableOpts( tabopts::ALL_TBL_INS_ATTR, 1 );
OUString aTableName;
OUString aAutoName;
- SwTableAutoFormat* pTAFormat = 0;
+ SwTableAutoFormat* pTAFormat = nullptr;
if( pArgs && pArgs->Count() >= 2 )
{
@@ -2734,7 +2734,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
rLst.push_back( SW_RESSTR( STR_SWBG_OLE ) );
nOlePos = nPos++;
}
- const FrmTypeFlags nType = rSh.GetFrmType(0,true);
+ const FrmTypeFlags nType = rSh.GetFrmType(nullptr,true);
if ( nType & FrmTypeFlags::HEADER )
{
rLst.push_back( SW_RESSTR( STR_SWBG_HEADER ) );
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx
index 36148b40ebb4..de5e992ad4e9 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -55,7 +55,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( NULL, &aNewAttr, pView ));
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( nullptr, &aNewAttr, pView ));
sal_uInt16 nResult = pDlg->Execute();
if (nResult == RET_OK)
@@ -77,7 +77,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
bool bHasMarked = pView->AreObjectsMarked();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog( NULL,
+ std::unique_ptr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog( nullptr,
&aNewAttr,
pDoc,
true));
@@ -112,14 +112,14 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
{
bool bHasMarked = pView->AreObjectsMarked();
- const SdrObject* pObj = NULL;
+ const SdrObject* pObj = nullptr;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
if( rMarkList.GetMarkCount() == 1 )
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxLineTabDialog( NULL,
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxLineTabDialog( nullptr,
&aNewAttr,
pDoc,
pObj,
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index 86df26664185..3f1e09814594 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -90,29 +90,29 @@ SdrObject* SwDrawShell::IsSingleFillableNonOLESelected()
if(!pSdrView)
{
- return 0;
+ return nullptr;
}
if(1 != pSdrView->GetMarkedObjectCount())
{
- return 0;
+ return nullptr;
}
SdrObject* pPickObj = pSdrView->GetMarkedObjectByIndex(0);
if(!pPickObj)
{
- return 0;
+ return nullptr;
}
if(!pPickObj->IsClosedObj())
{
- return 0;
+ return nullptr;
}
if(dynamic_cast< SdrOle2Obj* >(pPickObj))
{
- return 0;
+ return nullptr;
}
return pPickObj;
@@ -579,8 +579,8 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
SwWrtShell &rSh = GetShell();
SdrView* pDrView = rSh.GetDrawView();
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
- const SdrObject* pObj = NULL;
- SvxFontWorkDialog* pDlg = NULL;
+ const SdrObject* pObj = nullptr;
+ SvxFontWorkDialog* pDlg = nullptr;
const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
@@ -588,7 +588,7 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
if ( pVFrame->HasChildWindow(nId) )
{
SfxChildWindow *pChildWindow = pVFrame->GetChildWindow(nId);
- pDlg = pChildWindow ? static_cast<SvxFontWorkDialog*>(pChildWindow->GetWindow()) : NULL;
+ pDlg = pChildWindow ? static_cast<SvxFontWorkDialog*>(pChildWindow->GetWindow()) : nullptr;
}
if ( rMarkList.GetMarkCount() == 1 )
diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx
index 7fe17f17b6f2..6162ba5498e9 100644
--- a/sw/source/uibase/shells/drformsh.cxx
+++ b/sw/source/uibase/shells/drformsh.cxx
@@ -71,7 +71,7 @@ TYPEINIT1(SwDrawFormShell, SwDrawBaseShell)
void SwDrawFormShell::Execute(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const SfxItemSet *pArgs = rReq.GetArgs();
switch ( rReq.GetSlot() )
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index eca6b0489467..ec43a4f81cc4 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -104,7 +104,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
sal_uInt16 nSlotId = rReq.GetSlot();
bool bChanged = pSdrView->GetModel()->IsChanged();
pSdrView->GetModel()->SetChanged(false);
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pArgs)
pArgs->GetItemState(nSlotId, false, &pItem);
@@ -131,7 +131,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if(!pArgs)
{
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
- if( rMarkList.GetMark(0) != 0 )
+ if( rMarkList.GetMark(0) != nullptr )
{
SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND,
RES_ANCHOR, RES_ANCHOR,
@@ -180,7 +180,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if(!pArgs)
{
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
- if( rMarkList.GetMark(0) != 0 )
+ if( rMarkList.GetMark(0) != nullptr )
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
std::unique_ptr<SfxAbstractTabDialog> pDlg;
@@ -201,7 +201,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
AbstractSvxCaptionDialog* pCaptionDlg =
- pFact->CreateCaptionDialog( NULL, pSdrView, nAllowedAnchors );
+ pFact->CreateCaptionDialog( nullptr, pSdrView, nAllowedAnchors );
pCaptionDlg->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) );
pDlg.reset(pCaptionDlg);
}
@@ -209,7 +209,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
AbstractSvxTransformTabDialog* pTransform =
- pFact->CreateSvxTransformTabDialog( NULL, NULL, pSdrView, nAllowedAnchors );
+ pFact->CreateSvxTransformTabDialog( nullptr, nullptr, pSdrView, nAllowedAnchors );
pTransform->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) );
pDlg.reset(pTransform);
}
@@ -287,10 +287,10 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
aFrmAttrSet.Put( aAnchor );
}
}
- const SfxPoolItem* pHoriOrient = 0;
- const SfxPoolItem* pHoriRelation = 0;
- const SfxPoolItem* pHoriPosition = 0;
- const SfxPoolItem* pHoriMirror = 0;
+ const SfxPoolItem* pHoriOrient = nullptr;
+ const SfxPoolItem* pHoriRelation = nullptr;
+ const SfxPoolItem* pHoriPosition = nullptr;
+ const SfxPoolItem* pHoriMirror = nullptr;
pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, false, &pHoriOrient);
pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, false, &pHoriRelation);
pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, false, &pHoriPosition);
@@ -310,9 +310,9 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
aFrmAttrSet.Put(aHOrient);
}
- const SfxPoolItem* pVertOrient = 0;
- const SfxPoolItem* pVertRelation = 0;
- const SfxPoolItem* pVertPosition = 0;
+ const SfxPoolItem* pVertOrient = nullptr;
+ const SfxPoolItem* pVertRelation = nullptr;
+ const SfxPoolItem* pVertPosition = nullptr;
pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, false, &pVertOrient);
pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, false, &pVertRelation);
pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, false, &pVertPosition);
@@ -328,7 +328,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
aVOrient.SetPos( static_cast<const SfxInt32Item*>(pVertPosition)->GetValue());
aFrmAttrSet.Put( aVOrient );
}
- const SfxPoolItem* pFollowItem = 0;
+ const SfxPoolItem* pFollowItem = nullptr;
pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, false, &pFollowItem);
if(pFollowItem)
aFrmAttrSet.Put(*pFollowItem);
@@ -376,7 +376,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if (GetView().GetDrawFuncPtr())
{
GetView().GetDrawFuncPtr()->Deactivate();
- GetView().SetDrawFuncPtr(NULL);
+ GetView().SetDrawFuncPtr(nullptr);
}
GetView().LeaveDrawCreate(); // Switch to selection mode
}
@@ -523,7 +523,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(NULL, aName));
+ std::unique_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(nullptr, aName));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->SetCheckNameHdl(LINK(this, SwDrawBaseShell, CheckGroupShapeNameHdl));
@@ -553,7 +553,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription));
+ std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(nullptr, aTitle, aDescription));
OSL_ENSURE(pDlg, "Dialog creation failed!");
if(RET_OK == pDlg->Execute())
@@ -698,7 +698,7 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
// #i68101#
case FN_TITLE_DESCRIPTION_SHAPE:
{
- const bool bIsWebView(NULL != dynamic_cast<SwWebView*>(&GetView()));
+ const bool bIsWebView(nullptr != dynamic_cast<SwWebView*>(&GetView()));
if(!bIsWebView && 1L != pSdrView->GetMarkedObjectCount())
{
@@ -716,7 +716,7 @@ void SwDrawBaseShell::GetDrawAttrStateForIFBX( SfxItemSet& rSet )
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
- if( rMarkList.GetMark(0) != 0 )
+ if( rMarkList.GetMark(0) != nullptr )
{
SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked());
rSet.Put(aNewAttr,false);
@@ -759,7 +759,7 @@ IMPL_LINK_TYPED(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation&, rValid
// OD 18.09.2003 #i18732# - adjustment for allowing vertical position
// aligned to page for fly frame anchored to paragraph or to character.
const RndStdIds eAnchorType = static_cast<RndStdIds >(rValidation.nAnchorType);
- const SwPosition* pContentPos = 0;
+ const SwPosition* pContentPos = nullptr;
SdrView* pSdrView = pSh->GetDrawView();
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
if( rMarkList.GetMarkCount() == 1 )
@@ -774,7 +774,7 @@ IMPL_LINK_TYPED(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation&, rValid
rValidation.nVRelOrient,
pContentPos,
rValidation.bFollowTextFlow,
- rValidation.bMirror, NULL, &rValidation.aPercentSize);
+ rValidation.bMirror, nullptr, &rValidation.aPercentSize);
bool bIsInVertical( false );
{
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index 59550baea276..377753d781fb 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -422,7 +422,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, 0, true ));
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, nullptr, true ));
assert(pDlg && "Dialog creation failed!");
sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
@@ -457,7 +457,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
break;
case SID_HYPERLINK_SETLINK:
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pNewAttrs)
pNewAttrs->GetItemState(nSlot, false, &pItem);
@@ -590,7 +590,7 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
sal_uInt16 nWhich = aIter.FirstWhich();
SfxItemSet aEditAttr( pOLV->GetAttribs() );
- const SfxPoolItem *pAdjust = 0, *pLSpace = 0, *pEscItem = 0;
+ const SfxPoolItem *pAdjust = nullptr, *pLSpace = nullptr, *pEscItem = nullptr;
int eAdjust, nLSpace, nEsc;
while(nWhich)
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index ff2c67e550c7..4a8cb89257fe 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -238,8 +238,8 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
SwWrtShell &rSh = GetShell();
SdrView* pDrView = rSh.GetDrawView();
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
- const SdrObject* pObj = NULL;
- SvxFontWorkDialog* pDlg = NULL;
+ const SdrObject* pObj = nullptr;
+ SvxFontWorkDialog* pDlg = nullptr;
const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
@@ -247,7 +247,7 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
if (pVFrame->HasChildWindow(nId))
{
SfxChildWindow* pWnd = pVFrame->GetChildWindow(nId);
- pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : NULL;
+ pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : nullptr;
}
if ( rMarkList.GetMarkCount() == 1 )
@@ -296,7 +296,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
break;
case SID_HANGUL_HANJA_CONVERSION:
- pOutlinerView->StartTextConversion(LANGUAGE_KOREAN, LANGUAGE_KOREAN, NULL,
+ pOutlinerView->StartTextConversion(LANGUAGE_KOREAN, LANGUAGE_KOREAN, nullptr,
i18n::TextConversionOption::CHARACTER_BY_CHARACTER, true, false);
break;
@@ -321,7 +321,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
return;
// initialize dialog
- Reference<awt::XWindow> xDialogParentWindow(0);
+ Reference<awt::XWindow> xDialogParentWindow(nullptr);
Sequence<Any> aSequence(1);
Any* pArray = aSequence.getArray();
PropertyValue aParam;
@@ -416,7 +416,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
{
const SfxItemSet *pNewAttrs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pNewAttrs)
{
pNewAttrs->GetItemState(nSlot, false, &pItem );
@@ -695,7 +695,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
if(!pOLV)
return;
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( pArgs )
pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
@@ -704,7 +704,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
if ( pItem )
{
sSym = static_cast<const SfxStringItem*>(pItem)->GetValue();
- const SfxPoolItem* pFtItem = NULL;
+ const SfxPoolItem* pFtItem = nullptr;
pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem );
if ( pFontItem )
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 0872981aa2be..3473a2ffa4ab 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -98,7 +98,7 @@ static const SwFrameFormat* lcl_GetFrameFormatByName(SwWrtShell& rSh, const OUSt
if(pFormat->GetName() == rName)
return pFormat;
}
- return 0;
+ return nullptr;
}
#define SwFrameShell
@@ -622,7 +622,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
assert(pFact);
std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(
- pFact->CreateSvxObjectTitleDescDialog( NULL,
+ pFact->CreateSvxObjectTitleDescDialog( nullptr,
aTitle,
aDescription ));
assert(pDlg);
@@ -676,7 +676,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
bProtect |= bParentCntProt;
- const FrmTypeFlags eFrmType = rSh.GetFrmType(0,true);
+ const FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,true);
SwFlyFrmAttrMgr aMgr( false, &rSh, FRMMGR_TYPE_NONE );
SfxWhichIter aIter( rSet );
@@ -967,7 +967,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
SvxBoxItem aBoxItem(rBoxItem);
SvxBorderLine aBorderLine;
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
if(pArgs) // Any controller can sometimes deliver nothing #48169#
{
@@ -980,13 +980,13 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
SvxBoxItem aNewBox(*static_cast<const SvxBoxItem *>(pItem));
const SvxBorderLine* pBorderLine;
- if ((pBorderLine = aBoxItem.GetTop()) != NULL)
+ if ((pBorderLine = aBoxItem.GetTop()) != nullptr)
lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine);
- if ((pBorderLine = aBoxItem.GetBottom()) != NULL)
+ if ((pBorderLine = aBoxItem.GetBottom()) != nullptr)
lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine);
- if ((pBorderLine = aBoxItem.GetLeft()) != NULL)
+ if ((pBorderLine = aBoxItem.GetLeft()) != nullptr)
lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine);
- if ((pBorderLine = aBoxItem.GetRight()) != NULL)
+ if ((pBorderLine = aBoxItem.GetRight()) != nullptr)
lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine);
if(aBorderLine.GetOutWidth() == 0)
@@ -1007,13 +1007,13 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
aBoxItem = aNewBox;
SvxBorderLine aDestBorderLine;
- if( aBoxItem.GetTop() != NULL )
+ if( aBoxItem.GetTop() != nullptr )
aBoxItem.SetLine(&aBorderLine, SvxBoxItemLine::TOP);
- if( aBoxItem.GetBottom() != NULL )
+ if( aBoxItem.GetBottom() != nullptr )
aBoxItem.SetLine(&aBorderLine, SvxBoxItemLine::BOTTOM);
- if( aBoxItem.GetLeft() != NULL )
+ if( aBoxItem.GetLeft() != nullptr )
aBoxItem.SetLine(&aBorderLine, SvxBoxItemLine::LEFT);
- if( aBoxItem.GetRight() != NULL )
+ if( aBoxItem.GetRight() != nullptr )
aBoxItem.SetLine(&aBorderLine, SvxBoxItemLine::RIGHT);
}
}
@@ -1064,10 +1064,10 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
}
else
{
- aBoxItem.SetLine(0, SvxBoxItemLine::TOP);
- aBoxItem.SetLine(0, SvxBoxItemLine::BOTTOM);
- aBoxItem.SetLine(0, SvxBoxItemLine::LEFT);
- aBoxItem.SetLine(0, SvxBoxItemLine::RIGHT);
+ aBoxItem.SetLine(nullptr, SvxBoxItemLine::TOP);
+ aBoxItem.SetLine(nullptr, SvxBoxItemLine::BOTTOM);
+ aBoxItem.SetLine(nullptr, SvxBoxItemLine::LEFT);
+ aBoxItem.SetLine(nullptr, SvxBoxItemLine::RIGHT);
}
}
}
@@ -1255,7 +1255,7 @@ void SwFrameShell::ExecDrawDlgTextFrame(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
assert(pFact);
std::unique_ptr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog(
- NULL,
+ nullptr,
&aNewAttr,
pDoc,
false));
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index bc681b588b02..749474d7c80f 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -132,7 +132,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
case SID_SAVE_GRAPHIC:
{
const Graphic *pGraphic;
- if(0 != (pGraphic = rSh.GetGraphic()))
+ if(nullptr != (pGraphic = rSh.GetGraphic()))
{
OUString sGrfNm;
OUString sFilterNm;
@@ -191,7 +191,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
// When the graphic is selected to be opened via some external tool
// for advanced editing
GraphicObject const*const pGraphicObject(rSh.GetGraphicObj());
- if(0 != pGraphicObject)
+ if(nullptr != pGraphicObject)
{
m_ExternalEdits.push_back(std::unique_ptr<SwExternalToolEdit>(
new SwExternalToolEdit(&rSh)));
@@ -336,7 +336,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame()));
SfxObjectShell * sh = rSh.GetDoc()->GetPersist();
- if (sh != 0 && sh->HasName())
+ if (sh != nullptr && sh->HasName())
{
aSet.Put(
SfxStringItem(SID_REFERER, sh->GetMedium()->GetName()));
@@ -477,7 +477,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
case SID_OBJECT_CROP:
{
GraphicObject const *pGraphicObject = rSh.GetGraphicObj();
- if (0 != pGraphicObject && SDRDRAG_CROP != rSh.GetDragMode()) {
+ if (nullptr != pGraphicObject && SDRDRAG_CROP != rSh.GetDragMode()) {
rSh.StartCropImage();
}
}
@@ -502,7 +502,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
const SfxPoolItem* pItem;
sal_uInt16 nSlot = rReq.GetSlot();
if( !pArgs || SfxItemState::SET != pArgs->GetItemState( nSlot, false, &pItem ))
- pItem = 0;
+ pItem = nullptr;
switch( nSlot )
{
@@ -827,7 +827,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
rSet.DisableItem( nWhich );
nWhich = aIter.NextWhich();
}
- SetGetStateSet( 0 );
+ SetGetStateSet( nullptr );
}
void SwGrfShell::ExecuteRotation(SfxRequest &rReq)
@@ -928,7 +928,7 @@ void SwGrfShell::GetAttrStateForRotation(SfxItemSet &rSet)
rSet.DisableItem( nWhich );
nWhich = aIterator.NextWhich();
}
- SetGetStateSet( 0 );
+ SetGetStateSet( nullptr );
}
SwGrfShell::~SwGrfShell()
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index 3f9ced7a89d7..1ded2e66fbc1 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -226,7 +226,7 @@ namespace SwLangHelper
void SetLanguage( SwWrtShell &rWrtSh, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
{
- SetLanguage( rWrtSh, 0 , ESelection(), rLangText, bIsForSelection, rCoreSet );
+ SetLanguage( rWrtSh, nullptr , ESelection(), rLangText, bIsForSelection, rCoreSet );
}
void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
@@ -234,7 +234,7 @@ namespace SwLangHelper
const LanguageType nLang = SvtLanguageTable::GetLanguageType( rLangText );
if (nLang != LANGUAGE_DONTKNOW)
{
- EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
+ EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : nullptr;
OSL_ENSURE( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
//get ScriptType
@@ -308,7 +308,7 @@ namespace SwLangHelper
void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet )
{
- SetLanguage_None( rWrtSh,0,ESelection(),bIsForSelection,rCoreSet );
+ SetLanguage_None( rWrtSh,nullptr,ESelection(),bIsForSelection,rCoreSet );
}
void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, bool bIsForSelection, SfxItemSet &rCoreSet )
@@ -335,7 +335,7 @@ namespace SwLangHelper
// (for paragraph is handled by previosuly having set the selection to the
// whole paragraph)
- EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
+ EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : nullptr;
OSL_ENSURE( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
if (pEditEngine)
{
@@ -368,7 +368,7 @@ namespace SwLangHelper
void ResetLanguages( SwWrtShell &rWrtSh, bool bIsForSelection )
{
- ResetLanguages( rWrtSh, 0 , ESelection(), bIsForSelection );
+ ResetLanguages( rWrtSh, nullptr , ESelection(), bIsForSelection );
}
void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, bool bIsForSelection )
@@ -416,7 +416,7 @@ namespace SwLangHelper
LanguageType nLang = LANGUAGE_SYSTEM;
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
SfxItemState nState = aSet.GetItemState( nLangWhichId, true, &pItem );
if (nState > SfxItemState::DEFAULT && pItem)
{
diff --git a/sw/source/uibase/shells/mediash.cxx b/sw/source/uibase/shells/mediash.cxx
index 6afb7f525ccf..b39ade8b7b2e 100644
--- a/sw/source/uibase/shells/mediash.cxx
+++ b/sw/source/uibase/shells/mediash.cxx
@@ -114,7 +114,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
const SfxPoolItem* pItem;
if( !pArgs || ( SfxItemState::SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) )
- pItem = NULL;
+ pItem = nullptr;
if( pItem )
{
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index ce012a693a13..96016f8cf94e 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -201,7 +201,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
rSh.GetTabBorders( rSet );
//row split
- SwFormatRowSplit* pSplit = 0;
+ SwFormatRowSplit* pSplit = nullptr;
rSh.GetRowSplit(pSplit);
if(pSplit)
{
@@ -274,7 +274,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
{
rSh.StartAllAction();
rSh.StartUndo( UNDO_TABLE_ATTR );
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(SfxItemState::SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, false, &pItem))
{
@@ -284,14 +284,14 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
}
bool bBorder = ( SfxItemState::SET == rSet.GetItemState( RES_BOX ) ||
SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
- pItem = 0;
+ pItem = nullptr;
bool bBackground = SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem );
- const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
+ const SfxPoolItem* pRowItem = nullptr, *pTableItem = nullptr;
bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem );
bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem );
- const SfxPoolItem* pSplit = 0;
+ const SfxPoolItem* pSplit = nullptr;
bool bRowSplit = SfxItemState::SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pSplit );
- const SfxPoolItem* pBoxDirection = 0;
+ const SfxPoolItem* pBoxDirection = nullptr;
bool bBoxDirection = SfxItemState::SET == rSet.GetItemState( FN_TABLE_BOX_TEXTORIENTATION, false, &pBoxDirection );
if( bBackground || bBorder || bRowSplit || bBoxDirection)
{
@@ -353,7 +353,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
SwTabCols aTabCols;
bool bTabCols = false;
- SwTableRep* pRep = 0;
+ SwTableRep* pRep = nullptr;
SwFrameFormat *pFormat = rSh.GetTableFormat();
SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem ))
@@ -454,7 +454,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
// At first the slots which doesn't need a FrmMgr.
bool bMore = false;
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
@@ -476,7 +476,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
rSh.GetTabBorders( aCoreSet );
const SvxBoxItem& rCoreBox = static_cast<const SvxBoxItem&>(
aCoreSet.Get(RES_BOX));
- const SfxPoolItem *pBoxItem = 0;
+ const SfxPoolItem *pBoxItem = nullptr;
if ( pArgs->GetItemState(RES_BOX, true, &pBoxItem) == SfxItemState::SET )
{
aBox = *static_cast<const SvxBoxItem*>(pBoxItem);
@@ -788,7 +788,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
break;
case FN_TABLE_SET_READ_ONLY_CELLS:
rSh.ProtectCells();
- rSh.ResetSelect( 0, false );
+ rSh.ResetSelect( nullptr, false );
bCallDone = true;
break;
case FN_TABLE_UNSET_READ_ONLY_CELLS:
@@ -923,7 +923,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ( FN_TABLE_INSERT_ROW_DLG != nSlot || !rSh.IsInRepeatedHeadline())
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand() ) : 0);
+ std::unique_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand() ) : nullptr);
if( pDlg.get() && (pDlg->Execute() == 1) )
{
@@ -1168,7 +1168,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_ROW_SPLIT :
{
const SfxBoolItem* pBool = static_cast<const SfxBoolItem*>(pItem);
- SwFormatRowSplit* pSplit = 0;
+ SwFormatRowSplit* pSplit = nullptr;
if(!pBool)
{
rSh.GetRowSplit(pSplit);
@@ -1347,7 +1347,7 @@ void SwTableShell::GetState(SfxItemSet &rSet)
}
else
{
- SwFormatRowSplit* pSplit = 0;
+ SwFormatRowSplit* pSplit = nullptr;
rSh.GetRowSplit(pSplit);
if(pSplit)
rSet.Put(*pSplit);
@@ -1407,7 +1407,7 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
const SvxLineItem &rLineItem = static_cast<const SvxLineItem&>(pArgs->
Get( SID_FRAME_LINESTYLE ));
const SvxBorderLine* pBorderLine = rLineItem.GetLine();
- rSh.SetTabLineStyle( 0, true, pBorderLine);
+ rSh.SetTabLineStyle( nullptr, true, pBorderLine);
}
else
{
@@ -1446,7 +1446,7 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
SwWrtShell &rSh = GetShell();
// At first the slots, which doesn't need a FrmMgr.
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 4ea500e1d49c..869d845de3cc 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -109,7 +109,7 @@ static OUString lcl_BuildTitleWithRedline( const SwRangeRedline *pRedline )
void SwTextShell::ExecField(SfxRequest &rReq)
{
SwWrtShell& rSh = GetShell();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -183,7 +183,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
bool bRet = false;
SwFieldType* pField = rSh.GetFieldType( 0, RES_INPUTFLD );
const bool bAddSetExpressionFields = !( rSh.GetViewOptions()->IsReadonly() );
- if ( pField != NULL
+ if ( pField != nullptr
&& rSh.MoveFieldType(
pField,
FN_GOTO_NEXT_INPUTFLD == nSlot,
@@ -191,7 +191,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
bAddSetExpressionFields ) )
{
rSh.ClearMark();
- if ( dynamic_cast<SwInputField*>(rSh.GetCurField( true )) != NULL )
+ if ( dynamic_cast<SwInputField*>(rSh.GetCurField( true )) != nullptr )
{
rSh.SttSelect();
rSh.SelectText(
@@ -304,7 +304,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->ToggleChildWindow(FN_INSERT_FIELD);
- bRes = pVFrame->GetChildWindow( nSlot ) != 0;
+ bRes = pVFrame->GetChildWindow( nSlot ) != nullptr;
Invalidate(rReq.GetSlot());
Invalidate(FN_INSERT_FIELD_CTRL);
rReq.Ignore();
@@ -420,7 +420,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
if ( pSwFormatField->GetField() == pPostIt )
{
- pSwFormatField->Broadcast( SwFormatFieldHint( 0, SwFormatFieldHintWhich::FOCUS, &GetView() ) );
+ pSwFormatField->Broadcast( SwFormatFieldHint( nullptr, SwFormatFieldHintWhich::FOCUS, &GetView() ) );
break;
}
pSwFormatField = aIter.Next();
@@ -477,7 +477,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
pActRed = rSh.SelPrevRedline();
}
- bool bPrev = pActRed != 0;
+ bool bPrev = pActRed != nullptr;
rSh.Pop(false);
rSh.EndAction();
@@ -487,7 +487,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
rSh.StartAction();
rSh.Push();
pActRed = rSh.SelNextRedline();
- bool bNext = pActRed != 0;
+ bool bNext = pActRed != nullptr;
rSh.Pop(false); // Restore cursor position
if( rSh.IsCrsrPtAtEnd() )
@@ -525,7 +525,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
}
pDlg.reset();
- SwViewShell::SetCareWin(NULL);
+ SwViewShell::SetCareWin(nullptr);
g_bNoInterrupt = false;
rSh.ClearMark();
GetView().AttrChangedNotify(GetShellPtr());
@@ -643,7 +643,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
{
SwWrtShell& rSh = GetShell();
SfxWhichIter aIter( rSet );
- const SwField* pField = 0;
+ const SwField* pField = nullptr;
bool bGetField = false;
sal_uInt16 nWhich = aIter.FirstWhich();
@@ -869,7 +869,7 @@ IMPL_LINK_TYPED( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog&, rDlg, vo
pSh->Push();
const SwRangeRedline *pActRed = pSh->SelNextRedline();
- pSh->Pop(pActRed != 0);
+ pSh->Pop(pActRed != nullptr);
bool bEnable = false;
@@ -877,7 +877,7 @@ IMPL_LINK_TYPED( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog&, rDlg, vo
{
pSh->StartAction();
pSh->Push();
- bEnable = pSh->SelNextRedline() != 0;
+ bEnable = pSh->SelNextRedline() != nullptr;
pSh->Pop(false);
pSh->EndAction();
}
@@ -913,7 +913,7 @@ IMPL_LINK_TYPED( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog&, rDlg, vo
// Traveling only if more than one field.
pSh->Push();
const SwRangeRedline *pActRed = pSh->SelPrevRedline();
- pSh->Pop(pActRed != 0);
+ pSh->Pop(pActRed != nullptr);
bool bEnable = false;
@@ -921,7 +921,7 @@ IMPL_LINK_TYPED( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog&, rDlg, vo
{
pSh->StartAction();
pSh->Push();
- bEnable = pSh->SelPrevRedline() != 0;
+ bEnable = pSh->SelPrevRedline() != nullptr;
pSh->Pop(false);
pSh->EndAction();
}
diff --git a/sw/source/uibase/shells/textglos.cxx b/sw/source/uibase/shells/textglos.cxx
index 525b3e94ee64..855d6c803394 100644
--- a/sw/source/uibase/shells/textglos.cxx
+++ b/sw/source/uibase/shells/textglos.cxx
@@ -41,7 +41,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
bool bUpdateList = false;
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(pArgs)
pArgs->GetItemState(nSlot, false, &pItem );
diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx
index 9686c3ca2fdd..7eacd872d994 100644
--- a/sw/source/uibase/shells/textidx.cxx
+++ b/sw/source/uibase/shells/textidx.cxx
@@ -44,7 +44,7 @@
void SwTextShell::ExecIdx(SfxRequest &rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
pArgs->GetItemState(nSlot, false, &pItem );
@@ -121,7 +121,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
aSet.Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth));
// Height = width for a more consistent preview (analogous to edit range)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
- const SwTOXBase* pCurTOX = 0;
+ const SwTOXBase* pCurTOX = nullptr;
bool bGlobal = false;
if(pItem)
{
@@ -170,8 +170,8 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
SfxChildWindow* pAuthMark = pVFrame->GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG);
const bool bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() );
- const SwTOXBase* pBase = 0;
- if( bHtmlMode || 0 != ( pBase = rSh.GetCurTOX()) )
+ const SwTOXBase* pBase = nullptr;
+ if( bHtmlMode || nullptr != ( pBase = rSh.GetCurTOX()) )
{
if( pBase )
{
@@ -229,14 +229,14 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
}
else
rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG,
- 0 != pIdxMrk));
+ nullptr != pIdxMrk));
SwField* pField = rSh.GetCurField();
if(bInReadonly)
rSet.DisableItem(FN_INSERT_AUTH_ENTRY_DLG);
else
- rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, 0 != pAuthMark));
+ rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, nullptr != pAuthMark));
if( bInReadonly || !pField ||
pField->GetTyp()->Which() != RES_AUTHORITY)
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 8c65f71359fd..619186115204 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -143,7 +143,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
"wrong shell on dispatcher" );
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
pArgs->GetItemState(nSlot, false, &pItem );
@@ -272,7 +272,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
}
- rSh.InsertObject( xObj, 0, true, nSlot);
+ rSh.InsertObject( xObj, nullptr, true, nSlot);
}
}
}
@@ -283,7 +283,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case SID_INSERT_PLUGIN:
{
const SfxGlobalNameItem* pNameItem = rReq.GetArg<SfxGlobalNameItem>(SID_INSERT_OBJECT);
- SvGlobalName *pName = NULL;
+ SvGlobalName *pName = nullptr;
SvGlobalName aName;
if ( pNameItem )
{
@@ -413,7 +413,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
else
{
- rSh.InsertObject( xObj, 0, true, nSlot);
+ rSh.InsertObject( xObj, nullptr, true, nSlot);
rReq.Done();
}
}
@@ -526,7 +526,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_FRAME:
{
bool bSingleCol = false;
- if( 0!= dynamic_cast< SwWebDocShell*>( GetView().GetDocShell()) )
+ if( nullptr!= dynamic_cast< SwWebDocShell*>( GetView().GetDocShell()) )
{
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
if( HTML_CFG_MSIE == rHtmlOpt.GetExportMode() )
@@ -926,7 +926,7 @@ void SwTextShell::ExecRotateTransliteration( SfxRequest & rReq )
}
SwTextShell::SwTextShell(SwView &_rView) :
- SwBaseShell(_rView), pPostItFieldMgr( 0 )
+ SwBaseShell(_rView), pPostItFieldMgr( nullptr )
{
SetName("Text");
SetHelpId(SW_TEXTSHELL);
@@ -983,7 +983,7 @@ SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrmAttrMgr& rMgr)
void SwTextShell::InsertSymbol( SfxRequest& rReq )
{
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( pArgs )
pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
@@ -991,7 +991,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
if ( pItem )
{
aChars = static_cast<const SfxStringItem*>(pItem)->GetValue();
- const SfxPoolItem* pFtItem = NULL;
+ const SfxPoolItem* pFtItem = nullptr;
pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem );
if ( pFontItem )
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 94f95fe0bd53..3e3e2e3b1ba6 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -194,7 +194,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
pDlg->SetCurPageId(OUStringToOString(pItem->GetValue(), RTL_TEXTENCODING_UTF8));
}
- const SfxItemSet* pSet = NULL;
+ const SfxItemSet* pSet = nullptr;
if ( !bUseDialog )
pSet = pArgs;
else if ( pDlg && pDlg->Execute() == RET_OK ) /* #110771# pDlg can be NULL */
@@ -283,7 +283,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
bool bUseDialog = true;
const SfxItemSet *pArgs = rReq.GetArgs();
SwWrtShell& rWrtSh = GetShell();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
pArgs->GetItemState(GetPool().GetWhich(nSlot), false, &pItem);
@@ -473,7 +473,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SvxFontItem aFont( rFont.GetFamily(), pFont->GetValue(),
rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT );
rWrtSh.SetAttrSet( aSet, SetAttrMode::DONTEXPAND );
- rWrtSh.ResetSelect(0, false);
+ rWrtSh.ResetSelect(nullptr, false);
rWrtSh.EndSelect();
rWrtSh.GotoFootnoteText();
}
@@ -900,11 +900,11 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
case SID_PARA_DLG:
{
- SwPaM* pPaM = NULL;
+ SwPaM* pPaM = nullptr;
if ( pArgs )
{
- const SfxPoolItem* pPaMItem = 0;
+ const SfxPoolItem* pPaMItem = nullptr;
pArgs->GetItemState( GetPool().GetWhich( FN_PARAM_PAM ), false, &pPaMItem );
if ( pPaMItem )
pPaM = static_cast< const SwPaMItem* >( pPaMItem )->GetValue( );
@@ -1006,10 +1006,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- pDlg.reset(pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet, DLG_STD, NULL, false, sDefPage ));
+ pDlg.reset(pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet, DLG_STD, nullptr, false, sDefPage ));
OSL_ENSURE(pDlg, "Dialog creation failed!");
}
- SfxItemSet* pSet = NULL;
+ SfxItemSet* pSet = nullptr;
if ( !bUseDialog )
{
if ( nSlot == SID_ATTR_PARA_LRSPACE)
@@ -1526,7 +1526,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
{
const FrmTypeFlags nNoType =
FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FOOTNOTE;
- if ( rSh.GetFrmType(0,true) & nNoType )
+ if ( rSh.GetFrmType(nullptr,true) & nNoType )
rSet.DisableItem(nWhich);
if ( rSh.CrsrInsideInputField() )
@@ -1549,7 +1549,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_INSERT_TABLE:
if ( rSh.CrsrInsideInputField()
|| rSh.GetTableFormat()
- || (rSh.GetFrmType(0,true) & FrmTypeFlags::FOOTNOTE) )
+ || (rSh.GetFrmType(nullptr,true) & FrmTypeFlags::FOOTNOTE) )
{
rSet.DisableItem( nWhich );
}
@@ -1708,7 +1708,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
}
else
{
- rSet.Put(SfxBoolItem( nWhich, 0 != GetView().GetViewFrame()->GetChildWindow( nWhich ) ));
+ rSet.Put(SfxBoolItem( nWhich, nullptr != GetView().GetViewFrame()->GetChildWindow( nWhich ) ));
}
break;
diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx
index fddb21522455..6d2ccb2dd468 100644
--- a/sw/source/uibase/shells/textsh2.cxx
+++ b/sw/source/uibase/shells/textsh2.cxx
@@ -90,12 +90,12 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
OUString sSourceArg, sCommandArg;
sal_Int32 nCommandTypeArg = 0;
- const SfxPoolItem* pSourceItem = 0;
- const SfxPoolItem* pCursorItem = 0;
- const SfxPoolItem* pConnectionItem = 0;
- const SfxPoolItem* pCommandItem = 0;
- const SfxPoolItem* pCommandTypeItem = 0;
- const SfxPoolItem* pSelectionItem = 0;
+ const SfxPoolItem* pSourceItem = nullptr;
+ const SfxPoolItem* pCursorItem = nullptr;
+ const SfxPoolItem* pConnectionItem = nullptr;
+ const SfxPoolItem* pCommandItem = nullptr;
+ const SfxPoolItem* pCommandTypeItem = nullptr;
+ const SfxPoolItem* pSelectionItem = nullptr;
// first get the selection of rows to be inserted
pArgs->GetItemState(FN_DB_DATA_SELECTION_ANY, false, &pSelectionItem);
@@ -187,8 +187,8 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
case FN_QRY_INSERT_FIELD:
{
- const SfxPoolItem* pColumnItem = 0;
- const SfxPoolItem* pColumnNameItem = 0;
+ const SfxPoolItem* pColumnItem = nullptr;
+ const SfxPoolItem* pColumnNameItem = nullptr;
pArgs->GetItemState(FN_DB_COLUMN_ANY, false, &pColumnItem);
pArgs->GetItemState(FN_DB_DATA_COLUMN_NAME_ANY, false, &pColumnNameItem);
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index ddd1de7e8288..55aae8590a50 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -171,16 +171,16 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
{
sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
- bool bArgs = pArgs != 0 && pArgs->Count() > 0;
+ bool bArgs = pArgs != nullptr && pArgs->Count() > 0;
SwWrtShell& rWrtSh = GetShell();
- SwTextFormatColl* pColl = 0;
+ SwTextFormatColl* pColl = nullptr;
// Is only set if the whole paragraph is selected and AutoUpdateFormat is set.
if (rWrtSh.HasSelection() && rWrtSh.IsSelFullPara())
{
pColl = rWrtSh.GetCurTextFormatColl();
if ( pColl && !pColl->IsAutoUpdateFormat() )
- pColl = 0;
+ pColl = nullptr;
}
SfxItemPool& rPool = GetPool();
sal_uInt16 nWhich = rPool.GetWhich( nSlot );
@@ -389,7 +389,7 @@ SET_LINESPACE:
else if(SVX_ADJUST_RIGHT == aFormat.GetNumAdjust())
aFormat.SetNumAdjust( SVX_ADJUST_LEFT );
- aRule.SetLevel(i, aFormat, aRule.Get(i) != 0);
+ aRule.SetLevel(i, aFormat, aRule.Get(i) != nullptr);
}
SwNumRule aSetRule( pCurRule->GetName(),
pCurRule->Get( 0 ).GetPositionAndSpaceMode() );
@@ -421,7 +421,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
@@ -435,7 +435,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
SfxItemSet aSet(GetPool(), RES_PARATR_DROP, RES_PARATR_DROP, 0L);
rSh.GetCurAttr(aSet);
SwFormatDrop aDropItem(static_cast<const SwFormatDrop&>(aSet.Get(RES_PARATR_DROP)));
- SwCharFormat* pFormat = 0;
+ SwCharFormat* pFormat = nullptr;
if(!sCharStyleName.isEmpty())
pFormat = rSh.FindCharFormatByName( sCharStyleName );
aDropItem.SetCharFormat( pFormat );
@@ -519,7 +519,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
sal_uInt16 nSlot = aIter.FirstWhich();
bool bFlag = false;
SfxBoolItem aFlagItem;
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
int eAdjust = -1; // Illegal value to recognize DONTCARE.
SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, false, &pItem);
diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx
index 6ed39e5740b8..1d85bfbd188b 100644
--- a/sw/source/uibase/shells/txtcrsr.cxx
+++ b/sw/source/uibase/shells/txtcrsr.cxx
@@ -318,11 +318,11 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
case SID_FM_TOGGLECONTROLFOCUS:
{
const SwDoc* pDoc = rSh.GetDoc();
- const SwDocShell* pDocShell = pDoc ? pDoc->GetDocShell() : NULL;
- const SwView* pView = pDocShell ? pDocShell->GetView() : NULL;
- const FmFormShell* pFormShell = pView ? pView->GetFormShell() : NULL;
- SdrView* pDrawView = pView ? pView->GetDrawView() : NULL;
- vcl::Window* pWindow = pView ? pView->GetWrtShell().GetWin() : NULL;
+ const SwDocShell* pDocShell = pDoc ? pDoc->GetDocShell() : nullptr;
+ const SwView* pView = pDocShell ? pDocShell->GetView() : nullptr;
+ const FmFormShell* pFormShell = pView ? pView->GetFormShell() : nullptr;
+ SdrView* pDrawView = pView ? pView->GetDrawView() : nullptr;
+ vcl::Window* pWindow = pView ? pView->GetWrtShell().GetWin() : nullptr;
OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::ExecMoveMisc: no chance!" );
if ( !pFormShell || !pDrawView || !pWindow )
@@ -363,7 +363,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_TO_HEADER:
rSh.MoveCrsr();
- if ( FrmTypeFlags::HEADER & rSh.GetFrmType(0,false) )
+ if ( FrmTypeFlags::HEADER & rSh.GetFrmType(nullptr,false) )
rSh.SttPg();
else
{
@@ -375,7 +375,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_TO_FOOTER:
rSh.MoveCrsr();
- if ( FrmTypeFlags::FOOTER & rSh.GetFrmType(0,false) )
+ if ( FrmTypeFlags::FOOTER & rSh.GetFrmType(nullptr,false) )
rSh.EndPg();
else
{
@@ -387,7 +387,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_FOOTNOTE_TO_ANCHOR:
rSh.MoveCrsr();
- if ( FrmTypeFlags::FOOTNOTE & rSh.GetFrmType(0,false) )
+ if ( FrmTypeFlags::FOOTNOTE & rSh.GetFrmType(nullptr,false) )
rSh.GotoFootnoteAnchor();
else
rSh.GotoFootnoteText();
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 1db6124b9e3a..acebe2535ad3 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -116,7 +116,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
SwDocShell* pDocSh = GetView().GetDocShell();
const bool bHtml = dynamic_cast<SwWebDocShell*>( pDocSh ) != nullptr;
const SwNumRule* pNumRuleAtCurrentSelection = GetShell().GetNumRuleAtCurrentSelection();
- if ( pNumRuleAtCurrentSelection != NULL )
+ if ( pNumRuleAtCurrentSelection != nullptr )
{
SvxNumRule aRule = pNumRuleAtCurrentSelection->MakeSvxNumRule();
@@ -129,7 +129,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
const SvxBrushItem* pBrush = aFormat.GetBrush();
if(pBrush && !pBrush->GetGraphicLink().isEmpty())
aFormat.SetNumberingType(SvxExtNumType(SVX_NUM_BITMAP|LINK_TOKEN));
- aRule.SetLevel(i, aFormat, aRule.Get(i) != 0);
+ aRule.SetLevel(i, aFormat, aRule.Get(i) != nullptr);
}
}
if(bHtml)
@@ -199,7 +199,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
rReq.Done();
SvxNumRule* pSetRule = static_cast<const SvxNumBulletItem*>( pItem )->GetNumRule();
pSetRule->UnLinkGraphics();
- SwNumRule aSetRule( pNumRuleAtCurrentSelection != NULL
+ SwNumRule aSetRule( pNumRuleAtCurrentSelection != nullptr
? pNumRuleAtCurrentSelection->GetName()
: GetShell().GetUniqueNumRuleName(),
numfunc::GetDefaultPositionAndSpaceMode() );
@@ -207,12 +207,12 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
aSetRule.SetAutoRule( true );
// No start of new list, if an existing list style is edited.
// Otherwise start a new list.
- const bool bCreateList = ( pNumRuleAtCurrentSelection == NULL );
+ const bool bCreateList = ( pNumRuleAtCurrentSelection == nullptr );
GetShell().SetCurNumRule( aSetRule, bCreateList );
}
// If the Dialog was leaved with OK but nothing was chosen then the
// numbering must be at least activated, if it is not already.
- else if ( pNumRuleAtCurrentSelection == NULL
+ else if ( pNumRuleAtCurrentSelection == nullptr
&& SfxItemState::SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, false, &pItem ) )
{
rReq.AppendItem( *pItem );
@@ -248,18 +248,18 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq)
case FN_SVX_SET_BULLET:
{
const SfxUInt16Item* pItem = rReq.GetArg<SfxUInt16Item>(nSlot);
- if ( pItem != NULL )
+ if ( pItem != nullptr )
{
const sal_uInt16 nChoosenItemIdx = pItem->GetValue();
svx::sidebar::NBOTypeMgrBase* pNBOTypeMgr =
nSlot == FN_SVX_SET_NUMBER
? svx::sidebar::NBOutlineTypeMgrFact::CreateInstance( svx::sidebar::eNBOType::NUMBERING )
: svx::sidebar::NBOutlineTypeMgrFact::CreateInstance( svx::sidebar::eNBOType::BULLETS );
- if ( pNBOTypeMgr != NULL )
+ if ( pNBOTypeMgr != nullptr )
{
const SwNumRule* pNumRuleAtCurrentSelection = GetShell().GetNumRuleAtCurrentSelection();
sal_uInt16 nActNumLvl = USHRT_MAX;
- if ( pNumRuleAtCurrentSelection != NULL )
+ if ( pNumRuleAtCurrentSelection != nullptr )
{
const sal_uInt16 nLevel = GetShell().GetNumLevel();
if ( nLevel < MAXLEVEL )
@@ -268,9 +268,9 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq)
}
}
SwNumRule aNewNumRule(
- pNumRuleAtCurrentSelection != NULL ? pNumRuleAtCurrentSelection->GetName() : GetShell().GetUniqueNumRuleName(),
+ pNumRuleAtCurrentSelection != nullptr ? pNumRuleAtCurrentSelection->GetName() : GetShell().GetUniqueNumRuleName(),
numfunc::GetDefaultPositionAndSpaceMode() );
- SvxNumRule aNewSvxNumRule = pNumRuleAtCurrentSelection != NULL
+ SvxNumRule aNewSvxNumRule = pNumRuleAtCurrentSelection != nullptr
? pNumRuleAtCurrentSelection->MakeSvxNumRule()
: aNewNumRule.MakeSvxNumRule();
// set unit attribute to NB Manager
@@ -281,7 +281,7 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq)
aNewNumRule.SetSvxRule( aNewSvxNumRule, GetShell().GetDoc() );
aNewNumRule.SetAutoRule( true );
- const bool bCreateNewList = ( pNumRuleAtCurrentSelection == NULL );
+ const bool bCreateNewList = ( pNumRuleAtCurrentSelection == nullptr );
GetShell().SetCurNumRule( aNewNumRule, bCreateNewList );
}
}
diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx b/sw/source/uibase/sidebar/PageColumnControl.cxx
index bfcdd2dc36d0..3b2c3d32439b 100644
--- a/sw/source/uibase/sidebar/PageColumnControl.cxx
+++ b/sw/source/uibase/sidebar/PageColumnControl.cxx
@@ -47,19 +47,19 @@ PageColumnControl::PageColumnControl(
if ( bLandscape )
{
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_ONE_L)), 0, SW_RES(STR_ONE), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_TWO_L)), 0, SW_RES(STR_TWO), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_THREE_L)), 0, SW_RES(STR_THREE), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_LEFT_L)), 0, SW_RES(STR_LEFT), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_RIGHT_L)), 0, SW_RES(STR_RIGHT), 0 );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_ONE_L)), nullptr, SW_RES(STR_ONE), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_TWO_L)), nullptr, SW_RES(STR_TWO), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_THREE_L)), nullptr, SW_RES(STR_THREE), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_LEFT_L)), nullptr, SW_RES(STR_LEFT), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_RIGHT_L)), nullptr, SW_RES(STR_RIGHT), nullptr );
}
else
{
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_ONE)), 0, SW_RES(STR_ONE), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_TWO)), 0, SW_RES(STR_TWO), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_THREE)), 0, SW_RES(STR_THREE), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_LEFT)), 0, SW_RES(STR_LEFT), 0 );
- mpColumnValueSet->AddItem(Image(SW_RES(IMG_RIGHT)), 0, SW_RES(STR_RIGHT), 0 );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_ONE)), nullptr, SW_RES(STR_ONE), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_TWO)), nullptr, SW_RES(STR_TWO), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_THREE)), nullptr, SW_RES(STR_THREE), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_LEFT)), nullptr, SW_RES(STR_LEFT), nullptr );
+ mpColumnValueSet->AddItem(Image(SW_RES(IMG_RIGHT)), nullptr, SW_RES(STR_RIGHT), nullptr );
}
mpColumnValueSet->SetNoSelection();
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index 6f4b82e18467..f8236a1e9039 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -204,7 +204,7 @@ void PageMarginControl::FillValueSet(
aHelpText += aBottom;
aHelpText += aNarrowValText;
mpMarginValueSet->AddItem(
- Image((bLandscape) ? SW_RES(IMG_NARROW_L) : SW_RES(IMG_NARROW)), 0,
+ Image((bLandscape) ? SW_RES(IMG_NARROW_L) : SW_RES(IMG_NARROW)), nullptr,
SW_RESSTR(STR_NARROW), &aHelpText );
SetMetricValue( *maWidthHeightField.get(), SWPAGE_NORMAL_VALUE, meUnit );
@@ -218,7 +218,7 @@ void PageMarginControl::FillValueSet(
aHelpText += aBottom;
aHelpText += aNormalValText;
mpMarginValueSet->AddItem(
- Image((bLandscape) ? SW_RES(IMG_NORMAL_L) : SW_RES(IMG_NORMAL)), 0,
+ Image((bLandscape) ? SW_RES(IMG_NORMAL_L) : SW_RES(IMG_NORMAL)), nullptr,
SW_RESSTR(STR_NORMAL), &aHelpText );
SetMetricValue( *maWidthHeightField.get(), SWPAGE_WIDE_VALUE1, meUnit );
@@ -234,7 +234,7 @@ void PageMarginControl::FillValueSet(
aHelpText += aBottom;
aHelpText += aWide1ValText;
mpMarginValueSet->AddItem(
- Image((bLandscape) ? SW_RES(IMG_WIDE_L) : SW_RES(IMG_WIDE)), 0,
+ Image((bLandscape) ? SW_RES(IMG_WIDE_L) : SW_RES(IMG_WIDE)), nullptr,
SW_RESSTR(STR_WIDE), &aHelpText );
const OUString aInner = SW_RESSTR(STR_MARGIN_TOOLTIP_INNER);
@@ -251,7 +251,7 @@ void PageMarginControl::FillValueSet(
aHelpText += aBottom;
aHelpText += aWide1ValText;
mpMarginValueSet->AddItem(
- Image((bLandscape) ? SW_RES(IMG_MIRRORED_L) : SW_RES(IMG_MIRRORED)), 0,
+ Image((bLandscape) ? SW_RES(IMG_MIRRORED_L) : SW_RES(IMG_MIRRORED)), nullptr,
SW_RESSTR(STR_MIRRORED), &aHelpText );
if ( bUserCustomValuesAvailable )
@@ -274,7 +274,7 @@ void PageMarginControl::FillValueSet(
aHelpText.clear();
}
mpMarginValueSet->AddItem(
- Image((bUserCustomValuesAvailable) ? SW_RES(IMG_CUSTOM) : SW_RES(IMG_CUSTOM_DIS)), 0,
+ Image((bUserCustomValuesAvailable) ? SW_RES(IMG_CUSTOM) : SW_RES(IMG_CUSTOM_DIS)), nullptr,
SW_RESSTR(STR_LCVALUE), &aHelpText );
}
diff --git a/sw/source/uibase/sidebar/PageOrientationControl.cxx b/sw/source/uibase/sidebar/PageOrientationControl.cxx
index 73ff9eb676f9..a9f3fa689cf2 100644
--- a/sw/source/uibase/sidebar/PageOrientationControl.cxx
+++ b/sw/source/uibase/sidebar/PageOrientationControl.cxx
@@ -42,10 +42,10 @@ PageOrientationControl::PageOrientationControl(
// initialize <ValueSetWithText> control
{
- mpOrientationValueSet->AddItem(Image(SW_RES(IMG_PORTRAIT)), 0,
- SW_RES(STR_PORTRAIT), 0);
- mpOrientationValueSet->AddItem(Image(SW_RES(IMG_LANDSCAPE)), 0,
- SW_RES(STR_LANDSCAPE), 0 );
+ mpOrientationValueSet->AddItem(Image(SW_RES(IMG_PORTRAIT)), nullptr,
+ SW_RES(STR_PORTRAIT), nullptr);
+ mpOrientationValueSet->AddItem(Image(SW_RES(IMG_LANDSCAPE)), nullptr,
+ SW_RES(STR_LANDSCAPE), nullptr );
}
mpOrientationValueSet->SetSelectHdl(LINK(this, PageOrientationControl,ImplOrientationHdl ));
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
index 8ac1f6939617..7040be9a445f 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
@@ -86,12 +86,12 @@ VclPtr<vcl::Window> PagePropertyPanel::Create (
const css::uno::Reference< css::frame::XFrame>& rxFrame,
SfxBindings* pBindings)
{
- if (pParent == NULL)
- throw css::lang::IllegalArgumentException("no parent Window given to PagePropertyPanel::Create", NULL, 0);
+ if (pParent == nullptr)
+ throw css::lang::IllegalArgumentException("no parent Window given to PagePropertyPanel::Create", nullptr, 0);
if ( ! rxFrame.is())
- throw css::lang::IllegalArgumentException("no XFrame given to PagePropertyPanel::Create", NULL, 1);
- if (pBindings == NULL)
- throw css::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", NULL, 2);
+ throw css::lang::IllegalArgumentException("no XFrame given to PagePropertyPanel::Create", nullptr, 1);
+ if (pBindings == nullptr)
+ throw css::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", nullptr, 2);
return VclPtr<PagePropertyPanel>::Create( pParent,
rxFrame,
@@ -106,8 +106,8 @@ PagePropertyPanel::PagePropertyPanel(
, mpBindings(pBindings)
// image resources
- , maImgSize (NULL)
- , maImgSize_L (NULL)
+ , maImgSize (nullptr)
+ , maImgSize_L (nullptr)
, mImgPortrait (SW_RES(IMG_PAGE_PORTRAIT))
, mImgLandscape (SW_RES(IMG_PAGE_LANDSCAPE))
, mImgNarrow (SW_RES(IMG_PAGE_NARROW))
@@ -203,9 +203,9 @@ PagePropertyPanel::~PagePropertyPanel()
void PagePropertyPanel::dispose()
{
delete[] maImgSize;
- maImgSize = NULL;
+ maImgSize = nullptr;
delete[] maImgSize_L;
- maImgSize_L = NULL;
+ maImgSize_L = nullptr;
mpPageItem.reset();
mpPageLRMarginItem.reset();
@@ -566,7 +566,7 @@ void PagePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* pSt
else
{
SfxViewFrame* pFrame = SfxViewFrame::Current();
- SfxObjectShell* pSh = NULL;
+ SfxObjectShell* pSh = nullptr;
if ( pFrame )
pSh = pFrame->GetObjectShell();
if ( pSh )
@@ -588,9 +588,9 @@ void PagePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* pSt
void PagePropertyPanel::ChangeMarginImage()
{
- if ( mpPageLRMarginItem.get() == 0 ||
- mpPageULMarginItem.get() == 0 ||
- mpPageItem.get() == 0 )
+ if ( mpPageLRMarginItem.get() == nullptr ||
+ mpPageULMarginItem.get() == nullptr ||
+ mpPageItem.get() == nullptr )
{
return;
}
@@ -632,8 +632,8 @@ void PagePropertyPanel::ChangeMarginImage()
void PagePropertyPanel::ChangeSizeImage()
{
- if ( mpPageSizeItem.get() == 0 ||
- mpPageItem.get() == 0 )
+ if ( mpPageSizeItem.get() == nullptr ||
+ mpPageItem.get() == nullptr )
{
return;
}
@@ -695,7 +695,7 @@ void PagePropertyPanel::ChangeSizeImage()
void PagePropertyPanel::ChangeColumnImage( const sal_uInt16 nColumnType )
{
- if ( mpPageItem.get() == 0 )
+ if ( mpPageItem.get() == nullptr )
{
return;
}
diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx
index e43cd140850a..20b3c8a3b449 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -118,7 +118,7 @@ PageSizeControl::PageSizeControl(
mpSizeValueSet->AddItem(
SvxPaperInfo::GetName( maPaperList[ nPaperIdx ] ),
aItemText2,
- 0 );
+ nullptr );
if ( maPaperList[ nPaperIdx ] == mePaper )
{
diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
index 71aa566c7c9f..656054d07f14 100644
--- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx
+++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
@@ -147,12 +147,12 @@ VclPtr<vcl::Window> StylePresetsPanel::Create (vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings)
{
- if (pParent == NULL)
- throw css::lang::IllegalArgumentException("no parent Window given to StylePresetsPanel::Create", NULL, 0);
+ if (pParent == nullptr)
+ throw css::lang::IllegalArgumentException("no parent Window given to StylePresetsPanel::Create", nullptr, 0);
if (!rxFrame.is())
- throw css::lang::IllegalArgumentException("no XFrame given to StylePresetsPanel::Create", NULL, 1);
- if (pBindings == NULL)
- throw css::lang::IllegalArgumentException("no SfxBindings given to StylePresetsPanel::Create", NULL, 2);
+ throw css::lang::IllegalArgumentException("no XFrame given to StylePresetsPanel::Create", nullptr, 1);
+ if (pBindings == nullptr)
+ throw css::lang::IllegalArgumentException("no SfxBindings given to StylePresetsPanel::Create", nullptr, 2);
return VclPtr<StylePresetsPanel>::Create(pParent, rxFrame, pBindings);
}
diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx
index 5181ac3be1f0..4a5d33a1c73e 100644
--- a/sw/source/uibase/sidebar/SwPanelFactory.cxx
+++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx
@@ -105,18 +105,18 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement (
SfxBindings* pBindings = reinterpret_cast<SfxBindings*>(nBindingsValue);
vcl::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow);
- if ( ! xParentWindow.is() || pParentWindow==NULL)
+ if ( ! xParentWindow.is() || pParentWindow==nullptr)
throw RuntimeException(
"PanelFactory::createUIElement called without ParentWindow",
- NULL);
+ nullptr);
if ( ! xFrame.is())
throw RuntimeException(
"PanelFactory::createUIElement called without Frame",
- NULL);
- if (pBindings == NULL)
+ nullptr);
+ if (pBindings == nullptr)
throw RuntimeException(
"PanelFactory::createUIElement called without SfxBindings",
- NULL);
+ nullptr);
if (rsResourceURL.endsWith("/PagePropertyPanel"))
{
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index 5653db1bf76b..90694ef79a0c 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -431,12 +431,12 @@ VclPtr<vcl::Window> ThemePanel::Create (vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings)
{
- if (pParent == NULL)
- throw css::lang::IllegalArgumentException("no parent Window given to PagePropertyPanel::Create", NULL, 0);
+ if (pParent == nullptr)
+ throw css::lang::IllegalArgumentException("no parent Window given to PagePropertyPanel::Create", nullptr, 0);
if (!rxFrame.is())
- throw css::lang::IllegalArgumentException("no XFrame given to PagePropertyPanel::Create", NULL, 1);
- if (pBindings == NULL)
- throw css::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", NULL, 2);
+ throw css::lang::IllegalArgumentException("no XFrame given to PagePropertyPanel::Create", nullptr, 1);
+ if (pBindings == nullptr)
+ throw css::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", nullptr, 2);
return VclPtr<ThemePanel>::Create(pParent, rxFrame, pBindings);
}
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
index 1e6708bf4ec4..8ee32d15feeb 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
@@ -50,12 +50,12 @@ VclPtr<vcl::Window> WrapPropertyPanel::Create (
const css::uno::Reference< css::frame::XFrame >& rxFrame,
SfxBindings* pBindings)
{
- if (pParent == NULL)
- throw css::lang::IllegalArgumentException("no parent Window given to WrapPropertyPanel::Create", NULL, 0);
+ if (pParent == nullptr)
+ throw css::lang::IllegalArgumentException("no parent Window given to WrapPropertyPanel::Create", nullptr, 0);
if ( ! rxFrame.is())
- throw css::lang::IllegalArgumentException("no XFrame given to WrapPropertyPanel::Create", NULL, 1);
- if (pBindings == NULL)
- throw css::lang::IllegalArgumentException("no SfxBindings given to WrapPropertyPanel::Create", NULL, 2);
+ throw css::lang::IllegalArgumentException("no XFrame given to WrapPropertyPanel::Create", nullptr, 1);
+ if (pBindings == nullptr)
+ throw css::lang::IllegalArgumentException("no SfxBindings given to WrapPropertyPanel::Create", nullptr, 2);
return VclPtr<WrapPropertyPanel>::Create(
pParent,
diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx
index c28c18675c45..eb2931965c71 100644
--- a/sw/source/uibase/table/chartins.cxx
+++ b/sw/source/uibase/table/chartins.cxx
@@ -162,7 +162,7 @@ void SwInsertChart(vcl::Window* pParent, SfxBindings* pBindings )
}
}
- SwFlyFrameFormat *pFlyFrameFormat = 0;
+ SwFlyFrameFormat *pFlyFrameFormat = nullptr;
xChartModel.set( SwTableFUNC( &rWrtShell, false ).InsertChart( xDataProvider, xDataProvider.is(), aRangeString, &pFlyFrameFormat ));
//open wizard
@@ -181,7 +181,7 @@ void SwInsertChart(vcl::Window* pParent, SfxBindings* pBindings )
uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY );
if( xInit.is() )
{
- uno::Reference< awt::XWindow > xDialogParentWindow(0);
+ uno::Reference< awt::XWindow > xDialogParentWindow(nullptr);
// initialize dialog
uno::Sequence<uno::Any> aSeq(2);
uno::Any* pArray = aSeq.getArray();
diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx
index e0a9894b7d51..96d1090138a3 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -229,7 +229,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
if ( xObj.is() )
{
- SwFlyFrameFormat* pTmp = 0;
+ SwFlyFrameFormat* pTmp = nullptr;
pSh->InsertOleObject( aEmbObjRef, &pTmp );
if (ppFlyFrameFormat)
*ppFlyFrameFormat = pTmp;
diff --git a/sw/source/uibase/table/tablepg.hxx b/sw/source/uibase/table/tablepg.hxx
index f28c524af776..d832099a4b45 100644
--- a/sw/source/uibase/table/tablepg.hxx
+++ b/sw/source/uibase/table/tablepg.hxx
@@ -89,7 +89,7 @@ public:
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
};
// TabPage Format/Table/Columns
@@ -140,7 +140,7 @@ public:
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
};
@@ -179,7 +179,7 @@ class SwTextFlowPage : public SfxTabPage
DECL_LINK_TYPED( PageBreakTypeHdl_Impl, Button*, void );
DECL_LINK_TYPED( SplitHdl_Impl, Button*, void );
DECL_STATIC_LINK_TYPED( SwTextFlowPage, SplitRowHdl_Impl, Button*, void );
- DECL_LINK_TYPED( HeadLineCBClickHdl, Button* = 0, void );
+ DECL_LINK_TYPED( HeadLineCBClickHdl, Button* = nullptr, void );
public:
SwTextFlowPage( vcl::Window* pParent, const SfxItemSet& rSet );
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx
index c6808fe5d43e..fb16147de311 100644
--- a/sw/source/uibase/uiview/formatclipboard.cxx
+++ b/sw/source/uibase/uiview/formatclipboard.cxx
@@ -60,7 +60,7 @@ FORMAT_PAINTBRUSH_FRAME_IDS
SfxItemSet* lcl_CreateEmptyItemSet( int nSelectionType, SfxItemPool& rPool, bool bNoParagraphFormats = false )
{
- SfxItemSet* pItemSet = 0;
+ SfxItemSet* pItemSet = nullptr;
if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF) )
{
pItemSet = new SfxItemSet(rPool,
@@ -121,7 +121,7 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh )
rSet.Put( pFrameFormat->GetFrmDir() );
}
- SwFormatRowSplit* pSplit = 0;
+ SwFormatRowSplit* pSplit = nullptr;
rSh.GetRowSplit(pSplit);
if(pSplit)
rSet.Put(*pSplit);
@@ -129,11 +129,11 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh )
void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
bool bBorder = ( SfxItemState::SET == rSet.GetItemState( RES_BOX ) ||
SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
bool bBackground = SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem );
- const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
+ const SfxPoolItem* pRowItem = nullptr, *pTableItem = nullptr;
bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem );
bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem );
@@ -164,37 +164,37 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
if(pFrameFormat)
{
//RES_SHADOW
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_BREAK
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_PAGEDESC
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_LAYOUT_SPLIT
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_KEEP
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_FRAMEDIR
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
@@ -217,9 +217,9 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
SwFormatClipboard::SwFormatClipboard()
: m_nSelectionType(0)
- , m_pItemSet_TextAttr(0)
- , m_pItemSet_ParAttr(0)
- , m_pTableItemSet(0)
+ , m_pItemSet_TextAttr(nullptr)
+ , m_pItemSet_ParAttr(nullptr)
+ , m_pTableItemSet(nullptr)
, m_bPersistentCopy(false)
{
}
@@ -232,9 +232,9 @@ SwFormatClipboard::~SwFormatClipboard()
bool SwFormatClipboard::HasContent() const
{
- return m_pItemSet_TextAttr!=0
- || m_pItemSet_ParAttr!=0
- || m_pTableItemSet != 0
+ return m_pItemSet_TextAttr!=nullptr
+ || m_pItemSet_ParAttr!=nullptr
+ || m_pTableItemSet != nullptr
|| !m_aCharStyle.isEmpty()
|| !m_aParaStyle.isEmpty()
;
@@ -578,13 +578,13 @@ void SwFormatClipboard::Erase()
m_nSelectionType = 0;
delete m_pItemSet_TextAttr;
- m_pItemSet_TextAttr = 0;
+ m_pItemSet_TextAttr = nullptr;
delete m_pItemSet_ParAttr;
- m_pItemSet_ParAttr = 0;
+ m_pItemSet_ParAttr = nullptr;
delete m_pTableItemSet;
- m_pTableItemSet = 0;
+ m_pTableItemSet = nullptr;
if( !m_aCharStyle.isEmpty() )
m_aCharStyle.clear();
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 3efbd57b9b7e..3c388fe66a8c 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -188,11 +188,11 @@ void SwPreviewZoomDlg::Apply()
// all for SwPagePreviewWin
SwPagePreviewWin::SwPagePreviewWin( vcl::Window *pParent, SwPagePreview& rPView )
: Window(pParent, WinBits(WB_CLIPCHILDREN))
- , mpViewShell(0)
+ , mpViewShell(nullptr)
, mrView(rPView)
, mbCalcScaleForPreviewLayout(true)
, maPaintedPreviewDocRect(Rectangle(0,0,0,0))
- , mpPgPreviewLayout(NULL)
+ , mpPgPreviewLayout(nullptr)
{
SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW );
SetHelpId(HID_PAGEPREVIEW);
@@ -511,7 +511,7 @@ void SwPagePreviewWin::MouseButtonDown( const MouseEvent& rMEvt )
mrView.SetNewCrsrPos( sNewCrsrPos );
SfxViewFrame *pTmpFrm = mrView.GetViewFrame();
- pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, NULL, 0,
+ pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0,
SfxCallMode::ASYNCHRON );
}
else if ( bIsDocPos || bPosInEmptyPage )
@@ -959,7 +959,7 @@ MOVEPAGE:
nSelPage +=2;
SetNewPage( nSelPage );
SfxViewFrame *pTmpFrm = GetViewFrame();
- pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, NULL, 0,
+ pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0,
SfxCallMode::ASYNCHRON );
}
break;
@@ -1184,8 +1184,8 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
pViewWin( VclPtr<SwPagePreviewWin>::Create(&(GetViewFrame())->GetWindow(), *this ) ),
nNewPage(USHRT_MAX),
sPageStr(SW_RES(STR_PAGE)),
- pHScrollbar(0),
- pVScrollbar(0),
+ pHScrollbar(nullptr),
+ pVScrollbar(nullptr),
pScrollFill(VclPtr<ScrollBarBox>::Create( &pViewFrame->GetWindow(),
pViewFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
mnPageCount( 0 ),
@@ -1243,11 +1243,11 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
}
if( pVS )
- pNew = new SwViewShell( *pVS, pViewWin, 0, VSHELLFLAG_ISPREVIEW );
+ pNew = new SwViewShell( *pVS, pViewWin, nullptr, VSHELLFLAG_ISPREVIEW );
else
pNew = new SwViewShell(
*static_cast<SwDocShell*>(pViewFrame->GetObjectShell())->GetDoc(),
- pViewWin, 0, 0, VSHELLFLAG_ISPREVIEW );
+ pViewWin, nullptr, nullptr, VSHELLFLAG_ISPREVIEW );
pViewWin->SetViewShell( pNew );
pNew->SetSfxViewShell( this );
@@ -1256,9 +1256,9 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
SwPagePreview::~SwPagePreview()
{
- SetWindow( 0 );
+ SetWindow( nullptr );
SwViewShell* pVShell = pViewWin->GetViewShell();
- pVShell->SetWin(0);
+ pVShell->SetWin(nullptr);
delete pVShell;
pViewWin.disposeAndClear();
@@ -1849,7 +1849,7 @@ uno::Reference< css::accessibility::XAccessible >
{
SolarMutexGuard aGuard; // this should have happened already!!!
- OSL_ENSURE( GetViewShell() != NULL, "We need a view shell" );
+ OSL_ENSURE( GetViewShell() != nullptr, "We need a view shell" );
css::uno::Reference< css::accessibility::XAccessible > xAcc = GetAccessible( false );
if (xAcc.is())
{
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index eb66d8ac5fa5..7f1bc323ff53 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -219,7 +219,7 @@ static OUString lcl_ConvertTabsToSpaces( const OUString& sLine )
SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) :
SfxViewShell( pViewFrame, SWSRCVIEWFLAGS ),
aEditWin( VclPtr<SwSrcEditWindow>::Create( &pViewFrame->GetWindow(), this ) ),
- pSearchItem(0),
+ pSearchItem(nullptr),
bSourceSaved(false),
eLoadEncoding(RTL_TEXTENCODING_DONTKNOW)
{
@@ -338,7 +338,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
case SID_SAVEDOC:
{
SwDocShell* pDocShell = GetDocShell();
- SfxMedium* pMed = 0;
+ SfxMedium* pMed = nullptr;
if(pDocShell->HasName())
pMed = pDocShell->GetMedium();
else
diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx
index d2195b7f62c4..c67b46899498 100644
--- a/sw/source/uibase/uiview/swcli.cxx
+++ b/sw/source/uibase/uiview/swcli.cxx
@@ -78,8 +78,8 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect )
rSh.EndAllAction();
- SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, 0, GetObject() )),
- aPrt( rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, GetObject() ));
+ SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() )),
+ aPrt( rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, GetObject() ));
aLogRect.SetPos( aPrt.Pos() + aFrm.Pos() );
aLogRect.SetSize( aPrt.SSize() );
}
@@ -87,7 +87,7 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect )
void SwOleClient::ObjectAreaChanged()
{
SwWrtShell &rSh = static_cast<SwView*>(GetViewShell())->GetWrtShell();
- SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, 0, GetObject() ));
+ SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() ));
if ( !aFrm.IsOver( rSh.VisArea() ) )
rSh.MakeVisible( aFrm );
}
diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx
index 17fbac4e8e90..49d3a96de2a9 100644
--- a/sw/source/uibase/uiview/uivwimp.cxx
+++ b/sw/source/uibase/uiview/uivwimp.cxx
@@ -57,16 +57,16 @@ using namespace ::com::sun::star::datatransfer::clipboard;
SwView_Impl::SwView_Impl(SwView* pShell)
: mxXTextView()
, pView(pShell)
- , pScanEvtLstnr(0)
- , pClipEvtLstnr(0)
+ , pScanEvtLstnr(nullptr)
+ , pClipEvtLstnr(nullptr)
, eShellMode(SHELL_MODE_TEXT)
#if HAVE_FEATURE_DBCONNECTIVITY
- , pConfigItem(0)
+ , pConfigItem(nullptr)
, nMailMergeRestartPage(0)
, bMailMergeSourceView(true)
#endif
- , m_pDocInserter(NULL)
- , m_pRequest(NULL)
+ , m_pDocInserter(nullptr)
+ , m_pRequest(nullptr)
, m_nParam(0)
, m_bSelectObject(false)
, m_bEditingPositionSet(false)
@@ -78,9 +78,9 @@ SwView_Impl::SwView_Impl(SwView* pShell)
SwView_Impl::~SwView_Impl()
{
Reference<XUnoTunnel> xDispTunnel(xDisProvInterceptor, UNO_QUERY);
- SwXDispatchProviderInterceptor* pInterceptor = 0;
+ SwXDispatchProviderInterceptor* pInterceptor = nullptr;
if(xDispTunnel.is() &&
- 0 != (pInterceptor = reinterpret_cast< SwXDispatchProviderInterceptor * >(
+ nullptr != (pInterceptor = reinterpret_cast< SwXDispatchProviderInterceptor * >(
sal::static_int_cast< sal_IntPtr >(
xDispTunnel->getSomething(SwXDispatchProviderInterceptor::getUnoTunnelId())))))
{
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 7dd9064caad0..35e5ebcf9a2e 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -126,15 +126,15 @@ extern bool g_bNoInterrupt; // in swmodule.cxx
bool bDocSzUpdated = true;
-SvxSearchItem* SwView::m_pSrchItem = 0;
+SvxSearchItem* SwView::m_pSrchItem = nullptr;
bool SwView::m_bExtra = false;
bool SwView::m_bFound = false;
bool SwView::m_bJustOpened = false;
VclPtr<SvxSearchDialog> SwView::m_pSrchDlg = nullptr;
-SearchAttrItemList* SwView::m_pSrchList = 0;
-SearchAttrItemList* SwView::m_pReplList = 0;
+SearchAttrItemList* SwView::m_pSrchList = nullptr;
+SearchAttrItemList* SwView::m_pReplList = nullptr;
inline SfxDispatcher &SwView::GetDispatcher()
{
@@ -184,7 +184,7 @@ void SwView::GotFocus() const
SwAnnotationShell* pAsAnnotationShell = dynamic_cast<SwAnnotationShell*>( pTopShell );
if ( pAsAnnotationShell )
{
- m_pPostItMgr->SetActiveSidebarWin(0);
+ m_pPostItMgr->SetActiveSidebarWin(nullptr);
const_cast< SwView* >( this )->AttrChangedNotify( m_pWrtShell );
}
}
@@ -210,7 +210,7 @@ IMPL_LINK_NOARG_TYPED(SwView, FormControlActivated, LinkParamNone*, void)
if ( !pAsFormShell )
{
// if we're editing text currently, cancel this
- SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : NULL;
+ SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : nullptr;
if ( pSdrView && pSdrView->IsTextEdit() )
pSdrView->SdrEndTextEdit( true );
@@ -682,25 +682,25 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
: SfxViewShell( _pFrame, SWVIEWFLAGS ),
m_nNewPage(USHRT_MAX),
m_nOldPageNum(0),
- m_pNumRuleNodeFromDoc(0),
+ m_pNumRuleNodeFromDoc(nullptr),
m_pEditWin( VclPtr<SwEditWin>::Create( &_pFrame->GetWindow(), *this ) ),
- m_pWrtShell(0),
- m_pShell(0),
- m_pFormShell(0),
- m_pHScrollbar(0),
- m_pVScrollbar(0),
+ m_pWrtShell(nullptr),
+ m_pShell(nullptr),
+ m_pFormShell(nullptr),
+ m_pHScrollbar(nullptr),
+ m_pVScrollbar(nullptr),
m_pScrollFill(VclPtr<ScrollBarBox>::Create( &_pFrame->GetWindow(), _pFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
m_pVRuler(VclPtr<SvxRuler>::Create(&GetViewFrame()->GetWindow(), m_pEditWin,
SvxRulerSupportFlags::TABS | SvxRulerSupportFlags::PARAGRAPH_MARGINS_VERTICAL|
SvxRulerSupportFlags::BORDERS | SvxRulerSupportFlags::REDUCED_METRIC,
GetViewFrame()->GetBindings(),
WB_VSCROLL | WB_EXTRAFIELD | WB_BORDER )),
- m_pTogglePageBtn(0),
- m_pGlosHdl(0),
- m_pDrawActual(0),
- m_pLastTableFormat(0),
+ m_pTogglePageBtn(nullptr),
+ m_pGlosHdl(nullptr),
+ m_pDrawActual(nullptr),
+ m_pLastTableFormat(nullptr),
m_pFormatClipboard(new SwFormatClipboard()),
- m_pPostItMgr(0),
+ m_pPostItMgr(nullptr),
m_nSelectionType( INT_MAX ),
m_nPageCnt(0),
m_nDrawSfxId( USHRT_MAX ),
@@ -766,7 +766,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
// determine if there is an existing view for
// document
- SfxViewShell* pExistingSh = 0;
+ SfxViewShell* pExistingSh = nullptr;
if ( pOldSh )
{
pExistingSh = pOldSh;
@@ -940,7 +940,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
SET_CURR_SHELL( m_pWrtShell );
m_pWrtShell->StartAction();
m_pWrtShell->CalcLayout();
- m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(NULL, false);
+ m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(nullptr, false);
m_pWrtShell->EndAction();
}
m_pWrtShell->GetDoc()->getIDocumentState().SetUpdateExpFieldStat( false );
@@ -1017,7 +1017,7 @@ SwView::~SwView()
{
GetViewFrame()->GetWindow().RemoveChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
delete m_pPostItMgr;
- m_pPostItMgr = 0;
+ m_pPostItMgr = nullptr;
m_bInDtor = true;
m_pEditWin->Hide(); // prevent problems with painting
@@ -1025,27 +1025,27 @@ SwView::~SwView()
// Set pointer in SwDocShell to the view again
SwDocShell* pDocSh = GetDocShell();
if( pDocSh && pDocSh->GetView() == this )
- pDocSh->SetView( 0 );
+ pDocSh->SetView( nullptr );
if ( SW_MOD()->GetView() == this )
- SW_MOD()->SetView( 0 );
+ SW_MOD()->SetView( nullptr );
if( m_aTimer.IsActive() && m_bAttrChgNotifiedWithRegistrations )
GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
// the last view must end the text edit
- SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : 0;
+ SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : nullptr;
if( pSdrView && pSdrView->IsTextEdit() )
pSdrView->SdrEndTextEdit( true );
- SetWindow( 0 );
+ SetWindow( nullptr );
m_pViewImpl->Invalidate();
EndListening(*GetViewFrame());
EndListening(*GetDocShell());
m_pScrollFill.disposeAndClear();
delete m_pWrtShell;
- m_pWrtShell = 0; // Set to 0, so that it is not accessible by the following dtors cannot.
- m_pShell = 0;
+ m_pWrtShell = nullptr; // Set to 0, so that it is not accessible by the following dtors cannot.
+ m_pShell = nullptr;
m_pHScrollbar.disposeAndClear();
m_pVScrollbar.disposeAndClear();
m_pHRuler.disposeAndClear();
@@ -1658,7 +1658,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if (!bDesignMode && GetDrawFuncPtr())
{
GetDrawFuncPtr()->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
LeaveDrawCreate();
AttrChangedNotify(m_pWrtShell);
}
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 090310e62d43..49c666e9d1f7 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -372,7 +372,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
- const SfxPoolItem* pAttr=NULL;
+ const SfxPoolItem* pAttr=nullptr;
if( pArgs && SfxItemState::SET == pArgs->GetItemState( nSlot , false, &pAttr ))
{
@@ -543,7 +543,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
if (bSet)
{
SwDocShell *pDocSh = GetDocShell();
- SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : NULL;
+ SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : nullptr;
// right now we don't have view options for automatic grammar checking. Thus...
bool bIsAutoGrammar = false;
diff --git a/sw/source/uibase/uiview/view1.cxx b/sw/source/uibase/uiview/view1.cxx
index 9fb3bd92e722..3f9b047da6a7 100644
--- a/sw/source/uibase/uiview/view1.cxx
+++ b/sw/source/uibase/uiview/view1.cxx
@@ -184,7 +184,7 @@ void SwView::StateFormatPaintbrush(SfxItemSet &rSet)
void SwView::UpdateWordCount(SfxShell* pShell, sal_uInt16 nSlot)
{
SfxViewFrame* pVFrame = GetViewFrame();
- if (pVFrame != NULL)
+ if (pVFrame != nullptr)
{
pVFrame->ToggleChildWindow(FN_WORDCOUNT_DIALOG);
pShell->Invalidate(nSlot);
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 7c528dc42a31..853120e3a8ef 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -688,7 +688,7 @@ void SwView::Execute(SfxRequest &rReq)
// would return NULL if called on the point)
sal_uInt16 nRedline = 0;
const SwRangeRedline *pRedline = pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), &nRedline);
- assert(pRedline != 0);
+ assert(pRedline != nullptr);
if (pRedline)
{
if (FN_REDLINE_ACCEPT_DIRECT == nSlot)
@@ -816,7 +816,7 @@ void SwView::Execute(SfxRequest &rReq)
}
else if ( m_pWrtShell->HasSelection() || IsDrawMode() )
{
- SdrView *pSdrView = m_pWrtShell->HasDrawView() ? m_pWrtShell->GetDrawView() : 0;
+ SdrView *pSdrView = m_pWrtShell->HasDrawView() ? m_pWrtShell->GetDrawView() : nullptr;
if(pSdrView && pSdrView->AreObjectsMarked() &&
pSdrView->GetHdlList().GetFocusHdl())
{
@@ -962,7 +962,7 @@ void SwView::Execute(SfxRequest &rReq)
if( m_pWrtShell->GotoNextTOXBase() )
pBase = m_pWrtShell->GetCurTOX();
else
- pBase = 0;
+ pBase = nullptr;
}
}
m_pWrtShell->SetReadOnlyAvailable( bOldCrsrInReadOnly );
@@ -1163,7 +1163,7 @@ void SwView::Execute(SfxRequest &rReq)
case FN_SPELL_GRAMMAR_DIALOG:
{
SfxViewFrame* pViewFrame = GetViewFrame();
- if (rReq.GetArgs() != NULL)
+ if (rReq.GetArgs() != nullptr)
pViewFrame->SetChildWindow (FN_SPELL_GRAMMAR_DIALOG,
static_cast<const SfxBoolItem&>( (rReq.GetArgs()->
Get(FN_SPELL_GRAMMAR_DIALOG))).GetValue());
@@ -1623,7 +1623,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
SwWrtShell &rSh = GetWrtShell();
const SfxItemSet* pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem=NULL;
+ const SfxPoolItem* pItem=nullptr;
bool bUp = false;
sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
@@ -1672,7 +1672,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
if ( ( GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
- const SfxItemSet *pSet = 0;
+ const SfxItemSet *pSet = nullptr;
std::unique_ptr<AbstractSvxZoomDialog> pDlg;
if ( pArgs )
pSet = pArgs;
@@ -1714,7 +1714,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
}
- const SfxPoolItem* pViewLayoutItem = 0;
+ const SfxPoolItem* pViewLayoutItem = nullptr;
if ( pSet && SfxItemState::SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pViewLayoutItem))
{
const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem *>(pViewLayoutItem)->GetValue();
@@ -2003,7 +2003,7 @@ bool SwView::JumpToSwMark( const OUString& rMark )
}
else if( pMarkAccess->getAllMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)) )
m_pWrtShell->GotoMark( ppMark->get(), false, true ), bRet = true;
- else if( 0 != ( pINet = m_pWrtShell->FindINetAttr( sMark ) )) {
+ else if( nullptr != ( pINet = m_pWrtShell->FindINetAttr( sMark ) )) {
m_pWrtShell->addCurrentPosition();
bRet = m_pWrtShell->GotoINetAttr( *pINet->GetTextINetFormat() );
}
@@ -2027,7 +2027,7 @@ bool SwView::JumpToSwMark( const OUString& rMark )
}
else if( pMarkAccess->getAllMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)))
m_pWrtShell->GotoMark( ppMark->get(), false, true ), bRet = true;
- else if( 0 != ( pINet = m_pWrtShell->FindINetAttr( sMark ) ))
+ else if( nullptr != ( pINet = m_pWrtShell->FindINetAttr( sMark ) ))
bRet = m_pWrtShell->GotoINetAttr( *pINet->GetTextINetFormat() );
// make selection visible later
@@ -2095,7 +2095,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUString& rFilterName, sal_Int16 nVersion )
{
- SfxMedium* pMed = 0;
+ SfxMedium* pMed = nullptr;
SwDocShell* pDocSh = GetDocShell();
if( !rFileName.isEmpty() )
@@ -2104,7 +2104,7 @@ long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUS
const SfxFilter* pFilter = rFact.GetFilterContainer()->GetFilter4FilterName( rFilterName );
if ( !pFilter )
{
- pMed = new SfxMedium(rFileName, StreamMode::READ, 0, 0 );
+ pMed = new SfxMedium(rFileName, StreamMode::READ, nullptr, nullptr );
SfxFilterMatcher aMatcher( rFact.GetFilterContainer()->GetName() );
pMed->UseInteractionHandler( true );
ErrCode nErr = aMatcher.GuessFilter(*pMed, &pFilter, SfxFilterFlags::NONE);
@@ -2114,7 +2114,7 @@ long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUS
pMed->SetFilter( pFilter );
}
else
- pMed = new SfxMedium(rFileName, StreamMode::READ, pFilter, 0);
+ pMed = new SfxMedium(rFileName, StreamMode::READ, pFilter, nullptr);
}
else
{
@@ -2200,7 +2200,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe
::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
uno::Reference<text::XTextRange> const xInsertPosition(
SwXTextRange::CreateXTextRange(*pDoc,
- *m_pWrtShell->GetCrsr()->GetPoint(), 0));
+ *m_pWrtShell->GetCrsr()->GetPoint(), nullptr));
nErrno = pDocSh->ImportFrom(*pMedium, xInsertPosition)
? 0 : ERR_SWG_READ_ERROR;
}
@@ -2372,7 +2372,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( NULL, SID_OPTIONS_DATABASES ));
+ std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( nullptr, SID_OPTIONS_DATABASES ));
pDlg->Execute();
}
}
diff --git a/sw/source/uibase/uiview/viewcoll.cxx b/sw/source/uibase/uiview/viewcoll.cxx
index 8f379b56ece3..3a3e20f3ce93 100644
--- a/sw/source/uibase/uiview/viewcoll.cxx
+++ b/sw/source/uibase/uiview/viewcoll.cxx
@@ -33,7 +33,7 @@
void SwView::ExecColl(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
{
diff --git a/sw/source/uibase/uiview/viewdlg.cxx b/sw/source/uibase/uiview/viewdlg.cxx
index bb7d3796b3e9..a14eeee8037c 100644
--- a/sw/source/uibase/uiview/viewdlg.cxx
+++ b/sw/source/uibase/uiview/viewdlg.cxx
@@ -36,7 +36,7 @@
void SwView::ExecDlg(SfxRequest &rReq)
{
// Thus, from the basic no dialogues for background views are called:
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const SfxItemSet* pArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx
index b58cf1c0708e..d5ab1c5ef626 100644
--- a/sw/source/uibase/uiview/viewdlg2.cxx
+++ b/sw/source/uibase/uiview/viewdlg2.cxx
@@ -145,7 +145,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
}
sal_uInt16 nID = USHRT_MAX;
- SwFieldType* pType = 0;
+ SwFieldType* pType = nullptr;
const size_t nCount = aMgr.GetFieldTypeCount();
if( !rName.isEmpty() )
{
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index a00996a27d30..a8b4cc4768fd 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -77,8 +77,8 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- const SfxAllEnumItem* pEItem = 0;
- const SfxStringItem* pStringItem = 0;
+ const SfxAllEnumItem* pEItem = nullptr;
+ const SfxStringItem* pStringItem = nullptr;
SdrView *pSdrView = m_pWrtShell->GetDrawView();
bool bDeselect = false;
@@ -176,7 +176,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
pSdrView = m_pWrtShell->GetDrawView();
if ( pSdrView )
{
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
ScopedVclPtrInstance< svx::FontWorkGalleryDialog > aDlg( pSdrView, pWin, nSlotId );
aDlg->SetSdrObjectRef( &pObj, pSdrView->GetModel() );
aDlg->Execute();
@@ -237,7 +237,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
if (GetDrawFuncPtr())
{
GetDrawFuncPtr()->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
}
if (m_pWrtShell->IsObjSelected() && !m_pWrtShell->IsSelFrmMode())
@@ -255,7 +255,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
if (m_pWrtShell->IsFrmSelected())
m_pWrtShell->EnterStdMode(); // because bug #45639
- SwDrawBase* pFuncPtr = NULL;
+ SwDrawBase* pFuncPtr = nullptr;
switch (nSlotId)
{
@@ -347,7 +347,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
if (GetDrawFuncPtr())
{
GetDrawFuncPtr()->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
}
SetDrawFuncPtr(pFuncPtr);
@@ -365,7 +365,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
pFuncPtr->CreateDefaultObject();
pFuncPtr->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
LeaveDrawCreate();
m_pWrtShell->EnterStdMode();
SdrView *pTmpSdrView = m_pWrtShell->GetDrawView();
@@ -404,7 +404,7 @@ void SwView::ExitDraw()
// the shell may be invalid at close/reload/SwitchToViewShell
SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher();
sal_uInt16 nIdx = 0;
- SfxShell* pTest = 0;
+ SfxShell* pTest = nullptr;
do
{
pTest = pDispatch->GetShell(nIdx++);
@@ -433,7 +433,7 @@ void SwView::ExitDraw()
m_pWrtShell->LeaveSelFrmMode();
GetDrawFuncPtr()->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
LeaveDrawCreate();
GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
@@ -577,7 +577,7 @@ bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
// set in each case, thus it will be correct for all objects
static_cast<SdrTextObj*>(pToBeActivated)->SetTextEditOffset(aNewTextEditOffset);
- bool bRet(pSdrView->SdrBeginTextEdit( pToBeActivated, pPV, pWin, true, pOutliner, 0, false, false, false ));
+ bool bRet(pSdrView->SdrBeginTextEdit( pToBeActivated, pPV, pWin, true, pOutliner, nullptr, false, false, false ));
// #i7672#
// Since SdrBeginTextEdit actually creates the OutlinerView and thus also
diff --git a/sw/source/uibase/uiview/viewfunc.hxx b/sw/source/uibase/uiview/viewfunc.hxx
index a64bd360eba0..c891101e477b 100644
--- a/sw/source/uibase/uiview/viewfunc.hxx
+++ b/sw/source/uibase/uiview/viewfunc.hxx
@@ -43,8 +43,8 @@ void ViewResizePixel( const vcl::RenderContext &rRef,
SwScrollbar& rVScrollbar,
SwScrollbar& rHScrollbar,
vcl::Window& rScrollBarBox,
- SvxRuler* pVRuler = 0,
- SvxRuler* pHRuler = 0,
+ SvxRuler* pVRuler = nullptr,
+ SvxRuler* pHRuler = nullptr,
bool bVRulerRight = false );
#endif
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index e2d37d25e3b2..af2e46e954df 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -106,7 +106,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
rReq.Ignore();
break;
case SID_HANGUL_HANJA_CONVERSION:
- StartTextConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, NULL,
+ StartTextConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, nullptr,
i18n::TextConversionOption::CHARACTER_BY_CHARACTER, true );
break;
case SID_CHINESE_CONVERSION:
@@ -127,7 +127,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
if( xInit.is() )
{
// initialize dialog
- Reference< awt::XWindow > xDialogParentWindow(0);
+ Reference< awt::XWindow > xDialogParentWindow(nullptr);
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
@@ -247,7 +247,7 @@ void SwView::StartTextConversion(
m_pWrtShell->GetCrsr() != m_pWrtShell->GetCrsr()->GetNext();
const bool bStart = bSelection || m_pWrtShell->IsStartOfDoc();
- const bool bOther = !bSelection && !(m_pWrtShell->GetFrmType(0,true) & FrmTypeFlags::BODY);
+ const bool bOther = !bSelection && !(m_pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY);
{
const uno::Reference< uno::XComponentContext > xContext(
@@ -456,7 +456,7 @@ void SwView::HyphenateDocument()
bool bOther = m_pWrtShell->HasOtherCnt() && bHyphSpecial && !bSelection;
bool bStart = bSelection || ( !bOther && m_pWrtShell->IsStartOfDoc() );
bool bStop = false;
- if( !bOther && !(m_pWrtShell->GetFrmType(0,true) & FrmTypeFlags::BODY) && !bSelection )
+ if( !bOther && !(m_pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY) && !bSelection )
// turned on no special area
{
// I want also in special areas hyphenation
@@ -521,7 +521,7 @@ void SwView::InsertThesaurusSynonym( const OUString &rSynonmText, const OUString
sal_Int32 nLeft = 0;
while (pChar && *pChar++ == CH_TXTATR_INWORD)
++nLeft;
- pChar = rLookUpText.getLength() ? rLookUpText.getStr() + rLookUpText.getLength() - 1 : 0;
+ pChar = rLookUpText.getLength() ? rLookUpText.getStr() + rLookUpText.getLength() - 1 : nullptr;
sal_Int32 nRight = 0;
while (pChar && *pChar-- == CH_TXTATR_INWORD)
++nRight;
@@ -717,7 +717,7 @@ bool SwView::ExecSpellPopup(const Point& rPt)
aEvent.SourceWindow = VCLUnoHelper::GetInterface( m_pEditWin );
aEvent.ExecutePosition.X = aPixPos.X();
aEvent.ExecutePosition.Y = aPixPos.Y();
- Menu* pMenu = 0;
+ Menu* pMenu = nullptr;
OUString sMenuName = bUseGrammarContext ?
OUString("private:resource/GrammarContextMenu") : OUString("private:resource/SpellContextMenu");
@@ -761,7 +761,7 @@ bool SwView::ExecSpellPopup(const Point& rPt)
pExecuteInfo->xDispatch = xDispatch;
pExecuteInfo->aTargetURL = aURL;
pExecuteInfo->aArgs = aArgs;
- Application::PostUserEvent( LINK(0, AsyncExecute , ExecuteHdl_Impl), pExecuteInfo );
+ Application::PostUserEvent( LINK(nullptr, AsyncExecute , ExecuteHdl_Impl), pExecuteInfo );
}
}
catch (const Exception&)
@@ -836,7 +836,7 @@ SwFieldDialog::SwFieldDialog( SwEditWin* parent, IFieldmark *fieldBM ) :
aListBox(VclPtr<ListBox>::Create(this)),
pFieldmark( fieldBM )
{
- if ( fieldBM != NULL )
+ if ( fieldBM != nullptr )
{
const IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters();
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index a722622493fd..12e6596b2c3b 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -152,7 +152,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
{
pUsrPref->SetZoom(nZoomFac);
pUsrPref->SetZoomType(eZoomType);
- SW_MOD()->ApplyUsrPref(*pUsrPref, 0);
+ SW_MOD()->ApplyUsrPref(*pUsrPref, nullptr);
pUsrPref->SetModified();
}
if ( pOpt->GetZoom() != nZoomFac )
@@ -226,7 +226,7 @@ void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, bool bViewOnly
{
pUsrPref->SetViewLayoutColumns(nColumns);
pUsrPref->SetViewLayoutBookMode(bBookMode);
- SW_MOD()->ApplyUsrPref(*pUsrPref, 0);
+ SW_MOD()->ApplyUsrPref(*pUsrPref, nullptr);
pUsrPref->SetModified();
}
}
@@ -420,7 +420,7 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void )
rSh.EnterStdMode();
sw::sidebarwindows::SwSidebarWin* pPostIt = GetPostItMgr()->GetActiveSidebarWin();
if (pPostIt)
- GetPostItMgr()->SetActiveSidebarWin(0);
+ GetPostItMgr()->SetActiveSidebarWin(nullptr);
SwFieldType* pFieldType = rSh.GetFieldType(0, RES_POSTITFLD);
if ( rSh.MoveFieldType( pFieldType, bNext ) )
GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index 47ba3deb006f..bbf790402cee 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -623,7 +623,7 @@ bool SwView::PageUpCrsr( bool bSelect )
{
if ( !bSelect )
{
- const FrmTypeFlags eType = m_pWrtShell->GetFrmType(0,true);
+ const FrmTypeFlags eType = m_pWrtShell->GetFrmType(nullptr,true);
if ( eType & FrmTypeFlags::FOOTNOTE )
{
m_pWrtShell->MoveCrsr();
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 04c4ac34680f..308d0b89e671 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -255,17 +255,17 @@ VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent,
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "No Print Dialog");
if (!pFact)
- return NULL;
+ return nullptr;
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc(TP_OPTPRINT_PAGE);
OSL_ENSURE(pFact, "No Page Creator");
if (!fnCreatePage)
- return NULL;
+ return nullptr;
VclPtr<SfxTabPage> pPage = fnCreatePage(pParent, &rOptions);
OSL_ENSURE(pPage, "No page");
if (!pPage)
- return NULL;
+ return nullptr;
SfxAllItemSet aSet(*(rOptions.GetPool()));
aSet.Put(SfxBoolItem(SID_PREVIEWFLAG_TYPE, bPreview));
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 92d907694970..7d7ebd578822 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -85,7 +85,7 @@ struct SwSearchOptions
static vcl::Window* GetParentWindow( SvxSearchDialog* pSrchDlg )
{
- return pSrchDlg && pSrchDlg->IsVisible() ? pSrchDlg : 0;
+ return pSrchDlg && pSrchDlg->IsVisible() ? pSrchDlg : nullptr;
}
/// Adds rMatches using rKey as a key to the rTree tree.
@@ -144,7 +144,7 @@ static void lcl_emitSearchResultCallbacks(SvxSearchItem* pSearchItem, SwWrtShell
void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
bool bQuiet = false;
if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_SEARCH_QUIET, false, &pItem))
bQuiet = static_cast<const SfxBoolItem*>( pItem)->GetValue();
@@ -195,7 +195,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
if( pList && pList->Count() )
m_pSrchList = new SearchAttrItemList( *pList );
- if( 0 != (pList = m_pSrchDlg->GetReplaceItemList() ) &&
+ if( nullptr != (pList = m_pSrchDlg->GetReplaceItemList() ) &&
pList->Count() )
m_pReplList = new SearchAttrItemList( *pList );
}
@@ -220,7 +220,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
if( pList && pList->Count() )
m_pSrchList = new SearchAttrItemList( *pList );
- if( 0 != (pList = m_pSrchDlg->GetReplaceItemList() ) &&
+ if( nullptr != (pList = m_pSrchDlg->GetReplaceItemList() ) &&
pList->Count() )
m_pReplList = new SearchAttrItemList( *pList );
}
@@ -373,7 +373,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
if (!m_pSrchItem->GetSelection())
{
// if we don't want to search in the selection...
- m_pWrtShell->KillSelection(0, false);
+ m_pWrtShell->KillSelection(nullptr, false);
// i#8288 "replace all" should not change cursor
// position, so save current cursor
m_pWrtShell->Push();
@@ -550,7 +550,7 @@ bool SwView::SearchAndWrap(bool bApi)
// If you want to search in selected areas, they must not be unselected.
if (!m_pSrchItem->GetSelection())
- m_pWrtShell->KillSelection(0, false);
+ m_pWrtShell->KillSelection(nullptr, false);
std::unique_ptr<SwWait> pWait(new SwWait( *GetDocShell(), true ));
if( FUNC_Search( aOpts ) )
@@ -664,7 +664,7 @@ bool SwView::SearchAll(sal_uInt16* pFound)
if (!m_pSrchItem->GetSelection())
{
// Cancel existing selections, if should not be sought in selected areas.
- m_pWrtShell->KillSelection(0, false);
+ m_pWrtShell->KillSelection(nullptr, false);
if( DOCPOS_START == aOpts.eEnd )
m_pWrtShell->EndDoc();
@@ -822,7 +822,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
::SfxToSwPageDescAttr( *m_pWrtShell, aSrchSet );
}
- SfxItemSet* pReplSet = 0;
+ SfxItemSet* pReplSet = nullptr;
if( bDoReplace && m_pReplList && m_pReplList->Count() )
{
pReplSet = new SfxItemSet( m_pWrtShell->GetAttrPool(),
@@ -852,7 +852,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
rOptions.eStart,
rOptions.eEnd,
FindRanges(eRanges),
- !m_pSrchItem->GetSearchString().isEmpty() ? &aSearchOpt : 0,
+ !m_pSrchItem->GetSearchString().isEmpty() ? &aSearchOpt : nullptr,
pReplSet );
}
else if( m_pSrchItem->GetPattern() )
@@ -863,7 +863,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
rOptions.eStart,
rOptions.eEnd,
FindRanges(eRanges),
- bDoReplace ? &sRplStr : 0 );
+ bDoReplace ? &sRplStr : nullptr );
}
else
{
@@ -883,7 +883,7 @@ SvxSearchDialog* SwView::GetSearchDialog()
#if HAVE_FEATURE_DESKTOP
const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = static_cast<SvxSearchDialogWrapper*>( SfxViewFrame::Current()->GetChildWindow(nId) );
- m_pSrchDlg = pWrp ? pWrp->getDialog () : 0;
+ m_pSrchDlg = pWrp ? pWrp->getDialog () : nullptr;
return m_pSrchDlg;
#else
return NULL;
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index 762fae9ac0f8..8da54f5a9399 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -98,7 +98,7 @@ void SwView::GetState(SfxItemSet &rSet)
// There are captions for graphics, OLE objects, frames and tables
if( !bGetFrmType )
{
- eFrmType = m_pWrtShell->GetFrmType(0, true);
+ eFrmType = m_pWrtShell->GetFrmType(nullptr, true);
bGetFrmType = true;
}
if (! ( ((eFrmType & FrmTypeFlags::FLY_ANY) && m_nSelectionType != nsSelectionType::SEL_DRW_TXT)||
@@ -130,7 +130,7 @@ void SwView::GetState(SfxItemSet &rSet)
case FN_CHANGE_PAGENUM:
{
- FrmTypeFlags nType = m_pWrtShell->GetFrmType(0,true);
+ FrmTypeFlags nType = m_pWrtShell->GetFrmType(nullptr,true);
if( ( FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER |
FrmTypeFlags::FOOTNOTE | FrmTypeFlags::DRAWOBJ ) & nType )
rSet.DisableItem(nWhich);
@@ -175,7 +175,7 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case SID_CLEARHISTORY:
{
- rSet.Put(SfxBoolItem(nWhich, m_pWrtShell->GetLastUndoInfo(0, 0)));
+ rSet.Put(SfxBoolItem(nWhich, m_pWrtShell->GetLastUndoInfo(nullptr, nullptr)));
}
break;
case SID_UNDO:
@@ -206,8 +206,8 @@ void SwView::GetState(SfxItemSet &rSet)
case FN_EDIT_CURRENT_TOX:
case FN_UPDATE_CUR_TOX:
{
- const SwTOXBase* pBase = 0;
- if(0 == (pBase = m_pWrtShell->GetCurTOX()) ||
+ const SwTOXBase* pBase = nullptr;
+ if(nullptr == (pBase = m_pWrtShell->GetCurTOX()) ||
(FN_EDIT_CURRENT_TOX == nWhich && pBase->IsTOXBaseInReadonly()))
rSet.DisableItem(nWhich);
}
@@ -280,9 +280,9 @@ void SwView::GetState(SfxItemSet &rSet)
sal_uInt16 index = 0;
const SwRedlineTable& table = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
const SwRangeRedline* redline = table.FindAtPosition( *pCursor->Start(), index );
- if( redline != NULL && *redline->Start() == *pCursor->End())
- redline = NULL;
- if( redline == NULL )
+ if( redline != nullptr && *redline->Start() == *pCursor->End())
+ redline = nullptr;
+ if( redline == nullptr )
{
for(; index < table.size(); ++index )
{
@@ -296,14 +296,14 @@ void SwView::GetState(SfxItemSet &rSet)
}
}
}
- if( redline == NULL )
+ if( redline == nullptr )
rSet.DisableItem(nWhich);
}
else
{
// If the cursor position isn't on a redline, disable
// accepting/rejecting changes.
- if (0 == pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), 0))
+ if (nullptr == pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), nullptr))
rSet.DisableItem(nWhich);
}
}
@@ -430,7 +430,7 @@ void SwView::GetState(SfxItemSet &rSet)
//the draw shell cannot provide a status per item - only one for SID_OBJECT_ALIGN
if(nWhich != SID_ALIGN_ANY_JUSTIFIED)
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
GetViewFrame()->GetDispatcher()->QueryState( SID_OBJECT_ALIGN, pItem );
if(pItem)
bDraw = true;
@@ -449,7 +449,7 @@ void SwView::GetState(SfxItemSet &rSet)
}
}
//these slots are either re-mapped to text or object alignment
- const SfxPoolItem* pState = 0;
+ const SfxPoolItem* pState = nullptr;
if(nAlias)
GetViewFrame()->GetDispatcher()->QueryState( nAlias, pState );
if(pState)
@@ -534,7 +534,7 @@ bool SwView::HasUIFeature( sal_uInt32 nFeature )
{
case CHILDWIN_LABEL : bRet = m_pWrtShell->IsLabelDoc(); break;
#if HAVE_FEATURE_DBCONNECTIVITY
- case CHILDWIN_MAILMERGE : bRet = 0 != GetMailMergeConfigItem(); break;
+ case CHILDWIN_MAILMERGE : bRet = nullptr != GetMailMergeConfigItem(); break;
#endif
}
return bRet;
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 921eacd5669b..3f53c38bc6e7 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -225,7 +225,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwWrtShell &rSh = GetWrtShell();
const FrmTypeFlags nFrmType = rSh.IsObjSelected() ?
FrmTypeFlags::DRAWOBJ :
- rSh.GetFrmType(0,true);
+ rSh.GetFrmType(nullptr,true);
const bool bFrmSelection = rSh.IsFrmSelected();
const bool bBrowse = rSh.GetViewOptions()->getBrowseMode();
@@ -858,7 +858,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY || bSect)
{
- SwSectionFormat *pSectFormat = 0;
+ SwSectionFormat *pSectFormat = nullptr;
SfxItemSet aSet( GetPool(), RES_COL, RES_COL );
if(bSect)
{
@@ -985,7 +985,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.LockView( false );
m_bSetTabColFromDoc = m_bSetTabRowFromDoc = m_bTabColFromDoc = m_bTabRowFromDoc = false;
- SetNumRuleNodeFromDoc(NULL);
+ SetNumRuleNodeFromDoc(nullptr);
}
// Here the status of the tab bar will be determined.
@@ -995,7 +995,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetWrtShell();
- const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &m_aTabColFromDocPos : 0;
+ const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &m_aTabColFromDocPos : nullptr;
const FrmTypeFlags nFrmType = rSh.IsObjSelected()
? FrmTypeFlags::DRAWOBJ
: rSh.GetFrmType( pPt, true );
@@ -1391,7 +1391,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aDistLR.SetLeft(rBox.GetDistance(SvxBoxItemLine::LEFT));
aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT));
- const SvxBoxItem* pBox = 0;
+ const SvxBoxItem* pBox = nullptr;
if(nFrmType & FrmTypeFlags::HEADER)
{
rMaster.GetHeader();
@@ -1923,7 +1923,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
size_t nNum = IsTabColFromDoc() ?
rSh.GetCurMouseColNum( m_aTabColFromDocPos ):
rSh.GetCurOutColNum();
- const SwFrameFormat* pFormat = NULL;
+ const SwFrameFormat* pFormat = nullptr;
if( bColSct )
{
eRecType = bSectOutTable ? RECT_OUTTABSECTION
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index a48e970561ed..0cb66cbf2018 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -237,9 +237,9 @@ SwXDocumentSettings::SwXDocumentSettings ( SwXTextDocument * pModel )
&Application::GetSolarMutex () )
, mxModel ( pModel )
, mpModel ( pModel )
-, mpDocSh ( NULL )
-, mpDoc ( NULL )
-, mpPrinter( NULL )
+, mpDocSh ( nullptr )
+, mpDoc ( nullptr )
+, mpPrinter( nullptr )
{
registerSlave ( new SwXPrintSettings ( PRINT_SETTINGS_DOCUMENT, mpModel->GetDocShell()->GetDoc() ) );
}
@@ -303,11 +303,11 @@ void SwXDocumentSettings::_preSetValues ()
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
mpDocSh = mpModel->GetDocShell();
- if (NULL == mpDocSh)
+ if (nullptr == mpDocSh)
throw UnknownPropertyException();
mpDoc = mpDocSh->GetDoc();
- if (NULL == mpDoc)
+ if (nullptr == mpDoc)
throw UnknownPropertyException();
}
@@ -315,7 +315,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
if (rInfo.mnAttributes & PropertyAttribute::READONLY)
- throw PropertyVetoException ("Property is read-only: " + rInfo.maName, static_cast < cppu::OWeakObject * > ( 0 ) );
+ throw PropertyVetoException ("Property is read-only: " + rInfo.maName, static_cast < cppu::OWeakObject * > ( nullptr ) );
switch( rInfo.mnHandle )
{
@@ -859,19 +859,19 @@ void SwXDocumentSettings::_postSetValues ()
mpDoc->getIDocumentDeviceAccess().setPrinter( mpPrinter, true, true );
}
- mpPrinter = 0;
- mpDocSh = 0;
- mpDoc = 0;
+ mpPrinter = nullptr;
+ mpDocSh = nullptr;
+ mpDoc = nullptr;
}
void SwXDocumentSettings::_preGetValues ()
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
mpDocSh = mpModel->GetDocShell();
- if (NULL == mpDocSh)
+ if (nullptr == mpDocSh)
throw UnknownPropertyException();
mpDoc = mpDocSh->GetDoc();
- if (NULL == mpDoc)
+ if (nullptr == mpDoc)
throw UnknownPropertyException();
}
@@ -1244,8 +1244,8 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
void SwXDocumentSettings::_postGetValues ()
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
- mpDocSh = 0;
- mpDoc = 0;
+ mpDocSh = nullptr;
+ mpDoc = nullptr;
}
// XServiceInfo
diff --git a/sw/source/uibase/uno/SwXFilterOptions.cxx b/sw/source/uibase/uno/SwXFilterOptions.cxx
index d2bec2560321..252c740db290 100644
--- a/sw/source/uibase/uno/SwXFilterOptions.cxx
+++ b/sw/source/uibase/uno/SwXFilterOptions.cxx
@@ -95,12 +95,12 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException, std::excepti
pInStream.reset(utl::UcbStreamHelper::CreateStream( xInputStream ));
uno::Reference< XUnoTunnel > xTunnel(xModel, uno::UNO_QUERY);
- SwDocShell* pDocShell = 0;
+ SwDocShell* pDocShell = nullptr;
if(xTunnel.is())
{
SwXTextDocument* pXDoc = reinterpret_cast< SwXTextDocument * >(
sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(SwXTextDocument::getUnoTunnelId())));
- pDocShell = pXDoc ? pXDoc->GetDocShell() : 0;
+ pDocShell = pXDoc ? pXDoc->GetDocShell() : nullptr;
}
if(pDocShell)
{
@@ -108,7 +108,7 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException, std::excepti
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<AbstractSwAsciiFilterDlg> pAsciiDlg(pFact->CreateSwAsciiFilterDlg(NULL, *pDocShell,
+ std::unique_ptr<AbstractSwAsciiFilterDlg> pAsciiDlg(pFact->CreateSwAsciiFilterDlg(nullptr, *pDocShell,
pInStream.get()));
OSL_ENSURE(pAsciiDlg, "Dialog creation failed!");
if(RET_OK == pAsciiDlg->Execute())
diff --git a/sw/source/uibase/uno/dlelstnr.cxx b/sw/source/uibase/uno/dlelstnr.cxx
index b3c7ba28cd02..fea9981242f1 100644
--- a/sw/source/uibase/uno/dlelstnr.cxx
+++ b/sw/source/uibase/uno/dlelstnr.cxx
@@ -109,9 +109,9 @@ void SAL_CALL SwLinguServiceEventListener::disposing(
SolarMutexGuard aGuard;
if (xLngSvcMgr.is() && rEventObj.Source == xLngSvcMgr)
- xLngSvcMgr = 0;
+ xLngSvcMgr = nullptr;
if (xLngSvcMgr.is() && rEventObj.Source == xGCIterator)
- xGCIterator = 0;
+ xGCIterator = nullptr;
}
void SAL_CALL SwLinguServiceEventListener::queryTermination(
@@ -129,10 +129,10 @@ void SAL_CALL SwLinguServiceEventListener::notifyTermination(
if (xDesktop.is() && rEventObj.Source == xDesktop)
{
if (xLngSvcMgr.is())
- xLngSvcMgr = 0;
+ xLngSvcMgr = nullptr;
if (xGCIterator.is())
- xGCIterator = 0;
- xDesktop = NULL;
+ xGCIterator = nullptr;
+ xDesktop = nullptr;
}
}
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index f42b4b5ba50e..ddba7056014b 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -253,7 +253,7 @@ SwXAutoTextGroup::~SwXAutoTextGroup()
uno::Sequence< OUString > SwXAutoTextGroup::getTitles() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
const sal_uInt16 nCount = pGlosGroup->GetCount();
@@ -275,7 +275,7 @@ void SwXAutoTextGroup::renameByName(const OUString& aElementName,
// throw exception only if the programmatic name is to be changed into an existing name
if(aNewElementName != aElementName && hasByName(aNewElementName))
throw container::ElementExistException();
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if(pGlosGroup && !pGlosGroup->GetError())
{
sal_uInt16 nIdx = pGlosGroup->GetIndex( aElementName);
@@ -314,7 +314,7 @@ static bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTe
{
SwDoc *const pDoc((pxCursor) ? pxCursor->GetDoc() : &pxRange->GetDoc());
SwPaM aPam(pDoc->GetNodes());
- SwPaM * pPam(0);
+ SwPaM * pPam(nullptr);
if(pxCursor)
{
pPam = pxCursor->GetPaM();
@@ -332,7 +332,7 @@ static bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTe
pInsDoc->getIDocumentFieldsAccess().UnlockExpFields();
if( !pInsDoc->getIDocumentFieldsAccess().IsExpFieldsLocked() )
- pInsDoc->getIDocumentFieldsAccess().UpdateExpFields(NULL, true);
+ pInsDoc->getIDocumentFieldsAccess().UpdateExpFields(nullptr, true);
return bRet;
}
@@ -347,14 +347,14 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
if(!xTextRange.is())
throw uno::RuntimeException();
- SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0;
+ SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr;
OUString sShortName(aName);
OUString sLongName(aTitle);
if (pGlosGroup && !pGlosGroup->GetError())
{
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
- SwXTextRange* pxRange = 0;
- OTextCursorHelper* pxCursor = 0;
+ SwXTextRange* pxRange = nullptr;
+ OTextCursorHelper* pxCursor = nullptr;
if(xRangeTunnel.is())
{
pxRange = reinterpret_cast<SwXTextRange*>(xRangeTunnel->getSomething(
@@ -364,7 +364,7 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
}
OUString sOnlyText;
- OUString* pOnlyText = 0;
+ OUString* pOnlyText = nullptr;
bool bNoAttr = !pxCursor && !pxRange;
if(bNoAttr)
{
@@ -439,7 +439,7 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
void SwXAutoTextGroup::removeByName(const OUString& aEntryName) throw( container::NoSuchElementException, uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if(pGlosGroup && !pGlosGroup->GetError())
{
sal_uInt16 nIdx = pGlosGroup->GetIndex(aEntryName);
@@ -501,7 +501,7 @@ void SwXAutoTextGroup::setName(const OUString& rName) throw( uno::RuntimeExcepti
sal_Int32 SwXAutoTextGroup::getCount() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
return static_cast<sal_Int32>(pGlosGroup->GetCount());
@@ -511,7 +511,7 @@ uno::Any SwXAutoTextGroup::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
const sal_uInt16 nCount = pGlosGroup->GetCount();
@@ -529,7 +529,7 @@ uno::Type SwXAutoTextGroup::getElementType() throw( uno::RuntimeException, std::
sal_Bool SwXAutoTextGroup::hasElements() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
return pGlosGroup->GetCount() > 0;
@@ -550,7 +550,7 @@ uno::Sequence< OUString > SwXAutoTextGroup::getElementNames()
throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
@@ -568,7 +568,7 @@ sal_Bool SwXAutoTextGroup::hasByName(const OUString& rName)
{
SolarMutexGuard aGuard;
bool bRet = false;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
@@ -603,7 +603,7 @@ void SwXAutoTextGroup::setPropertyValue(
if(!pEntry)
throw beans::UnknownPropertyException();
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if(!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
switch(pEntry->nWID)
@@ -631,7 +631,7 @@ uno::Any SwXAutoTextGroup::getPropertyValue(const OUString& rPropertyName)
if(!pEntry)
throw beans::UnknownPropertyException();
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if(!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
@@ -674,7 +674,7 @@ void SwXAutoTextGroup::removeVetoableChangeListener(
void SwXAutoTextGroup::Invalidate()
{
- pGlossaries = 0;
+ pGlossaries = nullptr;
sName.clear();
m_sGroupName.clear();
}
@@ -724,7 +724,7 @@ SwXAutoTextEntry::SwXAutoTextEntry(SwGlossaries* pGlss, const OUString& rGroupNa
pGlossaries(pGlss),
sGroupName(rGroupName),
sEntryName(rEntryName),
- pBodyText ( NULL )
+ pBodyText ( nullptr )
{
}
@@ -783,7 +783,7 @@ void SwXAutoTextEntry::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint )
if(SFX_EVENT_PREPARECLOSEDOC == static_cast< const SfxEventHint& >( _rHint ).GetEventId())
{
implFlushDocument();
- xBodyText = 0;
+ xBodyText = nullptr;
EndListening( *&xDocSh );
xDocSh.Clear();
}
@@ -907,9 +907,9 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
// in the meantime
uno::Reference<lang::XUnoTunnel> xTunnel( xTextRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
- SwXText *pText = 0;
+ SwXTextRange* pRange = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
+ SwXText *pText = nullptr;
if(xTunnel.is())
{
@@ -921,7 +921,7 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
( xTunnel->getSomething( SwXText::getUnoTunnelId() ) );
}
- SwDoc* pDoc = 0;
+ SwDoc* pDoc = nullptr;
if (pRange)
pDoc = &pRange->GetDoc();
else if ( pCursor )
@@ -990,7 +990,7 @@ const struct SvEventDescription aAutotextEvents[] =
{
{ SW_EVENT_START_INS_GLOSSARY, "OnInsertStart" },
{ SW_EVENT_END_INS_GLOSSARY, "OnInsertDone" },
- { 0, NULL }
+ { 0, nullptr }
};
SwAutoTextEventDescriptor::SwAutoTextEventDescriptor(
@@ -1021,7 +1021,7 @@ void SwAutoTextEventDescriptor::replaceByName(
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( NULL != rAutoTextEntry.GetGlossaries(),
+ OSL_ENSURE( nullptr != rAutoTextEntry.GetGlossaries(),
"Strangely enough, the AutoText vanished!" );
OSL_ENSURE( (nEvent == SW_EVENT_END_INS_GLOSSARY) ||
(nEvent == SW_EVENT_START_INS_GLOSSARY) ,
@@ -1058,7 +1058,7 @@ void SwAutoTextEventDescriptor::getByName(
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( NULL != rAutoTextEntry.GetGlossaries(), "no AutoText" );
+ OSL_ENSURE( nullptr != rAutoTextEntry.GetGlossaries(), "no AutoText" );
OSL_ENSURE( (nEvent == SW_EVENT_END_INS_GLOSSARY) ||
(nEvent == SW_EVENT_START_INS_GLOSSARY) ,
"Unknown event ID" );
diff --git a/sw/source/uibase/uno/unodefaults.cxx b/sw/source/uibase/uno/unodefaults.cxx
index a1cc59ca1f74..66e1eb38880a 100644
--- a/sw/source/uibase/uno/unodefaults.cxx
+++ b/sw/source/uibase/uno/unodefaults.cxx
@@ -46,7 +46,7 @@ SfxItemPool* SwSvxUnoDrawPool::getModelPool( bool /*bReadOnly*/ ) throw()
m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
return &(m_pDoc->GetAttrPool());
}
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx
index e1b95428eca7..534aea55b09a 100644
--- a/sw/source/uibase/uno/unodispatch.cxx
+++ b/sw/source/uibase/uno/unodispatch.cxx
@@ -141,9 +141,9 @@ void SwXDispatchProviderInterceptor::disposing( const lang::EventObject& )
uno::Reference< lang::XComponent> xInterceptedComponent(m_xIntercepted, uno::UNO_QUERY);
if (xInterceptedComponent.is())
xInterceptedComponent->removeEventListener(static_cast<lang::XEventListener*>(this));
- m_xDispatch = 0;
+ m_xDispatch = nullptr;
}
- m_xIntercepted = NULL;
+ m_xIntercepted = nullptr;
}
namespace
@@ -178,10 +178,10 @@ void SwXDispatchProviderInterceptor::Invalidate()
uno::Reference< lang::XComponent> xInterceptedComponent(m_xIntercepted, uno::UNO_QUERY);
if (xInterceptedComponent.is())
xInterceptedComponent->removeEventListener(static_cast<lang::XEventListener*>(this));
- m_xDispatch = 0;
+ m_xDispatch = nullptr;
}
- m_xIntercepted = NULL;
- m_pView = 0;
+ m_xIntercepted = nullptr;
+ m_pView = nullptr;
}
SwXDispatch::SwXDispatch(SwView& rVw) :
@@ -380,7 +380,7 @@ void SwXDispatch::disposing( const lang::EventObject& rSource ) throw(uno::Runti
StatusStruct_Impl aStatus = *aListIter;
aStatus.xListener->disposing(aObject);
}
- m_pView = 0;
+ m_pView = nullptr;
}
const sal_Char* SwXDispatch::GetDBChangeURL()
diff --git a/sw/source/uibase/uno/unofreg.cxx b/sw/source/uibase/uno/unofreg.cxx
index a5f6468771ea..7834a954a415 100644
--- a/sw/source/uibase/uno/unofreg.cxx
+++ b/sw/source/uibase/uno/unofreg.cxx
@@ -46,7 +46,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sw_component_getFactory(
void * pServiceManager,
void * )
{
- void * pRet = 0;
+ void * pRet = nullptr;
if( pServiceManager )
{
uno::Reference< XMultiServiceFactory > xMSF(
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 371080ea7e63..f8ff1a5370bf 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -101,7 +101,7 @@ static CloseResult CloseModelAndDocSh(
{
CloseResult eResult = eSuccess;
- rxDocSh = 0;
+ rxDocSh = nullptr;
//! models/documents should never be disposed (they may still be
//! used for printing which is called asynchronously for example)
@@ -153,13 +153,13 @@ static bool LoadFromURL_impl(
}
// try to get the DocShell
- SwDocShell *pTmpDocShell = 0;
+ SwDocShell *pTmpDocShell = nullptr;
Reference < XUnoTunnel > xTunnel( xTmpModel, UNO_QUERY );
if (xTunnel.is())
{
SwXTextDocument* pTextDoc = reinterpret_cast<SwXTextDocument *>(
xTunnel->getSomething( SwXTextDocument::getUnoTunnelId() ));
- pTmpDocShell = pTextDoc ? pTextDoc->GetDocShell() : 0;
+ pTmpDocShell = pTextDoc ? pTextDoc->GetDocShell() : nullptr;
}
bool bRes = false;
@@ -348,8 +348,8 @@ static bool DeleteTmpFile_Impl(
bDelete = false;
}
- rxModel = 0;
- rxDocSh = 0; // destroy doc shell
+ rxModel = nullptr;
+ rxDocSh = nullptr; // destroy doc shell
if ( bDelete )
{
@@ -379,7 +379,7 @@ SwXMailMerge::SwXMailMerge() :
m_bSendAsAttachment(false),
m_bSaveAsSingleFile(false),
m_bDisposing(false),
- m_pMgr(0)
+ m_pMgr(nullptr)
{
// create empty document
// like in: SwModule::InsertEnv (appenv.cxx)
@@ -403,8 +403,8 @@ SwXMailMerge::~SwXMailMerge()
if ( eVetoed == CloseModelAndDocSh( m_xModel, m_xDocSh ) )
OSL_FAIL("ownership transferred to vetoing object!" );
- m_xModel = 0;
- m_xDocSh = 0; // destroy doc shell
+ m_xModel = nullptr;
+ m_xDocSh = nullptr; // destroy doc shell
}
}
@@ -419,7 +419,7 @@ public:
~MailMergeExecuteFinalizer()
{
osl::MutexGuard pMgrGuard( GetMailMergeMutex() );
- m_pMailMerge->m_pMgr = 0;
+ m_pMailMerge->m_pMgr = nullptr;
}
private:
@@ -595,7 +595,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
}
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, false);
- SwView *pView = pFrame ? dynamic_cast<SwView*>( pFrame->GetViewShell() ) : NULL;
+ SwView *pView = pFrame ? dynamic_cast<SwView*>( pFrame->GetViewShell() ) : nullptr;
if (!pView)
throw RuntimeException();
SwWrtShell &rSh = *pView->GetWrtShellPtr();
@@ -889,7 +889,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
throw PropertyVetoException();
else
{
- void *pData = NULL;
+ void *pData = nullptr;
switch (pCur->nWID)
{
case WID_SELECTION : pData = &m_aSelection; break;
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index fa4fbb2e97fc..15aef1f25db7 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -209,7 +209,7 @@ Reference< XPropertySet > SwXModule::getViewSettings() throw( uno::RuntimeExcep
if(!mxViewSettings.is())
{
OSL_FAIL("Web or Text?");
- mxViewSettings = static_cast < HelperBaseNoState * > ( new SwXViewSettings( false, 0 ) );
+ mxViewSettings = static_cast < HelperBaseNoState * > ( new SwXViewSettings( false, nullptr ) );
}
return mxViewSettings;
}
@@ -245,7 +245,7 @@ Sequence< OUString > SwXModule::getSupportedServiceNames() throw( RuntimeExcepti
SwXPrintSettings::SwXPrintSettings(SwXPrintSettingsType eType, SwDoc* pDoc)
: ChainableHelperNoState ( lcl_createPrintSettingsInfo (), &Application::GetSolarMutex() )
, meType(eType)
-, mpPrtOpt ( NULL )
+, mpPrtOpt ( nullptr )
, mpDoc ( pDoc )
{
}
@@ -415,7 +415,7 @@ void SwXPrintSettings::_postSetValues()
IllegalArgumentException, WrappedTargetException,
RuntimeException)
{
- mpPrtOpt = NULL;
+ mpPrtOpt = nullptr;
}
void SwXPrintSettings::_preGetValues()
@@ -518,7 +518,7 @@ void SwXPrintSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo,
void SwXPrintSettings::_postGetValues ()
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
{
- mpPrtOpt = NULL;
+ mpPrtOpt = nullptr;
}
OUString SwXPrintSettings::getImplementationName() throw( RuntimeException, std::exception )
@@ -542,8 +542,8 @@ Sequence< OUString > SwXPrintSettings::getSupportedServiceNames() throw( Runtime
SwXViewSettings::SwXViewSettings(bool bWebView, SwView* pVw)
: ChainableHelperNoState( lcl_createViewSettingsInfo (), &Application::GetSolarMutex() )
, pView(pVw)
- , mpViewOption(NULL)
- , mpConstViewOption(NULL)
+ , mpViewOption(nullptr)
+ , mpConstViewOption(nullptr)
, bObjectValid(true)
, bWeb(bWebView)
, mbApplyZoom(false)
@@ -569,7 +569,7 @@ void SwXViewSettings::_preSetValues ()
IllegalArgumentException, WrappedTargetException,
RuntimeException)
{
- const SwViewOption* pVOpt = 0;
+ const SwViewOption* pVOpt = nullptr;
if(pView)
{
if(!IsValid())
@@ -695,7 +695,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
break;
default:
throw IllegalArgumentException(
- "SwXViewSettings: invalid zoom type", 0, 0);
+ "SwXViewSettings: invalid zoom type", nullptr, 0);
}
mpViewOption->SetZoomType( eZoom );
mbApplyZoom = true;
@@ -819,7 +819,7 @@ void SwXViewSettings::_postSetValues()
: VIEWOPT_DEST_TEXT );
delete mpViewOption;
- mpViewOption = NULL;
+ mpViewOption = nullptr;
}
void SwXViewSettings::_preGetValues ()
@@ -984,7 +984,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
void SwXViewSettings::_postGetValues ()
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
{
- mpConstViewOption = NULL;
+ mpConstViewOption = nullptr;
}
OUString SwXViewSettings::getImplementationName() throw( RuntimeException, std::exception )
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 83416d69e336..2ab018bc95d8 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -174,13 +174,13 @@ static SwPrintUIOptions * lcl_GetPrintUIOptions(
const SfxViewShell * pView )
{
if (!pDocShell)
- return NULL;
+ return nullptr;
- const bool bWebDoc = NULL != dynamic_cast< const SwWebDocShell * >(pDocShell);
- const bool bSwSrcView = NULL != dynamic_cast< const SwSrcView * >(pView);
+ const bool bWebDoc = nullptr != dynamic_cast< const SwWebDocShell * >(pDocShell);
+ const bool bSwSrcView = nullptr != dynamic_cast< const SwSrcView * >(pView);
const SwView * pSwView = dynamic_cast< const SwView * >(pView);
const bool bHasSelection = pSwView && pSwView->HasSelection( false ); // check for any selection, not just text selection
- const bool bHasPostIts = sw_GetPostIts( &pDocShell->GetDoc()->getIDocumentFieldsAccess(), 0 );
+ const bool bHasPostIts = sw_GetPostIts( &pDocShell->GetDoc()->getIDocumentFieldsAccess(), nullptr );
// get default values to use in dialog from documents SwPrintData
const SwPrintData &rPrintData = pDocShell->GetDoc()->getIDocumentDeviceAccess().getPrintData();
@@ -375,11 +375,11 @@ SwXTextDocument::SwXTextDocument(SwDocShell* pShell)
pDocShell(pShell),
- bObjectValid(pShell != 0),
+ bObjectValid(pShell != nullptr),
- pDrawPage(0),
+ pDrawPage(nullptr),
mxXDrawPage(),
- pBodyText(0),
+ pBodyText(nullptr),
mxXNumberingRules(),
mxXFootnotes(),
mxXFootnoteSettings(),
@@ -402,10 +402,10 @@ SwXTextDocument::SwXTextDocument(SwDocShell* pShell)
mxXLineNumberingProperties(),
mxLinkTargetSupplier(),
mxXRedlines(),
- m_pHiddenViewFrame(0),
- pPropertyHelper(0),
- m_pPrintUIOptions( NULL ),
- m_pRenderData( NULL ),
+ m_pHiddenViewFrame(nullptr),
+ pPropertyHelper(nullptr),
+ m_pPrintUIOptions( nullptr ),
+ m_pRenderData( nullptr ),
// #i117783#
bApplyPagePrintSettingsFromXPagePrintable( false )
{
@@ -418,7 +418,7 @@ SwXTextDocument::~SwXTextDocument()
{
Reference< XInterface > x0;
xNumFormatAgg->setDelegator(x0);
- xNumFormatAgg = 0;
+ xNumFormatAgg = nullptr;
}
delete m_pPrintUIOptions;
if (m_pRenderData && m_pRenderData->IsViewOptionAdjust())
@@ -461,7 +461,7 @@ void SwXTextDocument::GetNumberFormatter()
{
const uno::Type& rTunnelType = cppu::UnoType<XUnoTunnel>::get();
Any aNumTunnel = xNumFormatAgg->queryAggregation(rTunnelType);
- SvNumberFormatsSupplierObj* pNumFormat = 0;
+ SvNumberFormatsSupplierObj* pNumFormat = nullptr;
Reference< XUnoTunnel > xNumTunnel;
if(aNumTunnel >>= xNumTunnel)
{
@@ -763,7 +763,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
- !pSearch->sSearchText.isEmpty() ? &aSearchOpt : 0,
+ !pSearch->sSearchText.isEmpty() ? &aSearchOpt : nullptr,
&aReplace );
}
else if(pSearch->bStyles)
@@ -820,13 +820,13 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > &
if(xLastResult.is())
{
Reference<XUnoTunnel> xCursorTunnel( xLastResult, UNO_QUERY);
- OTextCursorHelper* pPosCrsr = 0;
+ OTextCursorHelper* pPosCrsr = nullptr;
if(xCursorTunnel.is())
{
pPosCrsr = reinterpret_cast<OTextCursorHelper*>(xCursorTunnel->getSomething(
OTextCursorHelper::getUnoTunnelId()));
}
- SwPaM* pCrsr = pPosCrsr ? pPosCrsr->GetPaM() : 0;
+ SwPaM* pCrsr = pPosCrsr ? pPosCrsr->GetPaM() : nullptr;
if(pCrsr)
{
*pUnoCrsr->GetPoint() = *pCrsr->End();
@@ -834,7 +834,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > &
}
else
{
- SwXTextRange* pRange = 0;
+ SwXTextRange* pRange = nullptr;
if(xCursorTunnel.is())
{
pRange = reinterpret_cast<SwXTextRange*>(xCursorTunnel->getSomething(
@@ -893,13 +893,13 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > &
nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
- !pSearch->sSearchText.isEmpty() ? &aSearchOpt : 0 );
+ !pSearch->sSearchText.isEmpty() ? &aSearchOpt : nullptr );
}
else if(pSearch->bStyles)
{
SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc());
//pSearch->sReplaceText
- SwTextFormatColl *pReplaceColl = 0;
+ SwTextFormatColl *pReplaceColl = nullptr;
bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( *pSearchColl,
eStart, eEnd, bCancel,
@@ -1375,18 +1375,18 @@ void SwXTextDocument::Invalidate()
{
const uno::Type& rTunnelType = cppu::UnoType<XUnoTunnel>::get();
Any aNumTunnel = xNumFormatAgg->queryAggregation(rTunnelType);
- SvNumberFormatsSupplierObj* pNumFormat = 0;
+ SvNumberFormatsSupplierObj* pNumFormat = nullptr;
Reference< XUnoTunnel > xNumTunnel;
if(aNumTunnel >>= xNumTunnel)
{
pNumFormat = reinterpret_cast<SvNumberFormatsSupplierObj*>(
xNumTunnel->getSomething(SvNumberFormatsSupplierObj::getUnoTunnelId()));
- pNumFormat->SetNumberFormatter(0);
+ pNumFormat->SetNumberFormatter(nullptr);
}
OSL_ENSURE(pNumFormat, "No number formatter available");
}
InitNewDoc();
- pDocShell = 0;
+ pDocShell = nullptr;
lang::EventObject const ev(static_cast<SwXTextDocumentBaseClass &>(*this));
m_pImpl->m_RefreshListeners.disposeAndClear(ev);
}
@@ -1432,15 +1432,15 @@ void SwXTextDocument::InitNewDoc()
if(xBodyText.is())
{
- xBodyText = 0;
- pBodyText = 0;
+ xBodyText = nullptr;
+ pBodyText = nullptr;
}
if(xNumFormatAgg.is())
{
const uno::Type& rTunnelType = cppu::UnoType<XUnoTunnel>::get();
Any aNumTunnel = xNumFormatAgg->queryAggregation(rTunnelType);
- SvNumberFormatsSupplierObj* pNumFormat = 0;
+ SvNumberFormatsSupplierObj* pNumFormat = nullptr;
Reference< XUnoTunnel > xNumTunnel;
if(aNumTunnel >>= xNumTunnel)
{
@@ -1450,7 +1450,7 @@ void SwXTextDocument::InitNewDoc()
}
OSL_ENSURE(pNumFormat, "No number formatter available");
if (pNumFormat)
- pNumFormat->SetNumberFormatter(0);
+ pNumFormat->SetNumberFormatter(nullptr);
}
if(mxXTextFieldTypes.is())
@@ -1580,8 +1580,8 @@ void SwXTextDocument::InitNewDoc()
if(xPropertyHelper.is())
{
pPropertyHelper->Invalidate();
- xPropertyHelper = 0;
- pPropertyHelper = 0;
+ xPropertyHelper = nullptr;
+ pPropertyHelper = nullptr;
}
}
@@ -1667,7 +1667,7 @@ css::uno::Reference<css::uno::XInterface> SwXTextDocument::create(
aTmpServiceName = "com.sun.star.drawing.OLE2Shape";
}
Reference<XInterface> xTmp(
- arguments == 0
+ arguments == nullptr
? SvxFmMSFactory::createInstance(aTmpServiceName)
: SvxFmMSFactory::createInstanceWithArguments(
aTmpServiceName, *arguments));
@@ -1686,7 +1686,7 @@ css::uno::Reference<css::uno::XInterface> SwXTextDocument::create(
Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServiceName)
throw( Exception, RuntimeException, std::exception )
{
- return create(rServiceName, 0);
+ return create(rServiceName, nullptr);
}
Reference< XInterface > SwXTextDocument::createInstanceWithArguments(
@@ -1889,7 +1889,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
SwDrawModel * pDrawDoc;
bool bAuto = *static_cast<sal_Bool const *>(aValue.getValue());
- if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
+ if ( nullptr != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
pDrawDoc->SetAutoControlFocus( bAuto );
else if (bAuto)
{
@@ -1909,7 +1909,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
SwDrawModel * pDrawDoc;
bool bMode = *static_cast<sal_Bool const *>(aValue.getValue());
- if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
+ if ( nullptr != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
pDrawDoc->SetOpenInDesignMode( bMode );
else if (!bMode)
{
@@ -2056,7 +2056,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
{
SwDrawModel * pDrawDoc;
bool bAuto;
- if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
+ if ( nullptr != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
bAuto = pDrawDoc->GetAutoControlFocus();
else
bAuto = false;
@@ -2067,7 +2067,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
{
SwDrawModel * pDrawDoc;
bool bMode;
- if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
+ if ( nullptr != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
bMode = pDrawDoc->GetOpenInDesignMode();
else
bMode = true;
@@ -2313,7 +2313,7 @@ SfxViewShell * SwXTextDocument::GetRenderView(
bool bIsPDFExport )
{
// get view shell to use
- SfxViewShell *pView = 0;
+ SfxViewShell *pView = nullptr;
if (bIsPDFExport)
pView = GuessViewShell( rbIsSwSrcView );
else
@@ -2353,7 +2353,7 @@ SwDoc * SwXTextDocument::GetRenderDoc(
const uno::Any& rSelection,
bool bIsPDFExport )
{
- SwDoc *pDoc = 0;
+ SwDoc *pDoc = nullptr;
uno::Reference< frame::XModel > xModel;
rSelection >>= xModel;
@@ -2386,7 +2386,7 @@ SwDoc * SwXTextDocument::GetRenderDoc(
if (!m_pRenderData)
{
OSL_FAIL("GetRenderDoc: no renderdata");
- return 0;
+ return nullptr;
}
SwView *const pSwView(static_cast<SwView *>(rpView));
SfxObjectShellLock xDocSh(m_pRenderData->GetTempDocShell());
@@ -2482,7 +2482,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
SwDocShell *pRenderDocShell = pDoc->GetDocShell();
// TODO/mba: we really need a generic way to get the SwViewShell!
- SwViewShell* pViewShell = 0;
+ SwViewShell* pViewShell = nullptr;
SwView* pSwView = dynamic_cast<SwView*>( pView );
if ( pSwView )
{
@@ -2543,7 +2543,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
{
// PDF export should not make use of the SwPrtOptions
const SwPrintData *pPrtOptions = (bIsPDFExport)
- ? NULL : m_pRenderData->GetSwPrtOptions();
+ ? nullptr : m_pRenderData->GetSwPrtOptions();
m_pRenderData->ViewOptionAdjust( pPrtOptions );
}
@@ -2657,7 +2657,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
throw IllegalArgumentException();
// TODO/mba: we really need a generic way to get the SwViewShell!
- SwViewShell* pVwSh = 0;
+ SwViewShell* pVwSh = nullptr;
SwView* pSwView = dynamic_cast<SwView*>( pView );
if ( pSwView )
pVwSh = pSwView->GetWrtShellPtr();
@@ -2848,10 +2848,10 @@ SfxViewShell * SwXTextDocument::GuessViewShell(
// #130810# SfxViewShell::Current() / SfxViewShell::GetObjectShell()
// must not be used (see comment from MBA)
- SfxViewShell *pView = 0;
- SwView *pSwView = 0;
- SwPagePreview *pSwPagePreview = 0;
- SwSrcView *pSwSrcView = 0;
+ SfxViewShell *pView = nullptr;
+ SwView *pSwView = nullptr;
+ SwPagePreview *pSwPagePreview = nullptr;
+ SwSrcView *pSwSrcView = nullptr;
SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, false );
// look for the view shell with the same controller in use,
@@ -2876,7 +2876,7 @@ SfxViewShell * SwXTextDocument::GuessViewShell(
OSL_ENSURE( pSwView || pSwPagePreview || pSwSrcView, "failed to get view shell" );
if (pView)
- rbIsSwSrcView = pSwSrcView != 0;
+ rbIsSwSrcView = pSwSrcView != nullptr;
return pView;
}
@@ -2942,7 +2942,7 @@ void SAL_CALL SwXTextDocument::render(
// or SwPagePreview for PDF export of the page preview
//!! (check for SwView first as in GuessViewShell) !!
OSL_ENSURE( pView, "!! view missing !!" );
- SwViewShell* pVwSh = 0;
+ SwViewShell* pVwSh = nullptr;
if (pView)
{
// TODO/mba: we really need a generic way to get the SwViewShell!
@@ -2978,7 +2978,7 @@ void SAL_CALL SwXTextDocument::render(
SwWrtShell* pWrtShell = dynamic_cast< const SwView *>( pView ) != nullptr ?
static_cast<SwView*>(pView)->GetWrtShellPtr() :
- 0;
+ nullptr;
SwPrintData const& rSwPrtOptions =
*m_pRenderData->GetSwPrtOptions();
@@ -3020,7 +3020,7 @@ void SAL_CALL SwXTextDocument::render(
if (m_pHiddenViewFrame)
{
lcl_DisposeView( m_pHiddenViewFrame, pDocShell );
- m_pHiddenViewFrame = 0;
+ m_pHiddenViewFrame = nullptr;
// prevent crash described in #i108805
SwDocShell *pRenderDocShell = pDoc->GetDocShell();
@@ -3035,8 +3035,8 @@ void SAL_CALL SwXTextDocument::render(
}
if( bLastPage )
{
- delete m_pRenderData; m_pRenderData = NULL;
- delete m_pPrintUIOptions; m_pPrintUIOptions = NULL;
+ delete m_pRenderData; m_pRenderData = nullptr;
+ delete m_pPrintUIOptions; m_pPrintUIOptions = nullptr;
}
}
@@ -3386,7 +3386,7 @@ void SwXTextDocument::resetSelection()
SolarMutexGuard aGuard;
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
- pWrtShell->ResetSelect(0, false);
+ pWrtShell->ResetSelect(nullptr, false);
}
void SAL_CALL SwXTextDocument::paintTile( const ::css::uno::Any& Parent, ::sal_Int32 nOutputWidth, ::sal_Int32 nOutputHeight, ::sal_Int32 nTilePosX, ::sal_Int32 nTilePosY, ::sal_Int32 nTileWidth, ::sal_Int32 nTileHeight ) throw (::css::uno::RuntimeException, ::std::exception)
@@ -3743,7 +3743,7 @@ uno::Type SwXLinkTargetSupplier::getElementType()
sal_Bool SwXLinkTargetSupplier::hasElements() throw( RuntimeException, std::exception )
{
- return 0 != pxDoc;
+ return nullptr != pxDoc;
}
OUString SwXLinkTargetSupplier::getImplementationName() throw( RuntimeException, std::exception )
@@ -3772,7 +3772,7 @@ SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(
pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
sLinkSuffix(sSuffix),
sLinkDisplayName(rLinkDisplayName),
- pxDoc(0)
+ pxDoc(nullptr)
{
}
@@ -4196,14 +4196,14 @@ Reference<XInterface> SwXDocumentPropertyHelper::GetDrawTable(short nWhich)
void SwXDocumentPropertyHelper::Invalidate()
{
- xDashTable = 0;
- xGradientTable = 0;
- xHatchTable = 0;
- xBitmapTable = 0;
- xTransGradientTable = 0;
- xMarkerTable = 0;
- xDrawDefaults = 0;
- m_pDoc = 0;
+ xDashTable = nullptr;
+ xGradientTable = nullptr;
+ xHatchTable = nullptr;
+ xBitmapTable = nullptr;
+ xTransGradientTable = nullptr;
+ xMarkerTable = nullptr;
+ xDrawDefaults = nullptr;
+ m_pDoc = nullptr;
SvxUnoForbiddenCharsTable::mxForbiddenChars.clear();
}
@@ -4279,7 +4279,7 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions)
if (m_aOldViewOptions != aRenderViewOptions) // check if reformatting is necessary
{
- aRenderViewOptions.SetPrinting( pPrtOptions != NULL );
+ aRenderViewOptions.SetPrinting( pPrtOptions != nullptr );
m_pShell->ApplyViewOptions( aRenderViewOptions );
}
}
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index dc012f1a0183..dd4c778914f2 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -128,7 +128,7 @@ void SwXTextView::Invalidate()
}
m_refCount--;
- m_pView = 0;
+ m_pView = nullptr;
}
Sequence< uno::Type > SAL_CALL SwXTextView::getTypes( ) throw(uno::RuntimeException, std::exception)
@@ -248,11 +248,11 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface)
}
else
{
- SwPaM * pPaM(0);
+ SwPaM * pPaM(nullptr);
std::pair<OUString, FlyCntType> frame;
OUString tableName;
- SwUnoTableCrsr const* pTableCursor(0);
- ::sw::mark::IMark const* pMark(0);
+ SwUnoTableCrsr const* pTableCursor(nullptr);
+ ::sw::mark::IMark const* pMark(nullptr);
SwUnoCursorHelper::GetSelectableFromAny(xInterface, *pDoc,
pPaM, frame, tableName, pTableCursor, pMark, sdrObjects);
if (pPaM)
@@ -438,13 +438,13 @@ SdrObject* SwXTextView::GetControl(
uno::Reference< awt::XControl >& xToFill )
{
SwView* pView2 = GetView();
- FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
- SdrView* pDrawView = pView2 ? pView2->GetDrawView() : NULL;
- vcl::Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
+ FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : nullptr;
+ SdrView* pDrawView = pView2 ? pView2->GetDrawView() : nullptr;
+ vcl::Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : nullptr;
OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::GetControl: how could I?" );
- SdrObject* pControl = NULL;
+ SdrObject* pControl = nullptr;
if ( pFormShell && pDrawView && pWindow )
pControl = pFormShell->GetFormControl( xModel, *pDrawView, *pWindow, xToFill );
return pControl;
@@ -464,9 +464,9 @@ uno::Reference< form::runtime::XFormController > SAL_CALL SwXTextView::getFormCo
SolarMutexGuard aGuard;
SwView* pView2 = GetView();
- FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
- SdrView* pDrawView = pView2 ? pView2->GetDrawView() : NULL;
- vcl::Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
+ FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : nullptr;
+ SdrView* pDrawView = pView2 ? pView2->GetDrawView() : nullptr;
+ vcl::Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : nullptr;
OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::getFormController: how could I?" );
uno::Reference< form::runtime::XFormController > xController;
@@ -479,7 +479,7 @@ sal_Bool SAL_CALL SwXTextView::isFormDesignMode( ) throw (uno::RuntimeException
{
SolarMutexGuard aGuard;
SwView* pView2 = GetView();
- FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
+ FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : nullptr;
return !pFormShell || pFormShell->IsDesignMode();
}
@@ -487,7 +487,7 @@ void SAL_CALL SwXTextView::setFormDesignMode( sal_Bool _DesignMode ) throw (Runt
{
SolarMutexGuard aGuard;
SwView* pView2 = GetView();
- FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
+ FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : nullptr;
if ( pFormShell )
pFormShell->SetDesignMode( _DesignMode );
}
@@ -1068,9 +1068,9 @@ void SwXTextViewCursor::gotoRange(
}
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- SwXParagraph* pPara = 0;
- OTextCursorHelper* pCursor = 0;
+ SwXTextRange* pRange = nullptr;
+ SwXParagraph* pPara = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
if(xRangeTunnel.is())
{
pRange = reinterpret_cast<SwXTextRange*>(xRangeTunnel->getSomething(
@@ -1081,7 +1081,7 @@ void SwXTextViewCursor::gotoRange(
SwXParagraph::getUnoTunnelId()));
}
- const FrmTypeFlags nFrmType = rSh.GetFrmType(0,true);
+ const FrmTypeFlags nFrmType = rSh.GetFrmType(nullptr,true);
SwStartNodeType eSearchNodeType = SwNormalStartNode;
if(nFrmType & FrmTypeFlags::FLY_ANY)
@@ -1098,7 +1098,7 @@ void SwXTextViewCursor::gotoRange(
const SwStartNode* pOwnStartNode = aOwnPaM.GetNode().
FindSttNodeByType(eSearchNodeType);
- const SwNode* pSrcNode = 0;
+ const SwNode* pSrcNode = nullptr;
if(pCursor && pCursor->GetPaM())
{
pSrcNode = &pCursor->GetPaM()->GetNode();
@@ -1115,7 +1115,7 @@ void SwXTextViewCursor::gotoRange(
{
pSrcNode = pPara->GetTextNode();
}
- const SwStartNode* pTmp = pSrcNode ? pSrcNode->FindSttNodeByType(eSearchNodeType) : 0;
+ const SwStartNode* pTmp = pSrcNode ? pSrcNode->FindSttNodeByType(eSearchNodeType) : nullptr;
//Skip SectionNodes
while(pTmp && pTmp->IsSectionNode())
@@ -1386,7 +1386,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart()
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
- xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->Start(), 0);
+ xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->Start(), nullptr);
}
else
throw uno::RuntimeException();
@@ -1406,7 +1406,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd()
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
- xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->End(), 0);
+ xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->End(), nullptr);
}
else
throw uno::RuntimeException();
@@ -1762,13 +1762,13 @@ IMPLEMENT_FORWARD_XINTERFACE2(SwXTextViewCursor,SwXTextViewCursor_Base,OTextCurs
const SwDoc* SwXTextViewCursor::GetDoc() const
{
SwWrtShell& rSh = m_pView->GetWrtShell();
- return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : 0;
+ return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : nullptr;
}
SwDoc* SwXTextViewCursor::GetDoc()
{
SwWrtShell& rSh = m_pView->GetWrtShell();
- return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : 0;
+ return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : nullptr;
}
const SwPaM* SwXTextViewCursor::GetPaM() const
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 88c84a760c3c..e0026eb3163b 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -222,7 +222,7 @@ SwTOXBaseContent::~SwTOXBaseContent()
SwContentType::SwContentType(SwWrtShell* pShell, ContentTypeId nType, sal_uInt8 nLevel) :
SwTypeNumber(CTYPE_CTT),
pWrtShell(pShell),
- pMember(0),
+ pMember(nullptr),
sContentTypeName(SW_RES(STR_CONTENT_TYPE_FIRST + (int)nType)),
sSingleContentTypeName(SW_RES(STR_CONTENT_TYPE_SINGLE_FIRST + (int)nType)),
nMemberCount(0),
@@ -298,7 +298,7 @@ void SwContentType::Init(bool* pbInvalidateWindow)
break;
case ContentTypeId::REGION :
{
- SwContentArr* pOldMember = 0;
+ SwContentArr* pOldMember = nullptr;
size_t nOldRegionCount = 0;
bool bInvalidate = false;
if(!pMember)
@@ -333,7 +333,7 @@ void SwContentType::Init(bool* pbInvalidateWindow)
nLevel,
pFormat->FindLayoutRect( false, &aNullPt ).Top());
- SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, 0 );
+ SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, nullptr );
if( !pFormat->GetInfo( aAskItem ) &&
!aAskItem.pObject ) // not visible
pCnt->SetInvisible();
@@ -480,9 +480,9 @@ void SwContentType::Invalidate()
void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
{
- SwContentArr* pOldMember = 0;
+ SwContentArr* pOldMember = nullptr;
size_t nOldMemberCount = 0;
- SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, 0 );
+ SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, nullptr );
if(pMember && pbLevelOrVisibilityChanged)
{
pOldMember = pMember;
@@ -576,7 +576,7 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
if(ContentTypeId::GRAPHIC == nContentType)
{
OUString sLink;
- pWrtShell->GetGrfNms( &sLink, 0, static_cast<const SwFlyFrameFormat*>( pFrameFormat));
+ pWrtShell->GetGrfNms( &sLink, nullptr, static_cast<const SwFlyFrameFormat*>( pFrameFormat));
pCnt = new SwGraphicContent(this, sFrmName,
INetURLObject::decode( sLink,
INetURLObject::DECODE_UNAMBIGUOUS ),
@@ -792,8 +792,8 @@ SwContentTree::SwContentTree(vcl::Window* pParent, const ResId& rResId)
, m_sPostItShow(SW_RES(STR_POSTIT_SHOW))
, m_sPostItHide(SW_RES(STR_POSTIT_HIDE))
, m_sPostItDelete(SW_RES(STR_POSTIT_DELETE))
- , m_pHiddenShell(0)
- , m_pActiveShell(0)
+ , m_pHiddenShell(nullptr)
+ , m_pActiveShell(nullptr)
, m_pConfig(SW_MOD()->GetNavigationConfig())
, m_nActiveBlock(0)
, m_nHiddenBlock(0)
@@ -821,8 +821,8 @@ SwContentTree::SwContentTree(vcl::Window* pParent, const ResId& rResId)
SetDragDropMode(DragDropMode::APP_COPY);
for (ContentTypeId i : o3tl::enumrange<ContentTypeId>())
{
- m_aActiveContentArr[i] = 0;
- m_aHiddenContentArr[i] = 0;
+ m_aActiveContentArr[i] = nullptr;
+ m_aHiddenContentArr[i] = nullptr;
}
for (int i = 0; i < CONTEXT_COUNT; ++i)
{
@@ -846,17 +846,17 @@ void SwContentTree::dispose()
Clear(); // If applicable erase content types previously.
bIsInDrag = false;
m_aUpdTimer.Stop();
- SetActiveShell(0);
+ SetActiveShell(nullptr);
SvTreeListBox::dispose();
}
OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const
{
- if( pEntry == NULL)
+ if( pEntry == nullptr)
return OUString();
SwContent* pCnt = static_cast<SwContent*>(pEntry->GetUserData());
- if( pCnt == NULL || pCnt->GetParent() == NULL)
+ if( pCnt == nullptr || pCnt->GetParent() == nullptr)
return OUString();
ContentTypeId nJumpType = pCnt->GetParent()->GetType();
@@ -946,11 +946,11 @@ OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const
OUString SwContentTree::GetEntryLongDescription( SvTreeListEntry* pEntry ) const
{
- if( pEntry == NULL)
+ if( pEntry == nullptr)
return OUString();
SwContent* pCnt = static_cast<SwContent*>(pEntry->GetUserData());
- if( pCnt == NULL || pCnt->GetParent() == NULL)
+ if( pCnt == nullptr || pCnt->GetParent() == nullptr)
return OUString();
SdrObject* pTemp;
@@ -1073,7 +1073,7 @@ sal_Int8 SwContentTree::AcceptDrop( const AcceptDropEvent& rEvt )
static void* lcl_GetOutlineKey( SwContentTree* pTree, SwOutlineContent* pContent)
{
- void* key = 0;
+ void* key = nullptr;
if( pTree && pContent )
{
SwWrtShell* pShell = pTree->GetWrtShell();
@@ -1174,10 +1174,10 @@ std::unique_ptr<PopupMenu> SwContentTree::CreateContextMenu()
pPop->InsertItem(2, m_aContextStrings[STR_DRAGMODE - STR_CONTEXT_FIRST]);
pPop->InsertItem(3, m_aContextStrings[STR_DISPLAY - STR_CONTEXT_FIRST]);
// Now edit
- SvTreeListEntry* pEntry = 0;
+ SvTreeListEntry* pEntry = nullptr;
// Edit only if the shown content is coming from the current view.
if((m_bIsActive || m_pActiveShell == pActiveView->GetWrtShellPtr())
- && 0 != (pEntry = FirstSelected()) && lcl_IsContent(pEntry))
+ && nullptr != (pEntry = FirstSelected()) && lcl_IsContent(pEntry))
{
const SwContentType* pContType = static_cast<SwContent*>(pEntry->GetUserData())->GetParent();
const ContentTypeId nContentType = pContType->GetType();
@@ -1288,7 +1288,7 @@ sal_IntPtr SwContentTree::GetTabPos( SvTreeListEntry* pEntry, SvLBoxTab* pTab)
nLevel++;
SwContent* pCnt = static_cast<SwContent *>(pEntry->GetUserData());
const SwContentType* pParent;
- if(pCnt && 0 != (pParent = pCnt->GetParent()))
+ if(pCnt && nullptr != (pParent = pCnt->GetParent()))
{
if(pParent->GetType() == ContentTypeId::OUTLINE)
nLevel = nLevel + static_cast<SwOutlineContent*>(pCnt)->GetOutlineLevel();
@@ -1315,7 +1315,7 @@ void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
// Add for outline plus/minus
if(pCntType->GetType() == ContentTypeId::OUTLINE)
{
- SvTreeListEntry* pChild = 0;
+ SvTreeListEntry* pChild = nullptr;
for(size_t i = 0; i < nCount; ++i)
{
const SwContent* pCnt = pCntType->GetMember(i);
@@ -1354,7 +1354,7 @@ void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
{
for(size_t i = 0; i < nCount; ++i)
{
- SvTreeListEntry* pChild = NULL;
+ SvTreeListEntry* pChild = nullptr;
const SwContent* pCnt = pCntType->GetMember(i);
if (pCnt)
{
@@ -1393,7 +1393,7 @@ void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
//Get drawing Objects by content .
SdrObject* SwContentTree::GetDrawingObjectsByContent(const SwContent *pCnt)
{
- SdrObject *pRetObj = NULL;
+ SdrObject *pRetObj = nullptr;
switch(pCnt->GetParent()->GetType())
{
case ContentTypeId::DRAWOBJECT:
@@ -1418,7 +1418,7 @@ SdrObject* SwContentTree::GetDrawingObjectsByContent(const SwContent *pCnt)
break;
}
default:
- pRetObj = NULL;
+ pRetObj = nullptr;
}
return pRetObj;
}
@@ -1596,7 +1596,7 @@ void SwContentTree::Display( bool bActive )
if(bReadOnly != m_bIsLastReadOnly)
{
m_bIsLastReadOnly = bReadOnly;
- bool bDisable = pShell == 0 || bReadOnly;
+ bool bDisable = pShell == nullptr || bReadOnly;
SwNavigationPI* pNavi = GetParentWindow();
pNavi->m_aContentToolBox->EnableItem(FN_ITEM_UP , !bDisable);
pNavi->m_aContentToolBox->EnableItem(FN_ITEM_DOWN, !bDisable);
@@ -1606,7 +1606,7 @@ void SwContentTree::Display( bool bActive )
}
if(pShell)
{
- SvTreeListEntry* pSelEntry = 0;
+ SvTreeListEntry* pSelEntry = nullptr;
if(m_nRootType == ContentTypeId::UNKNOWN)
{
for( ContentTypeId nCntType : o3tl::enumrange<ContentTypeId>() )
@@ -1622,7 +1622,7 @@ void SwContentTree::Display( bool bActive )
const Image& rImage = m_aEntryImages.GetImage(SID_SW_START + (int)nCntType);
bool bChOnDemand = 0 != (*ppContentT)->GetMemberCount();
pEntry = InsertEntry(sEntry, rImage, rImage,
- 0, bChOnDemand, TREELIST_APPEND, (*ppContentT));
+ nullptr, bChOnDemand, TREELIST_APPEND, (*ppContentT));
if(nCntType == m_nLastSelType)
pSelEntry = pEntry;
sal_Int32 nExpandOptions = m_bIsActive || m_bIsConstant ?
@@ -1635,9 +1635,9 @@ void SwContentTree::Display( bool bActive )
{
// Now maybe select a additional child
SvTreeListEntry* pChild = pEntry;
- SvTreeListEntry* pTemp = 0;
+ SvTreeListEntry* pTemp = nullptr;
sal_uLong nPos = 1;
- while(0 != (pChild = Next(pChild)))
+ while(nullptr != (pChild = Next(pChild)))
{
// The old text will be slightly favored
if(sEntryName == GetEntryText(pChild) ||
@@ -1673,7 +1673,7 @@ void SwContentTree::Display( bool bActive )
const Image& rImage = m_aEntryImages.GetImage(20000 + (int)m_nRootType);
SvTreeListEntry* pParent = InsertEntry(
(*ppRootContentT)->GetName(), rImage, rImage,
- 0, false, TREELIST_APPEND, *ppRootContentT);
+ nullptr, false, TREELIST_APPEND, *ppRootContentT);
if(m_nRootType != ContentTypeId::OUTLINE)
{
@@ -1699,7 +1699,7 @@ void SwContentTree::Display( bool bActive )
const sal_uInt16 nActPos = pShell->GetOutlinePos(MAXLEVEL);
SvTreeListEntry* pEntry = First();
- while( 0 != (pEntry = Next(pEntry)) )
+ while( nullptr != (pEntry = Next(pEntry)) )
{
if(static_cast<SwOutlineContent*>(pEntry->GetUserData())->GetPos() == nActPos)
{
@@ -1713,9 +1713,9 @@ void SwContentTree::Display( bool bActive )
{
// Now maybe select a additional child
SvTreeListEntry* pChild = pParent;
- SvTreeListEntry* pTemp = 0;
+ SvTreeListEntry* pTemp = nullptr;
sal_uLong nPos = 1;
- while(0 != (pChild = Next(pChild)))
+ while(nullptr != (pChild = Next(pChild)))
{
// The old text will be slightly favored
if(sEntryName == GetEntryText(pChild) ||
@@ -1975,7 +1975,7 @@ bool SwContentTree::HasContentChanged()
{
SvTreeListEntry* pFirstSel;
if(bOutline &&
- 0 != ( pFirstSel = FirstSelected()) &&
+ nullptr != ( pFirstSel = FirstSelected()) &&
lcl_IsContent(pFirstSel))
{
const auto nSelLevel =
@@ -2017,7 +2017,7 @@ bool SwContentTree::HasContentChanged()
const sal_uInt16 nActPos = GetWrtShell()->GetOutlinePos(MAXLEVEL);
SvTreeListEntry* pFirstEntry = First();
- while( 0 != (pFirstEntry = Next(pFirstEntry)) )
+ while( nullptr != (pFirstEntry = Next(pFirstEntry)) )
{
if(static_cast<SwOutlineContent*>(pFirstEntry->GetUserData())->GetPos() == nActPos)
{
@@ -2157,7 +2157,7 @@ void SwContentTree::FindActiveTypeAndRemoveUserData()
// If clear is called by TimerUpdate:
// Only for root can the validity of the UserData be guaranteed.
SvTreeListEntry* pParent;
- while(0 != (pParent = GetParent(pEntry)))
+ while(nullptr != (pParent = GetParent(pEntry)))
pEntry = pParent;
if(pEntry->GetUserData() && lcl_IsContentType(pEntry))
m_nLastSelType = static_cast<SwContentType*>(pEntry->GetUserData())->GetType();
@@ -2165,7 +2165,7 @@ void SwContentTree::FindActiveTypeAndRemoveUserData()
pEntry = First();
while(pEntry)
{
- pEntry->SetUserData(0);
+ pEntry->SetUserData(nullptr);
pEntry = Next(pEntry);
}
}
@@ -2258,12 +2258,12 @@ void SwContentTree::Notify(SfxBroadcaster & rBC, SfxHint const& rHint)
SfxViewEventHint const*const pVEHint(
dynamic_cast<SfxViewEventHint const*>(&rHint));
- SwXTextView* pDyingShell = NULL;
+ SwXTextView* pDyingShell = nullptr;
if (m_pActiveShell && pVEHint && pVEHint->GetEventName() == "OnViewClosed")
pDyingShell = dynamic_cast<SwXTextView*>(pVEHint->GetController().get());
if (pDyingShell && pDyingShell->GetView() == &m_pActiveShell->GetView())
{
- SetActiveShell(0); // our view is dying, clear our pointers to it
+ SetActiveShell(nullptr); // our view is dying, clear our pointers to it
}
else
{
@@ -2408,7 +2408,7 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, bool bModifier)
const sal_uInt16 nCurrPos = pShell->GetOutlinePos(MAXLEVEL);
SvTreeListEntry* pFirst = First();
- while( 0 != (pFirst = Next(pFirst)) && lcl_IsContent(pFirst))
+ while( nullptr != (pFirst = Next(pFirst)) && lcl_IsContent(pFirst))
{
if(static_cast<SwOutlineContent*>(pFirst->GetUserData())->GetPos() == nCurrPos)
{
@@ -2477,7 +2477,7 @@ IMPL_LINK_NOARG_TYPED(SwContentTree, TimerUpdate, Timer *, void)
{
if(m_pActiveShell)
{
- SetActiveShell(0);
+ SetActiveShell(nullptr);
}
Clear();
m_bIsIdleClear = true;
@@ -2579,7 +2579,7 @@ TriState SwContentTree::NotifyCopying( SvTreeListEntry* pTarget,
bool SwContentTree::NotifyAcceptDrop( SvTreeListEntry* pEntry)
{
- return pEntry != 0;
+ return pEntry != nullptr;
}
// If a Ctrl + DoubleClick are executed in an open area,
@@ -2645,7 +2645,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
IsExpanded(pEntry) ? Collapse(pEntry) : Expand(pEntry);
}
else
- ContentDoubleClickHdl(0);
+ ContentDoubleClickHdl(nullptr);
break;
}
}
@@ -2701,7 +2701,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
const size_t nCount = pPage->GetObjCount();
bool hasObjectMarked = false;
- SdrObject* pObject = NULL;
+ SdrObject* pObject = nullptr;
pObject = GetDrawingObjectsByContent( pCnt );
if( pObject )
{
@@ -2954,7 +2954,7 @@ void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
break;
case 602:
{
- m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(0);
+ m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(nullptr);
m_pActiveShell->GetView().GetPostItMgr()->Delete();
break;
}
@@ -3206,7 +3206,7 @@ void SwContentTree::EditEntry(SvTreeListEntry* pEntry, EditEntryMode nMode)
{
if (static_cast<SwPostItContent*>(pCnt)->IsPostIt())
{
- m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(0);
+ m_pActiveShell->GetView().GetPostItMgr()->SetActiveSidebarWin(nullptr);
m_pActiveShell->DelRight();
}
}
@@ -3403,7 +3403,7 @@ void SwContentTree::GotoContent(SwContent* pCnt)
}
SwView& rView = m_pActiveShell->GetView();
rView.StopShellTimer();
- rView.GetPostItMgr()->SetActiveSidebarWin(0);
+ rView.GetPostItMgr()->SetActiveSidebarWin(nullptr);
rView.GetEditWin().GrabFocus();
}
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index d9b6ade3865e..d2014ddd1dcc 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -94,29 +94,29 @@ using namespace ::com::sun::star::uno;
// TabPos: push to left
#define GLBL_TABPOS_SUB 5
-const SfxObjectShell* SwGlobalTree::pShowShell = 0;
+const SfxObjectShell* SwGlobalTree::pShowShell = nullptr;
static const char* aHelpForMenu[] =
{
- 0,
+ nullptr,
HID_GLBLTREE_UPDATE, //CTX_UPDATE
HID_GLBLTREE_INSERT, //CTX_INSERT
HID_GLBLTREE_EDIT, //CTX_EDIT
HID_GLBLTREE_DEL, //CTX_DELETE
HID_GLBLTREE_EDIT_LINK, //CTX_EDIT_LINK
- 0,
- 0,
- 0,
- 0,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
HID_GLBLTREE_INS_IDX, //CTX_INSERT_ANY_INDEX
HID_GLBLTREE_INS_FILE, //CTX_INSERT_FILE
HID_GLBLTREE_INS_NEW_FILE, //CTX_INSERT_NEW_FILE
HID_GLBLTREE_INS_TEXT, //CTX_INSERT_TEXT
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
HID_GLBLTREE_UPD_SEL, //CTX_UPDATE_SEL
HID_GLBLTREE_UPD_IDX, //CTX_UPDATE_INDEX
HID_GLBLTREE_UPD_LINK, //CTX_UPDATE_LINK
@@ -149,13 +149,13 @@ SwGlobalTree::SwGlobalTree(vcl::Window* pParent, const ResId& rResId) :
SvTreeListBox(pParent, rResId),
- pActiveShell ( NULL ),
- pEmphasisEntry ( NULL ),
- pDDSource ( NULL ),
- pSwGlblDocContents ( NULL ),
- pDefParentWin ( NULL ),
- pDocContent ( NULL ),
- pDocInserter ( NULL ),
+ pActiveShell ( nullptr ),
+ pEmphasisEntry ( nullptr ),
+ pDDSource ( nullptr ),
+ pSwGlblDocContents ( nullptr ),
+ pDefParentWin ( nullptr ),
+ pDocContent ( nullptr ),
+ pDocInserter ( nullptr ),
bIsInternalDrag ( false ),
bLastEntryEmphasis ( false ),
@@ -187,9 +187,9 @@ SwGlobalTree::~SwGlobalTree()
void SwGlobalTree::dispose()
{
delete pSwGlblDocContents;
- pSwGlblDocContents = NULL;
+ pSwGlblDocContents = nullptr;
delete pDocInserter;
- pDocInserter = NULL;
+ pDocInserter = nullptr;
pDefParentWin.clear();
aUpdateTimer.Stop();
SvTreeListBox::dispose();
@@ -202,17 +202,17 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
if(pEmphasisEntry)
{
ImplShowTargetEmphasis( Prev(pEmphasisEntry), false );
- pEmphasisEntry = 0;
+ pEmphasisEntry = nullptr;
}
else if(bLastEntryEmphasis && pLast)
{
ImplShowTargetEmphasis( pLast, false);
}
- SvTreeListEntry* pDropEntry = bLastEntryEmphasis ? 0 : GetEntry(rEvt.maPosPixel);
+ SvTreeListEntry* pDropEntry = bLastEntryEmphasis ? nullptr : GetEntry(rEvt.maPosPixel);
if( bIsInternalDrag )
{
- SvTreeListEntry* pDummy = 0;
+ SvTreeListEntry* pDummy = nullptr;
sal_uLong nInsertionPos = TREELIST_APPEND;
NotifyMoving( pDropEntry, pDDSource, pDummy, nInsertionPos );
}
@@ -223,7 +223,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
OUString sFileName;
const SwGlblDocContent* pCnt = pDropEntry ?
static_cast<const SwGlblDocContent*>(pDropEntry->GetUserData()) :
- 0;
+ nullptr;
if( aData.HasFormat( SotClipboardFormatId::FILE_LIST ))
{
nRet = rEvt.mnAction;
@@ -285,7 +285,7 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
if( pEmphasisEntry )
{
ImplShowTargetEmphasis( Prev(pEmphasisEntry), false );
- pEmphasisEntry = 0;
+ pEmphasisEntry = nullptr;
}
else if(bLastEntryEmphasis && pLast)
{
@@ -434,7 +434,7 @@ sal_uInt16 SwGlobalTree::GetEnableFlags() const
SvTreeListEntry* pEntry = FirstSelected();
sal_uLong nSelCount = GetSelectionCount();
sal_uLong nEntryCount = GetEntryCount();
- SvTreeListEntry* pPrevEntry = pEntry ? Prev(pEntry) : 0;
+ SvTreeListEntry* pPrevEntry = pEntry ? Prev(pEntry) : nullptr;
sal_uInt16 nRet = 0;
if(nSelCount == 1 || !nEntryCount)
@@ -469,7 +469,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
SvTreeListEntry* pEntry = GetEntry( aPos );
const SwGlblDocContent* pCont = pEntry ?
- static_cast<const SwGlblDocContent*>(pEntry->GetUserData()) : 0;
+ static_cast<const SwGlblDocContent*>(pEntry->GetUserData()) : nullptr;
if( pCont && GLBLDOC_SECTION == pCont->GetType())
{
bParent = false;
@@ -573,7 +573,7 @@ TriState SwGlobalTree::NotifyCopying( SvTreeListEntry* /*pTarget*/,
bool SwGlobalTree::NotifyAcceptDrop( SvTreeListEntry* pEntry)
{
- return pEntry != 0;
+ return pEntry != nullptr;
}
void SwGlobalTree::StartDrag( sal_Int8 nAction, const Point& rPt )
@@ -627,7 +627,7 @@ void SwGlobalTree::KeyInput(const KeyEvent& rKEvt)
void SwGlobalTree::Clear()
{
- pEmphasisEntry = 0;
+ pEmphasisEntry = nullptr;
SvTreeListBox::Clear();
}
@@ -665,7 +665,7 @@ void SwGlobalTree::Display(bool bOnlyUpdateUserData)
if(!pSwGlblDocContents)
Update( false );
- SvTreeListEntry* pSelEntry = 0;
+ SvTreeListEntry* pSelEntry = nullptr;
for( size_t i = 0; i < nCount; i++)
{
SwGlblDocContent* pCont = (*pSwGlblDocContents)[i];
@@ -694,7 +694,7 @@ void SwGlobalTree::Display(bool bOnlyUpdateUserData)
break;
}
SvTreeListEntry* pEntry = InsertEntry(sEntry, aImage, aImage,
- 0, false, TREELIST_APPEND, pCont);
+ nullptr, false, TREELIST_APPEND, pCont);
if(sEntry == sEntryName)
{
pSelEntry = pEntry;
@@ -758,7 +758,7 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
OpenDoc(pCont);
nSlot = 0;
- pCont = 0;
+ pCont = nullptr;
}
break;
}
@@ -781,11 +781,11 @@ IMPL_LINK_TYPED( SwGlobalTree, PopupHdl, Menu* , pMenu, bool)
void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
SvTreeListEntry* pEntry = FirstSelected();
- SwGlblDocContent* pCont = pEntry ? static_cast<SwGlblDocContent*>(pEntry->GetUserData()) : 0;
+ SwGlblDocContent* pCont = pEntry ? static_cast<SwGlblDocContent*>(pEntry->GetUserData()) : nullptr;
// If a RequestHelp is called during the dialogue,
// then the content gets lost. Because of that a copy
// is created in which only the DocPos is set correctly.
- SwGlblDocContent* pContCopy = 0;
+ SwGlblDocContent* pContCopy = nullptr;
if(pCont)
pContCopy = new SwGlblDocContent(pCont->GetDocPos());
SfxDispatcher& rDispatch = *pActiveShell->GetView().GetViewFrame()->GetDispatcher();
@@ -830,7 +830,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
pActiveShell->GetLinkManager().UpdateAllLinks();
if(CTX_UPDATE_ALL == nSelectedPopupEntry)
nSlot = FN_UPDATE_TOX;
- pCont = 0;
+ pCont = nullptr;
}
break;
case CTX_EDIT:
@@ -875,7 +875,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
}
pTempContents.reset();
pActiveShell->EndAction();
- pCont = 0;
+ pCont = nullptr;
}
break;
case CTX_INSERT_ANY_INDEX:
@@ -896,7 +896,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
std::unique_ptr<AbstractMultiTOXTabDialog> pDlg(pFact->CreateMultiTOXTabDialog(
this, aSet,
*pActiveShell,
- 0,
+ nullptr,
USHRT_MAX,
true));
assert(pDlg && "Dialog creation failed!");
@@ -905,11 +905,11 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
SwTOXDescription& rDesc = pDlg->GetTOXDescription(
pDlg->GetCurrentTOXType());
SwTOXMgr aMgr(pActiveShell);
- SwTOXBase* pToInsert = 0;
+ SwTOXBase* pToInsert = nullptr;
if(aMgr.UpdateOrInsertTOX(rDesc, &pToInsert, pDlg->GetOutputItemSet()))
pActiveShell->InsertGlobalDocContent( *pContCopy, *pToInsert );
}
- pCont = 0;
+ pCont = nullptr;
}
}
break;
@@ -918,7 +918,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
bDeleteContentCopy = false;
pDocContent = pContCopy;
InsertRegion( pContCopy );
- pCont = NULL;
+ pCont = nullptr;
}
break;
case CTX_INSERT_NEW_FILE:
@@ -936,8 +936,8 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
SfxCallMode::SYNCHRON, &aFactory, 0L));
// save at
- SfxFrame* pFrm = pItem ? pItem->GetFrame() : 0;
- SfxViewFrame* pFrame = pFrm ? pFrm->GetCurrentViewFrame() : 0;
+ SfxFrame* pFrm = pItem ? pItem->GetFrame() : nullptr;
+ SfxViewFrame* pFrame = pFrm ? pFrm->GetCurrentViewFrame() : nullptr;
if( pFrame )
{
const SfxBoolItem* pBool = static_cast<const SfxBoolItem*>(
@@ -958,12 +958,12 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
Display();
Select(GetModel()->GetEntryAtAbsPos(nEntryPos));
pEntry = FirstSelected();
- pCont = pEntry ? static_cast<SwGlblDocContent*>(pEntry->GetUserData()) : 0;
+ pCont = pEntry ? static_cast<SwGlblDocContent*>(pEntry->GetUserData()) : nullptr;
}
else
{
- pEntry = 0;
- pCont = 0;
+ pEntry = nullptr;
+ pCont = nullptr;
}
if(pBool->GetValue())
{
@@ -995,7 +995,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
}
break;
case CTX_UPDATE:
- pCont = 0;
+ pCont = nullptr;
break;
default:;
// here nothing happens
@@ -1103,7 +1103,7 @@ bool SwGlobalTree::Update(bool bHard)
if(pActiveShell != pOldShell)
{
delete pSwGlblDocContents;
- pSwGlblDocContents = 0;
+ pSwGlblDocContents = nullptr;
}
if(!pSwGlblDocContents)
{
@@ -1180,8 +1180,8 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
bFound = true;
SwGlobalTree::SetShowShell(pCurr);
- Application::PostUserEvent( LINK( this, SwGlobalTree, ShowFrameHdl ), NULL, true );
- pCurr = 0;
+ Application::PostUserEvent( LINK( this, SwGlobalTree, ShowFrameHdl ), nullptr, true );
+ pCurr = nullptr;
}
else
pCurr = SfxObjectShell::GetNext(*pCurr);
@@ -1220,10 +1220,10 @@ SwNavigationPI* SwGlobalTree::GetParentWindow()
IMPL_STATIC_LINK_NOARG_TYPED(SwGlobalTree, ShowFrameHdl, void*, void)
{
const SfxObjectShell* pShell = SwGlobalTree::GetShowShell();
- SfxViewFrame* pFirst = pShell ? SfxViewFrame::GetFirst(pShell) : NULL;
+ SfxViewFrame* pFirst = pShell ? SfxViewFrame::GetFirst(pShell) : nullptr;
if (pFirst)
pFirst->ToTop();
- SwGlobalTree::SetShowShell(0);
+ SwGlobalTree::SetShowShell(nullptr);
}
void SwGlobalTree::InitEntry(SvTreeListEntry* pEntry,
@@ -1304,7 +1304,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
{
//update the global document content after each inserted document
rSh.GetGlobalDocContent(aTempContents);
- SwGlblDocContent* pAnchorContent = 0;
+ SwGlblDocContent* pAnchorContent = nullptr;
OSL_ENSURE(aTempContents.size() > (nAnchorContent + nFile), "invalid anchor content -> last insertion failed");
if ( aTempContents.size() > (nAnchorContent + nFile) )
pAnchorContent = aTempContents[nAnchorContent + nFile];
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index adb7a9d85084..1bfd535c8965 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -366,7 +366,7 @@ AutoTextGroup* SwGlossaryList::FindGroup(const OUString& rGroupName)
if(pRet->sName == rGroupName)
return pRet;
}
- return 0;
+ return nullptr;
}
void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx
index 0b5730cd98a2..30d009b469f2 100644
--- a/sw/source/uibase/utlui/initui.cxx
+++ b/sw/source/uibase/utlui/initui.cxx
@@ -39,10 +39,10 @@
// Global Pointer
-SwGlossaries* pGlossaries = 0;
+SwGlossaries* pGlossaries = nullptr;
// Provides all needed paths. Is initialized by UI.
-SwGlossaryList* pGlossaryList = 0;
+SwGlossaryList* pGlossaryList = nullptr;
namespace
{
@@ -57,7 +57,7 @@ enum CachedStringID
CachedStrings
};
-OUString *StringCache[CachedStrings] = {0};
+OUString *StringCache[CachedStrings] = {nullptr};
inline OUString GetCachedString(CachedStringID id)
{
@@ -139,8 +139,8 @@ void SetCurrGlosGroup(const OUString& sStr)
namespace
{
-std::vector<OUString>* pAuthFieldNameList = 0;
-std::vector<OUString>* pAuthFieldTypeList = 0;
+std::vector<OUString>* pAuthFieldNameList = nullptr;
+std::vector<OUString>* pAuthFieldTypeList = nullptr;
}
@@ -149,7 +149,7 @@ std::vector<OUString>* pAuthFieldTypeList = 0;
void _FinitUI()
{
delete SwViewShell::GetShellRes();
- SwViewShell::SetShellRes( 0 );
+ SwViewShell::SetShellRes( nullptr );
SwEditWin::_FinitStaticData();
@@ -208,7 +208,7 @@ ShellResource::ShellResource()
aTOXCitationName( SW_RES(STR_TOX_CITATION)),
aLinkCtrlClick(SW_RESSTR(STR_LINK_CTRL_CLICK)),
aLinkClick(SW_RESSTR(STR_LINK_CLICK)),
- pAutoFormatNameLst(0),
+ pAutoFormatNameLst(nullptr),
sPageDescFirstName( SW_RES(STR_PAGEDESC_FIRSTNAME)),
sPageDescFollowName( SW_RES(STR_PAGEDESC_FOLLOWNAME)),
sPageDescName( SW_RES(STR_PAGEDESC_NAME))
@@ -262,7 +262,7 @@ SwGlossaries* GetGlossaries()
bool HasGlossaryList()
{
- return pGlossaryList != 0;
+ return pGlossaryList != nullptr;
}
SwGlossaryList* GetGlossaryList()
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 8f29a40e384d..8a26ff77283b 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -161,7 +161,7 @@ void SwNavigationPI::FillBox()
SwView *pView = GetCreateView();
if(!pView)
{
- m_aContentTree->SetActiveShell(0);
+ m_aContentTree->SetActiveShell(nullptr);
}
else if( pView != m_pActContView)
{
@@ -179,7 +179,7 @@ void SwNavigationPI::UsePage(SwWrtShell *pSh)
if (!pSh)
{
SwView *pView = GetCreateView();
- pSh = pView ? &pView->GetWrtShell() : 0;
+ pSh = pView ? &pView->GetWrtShell() : nullptr;
GetPageEdit().SetValue(1);
}
if (pSh)
@@ -227,7 +227,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void )
break;
case FN_SHOW_CONTENT_BOX:
case FN_SELECT_CONTENT:
- if(m_pContextWin!=NULL && m_pContextWin->GetFloatingWindow()!=NULL)
+ if(m_pContextWin!=nullptr && m_pContextWin->GetFloatingWindow()!=nullptr)
{
if(_IsZoomedIn() )
{
@@ -244,7 +244,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void )
case FN_SELECT_FOOTER:
{
rSh.MoveCrsr();
- const FrmTypeFlags eType = rSh.GetFrmType(0,false);
+ const FrmTypeFlags eType = rSh.GetFrmType(nullptr,false);
if (eType & FrmTypeFlags::FOOTER)
{
if (rSh.EndPg())
@@ -258,7 +258,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void )
case FN_SELECT_HEADER:
{
rSh.MoveCrsr();
- const FrmTypeFlags eType = rSh.GetFrmType(0,false);
+ const FrmTypeFlags eType = rSh.GetFrmType(nullptr,false);
if (eType & FrmTypeFlags::HEADER)
{
if (rSh.SttPg())
@@ -272,7 +272,7 @@ IMPL_LINK_TYPED( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void )
case FN_SELECT_FOOTNOTE:
{
rSh.MoveCrsr();
- const FrmTypeFlags eFrmType = rSh.GetFrmType(0,false);
+ const FrmTypeFlags eFrmType = rSh.GetFrmType(nullptr,false);
// Jump from the footnote to the anchor.
if (eFrmType & FrmTypeFlags::FOOTNOTE)
{
@@ -518,7 +518,7 @@ void SwNavigationPI::GotoPage()
_ZoomIn();
if(IsGlobalMode())
ToggleTree();
- UsePage(0);
+ UsePage(nullptr);
GetPageEdit().GrabFocus();
}
@@ -526,14 +526,14 @@ void SwNavigationPI::_ZoomOut()
{
if (_IsZoomedIn())
{
- FloatingWindow* pFloat = m_pContextWin!=NULL ? m_pContextWin->GetFloatingWindow() : NULL;
+ FloatingWindow* pFloat = m_pContextWin!=nullptr ? m_pContextWin->GetFloatingWindow() : nullptr;
m_bIsZoomedIn = false;
Size aSz(GetOutputSizePixel());
aSz.Height() = m_nZoomOut;
Size aMinOutSizePixel = static_cast<SfxDockingWindow*>(GetParent())->GetMinOutputSizePixel();
static_cast<SfxDockingWindow*>(GetParent())->SetMinOutputSizePixel(Size(
aMinOutSizePixel.Width(),m_nZoomOutInit));
- if (pFloat != NULL)
+ if (pFloat != nullptr)
pFloat->SetOutputSizePixel(aSz);
FillBox();
if(IsGlobalMode())
@@ -555,7 +555,7 @@ void SwNavigationPI::_ZoomOut()
void SwNavigationPI::_ZoomIn()
{
- if (m_pContextWin != NULL)
+ if (m_pContextWin != nullptr)
{
FloatingWindow* pFloat = m_pContextWin->GetFloatingWindow();
if (pFloat &&
@@ -591,7 +591,7 @@ void SwNavigationPI::Resize()
Size aNewSize (pParent->GetOutputSizePixel());
SfxDockingWindow* pDockingParent = dynamic_cast<SfxDockingWindow*>(pParent);
- if (pDockingParent != NULL)
+ if (pDockingParent != nullptr)
{
FloatingWindow* pFloat = pDockingParent->GetFloatingWindow();
//change the minimum width depending on the dock status
@@ -648,13 +648,13 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
m_aGlobalTree(VclPtr<SwGlobalTree>::Create(this, SW_RES(TL_GLOBAL))),
m_aDocListBox(VclPtr<ListBox>::Create(this, SW_RES(LB_DOCS))),
- m_pxObjectShell(0),
- m_pContentView(0),
- m_pContentWrtShell(0),
- m_pActContView(0),
- m_pCreateView(0),
- m_pPopupWindow(0),
- m_pFloatingWindow(0),
+ m_pxObjectShell(nullptr),
+ m_pContentView(nullptr),
+ m_pContentWrtShell(nullptr),
+ m_pActContView(nullptr),
+ m_pCreateView(nullptr),
+ m_pPopupWindow(nullptr),
+ m_pFloatingWindow(nullptr),
m_pContextWin(pCw),
@@ -731,7 +731,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
m_nWishWidth += 2 * m_aContentToolBox->GetPosPixel().X();
DockingWindow* pDockingParent = dynamic_cast<DockingWindow*>(pParent);
- if (pDockingParent != NULL)
+ if (pDockingParent != nullptr)
{
FloatingWindow* pFloat = pDockingParent->GetFloatingWindow();
Size aMinSize(pFloat ? m_nWishWidth : 0, pFloat ? m_nZoomOutInit : 0);
@@ -739,7 +739,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
SetOutputSizePixel( Size( m_nWishWidth, m_nZoomOutInit));
SfxDockingWindow* pSfxDockingParent = dynamic_cast<SfxDockingWindow*>(pParent);
- if (pSfxDockingParent != NULL)
+ if (pSfxDockingParent != nullptr)
{
Size aTmpParentSize(pSfxDockingParent->GetSizePixel());
if (aTmpParentSize.Width() < aMinSize.Width()
@@ -817,7 +817,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
}
else
m_aContentTree->GrabFocus();
- UsePage(0);
+ UsePage(nullptr);
m_aPageChgIdle.SetIdleHdl(LINK(this, SwNavigationPI, ChangePageHdl));
m_aPageChgIdle.SetPriority(SchedulerPriority::LOWEST);
@@ -825,7 +825,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
m_aGlobalTree->SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL));
m_aDocListBox->SetAccessibleName(m_aStatusArr[3]);
- if (m_pContextWin == NULL)
+ if (m_pContextWin == nullptr)
{
// When the context window is missing then the navigator is
// displayed in the sidebar. While the navigator could change
@@ -897,22 +897,22 @@ IMPL_LINK_NOARG_TYPED(SwNavigationPI, PopupModeEndHdl, FloatingWindow*, void)
// floating window instance.
m_pFloatingWindow.disposeAndClear();
m_pFloatingWindow = m_pPopupWindow;
- m_pPopupWindow = 0;
+ m_pPopupWindow = nullptr;
}
else
{
// Popup window has been closed by the user. No replacement, instance
// will destroy itself.
- m_pPopupWindow = 0;
+ m_pPopupWindow = nullptr;
}
}
IMPL_LINK_TYPED( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow, void )
{
if ( pWindow == m_pFloatingWindow )
- m_pFloatingWindow = 0;
+ m_pFloatingWindow = nullptr;
else
- m_pPopupWindow = 0;
+ m_pPopupWindow = nullptr;
}
void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
@@ -939,7 +939,7 @@ void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
}
else
{
- m_aContentTree->SetActiveShell(0);
+ m_aContentTree->SetActiveShell(nullptr);
}
UpdateListBox();
}
@@ -959,7 +959,7 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint )
{
if(dynamic_cast<const SfxSimpleHint*>(&rHint) && static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING)
{
- m_pCreateView = 0;
+ m_pCreateView = nullptr;
}
}
else
@@ -1012,7 +1012,7 @@ void SwNavigationPI::UpdateListBox()
m_aDocListBox->SetUpdateMode(false);
m_aDocListBox->Clear();
SwView *pActView = GetCreateView();
- bool bDisable = pActView == 0;
+ bool bDisable = pActView == nullptr;
SwView *pView = SwModule::GetFirstView();
sal_Int32 nCount = 0;
sal_Int32 nAct = 0;
@@ -1020,7 +1020,7 @@ void SwNavigationPI::UpdateListBox()
const SwView* pConstView = m_aContentTree->IsConstantView() &&
m_aContentTree->GetActiveWrtShell() ?
&m_aContentTree->GetActiveWrtShell()->GetView():
- 0;
+ nullptr;
while (pView)
{
SfxObjectShell* pDoc = pView->GetDocShell();
@@ -1089,7 +1089,7 @@ IMPL_LINK_TYPED(SwNavigationPI, DoneLink, SfxPoolItem *, pItem, void)
if(m_pContentView)
m_pContentWrtShell = m_pContentView->GetWrtShellPtr();
else
- m_pContentWrtShell = 0;
+ m_pContentWrtShell = nullptr;
m_pxObjectShell = new SfxObjectShellLock(pFrame->GetObjectShell());
FillBox();
m_aContentTree->Update();
@@ -1171,7 +1171,7 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt )
m_sContentFileName = sFileName;
if(m_pxObjectShell)
{
- m_aContentTree->SetHiddenShell( 0 );
+ m_aContentTree->SetHiddenShell( nullptr );
(*m_pxObjectShell)->DoClose();
DELETEZ( m_pxObjectShell);
}
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index 90a8154c82fe..20885f23fcba 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -61,8 +61,8 @@ NumFormatListBox::NumFormatListBox(vcl::Window* pWin, WinBits nStyle) :
nStdEntry (0),
bOneArea (false),
nDefFormat (0),
- pVw (0),
- pOwnFormatter (0),
+ pVw (nullptr),
+ pOwnFormatter (nullptr),
bShowLanguageControl(false),
bUseAutomaticLanguage(true)
{
@@ -261,7 +261,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
if (!pOwnFormatter)
{
const sal_Int32 nPos = InsertEntry(SW_RESSTR( STR_DEFINE_NUMBERFORMAT ));
- SetEntryData( nPos, NULL );
+ SetEntryData( nPos, nullptr );
}
SelectEntryPos( nStdEntry );
@@ -311,7 +311,7 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefaultFormat)
// No entry found:
double fValue = GetDefValue(nType);
OUString sValue;
- Color* pCol = 0;
+ Color* pCol = nullptr;
if (nType == css::util::NumberFormat::TEXT)
{
diff --git a/sw/source/uibase/utlui/prcntfld.cxx b/sw/source/uibase/utlui/prcntfld.cxx
index 182e866bf3ef..1234f805753a 100644
--- a/sw/source/uibase/utlui/prcntfld.cxx
+++ b/sw/source/uibase/utlui/prcntfld.cxx
@@ -20,7 +20,7 @@
#include "prcntfld.hxx"
PercentField::PercentField()
- : m_pField(NULL)
+ : m_pField(nullptr)
, nRefValue(0)
, nOldMax(0)
, nOldMin(0)
diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx
index a676c00f273d..6cb0b5cdce78 100644
--- a/sw/source/uibase/utlui/tmplctrl.cxx
+++ b/sw/source/uibase/utlui/tmplctrl.cxx
@@ -97,7 +97,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
{
SwView* pView = ::GetActiveView();
SwWrtShell* pWrtShell;
- if( pView && 0 != (pWrtShell = pView->GetWrtShellPtr()) &&
+ if( pView && nullptr != (pWrtShell = pView->GetWrtShellPtr()) &&
!pWrtShell->SwCrsrShell::HasSelection()&&
!pWrtShell->IsSelFrmMode() &&
!pWrtShell->IsObjSelected())
diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx
index 16823c94e688..42fc1d2b6e34 100644
--- a/sw/source/uibase/utlui/uiitems.cxx
+++ b/sw/source/uibase/utlui/uiitems.cxx
@@ -261,7 +261,7 @@ bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
uno::Reference< lang::XUnoTunnel > xTunnel(xRulesRef, uno::UNO_QUERY);
SwXNumberingRules* pSwXRules = xTunnel.is() ? reinterpret_cast<SwXNumberingRules*>(
- xTunnel->getSomething(SwXNumberingRules::getUnoTunnelId())) : 0;
+ xTunnel->getSomething(SwXNumberingRules::getUnoTunnelId())) : nullptr;
if(pSwXRules)
{
*pRule = *pSwXRules->GetNumRule();
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index c2165ccc2674..34411a54b85c 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -309,7 +309,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Pick out everything and adapt the header format
SwFormatHeader aHeaderFormat(rMaster.GetHeader());
SwFrameFormat *pHeaderFormat = aHeaderFormat.GetHeaderFormat();
- OSL_ENSURE(pHeaderFormat != 0, "no header format");
+ OSL_ENSURE(pHeaderFormat != nullptr, "no header format");
::FillHdFt(pHeaderFormat, rHeaderSet);
@@ -349,7 +349,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Pick out everything and adapt the footer format
SwFormatFooter aFooterFormat(rMaster.GetFooter());
SwFrameFormat *pFooterFormat = aFooterFormat.GetFooterFormat();
- OSL_ENSURE(pFooterFormat != 0, "no footer format");
+ OSL_ENSURE(pFooterFormat != nullptr, "no footer format");
::FillHdFt(pFooterFormat, rFooterSet);
@@ -388,7 +388,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
bool bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
if(!bSet)
- rPageDesc.SetRegisterFormatColl(0);
+ rPageDesc.SetRegisterFormatColl(nullptr);
else if(SfxItemState::SET == rSet.GetItemState(
SID_SWREGISTER_COLLECTION, false, &pItem))
{
@@ -462,7 +462,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
{
const SwFormatHeader &rHeaderFormat = rMaster.GetHeader();
const SwFrameFormat *pHeaderFormat = rHeaderFormat.GetHeaderFormat();
- OSL_ENSURE(pHeaderFormat != 0, "no header format");
+ OSL_ENSURE(pHeaderFormat != nullptr, "no header format");
// HeaderInfo, margins, background, border
SfxItemSet aHeaderSet(*rSet.GetPool(),
@@ -513,7 +513,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
{
const SwFormatFooter &rFooterFormat = rMaster.GetFooter();
const SwFrameFormat *pFooterFormat = rFooterFormat.GetFooterFormat();
- OSL_ENSURE(pFooterFormat != 0, "no footer format");
+ OSL_ENSURE(pFooterFormat != nullptr, "no footer format");
// FooterInfo, margins, background, border
SfxItemSet aFooterSet(*rSet.GetPool(),
@@ -566,7 +566,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// Register compliant
const SwTextFormatColl* pCol = rPageDesc.GetRegisterFormatColl();
- SwRegisterItem aReg(pCol != 0);
+ SwRegisterItem aReg(pCol != nullptr);
aReg.SetWhich(SID_SWREGISTER_MODE);
rSet.Put(aReg);
if(pCol)
@@ -641,7 +641,7 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
// Inquire if in the set is a Sfx-PageDesc combination present and return it.
void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
OUString aName;
::boost::optional<sal_uInt16> oNumOffset;
bool bPut = true;
@@ -762,7 +762,7 @@ SwTwips GetTableWidth( SwFrameFormat* pFormat, SwTabCols& rCols, sal_uInt16 *pPe
{
if(pSh)
{
- if ( 0 == pSh->GetFlyFrameFormat() )
+ if ( nullptr == pSh->GetFlyFrameFormat() )
{
nWidth = pSh->GetAnyCurRect(RECT_PAGE_PRT).Width();
}
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index fce324cd2e13..e246665e4dc8 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -159,12 +159,12 @@ void SwOneExampleFrame::CreateControl()
void SwOneExampleFrame::DisposeControl()
{
- _xCursor = 0;
+ _xCursor = nullptr;
if(_xControl.is())
_xControl->dispose();
- _xControl = 0;
- _xModel = 0;
- _xController = 0;
+ _xControl = nullptr;
+ _xModel = nullptr;
+ _xController = nullptr;
}
static void disableScrollBars(uno::Reference< beans::XPropertySet > xViewProps,
diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx
index 8e4b24e04a62..7bbcc693f425 100644
--- a/sw/source/uibase/utlui/viewlayoutctrl.cxx
+++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx
@@ -106,7 +106,7 @@ void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState
}
if ( GetStatusBar().AreItemsVisible() )
- GetStatusBar().SetItemData( GetId(), 0 ); // force repaint
+ GetStatusBar().SetItemData( GetId(), nullptr ); // force repaint
}
void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index d6dd03a8eb69..dc3ee757940f 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -184,7 +184,7 @@ long SwWrtShell::DelLeft()
// changed the table cell, compare DelRight().
const SwStartNode * pSNdOld = pWasInTableNd ?
GetSwCrsr()->GetNode().FindTableBoxStartNode() :
- 0;
+ nullptr;
// If the cursor is at the beginning of a paragraph, try to step
// backwards. On failure we are done.
@@ -199,7 +199,7 @@ long SwWrtShell::DelLeft()
const SwStartNode* pSNdNew = pIsInTableNd ?
GetSwCrsr()->GetNode().FindTableBoxStartNode() :
- 0;
+ nullptr;
// #i4032# Don't actually call a 'delete' if we
// changed the table cell, compare DelRight().
@@ -234,7 +234,7 @@ long SwWrtShell::DelRight()
if(nSelection & nsSelectionType::SEL_TXT)
nSelection = nsSelectionType::SEL_TXT;
- const SwTableNode * pWasInTableNd = NULL;
+ const SwTableNode * pWasInTableNd = nullptr;
switch( nSelection & ~(nsSelectionType::SEL_BEZ) )
{
@@ -365,7 +365,7 @@ long SwWrtShell::DelRight()
if (GetView().GetDrawFuncPtr())
{
GetView().GetDrawFuncPtr()->Deactivate();
- GetView().SetDrawFuncPtr(NULL);
+ GetView().SetDrawFuncPtr(nullptr);
}
if ( GetView().IsDrawMode() )
{
diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx
index 271f75e0b29e..0ab3213a2f99 100644
--- a/sw/source/uibase/wrtsh/move.cxx
+++ b/sw/source/uibase/wrtsh/move.cxx
@@ -45,7 +45,7 @@ class ShellMoveCrsr
public:
inline ShellMoveCrsr( SwWrtShell* pWrtSh, bool bSel )
{
- bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(0,false) & FrmTypeFlags::FLY_ANY);
+ bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(nullptr,false) & FrmTypeFlags::FLY_ANY);
( pSh = pWrtSh )->MoveCrsr( bSel );
pWrtSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_HYPERLINK_GETLINK);
}
@@ -74,7 +74,7 @@ void SwWrtShell::MoveCrsr( bool bWithSelect )
else
{
EndSelect();
- (this->*m_fnKillSel)( 0, false );
+ (this->*m_fnKillSel)( nullptr, false );
}
}
@@ -237,7 +237,7 @@ bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable,
else
SttSelect();
}
- const FrmTypeFlags nFrmType = GetFrmType(0,false);
+ const FrmTypeFlags nFrmType = GetFrmType(nullptr,false);
if ( FrmTypeFlags::FLY_ANY & nFrmType )
{
if( MoveSection( fnSectionCurr, fnSectionStart ) )
@@ -270,7 +270,7 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable)
}
else
{
- const FrmTypeFlags nFrmType = GetFrmType(0,false);
+ const FrmTypeFlags nFrmType = GetFrmType(nullptr,false);
if ( FrmTypeFlags::FLY_ANY & nFrmType )
{
if ( MoveSection( fnSectionCurr, fnSectionEnd ) )
@@ -294,7 +294,7 @@ bool SwWrtShell::GoEnd(bool bKeepArea, bool *pMoveTable)
bool SwWrtShell::SttDoc( bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
- return GoStart(false, 0, bSelect );
+ return GoStart(false, nullptr, bSelect );
}
bool SwWrtShell::EndDoc( bool bSelect)
@@ -439,7 +439,7 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect)
LeaveSelFrmMode();
if ( bIsObjSel )
{
- GetView().SetDrawFuncPtr( NULL );
+ GetView().SetDrawFuncPtr( nullptr );
GetView().LeaveDrawCreate();
}
@@ -470,7 +470,7 @@ bool SwWrtShell::PushCrsr(SwTwips lOffset, bool bSelect)
bool SwWrtShell::PopCrsr(bool bUpdate, bool bSelect)
{
- if( 0 == m_pCrsrStack)
+ if( nullptr == m_pCrsrStack)
return false;
const bool bValidPos = m_pCrsrStack->bValidCurPos;
@@ -507,7 +507,7 @@ bool SwWrtShell::PopCrsr(bool bUpdate, bool bSelect)
CrsrStack *pTmp = m_pCrsrStack;
m_pCrsrStack = m_pCrsrStack->pNext;
delete pTmp;
- if( 0 == m_pCrsrStack )
+ if( nullptr == m_pCrsrStack )
{
m_ePageMove = MV_NO;
m_bDestOnStack = false;
diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx
index e7a3806b95e2..d617c02ed977 100644
--- a/sw/source/uibase/wrtsh/select.cxx
+++ b/sw/source/uibase/wrtsh/select.cxx
@@ -131,7 +131,7 @@ long SwWrtShell::SelAll()
bool bMoveTable = false;
std::unique_ptr<SwPosition> pStartPos;
std::unique_ptr<SwPosition> pEndPos;
- SwShellCrsr* pTmpCrsr = 0;
+ SwShellCrsr* pTmpCrsr = nullptr;
// Query these early, before we move the cursor.
bool bHasWholeTabSelection = HasWholeTabSelection();
@@ -237,7 +237,7 @@ sal_uLong SwWrtShell::SearchTempl( const OUString &rTempl,
if(!(eFlags & FND_IN_SEL))
ClearMark();
SwTextFormatColl *pColl = GetParaStyle(rTempl, SwWrtShell::GETSTYLE_CREATESOME);
- SwTextFormatColl *pReplaceColl = 0;
+ SwTextFormatColl *pReplaceColl = nullptr;
if( pReplTempl )
pReplaceColl = GetParaStyle(*pReplTempl, SwWrtShell::GETSTYLE_CREATESOME );
@@ -284,7 +284,7 @@ void SwWrtShell::PushMode()
void SwWrtShell::PopMode()
{
- if ( 0 == m_pModeStack )
+ if ( nullptr == m_pModeStack )
return;
if ( m_bExtMode && !m_pModeStack->bExt )
@@ -400,11 +400,11 @@ void SwWrtShell::EndSelect()
m_bInSelect = false;
if (m_bAddMode)
{
- AddLeaveSelect(0);
+ AddLeaveSelect(nullptr);
}
else
{
- SttLeaveSelect(0);
+ SttLeaveSelect(nullptr);
m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
m_fnKillSel = &SwWrtShell::ResetSelect;
}
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 922b06b7404d..5bab7f7ae218 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -115,9 +115,9 @@ using namespace com::sun::star;
m_fnSetCrsr(&SwWrtShell::SetCrsr),\
m_fnEndDrag(&SwWrtShell::DefaultEndDrag),\
m_fnKillSel(&SwWrtShell::Ignore),\
- m_pModeStack(0), \
+ m_pModeStack(nullptr), \
m_ePageMove(MV_NO),\
- m_pCrsrStack(0), \
+ m_pCrsrStack(nullptr), \
m_rView(rShell),\
m_aNavigationMgr(*this), \
m_bDestOnStack(false)
@@ -142,7 +142,7 @@ static SvxAutoCorrect* lcl_IsAutoCorr()
if( pACorr && !pACorr->IsAutoCorrFlag( CapitalStartSentence | CapitalStartWord |
AddNonBrkSpace | ChgOrdinalNumber |
ChgToEnEmDash | SetINetAttr | Autocorrect ))
- pACorr = 0;
+ pACorr = nullptr;
return pACorr;
}
@@ -408,8 +408,8 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
if ( xObj.GetViewAspect() == embed::Aspects::MSOLE_ICON )
{
- SwRect aArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() );
- aArea.Pos() += GetAnyCurRect( RECT_FLY_EMBEDDED, 0, xObj.GetObject() ).Pos();
+ SwRect aArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() );
+ aArea.Pos() += GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, xObj.GetObject() ).Pos();
MapMode aMapMode( MAP_TWIP );
Size aSize = xObj.GetSize( &aMapMode );
aArea.Width( aSize.Width() );
@@ -573,7 +573,7 @@ void SwWrtShell::LaunchOLEObj( long nVerb )
{
svt::EmbeddedObjectRef& xRef = GetOLEObject();
OSL_ENSURE( xRef.is(), "OLE not found" );
- SfxInPlaceClient* pCli=0;
+ SfxInPlaceClient* pCli=nullptr;
pCli = GetView().FindIPClient( xRef.GetObject(), &GetView().GetEditWin() );
if ( !pCli )
@@ -638,7 +638,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
{
// TODO/MBA: testing
SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
- : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() ));
+ : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() ));
if( !aRect.IsEmpty() )
{
// TODO/LEAN: getMapUnit can switch object to running state
@@ -759,7 +759,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
if ( pFlyPrtRect )
aObjArea = pFlyPrtRect->SSize();
else
- aObjArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() ).SSize();
+ aObjArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() ).SSize();
// differ the aObjArea and _aVisArea by 1 Pixel then set new VisArea
long nX, nY;
@@ -793,8 +793,8 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
}
else
{
- aArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() );
- aArea.Pos() += GetAnyCurRect( RECT_FLY_EMBEDDED, 0, xObj.GetObject() ).Pos();
+ aArea = GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() );
+ aArea.Pos() += GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, xObj.GetObject() ).Pos();
}
if ( bUseObjectSize )
@@ -806,7 +806,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
{
const Point &rPoint = pFlyFrameFormat->GetLastFlyFrmPrtRectPos();
SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
- : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() ));
+ : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, xObj.GetObject() ));
aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct.
}
aArea.Width ( _aVisArea.Width() );
@@ -851,7 +851,7 @@ void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::boost::optio
}
const SwPageDesc *pDesc = pPageDesc
- ? FindPageDescByName( *pPageDesc, true ) : 0;
+ ? FindPageDescByName( *pPageDesc, true ) : nullptr;
if( pDesc )
{
SwFormatPageDesc aDesc( pDesc );
@@ -1010,7 +1010,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
mpDoc->FindNumRulePtr(pColl->GetNumRule( false ).GetValue());
if ( !pDirectCollRule )
{
- pCollRule = 0;
+ pCollRule = nullptr;
}
}
@@ -1109,12 +1109,12 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
{
if ( !pNumRule->IsAutoRule() )
{
- pNumRule = 0;
+ pNumRule = nullptr;
}
else if ( pNumRule == GetDoc()->GetOutlineNumRule() &&
!bActivateOutlineRule && !bContinueFoundNumRule )
{
- pNumRule = 0;
+ pNumRule = nullptr;
}
}
@@ -1125,7 +1125,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
pNumRule = GetDoc()->SearchNumRule( *GetCrsr()->GetPoint(),
false, bNum, false, 0,
sContinuedListId );
- bContinueFoundNumRule = pNumRule != 0;
+ bContinueFoundNumRule = pNumRule != nullptr;
}
if (pNumRule)
@@ -1188,7 +1188,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
// Only apply user defined default bullet font
const vcl::Font* pFnt = numfunc::IsDefBulletFontUserDefined()
? &numfunc::GetDefBulletFont()
- : 0;
+ : nullptr;
if (bNum)
{
@@ -1488,7 +1488,7 @@ SwFrameFormat *SwWrtShell::GetTableStyle(const OUString &rFormatName)
pFormat->GetName() == rFormatName && IsUsed( *pFormat ) )
return pFormat;
}
- return 0;
+ return nullptr;
}
void SwWrtShell::addCurrentPosition() {
@@ -1635,8 +1635,8 @@ SwWrtShell::SwWrtShell( SwWrtShell& rSh, vcl::Window *_pWin, SwView &rShell )
SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );
// place the cursor on the first field...
- IFieldmark *pBM = NULL;
- if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=NULL ) {
+ IFieldmark *pBM = nullptr;
+ if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=nullptr ) {
GotoFieldmark(pBM);
}
}
@@ -1652,8 +1652,8 @@ SwWrtShell::SwWrtShell( SwDoc& rDoc, vcl::Window *_pWin, SwView &rShell,
SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );
// place the cursor on the first field...
- IFieldmark *pBM = NULL;
- if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=NULL ) {
+ IFieldmark *pBM = nullptr;
+ if ( IsFormProtected() && ( pBM = GetFieldmarkAfter( ) ) !=nullptr ) {
GotoFieldmark(pBM);
}
}
@@ -1736,7 +1736,7 @@ OUString SwWrtShell::GetSelDescr() const
}
break;
default:
- if (0 != mpDoc)
+ if (nullptr != mpDoc)
aResult = GetCrsrDescr();
}
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 42fc249e9888..bb5242b99e0b 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -119,7 +119,7 @@ void SwWrtShell::Insert(SwField &rField)
if ( pAnnotationTextRange )
{
- if ( GetDoc() != NULL )
+ if ( GetDoc() != nullptr )
{
IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess();
pMarksAccess->makeAnnotationMark( *pAnnotationTextRange, OUString() );
@@ -154,7 +154,7 @@ void SwWrtShell::UpdateInputFields( SwInputFieldList* pLst )
if(pField->GetTyp()->Which() == RES_DROPDOWN)
bCancel = StartDropDownFieldDlg( pField, true, &aDlgPos );
else
- bCancel = StartInputFieldDlg( pField, true, 0, &aDlgPos);
+ bCancel = StartInputFieldDlg( pField, true, nullptr, &aDlgPos);
if (!bCancel)
{
@@ -179,7 +179,7 @@ class FieldDeletionModify : public SwModify
public:
FieldDeletionModify(AbstractFieldInputDlg* pInputFieldDlg, SwField* pField)
: mpInputFieldDlg(pInputFieldDlg)
- , mpFormatField(NULL)
+ , mpFormatField(nullptr)
{
SwInputField *const pInputField(dynamic_cast<SwInputField*>(pField));
SwSetExpField *const pSetExpField(dynamic_cast<SwSetExpField*>(pField));
@@ -216,7 +216,7 @@ class FieldDeletionModify : public SwModify
{
case RES_REMOVE_UNO_OBJECT:
case RES_OBJECTDYING:
- mpFormatField = NULL;
+ mpFormatField = nullptr;
mpInputFieldDlg->EndDialog(RET_CANCEL);
break;
}
@@ -259,7 +259,7 @@ bool SwWrtShell::StartDropDownFieldDlg(SwField* pField, bool bNextButton, OStrin
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<AbstractDropDownFieldDialog> pDlg(pFact->CreateDropDownFieldDialog(NULL, *this, pField, bNextButton));
+ std::unique_ptr<AbstractDropDownFieldDialog> pDlg(pFact->CreateDropDownFieldDialog(nullptr, *this, pField, bNextButton));
OSL_ENSURE(pDlg, "Dialog creation failed!");
if(pWindowState && !pWindowState->isEmpty())
pDlg->SetWindowState(*pWindowState);
@@ -299,7 +299,7 @@ bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
{
bResult = SwEditShell::UpdateTableOf(rTOX, pSet);
- if (pSet == NULL)
+ if (pSet == nullptr)
{
SwDoc *const pDoc_ = GetDoc();
if (pDoc_)
@@ -388,7 +388,7 @@ void SwWrtShell::ClickToField( const SwField& rField )
case RES_INPUTFLD:
{
const SwInputField* pInputField = dynamic_cast<const SwInputField*>(&rField);
- if ( pInputField == NULL )
+ if ( pInputField == nullptr )
{
StartInputFieldDlg( const_cast<SwField*>(&rField), false );
}
@@ -516,7 +516,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter,
&aReferer,
&aView, &aTargetFrameName,
&aBrowse,
- 0L
+ nullptr
};
pViewFrm->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr, 0,
@@ -573,7 +573,7 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
// any undoobject. - BUG 69145
bool bDoesUndo = DoesUndo();
SwUndoId nLastUndoId(UNDO_EMPTY);
- if (GetLastUndoInfo(0, & nLastUndoId))
+ if (GetLastUndoInfo(nullptr, & nLastUndoId))
{
if (UNDO_INSSECTION != nLastUndoId)
{
diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx
index b7e615dc3677..12665242cbc1 100644
--- a/sw/source/uibase/wrtsh/wrtsh3.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh3.cxx
@@ -43,7 +43,7 @@ extern bool g_bNoInterrupt; // in swmodule.cxx
bool SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark)
{
addCurrentPosition();
- (this->*m_fnKillSel)( 0, false );
+ (this->*m_fnKillSel)( nullptr, false );
bool bRet = true;
switch(eFuncId)
@@ -69,7 +69,7 @@ bool SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* co
bool SwWrtShell::GotoField( const SwFormatField& rField )
{
- (this->*m_fnKillSel)( 0, false );
+ (this->*m_fnKillSel)( nullptr, false );
bool bRet = SwCrsrShell::GotoFormatField( rField );
if( bRet && IsSelFrmMode() )
@@ -89,7 +89,7 @@ bool SwWrtShell::GotoField( const SwFormatField& rField )
bool SwWrtShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark)
{
- (this->*m_fnKillSel)( 0, false );
+ (this->*m_fnKillSel)( nullptr, false );
bool bRet = SwCrsrShell::GotoFieldmark(pMark);
if( bRet && IsSelFrmMode() )
{
diff --git a/sw/source/uibase/wrtsh/wrtundo.cxx b/sw/source/uibase/wrtsh/wrtundo.cxx
index 6071417b681d..1756fdd53b22 100644
--- a/sw/source/uibase/wrtsh/wrtundo.cxx
+++ b/sw/source/uibase/wrtsh/wrtundo.cxx
@@ -102,7 +102,7 @@ OUString SwWrtShell::GetDoString( DoType eDoType ) const
{
case UNDO:
nResStr = STR_UNDO;
- (void)GetLastUndoInfo(&aUndoStr, 0);
+ (void)GetLastUndoInfo(&aUndoStr, nullptr);
break;
case REDO:
nResStr = STR_REDO;