summaryrefslogtreecommitdiff
path: root/sw/source/ui
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/ui
parent6cd7bf2043146a630925a2e49336f02c802f707a (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/chrdlg/break.cxx2
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx24
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx6
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx8
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx6
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx12
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx2
-rw-r--r--sw/source/ui/config/optcomp.cxx6
-rw-r--r--sw/source/ui/config/optload.cxx6
-rw-r--r--sw/source/ui/config/optpage.cxx38
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx18
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx8
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx38
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx26
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx6
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx14
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx20
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx4
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx4
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx4
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx2
-rw-r--r--sw/source/ui/dialog/swdialmgr.cxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx26
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx12
-rw-r--r--sw/source/ui/dialog/swuiexp.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx48
-rw-r--r--sw/source/ui/dialog/wordcountdialog.cxx4
-rw-r--r--sw/source/ui/envelp/envfmt.cxx2
-rw-r--r--sw/source/ui/envelp/envfmt.hxx2
-rw-r--r--sw/source/ui/envelp/envlop1.cxx12
-rw-r--r--sw/source/ui/envelp/envprt.cxx2
-rw-r--r--sw/source/ui/envelp/envprt.hxx2
-rw-r--r--sw/source/ui/envelp/label1.cxx28
-rw-r--r--sw/source/ui/envelp/labelexp.cxx2
-rw-r--r--sw/source/ui/envelp/labfmt.cxx4
-rw-r--r--sw/source/ui/envelp/labfmt.hxx2
-rw-r--r--sw/source/ui/envelp/labprt.cxx2
-rw-r--r--sw/source/ui/envelp/labprt.hxx2
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx2
-rw-r--r--sw/source/ui/envelp/swuilabimp.hxx8
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx2
-rw-r--r--sw/source/ui/fldui/changedb.cxx10
-rw-r--r--sw/source/ui/fldui/flddb.cxx6
-rw-r--r--sw/source/ui/fldui/flddinf.cxx12
-rw-r--r--sw/source/ui/fldui/fldedt.cxx20
-rw-r--r--sw/source/ui/fldui/fldpage.cxx12
-rw-r--r--sw/source/ui/fldui/fldpage.hxx8
-rw-r--r--sw/source/ui/fldui/fldref.cxx8
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx18
-rw-r--r--sw/source/ui/fldui/fldvar.cxx12
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx8
-rw-r--r--sw/source/ui/fldui/javaedit.cxx10
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx46
-rw-r--r--sw/source/ui/frmdlg/cption.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx18
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx68
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx24
-rw-r--r--sw/source/ui/index/cnttab.cxx92
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx30
-rw-r--r--sw/source/ui/misc/docfnote.cxx20
-rw-r--r--sw/source/ui/misc/glossary.cxx12
-rw-r--r--sw/source/ui/misc/insfnote.cxx8
-rw-r--r--sw/source/ui/misc/linenum.cxx2
-rw-r--r--sw/source/ui/misc/num.cxx16
-rw-r--r--sw/source/ui/misc/outline.cxx20
-rw-r--r--sw/source/ui/misc/pgfnote.cxx4
-rw-r--r--sw/source/ui/misc/pggrid.cxx2
-rw-r--r--sw/source/ui/misc/srtdlg.cxx12
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx2
-rw-r--r--sw/source/ui/misc/titlepage.cxx10
-rw-r--r--sw/source/ui/table/convert.cxx2
-rw-r--r--sw/source/ui/table/instable.cxx4
-rw-r--r--sw/source/ui/table/tabledlg.cxx38
-rw-r--r--sw/source/ui/table/tautofmt.cxx2
-rw-r--r--sw/source/ui/vba/vbadialog.cxx2
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx2
-rw-r--r--sw/source/ui/vba/vbafield.cxx28
-rw-r--r--sw/source/ui/vba/vbastyles.cxx8
-rw-r--r--sw/source/ui/vba/wordvbahelper.cxx6
81 files changed, 514 insertions, 514 deletions
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index bdadb73b990f..e994fc267774 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -197,7 +197,7 @@ void SwBreakDlg::CheckEnable()
m_pPageCollBox->Enable(false);
bEnable = false;
}
- else if(rSh.GetFrmType(0,true)
+ else if(rSh.GetFrmType(nullptr,true)
& (FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER | FrmTypeFlags::FOOTNOTE))
{
m_pPageBtn->Enable(false);
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 81be5088c0f0..1a6209e15b9e 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -61,8 +61,8 @@ using namespace ::sfx2;
SwCharDlg::SwCharDlg(vcl::Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
sal_uInt8 nDialogMode, const OUString* pStr)
- : SfxTabDialog(0, pParent, "CharacterPropertiesDialog",
- "modules/swriter/ui/characterproperties.ui", &rCoreSet, pStr != 0)
+ : SfxTabDialog(nullptr, pParent, "CharacterPropertiesDialog",
+ "modules/swriter/ui/characterproperties.ui", &rCoreSet, pStr != nullptr)
, m_rView(rVw)
, m_nDialogMode(nDialogMode)
{
@@ -72,13 +72,13 @@ SwCharDlg::SwCharDlg(vcl::Window* pParent, SwView& rVw, const SfxItemSet& rCoreS
}
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- m_nCharStdId = AddTabPage("font", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), 0);
- m_nCharExtId = AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), 0);
- m_nCharPosId = AddTabPage("position", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), 0 );
- m_nCharTwoId = AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), 0 );
- m_nCharUrlId = AddTabPage("hyperlink", SwCharURLPage::Create, 0);
- m_nCharBgdId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
- m_nCharBrdId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), 0 );
+ m_nCharStdId = AddTabPage("font", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), nullptr);
+ m_nCharExtId = AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), nullptr);
+ m_nCharPosId = AddTabPage("position", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), nullptr );
+ m_nCharTwoId = AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), nullptr );
+ m_nCharUrlId = AddTabPage("hyperlink", SwCharURLPage::Create, nullptr);
+ m_nCharBgdId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr );
+ m_nCharBrdId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), nullptr );
SvtCJKOptions aCJKOptions;
if(m_nDialogMode == DLG_CHAR_DRAW || m_nDialogMode == DLG_CHAR_ANN)
@@ -135,7 +135,7 @@ void SwCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
SwCharURLPage::SwCharURLPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
: SfxTabPage(pParent, "CharURLPage", "modules/swriter/ui/charurlpage.ui", &rCoreSet)
- , pINetItem(0)
+ , pINetItem(nullptr)
, bModified(false)
{
@@ -153,8 +153,8 @@ SwCharURLPage::SwCharURLPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
const SfxPoolItem* pItem;
SfxObjectShell* pShell;
if(SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem) ||
- ( 0 != ( pShell = SfxObjectShell::Current()) &&
- 0 != (pItem = pShell->GetItem(SID_HTML_MODE))))
+ ( nullptr != ( pShell = SfxObjectShell::Current()) &&
+ nullptr != (pItem = pShell->GetItem(SID_HTML_MODE))))
{
sal_uInt16 nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
if(HTMLMODE_ON & nHtmlMode)
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index f6c75f66bd36..ea8de1164edc 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -105,13 +105,13 @@ public:
SwDropCapsPict(vcl::Window *pParent, WinBits nBits)
: Control(pParent, nBits)
- , mpPage(NULL)
+ , mpPage(nullptr)
, mnLines(0)
, mnTotLineH(0)
, mnLineH(0)
, mnTextH(0)
, mnDistance(0)
- , mpPrinter(NULL)
+ , mpPrinter(nullptr)
, mbDelPrinter(false)
{}
@@ -800,7 +800,7 @@ void SwDropCapsPage::FillSet( SfxItemSet &rSet )
// set attributes
const SfxPoolItem* pOldItem;
- if (0 == (pOldItem = GetOldItem(rSet, FN_FORMAT_DROPCAPS)) || aFormat != *pOldItem)
+ if (nullptr == (pOldItem = GetOldItem(rSet, FN_FORMAT_DROPCAPS)) || aFormat != *pOldItem)
rSet.Put(aFormat);
// hard text formatting
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 287dfde6c67d..e7786598734d 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -80,8 +80,8 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(vcl::Window* pParent, const SfxItem
const SfxPoolItem* pItem;
SfxObjectShell* pObjSh;
if(SfxItemState::SET == rAttr.GetItemState(SID_HTML_MODE, false, &pItem) ||
- ( 0 != ( pObjSh = SfxObjectShell::Current()) &&
- 0 != (pItem = pObjSh->GetItem(SID_HTML_MODE))))
+ ( nullptr != ( pObjSh = SfxObjectShell::Current()) &&
+ nullptr != (pItem = pObjSh->GetItem(SID_HTML_MODE))))
{
const sal_uInt16 nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
@@ -150,7 +150,7 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet )
if(m_pNumberStyleLB->GetSelectEntryPos())
aStyle = m_pNumberStyleLB->GetSelectEntry();
const SfxStringItem* pOldRule = static_cast<const SfxStringItem*>(GetOldItem( *rSet, SID_ATTR_PARA_NUMRULE));
- SfxStringItem* pRule = pOldRule ? static_cast<SfxStringItem*>(pOldRule->Clone()) : NULL;
+ SfxStringItem* pRule = pOldRule ? static_cast<SfxStringItem*>(pOldRule->Clone()) : nullptr;
if (pRule)
{
pRule->SetValue(aStyle);
@@ -364,7 +364,7 @@ bool SwParagraphNumTabPage::ExecuteEditNumStyle_Impl(
if( !rRefStr.isEmpty() )
pItems[ nCount++ ] = &aRefName;
- pItems[ nCount++ ] = 0;
+ pItems[ nCount++ ] = nullptr;
sal_uInt16 nModi = pModifier ? *pModifier : 0;
const SfxPoolItem* mpItem = rDispatcher.Execute(
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 6d9738f7a8b6..d3b72a0222aa 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -54,7 +54,7 @@ SwParaDlg::SwParaDlg(vcl::Window *pParent,
: SfxTabDialog(pParent,
"ParagraphPropertiesDialog",
"modules/swriter/ui/paradialog.ui",
- &rCoreSet, 0 != pTitle)
+ &rCoreSet, nullptr != pTitle)
, rView(rVw)
, nDlgMode(nDialogMode)
, bDrawParaDlg(bDraw)
@@ -208,7 +208,7 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
else if( m_nParaExt == nId )
{
// pagebreak only when the cursor is in the body-area and not in a table
- const FrmTypeFlags eType = rSh.GetFrmType(0,true);
+ const FrmTypeFlags eType = rSh.GetFrmType(nullptr,true);
if( !(FrmTypeFlags::BODY & eType) ||
rSh.GetSelectionType() & nsSelectionType::SEL_TBL )
{
@@ -226,7 +226,7 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
nHtmlMode & HTMLMODE_SOME_STYLES)
{
// pagebreak only when the cursor is in the body-area and not in a table
- const FrmTypeFlags eType = rSh.GetFrmType(0,true);
+ const FrmTypeFlags eType = rSh.GetFrmType(nullptr,true);
if(!(FrmTypeFlags::BODY & eType) ||
rSh.GetSelectionType() & nsSelectionType::SEL_TBL)
{
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 533f2fce92b3..8e74408a5972 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -56,7 +56,7 @@ SwCondCollPage::SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet)
,
m_rSh(::GetActiveView()->GetWrtShell()),
m_pCmds( SwCondCollItem::GetCmds() ),
- m_pFormat(0),
+ m_pFormat(nullptr),
m_bNewTemplate(false)
{
@@ -97,7 +97,7 @@ SwCondCollPage::SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet)
m_pTbLinks->SetSpaceBetweenEntries( 0 );
SfxStyleFamilies aFamilies(SW_RES(DLG_STYLE_DESIGNER));
- const SfxStyleFamilyItem* pFamilyItem = 0;
+ const SfxStyleFamilyItem* pFamilyItem = nullptr;
size_t nCount = aFamilies.size();
for( size_t i = 0; i < nCount; ++i )
@@ -197,10 +197,10 @@ void SwCondCollPage::Reset(const SfxItemSet *)
{
OUString aEntry( m_aStrArr[n] + "\t" );
- const SwCollCondition* pCond = 0;
+ const SwCollCondition* pCond = nullptr;
if( m_pFormat && RES_CONDTXTFMTCOLL == m_pFormat->Which() &&
- 0 != ( pCond = static_cast<SwConditionTextFormatColl*>(m_pFormat)->
- HasCondition( SwCollCondition( 0, m_pCmds[n].nCnd, m_pCmds[n].nSubCond ) ) )
+ nullptr != ( pCond = static_cast<SwConditionTextFormatColl*>(m_pFormat)->
+ HasCondition( SwCollCondition( nullptr, m_pCmds[n].nCnd, m_pCmds[n].nSubCond ) ) )
&& pCond->GetTextFormatColl() )
{
aEntry += pCond->GetTextFormatColl()->GetName();
@@ -225,7 +225,7 @@ IMPL_LINK_TYPED( SwCondCollPage, OnOffHdl, Button*, pBox, void )
m_pRemovePB->Enable( bEnable );
m_pAssignPB->Enable( bEnable );
if( bEnable )
- SelectHdl(0);
+ SelectHdl(nullptr);
}
IMPL_LINK_TYPED( SwCondCollPage, AssignRemoveClickHdl, Button*, pBtn, void)
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index a0edd7784b21..620bc6e5059e 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -496,7 +496,7 @@ IMPL_LINK_TYPED( SwAuthenticationSettingsDialog, CheckBoxHdl_Impl, Button*, pBox
bool bChecked = static_cast<CheckBox*>(pBox)->IsChecked();
m_pSeparateAuthenticationRB->Enable(bChecked);
m_pSMTPAfterPOPRB->Enable(bChecked);
- RadioButtonHdl_Impl( 0 );
+ RadioButtonHdl_Impl( nullptr );
}
IMPL_LINK_NOARG_TYPED(SwAuthenticationSettingsDialog, RadioButtonHdl_Impl, Button*, void)
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 4cf969f803f3..d0452ab76430 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -94,7 +94,7 @@ struct SwCompatibilityOptPage_Impl
SwCompatibilityOptPage::SwCompatibilityOptPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "OptCompatPage",
"modules/swriter/ui/optcompatpage.ui", &rSet)
- , m_pWrtShell(NULL)
+ , m_pWrtShell(nullptr)
, m_pImpl(new SwCompatibilityOptPage_Impl)
, m_nSavedOptions(0)
{
@@ -199,8 +199,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
{
// init objectshell and detect document name
OUString sDocTitle;
- const SfxPoolItem* pItem = NULL;
- SfxObjectShell* pObjShell = NULL;
+ const SfxPoolItem* pItem = nullptr;
+ SfxObjectShell* pObjShell = nullptr;
if ( SfxItemState::SET == rSet.GetItemState( FN_PARAM_WRTSHELL, false, &pItem ) )
m_pWrtShell = static_cast<SwWrtShell*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
if ( m_pWrtShell )
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 784206bcfa82..5637b5b3f3ef 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -64,7 +64,7 @@ using namespace ::com::sun::star;
SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "OptGeneralPage", "modules/swriter/ui/optgeneralpage.ui", &rSet)
- , m_pWrtShell(NULL)
+ , m_pWrtShell(nullptr)
, m_nLastTab(0)
, m_nOldLinkMode(MANUAL)
{
@@ -672,7 +672,7 @@ void SwCaptionOptPage::DelUserData()
while (pEntry)
{
delete static_cast<InsCaptionOpt*>(pEntry->GetUserData());
- pEntry->SetUserData(0);
+ pEntry->SetUserData(nullptr);
pEntry = m_pCheckLB->Next(pEntry);
}
}
@@ -827,7 +827,7 @@ IMPL_LINK_NOARG_TYPED(SwCaptionOptPage, ModifyHdl, Edit&, void)
const OUString sFieldTypeName = m_pCategoryBox->GetText();
SfxSingleTabDialog *pDlg = dynamic_cast<SfxSingleTabDialog*>(GetParentDialog());
- PushButton *pBtn = pDlg ? pDlg->GetOKButton() : NULL;
+ PushButton *pBtn = pDlg ? pDlg->GetOKButton() : nullptr;
if (pBtn)
pBtn->Enable(!sFieldTypeName.isEmpty());
bool bEnable = m_pCategoryBox->IsEnabled() && sFieldTypeName != m_sNone;
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 5d5d7bf14be3..5ba760542653 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -213,7 +213,7 @@ static void lcl_SelectMetricLB(ListBox* rMetric, sal_uInt16 nSID, const SfxItemS
void SwContentOptPage::Reset(const SfxItemSet* rSet)
{
- const SwElemItem* pElemAttr = 0;
+ const SwElemItem* pElemAttr = nullptr;
rSet->GetItemState( FN_PARAM_ELEM , false,
reinterpret_cast<const SfxPoolItem**>(&pElemAttr) );
@@ -255,7 +255,7 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet)
bool bRet = !pOldAttr || aElem != *pOldAttr;
if(bRet)
- bRet = 0 != rSet->Put(aElem);
+ bRet = nullptr != rSet->Put(aElem);
sal_Int32 nMPos = m_pMetricLB->GetSelectEntryPos();
sal_Int32 nGlobalMetricPos = nMPos;
@@ -447,7 +447,7 @@ bool SwAddPrinterTabPage::FillItemSet( SfxItemSet* rCoreSet )
void SwAddPrinterTabPage::Reset( const SfxItemSet* )
{
const SfxItemSet& rSet = GetItemSet();
- const SwAddPrinterItem* pAddPrinterAttr = 0;
+ const SwAddPrinterItem* pAddPrinterAttr = nullptr;
if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , false,
reinterpret_cast<const SfxPoolItem**>(&pAddPrinterAttr) ))
@@ -536,10 +536,10 @@ void SwAddPrinterTabPage::PageCreated( const SfxAllItemSet& aSet)
SwStdFontTabPage::SwStdFontTabPage( vcl::Window* pParent,
const SfxItemSet& rSet ) :
SfxTabPage( pParent, "OptFontTabPage" , "modules/swriter/ui/optfonttabpage.ui" , &rSet),
- m_pPrt(0),
- m_pFontList(0),
- m_pFontConfig(0),
- m_pWrtShell(0),
+ m_pPrt(nullptr),
+ m_pFontList(nullptr),
+ m_pFontConfig(nullptr),
+ m_pWrtShell(nullptr),
m_eLanguage( GetAppLanguage() ),
m_bListDefault(false),
@@ -1061,7 +1061,7 @@ IMPL_LINK_TYPED( SwStdFontTabPage, ModifyHeightHdl, Edit&, rBox, void )
IMPL_LINK_TYPED( SwStdFontTabPage, LoseFocusHdl, Control&, rControl, void )
{
ComboBox* pBox = static_cast<ComboBox*>(&rControl);
- FontSizeBox* pHeightLB = 0;
+ FontSizeBox* pHeightLB = nullptr;
const OUString sEntry = pBox->GetText();
if(pBox == m_pStandardBox)
{
@@ -1096,7 +1096,7 @@ void SwStdFontTabPage::PageCreated( const SfxAllItemSet& aSet)
SwTableOptionsTabPage::SwTableOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage(pParent, "OptTablePage", "modules/swriter/ui/opttablepage.ui", &rSet),
- pWrtShell(0),
+ pWrtShell(nullptr),
bHTMLMode(false)
{
get(pHeaderCB,"header");
@@ -1294,7 +1294,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet)
pNumFormatFormattingCB->SaveValue();
pNumAlignmentCB->SaveValue();
- CheckBoxHdl(0);
+ CheckBoxHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SwTableOptionsTabPage, CheckBoxHdl, Button*, void)
@@ -1315,7 +1315,7 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( vcl::Window* pParent,
const SfxItemSet& rSet )
: SfxTabPage(pParent, "OptFormatAidsPage",
"modules/swriter/ui/optformataidspage.ui", &rSet),
- m_pWrtShell( NULL )
+ m_pWrtShell( nullptr )
{
get(m_pParaCB, "paragraph");
get(m_pSHyphCB, "hyphens");
@@ -1341,7 +1341,7 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( vcl::Window* pParent,
get(m_pMathBaselineAlignmentCB, "mathbaseline");
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SwShadowCursorItem aOpt;
if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ))
@@ -1433,7 +1433,7 @@ bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet* rSet )
aOpt.SetMode( eMode );
bool bRet = false;
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( SfxItemState::SET != rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )
|| static_cast<const SwShadowCursorItem&>(*pItem) != aOpt )
{
@@ -1478,14 +1478,14 @@ bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet* rSet )
bRet |= (!pOldAttr || aDisp != *pOldAttr);
if(bRet)
- bRet = 0 != rSet->Put(aDisp);
+ bRet = nullptr != rSet->Put(aDisp);
return bRet;
}
void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SwShadowCursorItem aOpt;
if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ))
@@ -1513,7 +1513,7 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet )
m_pIgnoreProtCB->Check(static_cast<const SfxBoolItem*>(pItem)->GetValue());
m_pIgnoreProtCB->SaveValue();
- const SwDocDisplayItem* pDocDisplayAttr = 0;
+ const SwDocDisplayItem* pDocDisplayAttr = nullptr;
rSet->GetItemState( FN_PARAM_DOCDISP, false,
reinterpret_cast<const SfxPoolItem**>(&pDocDisplayAttr) );
@@ -2075,7 +2075,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet* )
IMPL_LINK_TYPED( SwRedlineOptionsTabPage, AttribHdl, ListBox&, rLB, void )
{
- SvxFontPrevWindow *pPrev = 0;
+ SvxFontPrevWindow *pPrev = nullptr;
ColorListBox *pColorLB;
if (&rLB == pInsertLB)
@@ -2181,7 +2181,7 @@ IMPL_LINK_TYPED( SwRedlineOptionsTabPage, AttribHdl, ListBox&, rLB, void )
IMPL_LINK_TYPED( SwRedlineOptionsTabPage, ColorHdl, ListBox&, rListBox, void )
{
ColorListBox* pColorLB = static_cast<ColorListBox*>(&rListBox);
- SvxFontPrevWindow *pPrev = 0;
+ SvxFontPrevWindow *pPrev = nullptr;
ListBox* pLB;
if (pColorLB == pInsertColorLB)
@@ -2513,7 +2513,7 @@ bool SwTestTabPage::FillItemSet( SfxItemSet* rCoreSet )
void SwTestTabPage::Reset( const SfxItemSet* )
{
const SfxItemSet& rSet = GetItemSet();
- const SwTestItem* pTestAttr = 0;
+ const SwTestItem* pTestAttr = nullptr;
if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SWTEST , false,
reinterpret_cast<const SfxPoolItem**>(&pTestAttr) ))
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index cd44b5614d03..4a878f2dae79 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -168,7 +168,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
,
- m_pCreatedDataSource(0),
+ m_pCreatedDataSource(nullptr),
m_bInSelectHdl(false),
m_pAddressPage(pParent)
{
@@ -259,7 +259,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
m_pOK->Enable(m_pListLB->GetEntryCount()>0 && bEnableOK);
m_pEditPB->Enable(bEnableEdit);
m_pListLB->SetSelectHdl(LINK(this, SwAddressListDialog, ListBoxSelectHdl_Impl));
- TableSelectHdl_Impl(NULL);
+ TableSelectHdl_Impl(nullptr);
}
SwAddressListDialog::~SwAddressListDialog()
@@ -328,7 +328,7 @@ IMPL_LINK_NOARG_TYPED(SwAddressListDialog, FilterHdl_Impl, Button*, void)
if ( RET_OK == xDialog->execute() )
{
- WaitObject aWO( NULL );
+ WaitObject aWO( nullptr );
pUserData->sFilter = xComposer->getFilter();
}
::comphelper::disposeComponent(xRowSet);
@@ -345,7 +345,7 @@ IMPL_LINK_NOARG_TYPED(SwAddressListDialog, LoadHdl_Impl, Button*, void)
{
SwView* pView = m_pAddressPage->GetWizard()->GetSwView();
- const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(pView ? pView->GetDocShell() : 0);
+ const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(pView ? pView->GetDocShell() : nullptr);
if(!sNewSource.isEmpty())
{
SvTreeListEntry* pNewSource = m_pListLB->InsertEntry(sNewSource);
@@ -439,7 +439,7 @@ IMPL_LINK_TYPED(SwAddressListDialog, CreateHdl_Impl, Button*, pButton, void)
IMPL_LINK_TYPED(SwAddressListDialog, EditHdl_Impl, Button*, pButton, void)
{
SvTreeListEntry* pEntry = m_pListLB->FirstSelected();
- AddressUserData_Impl* pUserData = pEntry ? static_cast<AddressUserData_Impl*>(pEntry->GetUserData()) : 0;
+ AddressUserData_Impl* pUserData = pEntry ? static_cast<AddressUserData_Impl*>(pEntry->GetUserData()) : nullptr;
if(pUserData && !pUserData->sURL.isEmpty())
{
if(pUserData->xResultSet.is())
@@ -447,7 +447,7 @@ IMPL_LINK_TYPED(SwAddressListDialog, EditHdl_Impl, Button*, pButton, void)
SwMailMergeConfigItem& rConfigItem = m_pAddressPage->GetWizard()->GetConfigItem();
if(rConfigItem.GetResultSet() != pUserData->xResultSet)
::comphelper::disposeComponent( pUserData->xResultSet );
- pUserData->xResultSet = 0;
+ pUserData->xResultSet = nullptr;
rConfigItem.DisposeResultSet();
}
@@ -482,7 +482,7 @@ IMPL_LINK_TYPED(SwAddressListDialog, StaticListBoxSelectHdl_Impl, void*, p, void
return;
EnterWait();
m_bInSelectHdl = true;
- AddressUserData_Impl* pUserData = 0;
+ AddressUserData_Impl* pUserData = nullptr;
if(pSelect)
{
const OUString sTable(SvTabListBox::GetEntryText(pSelect, ITEMID_TABLE - 1));
@@ -547,7 +547,7 @@ void SwAddressListDialog::DetectTablesAndQueries(
pUserData->xSource.set(xComplConnection, UNO_QUERY);
uno::Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- uno::Reference< XInteractionHandler > xHandler( InteractionHandler::createWithParent(xContext, 0), UNO_QUERY );
+ uno::Reference< XInteractionHandler > xHandler( InteractionHandler::createWithParent(xContext, nullptr), UNO_QUERY );
pUserData->xConnection = SharedConnection( xComplConnection->connectWithCompletion( xHandler ) );
}
if(pUserData->xConnection.is())
@@ -639,7 +639,7 @@ IMPL_LINK_TYPED(SwAddressListDialog, TableSelectHdl_Impl, Button*, pButton, void
const OUString sTable = SvTabListBox::GetEntryText(pSelect, ITEMID_TABLE - 1);
if( pUserData->nTableAndQueryCount > 1 || pUserData->nTableAndQueryCount == -1)
{
- DetectTablesAndQueries(pSelect, (pButton != 0) || sTable.isEmpty());
+ DetectTablesAndQueries(pSelect, (pButton != nullptr) || sTable.isEmpty());
}
}
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 9f9fb7fbce30..d85bac57b4fe 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -88,7 +88,7 @@ SwAddressControl_Impl::SwAddressControl_Impl(vcl::Window* pParent, WinBits nBits
Control(pParent, nBits),
m_pScrollBar(VclPtr<ScrollBar>::Create(this)),
m_pWindow(VclPtr<vcl::Window>::Create(this, WB_DIALOGCONTROL)),
- m_pData(0),
+ m_pData(nullptr),
m_nLineHeight(0),
m_nCurrentDataSet(0),
m_bNoDataSet(true)
@@ -175,7 +175,7 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
Link<Control&,void> aFocusLink = LINK(this, SwAddressControl_Impl, GotFocusHdl_Impl);
Link<Edit&,void> aEditModifyLink = LINK(this, SwAddressControl_Impl, EditModifyHdl_Impl);
- Edit* pLastEdit = 0;
+ Edit* pLastEdit = nullptr;
sal_Int32 nVisibleLines = 0;
sal_uIntPtr nLines = 0;
for(aHeaderIter = m_pData->aDBColumnHeaders.begin();
@@ -334,7 +334,7 @@ void SwAddressControl_Impl::Command( const CommandEvent& rCEvt )
const CommandWheelData* pWheelData = rCEvt.GetWheelData();
if(pWheelData && !pWheelData->IsHorz() && CommandWheelMode::ZOOM != pWheelData->GetMode())
{
- HandleScrollCommand( rCEvt, 0, m_pScrollBar );
+ HandleScrollCommand( rCEvt, nullptr, m_pScrollBar );
}
}
break;
@@ -395,7 +395,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
m_sAddressListFilterName( SW_RES( ST_FILTERNAME)),
m_sURL(rURL),
m_pCSVData( new SwCSVData ),
- m_pFindDlg(0)
+ m_pFindDlg(nullptr)
{
get(m_pNewPB, "NEW");
get(m_pDeletePB, "DELETE");
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 550e48450761..866c799bddee 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -123,14 +123,14 @@ struct DB_Column
DB_Column()
{
- pColInfo = 0;
- DB_ColumnData.pText = 0;
+ pColInfo = nullptr;
+ DB_ColumnData.pText = nullptr;
eColType = DB_SPLITPARA;
}
explicit DB_Column( const OUString& rText )
{
- pColInfo = 0;
+ pColInfo = nullptr;
DB_ColumnData.pText = new OUString( rText );
eColType = DB_FILLTEXT;
}
@@ -197,9 +197,9 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
, aDBData(rData)
, sNoTmpl(SW_RESSTR(SW_STR_NONE))
, pView(&rView)
- , pTAutoFormat(0)
- , pTableSet(0)
- , pRep(0)
+ , pTAutoFormat(nullptr)
+ , pTableSet(nullptr)
+ , pRep(nullptr)
{
get(m_pRbAsTable, "astable");
get(m_pRbAsField, "asfields");
@@ -486,7 +486,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, PageHdl, Button*, pButton, void )
IMPL_LINK_TYPED( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton, void )
{
ListBox& rBox = m_pRbAsTable->IsChecked()
- ? ( 0 == m_pLbTableCol->GetEntryData( 0 )
+ ? ( nullptr == m_pLbTableCol->GetEntryData( 0 )
? *m_pLbTableDbColumn
: *m_pLbTableCol )
: *m_pLbTextDbColumn;
@@ -644,7 +644,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, TableToFromHdl, Button*, pButton, void
IMPL_LINK_TYPED( SwInsertDBColAutoPilot, DblClickHdl, ListBox&, rBox, void )
{
- Button* pButton = 0;
+ Button* pButton = nullptr;
if( &rBox == m_pLbTextDbColumn )
pButton = m_pIbDbcolToEdit;
else if( &rBox == m_pLbTableDbColumn && m_pIbDbcolOneTo->IsEnabled() )
@@ -716,7 +716,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, TableFormatHdl, Button*, pButton, void
}
else
nWidth = rSh.GetAnyCurRect(
- FrmTypeFlags::FLY_ANY & rSh.GetFrmType( 0, true )
+ FrmTypeFlags::FLY_ANY & rSh.GetFrmType( nullptr, true )
? RECT_FLY_PRT_EMBEDDED
: RECT_PAGE_PRT ).Width();
@@ -769,8 +769,8 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, TableFormatHdl, Button*, pButton, void
pTableSet->Put( *pDlg->GetOutputItemSet() );
else if( bNewSet )
{
- delete pTableSet, pTableSet = 0;
- delete pRep, pRep = 0;
+ delete pTableSet, pTableSet = nullptr;
+ delete pRep, pRep = nullptr;
}
}
@@ -789,7 +789,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, SelectHdl, ListBox&, rBox, void )
{
ListBox* pGetBox = &rBox == m_pLbDbFormatFromUsr
? ( m_pRbAsTable->IsChecked()
- ? ( 0 == m_pLbTableCol->GetEntryData( 0 )
+ ? ( nullptr == m_pLbTableCol->GetEntryData( 0 )
? m_pLbTableDbColumn.get()
: m_pLbTableCol.get() )
: m_pLbTextDbColumn.get() )
@@ -840,7 +840,7 @@ IMPL_LINK_TYPED( SwInsertDBColAutoPilot, SelectHdl, ListBox&, rBox, void )
// to know later on, what ListBox was the "active", a Flag
// is remembered in the 1st entry
- void* pPtr = &rBox == m_pLbTableCol ? m_pLbTableCol.get() : 0;
+ void* pPtr = &rBox == m_pLbTableCol ? m_pLbTableCol.get() : nullptr;
m_pLbTableCol->SetEntryData( 0, pPtr );
}
}
@@ -955,7 +955,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
Reference< XConnection> xConnection,
Reference< sdbc::XResultSet > xResultSet )
{
- const Any* pSelection = rSelection.getLength() ? rSelection.getConstArray() : 0;
+ const Any* pSelection = rSelection.getLength() ? rSelection.getConstArray() : nullptr;
SwWrtShell& rSh = pView->GetWrtShell();
//with the drag and drop interface no result set is initially available
@@ -1032,7 +1032,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON);
rSh.InsertTable(
pModOpt->GetInsTableFlags(bHTML),
- nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFormat : 0) );
+ nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFormat : nullptr) );
rSh.MoveTable( GetfnTablePrev(), GetfnTableStart() );
if( pSelection && pTableSet )
@@ -1199,7 +1199,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
rSh.DoUndo( false );
- SwTextFormatColl* pColl = 0;
+ SwTextFormatColl* pColl = nullptr;
{
const OUString sTmplNm( m_pLbDbParaColl->GetSelectEntry() );
if( sNoTmpl != sTmplNm )
@@ -1249,7 +1249,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
bool bSetCrsr = true;
const size_t nCols = aColArr.size();
- ::sw::mark::IMark* pMark = NULL;
+ ::sw::mark::IMark* pMark = nullptr;
for( sal_Int32 i = 0 ; ; ++i )
{
bool bBreak = false;
@@ -1396,7 +1396,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
pWait.reset(new SwWait( *pView->GetDocShell(), true ));
}
- if( !bSetCrsr && pMark != NULL)
+ if( !bSetCrsr && pMark != nullptr)
{
rSh.SetMark();
rSh.GotoMark( pMark );
@@ -1754,7 +1754,7 @@ void SwInsertDBColAutoPilot::Load()
else
m_pLbDbParaColl->SelectEntryPos( 0 );
- delete pTAutoFormat, pTAutoFormat = 0;
+ delete pTAutoFormat, pTAutoFormat = nullptr;
sTmp = pNewData->sTAutoFormatNm;
if( !sTmp.isEmpty() )
{
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
index fd9e2eb34f5c..6b07ce4b4cfc 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
@@ -88,7 +88,7 @@ void SwDBTablePreviewDialog::dispose()
{
if(m_xFrame.is())
{
- m_xFrame->setComponent(NULL, NULL);
+ m_xFrame->setComponent(nullptr, nullptr);
m_xFrame->dispose();
}
m_pDescriptionFI.clear();
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index fe8c59a3543b..84a7564ade1f 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -148,7 +148,7 @@ void SwMailMergeAddressBlockPage::ActivatePage()
m_pAddressCB->Check(rConfigItem.IsAddressBlock());
AddressBlockHdl_Impl(m_pAddressCB);
m_pSettingsWIN->SetLayout(1, 2);
- InsertDataHdl_Impl(0);
+ InsertDataHdl_Impl(nullptr);
}
}
@@ -174,7 +174,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeAddressBlockPage, AddressListHdl_Impl, Button*,
xAddrDialog->GetDBData());
OUString sFilter = xAddrDialog->GetFilter();
rConfigItem.SetFilter( sFilter );
- InsertDataHdl_Impl(0);
+ InsertDataHdl_Impl(nullptr);
GetWizard()->UpdateRoadmap();
GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE));
}
@@ -205,7 +205,7 @@ IMPL_LINK_TYPED(SwMailMergeAddressBlockPage, SettingsHdl_Impl, Button*, pButton,
m_pSettingsWIN->SelectAddress(0);
m_pSettingsWIN->Invalidate(); // #i40408
rConfig.SetCountrySettings(pDlg->IsIncludeCountry(), pDlg->GetCountry());
- InsertDataHdl_Impl(0);
+ InsertDataHdl_Impl(nullptr);
}
pDlg.reset();
GetWizard()->UpdateRoadmap();
@@ -222,7 +222,7 @@ IMPL_LINK_TYPED(SwMailMergeAddressBlockPage, AssignHdl_Impl, Button*, pButton, v
if(RET_OK == pDlg->Execute())
{
//preview update
- InsertDataHdl_Impl(0);
+ InsertDataHdl_Impl(nullptr);
GetWizard()->UpdateRoadmap();
GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE));
}
@@ -684,7 +684,7 @@ IMPL_LINK_TYPED(SwCustomizeAddressBlockDialog, SelectionChangedHdl_Impl, Address
{
//search in ListBox if it's one of the first entries
OUString sSelect;
- ::std::vector<OUString>* pVector = 0;
+ ::std::vector<OUString>* pVector = nullptr;
switch(nSelected) {
case USER_DATA_SALUTATION:
sSelect = m_sCurrentSalutation;
@@ -840,7 +840,7 @@ SwAssignFieldsControl::SwAssignFieldsControl(vcl::Window* pParent, WinBits nBits
m_aVScroll(VclPtr<ScrollBar>::Create(this)),
m_aHeaderHB(VclPtr<HeaderBar>::Create(this, WB_BUTTONSTYLE | WB_BOTTOMBORDER)),
m_aWindow(VclPtr<vcl::Window>::Create(this, WB_BORDER | WB_DIALOGCONTROL)),
- m_rConfigItem(NULL),
+ m_rConfigItem(nullptr),
m_nLBStartTopPos(0),
m_nYOffset(0),
m_nFirstYPos(0)
@@ -872,7 +872,7 @@ void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem)
//get the actual data
uno::Reference< XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), uno::UNO_QUERY);
//get the name of the actual columns
- uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
+ uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
uno::Sequence< OUString > aFields;
if(xColAccess.is())
aFields = xColAccess->getElementNames();
@@ -1044,7 +1044,7 @@ void SwAssignFieldsControl::Command( const CommandEvent& rCEvt )
const CommandWheelData* pWheelData = rCEvt.GetWheelData();
if(pWheelData && !pWheelData->IsHorz() && CommandWheelMode::ZOOM != pWheelData->GetMode())
{
- HandleScrollCommand( rCEvt, 0, m_aVScroll.get() );
+ HandleScrollCommand( rCEvt, nullptr, m_aVScroll.get() );
}
}
break;
@@ -1103,7 +1103,7 @@ IMPL_LINK_TYPED(SwAssignFieldsControl, MatchHdl_Impl, ListBox&, rBox, void)
{
const OUString sColumn = rBox.GetSelectEntry();
uno::Reference< XColumnsSupplier > xColsSupp( m_rConfigItem->GetResultSet(), uno::UNO_QUERY);
- uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
+ uno::Reference <XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
OUString sPreview;
if(xColAccess.is() && xColAccess->hasByName(sColumn))
{
@@ -1130,7 +1130,7 @@ IMPL_LINK_TYPED(SwAssignFieldsControl, MatchHdl_Impl, ListBox&, rBox, void)
break;
}
}
- m_aModifyHdl.Call(0);
+ m_aModifyHdl.Call(nullptr);
}
IMPL_LINK_TYPED(SwAssignFieldsControl, GotFocusHdl_Impl, Control&, rControl, void)
@@ -1244,7 +1244,7 @@ IMPL_LINK_NOARG_TYPED(SwAssignFieldsDialog, AssignmentModifyHdl_Impl, LinkParamN
DDListBox::DDListBox(vcl::Window* pParent, WinBits nStyle)
: SvTreeListBox(pParent, nStyle)
- , m_pParentDialog(NULL)
+ , m_pParentDialog(nullptr)
{
SetStyle( GetStyle() | /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/
WB_CLIPCHILDREN );
@@ -1305,7 +1305,7 @@ void DDListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
AddressMultiLineEdit::AddressMultiLineEdit(vcl::Window* pParent, WinBits nBits)
: VclMultiLineEdit(pParent, nBits)
- , m_pParentDialog(NULL)
+ , m_pParentDialog(nullptr)
{
GetTextView()->SupportProtectAttribute(true);
StartListening(*GetTextEngine());
@@ -1429,7 +1429,7 @@ void AddressMultiLineEdit::InsertNewEntry( const OUString& rStr )
sal_Int32 nIndex = rSelection.GetEnd().GetIndex();
ExtTextEngine *pTextEngine = GetTextEngine();
const TextCharAttrib *pAttrib;
- if(0 != (pAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED )))
+ if(nullptr != (pAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED )))
nIndex = pAttrib->GetEnd();
InsertNewEntryAtPosition( rStr, nPara, nIndex );
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 87cbd05e3038..40c4307adbc6 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -162,7 +162,7 @@ void SwMailMergeGreetingsPage::UpdatePreview()
const OUString sFemaleValue = m_pFemaleFieldCB->GetText();
const OUString sFemaleColumn = m_pFemaleColumnLB->GetSelectEntry();
Reference< sdbcx::XColumnsSupplier > xColsSupp( m_pWizard->GetConfigItem().GetResultSet(), UNO_QUERY);
- Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
+ Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
if(!sFemaleValue.isEmpty() && !sFemaleColumn.isEmpty() &&
xColAccess.is() &&
xColAccess->hasByName(sFemaleColumn))
@@ -284,7 +284,7 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* _pParent)
m_pGreetingLineCB->Check(rConfig.IsGreetingLine(false));
m_pPersonalizedCB->Check(rConfig.IsIndividualGreeting(false));
ContainsHdl_Impl(m_pGreetingLineCB);
- aIndividualLink.Call(0);
+ aIndividualLink.Call(nullptr);
lcl_FillGreetingsBox(*m_pFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE);
lcl_FillGreetingsBox(*m_pMaleLB, rConfig, SwMailMergeConfigItem::MALE);
@@ -459,7 +459,7 @@ SwMailBodyDialog::SwMailBodyDialog(vcl::Window* pParent, SwMailMergeWizard* _pWi
m_pGreetingLineCB->Check(rConfig.IsGreetingLine(true));
m_pPersonalizedCB->Check(rConfig.IsIndividualGreeting(true));
ContainsHdl_Impl(m_pGreetingLineCB);
- aIndividualLink.Call(0);
+ aIndividualLink.Call(nullptr);
lcl_FillGreetingsBox(*m_pFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE);
lcl_FillGreetingsBox(*m_pMaleLB, rConfig, SwMailMergeConfigItem::MALE);
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index b0438805205b..10fbcdc0752f 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -76,9 +76,9 @@ using namespace ::com::sun::star::view;
SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
svt::OWizardPage(_pParent, "MMLayoutPage",
"modules/swriter/ui/mmlayoutpage.ui")
- , m_pExampleFrame(0)
- , m_pExampleWrtShell(0)
- , m_pAddressBlockFormat(0)
+ , m_pExampleFrame(nullptr)
+ , m_pExampleWrtShell(nullptr)
+ , m_pAddressBlockFormat(nullptr)
, m_bIsGreetingInserted(false)
, m_pWizard(_pParent)
{
@@ -206,14 +206,14 @@ void SwMailMergeLayoutPage::ActivatePage()
}
}
if(!rConfigItem.IsAddressInserted() &&
- rConfigItem.IsAddressBlock() != ( 0 != m_pAddressBlockFormat ))
+ rConfigItem.IsAddressBlock() != ( nullptr != m_pAddressBlockFormat ))
{
if( m_pAddressBlockFormat )
{
m_pExampleWrtShell->Push();
m_pExampleWrtShell->GotoFly( m_pAddressBlockFormat->GetName() );
m_pExampleWrtShell->DelRight();
- m_pAddressBlockFormat = 0;
+ m_pAddressBlockFormat = nullptr;
m_pExampleWrtShell->Pop(false);
}
else
@@ -252,7 +252,7 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView* pView,
const Point& rAddressPosition,
bool bAlignToBody)
{
- SwFrameFormat* pAddressBlockFormat = 0;
+ SwFrameFormat* pAddressBlockFormat = nullptr;
pView->GetWrtShell().StartUndo(UNDO_INSERT);
if(rConfigItem.IsAddressBlock() && !rConfigItem.IsAddressInserted())
{
@@ -617,7 +617,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
//put the cursor to the start of the paragraph
rShell.SttPara();
- OSL_ENSURE(0 == rShell.GetTableFormat(), "What to do with a table here?");
+ OSL_ENSURE(nullptr == rShell.GetTableFormat(), "What to do with a table here?");
}
IMPL_LINK_NOARG_TYPED(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, SwOneExampleFrame&, void)
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 11b7e5321a79..1ab325949492 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -229,7 +229,7 @@ SwMailMergeOutputPage::SwMailMergeOutputPage(SwMailMergeWizard* _pParent)
, m_sConfigureMail(SW_RES(ST_CONFIGUREMAIL))
, m_bCancelSaving(false)
, m_pWizard(_pParent)
- , m_pTempPrinter(0)
+ , m_pTempPrinter(nullptr)
{
get(m_pSaveStartDocRB, "savestarting");
get(m_pSaveMergedDocRB, "savemerged");
@@ -404,7 +404,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi
m_pSendAsFT, m_pSendAsLB, m_pSendAsPB,
m_pAttachmentGroup,
m_pSendAllRB, m_pSendDocumentsPB,
- 0
+ nullptr
};
SetUpdateMode(true);
vcl::Window** pControl = aControls;
@@ -427,7 +427,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi
m_pSaveAsOneRB, m_pSaveIndividualRB,
m_pFromRB, m_pFromNF, m_pToFT, m_pToNF,
m_pSaveNowPB,
- 0
+ nullptr
};
Control** pSaveMergeControl = aSaveMergedControls;
do
@@ -448,7 +448,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi
m_pFromRB, m_pFromNF, m_pToFT, m_pToNF,
m_pPrinterFT, m_pPrinterLB, m_pPrinterSettingsPB, m_pPrintAllRB,
m_pPrintNowPB,
- 0
+ nullptr
};
Control** pPrinterControl = aPrintControls;
do
@@ -470,7 +470,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi
m_pSubjectFT, m_pSubjectED,
m_pSendAsFT, m_pSendAsLB, m_pSendAsPB,
m_pAttachmentGroup,
- m_pSendAllRB, m_pSendDocumentsPB, 0
+ m_pSendAllRB, m_pSendDocumentsPB, nullptr
};
vcl::Window** pMailControl = aMailControls;
do
@@ -498,7 +498,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi
//select first column
uno::Reference< sdbcx::XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), uno::UNO_QUERY);
//get the name of the actual columns
- uno::Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
+ uno::Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
uno::Sequence< OUString > aFields;
if(xColAccess.is())
aFields = xColAccess->getElementNames();
@@ -520,7 +520,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, voi
SendTypeHdl_Impl(*m_pSendAsLB);
}
}
- m_pFromRB->GetClickHdl().Call(m_pFromRB->IsChecked() ? m_pFromRB.get() : 0);
+ m_pFromRB->GetClickHdl().Call(m_pFromRB->IsChecked() ? m_pFromRB.get() : nullptr);
SetUpdateMode(false);
}
@@ -906,7 +906,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeOutputPage, PrintHdl_Impl, Button*, void)
pTargetView->ExecPrint( aProps, false, true );
SfxGetpApp()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), pObjSh));
- pTargetView->SetMailMergeConfigItem(0, 0, false);
+ pTargetView->SetMailMergeConfigItem(nullptr, 0, false);
m_pWizard->enableButtons(WizardButtonFlags::CANCEL, true);
m_pWizard->enableButtons(WizardButtonFlags::FINISH, true);
}
@@ -998,7 +998,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton,
bool bAsBody = false;
rtl_TextEncoding eEncoding = ::osl_getThreadTextEncoding();
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
- const SfxFilter *pSfxFlt = 0;
+ const SfxFilter *pSfxFlt = nullptr;
sal_uLong nDocType = reinterpret_cast<sal_uLong>(m_pSendAsLB->GetSelectEntryData());
OUString sExtension = lcl_GetExtensionForDocType(nDocType);
switch( nDocType )
@@ -1099,7 +1099,7 @@ IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton,
OUString sEMailColumn = m_pMailToLB->GetSelectEntry();
OSL_ENSURE( !sEMailColumn.isEmpty(), "No email column selected");
Reference< sdbcx::XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), UNO_QUERY);
- Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
+ Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : nullptr;
if(sEMailColumn.isEmpty() || !xColAccess.is() || !xColAccess->hasByName(sEMailColumn))
return;
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 36e20a8002ba..a3c8526751a7 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -130,7 +130,7 @@ const SwMailDescriptor* SwSendMailDialog_Impl::GetNextDescriptor()
++nCurrentDescriptor;
return &aDescriptors[nCurrentDescriptor - 1];
}
- return 0;
+ return nullptr;
}
using namespace ::com::sun::star;
@@ -182,7 +182,7 @@ void SwMailDispatcherListener_Impl::mailDelivered(
uno::Reference< mail::XMailMessage> xMailMessage)
{
SolarMutexGuard aGuard;
- m_pSendMailDialog->DocumentSent( xMailMessage, true, 0 );
+ m_pSendMailDialog->DocumentSent( xMailMessage, true, nullptr );
DeleteAttachments( xMailMessage );
}
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 706bf0549637..1c7e2bb87ef7 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -162,7 +162,7 @@ IMPL_LINK_TYPED(SwSelectDBTableDialog, PreviewHdl, Button*, pButton, void)
if(pEntry)
{
OUString sTableOrQuery = SvTabListBox::GetEntryText(pEntry, 0);
- sal_Int32 nCommandType = 0 == pEntry->GetUserData() ? 0 : 1;
+ sal_Int32 nCommandType = nullptr == pEntry->GetUserData() ? 0 : 1;
OUString sDataSourceName;
Reference<XChild> xChild(m_xConnection, UNO_QUERY);
@@ -204,7 +204,7 @@ void SwSelectDBTableDialog::SetSelectedTable(const OUString& rTable, bool bIsT
while(pEntry)
{
if((SvTabListBox::GetEntryText(pEntry, 0) == rTable) &&
- ((pEntry->GetUserData() == 0 ) == bIsTable))
+ ((pEntry->GetUserData() == nullptr ) == bIsTable))
{
m_pTable->Select(pEntry);
break;
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 918addc6883f..e92a5c2333ae 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -174,7 +174,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh,
{
bool bDelPrinter = false;
- VclPtr<SfxPrinter> pPrt = pDoc ? pDoc->getIDocumentDeviceAccess().getPrinter(false) : 0;
+ VclPtr<SfxPrinter> pPrt = pDoc ? pDoc->getIDocumentDeviceAccess().getPrinter(false) : nullptr;
if( !pPrt )
{
SfxItemSet* pSet = new SfxItemSet( rDocSh.GetPool(),
@@ -225,7 +225,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh,
}
// initialize character set
- m_pCharSetLB->FillFromTextEncodingTable( pStream != NULL );
+ m_pCharSetLB->FillFromTextEncodingTable( pStream != nullptr );
m_pCharSetLB->SelectTextEncoding( aOpt.GetCharSet() );
m_pCharSetLB->SetSelectHdl( LINK( this, SwAsciiFilterDlg, CharSetSelHdl ));
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index 18adafa64d49..f71c8ee3fecb 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -121,7 +121,7 @@ void SwDocStatPage::SetData(const SwDocStat &rStat)
void SwDocStatPage::Update()
{
SfxViewShell *pVSh = SfxViewShell::Current();
- SwViewShell *pSh = 0;
+ SwViewShell *pSh = nullptr;
if ( dynamic_cast< const SwView *>( pVSh ) != nullptr )
pSh = static_cast<SwView*>(pVSh)->GetWrtShellPtr();
else if ( dynamic_cast< const SwPagePreview *>( pVSh ) != nullptr )
diff --git a/sw/source/ui/dialog/swdialmgr.cxx b/sw/source/ui/dialog/swdialmgr.cxx
index 405e083a77cc..16f11e0ca3c6 100644
--- a/sw/source/ui/dialog/swdialmgr.cxx
+++ b/sw/source/ui/dialog/swdialmgr.cxx
@@ -21,7 +21,7 @@
#include <tools/resmgr.hxx>
#ifndef DISABLE_DYNLOADING
-ResMgr* pSwResMgr=0;
+ResMgr* pSwResMgr=nullptr;
#else
static ResMgr *pSwResMgr;
#endif
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index f0c9c8a66a75..fb2fb83e5a7f 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -164,7 +164,7 @@ OUString AbstractTabDialog_Impl::GetText() const
IMPL_LINK_NOARG_TYPED(AbstractApplyTabDialog_Impl, ApplyHdl, Button*, void)
{
if (pDlg->Apply())
- m_aHandler.Call(NULL);
+ m_aHandler.Call(nullptr);
}
void AbstractApplyTabDialog_Impl::SetApplyHdl( const Link<LinkParamNone*,void>& rLink )
@@ -640,7 +640,7 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* p
sal_uInt32 nResId
)
{
- SfxModalDialog* pDlg=NULL;
+ SfxModalDialog* pDlg=nullptr;
switch ( nResId )
{
case RC_DLG_ADDR :
@@ -661,7 +661,7 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* p
if ( pDlg )
return new SwAbstractSfxDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractSwAsciiFilterDlg* SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg( vcl::Window* pParent,
@@ -677,7 +677,7 @@ VclAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( vcl:
SfxRequest& rReq,
int nResId )
{
- Dialog* pDlg=NULL;
+ Dialog* pDlg=nullptr;
switch ( nResId )
{
case DLG_INSERT_BOOKMARK :
@@ -690,7 +690,7 @@ VclAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( vcl:
if ( pDlg )
return new VclAbstractDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractSwBreakDlg * SwAbstractDialogFactory_Impl::CreateSwBreakDlg(vcl::Window *pParent,
@@ -734,7 +734,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwCaptionDialog ( vcl::W
if ( pDlg.get() )
return new VclAbstractDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractSwInsertDBColAutoPilot* SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView,
@@ -813,7 +813,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclAbstractDialog ( vcl:
if ( pDlg.get() )
return new VclAbstractDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractSplitTableDialog * SwAbstractDialogFactory_Impl::CreateSplitTableDialog ( vcl::Window *pParent, SwWrtShell &rSh )
@@ -848,7 +848,7 @@ SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg(vcl::Window*
if ( pDlg.get() )
return new SwAbstractSfxDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode, int nResId )
@@ -865,7 +865,7 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( vcl::Window*
if ( pDlg.get() )
return new SwAbstractSfxDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg(vcl::Window *pParent, SwTableFUNC &rFnc)
@@ -901,7 +901,7 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwFieldEditDlg ( SwView
if ( pDlg.get() )
return new SwAbstractSfxDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractSwRenameXNamedDlg * SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg(vcl::Window* pParent,
@@ -1014,7 +1014,7 @@ AbstractMailMergeDlg * SwAbstractDialogFactory_Impl::CreateMailMergeDlg( int nRe
}
if ( pDlg.get() )
return new AbstractMailMergeDlg_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractMailMergeCreateFromDlg * SwAbstractDialogFactory_Impl::CreateMailMergeCreateFromDlg(vcl::Window* pParent)
@@ -1055,7 +1055,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTabDialog( int nResI
}
if ( pDlg.get() )
return new AbstractTabDialog_Impl( pDlg );
- return 0;
+ return nullptr;
}
AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog(
@@ -1139,7 +1139,7 @@ GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc()
// Factories for TabPages
CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
{
- CreateTabPage pRet = 0;
+ CreateTabPage pRet = nullptr;
switch ( nId )
{
case RID_SW_TP_OPTCOMPATIBILITY_PAGE :
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 8610414e4cd9..ec09b278f765 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -382,7 +382,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg(vcl::Window *pParent, SwWrtShell &rSh) override;
virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw) override;
virtual SfxAbstractTabDialog * CreateSwCharDlg(vcl::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- sal_uInt8 nDialogMode, const OUString* pFormatStr = 0) override;
+ sal_uInt8 nDialogMode, const OUString* pFormatStr = nullptr) override;
virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, bool bToTable) override;
virtual VclAbstractDialog * CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV,int nResId) override;
@@ -403,7 +403,7 @@ public:
SwView& rVw,
const SfxItemSet& rCoreSet,
sal_uInt8 nDialogMode,
- const OUString *pCollName = 0,
+ const OUString *pCollName = nullptr,
bool bDraw = false,
const OString& sDefPage = OString() ) override;
@@ -413,7 +413,7 @@ public:
virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pShell,
bool bSetAutoFormat = true,
- const SwTableAutoFormat* pSelFormat = 0 ) override;
+ const SwTableAutoFormat* pSelFormat = nullptr ) override;
virtual SfxAbstractDialog * CreateSwBorderDlg (vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType, int nResId ) override;
virtual SfxAbstractDialog * CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode, int nResId ) override;
@@ -434,13 +434,13 @@ public:
bool bNewFrm = true,
bool bFormat = false,
const OString& sDefPage = OString(),
- const OUString* pFormatStr = 0) override;
+ const OUString* pFormatStr = nullptr) override;
virtual SfxAbstractApplyTabDialog* CreateTemplateDialog(
vcl::Window* pParent,
SfxStyleSheetBase& rBase,
sal_uInt16 nRegion,
const OString& sPage = OString(),
- SwWrtShell* pActShell = 0,
+ SwWrtShell* pActShell = nullptr,
bool bNew = false) override;
virtual AbstractGlossaryDlg* CreateGlossaryDlg(SfxViewFrame* pViewFrame,
SwGlossaryHdl* pGlosHdl,
@@ -460,7 +460,7 @@ public:
const OUString& rTableName,
sal_Int32 nCommandType,
const css::uno::Reference< css::sdbc::XConnection>& xConnection,
- css::uno::Sequence< css::uno::Any >* pSelection = 0 ) override;
+ css::uno::Sequence< css::uno::Any >* pSelection = nullptr ) override;
virtual AbstractMailMergeCreateFromDlg* CreateMailMergeCreateFromDlg(vcl::Window* pParent) override;
virtual AbstractMailMergeFieldConnectionsDlg* CreateMailMergeFieldConnectionsDlg(vcl::Window* pParent) override;
virtual VclAbstractDialog* CreateMultiTOXMarkDlg(vcl::Window* pParent, SwTOXMgr &rTOXMgr) override;
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index dbbac541e03a..b53ee82b5921 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ b/sw/source/ui/dialog/swuiexp.cxx
@@ -48,7 +48,7 @@
namespace swui
{
- static SwAbstractDialogFactory_Impl* pFactory=NULL;
+ static SwAbstractDialogFactory_Impl* pFactory=nullptr;
SwAbstractDialogFactory * GetFactory()
{
if ( !pFactory )
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index a057cf513c1b..a185fbdee869 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -118,7 +118,7 @@ static void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAva
static void lcl_FillSubRegionList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames )
{
- lcl_FillList( rSh, rSubRegions, pAvailNames, 0 );
+ lcl_FillList( rSh, rSubRegions, pAvailNames, nullptr );
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
for( IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getBookmarksBegin();
ppMark != pMarkAccess->getBookmarksEnd();
@@ -307,8 +307,8 @@ SwEditRegionDlg::SwEditRegionDlg( vcl::Window* pParent, SwWrtShell& rWrtSh )
, m_bSubRegionsFilled(false)
, aImageIL(SW_RES(IL_SECTION_BITMAPS))
, rSh(rWrtSh)
- , m_pDocInserter(NULL)
- , m_pOldDefDlgParent(NULL)
+ , m_pDocInserter(nullptr)
+ , m_pOldDefDlgParent(nullptr)
, bDontCheckPasswd(true)
{
get(m_pCurName, "curname");
@@ -378,7 +378,7 @@ SwEditRegionDlg::SwEditRegionDlg( vcl::Window* pParent, SwWrtShell& rWrtSh )
m_pDDECB->SetClickHdl(LINK(this, SwEditRegionDlg, DDEHdl));
pCurrSect = rSh.GetCurrSection();
- RecurseList( 0, 0 );
+ RecurseList( nullptr, nullptr );
// if the cursor is not in a region
// the first one will always be selected
if( !m_pTree->FirstSelected() && m_pTree->First() )
@@ -435,7 +435,7 @@ bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
// recursively look for child-sections
void SwEditRegionDlg::RecurseList( const SwSectionFormat* pFormat, SvTreeListEntry* pEntry )
{
- SvTreeListEntry* pSelEntry = 0;
+ SvTreeListEntry* pSelEntry = nullptr;
if (!pFormat)
{
const size_t nCount=rSh.GetSectionFormatCount();
@@ -491,7 +491,7 @@ void SwEditRegionDlg::RecurseList( const SwSectionFormat* pFormat, SvTreeListEnt
}
}
}
- if(0 != pSelEntry)
+ if(nullptr != pSelEntry)
{
m_pTree->MakeVisible(pSelEntry);
m_pTree->Select(pSelEntry);
@@ -766,7 +766,7 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OkHdl, Button*, void)
rSh.StartAllAction();
rSh.StartUndo();
- rSh.ResetSelect( 0,false );
+ rSh.ResetSelect( nullptr,false );
SvTreeListEntry* pEntry = m_pTree->First();
while( pEntry )
@@ -804,7 +804,7 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OkHdl, Button*, void)
pSet->Put( pRepr->GetLRSpace());
rSh.UpdateSection( nNewPos, pRepr->GetSectionData(),
- pSet->Count() ? pSet.get() : 0 );
+ pSet->Count() ? pSet.get() : nullptr );
}
pEntry = m_pTree->Next( pEntry );
}
@@ -917,13 +917,13 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, ChangeDismissHdl, Button*, void)
while(pEntry)
{
SectRepr* const pSectRepr = static_cast<SectRepr*>(pEntry->GetUserData());
- SvTreeListEntry* pRemove = 0;
+ SvTreeListEntry* pRemove = nullptr;
bool bRestart = false;
if(pSectRepr->IsSelected())
{
m_SectReprs.insert(std::make_pair(pSectRepr->GetArrPos(),
std::unique_ptr<SectRepr>(pSectRepr)));
- while( (pChild = m_pTree->FirstChild(pEntry) )!= 0 )
+ while( (pChild = m_pTree->FirstChild(pEntry) )!= nullptr )
{
// because of the repositioning we have to start at the beginning again
bRestart = true;
@@ -940,7 +940,7 @@ IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, ChangeDismissHdl, Button*, void)
m_pTree->GetModel()->Remove( pRemove );
}
- if ( m_pTree->FirstSelected() == 0 )
+ if ( m_pTree->FirstSelected() == nullptr )
{
m_pConditionFT->Enable(false);
m_pConditionED->Enable(false);
@@ -1368,7 +1368,7 @@ IMPL_LINK_TYPED( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent&, rEvent, vo
::lcl_ReadSections(aMedium, *m_pSubRegionED);
}
else
- lcl_FillSubRegionList(rSh, *m_pSubRegionED, 0);
+ lcl_FillSubRegionList(rSh, *m_pSubRegionED, nullptr);
m_bSubRegionsFilled = true;
}
}
@@ -1407,11 +1407,11 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog(
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- m_nSectionPageId = AddTabPage("section", SwInsertSectionTabPage::Create, 0);
- m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, 0);
- m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0);
- m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, 0);
- m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create, 0);
+ m_nSectionPageId = AddTabPage("section", SwInsertSectionTabPage::Create, nullptr);
+ m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, nullptr);
+ m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr);
+ m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, nullptr);
+ m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create, nullptr);
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = rHtmlOpt.GetExportMode();
@@ -1502,9 +1502,9 @@ SwInsertSectionTabPage::SwInsertSectionTabPage(
vcl::Window *pParent, const SfxItemSet &rAttrSet)
: SfxTabPage(pParent, "SectionPage",
"modules/swriter/ui/sectionpage.ui", &rAttrSet)
- , m_pWrtSh(0)
- , m_pDocInserter(NULL)
- , m_pOldDefDlgParent(NULL)
+ , m_pWrtSh(nullptr)
+ , m_pDocInserter(nullptr)
+ , m_pOldDefDlgParent(nullptr)
{
get(m_pCurName, "sectionnames");
m_pCurName->SetStyle(m_pCurName->GetStyle() | WB_SORT);
@@ -2088,10 +2088,10 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, 0);
- m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
- m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, 0);
- m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create, 0);
+ m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, nullptr);
+ m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr );
+ m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, nullptr);
+ m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create, nullptr);
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = rHtmlOpt.GetExportMode();
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx
index bebfe4f3870a..befd3a534aa3 100644
--- a/sw/source/ui/dialog/wordcountdialog.cxx
+++ b/sw/source/ui/dialog/wordcountdialog.cxx
@@ -37,7 +37,7 @@
IMPL_STATIC_LINK_NOARG_TYPED(SwWordCountFloatDlg, CloseHdl, Button*, void)
{
SfxViewFrame* pVFrame = ::GetActiveView()->GetViewFrame();
- if (pVFrame != NULL)
+ if (pVFrame != nullptr)
{
pVFrame->ToggleChildWindow(FN_WORDCOUNT_DIALOG);
}
@@ -50,7 +50,7 @@ SwWordCountFloatDlg::~SwWordCountFloatDlg()
void SwWordCountFloatDlg::dispose()
{
- SwViewShell::SetCareWin( 0 );
+ SwViewShell::SetCareWin( nullptr );
m_pCurrentWordFT.clear();
m_pCurrentCharacterFT.clear();
m_pCurrentCharacterExcludingSpacesFT.clear();
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 61220e376e12..7d3bbb9b0dfd 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -326,7 +326,7 @@ IMPL_LINK_TYPED( SwEnvFormatPage, EditHdl, MenuButton *, pButton, void )
if ( pDlg->Execute() == RET_OK )
{
// maybe relocate defaults
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SfxItemSet* pOutputSet = const_cast<SfxItemSet*>(pDlg->GetOutputItemSet());
sal_uInt16 nNewDist;
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index 2abd1c2576fb..51a98ae6c716 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -65,7 +65,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/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 89d7f9d749da..4aeb134907c4 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -133,8 +133,8 @@ SwEnvDlg::SwEnvDlg(vcl::Window* pParent, const SfxItemSet& rSet,
, aEnvItem(static_cast<const SwEnvItem&>( rSet.Get(FN_ENVELOP)))
, pSh(pWrtSh)
, pPrinter(pPrt)
- , pAddresseeSet(0)
- , pSenderSet(0)
+ , pAddresseeSet(nullptr)
+ , pSenderSet(nullptr)
, m_nEnvPrintId(0)
{
if (!bInsert)
@@ -142,9 +142,9 @@ SwEnvDlg::SwEnvDlg(vcl::Window* pParent, const SfxItemSet& rSet,
GetUserButton()->SetText(get<PushButton>("modify")->GetText());
}
- AddTabPage("envelope", SwEnvPage ::Create, 0);
- AddTabPage("format", SwEnvFormatPage::Create, 0);
- m_nEnvPrintId = AddTabPage("printer", SwEnvPrtPage::Create, 0);
+ AddTabPage("envelope", SwEnvPage ::Create, nullptr);
+ AddTabPage("format", SwEnvFormatPage::Create, nullptr);
+ m_nEnvPrintId = AddTabPage("printer", SwEnvPrtPage::Create, nullptr);
}
SwEnvDlg::~SwEnvDlg()
@@ -269,7 +269,7 @@ IMPL_LINK_NOARG_TYPED(SwEnvPage, FieldHdl, Button*, void)
{
OUString aStr("<" + m_pDatabaseLB->GetSelectEntry() + "." +
m_pTableLB->GetSelectEntry() + "." +
- OUString(m_pTableLB->GetSelectEntryData() == 0 ? '0' : '1') + "." +
+ OUString(m_pTableLB->GetSelectEntryData() == nullptr ? '0' : '1') + "." +
m_pDBFieldLB->GetSelectEntry() + ">");
m_pAddrEdit->ReplaceSelected(aStr);
Selection aSel = m_pAddrEdit->GetSelection();
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index 9a3d59448c7f..2b8516d0c425 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -31,7 +31,7 @@
SwEnvPrtPage::SwEnvPrtPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "EnvPrinterPage",
"modules/swriter/ui/envprinterpage.ui", &rSet)
- , pPrt(NULL)
+ , pPrt(nullptr)
{
get(m_pAlignBox, "alignbox");
get(m_pTopButton, "top");
diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx
index cd964ba758a0..d68991d311e8 100644
--- a/sw/source/ui/envelp/envprt.hxx
+++ b/sw/source/ui/envelp/envprt.hxx
@@ -64,7 +64,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/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 0b5711bf367d..63e03d19da67 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -94,7 +94,7 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet,
: SfxTabDialog(pParent, "LabelDialog",
"modules/swriter/ui/labeldialog.ui", &rSet)
, pDBManager(pDBManager_)
- , pPrtPage(0)
+ , pPrtPage(nullptr)
, aTypeIds(50, 10)
, m_pRecs(new SwLabRecs)
, m_bLabel(bLabel)
@@ -107,9 +107,9 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet,
{
WaitObject aWait( pParent );
- m_nFormatId = AddTabPage("format", SwLabFormatPage::Create, 0);
- m_nOptionsId = AddTabPage("options", SwLabPrtPage::Create, 0);
- m_nCardsId = AddTabPage("cards", SwVisitingCardPage::Create, 0);
+ m_nFormatId = AddTabPage("format", SwLabFormatPage::Create, nullptr);
+ m_nOptionsId = AddTabPage("options", SwLabPrtPage::Create, nullptr);
+ m_nCardsId = AddTabPage("cards", SwVisitingCardPage::Create, nullptr);
m_sBusinessCardDlg = GetPageText(m_nCardsId);
if (m_bLabel)
@@ -118,15 +118,15 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet,
RemoveTabPage("private");
RemoveTabPage("cards");
RemoveTabPage("medium");
- m_nLabelId = AddTabPage("labels", SwLabPage::Create, 0);
+ m_nLabelId = AddTabPage("labels", SwLabPage::Create, nullptr);
}
else
{
RemoveTabPage("labels");
RemoveTabPage("cards");
- m_nLabelId = AddTabPage("medium", SwLabPage::Create, 0);
- m_nBusinessId = AddTabPage("business", SwBusinessDataPage::Create, 0 );
- m_nPrivateId = AddTabPage("private", SwPrivateDataPage::Create, 0);
+ m_nLabelId = AddTabPage("medium", SwLabPage::Create, nullptr);
+ m_nBusinessId = AddTabPage("business", SwBusinessDataPage::Create, nullptr );
+ m_nPrivateId = AddTabPage("private", SwPrivateDataPage::Create, nullptr);
SetText(m_sBusinessCardDlg);
}
// Read user label from writer.cfg
@@ -201,7 +201,7 @@ void SwLabDlg::GetLabItem(SwLabItem &rItem)
SwLabRec* SwLabDlg::GetRecord(const OUString &rRecName, bool bCont)
{
- SwLabRec* pRec = NULL;
+ SwLabRec* pRec = nullptr;
bool bFound = false;
const OUString sCustom(SW_RES(STR_CUSTOM));
@@ -227,13 +227,13 @@ Printer *SwLabDlg::GetPrt()
if (pPrtPage)
return pPrtPage->GetPrt();
else
- return NULL;
+ return nullptr;
}
SwLabPage::SwLabPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "CardMediumPage",
"modules/swriter/ui/cardmediumpage.ui", &rSet)
- , pDBManager(NULL)
+ , pDBManager(nullptr)
, aItem(static_cast<const SwLabItem&>(rSet.Get(FN_LABEL)))
, m_bLabel(false)
{
@@ -352,7 +352,7 @@ IMPL_LINK_NOARG_TYPED(SwLabPage, FieldHdl, Button*, void)
{
OUString aStr("<" + m_pDatabaseLB->GetSelectEntry() + "." +
m_pTableLB->GetSelectEntry() + "." +
- (m_pTableLB->GetSelectEntryData() == 0 ? OUString("0") : OUString("1")) + "." +
+ (m_pTableLB->GetSelectEntryData() == nullptr ? OUString("0") : OUString("1")) + "." +
m_pDBFieldLB->GetSelectEntry() + ">");
m_pWritingEdit->ReplaceSelected(aStr);
Selection aSel = m_pWritingEdit->GetSelection();
@@ -584,7 +584,7 @@ void SwVisitingCardPage::SetUserData( sal_uInt32 nCnt,
SwVisitingCardPage::SwVisitingCardPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "CardFormatPage",
"modules/swriter/ui/cardformatpage.ui", &rSet)
- , pExampleFrame(0)
+ , pExampleFrame(nullptr)
{
get(m_pAutoTextLB, "treeview");
m_pAutoTextLB->set_height_request(m_pAutoTextLB->GetTextHeight() * 16);
@@ -613,7 +613,7 @@ void SwVisitingCardPage::dispose()
{
for(sal_Int32 i = 0; i < m_pAutoTextGroupLB->GetEntryCount(); ++i)
delete static_cast<OUString*>(m_pAutoTextGroupLB->GetEntryData( i ));
- m_xAutoText = 0;
+ m_xAutoText = nullptr;
ClearUserData();
delete pExampleFrame;
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index 2834e504ac85..f027de2d9dca 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -211,7 +211,7 @@ void SwLabDlg::UpdateFieldInformation(uno::Reference< frame::XModel > & xModel,
{ "BC_COMP_FAX" , &SwLabItem::m_aCompFax },
{ "BC_COMP_WWW" , &SwLabItem::m_aCompWWW },
{ "BC_COMP_MAIL" , &SwLabItem::m_aCompMail },
- { 0, 0 }
+ { nullptr, nullptr }
};
try
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index dab095f3b155..d8d8ef4545fe 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -401,7 +401,7 @@ IMPL_LINK_NOARG_TYPED(SwLabFormatPage, PreviewHdl, Idle *, void)
IMPL_LINK_TYPED( SwLabFormatPage, LoseFocusHdl, Control&, rControl, void )
{
if (static_cast<Edit*>( &rControl)->IsModified())
- PreviewHdl(0);
+ PreviewHdl(nullptr);
}
void SwLabFormatPage::ChangeMinMax()
@@ -560,7 +560,7 @@ void SwLabFormatPage::Reset(const SfxItemSet* )
m_pRowsField->SetValue(aItem.m_nRows);
m_pMakeFI->SetText(aItem.m_aMake);
m_pTypeFI->SetText(aItem.m_aType);
- PreviewHdl(0);
+ PreviewHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SwLabFormatPage, SaveHdl, Button*, void)
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index 1e4675cb13d4..da680899cb7e 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -105,7 +105,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(SwLabItem& rItem);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index 922e32592ac2..d5a95de387ca 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -30,7 +30,7 @@
SwLabPrtPage::SwLabPrtPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "LabelOptionsPage",
"modules/swriter/ui/labeloptionspage.ui", &rSet)
- , pPrinter(0)
+ , pPrinter(nullptr)
{
get(m_pPageButton, "entirepage");
get(m_pSingleButton, "singlelabel");
diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx
index 97a09666b857..d7dbc5b78b93 100644
--- a/sw/source/ui/envelp/labprt.hxx
+++ b/sw/source/ui/envelp/labprt.hxx
@@ -59,7 +59,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(SwLabItem& rItem);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index fe75d2fd1820..5f55838598bf 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -372,7 +372,7 @@ SwMailMergeDlg::~SwMailMergeDlg()
void SwMailMergeDlg::dispose()
{
if(m_xFrame.is()) {
- m_xFrame->setComponent(NULL, NULL);
+ m_xFrame->setComponent(nullptr, nullptr);
m_xFrame->dispose();
}
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index aa83f306507e..c7aff3e5dd66 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -69,7 +69,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(SwLabItem& rItem);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
@@ -123,7 +123,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;
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
};
@@ -162,7 +162,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;
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
};
@@ -199,7 +199,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;
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
};
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index 083b7efe6214..2df5ba1199ba 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -35,7 +35,7 @@ sw::DropDownFieldDialog::DropDownFieldDialog(vcl::Window *pParent, SwWrtShell &r
: SvxStandardDialog(pParent, "DropdownFieldDialog",
"modules/swriter/ui/dropdownfielddialog.ui")
, rSh( rS )
- , pDropField(0)
+ , pDropField(nullptr)
{
get(m_pListItemsLB, "list");
m_pListItemsLB->SetDropDownLineCount(12);
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 3911cd579a5c..85b3ad829cc5 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -81,7 +81,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw)
m_pUsedDBTLB->SetDeselectHdl(aLink);
m_pAvailDBTLB->SetSelectHdl(aLink);
m_pAvailDBTLB->SetSelectHdl(aLink);
- TreeSelectHdl(NULL);
+ TreeSelectHdl(nullptr);
}
// initialise database listboxes
@@ -107,8 +107,8 @@ void SwChangeDBDlg::FillDBPopup()
size_t nCount = aDBNameList.size();
m_pUsedDBTLB->Clear();
- SvTreeListEntry *pFirst = 0;
- SvTreeListEntry *pLast = 0;
+ SvTreeListEntry *pFirst = nullptr;
+ SvTreeListEntry *pLast = nullptr;
for(size_t k = 0; k < nCount; k++)
{
@@ -140,11 +140,11 @@ SvTreeListEntry* SwChangeDBDlg::Insert(const OUString& rDBName)
Image aDBImg = aImageList.GetImage(IMG_DB);
Image aQueryImg = aImageList.GetImage(IMG_DBQUERY);
Image& rToInsert = nCommandType ? aQueryImg : aTableImg;
- while ((pParent = m_pUsedDBTLB->GetEntry(nParent++)) != NULL)
+ while ((pParent = m_pUsedDBTLB->GetEntry(nParent++)) != nullptr)
{
if (sDBName == m_pUsedDBTLB->GetEntryText(pParent))
{
- while ((pChild = m_pUsedDBTLB->GetEntry(pParent, nChild++)) != NULL)
+ while ((pChild = m_pUsedDBTLB->GetEntry(pParent, nChild++)) != nullptr)
{
if (sTableName == m_pUsedDBTLB->GetEntryText(pChild))
return pChild;
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 3e0c7620ccab..45fe095adea5 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -180,7 +180,7 @@ void SwFieldDBPage::Reset(const SfxItemSet*)
}
}
}
- TypeHdl(0);
+ TypeHdl(nullptr);
m_pTypeLB->SetUpdateMode(true);
m_pTypeLB->SetSelectHdl(LINK(this, SwFieldDBPage, TypeListBoxHdl));
@@ -420,7 +420,7 @@ void SwFieldDBPage::CheckInsert()
if (nTypeId == TYP_DBFLD && pEntry)
pEntry = m_pDatabaseTLB->GetParent(pEntry);
- bInsert &= pEntry != 0;
+ bInsert &= pEntry != nullptr;
}
else
bInsert = false;
@@ -453,7 +453,7 @@ IMPL_LINK_TYPED( SwFieldDBPage, TreeSelectHdl, SvTreeListBox *, pBox, void )
{
bool bNumFormat = false;
- if (pEntry != 0)
+ if (pEntry != nullptr)
{
OUString sTableName;
OUString sColumnName;
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 3bdc85d99755..58ea65708db5 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -50,7 +50,7 @@ using namespace com::sun::star;
SwFieldDokInfPage::SwFieldDokInfPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
: SwFieldPage(pParent, "FieldDocInfoPage",
"modules/swriter/ui/flddocinfopage.ui", rCoreSet)
- , pSelEntry(0)
+ , pSelEntry(nullptr)
, nOldSel(0)
, nOldFormat(0)
{
@@ -110,12 +110,12 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
// initialise TypeListBox
m_pTypeTLB->SetUpdateMode(false);
m_pTypeTLB->Clear();
- pSelEntry = 0;
+ pSelEntry = nullptr;
// display SubTypes in TypeLB
- SvTreeListEntry* pEntry = 0;
+ SvTreeListEntry* pEntry = nullptr;
- SvTreeListEntry* pInfo = 0;
+ SvTreeListEntry* pInfo = nullptr;
sal_uInt16 nSubType = USHRT_MAX;
if (IsFieldEdit())
@@ -189,7 +189,7 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
}
// select old Pos
- if (pSelEntry != 0)
+ if (pSelEntry != nullptr)
{
m_pTypeTLB->Select(pSelEntry);
nSubType = (sal_uInt16)reinterpret_cast<sal_uLong>(pSelEntry->GetUserData());
@@ -202,7 +202,7 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
FillSelectionLB(nSubType);
if ( pSelEntry )
- TypeHdl(NULL);
+ TypeHdl(nullptr);
m_pTypeTLB->SetUpdateMode(true);
m_pTypeTLB->SetSelectHdl(LINK(this, SwFieldDokInfPage, TypeHdl));
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 4d4131039c62..c339618a5ef2 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -89,7 +89,7 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr)
}
SwFieldEditDlg::SwFieldEditDlg(SwView& rVw)
- : SfxSingleTabDialog(&rVw.GetViewFrame()->GetWindow(), 0,
+ : SfxSingleTabDialog(&rVw.GetViewFrame()->GetWindow(), nullptr,
"EditFieldDialog", "modules/swriter/ui/editfielddialog.ui")
, pSh(rVw.GetWrtShellPtr())
{
@@ -167,13 +167,13 @@ VclPtr<SfxTabPage> SwFieldEditDlg::CreatePage(sal_uInt16 nGroup)
switch (nGroup)
{
case GRP_DOC:
- pTabPage = SwFieldDokPage::Create(get_content_area(), 0);
+ pTabPage = SwFieldDokPage::Create(get_content_area(), nullptr);
break;
case GRP_FKT:
- pTabPage = SwFieldFuncPage::Create(get_content_area(), 0);
+ pTabPage = SwFieldFuncPage::Create(get_content_area(), nullptr);
break;
case GRP_REF:
- pTabPage = SwFieldRefPage::Create(get_content_area(), 0);
+ pTabPage = SwFieldRefPage::Create(get_content_area(), nullptr);
break;
case GRP_REG:
{
@@ -192,11 +192,11 @@ VclPtr<SfxTabPage> SwFieldEditDlg::CreatePage(sal_uInt16 nGroup)
break;
}
case GRP_DB:
- pTabPage = SwFieldDBPage::Create(get_content_area(), 0);
+ pTabPage = SwFieldDBPage::Create(get_content_area(), nullptr);
static_cast<SwFieldDBPage*>(pTabPage.get())->SetWrtShell(*pSh);
break;
case GRP_VAR:
- pTabPage = SwFieldVarPage::Create(get_content_area(), 0);
+ pTabPage = SwFieldVarPage::Create(get_content_area(), nullptr);
break;
}
@@ -219,7 +219,7 @@ SwFieldEditDlg::~SwFieldEditDlg()
void SwFieldEditDlg::dispose()
{
- SwViewShell::SetCareWin(NULL);
+ SwViewShell::SetCareWin(nullptr);
pSh->EnterStdMode();
m_pPrevBT.clear();
m_pNextBT.clear();
@@ -246,7 +246,7 @@ IMPL_LINK_NOARG_TYPED(SwFieldEditDlg, OKHdl, Button*, void)
{
VclPtr<SfxTabPage> pTabPage = GetTabPage();
if (pTabPage)
- pTabPage->FillItemSet(0);
+ pTabPage->FillItemSet(nullptr);
EndDialog( RET_OK );
}
}
@@ -264,13 +264,13 @@ IMPL_LINK_TYPED( SwFieldEditDlg, NextPrevHdl, Button *, pButton, void )
pSh->EnterStdMode();
- SwFieldType *pOldTyp = 0;
+ SwFieldType *pOldTyp = nullptr;
VclPtr<SwFieldPage> pTabPage = static_cast<SwFieldPage*>(GetTabPage());
//#112462# FillItemSet may delete the current field
//that's why it has to be called before accessing the current field
if( GetOKButton()->IsEnabled() )
- pTabPage->FillItemSet(0);
+ pTabPage->FillItemSet(nullptr);
SwFieldMgr& rMgr = pTabPage->GetFieldMgr();
SwField *pCurField = rMgr.GetCurField();
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index a9f672f14c8d..afd645ac8bcc 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -44,8 +44,8 @@ using namespace ::com::sun::star;
SwFieldPage::SwFieldPage(vcl::Window *pParent, const OString& rID,
const OUString& rUIXMLDescription, const SfxItemSet &rAttrSet)
: SfxTabPage(pParent, rID, rUIXMLDescription, &rAttrSet)
- , m_pCurField(0)
- , m_pWrtShell(0)
+ , m_pCurField(nullptr)
+ , m_pWrtShell(nullptr)
, m_nTypeSel(LISTBOX_ENTRY_NOTFOUND)
, m_nSelectionSel(LISTBOX_ENTRY_NOTFOUND)
, m_bFieldEdit(false)
@@ -66,7 +66,7 @@ void SwFieldPage::Init()
SwDocShell* pDocSh = static_cast<SwDocShell*>(SfxObjectShell::Current());
bool bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON);
- m_bFieldEdit = 0 == GetTabDialog();
+ m_bFieldEdit = nullptr == GetTabDialog();
// newly initialise FieldManager. important for
// Dok-Switch (fldtdlg:ReInitTabPage)
@@ -110,7 +110,7 @@ void SwFieldPage::EditNewField( bool bOnlyActivate )
}
m_nSelectionSel = LISTBOX_ENTRY_NOTFOUND;
m_bRefresh = true;
- Reset(0);
+ Reset(nullptr);
m_bRefresh = false;
}
@@ -125,7 +125,7 @@ bool SwFieldPage::InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUS
if (!IsFieldEdit()) // insert new field
{
- SwInsertField_Data aData(nTypeId, nSubType, rPar1, rPar2, nFormatId, 0, cSeparator, bIsAutomaticLanguage );
+ SwInsertField_Data aData(nTypeId, nSubType, rPar1, rPar2, nFormatId, nullptr, cSeparator, bIsAutomaticLanguage );
//#i26566# provide parent for SwWrtShell::StartInputFieldDlg
aData.m_pParent = &GetTabDialog()->GetOKButton();
bRet = m_aMgr.InsertField( aData );
@@ -237,7 +237,7 @@ bool SwFieldPage::InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUS
case TYP_INPUTFLD:
{
// User- or SetField ?
- if (m_aMgr.GetFieldType(RES_USERFLD, sPar1) == 0 &&
+ if (m_aMgr.GetFieldType(RES_USERFLD, sPar1) == nullptr &&
!(pTmpField->GetSubType() & INP_TXT)) // SETEXPFLD
{
SwSetExpField* pField = static_cast<SwSetExpField*>(pTmpField);
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index 5bf7ed29211e..68580af6d0fc 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -61,10 +61,10 @@ protected:
void Init();
void SavePos( const ListBox* pLst1,
- const ListBox* pLst2 = 0,
- const ListBox* pLst3 = 0);
- void RestorePos( ListBox* pLst1, ListBox* pLst2 = 0,
- ListBox* pLst3 = 0 );
+ const ListBox* pLst2 = nullptr,
+ const ListBox* pLst3 = nullptr);
+ void RestorePos( ListBox* pLst1, ListBox* pLst2 = nullptr,
+ ListBox* pLst3 = nullptr );
void EnableInsert(bool bEnable = true);
inline bool IsFieldEdit() const { return m_bFieldEdit; }
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 4b38523b2d73..66a5a42d43bf 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -52,7 +52,7 @@ SwFieldRefPage::SwFieldRefPage(vcl::Window* pParent, const SfxItemSet& rCoreSet
"modules/swriter/ui/fldrefpage.ui", rCoreSet)
, maOutlineNodes()
, maNumItems()
- , mpSavedSelectedTextNode(0)
+ , mpSavedSelectedTextNode(nullptr)
, mnSavedSelectedPos(0)
{
get(m_pTypeLB, "type");
@@ -127,7 +127,7 @@ void SwFieldRefPage::dispose()
// #i83479#
void SwFieldRefPage::SaveSelectedTextNode()
{
- mpSavedSelectedTextNode = 0;
+ mpSavedSelectedTextNode = nullptr;
mnSavedSelectedPos = 0;
if ( m_pSelectionToolTipLB->IsVisible() )
{
@@ -642,12 +642,12 @@ void SwFieldRefPage::UpdateSubType()
bool bEnable = m_pSelectionToolTipLB->GetEntryCount() != 0;
m_pSelection->Enable( bEnable );
- if ( m_pSelectionToolTipLB->GetCurEntry() != 0 )
+ if ( m_pSelectionToolTipLB->GetCurEntry() != nullptr )
{
m_pSelectionToolTipLB->MakeVisible( m_pSelectionToolTipLB->GetCurEntry() );
}
- if ( IsFieldEdit() && m_pSelectionToolTipLB->GetCurEntry() == 0 )
+ if ( IsFieldEdit() && m_pSelectionToolTipLB->GetCurEntry() == nullptr )
{
m_pNameED->SetText(sOldSel);
}
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index ca4a4fa7f0cb..abb00aaefccb 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -66,14 +66,14 @@ SwFieldDlg::SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pPa
GetOKButton().SetClickHdl(LINK(this, SwFieldDlg, OKHdl));
- m_nDokId = AddTabPage("document", SwFieldDokPage::Create, 0);
- m_nVarId = AddTabPage("variables", SwFieldVarPage::Create, 0);
- m_nDokInf = AddTabPage("docinfo", SwFieldDokInfPage::Create, 0);
+ m_nDokId = AddTabPage("document", SwFieldDokPage::Create, nullptr);
+ m_nVarId = AddTabPage("variables", SwFieldVarPage::Create, nullptr);
+ m_nDokInf = AddTabPage("docinfo", SwFieldDokInfPage::Create, nullptr);
if (!m_bHtmlMode)
{
- m_nRefId = AddTabPage("ref", SwFieldRefPage::Create, 0);
- m_nFuncId = AddTabPage("functions", SwFieldFuncPage::Create, 0);
+ m_nRefId = AddTabPage("ref", SwFieldRefPage::Create, nullptr);
+ m_nFuncId = AddTabPage("functions", SwFieldFuncPage::Create, nullptr);
utl::OConfigurationTreeRoot aCfgRoot
= utl::OConfigurationTreeRoot::createWithComponentContext(
@@ -87,7 +87,7 @@ SwFieldDlg::SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pPa
OUString("DatabaseFields")) >>= bDatabaseFields;
if (bDatabaseFields)
- m_nDbId = AddTabPage("database", SwFieldDBPage::Create, 0);
+ m_nDbId = AddTabPage("database", SwFieldDBPage::Create, nullptr);
else
RemoveTabPage("database");
}
@@ -175,7 +175,7 @@ SfxItemSet* SwFieldDlg::CreateInputItemSet( sal_uInt16 nID )
return pISet;
}
else
- return 0;
+ return nullptr;
}
// kick off inserting of new fields
@@ -184,7 +184,7 @@ IMPL_LINK_NOARG_TYPED(SwFieldDlg, OKHdl, Button*, void)
if (GetOKButton().IsEnabled())
{
SfxTabPage* pPage = GetTabPage(GetCurPageId());
- pPage->FillItemSet(0);
+ pPage->FillItemSet(nullptr);
GetOKButton().GrabFocus(); // because of InputField-Dlg
}
@@ -304,7 +304,7 @@ void SwFieldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
if (nId == m_nDbId)
{
SfxDispatcher* pDispatch = m_pBindings->GetDispatcher();
- SfxViewFrame* pViewFrame = pDispatch ? pDispatch->GetFrame() : 0;
+ SfxViewFrame* pViewFrame = pDispatch ? pDispatch->GetFrame() : nullptr;
if(pViewFrame)
{
SfxViewShell* pViewShell = SfxViewShell::GetFirst( true, checkSfxViewShell<SwView> );
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 3dcbf74e2cb6..81e38b8aaf3d 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -354,7 +354,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox)
}
}
}
- if (GetCurField() != NULL && IsFieldEdit())
+ if (GetCurField() != nullptr && IsFieldEdit())
{
// GetFormula leads to problems with date formats because
// only the numeric value without formatting is returned.
@@ -498,7 +498,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox)
pFieldTyp = GetFieldMgr().GetFieldType( RES_SETEXPFLD,
sFieldTypeName );
else
- pFieldTyp = 0;
+ pFieldTyp = nullptr;
}
if( GetCurField() && IsFieldEdit() )
@@ -650,7 +650,7 @@ void SwFieldVarPage::UpdateSubType()
case TYP_SETREFPAGEFLD:
{
- if (GetCurField() != NULL
+ if (GetCurField() != nullptr
&& ((static_cast<SwRefPageSetField*>(GetCurField())->IsOn()
&& i) || (!static_cast<SwRefPageSetField*>(GetCurField())
->IsOn() && !i)))
@@ -682,7 +682,7 @@ void SwFieldVarPage::UpdateSubType()
}
const bool bEnable = m_pSelectionLB->GetEntryCount() != 0;
- ListBox *pLB = 0;
+ ListBox *pLB = nullptr;
if (bEnable)
{
@@ -723,7 +723,7 @@ sal_Int32 SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId)
if( TYP_GETREFPAGEFLD != nTypeId )
{
- if (GetCurField() != NULL && IsFieldEdit())
+ if (GetCurField() != nullptr && IsFieldEdit())
{
bSpecialFormat = GetCurField()->GetFormat() == SAL_MAX_UINT32;
@@ -994,7 +994,7 @@ IMPL_LINK_TYPED( SwFieldVarPage, TBClickHdl, ToolBox *, pBox, void )
else if (nCurId == m_nApplyId)
{
OUString sName(m_pNameED->GetText()), sValue(m_pValueED->GetText());
- SwFieldType* pType = 0;
+ SwFieldType* pType = nullptr;
sal_uInt16 nId = 0;
sal_Int32 nNumFormatPos = m_pNumFormatLB->GetSelectEntryPos();
diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx
index c261f584830a..171bfec91edb 100644
--- a/sw/source/ui/fldui/inpdlg.cxx
+++ b/sw/source/ui/fldui/inpdlg.cxx
@@ -36,9 +36,9 @@ SwFieldInputDlg::SwFieldInputDlg( vcl::Window *pParent, SwWrtShell &rS,
: SvxStandardDialog( pParent, "InputFieldDialog",
"modules/swriter/ui/inputfielddialog.ui")
, rSh( rS )
- , pInpField(0)
- , pSetField(0)
- , pUsrType(0)
+ , pInpField(nullptr)
+ , pSetField(nullptr)
+ , pUsrType(nullptr)
{
get(m_pLabelED, "name");
get(m_pEditED, "text");
@@ -73,7 +73,7 @@ SwFieldInputDlg::SwFieldInputDlg( vcl::Window *pParent, SwWrtShell &rS,
case INP_USR:
// user field
- if( 0 != ( pUsrType = static_cast<SwUserFieldType*>(rSh.GetFieldType(
+ if( nullptr != ( pUsrType = static_cast<SwUserFieldType*>(rSh.GetFieldType(
RES_USERFLD, pInpField->GetPar1() ) ) ) )
aStr = pUsrType->GetContent();
break;
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index ef953516cedd..de2b334556ac 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -45,8 +45,8 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) :
bIsUrl(false),
pSh(pWrtSh),
- pFileDlg(NULL),
- pOldDefDlgParent(NULL)
+ pFileDlg(nullptr),
+ pOldDefDlgParent(nullptr)
{
get(m_pTypeED, "scripttype");
get(m_pUrlRB, "url");
@@ -83,7 +83,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) :
if( !bNew )
SetText( SW_RES( STR_JAVA_EDIT ) );
- RadioButtonHdl(NULL);
+ RadioButtonHdl(nullptr);
}
SwJavaEditDialog::~SwJavaEditDialog()
@@ -118,7 +118,7 @@ IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, PrevHdl, Button*, void)
pMgr->GoPrev();
pField = static_cast<SwScriptField*>(pMgr->GetCurField());
CheckTravel();
- RadioButtonHdl(NULL);
+ RadioButtonHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, NextHdl, Button*, void)
@@ -129,7 +129,7 @@ IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, NextHdl, Button*, void)
pMgr->GoNext();
pField = static_cast<SwScriptField*>(pMgr->GetCurField());
CheckTravel();
- RadioButtonHdl(NULL);
+ RadioButtonHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, OKHdl, Button*, void)
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 5463e135a3f8..21475b35f5e7 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -258,7 +258,7 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
m_nColumnId = AddTabPage("columns", SwColumnPage::Create,
SwColumnPage::GetRanges );
- m_nMacroId = AddTabPage("macros", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), 0);
+ m_nMacroId = AddTabPage("macros", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), nullptr);
break;
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 1e63bb8e6a81..9afdb5f318b0 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -89,10 +89,10 @@ inline bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh)
: SfxModalDialog(pParent, "ColumnDialog", "modules/swriter/ui/columndialog.ui")
, rWrtShell(rSh)
- , pPageSet(0)
- , pSectionSet(0)
- , pSelectionSet(0)
- , pFrameSet(0)
+ , pPageSet(nullptr)
+ , pSectionSet(nullptr)
+ , pSelectionSet(nullptr)
+ , pFrameSet(nullptr)
, nOldSelection(0)
, nSelectionWidth(0)
, bPageChanged(false)
@@ -105,7 +105,7 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh)
nSelectionWidth = aRect.Width();
- SfxItemSet* pColPgSet = 0;
+ SfxItemSet* pColPgSet = nullptr;
static sal_uInt16 const aSectIds[] = { RES_COL, RES_COL,
RES_FRM_SIZE, RES_FRM_SIZE,
RES_COLUMNBALANCE, RES_FRAMEDIR,
@@ -202,7 +202,7 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh)
m_pApplyToLB->RemoveEntry( nPagePos );
m_pApplyToLB->SelectEntryPos(0);
- ObjectHdl(0);
+ ObjectHdl(nullptr);
m_pApplyToLB->SetSelectHdl(LINK(this, SwColumnDlg, ObjectListBoxHdl));
OKButton *pOK = get<OKButton>("ok");
@@ -236,7 +236,7 @@ IMPL_LINK_TYPED(SwColumnDlg, ObjectListBoxHdl, ListBox&, rBox, void)
}
void SwColumnDlg::ObjectHdl(ListBox* pBox)
{
- SfxItemSet* pSet = 0;
+ SfxItemSet* pSet = nullptr;
switch(nOldSelection)
{
case LISTBOX_SELECTION :
@@ -299,7 +299,7 @@ void SwColumnDlg::ObjectHdl(ListBox* pBox)
IMPL_LINK_NOARG_TYPED(SwColumnDlg, OkHdl, Button*, void)
{
// evaluate current selection
- SfxItemSet* pSet = 0;
+ SfxItemSet* pSet = nullptr;
switch(nOldSelection)
{
case LISTBOX_SELECTION :
@@ -407,10 +407,10 @@ void SwColumnPage::ResetColWidth()
// Now as TabPage
SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, "ColumnPage", "modules/swriter/ui/columnpage.ui", &rSet)
- , pColMgr(0)
+ , pColMgr(nullptr)
, nFirstVis(0)
, nMinWidth(MINLAY)
- , pModifiedField(0)
+ , pModifiedField(nullptr)
, bFormat(false)
, bFrm(false)
, bHtmlMode(false)
@@ -535,7 +535,7 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
if ( pDocSh )
{
const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
- if ( pItem != NULL )
+ if ( pItem != nullptr )
pColorList = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
}
@@ -678,7 +678,7 @@ bool SwColumnPage::FillItemSet(SfxItemSet *rSet)
const SfxPoolItem* pOldItem;
const SwFormatCol& rCol = pColMgr->GetColumns();
- if(0 == (pOldItem = GetOldItem( *rSet, RES_COL )) ||
+ if(nullptr == (pOldItem = GetOldItem( *rSet, RES_COL )) ||
rCol != *pOldItem )
rSet->Put(rCol);
@@ -859,7 +859,7 @@ void SwColumnPage::Init()
}
UpdateCols();
- Update(NULL);
+ Update(nullptr);
// set maximum number of columns
// values below 1 are not allowed
@@ -996,7 +996,7 @@ void SwColumnPage::ColModify(NumericField* pNF)
SetLabels( nFirstVis );
UpdateCols();
ResetColWidth();
- Update(NULL);
+ Update(nullptr);
}
}
@@ -1098,7 +1098,7 @@ IMPL_LINK_TYPED( SwColumnPage, AutoWidthHdl, Button*, pButton, void )
}
pColMgr->SetAutoWidth(pBox->IsChecked(), sal_uInt16(nDist));
UpdateCols();
- Update(NULL);
+ Update(nullptr);
}
// scroll up the contents of the edits
@@ -1108,7 +1108,7 @@ IMPL_LINK_NOARG_TYPED(SwColumnPage, Up, Button*, void)
{
--nFirstVis;
SetLabels( nFirstVis );
- Update(NULL);
+ Update(nullptr);
}
}
@@ -1119,7 +1119,7 @@ IMPL_LINK_NOARG_TYPED(SwColumnPage, Down, Button*, void)
{
++nFirstVis;
SetLabels( nFirstVis );
- Update(NULL);
+ Update(nullptr);
}
}
@@ -1162,10 +1162,10 @@ void SwColumnPage::Timeout()
}
}
nColWidth[nChanged] = nNewWidth;
- pModifiedField = 0;
+ pModifiedField = nullptr;
}
- Update(pField ? pField->get() : NULL);
+ Update(pField ? pField->get() : nullptr);
}
// Update the view
@@ -1265,7 +1265,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
if( pColMgr->GetActualSize() != nActWidth)
{
pColMgr->SetActualWidth(nActWidth);
- ColModify( 0 );
+ ColModify( nullptr );
UpdateColMgr( *m_pLineWidthEdit );
}
}
@@ -1325,7 +1325,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
aDistEd1.SetMetricFieldMin(0);
aDistEd2.SetMetricFieldMin(0);
}
- Update(NULL);
+ Update(nullptr);
}
SfxTabPage::sfxpg SwColumnPage::DeactivatePage(SfxItemSet *_pSet)
@@ -1344,7 +1344,7 @@ IMPL_LINK_TYPED( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS, void )
m_pCLNrEdt->SetValue( nItem );
m_pAutoWidthBox->Check();
aDistEd1.SetPrcntValue(0);
- ColModify(0);
+ ColModify(nullptr);
}
else
{
@@ -1352,7 +1352,7 @@ IMPL_LINK_TYPED( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS, void )
m_pCLNrEdt->SetValue( 2 );
m_pAutoWidthBox->Check(false);
aDistEd1.SetPrcntValue(0);
- ColModify(0);
+ ColModify(nullptr);
// now set the width ratio to 2 : 1 or 1 : 2 respectively
const long nSmall = static_cast< long >(pColMgr->GetActualSize() / 3);
if(nItem == 4)
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 2008493285b1..d07c7fb3bd0a 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -318,7 +318,7 @@ IMPL_LINK_NOARG_TYPED(SwCaptionDialog, ModifyHdl, Edit&, void)
bool bNone = sFieldTypeName == m_sNone;
SwFieldType* pType = (bCorrectFieldName && !bNone)
? rSh.GetFieldType( RES_SETEXPFLD, sFieldTypeName )
- : 0;
+ : nullptr;
m_pOKButton->Enable( bCorrectFieldName &&
(!pType ||
static_cast<SwSetExpFieldType*>(pType)->GetType() == nsSwGetSetExpType::GSE_SEQ) );
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 84b88ae6638a..7979913241bd 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -56,7 +56,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
: SfxTabDialog(pViewFrame, pParent, sResType,
"modules/swriter/ui/" +
sResType.toAsciiLowerCase() +
- (".ui"), &rCoreSet, pStr != 0)
+ (".ui"), &rCoreSet, pStr != nullptr)
, m_bFormat(bFormat)
, m_bNew(bNewFrm)
, m_rSet(rCoreSet)
@@ -85,18 +85,18 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
SetText(GetText() + SW_RESSTR(STR_COLL_HEADER) + *pStr + ")");
}
- m_nStdId = AddTabPage("type", SwFrmPage::Create, 0);
- m_nAddId = AddTabPage("options", SwFrmAddPage::Create, 0);
- m_nWrapId = AddTabPage("wrap", SwWrapTabPage::Create, 0);
- m_nUrlId = AddTabPage("hyperlink", SwFrmURLPage::Create, 0);
+ m_nStdId = AddTabPage("type", SwFrmPage::Create, nullptr);
+ m_nAddId = AddTabPage("options", SwFrmAddPage::Create, nullptr);
+ m_nWrapId = AddTabPage("wrap", SwWrapTabPage::Create, nullptr);
+ m_nUrlId = AddTabPage("hyperlink", SwFrmURLPage::Create, nullptr);
if (m_sDlgType == "PictureDialog")
{
- m_nPictureId = AddTabPage("picture", SwGrfExtPage::Create, 0);
+ m_nPictureId = AddTabPage("picture", SwGrfExtPage::Create, nullptr);
m_nCropId = AddTabPage("crop", RID_SVXPAGE_GRFCROP);
}
if (m_sDlgType == "FrameDialog")
{
- m_nColumnId = AddTabPage("columns", SwColumnPage::Create, 0);
+ m_nColumnId = AddTabPage("columns", SwColumnPage::Create, nullptr);
}
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
@@ -108,8 +108,8 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
m_nAreaId = AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
m_nTransparenceId = AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
- m_nMacroId = AddTabPage("macro", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), 0);
- m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), 0);
+ m_nMacroId = AddTabPage("macro", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), nullptr);
+ m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), nullptr);
if(m_bHTMLMode)
{
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index f3b0f1d5ab0b..81d391b4e62c 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -614,14 +614,14 @@ SwFrmPage::SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet)
nUpperBorder(0),
nLowerBorder(0),
fWidthHeightRatio(1.0),
- mpToCharContentPos( NULL ),
+ mpToCharContentPos( nullptr ),
nOldH(text::HoriOrientation::CENTER),
nOldHRel(text::RelOrientation::FRAME),
nOldV(text::VertOrientation::TOP),
nOldVRel(text::RelOrientation::PRINT_AREA),
- pVMap( 0 ),
- pHMap( 0 ),
+ pVMap( nullptr ),
+ pHMap( nullptr ),
m_bAllowVertPositioning( true ),
m_bIsMathOLE( false ),
m_bIsMathBaselineAlignment( true )
@@ -900,7 +900,7 @@ void SwFrmPage::Reset( const SfxItemSet *rSet )
SetMetric( *m_pAtHorzPosED, aMetric );
SetMetric( *m_pAtVertPosED, aMetric );
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
const SwFormatAnchor& rAnchor = static_cast<const SwFormatAnchor&>(rSet->Get(RES_ANCHOR));
if (SfxItemState::SET == rSet->GetItemState(FN_OLE_IS_MATH, false, &pItem))
@@ -1067,7 +1067,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet)
: getFrmDlgParentShell();
OSL_ENSURE( pSh , "shell not found");
const SfxItemSet& rOldSet = GetItemSet();
- const SfxPoolItem* pOldItem = 0;
+ const SfxPoolItem* pOldItem = nullptr;
RndStdIds eAnchorId = (RndStdIds)GetAnchor();
@@ -1077,7 +1077,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet)
if (bNew || !pOldItem || eAnchorId != static_cast<const SwFormatAnchor*>(pOldItem)->GetAnchorId())
{
SwFormatAnchor aAnc( eAnchorId, pSh->GetPhyPageNum() );
- bRet = 0 != rSet->Put( aAnc );
+ bRet = nullptr != rSet->Put( aAnc );
}
}
@@ -1112,7 +1112,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet)
}
if ((bNew && !bFormat) || ((bAtHorzPosModified || bMod) && !bSame))
{
- bRet |= 0 != rSet->Put( aHoriOrient );
+ bRet |= nullptr != rSet->Put( aHoriOrient );
}
}
@@ -1155,7 +1155,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet)
}
if( ( bNew && !bFormat ) || ((bAtVertPosModified || bMod) && !bSame ))
{
- bRet |= 0 != rSet->Put( aVertOrient );
+ bRet |= nullptr != rSet->Put( aVertOrient );
}
}
@@ -1234,7 +1234,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet)
}
}
if( !bFormat && m_pFixedRatioCB->IsValueChangedFromSaved() )
- bRet |= 0 != rSet->Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, m_pFixedRatioCB->IsChecked()));
+ bRet |= nullptr != rSet->Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, m_pFixedRatioCB->IsChecked()));
pOldItem = GetOldItem(*rSet, RES_FRM_SIZE);
@@ -1246,11 +1246,11 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet)
if (aSz.GetHeightSizeType() == ATT_VAR_SIZE) // there is no VAR_SIZE in frames
aSz.SetHeightSizeType(ATT_MIN_SIZE);
- bRet |= 0 != rSet->Put( aSz );
+ bRet |= nullptr != rSet->Put( aSz );
}
if(m_pFollowTextFlowCB->IsValueChangedFromSaved())
{
- bRet |= 0 != rSet->Put(SwFormatFollowTextFlow(m_pFollowTextFlowCB->IsChecked()));
+ bRet |= nullptr != rSet->Put(SwFormatFollowTextFlow(m_pFollowTextFlowCB->IsChecked()));
}
return bRet;
}
@@ -1326,7 +1326,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
else if ( eId == FLY_AS_CHAR )
{
pVMap = bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap;
- pHMap = 0;
+ pHMap = nullptr;
bEnable = false;
}
m_pHorizontalDLB->Enable( bEnable );
@@ -2374,7 +2374,7 @@ void SwFrmPage::EnableVerticalPositioning( bool bEnable )
SwGrfExtPage::SwGrfExtPage(vcl::Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, "PicturePage",
"modules/swriter/ui/picturepage.ui", &rSet)
- , pGrfDlg(0)
+ , pGrfDlg(nullptr)
, bHtmlMode(false)
{
get(m_pMirror, "flipframe");
@@ -2440,7 +2440,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
const SvxProtectItem& rProt = static_cast<const SvxProtectItem& >(rSet.Get(RES_PROTECT));
bool bProtContent = rProt.IsContentProtected();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
bool bEnable = false;
bool bEnableMirrorRB = false;
@@ -2499,7 +2499,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
OUString referer;
SfxStringItem const * it = static_cast<SfxStringItem const *>(
rSet.GetItem(SID_REFERER));
- if (it != 0) {
+ if (it != nullptr) {
referer = it->GetValue();
}
const Graphic* pGrf = rBrush.GetGraphic(referer);
@@ -2784,8 +2784,8 @@ void SwFrmURLPage::Reset( const SfxItemSet *rSet )
INetURLObject::DECODE_UNAMBIGUOUS ));
pNameED->SetText( pFormatURL->GetName());
- pClientCB->Enable( pFormatURL->GetMap() != 0 );
- pClientCB->Check ( pFormatURL->GetMap() != 0 );
+ pClientCB->Enable( pFormatURL->GetMap() != nullptr );
+ pClientCB->Check ( pFormatURL->GetMap() != nullptr );
pServerCB->Check ( pFormatURL->IsServerMap() );
pFrameCB->SetText(pFormatURL->GetTargetFrameName());
@@ -2821,9 +2821,9 @@ bool SwFrmURLPage::FillItemSet(SfxItemSet *rSet)
}
}
- if(!pClientCB->IsChecked() && pFormatURL->GetMap() != 0)
+ if(!pClientCB->IsChecked() && pFormatURL->GetMap() != nullptr)
{
- pFormatURL->SetMap(0);
+ pFormatURL->SetMap(nullptr);
bModified = true;
}
@@ -2864,7 +2864,7 @@ IMPL_LINK_NOARG_TYPED(SwFrmURLPage, InsertFileHdl, Button*, void)
SwFrmAddPage::SwFrmAddPage(vcl::Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, "FrmAddPage" , "modules/swriter/ui/frmaddpage.ui", &rSet)
- , pWrtSh(0)
+ , pWrtSh(nullptr)
, bHtmlMode(false)
, bFormat(false)
, bNew(false)
@@ -3010,12 +3010,12 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet )
const SwFormatChain &rChain = pFormat->GetChain();
const SwFlyFrameFormat* pFlyFormat;
OUString sNextChain, sPrevChain;
- if ((pFlyFormat = rChain.GetPrev()) != 0)
+ if ((pFlyFormat = rChain.GetPrev()) != nullptr)
{
sPrevChain = pFlyFormat->GetName();
}
- if ((pFlyFormat = rChain.GetNext()) != 0)
+ if ((pFlyFormat = rChain.GetNext()) != nullptr)
{
sNextChain = pFlyFormat->GetName();
}
@@ -3120,24 +3120,24 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet)
{
bool bRet = false;
if (pNameED->IsValueChangedFromSaved())
- bRet |= 0 != rSet->Put(SfxStringItem(FN_SET_FRM_NAME, pNameED->GetText()));
+ bRet |= nullptr != rSet->Put(SfxStringItem(FN_SET_FRM_NAME, pNameED->GetText()));
if (pAltNameED->IsValueChangedFromSaved())
- bRet |= 0 != rSet->Put(SfxStringItem(FN_SET_FRM_ALT_NAME, pAltNameED->GetText()));
+ bRet |= nullptr != rSet->Put(SfxStringItem(FN_SET_FRM_ALT_NAME, pAltNameED->GetText()));
const SfxPoolItem* pOldItem;
SvxProtectItem aProt ( static_cast<const SvxProtectItem& >(GetItemSet().Get(RES_PROTECT)) );
aProt.SetContentProtect( pProtectContentCB->IsChecked() );
aProt.SetSizeProtect ( pProtectSizeCB->IsChecked() );
aProt.SetPosProtect ( pProtectFrameCB->IsChecked() );
- if ( 0 == (pOldItem = GetOldItem(*rSet, FN_SET_PROTECT)) ||
+ if ( nullptr == (pOldItem = GetOldItem(*rSet, FN_SET_PROTECT)) ||
aProt != *pOldItem )
- bRet |= 0 != rSet->Put( aProt);
+ bRet |= nullptr != rSet->Put( aProt);
if ( pEditInReadonlyCB->IsValueChangedFromSaved() )
- bRet |= 0 != rSet->Put( SwFormatEditInReadonly( RES_EDIT_IN_READONLY, pEditInReadonlyCB->IsChecked()));
+ bRet |= nullptr != rSet->Put( SwFormatEditInReadonly( RES_EDIT_IN_READONLY, pEditInReadonlyCB->IsChecked()));
if ( pPrintFrameCB->IsValueChangedFromSaved() )
- bRet |= 0 != rSet->Put( SvxPrintItem( RES_PRINT, pPrintFrameCB->IsChecked()));
+ bRet |= nullptr != rSet->Put( SvxPrintItem( RES_PRINT, pPrintFrameCB->IsChecked()));
// textflow
if( pTextFlowLB->IsVisible() )
@@ -3146,7 +3146,7 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet)
if( pTextFlowLB->IsValueChangedFromSaved() )
{
sal_uInt16 nData = (sal_uInt16)reinterpret_cast<sal_IntPtr>(pTextFlowLB->GetEntryData( nPos ));
- bRet |= 0 != rSet->Put( SvxFrameDirectionItem(
+ bRet |= nullptr != rSet->Put( SvxFrameDirectionItem(
(SvxFrameDirection)nData, RES_FRAMEDIR ));
}
}
@@ -3163,15 +3163,15 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet)
const SwFormatChain &rChain = pFormat->GetChain();
const SwFlyFrameFormat* pFlyFormat;
OUString sNextChain, sPrevChain;
- if ((pFlyFormat = rChain.GetPrev()) != 0)
+ if ((pFlyFormat = rChain.GetPrev()) != nullptr)
sPrevChain = pFlyFormat->GetName();
- if ((pFlyFormat = rChain.GetNext()) != 0)
+ if ((pFlyFormat = rChain.GetNext()) != nullptr)
sNextChain = pFlyFormat->GetName();
if(sPrevChain != sCurrentPrevChain)
- bRet |= 0 != rSet->Put(SfxStringItem(FN_PARAM_CHAIN_PREVIOUS, sCurrentPrevChain));
+ bRet |= nullptr != rSet->Put(SfxStringItem(FN_PARAM_CHAIN_PREVIOUS, sCurrentPrevChain));
if(sNextChain != sCurrentNextChain)
- bRet |= 0 != rSet->Put(SfxStringItem(FN_PARAM_CHAIN_NEXT, sCurrentNextChain));
+ bRet |= nullptr != rSet->Put(SfxStringItem(FN_PARAM_CHAIN_NEXT, sCurrentNextChain));
}
}
@@ -3185,7 +3185,7 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet)
case 1 : nAdjust = SDRTEXTVERTADJUST_CENTER; break;
case 2 : nAdjust = SDRTEXTVERTADJUST_BOTTOM; break;
}
- bRet |= 0 != rSet->Put(SdrTextVertAdjustItem(nAdjust, RES_TEXT_VERT_ADJUST));
+ bRet |= nullptr != rSet->Put(SdrTextVertAdjustItem(nAdjust, RES_TEXT_VERT_ADJUST));
}
return bRet;
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index d30e3edc58a3..2f56c86bd372 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -71,7 +71,7 @@ SwWrapTabPage::SwWrapTabPage(vcl::Window *pParent, const SfxItemSet &rSet)
, m_nOldLowerMargin(0)
, m_nAnchorId(FLY_AT_PARA)
, m_nHtmlMode(0)
- , m_pWrtSh(0)
+ , m_pWrtSh(nullptr)
, m_bFormat(false)
, m_bNew(true)
, m_bHtmlMode(false)
@@ -222,7 +222,7 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet)
m_pWrapThroughRB->Enable(!m_pWrapOutlineCB->IsChecked());
m_bContourImage = !bContour;
- RadioButton* pBtn = NULL;
+ RadioButton* pBtn = nullptr;
switch (nSur)
{
@@ -286,7 +286,7 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet)
m_pTopMarginED->SetValue(m_pTopMarginED->Normalize(rUL.GetUpper()), FUNIT_TWIP);
m_pBottomMarginED->SetValue(m_pBottomMarginED->Normalize(rUL.GetLower()), FUNIT_TWIP);
- ContourHdl(0);
+ ContourHdl(nullptr);
ActivatePage( *rSet );
}
@@ -331,7 +331,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
if ( bContour )
aSur.SetOutside(m_pWrapOutsideCB->IsChecked());
- if(0 == (pOldItem = GetOldItem( *rSet, RES_SURROUND )) ||
+ if(nullptr == (pOldItem = GetOldItem( *rSet, RES_SURROUND )) ||
aSur != *pOldItem )
{
rSet->Put(aSur);
@@ -340,7 +340,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
if (!m_bDrawMode)
{
- if(0 == (pOldItem = GetOldItem( *rSet, FN_OPAQUE )) ||
+ if(nullptr == (pOldItem = GetOldItem( *rSet, FN_OPAQUE )) ||
aOp != *pOldItem )
{
rSet->Put(aOp);
@@ -357,7 +357,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
if ( bTopMod || bBottomMod )
{
- if(0 == (pOldItem = GetOldItem(*rSet, RES_UL_SPACE)) ||
+ if(nullptr == (pOldItem = GetOldItem(*rSet, RES_UL_SPACE)) ||
aUL != *pOldItem )
{
rSet->Put( aUL, RES_UL_SPACE );
@@ -374,7 +374,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
if ( bLeftMod || bRightMod )
{
- if( 0 == (pOldItem = GetOldItem(*rSet, RES_LR_SPACE)) ||
+ if( nullptr == (pOldItem = GetOldItem(*rSet, RES_LR_SPACE)) ||
aLR != *pOldItem )
{
rSet->Put(aLR, RES_LR_SPACE);
@@ -386,7 +386,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
{
bool bChecked = m_pWrapTransparentCB->IsChecked() && m_pWrapTransparentCB->IsEnabled();
if ((m_pWrapTransparentCB->GetSavedValue() == 1) != bChecked)
- bModified |= 0 != rSet->Put(SfxInt16Item(FN_DRAW_WRAP_DLG, bChecked ? 0 : 1));
+ bModified |= nullptr != rSet->Put(SfxInt16Item(FN_DRAW_WRAP_DLG, bChecked ? 0 : 1));
}
return bModified;
@@ -448,7 +448,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aVal.nHeight = aSize.Height();
m_aFrmSize = aSize;
- aMgr.ValidateMetrics(aVal, 0);
+ aMgr.ValidateMetrics(aVal, nullptr);
SwTwips nLeft;
SwTwips nRight;
@@ -575,7 +575,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
((m_nAnchorId == FLY_AT_PARA) || (m_nAnchorId == FLY_AT_CHAR))
&& nSur != SURROUND_NONE );
}
- ContourHdl(0);
+ ContourHdl(nullptr);
}
SfxTabPage::sfxpg SwWrapTabPage::DeactivatePage(SfxItemSet* _pSet)
@@ -595,7 +595,7 @@ IMPL_LINK_TYPED( SwWrapTabPage, RangeModifyHdl, SpinField&, rSpin, void )
{
MetricField& rEdit = static_cast<MetricField&>(rSpin);
sal_Int64 nValue = rEdit.GetValue();
- MetricField *pOpposite = 0;
+ MetricField *pOpposite = nullptr;
if (&rEdit == m_pLeftMarginED)
pOpposite = m_pRightMarginED;
else if (&rEdit == m_pRightMarginED)
@@ -627,7 +627,7 @@ IMPL_LINK_TYPED( SwWrapTabPage, WrapTypeHdl, Button *, pBtn, void )
((m_nAnchorId == FLY_AT_PARA) || (m_nAnchorId == FLY_AT_CHAR)) &&
(pBtn != m_pNoWrapRB) );
- ContourHdl(0);
+ ContourHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SwWrapTabPage, ContourHdl, Button*, void)
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index b77979663e4f..b0b938ef575c 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -226,7 +226,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
"modules/swriter/ui/tocdialog.ui", &rSet)
, pMgr( new SwTOXMgr( &rShell ) )
, rSh(rShell)
- , pExampleFrame(0)
+ , pExampleFrame(nullptr)
, pParamTOXBase(pCurTOX)
, sUserDefinedIndex(SW_RESSTR(STR_USER_DEFINED_INDEX))
, nInitialTOXType(nToxType)
@@ -257,8 +257,8 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
}
for(int i = nTypeCount - 1; i > -1; i--)
{
- pFormArr[i] = 0;
- pDescArr[i] = 0;
+ pFormArr[i] = nullptr;
+ pDescArr[i] = nullptr;
pxIndexSectionsArr[i] = new SwIndexSections_Impl;
if(pCurTOX)
{
@@ -303,11 +303,11 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
}
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- m_nSelectId = AddTabPage("index", SwTOXSelectTabPage::Create, 0);
- m_nStylesId = AddTabPage("styles", SwTOXStylesTabPage::Create, 0);
- m_nColumnId = AddTabPage("columns", SwColumnPage::Create, 0);
- m_nBackGroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0);
- m_nEntriesId = AddTabPage("entries", SwTOXEntryTabPage::Create, 0);
+ m_nSelectId = AddTabPage("index", SwTOXSelectTabPage::Create, nullptr);
+ m_nStylesId = AddTabPage("styles", SwTOXStylesTabPage::Create, nullptr);
+ m_nColumnId = AddTabPage("columns", SwColumnPage::Create, nullptr);
+ m_nBackGroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr);
+ m_nEntriesId = AddTabPage("entries", SwTOXEntryTabPage::Create, nullptr);
if(!pCurTOX)
SetCurPageId(m_nSelectId);
@@ -322,7 +322,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
if(!m_pShowExampleCB->IsChecked())
SetViewWindow(m_pExampleContainerWIN);
- ShowPreviewHdl(0);
+ ShowPreviewHdl(nullptr);
}
SwMultiTOXTabDialog::~SwMultiTOXTabDialog()
@@ -393,7 +393,7 @@ short SwMultiTOXTabDialog::Ok()
rDesc.ApplyTo(aNewDef);
if(!bGlobalFlag)
pMgr->UpdateOrInsertTOX(
- rDesc, 0, GetOutputItemSet());
+ rDesc, nullptr, GetOutputItemSet());
else if(bEditTOX)
pMgr->UpdateOrInsertTOX(
rDesc, &pParamTOXBase, GetOutputItemSet());
@@ -506,7 +506,7 @@ IMPL_LINK_NOARG_TYPED( SwMultiTOXTabDialog, ShowPreviewHdl, Button*, void )
if(!pExampleFrame->IsServiceAvailable())
{
- SwOneExampleFrame::CreateErrorMessage(0);
+ SwOneExampleFrame::CreateErrorMessage(nullptr);
}
}
m_pShowExampleCB->Show(pExampleFrame && pExampleFrame->IsServiceAvailable());
@@ -516,7 +516,7 @@ IMPL_LINK_NOARG_TYPED( SwMultiTOXTabDialog, ShowPreviewHdl, Button*, void )
&& pExampleFrame && pExampleFrame->IsServiceAvailable();
m_pExampleContainerWIN->Show( bSetViewWindow );
- SetViewWindow( bSetViewWindow ? m_pExampleContainerWIN.get() : 0 );
+ SetViewWindow( bSetViewWindow ? m_pExampleContainerWIN.get() : nullptr );
setOptimalLayoutSize();
}
@@ -693,7 +693,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(vcl::Window* pParent,
}
// now the other styles
- const SwTextFormatColl *pColl = 0;
+ const SwTextFormatColl *pColl = nullptr;
const sal_uInt16 nSz = rWrtSh.GetTextFormatCollCount();
for ( sal_uInt16 j = 0;j < nSz; ++j )
@@ -790,7 +790,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r
: SfxTabPage(pParent, "TocIndexPage",
"modules/swriter/ui/tocindexpage.ui", &rAttrSet)
, aFromNames(SW_RES(RES_SRCTYPES))
- , pIndexRes(0)
+ , pIndexRes(nullptr)
, sAutoMarkType(SW_RESSTR(STR_AUTOMARK_TYPE))
, m_bWaitingInitialSettings(true)
{
@@ -852,7 +852,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r
//Default mode is arranged to be the tallest mode
//of alphabetical index, lock that height in now
- LanguageHdl(0); //fill sort algorithm list
+ LanguageHdl(nullptr); //fill sort algorithm list
Size aPrefSize(get_preferred_size());
set_height_request(aPrefSize.Height());
@@ -1133,7 +1133,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
aStyleArr[i] = rDesc.GetStyleNames(i);
m_pLanguageLB->SelectLanguage(rDesc.GetLanguage());
- LanguageHdl(0);
+ LanguageHdl(nullptr);
for( sal_Int32 nCnt = 0; nCnt < m_pSortAlgorithmLB->GetEntryCount(); ++nCnt )
{
const OUString* pEntryData = static_cast<const OUString*>(m_pSortAlgorithmLB->GetEntryData( nCnt ));
@@ -1450,13 +1450,13 @@ void SwTOXSelectTabPage::LanguageHdl( ListBox* pBox )
OUString sOldString;
void* pUserData;
- if( 0 != (pUserData = m_pSortAlgorithmLB->GetSelectEntryData()) )
+ if( nullptr != (pUserData = m_pSortAlgorithmLB->GetSelectEntryData()) )
sOldString = *static_cast<OUString*>(pUserData);
sal_Int32 nEnd = m_pSortAlgorithmLB->GetEntryCount();
for( sal_Int32 n = 0; n < nEnd; ++n )
{
void* pDel = m_pSortAlgorithmLB->GetEntryData( n );
- if( 0 != pDel )
+ if( nullptr != pDel )
delete static_cast<OUString*>(pDel);
}
m_pSortAlgorithmLB->Clear();
@@ -1745,7 +1745,7 @@ void SwTOXButton::RequestHelp( const HelpEvent& rHEvt )
SwIdxTreeListBox::SwIdxTreeListBox(vcl::Window* pPar, WinBits nStyle)
: SvTreeListBox(pPar, nStyle)
- , pParent(NULL)
+ , pParent(nullptr)
{
}
@@ -1813,7 +1813,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(vcl::Window* pParent, const SfxItemSet& rAt
, sDelimStr(SW_RESSTR(STR_DELIM))
, sNoCharStyle(SW_RESSTR(STR_NO_CHAR_STYLE))
, sNoCharSortKey(SW_RESSTR(STR_NOSORTKEY))
- , m_pCurrentForm(0)
+ , m_pCurrentForm(nullptr)
, bInLevelHdl(false)
{
get(m_pLevelFT, "levelft");
@@ -2265,7 +2265,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, RemoveInsertAuthHdl, Button*, pButton, void)
m_pTokenWIN->RemoveControl(static_cast<SwTOXButton*>(pCtrl));
}
}
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
void SwTOXEntryTabPage::PreTokenButtonRemoved(const SwFormToken& rToken)
@@ -2353,7 +2353,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, InsertTokenHdl, Button*, pBtn, void)
aInsert.nTabStopPosition = 0;
aInsert.nChapterFormat = nChapterFormat; // i89791
m_pTokenWIN->InsertAtSelection(sText, aInsert);
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SwTOXEntryTabPage, AllLevelsHdl, Button*, void)
@@ -2561,7 +2561,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, StyleSelectHdl, ListBox&, rBox, void)
static_cast<SwTOXButton*>(pCtrl)->SetCharStyleName(sEntry, nId);
}
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
IMPL_LINK_TYPED(SwTOXEntryTabPage, ChapterInfoHdl, ListBox&, rBox, void)
@@ -2574,7 +2574,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, ChapterInfoHdl, ListBox&, rBox, void)
if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
static_cast<SwTOXButton*>(pCtrl)->SetChapterInfo(nPos);
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
}
@@ -2587,7 +2587,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, ChapterInfoOutlineHdl, Edit&, rEdit, void)
if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
static_cast<SwTOXButton*>(pCtrl)->SetOutlineLevel(nLevel);
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
IMPL_LINK_TYPED(SwTOXEntryTabPage, NumberFormatHdl, ListBox&, rBox, void)
@@ -2602,7 +2602,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, NumberFormatHdl, ListBox&, rBox, void)
{
static_cast<SwTOXButton*>(pCtrl)->SetEntryNumberFormat(nPos);//i89791
}
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
}
@@ -2618,7 +2618,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, TabPosHdl, Edit&, rEdit, void)
static_cast<SwTOXButton*>(pCtrl)->SetTabPosition( static_cast< SwTwips >(
pField->Denormalize( pField->GetValue( FUNIT_TWIP ))));
}
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
IMPL_LINK_TYPED(SwTOXEntryTabPage, FillCharHdl, Edit&, rBox, void)
@@ -2636,7 +2636,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, FillCharHdl, Edit&, rBox, void)
cSet = ' ';
static_cast<SwTOXButton*>(pCtrl)->SetFillChar( cSet );
}
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
IMPL_LINK_TYPED(SwTOXEntryTabPage, AutoRightHdl, Button*, pBox, void)
@@ -2654,7 +2654,7 @@ IMPL_LINK_TYPED(SwTOXEntryTabPage, AutoRightHdl, Button*, pBox, void)
bChecked ? SVX_TAB_ADJUST_END : SVX_TAB_ADJUST_LEFT);
m_pTabPosFT->Enable(!bChecked);
m_pTabPosMF->Enable(!bChecked);
- ModifyHdl(0);
+ ModifyHdl(nullptr);
}
void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh)
@@ -2694,12 +2694,12 @@ OUString SwTOXEntryTabPage::GetLevelHelp(sal_uInt16 nLevel) const
SwTokenWindow::SwTokenWindow(vcl::Window* pParent)
: VclHBox(pParent)
- , pForm(0)
+ , pForm(nullptr)
, nLevel(0)
, bValid(false)
, sCharStyle(SW_RESSTR(STR_CHARSTYLE))
- , pActiveCtrl(0)
- , m_pParent(NULL)
+ , pActiveCtrl(nullptr)
+ , m_pParent(nullptr)
{
m_pUIBuilder = new VclBuilder(this, getUIRootDir(),
"modules/swriter/ui/tokenwidget.ui", "TokenWidget");
@@ -2776,7 +2776,7 @@ void SwTokenWindow::dispose()
void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
{
- SetActiveControl(0);
+ SetActiveControl(nullptr);
bValid = true;
if(pForm)
@@ -2799,7 +2799,7 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
SwFormTokens::iterator aIt = aPattern.begin();
bool bLastWasText = false; //assure alternating text - code - text
- Control* pSetActiveControl = 0;
+ Control* pSetActiveControl = nullptr;
while(aIt != aPattern.end()) // #i21237#
{
SwFormToken aToken(*aIt); // #i21237#
@@ -2878,7 +2878,7 @@ void SwTokenWindow::SetActiveControl(Control* pSet)
Control* SwTokenWindow::InsertItem(const OUString& rText, const SwFormToken& rToken)
{
- Control* pRet = 0;
+ Control* pRet = nullptr;
Size aControlSize(m_pCtrlParentWin->GetSizePixel());
Point aControlPos;
@@ -2981,8 +2981,8 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken&
bool bPreStartLinkFound = false;
bool bPreEndLinkFound = false;
- const Control* pControl = 0;
- const Control* pExchange = 0;
+ const Control* pControl = nullptr;
+ const Control* pExchange = nullptr;
ctrl_const_iterator it = aControlList.begin();
for( ; it != aControlList.end() && pActiveCtrl != (*it); ++it )
@@ -2997,7 +2997,7 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken&
if( TOKEN_LINK_START == rNewToken.eTokenType )
{
bPreStartLinkFound = true;
- pExchange = 0;
+ pExchange = nullptr;
}
else if(TOKEN_LINK_END == rNewToken.eTokenType)
{
@@ -3038,7 +3038,7 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken&
if(bPostLinkStartFound)
{
bPostLinkStartFound = false;
- pExchange = 0;
+ pExchange = nullptr;
}
break;
}
@@ -3197,7 +3197,7 @@ void SwTokenWindow::RemoveControl(SwTOXButton* pDel, bool bInternalCall )
SetActiveControl(pLeftEdit);
AdjustPositions();
- aModifyHdl.Call(0);
+ aModifyHdl.Call(nullptr);
}
void SwTokenWindow::AdjustPositions()
@@ -3369,7 +3369,7 @@ IMPL_LINK_TYPED(SwTokenWindow, ScrollHdl, Button*, pBtn, void )
// move the complete list
MoveControls(nMove);
- Control *pCtrl = 0;
+ Control *pCtrl = nullptr;
pCtrl = *(aControlList.begin());
m_pLeftScrollWin->Enable(pCtrl->GetPosPixel().X() < 0);
@@ -3464,7 +3464,7 @@ IMPL_LINK_TYPED(SwTokenWindow, EditResize, Edit&, rEdit, void)
{
static_cast<SwTOXEdit*>(&rEdit)->AdjustSize();
AdjustPositions();
- aModifyHdl.Call(0);
+ aModifyHdl.Call(nullptr);
}
IMPL_LINK_TYPED(SwTokenWindow, NextItemHdl, SwTOXEdit&, rEdit, void)
@@ -3611,7 +3611,7 @@ sal_uInt32 SwTokenWindow::GetControlIndex(FormTokenType eType) const
SwTOXStylesTabPage::SwTOXStylesTabPage(vcl::Window* pParent, const SfxItemSet& rAttrSet )
: SfxTabPage(pParent, "TocStylesPage",
"modules/swriter/ui/tocstylespage.ui", &rAttrSet)
- , m_pCurrentForm(0)
+ , m_pCurrentForm(nullptr)
{
get(m_pLevelLB, "levels");
get(m_pAssignBT, "assign");
@@ -4002,7 +4002,7 @@ bool SwEntryBrowseBox::SaveModified()
OUString sNew;
bool bVal = false;
- ::svt::CellController* pController = 0;
+ ::svt::CellController* pController = nullptr;
if(nCol < ITEM_CASE)
{
pController = xController;
@@ -4059,7 +4059,7 @@ void SwEntryBrowseBox::InitController(
void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
{
- AutoMarkEntry* pToInsert = 0;
+ AutoMarkEntry* pToInsert = nullptr;
rtl_TextEncoding eTEnc = osl_getThreadTextEncoding();
while( !rInStr.GetError() && !rInStr.IsEof() )
{
@@ -4092,7 +4092,7 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
pToInsert->bWord = !sStr.isEmpty() && sStr != "0";
m_Entries.push_back(std::unique_ptr<AutoMarkEntry>(pToInsert));
- pToInsert = 0;
+ pToInsert = nullptr;
}
else
{
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index c2f4fa4aca09..9acc2be6a841 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -87,8 +87,8 @@ SwIndexMarkPane::SwIndexMarkPane(Dialog &rDialog, bool bNewDlg,
, bPhoneticED2_ChangedByUser(false)
, nLangForPhoneticReading(LANGUAGE_CHINESE_SIMPLIFIED)
, bIsPhoneticReadingEnabled(false)
- , xExtendedIndexEntrySupplier(NULL)
- , pTOXMgr(0)
+ , xExtendedIndexEntrySupplier(nullptr)
+ , pTOXMgr(nullptr)
, pSh(&rWrtShell)
{
rDialog.get(m_pFrame, "frame");
@@ -266,7 +266,7 @@ void SwIndexMarkPane::InitControls()
//to include all equal entries may only be allowed in the body and even there
//only when a simple selection exists
- const FrmTypeFlags nFrmType = pSh->GetFrmType(0,true);
+ const FrmTypeFlags nFrmType = pSh->GetFrmType(nullptr,true);
m_pApplyToAllCB->Show();
m_pSearchCaseSensitiveCB->Show();
m_pSearchCaseWordOnlyCB->Show();
@@ -354,7 +354,7 @@ void SwIndexMarkPane::Activate()
//to include all equal entries may only be allowed in the body and even there
//only when a simple selection exists
- const FrmTypeFlags nFrmType = pSh->GetFrmType(0,true);
+ const FrmTypeFlags nFrmType = pSh->GetFrmType(nullptr,true);
m_pApplyToAllCB->Show();
m_pSearchCaseSensitiveCB->Show();
m_pSearchCaseWordOnlyCB->Show();
@@ -371,7 +371,7 @@ void SwIndexMarkPane::Apply()
{
InsertUpdate();
if(bSelected)
- pSh->ResetSelect(0, false);
+ pSh->ResetSelect(nullptr, false);
}
// apply changes
@@ -488,7 +488,7 @@ void SwIndexMarkPane::InsertMark()
void SwIndexMarkPane::UpdateMark()
{
OUString aAltText(m_pEntryED->GetText());
- OUString* pAltText = aOrgStr != m_pEntryED->GetText() ? &aAltText : 0;
+ OUString* pAltText = aOrgStr != m_pEntryED->GetText() ? &aAltText : nullptr;
//empty alternative texts are not allowed
if(pAltText && pAltText->isEmpty())
return;
@@ -977,7 +977,7 @@ void SwIndexMarkModalDlg::Apply()
void SwIndexMarkModalDlg::dispose()
{
- SwViewShell::SetCareWin(0);
+ SwViewShell::SetCareWin(nullptr);
SvxStandardDialog::dispose();
}
@@ -1063,7 +1063,7 @@ SwAuthorMarkPane::SwAuthorMarkPane(Dialog &rDialog, bool bNewDlg)
: m_rDialog(rDialog)
, bNewEntry(bNewDlg)
, bBibAccessInitialized(false)
- , pSh(0)
+ , pSh(nullptr)
{
m_rDialog.get(m_pFromComponentRB, "frombibliography");
m_rDialog.get(m_pFromDocContentRB, "fromdocument");
@@ -1165,7 +1165,7 @@ IMPL_LINK_TYPED( SwAuthorMarkPane, CompEntryHdl, ListBox&, rBox, void)
{
const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>(
pSh->GetFieldType(RES_AUTHORITY, OUString()));
- const SwAuthEntry* pEntry = pFType ? pFType->GetEntryByIdentifier(sEntry) : 0;
+ const SwAuthEntry* pEntry = pFType ? pFType->GetEntryByIdentifier(sEntry) : nullptr;
for(int i = 0; i < AUTH_FIELD_END; i++)
m_sFields[i] = pEntry ?
pEntry->GetAuthorField((ToxAuthorityField)i) : OUString();
@@ -1193,7 +1193,7 @@ IMPL_LINK_NOARG_TYPED(SwAuthorMarkPane, InsertHdl, Button*, void)
pSh->GetFieldType(RES_AUTHORITY, OUString()));
const SwAuthEntry* pEntry = pFType ?
pFType->GetEntryByIdentifier( m_sFields[AUTH_FIELD_IDENTIFIER])
- : 0;
+ : nullptr;
if(pEntry)
{
for(int i = 0; i < AUTH_FIELD_END && !bDifferent; i++)
@@ -1230,7 +1230,7 @@ IMPL_LINK_NOARG_TYPED(SwAuthorMarkPane, InsertHdl, Button*, void)
}
}
if(!bNewEntry)
- CloseHdl(0);
+ CloseHdl(nullptr);
}
IMPL_LINK_TYPED(SwAuthorMarkPane, CreateEntryHdl, Button*, pButton, void)
@@ -1417,8 +1417,8 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(vcl::Window* pParent,
,
- pTypeListBox(0),
- pIdentifierBox(0),
+ pTypeListBox(nullptr),
+ pIdentifierBox(nullptr),
rWrtSh(rSh),
m_bNewEntryMode(bNewEntry),
m_bNameAllowed(true)
@@ -1440,7 +1440,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(vcl::Window* pParent,
pFixedTexts[nIndex]->set_grid_top_attach(bLeft ? nLeftRow : nRightRow);
pFixedTexts[nIndex]->SetText(SW_RES(STR_AUTH_FIELD_START + aCurInfo.nToxField));
pFixedTexts[nIndex]->Show();
- pEdits[nIndex] = 0;
+ pEdits[nIndex] = nullptr;
if( AUTH_FIELD_AUTHORITY_TYPE == aCurInfo.nToxField )
{
pTypeListBox = VclPtr<ListBox>::Create(bLeft ? pLeft : pRight, WB_DROPDOWN|WB_BORDER|WB_VCENTER);
@@ -1634,7 +1634,7 @@ SwAuthMarkModalDlg::SwAuthMarkModalDlg(vcl::Window *pParent, SwWrtShell& rSh)
void SwAuthMarkModalDlg::Apply()
{
- m_aContent.InsertHdl(0);
+ m_aContent.InsertHdl(nullptr);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 86fde7dbe628..5f32002007d0 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -47,8 +47,8 @@ SwFootNoteOptionDlg::SwFootNoteOptionDlg(vcl::Window *pParent, SwWrtShell &rS)
aOldOkHdl = GetOKButton().GetClickHdl();
GetOKButton().SetClickHdl( LINK( this, SwFootNoteOptionDlg, OkHdl ) );
- m_nFootNoteId = AddTabPage( "footnotes", SwFootNoteOptionPage::Create, 0 );
- m_nEndNoteId = AddTabPage( "endnotes", SwEndNoteOptionPage::Create, 0 );
+ m_nFootNoteId = AddTabPage( "footnotes", SwFootNoteOptionPage::Create, nullptr );
+ m_nEndNoteId = AddTabPage( "endnotes", SwEndNoteOptionPage::Create, nullptr );
}
void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage )
@@ -74,13 +74,13 @@ SwEndNoteOptionPage::SwEndNoteOptionPage(vcl::Window *pParent, bool bEN,
bEN ? OString("EndnotePage") : OString("FootnotePage"),
bEN ? OUString("modules/swriter/ui/endnotepage.ui") : OUString("modules/swriter/ui/footnotepage.ui"),
&rSet)
- , m_pNumCountBox(NULL)
- , m_pPosFT(NULL)
- , m_pPosPageBox(NULL)
- , m_pPosChapterBox(NULL)
- , m_pContEdit(NULL)
- , m_pContFromEdit(NULL)
- , pSh(0)
+ , m_pNumCountBox(nullptr)
+ , m_pPosFT(nullptr)
+ , m_pPosPageBox(nullptr)
+ , m_pPosChapterBox(nullptr)
+ , m_pContEdit(nullptr)
+ , m_pContFromEdit(nullptr)
+ , pSh(nullptr)
, bPosDoc(false)
, bEndNote(bEN)
{
@@ -338,7 +338,7 @@ IMPL_LINK_NOARG_TYPED(SwEndNoteOptionPage, PosChapterHdl, Button*, void)
static SwCharFormat* lcl_GetCharFormat( SwWrtShell* pSh, const OUString& rCharFormatName )
{
- SwCharFormat* pFormat = 0;
+ SwCharFormat* pFormat = nullptr;
const sal_uInt16 nChCount = pSh->GetCharFormatCount();
for(sal_uInt16 i = 0; i< nChCount; i++)
{
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 6f94e2c7c6a0..3b62c88e7ee2 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -192,7 +192,7 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame,
: SvxStandardDialog(&pViewFrame->GetWindow(), "AutoTextDialog",
"modules/swriter/ui/autotext.ui")
, sReadonlyPath(SW_RESSTR(STR_READONLY_PATH))
- , pExampleFrame(0)
+ , pExampleFrame(nullptr)
, pGlossaryHdl(pGlosHdl)
, bResume(false)
, bSelection(pWrtShell->IsSelection())
@@ -367,7 +367,7 @@ SvTreeListEntry* SwGlossaryDlg::DoesBlockExist(const OUString& rBlock,
}
}
}
- return 0;
+ return nullptr;
}
IMPL_LINK_TYPED( SwGlossaryDlg, NameModify, Edit&, rEdit, void )
@@ -423,7 +423,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, EnableHdl, Menu *, pMn, bool )
const OUString aEditText(m_pNameED->GetText());
const bool bHasEntry = !aEditText.isEmpty() && !m_pShortNameEdit->GetText().isEmpty();
- const bool bExists = 0 != DoesBlockExist(aEditText, m_pShortNameEdit->GetText());
+ const bool bExists = nullptr != DoesBlockExist(aEditText, m_pShortNameEdit->GetText());
const bool bIsGroup = pEntry && !m_pCategoryBox->GetParent(pEntry);
pMn->EnableItem("new", bSelection && bHasEntry && !bExists);
pMn->EnableItem("newtext", bSelection && bHasEntry && !bExists);
@@ -693,7 +693,7 @@ void SwGlossaryDlg::Init()
m_pCategoryBox->Clear();
// display text block regions
const size_t nCnt = pGlossaryHdl->GetGroupCnt();
- SvTreeListEntry* pSelEntry = 0;
+ SvTreeListEntry* pSelEntry = nullptr;
const OUString sSelStr(::GetCurrGlosGroup().getToken(0, GLOS_DELIM));
const sal_Int32 nSelPath = ::GetCurrGlosGroup().getToken(1, GLOS_DELIM).toInt32();
// #i66304# - "My AutoText" comes from mytexts.bau, but should be translated
@@ -836,7 +836,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, CheckBoxHdl, Button *, pBox, void )
SwGlTreeListBox::SwGlTreeListBox(vcl::Window* pParent, WinBits nBits)
: SvTreeListBox(pParent, nBits)
, sReadonly(SW_RESSTR(SW_STR_READONLY)),
- pDragEntry(0)
+ pDragEntry(nullptr)
{
SetDragDropMode( DragDropMode::CTRL_MOVE|DragDropMode::CTRL_COPY );
}
@@ -970,7 +970,7 @@ TriState SwGlTreeListBox::NotifyCopyingOrMoving(
SvTreeListEntry* pEntry,
bool bIsMove)
{
- pDragEntry = 0;
+ pDragEntry = nullptr;
// 1. move in different groups?
// 2. allowed to write to both groups?
if(!pTarget) // move to the beginning
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 8f0f7247e7e0..5565cb7aa6de 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -68,7 +68,7 @@ void SwInsFootNoteDlg::Apply()
eCharSet, RES_CHRATR_FONT );
aSet.Put( aFont );
rSh.SetAttrSet( aSet, SetAttrMode::DONTEXPAND );
- rSh.ResetSelect(0, false);
+ rSh.ResetSelect(nullptr, false);
rSh.Left(CRSR_SKIP_CHARS, false, 1, false );
}
rSh.EndUndo( UNDO_END );
@@ -143,7 +143,7 @@ IMPL_LINK_TYPED( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn, void )
Apply();
// go to the next foot/endnote here
- rSh.ResetSelect(0, false);
+ rSh.ResetSelect(nullptr, false);
if (pBtn == m_pNextBT)
rSh.GotoNextFootnoteAnchor();
else
@@ -198,10 +198,10 @@ SwInsFootNoteDlg::~SwInsFootNoteDlg()
void SwInsFootNoteDlg::dispose()
{
- SwViewShell::SetCareWin(0);
+ SwViewShell::SetCareWin(nullptr);
if (bEdit)
- rSh.ResetSelect(0, false);
+ rSh.ResetSelect(nullptr, false);
m_pNumberFrame.clear();
m_pNumberAutoBtn.clear();
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 2589db7bbb9d..008dd90f91cd 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -43,7 +43,7 @@ static rtl::Reference<SwDocStyleSheet> lcl_getDocStyleSheet(const OUString& rNam
SfxStyleSheetBase* pStyle = mpBase->Find(rName, (SfxStyleFamily)nFamily);
SAL_WARN_IF( !pStyle, "linenumbering.ui", "Style not found" );
if(!pStyle)
- return NULL;
+ return nullptr;
return new SwDocStyleSheet(*static_cast<SwDocStyleSheet*>(pStyle));
}
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 6b15cf6a57a5..e6281bafe1e3 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -63,10 +63,10 @@ SwNumPositionTabPage::SwNumPositionTabPage(vcl::Window* pParent,
const SfxItemSet& rSet)
: SfxTabPage(pParent, "OutlinePositionPage",
"modules/swriter/ui/outlinepositionpage.ui", &rSet)
- , pActNum(0)
- , pSaveNum(0)
- , pWrtSh(0)
- , pOutlineDlg(0)
+ , pActNum(nullptr)
+ , pSaveNum(nullptr)
+ , pWrtSh(nullptr)
+ , pOutlineDlg(nullptr)
, nActNumLvl(0)
, bModified(false)
, bPreset(false)
@@ -205,9 +205,9 @@ void SwNumPositionTabPage::InitControls()
USHRT_MAX != nActNumLvl;
m_pDistBorderMF->Enable( !bLabelAlignmentPosAndSpaceModeActive &&
- ( bSingleSelection || bRelative || pOutlineDlg.get() != 0 ) );
+ ( bSingleSelection || bRelative || pOutlineDlg.get() != nullptr ) );
m_pDistBorderFT->Enable( !bLabelAlignmentPosAndSpaceModeActive &&
- ( bSingleSelection || bRelative || pOutlineDlg.get() != 0 ) );
+ ( bSingleSelection || bRelative || pOutlineDlg.get() != nullptr ) );
bool bSetDistEmpty = false;
bool bSameDistBorderNum = !bLabelAlignmentPosAndSpaceModeActive;
@@ -491,7 +491,7 @@ void SwNumPositionTabPage::Reset( const SfxItemSet* rSet )
void SwNumPositionTabPage::InitPosAndSpaceMode()
{
- if ( pActNum == 0 )
+ if ( pActNum == nullptr )
{
OSL_FAIL( "<SwNumPositionTabPage::InitPosAndSpaceMode()> - misusage of method -> <pAktNum> has to be already set!" );
return;
@@ -945,7 +945,7 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(vcl::Window* pParent,
, rWrtSh(rSh)
{
GetUserButton()->SetClickHdl(LINK(this, SwSvxNumBulletTabDialog, RemoveNumberingHdl));
- GetUserButton()->Enable(rWrtSh.GetNumRuleAtCurrCrsrPos() != NULL);
+ GetUserButton()->Enable(rWrtSh.GetNumRuleAtCurrCrsrPos() != nullptr);
m_nSingleNumPageId = AddTabPage("singlenum", RID_SVXPAGE_PICK_SINGLE_NUM );
m_nBulletPageId = AddTabPage("bullets", RID_SVXPAGE_PICK_BULLET );
AddTabPage("outlinenum", RID_SVXPAGE_PICK_NUM );
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 325fb6682afe..0c691319bb1d 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -170,8 +170,8 @@ SwOutlineTabDialog::SwOutlineTabDialog(vcl::Window* pParent, const SfxItemSet* p
pNumRule = new SwNumRule( *rSh.GetOutlineNumRule() );
GetCancelButton().SetClickHdl(LINK(this, SwOutlineTabDialog, CancelHdl));
- m_nNumPosId = AddTabPage("position", &SwNumPositionTabPage::Create, 0);
- m_nOutlineId = AddTabPage("numbering", &SwOutlineSettingsTabPage::Create, 0);
+ m_nNumPosId = AddTabPage("position", &SwNumPositionTabPage::Create, nullptr);
+ m_nOutlineId = AddTabPage("numbering", &SwOutlineSettingsTabPage::Create, nullptr);
OUString sHeadline;
sal_uInt16 i;
@@ -287,7 +287,7 @@ IMPL_LINK_TYPED( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu, bool )
if(pRules)
aStrArr[i] = &pRules->GetName();
else
- aStrArr[i] = 0;
+ aStrArr[i] = nullptr;
}
pDlg->SetUserNames(aStrArr);
if(RET_OK == pDlg->Execute())
@@ -419,9 +419,9 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(vcl::Window* pParent,
: SfxTabPage(pParent, "OutlineNumberingPage",
"modules/swriter/ui/outlinenumberingpage.ui", &rSet)
, aNoFormatName(SW_RESSTR(SW_STR_NONE))
- , pSh(NULL)
- , pNumRule(NULL)
- , pCollNames(NULL)
+ , pSh(nullptr)
+ , pNumRule(nullptr)
+ , pCollNames(nullptr)
, nActLevel(1)
{
get(m_pLevelLB, "level");
@@ -464,7 +464,7 @@ void SwOutlineSettingsTabPage::Update()
bool bSameCharFormat = true;
const SwNumFormat* aNumFormatArr[MAXLEVEL];
- const SwCharFormat* pFirstFormat = 0;
+ const SwCharFormat* pFirstFormat = nullptr;
for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
@@ -703,7 +703,7 @@ IMPL_LINK_NOARG_TYPED(SwOutlineSettingsTabPage, CharFormatHdl, ListBox&, void)
OUString sEntry = m_pCharFormatLB->GetSelectEntry();
sal_uInt16 nMask = 1;
bool bFormatNone = sEntry == SwViewShell::GetShellRes()->aStrNone;
- SwCharFormat* pFormat = 0;
+ SwCharFormat* pFormat = nullptr;
if(!bFormatNone)
{
sal_uInt16 nChCount = pSh->GetCharFormatCount();
@@ -734,7 +734,7 @@ IMPL_LINK_NOARG_TYPED(SwOutlineSettingsTabPage, CharFormatHdl, ListBox&, void)
{
SwNumFormat aNumFormat(pNumRule->Get(i));
if(bFormatNone)
- aNumFormat.SetCharFormat(0);
+ aNumFormat.SetCharFormat(nullptr);
else
aNumFormat.SetCharFormat(pFormat);
pNumRule->Set(i, aNumFormat);
@@ -1097,7 +1097,7 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle
pVDev->SetFont(aStdFont);
pVDev->DrawText(
Point(nXStart + nTextOffset, nYStart),
- (pOutlineNames == 0
+ (pOutlineNames == nullptr
? utl::ConfigManager::getProductName()
: pOutlineNames[nLevel]));
}
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index cf875f1ce3e6..2ab8e3cd5b83 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -219,7 +219,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet)
if ( pDocSh )
{
const SfxPoolItem* pColorItem = pDocSh->GetItem( SID_COLOR_TABLE );
- if ( pColorItem != NULL )
+ if ( pColorItem != nullptr )
pColorList = static_cast<const SvxColorListItem*>(pColorItem)->GetColorList();
}
@@ -303,7 +303,7 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet)
rFootnoteInfo.SetWidth(Fraction( static_cast< long >(m_pLineLengthEdit->GetValue()), 100));
const SfxPoolItem* pOldItem;
- if(0 == (pOldItem = GetOldItem( *rSet, FN_PARAM_FTN_INFO )) ||
+ if(nullptr == (pOldItem = GetOldItem( *rSet, FN_PARAM_FTN_INFO )) ||
aItem != *pOldItem )
rSet->Put(aItem);
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index d4410caf9953..1ce914db8290 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -220,7 +220,7 @@ void SwTextGridPage::Reset(const SfxItemSet *rSet)
if(SfxItemState::DEFAULT <= rSet->GetItemState(RES_TEXTGRID))
{
const SwTextGridItem& rGridItem = static_cast<const SwTextGridItem&>(rSet->Get(RES_TEXTGRID));
- RadioButton* pButton = 0;
+ RadioButton* pButton = nullptr;
switch(rGridItem.GetGridType())
{
case GRID_NONE : pButton = m_pNoGridRB; break;
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index a75f46504e51..7cbc05f5bacf 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -87,7 +87,7 @@ static bool lcl_GetSelTable( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY )
if( !pTableNd )
return false;
- _FndBox aFndBox( 0, 0 );
+ _FndBox aFndBox( nullptr, nullptr );
// look for all boxes / lines
{
@@ -112,7 +112,7 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell)
, aRowText(SW_RES(STR_ROW))
, aNumericText(SW_RES(STR_NUMERIC))
, rSh(rShell)
- , pColRes(0)
+ , pColRes(nullptr)
, nX(99)
, nY(99)
{
@@ -208,7 +208,7 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell)
m_pLangLB->SetLanguageList( SvxLanguageListFlags::ALL | SvxLanguageListFlags::ONLY_KNOWN, true );
m_pLangLB->SelectLanguage( nLang );
- LanguageHdl( 0 );
+ LanguageHdl( nullptr );
m_pLangLB->SetSelectHdl( LINK( this, SwSortDlg, LanguageListBoxHdl ));
m_pSortUp1RB->Check(bAsc1);
@@ -332,7 +332,7 @@ void SwSortDlg::Apply()
OUString sEntry( m_pTypDLB1->GetSelectEntry() );
if( sEntry == aNumericText )
sEntry.clear();
- else if( 0 != (pUserData = m_pTypDLB1->GetSelectEntryData()) )
+ else if( nullptr != (pUserData = m_pTypDLB1->GetSelectEntryData()) )
sEntry = *static_cast<OUString*>(pUserData);
SwSortKey *pKey = new SwSortKey( nCol1, sEntry,
@@ -345,7 +345,7 @@ void SwSortDlg::Apply()
OUString sEntry( m_pTypDLB2->GetSelectEntry() );
if( sEntry == aNumericText )
sEntry.clear();
- else if( 0 != (pUserData = m_pTypDLB2->GetSelectEntryData()) )
+ else if( nullptr != (pUserData = m_pTypDLB2->GetSelectEntryData()) )
sEntry = *static_cast<OUString*>(pUserData);
SwSortKey *pKey = new SwSortKey( nCol2, sEntry,
@@ -358,7 +358,7 @@ void SwSortDlg::Apply()
OUString sEntry( m_pTypDLB3->GetSelectEntry() );
if( sEntry == aNumericText )
sEntry.clear();
- else if( 0 != (pUserData = m_pTypDLB3->GetSelectEntryData()) )
+ else if( nullptr != (pUserData = m_pTypDLB3->GetSelectEntryData()) )
sEntry = *static_cast<OUString*>(pUserData);
SwSortKey *pKey = new SwSortKey( nCol3, sEntry,
diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
index 05a4fb555f09..bfe7bdfdf8e1 100644
--- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
+++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
@@ -82,7 +82,7 @@ void SwModalRedlineAcceptDlg::AcceptAll( bool bAccept )
pFilterTP->CheckAuthor(false);
pFilterTP->CheckRange(false);
pFilterTP->CheckAction(false);
- pImplDlg->FilterChangedHdl(NULL);
+ pImplDlg->FilterChangedHdl(nullptr);
}
pImplDlg->CallAcceptReject( false, bAccept );
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 2ebdd8725fd3..2e7f901f0cc6 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -35,7 +35,7 @@ namespace
SfxItemSet aSet( pSh->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC );
if (pSh->GetCurAttr( aSet ))
{
- const SfxPoolItem* pItem(0);
+ const SfxPoolItem* pItem(nullptr);
if (SfxItemState::SET == aSet.GetItemState( RES_PAGEDESC, true, &pItem ) && pItem)
{
::boost::optional<sal_uInt16> oNumOffset = static_cast<const SwFormatPageDesc *>(pItem)->GetNumOffset();
@@ -55,7 +55,7 @@ namespace
const size_t nCurIdx = pSh->GetCurPageDesc();
const SwPageDesc &rCurrentDesc = pSh->GetPageDesc( nCurIdx );
- const SwFormatPageDesc *pPageFormatDesc(0);
+ const SwFormatPageDesc *pPageFormatDesc(nullptr);
sal_uInt16 nDontCare;
lcl_GetPageDesc(pSh, nDontCare, &pPageFormatDesc);
@@ -152,7 +152,7 @@ sal_uInt16 SwTitlePageDlg::GetInsertPosition() const
SwTitlePageDlg::SwTitlePageDlg( vcl::Window *pParent ) :
SfxModalDialog( pParent, "DLG_TITLEPAGE", "modules/swriter/ui/titlepage.ui"),
- mpPageFormatDesc(0)
+ mpPageFormatDesc(nullptr)
{
get(m_pUseExistingPagesRB, "RB_USE_EXISTING_PAGES");
get(m_pPageCountNF, "NF_PAGE_COUNT");
@@ -199,7 +199,7 @@ SwTitlePageDlg::SwTitlePageDlg( vcl::Window *pParent ) :
if (mpIndexDesc != &rPageDesc)
{
mpNormalDesc = &rPageDesc;
- bMaybeResetNumbering = lcl_GetPageDesc(mpSh, nResetPage, NULL);
+ bMaybeResetNumbering = lcl_GetPageDesc(mpSh, nResetPage, nullptr);
break;
}
++nTitlePages;
@@ -333,7 +333,7 @@ IMPL_LINK_NOARG_TYPED(SwTitlePageDlg, OKHdl, Button*, void)
if (m_pRestartNumberingCB->IsChecked() || nNoPages > 1)
{
sal_uInt16 nPgNo = m_pRestartNumberingCB->IsChecked() ? m_pRestartNumberingNF->GetValue() : 0;
- const SwPageDesc *pNewDesc = nNoPages > 1 ? mpNormalDesc : 0;
+ const SwPageDesc *pNewDesc = nNoPages > 1 ? mpNormalDesc : nullptr;
mpSh->GotoPage(GetInsertPosition() + nNoPages, false);
lcl_ChangePage(mpSh, nPgNo, pNewDesc);
}
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 8c429de2032d..d245ca3bfdbd 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -96,7 +96,7 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim,
SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
: SfxModalDialog(&rView.GetViewFrame()->GetWindow(), "ConvertTextTableDialog", "modules/swriter/ui/converttexttable.ui" )
, sConvertTextTable(SW_RES(STR_CONVERT_TEXT_TABLE))
- , pTAutoFormat(0)
+ , pTAutoFormat(nullptr)
, pShell(&rView.GetWrtShell())
{
get(mpTabBtn, "tabs");
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index 8b4c845d3af9..81cbe188b460 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -69,7 +69,7 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView )
: SfxModalDialog(rView.GetWindow(), "InsertTableDialog", "modules/swriter/ui/inserttable.ui")
, m_aTextFilter(" .<>")
, pShell(&rView.GetWrtShell())
- , pTAutoFormat(0)
+ , pTAutoFormat(nullptr)
, nEnteredValRepeatHeaderNF(-1)
{
get(m_pNameEdit, "nameedit");
@@ -165,7 +165,7 @@ IMPL_LINK_TYPED( SwInsTableDlg, ModifyName, Edit&, rEdit, void )
rEdit.SetText(sTableName);
}
- m_pInsertBtn->Enable(pShell->GetTableStyle( sTableName ) == 0);
+ m_pInsertBtn->Enable(pShell->GetTableStyle( sTableName ) == nullptr);
}
IMPL_LINK_TYPED( SwInsTableDlg, ModifyRowCol, Edit&, rEdit, void )
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index ed324912bd68..597fc6985bed 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -66,7 +66,7 @@ using namespace ::com::sun::star;
SwFormatTablePage::SwFormatTablePage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "FormatTablePage", "modules/swriter/ui/formattablepage.ui", &rSet)
, m_aTextFilter(" .<>")
- , pTableData(0)
+ , pTableData(nullptr)
, nSaveWidth(0)
, nMinTableWidth(MINLAY)
, bModified(false)
@@ -738,7 +738,7 @@ SfxTabPage::sfxpg SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
SwTableColumnPage::SwTableColumnPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "TableColumnPage",
"modules/swriter/ui/tablecolumnpage.ui", &rSet)
- , pTableData(0)
+ , pTableData(nullptr)
, nTableWidth(0)
, nMinWidth(MINLAY)
, nNoOfCols(0)
@@ -958,7 +958,7 @@ bool SwTableColumnPage::FillItemSet( SfxItemSet* )
void SwTableColumnPage::ModifyHdl( MetricField* pField )
{
- PercentField *pEdit = NULL;
+ PercentField *pEdit = nullptr;
sal_uInt16 i;
for( i = 0; i < MET_FIELDS; i++)
@@ -1235,17 +1235,17 @@ void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth)
SwTableTabDlg::SwTableTabDlg(vcl::Window* pParent, SfxItemPool&,
const SfxItemSet* pItemSet, SwWrtShell* pSh)
- : SfxTabDialog(0, pParent, "TablePropertiesDialog",
+ : SfxTabDialog(nullptr, pParent, "TablePropertiesDialog",
"modules/swriter/ui/tableproperties.ui", pItemSet)
, pShell(pSh)
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- AddTabPage("table", &SwFormatTablePage::Create, 0);
- m_nTextFlowId = AddTabPage("textflow", &SwTextFlowPage::Create, 0);
- AddTabPage("columns", &SwTableColumnPage::Create, 0);
- m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BACKGROUND), 0);
- m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BORDER), 0);
+ AddTabPage("table", &SwFormatTablePage::Create, nullptr);
+ m_nTextFlowId = AddTabPage("textflow", &SwTextFlowPage::Create, nullptr);
+ AddTabPage("columns", &SwTableColumnPage::Create, nullptr);
+ m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BACKGROUND), nullptr);
+ m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BORDER), nullptr);
}
void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
@@ -1265,7 +1265,7 @@ void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
else if (nId == m_nTextFlowId)
{
static_cast<SwTextFlowPage&>(rPage).SetShell(pShell);
- const FrmTypeFlags eType = pShell->GetFrmType(0,true);
+ const FrmTypeFlags eType = pShell->GetFrmType(nullptr,true);
if( !(FrmTypeFlags::BODY & eType) )
static_cast<SwTextFlowPage&>(rPage).DisablePageBreak();
}
@@ -1274,7 +1274,7 @@ void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
SwTextFlowPage::SwTextFlowPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "TableTextFlowPage",
"modules/swriter/ui/tabletextflowpage.ui", &rSet)
- , pShell(0)
+ , pShell(nullptr)
, bPageBreak(true)
, bHtmlMode(false)
{
@@ -1380,17 +1380,17 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
if(m_pHeadLineCB->IsValueChangedFromSaved() ||
m_pRepeatHeaderNF->IsValueChangedFromSaved() )
{
- bModified |= 0 != rSet->Put(
+ bModified |= nullptr != rSet->Put(
SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, m_pHeadLineCB->IsChecked()? sal_uInt16(m_pRepeatHeaderNF->GetValue()) : 0 ));
}
if(m_pKeepCB->IsValueChangedFromSaved())
- bModified |= 0 != rSet->Put( SvxFormatKeepItem( m_pKeepCB->IsChecked(), RES_KEEP));
+ bModified |= nullptr != rSet->Put( SvxFormatKeepItem( m_pKeepCB->IsChecked(), RES_KEEP));
if(m_pSplitCB->IsValueChangedFromSaved())
- bModified |= 0 != rSet->Put( SwFormatLayoutSplit( m_pSplitCB->IsChecked()));
+ bModified |= nullptr != rSet->Put( SwFormatLayoutSplit( m_pSplitCB->IsChecked()));
if(m_pSplitRowCB->IsValueChangedFromSaved())
- bModified |= 0 != rSet->Put( SwFormatRowSplit( m_pSplitRowCB->IsChecked()));
+ bModified |= nullptr != rSet->Put( SwFormatRowSplit( m_pSplitRowCB->IsChecked()));
const SvxFormatBreakItem* pBreak = static_cast<const SvxFormatBreakItem*>(GetOldItem( *rSet, RES_BREAK ));
const SwFormatPageDesc* pDesc = static_cast<const SwFormatPageDesc*>(GetOldItem( *rSet, RES_PAGEDESC ));
@@ -1417,7 +1417,7 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
{
SwFormatPageDesc aFormat( pShell->FindPageDescByName( sPage, true ) );
aFormat.SetNumOffset(bState ? nPgNum : 0);
- bModified |= 0 != rSet->Put( aFormat );
+ bModified |= nullptr != rSet->Put( aFormat );
bPageItemPut = bState;
}
}
@@ -1457,13 +1457,13 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
if ( !pBreak || !( *pBreak == aBreak ) )
{
- bModified |= 0 != rSet->Put( aBreak );
+ bModified |= nullptr != rSet->Put( aBreak );
}
}
if(m_pTextDirectionLB->IsValueChangedFromSaved())
{
- bModified |= 0 != rSet->Put(
+ bModified |= nullptr != rSet->Put(
SvxFrameDirectionItem(
(SvxFrameDirection)reinterpret_cast<sal_uLong>(m_pTextDirectionLB->GetSelectEntryData())
, FN_TABLE_BOX_TEXTORIENTATION));
@@ -1479,7 +1479,7 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
case 2 : nOrient = text::VertOrientation::BOTTOM; break;
}
if(nOrient != USHRT_MAX)
- bModified |= 0 != rSet->Put(SfxUInt16Item(FN_TABLE_SET_VERT_ALIGN, nOrient));
+ bModified |= nullptr != rSet->Put(SfxUInt16Item(FN_TABLE_SET_VERT_ALIGN, nOrient));
}
return bModified;
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index a0b297db58f1..8b35ec0c77e3 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -271,7 +271,7 @@ void SwAutoFormatDlg::FillAutoFormatOfIndex( SwTableAutoFormat*& rToFill ) const
rToFill = new SwTableAutoFormat( (*pTableTable)[ nIndex ] );
}
else
- delete rToFill, rToFill = 0;
+ delete rToFill, rToFill = nullptr;
}
// Handler:
diff --git a/sw/source/ui/vba/vbadialog.cxx b/sw/source/ui/vba/vbadialog.cxx
index ee83a331f895..e9b0cd34942d 100644
--- a/sw/source/ui/vba/vbadialog.cxx
+++ b/sw/source/ui/vba/vbadialog.cxx
@@ -34,7 +34,7 @@ static const WordDialogTable aWordDialogTable[] =
{ word::WdWordDialog::wdDialogFileOpen, ".uno:Open" },
{ word::WdWordDialog::wdDialogFilePrint, ".uno:Print" },
{ word::WdWordDialog::wdDialogFileSaveAs, ".uno:SaveAs" },
- { 0, 0 }
+ { 0, nullptr }
};
OUString
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
index a44c14702421..c7fe27b75ef6 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -284,7 +284,7 @@ class StatisticPropertyGetSetHelper : public PropertGetSetHelper
SwDocShell* mpDocShell;
uno::Reference< beans::XPropertySet > mxModelProps;
public:
- explicit StatisticPropertyGetSetHelper( const uno::Reference< frame::XModel >& xModel ) :PropertGetSetHelper( xModel ) , mpDocShell( NULL )
+ explicit StatisticPropertyGetSetHelper( const uno::Reference< frame::XModel >& xModel ) :PropertGetSetHelper( xModel ) , mpDocShell( nullptr )
{
mxModelProps.set( m_xModel, uno::UNO_QUERY_THROW );
mpDocShell = word::getDocShell( xModel );
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index 5d3e4f8c69a2..38243c4d9870 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -386,32 +386,32 @@ struct DocPropertyTable
static const DocPropertyTable aDocPropertyTables[] =
{
{ "Author", "com.sun.star.text.textfield.docinfo.CreateAuthor" },
- { "Bytes", NULL },
- { "Category", NULL },
- { "Characters",NULL },
- { "CharactersWithSpaces", NULL },
+ { "Bytes", nullptr },
+ { "Category", nullptr },
+ { "Characters",nullptr },
+ { "CharactersWithSpaces", nullptr },
{ "Comments", "com.sun.star.text.textfield.docinfo.Description" },
- { "Company", NULL },
+ { "Company", nullptr },
{ "CreateTime", "com.sun.star.text.textfield.docinfo.CreateDateTime" },
- { "HyperlinkBase", NULL },
+ { "HyperlinkBase", nullptr },
{ "Keywords", "com.sun.star.text.textfield.docinfo.Keywords" },
{ "LastPrinted", "com.sun.star.text.textfield.docinfo.PrintDateTime" },
{ "LastSavedBy", "com.sun.star.text.textfield.docinfo.ChangeAuthor" },
{ "LastSavedTime", "com.sun.star.text.textfield.docinfo.ChangeDateTime" },
- { "Lines", NULL },
- { "Manager", NULL },
- { "NameofApplication", NULL },
- { "ODMADocID", NULL },
+ { "Lines", nullptr },
+ { "Manager", nullptr },
+ { "NameofApplication", nullptr },
+ { "ODMADocID", nullptr },
{ "Pages", "com.sun.star.text.textfield.PageCount" },
{ "Paragraphs", "com.sun.star.text.textfield.ParagraphCount" },
{ "RevisionNumber", "com.sun.star.text.textfield.docinfo.Revision" },
- { "Security", NULL },
+ { "Security", nullptr },
{ "Subject", "com.sun.star.text.textfield.docinfo.Subject" },
{ "Template", "com.sun.star.text.textfield.TemplateName" },
{ "Title", "com.sun.star.text.textfield.docinfo.Title" },
{ "TotalEditingTime", "com.sun.star.text.textfield.docinfo.EditTime" },
{ "Words", "com.sun.star.text.textfield.WordCount" },
- { NULL, NULL }
+ { nullptr, nullptr }
};
uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const OUString& _text ) throw (uno::RuntimeException)
@@ -443,11 +443,11 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const
bool bCustom = true;
OUString sFieldService;
// find the build in document properties
- for( const DocPropertyTable* pTable = aDocPropertyTables; pTable->sDocPropertyName != NULL; pTable++ )
+ for( const DocPropertyTable* pTable = aDocPropertyTables; pTable->sDocPropertyName != nullptr; pTable++ )
{
if( aDocProperty.equalsIgnoreAsciiCaseAscii( pTable->sDocPropertyName ) )
{
- if( pTable->sFieldService != NULL )
+ if( pTable->sFieldService != nullptr )
sFieldService = OUString::createFromAscii(pTable->sFieldService);
bCustom = false;
break;
diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx
index 5d58b2225a6a..2cebd3e771c1 100644
--- a/sw/source/ui/vba/vbastyles.cxx
+++ b/sw/source/ui/vba/vbastyles.cxx
@@ -141,7 +141,7 @@ static const BuiltinStyleTable aBuiltinStyleTable[] =
{ word::WdBuiltinStyle::wdStyleTOC7, "Contents 7", word::WdStyleType::wdStyleTypeParagraph },
{ word::WdBuiltinStyle::wdStyleTOC8, "Contents 8", word::WdStyleType::wdStyleTypeParagraph },
{ word::WdBuiltinStyle::wdStyleTOC9, "Contents 9", word::WdStyleType::wdStyleTypeParagraph },
- { 0, 0, 0 }
+ { 0, nullptr, 0 }
};
struct MSOStyleNameTable
@@ -154,7 +154,7 @@ struct MSOStyleNameTable
static const MSOStyleNameTable aMSOStyleNameTable[] =
{
{ "Normal", "Default", "ParagraphStyles" },
- { 0, 0, 0 }
+ { nullptr, nullptr, nullptr }
};
class StyleCollectionHelper : public ::cppu::WeakImplHelper< container::XNameAccess,
@@ -190,7 +190,7 @@ public:
virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (uno::RuntimeException, std::exception) override
{
// search in the MSOStyleName table first
- for( const MSOStyleNameTable* pTable = aMSOStyleNameTable; pTable->pMSOStyleName != NULL; pTable++ )
+ for( const MSOStyleNameTable* pTable = aMSOStyleNameTable; pTable->pMSOStyleName != nullptr; pTable++ )
{
if( aName.equalsIgnoreAsciiCaseAscii( pTable->pMSOStyleName ) )
{
@@ -300,7 +300,7 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 )
sal_Int32 nIndex = 0;
if( ( Index1 >>= nIndex ) && ( nIndex < 0 ) )
{
- for( const BuiltinStyleTable* pTable = aBuiltinStyleTable; pTable != NULL; pTable++ )
+ for( const BuiltinStyleTable* pTable = aBuiltinStyleTable; pTable != nullptr; pTable++ )
{
if( nIndex == pTable->wdBuiltinStyle )
{
diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx
index 229afa1309c1..63582f924907 100644
--- a/sw/source/ui/vba/wordvbahelper.cxx
+++ b/sw/source/ui/vba/wordvbahelper.cxx
@@ -48,13 +48,13 @@ SwDocShell* getDocShell( const uno::Reference< frame::XModel>& xModel )
{
uno::Reference< lang::XUnoTunnel > xTunnel( xModel, uno::UNO_QUERY_THROW );
SwXTextDocument* pXDoc = reinterpret_cast< SwXTextDocument * >( sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(SwXTextDocument::getUnoTunnelId())));
- return pXDoc ? pXDoc->GetDocShell() : 0;
+ return pXDoc ? pXDoc->GetDocShell() : nullptr;
}
SwView* getView( const uno::Reference< frame::XModel>& xModel )
{
SwDocShell* pDocShell = getDocShell( xModel );
- return pDocShell? pDocShell->GetView() : 0;
+ return pDocShell? pDocShell->GetView() : nullptr;
}
uno::Reference< text::XTextViewCursor > getXTextViewCursor( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
@@ -86,7 +86,7 @@ uno::Reference< style::XStyle > getCurrentPageStyle( const uno::Reference< frame
sal_Int32 getPageCount( const uno::Reference< frame::XModel>& xModel ) throw (uno::RuntimeException)
{
SwDocShell* pDocShell = getDocShell( xModel );
- SwViewShell* pViewSh = pDocShell ? pDocShell->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() : 0;
+ SwViewShell* pViewSh = pDocShell ? pDocShell->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() : nullptr;
return pViewSh ? pViewSh->GetPageCount() : 0;
}