summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/Metadatable.hxx2
-rw-r--r--include/sfx2/XmlIdRegistry.hxx2
-rw-r--r--include/sfx2/app.hxx8
-rw-r--r--include/sfx2/basedlgs.hxx4
-rw-r--r--include/sfx2/bindings.hxx12
-rw-r--r--include/sfx2/childwin.hxx16
-rw-r--r--include/sfx2/ctrlitem.hxx4
-rw-r--r--include/sfx2/dinfdlg.hxx6
-rw-r--r--include/sfx2/dispatch.hxx12
-rw-r--r--include/sfx2/docfile.hxx12
-rw-r--r--include/sfx2/docfilt.hxx2
-rw-r--r--include/sfx2/docinf.hxx6
-rw-r--r--include/sfx2/event.hxx4
-rw-r--r--include/sfx2/evntconf.hxx6
-rw-r--r--include/sfx2/fcontnr.hxx2
-rw-r--r--include/sfx2/filedlghelper.hxx6
-rw-r--r--include/sfx2/frame.hxx8
-rw-r--r--include/sfx2/frmdescr.hxx6
-rw-r--r--include/sfx2/frmhtml.hxx2
-rw-r--r--include/sfx2/frmhtmlw.hxx8
-rw-r--r--include/sfx2/hintpost.hxx2
-rw-r--r--include/sfx2/linkmgr.hxx16
-rw-r--r--include/sfx2/linksrc.hxx2
-rw-r--r--include/sfx2/mgetempl.hxx4
-rw-r--r--include/sfx2/mieclip.hxx2
-rw-r--r--include/sfx2/minfitem.hxx2
-rw-r--r--include/sfx2/mnuitem.hxx4
-rw-r--r--include/sfx2/module.hxx2
-rw-r--r--include/sfx2/msgpool.hxx4
-rw-r--r--include/sfx2/objface.hxx2
-rw-r--r--include/sfx2/objitem.hxx4
-rw-r--r--include/sfx2/objsh.hxx28
-rw-r--r--include/sfx2/passwd.hxx2
-rw-r--r--include/sfx2/printopt.hxx2
-rw-r--r--include/sfx2/progress.hxx2
-rw-r--r--include/sfx2/request.hxx4
-rw-r--r--include/sfx2/sfxbasemodel.hxx2
-rw-r--r--include/sfx2/sfxdlg.hxx12
-rw-r--r--include/sfx2/sfxhtml.hxx4
-rw-r--r--include/sfx2/sfxuno.hxx4
-rw-r--r--include/sfx2/shell.hxx10
-rw-r--r--include/sfx2/stbitem.hxx2
-rw-r--r--include/sfx2/styfitem.hxx2
-rw-r--r--include/sfx2/tabdlg.hxx6
-rw-r--r--include/sfx2/tbxctrl.hxx6
-rw-r--r--include/sfx2/templatedlg.hxx2
-rw-r--r--include/sfx2/templateinfodlg.hxx2
-rw-r--r--include/sfx2/tplpitem.hxx2
-rw-r--r--include/sfx2/viewfrm.hxx18
-rw-r--r--include/sfx2/viewsh.hxx6
-rw-r--r--include/sfx2/zoomitem.hxx2
-rw-r--r--sfx2/inc/sorgitm.hxx2
-rw-r--r--sfx2/qa/cppunit/test_metadatable.cxx2
-rw-r--r--sfx2/source/appl/app.cxx16
-rw-r--r--sfx2/source/appl/appbas.cxx8
-rw-r--r--sfx2/source/appl/appbaslib.cxx4
-rw-r--r--sfx2/source/appl/appcfg.cxx4
-rw-r--r--sfx2/source/appl/appchild.cxx4
-rw-r--r--sfx2/source/appl/appdata.cxx58
-rw-r--r--sfx2/source/appl/appdde.cxx2
-rw-r--r--sfx2/source/appl/appdispatchprovider.cxx2
-rw-r--r--sfx2/source/appl/appinit.cxx4
-rw-r--r--sfx2/source/appl/appmisc.cxx6
-rw-r--r--sfx2/source/appl/appopen.cxx22
-rw-r--r--sfx2/source/appl/appquit.cxx10
-rw-r--r--sfx2/source/appl/appreg.cxx4
-rw-r--r--sfx2/source/appl/appserv.cxx30
-rw-r--r--sfx2/source/appl/appuno.cxx2
-rw-r--r--sfx2/source/appl/childwin.cxx44
-rw-r--r--sfx2/source/appl/fileobj.cxx12
-rw-r--r--sfx2/source/appl/fileobj.hxx2
-rw-r--r--sfx2/source/appl/fwkhelper.cxx2
-rw-r--r--sfx2/source/appl/helpinterceptor.cxx10
-rw-r--r--sfx2/source/appl/imagemgr.cxx2
-rw-r--r--sfx2/source/appl/imestatuswindow.cxx6
-rw-r--r--sfx2/source/appl/impldde.cxx6
-rw-r--r--sfx2/source/appl/linkmgr2.cxx14
-rw-r--r--sfx2/source/appl/linksrc.cxx16
-rw-r--r--sfx2/source/appl/lnkbase2.cxx10
-rw-r--r--sfx2/source/appl/macroloader.cxx12
-rw-r--r--sfx2/source/appl/module.cxx30
-rw-r--r--sfx2/source/appl/newhelp.cxx44
-rw-r--r--sfx2/source/appl/sfxhelp.cxx18
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx4
-rw-r--r--sfx2/source/appl/shutdownicon.cxx24
-rw-r--r--sfx2/source/appl/shutdowniconunx.cxx34
-rw-r--r--sfx2/source/appl/workwin.cxx64
-rw-r--r--sfx2/source/appl/xpackcreator.cxx6
-rw-r--r--sfx2/source/bastyp/bitset.cxx4
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx44
-rw-r--r--sfx2/source/bastyp/frmhtml.cxx2
-rw-r--r--sfx2/source/bastyp/frmhtmlw.cxx4
-rw-r--r--sfx2/source/bastyp/helper.cxx4
-rw-r--r--sfx2/source/bastyp/mieclip.cxx4
-rw-r--r--sfx2/source/bastyp/progress.cxx24
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx6
-rw-r--r--sfx2/source/bastyp/sfxresid.cxx2
-rw-r--r--sfx2/source/config/evntconf.cxx2
-rw-r--r--sfx2/source/control/bindings.cxx106
-rw-r--r--sfx2/source/control/ctrlitem.cxx10
-rw-r--r--sfx2/source/control/dispatch.cxx104
-rw-r--r--sfx2/source/control/msg.cxx2
-rw-r--r--sfx2/source/control/msgpool.cxx26
-rw-r--r--sfx2/source/control/objface.cxx24
-rw-r--r--sfx2/source/control/querystatus.cxx6
-rw-r--r--sfx2/source/control/recentdocsviewitem.cxx2
-rw-r--r--sfx2/source/control/request.cxx52
-rw-r--r--sfx2/source/control/sfxstatuslistener.cxx6
-rw-r--r--sfx2/source/control/shell.cxx60
-rw-r--r--sfx2/source/control/statcach.cxx36
-rw-r--r--sfx2/source/control/templatecontaineritem.cxx2
-rw-r--r--sfx2/source/control/templatelocalview.cxx12
-rw-r--r--sfx2/source/control/templateremoteview.cxx2
-rw-r--r--sfx2/source/control/thumbnailview.cxx18
-rw-r--r--sfx2/source/control/thumbnailviewacc.cxx20
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx2
-rw-r--r--sfx2/source/control/unoctitm.cxx34
-rw-r--r--sfx2/source/dialog/backingcomp.cxx2
-rw-r--r--sfx2/source/dialog/backingwindow.cxx6
-rw-r--r--sfx2/source/dialog/basedlgs.cxx22
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx60
-rw-r--r--sfx2/source/dialog/dockwin.cxx38
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx36
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx2
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx4
-rw-r--r--sfx2/source/dialog/infobar.cxx2
-rw-r--r--sfx2/source/dialog/itemconnect.cxx4
-rw-r--r--sfx2/source/dialog/mailmodel.cxx10
-rw-r--r--sfx2/source/dialog/mgetempl.cxx12
-rw-r--r--sfx2/source/dialog/partwnd.cxx2
-rw-r--r--sfx2/source/dialog/passwd.cxx2
-rw-r--r--sfx2/source/dialog/printopt.cxx2
-rw-r--r--sfx2/source/dialog/securitypage.cxx4
-rw-r--r--sfx2/source/dialog/splitwin.cxx12
-rw-r--r--sfx2/source/dialog/srchdlg.cxx2
-rw-r--r--sfx2/source/dialog/styledlg.cxx6
-rw-r--r--sfx2/source/dialog/tabdlg.cxx62
-rw-r--r--sfx2/source/dialog/taskpane.cxx8
-rw-r--r--sfx2/source/dialog/templateinfodlg.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx106
-rw-r--r--sfx2/source/dialog/tplcitem.cxx10
-rw-r--r--sfx2/source/dialog/versdlg.cxx14
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx30
-rw-r--r--sfx2/source/doc/Metadatable.cxx44
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx34
-rw-r--r--sfx2/source/doc/docfac.cxx10
-rw-r--r--sfx2/source/doc/docfile.cxx44
-rw-r--r--sfx2/source/doc/docfilt.cxx4
-rw-r--r--sfx2/source/doc/docinsert.cxx18
-rw-r--r--sfx2/source/doc/docstoragemodifylistener.cxx2
-rw-r--r--sfx2/source/doc/doctempl.cxx28
-rw-r--r--sfx2/source/doc/doctemplates.cxx14
-rw-r--r--sfx2/source/doc/docundomanager.cxx12
-rw-r--r--sfx2/source/doc/frmdescr.cxx2
-rw-r--r--sfx2/source/doc/graphhelp.cxx6
-rw-r--r--sfx2/source/doc/guisaveas.cxx12
-rw-r--r--sfx2/source/doc/iframe.cxx4
-rw-r--r--sfx2/source/doc/new.cxx4
-rw-r--r--sfx2/source/doc/objcont.cxx2
-rw-r--r--sfx2/source/doc/objembed.cxx10
-rw-r--r--sfx2/source/doc/objitem.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx18
-rw-r--r--sfx2/source/doc/objserv.cxx10
-rw-r--r--sfx2/source/doc/objstor.cxx32
-rw-r--r--sfx2/source/doc/objxtor.cxx50
-rw-r--r--sfx2/source/doc/oleprops.cxx12
-rw-r--r--sfx2/source/doc/ownsubfilterservice.cxx2
-rw-r--r--sfx2/source/doc/plugin.cxx2
-rw-r--r--sfx2/source/doc/printhelper.cxx20
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx60
-rw-r--r--sfx2/source/doc/templatedlg.cxx4
-rw-r--r--sfx2/source/explorer/nochaos.cxx6
-rw-r--r--sfx2/source/inc/appbaslib.hxx2
-rw-r--r--sfx2/source/inc/inputdlg.hxx2
-rw-r--r--sfx2/source/inc/macroloader.hxx2
-rw-r--r--sfx2/source/inc/slotserv.hxx2
-rw-r--r--sfx2/source/inc/statcach.hxx2
-rw-r--r--sfx2/source/inc/templdgi.hxx2
-rw-r--r--sfx2/source/inc/workwin.hxx8
-rw-r--r--sfx2/source/inet/inettbc.cxx2
-rw-r--r--sfx2/source/menu/mnuitem.cxx22
-rw-r--r--sfx2/source/menu/mnumgr.cxx18
-rw-r--r--sfx2/source/menu/virtmenu.cxx64
-rw-r--r--sfx2/source/notify/eventsupplier.cxx8
-rw-r--r--sfx2/source/notify/globalevents.cxx6
-rw-r--r--sfx2/source/sidebar/AccessibleTitleBar.cxx4
-rw-r--r--sfx2/source/sidebar/AsynchronousCall.cxx12
-rw-r--r--sfx2/source/sidebar/CommandInfoProvider.cxx12
-rw-r--r--sfx2/source/sidebar/ContextList.cxx4
-rw-r--r--sfx2/source/sidebar/ControllerFactory.cxx4
-rw-r--r--sfx2/source/sidebar/ControllerItem.cxx10
-rw-r--r--sfx2/source/sidebar/Deck.cxx8
-rw-r--r--sfx2/source/sidebar/DeckLayouter.cxx4
-rw-r--r--sfx2/source/sidebar/DeckTitleBar.cxx2
-rw-r--r--sfx2/source/sidebar/FocusManager.cxx28
-rw-r--r--sfx2/source/sidebar/Panel.cxx6
-rw-r--r--sfx2/source/sidebar/ResourceManager.cxx10
-rw-r--r--sfx2/source/sidebar/Sidebar.cxx2
-rw-r--r--sfx2/source/sidebar/SidebarChildWindow.cxx4
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx40
-rw-r--r--sfx2/source/sidebar/SidebarDockingWindow.cxx6
-rw-r--r--sfx2/source/sidebar/SidebarPanelBase.cxx14
-rw-r--r--sfx2/source/sidebar/SidebarToolBox.cxx10
-rw-r--r--sfx2/source/sidebar/TabBar.cxx8
-rw-r--r--sfx2/source/sidebar/Theme.cxx18
-rw-r--r--sfx2/source/sidebar/UnoSidebar.cxx2
-rw-r--r--sfx2/source/statbar/stbitem.cxx18
-rw-r--r--sfx2/source/toolbox/imgmgr.cxx6
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx54
-rw-r--r--sfx2/source/view/frame.cxx28
-rw-r--r--sfx2/source/view/frame2.cxx16
-rw-r--r--sfx2/source/view/frmload.cxx10
-rw-r--r--sfx2/source/view/impframe.hxx8
-rw-r--r--sfx2/source/view/impviewframe.hxx8
-rw-r--r--sfx2/source/view/ipclient.cxx12
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx22
-rw-r--r--sfx2/source/view/viewfrm.cxx80
-rw-r--r--sfx2/source/view/viewfrm2.cxx2
-rw-r--r--sfx2/source/view/viewprn.cxx32
-rw-r--r--sfx2/source/view/viewsh.cxx58
220 files changed, 1540 insertions, 1540 deletions
diff --git a/include/sfx2/Metadatable.hxx b/include/sfx2/Metadatable.hxx
index a6950e45fa92..ca23ffb63e49 100644
--- a/include/sfx2/Metadatable.hxx
+++ b/include/sfx2/Metadatable.hxx
@@ -66,7 +66,7 @@ createXmlIdRegistry(const bool i_DocIsClipboard);
class SFX2_DLLPUBLIC Metadatable
{
public:
- Metadatable() : m_pReg(0) {}
+ Metadatable() : m_pReg(nullptr) {}
// destructor calls RemoveMetadataReference
virtual ~Metadatable();
diff --git a/include/sfx2/XmlIdRegistry.hxx b/include/sfx2/XmlIdRegistry.hxx
index 54fd77c973d7..d16735480adf 100644
--- a/include/sfx2/XmlIdRegistry.hxx
+++ b/include/sfx2/XmlIdRegistry.hxx
@@ -72,7 +72,7 @@ public:
virtual ~IXmlIdRegistrySupplier() { }
/** override this if you have a XmlIdRegistry. */
- virtual const IXmlIdRegistry* GetXmlIdRegistry() const { return 0; }
+ virtual const IXmlIdRegistry* GetXmlIdRegistry() const { return nullptr; }
};
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index af3edfc376c1..0b6c89806935 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -98,7 +98,7 @@ public:
SfxLinkItem( sal_uInt16 nWhichId, const Link<SfxPoolItem*, void>& rValue ) : SfxPoolItem( nWhichId )
{ aLink = rValue; }
- virtual SfxPoolItem* Clone( SfxItemPool* = 0 ) const override
+ virtual SfxPoolItem* Clone( SfxItemPool* = nullptr ) const override
{ return new SfxLinkItem( *this ); }
virtual bool operator==( const SfxPoolItem& rL) const override
{ return static_cast<const SfxLinkItem&>(rL).aLink == aLink; }
@@ -157,7 +157,7 @@ public:
/**
* @param pArgs Takes ownership
*/
- sal_uIntPtr LoadTemplate( SfxObjectShellLock& xDoc, const OUString& rFileName, bool bCopy=true, SfxItemSet* pArgs = 0 );
+ sal_uIntPtr LoadTemplate( SfxObjectShellLock& xDoc, const OUString& rFileName, bool bCopy=true, SfxItemSet* pArgs = nullptr );
vcl::Window* GetTopWindow() const;
// members
@@ -172,7 +172,7 @@ public:
static OUString ChooseScript();
static void MacroOrganizer( sal_Int16 nTabId );
static ErrCode CallBasic( const OUString&, BasicManager*, SbxArray *pArgs, SbxValue *pRet );
- static ErrCode CallAppBasic( const OUString& i_macroName, SbxArray* i_args = NULL, SbxValue* i_ret = NULL )
+ static ErrCode CallAppBasic( const OUString& i_macroName, SbxArray* i_args = nullptr, SbxValue* i_ret = nullptr )
{ return CallBasic( i_macroName, SfxApplication::GetBasicManager(), i_args, i_ret ); }
static BasicManager* GetBasicManager();
css::script::XLibraryContainer * GetDialogContainer();
@@ -229,7 +229,7 @@ public:
SAL_DLLPRIVATE void SetLastDir_Impl( const OUString & );
SAL_DLLPRIVATE void Registrations_Impl();
- SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl(const SfxViewFrame *pFrame=0) const;
+ SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl(const SfxViewFrame *pFrame=nullptr) const;
// TODO/CLEANUP: still needed? -- unclear whether this comment
// refers to the GetDisabledSlotList_Impl() method which was
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 610c5e672f25..5d4a83bb97d3 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -179,14 +179,14 @@ public:
const OUString& rID = OUString("SingleTabDialog"),
const OUString& rUIXMLDescription = OUString("sfx/ui/singletabdialog.ui"));
- SfxSingleTabDialog(vcl::Window *pParent, const SfxItemSet* pInSet = 0,
+ SfxSingleTabDialog(vcl::Window *pParent, const SfxItemSet* pInSet = nullptr,
const OUString& rID = OUString("SingleTabDialog"),
const OUString& rUIXMLDescription = OUString("sfx/ui/singletabdialog.ui"));
virtual ~SfxSingleTabDialog();
virtual void dispose() override;
- void SetTabPage(SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = 0, sal_uInt32 nSettingsId = 0);
+ void SetTabPage(SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = nullptr, sal_uInt32 nSettingsId = 0);
SfxTabPage* GetTabPage() const { return pImpl->m_pSfxPage; }
OKButton* GetOKButton() const { return pOKBtn; }
diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx
index 5bcaf6e77e20..bbe5cc46cda9 100644
--- a/include/sfx2/bindings.hxx
+++ b/include/sfx2/bindings.hxx
@@ -166,21 +166,21 @@ public:
SfxItemState QueryState( sal_uInt16 nSID, SfxPoolItem* &rpState );
const SfxPoolItem* ExecuteSynchron( sal_uInt16 nSlot,
- const SfxPoolItem **pArgs = 0,
+ const SfxPoolItem **pArgs = nullptr,
sal_uInt16 nModi = 0,
- const SfxPoolItem **pInternalArgs = 0);
+ const SfxPoolItem **pInternalArgs = nullptr);
bool Execute( sal_uInt16 nSlot,
- const SfxPoolItem **pArgs = 0,
+ const SfxPoolItem **pArgs = nullptr,
sal_uInt16 nModi = 0,
SfxCallMode nCall = SfxCallMode::SLOT,
- const SfxPoolItem **pInternalArgs = 0);
+ const SfxPoolItem **pInternalArgs = nullptr);
SAL_DLLPRIVATE void SetDispatchProvider_Impl( const css::uno::Reference< css::frame::XDispatchProvider > & rFrame );
void SetActiveFrame( const css::uno::Reference< css::frame::XFrame > & rFrame );
const css::uno::Reference< css::frame::XFrame > GetActiveFrame() const;
// Reconfig
- sal_uInt16 EnterRegistrations(const char *pFile = 0, int nLine = 0);
- void LeaveRegistrations( sal_uInt16 nLevel = USHRT_MAX, const char *pFile = 0, int nLine = 0 );
+ sal_uInt16 EnterRegistrations(const char *pFile = nullptr, int nLine = 0);
+ void LeaveRegistrations( sal_uInt16 nLevel = USHRT_MAX, const char *pFile = nullptr, int nLine = 0 );
void Register( SfxControllerItem& rBinding );
void Release( SfxControllerItem& rBinding );
SfxDispatcher* GetDispatcher() const
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index e1fb523cdfe1..2baa43c95f6a 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -77,10 +77,10 @@ struct SAL_DLLPUBLIC_RTTI SfxChildWinInfo
nFlags = SfxChildWindowFlags::NONE;
}
bool GetExtraData_Impl( SfxChildAlignment *pAlign,
- SfxChildAlignment *pLastAlign = 0,
- Size *pSize = 0,
- sal_uInt16 *pLine = 0,
- sal_uInt16 *pPos = 0 ) const;
+ SfxChildAlignment *pLastAlign = nullptr,
+ Size *pSize = nullptr,
+ sal_uInt16 *pLine = nullptr,
+ sal_uInt16 *pPos = nullptr ) const;
};
// ChildWindow factory methods
@@ -186,7 +186,7 @@ public:
{ return pContext ? pContext->GetContextId(): 0; }
vcl::Window* GetContextWindow() const
- { return pContext ? pContext->GetWindow(): 0; }
+ { return pContext ? pContext->GetWindow(): nullptr; }
vcl::Window* GetContextWindow( SfxModule *pModule ) const;
@@ -224,13 +224,13 @@ public:
#define SFX_DECL_CHILDWINDOW_CONTEXT(Class) \
static SfxChildWindowContext* CreateImpl(vcl::Window *pParent, \
SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
- static void RegisterChildWindowContext(SfxModule *pMod=0); \
+ static void RegisterChildWindowContext(SfxModule *pMod=nullptr); \
//! The Macro of the future ...
#define SFX_DECL_CHILDWINDOWCONTEXT(Class) \
static SfxChildWindowContext* CreateImpl(vcl::Window *pParent, \
SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
- static void RegisterChildWindowContext(sal_uInt16, SfxModule *pMod=0); \
+ static void RegisterChildWindowContext(sal_uInt16, SfxModule *pMod=nullptr); \
//! soon obsolete !
#define SFX_IMPL_CHILDWINDOW_CONTEXT(Class, MyID, ShellClass) \
@@ -272,7 +272,7 @@ public:
public : \
static SfxChildWindow* CreateImpl(vcl::Window *pParent, sal_uInt16 nId, \
SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
- static void RegisterChildWindow (bool bVisible=false, SfxModule *pMod=NULL, SfxChildWindowFlags nFlags=SfxChildWindowFlags::NONE); \
+ static void RegisterChildWindow (bool bVisible=false, SfxModule *pMod=nullptr, SfxChildWindowFlags nFlags=SfxChildWindowFlags::NONE); \
virtual SfxChildWinInfo GetInfo() const override
#define SFX_DECL_CHILDWINDOW_WITHID(Class) \
diff --git a/include/sfx2/ctrlitem.hxx b/include/sfx2/ctrlitem.hxx
index 9913d208e60a..c333c94cf972 100644
--- a/include/sfx2/ctrlitem.hxx
+++ b/include/sfx2/ctrlitem.hxx
@@ -58,7 +58,7 @@ public:
virtual ~SfxControllerItem();
virtual void dispose();
- void Bind( sal_uInt16 nNewId, SfxBindings * = 0); // Register in SfxBindings
+ void Bind( sal_uInt16 nNewId, SfxBindings * = nullptr); // Register in SfxBindings
void UnBind();
void ReBind();
bool IsBound() const;
@@ -79,7 +79,7 @@ public:
static SfxItemState GetItemState( const SfxPoolItem* pState );
SAL_DLLPRIVATE bool IsBindable_Impl() const
- { return pBindings != NULL; }
+ { return pBindings != nullptr; }
SAL_DLLPRIVATE void BindInternal_Impl( sal_uInt16 nNewId, SfxBindings* );
};
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 2f81aa39f38f..1d3ef7a7677a 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -165,7 +165,7 @@ public:
GetCmisProperties() const { return m_aCmisProperties;}
void SetCmisProperties(const css::uno::Sequence< css::document::CmisProperty >& cmisProps );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
@@ -507,7 +507,7 @@ protected:
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = NULL ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
public:
SfxCustomPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
@@ -627,7 +627,7 @@ private:
protected:
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = NULL ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
public:
SfxCmisPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index 801d9f80ec53..17dec3243b5f 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -111,7 +111,7 @@ protected:
public:
SfxDispatcher( SfxDispatcher* pParent );
- SfxDispatcher( SfxViewFrame *pFrame = 0 );
+ SfxDispatcher( SfxViewFrame *pFrame = nullptr );
SAL_DLLPRIVATE void Construct_Impl( SfxDispatcher* pParent );
@@ -119,9 +119,9 @@ public:
const SfxPoolItem* Execute( sal_uInt16 nSlot,
SfxCallMode nCall = SfxCallMode::SLOT,
- const SfxPoolItem **pArgs = 0,
+ const SfxPoolItem **pArgs = nullptr,
sal_uInt16 nModi = 0,
- const SfxPoolItem **pInternalArgs = 0);
+ const SfxPoolItem **pInternalArgs = nullptr);
const SfxPoolItem* Execute( sal_uInt16 nSlot,
SfxCallMode nCall,
@@ -158,9 +158,9 @@ public:
static SfxPopupMenuManager* Popup( sal_uInt16 nConfigId, vcl::Window *pWin, const Point *pPos );
void ExecutePopup( const ResId &rId,
- vcl::Window *pWin = 0, const Point *pPosPixel = 0 );
+ vcl::Window *pWin = nullptr, const Point *pPosPixel = nullptr );
static void ExecutePopup( sal_uInt16 nConfigId = 0,
- vcl::Window *pWin = 0, const Point *pPosPixel = 0 );
+ vcl::Window *pWin = nullptr, const Point *pPosPixel = nullptr );
bool IsAppDispatcher() const;
bool IsFlushed() const;
@@ -168,7 +168,7 @@ public:
void Lock( bool bLock );
bool IsLocked( sal_uInt16 nSID = 0 ) const;
void SetSlotFilter( SfxSlotFilterState nEnable = SfxSlotFilterState::DISABLED,
- sal_uInt16 nCount = 0, const sal_uInt16 *pSIDs = 0 );
+ sal_uInt16 nCount = 0, const sal_uInt16 *pSIDs = nullptr );
void HideUI( bool bHide = true );
sal_uInt32 GetObjectBarId( sal_uInt16 nPos ) const;
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index f1192b3e8c58..d60596d54bfe 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -74,30 +74,30 @@ public:
*/
SfxMedium( const OUString &rName,
StreamMode nOpenMode,
- const SfxFilter *pFilter = 0,
- SfxItemSet *pSet = 0 );
+ const SfxFilter *pFilter = nullptr,
+ SfxItemSet *pSet = nullptr );
/**
* @param pSet Takes ownership
*/
SfxMedium( const OUString &rName,
const OUString &rReferer,
StreamMode nOpenMode,
- const SfxFilter *pFilter = 0,
- SfxItemSet *pSet = 0 );
+ const SfxFilter *pFilter = nullptr,
+ SfxItemSet *pSet = nullptr );
/**
* @param pSet does NOT take ownership
*/
SfxMedium( const css::uno::Reference< css::embed::XStorage >& xStorage,
const OUString& rBaseURL,
- const SfxItemSet* pSet=0 );
+ const SfxItemSet* pSet=nullptr );
/**
* @param pSet does NOT take ownership
*/
SfxMedium( const css::uno::Reference< css::embed::XStorage >& xStorage,
const OUString& rBaseURL,
const OUString& rTypeName,
- const SfxItemSet* pSet=0 );
+ const SfxItemSet* pSet=nullptr );
SfxMedium( const css::uno::Sequence< css::beans::PropertyValue >& aArgs );
virtual ~SfxMedium();
diff --git a/include/sfx2/docfilt.hxx b/include/sfx2/docfilt.hxx
index 59e1ccbc14b1..fbb8ee00efdb 100644
--- a/include/sfx2/docfilt.hxx
+++ b/include/sfx2/docfilt.hxx
@@ -110,7 +110,7 @@ public:
static OUString GetTypeFromStorage( const SotStorage& rStg );
static OUString GetTypeFromStorage(
const css::uno::Reference<css::embed::XStorage>& xStorage,
- bool bTemplate = false, OUString* pName = NULL )
+ bool bTemplate = false, OUString* pName = nullptr )
throw ( css::beans::UnknownPropertyException,
css::lang::WrappedTargetException,
css::uno::RuntimeException,
diff --git a/include/sfx2/docinf.hxx b/include/sfx2/docinf.hxx
index 066b1e14a89e..0c1b66f1c38e 100644
--- a/include/sfx2/docinf.hxx
+++ b/include/sfx2/docinf.hxx
@@ -57,9 +57,9 @@ sal_uInt32 SFX2_DLLPUBLIC LoadOlePropertySet(
bool SFX2_DLLPUBLIC SaveOlePropertySet(
css::uno::Reference< css::document::XDocumentProperties> i_xDocProps,
SotStorage* i_pStorage,
- const css::uno::Sequence<sal_uInt8> * i_pThumb = 0,
- const css::uno::Sequence<sal_uInt8> * i_pGuid = 0,
- const css::uno::Sequence<sal_uInt8> * i_pHyperlinks = 0);
+ const css::uno::Sequence<sal_uInt8> * i_pThumb = nullptr,
+ const css::uno::Sequence<sal_uInt8> * i_pGuid = nullptr,
+ const css::uno::Sequence<sal_uInt8> * i_pHyperlinks = nullptr);
css::uno::Sequence<sal_uInt8> SFX2_DLLPUBLIC convertMetaFile(
diff --git a/include/sfx2/event.hxx b/include/sfx2/event.hxx
index 95bd3cdbc433..079a13aafc54 100644
--- a/include/sfx2/event.hxx
+++ b/include/sfx2/event.hxx
@@ -42,7 +42,7 @@ class SFX2_DLLPUBLIC SfxEventHint : public SfxHint
sal_uInt16 nEventId;
public:
- SfxEventHint( sal_uInt16 nId, const OUString& aName, SfxObjectShell *pObj = 0 )
+ SfxEventHint( sal_uInt16 nId, const OUString& aName, SfxObjectShell *pObj = nullptr )
: pObjShell(pObj),
aEventName(aName),
nEventId(nId)
@@ -101,7 +101,7 @@ public:
{}
SfxPrintingHint( sal_Int32 nEvent )
- : SfxViewEventHint( SFX_EVENT_PRINTDOC, rtl::OUString(), 0, css::uno::Reference< css::frame::XController >() )
+ : SfxViewEventHint( SFX_EVENT_PRINTDOC, rtl::OUString(), nullptr, css::uno::Reference< css::frame::XController >() )
, mnPrintableState( nEvent )
{}
diff --git a/include/sfx2/evntconf.hxx b/include/sfx2/evntconf.hxx
index d7cf357a2ce6..88398a4ef7cc 100644
--- a/include/sfx2/evntconf.hxx
+++ b/include/sfx2/evntconf.hxx
@@ -62,7 +62,7 @@ public:
size_t size() const { return aEventNamesList.size(); };
SfxEventName* at( size_t Index ) const
- { return Index < aEventNamesList.size() ? aEventNamesList[ Index ] : NULL; }
+ { return Index < aEventNamesList.size() ? aEventNamesList[ Index ] : nullptr; }
void push_back( SfxEventName* Item ) { aEventNamesList.push_back( Item ); }
};
@@ -81,8 +81,8 @@ public:
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
OUString &rText,
- const IntlWrapper * = 0 ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ const IntlWrapper * = nullptr ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override;
virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const override;
virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const override;
diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx
index 2f962ff5cb8d..c77470582492 100644
--- a/include/sfx2/fcontnr.hxx
+++ b/include/sfx2/fcontnr.hxx
@@ -46,7 +46,7 @@ class SfxRefItem : public SfxPoolItem
public:
SfxRefItem( sal_uInt16 nWhichId, const tools::SvRef<SvRefBase>& rValue ) : SfxPoolItem( nWhichId )
{ maRef = rValue; }
- virtual SfxPoolItem* Clone( SfxItemPool* = 0 ) const override
+ virtual SfxPoolItem* Clone( SfxItemPool* = nullptr ) const override
{ return new SfxRefItem( *this ); }
virtual bool operator==( const SfxPoolItem& rL) const override
{ return static_cast<const SfxRefItem&>(rL).maRef == maRef; }
diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index 78c31fabbe82..741507af7d89 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -100,7 +100,7 @@ private:
public:
FileDialogHelper( sal_Int16 nDialogType,
sal_Int64 nFlags,
- vcl::Window* _pPreferredParent = NULL );
+ vcl::Window* _pPreferredParent = nullptr );
FileDialogHelper( sal_Int16 nDialogType,
sal_Int64 nFlags,
@@ -123,7 +123,7 @@ public:
const OUString& aExtName,
const OUString& rStandardDir,
const css::uno::Sequence< OUString >& rBlackList,
- vcl::Window* _pPreferredParent = NULL );
+ vcl::Window* _pPreferredParent = nullptr );
virtual ~FileDialogHelper();
@@ -242,7 +242,7 @@ ErrCode FileOpenDialog_Impl( sal_Int16 nDialogType,
std::vector<OUString>& rpURLList,
OUString& rFilter,
SfxItemSet *& rpSet,
- const OUString* pPath = NULL,
+ const OUString* pPath = nullptr,
sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG,
const OUString& rStandardDir = OUString(),
const css::uno::Sequence< OUString >& rBlackList = css::uno::Sequence< OUString >());
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index 15539aae8517..af408d2f19b3 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -218,11 +218,11 @@ public:
TYPEINFO_OVERRIDE();
SfxFrameItem( sal_uInt16 nWhich, SfxViewFrame *p );
- SfxFrameItem( SfxFrame *p=0 );
+ SfxFrameItem( SfxFrame *p=nullptr );
SfxFrameItem( sal_uInt16 nWhich, SfxFrame *p );
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
@@ -240,7 +240,7 @@ public:
css::uno::Any GetValue() const
{ return aValue; }
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
};
@@ -258,7 +258,7 @@ public:
GetFrame() const
{ return m_xFrame; }
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
};
diff --git a/include/sfx2/frmdescr.hxx b/include/sfx2/frmdescr.hxx
index a5f292194c77..7b56f1cf6491 100644
--- a/include/sfx2/frmdescr.hxx
+++ b/include/sfx2/frmdescr.hxx
@@ -178,7 +178,7 @@ public:
bIsRootSet( false ),
bIsInColSet( false ),
bHasBorderInherited( true ),
- pFrame( 0 ) {}
+ pFrame( nullptr ) {}
~SfxFrameProperties() { delete pFrame; }
@@ -210,9 +210,9 @@ public:
virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
- OUString &rText, const IntlWrapper * = 0 ) const override;
+ OUString &rText, const IntlWrapper * = nullptr ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
};
#endif // INCLUDED_SFX2_FRMDESCR_HXX
diff --git a/include/sfx2/frmhtml.hxx b/include/sfx2/frmhtml.hxx
index a501d84ace83..616d5a973ce1 100644
--- a/include/sfx2/frmhtml.hxx
+++ b/include/sfx2/frmhtml.hxx
@@ -32,7 +32,7 @@ class SfxMedium;
class SFX2_DLLPUBLIC SfxFrameHTMLParser : public SfxHTMLParser
{
protected:
- SfxFrameHTMLParser( SvStream& rStream, bool bIsNewDoc=true, SfxMedium *pMediumPtr=0 ):
+ SfxFrameHTMLParser( SvStream& rStream, bool bIsNewDoc=true, SfxMedium *pMediumPtr=nullptr ):
SfxHTMLParser( rStream, bIsNewDoc, pMediumPtr ) {};
public:
diff --git a/include/sfx2/frmhtmlw.hxx b/include/sfx2/frmhtmlw.hxx
index 6e8161b1d9a1..da44dc92968a 100644
--- a/include/sfx2/frmhtmlw.hxx
+++ b/include/sfx2/frmhtmlw.hxx
@@ -45,24 +45,24 @@ class SFX2_DLLPUBLIC SfxFrameHTMLWriter
const sal_Char *pIndent, const OUString& rName,
const OUString& rContent, bool bHTTPEquiv,
rtl_TextEncoding eDestEnc,
- OUString *pNonConvertableChars = 0 );
+ OUString *pNonConvertableChars = nullptr );
SAL_DLLPRIVATE inline static void OutMeta( SvStream& rStrm,
const sal_Char *pIndent, const sal_Char *pName,
const OUString& rContent, bool bHTTPEquiv,
rtl_TextEncoding eDestEnc,
- OUString *pNonConvertableChars = 0 );
+ OUString *pNonConvertableChars = nullptr );
public:
static void Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
const css::uno::Reference< css::document::XDocumentProperties>&,
const sal_Char *pIndent,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
- OUString *pNonConvertableChars = 0 );
+ OUString *pNonConvertableChars = nullptr );
static void Out_FrameDescriptor(
SvStream&, const OUString& rBaseURL, const css::uno::Reference < css::beans::XPropertySet >& xSet,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
- OUString *pNonConvertableChars = 0 );
+ OUString *pNonConvertableChars = nullptr );
};
inline void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm,
diff --git a/include/sfx2/hintpost.hxx b/include/sfx2/hintpost.hxx
index 36a7cabe1b8c..03a4bec6c143 100644
--- a/include/sfx2/hintpost.hxx
+++ b/include/sfx2/hintpost.hxx
@@ -49,7 +49,7 @@ protected:
public:
SfxHintPoster(const Link<SfxRequest*,void>& rLink);
- void Post( SfxRequest* pHint = 0 );
+ void Post( SfxRequest* pHint = nullptr );
void SetEventHdl(const Link<SfxRequest*,void>& rLink);
};
diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx
index 787a9526b748..c6cbcf000960 100644
--- a/include/sfx2/linkmgr.hxx
+++ b/include/sfx2/linkmgr.hxx
@@ -60,7 +60,7 @@ class SFX2_DLLPUBLIC LinkManager
SfxObjectShell *pPersist; // LinkMgr must be release before SfxObjectShell
protected:
bool InsertLink( SvBaseLink* pLink, sal_uInt16 nObjType, SfxLinkUpdateMode nUpdateType,
- const OUString* pName = 0 );
+ const OUString* pName = nullptr );
public:
enum LinkState
@@ -103,8 +103,8 @@ public:
bool InsertFileLink( sfx2::SvBaseLink&,
sal_uInt16 nFileType,
const OUString& rFileNm,
- const OUString* pFilterNm = NULL,
- const OUString* pRange = NULL );
+ const OUString* pFilterNm = nullptr,
+ const OUString* pRange = nullptr );
void ReconnectDdeLink(SfxObjectShell& rServer);
@@ -120,16 +120,16 @@ public:
// Obtain the string for the dialog
static bool GetDisplayNames( const SvBaseLink *,
OUString* pType,
- OUString* pFile = NULL,
- OUString* pLink = NULL,
- OUString* pFilter = NULL );
+ OUString* pFile = nullptr,
+ OUString* pLink = nullptr,
+ OUString* pFilter = nullptr );
static SvLinkSourceRef CreateObj( SvBaseLink* );
void UpdateAllLinks( bool bAskUpdate = true,
bool bCallErrHdl = true,
bool bUpdateGrfLinks = false,
- vcl::Window* pParentWin = 0 );
+ vcl::Window* pParentWin = nullptr );
// Call for list of links (eg for link-dialog)
const SvBaseLinks& GetLinks() const { return aLinkTbl; }
@@ -175,7 +175,7 @@ SFX2_DLLPUBLIC void MakeLnkName( OUString& rName,
const OUString* pType, // Can also be null!!
const OUString& rFile,
const OUString& rLink,
- const OUString* pFilter = 0 );
+ const OUString* pFilter = nullptr );
}
diff --git a/include/sfx2/linksrc.hxx b/include/sfx2/linksrc.hxx
index 30c065757c46..ea7a71c13ddb 100644
--- a/include/sfx2/linksrc.hxx
+++ b/include/sfx2/linksrc.hxx
@@ -61,7 +61,7 @@ public:
SvLinkSource();
virtual ~SvLinkSource();
- bool HasDataLinks( const SvBaseLink* = 0 ) const;
+ bool HasDataLinks( const SvBaseLink* = nullptr ) const;
void Closed();
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index 27b87e127f89..504e7ee526e7 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -90,11 +90,11 @@ protected:
static bool Execute_Impl( sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr,
sal_uInt16 nFamily, sal_uInt16 nMask = 0,
- const sal_uInt16* pModifier = NULL );
+ const sal_uInt16* pModifier = nullptr );
using TabPage::ActivatePage;
virtual void ActivatePage(const SfxItemSet &) override;
using TabPage::DeactivatePage;
- virtual sfxpg DeactivatePage(SfxItemSet * = 0) override;
+ virtual sfxpg DeactivatePage(SfxItemSet * = nullptr) override;
public:
SfxManageStyleSheetPage(vcl::Window *pParent, const SfxItemSet &rAttrSet );
diff --git a/include/sfx2/mieclip.hxx b/include/sfx2/mieclip.hxx
index c0f509e4d407..e8ce8e9f9d00 100644
--- a/include/sfx2/mieclip.hxx
+++ b/include/sfx2/mieclip.hxx
@@ -35,7 +35,7 @@ class SFX2_DLLPUBLIC MSE40HTMLClipFormatObj
OUString sBaseURL;
public:
- MSE40HTMLClipFormatObj() : pStrm(0) {}
+ MSE40HTMLClipFormatObj() : pStrm(nullptr) {}
~MSE40HTMLClipFormatObj();
SvStream* IsValid( SvStream& );
diff --git a/include/sfx2/minfitem.hxx b/include/sfx2/minfitem.hxx
index 71720ebb1fd0..f0b0541ddf4f 100644
--- a/include/sfx2/minfitem.hxx
+++ b/include/sfx2/minfitem.hxx
@@ -45,7 +45,7 @@ public:
SfxMacroInfoItem( const SfxMacroInfoItem& );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
OUString GetMethod() const
{ return aMethodName; }
diff --git a/include/sfx2/mnuitem.hxx b/include/sfx2/mnuitem.hxx
index b7ac4dd2946f..3d76b44e8635 100644
--- a/include/sfx2/mnuitem.hxx
+++ b/include/sfx2/mnuitem.hxx
@@ -49,7 +49,7 @@ public:
SfxMenuControl( sal_uInt16, SfxBindings&);
static SfxMenuControl* CreateImpl( sal_uInt16 nId, Menu &rMenu, SfxBindings &rBindings );
- static void RegisterControl( sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL );
+ static void RegisterControl( sal_uInt16 nSlotId = 0, SfxModule *pMod=nullptr );
virtual ~SfxMenuControl();
@@ -110,7 +110,7 @@ inline SfxVirtualMenu* SfxMenuControl::GetPopupMenu() const
#define SFX_DECL_MENU_CONTROL() \
static SfxMenuControl* CreateImpl( sal_uInt16 nId, Menu &rMenu, SfxBindings &rBindings ); \
- static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL)
+ static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=nullptr)
#define SFX_IMPL_MENU_CONTROL(Class, nItemClass) \
SfxMenuControl* Class::CreateImpl( sal_uInt16 nId, Menu &rMenu, SfxBindings &rBindings ) \
diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx
index b76a64c0acb1..8254c6d25ea2 100644
--- a/include/sfx2/module.hxx
+++ b/include/sfx2/module.hxx
@@ -90,7 +90,7 @@ public:
bool IsChildWindowAvailable( const sal_uInt16 i_nId, const SfxViewFrame* i_pViewFrame ) const;
- static SfxModule* GetActiveModule( SfxViewFrame* pFrame=NULL );
+ static SfxModule* GetActiveModule( SfxViewFrame* pFrame=nullptr );
static FieldUnit GetCurrentFieldUnit();
/** retrieves the field unit of the module belonging to the document displayed in the given frame
diff --git a/include/sfx2/msgpool.hxx b/include/sfx2/msgpool.hxx
index cd5e278d63cb..2b75d9503440 100644
--- a/include/sfx2/msgpool.hxx
+++ b/include/sfx2/msgpool.hxx
@@ -46,14 +46,14 @@ private:
const SfxSlot* SeekSlot( sal_uInt16 nObject );
public:
- SfxSlotPool(SfxSlotPool* pParent=0);
+ SfxSlotPool(SfxSlotPool* pParent=nullptr);
~SfxSlotPool();
void RegisterInterface( SfxInterface& rFace );
void ReleaseInterface( SfxInterface& rFace );
SfxInterface* FirstInterface();
- static SfxSlotPool& GetSlotPool( SfxViewFrame *pFrame=NULL );
+ static SfxSlotPool& GetSlotPool( SfxViewFrame *pFrame=nullptr );
sal_uInt16 GetGroupCount();
OUString SeekGroup( sal_uInt16 nNo );
diff --git a/include/sfx2/objface.hxx b/include/sfx2/objface.hxx
index 1fe4a08e3aec..d7c1b764d04a 100644
--- a/include/sfx2/objface.hxx
+++ b/include/sfx2/objface.hxx
@@ -104,7 +104,7 @@ inline sal_uInt16 SfxInterface::Count() const
inline SfxSlot* SfxInterface::operator[]( sal_uInt16 nPos ) const
{
- return nPos < nCount? pSlots+nPos: 0;
+ return nPos < nCount? pSlots+nPos: nullptr;
}
#endif
diff --git a/include/sfx2/objitem.hxx b/include/sfx2/objitem.hxx
index 70ad39042b0b..d2ce6c080ebd 100644
--- a/include/sfx2/objitem.hxx
+++ b/include/sfx2/objitem.hxx
@@ -33,10 +33,10 @@ class SFX2_DLLPUBLIC SfxObjectItem: public SfxPoolItem
public:
TYPEINFO_OVERRIDE();
- SfxObjectItem( sal_uInt16 nWhich=0, SfxShell *pSh=0 );
+ SfxObjectItem( sal_uInt16 nWhich=0, SfxShell *pSh=nullptr );
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
SfxShell* GetShell() const
{ return _pSh; }
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 9ad250491954..70da01048542 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -323,7 +323,7 @@ public:
* @return true if the initialization is successful, false otherwise.
*/
bool DoInitUnitTest();
- bool DoInitNew( SfxMedium* pMedium=0 );
+ bool DoInitNew( SfxMedium* pMedium=nullptr );
bool DoLoad( SfxMedium* pMedium );
bool DoLoadExternal( SfxMedium* pMed );
bool DoSave();
@@ -331,7 +331,7 @@ public:
bool DoSaveObjectAs( SfxMedium &rNewStor, bool bCommit );
// TODO/LATER: currently only overridden in Calc, should be made non-virtual
- virtual bool DoSaveCompleted( SfxMedium* pNewStor=0 );
+ virtual bool DoSaveCompleted( SfxMedium* pNewStor=nullptr );
bool LoadOwnFormat( SfxMedium& pMedium );
virtual bool SaveAsOwnFormat( SfxMedium& pMedium );
@@ -383,7 +383,7 @@ public:
vcl::Window *pParent, const SfxItemSet& );
ErrCode CallBasic( const OUString& rMacro, const OUString& rBasicName,
- SbxArray* pArgs = 0, SbxValue* pRet = 0 );
+ SbxArray* pArgs = nullptr, SbxValue* pRet = nullptr );
ErrCode CallXScript(
const OUString& rScriptURL,
@@ -392,7 +392,7 @@ public:
css::uno::Sequence< sal_Int16 >& aOutParamIndex,
css::uno::Sequence< css::uno::Any >& aOutParam,
bool bRaiseError = true,
- const css::uno::Any* aCaller = 0 );
+ const css::uno::Any* aCaller = nullptr );
static ErrCode CallXScript(
const css::uno::Reference< css::uno::XInterface >& _rxScriptContext,
@@ -402,7 +402,7 @@ public:
css::uno::Sequence< sal_Int16 >& aOutParamIndex,
css::uno::Sequence< css::uno::Any >& aOutParam,
bool bRaiseError = true,
- const css::uno::Any* aCaller = 0
+ const css::uno::Any* aCaller = nullptr
);
/** adjusts the internal macro mode, according to the current security settings
@@ -539,11 +539,11 @@ public:
virtual css::uno::Sequence< OUString > GetEventNames();
- vcl::Window* GetDialogParent( SfxMedium* pMedium=0 );
+ vcl::Window* GetDialogParent( SfxMedium* pMedium=nullptr );
static SfxObjectShell* CreateObject( const OUString& rServiceName, SfxObjectCreateMode = SfxObjectCreateMode::STANDARD );
static SfxObjectShell* CreateObjectByFactoryName( const OUString& rURL, SfxObjectCreateMode = SfxObjectCreateMode::STANDARD );
static css::uno::Reference< css::lang::XComponent >
- CreateAndLoadComponent( const SfxItemSet& rSet, SfxFrame* pFrame = NULL );
+ CreateAndLoadComponent( const SfxItemSet& rSet, SfxFrame* pFrame = nullptr );
static SfxObjectShell* GetShellFromComponent( const css::uno::Reference< css::lang::XComponent >& xComp );
static OUString GetServiceNameFromFactory( const OUString& rFact );
bool IsInPlaceActive();
@@ -689,8 +689,8 @@ public:
SAL_DLLPRIVATE void UpdateFromTemplate_Impl();
SAL_DLLPRIVATE bool CanReload_Impl();
SAL_DLLPRIVATE void SetNamedVisibility_Impl();
- SAL_DLLPRIVATE bool DoSave_Impl( const SfxItemSet* pSet=0 );
- SAL_DLLPRIVATE bool Save_Impl( const SfxItemSet* pSet=0 );
+ SAL_DLLPRIVATE bool DoSave_Impl( const SfxItemSet* pSet=nullptr );
+ SAL_DLLPRIVATE bool Save_Impl( const SfxItemSet* pSet=nullptr );
SAL_DLLPRIVATE bool PreDoSaveAs_Impl(const OUString& rFileName, const OUString& rFiltName, SfxItemSet& rItemSet);
SAL_DLLPRIVATE bool APISaveAs_Impl(const OUString& aFileName, SfxItemSet& rItemSet);
SAL_DLLPRIVATE bool CommonSaveAs_Impl(const INetURLObject& aURL, const OUString& aFilterName, SfxItemSet& rItemSet);
@@ -765,14 +765,14 @@ class SfxObjectShellLock
protected:
SfxObjectShell * pObj;
public:
- inline SfxObjectShellLock() { pObj = 0; }
+ inline SfxObjectShellLock() { pObj = nullptr; }
inline SfxObjectShellLock( const SfxObjectShellLock & rObj );
inline SfxObjectShellLock( SfxObjectShell * pObjP );
inline void Clear();
inline ~SfxObjectShellLock();
inline SfxObjectShellLock & operator = ( const SfxObjectShellLock & rObj );
inline SfxObjectShellLock & operator = ( SfxObjectShell * pObj );
- inline bool Is() const { return pObj != NULL; }
+ inline bool Is() const { return pObj != nullptr; }
inline SfxObjectShell * operator & () const { return pObj; }
inline SfxObjectShell * operator -> () const { return pObj; }
inline SfxObjectShell & operator * () const { return *pObj; }
@@ -787,7 +787,7 @@ inline void SfxObjectShellLock::Clear()
if( pObj )
{
SfxObjectShell* const pRefObj = pObj;
- pObj = 0;
+ pObj = nullptr;
pRefObj->OwnerLock( false );
}
}
@@ -824,7 +824,7 @@ public:
TYPEINFO_OVERRIDE();
SfxObjectShellItem() :
SfxPoolItem( 0 ),
- pObjSh( 0 )
+ pObjSh( nullptr )
{}
SfxObjectShellItem( SfxObjectShell *pObjShell ):
SfxPoolItem( 0 ),
@@ -837,7 +837,7 @@ public:
{}
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
};
diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx
index 35e15d8b53a0..9b972c83d313 100644
--- a/include/sfx2/passwd.hxx
+++ b/include/sfx2/passwd.hxx
@@ -83,7 +83,7 @@ private:
void SetPasswdText();
public:
- SfxPasswordDialog(vcl::Window* pParent, const OUString* pGroupText = NULL);
+ SfxPasswordDialog(vcl::Window* pParent, const OUString* pGroupText = nullptr);
virtual ~SfxPasswordDialog();
virtual void dispose() override;
diff --git a/include/sfx2/printopt.hxx b/include/sfx2/printopt.hxx
index f3a48dbcfd4e..35b4040a7515 100644
--- a/include/sfx2/printopt.hxx
+++ b/include/sfx2/printopt.hxx
@@ -89,7 +89,7 @@ private:
protected:
using TabPage::DeactivatePage;
- virtual sfxpg DeactivatePage( SfxItemSet* pSet = NULL ) override;
+ virtual sfxpg DeactivatePage( SfxItemSet* pSet = nullptr ) override;
public:
diff --git a/include/sfx2/progress.hxx b/include/sfx2/progress.hxx
index b1c05e3bcc27..f613a3df5657 100644
--- a/include/sfx2/progress.hxx
+++ b/include/sfx2/progress.hxx
@@ -59,7 +59,7 @@ public:
void Stop();
- static SfxProgress* GetActiveProgress( SfxObjectShell *pDocSh = 0 );
+ static SfxProgress* GetActiveProgress( SfxObjectShell *pDocSh = nullptr );
static void EnterLock();
static void LeaveLock();
};
diff --git a/include/sfx2/request.hxx b/include/sfx2/request.hxx
index 4e46c7819469..13c52aa831e4 100644
--- a/include/sfx2/request.hxx
+++ b/include/sfx2/request.hxx
@@ -94,8 +94,8 @@ public:
void SetReturnValue(const SfxPoolItem &);
const SfxPoolItem* GetReturnValue() const;
- static css::uno::Reference< css::frame::XDispatchRecorder > GetMacroRecorder( SfxViewFrame* pFrame=NULL );
- static bool HasMacroRecorder( SfxViewFrame* pFrame=NULL );
+ static css::uno::Reference< css::frame::XDispatchRecorder > GetMacroRecorder( SfxViewFrame* pFrame=nullptr );
+ static bool HasMacroRecorder( SfxViewFrame* pFrame=nullptr );
SfxCallMode GetCallMode() const;
void AllowRecording( bool );
bool AllowsRecording() const;
diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index 07b2668193dd..834443fecff2 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -172,7 +172,7 @@ public:
// constructor/destructor
- SfxBaseModel( SfxObjectShell *pObjectShell = NULL ) ;
+ SfxBaseModel( SfxObjectShell *pObjectShell = nullptr ) ;
virtual ~SfxBaseModel() ;
diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx
index d6342bf41959..dfb0e967c246 100644
--- a/include/sfx2/sfxdlg.hxx
+++ b/include/sfx2/sfxdlg.hxx
@@ -96,8 +96,8 @@ public:
virtual void Insert( SotClipboardFormatId nFormat, const rtl::OUString & rFormatName ) = 0;
virtual void SetObjName( const SvGlobalName & rClass, const rtl::OUString & rObjName ) = 0;
virtual SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper,
- const DataFlavorExVector* pFormats=0,
- const TransferableObjectDescriptor* pDesc=0 ) = 0;
+ const DataFlavorExVector* pFormats=nullptr,
+ const TransferableObjectDescriptor* pDesc=nullptr ) = 0;
};
class SfxAbstractLinksDialog : virtual public VclAbstractDialog
@@ -124,22 +124,22 @@ public:
const SfxItemSet* pAttrSet,
SfxViewFrame* pViewFrame,
bool bEditFmt=false,
- const rtl::OUString *pUserButtonText=0 ) = 0;
+ const rtl::OUString *pUserButtonText=nullptr ) = 0;
virtual SfxAbstractTabDialog* CreateTabDialog( sal_uInt32 nResId,
vcl::Window* pParent,
const SfxItemSet* pAttrSet,
const css::uno::Reference< css::frame::XFrame >& xViewFrame,
bool bEditFmt=false,
- const rtl::OUString *pUserButtonText=0 ) = 0;
+ const rtl::OUString *pUserButtonText=nullptr ) = 0;
virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) = 0;
virtual SfxAbstractInsertObjectDialog* CreateInsertObjectDialog( vcl::Window* pParent, const OUString& rCommand,
const css::uno::Reference < css::embed::XStorage >& xStor,
- const SvObjectServerList* pList = 0 )=0;
+ const SvObjectServerList* pList = nullptr )=0;
virtual VclAbstractDialog* CreateEditObjectDialog( vcl::Window* pParent, const OUString& rCommand,
const css::uno::Reference < css::embed::XEmbeddedObject >& xObj )=0;
virtual SfxAbstractPasteDialog* CreatePasteDialog( vcl::Window* pParent )=0;
- virtual SfxAbstractLinksDialog* CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML=false, sfx2::SvBaseLink* p=0 )=0;
+ virtual SfxAbstractLinksDialog* CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML=false, sfx2::SvBaseLink* p=nullptr )=0;
virtual VclAbstractDialog * CreateSvxScriptOrgDialog( vcl::Window* pParent, const rtl::OUString& rLanguage ) = 0;
virtual AbstractScriptSelectorDialog*
diff --git a/include/sfx2/sfxhtml.hxx b/include/sfx2/sfxhtml.hxx
index 829121722825..93e25e04cc5f 100644
--- a/include/sfx2/sfxhtml.hxx
+++ b/include/sfx2/sfxhtml.hxx
@@ -45,7 +45,7 @@ class SFX2_DLLPUBLIC SfxHTMLParser : public HTMLParser
protected:
- SfxHTMLParser( SvStream& rStream, bool bNewDoc=true, SfxMedium *pMedium=0 );
+ SfxHTMLParser( SvStream& rStream, bool bNewDoc=true, SfxMedium *pMedium=nullptr );
virtual ~SfxHTMLParser();
@@ -88,7 +88,7 @@ protected:
// Returns TRUE if a file was downloaded and if FileDownloadFinished
// has not yet been called
- bool ShouldFinishFileDownload() const { return pDLMedium != 0; }
+ bool ShouldFinishFileDownload() const { return pDLMedium != nullptr; }
SfxMedium *GetMedium() { return pMedium; }
const SfxMedium *GetMedium() const { return pMedium; }
diff --git a/include/sfx2/sfxuno.hxx b/include/sfx2/sfxuno.hxx
index 6d2e4937d18b..69ce86e9be6f 100644
--- a/include/sfx2/sfxuno.hxx
+++ b/include/sfx2/sfxuno.hxx
@@ -49,12 +49,12 @@ class SfxSlot ;
SFX2_DLLPUBLIC void TransformParameters( sal_uInt16 nSlotId ,
const css::uno::Sequence< css::beans::PropertyValue >& seqArgs ,
SfxAllItemSet& aSet ,
- const SfxSlot* pSlot = 0 );
+ const SfxSlot* pSlot = nullptr );
SFX2_DLLPUBLIC void TransformItems( sal_uInt16 nSlotId ,
const SfxItemSet& aSet ,
css::uno::Sequence< css::beans::PropertyValue >& seqArgs ,
- const SfxSlot* pSlot = 0 );
+ const SfxSlot* pSlot = nullptr );
bool GetEncryptionData_Impl( const SfxItemSet* pSet, css::uno::Sequence< css::beans::NamedValue >& aEncryptionData );
diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index 8d469aa307cd..8ec29fdfcd46 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -183,7 +183,7 @@ public:
NULL-pointer is returned.
*/
virtual SfxInterface* GetInterface() const;
- static SfxInterface* GetStaticInterface() { return 0; }
+ static SfxInterface* GetStaticInterface() { return nullptr; }
/**
Sets the name of the Shell object. With this name, the SfxShell instance
@@ -246,7 +246,7 @@ public:
<SfxShell::ExecuteSlot(SfxRequest&)>
*/
- const SfxPoolItem* GetSlotState( sal_uInt16 nSlotId, const SfxInterface *pIF = 0, SfxItemSet *pStateSet = 0 );
+ const SfxPoolItem* GetSlotState( sal_uInt16 nSlotId, const SfxInterface *pIF = nullptr, SfxItemSet *pStateSet = nullptr );
/**
This method allows you to forward a <SfxRequest> to the specified
@@ -278,7 +278,7 @@ public:
<SfxShell::GetSlotState(sal_uInt16,const SfxInterface*,SfxItemSet*)>
*/
- const SfxPoolItem* ExecuteSlot( SfxRequest &rReq, const SfxInterface *pIF = 0 );
+ const SfxPoolItem* ExecuteSlot( SfxRequest &rReq, const SfxInterface *pIF = nullptr );
/**
Asynchronous ExecuteSlot for the RELOAD
@@ -538,12 +538,12 @@ inline void SfxShell::SetPool
static SfxInterface* pInterface; \
static SfxInterface* GetStaticInterface(); \
static SfxInterfaceId GetInterfaceId() {return SfxInterfaceId(nId);} \
- static void RegisterInterface(SfxModule* pMod=NULL); \
+ static void RegisterInterface(SfxModule* pMod=nullptr); \
virtual SfxInterface* GetInterface() const override;
#define SFX_TMPL_INTERFACE(Class,SuperClass,Abstract) \
\
- SfxInterface* Class::pInterface = 0; \
+ SfxInterface* Class::pInterface = nullptr; \
SfxInterface* Class::GetStaticInterface() \
{ \
if ( !pInterface ) \
diff --git a/include/sfx2/stbitem.hxx b/include/sfx2/stbitem.hxx
index 8753d90599ae..a4b890d2541b 100644
--- a/include/sfx2/stbitem.hxx
+++ b/include/sfx2/stbitem.hxx
@@ -123,7 +123,7 @@ public:
#define SFX_DECL_STATUSBAR_CONTROL() \
static SfxStatusBarControl* CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar &rStb ); \
- static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL)
+ static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=nullptr)
#define SFX_IMPL_STATUSBAR_CONTROL(Class, nItemClass) \
SfxStatusBarControl* Class::CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar &rStb ) \
diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx
index 8dcd02a03017..c35ea6ccc1fd 100644
--- a/include/sfx2/styfitem.hxx
+++ b/include/sfx2/styfitem.hxx
@@ -72,7 +72,7 @@ public:
{ return aEntryList.size(); }
const SfxStyleFamilyItem* at(size_t nIdx) const
- { return aEntryList.empty() ? NULL : aEntryList[nIdx]; }
+ { return aEntryList.empty() ? nullptr : aEntryList[nIdx]; }
/** updates the images of all single SfxStyleFamilyItems with new images from the given resource
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 8281c9399028..a02076495215 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -51,7 +51,7 @@ class SFX2_DLLPUBLIC SfxTabDialogItem: public SfxSetItem
public:
TYPEINFO_OVERRIDE();
SfxTabDialogItem( sal_uInt16 nId, const SfxItemSet& rItemSet );
- SfxTabDialogItem(const SfxTabDialogItem& rAttr, SfxItemPool* pItemPool=NULL);
+ SfxTabDialogItem(const SfxTabDialogItem& rAttr, SfxItemPool* pItemPool=nullptr);
virtual SfxPoolItem* Clone(SfxItemPool* pToPool) const override;
virtual SfxPoolItem* Create(SvStream& rStream, sal_uInt16 nVersion) const override;
};
@@ -124,10 +124,10 @@ protected:
public:
SfxTabDialog(vcl::Window* pParent,
const OUString& rID, const OUString& rUIXMLDescription,
- const SfxItemSet * = 0, bool bEditFmt = false);
+ const SfxItemSet * = nullptr, bool bEditFmt = false);
SfxTabDialog(SfxViewFrame *pViewFrame, vcl::Window* pParent,
const OUString& rID, const OUString& rUIXMLDescription,
- const SfxItemSet * = 0, bool bEditFmt = false);
+ const SfxItemSet * = nullptr, bool bEditFmt = false);
virtual ~SfxTabDialog();
virtual void dispose() override;
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index 5043c0bcd436..20dc0120af54 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -134,7 +134,7 @@ public:
#define SFX_DECL_TOOLBOX_CONTROL() \
static SfxToolBoxControl* CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ); \
- static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL)
+ static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=nullptr)
/* For special ToolBox controls, such as a font selection box or toolbox
tear-off floating windows, an appropriate Item-Subclass of SfxTooBoxControl
@@ -276,7 +276,7 @@ public:
// We don't use SFX_DECL_TOOLBOX_CONTROL() here as we need to have this
// RegisterControl() marked as SFX2_DLLPUBLIC
static SfxToolBoxControl* CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx );
- static void SFX2_DLLPUBLIC RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL);
+ static void SFX2_DLLPUBLIC RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=nullptr);
SfxRecentFilesToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
virtual ~SfxRecentFilesToolBoxControl();
@@ -291,7 +291,7 @@ public:
// We don't use SFX_DECL_TOOLBOX_CONTROL() here as we need to have this
// RegisterControl() marked as SFX2_DLLPUBLIC
static SfxToolBoxControl* CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx );
- static void SFX2_DLLPUBLIC RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL);
+ static void SFX2_DLLPUBLIC RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=nullptr);
SfxSaveAsToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
virtual ~SfxSaveAsToolBoxControl();
diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index 57cb6defaee2..796647f8fa90 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -48,7 +48,7 @@ class SFX2_DLLPUBLIC SfxTemplateManagerDlg : public ModalDialog
public:
- SfxTemplateManagerDlg(vcl::Window *parent = NULL);
+ SfxTemplateManagerDlg(vcl::Window *parent = nullptr);
virtual ~SfxTemplateManagerDlg();
virtual void dispose() override;
diff --git a/include/sfx2/templateinfodlg.hxx b/include/sfx2/templateinfodlg.hxx
index af699ddd4095..afa39e49135b 100644
--- a/include/sfx2/templateinfodlg.hxx
+++ b/include/sfx2/templateinfodlg.hxx
@@ -25,7 +25,7 @@ class SfxTemplateInfoDlg : public ModalDialog
{
public:
- SfxTemplateInfoDlg (vcl::Window *pParent = NULL);
+ SfxTemplateInfoDlg (vcl::Window *pParent = nullptr);
virtual ~SfxTemplateInfoDlg();
virtual void dispose() override;
diff --git a/include/sfx2/tplpitem.hxx b/include/sfx2/tplpitem.hxx
index 8d325d5fd179..490013493e9b 100644
--- a/include/sfx2/tplpitem.hxx
+++ b/include/sfx2/tplpitem.hxx
@@ -39,7 +39,7 @@ public:
const OUString& GetStyleName() const { return aStyle; }
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual sal_uInt8 GetFlagCount() const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index ce81492fc938..7626770bc7d3 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -73,7 +73,7 @@ class SFX2_DLLPUBLIC SfxViewFrame: public SfxShell, public SfxListener
sal_uInt16 nAdjustPosPixelLock;
private:
- SAL_DLLPRIVATE void Construct_Impl( SfxObjectShell *pObjSh=NULL );
+ SAL_DLLPRIVATE void Construct_Impl( SfxObjectShell *pObjSh=nullptr );
protected:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
@@ -84,7 +84,7 @@ protected:
virtual ~SfxViewFrame();
public:
- SfxViewFrame( SfxFrame& rFrame, SfxObjectShell *pDoc = NULL );
+ SfxViewFrame( SfxFrame& rFrame, SfxObjectShell *pDoc = nullptr );
TYPEINFO_OVERRIDE();
SFX_DECL_INTERFACE(SFX_INTERFACE_SFXVIEWFRM)
@@ -104,13 +104,13 @@ public:
static SfxViewFrame* DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const sal_uInt16 i_nViewId = 0 );
static SfxViewFrame* Current();
- static SfxViewFrame* GetFirst( const SfxObjectShell* pDoc = 0, bool bOnlyVisible = true );
- static SfxViewFrame* GetNext( const SfxViewFrame& rPrev, const SfxObjectShell* pDoc = 0, bool bOnlyVisible = true );
+ static SfxViewFrame* GetFirst( const SfxObjectShell* pDoc = nullptr, bool bOnlyVisible = true );
+ static SfxViewFrame* GetNext( const SfxViewFrame& rPrev, const SfxObjectShell* pDoc = nullptr, bool bOnlyVisible = true );
- static SfxViewFrame* Get( const css::uno::Reference< css::frame::XController>& i_rController, const SfxObjectShell* i_pDoc = NULL );
+ static SfxViewFrame* Get( const css::uno::Reference< css::frame::XController>& i_rController, const SfxObjectShell* i_pDoc = nullptr );
- void DoActivate(bool bMDI, SfxViewFrame *pOld=NULL);
- void DoDeactivate(bool bMDI, SfxViewFrame *pOld=NULL);
+ void DoActivate(bool bMDI, SfxViewFrame *pOld=nullptr);
+ void DoDeactivate(bool bMDI, SfxViewFrame *pOld=nullptr);
SfxViewFrame* GetParentViewFrame() const;
@@ -291,7 +291,7 @@ public:
{}
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
SfxViewFrame* GetFrame() const
{ return pFrame; }
@@ -310,7 +310,7 @@ public:
SfxVerbListItem( sal_uInt16 nWhichId, const css::uno::Sequence < css::embed::VerbDescriptor >& );
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
};
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 61ac65d25041..669e9a5bbe38 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -220,11 +220,11 @@ public:
SfxShell* GetSubShell() const { return pSubShell; }
void AddSubShell( SfxShell& rShell );
- void RemoveSubShell( SfxShell *pShell=NULL );
+ void RemoveSubShell( SfxShell *pShell=nullptr );
SfxShell* GetSubShell( sal_uInt16 );
- virtual SfxShell* GetFormShell() { return 0; };
- virtual const SfxShell* GetFormShell() const { return 0; };
+ virtual SfxShell* GetFormShell() { return nullptr; };
+ virtual const SfxShell* GetFormShell() const { return nullptr; };
// Focus, KeyInput, Cursor
virtual void ShowCursor( bool bOn = true );
diff --git a/include/sfx2/zoomitem.hxx b/include/sfx2/zoomitem.hxx
index b0e82c66b98d..9e9205950f7c 100644
--- a/include/sfx2/zoomitem.hxx
+++ b/include/sfx2/zoomitem.hxx
@@ -71,7 +71,7 @@ public:
SvxZoomType GetType() const { return eType; }
void SetType( SvxZoomType eNewType ) { eType = eNewType; }
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create( SvStream& rStrm, sal_uInt16 nVersion ) const override;
virtual SvStream& Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
diff --git a/sfx2/inc/sorgitm.hxx b/sfx2/inc/sorgitm.hxx
index ad13cea6af8e..5adcbc8d3a25 100644
--- a/sfx2/inc/sorgitm.hxx
+++ b/sfx2/inc/sorgitm.hxx
@@ -34,7 +34,7 @@ public:
SfxScriptOrganizerItem( const SfxScriptOrganizerItem& );
virtual ~SfxScriptOrganizerItem();
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sfx2/qa/cppunit/test_metadatable.cxx b/sfx2/qa/cppunit/test_metadatable.cxx
index 46360d851aab..faada3c8ae6a 100644
--- a/sfx2/qa/cppunit/test_metadatable.cxx
+++ b/sfx2/qa/cppunit/test_metadatable.cxx
@@ -83,7 +83,7 @@ public:
virtual bool IsInUndo() const override { return m_bInUndo; }
virtual bool IsInContent() const override { return m_bInContent; }
virtual ::sfx2::IXmlIdRegistry& GetRegistry() override { return m_rRegistry; }
- virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override { return 0; }
+ virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override { return nullptr; }
};
static bool operator==(beans::StringPair p1, beans::StringPair p2)
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index c67bc91d2ac3..ee91a5c0c745 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -122,13 +122,13 @@
using namespace ::com::sun::star;
// Static member
-SfxApplication* SfxApplication::pApp = NULL;
+SfxApplication* SfxApplication::pApp = nullptr;
#if HAVE_FEATURE_SCRIPTING
-static BasicDLL* pBasic = NULL;
+static BasicDLL* pBasic = nullptr;
#endif
#if HAVE_FEATURE_DESKTOP
-static SfxHelp* pSfxHelp = NULL;
+static SfxHelp* pSfxHelp = nullptr;
#endif
namespace
@@ -180,7 +180,7 @@ SfxApplication* SfxApplication::GetOrCreate()
}
SfxApplication::SfxApplication()
- : pAppData_Impl( 0 )
+ : pAppData_Impl( nullptr )
{
SetName( "StarOffice" );
if (!utl::ConfigManager::IsAvoidConfig())
@@ -243,7 +243,7 @@ SfxApplication::~SfxApplication()
#endif
delete pAppData_Impl;
- pApp = 0;
+ pApp = nullptr;
}
@@ -426,7 +426,7 @@ void SfxApplication::ReleaseIndex(sal_uInt16 i)
vcl::Window* SfxApplication::GetTopWindow() const
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( SfxViewFrame::Current() );
- return pWork ? pWork->GetWindow() : NULL;
+ return pWork ? pWork->GetWindow() : nullptr;
}
SfxTbxCtrlFactArr_Impl& SfxApplication::GetTbxCtrlFactories_Impl() const
@@ -557,11 +557,11 @@ SfxApplication::ChooseScript()
SAL_INFO( "sfx.appl", "create selector dialog");
const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
- const SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL;
+ const SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetFrame() : nullptr;
uno::Reference< frame::XFrame > xFrame( pFrame ? pFrame->GetFrameInterface() : uno::Reference< frame::XFrame >() );
std::unique_ptr<AbstractScriptSelectorDialog> pDlg(
- pFact->CreateScriptSelectorDialog( NULL, false, xFrame ));
+ pFact->CreateScriptSelectorDialog( nullptr, false, xFrame ));
SAL_INFO( "sfx.appl", "done, now exec it");
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 085d7885cf03..36f917d1d19d 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -101,7 +101,7 @@ BasicManager* SfxApplication::GetBasicManager()
return 0;
#else
if (utl::ConfigManager::IsAvoidConfig())
- return 0;
+ return nullptr;
return BasicManagerRepository::getApplicationBasicManager( true );
#endif
}
@@ -112,7 +112,7 @@ XLibraryContainer * SfxApplication::GetDialogContainer()
return NULL;
#else
if (utl::ConfigManager::IsAvoidConfig())
- return NULL;
+ return nullptr;
if ( !pAppData_Impl->pBasicManager->isValid() )
GetBasicManager();
return pAppData_Impl->pBasicManager->getLibraryContainer( SfxBasicManagerHolder::DIALOGS );
@@ -127,7 +127,7 @@ XLibraryContainer * SfxApplication::GetBasicContainer()
return NULL;
#else
if (utl::ConfigManager::IsAvoidConfig())
- return NULL;
+ return nullptr;
if ( !pAppData_Impl->pBasicManager->isValid() )
GetBasicManager();
return pAppData_Impl->pBasicManager->getLibraryContainer( SfxBasicManagerHolder::SCRIPTS );
@@ -140,7 +140,7 @@ StarBASIC* SfxApplication::GetBasic()
return 0;
#else
if (utl::ConfigManager::IsAvoidConfig())
- return 0;
+ return nullptr;
return GetBasicManager()->GetLib(0);
#endif
}
diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx
index 36a5043fdc7c..78e0def08b49 100644
--- a/sfx2/source/appl/appbaslib.cxx
+++ b/sfx2/source/appl/appbaslib.cxx
@@ -39,7 +39,7 @@ using ::osl::Mutex;
SfxBasicManagerHolder::SfxBasicManagerHolder()
- :mpBasicManager( NULL )
+ :mpBasicManager( nullptr )
{
}
@@ -147,7 +147,7 @@ XLibraryContainer * SfxBasicManagerHolder::getLibraryContainer( ContainerType _e
case DIALOGS: return mxDialogContainer.get();
}
OSL_FAIL( "SfxBasicManagerHolder::getLibraryContainer: illegal container type!" );
- return NULL;
+ return nullptr;
}
void SfxBasicManagerHolder::impl_releaseContainers()
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index de657b3493b9..f88853f32210 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -497,7 +497,7 @@ bool SfxApplication::GetOptions( SfxItemSet& rSet )
// TODO/CLEANUP: Why two SetOptions Methods?
void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
{
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
SfxItemPool &rPool = GetPool();
SvtSaveOptions aSaveOptions;
@@ -776,7 +776,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
SvtPathOptions aPathOptions;
// Data is saved in DocInfo and IniManager
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
SfxItemPool &rPool = GetPool();
SfxAllItemSet aSendSet( rSet );
diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx
index f317ad4b0b82..554406f1ef93 100644
--- a/sfx2/source/appl/appchild.cxx
+++ b/sfx2/source/appl/appchild.cxx
@@ -63,7 +63,7 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, sal_uInt1
SfxChildWinContextFactory *pFact)
{
SfxChildWinFactArr_Impl *pFactories;
- SfxChildWinFactory *pF = NULL;
+ SfxChildWinFactory *pF = nullptr;
if ( pMod )
{
// Abandon Module, search there for ChildwindowFactory
@@ -140,7 +140,7 @@ SfxWorkWindow* SfxApplication::GetWorkWindow_Impl(const SfxViewFrame *pFrame) co
else if ( pAppData_Impl->pViewFrame )
return pAppData_Impl->pViewFrame->GetFrame().GetWorkWindow_Impl();
else
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index 6bd7ac3fab3b..b2635fca95f0 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -78,51 +78,51 @@ SfxBasicManagerCreationListener::~SfxBasicManagerCreationListener()
void SfxBasicManagerCreationListener::onBasicManagerCreated( const Reference< XModel >& _rxForDocument, BasicManager& _rBasicManager )
{
- if ( _rxForDocument == NULL )
+ if ( _rxForDocument == nullptr )
m_rAppData.OnApplicationBasicManagerCreated( _rBasicManager );
}
SfxAppData_Impl::SfxAppData_Impl( SfxApplication* )
- : pDdeService( 0 )
- , pDocTopics( 0 )
- , pTriggerTopic(0)
- , pDdeService2(0)
- , pFactArr(0)
+ : pDdeService( nullptr )
+ , pDocTopics( nullptr )
+ , pTriggerTopic(nullptr)
+ , pDdeService2(nullptr)
+ , pFactArr(nullptr)
, pTopFrames( new SfxFrameArr_Impl )
- , pMatcher( 0 )
+ , pMatcher( nullptr )
#if HAVE_FEATURE_SCRIPTING
- , pBasicResMgr( 0 )
+ , pBasicResMgr( nullptr )
#endif
- , pSvtResMgr( 0 )
- , m_pToolsErrorHdl(0)
- , m_pSoErrorHdl(0)
+ , pSvtResMgr( nullptr )
+ , m_pToolsErrorHdl(nullptr)
+ , m_pSoErrorHdl(nullptr)
#if HAVE_FEATURE_SCRIPTING
- , m_pSbxErrorHdl(0)
+ , m_pSbxErrorHdl(nullptr)
#endif
- , pAppDispatch(NULL)
- , pTemplates( 0 )
- , pPool(0)
- , pSaveOptions( 0 )
- , pHelpOptions( 0 )
- , pProgress(0)
+ , pAppDispatch(nullptr)
+ , pTemplates( nullptr )
+ , pPool(nullptr)
+ , pSaveOptions( nullptr )
+ , pHelpOptions( nullptr )
+ , pProgress(nullptr)
, nDocModalMode(0)
, nAutoTabPageId(0)
, nRescheduleLocks(0)
, nInReschedule(0)
, m_xImeStatusWindow(new sfx2::appl::ImeStatusWindow(comphelper::getProcessComponentContext()))
- , pTbxCtrlFac(0)
- , pStbCtrlFac(0)
- , pMenuCtrlFac(0)
- , pViewFrames(0)
- , pViewShells(0)
- , pObjShells(0)
- , pSfxResManager(0)
+ , pTbxCtrlFac(nullptr)
+ , pStbCtrlFac(nullptr)
+ , pMenuCtrlFac(nullptr)
+ , pViewFrames(nullptr)
+ , pViewShells(nullptr)
+ , pObjShells(nullptr)
+ , pSfxResManager(nullptr)
, pBasicManager( new SfxBasicManagerHolder )
, pBasMgrListener( new SfxBasicManagerCreationListener( *this ) )
- , pViewFrame( 0 )
- , pSlotPool( 0 )
- , pAppDispat( 0 )
- , pInterfaces( 0 )
+ , pViewFrame( nullptr )
+ , pSlotPool( nullptr )
+ , pAppDispat( nullptr )
+ , pInterfaces( nullptr )
, nDocNo(0)
, nInterfaces( 0 )
, bDispatcherLocked( false )
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index ae1e1abe2491..62b81f441cb2 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -402,7 +402,7 @@ bool SfxObjectShell::DdeSetData( const OUString&, // the Item
*/
::sfx2::SvLinkSource* SfxObjectShell::DdeCreateLinkSource( const OUString& ) // the Item to be addressed
{
- return 0;
+ return nullptr;
}
void SfxObjectShell::ReconnectDdeLink(SfxObjectShell& /*rServer*/)
diff --git a/sfx2/source/appl/appdispatchprovider.cxx b/sfx2/source/appl/appdispatchprovider.cxx
index 3b62ce56bc3a..11cc76d5bd60 100644
--- a/sfx2/source/appl/appdispatchprovider.cxx
+++ b/sfx2/source/appl/appdispatchprovider.cxx
@@ -135,7 +135,7 @@ Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch(
sal_uInt16 nId( 0 );
bool bMasterCommand( false );
Reference < XDispatch > xDisp;
- const SfxSlot* pSlot = 0;
+ const SfxSlot* pSlot = nullptr;
SfxDispatcher* pAppDisp = SfxGetpApp()->GetAppDispatcher_Impl();
if ( aURL.Protocol == "slot:" || aURL.Protocol == "commandId:" )
{
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 7d7ee7b410fc..720c05c3943f 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -173,7 +173,7 @@ extern "C" bool GetSpecialCharsForEdit( vcl::Window* i_pParent, const vcl::Font&
OUString GetSpecialCharsForEdit(vcl::Window* pParent, const vcl::Font& rFont)
{
static bool bDetermineFunction = false;
- static PFunc_getSpecialCharsForEdit pfunc_getSpecialCharsForEdit = 0;
+ static PFunc_getSpecialCharsForEdit pfunc_getSpecialCharsForEdit = nullptr;
SolarMutexGuard aGuard;
if ( !bDetermineFunction )
@@ -276,7 +276,7 @@ bool SfxApplication::Initialize_Impl()
// App-Dispatcher aufbauen
pAppData_Impl->pAppDispat->Push(*this);
pAppData_Impl->pAppDispat->Flush();
- pAppData_Impl->pAppDispat->DoActivate_Impl( true, NULL );
+ pAppData_Impl->pAppDispat->DoActivate_Impl( true, nullptr );
{
SolarMutexGuard aGuard;
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index fb4a17b20a9e..04ae901e740d 100644
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -124,13 +124,13 @@ SfxModule* SfxApplication::GetModule_Impl()
{
SfxModule* pModule = SfxModule::GetActiveModule();
if ( !pModule )
- pModule = SfxModule::GetActiveModule( SfxViewFrame::GetFirst( 0, false ) );
+ pModule = SfxModule::GetActiveModule( SfxViewFrame::GetFirst( nullptr, false ) );
if( pModule )
return pModule;
else
{
OSL_FAIL( "No module!" );
- return NULL;
+ return nullptr;
}
}
@@ -144,7 +144,7 @@ bool SfxApplication::loadBrandSvg(const char *pName, BitmapEx &rBitmap, int nWid
OUString aBaseName = "/" + OUString::createFromAscii( pName );
- rtl_Locale *pLoc = NULL;
+ rtl_Locale *pLoc = nullptr;
osl_getProcessLocale (&pLoc);
LanguageTag aLanguageTag( *pLoc);
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 0d1b0f8fbcc6..3119d6df5a3e 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -218,7 +218,7 @@ sal_uInt32 CheckPasswd_Impl
if ( bIsEncrypted )
{
- vcl::Window* pWin = pDoc ? pDoc->GetDialogParent( pFile ) : NULL;
+ vcl::Window* pWin = pDoc ? pDoc->GetDialogParent( pFile ) : nullptr;
if ( pWin )
pWin->Show();
@@ -286,7 +286,7 @@ sal_uInt32 CheckPasswd_Impl
sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUString &rFileName, bool bCopy, SfxItemSet* pSet )
{
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
SfxMedium aMedium( rFileName, ( StreamMode::READ | StreamMode::SHARE_DENYNONE ) );
if ( !aMedium.GetStorage( false ).is() )
@@ -523,7 +523,7 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
{
SfxCallMode eMode = SfxCallMode::SYNCHRON;
- const SfxPoolItem *pRet=0;
+ const SfxPoolItem *pRet=nullptr;
SfxStringItem aReferer( SID_REFERER, "private:user" );
SfxStringItem aTarget( SID_TARGETNAME, "_default" );
if ( !aTemplateFileName.isEmpty() )
@@ -586,7 +586,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
const SfxSlot* pSlot = GetInterface()->GetSlot( aCommand );
if ( pSlot )
{
- pFileNameItem = NULL;
+ pFileNameItem = nullptr;
}
else
{
@@ -594,7 +594,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
sal_uInt16 nSlotId = (sal_uInt16) aCommand.copy(5).toInt32();
if ( nSlotId == SID_OPENDOC )
- pFileNameItem = NULL;
+ pFileNameItem = nullptr;
}
}
}
@@ -604,7 +604,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// get FileName from dialog
std::vector<OUString> pURLList;
OUString aFilter;
- SfxItemSet* pSet = NULL;
+ SfxItemSet* pSet = nullptr;
OUString aPath;
const SfxStringItem* pFolderNameItem = rReq.GetArg<SfxStringItem>(SID_PATH);
if ( pFolderNameItem )
@@ -901,7 +901,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
try
{
sfx2::openUriExternally(
- aURL.Complete, pFilter == 0);
+ aURL.Complete, pFilter == nullptr);
}
catch ( css::system::SystemShellExecuteException& )
{
@@ -930,7 +930,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
return;
}
- SfxFrame* pTargetFrame = NULL;
+ SfxFrame* pTargetFrame = nullptr;
Reference< XFrame > xTargetFrame;
const SfxFrameItem* pFrameItem = rReq.GetArg<SfxFrameItem>(SID_DOCFRAME);
@@ -974,7 +974,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if (!pInteractionItem)
{
- Reference < task::XInteractionHandler2 > xHdl = task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), 0 );
+ Reference < task::XInteractionHandler2 > xHdl = task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr );
rReq.AppendItem( SfxUnoAnyItem(SID_INTERACTIONHANDLER,css::uno::makeAny(xHdl)) );
}
if (!pMacroExecItem)
@@ -1021,7 +1021,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
aFileName = pURLItem->GetValue();
if( aFileName.startsWith("#") ) // Mark without URL
{
- SfxViewFrame *pView = pTargetFrame ? pTargetFrame->GetCurrentViewFrame() : 0;
+ SfxViewFrame *pView = pTargetFrame ? pTargetFrame->GetCurrentViewFrame() : nullptr;
if ( !pView )
pView = SfxViewFrame::Current();
pView->GetViewShell()->JumpToMark( aFileName.copy(1) );
@@ -1088,7 +1088,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if ( xController.is() )
{
// try to find the SfxFrame for the controller
- SfxFrame* pCntrFrame = NULL;
+ SfxFrame* pCntrFrame = nullptr;
for ( SfxViewShell* pShell = SfxViewShell::GetFirst( false ); pShell; pShell = SfxViewShell::GetNext( *pShell, false ) )
{
if ( pShell->GetController() == xController )
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index 5e276c398ed4..cc891da5fd8d 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -88,20 +88,20 @@ void SfxApplication::Deinitialize()
pAppData_Impl->pAppDispat->Pop( *this, SfxDispatcherPopFlags::POP_UNTIL );
pAppData_Impl->pAppDispat->Flush();
pAppData_Impl->bDowning = true;
- pAppData_Impl->pAppDispat->DoDeactivate_Impl( true, NULL );
+ pAppData_Impl->pAppDispat->DoDeactivate_Impl( true, nullptr );
// Release Controller and others
// then the remaining components should also disappear ( Beamer! )
#if HAVE_FEATURE_SCRIPTING
BasicManagerRepository::resetApplicationBasicManager();
- pAppData_Impl->pBasicManager->reset( NULL );
+ pAppData_Impl->pBasicManager->reset( nullptr );
// this will also delete pBasMgr
#endif
- DBG_ASSERT( pAppData_Impl->pViewFrame == 0, "active foreign ViewFrame" );
+ DBG_ASSERT( pAppData_Impl->pViewFrame == nullptr, "active foreign ViewFrame" );
- delete[] pAppData_Impl->pInterfaces, pAppData_Impl->pInterfaces = 0;
+ delete[] pAppData_Impl->pInterfaces, pAppData_Impl->pInterfaces = nullptr;
// free administration managers
DELETEZ(pAppData_Impl->pAppDispat);
@@ -123,7 +123,7 @@ void SfxApplication::Deinitialize()
//TODO/CLEANUP
//ReleaseArgs could be used instead!
- pAppData_Impl->pPool = NULL;
+ pAppData_Impl->pPool = nullptr;
NoChaos::ReleaseItemPool();
#if HAVE_FEATURE_SCRIPTING
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
index ee82f244a503..8ba3ca2d928f 100644
--- a/sfx2/source/appl/appreg.cxx
+++ b/sfx2/source/appl/appreg.cxx
@@ -53,10 +53,10 @@ void SfxApplication::Registrations_Impl()
// ChildWindows
SfxRecordingFloatWrapper_Impl::RegisterChildWindow();
- SfxNavigatorWrapper::RegisterChildWindow( false, NULL, SfxChildWindowFlags::NEVERHIDE );
+ SfxNavigatorWrapper::RegisterChildWindow( false, nullptr, SfxChildWindowFlags::NEVERHIDE );
SfxPartChildWnd_Impl::RegisterChildWindow();
SfxDockingWrapper::RegisterChildWindow();
- SfxInfoBarContainerChild::RegisterChildWindow( true, NULL, SfxChildWindowFlags::NEVERHIDE );
+ SfxInfoBarContainerChild::RegisterChildWindow( true, nullptr, SfxChildWindowFlags::NEVERHIDE );
// Controller
SfxToolBoxControl::RegisterControl(SID_REPEAT);
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index beddf4cba2cf..f5704b0f3fb6 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -170,7 +170,7 @@ namespace
xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, sInteraction);
// Ill be back (hopefully)!
SolarMutexGuard aGuard;
- executeRestartDialog(comphelper::getProcessComponentContext(), NULL, RESTART_REASON_BIBLIOGRAPHY_INSTALL);
+ executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, RESTART_REASON_BIBLIOGRAPHY_INSTALL);
}
catch (const Exception & e)
{
@@ -244,7 +244,7 @@ namespace
private:
DECL_LINK_TYPED(ShowHdl, Button*, void);
public:
- explicit LicenseDialog(vcl::Window *pParent=NULL);
+ explicit LicenseDialog(vcl::Window *pParent=nullptr);
};
LicenseDialog::LicenseDialog(vcl::Window *pParent)
@@ -365,7 +365,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTabDialog(
RID_SVXDLG_CUSTOMIZE,
- NULL, &aSet, xFrame ));
+ nullptr, &aSet, xFrame ));
if ( pDlg )
{
@@ -471,7 +471,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
- pHelp->Start( ".uno:HelpIndex", NULL ); // show start page
+ pHelp->Start( ".uno:HelpIndex", nullptr ); // show start page
bDone = true;
}
break;
@@ -533,7 +533,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
{
- std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( 0, RID_DEFAULTABOUT ));
+ std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( nullptr, RID_DEFAULTABOUT ));
pDlg->Execute();
bDone = true;
}
@@ -570,11 +570,11 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
if (sfx2::appl::ImeStatusWindow::canToggle())
{
const SfxBoolItem * pItem = rReq.GetArg<SfxBoolItem>(SID_SHOW_IME_STATUS_WINDOW);
- bool bShow = pItem == 0
+ bool bShow = pItem == nullptr
? !pAppData_Impl->m_xImeStatusWindow->isShowing()
: pItem->GetValue();
pAppData_Impl->m_xImeStatusWindow->show(bShow);
- if (pItem == 0)
+ if (pItem == nullptr)
rReq.AppendItem(SfxBoolItem(SID_SHOW_IME_STATUS_WINDOW,
bShow));
}
@@ -947,7 +947,7 @@ namespace
{
DBG_UNHANDLED_EXCEPTION();
}
- return NULL;
+ return nullptr;
}
#endif // HAVE_FEATURE_SCRIPTING
}
@@ -963,7 +963,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if ( pURLItem )
sPageURL = pURLItem->GetValue();
const SfxItemSet* pArgs = rReq.GetInternalArgs_Impl();
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
Reference < XFrame > xFrame;
if ( pArgs && pArgs->GetItemState( SID_FILLFRAME, false, &pItem ) == SfxItemState::SET )
{
@@ -974,7 +974,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if ( pFact )
{
VclAbstractDialog* pDlg =
- pFact->CreateFrameDialog( NULL, xFrame, rReq.GetSlot(), sPageURL );
+ pFact->CreateFrameDialog( nullptr, xFrame, rReq.GetSlot(), sPageURL );
short nRet = pDlg->Execute();
delete pDlg;
SfxViewFrame* pView = SfxViewFrame::GetFirst();
@@ -1031,7 +1031,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
#if HAVE_FEATURE_SCRIPTING
case SID_BASICIDE_APPEAR:
{
- SfxViewFrame* pView = lcl_getBasicIDEViewFrame( NULL );
+ SfxViewFrame* pView = lcl_getBasicIDEViewFrame( nullptr );
if ( !pView )
{
SfxObjectShell* pBasicIDE = SfxObjectShell::CreateObject( lcl_getBasicIDEServiceName() );
@@ -1237,13 +1237,13 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if ( pFact )
{
SfxItemSet aSet(GetPool(), SID_AUTO_CORRECT_DLG, SID_AUTO_CORRECT_DLG);
- const SfxPoolItem* pItem=NULL;
+ const SfxPoolItem* pItem=nullptr;
const SfxItemSet* pSet = rReq.GetArgs();
- SfxItemPool* pSetPool = pSet ? pSet->GetPool() : NULL;
+ SfxItemPool* pSetPool = pSet ? pSet->GetPool() : nullptr;
if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), false, &pItem ) == SfxItemState::SET )
aSet.Put( *pItem );
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, NULL, &aSet, NULL ));
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, nullptr, &aSet, nullptr ));
pDlg->Execute();
}
@@ -1302,7 +1302,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
{
Reference< uno::XComponentContext > xORB = ::comphelper::getProcessComponentContext();
Reference< ui::dialogs::XExecutableDialog > xDialog;
- xDialog = ui::dialogs::AddressBookSourcePilot::createWithParent(xORB, 0);
+ xDialog = ui::dialogs::AddressBookSourcePilot::createWithParent(xORB, nullptr);
xDialog->execute();
}
catch(const css::uno::Exception&)
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 0bea0bdfd733..eb4264a07512 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1373,7 +1373,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
nSlotId == SID_SAVETO || nSlotId == SID_EXPORTDOCASPDF || nSlotId == SID_DIRECTEXPORTDOCASPDF ||
nSlotId == SID_SAVEACOPY )
{
- const SfxPoolItem *pItem=0;
+ const SfxPoolItem *pItem=nullptr;
if ( rSet.GetItemState( SID_COMPONENTDATA, false, &pItem ) == SfxItemState::SET )
{
pValue[nActProp].Name = sComponentData;
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 05c80c279a58..c576ad6e66d9 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -46,7 +46,7 @@ SfxChildWinFactory::SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID
: pCtor(pTheCtor)
, nId( nID )
, nPos(n)
- , pArr( NULL )
+ , pArr( nullptr )
{}
SfxChildWinFactory::~SfxChildWinFactory()
@@ -101,8 +101,8 @@ class DisposeListener : public ::cppu::WeakImplHelper< css::lang::XEventListener
delete m_pOwner;
}
- m_pOwner = NULL;
- m_pData = NULL;
+ m_pOwner = nullptr;
+ m_pData = nullptr;
}
}
@@ -162,15 +162,15 @@ SfxChildWindow::SfxChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId)
, eChildAlignment(SfxChildAlignment::NOALIGNMENT)
{
pImp = new SfxChildWindow_Impl;
- pImp->pFact = 0L;
+ pImp->pFact = nullptr;
pImp->bHideNotDelete = false;
pImp->bHideAtToggle = false;
pImp->bWantsFocus = true;
pImp->bVisible = true;
- pImp->pContextModule = NULL;
- pImp->pWorkWin = NULL;
+ pImp->pContextModule = nullptr;
+ pImp->pWorkWin = nullptr;
- pContext = 0L;
+ pContext = nullptr;
}
void SfxChildWindow::Destroy()
@@ -199,27 +199,27 @@ void SfxChildWindow::ClearWorkwin()
if (pImp->pWorkWin)
{
if (pImp->pWorkWin->GetActiveChild_Impl() == pWindow)
- pImp->pWorkWin->SetActiveChild_Impl(NULL);
- pImp->pWorkWin = NULL;
+ pImp->pWorkWin->SetActiveChild_Impl(nullptr);
+ pImp->pWorkWin = nullptr;
}
}
SfxChildWindow::~SfxChildWindow()
{
delete pContext;
- pContext = NULL;
+ pContext = nullptr;
ClearWorkwin();
pWindow.disposeAndClear();
delete pImp;
- pImp = NULL;
+ pImp = nullptr;
}
SfxChildWindow* SfxChildWindow::CreateChildWindow( sal_uInt16 nId,
vcl::Window *pParent, SfxBindings* pBindings, SfxChildWinInfo& rInfo)
{
- SfxChildWindow *pChild=0;
- SfxChildWinFactory* pFact=0;
+ SfxChildWindow *pChild=nullptr;
+ SfxChildWinFactory* pFact=nullptr;
SystemWindowFlags nOldMode = Application::GetSystemWindowMode();
// First search for ChildWindow in SDT; Overlay windows are realized
@@ -250,8 +250,8 @@ SfxChildWindow* SfxChildWindow::CreateChildWindow( sal_uInt16 nId,
}
}
- SfxDispatcher *pDisp = pBindings ? pBindings->GetDispatcher_Impl() : NULL;
- SfxModule *pMod = pDisp ? SfxModule::GetActiveModule( pDisp->GetFrame() ) : NULL;
+ SfxDispatcher *pDisp = pBindings ? pBindings->GetDispatcher_Impl() : nullptr;
+ SfxModule *pMod = pDisp ? SfxModule::GetActiveModule( pDisp->GetFrame() ) : nullptr;
if (!pChild && pMod)
{
SfxChildWinFactArr_Impl *pFactories = pMod->GetChildWinFactories_Impl();
@@ -438,11 +438,11 @@ void SfxChildWindow::InitializeChildWinFactory_Impl(sal_uInt16 nId, SfxChildWinI
void SfxChildWindow::CreateContext( sal_uInt16 nContextId, SfxBindings& rBindings )
{
- SfxChildWindowContext *pCon = NULL;
- SfxChildWinFactory* pFact=0;
+ SfxChildWindowContext *pCon = nullptr;
+ SfxChildWinFactory* pFact=nullptr;
SfxApplication *pApp = SfxGetpApp();
SfxDispatcher *pDisp = rBindings.GetDispatcher_Impl();
- SfxModule *pMod = pDisp ? SfxModule::GetActiveModule( pDisp->GetFrame() ) :0;
+ SfxModule *pMod = pDisp ? SfxModule::GetActiveModule( pDisp->GetFrame() ) :nullptr;
if ( pMod )
{
SfxChildWinFactArr_Impl *pFactories = pMod->GetChildWinFactories_Impl();
@@ -498,7 +498,7 @@ void SfxChildWindow::CreateContext( sal_uInt16 nContextId, SfxBindings& rBinding
SfxChildWinInfo aInfo = pFact->aInfo;
pCon = pConFact->pCtor( GetWindow(), &rBindings, &aInfo );
pCon->nContextId = pConFact->nContextId;
- pImp->pContextModule = NULL;
+ pImp->pContextModule = nullptr;
}
rBindings.LEAVEREGISTRATIONS();
}
@@ -544,7 +544,7 @@ FloatingWindow* SfxChildWindowContext::GetFloatingWindow() const
else
{
OSL_FAIL("No FloatingWindow-Context!");
- return NULL;
+ return nullptr;
}
}
@@ -692,7 +692,7 @@ void SfxChildWindow::Show( ShowFlags nFlags )
vcl::Window* SfxChildWindow::GetContextWindow( SfxModule *pModule ) const
{
- return pModule == pImp->pContextModule && pContext ? pContext->GetWindow(): 0;
+ return pModule == pImp->pContextModule && pContext ? pContext->GetWindow(): nullptr;
}
void SfxChildWindow::SetWorkWindow_Impl( SfxWorkWindow* pWin )
@@ -704,7 +704,7 @@ void SfxChildWindow::SetWorkWindow_Impl( SfxWorkWindow* pWin )
void SfxChildWindow::Activate_Impl()
{
- if(pImp->pWorkWin!=NULL)
+ if(pImp->pWorkWin!=nullptr)
pImp->pWorkWin->SetActiveChild_Impl( pWindow );
}
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index b639131dcec1..e65276830c0a 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -47,9 +47,9 @@
#define FILETYPE_OBJECT 3
SvFileObject::SvFileObject()
- : nPostUserEventId(0)
+ : nPostUserEventId(nullptr)
, mxDelMed()
- , pOldParent(NULL)
+ , pOldParent(nullptr)
, nType(FILETYPE_TEXT)
, bLoadAgain(true)
, bSynchron(false)
@@ -134,7 +134,7 @@ bool SvFileObject::GetData( css::uno::Any & rData,
bLoadError = !GetGraphic_Impl( aGrf, xMed->GetInStream() );
}
else if( !LoadFile_Impl() ||
- !GetGraphic_Impl( aGrf, xMed.Is() ? xMed->GetInStream() : 0 ))
+ !GetGraphic_Impl( aGrf, xMed.Is() ? xMed->GetInStream() : nullptr ))
{
if( !xMed.Is() )
break;
@@ -204,7 +204,7 @@ bool SvFileObject::Connect( sfx2::SvBaseLink* pLink )
return false;
// Test if not another link of the same connection already exists
- sfx2::LinkManager::GetDisplayNames( pLink, 0, &sFileNm, 0, &sFilter );
+ sfx2::LinkManager::GetDisplayNames( pLink, nullptr, &sFileNm, nullptr, &sFilter );
if( OBJECT_CLIENT_GRF == pLink->GetObjType() )
{
@@ -396,7 +396,7 @@ void SvFileObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Li
OUString sFile, sRange, sTmpFilter;
if( pLink && pLink->GetLinkManager() )
{
- sfx2::LinkManager::GetDisplayNames( pLink, 0, &sFile, &sRange, &sTmpFilter );
+ sfx2::LinkManager::GetDisplayNames( pLink, nullptr, &sFile, &sRange, &sTmpFilter );
switch( pLink->GetObjType() )
{
@@ -493,7 +493,7 @@ IMPL_LINK_NOARG_TYPED( SvFileObject, LoadGrfReady_Impl, void*, void )
IMPL_LINK_NOARG_TYPED( SvFileObject, DelMedium_Impl, void*, void )
{
- nPostUserEventId = 0;
+ nPostUserEventId = nullptr;
mxDelMed.Clear();
}
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index cc32b9477200..a84126f06017 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -50,7 +50,7 @@ class SvFileObject : public sfx2::SvLinkSource
bool bStateChangeCalled : 1;
bool bInCallDownload : 1;
- bool GetGraphic_Impl( Graphic&, SvStream* pStream = 0 );
+ bool GetGraphic_Impl( Graphic&, SvStream* pStream = nullptr );
bool LoadFile_Impl();
void SendStateChg_Impl( sfx2::LinkManager::LinkState nState );
diff --git a/sfx2/source/appl/fwkhelper.cxx b/sfx2/source/appl/fwkhelper.cxx
index 562ec966b8c6..473343dd2628 100644
--- a/sfx2/source/appl/fwkhelper.cxx
+++ b/sfx2/source/appl/fwkhelper.cxx
@@ -35,7 +35,7 @@ void SAL_CALL RefreshToolbars( css::uno::Reference< css::frame::XFrame >& xFrame
SolarMutexGuard aGuard;
if ( xFrame.is() )
{
- SfxFrame* pFrame=0;
+ SfxFrame* pFrame=nullptr;
for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) )
{
if ( pFrame->GetFrameInterface() == xFrame )
diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx
index b25d28b4cd86..db7d2831b90a 100644
--- a/sfx2/source/appl/helpinterceptor.cxx
+++ b/sfx2/source/appl/helpinterceptor.cxx
@@ -38,8 +38,8 @@ using namespace ::com::sun::star::lang;
HelpInterceptor_Impl::HelpInterceptor_Impl() :
- m_pHistory ( NULL ),
- m_pWindow ( NULL ),
+ m_pHistory ( nullptr ),
+ m_pWindow ( nullptr ),
m_nCurPos ( 0 )
{
@@ -278,7 +278,7 @@ void SAL_CALL HelpInterceptor_Impl::addStatusListener(
void SAL_CALL HelpInterceptor_Impl::removeStatusListener(
const Reference< XStatusListener >&, const URL&) throw( RuntimeException, std::exception )
{
- m_xListener = 0;
+ m_xListener = nullptr;
}
// HelpListener_Impl -----------------------------------------------------
@@ -305,7 +305,7 @@ void SAL_CALL HelpListener_Impl::disposing( const css::lang::EventObject& )
throw( css::uno::RuntimeException, std::exception )
{
pInterceptor->removeStatusListener( this, css::util::URL() );
- pInterceptor = NULL;
+ pInterceptor = nullptr;
}
HelpStatusListener_Impl::HelpStatusListener_Impl(
@@ -329,7 +329,7 @@ void HelpStatusListener_Impl::statusChanged(
void HelpStatusListener_Impl::disposing( const EventObject& ) throw( RuntimeException, std::exception )
{
xDispatch->removeStatusListener(this, css::util::URL());
- xDispatch = 0;
+ xDispatch = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx
index 40ca5e78f6f5..9d38ad5930e2 100644
--- a/sfx2/source/appl/imagemgr.cxx
+++ b/sfx2/source/appl/imagemgr.cxx
@@ -79,7 +79,7 @@ Image SAL_CALL GetImage(
if ( nProtocol == INetProtocol::Slot )
{
sal_uInt16 nId = ( sal_uInt16 ) aURL.copy(5).toInt32();
- const SfxSlot* pSlot = 0;
+ const SfxSlot* pSlot = nullptr;
if ( xModel.is() )
{
Reference < XUnoTunnel > xObj( xModel, UNO_QUERY );
diff --git a/sfx2/source/appl/imestatuswindow.cxx b/sfx2/source/appl/imestatuswindow.cxx
index fdf1369a725e..cc9d4a647c45 100644
--- a/sfx2/source/appl/imestatuswindow.cxx
+++ b/sfx2/source/appl/imestatuswindow.cxx
@@ -171,7 +171,7 @@ void SAL_CALL ImeStatusWindow::disposing(css::lang::EventObject const & )
throw (css::uno::RuntimeException, std::exception)
{
osl::MutexGuard aGuard(m_aMutex);
- m_xConfig = 0;
+ m_xConfig = nullptr;
m_bDisposed = true;
}
@@ -198,7 +198,7 @@ css::uno::Reference< css::beans::XPropertySet > ImeStatusWindow::getConfig()
if (!m_xContext.is())
throw css::uno::RuntimeException(
OUString("null comphelper::getProcessServiceFactory"),
- 0);
+ nullptr);
css::uno::Reference< css::lang::XMultiServiceFactory > xProvider =
css::configuration::theDefaultProvider::get( m_xContext );
css::beans::PropertyValue aArg(
@@ -219,7 +219,7 @@ css::uno::Reference< css::beans::XPropertySet > ImeStatusWindow::getConfig()
OUString(
"null com.sun.star.configuration."
"ConfigurationUpdateAccess"),
- 0);
+ nullptr);
bAdd = true;
}
xConfig = m_xConfig;
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index cafabcd29e19..78218a912ccf 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -121,7 +121,7 @@ IMPL_LINK_NOARG_TYPED( SvDDELinkEditDialog, EditHdl_Impl, Edit&, void)
}
SvDDEObject::SvDDEObject()
- : pConnection( 0 ), pLink( 0 ), pRequest( 0 ), pGetData( 0 ), nError( 0 )
+ : pConnection( nullptr ), pLink( nullptr ), pRequest( nullptr ), pGetData( nullptr ), nError( 0 )
{
SetUpdateTimeout( 100 );
bWaitForData = sal_False;
@@ -344,7 +344,7 @@ IMPL_LINK_TYPED( SvDDEObject, ImplGetDDEData, const DdeData*, pData, void )
if( pGetData )
{
*pGetData <<= aSeq; // Copy Data
- pGetData = 0; // reset the pointer here
+ pGetData = nullptr; // reset the pointer here
}
else
{
@@ -362,7 +362,7 @@ IMPL_LINK_TYPED( SvDDEObject, ImplDoneDDEData, bool, bValid, void )
{
if( !bValid && ( pRequest || pLink ))
{
- DdeTransaction* pReq = 0;
+ DdeTransaction* pReq = nullptr;
if( !pLink || ( pLink && pLink->IsBusy() ))
pReq = pRequest; // only the one that is ready
else if( pRequest && pRequest->IsBusy() )
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index ecd5efe9c2d6..74ef914677f8 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -78,7 +78,7 @@ LinkManager::~LinkManager()
if( rTmp.Is() )
{
rTmp->Disconnect();
- rTmp->SetLinkManager( NULL );
+ rTmp->SetLinkManager( nullptr );
}
}
}
@@ -114,7 +114,7 @@ void LinkManager::Remove( SvBaseLink *pLink )
if( pLink == rTmp.get() )
{
rTmp->Disconnect();
- rTmp->SetLinkManager( NULL );
+ rTmp->SetLinkManager( nullptr );
rTmp.Clear();
bFound = true;
}
@@ -145,7 +145,7 @@ void LinkManager::Remove( size_t nPos, size_t nCnt )
if( rTmp.Is() )
{
rTmp->Disconnect();
- rTmp->SetLinkManager( NULL );
+ rTmp->SetLinkManager( nullptr );
}
}
aLinkTbl.erase( aLinkTbl.begin() + nPos, aLinkTbl.begin() + nPos + nCnt );
@@ -487,9 +487,9 @@ void LinkManager::CancelTransfers()
const sfx2::SvBaseLinks& rLnks = GetLinks();
for( size_t n = rLnks.size(); n; )
- if( 0 != ( pLnk = &(*rLnks[ --n ])) &&
+ if( nullptr != ( pLnk = &(*rLnks[ --n ])) &&
OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & pLnk->GetObjType()) &&
- 0 != ( pFileObj = static_cast<SvFileObject*>(pLnk->GetObj()) ) )
+ nullptr != ( pFileObj = static_cast<SvFileObject*>(pLnk->GetObj()) ) )
pFileObj->CancelTransfers();
}
// For the purpose of sending Status information from the file object to
@@ -568,11 +568,11 @@ OUString lcl_DDE_RelToAbs( const OUString& rTopic, const OUString& rBaseURL )
bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
{
- SfxObjectShell* pFndShell = 0;
+ SfxObjectShell* pFndShell = nullptr;
sal_uInt16 nUpdateMode = css::document::UpdateDocMode::NO_UPDATE;
OUString sTopic, sItem, sReferer;
LinkManager* pLinkMgr = pLink->GetLinkManager();
- if (pLinkMgr && sfx2::LinkManager::GetDisplayNames(pLink, 0, &sTopic, &sItem) && !sTopic.isEmpty())
+ if (pLinkMgr && sfx2::LinkManager::GetDisplayNames(pLink, nullptr, &sTopic, &sItem) && !sTopic.isEmpty())
{
// first only loop over the DocumentShells the shells and find those
// with the name:
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index 4bcabbe78b17..66f1290a5afd 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -132,7 +132,7 @@ public:
explicit SvLinkSource_EntryIter_Impl( const SvLinkSource_Array_Impl& rArr );
~SvLinkSource_EntryIter_Impl();
SvLinkSource_Entry_Impl* Curr()
- { return nPos < aArr.size() ? aArr[ nPos ] : 0; }
+ { return nPos < aArr.size() ? aArr[ nPos ] : nullptr; }
SvLinkSource_Entry_Impl* Next();
bool IsValidCurrValue( SvLinkSource_Entry_Impl* pEntry );
};
@@ -155,7 +155,7 @@ bool SvLinkSource_EntryIter_Impl::IsValidCurrValue( SvLinkSource_Entry_Impl* pEn
SvLinkSource_Entry_Impl* SvLinkSource_EntryIter_Impl::Next()
{
- SvLinkSource_Entry_Impl* pRet = 0;
+ SvLinkSource_Entry_Impl* pRet = nullptr;
if( nPos + 1 < (sal_uInt16)aArr.size() )
{
++nPos;
@@ -169,12 +169,12 @@ SvLinkSource_Entry_Impl* SvLinkSource_EntryIter_Impl::Next()
pRet = aArr[ nPos ];
if( std::find(rOrigArr.cbegin(), rOrigArr.cend(), pRet ) != rOrigArr.cend() )
break;
- pRet = 0;
+ pRet = nullptr;
++nPos;
} while( nPos < aArr.size() );
if( nPos >= aArr.size() )
- pRet = 0;
+ pRet = nullptr;
}
}
return pRet;
@@ -191,7 +191,7 @@ struct SvLinkSource_Impl
bool m_bIsReadOnly;
SvLinkSource_Impl()
- : pTimer(0)
+ : pTimer(nullptr)
, nTimeout(3000)
, m_bIsReadOnly(false)
{
@@ -285,7 +285,7 @@ void SvLinkSource::SendDataChanged()
if( pImpl->pTimer )
{
delete pImpl->pTimer;
- pImpl->pTimer = NULL;
+ pImpl->pTimer = nullptr;
}
pImpl->aDataMimeType.clear();
}
@@ -319,7 +319,7 @@ void SvLinkSource::NotifyDataChanged()
if( pImpl->pTimer )
{
delete pImpl->pTimer;
- pImpl->pTimer = NULL;
+ pImpl->pTimer = nullptr;
}
}
}
@@ -357,7 +357,7 @@ void SvLinkSource::DataChanged( const OUString & rMimeType,
if( pImpl->pTimer )
{
delete pImpl->pTimer;
- pImpl->pTimer = NULL;
+ pImpl->pTimer = nullptr;
}
}
}
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 8b63ebcb6584..63b3a73291f5 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -51,9 +51,9 @@ struct BaseLink_Impl
bool m_bIsConnect;
BaseLink_Impl() :
- m_pLinkMgr( NULL )
- , m_pParentWin( NULL )
- , m_pFileDlg( NULL )
+ m_pLinkMgr( nullptr )
+ , m_pParentWin( nullptr )
+ , m_pFileDlg( nullptr )
, m_bIsConnect( false )
{}
@@ -87,7 +87,7 @@ struct ImplBaseLinkData
ClientType.nCntntType = SotClipboardFormatId::NONE;
ClientType.bIntrnlLnk = false;
ClientType.nUpdateMode = SfxLinkUpdateMode::NONE;
- DDEType.pItem = NULL;
+ DDEType.pItem = nullptr;
}
};
@@ -596,7 +596,7 @@ DdeData* ImplDdeItem::Get( SotClipboardFormatId nFormat )
}
aSeq.realloc( 0 );
bIsValidData = false;
- return 0;
+ return nullptr;
}
diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx
index 05130baef28a..6e035830dd2d 100644
--- a/sfx2/source/appl/macroloader.cxx
+++ b/sfx2/source/appl/macroloader.cxx
@@ -80,11 +80,11 @@ css::uno::Sequence<OUString> SAL_CALL SfxMacroLoader::getSupportedServiceNames()
SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
{
- SfxObjectShell* pDocShell = NULL;
+ SfxObjectShell* pDocShell = nullptr;
Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY );
if ( xFrame.is() )
{
- SfxFrame* pFrame=0;
+ SfxFrame* pFrame=nullptr;
for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) )
{
if ( pFrame->GetFrameInterface() == xFrame )
@@ -209,14 +209,14 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, css::uno::Any& rRetval,
sal_Int32 nHashPos = aMacro.indexOf( '/', 8 );
sal_Int32 nArgsPos = aMacro.indexOf( '(' );
BasicManager *pAppMgr = SfxApplication::GetBasicManager();
- BasicManager *pBasMgr = 0;
+ BasicManager *pBasMgr = nullptr;
ErrCode nErr = ERRCODE_NONE;
// should a macro function be executed ( no direct API call)?
if ( -1 != nHashPos && ( -1 == nArgsPos || nHashPos < nArgsPos ) )
{
// find BasicManager
- SfxObjectShell* pDoc = NULL;
+ SfxObjectShell* pDoc = nullptr;
OUString aBasMgrName( INetURLObject::decode(aMacro.copy( 8, nHashPos-8 ), INetURLObject::DECODE_WITH_CHARSET) );
if ( aBasMgrName.isEmpty() )
pBasMgr = pAppMgr;
@@ -266,8 +266,8 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, css::uno::Any& rRetval,
if ( pBasMgr->HasMacro( aQualifiedMethod ) )
{
Any aOldThisComponent;
- const bool bSetDocMacroMode = ( pDoc != NULL ) && bIsDocBasic;
- const bool bSetGlobalThisComponent = ( pDoc != NULL ) && bIsAppBasic;
+ const bool bSetDocMacroMode = ( pDoc != nullptr ) && bIsDocBasic;
+ const bool bSetGlobalThisComponent = ( pDoc != nullptr ) && bIsAppBasic;
if ( bSetDocMacroMode )
{
// mark document: it executes an own macro, so it's in a modal mode
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index b0fbd49f777e..e226227ef448 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -78,7 +78,7 @@ public:
}
};
-static SfxModuleArr_Impl* pModules=0;
+static SfxModuleArr_Impl* pModules=nullptr;
class SfxModule_Impl
{
@@ -98,7 +98,7 @@ public:
};
SfxModule_Impl::SfxModule_Impl()
- : pSlotPool(0), pTbxCtrlFac(0), pStbCtrlFac(0), pMenuCtrlFac(0), pFactArr(0), pImgListSmall(0), pImgListBig(0)
+ : pSlotPool(nullptr), pTbxCtrlFac(nullptr), pStbCtrlFac(nullptr), pMenuCtrlFac(nullptr), pFactArr(nullptr), pImgListSmall(nullptr), pImgListBig(nullptr)
{
}
@@ -143,7 +143,7 @@ ResMgr* SfxModule::GetResMgr()
SfxModule::SfxModule( ResMgr* pMgrP, bool bDummyP,
SfxObjectFactory* pFactoryP, ... )
- : pResMgr( pMgrP ), bDummy( bDummyP ), pImpl(0L)
+ : pResMgr( pMgrP ), bDummy( bDummyP ), pImpl(nullptr)
{
Construct_Impl();
va_list pVarArgs;
@@ -165,12 +165,12 @@ void SfxModule::Construct_Impl()
pImpl = new SfxModule_Impl;
pImpl->pSlotPool = new SfxSlotPool(&pApp->GetAppSlotPool_Impl());
- pImpl->pTbxCtrlFac=0;
- pImpl->pStbCtrlFac=0;
- pImpl->pMenuCtrlFac=0;
- pImpl->pFactArr=0;
- pImpl->pImgListSmall=0;
- pImpl->pImgListBig=0;
+ pImpl->pTbxCtrlFac=nullptr;
+ pImpl->pStbCtrlFac=nullptr;
+ pImpl->pMenuCtrlFac=nullptr;
+ pImpl->pFactArr=nullptr;
+ pImpl->pImgListSmall=nullptr;
+ pImpl->pImgListBig=nullptr;
SetPool( &pApp->GetPool() );
}
@@ -353,7 +353,7 @@ void SfxModule::DestroyModules_Impl()
SfxModule* pMod = rModules[nPos];
delete pMod;
}
- delete pModules, pModules = 0;
+ delete pModules, pModules = nullptr;
}
}
@@ -379,10 +379,10 @@ SfxModule* SfxModule::GetActiveModule( SfxViewFrame* pFrame )
{
if ( !pFrame )
pFrame = SfxViewFrame::Current();
- SfxObjectShell* pSh = 0;
+ SfxObjectShell* pSh = nullptr;
if( pFrame )
pSh = pFrame->GetObjectShell();
- return pSh ? pSh->GetModule() : 0;
+ return pSh ? pSh->GetModule() : nullptr;
}
FieldUnit SfxModule::GetModuleFieldUnit( css::uno::Reference< css::frame::XFrame > const & i_frame )
@@ -391,17 +391,17 @@ FieldUnit SfxModule::GetModuleFieldUnit( css::uno::Reference< css::frame::XFrame
// find SfxViewFrame for the given XFrame
SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst();
- while ( pViewFrame != NULL )
+ while ( pViewFrame != nullptr )
{
if ( pViewFrame->GetFrame().GetFrameInterface() == i_frame )
break;
pViewFrame = SfxViewFrame::GetNext( *pViewFrame );
}
- ENSURE_OR_RETURN( pViewFrame != NULL, "SfxModule::GetModuleFieldUnit: unable to find an SfxViewFrame for the given XFrame", FUNIT_100TH_MM );
+ ENSURE_OR_RETURN( pViewFrame != nullptr, "SfxModule::GetModuleFieldUnit: unable to find an SfxViewFrame for the given XFrame", FUNIT_100TH_MM );
// find the module
SfxModule const * pModule = GetActiveModule( pViewFrame );
- ENSURE_OR_RETURN( pModule != NULL, "SfxModule::GetModuleFieldUnit: no SfxModule for the given frame!", FUNIT_100TH_MM );
+ ENSURE_OR_RETURN( pModule != nullptr, "SfxModule::GetModuleFieldUnit: no SfxModule for the given frame!", FUNIT_100TH_MM );
return pModule->GetFieldUnit();
}
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index f916c92dc364..d6eabd4ea63a 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -332,7 +332,7 @@ void ContentListBox_Impl::InitRoot()
OUString aURL = aRow.getToken( 0, '\t', nIdx );
sal_Unicode cFolder = aRow.getToken( 0, '\t', nIdx )[0];
bool bIsFolder = ( '1' == cFolder );
- SvTreeListEntry* pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, NULL, true );
+ SvTreeListEntry* pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, nullptr, true );
if ( bIsFolder )
pEntry->SetUserData( new ContentEntry_Impl( aURL, true ) );
}
@@ -373,7 +373,7 @@ void ContentListBox_Impl::RequestingChildren( SvTreeListEntry* pParent )
OUString aURL = aRow.getToken( 0, '\t', nIdx );
sal_Unicode cFolder = aRow.getToken( 0, '\t', nIdx )[0];
bool bIsFolder = ( '1' == cFolder );
- SvTreeListEntry* pEntry = NULL;
+ SvTreeListEntry* pEntry = nullptr;
if ( bIsFolder )
{
pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, pParent, true );
@@ -405,7 +405,7 @@ bool ContentListBox_Impl::Notify( NotifyEvent& rNEvt )
if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT &&
KEY_RETURN == rNEvt.GetKeyEvent()->GetKeyCode().GetCode() )
{
- GetDoubleClickHdl().Call( NULL );
+ GetDoubleClickHdl().Call( nullptr );
bHandled = true;
}
@@ -887,7 +887,7 @@ bool SearchBox_Impl::PreNotify( NotifyEvent& rNEvt )
rNEvt.GetType() == MouseNotifyEvent::KEYINPUT &&
KEY_RETURN == rNEvt.GetKeyEvent()->GetKeyCode().GetCode() )
{
- aSearchLink.Call( NULL );
+ aSearchLink.Call( nullptr );
bHandled = true;
}
return bHandled || ComboBox::PreNotify( rNEvt );
@@ -898,7 +898,7 @@ bool SearchBox_Impl::PreNotify( NotifyEvent& rNEvt )
void SearchBox_Impl::Select()
{
if ( !IsTravelSelect() )
- aSearchLink.Call( NULL );
+ aSearchLink.Call( nullptr );
}
// class SearchResultsBox_Impl -------------------------------------------
@@ -1042,7 +1042,7 @@ void SearchTabPage_Impl::RememberSearchText( const OUString& rSearchText )
IMPL_LINK_NOARG_TYPED(SearchTabPage_Impl, ClickHdl, Button*, void)
{
- SearchHdl(NULL);
+ SearchHdl(nullptr);
}
IMPL_LINK_NOARG_TYPED(SearchTabPage_Impl, SearchHdl, LinkParamNone*, void)
@@ -1135,12 +1135,12 @@ bool SearchTabPage_Impl::OpenKeyword( const OUString& rKeyword )
{
bool bRet = false;
m_pSearchED->SetText( rKeyword );
- SearchHdl( NULL );
+ SearchHdl( nullptr );
if ( m_pResultsLB->GetEntryCount() > 0 )
{
// found keyword -> open it
m_pResultsLB->SelectEntryPos(0);
- OpenHdl( NULL );
+ OpenHdl( nullptr );
bRet = true;
}
@@ -1439,10 +1439,10 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl* _pParent)
: Window(_pParent, 0)
, aIndexKeywordLink(LINK(this, SfxHelpIndexWindow_Impl, KeywordHdl))
, pParentWin(_pParent)
- , pCPage(NULL)
- , pIPage(NULL)
- , pSPage(NULL)
- , pBPage(NULL)
+ , pCPage(nullptr)
+ , pIPage(nullptr)
+ , pSPage(nullptr)
+ , pBPage(nullptr)
, bWasCursorLeftOrRight(false)
, bIsInitDone(false)
{
@@ -1531,7 +1531,7 @@ void SfxHelpIndexWindow_Impl::SetActiveFactory()
if ( !bIsInitDone && !m_pActiveLB->GetEntryCount() )
{
aIdle.Stop();
- InitHdl( NULL );
+ InitHdl( nullptr );
}
for ( sal_Int32 i = 0; i < m_pActiveLB->GetEntryCount(); ++i )
@@ -1543,7 +1543,7 @@ void SfxHelpIndexWindow_Impl::SetActiveFactory()
if ( m_pActiveLB->GetSelectEntryPos() != i )
{
m_pActiveLB->SelectEntryPos(i);
- aSelectFactoryLink.Call( NULL );
+ aSelectFactoryLink.Call( nullptr );
}
break;
}
@@ -1555,7 +1555,7 @@ void SfxHelpIndexWindow_Impl::SetActiveFactory()
HelpTabPage_Impl* SfxHelpIndexWindow_Impl::GetCurrentPage( sal_uInt16& rCurId )
{
rCurId = m_pTabCtrl->GetCurPageId();
- HelpTabPage_Impl* pPage = NULL;
+ HelpTabPage_Impl* pPage = nullptr;
OString sName(m_pTabCtrl->GetPageName(rCurId));
@@ -1901,7 +1901,7 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) :
aOnStartupText ( SfxResId( RID_HELP_ONSTARTUP_TEXT ).toString() ),
pHelpWin ( pParent ),
pTextWin ( VclPtr<TextWin_Impl>::Create( this ) ),
- pSrchDlg ( NULL ),
+ pSrchDlg ( nullptr ),
nMinPos ( 0 ),
bIsDebug ( false ),
bIsIndexOn ( false ),
@@ -2261,7 +2261,7 @@ IMPL_LINK_TYPED( SfxHelpTextWindow_Impl, FindHdl, sfx2::SearchDialog&, rDlg, voi
}
void SfxHelpTextWindow_Impl::FindHdl(sfx2::SearchDialog* pDlg)
{
- bool bWrapAround = ( NULL == pDlg );
+ bool bWrapAround = ( nullptr == pDlg );
if ( bWrapAround )
pDlg = pSrchDlg;
DBG_ASSERT( pDlg, "invalid search dialog" );
@@ -2319,7 +2319,7 @@ void SfxHelpTextWindow_Impl::FindHdl(sfx2::SearchDialog* pDlg)
xTVCrsr->gotoRange( xText->getEnd(), sal_False );
else
xTVCrsr->gotoRange( xText->getStart(), sal_False );
- FindHdl( NULL );
+ FindHdl( nullptr );
}
}
}
@@ -2745,7 +2745,7 @@ void SfxHelpWindow_Impl::MakeLayout()
if ( aRect.Width > 0 && aRect.Height > 0 )
{
- Rectangle aScreenRect = pScreenWin->GetClientWindowExtentsRelative( NULL );
+ Rectangle aScreenRect = pScreenWin->GetClientWindowExtentsRelative( nullptr );
Point aNewPos = aScreenRect.TopLeft();
sal_Int32 nDiffWidth = nOldWidth - nWidth;
aNewPos.X() += nDiffWidth;
@@ -2856,7 +2856,7 @@ void SfxHelpWindow_Impl::SaveConfig()
aUserData += OUString::number( nH );
vcl::Window* pScreenWin = VCLUnoHelper::GetWindow( xWindow );
- aWinPos = pScreenWin->GetWindowExtentsRelative( NULL ).TopLeft();
+ aWinPos = pScreenWin->GetWindowExtentsRelative( nullptr ).TopLeft();
aUserData += ";";
aUserData += OUString::number( aWinPos.X() );
aUserData += ";";
@@ -3016,8 +3016,8 @@ SfxHelpWindow_Impl::SfxHelpWindow_Impl(
SplitWindow( pParent, WB_3DLOOK | WB_NOSPLITDRAW ),
xFrame ( rFrame ),
- pIndexWin ( NULL ),
- pTextWin ( NULL ),
+ pIndexWin ( nullptr ),
+ pTextWin ( nullptr ),
pHelpInterceptor ( new HelpInterceptor_Impl() ),
pHelpListener ( new HelpListener_Impl( pHelpInterceptor ) ),
nExpandWidth ( 0 ),
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 5495437c89e1..7d46fbd3c4d9 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -217,7 +217,7 @@ OUString SfxHelp_Impl::GetHelpText( const OUString& aCommandURL, const OUString&
SfxHelp::SfxHelp() :
bIsDebug( false ),
- pImp ( NULL )
+ pImp ( nullptr )
{
// read the environment variable "HELP_DEBUG"
// if it's set, you will see debug output on active help
@@ -398,7 +398,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame2 >& rHelpTask ,
xDesktop->findFrame( "OFFICE_HELP_TASK", FrameSearchFlag::TASKS | FrameSearchFlag::CREATE),
UNO_QUERY);
if (!xHelpTask.is())
- return 0;
+ return nullptr;
// create all internal windows and sub frames ...
Reference< css::awt::XWindow > xParentWindow = xHelpTask->getContainerWindow();
@@ -430,7 +430,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame2 >& rHelpTask ,
if (!xHelpContent.is())
{
pHelpWindow.disposeAndClear();
- return NULL;
+ return nullptr;
}
xHelpContent->setName("OFFICE_HELP");
@@ -456,7 +456,7 @@ OUString SfxHelp::GetHelpText( const OUString& aCommandURL, const vcl::Window* p
aNewHelpId = pParent->GetHelpId();
sHelpText = SfxHelp_Impl::GetHelpText( OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8), sModuleName );
if (!sHelpText.isEmpty())
- pParent = NULL;
+ pParent = nullptr;
else
pParent = pParent->GetParent();
}
@@ -494,7 +494,7 @@ static bool impl_hasHelpInstalled( const OUString &rLang = OUString() )
bool SfxHelp::SearchKeyword( const OUString& rKeyword )
{
- return Start_Impl( OUString(), NULL, rKeyword );
+ return Start_Impl( OUString(), nullptr, rKeyword );
}
bool SfxHelp::Start( const OUString& rURL, const vcl::Window* pWindow )
@@ -587,9 +587,9 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const
//that for help
bTriedTabPage = true;
Dialog *pDialog = static_cast<Dialog*>(pParent);
- TabControl *pCtrl = pDialog->hasBuilder() ? pDialog->get<TabControl>("tabcontrol") : NULL;
- TabPage* pTabPage = pCtrl ? pCtrl->GetTabPage(pCtrl->GetCurPageId()) : NULL;
- vcl::Window *pTabChild = pTabPage ? pTabPage->GetWindow(GetWindowType::FirstChild) : NULL;
+ TabControl *pCtrl = pDialog->hasBuilder() ? pDialog->get<TabControl>("tabcontrol") : nullptr;
+ TabPage* pTabPage = pCtrl ? pCtrl->GetTabPage(pCtrl->GetCurPageId()) : nullptr;
+ vcl::Window *pTabChild = pTabPage ? pTabPage->GetWindow(GetWindowType::FirstChild) : nullptr;
if (pTabChild)
pParent = pTabChild;
}
@@ -622,7 +622,7 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const
"OFFICE_HELP",
FrameSearchFlag::CHILDREN);
- SfxHelpWindow_Impl* pHelpWindow = 0;
+ SfxHelpWindow_Impl* pHelpWindow = nullptr;
if (!xHelp.is())
pHelpWindow = impl_createHelp(xHelp, xHelpContent);
else
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 412ae047ab49..e78fad714138 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -108,7 +108,7 @@ void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, cons
aTipHelpText = aSystemPath;
aAccessibleName += aSystemPath;
- oslFileError nError = osl_abbreviateSystemPath( aSystemPath.pData, &aCompactedSystemPath.pData, 46, NULL );
+ oslFileError nError = osl_abbreviateSystemPath( aSystemPath.pData, &aCompactedSystemPath.pData, 46, nullptr );
if ( !nError )
aPickEntry.append( aCompactedSystemPath );
else
@@ -157,7 +157,7 @@ SfxPickList::PickListEntry* SfxPickList::GetPickListEntry( sal_uInt32 nIndex )
if ( nIndex < m_aPicklistVector.size() )
return m_aPicklistVector[ nIndex ];
else
- return 0;
+ return nullptr;
}
void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index d77ad1d3b5eb..5cb144c5c2cf 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -121,7 +121,7 @@ css::uno::Sequence<OUString> SAL_CALL ShutdownIcon::getSupportedServiceNames()
}
bool ShutdownIcon::bModalMode = false;
-ShutdownIcon* ShutdownIcon::pShutdownIcon = NULL;
+ShutdownIcon* ShutdownIcon::pShutdownIcon = nullptr;
#if !defined( ENABLE_QUICKSTART_APPLET )
// To remove conditionals
@@ -152,8 +152,8 @@ bool LoadModule()
loaded = true;
# else // UNX
osl::Module plugin;
- oslGenericFunction pTmpInit = NULL;
- oslGenericFunction pTmpDeInit = NULL;
+ oslGenericFunction pTmpInit = nullptr;
+ oslGenericFunction pTmpDeInit = nullptr;
if ( plugin.loadRelative( &thisModule, "libqstart_gtklo.so" ) )
{
pTmpInit = plugin.getFunctionSymbol( "plugin_init_sys_tray" );
@@ -203,11 +203,11 @@ void ShutdownIcon::deInitSystray()
pDeInitSystray();
m_bVeto = false;
- pInitSystray = 0;
- pDeInitSystray = 0;
+ pInitSystray = nullptr;
+ pDeInitSystray = nullptr;
delete m_pFileDlg;
- m_pFileDlg = NULL;
+ m_pFileDlg = nullptr;
m_bInitialized = false;
}
@@ -217,8 +217,8 @@ ShutdownIcon::ShutdownIcon( const css::uno::Reference< XComponentContext > & rxC
m_bVeto ( false ),
m_bListenForTermination ( false ),
m_bSystemDialogs( false ),
- m_pResMgr( NULL ),
- m_pFileDlg( NULL ),
+ m_pResMgr( nullptr ),
+ m_pFileDlg( nullptr ),
m_xContext( rxContext ),
m_bInitialized( false )
{
@@ -353,7 +353,7 @@ void ShutdownIcon::StartFileDialog()
// Destroy instance as changing the system file dialog setting
// forces us to create a new FileDialogHelper instance!
delete m_pFileDlg;
- m_pFileDlg = NULL;
+ m_pFileDlg = nullptr;
}
if ( !m_pFileDlg )
@@ -390,7 +390,7 @@ IMPL_LINK_TYPED( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, /*unused
Sequence< PropertyValue > aArgs(3);
css::uno::Reference < css::task::XInteractionHandler2 > xInteraction(
- task::InteractionHandler::createWithParent(::comphelper::getProcessComponentContext(), 0) );
+ task::InteractionHandler::createWithParent(::comphelper::getProcessComponentContext(), nullptr) );
aArgs[0].Name = "InteractionHandler";
aArgs[0].Value <<= xInteraction;
@@ -547,7 +547,7 @@ void ShutdownIcon::terminateDesktop()
Application::Quit();
// remove the instance pointer
- ShutdownIcon::pShutdownIcon = 0;
+ ShutdownIcon::pShutdownIcon = nullptr;
}
@@ -565,7 +565,7 @@ ShutdownIcon* ShutdownIcon::createInstance()
if (pShutdownIcon)
return pShutdownIcon;
- ShutdownIcon *pIcon = NULL;
+ ShutdownIcon *pIcon = nullptr;
try {
pIcon = new ShutdownIcon( comphelper::getProcessComponentContext() );
pIcon->init ();
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index 4f877ab666f4..986326f83e93 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -56,11 +56,11 @@ void SAL_DLLPUBLIC_EXPORT plugin_shutdown_sys_tray();
static ResMgr *pVCLResMgr;
static GtkStatusIcon* pTrayIcon;
-static GtkWidget *pExitMenuItem = NULL;
-static GtkWidget *pOpenMenuItem = NULL;
-static GtkWidget *pDisableMenuItem = NULL;
+static GtkWidget *pExitMenuItem = nullptr;
+static GtkWidget *pOpenMenuItem = nullptr;
+static GtkWidget *pDisableMenuItem = nullptr;
#ifdef ENABLE_GIO
-GFileMonitor* pMonitor = NULL;
+GFileMonitor* pMonitor = nullptr;
#endif
static void open_url_cb( GtkWidget *, gpointer data )
@@ -210,19 +210,19 @@ static void populate_menu( GtkWidget *pMenu )
SvtModuleOptions aModuleOptions;
if ( aModuleOptions.IsWriter() )
- add_item (pMenuShell, WRITER_URL, NULL,
+ add_item (pMenuShell, WRITER_URL, nullptr,
SV_ICON_ID_TEXT, G_CALLBACK( open_url_cb ));
if ( aModuleOptions.IsCalc() )
- add_item (pMenuShell, CALC_URL, NULL,
+ add_item (pMenuShell, CALC_URL, nullptr,
SV_ICON_ID_SPREADSHEET, G_CALLBACK( open_url_cb ));
if ( aModuleOptions.IsImpress() )
- add_item (pMenuShell, IMPRESS_URL, NULL,
+ add_item (pMenuShell, IMPRESS_URL, nullptr,
SV_ICON_ID_PRESENTATION, G_CALLBACK( open_url_cb ));
if ( aModuleOptions.IsDraw() )
- add_item (pMenuShell, DRAW_URL, NULL,
+ add_item (pMenuShell, DRAW_URL, nullptr,
SV_ICON_ID_DRAWING, G_CALLBACK( open_url_cb ));
if ( aModuleOptions.IsDataBase() )
@@ -230,7 +230,7 @@ static void populate_menu( GtkWidget *pMenu )
SV_ICON_ID_DATABASE, G_CALLBACK( open_url_cb ));
if ( aModuleOptions.IsMath() )
- add_item (pMenuShell, MATH_URL, NULL,
+ add_item (pMenuShell, MATH_URL, nullptr,
SV_ICON_ID_FORMULA, G_CALLBACK( open_url_cb ));
OUString aULabel = pShutdownIcon->GetResString( STR_QUICKSTART_FROMTEMPLATE );
@@ -286,7 +286,7 @@ static gboolean display_menu_cb( GtkWidget *,
refresh_menu( pMenu );
- gtk_menu_popup( GTK_MENU( pMenu ), NULL, NULL,
+ gtk_menu_popup( GTK_MENU( pMenu ), nullptr, nullptr,
gtk_status_icon_position_menu, pTrayIcon,
0, event->time );
@@ -354,14 +354,14 @@ void plugin_init_sys_tray()
ShutdownIcon::addTerminateListener();
#ifdef ENABLE_GIO
- GFile* pFile = NULL;
+ GFile* pFile = nullptr;
OUString sLibraryFileUrl;
if (osl::Module::getUrlFromAddress(plugin_init_sys_tray, sLibraryFileUrl))
pFile = g_file_new_for_uri(OUStringToOString(sLibraryFileUrl, RTL_TEXTENCODING_UTF8).getStr());
if (pFile)
{
- if ((pMonitor = g_file_monitor_file(pFile, G_FILE_MONITOR_NONE, NULL, NULL)))
+ if ((pMonitor = g_file_monitor_file(pFile, G_FILE_MONITOR_NONE, nullptr, nullptr)))
g_signal_connect(pMonitor, "changed", reinterpret_cast<GCallback>(notify_file_changed), NULL);
g_object_unref(pFile);
}
@@ -381,16 +381,16 @@ void plugin_shutdown_sys_tray()
reinterpret_cast<gpointer>(&notify_file_changed), pMonitor);
g_file_monitor_cancel(pMonitor);
g_object_unref(pMonitor);
- pMonitor = NULL;
+ pMonitor = nullptr;
}
#endif
g_object_unref(pTrayIcon);
- pTrayIcon = NULL;
+ pTrayIcon = nullptr;
- pExitMenuItem = NULL;
- pOpenMenuItem = NULL;
- pDisableMenuItem = NULL;
+ pExitMenuItem = nullptr;
+ pOpenMenuItem = nullptr;
+ pDisableMenuItem = nullptr;
}
#endif // ENABLE_QUICKSTART_APPLET
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index baae2c1c6c6e..e1e7e1cd08fc 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -232,7 +232,7 @@ throw( css::uno::RuntimeException, std::exception )
SolarMutexGuard aGuard;
// reset member
- m_pWrkWin = 0;
+ m_pWrkWin = nullptr;
css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame.get(), css::uno::UNO_QUERY );
if ( xFrame.is() )
@@ -277,7 +277,7 @@ void SAL_CALL LayoutManagerListener::disposing(
throw( css::uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- m_pWrkWin = 0;
+ m_pWrkWin = nullptr;
m_bHasFrame = false;
m_xFrame.clear();
}
@@ -483,7 +483,7 @@ SfxFrameWorkWin_Impl::SfxFrameWorkWin_Impl( vcl::Window *pWin, SfxFrame *pFrm, S
: SfxWorkWindow(
pWin,
pFrm->GetCurrentViewFrame()->GetBindings(),
- pFrm->GetParentFrame() ? pFrm->GetParentFrame()->GetWorkWindow_Impl() : NULL )
+ pFrm->GetParentFrame() ? pFrm->GetParentFrame()->GetWorkWindow_Impl() : nullptr )
, pMasterFrame( pMaster )
, pFrame( pFrm )
{
@@ -506,7 +506,7 @@ SfxFrameWorkWin_Impl::SfxFrameWorkWin_Impl( vcl::Window *pWin, SfxFrame *pFrm, S
n == SFX_SPLITWINDOWS_RIGHT ? SfxChildAlignment::RIGHT :
n == SFX_SPLITWINDOWS_TOP ? SfxChildAlignment::TOP :
SfxChildAlignment::BOTTOM );
- VclPtr<SfxSplitWindow> pSplitWin = VclPtr<SfxSplitWindow>::Create(pWorkWin, eAlign, this, pParent==0 );
+ VclPtr<SfxSplitWindow> pSplitWin = VclPtr<SfxSplitWindow>::Create(pWorkWin, eAlign, this, pParent==nullptr );
pSplit[n] = pSplitWin;
}
@@ -521,8 +521,8 @@ SfxWorkWindow::SfxWorkWindow( vcl::Window *pWin, SfxBindings& rB, SfxWorkWindow*
pParent( pParentWorkwin ),
pBindings(&rB),
pWorkWin (pWin),
- pConfigShell( 0 ),
- pActiveChild( 0 ),
+ pConfigShell( nullptr ),
+ pActiveChild( nullptr ),
nUpdateMode(SFX_VISIBILITY_STANDARD),
nChildren( 0 ),
nOrigMode( 0 ),
@@ -632,7 +632,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
// since this window is also destroyed (see below).
if (pCW->pCli)
ReleaseChild_Impl(*pChild->GetWindow());
- pCW->pWin = 0;
+ pCW->pWin = nullptr;
pWorkWin->GetSystemWindow()->GetTaskPaneList()->RemoveWindow( pChild->GetWindow() );
pChild->Destroy();
}
@@ -700,7 +700,7 @@ void SfxFrameWorkWin_Impl::ArrangeChildren_Impl( bool bForce )
if ( pFrame->IsClosing_Impl() || ( m_nLock && !bForce ))
return;
- SfxInPlaceClient *pClient = 0;
+ SfxInPlaceClient *pClient = nullptr;
SfxViewFrame *pF = pFrame->GetCurrentViewFrame();
if ( pF && pF->GetViewShell() )
pClient = pF->GetViewShell()->GetIPClient();
@@ -730,7 +730,7 @@ void SfxFrameWorkWin_Impl::ArrangeChildren_Impl( bool bForce )
pMasterFrame->SetToolSpaceBorderPixel_Impl( aBorder );
- ArrangeAutoHideWindows( NULL );
+ ArrangeAutoHideWindows( nullptr );
}
@@ -926,7 +926,7 @@ SfxChild_Impl* SfxWorkWindow::RegisterChild_Impl( vcl::Window& rWindow,
void SfxWorkWindow::ReleaseChild_Impl( vcl::Window& rWindow )
{
- SfxChild_Impl *pChild = 0;
+ SfxChild_Impl *pChild = nullptr;
sal_uInt16 nPos;
for ( nPos = 0; nPos < aChildren.size(); ++nPos )
{
@@ -960,7 +960,7 @@ SfxChild_Impl* SfxWorkWindow::FindChild_Impl( const vcl::Window& rWindow ) const
return pChild;
}
- return 0;
+ return nullptr;
}
@@ -972,7 +972,7 @@ void SfxWorkWindow::ShowChildren_Impl()
for ( size_t nPos = 0; nPos < aChildren.size(); ++nPos )
{
- SfxChildWin_Impl* pCW = 0;
+ SfxChildWin_Impl* pCW = nullptr;
SfxChild_Impl *pCli = aChildren[nPos];
if ( pCli && pCli->pWin )
@@ -1339,8 +1339,8 @@ bool SfxWorkWindow::AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW
{
// or checking the availability of child windows, we need access to the module
const SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
- const SfxObjectShell* pShell = pViewFrame ? pViewFrame->GetObjectShell() : NULL;
- const SfxModule* pModule = pShell ? pShell->GetModule() : NULL;
+ const SfxObjectShell* pShell = pViewFrame ? pViewFrame->GetObjectShell() : nullptr;
+ const SfxModule* pModule = pShell ? pShell->GetModule() : nullptr;
ENSURE_OR_RETURN( pModule, "SfxWorkWindow::UpdateChildWindows_Impl: did not find an SfxModule to ask for the child win availability!", true );
return pModule->IsChildWindowAvailable( i_rCW.nId, pViewFrame );
}
@@ -1357,7 +1357,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
{
// In the context is an appropriate ChildWindow allowed;
// it is also turned on?
- if ( pChildWin == NULL && pCW->bCreate )
+ if ( pChildWin == nullptr && pCW->bCreate )
{
// Internal docking is only used for embedding into another
// container. We force the floating state of all floatable
@@ -1518,7 +1518,7 @@ void SfxWorkWindow::RemoveChildWin_Impl( SfxChildWin_Impl *pCW )
{
// Child window is a direct child window and must therefore unregister
// itself from the WorkWindow
- pCW->pCli = 0;
+ pCW->pCli = nullptr;
ReleaseChild_Impl(*pChildWin->GetWindow());
}
else
@@ -1528,7 +1528,7 @@ void SfxWorkWindow::RemoveChildWin_Impl( SfxChildWin_Impl *pCW )
}
pWorkWin->GetSystemWindow()->GetTaskPaneList()->RemoveWindow( pChildWin->GetWindow() );
- pCW->pWin = 0;
+ pCW->pWin = nullptr;
pChildWin->Destroy();
GetBindings().Invalidate( nId );
@@ -1622,10 +1622,10 @@ void SfxWorkWindow::HidePopups_Impl(bool bHide, bool bParent, sal_uInt16 nId )
void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
SfxDockingConfig eConfig, sal_uInt16 nId)
{
- SfxDockingWindow* pDockWin=0;
+ SfxDockingWindow* pDockWin=nullptr;
sal_uInt16 nPos = USHRT_MAX;
- vcl::Window *pWin=0;
- SfxChildWin_Impl *pCW = 0;
+ vcl::Window *pWin=nullptr;
+ SfxChildWin_Impl *pCW = nullptr;
if ( eChild == SfxChildIdentifier::OBJECTBAR )
return;
@@ -1671,7 +1671,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( eConfig == SfxDockingConfig::TOGGLEFLOATMODE)
{
// DockingWindow was dragged into a SplitWindow
- pCW->pCli = 0;
+ pCW->pCli = nullptr;
ReleaseChild_Impl(*pDockWin);
}
@@ -1808,7 +1808,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
return;
SfxChildAlignment eAlign = SfxChildAlignment::NOALIGNMENT;
- SfxChild_Impl *pCli = ( nPos != USHRT_MAX ) ? aChildren[nPos] : 0;
+ SfxChild_Impl *pCli = ( nPos != USHRT_MAX ) ? aChildren[nPos] : nullptr;
if ( pCli && pDockWin )
{
eAlign = pDockWin->GetAlignment();
@@ -1854,7 +1854,7 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, bool bEnabled, s
sal_uInt16 nInter = (sal_uInt16) ( lId >> 16 );
sal_uInt16 nId = (sal_uInt16) ( lId & 0xFFFF );
- SfxChildWin_Impl *pCW=NULL;
+ SfxChildWin_Impl *pCW=nullptr;
SfxWorkWindow *pWork = pParent;
// Get the top parent, child windows are always registered at the
@@ -2044,7 +2044,7 @@ bool SfxWorkWindow::HasChildWindow_Impl(sal_uInt16 nId)
bool SfxWorkWindow::IsFloating( sal_uInt16 nId )
{
- SfxChildWin_Impl *pCW=NULL;
+ SfxChildWin_Impl *pCW=nullptr;
SfxWorkWindow *pWork = pParent;
// Get the top parent, child windows are always registered at the
@@ -2102,7 +2102,7 @@ bool SfxWorkWindow::IsFloating( sal_uInt16 nId )
bool SfxWorkWindow::KnowsChildWindow_Impl(sal_uInt16 nId)
{
- SfxChildWin_Impl *pCW=0;
+ SfxChildWin_Impl *pCW=nullptr;
sal_uInt16 nCount = aChildWins.size();
sal_uInt16 n;
for (n=0; n<nCount; n++)
@@ -2128,7 +2128,7 @@ bool SfxWorkWindow::KnowsChildWindow_Impl(sal_uInt16 nId)
void SfxWorkWindow::SetChildWindow_Impl(sal_uInt16 nId, bool bOn, bool bSetFocus)
{
- SfxChildWin_Impl *pCW=NULL;
+ SfxChildWin_Impl *pCW=nullptr;
SfxWorkWindow *pWork = pParent;
// Get the top parent, child windows are always registered at the
@@ -2181,7 +2181,7 @@ void SfxWorkWindow::SetChildWindow_Impl(sal_uInt16 nId, bool bOn, bool bSetFocus
void SfxWorkWindow::ShowChildWindow_Impl(sal_uInt16 nId, bool bVisible, bool bSetFocus)
{
sal_uInt16 nCount = aChildWins.size();
- SfxChildWin_Impl* pCW=0;
+ SfxChildWin_Impl* pCW=nullptr;
sal_uInt16 n;
for (n=0; n<nCount; n++)
{
@@ -2278,7 +2278,7 @@ SfxChildWindow* SfxWorkWindow::GetChildWindow_Impl(sal_uInt16 nId)
return aChildWins[n]->pWin;
else if ( pParent )
return pParent->GetChildWindow_Impl( nId );
- return 0;
+ return nullptr;
}
@@ -2334,8 +2334,8 @@ void SfxWorkWindow::SaveStatus_Impl(SfxChildWindow *pChild, const SfxChildWinInf
void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW)
{
SfxDispatcher *pDisp = pBindings->GetDispatcher_Impl();
- SfxViewFrame *pFrame = pDisp ? pDisp->GetFrame() :0;
- SfxModule *pMod = pFrame ? SfxModule::GetActiveModule(pFrame) :0;
+ SfxViewFrame *pFrame = pDisp ? pDisp->GetFrame() :nullptr;
+ SfxModule *pMod = pFrame ? SfxModule::GetActiveModule(pFrame) :nullptr;
OUString sModule;
if (pFrame)
@@ -2354,7 +2354,7 @@ void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW)
}
}
- SfxChildWinFactory* pFact=0;
+ SfxChildWinFactory* pFact=nullptr;
SfxApplication *pApp = SfxGetpApp();
{
SfxChildWinFactArr_Impl &rFactories = pApp->GetChildWinFactories_Impl();
@@ -2431,7 +2431,7 @@ SfxSplitWindow* SfxWorkWindow::GetSplitWindow_Impl( SfxChildAlignment eAlign )
return pSplit[1];
default:
- return 0;
+ return nullptr;
}
}
diff --git a/sfx2/source/appl/xpackcreator.cxx b/sfx2/source/appl/xpackcreator.cxx
index 139506369909..9e952baf5696 100644
--- a/sfx2/source/appl/xpackcreator.cxx
+++ b/sfx2/source/appl/xpackcreator.cxx
@@ -68,7 +68,7 @@ void SAL_CALL OPackageStructureCreator::convertToPackage( const OUString& aFolde
::ucbhelper::Content aContent;
if( ::ucbhelper::Content::create( aFolderUrl, xComEnv, comphelper::getProcessComponentContext(), aContent ) )
{
- SvStream* pTempStream = NULL;
+ SvStream* pTempStream = nullptr;
OUString aTempURL = ::utl::TempFile().GetURL();
try {
@@ -91,8 +91,8 @@ void SAL_CALL OPackageStructureCreator::convertToPackage( const OUString& aFolde
if ( aStorage->GetError() || aTargetStorage->GetError() || pTempStream->GetError() )
throw io::IOException();
- aTargetStorage = NULL;
- aStorage = NULL;
+ aTargetStorage = nullptr;
+ aStorage = nullptr;
pTempStream->Seek( 0 );
diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx
index c25d239777ec..c36de4977ac5 100644
--- a/sfx2/source/bastyp/bitset.cxx
+++ b/sfx2/source/bastyp/bitset.cxx
@@ -97,7 +97,7 @@ void BitSet::CopyFrom( const BitSet& rSet )
memcpy( pBitmap, rSet.pBitmap, 4 * nBlocks );
}
else
- pBitmap = 0;
+ pBitmap = nullptr;
}
@@ -108,7 +108,7 @@ BitSet::BitSet()
{
nCount = 0;
nBlocks = 0;
- pBitmap = 0;
+ pBitmap = nullptr;
}
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 532502065690..518afe4d6b6e 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -133,7 +133,7 @@ namespace
class theSfxFilterArray : public rtl::Static<SfxFilterArray, theSfxFilterArray > {};
}
-static SfxFilterList_Impl* pFilterArr = 0;
+static SfxFilterList_Impl* pFilterArr = nullptr;
static bool bFirstRead = true;
static void CreateFilterArr()
@@ -210,7 +210,7 @@ const SfxFilter* SfxFilterContainer::GetDefaultFilter_Impl( const OUString& rNam
// could not classify factory by its service nor by its short name.
// Must be an unknown factory! => return NULL
if (eFactory == SvtModuleOptions::EFactory::UNKNOWN_FACTORY)
- return NULL;
+ return nullptr;
// For the following code we need some additional information.
OUString sServiceName = aOpt.GetFactoryName(eFactory);
@@ -227,7 +227,7 @@ const SfxFilter* SfxFilterContainer::GetDefaultFilter_Impl( const OUString& rNam
!pFilter->GetServiceName().equalsIgnoreAsciiCase(sServiceName)
)
{
- pFilter = 0;
+ pFilter = nullptr;
}
// If at least no default filter could be located - use any filter of this
@@ -265,7 +265,7 @@ public:
void Update() const;
explicit SfxFilterMatcher_Impl(const OUString &rName)
: aName(rName)
- , pList(0)
+ , pList(nullptr)
{
}
~SfxFilterMatcher_Impl()
@@ -388,7 +388,7 @@ const SfxFilter* SfxFilterMatcher::GetAnyFilter( SfxFilterFlags nMust, SfxFilter
return pFilter;
}
- return NULL;
+ return nullptr;
}
@@ -411,7 +411,7 @@ sal_uInt32 SfxFilterMatcher::GuessFilterIgnoringContent(
{
}
- *ppFilter = NULL;
+ *ppFilter = nullptr;
if ( !sTypeName.isEmpty() )
{
// make sure filter list is initialized
@@ -462,7 +462,7 @@ sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, c
aDescriptor[utl::MediaDescriptor::PROP_INTERACTIONHANDLER()] <<= rMedium.GetInteractionHandler();
SfxStringItem const * it = static_cast<SfxStringItem const *>(
rMedium.GetItemSet()->GetItem(SID_REFERER));
- if (it != 0) {
+ if (it != nullptr) {
aDescriptor[utl::MediaDescriptor::PROP_REFERRER()]
<<= it->GetValue();
}
@@ -492,7 +492,7 @@ sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, c
if (!sTypeName.isEmpty())
{
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
if (!aFilterName.isEmpty())
// Type detection returned a suitable filter for this. Use it.
pFilter = SfxFilter::GetFilterByName(aFilterName);
@@ -569,13 +569,13 @@ sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter**
if ( pOldFilter )
{
if( !IsFilterInstalled_Impl( pOldFilter ) )
- pOldFilter = 0;
+ pOldFilter = nullptr;
else
{
const SfxStringItem* pSalvageItem = SfxItemSet::GetItem<SfxStringItem>(rMedium.GetItemSet(), SID_DOC_SALVAGE, false);
if ( ( pOldFilter->GetFilterFlags() & SfxFilterFlags::PACKED ) && pSalvageItem )
// Salvage is always done without packing
- pOldFilter = 0;
+ pOldFilter = nullptr;
}
}
@@ -598,7 +598,7 @@ sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter**
if ( !pFilter )
{
- const SfxFilter* pInstallFilter = NULL;
+ const SfxFilter* pInstallFilter = nullptr;
// Now test the filter which are not installed (ErrCode is irrelevant)
GuessFilter( rMedium, &pInstallFilter, SfxFilterFlags::IMPORT, SfxFilterFlags::CONSULTSERVICE );
@@ -679,7 +679,7 @@ const SfxFilter* SfxFilterMatcher::GetFilterForProps( const css::uno::Sequence <
}
}
- return 0;
+ return nullptr;
}
const SfxFilter* SfxFilterMatcher::GetFilter4Mime( const OUString& rMediaType, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
@@ -694,7 +694,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Mime( const OUString& rMediaType, S
return pFilter;
}
- return 0;
+ return nullptr;
}
css::uno::Sequence < css::beans::NamedValue > aSeq { { "MediaType", css::uno::makeAny(rMediaType) } };
@@ -705,7 +705,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4EA( const OUString& rType, SfxFilte
{
if ( m_rImpl.pList )
{
- const SfxFilter* pFirst = 0;
+ const SfxFilter* pFirst = nullptr;
for ( size_t i = 0, n = m_rImpl.pList->size(); i < n; ++i )
{
const SfxFilter* pFilter = (*m_rImpl.pList)[i];
@@ -721,7 +721,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4EA( const OUString& rType, SfxFilte
if (pFirst)
return pFirst;
- return 0;
+ return nullptr;
}
css::uno::Sequence < css::beans::NamedValue > aSeq { { "Name", css::uno::makeAny(rType) } };
@@ -753,7 +753,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Extension( const OUString& rExt, Sf
}
}
- return 0;
+ return nullptr;
}
// Use extension without dot!
@@ -769,7 +769,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Extension( const OUString& rExt, Sf
const SfxFilter* SfxFilterMatcher::GetFilter4ClipBoardId( SotClipboardFormatId nId, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
if (nId == SotClipboardFormatId::NONE)
- return 0;
+ return nullptr;
css::uno::Sequence < css::beans::NamedValue > aSeq
{ { "ClipboardFormat", css::uno::makeAny(SotExchange::GetFormatName( nId )) } };
@@ -779,7 +779,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4ClipBoardId( SotClipboardFormatId n
const SfxFilter* SfxFilterMatcher::GetFilter4UIName( const OUString& rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
m_rImpl.InitForIterating();
- const SfxFilter* pFirstFilter=0;
+ const SfxFilter* pFirstFilter=nullptr;
for ( size_t i = 0, n = m_rImpl.pList->size(); i < n; ++i )
{
const SfxFilter* pFilter = (*m_rImpl.pList)[i];
@@ -848,7 +848,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const OUString& rName,
return pFilter;
}
- return NULL;
+ return nullptr;
}
IMPL_LINK_TYPED( SfxFilterMatcher, MaybeFileHdl_Impl, OUString*, pString, bool )
@@ -881,14 +881,14 @@ SfxFilterMatcherIter::SfxFilterMatcherIter(
const SfxFilter* SfxFilterMatcherIter::Find_Impl()
{
- const SfxFilter* pFilter = 0;
+ const SfxFilter* pFilter = nullptr;
while( nCurrent < m_rMatch.pList->size() )
{
pFilter = (*m_rMatch.pList)[nCurrent++];
SfxFilterFlags nFlags = pFilter->GetFilterFlags();
if( ((nFlags & nOrMask) == nOrMask ) && !(nFlags & nAndMask ) )
break;
- pFilter = 0;
+ pFilter = nullptr;
}
return pFilter;
@@ -1091,7 +1091,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
sFilterName = sFilterName.copy( nStartRealName+2 );
}
- SfxFilter* pFilter = bUpdate ? const_cast<SfxFilter*>(SfxFilter::GetFilterByName( sFilterName )) : 0;
+ SfxFilter* pFilter = bUpdate ? const_cast<SfxFilter*>(SfxFilter::GetFilterByName( sFilterName )) : nullptr;
bool bNew = false;
if (!pFilter)
{
diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx
index c667f1948492..779f26ebd922 100644
--- a/sfx2/source/bastyp/frmhtml.cxx
+++ b/sfx2/source/bastyp/frmhtml.cxx
@@ -43,7 +43,7 @@ static HTMLOptionEnum const aScollingTable[] =
{ sHTML_SC_yes, ScrollingYes },
{ sHTML_SC_no, ScrollingNo },
{ sHTML_SC_auto, ScrollingAuto },
- { 0, 0 }
+ { nullptr, 0 }
};
void SfxFrameHTMLParser::ParseFrameOptions(
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index 323574084e5b..967631000c37 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -164,7 +164,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
// created
::util::DateTime uDT = i_xDocProps->getCreationDate();
OUStringBuffer aBuffer;
- ::sax::Converter::convertTimeOrDateTime(aBuffer, uDT, 0);
+ ::sax::Converter::convertTimeOrDateTime(aBuffer, uDT, nullptr);
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_created, aBuffer.makeStringAndClear(), false,
eDestEnc, pNonConvertableChars );
@@ -177,7 +177,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
// changed
uDT = i_xDocProps->getModificationDate();
- ::sax::Converter::convertTimeOrDateTime(aBuffer, uDT, 0);
+ ::sax::Converter::convertTimeOrDateTime(aBuffer, uDT, nullptr);
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changed, aBuffer.makeStringAndClear(), false,
eDestEnc, pNonConvertableChars );
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 98b3d4a17530..fb48980d4a7e 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -131,7 +131,7 @@ std::vector< OUString > SfxContentHelper::GetHelpTreeViewContents( const OUStrin
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
uno::Reference< task::XInteractionHandler > xInteractionHandler(
- task::InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
+ task::InteractionHandler::createWithParent(xContext, nullptr), uno::UNO_QUERY_THROW );
::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ), comphelper::getProcessComponentContext() );
uno::Reference< sdbc::XResultSet > xResultSet;
@@ -197,7 +197,7 @@ OUString SfxContentHelper::GetActiveHelpString( const OUString& rURL )
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
uno::Reference< task::XInteractionHandler > xInteractionHandler(
- task::InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
+ task::InteractionHandler::createWithParent(xContext, nullptr), uno::UNO_QUERY_THROW );
::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ), comphelper::getProcessComponentContext() );
// open the "active help" stream
uno::Reference< io::XInputStream > xStream = aCnt.openStream();
diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
index 8fcc660e7618..cbbb348ba2bc 100644
--- a/sfx2/source/bastyp/mieclip.cxx
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -34,7 +34,7 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
{
bool bRet = false;
if( pStrm )
- delete pStrm, pStrm = 0;
+ delete pStrm, pStrm = nullptr;
OString sLine, sVersion;
sal_Int32 nStt = -1, nEnd = -1, nFragStart = -1, nFragEnd = -1;
@@ -98,7 +98,7 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
}
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 148f7aeffd3c..343d191eb722 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -75,7 +75,7 @@ struct SfxProgress_Impl
void SfxProgress_Impl::Enable_Impl( bool bEnable )
{
- SfxObjectShell* pDoc = bAllDocs ? NULL : static_cast<SfxObjectShell*>(xObjSh);
+ SfxObjectShell* pDoc = bAllDocs ? nullptr : static_cast<SfxObjectShell*>(xObjSh);
SfxViewFrame *pFrame= SfxViewFrame::GetFirst(pDoc);
while ( pFrame )
{
@@ -105,9 +105,9 @@ SfxProgress_Impl::SfxProgress_Impl( const OUString &/*rTitle*/ )
, bWaitMode(false)
, bAllowRescheduling(false)
, bRunning(false)
- , pActiveProgress(0)
- , pWorkWin(0)
- , pView(0)
+ , pActiveProgress(nullptr)
+ , pWorkWin(nullptr)
+ , pView(nullptr)
{
}
@@ -157,8 +157,8 @@ SfxProgress::SfxProgress
"SfxProgress: created for '" << rText << "' at " << pImp->nCreate
<< "ds");
pImp->bAllDocs = bAll;
- pImp->pWorkWin = 0;
- pImp->pView = 0;
+ pImp->pWorkWin = nullptr;
+ pImp->pView = nullptr;
pImp->pActiveProgress = GetActiveProgress( pObjSh );
if ( pObjSh )
@@ -198,7 +198,7 @@ void SfxProgress::Stop()
if( pImp->pActiveProgress )
{
if ( pImp->xObjSh.Is() && pImp->xObjSh->GetProgress() == this )
- pImp->xObjSh->SetProgress_Impl(0);
+ pImp->xObjSh->SetProgress_Impl(nullptr);
return;
}
@@ -210,9 +210,9 @@ void SfxProgress::Stop()
Suspend();
if ( pImp->xObjSh.Is() )
- pImp->xObjSh->SetProgress_Impl(0);
+ pImp->xObjSh->SetProgress_Impl(nullptr);
else
- SfxGetpApp()->SetProgress_Impl(0);
+ SfxGetpApp()->SetProgress_Impl(nullptr);
if ( pImp->bLocked )
pImp->Enable_Impl(true);
}
@@ -302,7 +302,7 @@ bool SfxProgress::SetState
if ( pImp->xStatusInd.is() )
{
pImp->xStatusInd->start( pImp->aText, pImp->nMax );
- pImp->pView = NULL;
+ pImp->pView = nullptr;
}
}
@@ -477,9 +477,9 @@ SfxProgress* SfxProgress::GetActiveProgress
{
if ( !SfxApplication::Get() )
- return 0;
+ return nullptr;
- SfxProgress *pProgress = 0;
+ SfxProgress *pProgress = nullptr;
if ( pDocSh )
pProgress = pDocSh->GetProgress();
if ( !pProgress )
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 266a23d0b8a9..6d3c57479e25 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -59,14 +59,14 @@ static HTMLOptionEnum const aAreaShapeOptEnums[] =
{ OOO_STRING_SVTOOLS_HTML_SH_circle, IMAP_OBJ_CIRCLE },
{ OOO_STRING_SVTOOLS_HTML_SH_poly, IMAP_OBJ_POLYGON },
{ OOO_STRING_SVTOOLS_HTML_SH_polygon, IMAP_OBJ_POLYGON },
- { 0, 0 }
+ { nullptr, 0 }
};
SfxHTMLParser::SfxHTMLParser( SvStream& rStream, bool bIsNewDoc,
SfxMedium *pMed )
: HTMLParser(rStream, bIsNewDoc)
, pMedium(pMed)
- , pDLMedium(0)
+ , pDLMedium(nullptr)
, eScriptType(STARBASIC)
{
DBG_ASSERT( RTL_TEXTENCODING_UTF8 == GetSrcEncoding( ),
@@ -258,7 +258,7 @@ bool SfxHTMLParser::FinishFileDownload( OUString& rStr )
}
delete pDLMedium;
- pDLMedium = 0;
+ pDLMedium = nullptr;
return bOK;
}
diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx
index 69de5b748131..efe4e88dd0cd 100644
--- a/sfx2/source/bastyp/sfxresid.cxx
+++ b/sfx2/source/bastyp/sfxresid.cxx
@@ -23,7 +23,7 @@
-static ResMgr* pMgr=NULL;
+static ResMgr* pMgr=nullptr;
SfxResId::SfxResId( sal_uInt16 nId ) :
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 517e1f37560f..247ee3c17841 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -256,7 +256,7 @@ void SfxEventConfiguration::ConfigureEvent( const OUString& aName, const SvxMacr
std::unique_ptr<SvxMacro> pMacro;
if ( rMacro.HasMacro() )
pMacro.reset( new SvxMacro( rMacro.GetMacName(), rMacro.GetLibName(), rMacro.GetScriptType() ) );
- PropagateEvent_Impl( pDoc ? pDoc : 0, aName, pMacro.get() );
+ PropagateEvent_Impl( pDoc ? pDoc : nullptr, aName, pMacro.get() );
}
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 3f788bf8183f..39f85b12653f 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -231,7 +231,7 @@ public:
SfxBindings::SfxBindings()
: pImp(new SfxBindings_Impl),
- pDispatcher(0),
+ pDispatcher(nullptr),
nRegLevel(1) // first becomes 0, when the Dispatcher is set
{
pImp->nMsgPos = 0;
@@ -246,10 +246,10 @@ SfxBindings::SfxBindings()
pImp->bFirstRound = false;
pImp->bInNextJob = false;
pImp->bInUpdate = false;
- pImp->pSubBindings = NULL;
- pImp->pSuperBindings = NULL;
- pImp->pWorkWin = NULL;
- pImp->pUnoCtrlArr = NULL;
+ pImp->pSubBindings = nullptr;
+ pImp->pSuperBindings = nullptr;
+ pImp->pWorkWin = nullptr;
+ pImp->pUnoCtrlArr = nullptr;
pImp->nOwnRegLevel = nRegLevel;
// all caches are valid (no pending invalidate-job)
@@ -276,7 +276,7 @@ SfxBindings::~SfxBindings()
{
// The SubBindings should not be locked!
- pImp->pSubBindings = NULL;
+ pImp->pSubBindings = nullptr;
ENTERREGISTRATIONS();
@@ -410,8 +410,8 @@ void SfxBindings::Update_Impl
// gather together all with the same status method which are dirty
SfxDispatcher &rDispat = *pDispatcher;
- const SfxSlot *pRealSlot = 0;
- const SfxSlotServer* pMsgServer = 0;
+ const SfxSlot *pRealSlot = nullptr;
+ const SfxSlotServer* pMsgServer = nullptr;
SfxFoundCacheArr_Impl aFound;
SfxItemSet *pSet = CreateSet_Impl( pCache, pRealSlot, &pMsgServer, aFound );
bool bUpdated = false;
@@ -427,7 +427,7 @@ void SfxBindings::Update_Impl
{
const SfxFoundCache_Impl& rFound = aFound[nPos];
sal_uInt16 nWhich = rFound.nWhichId;
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
SfxItemState eState = pSet->GetItemState(nWhich, true, &pItem);
if ( eState == SfxItemState::DEFAULT && SfxItemPool::IsWhich(nWhich) )
pItem = &pSet->Get(nWhich);
@@ -447,7 +447,7 @@ void SfxBindings::Update_Impl
SfxFoundCache_Impl aFoundCache(
pCache->GetId(), 0,
pRealSlot, pCache );
- UpdateControllers_Impl( 0, aFoundCache, 0, SfxItemState::DISABLED);
+ UpdateControllers_Impl( nullptr, aFoundCache, nullptr, SfxItemState::DISABLED);
}
}
@@ -478,7 +478,7 @@ void SfxBindings::Update
sal_uInt16 nId // the bound and up-to-date Slot-Id
)
{
- DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
if ( pDispatcher )
pDispatcher->Flush();
@@ -502,13 +502,13 @@ void SfxBindings::Update
if( pCache->GetDispatch().is() && pCache->GetItemLink() )
{
pCache->SetCachedState(true);
- bInternalUpdate = ( pCache->GetInternalController() != 0 );
+ bInternalUpdate = ( pCache->GetInternalController() != nullptr );
}
if ( bInternalUpdate )
{
// Query Status
- const SfxSlotServer* pMsgServer = pDispatcher ? pCache->GetSlotServer(*pDispatcher, pImp->xProv) : NULL;
+ const SfxSlotServer* pMsgServer = pDispatcher ? pCache->GetSlotServer(*pDispatcher, pImp->xProv) : nullptr;
if ( !pCache->IsControllerDirty() &&
( !pMsgServer ||
!pMsgServer->GetSlot()->IsMode(SfxSlotMode::VOLATILE) ) )
@@ -519,7 +519,7 @@ void SfxBindings::Update
}
if (!pMsgServer)
{
- pCache->SetState(SfxItemState::DISABLED, 0);
+ pCache->SetState(SfxItemState::DISABLED, nullptr);
pImp->bInUpdate = false;
InvalidateSlotsInMap_Impl();
return;
@@ -540,7 +540,7 @@ void SfxBindings::Update
void SfxBindings::Update()
{
- DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
if ( pImp->pSubBindings )
pImp->pSubBindings->Update();
@@ -553,7 +553,7 @@ void SfxBindings::Update()
pImp->bInUpdate = true;
pDispatcher->Flush();
pDispatcher->Update_Impl();
- while ( !NextJob_Impl(0) )
+ while ( !NextJob_Impl(nullptr) )
; // loop
pImp->bInUpdate = false;
InvalidateSlotsInMap_Impl();
@@ -653,7 +653,7 @@ SfxStateCache* SfxBindings::GetStateCache
sal_uInt16 nId /* Slot-Id, which SfxStatusCache is to be found */
)
{
- return GetStateCache(nId, 0);
+ return GetStateCache(nId, nullptr);
}
SfxStateCache* SfxBindings::GetStateCache
@@ -665,7 +665,7 @@ SfxStateCache* SfxBindings::GetStateCache
or where it was inserted. */
)
{
- DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
// is the specified function bound?
const sal_uInt16 nStart = ( pPos ? *pPos : 0 );
const sal_uInt16 nPos = GetSlotPos( nId, nStart );
@@ -677,7 +677,7 @@ SfxStateCache* SfxBindings::GetStateCache
*pPos = nPos;
return (*pImp->pCaches)[nPos];
}
- return 0;
+ return nullptr;
}
@@ -902,15 +902,15 @@ void SfxBindings::Invalidate
bool SfxBindings::IsBound( sal_uInt16 nSlotId, sal_uInt16 nStartSearchAt )
{
- DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
- return GetStateCache(nSlotId, &nStartSearchAt ) != 0;
+ DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
+ return GetStateCache(nSlotId, &nStartSearchAt ) != nullptr;
}
sal_uInt16 SfxBindings::GetSlotPos( sal_uInt16 nId, sal_uInt16 nStartSearchAt )
{
- DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
// answer immediately if a function-seek comes repeated
if ( pImp->nCachedFunc1 < pImp->pCaches->size() &&
@@ -1022,14 +1022,14 @@ void SfxBindings::Register_Impl( SfxControllerItem& rItem, bool bInternal )
void SfxBindings::Release( SfxControllerItem& rItem )
{
- DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
DBG_ASSERT( !pImp->bInNextJob, "SfxBindings::Release while status-updating" );
ENTERREGISTRATIONS();
// find the bound function
sal_uInt16 nId = rItem.GetId();
sal_uInt16 nPos = GetSlotPos(nId);
- SfxStateCache* pCache = (nPos < pImp->pCaches->size()) ? (*pImp->pCaches)[nPos] : 0;
+ SfxStateCache* pCache = (nPos < pImp->pCaches->size()) ? (*pImp->pCaches)[nPos] : nullptr;
if ( pCache && pCache->GetId() == nId )
{
if ( pCache->GetInternalController() == &rItem )
@@ -1055,7 +1055,7 @@ void SfxBindings::Release( SfxControllerItem& rItem )
}
// was this the last controller?
- if ( pCache->GetItemLink() == 0 && !pCache->GetInternalController() )
+ if ( pCache->GetItemLink() == nullptr && !pCache->GetInternalController() )
{
pImp->bCtrlReleased = true;
}
@@ -1068,10 +1068,10 @@ void SfxBindings::Release( SfxControllerItem& rItem )
const SfxPoolItem* SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi,
const SfxPoolItem **ppInternalArgs )
{
- DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
if( !nId || !pDispatcher )
- return NULL;
+ return nullptr;
return Execute_Impl( nId, ppItems, nModi, SfxCallMode::SYNCHRON, ppInternalArgs );
}
@@ -1079,13 +1079,13 @@ const SfxPoolItem* SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolIt
bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi, SfxCallMode nCallMode,
const SfxPoolItem **ppInternalArgs )
{
- DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
if( !nId || !pDispatcher )
return false;
const SfxPoolItem* pRet = Execute_Impl( nId, ppItems, nModi, nCallMode, ppInternalArgs );
- return ( pRet != 0 );
+ return ( pRet != nullptr );
}
const SfxPoolItem* SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi, SfxCallMode nCallMode,
@@ -1139,13 +1139,13 @@ const SfxPoolItem* SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem*
if ( pImp->bMsgDirty )
UpdateSlotServer_Impl();
- SfxShell *pShell=0;
- const SfxSlot *pSlot=0;
+ SfxShell *pShell=nullptr;
+ const SfxSlot *pSlot=nullptr;
const SfxSlotServer* pServer = pCache->GetSlotServer( rDispatcher, pImp->xProv );
if ( !pServer )
{
- return NULL;
+ return nullptr;
}
else
{
@@ -1155,7 +1155,7 @@ const SfxPoolItem* SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem*
if ( bGlobalOnly )
if ( dynamic_cast< const SfxModule *>( pShell ) == nullptr && dynamic_cast< const SfxApplication *>( pShell ) == nullptr && dynamic_cast< const SfxViewFrame *>( pShell ) == nullptr )
- return NULL;
+ return nullptr;
SfxItemPool &rPool = pShell->GetPool();
SfxRequest aReq( nId, nCallMode, rPool );
@@ -1286,7 +1286,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
void SfxBindings::UpdateSlotServer_Impl()
{
- DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
// synchronize
pDispatcher->Flush();
@@ -1324,27 +1324,27 @@ SfxItemSet* SfxBindings::CreateSet_Impl
SfxFoundCacheArr_Impl& rFound // out: List of Caches for Siblings
)
{
- DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
DBG_ASSERT( !pImp->bMsgDirty, "CreateSet_Impl with dirty MessageServer" );
assert(pDispatcher);
const SfxSlotServer* pMsgSvr = pCache->GetSlotServer(*pDispatcher, pImp->xProv);
if (!pMsgSvr)
- return 0;
+ return nullptr;
- pRealSlot = 0;
+ pRealSlot = nullptr;
*pMsgServer = pMsgSvr;
sal_uInt16 nShellLevel = pMsgSvr->GetShellLevel();
SfxShell *pShell = pDispatcher->GetShell( nShellLevel );
if ( !pShell ) // rare GPF when browsing through update from Inet-Notify
- return 0;
+ return nullptr;
SfxItemPool &rPool = pShell->GetPool();
// get the status method, which is served by the pCache
- SfxStateFunc pFnc = 0;
+ SfxStateFunc pFnc = nullptr;
const SfxInterface *pInterface = pShell->GetInterface();
if ( SFX_KIND_ENUM == pMsgSvr->GetSlot()->GetKind() )
{
@@ -1372,7 +1372,7 @@ SfxItemSet* SfxBindings::CreateSet_Impl
// the Slots ODF a interfaces ar linked in a circle
while ( pSibling > pRealSlot )
{
- SfxStateFunc pSiblingFnc=0;
+ SfxStateFunc pSiblingFnc=nullptr;
SfxStateCache *pSiblingCache =
GetStateCache( pSibling->GetSlotId(), &nCachePos );
@@ -1481,17 +1481,17 @@ void SfxBindings::UpdateControllers_Impl
pCache->SetState( SfxItemState::UNKNOWN, &aVoid );
}
else if ( SfxItemState::DISABLED == eState )
- pCache->SetState(SfxItemState::DISABLED, 0);
+ pCache->SetState(SfxItemState::DISABLED, nullptr);
else
pCache->SetState(SfxItemState::DEFAULT, pItem);
}
// Update the slots for so far available and bound Controllers for
// Slave-Slots (Enum-value)
- DBG_ASSERT( !pSlot || 0 == pSlot->GetLinkedSlot() || !pItem ||
+ DBG_ASSERT( !pSlot || nullptr == pSlot->GetLinkedSlot() || !pItem ||
dynamic_cast< const SfxEnumItemInterface *>( pItem ) != nullptr,
"master slot with non-enum-type found" );
- const SfxSlot *pFirstSlave = pSlot ? pSlot->GetLinkedSlot() : 0;
+ const SfxSlot *pFirstSlave = pSlot ? pSlot->GetLinkedSlot() : nullptr;
if ( pIF && pFirstSlave)
{
// Items cast on EnumItem
@@ -1529,7 +1529,7 @@ void SfxBindings::UpdateControllers_Impl
if ( SfxItemState::DISABLED == eState || (pEnumItem && !pEnumItem->IsEnabled( pSlave->GetSlotId())) )
{
// disabled
- pEnumCache->SetState(SfxItemState::DISABLED, 0);
+ pEnumCache->SetState(SfxItemState::DISABLED, nullptr);
}
else if ( SfxItemState::DEFAULT == eState && pEnumItem )
{
@@ -1566,7 +1566,7 @@ bool SfxBindings::NextJob_Impl(Timer * pTimer)
#endif
const unsigned MAX_INPUT_DELAY = 200;
- DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" );
if ( Application::GetLastInputInterval() < MAX_INPUT_DELAY && pTimer )
{
@@ -1580,7 +1580,7 @@ bool SfxBindings::NextJob_Impl(Timer * pTimer)
pDispatcher->Update_Impl();
// modifying the SfxObjectInterface-stack without SfxBindings => nothing to do
- SfxViewFrame* pFrame = pDispatcher ? pDispatcher->GetFrame() : NULL;
+ SfxViewFrame* pFrame = pDispatcher ? pDispatcher->GetFrame() : nullptr;
if ( (pFrame && !pFrame->GetObjectShell()->AcceptStateUpdate()) || pSfxApp->IsDowning() || pImp->pCaches->empty() )
{
return true;
@@ -1762,7 +1762,7 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int
SfxStateCache *pCache = (*pImp->pCaches)[nCache-1];
// No interested Controller present
- if ( pCache->GetItemLink() == 0 && !pCache->GetInternalController() )
+ if ( pCache->GetItemLink() == nullptr && !pCache->GetInternalController() )
{
// Remove Cache. Safety: first remove and then delete
pImp->pCaches->erase(pImp->pCaches->begin() + nCache - 1);
@@ -1804,7 +1804,7 @@ void SfxBindings::SetDispatcher( SfxDispatcher *pDisp )
while ( pBind )
{
if ( pBind->pImp->pSubBindings == this && pBind->pDispatcher != pDisp )
- pBind->SetSubBindings_Impl( NULL );
+ pBind->SetSubBindings_Impl( nullptr );
pBind = pBind->pImp->pSubBindings;
}
}
@@ -1878,7 +1878,7 @@ void SfxBindings::StartUpdate_Impl( bool bComplete )
NextJob_Impl(&pImp->aTimer);
else
// Update all slots in a row
- NextJob_Impl(0);
+ NextJob_Impl(nullptr);
}
@@ -1909,7 +1909,7 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState )
if ( xDisp.is() )
{
css::uno::Reference< css::lang::XUnoTunnel > xTunnel( xDisp, css::uno::UNO_QUERY );
- SfxOfficeDispatch* pDisp = NULL;
+ SfxOfficeDispatch* pDisp = nullptr;
if ( xTunnel.is() )
{
sal_Int64 nImplementation = xTunnel->getSomething(SfxOfficeDispatch::impl_getStaticIdentifier());
@@ -1927,7 +1927,7 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState )
}
SfxItemState eState = SfxItemState::SET;
- SfxPoolItem *pItem=NULL;
+ SfxPoolItem *pItem=nullptr;
BindDispatch_Impl *pBind = new BindDispatch_Impl( xDisp, aURL, pCache, pSlot );
pBind->acquire();
xDisp->addStatusListener( pBind, aURL );
@@ -1981,7 +1981,7 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState )
// Then test at the dispatcher to check if the returned items from
// there are always DELETE_ON_IDLE, a copy of it has to be made in
// order to allow for transition of ownership.
- const SfxPoolItem *pItem = NULL;
+ const SfxPoolItem *pItem = nullptr;
SfxItemState eState = pDispatcher->QueryState( nSlot, pItem );
if ( eState == SfxItemState::SET )
{
@@ -2002,7 +2002,7 @@ void SfxBindings::SetSubBindings_Impl( SfxBindings *pSub )
if ( pImp->pSubBindings )
{
pImp->pSubBindings->SetDispatchProvider_Impl( css::uno::Reference< css::frame::XDispatchProvider > () );
- pImp->pSubBindings->pImp->pSuperBindings = NULL;
+ pImp->pSubBindings->pImp->pSuperBindings = nullptr;
}
pImp->pSubBindings = pSub;
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index 7881fc8d34d2..9f2b6040824c 100644
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -50,7 +50,7 @@ void SfxControllerItem::CheckConfigure_Impl( SfxSlotMode nType )
SfxControllerItem* SfxControllerItem::GetItemLink()
{
- return pNext == this ? 0 : pNext;
+ return pNext == this ? nullptr : pNext;
}
@@ -74,7 +74,7 @@ void SfxControllerItem::Bind( sal_uInt16 nNewId, SfxBindings *pBindinx )
}
nId = nNewId;
- pNext = 0;
+ pNext = nullptr;
if (pBindinx)
pBindings = pBindinx;
@@ -91,7 +91,7 @@ void SfxControllerItem::BindInternal_Impl( sal_uInt16 nNewId, SfxBindings *pBind
}
nId = nNewId;
- pNext = 0;
+ pNext = nullptr;
if (pBindinx)
pBindings = pBindinx;
@@ -183,7 +183,7 @@ SfxControllerItem* SfxControllerItem::ChangeItemLink( SfxControllerItem* pNewLin
{
SfxControllerItem* pOldLink = pNext;
pNext = pNewLink;
- return pOldLink == this ? 0 : pOldLink;
+ return pOldLink == this ? nullptr : pOldLink;
}
@@ -202,7 +202,7 @@ void SfxControllerItem::SetId( sal_uInt16 nItemId )
SfxControllerItem::SfxControllerItem():
nId(0),
pNext(this),
- pBindings(0)
+ pBindings(nullptr)
{
}
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 5490e7429fe4..d61b0cdf2c8f 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -92,7 +92,7 @@ struct SfxObjectBars_Impl
sal_uInt16 nMode; // special visibility flags
SfxInterface* pIFace;
- SfxObjectBars_Impl() : nResId(0), nMode(0), pIFace(NULL) {}
+ SfxObjectBars_Impl() : nResId(0), nMode(0), pIFace(nullptr) {}
};
struct SfxDispatcher_Impl
@@ -306,21 +306,21 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent )
xImp.reset(new SfxDispatcher_Impl);
xImp->bFlushed = true;
- xImp->pCachedServ1 = 0;
- xImp->pCachedServ2 = 0;
+ xImp->pCachedServ1 = nullptr;
+ xImp->pCachedServ2 = nullptr;
xImp->bFlushing = false;
xImp->bUpdated = false;
xImp->bLocked = false;
xImp->bActive = false;
- xImp->pParent = NULL;
+ xImp->pParent = nullptr;
xImp->bNoUI = false;
xImp->bReadOnly = false;
xImp->bQuiet = false;
xImp->bModal = false;
- xImp->pInCallAliveFlag = 0;
+ xImp->pInCallAliveFlag = nullptr;
xImp->nFilterEnabling = SfxSlotFilterState::DISABLED;
xImp->nFilterCount = 0;
- xImp->pFilterSIDs = 0;
+ xImp->pFilterSIDs = nullptr;
xImp->nDisableFlags = 0;
xImp->pParent = pParent;
@@ -341,7 +341,7 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent )
SfxDispatcher::SfxDispatcher( SfxDispatcher* pParent )
{
Construct_Impl( pParent );
- xImp->pFrame = 0;
+ xImp->pFrame = nullptr;
}
/** The constructor of the SfxDispatcher class places a stack of empty
@@ -355,10 +355,10 @@ SfxDispatcher::SfxDispatcher(SfxViewFrame *pViewFrame)
if ( pFrame )
Construct_Impl( pFrame->GetDispatcher() );
else
- Construct_Impl( 0 );
+ Construct_Impl( nullptr );
}
else
- Construct_Impl( 0 );
+ Construct_Impl( nullptr );
xImp->pFrame = pViewFrame;
}
@@ -395,7 +395,7 @@ SfxDispatcher::~SfxDispatcher()
while ( pBindings )
{
if ( pBindings->GetDispatcher_Impl() == this)
- pBindings->SetDispatcher(0);
+ pBindings->SetDispatcher(nullptr);
pBindings = pBindings->GetSubBindings_Impl();
}
}
@@ -523,7 +523,7 @@ bool SfxDispatcher::CheckVirtualStack(const SfxShell& rShell, bool bDeep)
aStack.push_back(i->pCluster);
else
{
- SfxShell* pPopped(NULL);
+ SfxShell* pPopped(nullptr);
do
{
DBG_ASSERT( !aStack.empty(), "popping from empty stack" );
@@ -588,7 +588,7 @@ SfxShell *SfxDispatcher::GetShell(sal_uInt16 nIdx) const
return *(xImp->aStack.rbegin() + nIdx);
else if ( xImp->pParent )
return xImp->pParent->GetShell( nIdx - nShellCount );
- return 0;
+ return nullptr;
}
/** This method returns a pointer to the <SfxBinding> Instance on which the
@@ -604,7 +604,7 @@ SfxBindings* SfxDispatcher::GetBindings() const
if ( xImp->pFrame )
return &xImp->pFrame->GetBindings();
else
- return NULL;
+ return nullptr;
}
/** Returns a pointer to the <SfxViewFrame> instance, which belongs to
@@ -795,10 +795,10 @@ bool SfxDispatcher::GetShellAndSlot_Impl(sal_uInt16 nSlot, SfxShell** ppShell,
*ppShell = GetShell(aSvr.GetShellLevel());
*ppSlot = aSvr.GetSlot();
- if ( 0 == (*ppSlot)->GetExecFnc() && bRealSlot )
+ if ( nullptr == (*ppSlot)->GetExecFnc() && bRealSlot )
*ppSlot = (*ppShell)->GetInterface()->GetRealSlot(*ppSlot);
// Check only real slots as enum slots don't have an execute function!
- if ( bRealSlot && ((0 == *ppSlot) || (0 == (*ppSlot)->GetExecFnc()) ))
+ if ( bRealSlot && ((nullptr == *ppSlot) || (nullptr == (*ppSlot)->GetExecFnc()) ))
return false;
return true;
@@ -887,17 +887,17 @@ const SfxSlot* SfxDispatcher::GetSlot( const OUString& rCommand )
return pSlot;
}
- return 0;
+ return nullptr;
}
const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode nCall,
SfxItemSet* pArgs, SfxItemSet* pInternalArgs, sal_uInt16 nModi)
{
if ( IsLocked(nSlot) )
- return 0;
+ return nullptr;
- SfxShell *pShell = 0;
- const SfxSlot *pSlot = 0;
+ SfxShell *pShell = nullptr;
+ const SfxSlot *pSlot = nullptr;
if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false,
SfxCallMode::MODAL==(nCall&SfxCallMode::MODAL) ) )
{
@@ -918,7 +918,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode nCall,
_Execute( *pShell, *pSlot, aReq, nCall );
return aReq.GetReturnValue();
}
- return 0;
+ return nullptr;
}
/** Method to execute a <SfxSlot>s over the Slot-Id.
@@ -939,10 +939,10 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
const SfxPoolItem **pArgs, sal_uInt16 nModi, const SfxPoolItem **pInternalArgs)
{
if ( IsLocked(nSlot) )
- return 0;
+ return nullptr;
- SfxShell *pShell = 0;
- const SfxSlot *pSlot = 0;
+ SfxShell *pShell = nullptr;
+ const SfxSlot *pSlot = nullptr;
if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false,
SfxCallMode::MODAL==(eCall&SfxCallMode::MODAL) ) )
{
@@ -968,7 +968,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
const SfxPoolItem* pRet = pReq->GetReturnValue();
delete pReq; return pRet;
}
- return 0;
+ return nullptr;
}
/** Method to execute a <SfxSlot>s over the Slot-Id.
@@ -994,10 +994,10 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
sal_uInt16 nModi, const SfxItemSet &rArgs)
{
if ( IsLocked(nSlot) )
- return 0;
+ return nullptr;
- SfxShell *pShell = 0;
- const SfxSlot *pSlot = 0;
+ SfxShell *pShell = nullptr;
+ const SfxSlot *pSlot = nullptr;
if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false,
SfxCallMode::MODAL==(eCall&SfxCallMode::MODAL) ) )
{
@@ -1012,7 +1012,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
_Execute( *pShell, *pSlot, aReq, eCall );
return aReq.GetReturnValue();
}
- return 0;
+ return nullptr;
}
/** Method to execute a <SfxSlot>s over the Slot-Id.
@@ -1046,10 +1046,10 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
const SfxPoolItem* pArg1, ...)
{
if ( IsLocked(nSlot) )
- return 0;
+ return nullptr;
- SfxShell *pShell = 0;
- const SfxSlot *pSlot = 0;
+ SfxShell *pShell = nullptr;
+ const SfxSlot *pSlot = nullptr;
if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false,
SfxCallMode::MODAL==(eCall&SfxCallMode::MODAL) ) )
{
@@ -1067,7 +1067,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
_Execute( *pShell, *pSlot, aReq, eCall );
return aReq.GetReturnValue();
}
- return 0;
+ return nullptr;
}
/** Helper method to receive the asynchronously executed <SfxRequest>s.
@@ -1168,7 +1168,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
if ( !bUpdate || xImp->pFrame->GetFrame().IsClosing_Impl() )
return;
- SfxViewFrame* pTop = xImp->pFrame ? xImp->pFrame->GetTopViewFrame() : NULL;
+ SfxViewFrame* pTop = xImp->pFrame ? xImp->pFrame->GetTopViewFrame() : nullptr;
bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this && !comphelper::LibreOfficeKit::isActive();
if ( !bUIActive && pTop && GetBindings() == &pTop->GetBindings() )
@@ -1200,7 +1200,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
xLayoutManager->lock();
bool bIsIPActive = xImp->pFrame && xImp->pFrame->GetObjectShell()->IsInPlaceActive();
- SfxInPlaceClient *pClient = xImp->pFrame ? xImp->pFrame->GetViewShell()->GetUIActiveClient() : NULL;
+ SfxInPlaceClient *pClient = xImp->pFrame ? xImp->pFrame->GetViewShell()->GetUIActiveClient() : nullptr;
if ( bUIActive && /* !bIsIPActive && */ ( !pClient || !pClient->IsObjectUIActive() ) )
SetMenu_Impl();
@@ -1272,7 +1272,7 @@ void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne
return;
sal_uInt32 nStatBarId=0;
- SfxShell *pStatusBarShell = NULL;
+ SfxShell *pStatusBarShell = nullptr;
SfxSlotPool* pSlotPool = &SfxSlotPool::GetSlotPool( GetFrame() );
sal_uInt16 nTotCount = xImp->aStack.size();
@@ -1451,7 +1451,7 @@ void SfxDispatcher::FlushImpl()
else
{
// Actually pop
- SfxShell* pPopped = 0;
+ SfxShell* pPopped = nullptr;
bool bFound = false;
do
{
@@ -1475,8 +1475,8 @@ void SfxDispatcher::FlushImpl()
{
if ( bModify )
{
- xImp->pCachedServ1 = 0;
- xImp->pCachedServ2 = 0;
+ xImp->pCachedServ1 = nullptr;
+ xImp->pCachedServ2 = nullptr;
}
InvalidateBindings_Impl( bModify );
@@ -1591,7 +1591,7 @@ void SfxDispatcher::SetSlotFilter(SfxSlotFilterState nEnable,
#endif
if ( xImp->pFilterSIDs )
- xImp->pFilterSIDs = 0;
+ xImp->pFilterSIDs = nullptr;
xImp->nFilterEnabling = nEnable;
xImp->nFilterCount = nCount;
@@ -1621,7 +1621,7 @@ SfxSlotFilterState SfxDispatcher::IsSlotEnabledByFilter_Impl( sal_uInt16 nSID )
return SfxSlotFilterState::ENABLED;
// search
- bool bFound = 0 != bsearch( &nSID, xImp->pFilterSIDs, xImp->nFilterCount,
+ bool bFound = nullptr != bsearch( &nSID, xImp->pFilterSIDs, xImp->nFilterCount,
sizeof(sal_uInt16), SfxCompareSIDs_Impl );
// even if ReadOnlyDoc
@@ -1682,7 +1682,7 @@ bool SfxDispatcher::_FindServer(sal_uInt16 nSlot, SfxSlotServer& rServer, bool b
for ( sal_uInt16 nShell = 0;; ++nShell )
{
SfxShell *pSh = GetShell(nShell);
- if ( pSh == NULL )
+ if ( pSh == nullptr )
return false;
if ( dynamic_cast< const SfxViewShell *>( pSh ) != nullptr )
{
@@ -1761,7 +1761,7 @@ bool SfxDispatcher::_FindServer(sal_uInt16 nSlot, SfxSlotServer& rServer, bool b
// Shell and Slot match
if ( !( ( bIsContainerSlot && bIsContainerShell ) ||
( !bIsContainerSlot && bIsServerShell ) ) )
- pSlot = 0;
+ pSlot = nullptr;
}
if ( pSlot )
@@ -1866,7 +1866,7 @@ SfxPopupMenuManager* SfxDispatcher::Popup( sal_uInt16 nConfigId, vcl::Window *pW
return SfxPopupMenuManager::Popup( rResId, rDisp.GetFrame(), pPos ? *pPos : pWindow->GetPointerPosPixel(), pWindow );
}
}
- return 0;
+ return nullptr;
}
void SfxDispatcher::ExecutePopup( sal_uInt16 nConfigId, vcl::Window *pWin, const Point *pPos )
@@ -1980,8 +1980,8 @@ void SfxDispatcher::SetQuietMode_Impl( bool bOn )
SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSlot, const SfxPoolItem* &rpState )
{
- SfxShell *pShell = 0;
- const SfxSlot *pSlot = 0;
+ SfxShell *pShell = nullptr;
+ const SfxSlot *pSlot = nullptr;
if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false, false ) )
{
rpState = pShell->GetSlotState(nSlot);
@@ -1996,11 +1996,11 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSlot, const SfxPoolItem* &rp
SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, css::uno::Any& rAny )
{
- SfxShell *pShell = 0;
- const SfxSlot *pSlot = 0;
+ SfxShell *pShell = nullptr;
+ const SfxSlot *pSlot = nullptr;
if ( GetShellAndSlot_Impl( nSID, &pShell, &pSlot, false, false ) )
{
- const SfxPoolItem* pItem( 0 );
+ const SfxPoolItem* pItem( nullptr );
pItem = pShell->GetSlotState( nSID );
if ( !pItem )
@@ -2061,8 +2061,8 @@ void SfxDispatcher::RemoveShell_Impl( SfxShell& rShell )
if ( !SfxGetpApp()->IsDowning() )
{
xImp->bUpdated = false;
- xImp->pCachedServ1 = 0;
- xImp->pCachedServ2 = 0;
+ xImp->pCachedServ1 = nullptr;
+ xImp->pCachedServ2 = nullptr;
InvalidateBindings_Impl(true);
}
}
@@ -2115,8 +2115,8 @@ SfxModule* SfxDispatcher::GetModule() const
for ( sal_uInt16 nShell = 0;; ++nShell )
{
SfxShell *pSh = GetShell(nShell);
- if ( pSh == NULL )
- return 0;
+ if ( pSh == nullptr )
+ return nullptr;
if ( dynamic_cast< const SfxModule *>( pSh ) != nullptr )
return static_cast<SfxModule*>(pSh);
}
diff --git a/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx
index 5e0672dda805..590b3bb1c4cb 100644
--- a/sfx2/source/control/msg.cxx
+++ b/sfx2/source/control/msg.cxx
@@ -27,7 +27,7 @@ SfxSlotKind SfxSlot::GetKind() const
{
if( !nMasterSlotId && !nValue)
return (SfxSlotKind) SFX_KIND_STANDARD;
- if ( nMasterSlotId && fnExec==0 && fnState==0 )
+ if ( nMasterSlotId && fnExec==nullptr && fnState==nullptr )
{
if ( pType->Type() == TYPE(SfxBoolItem) )
return (SfxSlotKind) SFX_KIND_ENUM;
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index f3ca3d9f67ce..41524a8ad6d3 100644
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -34,9 +34,9 @@
#include <sfx2/sfx.hrc>
SfxSlotPool::SfxSlotPool(SfxSlotPool *pParent)
- : _pGroups(0)
+ : _pGroups(nullptr)
, _pParentPool( pParent )
- , _pInterfaces(0)
+ , _pInterfaces(nullptr)
, _nCurGroup(0)
, _nCurInterface(0)
, _nCurMsg(0)
@@ -45,7 +45,7 @@ SfxSlotPool::SfxSlotPool(SfxSlotPool *pParent)
SfxSlotPool::~SfxSlotPool()
{
- _pParentPool = 0;
+ _pParentPool = nullptr;
for ( SfxInterface *pIF = FirstInterface(); pIF; pIF = FirstInterface() )
delete pIF;
delete _pInterfaces;
@@ -58,7 +58,7 @@ SfxSlotPool::~SfxSlotPool()
void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
{
// add to the list of SfxObjectInterface instances
- if ( _pInterfaces == NULL )
+ if ( _pInterfaces == nullptr )
_pInterfaces = new SfxInterfaceArr_Impl;
_pInterfaces->push_back(&rInterface);
@@ -98,7 +98,7 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
TypeId SfxSlotPool::GetSlotType( sal_uInt16 nId ) const
{
const SfxSlot* pSlot = (const_cast <SfxSlotPool*> (this))->GetSlot( nId );
- return pSlot ? pSlot->GetType()->Type() : 0;
+ return pSlot ? pSlot->GetType()->Type() : nullptr;
}
@@ -122,7 +122,7 @@ const SfxSlot* SfxSlotPool::GetSlot( sal_uInt16 nId )
{
SAL_WARN_IF(!_pInterfaces, "sfx.control", "no Interfaces registered");
if (!_pInterfaces)
- return 0;
+ return nullptr;
// First, search their own interfaces
for ( size_t nInterf = 0; nInterf < _pInterfaces->size(); ++nInterf )
@@ -133,7 +133,7 @@ const SfxSlot* SfxSlotPool::GetSlot( sal_uInt16 nId )
}
// Then try any of the possible existing parent
- return _pParentPool ? _pParentPool->GetSlot( nId ) : 0;
+ return _pParentPool ? _pParentPool->GetSlot( nId ) : nullptr;
}
@@ -197,7 +197,7 @@ const SfxSlot* SfxSlotPool::SeekSlot( sal_uInt16 nStartInterface )
{
SAL_WARN_IF(!_pInterfaces, "sfx.control", "no Interfaces registered");
if (!_pInterfaces)
- return 0;
+ return nullptr;
// The numbering starts at the interfaces of the parent pool
sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->size() : 0;
@@ -232,7 +232,7 @@ const SfxSlot* SfxSlotPool::SeekSlot( sal_uInt16 nStartInterface )
}
}
- return 0;
+ return nullptr;
}
@@ -242,7 +242,7 @@ const SfxSlot* SfxSlotPool::NextSlot()
{
SAL_WARN_IF(!_pInterfaces, "sfx.control", "no Interfaces registered");
if (!_pInterfaces)
- return 0;
+ return nullptr;
// The numbering starts at the interfaces of the parent pool
sal_uInt16 nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->size() : 0;
@@ -265,7 +265,7 @@ const SfxSlot* SfxSlotPool::NextSlot()
sal_uInt16 nInterface = _nCurInterface - nFirstInterface;
// possibly we are already at the end
if ( nInterface >= _pInterfaces->size() )
- return 0;
+ return nullptr;
// look for further matching func-defs within the same Interface
SfxInterface* pInterface = (*_pInterfaces)[nInterface];
@@ -288,7 +288,7 @@ SfxInterface* SfxSlotPool::FirstInterface()
{
_nCurInterface = 0;
if ( !_pInterfaces || !_pInterfaces->size() )
- return 0;
+ return nullptr;
return _pParentPool ? _pParentPool->FirstInterface() : (*_pInterfaces)[0];
}
@@ -297,7 +297,7 @@ SfxInterface* SfxSlotPool::FirstInterface()
const SfxSlot* SfxSlotPool::GetUnoSlot( const OUString& rName )
{
- const SfxSlot *pSlot = NULL;
+ const SfxSlot *pSlot = nullptr;
for (sal_uInt16 nInterface = 0; _pInterfaces && nInterface < _pInterfaces->size(); ++nInterface)
{
pSlot = (*_pInterfaces)[nInterface]->GetSlot( rName );
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index ac67cbb0c954..4794ff167f48 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -85,7 +85,7 @@ struct SfxInterface_Impl
SfxInterface_Impl() :
aPopupRes(nullptr, *SfxApplication::GetSfxResManager()),
aStatBarRes(nullptr, *SfxApplication::GetSfxResManager())
- , pModule(NULL)
+ , pModule(nullptr)
, bRegistered(false)
{
}
@@ -112,7 +112,7 @@ SfxInterface::SfxInterface( const char *pClassName,
pGenoType(pParent),
nClassId(nId),
bSuperClass(bUsableSuperClass),
- pImpData(0)
+ pImpData(nullptr)
{
pImpData = new SfxInterface_Impl;
SetSlotMap( rSlotMap, nSlotCount );
@@ -159,7 +159,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
if ( !pIter->pLinkedSlot->pLinkedSlot )
const_cast<SfxSlot*>(pIter->pLinkedSlot)->pLinkedSlot = pIter;
- if ( 0 == pIter->GetNextSlot() )
+ if ( nullptr == pIter->GetNextSlot() )
{
SfxSlot *pLastSlot = pIter;
for ( sal_uInt16 n = nIter; n < Count(); ++n )
@@ -174,7 +174,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
pLastSlot->pNextSlot = pIter;
}
}
- else if ( 0 == pIter->GetNextSlot() )
+ else if ( nullptr == pIter->GetNextSlot() )
{
// Slots referring in circle to the next with the same
// Status method.
@@ -306,7 +306,7 @@ const SfxSlot* SfxInterface::GetSlot( sal_uInt16 nFuncId ) const
if ( !p && pGenoType )
return pGenoType->GetSlot( nFuncId );
- return p ? static_cast<const SfxSlot*>(p) : 0;
+ return p ? static_cast<const SfxSlot*>(p) : nullptr;
}
const SfxSlot* SfxInterface::GetSlot( const OUString& rCommand ) const
@@ -324,7 +324,7 @@ const SfxSlot* SfxInterface::GetSlot( const OUString& rCommand ) const
return pSlots+n;
}
- return pGenoType ? pGenoType->GetSlot( aCommand ) : NULL;
+ return pGenoType ? pGenoType->GetSlot( aCommand ) : nullptr;
}
@@ -340,7 +340,7 @@ const SfxSlot* SfxInterface::GetRealSlot( const SfxSlot *pSlot ) const
if(pGenoType)
return pGenoType->GetRealSlot(pSlot);
SAL_WARN( "sfx.control", "unknown Slot" );
- return 0;
+ return nullptr;
}
return pSlot->pLinkedSlot;
@@ -360,7 +360,7 @@ const SfxSlot* SfxInterface::GetRealSlot( sal_uInt16 nSlotId ) const
if(pGenoType)
return pGenoType->GetRealSlot(nSlotId);
SAL_WARN( "sfx.control", "unknown Slot" );
- return 0;
+ return nullptr;
}
return pSlot->pLinkedSlot;
@@ -394,7 +394,7 @@ SfxObjectUI_Impl* CreateObjectBarUI_Impl(sal_uInt16 nPos, sal_uInt32 nResId, sal
sal_uInt32 SfxInterface::GetObjectBarId(sal_uInt16 nNo) const
{
- bool bGenoType = (pGenoType != 0 && pGenoType->UseAsSuperClass());
+ bool bGenoType = (pGenoType != nullptr && pGenoType->UseAsSuperClass());
if ( bGenoType )
{
// Are there toolbars in the super class?
@@ -413,7 +413,7 @@ sal_uInt32 SfxInterface::GetObjectBarId(sal_uInt16 nNo) const
sal_uInt16 SfxInterface::GetObjectBarPos( sal_uInt16 nNo ) const
{
- bool bGenoType = (pGenoType != 0 && pGenoType->UseAsSuperClass());
+ bool bGenoType = (pGenoType != nullptr && pGenoType->UseAsSuperClass());
if ( bGenoType )
{
// Are there toolbars in the super class?
@@ -520,7 +520,7 @@ const ResId& SfxInterface::GetStatusBarResId() const
sal_uInt32 SfxInterface::GetObjectBarFeature ( sal_uInt16 nNo ) const
{
- bool bGenoType = (pGenoType != 0 && pGenoType->UseAsSuperClass());
+ bool bGenoType = (pGenoType != nullptr && pGenoType->UseAsSuperClass());
if ( bGenoType )
{
// Are there toolbars in the super class?
@@ -539,7 +539,7 @@ sal_uInt32 SfxInterface::GetObjectBarFeature ( sal_uInt16 nNo ) const
bool SfxInterface::IsObjectBarVisible(sal_uInt16 nNo) const
{
- bool bGenoType = (pGenoType != 0 && pGenoType->UseAsSuperClass());
+ bool bGenoType = (pGenoType != nullptr && pGenoType->UseAsSuperClass());
if ( bGenoType )
{
// Are there toolbars in the super class?
diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx
index 6f86cfc9d1e9..a49315143c6c 100644
--- a/sfx2/source/control/querystatus.cxx
+++ b/sfx2/source/control/querystatus.cxx
@@ -76,7 +76,7 @@ class SfxQueryStatus_Impl:
SfxQueryStatus_Impl::SfxQueryStatus_Impl( const Reference< XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& rCommand ) :
m_bQueryInProgress( false ),
m_eState( SfxItemState::DISABLED ),
- m_pItem( 0 ),
+ m_pItem( nullptr ),
m_nSlotID( nSlotId )
{
m_aCommand.Complete = rCommand;
@@ -103,7 +103,7 @@ throw( RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- m_pItem = NULL;
+ m_pItem = nullptr;
m_eState = SfxItemState::DISABLED;
if ( rEvent.IsEnabled )
@@ -175,7 +175,7 @@ SfxItemState SfxQueryStatus_Impl::QueryState( SfxPoolItem*& rpPoolItem )
SolarMutexGuard aGuard;
if ( !m_bQueryInProgress )
{
- m_pItem = NULL;
+ m_pItem = nullptr;
m_eState = SfxItemState::DISABLED;
if ( m_xDispatch.is() )
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index 4c1381241cb3..ea5169f1a959 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -219,7 +219,7 @@ void RecentDocsViewItem::OpenDocument()
pLoadRecentFile->aTargetURL = aTargetURL;
pLoadRecentFile->aArgSeq = aArgsList;
- Application::PostUserEvent(LINK(0, RecentDocsView, ExecuteHdl_Impl), pLoadRecentFile, true);
+ Application::PostUserEvent(LINK(nullptr, RecentDocsView, ExecuteHdl_Impl), pLoadRecentFile, true);
}
}
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index d97676de3ea8..770d70d29dc8 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -72,18 +72,18 @@ struct SfxRequest_Impl: public SfxListener
explicit SfxRequest_Impl( SfxRequest *pOwner )
: pAnti( pOwner)
- , pPool(0)
- , pRetVal(0)
- , pShell(0)
- , pSlot(0)
+ , pPool(nullptr)
+ , pRetVal(nullptr)
+ , pShell(nullptr)
+ , pSlot(nullptr)
, nModifier(0)
, bDone(false)
, bIgnored(false)
, bCancelled(false)
, nCallMode( SfxCallMode::SYNCHRON )
, bAllowRecording( false )
- , pInternalArgs( 0 )
- , pViewFrame(0)
+ , pInternalArgs( nullptr )
+ , pViewFrame(nullptr)
{}
virtual ~SfxRequest_Impl() { delete pInternalArgs; }
@@ -141,21 +141,21 @@ SfxRequest::SfxRequest
)
: SfxHint( rOrig ),
nSlot(rOrig.nSlot),
- pArgs(rOrig.pArgs? new SfxAllItemSet(*rOrig.pArgs): 0),
+ pArgs(rOrig.pArgs? new SfxAllItemSet(*rOrig.pArgs): nullptr),
pImp( new SfxRequest_Impl(this) )
{
pImp->bAllowRecording = rOrig.pImp->bAllowRecording;
pImp->bDone = false;
pImp->bIgnored = false;
- pImp->pRetVal = 0;
- pImp->pShell = 0;
- pImp->pSlot = 0;
+ pImp->pRetVal = nullptr;
+ pImp->pShell = nullptr;
+ pImp->pSlot = nullptr;
pImp->nCallMode = rOrig.pImp->nCallMode;
pImp->aTarget = rOrig.pImp->aTarget;
pImp->nModifier = rOrig.pImp->nModifier;
// deep copy needed !
- pImp->pInternalArgs = (rOrig.pImp->pInternalArgs ? new SfxAllItemSet(*rOrig.pImp->pInternalArgs) : 0);
+ pImp->pInternalArgs = (rOrig.pImp->pInternalArgs ? new SfxAllItemSet(*rOrig.pImp->pInternalArgs) : nullptr);
if ( pArgs )
pImp->SetPool( pArgs->GetPool() );
@@ -182,15 +182,15 @@ SfxRequest::SfxRequest
*/
: nSlot(nSlotId),
- pArgs(0),
+ pArgs(nullptr),
pImp( new SfxRequest_Impl(this) )
{
pImp->bDone = false;
pImp->bIgnored = false;
pImp->SetPool( &pViewFrame->GetPool() );
- pImp->pRetVal = 0;
- pImp->pShell = 0;
- pImp->pSlot = 0;
+ pImp->pRetVal = nullptr;
+ pImp->pShell = nullptr;
+ pImp->pSlot = nullptr;
pImp->nCallMode = SfxCallMode::SYNCHRON;
pImp->pViewFrame = pViewFrame;
if( pImp->pViewFrame->GetDispatcher()->GetShellAndSlot_Impl( nSlotId, &pImp->pShell, &pImp->pSlot, true, true ) )
@@ -222,15 +222,15 @@ SfxRequest::SfxRequest
// creates a SfxRequest without arguments
: nSlot(nSlotId),
- pArgs(0),
+ pArgs(nullptr),
pImp( new SfxRequest_Impl(this) )
{
pImp->bDone = false;
pImp->bIgnored = false;
pImp->SetPool( &rPool );
- pImp->pRetVal = 0;
- pImp->pShell = 0;
- pImp->pSlot = 0;
+ pImp->pRetVal = nullptr;
+ pImp->pShell = nullptr;
+ pImp->pSlot = nullptr;
pImp->nCallMode = nMode;
}
@@ -248,9 +248,9 @@ SfxRequest::SfxRequest
pImp->bDone = false;
pImp->bIgnored = false;
pImp->SetPool( &rPool );
- pImp->pRetVal = 0;
- pImp->pShell = 0;
- pImp->pSlot = 0;
+ pImp->pRetVal = nullptr;
+ pImp->pShell = nullptr;
+ pImp->pSlot = nullptr;
pImp->nCallMode = nMode;
TransformParameters( nSlot, rArgs, *pArgs, pSlot );
}
@@ -273,9 +273,9 @@ SfxRequest::SfxRequest
pImp->bDone = false;
pImp->bIgnored = false;
pImp->SetPool( rSfxArgs.GetPool() );
- pImp->pRetVal = 0;
- pImp->pShell = 0;
- pImp->pSlot = 0;
+ pImp->pRetVal = nullptr;
+ pImp->pShell = nullptr;
+ pImp->pSlot = nullptr;
pImp->nCallMode = nMode;
}
@@ -540,7 +540,7 @@ void SfxRequest::Cancel()
{
pImp->bCancelled = true;
- pImp->SetPool( 0 );
+ pImp->SetPool( nullptr );
DELETEZ( pArgs );
}
diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx
index 591ccc04d7dc..4e6567ecb186 100644
--- a/sfx2/source/control/sfxstatuslistener.cxx
+++ b/sfx2/source/control/sfxstatuslistener.cxx
@@ -145,11 +145,11 @@ throw( RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- SfxViewFrame* pViewFrame = NULL;
+ SfxViewFrame* pViewFrame = nullptr;
if ( m_xDispatch.is() )
{
Reference< XUnoTunnel > xTunnel( m_xDispatch, UNO_QUERY );
- SfxOfficeDispatch* pDisp = NULL;
+ SfxOfficeDispatch* pDisp = nullptr;
if ( xTunnel.is() )
{
sal_Int64 nImplementation = xTunnel->getSomething(SfxOfficeDispatch::impl_getStaticIdentifier());
@@ -164,7 +164,7 @@ throw( RuntimeException, std::exception )
const SfxSlot* pSlot = rPool.GetSlot( m_nSlotID );
SfxItemState eState = SfxItemState::DISABLED;
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
if ( rEvent.IsEnabled )
{
eState = SfxItemState::DEFAULT;
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 29b4fab69d99..0e091441358a 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -74,14 +74,14 @@ struct SfxShell_Impl: public SfxBroadcaster
::sfx2::sidebar::ContextChangeBroadcaster maContextChangeBroadcaster;
SfxShell_Impl()
- : pViewSh(0)
- , pFrame(0)
- , pRepeatTarget(0)
+ : pViewSh(nullptr)
+ , pFrame(nullptr)
+ , pRepeatTarget(nullptr)
, bActive(false)
, nDisableFlags(0)
, nHelpId(0)
- , pExecuter(0)
- , pUpdater(0)
+ , pExecuter(nullptr)
+ , pUpdater(nullptr)
{
}
@@ -98,17 +98,17 @@ void SfxShell::EmptyStateStub(SfxShell *, SfxItemSet &)
}
SfxShell::SfxShell()
-: pImp(0),
- pPool(0),
- pUndoMgr(0)
+: pImp(nullptr),
+ pPool(nullptr),
+ pUndoMgr(nullptr)
{
pImp = new SfxShell_Impl;
}
SfxShell::SfxShell( SfxViewShell *pViewSh )
-: pImp(0),
- pPool(0),
- pUndoMgr(0)
+: pImp(nullptr),
+ pPool(nullptr),
+ pUndoMgr(nullptr)
{
pImp = new SfxShell_Impl;
pImp->pViewSh = pViewSh;
@@ -131,7 +131,7 @@ const OUString& SfxShell::GetName() const
SfxDispatcher* SfxShell::GetDispatcher() const
{
- return pImp->pFrame ? pImp->pFrame->GetDispatcher() : 0;
+ return pImp->pFrame ? pImp->pFrame->GetDispatcher() : nullptr;
}
SfxViewShell* SfxShell::GetViewShell() const
@@ -145,7 +145,7 @@ SfxViewFrame* SfxShell::GetFrame() const
return pImp->pFrame;
if ( pImp->pViewSh )
return pImp->pViewSh->GetViewFrame();
- return 0;
+ return nullptr;
}
const SfxPoolItem* SfxShell::GetItem
@@ -156,7 +156,7 @@ const SfxPoolItem* SfxShell::GetItem
SfxItemPtrMap::const_iterator it = pImp->aItems.find( nSlotId );
if( it != pImp->aItems.end() )
return it->second;
- return 0;
+ return nullptr;
}
void SfxShell::PutItem
@@ -216,7 +216,7 @@ SfxInterface* SfxShell::GetInterface() const
void SfxShell::SetUndoManager( ::svl::IUndoManager *pNewUndoMgr )
{
- OSL_ENSURE( ( pUndoMgr == NULL ) || ( pNewUndoMgr == NULL ) || ( pUndoMgr == pNewUndoMgr ),
+ OSL_ENSURE( ( pUndoMgr == nullptr ) || ( pNewUndoMgr == nullptr ) || ( pUndoMgr == pNewUndoMgr ),
"SfxShell::SetUndoManager: exchanging one non-NULL manager with another non-NULL manager? Suspicious!" );
// there's at least one client of our UndoManager - the DocumentUndoManager at the SfxBaseModel - which
// caches the UndoManager, and registers itself as listener. If exchanging non-NULL UndoManagers is really
@@ -348,7 +348,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, bool bMDI )
if ( bMDI && pImp->pFrame == pFrame )
{
// deliver
- pImp->pFrame = 0;
+ pImp->pFrame = nullptr;
pImp->bActive = false;
}
@@ -421,7 +421,7 @@ const SfxPoolItem* SfxShell::ExecuteSlot( SfxRequest& rReq, bool bAsync )
pImp->pExecuter = new svtools::AsynchronLink(
Link<void*,void>( this, ShellCall_Impl ) );
pImp->pExecuter->Call( new SfxRequest( rReq ) );
- return 0;
+ return nullptr;
}
}
@@ -435,7 +435,7 @@ const SfxPoolItem* SfxShell::ExecuteSlot
pIF = GetInterface();
sal_uInt16 nSlot = rReq.GetSlot();
- const SfxSlot* pSlot = NULL;
+ const SfxSlot* pSlot = nullptr;
if ( nSlot >= SID_VERB_START && nSlot <= SID_VERB_END )
pSlot = GetVerbSlot_Impl(nSlot);
if ( !pSlot )
@@ -462,7 +462,7 @@ const SfxPoolItem* SfxShell::GetSlotState
SfxItemState eState = SfxItemState::UNKNOWN;
SfxItemPool &rPool = GetPool();
- const SfxSlot* pSlot = NULL;
+ const SfxSlot* pSlot = nullptr;
if ( nSlotId >= SID_VERB_START && nSlotId <= SID_VERB_END )
pSlot = GetVerbSlot_Impl(nSlotId);
if ( !pSlot )
@@ -472,7 +472,7 @@ const SfxPoolItem* SfxShell::GetSlotState
nSlotId = pSlot->GetWhich( rPool );
// Get Item and Item status
- const SfxPoolItem *pItem = NULL;
+ const SfxPoolItem *pItem = nullptr;
SfxItemSet aSet( rPool, nSlotId, nSlotId ); // else pItem dies too soon
if ( pSlot )
{
@@ -495,12 +495,12 @@ const SfxPoolItem* SfxShell::GetSlotState
eState = SfxItemState::UNKNOWN;
// Evaluate Item and item status and possibly maintain them in pStateSet
- SfxPoolItem *pRetItem = 0;
+ SfxPoolItem *pRetItem = nullptr;
if ( eState <= SfxItemState::DISABLED )
{
if ( pStateSet )
pStateSet->DisableItem(nSlotId);
- return 0;
+ return nullptr;
}
else if ( eState == SfxItemState::DONTCARE )
{
@@ -565,11 +565,11 @@ void SfxShell::SetVerbs(const css::uno::Sequence < css::embed::VerbDescriptor >&
pNewSlot->nValue = 0;
pNewSlot->fnExec = SFX_STUB_PTR(SfxShell,VerbExec);
pNewSlot->fnState = SFX_STUB_PTR(SfxShell,VerbState);
- pNewSlot->pType = 0; // HACK(SFX_TYPE(SfxVoidItem)) ???
- pNewSlot->pLinkedSlot = 0;
+ pNewSlot->pType = nullptr; // HACK(SFX_TYPE(SfxVoidItem)) ???
+ pNewSlot->pLinkedSlot = nullptr;
pNewSlot->nArgDefCount = 0;
- pNewSlot->pFirstArgDef = 0;
- pNewSlot->pUnoName = 0;
+ pNewSlot->pFirstArgDef = nullptr;
+ pNewSlot->pUnoName = nullptr;
if (!pImp->aSlotArr.empty())
{
@@ -643,7 +643,7 @@ const SfxSlot* SfxShell::GetVerbSlot_Impl(sal_uInt16 nId) const
if (nIndex < rList.getLength())
return &pImp->aSlotArr[nIndex];
else
- return 0;
+ return nullptr;
}
void SfxShell::SetHelpId(sal_uIntPtr nId)
@@ -661,7 +661,7 @@ SfxObjectShell* SfxShell::GetObjectShell()
if ( GetViewShell() )
return GetViewShell()->GetViewFrame()->GetObjectShell();
else
- return NULL;
+ return nullptr;
}
bool SfxShell::HasUIFeature( sal_uInt32 )
@@ -703,7 +703,7 @@ sal_uIntPtr SfxShell::GetDisableFlags() const
SfxItemSet* SfxShell::CreateItemSet( sal_uInt16 )
{
- return NULL;
+ return nullptr;
}
void SfxShell::ApplyItemSet( sal_uInt16, const SfxItemSet& )
@@ -723,7 +723,7 @@ void SfxShell::SetViewShell_Impl( SfxViewShell* pView )
void SfxShell::BroadcastContextForActivation (const bool bIsActivated)
{
SfxViewFrame* pViewFrame = GetFrame();
- if (pViewFrame != NULL)
+ if (pViewFrame != nullptr)
{
if (bIsActivated)
pImp->maContextChangeBroadcaster.Activate(pViewFrame->GetFrame().GetFrameInterface());
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index 987323c3e8ff..e41992aa5b8e 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -83,7 +83,7 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const css::frame::FeatureStateE
pCache->Invalidate( true );
else
{
- SfxPoolItem *pItem=NULL;
+ SfxPoolItem *pItem=nullptr;
sal_uInt16 nId = pCache->GetId();
SfxItemState eState = SfxItemState::DISABLED;
if ( !aStatus.IsEnabled )
@@ -157,7 +157,7 @@ void BindDispatch_Impl::Release()
xDisp.clear();
}
- pCache = NULL;
+ pCache = nullptr;
release();
}
@@ -179,11 +179,11 @@ void BindDispatch_Impl::Dispatch( const uno::Sequence < beans::PropertyValue >&
// This constructor for an invalid cache that is updated in the first request.
SfxStateCache::SfxStateCache( sal_uInt16 nFuncId ):
- pDispatch( 0 ),
+ pDispatch( nullptr ),
nId(nFuncId),
- pInternalController(0),
- pController(0),
- pLastItem( 0 ),
+ pInternalController(nullptr),
+ pController(nullptr),
+ pLastItem( nullptr ),
eLastState( SfxItemState::UNKNOWN ),
bItemVisible( true )
{
@@ -197,13 +197,13 @@ SfxStateCache::SfxStateCache( sal_uInt16 nFuncId ):
SfxStateCache::~SfxStateCache()
{
- DBG_ASSERT( pController == 0 && pInternalController == 0, "there are still Controllers registered" );
+ DBG_ASSERT( pController == nullptr && pInternalController == nullptr, "there are still Controllers registered" );
if ( !IsInvalidItem(pLastItem) )
delete pLastItem;
if ( pDispatch )
{
pDispatch->Release();
- pDispatch = NULL;
+ pDispatch = nullptr;
}
}
@@ -215,11 +215,11 @@ void SfxStateCache::Invalidate( bool bWithMsg )
if ( bWithMsg )
{
bSlotDirty = true;
- aSlotServ.SetSlot( 0 );
+ aSlotServ.SetSlot( nullptr );
if ( pDispatch )
{
pDispatch->Release();
- pDispatch = NULL;
+ pDispatch = nullptr;
}
}
}
@@ -249,7 +249,7 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , cons
{
bSlotDirty = false;
bCtrlDirty = true;
- return aSlotServ.GetSlot()? &aSlotServ: 0;
+ return aSlotServ.GetSlot()? &aSlotServ: nullptr;
}
// create the dispatch URL from the slot data
@@ -267,7 +267,7 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , cons
{
// test the dispatch object if it is just a wrapper for a SfxDispatcher
css::uno::Reference< css::lang::XUnoTunnel > xTunnel( xDisp, css::uno::UNO_QUERY );
- SfxOfficeDispatch* pDisp = NULL;
+ SfxOfficeDispatch* pDisp = nullptr;
if ( xTunnel.is() )
{
sal_Int64 nImplementation = xTunnel->getSomething(SfxOfficeDispatch::impl_getStaticIdentifier());
@@ -285,7 +285,7 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , cons
// so we can use it directly
bSlotDirty = false;
bCtrlDirty = true;
- return aSlotServ.GetSlot()? &aSlotServ: 0;
+ return aSlotServ.GetSlot()? &aSlotServ: nullptr;
}
}
@@ -313,7 +313,7 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , cons
// we *always* return a SlotServer (if there is one); but in case of an external dispatch we might not use it
// for the "real" (non internal) controllers
- return aSlotServ.GetSlot()? &aSlotServ: 0;
+ return aSlotServ.GetSlot()? &aSlotServ: nullptr;
}
@@ -346,13 +346,13 @@ void SfxStateCache::SetVisibleState( bool bShow )
if ( bShow != bItemVisible )
{
SfxItemState eState( SfxItemState::DEFAULT );
- const SfxPoolItem* pState( NULL );
+ const SfxPoolItem* pState( nullptr );
bool bDeleteItem( false );
bItemVisible = bShow;
if ( bShow )
{
- if ( IsInvalidItem(pLastItem) || ( pLastItem == NULL ))
+ if ( IsInvalidItem(pLastItem) || ( pLastItem == nullptr ))
{
pState = new SfxVoidItem( nId );
bDeleteItem = true;
@@ -438,7 +438,7 @@ void SfxStateCache::SetState_Impl
if ( pState && !IsInvalidItem(pState) )
pLastItem = pState->Clone();
else
- pLastItem = 0;
+ pLastItem = nullptr;
eLastState = eState;
bItemDirty = false;
}
@@ -452,7 +452,7 @@ void SfxStateCache::SetState_Impl
void SfxStateCache::SetCachedState( bool bAlways )
{
- DBG_ASSERT(pController==NULL||pController->GetId()==nId, "Cache with wrong ControllerItem" );
+ DBG_ASSERT(pController==nullptr||pController->GetId()==nId, "Cache with wrong ControllerItem" );
// Only update if cached item exists and also able to process.
// (If the State is sent, it must be ensured that a SlotServer is present,
diff --git a/sfx2/source/control/templatecontaineritem.cxx b/sfx2/source/control/templatecontaineritem.cxx
index 25bd3a2d9055..5690a2e4f337 100644
--- a/sfx2/source/control/templatecontaineritem.cxx
+++ b/sfx2/source/control/templatecontaineritem.cxx
@@ -97,7 +97,7 @@ void TemplateContainerItem::Paint (drawinglayer::processor2d::BaseProcessor2D *p
{
long nPosX = 0;
long nPosY = 0;
- BitmapEx* pImage = NULL;
+ BitmapEx* pImage = nullptr;
switch (i)
{
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 1ce73203a2ff..070bb0acde7a 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -147,7 +147,7 @@ void TemplateLocalView::showRootRegion()
updateItems(items);
- maOpenRegionHdl.Call(NULL);
+ maOpenRegionHdl.Call(nullptr);
}
void TemplateLocalView::showRegion(ThumbnailViewItem *pItem)
@@ -161,7 +161,7 @@ void TemplateLocalView::showRegion(ThumbnailViewItem *pItem)
insertItems(reinterpret_cast<TemplateContainerItem*>(pItem)->maTemplates);
- maOpenRegionHdl.Call(NULL);
+ maOpenRegionHdl.Call(nullptr);
}
void TemplateLocalView::showRegion(const OUString &rName)
@@ -382,8 +382,8 @@ bool TemplateLocalView::removeTemplate (const sal_uInt16 nItemId, const sal_uInt
bool TemplateLocalView::moveTemplate (const ThumbnailViewItem *pItem, const sal_uInt16 nSrcItem,
const sal_uInt16 nTargetItem)
{
- TemplateContainerItem *pTarget = NULL;
- TemplateContainerItem *pSrc = NULL;
+ TemplateContainerItem *pTarget = nullptr;
+ TemplateContainerItem *pSrc = nullptr;
for (size_t i = 0, n = maRegions.size(); i < n; ++i)
{
@@ -471,8 +471,8 @@ bool TemplateLocalView::moveTemplates(const std::set<const ThumbnailViewItem*, s
sal_uInt16 nSrcRegionId = mnCurRegionId-1;
- TemplateContainerItem *pTarget = NULL;
- TemplateContainerItem *pSrc = NULL;
+ TemplateContainerItem *pTarget = nullptr;
+ TemplateContainerItem *pSrc = nullptr;
for (size_t i = 0, n = maRegions.size(); i < n; ++i)
{
diff --git a/sfx2/source/control/templateremoteview.cxx b/sfx2/source/control/templateremoteview.cxx
index 310dead38508..9f74e8329654 100644
--- a/sfx2/source/control/templateremoteview.cxx
+++ b/sfx2/source/control/templateremoteview.cxx
@@ -49,7 +49,7 @@ TemplateRemoteView::TemplateRemoteView (vcl::Window *pParent, WinBits nWinStyle,
{
Reference< XComponentContext > xContext = comphelper::getProcessComponentContext();
Reference< XInteractionHandler > xGlobalInteractionHandler(
- InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW );
+ InteractionHandler::createWithParent(xContext, nullptr), UNO_QUERY_THROW );
m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() );
}
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index a675734307c4..6e5321d4aeea 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -115,7 +115,7 @@ void ThumbnailView::AppendItem(ThumbnailViewItem *pItem)
{
// Save current start,end range, iterator might get invalidated
size_t nSelStartPos = 0;
- ThumbnailViewItem *pSelStartItem = NULL;
+ ThumbnailViewItem *pSelStartItem = nullptr;
if (mpStartSelRange != mFilteredItemList.end())
{
@@ -124,7 +124,7 @@ void ThumbnailView::AppendItem(ThumbnailViewItem *pItem)
}
mFilteredItemList.push_back(pItem);
- mpStartSelRange = pSelStartItem != NULL ? mFilteredItemList.begin() + nSelStartPos : mFilteredItemList.end();
+ mpStartSelRange = pSelStartItem != nullptr ? mFilteredItemList.begin() + nSelStartPos : mFilteredItemList.end();
}
mItemList.push_back(pItem);
@@ -132,7 +132,7 @@ void ThumbnailView::AppendItem(ThumbnailViewItem *pItem)
void ThumbnailView::ImplInit()
{
- mpScrBar = NULL;
+ mpScrBar = nullptr;
mnHeaderHeight = 0;
mnItemWidth = 0;
mnItemHeight = 0;
@@ -268,7 +268,7 @@ void ThumbnailView::CalculateItemPositions (bool bScrollBarUsed)
{
// delete ScrollBar not until later, to prevent recursive calls
pDelScrBar = mpScrBar;
- mpScrBar = NULL;
+ mpScrBar = nullptr;
}
}
@@ -443,7 +443,7 @@ size_t ThumbnailView::ImplGetItem( const Point& rPos ) const
ThumbnailViewItem* ThumbnailView::ImplGetItem( size_t nPos )
{
- return ( nPos < mFilteredItemList.size() ) ? mFilteredItemList[nPos] : NULL;
+ return ( nPos < mFilteredItemList.size() ) ? mFilteredItemList[nPos] : nullptr;
}
sal_uInt16 ThumbnailView::ImplGetVisibleItemCount() const
@@ -472,7 +472,7 @@ ThumbnailViewItem* ThumbnailView::ImplGetVisibleItem( sal_uInt16 nVisiblePos )
return pItem;
}
- return NULL;
+ return nullptr;
}
void ThumbnailView::ImplFireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue )
@@ -519,7 +519,7 @@ void ThumbnailView::KeyInput( const KeyEvent& rKEvt )
bool bHasSelRange = mpStartSelRange != mFilteredItemList.end();
size_t nNextPos = nLastPos;
vcl::KeyCode aKeyCode = rKEvt.GetKeyCode();
- ThumbnailViewItem* pNext = NULL;
+ ThumbnailViewItem* pNext = nullptr;
if (aKeyCode.IsShift() && bHasSelRange)
{
@@ -825,7 +825,7 @@ void ThumbnailView::Command( const CommandEvent& rCEvt )
(rCEvt.GetCommand() == CommandEventId::StartAutoScroll) ||
(rCEvt.GetCommand() == CommandEventId::AutoScroll) )
{
- if ( HandleScrollCommand( rCEvt, NULL, mpScrBar ) )
+ if ( HandleScrollCommand( rCEvt, nullptr, mpScrBar ) )
return;
}
@@ -1169,7 +1169,7 @@ void ThumbnailView::filterItems(const std::function<bool (const ThumbnailViewIte
size_t nSelPos = 0;
bool bHasSelRange = false;
- ThumbnailViewItem *curSel = mpStartSelRange != mFilteredItemList.end() ? *mpStartSelRange : NULL;
+ ThumbnailViewItem *curSel = mpStartSelRange != mFilteredItemList.end() ? *mpStartSelRange : nullptr;
mFilteredItemList.clear();
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx
index 9a7dd556f478..12b12d74eeb6 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -86,11 +86,11 @@ ThumbnailViewAcc* ThumbnailViewAcc::getImplementation( const uno::Reference< uno
try
{
uno::Reference< lang::XUnoTunnel > xUnoTunnel( rxData, uno::UNO_QUERY );
- return( xUnoTunnel.is() ? reinterpret_cast<ThumbnailViewAcc*>(sal::static_int_cast<sal_IntPtr>(xUnoTunnel->getSomething( ThumbnailViewAcc::getUnoTunnelId() ))) : NULL );
+ return( xUnoTunnel.is() ? reinterpret_cast<ThumbnailViewAcc*>(sal::static_int_cast<sal_IntPtr>(xUnoTunnel->getSomething( ThumbnailViewAcc::getUnoTunnelId() ))) : nullptr );
}
catch(const css::uno::Exception&)
{
- return NULL;
+ return nullptr;
}
}
@@ -437,7 +437,7 @@ void SAL_CALL ThumbnailViewAcc::selectAccessibleChild( sal_Int32 nChildIndex )
const SolarMutexGuard aSolarGuard;
ThumbnailViewItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex));
- if(pItem != NULL)
+ if(pItem != nullptr)
{
mpParent->SelectItem( pItem->mnId );
}
@@ -453,7 +453,7 @@ sal_Bool SAL_CALL ThumbnailViewAcc::isAccessibleChildSelected( sal_Int32 nChildI
ThumbnailViewItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex));
bool bRet = false;
- if (pItem != NULL)
+ if (pItem != nullptr)
bRet = mpParent->IsItemSelected( pItem->mnId );
else
throw lang::IndexOutOfBoundsException();
@@ -548,7 +548,7 @@ void SAL_CALL ThumbnailViewAcc::disposing()
// Reset the pointer to the parent. It has to be the one who has
// disposed us because he is dying.
- mpParent = NULL;
+ mpParent = nullptr;
}
// Inform all listeners that this objects is disposing.
@@ -635,7 +635,7 @@ void ThumbnailViewItemAcc::FireAccessibleEvent( short nEventId, const uno::Any&
void ThumbnailViewItemAcc::ParentDestroyed()
{
const ::osl::MutexGuard aGuard( maMutex );
- mpParent = NULL;
+ mpParent = nullptr;
}
namespace
@@ -657,11 +657,11 @@ ThumbnailViewItemAcc* ThumbnailViewItemAcc::getImplementation( const uno::Refere
return( xUnoTunnel.is() ?
reinterpret_cast<ThumbnailViewItemAcc*>(sal::static_int_cast<sal_IntPtr>(
xUnoTunnel->getSomething( ThumbnailViewItemAcc::getUnoTunnelId() ))) :
- NULL );
+ nullptr );
}
catch(const css::uno::Exception&)
{
- return NULL;
+ return nullptr;
}
}
@@ -719,11 +719,11 @@ sal_Int32 SAL_CALL ThumbnailViewItemAcc::getAccessibleIndexInParent()
}
catch (const lang::IndexOutOfBoundsException&)
{
- pItem = NULL;
+ pItem = nullptr;
}
// Do not create an accessible object for the test.
- if (pItem != NULL && pItem->mxAcc.is())
+ if (pItem != nullptr && pItem->mxAcc.is())
if (pItem->GetAccessible( mbIsTransientChildrenDisabled ).get() == this )
{
nIndexInParent = i;
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index 3541d3f9d4be..a866b0d0a619 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -108,7 +108,7 @@ ThumbnailViewItem::ThumbnailViewItem(ThumbnailView &rView, sal_uInt16 nId)
, mbHover(false)
, mxAcc()
, mbEditTitle(false)
- , mpTitleED(NULL)
+ , mpTitleED(nullptr)
, maTextEditMaxArea()
{
mpTitleED = VclPtr<ResizableMultiLineEdit>::Create(&rView, this);
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 2bac67573c33..ec301c7b1d3e 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -124,7 +124,7 @@ SfxUnoControllerItem::~SfxUnoControllerItem()
void SfxUnoControllerItem::UnBind()
{
// connection to SfxControllerItem is lost
- pCtrlItem = NULL;
+ pCtrlItem = nullptr;
css::uno::Reference< css::frame::XStatusListener > aRef( static_cast<cppu::OWeakObject*>(this), css::uno::UNO_QUERY );
ReleaseDispatch();
}
@@ -147,7 +147,7 @@ void SAL_CALL SfxUnoControllerItem::statusChanged(const css::frame::FeatureState
else if ( pCtrlItem )
{
SfxItemState eState = SfxItemState::DISABLED;
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
if ( rEvent.IsEnabled )
{
eState = SfxItemState::DEFAULT;
@@ -235,7 +235,7 @@ void SfxUnoControllerItem::GetNewDispatch()
if ( xDispatch.is() )
xDispatch->addStatusListener( static_cast<css::frame::XStatusListener*>(this), aCommand );
else if ( pCtrlItem )
- pCtrlItem->StateChanged( pCtrlItem->GetId(), SfxItemState::DISABLED, NULL );
+ pCtrlItem->StateChanged( pCtrlItem->GetId(), SfxItemState::DISABLED, nullptr );
}
css::uno::Reference< css::frame::XDispatch > SfxUnoControllerItem::TryGetDispatch( SfxFrame *pFrame )
@@ -256,7 +256,7 @@ void SfxUnoControllerItem::ReleaseBindings()
ReleaseDispatch();
if ( pBindings )
pBindings->ReleaseUnoController_Impl( this );
- pBindings = NULL;
+ pBindings = nullptr;
}
void SfxStatusDispatcher::ReleaseAll()
@@ -320,7 +320,7 @@ SfxOfficeDispatch::SfxOfficeDispatch( SfxBindings& rBindings, SfxDispatcher* pDi
SfxOfficeDispatch::SfxOfficeDispatch( SfxDispatcher* pDispat, const SfxSlot* pSlot, const css::util::URL& rURL )
{
// this object is an adapter that shows a css::frame::XDispatch-Interface to the outside and uses a SfxControllerItem to monitor a state
- pControllerItem = new SfxDispatchController_Impl( this, NULL, pDispat, pSlot, rURL );
+ pControllerItem = new SfxDispatchController_Impl( this, nullptr, pDispat, pSlot, rURL );
}
SfxOfficeDispatch::~SfxOfficeDispatch()
@@ -432,7 +432,7 @@ SfxDispatchController_Impl::SfxDispatchController_Impl(
: aDispatchURL( rURL )
, pDispatcher( pDispat )
, pBindings( pBind )
- , pLastState( 0 )
+ , pLastState( nullptr )
, nSlot( pSlot->GetSlotId() )
, pDispatch( pDisp )
, bMasterSlave( false )
@@ -467,7 +467,7 @@ SfxDispatchController_Impl::~SfxDispatchController_Impl()
if ( pDispatch )
{
// disconnect
- pDispatch->pControllerItem = NULL;
+ pDispatch->pControllerItem = nullptr;
// force all listeners to release the dispatch object
css::lang::EventObject aObject;
@@ -488,7 +488,7 @@ void SfxDispatchController_Impl::setMasterSlaveCommand( bool bSet )
void SfxDispatchController_Impl::UnBindController()
{
- pDispatch = NULL;
+ pDispatch = nullptr;
if ( IsBound() )
{
GetBindings().ENTERREGISTRATIONS();
@@ -789,7 +789,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
}
bool bSuccess = false;
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
SfxMapUnit eMapUnit( SFX_MAPUNIT_100TH_MM );
// Extra scope so that aInternalSet is destroyed before
@@ -802,13 +802,13 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
if (xFrameRef.is()) // an empty set is no problem ... but an empty frame reference can be a problem !
aInternalSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrameRef ) );
- SfxShell* pShell( 0 );
+ SfxShell* pShell( nullptr );
// #i102619# Retrieve metric from shell before execution - the shell could be destroyed after execution
if ( pDispatcher->GetBindings() )
{
if ( !pDispatcher->IsLocked( GetId() ) )
{
- const SfxSlot *pSlot = 0;
+ const SfxSlot *pSlot = nullptr;
if ( pDispatcher->GetShellAndSlot_Impl( GetId(), &pShell, &pSlot, false,
SfxCallMode::MODAL==(nCall&SfxCallMode::MODAL), false ) )
{
@@ -829,7 +829,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
{
// execute with arguments - call directly
pItem = pDispatcher->Execute(GetId(), nCall, xSet.get(), &aInternalSet, nModifier);
- bSuccess = (pItem != NULL);
+ bSuccess = (pItem != nullptr);
}
else
{
@@ -843,7 +843,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
aReq.SetInternalArgs_Impl(aInternalSet);
pDispatcher->GetBindings()->Execute_Impl( aReq, pSlot, pShell );
pItem = aReq.GetReturnValue();
- bSuccess = aReq.IsDone() || pItem != NULL;
+ bSuccess = aReq.IsDone() || pItem != nullptr;
}
}
#ifdef DBG_UTIL
@@ -863,7 +863,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
pItem = pDispatcher->Execute( GetId(), nCall, &aSet, &aInternalSet, nModifier );
else
// SfxRequests take empty sets as argument sets, GetArgs() returning non-zero!
- pItem = pDispatcher->Execute( GetId(), nCall, 0, &aInternalSet, nModifier );
+ pItem = pDispatcher->Execute( GetId(), nCall, nullptr, &aInternalSet, nModifier );
// no bindings, no invalidate ( usually done in SfxDispatcher::Call_Impl()! )
if ( SfxApplication::Get() )
@@ -871,13 +871,13 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
SfxDispatcher* pAppDispat = SfxGetpApp()->GetAppDispatcher_Impl();
if ( pAppDispat )
{
- const SfxPoolItem* pState=0;
+ const SfxPoolItem* pState=nullptr;
SfxItemState eState = pDispatcher->QueryState( GetId(), pState );
StateChanged( GetId(), eState, pState );
}
}
- bSuccess = (pItem != NULL);
+ bSuccess = (pItem != nullptr);
}
}
@@ -1051,7 +1051,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
{
- StateChanged( nSID, eState, pState, 0 );
+ StateChanged( nSID, eState, pState, nullptr );
}
void SfxDispatchController_Impl::InterceptLOKStateChangeEvent(const SfxObjectShell* objSh, const css::frame::FeatureStateEvent& aEvent)
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
index 72df7c17767d..052784d9fca8 100644
--- a/sfx2/source/dialog/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -252,7 +252,7 @@ void SAL_CALL BackingComp::release()
css::uno::Sequence< css::uno::Type > SAL_CALL BackingComp::getTypes()
throw(css::uno::RuntimeException, std::exception)
{
- static ::cppu::OTypeCollection* pTypeCollection = NULL;
+ static ::cppu::OTypeCollection* pTypeCollection = nullptr;
if (!pTypeCollection)
{
/* GLOBAL SAFE { */
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 54ac9a64dfc1..5905ff9ccdd4 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -96,7 +96,7 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
mbIsSaveMode( false ),
mbInitControls( false ),
mnHideExternalLinks( 0 ),
- mpAccExec( NULL ),
+ mpAccExec( nullptr ),
maSelTemplates(cmpSelectionItems),
maSelFolders(cmpSelectionItems)
@@ -658,7 +658,7 @@ IMPL_LINK_TYPED(BackingWindow, OpenTemplateHdl, ThumbnailViewItem*, pItem, void)
aArgs[2].Name = "UpdateDocMode";
aArgs[2].Value <<= UpdateDocMode::ACCORDING_TO_CONFIG;
aArgs[3].Name = "InteractionHandler";
- aArgs[3].Value <<= task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), 0 );
+ aArgs[3].Value <<= task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr );
TemplateViewItem *pTemplateItem = static_cast<TemplateViewItem*>(pItem);
@@ -736,7 +736,7 @@ void BackingWindow::dispatchURL( const OUString& i_rURL,
if ( xDispatch.is() )
{
ImplDelayedDispatch* pDisp = new ImplDelayedDispatch( xDispatch, aDispatchURL, i_rArgs );
- if( Application::PostUserEvent( Link<void*,void>( NULL, implDispatchDelayed ), pDisp ) == 0 )
+ if( Application::PostUserEvent( Link<void*,void>( nullptr, implDispatchDelayed ), pDisp ) == nullptr )
delete pDisp; // event could not be posted for unknown reason, at least don't leak
}
}
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index dc383e080c3f..cd86096f1416 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -46,8 +46,8 @@ using namespace ::com::sun::star::uno;
#define USERITEM_NAME "UserItem"
SingleTabDlgImpl::SingleTabDlgImpl()
- : m_pSfxPage(NULL)
- , m_pLine(NULL)
+ : m_pSfxPage(nullptr)
+ , m_pLine(nullptr)
{
}
@@ -162,8 +162,8 @@ void SfxModalDialog::init()
SfxModalDialog::SfxModalDialog(vcl::Window *pParent, const OUString& rID, const OUString& rUIXMLDescription )
: ModalDialog(pParent, rID, rUIXMLDescription),
nUniqId(0), //todo: remove this member when the ResId using ctor is removed
- pInputSet(0),
- pOutputSet(0)
+ pInputSet(nullptr),
+ pOutputSet(nullptr)
{
init();
}
@@ -368,9 +368,9 @@ SfxModelessDialog::~SfxModelessDialog()
void SfxModelessDialog::dispose()
{
if ( pImp->pMgr->GetFrame().is() && pImp->pMgr->GetFrame() == pBindings->GetActiveFrame() )
- pBindings->SetActiveFrame( NULL );
+ pBindings->SetActiveFrame( nullptr );
delete pImp;
- pImp = NULL;
+ pImp = nullptr;
ModelessDialog::dispose();
}
@@ -436,7 +436,7 @@ bool SfxFloatingWindow::Notify( NotifyEvent& rEvt )
{
if ( !HasChildPathFocus() )
{
- pBindings->SetActiveFrame( NULL );
+ pBindings->SetActiveFrame( nullptr );
pImp->pMgr->Deactivate_Impl();
}
}
@@ -520,9 +520,9 @@ SfxFloatingWindow::~SfxFloatingWindow()
void SfxFloatingWindow::dispose()
{
if ( pImp && pImp->pMgr->GetFrame() == pBindings->GetActiveFrame() )
- pBindings->SetActiveFrame( NULL );
+ pBindings->SetActiveFrame( nullptr );
delete pImp;
- pImp = NULL;
+ pImp = nullptr;
FloatingWindow::dispose();
}
@@ -683,7 +683,7 @@ IMPL_LINK_NOARG_TYPED(SfxSingleTabDialog, OKHdl_Impl, Button*, void)
SfxSingleTabDialog::SfxSingleTabDialog(vcl::Window *pParent, const SfxItemSet& rSet,
const OUString& rID, const OUString& rUIXMLDescription)
: SfxModalDialog(pParent, rID, rUIXMLDescription)
- , fnGetRanges(NULL)
+ , fnGetRanges(nullptr)
, pImpl(new SingleTabDlgImpl)
{
get(pOKBtn, "ok");
@@ -696,7 +696,7 @@ SfxSingleTabDialog::SfxSingleTabDialog(vcl::Window *pParent, const SfxItemSet& r
SfxSingleTabDialog::SfxSingleTabDialog(vcl::Window* pParent, const SfxItemSet* pInSet,
const OUString& rID, const OUString& rUIXMLDescription)
: SfxModalDialog(pParent, rID, rUIXMLDescription)
- , fnGetRanges(NULL)
+ , fnGetRanges(nullptr)
, pImpl(new SingleTabDlgImpl)
{
get(pOKBtn, "ok");
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index dd7bdd76e393..ecd40c98e4b0 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -612,7 +612,7 @@ bool SfxDocumentInfoItem::PutValue( const Any& rVal, sal_uInt8 nMemberId )
SfxDocumentDescPage::SfxDocumentDescPage( vcl::Window * pParent, const SfxItemSet& rItemSet )
: SfxTabPage(pParent, "DescriptionInfoPage", "sfx/ui/descriptioninfopage.ui", &rItemSet)
- , m_pInfoItem ( NULL )
+ , m_pInfoItem ( nullptr )
{
get(m_pTitleEd, "title");
@@ -655,10 +655,10 @@ bool SfxDocumentDescPage::FillItemSet(SfxItemSet *rSet)
}
// Generating the output data
- const SfxPoolItem* pItem = NULL;
- SfxDocumentInfoItem* pInfo = NULL;
+ const SfxPoolItem* pItem = nullptr;
+ SfxDocumentInfoItem* pInfo = nullptr;
SfxTabDialog* pDlg = GetTabDialog();
- const SfxItemSet* pExSet = NULL;
+ const SfxItemSet* pExSet = nullptr;
if ( pDlg )
pExSet = pDlg->GetExampleSet();
@@ -1143,7 +1143,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
SfxDocumentInfoDialog::SfxDocumentInfoDialog( vcl::Window* pParent,
const SfxItemSet& rItemSet )
- : SfxTabDialog(0, pParent, "DocumentPropertiesDialog",
+ : SfxTabDialog(nullptr, pParent, "DocumentPropertiesDialog",
"sfx/ui/documentpropertiesdialog.ui", &rItemSet)
, m_nDocInfoId(0)
{
@@ -1156,7 +1156,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( vcl::Window* pParent,
#endif
// Determine the Titels
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
OUString aTitle( GetText() );
if ( SfxItemState::SET !=
rItemSet.GetItemState( SID_EXPLORER_PROPS_START, false, &pItem ) )
@@ -1187,11 +1187,11 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( vcl::Window* pParent,
SetText( aTitle );
// Property Pages
- m_nDocInfoId = AddTabPage("general", SfxDocumentPage::Create, 0);
- AddTabPage("description", SfxDocumentDescPage::Create, 0);
- AddTabPage("customprops", SfxCustomPropertiesPage::Create, 0);
- AddTabPage("cmisprops", SfxCmisPropertiesPage::Create, 0);
- AddTabPage("security", SfxSecurityPage::Create, 0);
+ m_nDocInfoId = AddTabPage("general", SfxDocumentPage::Create, nullptr);
+ AddTabPage("description", SfxDocumentDescPage::Create, nullptr);
+ AddTabPage("customprops", SfxCustomPropertiesPage::Create, nullptr);
+ AddTabPage("cmisprops", SfxCmisPropertiesPage::Create, nullptr);
+ AddTabPage("security", SfxSecurityPage::Create, nullptr);
}
@@ -1204,7 +1204,7 @@ void SfxDocumentInfoDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
void SfxDocumentInfoDialog::AddFontTabPage()
{
- AddTabPage( FONT_PAGE_ID, SfxResId( STR_FONT_TABPAGE ).toString(), SfxDocumentFontsPage::Create, 0);
+ AddTabPage( FONT_PAGE_ID, SfxResId( STR_FONT_TABPAGE ).toString(), SfxDocumentFontsPage::Create, nullptr);
}
// class CustomPropertiesYesNoButton -------------------------------------
@@ -1436,7 +1436,7 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent,
m_aYesNoButton ( VclPtr<CustomPropertiesYesNoButton>::Create( this, SfxResId( SFX_WIN_PROPERTY_YESNO )) ),
m_aRemoveButton ( VclPtr<ImageButton>::Create( this, 0 ) ),
m_nScrollPos (0),
- m_pCurrentLine (NULL),
+ m_pCurrentLine (nullptr),
m_aNumberFormatter( ::comphelper::getProcessComponentContext(),
Application::GetSettings().GetLanguageTag().getLanguageType() )
@@ -1550,7 +1550,7 @@ IMPL_LINK_TYPED( CustomPropertiesWindow, RemoveHdl, Button*, pBtn, void )
vcl::Window* pWindows[] = { pLine->m_aNameBox.get(), pLine->m_aTypeBox.get(), pLine->m_aValueEdit.get(),
pLine->m_aDateField.get(), pLine->m_aTimeField.get(),
pLine->m_aDurationField.get(), pLine->m_aEditButton.get(),
- pLine->m_aYesNoButton.get(), pLine->m_aRemoveButton.get(), NULL };
+ pLine->m_aYesNoButton.get(), pLine->m_aRemoveButton.get(), nullptr };
vcl::Window** pCurrent = pWindows;
while ( *pCurrent )
{
@@ -1562,7 +1562,7 @@ IMPL_LINK_TYPED( CustomPropertiesWindow, RemoveHdl, Button*, pBtn, void )
}
}
- m_aRemovedHdl.Call(0);
+ m_aRemovedHdl.Call(nullptr);
}
IMPL_LINK_TYPED( CustomPropertiesWindow, EditLoseFocusHdl, Control&, rControl, void )
@@ -1658,7 +1658,7 @@ bool CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa
pHeaderBar->SetItemSize( HI_VALUE, nItemWidth );
pHeaderBar->SetItemSize( HI_ACTION, nButtonWidth );
- vcl::Window* pWindows[] = { m_aNameBox.get(), m_aTypeBox.get(), m_aValueEdit.get(), m_aRemoveButton.get(), NULL };
+ vcl::Window* pWindows[] = { m_aNameBox.get(), m_aTypeBox.get(), m_aValueEdit.get(), m_aRemoveButton.get(), nullptr };
vcl::Window** pCurrent = pWindows;
sal_uInt16 nPos = 0;
while ( *pCurrent )
@@ -1723,7 +1723,7 @@ void CustomPropertiesWindow::updateLineWidth()
vcl::Window* pWindows[] = { m_aNameBox.get(), m_aTypeBox.get(), m_aValueEdit.get(),
m_aDateField.get(), m_aTimeField.get(),
m_aDurationField.get(), m_aEditButton.get(),
- m_aYesNoButton.get(), m_aRemoveButton.get(), NULL };
+ m_aYesNoButton.get(), m_aRemoveButton.get(), nullptr };
for (std::vector< CustomPropertyLine* >::iterator aI =
m_aCustomPropertiesLines.begin(), aEnd = m_aCustomPropertiesLines.end();
@@ -1735,7 +1735,7 @@ void CustomPropertiesWindow::updateLineWidth()
{ pNewLine->m_aNameBox.get(), pNewLine->m_aTypeBox.get(), pNewLine->m_aValueEdit.get(),
pNewLine->m_aDateField.get(), pNewLine->m_aTimeField.get(),
pNewLine->m_aDurationField.get(), pNewLine->m_aEditButton.get(),
- pNewLine->m_aYesNoButton.get(), pNewLine->m_aRemoveButton.get(), NULL };
+ pNewLine->m_aYesNoButton.get(), pNewLine->m_aRemoveButton.get(), nullptr };
vcl::Window** pCurrent = pWindows;
vcl::Window** pNewCurrent = pNewWindows;
@@ -1777,12 +1777,12 @@ void CustomPropertiesWindow::AddLine( const OUString& sName, Any& rAny )
vcl::Window* pWindows[] = { m_aNameBox.get(), m_aTypeBox.get(), m_aValueEdit.get(),
m_aDateField.get(), m_aTimeField.get(),
m_aDurationField.get(), m_aEditButton.get(),
- m_aYesNoButton.get(), m_aRemoveButton.get(), NULL };
+ m_aYesNoButton.get(), m_aRemoveButton.get(), nullptr };
vcl::Window* pNewWindows[] =
{ pNewLine->m_aNameBox.get(), pNewLine->m_aTypeBox.get(), pNewLine->m_aValueEdit.get(),
pNewLine->m_aDateField.get(), pNewLine->m_aTimeField.get(),
pNewLine->m_aDurationField.get(), pNewLine->m_aEditButton.get(),
- pNewLine->m_aYesNoButton.get(), pNewLine->m_aRemoveButton.get(), NULL };
+ pNewLine->m_aYesNoButton.get(), pNewLine->m_aRemoveButton.get(), nullptr };
vcl::Window** pCurrent = pWindows;
vcl::Window** pNewCurrent = pNewWindows;
while ( *pCurrent )
@@ -1922,7 +1922,7 @@ void CustomPropertiesWindow::DoScroll( sal_Int32 nNewPos )
continue;
vcl::Window* pWindows[] = { pLine->m_aNameBox.get(), pLine->m_aTypeBox.get(), pLine->m_aValueEdit.get(), pLine->m_aDateField.get(), pLine->m_aTimeField.get(),
- pLine->m_aDurationField.get(), pLine->m_aEditButton.get(), pLine->m_aYesNoButton.get(), pLine->m_aRemoveButton.get(), NULL };
+ pLine->m_aDurationField.get(), pLine->m_aEditButton.get(), pLine->m_aYesNoButton.get(), pLine->m_aRemoveButton.get(), nullptr };
vcl::Window** pCurrent = pWindows;
while ( *pCurrent )
{
@@ -2017,11 +2017,11 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c
CustomPropertiesControl::CustomPropertiesControl(vcl::Window* pParent)
: Window(pParent, WB_HIDE | WB_CLIPCHILDREN | WB_TABSTOP | WB_DIALOGCONTROL | WB_BORDER)
- , m_pVBox(NULL)
- , m_pHeaderBar(NULL)
- , m_pBody(NULL)
- , m_pPropertiesWin(NULL)
- , m_pVertScroll(NULL)
+ , m_pVBox(nullptr)
+ , m_pHeaderBar(nullptr)
+ , m_pBody(nullptr)
+ , m_pPropertiesWin(nullptr)
+ , m_pVertScroll(nullptr)
, m_nThumbPos(0)
{
}
@@ -2178,8 +2178,8 @@ IMPL_LINK_NOARG_TYPED(SfxCustomPropertiesPage, AddHdl, Button*, void)
bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet )
{
bool bModified = false;
- const SfxPoolItem* pItem = NULL;
- SfxDocumentInfoItem* pInfo = NULL;
+ const SfxPoolItem* pItem = nullptr;
+ SfxDocumentInfoItem* pInfo = nullptr;
bool bMustDelete = false;
if ( GetTabDialog() && GetTabDialog()->GetExampleSet() )
@@ -2648,8 +2648,8 @@ SfxCmisPropertiesPage::SfxCmisPropertiesPage( vcl::Window* pParent, const SfxIte
bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet* rSet )
{
- const SfxPoolItem* pItem = NULL;
- SfxDocumentInfoItem* pInfo = NULL;
+ const SfxPoolItem* pItem = nullptr;
+ SfxDocumentInfoItem* pInfo = nullptr;
bool bMustDelete = false;
if ( GetTabDialog() && GetTabDialog()->GetExampleSet() )
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 0f350658f0ca..e4d71dd12770 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -322,7 +322,7 @@ static SfxWorkWindow* lcl_getWorkWindowFromXFrame( const uno::Reference< frame::
{
// We need to find the corresponding SfxFrame of our XFrame
SfxFrame* pFrame = SfxFrame::GetFirst();
- SfxFrame* pXFrame = 0;
+ SfxFrame* pXFrame = nullptr;
while ( pFrame )
{
uno::Reference< frame::XFrame > xViewShellFrame( pFrame->GetFrameInterface() );
@@ -339,7 +339,7 @@ static SfxWorkWindow* lcl_getWorkWindowFromXFrame( const uno::Reference< frame::
if ( pXFrame )
return pXFrame->GetWorkWindow_Impl();
else
- return NULL;
+ return nullptr;
}
/** Factory function used by the framework layout manager to "create" a docking window with a special name.
@@ -504,7 +504,7 @@ bool SfxDockingWindow::PrepareToggleFloatingMode()
{
// The DockingWindow is inside a SplitWindow and will be teared of.
pImp->pSplitWin->RemoveWindow(this/*, sal_False*/);
- pImp->pSplitWin = 0;
+ pImp->pSplitWin = nullptr;
}
}
else if ( pMgr )
@@ -825,7 +825,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
DockingWindow (pParent, nWinBits),
pBindings(pBindinx),
pMgr(pCW),
- pImp(NULL)
+ pImp(nullptr)
{
if ( !GetHelpId().isEmpty() )
{
@@ -836,7 +836,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
{
SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame();
SfxSlotPool* pSlotPool = pViewFrame->GetObjectShell()->GetModule()->GetSlotPool();
- const SfxSlot* pSlot = pCW ? pSlotPool->GetSlot( pCW->GetType() ) : NULL;
+ const SfxSlot* pSlot = pCW ? pSlotPool->GetSlot( pCW->GetType() ) : nullptr;
if ( pSlot )
{
OString aCmd("SFXDOCKINGWINDOW_");
@@ -847,7 +847,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp = new SfxDockingWindow_Impl;
pImp->bConstructed = false;
- pImp->pSplitWin = 0;
+ pImp->pSplitWin = nullptr;
pImp->bEndDocked = false;
pImp->bDockingPrevented = false;
@@ -870,7 +870,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
DockingWindow(pParent, rResId),
pBindings(pBindinx),
pMgr(pCW),
- pImp(NULL)
+ pImp(nullptr)
{
if ( !GetHelpId().isEmpty() )
{
@@ -881,7 +881,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
{
SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame();
SfxSlotPool* pSlotPool = pViewFrame->GetObjectShell()->GetModule()->GetSlotPool();
- const SfxSlot* pSlot = pCW ? pSlotPool->GetSlot( pCW->GetType() ) : NULL;
+ const SfxSlot* pSlot = pCW ? pSlotPool->GetSlot( pCW->GetType() ) : nullptr;
if ( pSlot )
{
OString aCmd("SFXDOCKINGWINDOW_");
@@ -892,7 +892,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp = new SfxDockingWindow_Impl;
pImp->bConstructed = false;
- pImp->pSplitWin = 0;
+ pImp->pSplitWin = nullptr;
pImp->bEndDocked = false;
pImp->bDockingPrevented = false;
@@ -915,7 +915,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
: DockingWindow(pParent, rID, rUIXMLDescription)
, pBindings(pBindinx)
, pMgr(pCW)
- , pImp(NULL)
+ , pImp(nullptr)
{
if ( !GetHelpId().isEmpty() )
{
@@ -926,7 +926,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
{
SfxViewFrame* pViewFrame = pBindings->GetDispatcher()->GetFrame();
SfxSlotPool* pSlotPool = pViewFrame->GetObjectShell()->GetModule()->GetSlotPool();
- const SfxSlot* pSlot = pCW ? pSlotPool->GetSlot( pCW->GetType() ) : NULL;
+ const SfxSlot* pSlot = pCW ? pSlotPool->GetSlot( pCW->GetType() ) : nullptr;
if ( pSlot )
{
OString aCmd("SFXDOCKINGWINDOW_");
@@ -937,7 +937,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp = new SfxDockingWindow_Impl;
pImp->bConstructed = false;
- pImp->pSplitWin = 0;
+ pImp->pSplitWin = nullptr;
pImp->bEndDocked = false;
pImp->bDockingPrevented = false;
@@ -1225,19 +1225,19 @@ SfxDockingWindow::~SfxDockingWindow()
void SfxDockingWindow::dispose()
{
ReleaseChildWindow_Impl();
- delete pImp; pImp = NULL;
+ delete pImp; pImp = nullptr;
DockingWindow::dispose();
}
void SfxDockingWindow::ReleaseChildWindow_Impl()
{
if ( pMgr && pMgr->GetFrame() == pBindings->GetActiveFrame() )
- pBindings->SetActiveFrame( NULL );
+ pBindings->SetActiveFrame( nullptr );
if ( pMgr && pImp->pSplitWin && pImp->pSplitWin->IsItemValid( GetType() ) )
pImp->pSplitWin->RemoveWindow(this);
- pMgr=NULL;
+ pMgr=nullptr;
}
/** This method calculates a resulting alignment for the given mouse position
@@ -1732,12 +1732,12 @@ bool SfxDockingWindow::Notify( NotifyEvent& rEvt )
if ( rEvt.GetType() == MouseNotifyEvent::GETFOCUS )
{
- if (pMgr != NULL)
+ if (pMgr != nullptr)
pBindings->SetActiveFrame( pMgr->GetFrame() );
if ( pImp->pSplitWin )
pImp->pSplitWin->SetActiveWindow_Impl( this );
- else if (pMgr != NULL)
+ else if (pMgr != nullptr)
pMgr->Activate_Impl();
// In VCL Notify goes first to the window itself, also call the
@@ -1756,8 +1756,8 @@ bool SfxDockingWindow::Notify( NotifyEvent& rEvt )
}
else if ( rEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && !HasChildPathFocus() )
{
- pBindings->SetActiveFrame( NULL );
- if (pMgr != NULL)
+ pBindings->SetActiveFrame( nullptr );
+ if (pMgr != nullptr)
pMgr->Deactivate_Impl();
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index fa8db6c62f8b..540f8c2c9623 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -136,7 +136,7 @@ const OUString* GetLastFilterConfigId( FileDialogHelper::Context _eContext )
static const OUString aSI_EXPORT_IDENTIFIER("SiExportLastFilter");
static const OUString aSW_EXPORT_IDENTIFIER("SwExportLastFilter");
- const OUString* pRet = NULL;
+ const OUString* pRet = nullptr;
switch( _eContext )
{
@@ -206,7 +206,7 @@ void FileDialogHelper_Impl::handleFileSelectionChanged( const FilePickerEvent& )
void FileDialogHelper_Impl::handleDirectoryChanged( const FilePickerEvent& )
{
if ( mbShowPreview )
- TimeOutHdl_Impl( NULL );
+ TimeOutHdl_Impl( nullptr );
}
OUString FileDialogHelper_Impl::handleHelpRequested( const FilePickerEvent& aEvent )
@@ -271,7 +271,7 @@ OUString FileDialogHelper_Impl::handleHelpRequested( const FilePickerEvent& aEve
OUString aHelpText;
Help* pHelp = Application::GetHelp();
if ( pHelp )
- aHelpText = pHelp->GetHelpText( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), NULL );
+ aHelpText = pHelp->GetHelpText( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), nullptr );
return aHelpText;
}
@@ -297,7 +297,7 @@ void FileDialogHelper_Impl::handleControlStateChanged( const FilePickerEvent& aE
void FileDialogHelper_Impl::handleDialogSizeChanged()
{
if ( mbShowPreview )
- TimeOutHdl_Impl( NULL );
+ TimeOutHdl_Impl( nullptr );
}
// XEventListener Methods
@@ -366,7 +366,7 @@ const SfxFilter* FileDialogHelper_Impl::getCurentSfxFilter()
{
OUString aFilterName = getCurrentFilterUIName();
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
if ( mpMatcher && !aFilterName.isEmpty() )
pFilter = mpMatcher->GetFilter4UIName( aFilterName, m_nMustFlags, m_nDontFlags );
@@ -586,7 +586,7 @@ void FileDialogHelper_Impl::updatePreviewState( bool _bUpdatePreviewWindow )
xFilePreview->setShowState( mbShowPreview );
if ( _bUpdatePreviewWindow )
- TimeOutHdl_Impl( NULL );
+ TimeOutHdl_Impl( nullptr );
}
}
catch( const Exception& )
@@ -769,14 +769,14 @@ ErrCode FileDialogHelper_Impl::getGraphic( const OUString& rURL,
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( rURL, StreamMode::READ );
if( pStream )
- nRet = mpGraphicFilter->ImportGraphic( rGraphic, rURL, *pStream, nFilter, NULL, nFilterImportFlags );
+ nRet = mpGraphicFilter->ImportGraphic( rGraphic, rURL, *pStream, nFilter, nullptr, nFilterImportFlags );
else
- nRet = mpGraphicFilter->ImportGraphic( rGraphic, aURLObj, nFilter, NULL, nFilterImportFlags );
+ nRet = mpGraphicFilter->ImportGraphic( rGraphic, aURLObj, nFilter, nullptr, nFilterImportFlags );
delete pStream;
}
else
{
- nRet = mpGraphicFilter->ImportGraphic( rGraphic, aURLObj, nFilter, NULL, nFilterImportFlags );
+ nRet = mpGraphicFilter->ImportGraphic( rGraphic, aURLObj, nFilter, nullptr, nFilterImportFlags );
}
return nRet;
@@ -857,7 +857,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
:m_nDialogType ( nDialogType )
,meContext ( FileDialogHelper::UNKNOWN_CONTEXT )
{
- const char* pServiceName=0;
+ const char* pServiceName=nullptr;
switch (nDialog)
{
case SFX2_IMPL_DIALOG_SYSTEM:
@@ -909,9 +909,9 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
m_nMustFlags = SfxFilterFlags::EXPORT;
- mpMatcher = NULL;
- mpGraphicFilter = NULL;
- mnPostUserEventId = 0;
+ mpMatcher = nullptr;
+ mpGraphicFilter = nullptr;
+ mnPostUserEventId = nullptr;
// create the picker component
mxFileDlg.set(xFactory->createInstance( aService ), css::uno::UNO_QUERY);
@@ -1121,7 +1121,7 @@ FileDialogHelper_Impl::~FileDialogHelper_Impl()
// Remove user event if we haven't received it yet
if ( mnPostUserEventId )
Application::RemoveUserEvent( mnPostUserEventId );
- mnPostUserEventId = 0;
+ mnPostUserEventId = nullptr;
delete mpGraphicFilter;
@@ -1166,7 +1166,7 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con
IMPL_LINK_NOARG_TYPED( FileDialogHelper_Impl, InitControls, void*, void )
{
- mnPostUserEventId = 0;
+ mnPostUserEventId = nullptr;
enablePasswordBox( true );
updateFilterOptionsBox( );
updateSelectionBox( );
@@ -1375,7 +1375,7 @@ ErrCode FileDialogHelper_Impl::execute( std::vector<OUString>& rpURLList,
if( mbHasPassword )
{
const SfxBoolItem* pPassItem = SfxItemSet::GetItem<SfxBoolItem>(rpSet, SID_PASSWORDINTERACTION, false);
- mbPwdCheckBoxState = ( pPassItem != NULL && pPassItem->GetValue() );
+ mbPwdCheckBoxState = ( pPassItem != nullptr && pPassItem->GetValue() );
// in case the document has password to modify, the dialog should be shown
const SfxUnoAnyItem* pPassToModifyItem = SfxItemSet::GetItem<SfxUnoAnyItem>(rpSet, SID_MODIFYPASSWORDINFO, false);
@@ -2236,7 +2236,7 @@ FileDialogHelper::FileDialogHelper(
const css::uno::Sequence< OUString >& rBlackList)
: m_nError(0)
{
- mpImp = new FileDialogHelper_Impl( this, nDialogType, nFlags, nDialog, NULL, rStandardDir, rBlackList );
+ mpImp = new FileDialogHelper_Impl( this, nDialogType, nFlags, nDialog, nullptr, rStandardDir, rBlackList );
mxImp = mpImp;
// create the list of filters
@@ -2602,7 +2602,7 @@ ErrCode FileOpenDialog_Impl( sal_Int16 nDialogType,
ErrCode RequestPassword(const SfxFilter* pCurrentFilter, OUString& aURL, SfxItemSet* pSet)
{
- uno::Reference < task::XInteractionHandler2 > xInteractionHandler = task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), 0 );
+ uno::Reference < task::XInteractionHandler2 > xInteractionHandler = task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr );
// TODO: need a save way to distinguish MS filters from other filters
// for now MS-filters are the only alien filters that support encryption
bool bMSType = !pCurrentFilter->IsOwnFormat();
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index 9d50903d51da..f4a49efdd20d 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -175,7 +175,7 @@ namespace sfx2
const short nDialogType,
sal_Int64 nFlags,
sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG,
- vcl::Window* _pPreferredParentWindow = NULL,
+ vcl::Window* _pPreferredParentWindow = nullptr,
const OUString& sStandardDir = OUString(),
const css::uno::Sequence< OUString >& rBlackList = css::uno::Sequence< OUString >()
);
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index 3fb2ff5ea7b8..c9a3d4310c1a 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -899,10 +899,10 @@ namespace sfx2
const SfxFilter* TSortedFilterList::impl_getFilter(sal_Int32 nIndex)
{
if (nIndex<0 || nIndex>=(sal_Int32)m_lFilters.size())
- return 0;
+ return nullptr;
const OUString& sFilterName = m_lFilters[nIndex];
if (sFilterName.isEmpty())
- return 0;
+ return nullptr;
return SfxFilter::GetFilterByName(sFilterName);
}
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index a88aaf774255..fbf1e4f21740 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -275,7 +275,7 @@ SfxInfoBarWindow* SfxInfoBarContainerWindow::getInfoBar(const OUString& sId)
if ((*it)->getId() == sId)
return it->get();
}
- return NULL;
+ return nullptr;
}
void SfxInfoBarContainerWindow::removeInfoBar(SfxInfoBarWindow* pInfoBar)
diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx
index 832766028963..54446c61d5dc 100644
--- a/sfx2/source/dialog/itemconnect.cxx
+++ b/sfx2/source/dialog/itemconnect.cxx
@@ -52,7 +52,7 @@ bool ItemWrapperHelper::IsKnownItem( const SfxItemSet& rItemSet, sal_uInt16 nSlo
const SfxPoolItem* ItemWrapperHelper::GetUniqueItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
{
sal_uInt16 nWhich = GetWhichId( rItemSet, nSlot );
- return (rItemSet.GetItemState( nWhich ) >= SfxItemState::DEFAULT) ? rItemSet.GetItem( nWhich ) : 0;
+ return (rItemSet.GetItemState( nWhich ) >= SfxItemState::DEFAULT) ? rItemSet.GetItem( nWhich ) : nullptr;
}
const SfxPoolItem& ItemWrapperHelper::GetDefaultItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot )
@@ -95,7 +95,7 @@ void DummyWindowWrapper::SetControlDontKnow( bool )
void* DummyWindowWrapper::GetControlValue() const
{
- return 0;
+ return nullptr;
}
void DummyWindowWrapper::SetControlValue( void* )
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 95ff121dbfd3..86771ec52a35 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -477,7 +477,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
// This makes it possible to store the file for "send document as e-mail"
// with the original file name. We cannot use the original file as
// some mail programs need exclusive access.
- ::utl::TempFile aTempDir( NULL, true );
+ ::utl::TempFile aTempDir( nullptr, true );
INetURLObject aFilePathObj( aTempDir.GetURL() );
aFilePathObj.insertName( aFileName );
@@ -649,9 +649,9 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
}
SfxMailModel::SfxMailModel() :
- mpToList ( NULL ),
- mpCcList ( NULL ),
- mpBccList ( NULL )
+ mpToList ( nullptr ),
+ mpCcList ( nullptr ),
+ mpBccList ( nullptr )
{
}
@@ -667,7 +667,7 @@ void SfxMailModel::AddAddress( const OUString& rAddress, AddressRole eRole )
// don't add a empty address
if ( !rAddress.isEmpty() )
{
- AddressList_Impl* pList = NULL;
+ AddressList_Impl* pList = nullptr;
if ( ROLE_TO == eRole )
{
if ( !mpToList )
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index bbd0a5af11e6..0c69f24a4ac7 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -51,7 +51,7 @@
SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const SfxItemSet& rAttrSet)
: SfxTabPage(pParent, "ManageStylePage", "sfx/ui/managestylepage.ui", &rAttrSet)
, pStyle(&static_cast<SfxStyleDialog*>(GetParentDialog())->GetStyleSheet())
- , pItem(0)
+ , pItem(nullptr)
, bModified(false)
, aName(pStyle->GetName())
, aFollow(pStyle->GetFollow())
@@ -99,7 +99,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx
OSL_ENSURE( pResMgr, "No ResMgr in Module" );
pFamilies = new SfxStyleFamilies( ResId( DLG_STYLE_DESIGNER, *pResMgr ) );
- SfxStyleSheetBasePool* pPool = 0;
+ SfxStyleSheetBasePool* pPool = nullptr;
SfxObjectShell* pDocShell = SfxObjectShell::Current();
if ( pDocShell )
@@ -223,7 +223,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx
if ( !m_pFilterLb->GetEntryCount() || !pStyle->IsUserDefined() )
{
- pItem = 0;
+ pItem = nullptr;
m_pFilterFt->Disable();
m_pFilterLb->Disable();
}
@@ -259,8 +259,8 @@ void SfxManageStyleSheetPage::dispose()
m_pNameRw->SetGetFocusHdl( Link<Control&,void>() );
m_pNameRw->SetLoseFocusHdl( Link<Control&,void>() );
delete pFamilies;
- pItem = 0;
- pStyle = 0;
+ pItem = nullptr;
+ pStyle = nullptr;
m_pNameRo.clear();
m_pNameRw.clear();
m_pAutoCB.clear();
@@ -398,7 +398,7 @@ bool SfxManageStyleSheetPage::Execute_Impl(
if ( !rRefStr.isEmpty() )
pItems[ nCount++ ] = &aRefName;
- pItems[ nCount++ ] = 0;
+ pItems[ nCount++ ] = nullptr;
sal_uInt16 nModi = pModifier ? *pModifier : 0;
const SfxPoolItem* mpItem = rDispatcher.Execute(
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index d5f738f2b131..08dfbe6228b3 100644
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -85,7 +85,7 @@ SfxPartChildWnd_Impl::~SfxPartChildWnd_Impl()
SfxPartDockWnd_Impl* pWin = static_cast<SfxPartDockWnd_Impl*>(GetWindow());
if ( pWin && xFrame == pWin->GetBindings().GetActiveFrame() )
- pWin->GetBindings().SetActiveFrame( NULL );
+ pWin->GetBindings().SetActiveFrame( nullptr );
}
bool SfxPartChildWnd_Impl::QueryClose()
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index c5397355aebd..0bc687c7842e 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -172,7 +172,7 @@ void SfxPasswordDialog::SetMinLen( sal_uInt16 nLen )
{
mnMinLen = nLen;
SetPasswdText();
- ModifyHdl( NULL );
+ ModifyHdl( nullptr );
}
void SfxPasswordDialog::ShowMinLengthText(bool bShow)
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index a78cbf679ff6..e68ab4cd6827 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -266,7 +266,7 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt
{
pCurrentOptions->SetPDFAsStandardPrintJobFormat( m_pPDFCB->IsChecked() );
svtools::executeRestartDialog(
- comphelper::getProcessComponentContext(), 0,
+ comphelper::getProcessComponentContext(), nullptr,
svtools::RESTART_REASON_PDF_AS_STANDARD_JOB_FORMAT);
}
}
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 8236a6ed50ba..29ff9e2a551c 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -434,7 +434,7 @@ bool SfxSecurityPage::FillItemSet( SfxItemSet * rItemSet )
{
bool bModified = false;
DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" );
- if (m_pImpl.get() != 0)
+ if (m_pImpl.get() != nullptr)
bModified = m_pImpl->FillItemSet_Impl( *rItemSet );
return bModified;
}
@@ -443,7 +443,7 @@ bool SfxSecurityPage::FillItemSet( SfxItemSet * rItemSet )
void SfxSecurityPage::Reset( const SfxItemSet * rItemSet )
{
DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" );
- if (m_pImpl.get() != 0)
+ if (m_pImpl.get() != nullptr)
m_pImpl->Reset_Impl( *rItemSet );
}
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index e3e38b29dd0d..567fdee700c8 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -205,8 +205,8 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl,
pDockArr( new SfxDockArr_Impl ),
bLocked(false),
bPinned(true),
- pEmptyWin(NULL),
- pActive(NULL)
+ pEmptyWin(nullptr),
+ pActive(nullptr)
{
if ( bWithButtons )
{
@@ -267,7 +267,7 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl,
for ( sal_uInt16 n=0; n<nCount; n++ )
{
SfxDock_Impl *pDock = new SfxDock_Impl;
- pDock->pWin = 0;
+ pDock->pWin = nullptr;
pDock->bNewLine = false;
pDock->bHide = true;
pDock->nType = (sal_uInt16) aWinData.getToken(i++, ',').toInt32();
@@ -316,7 +316,7 @@ void SfxSplitWindow::dispose()
{
// Set pOwner to NULL, otherwise try to delete pEmptyWin once more. The
// window that is just being docked is always deleted from the outside.
- pEmptyWin->pOwner = NULL;
+ pEmptyWin->pOwner = nullptr;
}
pEmptyWin.disposeAndClear();
@@ -472,7 +472,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
sal_uInt16 nPos = 0;
bool bNewLine = true;
bool bSaveConfig = false;
- SfxDock_Impl *pFoundDock=0;
+ SfxDock_Impl *pFoundDock=nullptr;
sal_uInt16 nCount = pDockArr->size();
for ( sal_uInt16 n=0; n<nCount; n++ )
{
@@ -842,7 +842,7 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, bool bHide )
SfxDock_Impl& rDock = (*pDockArr)[n];
if ( rDock.nType == pDockWin->GetType() )
{
- rDock.pWin = 0;
+ rDock.pWin = nullptr;
rDock.bHide = bHide;
break;
}
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index 8a57056e4c7d..d0e953011f98 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -68,7 +68,7 @@ SearchDialog::~SearchDialog()
void SearchDialog::dispose()
{
SaveConfig();
- m_aCloseHdl.Call( NULL );
+ m_aCloseHdl.Call( nullptr );
m_pSearchEdit.clear();
m_pWholeWordsBox.clear();
m_pMatchCaseBox.clear();
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index d96b80ba07ac..e6711fb9cc9d 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -51,7 +51,7 @@ SfxStyleDialog::SfxStyleDialog
if (!rStyle.HasParentSupport())
RemoveStandardButton();
- m_nOrganizerId = AddTabPage("organizer", SfxManageStyleSheetPage::Create, 0);
+ m_nOrganizerId = AddTabPage("organizer", SfxManageStyleSheetPage::Create, nullptr);
// With new template always set the management page as the current page
@@ -83,8 +83,8 @@ SfxStyleDialog::~SfxStyleDialog()
void SfxStyleDialog::dispose()
{
- pExampleSet = 0;
- pStyle = 0;
+ pExampleSet = nullptr;
+ pStyle = nullptr;
SfxTabDialog::dispose();
}
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index b1ab185a0f15..b2575dae91be 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -71,7 +71,7 @@ struct Data_Impl
nId ( Id ),
fnCreatePage( fnPage ),
fnGetRanges ( fnRanges ),
- pTabPage ( 0 ),
+ pTabPage ( nullptr ),
bOnDemand ( bDemand ),
bRefresh ( false )
{
@@ -105,7 +105,7 @@ SfxPoolItem* SfxTabDialogItem::Clone(SfxItemPool* pToPool) const
SfxPoolItem* SfxTabDialogItem::Create(SvStream& /*rStream*/, sal_uInt16 /*nVersion*/) const
{
OSL_FAIL( "Use it only in UI!" );
- return NULL;
+ return nullptr;
}
typedef std::vector<Data_Impl*> SfxTabDlgData_Impl;
@@ -131,7 +131,7 @@ struct TabDlg_Impl
};
-static Data_Impl* Find( const SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt16* pPos = 0)
+static Data_Impl* Find( const SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt16* pPos = nullptr)
{
const sal_uInt16 nCount = rArr.size();
@@ -146,7 +146,7 @@ static Data_Impl* Find( const SfxTabDlgData_Impl& rArr, sal_uInt16 nId, sal_uInt
return pObj;
}
}
- return 0;
+ return nullptr;
}
void SfxTabPage::SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame)
@@ -178,7 +178,7 @@ SfxTabPage::~SfxTabPage()
void SfxTabPage::dispose()
{
delete pImpl;
- pImpl = NULL;
+ pImpl = nullptr;
TabPage::dispose();
}
@@ -258,7 +258,7 @@ const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot
{
const SfxItemPool* pPool = rSet.GetPool();
sal_uInt16 nWh = pPool->GetWhich( nSlot, bDeep );
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
rSet.GetItemState( nWh, true, &pItem );
if ( !pItem && nWh != nSlot )
@@ -279,7 +279,7 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
{
const SfxItemSet& rOldSet = GetItemSet();
sal_uInt16 nWh = GetWhich( nSlot, bDeep );
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if ( pImpl->mbStandard && rOldSet.GetParent() )
pItem = GetItem( *rOldSet.GetParent(), nSlot );
@@ -323,13 +323,13 @@ SfxTabDialog::SfxTabDialog
)
: TabDialog(pParent, rID, rUIXMLDescription)
, pFrame(pViewFrame)
- , pSet(pItemSet ? new SfxItemSet(*pItemSet) : 0)
- , pOutSet(0)
- , pRanges(0)
+ , pSet(pItemSet ? new SfxItemSet(*pItemSet) : nullptr)
+ , pOutSet(nullptr)
+ , pRanges(nullptr)
, nAppPageId(USHRT_MAX)
, bItemsReset(false)
, bStandardPushed(false)
- , pExampleSet(0)
+ , pExampleSet(nullptr)
{
Init_Impl(bEditFmt);
}
@@ -351,14 +351,14 @@ SfxTabDialog::SfxTabDialog
bool bEditFmt // when yes -> additional Button for standard
)
: TabDialog(pParent, rID, rUIXMLDescription)
- , pFrame(0)
- , pSet(pItemSet ? new SfxItemSet(*pItemSet) : 0)
- , pOutSet(0)
- , pRanges(0)
+ , pFrame(nullptr)
+ , pSet(pItemSet ? new SfxItemSet(*pItemSet) : nullptr)
+ , pOutSet(nullptr)
+ , pRanges(nullptr)
, nAppPageId(USHRT_MAX)
, bItemsReset(false)
, bStandardPushed(false)
- , pExampleSet(0)
+ , pExampleSet(nullptr)
{
Init_Impl(bEditFmt);
SAL_INFO( "sfx.config", "Please use the Construtor with the ViewFrame" );
@@ -404,19 +404,19 @@ void SfxTabDialog::dispose()
pDataObject->pTabPage.disposeAndClear();
}
delete pDataObject;
- pDataObject = NULL;
+ pDataObject = nullptr;
}
delete pImpl;
- pImpl = NULL;
+ pImpl = nullptr;
delete pSet;
- pSet = NULL;
+ pSet = nullptr;
delete pOutSet;
- pOutSet = NULL;
+ pOutSet = nullptr;
delete pExampleSet;
- pExampleSet = NULL;
+ pExampleSet = nullptr;
delete [] pRanges;
- pRanges = NULL;
+ pRanges = nullptr;
if (m_bOwnsBaseFmtBtn)
m_pBaseFmtBtn.disposeAndClear();
@@ -614,7 +614,7 @@ void SfxTabDialog::Start_Impl()
void SfxTabDialog::AddTabPage( sal_uInt16 nId, const OUString &rRiderText, bool bItemsOnDemand, sal_uInt16 nPos )
{
- AddTabPage( nId, rRiderText, 0, 0, bItemsOnDemand, nPos );
+ AddTabPage( nId, rRiderText, nullptr, nullptr, bItemsOnDemand, nPos );
}
/*
@@ -782,7 +782,7 @@ SfxTabPage* SfxTabDialog::GetTabPage( sal_uInt16 nPageId ) const
if ( pDataObject )
return pDataObject->pTabPage;
- return NULL;
+ return nullptr;
}
void SfxTabDialog::SavePosAndId()
@@ -959,7 +959,7 @@ bool SfxTabDialog::PrepareLeaveCurrentPage()
if ( pPage->HasExchangeSupport() )
nRet = pPage->DeactivatePage( &aTmp );
else
- nRet = pPage->DeactivatePage( NULL );
+ nRet = pPage->DeactivatePage( nullptr );
if ( ( SfxTabPage::LEAVE_PAGE & nRet ) == SfxTabPage::LEAVE_PAGE
&& aTmp.Count() )
@@ -969,7 +969,7 @@ bool SfxTabDialog::PrepareLeaveCurrentPage()
}
}
else
- nRet = pPage->DeactivatePage( NULL );
+ nRet = pPage->DeactivatePage( nullptr );
bEnd = nRet;
}
@@ -1146,7 +1146,7 @@ IMPL_LINK_TYPED( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl, void )
// Create TabPage if possible:
if ( !pTabPage )
{
- const SfxItemSet* pTmpSet = 0;
+ const SfxItemSet* pTmpSet = nullptr;
if ( pSet )
{
@@ -1250,7 +1250,7 @@ IMPL_LINK_TYPED( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl, bool )
if ( pPage->HasExchangeSupport() )
nRet = pPage->DeactivatePage( &aTmp );
else
- nRet = pPage->DeactivatePage( NULL );
+ nRet = pPage->DeactivatePage( nullptr );
if ( ( SfxTabPage::LEAVE_PAGE & nRet ) == SfxTabPage::LEAVE_PAGE &&
aTmp.Count() )
{
@@ -1271,7 +1271,7 @@ IMPL_LINK_TYPED( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl, bool )
nRet = pPage->DeactivatePage( pExampleSet );
}
else
- nRet = pPage->DeactivatePage( NULL );
+ nRet = pPage->DeactivatePage( nullptr );
}
if ( nRet & SfxTabPage::REFRESH_SET )
@@ -1387,9 +1387,9 @@ void SfxTabDialog::SetInputSet( const SfxItemSet* pInSet )
*/
{
- bool bSet = ( pSet != NULL );
+ bool bSet = ( pSet != nullptr );
delete pSet;
- pSet = pInSet ? new SfxItemSet(*pInSet) : 0;
+ pSet = pInSet ? new SfxItemSet(*pInSet) : nullptr;
if (!bSet && !pExampleSet && !pOutSet && pSet)
{
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index e73b79c9e18f..434e986c9274 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -495,7 +495,7 @@ namespace sfx2
Reference< XAccessible > CustomToolPanel::CreatePanelAccessible( const Reference< XAccessible >& i_rParentAccessible )
{
- ENSURE_OR_RETURN( m_aCustomPanel.is(), "no panel to ask!", NULL );
+ ENSURE_OR_RETURN( m_aCustomPanel.is(), "no panel to ask!", nullptr );
Reference< XAccessible > xPanelAccessible;
try
@@ -671,7 +671,7 @@ namespace sfx2
{
const ::svt::PDeckLayouter pLayouter( m_aPanelDeck->GetLayouter() );
const ::svt::DrawerDeckLayouter* pDrawerLayouter = dynamic_cast< const ::svt::DrawerDeckLayouter* >( pLayouter.get() );
- if ( pDrawerLayouter != NULL )
+ if ( pDrawerLayouter != nullptr )
// already have the proper layout
return;
m_aPanelDeck->SetLayouter( new ::svt::DrawerDeckLayouter( *m_aPanelDeck.get(), *m_aPanelDeck.get() ) );
@@ -682,7 +682,7 @@ namespace sfx2
{
::svt::PDeckLayouter pLayouter( m_aPanelDeck->GetLayouter() );
::svt::TabDeckLayouter* pTabLayouter = dynamic_cast< ::svt::TabDeckLayouter* >( pLayouter.get() );
- if ( ( pTabLayouter != NULL )
+ if ( ( pTabLayouter != nullptr )
&& ( pTabLayouter->GetTabAlignment() == i_eTabAlignment )
&& ( pTabLayouter->GetTabItemContent() == i_eTabContent )
)
@@ -1171,7 +1171,7 @@ namespace sfx2
{
::std::unique_ptr<PopupMenu> pMenu( new PopupMenu );
FloatingWindow* pMenuWindow = static_cast< FloatingWindow* >( pMenu->GetWindow() );
- if ( pMenuWindow != NULL )
+ if ( pMenuWindow != nullptr )
{
pMenuWindow->SetPopupModeFlags ( pMenuWindow->GetPopupModeFlags() | FloatWinPopupFlags::NoMouseUpClose );
}
diff --git a/sfx2/source/dialog/templateinfodlg.cxx b/sfx2/source/dialog/templateinfodlg.cxx
index fc2de4f7b449..379d7047f2f3 100644
--- a/sfx2/source/dialog/templateinfodlg.cxx
+++ b/sfx2/source/dialog/templateinfodlg.cxx
@@ -76,7 +76,7 @@ void SfxTemplateInfoDlg::loadDocument(const OUString &rURL)
try
{
uno::Reference<task::XInteractionHandler2> xInteractionHandler(
- task::InteractionHandler::createWithParent(xContext, 0) );
+ task::InteractionHandler::createWithParent(xContext, nullptr) );
uno::Sequence<beans::PropertyValue> aProps(1);
aProps[0].Name = "InteractionHandler";
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 2f26a82a0c8b..edf73b61c9ee 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -106,7 +106,7 @@ public:
StyleLBoxString::StyleLBoxString(SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& sText, const SfxStyleFamily& eStyleFamily)
: SvLBoxString(pEntry, nFlags, sText)
, meStyleFamily(eStyleFamily)
- , mpViewData(NULL)
+ , mpViewData(nullptr)
{}
StyleLBoxString::~StyleLBoxString()
@@ -204,7 +204,7 @@ public:
// Signal that the dialog was deleted
void signal()
{
- m_pDialog = 0;
+ m_pDialog = nullptr;
if (m_pPrevious)
m_pPrevious->signal();
}
@@ -212,7 +212,7 @@ public:
// Return true if the dialog was deleted
operator bool_type() const
{
- return m_pDialog ? 0 : &DeletionWatcher::signal;
+ return m_pDialog ? nullptr : &DeletionWatcher::signal;
}
private:
@@ -224,7 +224,7 @@ void DropListBox_Impl::MouseButtonDown( const MouseEvent& rMEvt )
{
nModifier = rMEvt.GetModifier();
- bool bHitEmptySpace = ( NULL == GetEntry( rMEvt.GetPosPixel(), true ) );
+ bool bHitEmptySpace = ( nullptr == GetEntry( rMEvt.GetPosPixel(), true ) );
if( bHitEmptySpace && ( rMEvt.GetClicks() == 2 ) && rMEvt.IsMod1() )
Control::MouseButtonDown( rMEvt );
else
@@ -268,7 +268,7 @@ sal_Int8 DropListBox_Impl::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
if ( aDesc.maClassName == pDocShell->GetFactory().GetClassId() )
{
- PostUserEvent( LINK( this, DropListBox_Impl, OnAsyncExecuteDrop ), 0, true );
+ PostUserEvent( LINK( this, DropListBox_Impl, OnAsyncExecuteDrop ), nullptr, true );
bFormatFound = true;
nRet = rEvt.mnAction;
@@ -299,7 +299,7 @@ bool DropListBox_Impl::Notify( NotifyEvent& rNEvt )
{
if( pDialog->bCanDel && KEY_DELETE == rKeyCode.GetCode())
{
- pDialog->DeleteHdl( NULL );
+ pDialog->DeleteHdl( nullptr );
bRet = true;
}
else if( KEY_RETURN == rKeyCode.GetCode())
@@ -348,7 +348,7 @@ SfxTemplatePanelControl::SfxTemplatePanelControl(SfxBindings* pBindings, vcl::Wi
, pImpl(new SfxTemplateDialog_Impl(pBindings, this))
, mpBindings(pBindings)
{
- OSL_ASSERT(mpBindings!=NULL);
+ OSL_ASSERT(mpBindings!=nullptr);
pImpl->updateNonFamilyImages();
@@ -512,13 +512,13 @@ void StyleTreeListBox_Impl::ExpandedHdl()
SvTreeListEntry *pEntry = GetHdlEntry();
if(!IsExpanded(pEntry) && pCurEntry != GetCurEntry())
SelectAll( false );
- pCurEntry = 0;
+ pCurEntry = nullptr;
}
/** Constructor StyleTreeListBox_Impl */
StyleTreeListBox_Impl::StyleTreeListBox_Impl(SfxCommonTemplateDialog_Impl* pParent, WinBits nWinStyle)
: DropListBox_Impl(pParent->GetWindow(), nWinStyle, pParent)
- , pCurEntry(0)
+ , pCurEntry(nullptr)
{
EnableContextMenuHandling();
}
@@ -662,15 +662,15 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, vcl
: mbIgnoreSelect(false)
, pBindings(pB)
, pWindow(pW)
- , pModule(NULL)
- , pIdle(NULL)
- , m_pStyleFamiliesId(NULL)
- , pStyleFamilies(NULL)
- , pStyleSheetPool(NULL)
- , pTreeBox(NULL)
- , pCurObjShell(NULL)
+ , pModule(nullptr)
+ , pIdle(nullptr)
+ , m_pStyleFamiliesId(nullptr)
+ , pStyleFamilies(nullptr)
+ , pStyleSheetPool(nullptr)
+ , pTreeBox(nullptr)
+ , pCurObjShell(nullptr)
, xModuleManager(frame::ModuleManager::create(::comphelper::getProcessComponentContext()))
- , m_pDeletionWatcher(NULL)
+ , m_pDeletionWatcher(nullptr)
, aFmtLb( VclPtr<SfxActionListBox>::Create(this, WB_BORDER | WB_TABSTOP | WB_SORT | WB_QUICK_SEARCH) )
, aFilterLb( VclPtr<ListBox>::Create(pW, WB_BORDER | WB_DROPDOWN | WB_TABSTOP) )
@@ -726,12 +726,12 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
{
// Read global user resource
for(sal_uInt16 i = 0; i < MAX_FAMILIES; ++i)
- pFamilyState[i] = 0;
+ pFamilyState[i] = nullptr;
SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
pCurObjShell = pViewFrame->GetObjectShell();
- pModule = pCurObjShell ? pCurObjShell->GetModule() : NULL;
- ResMgr* pMgr = pModule ? pModule->GetResMgr() : NULL;
+ pModule = pCurObjShell ? pCurObjShell->GetModule() : nullptr;
+ ResMgr* pMgr = pModule ? pModule->GetResMgr() : nullptr;
if (pMgr)
{
ResId aFamId( DLG_STYLE_DESIGNER, *pMgr );
@@ -794,7 +794,7 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
pBindings->LEAVEREGISTRATIONS();
for(; i < COUNT_BOUND_FUNC; ++i)
- pBoundItems[i] = 0;
+ pBoundItems[i] = nullptr;
StartListening(*pBindings);
@@ -836,13 +836,13 @@ void SfxCommonTemplateDialog_Impl::ClearResource()
void SfxCommonTemplateDialog_Impl::impl_clear()
{
delete pStyleFamilies;
- pStyleFamilies = NULL;
+ pStyleFamilies = nullptr;
sal_uInt16 i;
for ( i = 0; i < MAX_FAMILIES; ++i )
DELETEX(SfxTemplateItem, pFamilyState[i]);
for ( i = 0; i < COUNT_BOUND_FUNC; ++i )
delete pBoundItems[i];
- pCurObjShell = NULL;
+ pCurObjShell = nullptr;
DELETEZ( m_pStyleFamiliesId );
}
@@ -889,7 +889,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
impl_clear();
if ( pStyleSheetPool )
EndListening(*pStyleSheetPool);
- pStyleSheetPool = NULL;
+ pStyleSheetPool = nullptr;
pTreeBox.disposeAndClear();
delete pIdle;
if ( m_pDeletionWatcher )
@@ -938,13 +938,13 @@ const SfxStyleFamilyItem *SfxCommonTemplateDialog_Impl::GetFamilyItem_Impl() con
if(nId == nActFamily)
return pItem;
}
- return 0;
+ return nullptr;
}
SfxStyleSheetBase *SfxCommonTemplateDialog_Impl::GetSelectedStyle() const
{
if (!IsInitialized() || !pStyleSheetPool || !HasSelectedStyle())
- return NULL;
+ return nullptr;
const OUString aTemplName( GetSelectedEntry() );
const SfxStyleFamilyItem* pItem = GetFamilyItem_Impl();
return pStyleSheetPool->Find( aTemplName, pItem->GetFamily() );
@@ -958,8 +958,8 @@ SfxStyleSheetBase *SfxCommonTemplateDialog_Impl::GetSelectedStyle() const
*/
bool SfxCommonTemplateDialog_Impl::IsSafeForWaterCan() const
{
- if ( pTreeBox.get() != NULL )
- return pTreeBox->FirstSelected() != 0;
+ if ( pTreeBox.get() != nullptr )
+ return pTreeBox->FirstSelected() != nullptr;
else
return aFmtLb->GetSelectionCount() == 1;
}
@@ -1022,7 +1022,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const OUString &rStr)
aFmtLb->SelectAll(false);
aFmtLb->Select( pEntry );
bWaterDisabled = !IsSafeForWaterCan();
- FmtSelectHdl( NULL );
+ FmtSelectHdl( nullptr );
}
}
}
@@ -1133,7 +1133,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
bool SfxCommonTemplateDialog_Impl::HasSelectedStyle() const
{
- return pTreeBox? pTreeBox->FirstSelected() != 0:
+ return pTreeBox? pTreeBox->FirstSelected() != nullptr:
aFmtLb->GetSelectionCount() != 0;
}
@@ -1162,7 +1162,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
const SfxStyleFamily eFam = pItem->GetFamily();
- SfxFilterTupel* pT = ( nActFilter < pItem->GetFilterList().size() ? pItem->GetFilterList()[nActFilter] : NULL );
+ SfxFilterTupel* pT = ( nActFilter < pItem->GetFilterList().size() ? pItem->GetFilterList()[nActFilter] : nullptr );
sal_uInt16 nFilter = pT ? pT->nFlags : 0;
if(!nFilter) // automatic
nFilter = nAppFilter;
@@ -1193,7 +1193,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
{
nActFilter = 0;
aFilterLb->SelectEntryPos(1);
- SfxFilterTupel* pActT = ( nActFilter < rFilter.size() ) ? rFilter[ nActFilter ] : NULL;
+ SfxFilterTupel* pActT = ( nActFilter < rFilter.size() ) ? rFilter[ nActFilter ] : nullptr;
sal_uInt16 nFilterFlags = pActT ? pActT->nFlags : 0;
pStyleSheetPool->SetSearchMask(eFam, nFilterFlags);
}
@@ -1259,7 +1259,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
for(nPos = 0; nPos < nCount; ++nPos)
{
- SvTreeListEntry* pTreeListEntry = aFmtLb->InsertEntry(aStrings[nPos], 0, false, nPos);
+ SvTreeListEntry* pTreeListEntry = aFmtLb->InsertEntry(aStrings[nPos], nullptr, false, nPos);
if (officecfg::Office::Common::StylesAndFormatting::Preview::get())
{
std::unique_ptr<StyleLBoxString> pStyleLBoxString(
@@ -1292,7 +1292,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
// Updated display: Watering the house
void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
{
- bWaterDisabled = (pItem == 0);
+ bWaterDisabled = (pItem == nullptr);
if(!bWaterDisabled)
//make sure the watercan is only activated when there is (only) one selection
@@ -1350,7 +1350,7 @@ void SfxCommonTemplateDialog_Impl::SetFamilyState( sal_uInt16 nSlotId, const Sfx
void SfxCommonTemplateDialog_Impl::Update_Impl()
{
bool bDocChanged=false;
- SfxStyleSheetBasePool* pNewPool = NULL;
+ SfxStyleSheetBasePool* pNewPool = nullptr;
SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
SfxObjectShell* pDocShell = pViewFrame->GetObjectShell();
if( pDocShell )
@@ -1367,7 +1367,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
if ( pStyleSheetPool )
{
EndListening(*pStyleSheetPool);
- pStyleSheetPool = 0;
+ pStyleSheetPool = nullptr;
}
if ( pNewPool )
@@ -1389,9 +1389,9 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
// nothing is allowed
return;
- SfxTemplateItem *pItem = 0;
+ SfxTemplateItem *pItem = nullptr;
// current region not within the allowed region or default
- if(nActFamily == 0xffff || 0 == (pItem = pFamilyState[nActFamily-1] ) )
+ if(nActFamily == 0xffff || nullptr == (pItem = pFamilyState[nActFamily-1] ) )
{
CheckItem(nActFamily, false);
SfxTemplateItem **ppItem = pFamilyState;
@@ -1534,7 +1534,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
case SFX_HINT_DYING:
{
EndListening(*pStyleSheetPool);
- pStyleSheetPool=0;
+ pStyleSheetPool=nullptr;
break;
}
}
@@ -1574,7 +1574,7 @@ void SfxCommonTemplateDialog_Impl::FilterSelect(
nActFilter = nEntry;
SfxObjectShell *const pDocShell = SaveSelection();
SfxStyleSheetBasePool *pOldStyleSheetPool = pStyleSheetPool;
- pStyleSheetPool = pDocShell? pDocShell->GetStyleSheetPool(): 0;
+ pStyleSheetPool = pDocShell? pDocShell->GetStyleSheetPool(): nullptr;
if ( pOldStyleSheetPool != pStyleSheetPool )
{
if ( pOldStyleSheetPool )
@@ -1616,7 +1616,7 @@ bool SfxCommonTemplateDialog_Impl::Execute_Impl(
if ( !rRefStr.isEmpty() )
pItems[ nCount++ ] = &aRefName;
- pItems[ nCount++ ] = 0;
+ pItems[ nCount++ ] = nullptr;
DeletionWatcher aDeleted(*this);
sal_uInt16 nModi = pModifier ? *pModifier : 0;
@@ -2078,7 +2078,7 @@ void SfxCommonTemplateDialog_Impl::ResetFocus()
{
SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
SfxViewShell *pVu = pViewFrame->GetViewShell();
- vcl::Window *pAppWin = pVu ? pVu->GetWindow(): 0;
+ vcl::Window *pAppWin = pVu ? pVu->GetWindow(): nullptr;
if(pAppWin)
pAppWin->GrabFocus();
}
@@ -2094,14 +2094,14 @@ IMPL_LINK_NOARG_TYPED( SfxCommonTemplateDialog_Impl, TreeListApplyHdl, SvTreeLis
IMPL_LINK_NOARG_TYPED( SfxCommonTemplateDialog_Impl, ApplyHdl, LinkParamNone*, void )
{
// only if that region is allowed
- if ( IsInitialized() && 0 != pFamilyState[nActFamily-1] &&
+ if ( IsInitialized() && nullptr != pFamilyState[nActFamily-1] &&
!GetSelectedEntry().isEmpty() )
{
sal_uInt16 nModifier = aFmtLb->GetModifier();
Execute_Impl(SID_STYLE_APPLY,
GetSelectedEntry(), OUString(),
( sal_uInt16 )GetFamilyItem_Impl()->GetFamily(),
- 0, 0, &nModifier );
+ 0, nullptr, &nModifier );
}
ResetFocus();
}
@@ -2116,7 +2116,7 @@ IMPL_LINK_TYPED( SfxCommonTemplateDialog_Impl, FmtSelectHdl, SvTreeListBox *, pL
if ( IsInitialized() &&
IsCheckedItem(SID_STYLE_WATERCAN) &&
// only if that region is allowed
- 0 != pFamilyState[nActFamily-1] && (pTreeBox || aFmtLb->GetSelectionCount() <= 1) )
+ nullptr != pFamilyState[nActFamily-1] && (pTreeBox || aFmtLb->GetSelectionCount() <= 1) )
{
Execute_Impl(SID_STYLE_WATERCAN,
"", "", 0);
@@ -2161,11 +2161,11 @@ IMPL_LINK_TYPED( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu*, pMenu, bool
IMPL_LINK_NOARG_TYPED( SfxCommonTemplateDialog_Impl, MenuSelectAsyncHdl, void*, void )
{
switch(nLastItemId) {
- case ID_NEW: NewHdl(0); break;
- case ID_EDIT: EditHdl(0); break;
- case ID_DELETE: DeleteHdl(0); break;
- case ID_HIDE: HideHdl(0); break;
- case ID_SHOW: ShowHdl(0); break;
+ case ID_NEW: NewHdl(nullptr); break;
+ case ID_EDIT: EditHdl(nullptr); break;
+ case ID_DELETE: DeleteHdl(nullptr); break;
+ case ID_HIDE: HideHdl(nullptr); break;
+ case ID_SHOW: ShowHdl(nullptr); break;
}
}
@@ -2324,7 +2324,7 @@ void SfxTemplateDialog_Impl::LoadedFamilies()
void SfxTemplateDialog_Impl::Resize()
{
SfxDockingWindow* pDockingWindow = dynamic_cast<SfxDockingWindow*>(m_pFloat.get());
- FloatingWindow *pF = pDockingWindow!=NULL ? pDockingWindow->GetFloatingWindow() : NULL;
+ FloatingWindow *pF = pDockingWindow!=nullptr ? pDockingWindow->GetFloatingWindow() : nullptr;
if (pF)
{
m_bZoomIn = pF->IsRollUp();
@@ -2556,7 +2556,7 @@ void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl()
SfxObjectShell *pDocShell = pViewFrame->GetObjectShell();
SfxStyleSheetBasePool *pOldStyleSheetPool = pStyleSheetPool;
- pStyleSheetPool = pDocShell? pDocShell->GetStyleSheetPool(): 0;
+ pStyleSheetPool = pDocShell? pDocShell->GetStyleSheetPool(): nullptr;
if ( pOldStyleSheetPool != pStyleSheetPool )
{
if ( pOldStyleSheetPool )
@@ -2585,7 +2585,7 @@ void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl()
if (IsCheckedItem(SID_STYLE_WATERCAN) &&
// only if that area is allowed
- 0 != pFamilyState[nActFamily - 1])
+ nullptr != pFamilyState[nActFamily - 1])
{
Execute_Impl(SID_STYLE_APPLY,
GetSelectedEntry(),
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 42764ecab279..19b194db40ae 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -41,7 +41,7 @@ SfxTemplateControllerItem::SfxTemplateControllerItem(
SfxControllerItem(nSlotId, rBindings),
rTemplateDlg(rDlg),
nWaterCanState(0xff),
- nUserEventId(0)
+ nUserEventId(nullptr)
{
}
@@ -68,10 +68,10 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta
{
bool bAvailable = SfxItemState::DEFAULT == eState;
if ( !bAvailable )
- rTemplateDlg.SetFamilyState(GetId(), 0);
+ rTemplateDlg.SetFamilyState(GetId(), nullptr);
else {
const SfxTemplateItem *pStateItem = dynamic_cast< const SfxTemplateItem* >(pItem);
- DBG_ASSERT(pStateItem != 0, "SfxTemplateItem expected");
+ DBG_ASSERT(pStateItem != nullptr, "SfxTemplateItem expected");
rTemplateDlg.SetFamilyState( GetId(), pStateItem );
}
bool bDisable = eState == SfxItemState::DISABLED;
@@ -155,8 +155,8 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta
IMPL_LINK_NOARG_TYPED(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl, void*, void)
{
- nUserEventId = 0;
- SfxBoolItem* pState = 0;
+ nUserEventId = nullptr;
+ SfxBoolItem* pState = nullptr;
switch(nWaterCanState)
{
case 0 :
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 2114dd1ec0fc..02029f6486f6 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -191,9 +191,9 @@ void SfxVersionsTabListBox_Impl::setColSizes()
}
SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersionOnClose )
- : SfxModalDialog(NULL, "VersionsOfDialog", "sfx/ui/versionsofdialog.ui")
+ : SfxModalDialog(nullptr, "VersionsOfDialog", "sfx/ui/versionsofdialog.ui")
, pViewFrame(pVwFrame)
- , m_pTable(NULL)
+ , m_pTable(nullptr)
, m_bIsSaveVersionOnClose(bIsSaveVersionOnClose)
{
get(m_pSaveButton, "save");
@@ -377,13 +377,13 @@ IMPL_LINK_NOARG_TYPED(SfxVersionDialog, DClickHdl_Impl, SvTreeListBox*, bool)
IMPL_LINK_NOARG_TYPED(SfxVersionDialog, SelectHdl_Impl, SvTreeListBox*, void)
{
- bool bEnable = ( m_pVersionBox->FirstSelected() != NULL );
+ bool bEnable = ( m_pVersionBox->FirstSelected() != nullptr );
SfxObjectShell* pObjShell = pViewFrame->GetObjectShell();
m_pDeleteButton->Enable(bEnable && !pObjShell->IsReadOnly());
m_pOpenButton->Enable(bEnable);
m_pViewButton->Enable(bEnable);
- const SfxPoolItem *pDummy=NULL;
+ const SfxPoolItem *pDummy=nullptr;
pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_MERGE, pDummy );
SfxItemState eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_COMPARE, pDummy );
m_pCompareButton->Enable(bEnable && eState >= SfxItemState::DEFAULT);
@@ -410,7 +410,7 @@ IMPL_LINK_TYPED( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton, void )
pObjShell->SetModified();
const SfxPoolItem* aItems[2];
aItems[0] = &aComment;
- aItems[1] = NULL;
+ aItems[1] = nullptr;
pViewFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, aItems );
m_pVersionBox->SetUpdateMode( false );
m_pVersionBox->Clear();
@@ -524,9 +524,9 @@ IMPL_LINK_TYPED(SfxViewVersionDialog_Impl, ButtonHdl, Button*, pButton, void)
}
SfxCmisVersionsDialog::SfxCmisVersionsDialog ( SfxViewFrame* pVwFrame )
- : SfxModalDialog(NULL, "VersionsCmisDialog", "sfx/ui/versionscmis.ui")
+ : SfxModalDialog(nullptr, "VersionsCmisDialog", "sfx/ui/versionscmis.ui")
, pViewFrame(pVwFrame)
- , m_pTable(NULL)
+ , m_pTable(nullptr)
{
get(m_pOpenButton, "open");
get(m_pViewButton, "show");
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 6be319040305..eecca2634303 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -287,7 +287,7 @@ static void
addFile(struct DocumentMetadataAccess_Impl & i_rImpl,
uno::Reference<rdf::XURI> const& i_xType,
OUString const & i_rPath,
- const uno::Sequence < uno::Reference< rdf::XURI > > * i_pTypes = 0)
+ const uno::Sequence < uno::Reference< rdf::XURI > > * i_pTypes = nullptr)
{
try {
const uno::Reference<rdf::XURI> xURI( getURIForStream(
@@ -310,7 +310,7 @@ addFile(struct DocumentMetadataAccess_Impl & i_rImpl,
throw;
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
- "addFile: exception", /*this*/0, uno::makeAny(e));
+ "addFile: exception", /*this*/nullptr, uno::makeAny(e));
}
}
@@ -353,13 +353,13 @@ removeFile(struct DocumentMetadataAccess_Impl & i_rImpl,
getURI<rdf::URIs::PKG_HASPART>(i_rImpl.m_xContext),
i_xPart.get());
i_rImpl.m_xManifest->removeStatements(i_xPart.get(),
- getURI<rdf::URIs::RDF_TYPE>(i_rImpl.m_xContext), 0);
+ getURI<rdf::URIs::RDF_TYPE>(i_rImpl.m_xContext), nullptr);
} catch (const uno::RuntimeException &) {
throw;
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
"removeFile: exception",
- 0, uno::makeAny(e));
+ nullptr, uno::makeAny(e));
}
}
@@ -370,7 +370,7 @@ getAllParts(struct DocumentMetadataAccess_Impl & i_rImpl)
try {
const uno::Reference<container::XEnumeration> xEnum(
i_rImpl.m_xManifest->getStatements( i_rImpl.m_xBaseURI.get(),
- getURI<rdf::URIs::PKG_HASPART>(i_rImpl.m_xContext), 0),
+ getURI<rdf::URIs::PKG_HASPART>(i_rImpl.m_xContext), nullptr),
uno::UNO_SET_THROW);
while (xEnum->hasMoreElements()) {
rdf::Statement stmt;
@@ -388,7 +388,7 @@ getAllParts(struct DocumentMetadataAccess_Impl & i_rImpl)
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
"getAllParts: exception",
- 0, uno::makeAny(e));
+ nullptr, uno::makeAny(e));
}
}
@@ -410,7 +410,7 @@ isPartOfType(struct DocumentMetadataAccess_Impl & i_rImpl,
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
"isPartOfType: exception",
- 0, uno::makeAny(e));
+ nullptr, uno::makeAny(e));
}
}
@@ -449,7 +449,7 @@ handleError( ucb::InteractiveAugmentedIOException const & i_rException,
if (!i_xHandler.is()) {
throw lang::WrappedTargetException(
"DocumentMetadataAccess::loadMetadataFromStorage: exception",
- /* *this*/ 0, uno::makeAny(i_rException));
+ /* *this*/ nullptr, uno::makeAny(i_rException));
}
::rtl::Reference< ::comphelper::OInteractionRequest > pRequest(
@@ -473,7 +473,7 @@ handleError( ucb::InteractiveAugmentedIOException const & i_rException,
OSL_ENSURE(pAbort->wasSelected(), "no continuation selected?");
throw lang::WrappedTargetException(
"DocumentMetadataAccess::loadMetadataFromStorage: exception",
- /* *this*/ 0, uno::makeAny(i_rException));
+ /* *this*/ nullptr, uno::makeAny(i_rException));
}
}
@@ -589,7 +589,7 @@ retry:
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
"importFile: exception",
- 0, uno::makeAny(e));
+ nullptr, uno::makeAny(e));
}
}
@@ -712,7 +712,7 @@ retry:
i_rImpl.m_xManifest.set(xManifestGraph.is() ? xManifestGraph :
i_rImpl.m_xRepository->createGraph(xManifest), uno::UNO_SET_THROW);
const uno::Reference<container::XEnumeration> xEnum(
- i_rImpl.m_xManifest->getStatements(0,
+ i_rImpl.m_xManifest->getStatements(nullptr,
getURI<rdf::URIs::RDF_TYPE>(i_rImpl.m_xContext),
getURI<rdf::URIs::PKG_DOCUMENT>(i_rImpl.m_xContext).get()));
@@ -729,7 +729,7 @@ retry:
throw lang::WrappedTargetRuntimeException(
OUString(
"DocumentMetadataAccess::loadMetadataFromStorage: "
- "exception"), 0, rterr);
+ "exception"), nullptr, rterr);
}
if (err) {
@@ -752,7 +752,7 @@ static void init(struct DocumentMetadataAccess_Impl & i_rImpl)
getURI<rdf::URIs::PKG_DOCUMENT>(i_rImpl.m_xContext).get());
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
- "init: unexpected exception", 0,
+ "init: unexpected exception", nullptr,
uno::makeAny(e));
}
@@ -856,13 +856,13 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, std::exception)
const OUString baseURI( m_pImpl->m_xBaseURI->getStringValue() );
const OUString name( i_xURI->getStringValue() );
if (!name.match(baseURI)) {
- return 0;
+ return nullptr;
}
const OUString relName( name.copy(baseURI.getLength()) );
OUString path;
OUString idref;
if (!splitXmlId(relName, path, idref)) {
- return 0;
+ return nullptr;
}
return getElementByMetadataReference( beans::StringPair(path, idref) );
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 77cf9533aa39..f64da90a2146 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -297,7 +297,7 @@ public:
virtual bool IsInContent() const override { return m_isInContent; }
virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override
{ OSL_FAIL("MetadatableClipboard::MakeUnoObject"); throw; }
- void OriginNoLongerInBusinessAnymore() { m_pReg = 0; }
+ void OriginNoLongerInBusinessAnymore() { m_pReg = nullptr; }
};
// XmlIdRegistryClipboard --------------------------------------------
@@ -366,7 +366,7 @@ XmlIdRegistry::GetElementByMetadataReference(
{
Metadatable* pObject( LookupElement(i_rReference.First,
i_rReference.Second) );
- return pObject ? pObject->MakeUnoObject() : 0;
+ return pObject ? pObject->MakeUnoObject() : nullptr;
}
beans::StringPair
@@ -390,7 +390,7 @@ template< typename T >
/*static*/ OUString create_id(const
std::unordered_map< OUString, T, OUStringHash > & i_rXmlIdMap)
{
- static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != NULL);
+ static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr);
const OUString prefix(s_prefix);
typename std::unordered_map< OUString, T, OUStringHash >
::const_iterator iter;
@@ -512,7 +512,7 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElementList(
}
else
{
- return 0;
+ return nullptr;
}
}
@@ -524,7 +524,7 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElement(
if (!isValidXmlId(i_rStreamName, i_rIdref))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), 0, 0);
+ "illegal XmlId"), nullptr, 0);
}
const XmlIdList_t * pList( LookupElementList(i_rStreamName, i_rIdref) );
@@ -540,7 +540,7 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElement(
return *iter;
}
}
- return 0;
+ return nullptr;
}
bool
@@ -680,14 +680,14 @@ XmlIdRegistryDocument::TryRegisterMetadatable(Metadatable & i_rObject,
if (!isValidXmlId(i_rStreamName, i_rIdref))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), 0, 0);
+ "illegal XmlId"), nullptr, 0);
}
if (i_rObject.IsInContent()
? !isContentFile(i_rStreamName)
: !isStylesFile(i_rStreamName))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId: wrong stream"), 0, 0);
+ "illegal XmlId: wrong stream"), nullptr, 0);
}
OUString old_path;
@@ -964,7 +964,7 @@ rmIter(ClipboardXmlIdMap_t & i_rXmlIdMap,
? i_rIter->second.first : i_rIter->second.second;
if (rMeta == &i_rObject)
{
- rMeta = 0;
+ rMeta = nullptr;
}
if (!i_rIter->second.first && !i_rIter->second.second)
{
@@ -983,7 +983,7 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupEntry(
if (!isValidXmlId(i_rStreamName, i_rIdref))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), 0, 0);
+ "illegal XmlId"), nullptr, 0);
}
const ClipboardXmlIdMap_t::const_iterator iter( m_XmlIdMap.find(i_rIdref) );
@@ -997,7 +997,7 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupEntry(
}
else
{
- return 0;
+ return nullptr;
}
}
@@ -1007,7 +1007,7 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupElement(
const OUString & i_rIdref) const
{
Metadatable * const * ppEntry = LookupEntry(i_rStreamName, i_rIdref);
- return ppEntry ? *ppEntry : 0;
+ return ppEntry ? *ppEntry : nullptr;
}
bool
@@ -1060,8 +1060,8 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::TryInsertMetadatable(
else
{
m_XmlIdMap.insert(::std::make_pair(i_rIdref, bContent
- ? ::std::make_pair( &i_rObject, static_cast<Metadatable*>(0) )
- : ::std::make_pair( static_cast<Metadatable*>(0), &i_rObject )));
+ ? ::std::make_pair( &i_rObject, static_cast<Metadatable*>(nullptr) )
+ : ::std::make_pair( static_cast<Metadatable*>(nullptr), &i_rObject )));
return true;
}
}
@@ -1112,14 +1112,14 @@ XmlIdRegistryClipboard::TryRegisterMetadatable(Metadatable & i_rObject,
if (!isValidXmlId(i_rStreamName, i_rIdref))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), 0, 0);
+ "illegal XmlId"), nullptr, 0);
}
if (i_rObject.IsInContent()
? !isContentFile(i_rStreamName)
: !isStylesFile(i_rStreamName))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId: wrong stream"), 0, 0);
+ "illegal XmlId: wrong stream"), nullptr, 0);
}
OUString old_path;
@@ -1177,8 +1177,8 @@ XmlIdRegistryClipboard::RegisterMetadatableAndCreateID(Metadatable & i_rObject)
OSL_ENSURE(m_pImpl->m_XmlIdMap.find(id) == m_pImpl->m_XmlIdMap.end(),
"created id is in use");
m_pImpl->m_XmlIdMap.insert(::std::make_pair(id, isInContent
- ? ::std::make_pair( &i_rObject, static_cast<Metadatable*>(0) )
- : ::std::make_pair( static_cast<Metadatable*>(0), &i_rObject )));
+ ? ::std::make_pair( &i_rObject, static_cast<Metadatable*>(nullptr) )
+ : ::std::make_pair( static_cast<Metadatable*>(nullptr), &i_rObject )));
// N.B.: if i_rObject had a latent XmlId, then we implicitly delete the
// MetadatableClipboard and thus the latent XmlId here
m_pImpl->m_XmlIdReverseMap[&i_rObject] = RMapEntry(stream, id);
@@ -1249,7 +1249,7 @@ XmlIdRegistryClipboard::RegisterCopyClipboard(Metadatable & i_rCopy,
if (!isValidXmlId(i_rReference.First, i_rReference.Second))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), 0, 0);
+ "illegal XmlId"), nullptr, 0);
}
if (!i_isLatent)
@@ -1272,7 +1272,7 @@ XmlIdRegistryClipboard::SourceLink(Metadatable const& i_rObject)
{
OUString path;
OUString idref;
- const MetadatableClipboard * pLink( 0 );
+ const MetadatableClipboard * pLink( nullptr );
m_pImpl->LookupXmlId(i_rObject, path, idref, pLink);
return pLink;
}
@@ -1295,7 +1295,7 @@ void Metadatable::RemoveMetadataReference()
{
m_pReg->UnregisterMetadatable( *this );
m_pReg->RemoveXmlIdForElement( *this );
- m_pReg = 0;
+ m_pReg = nullptr;
}
}
catch (const uno::Exception &)
@@ -1340,7 +1340,7 @@ void Metadatable::SetMetadataReference( const css::beans::StringPair & i_rRefere
{
throw lang::IllegalArgumentException(
OUString("Metadatable::"
- "SetMetadataReference: argument is invalid"), /*this*/0, 0);
+ "SetMetadataReference: argument is invalid"), /*this*/nullptr, 0);
}
}
}
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index a51996f89e66..13b413c9b50d 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -324,7 +324,7 @@ protected:
void SAL_CALL init(css::uno::Reference<css::xml::dom::XDocument> i_xDom);
/// update element in DOM tree
void SAL_CALL updateElement(const char *i_name,
- std::vector<std::pair<const char *, OUString> >* i_pAttrs = 0);
+ std::vector<std::pair<const char *, OUString> >* i_pAttrs = nullptr);
/// update user-defined meta data and attributes in DOM tree
void SAL_CALL updateUserDefinedAndAttributes();
/// create empty DOM tree (XDocument)
@@ -349,7 +349,7 @@ protected:
/// set text of a list of standard meta data elements (multiple occ.)
bool SAL_CALL setMetaList(const char* i_name,
const css::uno::Sequence< OUString > & i_rValue,
- AttrVector const* = 0);
+ AttrVector const* = nullptr);
void createUserDefined();
};
@@ -422,7 +422,7 @@ const char* s_stdStatAttrs[] = {
"meta:syllable-count",
"meta:non-whitespace-character-count",
"meta:cell-count",
- 0
+ nullptr
};
// NB: keep these two arrays in sync!
@@ -442,7 +442,7 @@ const char* s_stdStats[] = {
"SyllableCount",
"NonWhitespaceCharacterCount",
"CellCount",
- 0
+ nullptr
};
const char* s_stdMeta[] = {
@@ -463,13 +463,13 @@ const char* s_stdMeta[] = {
"meta:editing-cycles", // nonNegativeInteger
"meta:editing-duration", // duration
"meta:document-statistic", // ... // note: statistic is singular, no s!
- 0
+ nullptr
};
const char* s_stdMetaList[] = {
"meta:keyword", // string*
"meta:user-defined", // ...*
- 0
+ nullptr
};
const char* s_nsXLink = "http://www.w3.org/1999/xlink";
@@ -534,7 +534,7 @@ textToDateOrDateTime(css::util::Date & io_rd, css::util::DateTime & io_rdt,
bool SAL_CALL
textToDateTime(css::util::DateTime & io_rdt, const OUString& i_text) throw ()
{
- if (::sax::Converter::parseDateTime(io_rdt, 0, i_text)) {
+ if (::sax::Converter::parseDateTime(io_rdt, nullptr, i_text)) {
return true;
} else {
SAL_WARN_IF(!i_text.isEmpty(), "sfx.doc", "Invalid date: " << i_text);
@@ -555,7 +555,7 @@ textToDateTimeDefault(const OUString& i_text) throw ()
// convert date to string
OUString SAL_CALL
dateToText(css::util::Date const& i_rd,
- sal_Int16 const*const pTimeZone = 0) throw ()
+ sal_Int16 const*const pTimeZone = nullptr) throw ()
{
if (isValidDate(i_rd)) {
OUStringBuffer buf;
@@ -570,7 +570,7 @@ dateToText(css::util::Date const& i_rd,
// convert date/time to string
OUString SAL_CALL
dateTimeToText(css::util::DateTime const& i_rdt,
- sal_Int16 const*const pTimeZone = 0) throw ()
+ sal_Int16 const*const pTimeZone = nullptr) throw ()
{
if (isValidDateTime(i_rdt)) {
OUStringBuffer buf;
@@ -809,7 +809,7 @@ SfxDocumentMetaData::setMetaList(const char* i_name,
// throw (css::uno::RuntimeException)
{
checkInit();
- DBG_ASSERT((i_pAttrs == 0) ||
+ DBG_ASSERT((i_pAttrs == nullptr) ||
(static_cast<size_t>(i_rValue.getLength()) == i_pAttrs->size()),
"SfxDocumentMetaData::setMetaList: invalid args");
@@ -822,7 +822,7 @@ SfxDocumentMetaData::setMetaList(const char* i_name,
// if nothing changed, do nothing
// alas, this does not check for permutations, or attributes...
- if ((0 == i_pAttrs)) {
+ if ((nullptr == i_pAttrs)) {
if (static_cast<size_t>(i_rValue.getLength()) == vec.size()) {
bool isEqual(true);
for (sal_Int32 i = 0; i < i_rValue.getLength(); ++i) {
@@ -868,7 +868,7 @@ SfxDocumentMetaData::setMetaList(const char* i_name,
css::uno::Reference<css::xml::dom::XNode> xTextNode(
m_xDoc->createTextNode(i_rValue[i]), css::uno::UNO_QUERY_THROW);
// set attributes
- if (i_pAttrs != 0) {
+ if (i_pAttrs != nullptr) {
for (std::vector<std::pair<const char*, OUString> >
::const_iterator it = (*i_pAttrs)[i].begin();
it != (*i_pAttrs)[i].end(); ++it) {
@@ -1018,7 +1018,7 @@ SfxDocumentMetaData::updateElement(const char *i_name,
xNode.clear();
}
// add new element
- if (0 != i_pAttrs) {
+ if (nullptr != i_pAttrs) {
css::uno::Reference<css::xml::dom::XElement> xElem(
m_xDoc->createElementNS(getNameSpace(i_name), name),
css::uno::UNO_QUERY_THROW);
@@ -1217,7 +1217,7 @@ void SAL_CALL SfxDocumentMetaData::init(
// select nodes for elements of which we only handle one occurrence
- for (const char **pName = s_stdMeta; *pName != 0; ++pName) {
+ for (const char **pName = s_stdMeta; *pName != nullptr; ++pName) {
OUString name = OUString::createFromAscii(*pName);
// NB: If a document contains more than one occurrence of a
// meta-data element, we arbitrarily pick one of them here.
@@ -1233,7 +1233,7 @@ void SAL_CALL SfxDocumentMetaData::init(
}
// select nodes for elements of which we handle all occurrences
- for (const char **pName = s_stdMetaList; *pName != 0; ++pName) {
+ for (const char **pName = s_stdMetaList; *pName != nullptr; ++pName) {
OUString name = OUString::createFromAscii(*pName);
css::uno::Reference<css::xml::dom::XNodeList> nodes =
xPath->selectNodeList(m_xParent, "child::" + name);
@@ -1718,7 +1718,7 @@ SfxDocumentMetaData::getDocumentStatistics() throw (css::uno::RuntimeException,
::osl::MutexGuard g(m_aMutex);
checkInit();
::std::vector<css::beans::NamedValue> stats;
- for (size_t i = 0; s_stdStats[i] != 0; ++i) {
+ for (size_t i = 0; s_stdStats[i] != nullptr; ++i) {
const char * aName = s_stdStatAttrs[i];
OUString text = getMetaAttr("meta:document-statistic", aName);
if (text.isEmpty()) continue;
@@ -1749,7 +1749,7 @@ SfxDocumentMetaData::setDocumentStatistics(
for (sal_Int32 i = 0; i < the_value.getLength(); ++i) {
const OUString name = the_value[i].Name;
// inefficently search for matching attribute
- for (size_t j = 0; s_stdStats[j] != 0; ++j) {
+ for (size_t j = 0; s_stdStats[j] != nullptr; ++j) {
if (name.equalsAscii(s_stdStats[j])) {
const css::uno::Any any = the_value[i].Value;
sal_Int32 val = 0;
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 4630a83f3028..e6225a998a86 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -71,9 +71,9 @@ struct SfxObjectFactory_Impl
SvGlobalName aClassName;
SfxObjectFactory_Impl() :
- pNameResId ( NULL ),
- pFilterContainer ( NULL ),
- pModule ( NULL ),
+ pNameResId ( nullptr ),
+ pFilterContainer ( nullptr ),
+ pModule ( nullptr ),
nImageId ( 0 ),
bTemplateInitialized( false )
{}
@@ -327,7 +327,7 @@ const SfxFilter* SfxObjectFactory::GetTemplateFilter() const
sal_uInt16 nVersion=0;
SfxFilterMatcher aMatcher ( OUString::createFromAscii( pShortName ) );
SfxFilterMatcherIter aIter( aMatcher );
- const SfxFilter *pFilter = 0;
+ const SfxFilter *pFilter = nullptr;
const SfxFilter *pTemp = aIter.First();
while ( pTemp )
{
@@ -416,7 +416,7 @@ SfxViewFactory* SfxObjectFactory::GetViewFactoryByViewName( const OUString& i_rV
)
return &rViewFac;
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 8aeda012a4af..563803abafd1 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -243,7 +243,7 @@ public:
~SfxMedium_Impl();
OUString getFilterMimeType()
- { return m_pFilter == 0 ? OUString() : m_pFilter->GetMimeType(); }
+ { return m_pFilter == nullptr ? OUString() : m_pFilter->GetMimeType(); }
};
@@ -269,15 +269,15 @@ SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP ) :
m_bRemote(false),
m_bInputStreamIsReadOnly(false),
m_bInCheckIn(false),
- m_pSet(NULL),
- m_pURLObj(NULL),
- m_pFilter(NULL),
+ m_pSet(nullptr),
+ m_pURLObj(nullptr),
+ m_pFilter(nullptr),
pAntiImpl( pAntiImplP ),
- m_pInStream(NULL),
- m_pOutStream(NULL),
- pOrigFilter( 0 ),
+ m_pInStream(nullptr),
+ m_pOutStream(nullptr),
+ pOrigFilter( nullptr ),
aExpireTime( Date( Date::SYSTEM ) + 10, tools::Time( tools::Time::SYSTEM ) ),
- pTempFile( NULL ),
+ pTempFile( nullptr ),
nLastStorageError( 0 ),
m_nSignatureState( SignatureState::NOSIGNATURES )
{
@@ -502,7 +502,7 @@ SvStream* SfxMedium::GetInStream()
{
pImp->m_eError = ERRCODE_IO_ACCESSDENIED;
delete pImp->m_pInStream;
- pImp->m_pInStream = NULL;
+ pImp->m_pInStream = nullptr;
}
else
return pImp->m_pInStream;
@@ -511,7 +511,7 @@ SvStream* SfxMedium::GetInStream()
GetMedium_Impl();
if ( GetError() )
- return NULL;
+ return nullptr;
return pImp->m_pInStream;
}
@@ -613,7 +613,7 @@ bool SfxMedium::CloseOutStream_Impl()
}
delete pImp->m_pOutStream;
- pImp->m_pOutStream = NULL;
+ pImp->m_pOutStream = nullptr;
}
if ( !pImp->m_pInStream )
@@ -1367,7 +1367,7 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( bool bCreateTempIfNo )
if( ( pImp->nLastStorageError = GetError() ) != SVSTREAM_OK )
{
- pImp->xStorage = 0;
+ pImp->xStorage = nullptr;
if ( pImp->m_pInStream )
pImp->m_pInStream->Seek(0);
return uno::Reference< embed::XStorage >();
@@ -1749,7 +1749,7 @@ bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
{
pImp->pTempFile->EnableKillingFile();
delete pImp->pTempFile;
- pImp->pTempFile = NULL;
+ pImp->pTempFile = nullptr;
}
}
else if ( bTransactStarted )
@@ -1896,7 +1896,7 @@ void SfxMedium::Transfer_Impl()
{
pImp->pTempFile->EnableKillingFile();
delete pImp->pTempFile;
- pImp->pTempFile = NULL;
+ pImp->pTempFile = nullptr;
}
}
catch( const Exception& )
@@ -2374,7 +2374,7 @@ void SfxMedium::GetMedium_Impl()
// in case the temporary file exists the streams should be initialized from it,
// but the original MediaDescriptor should not be changed
- bool bFromTempFile = ( pImp->pTempFile != NULL );
+ bool bFromTempFile = ( pImp->pTempFile != nullptr );
if ( !bFromTempFile )
{
@@ -2524,7 +2524,7 @@ void SfxMedium::Init_Impl()
const SfxStringItem* pSalvageItem = SfxItemSet::GetItem<SfxStringItem>(pImp->m_pSet, SID_DOC_SALVAGE, false);
if ( pSalvageItem && pSalvageItem->GetValue().isEmpty() )
{
- pSalvageItem = NULL;
+ pSalvageItem = nullptr;
pImp->m_pSet->ClearItem( SID_DOC_SALVAGE );
}
@@ -2643,7 +2643,7 @@ SfxMedium::GetInteractionHandler( bool bGetAlways )
// create default handler and cache it!
Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
pImp->xInteraction.set(
- task::InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW );
+ task::InteractionHandler::createWithParent(xContext, nullptr), UNO_QUERY_THROW );
return pImp->xInteraction;
}
@@ -2881,7 +2881,7 @@ void SfxMedium::SetPhysicalName_Impl( const OUString& rNameP )
if( pImp->pTempFile )
{
delete pImp->pTempFile;
- pImp->pTempFile = NULL;
+ pImp->pTempFile = nullptr;
}
if ( !pImp->m_aName.isEmpty() || !rNameP.isEmpty() )
@@ -2911,11 +2911,11 @@ void SfxMedium::CompleteReOpen()
bool bUseInteractionHandler = pImp->bUseInteractionHandler;
pImp->bUseInteractionHandler = false;
- ::utl::TempFile* pTmpFile = NULL;
+ ::utl::TempFile* pTmpFile = nullptr;
if ( pImp->pTempFile )
{
pTmpFile = pImp->pTempFile;
- pImp->pTempFile = NULL;
+ pImp->pTempFile = nullptr;
pImp->m_aName.clear();
}
@@ -2957,7 +2957,7 @@ SfxMedium::SfxMedium(const OUString &rName, const OUString &rReferer, StreamMode
{
pImp->m_pSet = pInSet;
SfxItemSet * s = GetItemSet();
- if (s->GetItem(SID_REFERER) == 0) {
+ if (s->GetItem(SID_REFERER) == nullptr) {
s->Put(SfxStringItem(SID_REFERER, rReferer));
}
pImp->m_pFilter = pFlt;
@@ -2975,7 +2975,7 @@ SfxMedium::SfxMedium( const uno::Sequence<beans::PropertyValue>& aArgs ) :
OUString aFilterProvider, aFilterName;
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if (pImp->m_pSet->HasItem(SID_FILTER_PROVIDER, &pItem))
aFilterProvider = static_cast<const SfxStringItem*>(pItem)->GetValue();
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index 916efc78a98f..bcafad22c3ab 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -140,7 +140,7 @@ const SfxFilter* SfxFilter::GetFilterByName( const OUString& rName )
OUString SfxFilter::GetTypeFromStorage( const SotStorage& rStg )
{
- const char* pType=0;
+ const char* pType=nullptr;
if ( rStg.IsStream( "WordDocument" ) )
{
if ( rStg.IsStream( "0Table" ) || rStg.IsStream( "1Table" ) )
@@ -211,7 +211,7 @@ OUString SfxFilter::GetTypeFromStorage(
// template filters shouldn't be detected if not explicitly asked for
nDont |= SfxFilterFlags::TEMPLATEPATH;
- const SfxFilter* pFilter = 0;
+ const SfxFilter* pFilter = nullptr;
if (!aName.isEmpty())
// get preselected Filter if it matches the desired filter flags
pFilter = aMatcher.GetFilter4FilterName( aName, nMust, nDont );
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index 8c479a95f4cb..ca097d5136af 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -55,8 +55,8 @@ DocumentInserter::DocumentInserter(
? (SFXWB_INSERT|SFXWB_MULTISELECTION)
: SFXWB_INSERT )
, m_nError ( ERRCODE_NONE )
- , m_pFileDlg ( NULL )
- , m_pItemSet ( NULL )
+ , m_pFileDlg ( nullptr )
+ , m_pItemSet ( nullptr )
{
}
@@ -80,7 +80,7 @@ void DocumentInserter::StartExecuteModal( const Link<sfx2::FileDialogHelper*,voi
SfxMedium* DocumentInserter::CreateMedium()
{
- SfxMedium* pMedium = NULL;
+ SfxMedium* pMedium = nullptr;
if (!m_nError && m_pItemSet && !m_pURLList.empty())
{
DBG_ASSERT( m_pURLList.size() == 1, "DocumentInserter::CreateMedium(): invalid URL list count" );
@@ -89,21 +89,21 @@ SfxMedium* DocumentInserter::CreateMedium()
sURL, SFX_STREAM_READONLY,
SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet );
pMedium->UseInteractionHandler( true );
- SfxFilterMatcher* pMatcher = NULL;
+ SfxFilterMatcher* pMatcher = nullptr;
if ( !m_sDocFactory.isEmpty() )
pMatcher = new SfxFilterMatcher( m_sDocFactory );
else
pMatcher = new SfxFilterMatcher();
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, &pFilter, false );
if ( nError == ERRCODE_NONE && pFilter )
pMedium->SetFilter( pFilter );
else
DELETEZ( pMedium );
- if ( pMedium && CheckPasswd_Impl( 0, SfxGetpApp()->GetPool(), pMedium ) == ERRCODE_ABORT )
- pMedium = NULL;
+ if ( pMedium && CheckPasswd_Impl( nullptr, SfxGetpApp()->GetPool(), pMedium ) == ERRCODE_ABORT )
+ pMedium = nullptr;
DELETEZ( pMatcher );
}
@@ -125,14 +125,14 @@ SfxMediumList* DocumentInserter::CreateMediumList()
pMedium->UseInteractionHandler( true );
SfxFilterMatcher aMatcher( m_sDocFactory );
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
sal_uInt32 nError = aMatcher.DetectFilter( *pMedium, &pFilter, false );
if ( nError == ERRCODE_NONE && pFilter )
pMedium->SetFilter( pFilter );
else
DELETEZ( pMedium );
- if( pMedium && CheckPasswd_Impl( 0, SfxGetpApp()->GetPool(), pMedium ) != ERRCODE_ABORT )
+ if( pMedium && CheckPasswd_Impl( nullptr, SfxGetpApp()->GetPool(), pMedium ) != ERRCODE_ABORT )
pMediumList->push_back( pMedium );
else
delete pMedium;
diff --git a/sfx2/source/doc/docstoragemodifylistener.cxx b/sfx2/source/doc/docstoragemodifylistener.cxx
index c632159a9a28..fe54cebd2e21 100644
--- a/sfx2/source/doc/docstoragemodifylistener.cxx
+++ b/sfx2/source/doc/docstoragemodifylistener.cxx
@@ -55,7 +55,7 @@ namespace sfx2
void DocumentStorageModifyListener::dispose()
{
::osl::Guard< comphelper::SolarMutex > aGuard( m_rMutex );
- m_pDocument = NULL;
+ m_pDocument = nullptr;
}
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 056ca1c7b388..c792d25890fe 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -181,7 +181,7 @@ public:
void AddEntry( const OUString& rTitle,
const OUString& rTargetURL,
- size_t *pPos = NULL );
+ size_t *pPos = nullptr );
void DeleteEntry( size_t nIndex );
int Compare( RegionData_Impl* pCompareWith ) const;
@@ -265,7 +265,7 @@ public:
typedef tools::SvRef<SfxDocTemplate_Impl> SfxDocTemplate_ImplRef;
#endif
-SfxDocTemplate_Impl *gpTemplateData = 0;
+SfxDocTemplate_Impl *gpTemplateData = nullptr;
@@ -423,7 +423,7 @@ const OUString& SfxDocumentTemplates::GetName
if ( pImp->Construct() )
{
- DocTempl_EntryData_Impl *pEntry = NULL;
+ DocTempl_EntryData_Impl *pEntry = nullptr;
RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
if ( pRegion )
@@ -462,7 +462,7 @@ OUString SfxDocumentTemplates::GetPath
if ( !pImp->Construct() )
return OUString();
- DocTempl_EntryData_Impl *pEntry = NULL;
+ DocTempl_EntryData_Impl *pEntry = nullptr;
RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
if ( pRegion )
@@ -1130,7 +1130,7 @@ bool SfxDocumentTemplates::GetFull
if ( ! pImp->Construct() )
return false;
- DocTempl_EntryData_Impl* pEntry = NULL;
+ DocTempl_EntryData_Impl* pEntry = nullptr;
const sal_uInt16 nCount = GetRegionCount();
for ( sal_uInt16 i = 0; i < nCount; ++i )
@@ -1150,7 +1150,7 @@ bool SfxDocumentTemplates::GetFull
}
}
- return ( pEntry != NULL );
+ return ( pEntry != nullptr );
}
@@ -1188,8 +1188,8 @@ bool SfxDocumentTemplates::GetLogicNames
aFullPath.SetURL( rPath );
OUString aPath( aFullPath.GetMainURL( INetURLObject::NO_DECODE ) );
- RegionData_Impl *pData = NULL;
- DocTempl_EntryData_Impl *pEntry = NULL;
+ RegionData_Impl *pData = nullptr;
+ DocTempl_EntryData_Impl *pEntry = nullptr;
bool bFound = false;
sal_uIntPtr nCount = GetRegionCount();
@@ -1247,7 +1247,7 @@ SfxDocumentTemplates::~SfxDocumentTemplates()
*/
{
- pImp = NULL;
+ pImp = nullptr;
}
void SfxDocumentTemplates::Update( bool _bSmart )
@@ -1467,7 +1467,7 @@ DocTempl_EntryData_Impl* RegionData_Impl::GetEntry( const OUString& rName ) cons
if ( bFound )
return maEntries[ nPos ];
else
- return NULL;
+ return nullptr;
}
@@ -1475,7 +1475,7 @@ DocTempl_EntryData_Impl* RegionData_Impl::GetEntry( size_t nIndex ) const
{
if ( nIndex < maEntries.size() )
return maEntries[ nIndex ];
- return NULL;
+ return nullptr;
}
@@ -1511,7 +1511,7 @@ SfxDocTemplate_Impl::~SfxDocTemplate_Impl()
{
Clear();
- gpTemplateData = NULL;
+ gpTemplateData = nullptr;
}
@@ -1534,7 +1534,7 @@ RegionData_Impl* SfxDocTemplate_Impl::GetRegion( size_t nIndex ) const
{
if ( nIndex < maRegions.size() )
return maRegions[ nIndex ];
- return NULL;
+ return nullptr;
}
@@ -1547,7 +1547,7 @@ RegionData_Impl* SfxDocTemplate_Impl::GetRegion( const OUString& rName )
if( pData->GetTitle() == rName )
return pData;
}
- return NULL;
+ return nullptr;
}
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 3d8b29098cd0..843b9d3602f8 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -305,7 +305,7 @@ public:
void update( bool bUpdateNow );
void doUpdate();
- void finished() { mpUpdater = NULL; }
+ void finished() { mpUpdater = nullptr; }
};
@@ -401,7 +401,7 @@ void SfxDocTplService_Impl::init_Impl()
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
uno::Reference < task::XInteractionHandler > xInteractionHandler(
- task::InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
+ task::InteractionHandler::createWithParent(xContext, nullptr), uno::UNO_QUERY_THROW );
maCmdEnv = new TplTaskEnvironment( xInteractionHandler );
::osl::ClearableMutexGuard aGuard( maMutex );
@@ -1101,7 +1101,7 @@ SfxDocTplService_Impl::SfxDocTplService_Impl( const uno::Reference< XComponentCo
: maRelocator(xContext)
{
mxContext = xContext;
- mpUpdater = NULL;
+ mpUpdater = nullptr;
mbIsInitialized = false;
mbLocaleSet = false;
}
@@ -2298,7 +2298,7 @@ uno::Reference< ucb::XContent > SAL_CALL SfxDocTplService::getContent()
if ( pImp->init() )
return pImp->getContent().get();
else
- return NULL;
+ return nullptr;
}
@@ -2421,7 +2421,7 @@ void SAL_CALL Updater_Impl::onTerminated()
}
-WaitWindow_Impl::WaitWindow_Impl() : WorkWindow(NULL, WB_BORDER | WB_3DLOOK)
+WaitWindow_Impl::WaitWindow_Impl() : WorkWindow(nullptr, WB_BORDER | WB_3DLOOK)
{
Rectangle aRect = Rectangle(0, 0, 300, 30000);
mnTextStyle = DrawTextFlags::Center | DrawTextFlags::VCenter | DrawTextFlags::WordBreak | DrawTextFlags::MultiLine;
@@ -2551,7 +2551,7 @@ void SfxDocTplService_Impl::addFsysGroup( GroupList_Impl& rList,
if ( aTitle.isEmpty() )
return;
- GroupData_Impl* pGroup = NULL;
+ GroupData_Impl* pGroup = nullptr;
for ( size_t i = 0, n = rList.size(); i < n; ++i )
{
if ( rList[ i ]->getTitle() == aTitle )
@@ -2805,7 +2805,7 @@ DocTemplates_EntryData_Impl* GroupData_Impl::addEntry( const OUString& rTitle,
const OUString& rType,
const OUString& rHierURL )
{
- DocTemplates_EntryData_Impl* pData = NULL;
+ DocTemplates_EntryData_Impl* pData = nullptr;
bool EntryFound = false;
for ( size_t i = 0, n = maEntries.size(); i < n; ++i )
diff --git a/sfx2/source/doc/docundomanager.cxx b/sfx2/source/doc/docundomanager.cxx
index 1f381af8f98e..d58ec02f2dbc 100644
--- a/sfx2/source/doc/docundomanager.cxx
+++ b/sfx2/source/doc/docundomanager.cxx
@@ -102,7 +102,7 @@ namespace sfx2
{
aUndoHelper.disposing();
ENSURE_OR_RETURN_VOID( pUndoManager, "DocumentUndoManager_Impl::disposing: already disposed!" );
- pUndoManager = NULL;
+ pUndoManager = nullptr;
}
void invalidateXDo_nolck();
@@ -110,9 +110,9 @@ namespace sfx2
private:
static IUndoManager* impl_retrieveUndoManager( SfxBaseModel& i_baseModel )
{
- IUndoManager* pUndoManager( NULL );
+ IUndoManager* pUndoManager( nullptr );
SfxObjectShell* pObjectShell = i_baseModel.GetObjectShell();
- if ( pObjectShell != NULL )
+ if ( pObjectShell != nullptr )
pUndoManager = pObjectShell->GetUndoManager();
if ( !pUndoManager )
throw NotInitializedException( OUString(), *&i_baseModel );
@@ -123,13 +123,13 @@ namespace sfx2
::svl::IUndoManager& DocumentUndoManager_Impl::getImplUndoManager()
{
- ENSURE_OR_THROW( pUndoManager != NULL, "DocumentUndoManager_Impl::getImplUndoManager: no access to the doc's UndoManager implementation!" );
+ ENSURE_OR_THROW( pUndoManager != nullptr, "DocumentUndoManager_Impl::getImplUndoManager: no access to the doc's UndoManager implementation!" );
#if OSL_DEBUG_LEVEL > 0
// in a non-product build, assert if the current UndoManager at the shell is not the same we obtained
// (and cached) at construction time
SfxObjectShell* pObjectShell = rAntiImpl.getBaseModel().GetObjectShell();
- OSL_ENSURE( ( pObjectShell != NULL ) && ( pUndoManager == pObjectShell->GetUndoManager() ),
+ OSL_ENSURE( ( pObjectShell != nullptr ) && ( pUndoManager == pObjectShell->GetUndoManager() ),
"DocumentUndoManager_Impl::getImplUndoManager: the UndoManager changed meanwhile - what about our listener?" );
#endif
@@ -148,7 +148,7 @@ namespace sfx2
SfxModelGuard aGuard( rAntiImpl );
const SfxObjectShell* pDocShell = getObjectShell();
- ENSURE_OR_THROW( pDocShell != NULL, "lcl_invalidateUndo: no access to the doc shell!" );
+ ENSURE_OR_THROW( pDocShell != nullptr, "lcl_invalidateUndo: no access to the doc shell!" );
SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst( pDocShell );
while ( pViewFrame )
{
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index 8ce26e51fdcb..a8d7dbc14331 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -32,7 +32,7 @@ struct SfxFrameDescriptor_Impl
SfxItemSet* pArgs;
bool bEditable;
- SfxFrameDescriptor_Impl() : pWallpaper( NULL ), pArgs( NULL ), bEditable( true ) {}
+ SfxFrameDescriptor_Impl() : pWallpaper( nullptr ), pArgs( nullptr ), bEditable( true ) {}
~SfxFrameDescriptor_Impl()
{
delete pWallpaper;
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index f4ad0b23df4d..082074877270 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -59,7 +59,7 @@ using namespace css;
SvMemoryStream* GraphicHelper::getFormatStrFromGDI_Impl( const GDIMetaFile* pGDIMeta, ConvertDataFormat nFormat )
{
- SvMemoryStream* pResult = NULL;
+ SvMemoryStream* pResult = nullptr;
if ( pGDIMeta )
{
SvMemoryStream* pStream = new SvMemoryStream( 65535, 65535 );
@@ -78,7 +78,7 @@ SvMemoryStream* GraphicHelper::getFormatStrFromGDI_Impl( const GDIMetaFile* pGDI
void* GraphicHelper::getEnhMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta )
{
(void)pGDIMeta; // unused
- void* pResult = NULL;
+ void* pResult = nullptr;
#ifdef WNT
if ( pGDIMeta )
@@ -113,7 +113,7 @@ void* GraphicHelper::getWinMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta, co
{
(void)pGDIMeta; // unused
(void)aMetaSize; // unused
- void* pResult = NULL;
+ void* pResult = nullptr;
#ifdef WNT
if ( pGDIMeta )
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index f2545a08f6d2..adab5fb16766 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -334,8 +334,8 @@ ModelData_Impl::ModelData_Impl( SfxStoringHelper& aOwner,
const uno::Sequence< beans::PropertyValue >& aMediaDescr )
: m_pOwner( &aOwner )
, m_xModel( xModel )
-, m_pDocumentPropsHM( NULL )
-, m_pModulePropsHM( NULL )
+, m_pDocumentPropsHM( nullptr )
+, m_pModulePropsHM( nullptr )
, m_aMediaDescrHM( aMediaDescr )
, m_bRecommendReadOnly( false )
{
@@ -379,7 +379,7 @@ void ModelData_Impl::FreeDocumentProps()
if ( m_pDocumentPropsHM )
{
delete m_pDocumentPropsHM;
- m_pDocumentPropsHM = NULL;
+ m_pDocumentPropsHM = nullptr;
}
}
@@ -484,7 +484,7 @@ void ModelData_Impl::CheckInteractionHandler()
{
try {
m_aMediaDescrHM[ OUString("InteractionHandler") ]
- <<= task::InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), 0);
+ <<= task::InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), nullptr);
}
catch( const uno::Exception& )
{
@@ -1016,7 +1016,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
GetMediaDescr().getAsConstPropertyValueList(),
aDialogParams );
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if ( bPreselectPassword && aDialogParams.GetItemState( SID_ENCRYPTIONDATA, true, &pItem ) != SfxItemState::SET )
{
// the file dialog preselects the password checkbox if the provided mediadescriptor has encryption data entry
@@ -1858,7 +1858,7 @@ bool SfxStoringHelper::WarnUnacceptableFormat( const uno::Reference< frame::XMod
vcl::Window* SfxStoringHelper::GetModelWindow( const uno::Reference< frame::XModel >& xModel )
{
- vcl::Window* pWin = 0;
+ vcl::Window* pWin = nullptr;
try {
if ( xModel.is() )
{
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 320ec3449a8c..692d1ee5dd2a 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -221,7 +221,7 @@ void SAL_CALL IFrameObject::cancel() throw( css::uno::RuntimeException, std::exc
uno::Reference < util::XCloseable > xClose( mxFrame, uno::UNO_QUERY );
if ( xClose.is() )
xClose->close( sal_True );
- mxFrame = 0;
+ mxFrame = nullptr;
}
catch (const uno::Exception&)
{
@@ -408,7 +408,7 @@ void SAL_CALL IFrameObject::removeVetoableChangeListener(const OUString&, const
::sal_Int16 SAL_CALL IFrameObject::execute() throw (css::uno::RuntimeException, std::exception)
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( NULL, ".uno:InsertObjectFloatingFrame", mxObj );
+ VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( nullptr, ".uno:InsertObjectFloatingFrame", mxObj );
if ( pDlg )
pDlg->Execute();
return 0;
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 5bc866fc27b4..163899e73638 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -182,7 +182,7 @@ IMPL_LINK_NOARG_TYPED(SfxNewFileDialog_Impl, Update, Idle*, void)
if (!nEntry)
{
m_pPreviewWin->Invalidate();
- m_pPreviewWin->SetObjectShell( 0);
+ m_pPreviewWin->SetObjectShell( nullptr);
return;
}
@@ -229,7 +229,7 @@ IMPL_LINK_NOARG_TYPED(SfxNewFileDialog_Impl, Update, Idle*, void)
Application::SetDefDialogParent(pParent);
if (!xDocShell.Is())
{
- m_pPreviewWin->SetObjectShell(0);
+ m_pPreviewWin->SetObjectShell(nullptr);
return;
}
}
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 10ebf6ea7439..9ccef662938d 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -306,7 +306,7 @@ std::set<Color> SfxObjectShell::GetDocColors()
SfxStyleSheetBasePool* SfxObjectShell::GetStyleSheetPool()
{
- return 0;
+ return nullptr;
}
struct Styles_Impl
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index cb05205e2908..49d0518fdd9b 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -44,7 +44,7 @@ using namespace ::com::sun::star;
// TODO/LATER: this workaround must be replaced by API in future if possible
SfxObjectShell* SfxObjectShell::GetParentShellByModel_Impl()
{
- SfxObjectShell* pResult = NULL;
+ SfxObjectShell* pResult = nullptr;
try {
uno::Reference< container::XChild > xChildModel( GetModel(), uno::UNO_QUERY );
@@ -73,7 +73,7 @@ Printer* SfxObjectShell::GetDocumentPrinter()
SfxObjectShell* pParent = GetParentShellByModel_Impl();
if ( pParent )
return pParent->GetDocumentPrinter();
- return NULL;
+ return nullptr;
}
@@ -82,7 +82,7 @@ OutputDevice* SfxObjectShell::GetDocumentRefDev()
SfxObjectShell* pParent = GetParentShellByModel_Impl();
if ( pParent )
return pParent->GetDocumentRefDev();
- return NULL;
+ return nullptr;
}
@@ -203,7 +203,7 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev,
aMapMode.SetScaleY( rScaleY );
// Target in Pixels
- Point aOrg = pDev->LogicToLogic( rViewPos, NULL, &aMapMode );
+ Point aOrg = pDev->LogicToLogic( rViewPos, nullptr, &aMapMode );
Point aDelta = aOrg - aVisArea.TopLeft();
// Origin moved according to the viewable area
@@ -227,7 +227,7 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev,
if( pMtf->IsRecord() && pDev->GetOutDevType() != OUTDEV_PRINTER )
pMtf->Stop();
else
- pMtf = NULL;
+ pMtf = nullptr;
}
if( pDev->IsClipRegion() && pDev->GetOutDevType() != OUTDEV_PRINTER )
{
diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx
index f3ba9cae2a56..66154237224c 100644
--- a/sfx2/source/doc/objitem.cxx
+++ b/sfx2/source/doc/objitem.cxx
@@ -73,7 +73,7 @@ bool SfxObjectShellItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMembe
}
}
- pObjSh = 0;
+ pObjSh = nullptr;
return true;
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index e707ef7ab945..1e740d7cb0bc 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -403,7 +403,7 @@ bool SfxObjectShell::IsReadOnlyMedium() const
bool SfxObjectShell::IsOriginallyReadOnlyMedium() const
{
- return pMedium == 0 || pMedium->IsOriginallyReadOnly();
+ return pMedium == nullptr || pMedium->IsOriginallyReadOnly();
}
@@ -454,7 +454,7 @@ void SfxObjectShell::SetReadOnly()
bool SfxObjectShell::IsReadOnly() const
{
- return pImp->bReadOnlyUI || pMedium == 0;
+ return pImp->bReadOnlyUI || pMedium == nullptr;
}
@@ -1337,9 +1337,9 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad()
// setting the new storage the medium will be based on
pTmpMedium->SetStorage_Impl( xTmpStor );
- pMedium = 0;
+ pMedium = nullptr;
bool ok = DoSaveCompleted( pTmpMedium );
- assert(pMedium != 0);
+ assert(pMedium != nullptr);
if( ok )
{
const SfxStringItem* pSalvageItem = SfxItemSet::GetItem<SfxStringItem>(pMedium->GetItemSet(), SID_DOC_SALVAGE, false);
@@ -1456,13 +1456,13 @@ void AutoReloadTimer_Impl::Invoke()
SfxStringItem(SID_REFERER, pObjSh->GetMedium()->GetName()));
}
SfxRequest aReq( SID_RELOAD, SfxCallMode::SLOT, aSet );
- pObjSh->Get_Impl()->pReloadTimer = 0;
+ pObjSh->Get_Impl()->pReloadTimer = nullptr;
delete this;
pFrame->ExecReload_Impl( aReq );
return;
}
- pObjSh->Get_Impl()->pReloadTimer = 0;
+ pObjSh->Get_Impl()->pReloadTimer = nullptr;
delete this;
}
@@ -1570,7 +1570,7 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon
std::unique_ptr< VclAbstractDialog > pScriptErrDlg;
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
- pScriptErrDlg.reset( pFact->CreateScriptErrorDialog( NULL, aException ) );
+ pScriptErrDlg.reset( pFact->CreateScriptErrorDialog( nullptr, aException ) );
OSL_ENSURE( pScriptErrDlg.get(), "SfxObjectShell::CallXScript: no script error dialog!" );
if ( pScriptErrDlg.get() )
@@ -1748,7 +1748,7 @@ bool SfxObjectShell::AdjustMacroMode( const OUString& /*rScriptType*/, bool bSup
vcl::Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
{
- vcl::Window* pWindow = 0;
+ vcl::Window* pWindow = nullptr;
SfxItemSet* pSet = pLoadingMedium ? pLoadingMedium->GetItemSet() : GetMedium()->GetItemSet();
const SfxUnoFrameItem* pUnoItem = SfxItemSet::GetItem<SfxUnoFrameItem>(pSet, SID_FILLFRAME, false);
if ( pUnoItem )
@@ -1759,7 +1759,7 @@ vcl::Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
if ( !pWindow )
{
- SfxFrame* pFrame = 0;
+ SfxFrame* pFrame = nullptr;
const SfxFrameItem* pFrameItem = SfxItemSet::GetItem<SfxFrameItem>(pSet, SID_DOCFRAME, false);
if( pFrameItem && pFrameItem->GetFrame() )
// get target frame from ItemSet
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 0d7b367c5475..5cfada6db559 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -177,7 +177,7 @@ class SfxInstanceCloseGuard_Impl
public:
SfxInstanceCloseGuard_Impl()
- : m_pPreventer( NULL )
+ : m_pPreventer( nullptr )
{}
~SfxInstanceCloseGuard_Impl();
@@ -398,7 +398,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if( SID_SIGNATURE == nId || SID_MACRO_SIGNATURE == nId )
{
- if ( QueryHiddenInformation( HiddenWarningFact::WhenSigning, NULL ) == RET_YES )
+ if ( QueryHiddenInformation( HiddenWarningFact::WhenSigning, nullptr ) == RET_YES )
( SID_SIGNATURE == nId ) ? SignDocumentContent() : SignScriptingContent();
return;
}
@@ -492,7 +492,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// creating dialog is done via virtual method; application will
// add its own statistics page
- ScopedVclPtr<SfxDocumentInfoDialog> pDlg(CreateDocumentInfoDialog(0, aSet));
+ ScopedVclPtr<SfxDocumentInfoDialog> pDlg(CreateDocumentInfoDialog(nullptr, aSet));
if ( RET_OK == pDlg->Execute() )
{
const SfxDocumentInfoItem* pDocInfoItem = SfxItemSet::GetItem<SfxDocumentInfoItem>(pDlg->GetOutputItemSet(), SID_DOCINFO, false);
@@ -607,7 +607,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
uno::Reference< task::XInteractionHandler2 > xInteract(
- task::InteractionHandler::createWithParent(xContext, 0) );
+ task::InteractionHandler::createWithParent(xContext, nullptr) );
SfxUnoAnyItem aInteractionItem( SID_INTERACTIONHANDLER, uno::makeAny( xInteract ) );
if ( nId == SID_SAVEDOC )
@@ -645,7 +645,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
SfxStoringHelper aHelper;
- if ( QueryHiddenInformation( bIsPDFExport ? HiddenWarningFact::WhenCreatingPDF : HiddenWarningFact::WhenSaving, NULL ) == RET_YES )
+ if ( QueryHiddenInformation( bIsPDFExport ? HiddenWarningFact::WhenCreatingPDF : HiddenWarningFact::WhenSaving, nullptr ) == RET_YES )
{
aHelper.GUIStoreModel( GetModel(),
OUString::createFromAscii( pSlot->GetUnoName() ),
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index e9bb92a45352..e2bf783055c9 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -739,7 +739,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
else
SetError( pMed->GetLastStorageCreationState(), OSL_LOG_PREFIX );
}
- else if ( GetError() == ERRCODE_NONE && InitNew(0) )
+ else if ( GetError() == ERRCODE_NONE && InitNew(nullptr) )
{
// Name vor ConvertFrom setzen, damit GetSbxObject() schon funktioniert
bHasName = true;
@@ -767,7 +767,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
{
bSetProperty = false;
}
- bOk = ImportFrom(*pMedium, 0);
+ bOk = ImportFrom(*pMedium, nullptr);
if(bSetProperty)
{
try
@@ -1680,7 +1680,7 @@ bool SfxObjectShell::SaveTo_Impl
// if the old medium already disconnected from document storage, the storage still must
// be switched if backup file is used
if ( bNeedsDisconnectionOnFail )
- ConnectTmpStorage_Impl( pImp->m_xDocStorage, NULL );
+ ConnectTmpStorage_Impl( pImp->m_xDocStorage, nullptr );
}
else if (!pMedium->GetName().isEmpty()
|| ( pMedium->HasStorage_Impl() && pMedium->WillDisposeStorageOnClose_Impl() ) )
@@ -1701,7 +1701,7 @@ bool SfxObjectShell::SaveTo_Impl
// in case the document storage was connected to backup temporarely it must be disconnected now
if ( bNeedsDisconnectionOnFail )
- ConnectTmpStorage_Impl( pImp->m_xDocStorage, NULL );
+ ConnectTmpStorage_Impl( pImp->m_xDocStorage, nullptr );
}
}
@@ -1944,7 +1944,7 @@ bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium )
if ( pImp->bPreserveVersions )
rMedium.TransferVersionList_Impl( *pMedium );
- bool bRet = SaveTo_Impl( rMedium, NULL );
+ bool bRet = SaveTo_Impl( rMedium, nullptr );
if ( !bRet )
SetError(rMedium.GetErrorCode(), OSL_LOG_PREFIX );
return bRet;
@@ -1967,7 +1967,7 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
pMedium->CanDisposeStorage_Impl( true );
}
- const SfxFilter *pFilter = pMedium ? pMedium->GetFilter() : 0;
+ const SfxFilter *pFilter = pMedium ? pMedium->GetFilter() : nullptr;
if ( pNewMed )
{
if( bMedChanged )
@@ -2042,11 +2042,11 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
bOk = SaveCompletedChildren( false );
}
else
- bOk = SaveCompleted( NULL );
+ bOk = SaveCompleted( nullptr );
}
// either Save or ConvertTo
else
- bOk = SaveCompleted( NULL );
+ bOk = SaveCompleted( nullptr );
}
if ( bOk && pNewMed )
@@ -2587,7 +2587,7 @@ bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet )
{
const SfxStringItem* pFilterItem = SfxItemSet::GetItem<SfxStringItem>(GetMedium()->GetItemSet(), SID_FILTER_NAME, false);
OUString aFilterName;
- const SfxFilter *pFilter = NULL;
+ const SfxFilter *pFilter = nullptr;
if ( pFilterItem )
pFilter = SfxFilterMatcher( OUString::createFromAscii( GetFactory().GetShortName()) ).GetFilter4FilterName( aFilterName );
@@ -2620,7 +2620,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
if ( aURL != INetURLObject( OUString( "private:stream" ) ) )
{
// Is there already a Document with this name?
- SfxObjectShell* pDoc = 0;
+ SfxObjectShell* pDoc = nullptr;
for ( SfxObjectShell* pTmp = SfxObjectShell::GetFirst();
pTmp && !pDoc;
pTmp = SfxObjectShell::GetNext(*pTmp) )
@@ -2785,7 +2785,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
pMergedParams->ClearItem( SID_DOC_SALVAGE );
// create a medium for the target URL
- SfxMedium *pNewFile = new SfxMedium( rFileName, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC, 0, pMergedParams );
+ SfxMedium *pNewFile = new SfxMedium( rFileName, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC, nullptr, pMergedParams );
// set filter; if no filter is given, take the default filter of the factory
if ( !aFilterName.isEmpty() )
@@ -2814,7 +2814,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
// Save the document ( first as temporary file, then transfer to the target URL by committing the medium )
bool bOk = false;
- if ( !pNewFile->GetErrorCode() && SaveTo_Impl( *pNewFile, NULL ) )
+ if ( !pNewFile->GetErrorCode() && SaveTo_Impl( *pNewFile, nullptr ) )
{
// transfer a possible error from the medium to the document
SetError( pNewFile->GetErrorCode(), OSL_LOG_PREFIX );
@@ -3207,7 +3207,7 @@ bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xSt
uno::Reference< embed::XStorage > xOldStorageHolder;
// check for wrong creation of object container
- bool bHasContainer = ( pImp->mpObjectContainer != 0 );
+ bool bHasContainer = ( pImp->mpObjectContainer != nullptr );
if ( !xStorage.is() || xStorage == GetStorage() )
{
@@ -3228,7 +3228,7 @@ bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xSt
{
// make sure that until the storage is assigned the object
// container is not created by accident!
- DBG_ASSERT( bHasContainer == (pImp->mpObjectContainer != 0), "Wrong storage in object container!" );
+ DBG_ASSERT( bHasContainer == (pImp->mpObjectContainer != nullptr), "Wrong storage in object container!" );
xOldStorageHolder = pImp->m_xDocStorage;
pImp->m_xDocStorage = xStorage;
bSendNotification = true;
@@ -3350,7 +3350,7 @@ bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorage >&
{
bool bResult = false;
// check for wrong creation of object container
- bool bHasContainer = ( pImp->mpObjectContainer != 0 );
+ bool bHasContainer = ( pImp->mpObjectContainer != nullptr );
if ( xStorage.is() )
{
if ( pImp->mpObjectContainer )
@@ -3365,7 +3365,7 @@ bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorage >&
if ( bResult )
{
// make sure that until the storage is assigned the object container is not created by accident!
- DBG_ASSERT( bHasContainer == (pImp->mpObjectContainer != 0), "Wrong storage in object container!" );
+ DBG_ASSERT( bHasContainer == (pImp->mpObjectContainer != nullptr), "Wrong storage in object container!" );
if ( pImp->m_xDocStorage != xStorage )
DoSaveCompleted( new SfxMedium( xStorage, GetMedium()->GetBaseURL() ) );
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index e9c5731bee02..4db56613247c 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -206,10 +206,10 @@ TYPEINIT1(SfxObjectShell, SfxShell);
SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
- :mpObjectContainer(0)
+ :mpObjectContainer(nullptr)
,rDocShell( _rDocShell )
,aMacroMode( *this )
- ,pProgress( 0)
+ ,pProgress( nullptr)
,nTime( DateTime::SYSTEM )
,nVisualDocumentNumber( USHRT_MAX)
,nDocumentSignatureState( SignatureState::UNKNOWN )
@@ -245,15 +245,15 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,m_bConfigOptionsChecked( false )
,lErr(ERRCODE_NONE)
,nEventId ( 0)
- ,pReloadTimer ( 0)
- ,pMarkData( 0 )
+ ,pReloadTimer ( nullptr)
+ ,pMarkData( nullptr )
,nLoadedFlags ( SfxLoadedFlags::ALL )
,nFlagsInProgress( SfxLoadedFlags::NONE )
,bModalMode( false )
,bRunningMacro( false )
,bReloadAvailable( false )
,nAutoLoadLocks( 0 )
- ,pModule( 0 )
+ ,pModule( nullptr )
,eFlags( SfxObjectShellFlags::UNDEFINED )
,bReadOnlyUI( false )
,nStyleFilter( 0 )
@@ -283,8 +283,8 @@ SfxObjectShell_Impl::~SfxObjectShell_Impl()
SfxObjectShell::SfxObjectShell( const SfxModelFlags i_nCreationFlags )
: pImp(new SfxObjectShell_Impl(*this))
- , pMedium(0)
- , pStyleSheetPool(0)
+ , pMedium(nullptr)
+ , pStyleSheetPool(nullptr)
, eCreateMode(SfxObjectCreateMode::STANDARD)
, bHasName(false)
, bIsInGenerateThumbnail (false)
@@ -314,8 +314,8 @@ SfxObjectShell::SfxObjectShell( const SfxModelFlags i_nCreationFlags )
*/
SfxObjectShell::SfxObjectShell(SfxObjectCreateMode eMode)
: pImp(new SfxObjectShell_Impl(*this))
- , pMedium(0)
- , pStyleSheetPool(0)
+ , pMedium(nullptr)
+ , pStyleSheetPool(nullptr)
, eCreateMode(eMode)
, bHasName(false)
, bIsInGenerateThumbnail(false)
@@ -332,7 +332,7 @@ SfxObjectShell::~SfxObjectShell()
// Never call GetInPlaceObject(), the access to the derivative branch
// SfxInternObject is not allowed because of a compiler bug
SfxObjectShell::CloseInternal();
- pImp->pBaseModel.set( NULL );
+ pImp->pBaseModel.set( nullptr );
DELETEX(AutoReloadTimer_Impl, pImp->pReloadTimer );
@@ -341,12 +341,12 @@ SfxObjectShell::~SfxObjectShell()
pSfxApp->ReleaseIndex(pImp->nVisualDocumentNumber);
// Destroy Basic-Manager
- pImp->aBasicManager.reset( NULL );
+ pImp->aBasicManager.reset( nullptr );
if ( pSfxApp->GetDdeService() )
pSfxApp->RemoveDdeTopic( this );
- pImp->pBaseModel.set( NULL );
+ pImp->pBaseModel.set( nullptr );
// don't call GetStorage() here, in case of Load Failure it's possible that a storage was never assigned!
if ( pMedium && pMedium->HasStorage_Impl() && pMedium->GetStorage( false ) == pImp->m_xDocStorage )
@@ -492,7 +492,7 @@ SfxObjectShell* SfxObjectShell::GetFirst
return pSh;
}
- return 0;
+ return nullptr;
}
@@ -524,7 +524,7 @@ SfxObjectShell* SfxObjectShell::GetNext
( !bOnlyVisible || SfxViewFrame::GetFirst( pSh )))
return pSh;
}
- return 0;
+ return nullptr;
}
@@ -532,7 +532,7 @@ SfxObjectShell* SfxObjectShell::GetNext
SfxObjectShell* SfxObjectShell::Current()
{
SfxViewFrame *pFrame = SfxViewFrame::Current();
- return pFrame ? pFrame->GetObjectShell() : 0;
+ return pFrame ? pFrame->GetObjectShell() : nullptr;
}
@@ -622,13 +622,13 @@ bool SfxObjectShell::PrepareClose
{
SfxStringItem aItem( SID_DOCINFO_COMMENTS, SfxResId(STR_AUTOMATICVERSION).toString() );
SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, bUI );
- const SfxPoolItem* ppArgs[] = { &aItem, &aWarnItem, 0 };
+ const SfxPoolItem* ppArgs[] = { &aItem, &aWarnItem, nullptr };
pPoolItem = pFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, ppArgs );
}
else
{
SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, bUI );
- const SfxPoolItem* ppArgs[] = { &aWarnItem, 0 };
+ const SfxPoolItem* ppArgs[] = { &aWarnItem, nullptr };
pPoolItem = pFrame->GetBindings().ExecuteSynchron( IsReadOnlyMedium() ? SID_SAVEASDOC : SID_SAVEDOC, ppArgs );
}
@@ -672,7 +672,7 @@ namespace
"lcl_getBasicManagerForDocument: no Basic, but providing ourself as script container?" );
}
- BasicManager* pBasMgr = NULL;
+ BasicManager* pBasMgr = nullptr;
if ( xForeignDocument.is() )
pBasMgr = ::basic::BasicManagerRepository::getDocumentBasicManager( xForeignDocument );
@@ -683,7 +683,7 @@ namespace
BasicManager* SfxObjectShell::GetBasicManager() const
{
- BasicManager* pBasMgr = NULL;
+ BasicManager* pBasMgr = nullptr;
#if HAVE_FEATURE_SCRIPTING
try
{
@@ -803,7 +803,7 @@ StarBASIC* SfxObjectShell::GetBasic() const
return NULL;
#else
BasicManager * pMan = GetBasicManager();
- return pMan ? pMan->GetLib(0) : NULL;
+ return pMan ? pMan->GetLib(0) : nullptr;
#endif
}
@@ -877,7 +877,7 @@ SfxObjectShell* SfxObjectShell::GetObjectShell()
uno::Sequence< OUString > SfxObjectShell::GetEventNames()
{
- static uno::Sequence< OUString >* pEventNameContainer = NULL;
+ static uno::Sequence< OUString >* pEventNameContainer = nullptr;
if ( !pEventNameContainer )
{
@@ -901,7 +901,7 @@ css::uno::Reference< css::frame::XModel > SfxObjectShell::GetModel() const
void SfxObjectShell::SetBaseModel( SfxBaseModel* pModel )
{
- OSL_ENSURE( !pImp->pBaseModel.is() || pModel == NULL, "Model already set!" );
+ OSL_ENSURE( !pImp->pBaseModel.is() || pModel == nullptr, "Model already set!" );
pImp->pBaseModel.set( pModel );
if ( pImp->pBaseModel.is() )
{
@@ -1075,7 +1075,7 @@ SfxObjectShell* SfxObjectShell::CreateObject( const OUString& rServiceName, SfxO
}
}
- return 0;
+ return nullptr;
}
Reference<lang::XComponent> SfxObjectShell::CreateAndLoadComponent( const SfxItemSet& rSet, SfxFrame* pFrame )
@@ -1119,7 +1119,7 @@ SfxObjectShell* SfxObjectShell::GetShellFromComponent( const Reference<lang::XCo
Sequence <sal_Int8> aSeq( SvGlobalName( SFX_GLOBAL_CLASSID ).GetByteSequence() );
sal_Int64 nHandle = xTunnel->getSomething( aSeq );
if (!nHandle)
- return NULL;
+ return nullptr;
return reinterpret_cast< SfxObjectShell* >(sal::static_int_cast< sal_IntPtr >( nHandle ));
}
@@ -1127,7 +1127,7 @@ SfxObjectShell* SfxObjectShell::GetShellFromComponent( const Reference<lang::XCo
{
}
- return NULL;
+ return nullptr;
}
void SfxObjectShell::SetInitialized_Impl( const bool i_fromInitNew )
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index d3c2156458c4..0d160dc86c62 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -783,7 +783,7 @@ bool SfxOleSection::GetInt32Value( sal_Int32& rnValue, sal_Int32 nPropId ) const
dynamic_cast< const SfxOleInt32Property* >( xProp.get() );
if( pProp )
rnValue = pProp->GetValue();
- return pProp != 0;
+ return pProp != nullptr;
}
bool SfxOleSection::GetDoubleValue( double& rfValue, sal_Int32 nPropId ) const
@@ -793,7 +793,7 @@ bool SfxOleSection::GetDoubleValue( double& rfValue, sal_Int32 nPropId ) const
dynamic_cast< const SfxOleDoubleProperty* >( xProp.get() );
if( pProp )
rfValue = pProp->GetValue();
- return pProp != 0;
+ return pProp != nullptr;
}
bool SfxOleSection::GetBoolValue( bool& rbValue, sal_Int32 nPropId ) const
@@ -803,7 +803,7 @@ bool SfxOleSection::GetBoolValue( bool& rbValue, sal_Int32 nPropId ) const
dynamic_cast< const SfxOleBoolProperty* >( xProp.get() );
if( pProp )
rbValue = pProp->GetValue();
- return pProp != 0;
+ return pProp != nullptr;
}
bool SfxOleSection::GetStringValue( OUString& rValue, sal_Int32 nPropId ) const
@@ -813,7 +813,7 @@ bool SfxOleSection::GetStringValue( OUString& rValue, sal_Int32 nPropId ) const
dynamic_cast< const SfxOleStringPropertyBase* >( xProp.get() );
if( pProp )
rValue = pProp->GetValue();
- return pProp != 0;
+ return pProp != nullptr;
}
bool SfxOleSection::GetFileTimeValue( util::DateTime& rValue, sal_Int32 nPropId ) const
@@ -828,7 +828,7 @@ bool SfxOleSection::GetFileTimeValue( util::DateTime& rValue, sal_Int32 nPropId
else
rValue = pProp->GetValue();
}
- return pProp != 0;
+ return pProp != nullptr;
}
bool SfxOleSection::GetDateValue( util::Date& rValue, sal_Int32 nPropId ) const
@@ -843,7 +843,7 @@ bool SfxOleSection::GetDateValue( util::Date& rValue, sal_Int32 nPropId ) const
else
rValue = pProp->GetValue();
}
- return pProp != 0;
+ return pProp != nullptr;
}
void SfxOleSection::SetProperty( SfxOlePropertyRef xProp )
diff --git a/sfx2/source/doc/ownsubfilterservice.cxx b/sfx2/source/doc/ownsubfilterservice.cxx
index 5a787d84fb24..fbff13da869b 100644
--- a/sfx2/source/doc/ownsubfilterservice.cxx
+++ b/sfx2/source/doc/ownsubfilterservice.cxx
@@ -58,7 +58,7 @@ public:
OwnSubFilterService::OwnSubFilterService(const css::uno::Sequence< css::uno::Any >& aArguments)
throw (uno::Exception, uno::RuntimeException)
- : m_pObjectShell( NULL )
+ : m_pObjectShell( nullptr )
{
if ( aArguments.getLength() != 2 )
throw lang::IllegalArgumentException();
diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index fd8c866fd0ca..2a8bd68f4817 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -218,7 +218,7 @@ void SAL_CALL PluginObject::cancel() throw( css::uno::RuntimeException, std::exc
uno::Reference< lang::XComponent > xComp( mxPlugin, uno::UNO_QUERY );
if (xComp.is())
xComp->dispose();
- mxPlugin = 0;
+ mxPlugin = nullptr;
}
void SAL_CALL PluginObject::close( sal_Bool /*bDeliverOwnership*/ ) throw( css::util::CloseVetoException, css::uno::RuntimeException, std::exception )
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index aef48becf548..39593395f85a 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -67,7 +67,7 @@ struct IMPL_PrintListener_DataContainer : public SfxListener
css::uno::Sequence< css::beans::PropertyValue > m_aPrintOptions;
explicit IMPL_PrintListener_DataContainer( ::osl::Mutex& aMutex)
- : m_pObjectShell ( 0 )
+ : m_pObjectShell ( nullptr )
, m_aInterfaceContainer ( aMutex )
{
}
@@ -131,7 +131,7 @@ Sequence< css::beans::PropertyValue > SAL_CALL SfxPrintJob_Impl::getPrinter() th
Reference< css::view::XPrintable > SAL_CALL SfxPrintJob_Impl::getPrintable() throw (RuntimeException, std::exception)
{
- Reference < view::XPrintable > xPrintable( m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->GetModel() : NULL, UNO_QUERY );
+ Reference < view::XPrintable > xPrintable( m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->GetModel() : nullptr, UNO_QUERY );
return xPrintable;
}
@@ -258,8 +258,8 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SfxPrintHelper::getPrinter() thro
SolarMutexGuard aGuard;
// search for any view of this document that is currently printing
- const Printer *pPrinter = NULL;
- SfxViewFrame *pViewFrm = m_pData->m_pObjectShell.Is() ? SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false ) : 0;
+ const Printer *pPrinter = nullptr;
+ SfxViewFrame *pViewFrm = m_pData->m_pObjectShell.Is() ? SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false ) : nullptr;
SfxViewFrame* pFirst = pViewFrm;
while ( pViewFrm && !pPrinter )
{
@@ -319,7 +319,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
{
// Get old Printer
SfxViewFrame *pViewFrm = m_pData->m_pObjectShell.Is() ?
- SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false ) : 0;
+ SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false ) : nullptr;
if ( !pViewFrm )
return;
@@ -455,8 +455,8 @@ void SAL_CALL SfxPrintHelper::setPrinter(const uno::Sequence< beans::PropertyVal
// object already disposed?
SolarMutexGuard aGuard;
- SfxViewShell* pViewSh = NULL;
- SfxPrinter* pPrinter = NULL;
+ SfxViewShell* pViewSh = nullptr;
+ SfxPrinter* pPrinter = nullptr;
SfxPrinterChangeFlags nChangeFlags = SfxPrinterChangeFlags::NONE;
impl_setPrinter(rPrinter,pPrinter,nChangeFlags,pViewSh);
// set new printer
@@ -575,7 +575,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread
// kill the temp file!
delete *ppTempFile;
- *ppTempFile = NULL;
+ *ppTempFile = nullptr;
}
};
@@ -596,7 +596,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// get view for sfx printing capabilities
SfxViewFrame *pViewFrm = m_pData->m_pObjectShell.Is() ?
- SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false ) : 0;
+ SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false ) : nullptr;
if ( !pViewFrm )
return;
SfxViewShell* pView = pViewFrm->GetViewShell();
@@ -610,7 +610,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// a local one we can suppress this special handling. Because then vcl makes all
// right for us.
OUString sUcbUrl;
- ::utl::TempFile* pUCBPrintTempFile = NULL;
+ ::utl::TempFile* pUCBPrintTempFile = nullptr;
uno::Sequence < beans::PropertyValue > aCheckedArgs( rOptions.getLength() );
sal_Int32 nProps = 0;
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 3a702be52cbd..3e10656578ce 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -230,7 +230,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
, m_bInitialized ( false )
, m_bExternalTitle ( false )
, m_bModifiedSinceLastSave( false )
- , m_pStorageModifyListen ( NULL )
+ , m_pStorageModifyListen ( nullptr )
, m_xTitleHelper ()
, m_xNumberedControllers ()
, m_xDocumentMetadata () // lazy
@@ -264,7 +264,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
OSL_ENSURE(m_pObjectShell, "GetDMA: no object shell?");
if (!m_pObjectShell)
{
- return 0;
+ return nullptr;
}
const Reference<XComponentContext> xContext(
@@ -285,7 +285,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
OSL_ENSURE(xContent.is(), "GetDMA: cannot create DocumentContent");
if (!xContent.is())
{
- return 0;
+ return nullptr;
}
uri = xContent->getIdentifier()->getContentIdentifier();
OSL_ENSURE(!uri.isEmpty(), "GetDMA: empty uri?");
@@ -305,7 +305,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
return (m_pObjectShell)
? new ::sfx2::DocumentMetadataAccess(
::comphelper::getProcessComponentContext(), *m_pObjectShell)
- : 0;
+ : nullptr;
}
};
@@ -329,13 +329,13 @@ public:
void SAL_CALL SfxPrintHelperListener_Impl::disposing( const lang::EventObject& ) throw ( RuntimeException, std::exception )
{
- m_pData->m_xPrintable = 0;
+ m_pData->m_xPrintable = nullptr;
}
void SAL_CALL SfxPrintHelperListener_Impl::printJobEvent( const view::PrintJobEvent& rEvent ) throw (RuntimeException, std::exception)
{
::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<view::XPrintJobListener>::get());
- if ( pContainer!=NULL )
+ if ( pContainer!=nullptr )
{
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
while (pIterator.hasMoreElements())
@@ -406,7 +406,7 @@ SfxOwnFramesLocker::~SfxOwnFramesLocker()
vcl::Window* SfxOwnFramesLocker::GetVCLWindow( const Reference< frame::XFrame >& xFrame )
{
- vcl::Window* pWindow = NULL;
+ vcl::Window* pWindow = nullptr;
if ( xFrame.is() )
{
@@ -463,7 +463,7 @@ SfxSaveGuard::SfxSaveGuard(const Reference< frame::XModel >& xModel
bool bRejectConcurrentSaveRequest)
: m_xModel (xModel)
, m_pData (pData )
- , m_pFramesLock(0 )
+ , m_pFramesLock(nullptr )
{
if ( m_pData->m_bClosed )
throw lang::DisposedException("Object already disposed.");
@@ -482,7 +482,7 @@ SfxSaveGuard::SfxSaveGuard(const Reference< frame::XModel >& xModel
SfxSaveGuard::~SfxSaveGuard()
{
SfxOwnFramesLocker* pFramesLock = m_pFramesLock;
- m_pFramesLock = 0;
+ m_pFramesLock = nullptr;
delete pFramesLock;
m_pData->m_bSaving = false;
@@ -515,7 +515,7 @@ SfxBaseModel::SfxBaseModel( SfxObjectShell *pObjectShell )
, m_bSupportEmbeddedScripts( pObjectShell && pObjectShell->Get_Impl() && !pObjectShell->Get_Impl()->m_bNoBasicCapabilities )
, m_bSupportDocRecovery( pObjectShell && pObjectShell->Get_Impl() && pObjectShell->Get_Impl()->m_bDocRecoverySupport )
{
- if ( pObjectShell != NULL )
+ if ( pObjectShell != nullptr )
{
StartListening( *pObjectShell ) ;
}
@@ -526,7 +526,7 @@ SfxBaseModel::~SfxBaseModel()
{
//In SvxDrawingLayerImport when !xTargetDocument the fallback SvxUnoDrawingModel created there
//never gets disposed called on it, so m_pData leaks.
- delete m_pData, m_pData = 0;
+ delete m_pData, m_pData = nullptr;
}
// XInterface
@@ -763,13 +763,13 @@ void SAL_CALL SfxBaseModel::dispose() throw(RuntimeException, std::exception)
if ( m_pData->m_pStorageModifyListen.is() )
{
m_pData->m_pStorageModifyListen->dispose();
- m_pData->m_pStorageModifyListen = NULL;
+ m_pData->m_pStorageModifyListen = nullptr;
}
if ( m_pData->m_pDocumentUndoManager.is() )
{
m_pData->m_pDocumentUndoManager->disposing();
- m_pData->m_pDocumentUndoManager = NULL;
+ m_pData->m_pDocumentUndoManager = nullptr;
}
lang::EventObject aEvent( static_cast<frame::XModel *>(this) );
@@ -791,7 +791,7 @@ void SAL_CALL SfxBaseModel::dispose() throw(RuntimeException, std::exception)
// force disposed exception whenever someone tries to access our
// instance while in the dtor.
IMPL_SfxBaseModel_DataContainer* pData = m_pData;
- m_pData = 0;
+ m_pData = nullptr;
delete pData;
}
@@ -1368,7 +1368,7 @@ void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::Clo
Reference< XInterface > xSelfHold( static_cast< ::cppu::OWeakObject* >(this) );
lang::EventObject aSource ( static_cast< ::cppu::OWeakObject* >(this) );
::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<util::XCloseListener>::get());
- if (pContainer!=NULL)
+ if (pContainer!=nullptr)
{
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
while (pIterator.hasMoreElements())
@@ -1396,7 +1396,7 @@ void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::Clo
// no own objections against closing!
m_pData->m_bClosing = true;
pContainer = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<util::XCloseListener>::get());
- if (pContainer!=NULL)
+ if (pContainer!=nullptr)
{
::cppu::OInterfaceIteratorHelper pCloseIterator(*pContainer);
while (pCloseIterator.hasMoreElements())
@@ -2373,7 +2373,7 @@ Reference< document::XEmbeddedScripts > SAL_CALL SfxBaseModel::getScriptContaine
Reference< container::XChild > xDocAsChild( xDocument, UNO_QUERY );
if ( !xDocAsChild.is() )
{
- xDocument = NULL;
+ xDocument = nullptr;
break;
}
@@ -2384,7 +2384,7 @@ Reference< document::XEmbeddedScripts > SAL_CALL SfxBaseModel::getScriptContaine
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
- xDocumentScripts = NULL;
+ xDocumentScripts = nullptr;
}
return xDocumentScripts;
@@ -2699,7 +2699,7 @@ SfxMedium* SfxBaseModel::handleLoadError( sal_uInt32 nError, SfxMedium* pMedium
// for whatever reason document now has another medium
OSL_FAIL("Document has rejected the medium?!");
delete pMedium;
- pMedium = NULL;
+ pMedium = nullptr;
}
if ( !bWarning ) // #i30711# don't abort loading if it's only a warning
@@ -2876,7 +2876,7 @@ void SfxBaseModel::changing()
SfxObjectShell* SfxBaseModel::GetObjectShell() const
{
- return m_pData ? static_cast<SfxObjectShell*>(m_pData->m_pObjectShell) : 0;
+ return m_pData ? static_cast<SfxObjectShell*>(m_pData->m_pObjectShell) : nullptr;
}
@@ -2891,7 +2891,7 @@ bool SfxBaseModel::IsInitialized() const
return false;
}
- return m_pData->m_pObjectShell->GetMedium() != NULL;
+ return m_pData->m_pObjectShell->GetMedium() != nullptr;
}
void SfxBaseModel::MethodEntryCheck( const bool i_mustBeInitialized ) const
@@ -2904,7 +2904,7 @@ void SfxBaseModel::MethodEntryCheck( const bool i_mustBeInitialized ) const
bool SfxBaseModel::impl_isDisposed() const
{
- return ( m_pData == NULL ) ;
+ return ( m_pData == nullptr ) ;
}
@@ -2913,7 +2913,7 @@ bool SfxBaseModel::impl_isDisposed() const
OUString SfxBaseModel::GetMediumFilterName_Impl()
{
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium();
if ( pMedium )
pFilter = pMedium->GetFilter();
@@ -3282,7 +3282,7 @@ void SfxBaseModel::notifyEvent( const document::EventObject& aEvent ) const
/** returns true if someone added a XEventListener to this XEventBroadcaster */
bool SfxBaseModel::hasEventListeners() const
{
- return !impl_isDisposed() && (NULL != m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XEventListener>::get()) );
+ return !impl_isDisposed() && (nullptr != m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XEventListener>::get()) );
}
void SAL_CALL SfxBaseModel::addPrintJobListener( const Reference< view::XPrintJobListener >& xListener ) throw (RuntimeException, std::exception)
@@ -4162,7 +4162,7 @@ namespace sfx { namespace intern {
void takeFrameOwnership( SfxFrame* i_pFrame )
{
OSL_PRECOND( !m_aWeakFrame, "ViewCreationGuard::takeFrameOwnership: already have a frame!" );
- OSL_PRECOND( i_pFrame != NULL, "ViewCreationGuard::takeFrameOwnership: invalid frame!" );
+ OSL_PRECOND( i_pFrame != nullptr, "ViewCreationGuard::takeFrameOwnership: invalid frame!" );
m_aWeakFrame = i_pFrame;
}
@@ -4176,7 +4176,7 @@ namespace sfx { namespace intern {
{
if ( m_aWeakFrame && !m_aWeakFrame->GetCurrentDocument() )
{
- m_aWeakFrame->SetFrameInterface_Impl( NULL );
+ m_aWeakFrame->SetFrameInterface_Impl( nullptr );
m_aWeakFrame->DoClose();
}
}
@@ -4190,7 +4190,7 @@ namespace sfx { namespace intern {
SfxViewFrame* SfxBaseModel::FindOrCreateViewFrame_Impl( const Reference< XFrame >& i_rFrame, ::sfx::intern::ViewCreationGuard& i_rGuard ) const
{
- SfxViewFrame* pViewFrame = NULL;
+ SfxViewFrame* pViewFrame = nullptr;
for ( pViewFrame = SfxViewFrame::GetFirst( GetObjectShell(), false );
pViewFrame;
pViewFrame= SfxViewFrame::GetNext( *pViewFrame, GetObjectShell(), false )
@@ -4209,8 +4209,8 @@ SfxViewFrame* SfxBaseModel::FindOrCreateViewFrame_Impl( const Reference< XFrame
{
if ( pCheckFrame->GetFrameInterface() == i_rFrame )
{
- if ( ( pCheckFrame->GetCurrentViewFrame() != NULL )
- || ( pCheckFrame->GetCurrentDocument() != NULL )
+ if ( ( pCheckFrame->GetCurrentViewFrame() != nullptr )
+ || ( pCheckFrame->GetCurrentDocument() != nullptr )
)
// Note that it is perfectly letgitimate that during loading into an XFrame which already contains
// a document, there exist two SfxFrame instances bound to this XFrame - the old one, which will be
@@ -4265,7 +4265,7 @@ Reference< frame::XController2 > SAL_CALL SfxBaseModel::createViewController(
xPreviousController.clear();
}
SfxViewShell* pOldViewShell = SfxViewShell::Get( xPreviousController );
- OSL_ENSURE( !xPreviousController.is() || ( pOldViewShell != NULL ),
+ OSL_ENSURE( !xPreviousController.is() || ( pOldViewShell != nullptr ),
"SfxBaseModel::createViewController: invalid old controller!" );
// a guard which will clean up in case of failure
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 5b133a61bcbe..9408f99310be 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -633,7 +633,7 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu, bo
{
sal_uInt16 nRepoId = nMenuId - MNI_REPOSITORY_BASE;
- TemplateRepository *pRepository = NULL;
+ TemplateRepository *pRepository = nullptr;
for (size_t i = 0, n = maRepositories.size(); i < n; ++i)
{
@@ -690,7 +690,7 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, OpenTemplateHdl, ThumbnailViewItem*, pIte
aArgs[2].Name = "UpdateDocMode";
aArgs[2].Value <<= UpdateDocMode::ACCORDING_TO_CONFIG;
aArgs[3].Name = "InteractionHandler";
- aArgs[3].Value <<= task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), 0 );
+ aArgs[3].Value <<= task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr );
TemplateViewItem *pTemplateItem = static_cast<TemplateViewItem*>(pItem);
diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx
index 3e391537ff43..1d8cf28a24c8 100644
--- a/sfx2/source/explorer/nochaos.cxx
+++ b/sfx2/source/explorer/nochaos.cxx
@@ -91,14 +91,14 @@ sal_uInt16 NoChaos::ReleaseItemPool()
// CntItemPool implementation
-static CntStaticPoolDefaults_Impl* pPoolDefs_Impl = NULL;
+static CntStaticPoolDefaults_Impl* pPoolDefs_Impl = nullptr;
// static member!
-CntItemPool* CntItemPool::_pThePool = NULL;
+CntItemPool* CntItemPool::_pThePool = nullptr;
CntItemPool::CntItemPool()
-: SfxItemPool( "chaos", WID_CHAOS_START, WID_CHAOS_START, NULL ),
+: SfxItemPool( "chaos", WID_CHAOS_START, WID_CHAOS_START, nullptr ),
_nRefs( 0 )
{
SetFileFormatVersion( SOFFICE_FILEFORMAT_50 );
diff --git a/sfx2/source/inc/appbaslib.hxx b/sfx2/source/inc/appbaslib.hxx
index 6338b8744c4f..f90590426ecc 100644
--- a/sfx2/source/inc/appbaslib.hxx
+++ b/sfx2/source/inc/appbaslib.hxx
@@ -51,7 +51,7 @@ public:
/** returns <TRUE/> if and only if the instance is currently bound to a non-<NULL/>
BasicManager.
*/
- bool isValid() const { return mpBasicManager != NULL; }
+ bool isValid() const { return mpBasicManager != nullptr; }
/** returns the BasicManager which this instance is currently bound to
*/
diff --git a/sfx2/source/inc/inputdlg.hxx b/sfx2/source/inc/inputdlg.hxx
index 139cada1dc0c..fb199a842fd2 100644
--- a/sfx2/source/inc/inputdlg.hxx
+++ b/sfx2/source/inc/inputdlg.hxx
@@ -20,7 +20,7 @@ class Button;
class InputDialog : public ModalDialog
{
public:
- InputDialog (const OUString &labelText, vcl::Window *pParent = NULL);
+ InputDialog (const OUString &labelText, vcl::Window *pParent = nullptr);
OUString getEntryText () const;
virtual ~InputDialog();
virtual void dispose() override;
diff --git a/sfx2/source/inc/macroloader.hxx b/sfx2/source/inc/macroloader.hxx
index e81c8285da38..fe11d3beab0e 100644
--- a/sfx2/source/inc/macroloader.hxx
+++ b/sfx2/source/inc/macroloader.hxx
@@ -63,7 +63,7 @@ public:
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
- static ErrCode loadMacro( const OUString& aURL, css::uno::Any& rRetval, SfxObjectShell* pDoc=NULL ) throw( css::uno::RuntimeException, css::ucb::ContentCreationException, std::exception );
+ static ErrCode loadMacro( const OUString& aURL, css::uno::Any& rRetval, SfxObjectShell* pDoc=nullptr ) throw( css::uno::RuntimeException, css::ucb::ContentCreationException, std::exception );
virtual css::uno::Reference < css::frame::XDispatch > SAL_CALL queryDispatch(
const css::util::URL& aURL, const OUString& sTargetFrameName,
diff --git a/sfx2/source/inc/slotserv.hxx b/sfx2/source/inc/slotserv.hxx
index b8eff4334b30..34e02d3b3fca 100644
--- a/sfx2/source/inc/slotserv.hxx
+++ b/sfx2/source/inc/slotserv.hxx
@@ -46,7 +46,7 @@ inline SfxSlotServer::SfxSlotServer( const SfxSlot &rSlot, sal_uInt16 nShell ):
}
inline SfxSlotServer::SfxSlotServer():
- _pSlot(0),
+ _pSlot(nullptr),
_nShellLevel(0)
{
}
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
index 7a0006a25136..844ef68fcf40 100644
--- a/sfx2/source/inc/statcach.hxx
+++ b/sfx2/source/inc/statcach.hxx
@@ -103,7 +103,7 @@ public:
SfxControllerItem* GetItemLink() const;
void SetInternalController( SfxControllerItem* pCtrl )
{ DBG_ASSERT( !pInternalController, "Only one internal controller allowed!" ); pInternalController = pCtrl; }
- void ReleaseInternalController() { pInternalController = 0; }
+ void ReleaseInternalController() { pInternalController = nullptr; }
SfxControllerItem* GetInternalController() const { return pInternalController; }
css::uno::Reference < css::frame::XDispatch >
GetInternalDispatch() const
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index f0e61b004f5e..eb16a8e2fe46 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -251,7 +251,7 @@ protected:
bool Execute_Impl(sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr,
sal_uInt16 nFamily, sal_uInt16 nMask = 0,
- sal_uInt16* pIdx = NULL, const sal_uInt16* pModifier = NULL );
+ sal_uInt16* pIdx = nullptr, const sal_uInt16* pModifier = nullptr );
void UpdateStyles_Impl(sal_uInt16 nFlags);
const SfxStyleFamilyItem* GetFamilyItem_Impl() const;
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index a02dfc30d136..3dc52554d3b7 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -59,7 +59,7 @@ struct SfxObjectBar_Impl
nPos(0),
nIndex(0),
bDestroy(false),
- pIFace(0)
+ pIFace(nullptr)
{}
};
@@ -130,9 +130,9 @@ struct SfxChildWin_Impl
nSaveId((sal_uInt16) (nID & 0xFFFF) ),
nInterfaceId((sal_uInt16) (nID >> 16)),
nId(nSaveId),
- pWin(0),
+ pWin(nullptr),
bCreate(false),
- pCli(0),
+ pCli(nullptr),
nVisibility( SFX_VISIBILITY_UNVISIBLE ),
bEnable( true ),
bDisabled( false )
@@ -254,7 +254,7 @@ protected:
static bool IsPluginMode( SfxObjectShell* pObjShell );
public:
- SfxWorkWindow( vcl::Window *pWin, SfxBindings& rBindings, SfxWorkWindow* pParent = NULL);
+ SfxWorkWindow( vcl::Window *pWin, SfxBindings& rBindings, SfxWorkWindow* pParent = nullptr);
virtual ~SfxWorkWindow();
SfxBindings& GetBindings()
{ return *pBindings; }
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index 66870a07aa5c..a83e84b7f47d 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -126,7 +126,7 @@ void SfxURLToolBoxControl_Impl::OpenURL( const OUString& rName, bool /*bNew*/ )
pExecuteInfo->xDispatch = xDispatch;
pExecuteInfo->aTargetURL = aTargetURL;
pExecuteInfo->aArgs = aArgs;
- Application::PostUserEvent( LINK( 0, SfxURLToolBoxControl_Impl, ExecuteHdl_Impl), pExecuteInfo );
+ Application::PostUserEvent( LINK( nullptr, SfxURLToolBoxControl_Impl, ExecuteHdl_Impl), pExecuteInfo );
}
}
}
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index eabf1aa36a0d..40c6b6e726c4 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -77,7 +77,7 @@ void SfxMenuControl::Bind(
{
aTitle = rTitle;
pOwnMenu = pOwn;
- pSubMenu = 0;
+ pSubMenu = nullptr;
if ( pOwn )
SfxControllerItem::Bind(nSlotId, &rBindings);
else
@@ -112,8 +112,8 @@ void SfxMenuControl::Bind(
// Constructor for explicit registration
SfxMenuControl::SfxMenuControl( bool bShowStrings )
-: pOwnMenu(0),
- pSubMenu(0),
+: pOwnMenu(nullptr),
+ pSubMenu(nullptr),
b_ShowStrings(bShowStrings)
{
}
@@ -122,8 +122,8 @@ SfxMenuControl::SfxMenuControl( bool bShowStrings )
// Constructor for array
SfxMenuControl::SfxMenuControl():
- pOwnMenu(0),
- pSubMenu(0),
+ pOwnMenu(nullptr),
+ pSubMenu(nullptr),
b_ShowStrings(false)
{
}
@@ -132,8 +132,8 @@ SfxMenuControl::SfxMenuControl():
SfxMenuControl::SfxMenuControl(sal_uInt16 nSlotId, SfxBindings& rBindings):
SfxControllerItem(nSlotId, rBindings),
- pOwnMenu(0),
- pSubMenu(0),
+ pOwnMenu(nullptr),
+ pSubMenu(nullptr),
b_ShowStrings(false)
{
// This constructor should make it possible already during the design
@@ -164,7 +164,7 @@ void SfxMenuControl::StateChanged
{
(void)nSID;
DBG_ASSERT( nSID == GetId(), "strange SID" );
- DBG_ASSERT( pOwnMenu != 0, "setting state to dangling SfxMenuControl" );
+ DBG_ASSERT( pOwnMenu != nullptr, "setting state to dangling SfxMenuControl" );
bool bIsObjMenu =
GetId() >= SID_OBJECTMENU0 && GetId() < SID_OBJECTMENU_LAST;
@@ -177,7 +177,7 @@ void SfxMenuControl::StateChanged
else
#endif
pOwnMenu->EnableItem( GetId(), bIsObjMenu
- ? 0 != pOwnMenu->GetSVMenu()->GetPopupMenu( GetId() )
+ ? nullptr != pOwnMenu->GetSVMenu()->GetPopupMenu( GetId() )
: eState != SfxItemState::DISABLED );
if ( eState != SfxItemState::DEFAULT )
@@ -263,7 +263,7 @@ SfxMenuControl* SfxMenuControl::CreateControl( sal_uInt16 nId, Menu &rMenu, SfxB
{
SfxApplication *pApp = SfxGetpApp();
SfxDispatcher *pDisp = rBindings.GetDispatcher_Impl();
- SfxModule *pMod = pDisp ? SfxModule::GetActiveModule( pDisp->GetFrame() ) :0;
+ SfxModule *pMod = pDisp ? SfxModule::GetActiveModule( pDisp->GetFrame() ) :nullptr;
if ( pMod )
{
SfxMenuCtrlFactArr_Impl *pFactories = pMod->GetMenuCtrlFactories_Impl();
@@ -286,7 +286,7 @@ SfxMenuControl* SfxMenuControl::CreateControl( sal_uInt16 nId, Menu &rMenu, SfxB
( rFactories[nFactory].nSlotId == nId) ) )
return rFactories[nFactory].pCtor( nId, rMenu, rBindings );
}
- return 0;
+ return nullptr;
}
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
index 3655d8f2341e..908c3667938a 100644
--- a/sfx2/source/menu/mnumgr.cxx
+++ b/sfx2/source/menu/mnumgr.cxx
@@ -65,7 +65,7 @@
#include "thessubmenu.hxx"
// static member initialization
-PopupMenu * SfxPopupMenuManager::pStaticThesSubMenu = NULL;
+PopupMenu * SfxPopupMenuManager::pStaticThesSubMenu = nullptr;
using namespace com::sun::star;
@@ -133,8 +133,8 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu )
// build thesaurus sub menu if look-up string is available
- PopupMenu* pThesSubMenu = 0;
- SfxPoolItem *pItem = 0;
+ PopupMenu* pThesSubMenu = nullptr;
+ SfxPoolItem *pItem = nullptr;
pBindings->QueryState( SID_THES, pItem );
OUString aThesLookUpStr;
SfxStringItem *pStrItem = dynamic_cast< SfxStringItem * >(pItem);
@@ -255,14 +255,14 @@ void SfxPopupMenuManager::RemoveDisabledEntries()
sal_uInt16 SfxPopupMenuManager::Execute( const Point& rPos, vcl::Window* pWindow )
{
sal_uInt16 nVal = static_cast<PopupMenu*>( GetMenu()->GetSVMenu() )->Execute( pWindow, rPos );
- delete pStaticThesSubMenu; pStaticThesSubMenu = NULL;
+ delete pStaticThesSubMenu; pStaticThesSubMenu = nullptr;
return nVal;
}
SfxMenuManager::SfxMenuManager( Menu* pMenuArg, SfxBindings &rBindings )
-: pMenu(0),
+: pMenu(nullptr),
pBindings(&rBindings)
{
bAddClipboardFuncs = false;
@@ -305,7 +305,7 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra
}
InsertVerbs_Impl( &pFrame->GetBindings(), pFrame->GetViewShell()->GetVerbs(), pSVMenu );
- Menu* pMenu = NULL;
+ Menu* pMenu = nullptr;
css::ui::ContextMenuExecuteEvent aEvent;
aEvent.SourceWindow = VCLUnoHelper::GetInterface( pWindow );
aEvent.ExecutePosition.X = rPoint.X();
@@ -324,7 +324,7 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra
return aMgr;
}
- return 0;
+ return nullptr;
}
@@ -355,7 +355,7 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram
}
InsertVerbs_Impl( &pFrame->GetBindings(), pFrame->GetViewShell()->GetVerbs(), pSVMenu );
- Menu* pMenu = NULL;
+ Menu* pMenu = nullptr;
css::ui::ContextMenuExecuteEvent aEvent;
aEvent.SourceWindow = VCLUnoHelper::GetInterface( pWindow );
aEvent.ExecutePosition.X = rPoint.X();
@@ -377,7 +377,7 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram
// the (manually inserted) sub-menu needs to be destroyed before
// aPop gets destroyed.
delete pThesSubMenu;
- pThesSubMenu = 0;
+ pThesSubMenu = nullptr;
}
delete pThesSubMenu;
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index 55155f2bb22a..cdf4752a63d0 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -168,10 +168,10 @@ void SfxVirtualMenu::Construct_Impl()
SfxVirtualMenu::SfxVirtualMenu( sal_uInt16 nOwnId,
SfxVirtualMenu* pOwnParent, Menu& rMenu, bool bWithHelp,
SfxBindings &rBindings, bool bOLEServer, bool bRes, bool bIsAddonMenu ):
- pItems(0),
- pImageControl(0),
+ pItems(nullptr),
+ pImageControl(nullptr),
pBindings(&rBindings),
- pResMgr(0),
+ pResMgr(nullptr),
nLocks(0),
bHelpInitialized( bWithHelp ),
bIsAddonPopupMenu( bIsAddonMenu )
@@ -183,10 +183,10 @@ SfxVirtualMenu::SfxVirtualMenu( sal_uInt16 nOwnId,
nId = nOwnId;
pParent = pOwnParent;
nVisibleItems = 0;
- pAppCtrl = 0;
- pWindowMenu = NULL;
- pPickMenu = NULL;
- pAddonsMenu = NULL;
+ pAppCtrl = nullptr;
+ pWindowMenu = nullptr;
+ pPickMenu = nullptr;
+ pAddonsMenu = nullptr;
bIsActive = false;
bControllersUnBound = false;
CreateFromSVMenu();
@@ -200,10 +200,10 @@ SfxVirtualMenu::SfxVirtualMenu( sal_uInt16 nOwnId,
SfxVirtualMenu::SfxVirtualMenu( Menu *pStarViewMenu, bool bWithHelp,
SfxBindings &rBindings, bool bOLEServer, bool bRes, bool bIsAddonMenu ):
- pItems(0),
- pImageControl(0),
+ pItems(nullptr),
+ pImageControl(nullptr),
pBindings(&rBindings),
- pResMgr(0),
+ pResMgr(nullptr),
nLocks(0),
bHelpInitialized( bWithHelp ),
bIsAddonPopupMenu( bIsAddonMenu )
@@ -214,12 +214,12 @@ SfxVirtualMenu::SfxVirtualMenu( Menu *pStarViewMenu, bool bWithHelp,
bResCtor = bRes;
bOLE = bOLEServer;
nId = 0;
- pParent = 0;
- pAppCtrl = 0;
+ pParent = nullptr;
+ pAppCtrl = nullptr;
nVisibleItems = 0;
- pWindowMenu = NULL;
- pPickMenu = NULL;
- pAddonsMenu = NULL;
+ pWindowMenu = nullptr;
+ pPickMenu = nullptr;
+ pAddonsMenu = nullptr;
bIsActive = false;
bControllersUnBound = false;
CreateFromSVMenu();
@@ -251,7 +251,7 @@ SfxVirtualMenu::~SfxVirtualMenu()
}
delete pAppCtrl;
- pBindings = 0;
+ pBindings = nullptr;
// All the menus, which were created by SV, will also be there deleted
// again (i.e. created by loading them from the resource)
@@ -262,13 +262,13 @@ SfxVirtualMenu::~SfxVirtualMenu()
if ( pParent )
{
if( pParent->pSVMenu->GetItemPos( nId ) != MENU_ITEM_NOTFOUND )
- pParent->pSVMenu->SetPopupMenu( nId, 0 );
+ pParent->pSVMenu->SetPopupMenu( nId, nullptr );
if ( pParent->pPickMenu == pSVMenu )
- pParent->pPickMenu = 0;
+ pParent->pPickMenu = nullptr;
if ( pParent->pWindowMenu == pSVMenu)
- pParent->pWindowMenu = 0;
+ pParent->pWindowMenu = nullptr;
if ( pParent->pAddonsMenu == pSVMenu )
- pParent->pAddonsMenu = 0;
+ pParent->pAddonsMenu = nullptr;
}
delete pSVMenu;
@@ -344,7 +344,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
if( pPopup && nSlotId >= SID_OBJECTMENU0 && nSlotId <= SID_OBJECTMENU_LAST )
{
// artefact in XML menuconfig: every entry in root menu must have a popup!
- pSVMenu->SetPopupMenu( nSlotId, NULL );
+ pSVMenu->SetPopupMenu( nSlotId, nullptr );
DELETEZ( pPopup );
}
@@ -361,13 +361,13 @@ void SfxVirtualMenu::CreateFromSVMenu()
// The pop was obviously not "real" and such are never loaded
// from the resource and need thus to be explicitly deleted.
if ( pSVMenu->GetPopupMenu( nSlotId ) == pPopup )
- pSVMenu->SetPopupMenu( nSlotId, NULL );
+ pSVMenu->SetPopupMenu( nSlotId, nullptr );
delete pPopup;
- pPopup = 0;
+ pPopup = nullptr;
SfxMenuCtrlArr_Impl &rCtrlArr = GetAppCtrl_Impl();
rCtrlArr.push_back(pMnuCtrl);
- (pItems+nPos)->Bind( 0, nSlotId, sItemText, *pBindings);
+ (pItems+nPos)->Bind( nullptr, nSlotId, sItemText, *pBindings);
pMnuCtrl->Bind( this, nSlotId, sItemText, *pBindings);
if ( Application::GetSettings().GetStyleSettings().GetUseImagesInMenus() )
@@ -400,7 +400,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
case MenuItemType::STRING:
case MenuItemType::STRINGIMAGE:
{
- SfxMenuControl *pMnuCtrl=0;
+ SfxMenuControl *pMnuCtrl=nullptr;
OUString aCmd( pSVMenu->GetItemCommand( nSlotId ) );
if ( !aCmd.isEmpty() && (( nSlotId < SID_SFX_START ) || ( nSlotId > SHRT_MAX )) )
{
@@ -410,7 +410,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
{
SfxMenuCtrlArr_Impl &rCtrlArr = GetAppCtrl_Impl();
rCtrlArr.push_back(pMnuCtrl);
- (pItems+nPos)->Bind( 0, nSlotId, sItemText, *pBindings);
+ (pItems+nPos)->Bind( nullptr, nSlotId, sItemText, *pBindings);
}
}
@@ -422,7 +422,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
{
SfxMenuCtrlArr_Impl &rCtrlArr = GetAppCtrl_Impl();
rCtrlArr.push_back(pMnuCtrl);
- (pItems+nPos)->Bind( 0, nSlotId, sItemText, *pBindings);
+ (pItems+nPos)->Bind( nullptr, nSlotId, sItemText, *pBindings);
}
else
// take default control
@@ -737,7 +737,7 @@ void SfxVirtualMenu::InsertAddOnsMenuItem( Menu* pMenu )
::framework::MenuConfiguration aConf( ::comphelper::getProcessComponentContext() );
Reference<css::frame::XFrame> xFrame( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame().GetFrameInterface() );
- PopupMenu* pAddonMenu = NULL;
+ PopupMenu* pAddonMenu = nullptr;
try
{
Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
@@ -914,7 +914,7 @@ IMPL_LINK_TYPED( SfxVirtualMenu, Deactivate, Menu *, pMenu, bool )
"sfx",
"SfxVirtualMenu " << this << " deactivated " << pMenu << ", own "
<< pSVMenu);
- if ( bIsActive && ( 0 == pMenu || pMenu == pSVMenu ) )
+ if ( bIsActive && ( nullptr == pMenu || pMenu == pSVMenu ) )
{
// All controllers can be unbinded all the way up to the Menubar,
// when the menu is disabled (= closed)
@@ -986,7 +986,7 @@ IMPL_LINK_TYPED( SfxVirtualMenu, Select, Menu *, pMenu, bool )
void SfxVirtualMenu::CheckItem( sal_uInt16 nItemId, bool bCheck )
{
- DBG_ASSERT( pSVMenu != 0, "" );
+ DBG_ASSERT( pSVMenu != nullptr, "" );
if (pSVMenu->GetItemPos( nItemId ) != MENU_ITEM_NOTFOUND )
pSVMenu->CheckItem( nItemId, bCheck );
}
@@ -996,7 +996,7 @@ void SfxVirtualMenu::CheckItem( sal_uInt16 nItemId, bool bCheck )
void SfxVirtualMenu::EnableItem( sal_uInt16 nItemId, bool bEnable )
{
- DBG_ASSERT( pSVMenu != 0, "" );
+ DBG_ASSERT( pSVMenu != nullptr, "" );
if (pSVMenu->GetItemPos( nItemId ) != MENU_ITEM_NOTFOUND )
pSVMenu->EnableItem( nItemId, bEnable );
@@ -1007,7 +1007,7 @@ void SfxVirtualMenu::EnableItem( sal_uInt16 nItemId, bool bEnable )
void SfxVirtualMenu::SetItemText( sal_uInt16 nItemId, const OUString& rText )
{
- DBG_ASSERT( pSVMenu != 0, "" );
+ DBG_ASSERT( pSVMenu != nullptr, "" );
if (pSVMenu->GetItemPos( nItemId ) != MENU_ITEM_NOTFOUND )
pSVMenu->SetItemText( nItemId, rText );
}
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 43df7bbe5963..b61e19002261 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -233,7 +233,7 @@ void SfxEvents_Impl::Execute( uno::Any& aEventData, const document::DocumentEven
uno::Reference
< frame::XDispatchProvider > xProv;
- if ( pView != NULL )
+ if ( pView != nullptr )
{
xProv = uno::Reference
< frame::XDispatchProvider > (
@@ -297,7 +297,7 @@ void SAL_CALL SfxEvents_Impl::notifyEvent( const document::EventObject& aEvent )
uno::Any aEventData = maEventData[ nIndex ];
aGuard.clear();
- Execute( aEventData, document::DocumentEvent(aEvent.Source, aEvent.EventName, NULL, uno::Any()), mpObjShell );
+ Execute( aEventData, document::DocumentEvent(aEvent.Source, aEvent.EventName, nullptr, uno::Any()), mpObjShell );
}
@@ -310,7 +310,7 @@ void SAL_CALL SfxEvents_Impl::disposing( const lang::EventObject& /*Source*/ ) t
if ( mxBroadcaster.is() )
{
mxBroadcaster->removeEventListener( this );
- mxBroadcaster = NULL;
+ mxBroadcaster = nullptr;
}
}
@@ -342,7 +342,7 @@ SfxEvents_Impl::~SfxEvents_Impl()
SvxMacro* SfxEvents_Impl::ConvertToMacro( const uno::Any& rElement, SfxObjectShell* pObjShell, bool bNormalizeMacro )
{
- SvxMacro* pMacro = NULL;
+ SvxMacro* pMacro = nullptr;
uno::Sequence < beans::PropertyValue > aProperties;
uno::Any aAny;
if ( bNormalizeMacro )
diff --git a/sfx2/source/notify/globalevents.cxx b/sfx2/source/notify/globalevents.cxx
index 046710cd85a3..6ca80e0a4e7a 100644
--- a/sfx2/source/notify/globalevents.cxx
+++ b/sfx2/source/notify/globalevents.cxx
@@ -162,7 +162,7 @@ SfxGlobalEvents_Impl::SfxGlobalEvents_Impl( const uno::Reference < uno::XCompone
, m_xJobExecutorListener( task::theJobExecutor::get( rxContext ), uno::UNO_QUERY_THROW )
, m_aLegacyListeners (m_aLock)
, m_aDocumentListeners (m_aLock)
- , pImp (0 )
+ , pImp (nullptr )
{
m_refCount++;
SfxGetpApp();
@@ -229,7 +229,7 @@ void SAL_CALL SfxGlobalEvents_Impl::notifyDocumentEvent( const OUString& /*_Even
void SAL_CALL SfxGlobalEvents_Impl::notifyEvent(const document::EventObject& aEvent)
throw(uno::RuntimeException, std::exception)
{
- document::DocumentEvent aDocEvent(aEvent.Source, aEvent.EventName, NULL, uno::Any());
+ document::DocumentEvent aDocEvent(aEvent.Source, aEvent.EventName, nullptr, uno::Any());
implts_notifyJobExecution(aEvent);
implts_checkAndExecuteEventBindings(aDocEvent);
implts_notifyListener(aDocEvent);
@@ -417,7 +417,7 @@ void SfxGlobalEvents_Impl::implts_checkAndExecuteEventBindings(const document::D
uno::Any aAny;
if ( xEvents.is() && xEvents->hasByName( aEvent.EventName ) )
aAny = xEvents->getByName(aEvent.EventName);
- SfxEvents_Impl::Execute(aAny, aEvent, 0);
+ SfxEvents_Impl::Execute(aAny, aEvent, nullptr);
}
catch ( uno::RuntimeException const & )
{
diff --git a/sfx2/source/sidebar/AccessibleTitleBar.cxx b/sfx2/source/sidebar/AccessibleTitleBar.cxx
index e0f68a4a5354..c827194054c9 100644
--- a/sfx2/source/sidebar/AccessibleTitleBar.cxx
+++ b/sfx2/source/sidebar/AccessibleTitleBar.cxx
@@ -34,10 +34,10 @@ Reference<accessibility::XAccessible> AccessibleTitleBar::Create (TitleBar& rTit
{
rTitleBar.GetComponentInterface();
VCLXWindow* pWindow = rTitleBar.GetWindowPeer();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
return new Accessible(new AccessibleTitleBar(pWindow));
else
- return NULL;
+ return nullptr;
}
AccessibleTitleBar::AccessibleTitleBar (VCLXWindow* pWindow)
diff --git a/sfx2/source/sidebar/AsynchronousCall.cxx b/sfx2/source/sidebar/AsynchronousCall.cxx
index 13aff881c322..af3f9b60b406 100644
--- a/sfx2/source/sidebar/AsynchronousCall.cxx
+++ b/sfx2/source/sidebar/AsynchronousCall.cxx
@@ -24,13 +24,13 @@ namespace sfx2 { namespace sidebar {
AsynchronousCall::AsynchronousCall()
: maAction(),
- mnCallId(0)
+ mnCallId(nullptr)
{
}
AsynchronousCall::AsynchronousCall (const Action& rAction)
: maAction(rAction),
- mnCallId(0)
+ mnCallId(nullptr)
{
}
@@ -41,7 +41,7 @@ AsynchronousCall::~AsynchronousCall()
void AsynchronousCall::RequestCall()
{
- if (mnCallId == 0)
+ if (mnCallId == nullptr)
{
Link<void*,void> aLink (LINK(this, AsynchronousCall, HandleUserCall));
mnCallId = Application::PostUserEvent(aLink);
@@ -50,16 +50,16 @@ void AsynchronousCall::RequestCall()
void AsynchronousCall::CancelRequest()
{
- if (mnCallId != 0)
+ if (mnCallId != nullptr)
{
Application::RemoveUserEvent(mnCallId);
- mnCallId = 0;
+ mnCallId = nullptr;
}
}
IMPL_LINK_NOARG_TYPED(AsynchronousCall, HandleUserCall, void*, void )
{
- mnCallId = 0;
+ mnCallId = nullptr;
if (maAction)
maAction();
}
diff --git a/sfx2/source/sidebar/CommandInfoProvider.cxx b/sfx2/source/sidebar/CommandInfoProvider.cxx
index 4e8c906c8989..6eb30d75647f 100644
--- a/sfx2/source/sidebar/CommandInfoProvider.cxx
+++ b/sfx2/source/sidebar/CommandInfoProvider.cxx
@@ -65,8 +65,8 @@ namespace
throw (css::uno::RuntimeException, std::exception) override
{
(void)rEvent;
- mrInfoProvider.SetFrame(NULL);
- mxFrame = NULL;
+ mrInfoProvider.SetFrame(nullptr);
+ mxFrame = nullptr;
}
private:
@@ -99,7 +99,7 @@ CommandInfoProvider::~CommandInfoProvider()
if (mxFrameListener.is())
{
mxFrameListener->dispose();
- mxFrameListener = NULL;
+ mxFrameListener = nullptr;
}
}
@@ -126,12 +126,12 @@ void CommandInfoProvider::SetFrame (const Reference<frame::XFrame>& rxFrame)
if (mxFrameListener.is())
{
mxFrameListener->dispose();
- mxFrameListener = NULL;
+ mxFrameListener = nullptr;
}
// Release objects that are tied to the old frame.
- mxCachedDocumentAcceleratorConfiguration = NULL;
- mxCachedModuleAcceleratorConfiguration = NULL;
+ mxCachedDocumentAcceleratorConfiguration = nullptr;
+ mxCachedModuleAcceleratorConfiguration = nullptr;
msCachedModuleIdentifier.clear();
mxCachedDataFrame = rxFrame;
diff --git a/sfx2/source/sidebar/ContextList.cxx b/sfx2/source/sidebar/ContextList.cxx
index 5b4225e80d6d..6b9519639f37 100644
--- a/sfx2/source/sidebar/ContextList.cxx
+++ b/sfx2/source/sidebar/ContextList.cxx
@@ -38,7 +38,7 @@ const ContextList::Entry* ContextList::GetMatch (const Context& rContext) const
if (iEntry != maEntries.end())
return &*iEntry;
else
- return NULL;
+ return nullptr;
}
ContextList::Entry* ContextList::GetMatch (const Context& rContext)
@@ -47,7 +47,7 @@ ContextList::Entry* ContextList::GetMatch (const Context& rContext)
if (iEntry != maEntries.end())
return const_cast<Entry*>(&*iEntry);
else
- return NULL;
+ return nullptr;
}
::std::vector<ContextList::Entry>::const_iterator ContextList::FindBestMatch (const Context& rContext) const
diff --git a/sfx2/source/sidebar/ControllerFactory.cxx b/sfx2/source/sidebar/ControllerFactory.cxx
index 62523c573db6..17980cdff0c9 100644
--- a/sfx2/source/sidebar/ControllerFactory.cxx
+++ b/sfx2/source/sidebar/ControllerFactory.cxx
@@ -105,7 +105,7 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBoxController(
{
Reference<awt::XWindow> xItemWindow (xController->createItemWindow(rxParentWindow));
vcl::Window* pItemWindow = VCLUnoHelper::GetWindow(xItemWindow);
- if (pItemWindow != NULL)
+ if (pItemWindow != nullptr)
{
WindowType nType = pItemWindow->GetType();
if (nType == WINDOW_LISTBOX || nType == WINDOW_MULTILISTBOX || nType == WINDOW_COMBOBOX)
@@ -188,7 +188,7 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBarController(
{
// Ignore exception.
}
- return NULL;
+ return nullptr;
}
} } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/sidebar/ControllerItem.cxx b/sfx2/source/sidebar/ControllerItem.cxx
index 7ee4298e0599..4fca46b3cd49 100644
--- a/sfx2/source/sidebar/ControllerItem.cxx
+++ b/sfx2/source/sidebar/ControllerItem.cxx
@@ -72,7 +72,7 @@ namespace
SolarMutexGuard g;
mrControllerItem.ResetFrame();
- mxFrame = NULL;
+ mxFrame = nullptr;
}
virtual void SAL_CALL frameAction (const css::frame::FrameActionEvent& rEvent)
throw (css::uno::RuntimeException, std::exception) override
@@ -164,7 +164,7 @@ bool ControllerItem::IsEnabled (SfxItemState eState) const
void ControllerItem::RequestUpdate()
{
- SfxPoolItem* pState = NULL;
+ SfxPoolItem* pState = nullptr;
const SfxItemState eState (GetBindings().QueryState(GetId(), pState));
mrItemUpdateReceiver.NotifyItemUpdate(GetId(), eState, pState, IsEnabled(eState));
}
@@ -176,7 +176,7 @@ void ControllerItem::NotifyFrameContextChange()
void ControllerItem::ResetFrame()
{
- mxFrame = NULL;
+ mxFrame = nullptr;
}
::rtl::OUString ControllerItem::GetLabel() const
@@ -189,11 +189,11 @@ void ControllerItem::ResetFrame()
::rtl::OUString ControllerItem::GetHelpText() const
{
Help* pHelp = Application::GetHelp();
- if (pHelp != NULL)
+ if (pHelp != nullptr)
{
if (msCommandName.getLength() > 0)
{
- const ::rtl::OUString sHelp (pHelp->GetHelpText(".uno:" + msCommandName, NULL));
+ const ::rtl::OUString sHelp (pHelp->GetHelpText(".uno:" + msCommandName, nullptr));
return sHelp;
}
}
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 5982b9f2f8f9..1a09201bcc16 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -152,7 +152,7 @@ bool Deck::Notify (NotifyEvent& rEvent)
if (rEvent.GetType() == MouseNotifyEvent::COMMAND)
{
CommandEvent* pCommandEvent = static_cast<CommandEvent*>(rEvent.GetData());
- if (pCommandEvent != NULL)
+ if (pCommandEvent != nullptr)
switch (pCommandEvent->GetCommand())
{
case CommandEventId::Wheel:
@@ -176,7 +176,7 @@ bool Deck::ProcessWheelEvent(CommandEvent* pCommandEvent)
// Get the wheel data and check that it describes a valid vertical
// scroll.
const CommandWheelData* pData = pCommandEvent->GetWheelData();
- if (pData==NULL
+ if (pData==nullptr
|| pData->GetModifier()
|| pData->GetMode() != CommandWheelMode::SCROLL
|| pData->IsHorz())
@@ -232,7 +232,7 @@ Panel* Deck::GetPanel(const OUString & panelId)
return maPanels[i].get();
}
}
- return NULL;
+ return nullptr;
}
@@ -244,7 +244,7 @@ void Deck::ShowPanel(const Panel& rPanel)
sal_Int32 nPanelTop (rPanel.GetPosPixel().Y());
const sal_Int32 nPanelBottom (nPanelTop + rPanel.GetSizePixel().Height() - 1);
// Add the title bar into the extent.
- if (rPanel.GetTitleBar() != NULL && rPanel.GetTitleBar()->IsVisible())
+ if (rPanel.GetTitleBar() != nullptr && rPanel.GetTitleBar()->IsVisible())
nPanelTop = rPanel.GetTitleBar()->GetPosPixel().Y();
// Determine what the new thumb position should be like.
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx
index 896edd862ffc..2f4676d4532b 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -267,7 +267,7 @@ sal_Int32 PlacePanels (
// Place the title bar.
PanelTitleBar* pTitleBar = rPanel.GetTitleBar();
- if (pTitleBar != NULL)
+ if (pTitleBar != nullptr)
{
const sal_Int32 nPanelTitleBarHeight (Theme::GetInteger(Theme::Int_PanelTitleBarHeight) * rPanel.GetDPIScaleFactor());
@@ -329,7 +329,7 @@ sal_Int32 PlacePanels (
Deck::ScrollContainerWindow* pScrollContainerWindow
= dynamic_cast<Deck::ScrollContainerWindow*>(&rScrollContainer);
- if (pScrollContainerWindow != NULL)
+ if (pScrollContainerWindow != nullptr)
pScrollContainerWindow->SetSeparators(aSeparators);
return nY;
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx
index 59a0aa4d81ff..8c3558d54712 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -45,7 +45,7 @@ DeckTitleBar::DeckTitleBar (const OUString& rsTitle,
, maCloserAction(rCloserAction)
, mbIsCloserVisible(false)
{
- OSL_ASSERT(pParentWindow != NULL);
+ OSL_ASSERT(pParentWindow != nullptr);
if (maCloserAction)
SetCloserVisible(true);
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index d44f0b16f660..556fc0d7dca9 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -41,8 +41,8 @@ FocusManager::FocusManager(const std::function<void(const Panel&)>& rShowPanelFu
maButtons(),
maShowPanelFunctor(rShowPanelFunctor),
mbObservingContentControlFocus(false),
- mpFirstFocusedContentControl(NULL),
- mpLastFocusedWindow(NULL)
+ mpFirstFocusedContentControl(nullptr),
+ mpLastFocusedWindow(nullptr)
{
}
@@ -58,7 +58,7 @@ void FocusManager::GrabFocus()
void FocusManager::Clear()
{
- SetDeckTitle(NULL);
+ SetDeckTitle(nullptr);
ClearPanels();
ClearButtons();
}
@@ -70,7 +70,7 @@ void FocusManager::ClearPanels()
for (auto iPanel(aPanels.begin()),iEnd(aPanels.end()); iPanel != iEnd; ++iPanel)
{
UnregisterWindow(**iPanel);
- if ((*iPanel)->GetTitleBar() != NULL)
+ if ((*iPanel)->GetTitleBar() != nullptr)
{
UnregisterWindow(*(*iPanel)->GetTitleBar());
UnregisterWindow((*iPanel)->GetTitleBar()->GetToolBox());
@@ -112,7 +112,7 @@ void FocusManager::SetPanels (const SharedPanelContainer& rPanels)
for (auto iPanel = rPanels.begin(); iPanel != rPanels.end(); ++iPanel)
{
RegisterWindow(**iPanel);
- if ((*iPanel)->GetTitleBar() != NULL)
+ if ((*iPanel)->GetTitleBar() != nullptr)
{
RegisterWindow(*(*iPanel)->GetTitleBar());
RegisterWindow((*iPanel)->GetTitleBar()->GetToolBox());
@@ -164,7 +164,7 @@ FocusManager::FocusLocation FocusManager::GetFocusLocation (const vcl::Window& r
TitleBar* pTitleBar = maPanels[nIndex]->GetTitleBar();
if (pTitleBar == &rWindow)
return FocusLocation(PC_PanelTitle, nIndex);
- if (pTitleBar!=NULL && &pTitleBar->GetToolBox()==&rWindow)
+ if (pTitleBar!=nullptr && &pTitleBar->GetToolBox()==&rWindow)
return FocusLocation(PC_PanelToolBox, nIndex);
}
@@ -209,7 +209,7 @@ bool FocusManager::IsPanelTitleVisible (const sal_Int32 nPanelIndex) const
return false;
TitleBar* pTitleBar = maPanels[nPanelIndex]->GetTitleBar();
- if (pTitleBar==NULL)
+ if (pTitleBar==nullptr)
return false;
return pTitleBar->IsVisible();
}
@@ -227,7 +227,7 @@ void FocusManager::FocusPanel (
Panel& rPanel (*maPanels[nPanelIndex]);
TitleBar* pTitleBar = rPanel.GetTitleBar();
- if (pTitleBar!=NULL && pTitleBar->IsVisible())
+ if (pTitleBar!=nullptr && pTitleBar->IsVisible())
{
rPanel.SetExpanded(true);
pTitleBar->GrabFocus();
@@ -254,7 +254,7 @@ void FocusManager::FocusPanel (
void FocusManager::FocusPanelContent (const sal_Int32 nPanelIndex)
{
vcl::Window* pWindow = VCLUnoHelper::GetWindow(maPanels[nPanelIndex]->GetElementWindow());
- if (pWindow != NULL)
+ if (pWindow != nullptr)
{
mbObservingContentControlFocus = true;
pWindow->GrabFocus();
@@ -283,7 +283,7 @@ void FocusManager::RemoveWindow (vcl::Window& rWindow)
if (iPanel != maPanels.end())
{
UnregisterWindow(rWindow);
- if ((*iPanel)->GetTitleBar() != NULL)
+ if ((*iPanel)->GetTitleBar() != nullptr)
{
UnregisterWindow(*(*iPanel)->GetTitleBar());
UnregisterWindow((*iPanel)->GetTitleBar()->GetToolBox());
@@ -364,7 +364,7 @@ void FocusManager::HandleKeyEvent (
const vcl::Window& rWindow)
{
const FocusLocation aLocation (GetFocusLocation(rWindow));
- mpLastFocusedWindow = NULL;
+ mpLastFocusedWindow = nullptr;
switch (rKeyCode.GetCode())
{
@@ -511,7 +511,7 @@ void FocusManager::HandleKeyEvent (
IMPL_LINK_TYPED(FocusManager, WindowEventListener, VclWindowEvent&, rWindowEvent, void)
{
vcl::Window* pSource = rWindowEvent.GetWindow();
- if (pSource == NULL)
+ if (pSource == nullptr)
return;
switch (rWindowEvent.GetId())
@@ -540,7 +540,7 @@ IMPL_LINK_TYPED(FocusManager, WindowEventListener, VclWindowEvent&, rWindowEvent
IMPL_LINK_TYPED(FocusManager, ChildEventListener, VclWindowEvent&, rEvent, void)
{
vcl::Window* pSource = rEvent.GetWindow();
- if (pSource == NULL)
+ if (pSource == nullptr)
return;
switch (rEvent.GetId())
@@ -555,7 +555,7 @@ IMPL_LINK_TYPED(FocusManager, ChildEventListener, VclWindowEvent&, rEvent, void)
FocusLocation aLocation (PC_None, -1);
while (true)
{
- if (pWindow == NULL)
+ if (pWindow == nullptr)
break;
aLocation = GetFocusLocation(*pWindow);
if (aLocation.meComponent != PC_None)
diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx
index 42a2a813d359..9c05ddedc352 100644
--- a/sfx2/source/sidebar/Panel.cxx
+++ b/sfx2/source/sidebar/Panel.cxx
@@ -79,11 +79,11 @@ void Panel::ApplySettings(vcl::RenderContext& rRenderContext)
void Panel::dispose()
{
- mxPanelComponent = NULL;
+ mxPanelComponent = nullptr;
{
Reference<lang::XComponent> xComponent (mxElement, UNO_QUERY);
- mxElement = NULL;
+ mxElement = nullptr;
if (xComponent.is())
xComponent->dispose();
}
@@ -176,7 +176,7 @@ Reference<awt::XWindow> Panel::GetElementWindow()
return xToolPanel->getWindow();
}
- return NULL;
+ return nullptr;
}
} } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index 243f4a6b4401..71ee4735bbc9 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -86,7 +86,7 @@ const DeckDescriptor* ResourceManager::GetDeckDescriptor(const OUString& rsDeckI
if (iDeck->msId.equals(rsDeckId))
return &*iDeck;
}
- return NULL;
+ return nullptr;
}
const PanelDescriptor* ResourceManager::GetPanelDescriptor(const OUString& rsPanelId) const
@@ -97,7 +97,7 @@ const PanelDescriptor* ResourceManager::GetPanelDescriptor(const OUString& rsPan
if (iPanel->msId.equals(rsPanelId))
return &*iPanel;
}
- return NULL;
+ return nullptr;
}
void ResourceManager::SetIsDeckEnabled(const OUString& rsDeckId, const bool bIsEnabled)
@@ -191,7 +191,7 @@ const ResourceManager::DeckContextDescriptorContainer& ResourceManager::GetMatch
if (iDeck->mbExperimental && !maMiscOptions.IsExperimentalMode())
continue;
const DeckDescriptor& rDeckDescriptor (*iDeck);
- if (rDeckDescriptor.maContextList.GetMatch(rContext) == NULL)
+ if (rDeckDescriptor.maContextList.GetMatch(rContext) == nullptr)
continue;
DeckContextDescriptor aDeckContextDescriptor;
aDeckContextDescriptor.msId = rDeckDescriptor.msId;
@@ -231,7 +231,7 @@ const ResourceManager::PanelContextDescriptorContainer& ResourceManager::GetMatc
continue;
const ContextList::Entry* pEntry = rPanelDescriptor.maContextList.GetMatch(rContext);
- if (pEntry == NULL)
+ if (pEntry == nullptr)
continue;
PanelContextDescriptor aPanelContextDescriptor;
@@ -580,7 +580,7 @@ void ResourceManager::StorePanelExpansionState (
if (iPanel->msId.equals(rsPanelId))
{
ContextList::Entry* pEntry(iPanel->maContextList.GetMatch(rContext));
- if (pEntry != NULL)
+ if (pEntry != nullptr)
pEntry->mbIsInitiallyVisible = bExpansionState;
}
}
diff --git a/sfx2/source/sidebar/Sidebar.cxx b/sfx2/source/sidebar/Sidebar.cxx
index 112ffc787dab..88f0b062bfed 100644
--- a/sfx2/source/sidebar/Sidebar.cxx
+++ b/sfx2/source/sidebar/Sidebar.cxx
@@ -33,7 +33,7 @@ void Sidebar::ShowPanel (
const PanelDescriptor* pPanelDescriptor = pController->GetResourceManager()->GetPanelDescriptor(rsPanelId);
- if (pController!=NULL && pPanelDescriptor != NULL)
+ if (pController!=nullptr && pPanelDescriptor != nullptr)
{
// This should be a lot more sophisticated:
// - Make the deck switching asynchronous
diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx
index 18a62b5b5449..8c3b7387b893 100644
--- a/sfx2/source/sidebar/SidebarChildWindow.cxx
+++ b/sfx2/source/sidebar/SidebarChildWindow.cxx
@@ -44,7 +44,7 @@ SidebarChildWindow::SidebarChildWindow (vcl::Window* pParentWindow, sal_uInt16 n
GetWindow()->SetOutputSizePixel(Size(GetDefaultWidth(GetWindow()), 450));
SfxDockingWindow* pDockingParent = dynamic_cast<SfxDockingWindow*>(GetWindow());
- if (pDockingParent != NULL)
+ if (pDockingParent != nullptr)
{
if (pInfo && pInfo->aExtraString.isEmpty() && pInfo->aModule != "sdraw" && pInfo->aModule != "simpress")
{
@@ -66,7 +66,7 @@ SidebarChildWindow::SidebarChildWindow (vcl::Window* pParentWindow, sal_uInt16 n
sal_Int32 SidebarChildWindow::GetDefaultWidth (vcl::Window* pWindow)
{
- if (pWindow != NULL)
+ if (pWindow != nullptr)
{
// Width of the paragraph panel.
const static sal_Int32 nMaxPropertyPageWidth (115);
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index e632565d5363..469be08b9b41 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -112,7 +112,7 @@ SidebarController::SidebarController (
maFocusManager([this](const Panel& rPanel){ return this->ShowPanel(rPanel); }),
mxReadOnlyModeDispatch(),
mbIsDocumentReadOnly(false),
- mpSplitWindow(NULL),
+ mpSplitWindow(nullptr),
mnWidthOnSplitterButtonDown(0),
mpResourceManager()
{
@@ -209,13 +209,13 @@ void SAL_CALL SidebarController::disposing()
if (mpSplitWindow != nullptr)
{
mpSplitWindow->RemoveEventListener(LINK(this, SidebarController, WindowEventHandler));
- mpSplitWindow = NULL;
+ mpSplitWindow = nullptr;
}
if (mpParentWindow != nullptr)
{
mpParentWindow->RemoveEventListener(LINK(this, SidebarController, WindowEventHandler));
- mpParentWindow = NULL;
+ mpParentWindow = nullptr;
}
Theme::GetPropertySet()->removePropertyChangeListener(
@@ -367,7 +367,7 @@ void SidebarController::NotifyResize()
if (mpCurrentDeck)
{
DeckTitleBar* pTitleBar = mpCurrentDeck->GetTitleBar();
- if (pTitleBar != NULL && pTitleBar->IsVisible())
+ if (pTitleBar != nullptr && pTitleBar->IsVisible())
pTitleBar->SetCloserVisible(CanModifyChildWindowWidth());
nMinimalWidth = mpCurrentDeck->GetMinimalWidth();
}
@@ -501,7 +501,7 @@ void SidebarController::SwitchToDeck (
{
const DeckDescriptor* pDeckDescriptor = mpResourceManager->GetDeckDescriptor(rsDeckId);
- if (pDeckDescriptor != NULL)
+ if (pDeckDescriptor != nullptr)
SwitchToDeck(*pDeckDescriptor, maCurrentContext);
}
}
@@ -649,7 +649,7 @@ void SidebarController::SwitchToDeck (
// Depending on the context we have to change the command
// for the "more options" dialog.
PanelTitleBar* pTitleBar = aNewPanels[nWriteIndex]->GetTitleBar();
- if (pTitleBar != NULL)
+ if (pTitleBar != nullptr)
{
pTitleBar->SetMoreOptionsCommand(
rPanelContexDescriptor.msMenuCommand,
@@ -720,8 +720,8 @@ VclPtr<Panel> SidebarController::CreatePanel (
{
const PanelDescriptor* pPanelDescriptor = mpResourceManager->GetPanelDescriptor(rsPanelId);
- if (pPanelDescriptor == NULL)
- return NULL;
+ if (pPanelDescriptor == nullptr)
+ return nullptr;
// Create the panel which is the parent window of the UIElement.
VclPtr<Panel> pPanel = VclPtr<Panel>::Create(
@@ -768,7 +768,7 @@ Reference<ui::XUIElement> SidebarController::CreateUIElement (
aCreationArguments.put("Frame", makeAny(mxFrame));
aCreationArguments.put("ParentWindow", makeAny(rxWindow));
SfxDockingWindow* pSfxDockingWindow = dynamic_cast<SfxDockingWindow*>(mpParentWindow.get());
- if (pSfxDockingWindow != NULL)
+ if (pSfxDockingWindow != nullptr)
aCreationArguments.put("SfxBindings", makeAny(sal_uInt64(&pSfxDockingWindow->GetBindings())));
aCreationArguments.put("Theme", Theme::GetPropertySet());
aCreationArguments.put("Sidebar", makeAny(Reference<ui::XSidebar>(static_cast<ui::XSidebar*>(this))));
@@ -802,7 +802,7 @@ Reference<ui::XUIElement> SidebarController::CreateUIElement (
catch(const Exception& rException)
{
SAL_WARN("sfx.sidebar", "Cannot create panel " << rsImplementationURL << ": " << rException.Message);
- return NULL;
+ return nullptr;
}
}
@@ -881,7 +881,7 @@ std::shared_ptr<PopupMenu> SidebarController::CreatePopupMenu (
// Create the top level popup menu.
std::shared_ptr<PopupMenu> pMenu (new PopupMenu());
FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow());
- if (pMenuWindow != NULL)
+ if (pMenuWindow != nullptr)
{
pMenuWindow->SetPopupModeFlags(pMenuWindow->GetPopupModeFlags() | FloatWinPopupFlags::NoMouseUpClose);
}
@@ -941,9 +941,9 @@ std::shared_ptr<PopupMenu> SidebarController::CreatePopupMenu (
IMPL_LINK_TYPED(SidebarController, OnMenuItemSelected, Menu*, pMenu, bool)
{
- if (pMenu == NULL)
+ if (pMenu == nullptr)
{
- OSL_ENSURE(pMenu!=NULL, "sfx2::sidebar::SidebarController::OnMenuItemSelected: illegal menu!");
+ OSL_ENSURE(pMenu!=nullptr, "sfx2::sidebar::SidebarController::OnMenuItemSelected: illegal menu!");
return false;
}
@@ -1053,7 +1053,7 @@ void SidebarController::UpdateDeckOpenState()
bool SidebarController::CanModifyChildWindowWidth()
{
SfxSplitWindow* pSplitWindow = GetSplitWindow();
- if (pSplitWindow == NULL)
+ if (pSplitWindow == nullptr)
return false;
sal_uInt16 nRow (0xffff);
@@ -1070,7 +1070,7 @@ bool SidebarController::CanModifyChildWindowWidth()
sal_Int32 SidebarController::SetChildWindowWidth (const sal_Int32 nNewWidth)
{
SfxSplitWindow* pSplitWindow = GetSplitWindow();
- if (pSplitWindow == NULL)
+ if (pSplitWindow == nullptr)
return 0;
sal_uInt16 nRow (0xffff);
@@ -1094,7 +1094,7 @@ sal_Int32 SidebarController::SetChildWindowWidth (const sal_Int32 nNewWidth)
void SidebarController::RestrictWidth (sal_Int32 nWidth)
{
SfxSplitWindow* pSplitWindow = GetSplitWindow();
- if (pSplitWindow != NULL)
+ if (pSplitWindow != nullptr)
{
const sal_uInt16 nId (pSplitWindow->GetItemId(mpParentWindow.get()));
const sal_uInt16 nSetId (pSplitWindow->GetSet(nId));
@@ -1123,7 +1123,7 @@ SfxSplitWindow* SidebarController::GetSplitWindow()
return mpSplitWindow;
}
else
- return NULL;
+ return nullptr;
}
void SidebarController::UpdateCloseIndicator (const bool bCloseAfterDrag)
@@ -1172,7 +1172,7 @@ void SidebarController::UpdateTitleBarIcons()
// Update the deck icon.
const DeckDescriptor* pDeckDescriptor = rResourceManager.GetDeckDescriptor(mpCurrentDeck->GetId());
- if (pDeckDescriptor != NULL && mpCurrentDeck->GetTitleBar())
+ if (pDeckDescriptor != nullptr && mpCurrentDeck->GetTitleBar())
{
const OUString sIconURL(
bIsHighContrastModeActive
@@ -1190,10 +1190,10 @@ void SidebarController::UpdateTitleBarIcons()
{
if ( ! *iPanel)
continue;
- if ((*iPanel)->GetTitleBar() == NULL)
+ if ((*iPanel)->GetTitleBar() == nullptr)
continue;
const PanelDescriptor* pPanelDescriptor = rResourceManager.GetPanelDescriptor((*iPanel)->GetId());
- if (pPanelDescriptor == NULL)
+ if (pPanelDescriptor == nullptr)
continue;
const OUString sIconURL (
bIsHighContrastModeActive
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index c32566e282ac..c47957292fd4 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -35,10 +35,10 @@ SidebarDockingWindow::SidebarDockingWindow(SfxBindings* pSfxBindings, SidebarChi
, mpSidebarController()
{
// Get the XFrame from the bindings.
- if (pSfxBindings==NULL || pSfxBindings->GetDispatcher()==NULL)
+ if (pSfxBindings==nullptr || pSfxBindings->GetDispatcher()==nullptr)
{
- OSL_ASSERT(pSfxBindings!=NULL);
- OSL_ASSERT(pSfxBindings->GetDispatcher()!=NULL);
+ OSL_ASSERT(pSfxBindings!=nullptr);
+ OSL_ASSERT(pSfxBindings->GetDispatcher()!=nullptr);
}
else
{
diff --git a/sfx2/source/sidebar/SidebarPanelBase.cxx b/sfx2/source/sidebar/SidebarPanelBase.cxx
index c8d3992901e8..e8ed312ba565 100644
--- a/sfx2/source/sidebar/SidebarPanelBase.cxx
+++ b/sfx2/source/sidebar/SidebarPanelBase.cxx
@@ -91,7 +91,7 @@ void SAL_CALL SidebarPanelBase::disposing()
::comphelper::getProcessComponentContext()));
if (xMultiplexer.is())
xMultiplexer->removeAllContextChangeEventListeners(this);
- mxFrame = NULL;
+ mxFrame = nullptr;
}
}
@@ -102,7 +102,7 @@ void SAL_CALL SidebarPanelBase::notifyContextChangeEvent (
{
IContextChangeReceiver* pContextChangeReceiver
= dynamic_cast<IContextChangeReceiver*>(mpControl.get());
- if (pContextChangeReceiver != NULL)
+ if (pContextChangeReceiver != nullptr)
{
const EnumContext aContext(
EnumContext::GetApplicationEnum(rEvent.ApplicationName),
@@ -117,8 +117,8 @@ void SAL_CALL SidebarPanelBase::disposing (
{
(void)rEvent;
- mxFrame = NULL;
- mpControl = NULL;
+ mxFrame = nullptr;
+ mpControl = nullptr;
}
css::uno::Reference<css::frame::XFrame> SAL_CALL SidebarPanelBase::getFrame()
@@ -152,7 +152,7 @@ Reference<accessibility::XAccessible> SAL_CALL SidebarPanelBase::createAccessibl
(void)rxParentAccessible;
// Not yet implemented.
- return NULL;
+ return nullptr;
}
Reference<awt::XWindow> SAL_CALL SidebarPanelBase::getWindow()
@@ -163,7 +163,7 @@ Reference<awt::XWindow> SAL_CALL SidebarPanelBase::getWindow()
mpControl->GetComponentInterface(),
UNO_QUERY);
else
- return NULL;
+ return nullptr;
}
ui::LayoutSize SAL_CALL SidebarPanelBase::getHeightForWidth (const sal_Int32 nWidth)
@@ -181,7 +181,7 @@ ui::LayoutSize SAL_CALL SidebarPanelBase::getHeightForWidth (const sal_Int32 nWi
Size aSize(mpControl->get_preferred_size());
return ui::LayoutSize(aSize.Height(), aSize.Height(), aSize.Height());
}
- else if (pLayoutableWindow != NULL)
+ else if (pLayoutableWindow != nullptr)
return pLayoutableWindow->GetHeightForWidth(nWidth);
else if (mpControl != nullptr)
{
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx
index 87e1833a7a72..f2c7f0b4a20c 100644
--- a/sfx2/source/sidebar/SidebarToolBox.cxx
+++ b/sfx2/source/sidebar/SidebarToolBox.cxx
@@ -183,7 +183,7 @@ Reference<frame::XToolbarController> SidebarToolBox::GetControllerForItemId (con
if (iController != maControllers.end())
return iController->second.mxController;
else
- return NULL;
+ return nullptr;
}
void SidebarToolBox::SetController(const sal_uInt16 nItemId,
@@ -253,7 +253,7 @@ void SidebarToolBox::RegisterHandlers()
IMPL_LINK_TYPED(SidebarToolBox, DropDownClickHandler, ToolBox*, pToolBox, void)
{
- if (pToolBox != NULL)
+ if (pToolBox != nullptr)
{
Reference<frame::XToolbarController> xController (GetControllerForItemId(pToolBox->GetCurItemId()));
if (xController.is())
@@ -267,7 +267,7 @@ IMPL_LINK_TYPED(SidebarToolBox, DropDownClickHandler, ToolBox*, pToolBox, void)
IMPL_LINK_TYPED(SidebarToolBox, ClickHandler, ToolBox*, pToolBox, void)
{
- if (pToolBox == NULL)
+ if (pToolBox == nullptr)
return;
Reference<frame::XToolbarController> xController (GetControllerForItemId(pToolBox->GetCurItemId()));
@@ -277,7 +277,7 @@ IMPL_LINK_TYPED(SidebarToolBox, ClickHandler, ToolBox*, pToolBox, void)
IMPL_LINK_TYPED(SidebarToolBox, DoubleClickHandler, ToolBox*, pToolBox, void)
{
- if (pToolBox == NULL)
+ if (pToolBox == nullptr)
return;
Reference<frame::XToolbarController> xController (GetControllerForItemId(pToolBox->GetCurItemId()));
@@ -287,7 +287,7 @@ IMPL_LINK_TYPED(SidebarToolBox, DoubleClickHandler, ToolBox*, pToolBox, void)
IMPL_LINK_TYPED(SidebarToolBox, SelectHandler, ToolBox*, pToolBox, void)
{
- if (pToolBox == NULL)
+ if (pToolBox == nullptr)
return;
Reference<frame::XToolbarController> xController (GetControllerForItemId(pToolBox->GetCurItemId()));
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index a4100cebef04..9e31bb8315f7 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -120,9 +120,9 @@ void TabBar::SetDecks(const ResourceManager::DeckContextDescriptorContainer& rDe
iDeck(rDecks.begin()); iDeck != rDecks.end(); ++iDeck)
{
const DeckDescriptor* pDescriptor = pParentSidebarController->GetResourceManager()->GetDeckDescriptor(iDeck->msId);
- if (pDescriptor == NULL)
+ if (pDescriptor == nullptr)
{
- OSL_ASSERT(pDescriptor!=NULL);
+ OSL_ASSERT(pDescriptor!=nullptr);
continue;
}
@@ -160,7 +160,7 @@ void TabBar::UpdateButtonIcons()
{
const DeckDescriptor* pDeckDescriptor = pParentSidebarController->GetResourceManager()->GetDeckDescriptor(iItem->msDeckId);
- if (pDeckDescriptor != NULL)
+ if (pDeckDescriptor != nullptr)
{
aImage = GetItemImage(*pDeckDescriptor);
if ( mpMenuButton->GetDPIScaleFactor() > 1 )
@@ -381,7 +381,7 @@ IMPL_LINK_NOARG_TYPED(TabBar, OnToolboxClicked, Button*, void)
{
const DeckDescriptor* pDeckDescriptor = pParentSidebarController->GetResourceManager()->GetDeckDescriptor(iItem->msDeckId);
- if (pDeckDescriptor != NULL)
+ if (pDeckDescriptor != nullptr)
{
DeckMenuData aData;
aData.msDisplayName = pDeckDescriptor->msTitle;
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index b66c4bc709b0..eedcf77622f9 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -511,7 +511,7 @@ void SAL_CALL Theme::addPropertyChangeListener(
eItem = iId->second;
}
ChangeListenerContainer* pListeners = GetChangeListeners(eItem, true);
- if (pListeners != NULL)
+ if (pListeners != nullptr)
pListeners->push_back(rxListener);
}
@@ -536,7 +536,7 @@ void SAL_CALL Theme::removePropertyChangeListener(
eItem = iId->second;
}
ChangeListenerContainer* pContainer = GetChangeListeners(eItem, false);
- if (pContainer != NULL)
+ if (pContainer != nullptr)
{
ChangeListenerContainer::iterator iListener (::std::find(pContainer->begin(), pContainer->end(), rxListener));
if (iListener != pContainer->end())
@@ -571,7 +571,7 @@ void SAL_CALL Theme::addVetoableChangeListener(
eItem = iId->second;
}
VetoableListenerContainer* pListeners = GetVetoableListeners(eItem, true);
- if (pListeners != NULL)
+ if (pListeners != nullptr)
pListeners->push_back(rxListener);
}
@@ -596,7 +596,7 @@ void SAL_CALL Theme::removeVetoableChangeListener(
eItem = iId->second;
}
VetoableListenerContainer* pContainer = GetVetoableListeners(eItem, false);
- if (pContainer != NULL)
+ if (pContainer != nullptr)
{
VetoableListenerContainer::iterator iListener (::std::find(pContainer->begin(), pContainer->end(), rxListener));
if (iListener != pContainer->end())
@@ -879,7 +879,7 @@ Theme::VetoableListenerContainer* Theme::GetVetoableListeners (
return &maVetoableListeners[eItem];
}
else
- return NULL;
+ return nullptr;
}
Theme::ChangeListenerContainer* Theme::GetChangeListeners (
@@ -895,14 +895,14 @@ Theme::ChangeListenerContainer* Theme::GetChangeListeners (
return &maChangeListeners[eItem];
}
else
- return NULL;
+ return nullptr;
}
bool Theme::DoVetoableListenersVeto (
const VetoableListenerContainer* pListeners,
const beans::PropertyChangeEvent& rEvent)
{
- if (pListeners == NULL)
+ if (pListeners == nullptr)
return false;
VetoableListenerContainer aListeners (*pListeners);
@@ -932,7 +932,7 @@ void Theme::BroadcastPropertyChange (
const ChangeListenerContainer* pListeners,
const beans::PropertyChangeEvent& rEvent)
{
- if (pListeners == NULL)
+ if (pListeners == nullptr)
return;
const ChangeListenerContainer aListeners (*pListeners);
@@ -966,7 +966,7 @@ void Theme::ProcessNewValue (
::rtl::OUString sURL;
if (rValue >>= sURL)
{
- maImages[nIndex] = Tools::GetImage(sURL, NULL);
+ maImages[nIndex] = Tools::GetImage(sURL, nullptr);
}
break;
}
diff --git a/sfx2/source/sidebar/UnoSidebar.cxx b/sfx2/source/sidebar/UnoSidebar.cxx
index cfaebbf50238..28bca9ed407e 100644
--- a/sfx2/source/sidebar/UnoSidebar.cxx
+++ b/sfx2/source/sidebar/UnoSidebar.cxx
@@ -75,7 +75,7 @@ sal_Bool SAL_CALL SfxUnoSidebar::isVisible()
SidebarController* pSidebarController = getSidebarController();
- return pSidebarController != NULL;
+ return pSidebarController != nullptr;
}
uno::Reference<frame::XFrame> SAL_CALL SfxUnoSidebar::getFrame()
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index a441b8e68b5d..3417c09fa27c 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -81,7 +81,7 @@ svt::StatusbarController* SAL_CALL SfxStatusBarControllerFactory(
uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
xTrans->parseStrict( aTargetURL );
- SfxObjectShell* pObjShell = NULL;
+ SfxObjectShell* pObjShell = nullptr;
uno::Reference < frame::XController > xController;
uno::Reference < frame::XModel > xModel;
if ( rFrame.is() )
@@ -104,8 +104,8 @@ svt::StatusbarController* SAL_CALL SfxStatusBarControllerFactory(
}
}
- SfxModule* pModule = pObjShell ? pObjShell->GetModule() : NULL;
- SfxSlotPool* pSlotPool = 0;
+ SfxModule* pModule = pObjShell ? pObjShell->GetModule() : nullptr;
+ SfxSlotPool* pSlotPool = nullptr;
if ( pModule )
pSlotPool = pModule->GetSlotPool();
@@ -125,7 +125,7 @@ svt::StatusbarController* SAL_CALL SfxStatusBarControllerFactory(
}
}
- return NULL;
+ return nullptr;
}
@@ -212,7 +212,7 @@ throw (uno::RuntimeException, std::exception)
void SAL_CALL SfxStatusBarControl::statusChanged( const frame::FeatureStateEvent& rEvent )
throw ( css::uno::RuntimeException, std::exception )
{
- SfxViewFrame* pViewFrame = NULL;
+ SfxViewFrame* pViewFrame = nullptr;
uno::Reference < frame::XController > xController;
SolarMutexGuard aGuard;
@@ -226,7 +226,7 @@ throw ( css::uno::RuntimeException, std::exception )
if ( xDisp.is() )
{
uno::Reference< lang::XUnoTunnel > xTunnel( xDisp, uno::UNO_QUERY );
- SfxOfficeDispatch* pDisp = NULL;
+ SfxOfficeDispatch* pDisp = nullptr;
if ( xTunnel.is() )
{
sal_Int64 nImplementation = xTunnel->getSomething(SfxOfficeDispatch::impl_getStaticIdentifier());
@@ -251,7 +251,7 @@ throw ( css::uno::RuntimeException, std::exception )
else
{
SfxItemState eState = SfxItemState::DISABLED;
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
if ( rEvent.IsEnabled )
{
eState = SfxItemState::DEFAULT;
@@ -377,7 +377,7 @@ throw (css::uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
::Point aPos( rPos.X, rPos.Y );
- CommandEvent aCmdEvent( aPos, static_cast<CommandEventId>(nCommand), true, NULL );
+ CommandEvent aCmdEvent( aPos, static_cast<CommandEventId>(nCommand), true, nullptr );
Command( aCmdEvent );
}
@@ -629,7 +629,7 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl
return rFactories[nFactory].pCtor( nSlotID, nStbId, *pBar );
}
- return NULL;
+ return nullptr;
}
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index a873ea9f5377..c04831ed15c7 100644
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -83,7 +83,7 @@ static SfxImageManager_Impl* GetImageManager(SfxModule& rModule)
SfxImageManagerImplMap &rImageManager_ImplMap =
theImageManagerImplMap::get();
- SfxImageManager_Impl* pImpl( 0 );
+ SfxImageManager_Impl* pImpl( nullptr );
SfxModule* pModule(&rModule);
SfxImageManagerImplMap::const_iterator pIter = rImageManager_ImplMap.find(pModule);
if ( pIter != rImageManager_ImplMap.end() )
@@ -111,7 +111,7 @@ SfxImageManager_Impl::SfxImageManager_Impl(SfxModule& rModule)
m_nSymbolsSize = m_aOpt.GetCurrentSymbolsSize();
for ( sal_uInt32 i = 0; i < IMAGELIST_COUNT; i++ )
- m_pImageList[i] = 0;
+ m_pImageList[i] = nullptr;
m_aOpt.AddListenerLink( LINK( this, SfxImageManager_Impl, OptionsChanged_Impl ) );
Application::AddEventListener( LINK( this, SfxImageManager_Impl, SettingsChanged_Impl ) );
@@ -251,7 +251,7 @@ namespace
SfxImageManager* SfxImageManager::GetImageManager(SfxModule& rModule)
{
SolarMutexGuard aGuard;
- SfxImageManager* pSfxImageManager(0);
+ SfxImageManager* pSfxImageManager(nullptr);
SfxImageManagerMap &rImageManagerMap = theImageManagerMap::get();
SfxModule* pModule = &rModule;
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 05d47c72bbd4..3ce36caf70be 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -116,7 +116,7 @@ static vcl::Window* GetTopMostParentSystemWindow( vcl::Window* pWindow )
// ->manually search topmost system window
// required because their might be another system window between this and the top window
pWindow = pWindow->GetParent();
- SystemWindow* pTopMostSysWin = NULL;
+ SystemWindow* pTopMostSysWin = nullptr;
while ( pWindow )
{
if ( pWindow->IsSystemWindow() )
@@ -128,7 +128,7 @@ static vcl::Window* GetTopMostParentSystemWindow( vcl::Window* pWindow )
return pWindow;
}
- return NULL;
+ return nullptr;
}
svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const Reference< XFrame >& rFrame, ToolBox* pToolbox, unsigned short nID, const OUString& aCommandURL )
@@ -140,9 +140,9 @@ svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const Reference< X
Reference < XURLTransformer > xTrans( URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
xTrans->parseStrict( aTargetURL );
if ( !aTargetURL.Arguments.isEmpty() )
- return NULL;
+ return nullptr;
- SfxObjectShell* pObjShell = NULL;
+ SfxObjectShell* pObjShell = nullptr;
Reference < XController > xController;
Reference < XModel > xModel;
if ( rFrame.is() )
@@ -165,8 +165,8 @@ svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const Reference< X
}
}
- SfxModule* pModule = pObjShell ? pObjShell->GetModule() : NULL;
- SfxSlotPool* pSlotPool = 0;
+ SfxModule* pModule = pObjShell ? pObjShell->GetModule() : nullptr;
+ SfxSlotPool* pSlotPool = nullptr;
if ( pModule )
pSlotPool = pModule->GetSlotPool();
@@ -181,7 +181,7 @@ svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const Reference< X
return SfxToolBoxControl::CreateControl( nSlotId, nID, pToolbox, pModule );
}
- return NULL;
+ return nullptr;
}
struct SfxToolBoxControl_Impl
@@ -222,11 +222,11 @@ SfxToolBoxControl::SfxToolBoxControl(
pImpl->pBox = &rBox;
pImpl->bShowString = bShowStringItems;
- pImpl->pFact = 0;
+ pImpl->pFact = nullptr;
pImpl->nTbxId = nID;
pImpl->nSlotId = nSlotID;
- pImpl->mpFloatingWindow = 0;
- pImpl->mpPopupWindow = 0;
+ pImpl->mpFloatingWindow = nullptr;
+ pImpl->mpPopupWindow = nullptr;
}
@@ -263,7 +263,7 @@ void SAL_CALL SfxToolBoxControl::dispose() throw (css::uno::RuntimeException, st
// Remove and destroy our item window at our toolbox
SolarMutexGuard aGuard;
VclPtr< vcl::Window > pWindow = pImpl->pBox->GetItemWindow( pImpl->nTbxId );
- pImpl->pBox->SetItemWindow( pImpl->nTbxId, 0 );
+ pImpl->pBox->SetItemWindow( pImpl->nTbxId, nullptr );
pWindow.disposeAndClear();
// Delete my popup windows
@@ -349,7 +349,7 @@ SfxToolBoxControl* SfxToolBoxControl::CreateControl( sal_uInt16 nSlotId, sal_uIn
}
}
- return NULL;
+ return nullptr;
}
SfxItemState SfxToolBoxControl::GetItemState(
@@ -440,7 +440,7 @@ throw( css::uno::RuntimeException, std::exception )
void SAL_CALL SfxToolBoxControl::statusChanged( const FeatureStateEvent& rEvent )
throw ( css::uno::RuntimeException, std::exception )
{
- SfxViewFrame* pViewFrame = NULL;
+ SfxViewFrame* pViewFrame = nullptr;
Reference < XController > xController;
SolarMutexGuard aGuard;
@@ -454,7 +454,7 @@ throw ( css::uno::RuntimeException, std::exception )
if ( xDisp.is() )
{
Reference< XUnoTunnel > xTunnel( xDisp, UNO_QUERY );
- SfxOfficeDispatch* pDisp = NULL;
+ SfxOfficeDispatch* pDisp = nullptr;
if ( xTunnel.is() )
{
sal_Int64 nImplementation = xTunnel->getSomething(SfxOfficeDispatch::impl_getStaticIdentifier());
@@ -481,7 +481,7 @@ throw ( css::uno::RuntimeException, std::exception )
else
{
SfxItemState eState = SfxItemState::DISABLED;
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
if ( rEvent.IsEnabled )
{
eState = SfxItemState::DEFAULT;
@@ -650,9 +650,9 @@ IMPL_LINK_NOARG_TYPED(SfxToolBoxControl, PopupModeEndHdl, FloatingWindow*, void)
IMPL_LINK_TYPED( SfxToolBoxControl, ClosePopupWindow, SfxPopupWindow *, pWindow, void )
{
if ( pWindow == pImpl->mpFloatingWindow )
- pImpl->mpFloatingWindow = 0;
+ pImpl->mpFloatingWindow = nullptr;
else
- pImpl->mpPopupWindow = 0;
+ pImpl->mpPopupWindow = nullptr;
}
@@ -737,7 +737,7 @@ void SfxToolBoxControl::Click()
VclPtr<SfxPopupWindow> SfxToolBoxControl::CreatePopupWindow()
{
- return 0;
+ return nullptr;
}
VclPtr<vcl::Window> SfxToolBoxControl::CreateItemWindow( vcl::Window * )
@@ -781,7 +781,7 @@ SfxFrameStatusListener::~SfxFrameStatusListener()
void SAL_CALL SfxFrameStatusListener::statusChanged( const css::frame::FeatureStateEvent& rEvent )
throw ( css::uno::RuntimeException, std::exception )
{
- SfxViewFrame* pViewFrame = NULL;
+ SfxViewFrame* pViewFrame = nullptr;
Reference < XController > xController;
SolarMutexGuard aGuard;
@@ -795,7 +795,7 @@ throw ( css::uno::RuntimeException, std::exception )
if ( xDisp.is() )
{
Reference< XUnoTunnel > xTunnel( xDisp, UNO_QUERY );
- SfxOfficeDispatch* pDisp = NULL;
+ SfxOfficeDispatch* pDisp = nullptr;
if ( xTunnel.is() )
{
sal_Int64 nImplementation = xTunnel->getSomething(SfxOfficeDispatch::impl_getStaticIdentifier());
@@ -823,7 +823,7 @@ throw ( css::uno::RuntimeException, std::exception )
else
{
SfxItemState eState = SfxItemState::DISABLED;
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
if ( rEvent.IsEnabled )
{
eState = SfxItemState::DEFAULT;
@@ -907,7 +907,7 @@ SfxPopupWindow::SfxPopupWindow(
, m_bCascading( false )
, m_nId( nId )
, m_xFrame( rFrame )
- , m_pStatusListener( 0 )
+ , m_pStatusListener( nullptr )
{
vcl::Window* pWindow = GetTopMostParentSystemWindow( this );
if ( pWindow )
@@ -921,7 +921,7 @@ SfxPopupWindow::SfxPopupWindow(sal_uInt16 nId, const OString& rID, const OUStrin
, m_bCascading( false )
, m_nId( nId )
, m_xFrame( rFrame )
- , m_pStatusListener( 0 )
+ , m_pStatusListener( nullptr )
{
vcl::Window* pWindow = GetTopMostParentSystemWindow( this );
if ( pWindow )
@@ -938,7 +938,7 @@ SfxPopupWindow::SfxPopupWindow(
, m_bCascading( false )
, m_nId( nId )
, m_xFrame( rFrame )
- , m_pStatusListener( 0 )
+ , m_pStatusListener( nullptr )
{
vcl::Window* pWindow = GetTopMostParentSystemWindow( this );
if ( pWindow )
@@ -955,7 +955,7 @@ SfxPopupWindow::SfxPopupWindow(
, m_bCascading( false )
, m_nId( nId )
, m_xFrame( rFrame )
- , m_pStatusListener( 0 )
+ , m_pStatusListener( nullptr )
{
vcl::Window* pWindow = GetTopMostParentSystemWindow( this );
if ( pWindow )
@@ -1184,7 +1184,7 @@ VclPtr<SfxPopupWindow> SfxRecentFilesToolBoxControl::CreatePopupWindow()
rBox.SetItemDown( nItemId, false );
}
- return 0;
+ return nullptr;
}
SfxSaveAsToolBoxControl::SfxSaveAsToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox )
@@ -1233,7 +1233,7 @@ VclPtr<SfxPopupWindow> SfxSaveAsToolBoxControl::CreatePopupWindow()
rBox.SetItemDown( nItemId, false );
}
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index b3e8015c880a..d354921a3319 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -68,7 +68,7 @@
using namespace com::sun::star;
-static SfxFrameArr_Impl* pFramesArr_Impl=0;
+static SfxFrameArr_Impl* pFramesArr_Impl=nullptr;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::util;
@@ -101,7 +101,7 @@ SfxFrame::~SfxFrame()
if ( pParentFrame )
{
pParentFrame->RemoveChildFrame_Impl( this );
- pParentFrame = 0;
+ pParentFrame = nullptr;
}
delete pImp->pDescr;
@@ -155,7 +155,7 @@ bool SfxFrame::DoClose()
bool SfxFrame::DoClose_Impl()
{
- SfxBindings* pBindings = NULL;
+ SfxBindings* pBindings = nullptr;
if ( pImp->pCurrentViewFrame )
pBindings = &pImp->pCurrentViewFrame->GetBindings();
@@ -243,7 +243,7 @@ SfxFrame* SfxFrame::GetChildFrame( sal_uInt16 nPos ) const
return (*pChildArr)[nPos];
}
- return 0L;
+ return nullptr;
}
void SfxFrame::RemoveChildFrame_Impl( SfxFrame* pFrame )
@@ -341,7 +341,7 @@ SfxObjectShell* SfxFrame::GetCurrentDocument() const
{
return pImp->pCurrentViewFrame ?
pImp->pCurrentViewFrame->GetObjectShell() :
- NULL;
+ nullptr;
}
void SfxFrame::SetCurrentViewFrame_Impl( SfxViewFrame *pFrame )
@@ -525,7 +525,7 @@ void SfxFrame::RemoveTopFrame_Impl( SfxFrame* pFrame )
}
SfxFrameItem::SfxFrameItem( sal_uInt16 nWhichId, SfxViewFrame *p )
- : SfxPoolItem( nWhichId ), pFrame( p ? &p->GetFrame() : NULL )
+ : SfxPoolItem( nWhichId ), pFrame( p ? &p->GetFrame() : nullptr )
{
wFrame = pFrame;
}
@@ -664,7 +664,7 @@ SfxFrame* SfxFrameIterator::FirstFrame()
SfxFrame* SfxFrameIterator::NextFrame( SfxFrame& rPrev )
{
// If recursion is requested testing is done first on Children.
- SfxFrame *pRet = NULL;
+ SfxFrame *pRet = nullptr;
if ( bRecursive )
pRet = rPrev.GetChildFrame( 0 );
if ( !pRet )
@@ -679,7 +679,7 @@ SfxFrame* SfxFrameIterator::NextFrame( SfxFrame& rPrev )
SfxFrame* SfxFrameIterator::NextSibling_Impl( SfxFrame& rPrev )
{
- SfxFrame *pRet = NULL;
+ SfxFrame *pRet = nullptr;
if ( &rPrev != pFrame )
{
SfxFrameArr_Impl& rArr = *rPrev.pParentFrame->pChildArr;
@@ -791,7 +791,7 @@ SfxWorkWindow* SfxFrame::GetWorkWindow_Impl() const
else if ( pParentFrame )
return pParentFrame->GetWorkWindow_Impl();
else
- return NULL;
+ return nullptr;
}
void SfxFrame::CreateWorkWindow_Impl()
@@ -883,7 +883,7 @@ void SfxFrame::Resize()
{
// check for IPClient that contains UIactive object or object that is currently UI activating
SfxWorkWindow *pWork = GetWorkWindow_Impl();
- SfxInPlaceClient* pClient = GetCurrentViewFrame()->GetViewShell() ? GetCurrentViewFrame()->GetViewShell()->GetUIActiveIPClient_Impl() : 0;
+ SfxInPlaceClient* pClient = GetCurrentViewFrame()->GetViewShell() ? GetCurrentViewFrame()->GetViewShell()->GetUIActiveIPClient_Impl() : nullptr;
if ( pClient )
{
uno::Reference < lang::XUnoTunnel > xObj( pClient->GetObject()->getComponent(), uno::UNO_QUERY );
@@ -893,7 +893,7 @@ void SfxFrame::Resize()
{
SfxObjectShell* pDoc = reinterpret_cast< SfxObjectShell* >( sal::static_int_cast< sal_IntPtr >( nHandle ));
SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDoc );
- pWork = pFrame ? pFrame->GetFrame().GetWorkWindow_Impl() : NULL;
+ pWork = pFrame ? pFrame->GetFrame().GetWorkWindow_Impl() : nullptr;
}
}
@@ -920,8 +920,8 @@ void SfxFrame::Resize()
SfxFrame* SfxFrame::GetFirst()
{
if ( !pFramesArr_Impl )
- return 0;
- return pFramesArr_Impl->empty() ? 0 : pFramesArr_Impl->front();
+ return nullptr;
+ return pFramesArr_Impl->empty() ? nullptr : pFramesArr_Impl->front();
}
SfxFrame* SfxFrame::GetNext( SfxFrame& rFrame )
@@ -930,7 +930,7 @@ SfxFrame* SfxFrame::GetNext( SfxFrame& rFrame )
if ( it != pFramesArr_Impl->end() && (++it) != pFramesArr_Impl->end() )
return *it;
else
- return NULL;
+ return nullptr;
}
const SfxPoolItem* SfxFrame::OpenDocumentSynchron( SfxItemSet& i_rSet, const Reference< XFrame >& i_rTargetFrame )
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index f44bf918a1a4..53502456e48c 100644
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -140,7 +140,7 @@ bool SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )
if ( nType == MouseNotifyEvent::KEYINPUT || nType == MouseNotifyEvent::KEYUP )
{
SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
- SfxViewShell* pShell = pView ? pView->GetViewShell() : NULL;
+ SfxViewShell* pShell = pView ? pView->GetViewShell() : nullptr;
if ( pShell && pShell->HasKeyListeners_Impl() && pShell->HandleNotifyEvent_Impl( rNEvt ) )
return true;
}
@@ -148,7 +148,7 @@ bool SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
vcl::Window* pWindow = rNEvt.GetWindow();
SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
- SfxViewShell* pShell = pView ? pView->GetViewShell() : NULL;
+ SfxViewShell* pShell = pView ? pView->GetViewShell() : nullptr;
if ( pShell )
if ( pWindow == pShell->GetWindow() || pShell->GetWindow()->IsChild( pWindow ) )
if ( pShell->HasMouseClickListeners_Impl() && pShell->HandleNotifyEvent_Impl( rNEvt ) )
@@ -223,7 +223,7 @@ Reference < XFrame > SfxFrame::CreateBlankFrame()
SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, vcl::Window& rWindow, sal_uInt16 nViewId, bool bHidden )
{
- SfxFrame* pFrame = NULL;
+ SfxFrame* pFrame = nullptr;
try
{
// create and initialize new top level frame for this window
@@ -293,10 +293,10 @@ SfxFrame* SfxFrame::Create( const Reference < XFrame >& i_rFrame )
SfxFrame::SfxFrame( vcl::Window& i_rContainerWindow, bool i_bHidden )
:SvCompatWeakBase<SfxFrame>( this )
- ,pParentFrame( NULL )
- ,pChildArr( NULL )
- ,pImp( NULL )
- ,pWindow( NULL )
+ ,pParentFrame( nullptr )
+ ,pChildArr( nullptr )
+ ,pImp( nullptr )
+ ,pWindow( nullptr )
{
Construct_Impl();
@@ -347,7 +347,7 @@ SystemWindow* SfxFrame::GetTopWindow_Impl() const
if ( pImp->pExternalContainerWindow->IsSystemWindow() )
return static_cast<SystemWindow*>( pImp->pExternalContainerWindow.get() );
else
- return NULL;
+ return nullptr;
}
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index 618b577ed473..c89552c2f8dc 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -211,7 +211,7 @@ const SfxFilter* SfxFrameLoader_Impl::impl_detectFilterForURL( const OUString& s
try
{
if ( sURL.isEmpty() )
- return 0;
+ return nullptr;
Reference< XTypeDetection > xDetect(
m_aContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", m_aContext),
@@ -244,7 +244,7 @@ const SfxFilter* SfxFrameLoader_Impl::impl_detectFilterForURL( const OUString& s
sFilter.clear();
}
- const SfxFilter* pFilter = 0;
+ const SfxFilter* pFilter = nullptr;
if (!sFilter.isEmpty())
pFilter = rMatcher.GetFilter4FilterName(sFilter);
return pFilter;
@@ -292,7 +292,7 @@ const SfxFilter* SfxFrameLoader_Impl::impl_getFilterFromServiceName_nothrow( con
{
DBG_UNHANDLED_EXCEPTION();
}
- return NULL;
+ return nullptr;
}
@@ -361,7 +361,7 @@ void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollecti
xInteraction = io_rDescriptor.getOrDefault( "InteractionHandler", Reference< XInteractionHandler >() );
const SfxFilterMatcher& rMatcher = SfxGetpApp()->GetFilterMatcher();
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
// get filter by its name directly ...
if ( !sFilterName.isEmpty() )
@@ -412,7 +412,7 @@ SfxObjectShellRef SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XM
}
SAL_WARN( "sfx.view", "SfxFrameLoader_Impl::impl_findObjectShell: model is not based on SfxObjectShell - wrong frame loader usage!" );
- return NULL;
+ return nullptr;
}
diff --git a/sfx2/source/view/impframe.hxx b/sfx2/source/view/impframe.hxx
index b3a15d2cab3f..18a3ec2e0b60 100644
--- a/sfx2/source/view/impframe.hxx
+++ b/sfx2/source/view/impframe.hxx
@@ -58,8 +58,8 @@ public:
explicit SfxFrame_Impl( SfxFrame* pAntiImplP )
:nType( 0L )
- ,pCurrentViewFrame( NULL )
- ,pDescr( NULL )
+ ,pCurrentViewFrame( nullptr )
+ ,pDescr( nullptr )
,nLocks( 0 )
,bClosing(false)
,bPrepClosing(false)
@@ -68,8 +68,8 @@ public:
,bReleasingComponent( false )
,bInPlace( false )
,pFrame( pAntiImplP )
- ,pWorkWin( 0 )
- ,pExternalContainerWindow( NULL )
+ ,pWorkWin( nullptr )
+ ,pExternalContainerWindow( nullptr )
,bHidden( false )
,bLockResize( false )
,bMenuBarOn( true )
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index b5bd31928ee0..fa51683c5dc7 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -55,10 +55,10 @@ struct SfxViewFrame_Impl
explicit SfxViewFrame_Impl(SfxFrame& i_rFrame)
: rFrame(i_rFrame)
- , pReloader(0)
- , pWindow(0)
- , pActiveChild(0)
- , pFocusWin(0)
+ , pReloader(nullptr)
+ , pWindow(nullptr)
+ , pActiveChild(nullptr)
+ , pFocusWin(nullptr)
, nDocViewNo(0)
, nCurViewId(0)
, bResizeInToOut(false)
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 13d53eb93dd8..b35b13c46e0d 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -113,7 +113,7 @@ public:
SfxInPlaceClient_Impl()
- : m_pClient( NULL )
+ : m_pClient( nullptr )
, m_nAspect( 0 )
, m_bStoreObject( true )
, m_bUIActive( false )
@@ -625,9 +625,9 @@ SfxInPlaceClient::~SfxInPlaceClient()
// deleting the client before storing the object means discarding all changes
m_pImp->m_bStoreObject = false;
- SetObject(0);
+ SetObject(nullptr);
- m_pImp->m_pClient = NULL;
+ m_pImp->m_pClient = nullptr;
// the next call will destroy m_pImp if no other reference to it exists
m_pImp->m_xClient.clear();
@@ -688,7 +688,7 @@ void SfxInPlaceClient::SetObject( const uno::Reference < embed::XEmbeddedObject
m_pImp->m_xObject->removeStateChangeListener( uno::Reference < embed::XStateChangeListener >( m_pImp->m_xClient, uno::UNO_QUERY ) );
try
{
- m_pImp->m_xObject->setClientSite( 0 );
+ m_pImp->m_xObject->setClientSite( nullptr );
}
catch( uno::Exception& )
{
@@ -854,13 +854,13 @@ SfxInPlaceClient* SfxInPlaceClient::GetClient( SfxObjectShell* pDoc, const css::
{
if( pFrame->GetViewShell() )
{
- SfxInPlaceClient* pClient = pFrame->GetViewShell()->FindIPClient( xObject, NULL );
+ SfxInPlaceClient* pClient = pFrame->GetViewShell()->FindIPClient( xObject, nullptr );
if ( pClient )
return pClient;
}
}
- return NULL;
+ return nullptr;
}
sal_Int64 SfxInPlaceClient::GetAspect() const
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 05d5a5b25025..58fa19d92599 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -309,7 +309,7 @@ void SAL_CALL SfxStatusIndicator::reset() throw(RuntimeException, std::exception
void SAL_CALL SfxStatusIndicator::disposing( const lang::EventObject& /*Source*/ ) throw(RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- xOwner = 0;
+ xOwner = nullptr;
xProgress.clear();
}
@@ -447,9 +447,9 @@ void SAL_CALL IMPL_SfxBaseController_ListenerHelper::frameAction( const frame::F
{
SolarMutexGuard aGuard;
if (
- ( m_pController != NULL ) &&
+ ( m_pController != nullptr ) &&
( aEvent.Frame == m_pController->getFrame() ) &&
- ( m_pController->GetViewShell_Impl() && m_pController->GetViewShell_Impl()->GetWindow() != NULL )
+ ( m_pController->GetViewShell_Impl() && m_pController->GetViewShell_Impl()->GetWindow() != nullptr )
)
{
if ( aEvent.Action == frame::FrameAction_FRAME_UI_ACTIVATED )
@@ -761,7 +761,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const
pAct = m_pData->m_pViewShell->GetViewFrame() ;
SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool( pAct );
- const SfxSlot* pSlot( 0 );
+ const SfxSlot* pSlot( nullptr );
if ( bMasterCommand )
pSlot = rSlotPool.GetUnoSlot( aMasterCommand );
else
@@ -782,7 +782,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const
// SfxViewFrame* pParentFrame = pAct->GetParentViewFrame();
// search the related SfxViewFrame
- SfxViewFrame* pParentFrame = NULL;
+ SfxViewFrame* pParentFrame = nullptr;
for ( SfxViewFrame* pFrame = SfxViewFrame::GetFirst();
pFrame;
pFrame = SfxViewFrame::GetNext( *pFrame ) )
@@ -797,7 +797,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const
if ( pParentFrame )
{
SfxSlotPool& rFrameSlotPool = SfxSlotPool::GetSlotPool( pParentFrame );
- const SfxSlot* pSlot2( 0 );
+ const SfxSlot* pSlot2( nullptr );
if ( bMasterCommand )
pSlot2 = rFrameSlotPool.GetUnoSlot( aMasterCommand );
else
@@ -839,7 +839,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const
// SfxViewFrame* pParentFrame = pAct->GetParentViewFrame();
// search the related SfxViewFrame
- SfxViewFrame* pParentFrame = NULL;
+ SfxViewFrame* pParentFrame = nullptr;
for ( SfxViewFrame* pFrame = SfxViewFrame::GetFirst();
pFrame;
pFrame = SfxViewFrame::GetNext( *pFrame ) )
@@ -1032,7 +1032,7 @@ void SAL_CALL SfxBaseController::dispose() throw( RuntimeException, std::excepti
m_pData->m_xListener->disposing( aObject );
SfxViewShell *pShell = m_pData->m_pViewShell;
- m_pData->m_pViewShell = NULL;
+ m_pData->m_pViewShell = nullptr;
if ( pFrame->GetViewShell() == pShell )
{
// Enter registrations only allowed if we are the owner!
@@ -1077,7 +1077,7 @@ void SfxBaseController::ReleaseShell_Impl()
if ( xCloseable.is() )
xCloseable->removeCloseListener( m_pData->m_xCloseListener );
}
- m_pData->m_pViewShell = 0;
+ m_pData->m_pViewShell = nullptr;
Reference < frame::XFrame > aXFrame;
attachFrame( aXFrame );
@@ -1254,7 +1254,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
{
if ( i_eConnect == E_CONNECT )
{
- if ( ( m_pData->m_pViewShell->GetObjectShell() != NULL )
+ if ( ( m_pData->m_pViewShell->GetObjectShell() != nullptr )
&& ( m_pData->m_pViewShell->GetObjectShell()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
)
{
@@ -1402,7 +1402,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
continue;
const SfxViewFactory* pViewFactory = rDocFactory.GetViewFactoryByViewName( sViewId );
- if ( pViewFactory == NULL )
+ if ( pViewFactory == nullptr )
continue;
if ( pViewFactory->GetOrdinal() == pViewFrame->GetCurViewId() )
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 411963922ee2..05e2ca165d09 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -624,7 +624,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
DELETEZ( xOldObj->Get_Impl()->pReloadTimer );
- SfxItemSet* pNewSet = 0;
+ SfxItemSet* pNewSet = nullptr;
const SfxFilter *pFilter = pMedium->GetFilter();
if( pURLItem )
{
@@ -634,7 +634,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// Filter Detection
OUString referer;
const SfxStringItem* refererItem = rReq.GetArg<SfxStringItem>(SID_REFERER);
- if (refererItem != 0) {
+ if (refererItem != nullptr) {
referer = refererItem->GetValue();
}
SfxMedium aMedium( pURLItem->GetValue(), referer, SFX_STREAM_READWRITE );
@@ -695,7 +695,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if (!pInteractionItem)
{
- Reference < task::XInteractionHandler2 > xHdl = task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), 0 );
+ Reference < task::XInteractionHandler2 > xHdl = task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr );
if (xHdl.is())
pNewSet->Put( SfxUnoAnyItem(SID_INTERACTIONHANDLER,css::uno::makeAny(xHdl)) );
}
@@ -740,7 +740,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
catch ( uno::Exception& )
{
xNewObj->DoClose();
- xNewObj = 0;
+ xNewObj = nullptr;
}
DELETEZ( pNewSet );
@@ -898,7 +898,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
for( SfxFrame* pNextFrame = aFrameIter.FirstFrame();
pFrame;
pNextFrame = pNextFrame ?
- aFrameIter.NextFrame( *pNextFrame ) : 0 )
+ aFrameIter.NextFrame( *pNextFrame ) : nullptr )
{
SfxObjectShell *pShell = pFrame->GetCurrentDocument();
if( pShell && pShell->Get_Impl()->bReloadAvailable )
@@ -980,7 +980,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
SfxViewShell *pViewSh = GetViewShell();
if( !pViewSh ) return;
for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
- pViewSh->GetSlotState( nSID, 0, &rSet );
+ pViewSh->GetSlotState( nSID, nullptr, &rSet );
return;
}
@@ -1072,7 +1072,7 @@ void SfxViewFrame::ReleaseObjectShell_Impl()
{
PopShellAndSubShells_Impl( *pDyingViewSh );
pDyingViewSh->DisconnectAllClients();
- SetViewShell_Impl(0);
+ SetViewShell_Impl(nullptr);
delete pDyingViewSh;
}
#ifdef DBG_UTIL
@@ -1120,7 +1120,7 @@ bool SfxViewFrame::Close()
Broadcast( SfxSimpleHint( SFX_HINT_DYING ) );
if (SfxViewFrame::Current() == this)
- SfxViewFrame::SetViewFrame( NULL );
+ SfxViewFrame::SetViewFrame( nullptr );
// Since the Dispatcher is emptied, it can not be used in any reasnable
// manner, thus it is better to let the dispatcher be.
@@ -1391,8 +1391,8 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
pImp->bResizeInToOut = true;
pImp->bDontOverwriteResizeInToOut = false;
pImp->bObjLocked = false;
- pImp->pFocusWin = 0;
- pImp->pActiveChild = NULL;
+ pImp->pFocusWin = nullptr;
+ pImp->pActiveChild = nullptr;
pImp->nCurViewId = 0;
pImp->bReloading = false;
pImp->bIsDowning = false;
@@ -1400,7 +1400,7 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
pImp->bEnabled = true;
pImp->nDocViewNo = 0;
pImp->aMargin = Size( -1, -1 );
- pImp->pWindow = 0;
+ pImp->pWindow = nullptr;
SetPool( &SfxGetpApp()->GetPool() );
pDispatcher = new SfxDispatcher(this);
@@ -1448,7 +1448,7 @@ SfxViewFrame::SfxViewFrame
SfxObjectShell* pObjShell
)
: pImp( new SfxViewFrame_Impl( rFrame ) )
- , pDispatcher(0)
+ , pDispatcher(nullptr)
, pBindings( new SfxBindings )
, nAdjustPosPixelLock( 0 )
{
@@ -1468,7 +1468,7 @@ SfxViewFrame::~SfxViewFrame()
SetDowning_Impl();
if ( SfxViewFrame::Current() == this )
- SfxViewFrame::SetViewFrame( NULL );
+ SfxViewFrame::SetViewFrame( nullptr );
ReleaseObjectShell_Impl();
@@ -1480,7 +1480,7 @@ SfxViewFrame::~SfxViewFrame()
pImp->pFocusWin.clear();
if ( GetFrame().GetCurrentViewFrame() == this )
- GetFrame().SetCurrentViewFrame_Impl( NULL );
+ GetFrame().SetCurrentViewFrame_Impl( nullptr );
// Unregister from the Frame List.
SfxApplication *pSfxApp = SfxGetpApp();
@@ -1498,7 +1498,7 @@ SfxViewFrame::~SfxViewFrame()
void SfxViewFrame::KillDispatcher_Impl()
{
- SfxModule* pModule = xObjSh.Is() ? xObjSh->GetModule() : 0;
+ SfxModule* pModule = xObjSh.Is() ? xObjSh->GetModule() : nullptr;
if ( xObjSh.Is() )
ReleaseObjectShell_Impl();
if ( pDispatcher )
@@ -1513,7 +1513,7 @@ void SfxViewFrame::KillDispatcher_Impl()
SfxViewFrame* SfxViewFrame::Current()
{
- return SfxApplication::Get() ? SfxGetpApp()->Get_Impl()->pViewFrame : NULL;
+ return SfxApplication::Get() ? SfxGetpApp()->Get_Impl()->pViewFrame : nullptr;
}
// returns the first window of spec. type viewing the specified doc.
@@ -1536,7 +1536,7 @@ SfxViewFrame* SfxViewFrame::GetFirst
return pFrame;
}
- return 0;
+ return nullptr;
}
// returns the next window of spec. type viewing the specified doc.
@@ -1565,13 +1565,13 @@ SfxViewFrame* SfxViewFrame::GetNext
)
return pFrame;
}
- return 0;
+ return nullptr;
}
SfxProgress* SfxViewFrame::GetProgress() const
{
SfxObjectShell *pObjSh = GetObjectShell();
- return pObjSh ? pObjSh->GetProgress() : 0;
+ return pObjSh ? pObjSh->GetProgress() : nullptr;
}
void SfxViewFrame::DoAdjustPosSizePixel //! divide on Inner.../Outer...
@@ -1625,7 +1625,7 @@ void SfxViewFrame::SetViewShell_Impl( SfxViewShell *pVSh )
//TODO/LATER: is it still necessary? is there a replacement for GetParentViewFrame_Impl?
SfxViewFrame* SfxViewFrame::GetParentViewFrame_Impl() const
{
- return NULL;
+ return nullptr;
}
void SfxViewFrame::ForceOuterResize_Impl(bool bOn)
@@ -1826,7 +1826,7 @@ SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell
{
Reference< XFrame > xFrame( i_rFrame );
bool bOwnFrame = false;
- SfxViewShell* pSuccessView = NULL;
+ SfxViewShell* pSuccessView = nullptr;
try
{
if ( !xFrame.is() )
@@ -1888,7 +1888,7 @@ SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell
}
}
- return NULL;
+ return nullptr;
}
SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rFrame,
@@ -1937,7 +1937,7 @@ SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const
SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const sal_uInt16 i_nViewId )
{
- return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_pFrameItem && i_pFrameItem->GetFrame() ? i_pFrameItem->GetFrame()->GetFrameInterface() : NULL, i_nViewId, false );
+ return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_pFrameItem && i_pFrameItem->GetFrame() ? i_pFrameItem->GetFrame()->GetFrameInterface() : nullptr, i_nViewId, false );
}
SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const sal_uInt16 i_nViewId )
@@ -1947,7 +1947,7 @@ SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const Sf
return LoadViewIntoFrame_Impl_NoThrow(
i_rDoc,
- pFrameItem ? pFrameItem->GetFrame() : NULL,
+ pFrameItem ? pFrameItem->GetFrame() : nullptr,
i_nViewId,
pHiddenItem && pHiddenItem->GetValue()
);
@@ -1956,7 +1956,7 @@ SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const Sf
SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, const SfxObjectShell* i_pDoc )
{
if ( !i_rController.is() )
- return NULL;
+ return nullptr;
const SfxObjectShell* pDoc = i_pDoc;
if ( !pDoc )
@@ -1972,7 +1972,7 @@ SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, c
}
}
- SfxViewFrame* pViewFrame = NULL;
+ SfxViewFrame* pViewFrame = nullptr;
for ( pViewFrame = SfxViewFrame::GetFirst( pDoc, false );
pViewFrame;
pViewFrame = SfxViewFrame::GetNext( *pViewFrame, pDoc, false )
@@ -1988,7 +1988,7 @@ SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, c
void SfxViewFrame::SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId )
{
SfxViewShell* pCurrentShell = GetViewShell();
- ENSURE_OR_RETURN_VOID( pCurrentShell != NULL, "SfxViewFrame::SaveCurrentViewData_Impl: no current view shell -> no current view data!" );
+ ENSURE_OR_RETURN_VOID( pCurrentShell != nullptr, "SfxViewFrame::SaveCurrentViewData_Impl: no current view shell -> no current view data!" );
// determine the logical (API) view name
const SfxObjectFactory& rDocFactory( pCurrentShell->GetObjectShell()->GetFactory() );
@@ -2030,7 +2030,7 @@ void SfxViewFrame::SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId )
continue;
const SfxViewFactory* pViewFactory = rDocFactory.GetViewFactoryByViewName( sViewId );
- if ( pViewFactory == NULL )
+ if ( pViewFactory == nullptr )
continue;
if ( pViewFactory->GetOrdinal() == GetCurViewId() )
@@ -2084,7 +2084,7 @@ bool SfxViewFrame::SwitchToViewShell_Impl
{
try
{
- ENSURE_OR_THROW( GetObjectShell() != NULL, "not possible without a document" );
+ ENSURE_OR_THROW( GetObjectShell() != nullptr, "not possible without a document" );
// if we already have a view shell, remove it
SfxViewShell* pOldSh = GetViewShell();
@@ -2176,7 +2176,7 @@ void SfxViewFrame::ExecView_Impl
case SID_VIEWSHELL:
{
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
if ( rReq.GetArgs()
&& SfxItemState::SET == rReq.GetArgs()->GetItemState( SID_VIEWSHELL, false, &pItem )
)
@@ -2381,7 +2381,7 @@ void SfxViewFrame::ToTop()
SfxViewFrame* SfxViewFrame::GetParentViewFrame() const
{
SfxFrame *pFrame = GetFrame().GetParentFrame();
- return pFrame ? pFrame->GetCurrentViewFrame() : NULL;
+ return pFrame ? pFrame->GetCurrentViewFrame() : nullptr;
}
/* [Description]
@@ -2551,7 +2551,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro )
aLocation = xUrl->getParameter( aLocKey );
}
- BasicManager* pBasMgr = 0;
+ BasicManager* pBasMgr = nullptr;
if ( aLocation.equalsIgnoreAsciiCase( "application" ) )
{
// application basic
@@ -2673,7 +2673,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro )
if ( pViewShell->GetName() == "BasicIDE" )
{
SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
- SfxDispatcher* pDispat = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
+ SfxDispatcher* pDispat = pViewFrame ? pViewFrame->GetDispatcher() : nullptr;
if ( pDispat )
{
SfxMacroInfoItem aInfoItem( SID_BASICIDE_ARG_MACROINFO, pBasMgr, aLibName, aModuleName, OUString(), OUString() );
@@ -2727,7 +2727,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
AddDispatchMacroToBasic_Impl(xRecorder->getRecordedMacro());
xRecorder->endRecording();
- xRecorder = NULL;
+ xRecorder = nullptr;
GetBindings().SetRecorder_Impl( xRecorder );
SetChildWindow( SID_RECORDING_FLOATWINDOW, false );
@@ -3097,7 +3097,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
}
else if ( nSID == SID_HYPERLINK_DIALOG )
{
- const SfxPoolItem* pDummy = NULL;
+ const SfxPoolItem* pDummy = nullptr;
SfxItemState eState = GetDispatcher()->QueryState( SID_HYPERLINK_SETLINK, pDummy );
if ( SfxItemState::DISABLED == eState )
rState.DisableItem(nSID);
@@ -3198,7 +3198,7 @@ void SfxViewFrame::ShowChildWindow( sal_uInt16 nId, bool bVisible )
SfxChildWindow* SfxViewFrame::GetChildWindow(sal_uInt16 nId)
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
- return pWork ? pWork->GetChildWindow_Impl(nId) : NULL;
+ return pWork ? pWork->GetChildWindow_Impl(nId) : nullptr;
}
void SfxViewFrame::UpdateDocument_Impl()
@@ -3221,14 +3221,14 @@ void SfxViewFrame::ActivateToolPanel( const css::uno::Reference< css::frame::XFr
SolarMutexGuard aGuard;
// look up the SfxFrame for the given XFrame
- SfxFrame* pFrame = NULL;
+ SfxFrame* pFrame = nullptr;
for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) )
{
if ( pFrame->GetFrameInterface() == i_rFrame )
break;
}
- SfxViewFrame* pViewFrame = pFrame ? pFrame->GetCurrentViewFrame() : NULL;
- ENSURE_OR_RETURN_VOID( pViewFrame != NULL, "SfxViewFrame::ActivateToolPanel: did not find an SfxFrame for the given XFrame!" );
+ SfxViewFrame* pViewFrame = pFrame ? pFrame->GetCurrentViewFrame() : nullptr;
+ ENSURE_OR_RETURN_VOID( pViewFrame != nullptr, "SfxViewFrame::ActivateToolPanel: did not find an SfxFrame for the given XFrame!" );
pViewFrame->ActivateToolPanel_Impl( i_rPanelURL );
}
@@ -3264,7 +3264,7 @@ SfxInfoBarWindow* SfxViewFrame::AppendInfoBar( const OUString& sId, const OUStri
ShowChildWindow(nId);
return pInfoBar;
}
- return NULL;
+ return nullptr;
}
void SfxViewFrame::RemoveInfoBar( const OUString& sId )
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index a2ccc4339538..c854d5f5af72 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -361,7 +361,7 @@ void SfxViewFrame::INetExecute_Impl( SfxRequest &rRequest )
SfxControllerItem* pCtrl = pCache->GetItemLink();
while( pCtrl )
{
- pCtrl->StateChanged( SID_FOCUSURLBOX, SfxItemState::UNKNOWN, 0 );
+ pCtrl->StateChanged( SID_FOCUSURLBOX, SfxItemState::UNKNOWN, nullptr );
pCtrl = pCtrl->GetItemLink();
}
}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index bb82c00dee53..daba22987ea5 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -106,13 +106,13 @@ SfxPrinterController::SfxPrinterController( const VclPtr<Printer>& i_rPrinter,
, maCompleteSelection( i_rComplete )
, maSelection( i_rSelection )
, mxRenderable( i_xRender )
- , mpLastPrinter( NULL )
+ , mpLastPrinter( nullptr )
, mpViewShell( pView )
- , mpObjectShell(0)
+ , mpObjectShell(nullptr)
, m_bOrigStatus( false )
, m_bNeedsChange( false )
, m_bApi(i_bApi)
- , m_bTempPrinter( i_rPrinter.get() != NULL )
+ , m_bTempPrinter( i_rPrinter.get() != nullptr )
{
if ( mpViewShell )
{
@@ -174,8 +174,8 @@ void SfxPrinterController::Notify( SfxBroadcaster& , const SfxHint& rHint )
{
EndListening(*mpViewShell);
EndListening(*mpObjectShell);
- mpViewShell = 0;
- mpObjectShell = 0;
+ mpViewShell = nullptr;
+ mpObjectShell = nullptr;
}
}
}
@@ -429,7 +429,7 @@ SfxDialogExecutor_Impl::SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrinterSe
_pViewSh ( pViewSh ),
_pSetupParent ( pParent ),
- _pOptions ( NULL ),
+ _pOptions ( nullptr ),
_bHelpDisabled ( false )
{
@@ -473,7 +473,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
// Evaluate Printer Options
sal_uInt16 nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC);
- const SfxFlagItem *pFlagItem = 0;
+ const SfxFlagItem *pFlagItem = nullptr;
pDocPrinter->GetOptions().GetItemState( nWhich, false, reinterpret_cast<const SfxPoolItem**>(&pFlagItem) );
bool bOriToDoc = pFlagItem && (static_cast<SfxPrinterChangeFlags>(pFlagItem->GetValue()) & SfxPrinterChangeFlags::CHG_ORIENTATION);
bool bSizeToDoc = pFlagItem && (static_cast<SfxPrinterChangeFlags>(pFlagItem->GetValue()) & SfxPrinterChangeFlags::CHG_SIZE);
@@ -566,7 +566,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
void SfxViewShell::StartPrint( const uno::Sequence < beans::PropertyValue >& rProps, bool bIsAPI, bool bIsDirect )
{
- assert( pImp->m_xPrinterController.get() == NULL );
+ assert( pImp->m_xPrinterController.get() == nullptr );
// get the current selection; our controller should know it
Reference< frame::XController > xController( GetController() );
@@ -629,7 +629,7 @@ std::shared_ptr< vcl::PrinterController > SfxViewShell::GetPrinterController() c
Printer* SfxViewShell::GetActivePrinter() const
{
return (pImp->m_xPrinterController)
- ? pImp->m_xPrinterController->getPrinter().get() : 0;
+ ? pImp->m_xPrinterController->getPrinter().get() : nullptr;
}
void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
@@ -655,7 +655,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// document that is going to be printed!)
OUString aHelpFilterName( "writer_web_HTML_help" );
SfxMedium* pMedium = GetViewFrame()->GetObjectShell()->GetMedium();
- const SfxFilter* pFilter = pMedium ? pMedium->GetFilter() : NULL;
+ const SfxFilter* pFilter = pMedium ? pMedium->GetFilter() : nullptr;
bool bPrintOnHelp = ( pFilter && pFilter->GetFilterName() == aHelpFilterName );
const sal_uInt16 nId = rReq.GetSlot();
@@ -667,18 +667,18 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
SfxObjectShell* pDoc = GetObjectShell();
// derived class may decide to abort this
- if( pDoc == NULL || !pDoc->QuerySlotExecutable( nId ) )
+ if( pDoc == nullptr || !pDoc->QuerySlotExecutable( nId ) )
{
rReq.SetReturnValue( SfxBoolItem( 0, false ) );
return;
}
- if ( !bSilent && pDoc->QueryHiddenInformation( HiddenWarningFact::WhenPrinting, NULL ) != RET_YES )
+ if ( !bSilent && pDoc->QueryHiddenInformation( HiddenWarningFact::WhenPrinting, nullptr ) != RET_YES )
return;
// should we print only the selection or the whole document
const SfxBoolItem* pSelectItem = rReq.GetArg<SfxBoolItem>(SID_SELECTION);
- bool bSelection = ( pSelectItem != NULL && pSelectItem->GetValue() );
+ bool bSelection = ( pSelectItem != nullptr && pSelectItem->GetValue() );
// detect non api call from writer ( that adds SID_SELECTION ) and reset bIsAPI
if ( pSelectItem && rReq.GetArgs()->Count() == 1 )
bIsAPI = false;
@@ -818,7 +818,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// execute PrinterSetupDialog
VclPtrInstance<PrinterSetupDialog> pPrintSetupDlg( GetWindow() );
- SfxDialogExecutor_Impl* pExecutor = 0;
+ SfxDialogExecutor_Impl* pExecutor = nullptr;
if (pImp->m_bHasPrintOptions && HasPrintOptionsPage())
{
@@ -864,7 +864,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
SetPrinter_Impl( pDlgPrinter );
// forget new printer, it was taken over (as pPrinter) or deleted
- pDlgPrinter = NULL;
+ pDlgPrinter = nullptr;
mbPrinterSettingsModified = true;
}
else
@@ -881,7 +881,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
SfxPrinter* SfxViewShell::GetPrinter( bool /*bCreate*/ )
{
- return 0;
+ return nullptr;
}
sal_uInt16 SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, SfxPrinterChangeFlags /*nDiffFlags*/, bool )
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index db1bcac20ce3..a0a3b3afae1f 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -111,7 +111,7 @@ public:
virtual void SAL_CALL changedContents( const datatransfer::clipboard::ClipboardEvent& rEventObject )
throw ( uno::RuntimeException, std::exception ) override;
- void DisconnectViewShell() { m_pViewShell = NULL; }
+ void DisconnectViewShell() { m_pViewShell = nullptr; }
void ChangedContents();
enum AsyncExecuteCmd
@@ -139,7 +139,7 @@ private:
};
SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView, const uno::Reference< datatransfer::clipboard::XClipboardNotifier >& xClpbrdNtfr )
- : m_pViewShell( 0 ), m_xClpbrdNtfr( xClpbrdNtfr )
+ : m_pViewShell( nullptr ), m_xClpbrdNtfr( xClpbrdNtfr )
{
m_xCtrl.set( pView->GetController(), uno::UNO_QUERY );
if ( m_xCtrl.is() )
@@ -204,7 +204,7 @@ void SAL_CALL SfxClipboardChangeListener::disposing( const lang::EventObject& /*
// root for many deadlocks, especially in conjunction with the "Windows"
// based single thread apartment clipboard code!
AsyncExecuteInfo* pInfo = new AsyncExecuteInfo( ASYNCEXECUTE_CMD_DISPOSING, xThis, this );
- Application::PostUserEvent( LINK( 0, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo );
+ Application::PostUserEvent( LINK( nullptr, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo );
}
void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::clipboard::ClipboardEvent& )
@@ -215,7 +215,7 @@ void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::c
// based single thread apartment clipboard code!
uno::Reference< datatransfer::clipboard::XClipboardListener > xThis( static_cast< datatransfer::clipboard::XClipboardListener* >( this ));
AsyncExecuteInfo* pInfo = new AsyncExecuteInfo( ASYNCEXECUTE_CMD_CHANGEDCONTENTS, xThis, this );
- Application::PostUserEvent( LINK( 0, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo );
+ Application::PostUserEvent( LINK( nullptr, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo );
}
@@ -306,10 +306,10 @@ SfxViewShell_Impl::SfxViewShell_Impl(SfxViewShellFlags const nFlags)
, m_bGotOwnership(false)
, m_bGotFrameOwnership(false)
, m_nFamily(0xFFFF) // undefined, default set by TemplateDialog
-, m_pController(0)
-, mpIPClientList(NULL)
-, m_pLibreOfficeKitViewCallback(0)
-, m_pLibreOfficeKitViewData(0)
+, m_pController(nullptr)
+, mpIPClientList(nullptr)
+, m_pLibreOfficeKitViewCallback(nullptr)
+, m_pLibreOfficeKitViewData(nullptr)
{}
SfxViewShell_Impl::~SfxViewShell_Impl()
@@ -711,7 +711,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
OSL_ASSERT( !aFileName.isEmpty() );
// Creates a temporary directory to store our predefined file into it.
- ::utl::TempFile aTempDir( NULL, true );
+ ::utl::TempFile aTempDir( nullptr, true );
INetURLObject aFilePathObj( aTempDir.GetURL() );
aFilePathObj.insertName( aFileName );
@@ -845,7 +845,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
if ( SID_PRINTDOCDIRECT == nSID )
{
OUString aPrinterName;
- if ( pPrinter != NULL )
+ if ( pPrinter != nullptr )
aPrinterName = pPrinter->GetName();
else
aPrinterName = Printer::GetDefaultPrinterName();
@@ -951,7 +951,7 @@ SfxInPlaceClient* SfxViewShell::FindIPClient
{
SfxInPlaceClientList *pClients = pImp->GetIPClientList_Impl(false);
if ( !pClients )
- return 0;
+ return nullptr;
if( !pObjParentWin )
pObjParentWin = GetWindow();
@@ -962,7 +962,7 @@ SfxInPlaceClient* SfxViewShell::FindIPClient
return pIPClient;
}
- return 0;
+ return nullptr;
}
@@ -979,7 +979,7 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const
// this method is needed as long as SFX still manages the border space for ChildWindows (see SfxFrame::Resize)
SfxInPlaceClientList *pClients = pImp->GetIPClientList_Impl(false);
if ( !pClients )
- return 0;
+ return nullptr;
for ( size_t n = 0; n < pClients->size(); n++)
{
@@ -988,14 +988,14 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const
return pIPClient;
}
- return NULL;
+ return nullptr;
}
SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const
{
SfxInPlaceClientList *pClients = pImp->GetIPClientList_Impl(false);
if ( !pClients )
- return 0;
+ return nullptr;
for ( size_t n = 0; n < pClients->size(); n++)
{
@@ -1004,7 +1004,7 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const
return pIPClient;
}
- return NULL;
+ return nullptr;
}
@@ -1251,8 +1251,8 @@ SfxViewShell::SfxViewShell
: SfxShell(this)
, pImp( new SfxViewShell_Impl(nFlags) )
, pFrame(pViewFrame)
-, pSubShell(0)
-, pWindow(0)
+, pSubShell(nullptr)
+, pWindow(nullptr)
, bNoNewWindow( nFlags & SfxViewShellFlags::NO_NEWWINDOW )
, mbPrinterSettingsModified(false)
{
@@ -1286,7 +1286,7 @@ SfxViewShell::~SfxViewShell()
if ( pImp->xClipboardListener.is() )
{
pImp->xClipboardListener->DisconnectViewShell();
- pImp->xClipboardListener = NULL;
+ pImp->xClipboardListener = nullptr;
}
if (pImp->m_pController.is())
@@ -1329,7 +1329,7 @@ bool SfxViewShell::PrepareClose
SfxViewShell* SfxViewShell::Current()
{
SfxViewFrame *pCurrent = SfxViewFrame::Current();
- return pCurrent ? pCurrent->GetViewShell() : NULL;
+ return pCurrent ? pCurrent->GetViewShell() : nullptr;
}
@@ -1337,7 +1337,7 @@ SfxViewShell* SfxViewShell::Current()
SfxViewShell* SfxViewShell::Get( const Reference< XController>& i_rController )
{
if ( !i_rController.is() )
- return NULL;
+ return nullptr;
for ( SfxViewShell* pViewShell = SfxViewShell::GetFirst( false );
pViewShell;
@@ -1347,7 +1347,7 @@ SfxViewShell* SfxViewShell::Get( const Reference< XController>& i_rController )
if ( pViewShell->GetController() == i_rController )
return pViewShell;
}
- return NULL;
+ return nullptr;
}
@@ -1363,7 +1363,7 @@ SdrView* SfxViewShell::GetDrawView() const
*/
{
- return 0;
+ return nullptr;
}
@@ -1456,7 +1456,7 @@ SfxShell* SfxViewShell::GetSubShell( sal_uInt16 nNo )
sal_uInt16 nCount = pImp->aArr.size();
if(nNo < nCount)
return pImp->aArr[nCount - nNo - 1];
- return NULL;
+ return nullptr;
}
void SfxViewShell::PushSubShells_Impl( bool bPush )
@@ -1531,7 +1531,7 @@ SfxViewShell* SfxViewShell::GetFirst
}
}
- return 0;
+ return nullptr;
}
@@ -1573,7 +1573,7 @@ SfxViewShell* SfxViewShell::GetNext
}
}
- return 0;
+ return nullptr;
}
@@ -1799,7 +1799,7 @@ void SfxViewShell::DiscardClients_Impl()
SfxObjectShell* SfxViewShell::GetObjectShell()
{
- return pFrame ? pFrame->GetObjectShell() : NULL;
+ return pFrame ? pFrame->GetObjectShell() : nullptr;
}
@@ -1919,7 +1919,7 @@ void Change( Menu* pMenu, SfxViewShell* pView )
for (sal_uInt16 nIdx=0;;)
{
SfxShell *pShell=pDisp->GetShell(nIdx++);
- if (pShell == NULL)
+ if (pShell == nullptr)
break;
const SfxInterface *pIFace = pShell->GetInterface();
const SfxSlot* pSlot = pIFace->GetSlot( aCmd );
@@ -1940,7 +1940,7 @@ void Change( Menu* pMenu, SfxViewShell* pView )
bool SfxViewShell::TryContextMenuInterception( Menu& rIn, const OUString& rMenuIdentifier, Menu*& rpOut, ui::ContextMenuExecuteEvent aEvent )
{
- rpOut = NULL;
+ rpOut = nullptr;
bool bModified = false;
// create container from menu