summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uiview')
-rw-r--r--sw/source/uibase/uiview/formatclipboard.cxx38
-rw-r--r--sw/source/uibase/uiview/pview.cxx22
-rw-r--r--sw/source/uibase/uiview/srcview.cxx4
-rw-r--r--sw/source/uibase/uiview/swcli.cxx6
-rw-r--r--sw/source/uibase/uiview/uivwimp.cxx14
-rw-r--r--sw/source/uibase/uiview/view.cxx52
-rw-r--r--sw/source/uibase/uiview/view0.cxx4
-rw-r--r--sw/source/uibase/uiview/view1.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx28
-rw-r--r--sw/source/uibase/uiview/viewcoll.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdlg.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdlg2.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx20
-rw-r--r--sw/source/uibase/uiview/viewfunc.hxx4
-rw-r--r--sw/source/uibase/uiview/viewling.cxx16
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx6
-rw-r--r--sw/source/uibase/uiview/viewport.cxx2
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx6
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx22
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx26
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx12
21 files changed, 145 insertions, 145 deletions
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx
index c6808fe5d43e..fb16147de311 100644
--- a/sw/source/uibase/uiview/formatclipboard.cxx
+++ b/sw/source/uibase/uiview/formatclipboard.cxx
@@ -60,7 +60,7 @@ FORMAT_PAINTBRUSH_FRAME_IDS
SfxItemSet* lcl_CreateEmptyItemSet( int nSelectionType, SfxItemPool& rPool, bool bNoParagraphFormats = false )
{
- SfxItemSet* pItemSet = 0;
+ SfxItemSet* pItemSet = nullptr;
if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF) )
{
pItemSet = new SfxItemSet(rPool,
@@ -121,7 +121,7 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh )
rSet.Put( pFrameFormat->GetFrmDir() );
}
- SwFormatRowSplit* pSplit = 0;
+ SwFormatRowSplit* pSplit = nullptr;
rSh.GetRowSplit(pSplit);
if(pSplit)
rSet.Put(*pSplit);
@@ -129,11 +129,11 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh )
void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
bool bBorder = ( SfxItemState::SET == rSet.GetItemState( RES_BOX ) ||
SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
bool bBackground = SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pItem );
- const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
+ const SfxPoolItem* pRowItem = nullptr, *pTableItem = nullptr;
bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, false, &pRowItem );
bBackground |= SfxItemState::SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, false, &pTableItem );
@@ -164,37 +164,37 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
if(pFrameFormat)
{
//RES_SHADOW
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_BREAK
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_PAGEDESC
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_LAYOUT_SPLIT
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_KEEP
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
//RES_FRAMEDIR
- pItem=0;
+ pItem=nullptr;
rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), false, &pItem);
if(pItem)
pFrameFormat->SetFormatAttr( *pItem );
@@ -217,9 +217,9 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
SwFormatClipboard::SwFormatClipboard()
: m_nSelectionType(0)
- , m_pItemSet_TextAttr(0)
- , m_pItemSet_ParAttr(0)
- , m_pTableItemSet(0)
+ , m_pItemSet_TextAttr(nullptr)
+ , m_pItemSet_ParAttr(nullptr)
+ , m_pTableItemSet(nullptr)
, m_bPersistentCopy(false)
{
}
@@ -232,9 +232,9 @@ SwFormatClipboard::~SwFormatClipboard()
bool SwFormatClipboard::HasContent() const
{
- return m_pItemSet_TextAttr!=0
- || m_pItemSet_ParAttr!=0
- || m_pTableItemSet != 0
+ return m_pItemSet_TextAttr!=nullptr
+ || m_pItemSet_ParAttr!=nullptr
+ || m_pTableItemSet != nullptr
|| !m_aCharStyle.isEmpty()
|| !m_aParaStyle.isEmpty()
;
@@ -578,13 +578,13 @@ void SwFormatClipboard::Erase()
m_nSelectionType = 0;
delete m_pItemSet_TextAttr;
- m_pItemSet_TextAttr = 0;
+ m_pItemSet_TextAttr = nullptr;
delete m_pItemSet_ParAttr;
- m_pItemSet_ParAttr = 0;
+ m_pItemSet_ParAttr = nullptr;
delete m_pTableItemSet;
- m_pTableItemSet = 0;
+ m_pTableItemSet = nullptr;
if( !m_aCharStyle.isEmpty() )
m_aCharStyle.clear();
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 3efbd57b9b7e..3c388fe66a8c 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -188,11 +188,11 @@ void SwPreviewZoomDlg::Apply()
// all for SwPagePreviewWin
SwPagePreviewWin::SwPagePreviewWin( vcl::Window *pParent, SwPagePreview& rPView )
: Window(pParent, WinBits(WB_CLIPCHILDREN))
- , mpViewShell(0)
+ , mpViewShell(nullptr)
, mrView(rPView)
, mbCalcScaleForPreviewLayout(true)
, maPaintedPreviewDocRect(Rectangle(0,0,0,0))
- , mpPgPreviewLayout(NULL)
+ , mpPgPreviewLayout(nullptr)
{
SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW );
SetHelpId(HID_PAGEPREVIEW);
@@ -511,7 +511,7 @@ void SwPagePreviewWin::MouseButtonDown( const MouseEvent& rMEvt )
mrView.SetNewCrsrPos( sNewCrsrPos );
SfxViewFrame *pTmpFrm = mrView.GetViewFrame();
- pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, NULL, 0,
+ pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0,
SfxCallMode::ASYNCHRON );
}
else if ( bIsDocPos || bPosInEmptyPage )
@@ -959,7 +959,7 @@ MOVEPAGE:
nSelPage +=2;
SetNewPage( nSelPage );
SfxViewFrame *pTmpFrm = GetViewFrame();
- pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, NULL, 0,
+ pTmpFrm->GetBindings().Execute( SID_VIEWSHELL0, nullptr, 0,
SfxCallMode::ASYNCHRON );
}
break;
@@ -1184,8 +1184,8 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
pViewWin( VclPtr<SwPagePreviewWin>::Create(&(GetViewFrame())->GetWindow(), *this ) ),
nNewPage(USHRT_MAX),
sPageStr(SW_RES(STR_PAGE)),
- pHScrollbar(0),
- pVScrollbar(0),
+ pHScrollbar(nullptr),
+ pVScrollbar(nullptr),
pScrollFill(VclPtr<ScrollBarBox>::Create( &pViewFrame->GetWindow(),
pViewFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
mnPageCount( 0 ),
@@ -1243,11 +1243,11 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
}
if( pVS )
- pNew = new SwViewShell( *pVS, pViewWin, 0, VSHELLFLAG_ISPREVIEW );
+ pNew = new SwViewShell( *pVS, pViewWin, nullptr, VSHELLFLAG_ISPREVIEW );
else
pNew = new SwViewShell(
*static_cast<SwDocShell*>(pViewFrame->GetObjectShell())->GetDoc(),
- pViewWin, 0, 0, VSHELLFLAG_ISPREVIEW );
+ pViewWin, nullptr, nullptr, VSHELLFLAG_ISPREVIEW );
pViewWin->SetViewShell( pNew );
pNew->SetSfxViewShell( this );
@@ -1256,9 +1256,9 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
SwPagePreview::~SwPagePreview()
{
- SetWindow( 0 );
+ SetWindow( nullptr );
SwViewShell* pVShell = pViewWin->GetViewShell();
- pVShell->SetWin(0);
+ pVShell->SetWin(nullptr);
delete pVShell;
pViewWin.disposeAndClear();
@@ -1849,7 +1849,7 @@ uno::Reference< css::accessibility::XAccessible >
{
SolarMutexGuard aGuard; // this should have happened already!!!
- OSL_ENSURE( GetViewShell() != NULL, "We need a view shell" );
+ OSL_ENSURE( GetViewShell() != nullptr, "We need a view shell" );
css::uno::Reference< css::accessibility::XAccessible > xAcc = GetAccessible( false );
if (xAcc.is())
{
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index eb66d8ac5fa5..7f1bc323ff53 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -219,7 +219,7 @@ static OUString lcl_ConvertTabsToSpaces( const OUString& sLine )
SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) :
SfxViewShell( pViewFrame, SWSRCVIEWFLAGS ),
aEditWin( VclPtr<SwSrcEditWindow>::Create( &pViewFrame->GetWindow(), this ) ),
- pSearchItem(0),
+ pSearchItem(nullptr),
bSourceSaved(false),
eLoadEncoding(RTL_TEXTENCODING_DONTKNOW)
{
@@ -338,7 +338,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
case SID_SAVEDOC:
{
SwDocShell* pDocShell = GetDocShell();
- SfxMedium* pMed = 0;
+ SfxMedium* pMed = nullptr;
if(pDocShell->HasName())
pMed = pDocShell->GetMedium();
else
diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx
index d2195b7f62c4..c67b46899498 100644
--- a/sw/source/uibase/uiview/swcli.cxx
+++ b/sw/source/uibase/uiview/swcli.cxx
@@ -78,8 +78,8 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect )
rSh.EndAllAction();
- SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, 0, GetObject() )),
- aPrt( rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, GetObject() ));
+ SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() )),
+ aPrt( rSh.GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, nullptr, GetObject() ));
aLogRect.SetPos( aPrt.Pos() + aFrm.Pos() );
aLogRect.SetSize( aPrt.SSize() );
}
@@ -87,7 +87,7 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect )
void SwOleClient::ObjectAreaChanged()
{
SwWrtShell &rSh = static_cast<SwView*>(GetViewShell())->GetWrtShell();
- SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, 0, GetObject() ));
+ SwRect aFrm( rSh.GetAnyCurRect( RECT_FLY_EMBEDDED, nullptr, GetObject() ));
if ( !aFrm.IsOver( rSh.VisArea() ) )
rSh.MakeVisible( aFrm );
}
diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx
index 17fbac4e8e90..49d3a96de2a9 100644
--- a/sw/source/uibase/uiview/uivwimp.cxx
+++ b/sw/source/uibase/uiview/uivwimp.cxx
@@ -57,16 +57,16 @@ using namespace ::com::sun::star::datatransfer::clipboard;
SwView_Impl::SwView_Impl(SwView* pShell)
: mxXTextView()
, pView(pShell)
- , pScanEvtLstnr(0)
- , pClipEvtLstnr(0)
+ , pScanEvtLstnr(nullptr)
+ , pClipEvtLstnr(nullptr)
, eShellMode(SHELL_MODE_TEXT)
#if HAVE_FEATURE_DBCONNECTIVITY
- , pConfigItem(0)
+ , pConfigItem(nullptr)
, nMailMergeRestartPage(0)
, bMailMergeSourceView(true)
#endif
- , m_pDocInserter(NULL)
- , m_pRequest(NULL)
+ , m_pDocInserter(nullptr)
+ , m_pRequest(nullptr)
, m_nParam(0)
, m_bSelectObject(false)
, m_bEditingPositionSet(false)
@@ -78,9 +78,9 @@ SwView_Impl::SwView_Impl(SwView* pShell)
SwView_Impl::~SwView_Impl()
{
Reference<XUnoTunnel> xDispTunnel(xDisProvInterceptor, UNO_QUERY);
- SwXDispatchProviderInterceptor* pInterceptor = 0;
+ SwXDispatchProviderInterceptor* pInterceptor = nullptr;
if(xDispTunnel.is() &&
- 0 != (pInterceptor = reinterpret_cast< SwXDispatchProviderInterceptor * >(
+ nullptr != (pInterceptor = reinterpret_cast< SwXDispatchProviderInterceptor * >(
sal::static_int_cast< sal_IntPtr >(
xDispTunnel->getSomething(SwXDispatchProviderInterceptor::getUnoTunnelId())))))
{
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 7dd9064caad0..35e5ebcf9a2e 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -126,15 +126,15 @@ extern bool g_bNoInterrupt; // in swmodule.cxx
bool bDocSzUpdated = true;
-SvxSearchItem* SwView::m_pSrchItem = 0;
+SvxSearchItem* SwView::m_pSrchItem = nullptr;
bool SwView::m_bExtra = false;
bool SwView::m_bFound = false;
bool SwView::m_bJustOpened = false;
VclPtr<SvxSearchDialog> SwView::m_pSrchDlg = nullptr;
-SearchAttrItemList* SwView::m_pSrchList = 0;
-SearchAttrItemList* SwView::m_pReplList = 0;
+SearchAttrItemList* SwView::m_pSrchList = nullptr;
+SearchAttrItemList* SwView::m_pReplList = nullptr;
inline SfxDispatcher &SwView::GetDispatcher()
{
@@ -184,7 +184,7 @@ void SwView::GotFocus() const
SwAnnotationShell* pAsAnnotationShell = dynamic_cast<SwAnnotationShell*>( pTopShell );
if ( pAsAnnotationShell )
{
- m_pPostItMgr->SetActiveSidebarWin(0);
+ m_pPostItMgr->SetActiveSidebarWin(nullptr);
const_cast< SwView* >( this )->AttrChangedNotify( m_pWrtShell );
}
}
@@ -210,7 +210,7 @@ IMPL_LINK_NOARG_TYPED(SwView, FormControlActivated, LinkParamNone*, void)
if ( !pAsFormShell )
{
// if we're editing text currently, cancel this
- SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : NULL;
+ SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : nullptr;
if ( pSdrView && pSdrView->IsTextEdit() )
pSdrView->SdrEndTextEdit( true );
@@ -682,25 +682,25 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
: SfxViewShell( _pFrame, SWVIEWFLAGS ),
m_nNewPage(USHRT_MAX),
m_nOldPageNum(0),
- m_pNumRuleNodeFromDoc(0),
+ m_pNumRuleNodeFromDoc(nullptr),
m_pEditWin( VclPtr<SwEditWin>::Create( &_pFrame->GetWindow(), *this ) ),
- m_pWrtShell(0),
- m_pShell(0),
- m_pFormShell(0),
- m_pHScrollbar(0),
- m_pVScrollbar(0),
+ m_pWrtShell(nullptr),
+ m_pShell(nullptr),
+ m_pFormShell(nullptr),
+ m_pHScrollbar(nullptr),
+ m_pVScrollbar(nullptr),
m_pScrollFill(VclPtr<ScrollBarBox>::Create( &_pFrame->GetWindow(), _pFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
m_pVRuler(VclPtr<SvxRuler>::Create(&GetViewFrame()->GetWindow(), m_pEditWin,
SvxRulerSupportFlags::TABS | SvxRulerSupportFlags::PARAGRAPH_MARGINS_VERTICAL|
SvxRulerSupportFlags::BORDERS | SvxRulerSupportFlags::REDUCED_METRIC,
GetViewFrame()->GetBindings(),
WB_VSCROLL | WB_EXTRAFIELD | WB_BORDER )),
- m_pTogglePageBtn(0),
- m_pGlosHdl(0),
- m_pDrawActual(0),
- m_pLastTableFormat(0),
+ m_pTogglePageBtn(nullptr),
+ m_pGlosHdl(nullptr),
+ m_pDrawActual(nullptr),
+ m_pLastTableFormat(nullptr),
m_pFormatClipboard(new SwFormatClipboard()),
- m_pPostItMgr(0),
+ m_pPostItMgr(nullptr),
m_nSelectionType( INT_MAX ),
m_nPageCnt(0),
m_nDrawSfxId( USHRT_MAX ),
@@ -766,7 +766,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
// determine if there is an existing view for
// document
- SfxViewShell* pExistingSh = 0;
+ SfxViewShell* pExistingSh = nullptr;
if ( pOldSh )
{
pExistingSh = pOldSh;
@@ -940,7 +940,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
SET_CURR_SHELL( m_pWrtShell );
m_pWrtShell->StartAction();
m_pWrtShell->CalcLayout();
- m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(NULL, false);
+ m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(nullptr, false);
m_pWrtShell->EndAction();
}
m_pWrtShell->GetDoc()->getIDocumentState().SetUpdateExpFieldStat( false );
@@ -1017,7 +1017,7 @@ SwView::~SwView()
{
GetViewFrame()->GetWindow().RemoveChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
delete m_pPostItMgr;
- m_pPostItMgr = 0;
+ m_pPostItMgr = nullptr;
m_bInDtor = true;
m_pEditWin->Hide(); // prevent problems with painting
@@ -1025,27 +1025,27 @@ SwView::~SwView()
// Set pointer in SwDocShell to the view again
SwDocShell* pDocSh = GetDocShell();
if( pDocSh && pDocSh->GetView() == this )
- pDocSh->SetView( 0 );
+ pDocSh->SetView( nullptr );
if ( SW_MOD()->GetView() == this )
- SW_MOD()->SetView( 0 );
+ SW_MOD()->SetView( nullptr );
if( m_aTimer.IsActive() && m_bAttrChgNotifiedWithRegistrations )
GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
// the last view must end the text edit
- SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : 0;
+ SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : nullptr;
if( pSdrView && pSdrView->IsTextEdit() )
pSdrView->SdrEndTextEdit( true );
- SetWindow( 0 );
+ SetWindow( nullptr );
m_pViewImpl->Invalidate();
EndListening(*GetViewFrame());
EndListening(*GetDocShell());
m_pScrollFill.disposeAndClear();
delete m_pWrtShell;
- m_pWrtShell = 0; // Set to 0, so that it is not accessible by the following dtors cannot.
- m_pShell = 0;
+ m_pWrtShell = nullptr; // Set to 0, so that it is not accessible by the following dtors cannot.
+ m_pShell = nullptr;
m_pHScrollbar.disposeAndClear();
m_pVScrollbar.disposeAndClear();
m_pHRuler.disposeAndClear();
@@ -1658,7 +1658,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if (!bDesignMode && GetDrawFuncPtr())
{
GetDrawFuncPtr()->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
LeaveDrawCreate();
AttrChangedNotify(m_pWrtShell);
}
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 090310e62d43..49c666e9d1f7 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -372,7 +372,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
- const SfxPoolItem* pAttr=NULL;
+ const SfxPoolItem* pAttr=nullptr;
if( pArgs && SfxItemState::SET == pArgs->GetItemState( nSlot , false, &pAttr ))
{
@@ -543,7 +543,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
if (bSet)
{
SwDocShell *pDocSh = GetDocShell();
- SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : NULL;
+ SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : nullptr;
// right now we don't have view options for automatic grammar checking. Thus...
bool bIsAutoGrammar = false;
diff --git a/sw/source/uibase/uiview/view1.cxx b/sw/source/uibase/uiview/view1.cxx
index 9fb3bd92e722..3f9b047da6a7 100644
--- a/sw/source/uibase/uiview/view1.cxx
+++ b/sw/source/uibase/uiview/view1.cxx
@@ -184,7 +184,7 @@ void SwView::StateFormatPaintbrush(SfxItemSet &rSet)
void SwView::UpdateWordCount(SfxShell* pShell, sal_uInt16 nSlot)
{
SfxViewFrame* pVFrame = GetViewFrame();
- if (pVFrame != NULL)
+ if (pVFrame != nullptr)
{
pVFrame->ToggleChildWindow(FN_WORDCOUNT_DIALOG);
pShell->Invalidate(nSlot);
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 7c528dc42a31..853120e3a8ef 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -688,7 +688,7 @@ void SwView::Execute(SfxRequest &rReq)
// would return NULL if called on the point)
sal_uInt16 nRedline = 0;
const SwRangeRedline *pRedline = pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), &nRedline);
- assert(pRedline != 0);
+ assert(pRedline != nullptr);
if (pRedline)
{
if (FN_REDLINE_ACCEPT_DIRECT == nSlot)
@@ -816,7 +816,7 @@ void SwView::Execute(SfxRequest &rReq)
}
else if ( m_pWrtShell->HasSelection() || IsDrawMode() )
{
- SdrView *pSdrView = m_pWrtShell->HasDrawView() ? m_pWrtShell->GetDrawView() : 0;
+ SdrView *pSdrView = m_pWrtShell->HasDrawView() ? m_pWrtShell->GetDrawView() : nullptr;
if(pSdrView && pSdrView->AreObjectsMarked() &&
pSdrView->GetHdlList().GetFocusHdl())
{
@@ -962,7 +962,7 @@ void SwView::Execute(SfxRequest &rReq)
if( m_pWrtShell->GotoNextTOXBase() )
pBase = m_pWrtShell->GetCurTOX();
else
- pBase = 0;
+ pBase = nullptr;
}
}
m_pWrtShell->SetReadOnlyAvailable( bOldCrsrInReadOnly );
@@ -1163,7 +1163,7 @@ void SwView::Execute(SfxRequest &rReq)
case FN_SPELL_GRAMMAR_DIALOG:
{
SfxViewFrame* pViewFrame = GetViewFrame();
- if (rReq.GetArgs() != NULL)
+ if (rReq.GetArgs() != nullptr)
pViewFrame->SetChildWindow (FN_SPELL_GRAMMAR_DIALOG,
static_cast<const SfxBoolItem&>( (rReq.GetArgs()->
Get(FN_SPELL_GRAMMAR_DIALOG))).GetValue());
@@ -1623,7 +1623,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
SwWrtShell &rSh = GetWrtShell();
const SfxItemSet* pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem=NULL;
+ const SfxPoolItem* pItem=nullptr;
bool bUp = false;
sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
@@ -1672,7 +1672,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
if ( ( GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
- const SfxItemSet *pSet = 0;
+ const SfxItemSet *pSet = nullptr;
std::unique_ptr<AbstractSvxZoomDialog> pDlg;
if ( pArgs )
pSet = pArgs;
@@ -1714,7 +1714,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
}
- const SfxPoolItem* pViewLayoutItem = 0;
+ const SfxPoolItem* pViewLayoutItem = nullptr;
if ( pSet && SfxItemState::SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pViewLayoutItem))
{
const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem *>(pViewLayoutItem)->GetValue();
@@ -2003,7 +2003,7 @@ bool SwView::JumpToSwMark( const OUString& rMark )
}
else if( pMarkAccess->getAllMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)) )
m_pWrtShell->GotoMark( ppMark->get(), false, true ), bRet = true;
- else if( 0 != ( pINet = m_pWrtShell->FindINetAttr( sMark ) )) {
+ else if( nullptr != ( pINet = m_pWrtShell->FindINetAttr( sMark ) )) {
m_pWrtShell->addCurrentPosition();
bRet = m_pWrtShell->GotoINetAttr( *pINet->GetTextINetFormat() );
}
@@ -2027,7 +2027,7 @@ bool SwView::JumpToSwMark( const OUString& rMark )
}
else if( pMarkAccess->getAllMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)))
m_pWrtShell->GotoMark( ppMark->get(), false, true ), bRet = true;
- else if( 0 != ( pINet = m_pWrtShell->FindINetAttr( sMark ) ))
+ else if( nullptr != ( pINet = m_pWrtShell->FindINetAttr( sMark ) ))
bRet = m_pWrtShell->GotoINetAttr( *pINet->GetTextINetFormat() );
// make selection visible later
@@ -2095,7 +2095,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUString& rFilterName, sal_Int16 nVersion )
{
- SfxMedium* pMed = 0;
+ SfxMedium* pMed = nullptr;
SwDocShell* pDocSh = GetDocShell();
if( !rFileName.isEmpty() )
@@ -2104,7 +2104,7 @@ long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUS
const SfxFilter* pFilter = rFact.GetFilterContainer()->GetFilter4FilterName( rFilterName );
if ( !pFilter )
{
- pMed = new SfxMedium(rFileName, StreamMode::READ, 0, 0 );
+ pMed = new SfxMedium(rFileName, StreamMode::READ, nullptr, nullptr );
SfxFilterMatcher aMatcher( rFact.GetFilterContainer()->GetName() );
pMed->UseInteractionHandler( true );
ErrCode nErr = aMatcher.GuessFilter(*pMed, &pFilter, SfxFilterFlags::NONE);
@@ -2114,7 +2114,7 @@ long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUS
pMed->SetFilter( pFilter );
}
else
- pMed = new SfxMedium(rFileName, StreamMode::READ, pFilter, 0);
+ pMed = new SfxMedium(rFileName, StreamMode::READ, pFilter, nullptr);
}
else
{
@@ -2200,7 +2200,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe
::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
uno::Reference<text::XTextRange> const xInsertPosition(
SwXTextRange::CreateXTextRange(*pDoc,
- *m_pWrtShell->GetCrsr()->GetPoint(), 0));
+ *m_pWrtShell->GetCrsr()->GetPoint(), nullptr));
nErrno = pDocSh->ImportFrom(*pMedium, xInsertPosition)
? 0 : ERR_SWG_READ_ERROR;
}
@@ -2372,7 +2372,7 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( NULL, SID_OPTIONS_DATABASES ));
+ std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( nullptr, SID_OPTIONS_DATABASES ));
pDlg->Execute();
}
}
diff --git a/sw/source/uibase/uiview/viewcoll.cxx b/sw/source/uibase/uiview/viewcoll.cxx
index 8f379b56ece3..3a3e20f3ce93 100644
--- a/sw/source/uibase/uiview/viewcoll.cxx
+++ b/sw/source/uibase/uiview/viewcoll.cxx
@@ -33,7 +33,7 @@
void SwView::ExecColl(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
{
diff --git a/sw/source/uibase/uiview/viewdlg.cxx b/sw/source/uibase/uiview/viewdlg.cxx
index bb7d3796b3e9..a14eeee8037c 100644
--- a/sw/source/uibase/uiview/viewdlg.cxx
+++ b/sw/source/uibase/uiview/viewdlg.cxx
@@ -36,7 +36,7 @@
void SwView::ExecDlg(SfxRequest &rReq)
{
// Thus, from the basic no dialogues for background views are called:
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
const SfxItemSet* pArgs = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx
index b58cf1c0708e..d5ab1c5ef626 100644
--- a/sw/source/uibase/uiview/viewdlg2.cxx
+++ b/sw/source/uibase/uiview/viewdlg2.cxx
@@ -145,7 +145,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
}
sal_uInt16 nID = USHRT_MAX;
- SwFieldType* pType = 0;
+ SwFieldType* pType = nullptr;
const size_t nCount = aMgr.GetFieldTypeCount();
if( !rName.isEmpty() )
{
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index a00996a27d30..a8b4cc4768fd 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -77,8 +77,8 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- const SfxAllEnumItem* pEItem = 0;
- const SfxStringItem* pStringItem = 0;
+ const SfxAllEnumItem* pEItem = nullptr;
+ const SfxStringItem* pStringItem = nullptr;
SdrView *pSdrView = m_pWrtShell->GetDrawView();
bool bDeselect = false;
@@ -176,7 +176,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
pSdrView = m_pWrtShell->GetDrawView();
if ( pSdrView )
{
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
ScopedVclPtrInstance< svx::FontWorkGalleryDialog > aDlg( pSdrView, pWin, nSlotId );
aDlg->SetSdrObjectRef( &pObj, pSdrView->GetModel() );
aDlg->Execute();
@@ -237,7 +237,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
if (GetDrawFuncPtr())
{
GetDrawFuncPtr()->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
}
if (m_pWrtShell->IsObjSelected() && !m_pWrtShell->IsSelFrmMode())
@@ -255,7 +255,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
if (m_pWrtShell->IsFrmSelected())
m_pWrtShell->EnterStdMode(); // because bug #45639
- SwDrawBase* pFuncPtr = NULL;
+ SwDrawBase* pFuncPtr = nullptr;
switch (nSlotId)
{
@@ -347,7 +347,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
if (GetDrawFuncPtr())
{
GetDrawFuncPtr()->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
}
SetDrawFuncPtr(pFuncPtr);
@@ -365,7 +365,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
pFuncPtr->CreateDefaultObject();
pFuncPtr->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
LeaveDrawCreate();
m_pWrtShell->EnterStdMode();
SdrView *pTmpSdrView = m_pWrtShell->GetDrawView();
@@ -404,7 +404,7 @@ void SwView::ExitDraw()
// the shell may be invalid at close/reload/SwitchToViewShell
SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher();
sal_uInt16 nIdx = 0;
- SfxShell* pTest = 0;
+ SfxShell* pTest = nullptr;
do
{
pTest = pDispatch->GetShell(nIdx++);
@@ -433,7 +433,7 @@ void SwView::ExitDraw()
m_pWrtShell->LeaveSelFrmMode();
GetDrawFuncPtr()->Deactivate();
- SetDrawFuncPtr(NULL);
+ SetDrawFuncPtr(nullptr);
LeaveDrawCreate();
GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
@@ -577,7 +577,7 @@ bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
// set in each case, thus it will be correct for all objects
static_cast<SdrTextObj*>(pToBeActivated)->SetTextEditOffset(aNewTextEditOffset);
- bool bRet(pSdrView->SdrBeginTextEdit( pToBeActivated, pPV, pWin, true, pOutliner, 0, false, false, false ));
+ bool bRet(pSdrView->SdrBeginTextEdit( pToBeActivated, pPV, pWin, true, pOutliner, nullptr, false, false, false ));
// #i7672#
// Since SdrBeginTextEdit actually creates the OutlinerView and thus also
diff --git a/sw/source/uibase/uiview/viewfunc.hxx b/sw/source/uibase/uiview/viewfunc.hxx
index a64bd360eba0..c891101e477b 100644
--- a/sw/source/uibase/uiview/viewfunc.hxx
+++ b/sw/source/uibase/uiview/viewfunc.hxx
@@ -43,8 +43,8 @@ void ViewResizePixel( const vcl::RenderContext &rRef,
SwScrollbar& rVScrollbar,
SwScrollbar& rHScrollbar,
vcl::Window& rScrollBarBox,
- SvxRuler* pVRuler = 0,
- SvxRuler* pHRuler = 0,
+ SvxRuler* pVRuler = nullptr,
+ SvxRuler* pHRuler = nullptr,
bool bVRulerRight = false );
#endif
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index e2d37d25e3b2..af2e46e954df 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -106,7 +106,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
rReq.Ignore();
break;
case SID_HANGUL_HANJA_CONVERSION:
- StartTextConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, NULL,
+ StartTextConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, nullptr,
i18n::TextConversionOption::CHARACTER_BY_CHARACTER, true );
break;
case SID_CHINESE_CONVERSION:
@@ -127,7 +127,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
if( xInit.is() )
{
// initialize dialog
- Reference< awt::XWindow > xDialogParentWindow(0);
+ Reference< awt::XWindow > xDialogParentWindow(nullptr);
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
@@ -247,7 +247,7 @@ void SwView::StartTextConversion(
m_pWrtShell->GetCrsr() != m_pWrtShell->GetCrsr()->GetNext();
const bool bStart = bSelection || m_pWrtShell->IsStartOfDoc();
- const bool bOther = !bSelection && !(m_pWrtShell->GetFrmType(0,true) & FrmTypeFlags::BODY);
+ const bool bOther = !bSelection && !(m_pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY);
{
const uno::Reference< uno::XComponentContext > xContext(
@@ -456,7 +456,7 @@ void SwView::HyphenateDocument()
bool bOther = m_pWrtShell->HasOtherCnt() && bHyphSpecial && !bSelection;
bool bStart = bSelection || ( !bOther && m_pWrtShell->IsStartOfDoc() );
bool bStop = false;
- if( !bOther && !(m_pWrtShell->GetFrmType(0,true) & FrmTypeFlags::BODY) && !bSelection )
+ if( !bOther && !(m_pWrtShell->GetFrmType(nullptr,true) & FrmTypeFlags::BODY) && !bSelection )
// turned on no special area
{
// I want also in special areas hyphenation
@@ -521,7 +521,7 @@ void SwView::InsertThesaurusSynonym( const OUString &rSynonmText, const OUString
sal_Int32 nLeft = 0;
while (pChar && *pChar++ == CH_TXTATR_INWORD)
++nLeft;
- pChar = rLookUpText.getLength() ? rLookUpText.getStr() + rLookUpText.getLength() - 1 : 0;
+ pChar = rLookUpText.getLength() ? rLookUpText.getStr() + rLookUpText.getLength() - 1 : nullptr;
sal_Int32 nRight = 0;
while (pChar && *pChar-- == CH_TXTATR_INWORD)
++nRight;
@@ -717,7 +717,7 @@ bool SwView::ExecSpellPopup(const Point& rPt)
aEvent.SourceWindow = VCLUnoHelper::GetInterface( m_pEditWin );
aEvent.ExecutePosition.X = aPixPos.X();
aEvent.ExecutePosition.Y = aPixPos.Y();
- Menu* pMenu = 0;
+ Menu* pMenu = nullptr;
OUString sMenuName = bUseGrammarContext ?
OUString("private:resource/GrammarContextMenu") : OUString("private:resource/SpellContextMenu");
@@ -761,7 +761,7 @@ bool SwView::ExecSpellPopup(const Point& rPt)
pExecuteInfo->xDispatch = xDispatch;
pExecuteInfo->aTargetURL = aURL;
pExecuteInfo->aArgs = aArgs;
- Application::PostUserEvent( LINK(0, AsyncExecute , ExecuteHdl_Impl), pExecuteInfo );
+ Application::PostUserEvent( LINK(nullptr, AsyncExecute , ExecuteHdl_Impl), pExecuteInfo );
}
}
catch (const Exception&)
@@ -836,7 +836,7 @@ SwFieldDialog::SwFieldDialog( SwEditWin* parent, IFieldmark *fieldBM ) :
aListBox(VclPtr<ListBox>::Create(this)),
pFieldmark( fieldBM )
{
- if ( fieldBM != NULL )
+ if ( fieldBM != nullptr )
{
const IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters();
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index a722622493fd..12e6596b2c3b 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -152,7 +152,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
{
pUsrPref->SetZoom(nZoomFac);
pUsrPref->SetZoomType(eZoomType);
- SW_MOD()->ApplyUsrPref(*pUsrPref, 0);
+ SW_MOD()->ApplyUsrPref(*pUsrPref, nullptr);
pUsrPref->SetModified();
}
if ( pOpt->GetZoom() != nZoomFac )
@@ -226,7 +226,7 @@ void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, bool bViewOnly
{
pUsrPref->SetViewLayoutColumns(nColumns);
pUsrPref->SetViewLayoutBookMode(bBookMode);
- SW_MOD()->ApplyUsrPref(*pUsrPref, 0);
+ SW_MOD()->ApplyUsrPref(*pUsrPref, nullptr);
pUsrPref->SetModified();
}
}
@@ -420,7 +420,7 @@ IMPL_LINK_TYPED( SwView, MoveNavigationHdl, void*, p, void )
rSh.EnterStdMode();
sw::sidebarwindows::SwSidebarWin* pPostIt = GetPostItMgr()->GetActiveSidebarWin();
if (pPostIt)
- GetPostItMgr()->SetActiveSidebarWin(0);
+ GetPostItMgr()->SetActiveSidebarWin(nullptr);
SwFieldType* pFieldType = rSh.GetFieldType(0, RES_POSTITFLD);
if ( rSh.MoveFieldType( pFieldType, bNext ) )
GetViewFrame()->GetDispatcher()->Execute(FN_POSTIT);
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index 47ba3deb006f..bbf790402cee 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -623,7 +623,7 @@ bool SwView::PageUpCrsr( bool bSelect )
{
if ( !bSelect )
{
- const FrmTypeFlags eType = m_pWrtShell->GetFrmType(0,true);
+ const FrmTypeFlags eType = m_pWrtShell->GetFrmType(nullptr,true);
if ( eType & FrmTypeFlags::FOOTNOTE )
{
m_pWrtShell->MoveCrsr();
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 04c4ac34680f..308d0b89e671 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -255,17 +255,17 @@ VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent,
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "No Print Dialog");
if (!pFact)
- return NULL;
+ return nullptr;
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc(TP_OPTPRINT_PAGE);
OSL_ENSURE(pFact, "No Page Creator");
if (!fnCreatePage)
- return NULL;
+ return nullptr;
VclPtr<SfxTabPage> pPage = fnCreatePage(pParent, &rOptions);
OSL_ENSURE(pPage, "No page");
if (!pPage)
- return NULL;
+ return nullptr;
SfxAllItemSet aSet(*(rOptions.GetPool()));
aSet.Put(SfxBoolItem(SID_PREVIEWFLAG_TYPE, bPreview));
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 92d907694970..7d7ebd578822 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -85,7 +85,7 @@ struct SwSearchOptions
static vcl::Window* GetParentWindow( SvxSearchDialog* pSrchDlg )
{
- return pSrchDlg && pSrchDlg->IsVisible() ? pSrchDlg : 0;
+ return pSrchDlg && pSrchDlg->IsVisible() ? pSrchDlg : nullptr;
}
/// Adds rMatches using rKey as a key to the rTree tree.
@@ -144,7 +144,7 @@ static void lcl_emitSearchResultCallbacks(SvxSearchItem* pSearchItem, SwWrtShell
void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
bool bQuiet = false;
if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_SEARCH_QUIET, false, &pItem))
bQuiet = static_cast<const SfxBoolItem*>( pItem)->GetValue();
@@ -195,7 +195,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
if( pList && pList->Count() )
m_pSrchList = new SearchAttrItemList( *pList );
- if( 0 != (pList = m_pSrchDlg->GetReplaceItemList() ) &&
+ if( nullptr != (pList = m_pSrchDlg->GetReplaceItemList() ) &&
pList->Count() )
m_pReplList = new SearchAttrItemList( *pList );
}
@@ -220,7 +220,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
if( pList && pList->Count() )
m_pSrchList = new SearchAttrItemList( *pList );
- if( 0 != (pList = m_pSrchDlg->GetReplaceItemList() ) &&
+ if( nullptr != (pList = m_pSrchDlg->GetReplaceItemList() ) &&
pList->Count() )
m_pReplList = new SearchAttrItemList( *pList );
}
@@ -373,7 +373,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
if (!m_pSrchItem->GetSelection())
{
// if we don't want to search in the selection...
- m_pWrtShell->KillSelection(0, false);
+ m_pWrtShell->KillSelection(nullptr, false);
// i#8288 "replace all" should not change cursor
// position, so save current cursor
m_pWrtShell->Push();
@@ -550,7 +550,7 @@ bool SwView::SearchAndWrap(bool bApi)
// If you want to search in selected areas, they must not be unselected.
if (!m_pSrchItem->GetSelection())
- m_pWrtShell->KillSelection(0, false);
+ m_pWrtShell->KillSelection(nullptr, false);
std::unique_ptr<SwWait> pWait(new SwWait( *GetDocShell(), true ));
if( FUNC_Search( aOpts ) )
@@ -664,7 +664,7 @@ bool SwView::SearchAll(sal_uInt16* pFound)
if (!m_pSrchItem->GetSelection())
{
// Cancel existing selections, if should not be sought in selected areas.
- m_pWrtShell->KillSelection(0, false);
+ m_pWrtShell->KillSelection(nullptr, false);
if( DOCPOS_START == aOpts.eEnd )
m_pWrtShell->EndDoc();
@@ -822,7 +822,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
::SfxToSwPageDescAttr( *m_pWrtShell, aSrchSet );
}
- SfxItemSet* pReplSet = 0;
+ SfxItemSet* pReplSet = nullptr;
if( bDoReplace && m_pReplList && m_pReplList->Count() )
{
pReplSet = new SfxItemSet( m_pWrtShell->GetAttrPool(),
@@ -852,7 +852,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
rOptions.eStart,
rOptions.eEnd,
FindRanges(eRanges),
- !m_pSrchItem->GetSearchString().isEmpty() ? &aSearchOpt : 0,
+ !m_pSrchItem->GetSearchString().isEmpty() ? &aSearchOpt : nullptr,
pReplSet );
}
else if( m_pSrchItem->GetPattern() )
@@ -863,7 +863,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
rOptions.eStart,
rOptions.eEnd,
FindRanges(eRanges),
- bDoReplace ? &sRplStr : 0 );
+ bDoReplace ? &sRplStr : nullptr );
}
else
{
@@ -883,7 +883,7 @@ SvxSearchDialog* SwView::GetSearchDialog()
#if HAVE_FEATURE_DESKTOP
const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = static_cast<SvxSearchDialogWrapper*>( SfxViewFrame::Current()->GetChildWindow(nId) );
- m_pSrchDlg = pWrp ? pWrp->getDialog () : 0;
+ m_pSrchDlg = pWrp ? pWrp->getDialog () : nullptr;
return m_pSrchDlg;
#else
return NULL;
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index 762fae9ac0f8..8da54f5a9399 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -98,7 +98,7 @@ void SwView::GetState(SfxItemSet &rSet)
// There are captions for graphics, OLE objects, frames and tables
if( !bGetFrmType )
{
- eFrmType = m_pWrtShell->GetFrmType(0, true);
+ eFrmType = m_pWrtShell->GetFrmType(nullptr, true);
bGetFrmType = true;
}
if (! ( ((eFrmType & FrmTypeFlags::FLY_ANY) && m_nSelectionType != nsSelectionType::SEL_DRW_TXT)||
@@ -130,7 +130,7 @@ void SwView::GetState(SfxItemSet &rSet)
case FN_CHANGE_PAGENUM:
{
- FrmTypeFlags nType = m_pWrtShell->GetFrmType(0,true);
+ FrmTypeFlags nType = m_pWrtShell->GetFrmType(nullptr,true);
if( ( FrmTypeFlags::FLY_ANY | FrmTypeFlags::HEADER | FrmTypeFlags::FOOTER |
FrmTypeFlags::FOOTNOTE | FrmTypeFlags::DRAWOBJ ) & nType )
rSet.DisableItem(nWhich);
@@ -175,7 +175,7 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case SID_CLEARHISTORY:
{
- rSet.Put(SfxBoolItem(nWhich, m_pWrtShell->GetLastUndoInfo(0, 0)));
+ rSet.Put(SfxBoolItem(nWhich, m_pWrtShell->GetLastUndoInfo(nullptr, nullptr)));
}
break;
case SID_UNDO:
@@ -206,8 +206,8 @@ void SwView::GetState(SfxItemSet &rSet)
case FN_EDIT_CURRENT_TOX:
case FN_UPDATE_CUR_TOX:
{
- const SwTOXBase* pBase = 0;
- if(0 == (pBase = m_pWrtShell->GetCurTOX()) ||
+ const SwTOXBase* pBase = nullptr;
+ if(nullptr == (pBase = m_pWrtShell->GetCurTOX()) ||
(FN_EDIT_CURRENT_TOX == nWhich && pBase->IsTOXBaseInReadonly()))
rSet.DisableItem(nWhich);
}
@@ -280,9 +280,9 @@ void SwView::GetState(SfxItemSet &rSet)
sal_uInt16 index = 0;
const SwRedlineTable& table = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
const SwRangeRedline* redline = table.FindAtPosition( *pCursor->Start(), index );
- if( redline != NULL && *redline->Start() == *pCursor->End())
- redline = NULL;
- if( redline == NULL )
+ if( redline != nullptr && *redline->Start() == *pCursor->End())
+ redline = nullptr;
+ if( redline == nullptr )
{
for(; index < table.size(); ++index )
{
@@ -296,14 +296,14 @@ void SwView::GetState(SfxItemSet &rSet)
}
}
}
- if( redline == NULL )
+ if( redline == nullptr )
rSet.DisableItem(nWhich);
}
else
{
// If the cursor position isn't on a redline, disable
// accepting/rejecting changes.
- if (0 == pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), 0))
+ if (nullptr == pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), nullptr))
rSet.DisableItem(nWhich);
}
}
@@ -430,7 +430,7 @@ void SwView::GetState(SfxItemSet &rSet)
//the draw shell cannot provide a status per item - only one for SID_OBJECT_ALIGN
if(nWhich != SID_ALIGN_ANY_JUSTIFIED)
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
GetViewFrame()->GetDispatcher()->QueryState( SID_OBJECT_ALIGN, pItem );
if(pItem)
bDraw = true;
@@ -449,7 +449,7 @@ void SwView::GetState(SfxItemSet &rSet)
}
}
//these slots are either re-mapped to text or object alignment
- const SfxPoolItem* pState = 0;
+ const SfxPoolItem* pState = nullptr;
if(nAlias)
GetViewFrame()->GetDispatcher()->QueryState( nAlias, pState );
if(pState)
@@ -534,7 +534,7 @@ bool SwView::HasUIFeature( sal_uInt32 nFeature )
{
case CHILDWIN_LABEL : bRet = m_pWrtShell->IsLabelDoc(); break;
#if HAVE_FEATURE_DBCONNECTIVITY
- case CHILDWIN_MAILMERGE : bRet = 0 != GetMailMergeConfigItem(); break;
+ case CHILDWIN_MAILMERGE : bRet = nullptr != GetMailMergeConfigItem(); break;
#endif
}
return bRet;
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 921eacd5669b..3f53c38bc6e7 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -225,7 +225,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwWrtShell &rSh = GetWrtShell();
const FrmTypeFlags nFrmType = rSh.IsObjSelected() ?
FrmTypeFlags::DRAWOBJ :
- rSh.GetFrmType(0,true);
+ rSh.GetFrmType(nullptr,true);
const bool bFrmSelection = rSh.IsFrmSelected();
const bool bBrowse = rSh.GetViewOptions()->getBrowseMode();
@@ -858,7 +858,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
if ( bFrmSelection || nFrmType & FrmTypeFlags::FLY_ANY || bSect)
{
- SwSectionFormat *pSectFormat = 0;
+ SwSectionFormat *pSectFormat = nullptr;
SfxItemSet aSet( GetPool(), RES_COL, RES_COL );
if(bSect)
{
@@ -985,7 +985,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.LockView( false );
m_bSetTabColFromDoc = m_bSetTabRowFromDoc = m_bTabColFromDoc = m_bTabRowFromDoc = false;
- SetNumRuleNodeFromDoc(NULL);
+ SetNumRuleNodeFromDoc(nullptr);
}
// Here the status of the tab bar will be determined.
@@ -995,7 +995,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetWrtShell();
- const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &m_aTabColFromDocPos : 0;
+ const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &m_aTabColFromDocPos : nullptr;
const FrmTypeFlags nFrmType = rSh.IsObjSelected()
? FrmTypeFlags::DRAWOBJ
: rSh.GetFrmType( pPt, true );
@@ -1391,7 +1391,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aDistLR.SetLeft(rBox.GetDistance(SvxBoxItemLine::LEFT));
aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT));
- const SvxBoxItem* pBox = 0;
+ const SvxBoxItem* pBox = nullptr;
if(nFrmType & FrmTypeFlags::HEADER)
{
rMaster.GetHeader();
@@ -1923,7 +1923,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
size_t nNum = IsTabColFromDoc() ?
rSh.GetCurMouseColNum( m_aTabColFromDocPos ):
rSh.GetCurOutColNum();
- const SwFrameFormat* pFormat = NULL;
+ const SwFrameFormat* pFormat = nullptr;
if( bColSct )
{
eRecType = bSectOutTable ? RECT_OUTTABSECTION