diff options
147 files changed, 944 insertions, 944 deletions
diff --git a/include/svtools/asynclink.hxx b/include/svtools/asynclink.hxx index f0fc74cec2af..2c1421cd1c49 100644 --- a/include/svtools/asynclink.hxx +++ b/include/svtools/asynclink.hxx @@ -47,20 +47,20 @@ class SVT_DLLPUBLIC AsynchronLink public: AsynchronLink( const Link<void*,void>& rLink ) : _aLink( rLink ) - , _nEventId( 0 ) - , _pIdle( 0 ) + , _nEventId( nullptr ) + , _pIdle( nullptr ) , _bInCall( false ) - , _pDeleted( 0 ) - , _pArg( 0 ) - , _pMutex( 0 ) + , _pDeleted( nullptr ) + , _pArg( nullptr ) + , _pMutex( nullptr ) {} AsynchronLink() - : _nEventId( 0 ) - , _pIdle( 0 ) + : _nEventId( nullptr ) + , _pIdle( nullptr ) , _bInCall( false ) - , _pDeleted( 0 ) - , _pArg( 0 ) - , _pMutex( 0 ) + , _pDeleted( nullptr ) + , _pArg( nullptr ) + , _pMutex( nullptr ) {} ~AsynchronLink(); diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index ffbef7f3c8f0..2b641f9b8944 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -526,7 +526,7 @@ public: long NextSelectedRow(); const MultiSelection* GetColumnSelection() const { return pColSel; } const MultiSelection* GetSelection() const - { return bMultiSelection ? uRow.pSel : 0; } + { return bMultiSelection ? uRow.pSel : nullptr; } long FirstSelectedColumn( ) const; diff --git a/include/svtools/ctrltool.hxx b/include/svtools/ctrltool.hxx index 6bec2bd8e25e..263846e35814 100644 --- a/include/svtools/ctrltool.hxx +++ b/include/svtools/ctrltool.hxx @@ -160,7 +160,7 @@ private: public: FontList( OutputDevice* pDevice, - OutputDevice* pDevice2 = NULL, + OutputDevice* pDevice2 = nullptr, bool bAll = true ); ~FontList(); diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index 9fdd5ec22b72..baa82f7ab54b 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -465,13 +465,13 @@ namespace svt public: BrowserMouseEventPtr() - : pEvent(NULL) + : pEvent(nullptr) , bDown(false) { } ~BrowserMouseEventPtr(){Clear();} - bool Is() const {return pEvent != NULL;} + bool Is() const {return pEvent != nullptr;} bool IsDown() const {return bDown;} const BrowserMouseEvent* operator->() const {return pEvent;} const BrowserMouseEvent& operator*() const {return *pEvent;} diff --git a/include/svtools/ehdl.hxx b/include/svtools/ehdl.hxx index 612e44b0d180..23f5ce7a34ab 100644 --- a/include/svtools/ehdl.hxx +++ b/include/svtools/ehdl.hxx @@ -33,11 +33,11 @@ class SVT_DLLPUBLIC SfxErrorContext : private ErrorContext { public: SfxErrorContext( - sal_uInt16 nCtxIdP, vcl::Window *pWin=0, - sal_uInt16 nResIdP=USHRT_MAX, ResMgr *pMgrP=0); + sal_uInt16 nCtxIdP, vcl::Window *pWin=nullptr, + sal_uInt16 nResIdP=USHRT_MAX, ResMgr *pMgrP=nullptr); SfxErrorContext( - sal_uInt16 nCtxIdP, const OUString &aArg1, vcl::Window *pWin=0, - sal_uInt16 nResIdP=USHRT_MAX, ResMgr *pMgrP=0); + sal_uInt16 nCtxIdP, const OUString &aArg1, vcl::Window *pWin=nullptr, + sal_uInt16 nResIdP=USHRT_MAX, ResMgr *pMgrP=nullptr); bool GetString(sal_uLong nErrId, OUString &rStr) override; private: @@ -50,7 +50,7 @@ private: class SVT_DLLPUBLIC SfxErrorHandler : private ErrorHandler { public: - SfxErrorHandler(sal_uInt16 nId, sal_uLong lStart, sal_uLong lEnd, ResMgr *pMgr=0); + SfxErrorHandler(sal_uInt16 nId, sal_uLong lStart, sal_uLong lEnd, ResMgr *pMgr=nullptr); virtual ~SfxErrorHandler(); protected: diff --git a/include/svtools/embedhlp.hxx b/include/svtools/embedhlp.hxx index aee98433402b..7dad21d020c8 100644 --- a/include/svtools/embedhlp.hxx +++ b/include/svtools/embedhlp.hxx @@ -91,11 +91,11 @@ public: sal_Int64 GetViewAspect() const; void SetViewAspect( sal_Int64 nAspect ); - const Graphic* GetGraphic( OUString* pMediaType = NULL ) const; + const Graphic* GetGraphic( OUString* pMediaType = nullptr ) const; // the original size of the object ( size of the icon for iconified object ) // no conversion is done if no target mode is provided - Size GetSize( MapMode* pTargetMapMode = NULL ) const; + Size GetSize( MapMode* pTargetMapMode = nullptr ) const; void SetGraphic( const Graphic& rGraphic, const OUString& rMediaType ); void SetGraphicStream( diff --git a/include/svtools/fmtfield.hxx b/include/svtools/fmtfield.hxx index 6426772295cd..1256e5b8de61 100644 --- a/include/svtools/fmtfield.hxx +++ b/include/svtools/fmtfield.hxx @@ -95,7 +95,7 @@ protected: bool m_bUseInputStringForFormatting; public: - FormattedField(vcl::Window* pParent, WinBits nStyle = 0, SvNumberFormatter* pInitialFormatter = NULL, sal_Int32 nFormatKey = 0); + FormattedField(vcl::Window* pParent, WinBits nStyle = 0, SvNumberFormatter* pInitialFormatter = nullptr, sal_Int32 nFormatKey = 0); // Min-/Max-management bool HasMinValue() const { return m_bHasMin; } @@ -260,7 +260,7 @@ protected: public: DoubleNumericField(vcl::Window* pParent, WinBits nStyle = 0) :FormattedField(pParent, nStyle) - ,m_pNumberValidator( NULL ) + ,m_pNumberValidator( nullptr ) { ResetConformanceTester(); } diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx index 55399e340a6f..bd8a16469cdd 100644 --- a/include/svtools/grfmgr.hxx +++ b/include/svtools/grfmgr.hxx @@ -202,8 +202,8 @@ private: void SVT_DLLPRIVATE ImplAssignGraphicData(); void SVT_DLLPRIVATE ImplSetGraphicManager( const GraphicManager* pMgr, - const OString* pID = NULL, - const GraphicObject* pCopyObj = NULL + const OString* pID = nullptr, + const GraphicObject* pCopyObj = nullptr ); void SVT_DLLPRIVATE ImplAutoSwapIn(); bool SVT_DLLPRIVATE ImplGetCropParams( @@ -326,10 +326,10 @@ protected: void SetSwapState(); public: - GraphicObject( const GraphicManager* pMgr = NULL ); - GraphicObject( const Graphic& rGraphic, const GraphicManager* pMgr = NULL ); - GraphicObject( const GraphicObject& rCacheObj, const GraphicManager* pMgr = NULL ); - explicit GraphicObject( const OString& rUniqueID, const GraphicManager* pMgr = NULL ); + GraphicObject( const GraphicManager* pMgr = nullptr ); + GraphicObject( const Graphic& rGraphic, const GraphicManager* pMgr = nullptr ); + GraphicObject( const GraphicObject& rCacheObj, const GraphicManager* pMgr = nullptr ); + explicit GraphicObject( const OString& rUniqueID, const GraphicManager* pMgr = nullptr ); virtual ~GraphicObject(); GraphicObject& operator=( const GraphicObject& rCacheObj ); @@ -348,12 +348,12 @@ public: OutputDevice* pOut, const Point& rPt, const Size& rSz, - const GraphicAttr* pAttr = NULL, + const GraphicAttr* pAttr = nullptr, GraphicManagerDrawFlags nFlags = GraphicManagerDrawFlags::STANDARD ) const; const Graphic& GetGraphic() const; - void SetGraphic( const Graphic& rGraphic, const GraphicObject* pCopyObj = 0); + void SetGraphic( const Graphic& rGraphic, const GraphicObject* pCopyObj = nullptr); void SetGraphic( const Graphic& rGraphic, const OUString& rLink ); /** Get graphic transformed according to given attributes @@ -386,7 +386,7 @@ public: const MapMode& rDestMap, const GraphicAttr& rAttr ) const; - Graphic GetTransformedGraphic( const GraphicAttr* pAttr = NULL ) const; // TODO: Change to Impl + Graphic GetTransformedGraphic( const GraphicAttr* pAttr = nullptr ) const; // TODO: Change to Impl void SetAttr( const GraphicAttr& rAttr ); const GraphicAttr& GetAttr() const { return maAttr; } @@ -425,7 +425,7 @@ public: OutputDevice* pOut, const Point& rPt, const Size& rSz, - const GraphicAttr* pAttr = NULL, + const GraphicAttr* pAttr = nullptr, GraphicManagerDrawFlags nFlags = GraphicManagerDrawFlags::STANDARD ); @@ -467,7 +467,7 @@ public: const Rectangle& rArea, const Size& rSize, const Size& rOffset, - const GraphicAttr* pAttr = NULL, + const GraphicAttr* pAttr = nullptr, GraphicManagerDrawFlags nFlags = GraphicManagerDrawFlags::STANDARD, int nTileCacheSize1D=128 ); @@ -477,12 +477,12 @@ public: const Point& rPt, const Size& rSz, long nExtraData = 0L, - const GraphicAttr* pAttr = NULL, + const GraphicAttr* pAttr = nullptr, GraphicManagerDrawFlags nFlags = GraphicManagerDrawFlags::STANDARD, - OutputDevice* pFirstFrameOutDev = NULL + OutputDevice* pFirstFrameOutDev = nullptr ); - void StopAnimation( OutputDevice* pOut = NULL, long nExtraData = 0L ); + void StopAnimation( OutputDevice* pOut = nullptr, long nExtraData = 0L ); static GraphicObject CreateGraphicObjectFromURL( const OUString &rURL ); // will inspect an object ( e.g. a control ) for any 'ImageURL' @@ -539,7 +539,7 @@ private: const BitmapEx& rBmpEx, const GraphicAttr& rAttr, const GraphicManagerDrawFlags nFlags, - BitmapEx* pBmpEx = NULL + BitmapEx* pBmpEx = nullptr ); static bool SVT_DLLPRIVATE ImplCreateOutput( OutputDevice* pOut, @@ -580,8 +580,8 @@ private: void SVT_DLLPRIVATE ImplRegisterObj( const GraphicObject& rObj, Graphic& rSubstitute, - const OString* pID = NULL, - const GraphicObject* pCopyObj = NULL + const OString* pID = nullptr, + const GraphicObject* pCopyObj = nullptr ); void SVT_DLLPRIVATE ImplUnregisterObj( const GraphicObject& rObj ); inline bool SVT_DLLPRIVATE ImplHasObjects() const { return !maObjList.empty(); } diff --git a/include/svtools/headbar.hxx b/include/svtools/headbar.hxx index edbba5d95452..0d5dc458a9d8 100644 --- a/include/svtools/headbar.hxx +++ b/include/svtools/headbar.hxx @@ -273,7 +273,7 @@ private: SVT_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh, bool bDrag, const Rectangle& rItemRect, const Rectangle* pRect, DrawFlags nFlags); SVT_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh = false, - bool bDrag = false, const Rectangle* pRect = NULL); + bool bDrag = false, const Rectangle* pRect = nullptr); SVT_DLLPRIVATE void ImplUpdate( sal_uInt16 nPos, bool bEnd = false, bool bDirect = false ); SVT_DLLPRIVATE void ImplStartDrag( const Point& rPos, bool bCommand ); diff --git a/include/svtools/htmlout.hxx b/include/svtools/htmlout.hxx index 671565ff6826..50d2c8b8cf06 100644 --- a/include/svtools/htmlout.hxx +++ b/include/svtools/htmlout.hxx @@ -55,17 +55,17 @@ struct HTMLOutFuncs { SVT_DLLPUBLIC static OString ConvertStringToHTML( const OUString& sSrc, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252, - OUString *pNonConvertableChars = 0 ); + OUString *pNonConvertableChars = nullptr ); SVT_DLLPUBLIC static SvStream& Out_AsciiTag( SvStream&, const sal_Char* pStr, bool bOn = true, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252); SVT_DLLPUBLIC static SvStream& Out_Char( SvStream&, sal_Unicode cChar, HTMLOutContext& rContext, - OUString *pNonConvertableChars = 0 ); + OUString *pNonConvertableChars = nullptr ); SVT_DLLPUBLIC static SvStream& Out_String( SvStream&, const OUString&, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252, - OUString *pNonConvertableChars = 0 ); + OUString *pNonConvertableChars = nullptr ); SVT_DLLPUBLIC static SvStream& Out_Hex( SvStream&, sal_uLong nHex, sal_uInt8 nLen, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252 ); SVT_DLLPUBLIC static SvStream& Out_Color( SvStream&, const Color&, @@ -73,11 +73,11 @@ struct HTMLOutFuncs SVT_DLLPUBLIC static SvStream& Out_ImageMap( SvStream&, const OUString&, const ImageMap&, const OUString&, const HTMLOutEvent *pEventTable, bool bOutStarBasic, - const sal_Char *pDelim = 0, - const sal_Char *pIndentArea = 0, - const sal_Char *pIndentMap = 0, + const sal_Char *pDelim = nullptr, + const sal_Char *pIndentArea = nullptr, + const sal_Char *pIndentMap = nullptr, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252, - OUString *pNonConvertableChars = 0 ); + OUString *pNonConvertableChars = nullptr ); SVT_DLLPUBLIC static SvStream& FlushToAscii( SvStream&, HTMLOutContext& rContext ); SVT_DLLPUBLIC static SvStream& OutScript( SvStream& rStrm, @@ -86,24 +86,24 @@ struct HTMLOutFuncs const OUString& rLanguage, ScriptType eScriptType, const OUString& rSrc, - const OUString *pSBLibrary = 0, - const OUString *pSBModule = 0, + const OUString *pSBLibrary = nullptr, + const OUString *pSBModule = nullptr, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252, - OUString *pNonConvertableChars = 0 ); + OUString *pNonConvertableChars = nullptr ); // the 3rd parameter is an array of HTMLOutEvents which is terminated // by an entry that consists only of 0s SVT_DLLPUBLIC static SvStream& Out_Events( SvStream&, const SvxMacroTableDtor&, const HTMLOutEvent*, bool bOutStarBasic, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252, - OUString *pNonConvertableChars = 0 ); + OUString *pNonConvertableChars = nullptr ); // <TD SDVAL="..." SDNUM="..."> SVT_DLLPUBLIC static OString CreateTableDataOptionsValNum( bool bValue, double fVal, sal_uLong nFormat, SvNumberFormatter& rFormatter, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252, - OUString *pNonConvertableChars = 0); + OUString *pNonConvertableChars = nullptr); }; struct HtmlWriterHelper diff --git a/include/svtools/imap.hxx b/include/svtools/imap.hxx index 69880e77fd28..177545761e55 100644 --- a/include/svtools/imap.hxx +++ b/include/svtools/imap.hxx @@ -83,7 +83,7 @@ public: // not be destroyed from outside IMapObject* GetIMapObject( size_t nPos ) const { - return ( nPos < maList.size() ) ? maList[ nPos ] : NULL; + return ( nPos < maList.size() ) ? maList[ nPos ] : nullptr; } // returns the object which was hit first or NULL; diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx index 9e4c4bc3ab84..fbd2e599aa3b 100644 --- a/include/svtools/ivctrl.hxx +++ b/include/svtools/ivctrl.hxx @@ -113,8 +113,8 @@ class SvxIconChoiceCtrlEntry { this->pblink->pflink = this->pflink; this->pflink->pblink = this->pblink; - this->pflink = 0; - this->pblink = 0; + this->pflink = nullptr; + this->pblink = nullptr; } public: @@ -265,7 +265,7 @@ public: SvxIconChoiceCtrlEntry* InsertEntry( const OUString& rText, const Image& rImage, sal_uLong nPos = CONTAINER_APPEND, - const Point* pPos = 0, + const Point* pPos = nullptr, SvxIconViewFlags nFlags = SvxIconViewFlags::NONE ); @@ -300,7 +300,7 @@ public: SvxIconChoiceCtrlEntry* GetSelectedEntry() const; #ifdef DBG_UTIL - void SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, SvxIconChoiceCtrlEntry* pEntry = 0 ); + void SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, SvxIconChoiceCtrlEntry* pEntry = nullptr ); #endif bool AutoFontColor () { return _bAutoFontColor; } diff --git a/include/svtools/localresaccess.hxx b/include/svtools/localresaccess.hxx index f9707727dfe5..d0ebc4365f41 100644 --- a/include/svtools/localresaccess.hxx +++ b/include/svtools/localresaccess.hxx @@ -50,7 +50,7 @@ namespace svt :Resource(_rId.SetRT(_rType).SetAutoRelease(false)) ,m_pManager(_rId.GetResMgr()) { - OSL_ENSURE( m_pManager != NULL, "OLocalResourceAccess::OLocalResourceAccess: invalid resource manager!" ); + OSL_ENSURE( m_pManager != nullptr, "OLocalResourceAccess::OLocalResourceAccess: invalid resource manager!" ); } ~OLocalResourceAccess() diff --git a/include/svtools/parhtml.hxx b/include/svtools/parhtml.hxx index f9faa180c436..07ee08b5ad52 100644 --- a/include/svtools/parhtml.hxx +++ b/include/svtools/parhtml.hxx @@ -205,7 +205,7 @@ public: // Determine the options. pNoConvertToken is the optional token // of an option, for which the CR/LFs are not deleted from the value // of the option. - const HTMLOptions& GetOptions( sal_uInt16 *pNoConvertToken=0 ); + const HTMLOptions& GetOptions( sal_uInt16 *pNoConvertToken=nullptr ); // for asynchronous reading from the SvStream virtual void Continue( int nToken ) override; diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index a5d38f05bbb9..5e2ee847c89c 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -762,7 +762,7 @@ public: RulerSelection GetHoverSelection() const { return maHoverSelection; } using Window::GetType; - RulerType GetType( const Point& rPos, sal_uInt16* pAryPos = NULL ); + RulerType GetType( const Point& rPos, sal_uInt16* pAryPos = nullptr ); void SetNullOffset( long nPos ); long GetNullOffset() const; @@ -775,11 +775,11 @@ public: void SetLeftFrameMargin( long nPos ); void SetRightFrameMargin( long nPos ); - void SetLines( sal_uInt32 n = 0, const RulerLine* pLineAry = NULL ); - void SetBorders( sal_uInt32 n = 0, const RulerBorder* pBrdAry = NULL ); - void SetIndents( sal_uInt32 n = 0, const RulerIndent* pIndentAry = NULL ); + void SetLines( sal_uInt32 n = 0, const RulerLine* pLineAry = nullptr ); + void SetBorders( sal_uInt32 n = 0, const RulerBorder* pBrdAry = nullptr ); + void SetIndents( sal_uInt32 n = 0, const RulerIndent* pIndentAry = nullptr ); - void SetTabs( sal_uInt32 n = 0, const RulerTab* pTabAry = NULL ); + void SetTabs( sal_uInt32 n = 0, const RulerTab* pTabAry = nullptr ); static void DrawTab(vcl::RenderContext& rRenderContext, const Color &rFillColor, const Point& rPos, sal_uInt16 nStyle); diff --git a/include/svtools/stringtransfer.hxx b/include/svtools/stringtransfer.hxx index 51b811293d73..401a415624cc 100644 --- a/include/svtools/stringtransfer.hxx +++ b/include/svtools/stringtransfer.hxx @@ -55,12 +55,12 @@ namespace svt <p>Beware: In opposite to the old DragServer::CopyString, this method does not <em>add</em> the string to the clipboard, instead the old clipboard content is <em>replaced</em>!</p> */ - SVT_DLLPUBLIC static void CopyString( const OUString& _rContent, vcl::Window* _pWindow = NULL ); + SVT_DLLPUBLIC static void CopyString( const OUString& _rContent, vcl::Window* _pWindow = nullptr ); /** extracts a string from the system clipboard given @return <TRUE/> if the extraction was successful, i.e. if the clipboard contained a string content */ - SVT_DLLPUBLIC static bool PasteString( OUString& _rContent, vcl::Window* _pWindow = NULL ); + SVT_DLLPUBLIC static bool PasteString( OUString& _rContent, vcl::Window* _pWindow = nullptr ); /** starts dragging a simple string */ diff --git a/include/svtools/svlbitm.hxx b/include/svtools/svlbitm.hxx index 95dded4e417f..c9b56adacd20 100644 --- a/include/svtools/svlbitm.hxx +++ b/include/svtools/svlbitm.hxx @@ -69,7 +69,7 @@ private: SVT_DLLPRIVATE void SetWidthAndHeight(); SVT_DLLPRIVATE void InitData( bool bImagesFromDefault, - bool _bRadioBtn, const Control* pControlForSettings = NULL ); + bool _bRadioBtn, const Control* pControlForSettings = nullptr ); public: // include creating default images (CheckBox or RadioButton) SvLBoxButtonData( const Control* pControlForSettings ); @@ -93,7 +93,7 @@ public: void SetImage(SvBmp nIndex, const Image& aImage) { aBmps[(int)nIndex] = aImage; } Image& GetImage(SvBmp nIndex) { return aBmps[(int)nIndex]; } - void SetDefaultImages( const Control* pControlForSettings = NULL ); + void SetDefaultImages( const Control* pControlForSettings = nullptr ); // set images according to the color scheme of the Control // pControlForSettings == NULL: settings are taken from Application bool HasDefaultImages() const; diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx index e98f4665bf91..1fddbe071da4 100644 --- a/include/svtools/svtabbx.hxx +++ b/include/svtools/svtabbx.hxx @@ -73,26 +73,26 @@ public: void SetTab( sal_uInt16 nTab, long nValue, MapUnit = MAP_APPFONT ); long GetLogicTab( sal_uInt16 nTab ); - virtual SvTreeListEntry* InsertEntry( const OUString& rText, SvTreeListEntry* pParent = 0, + virtual SvTreeListEntry* InsertEntry( const OUString& rText, SvTreeListEntry* pParent = nullptr, bool bChildrenOnDemand = false, - sal_uLong nPos=TREELIST_APPEND, void* pUserData = 0, + sal_uLong nPos=TREELIST_APPEND, void* pUserData = nullptr, SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox ) override; virtual SvTreeListEntry* InsertEntry( const OUString& rText, const Image& rExpandedEntryBmp, const Image& rCollapsedEntryBmp, - SvTreeListEntry* pParent = 0, + SvTreeListEntry* pParent = nullptr, bool bChildrenOnDemand = false, - sal_uLong nPos = TREELIST_APPEND, void* pUserData = 0, + sal_uLong nPos = TREELIST_APPEND, void* pUserData = nullptr, SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox ) override; virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, sal_uLong nPos = TREELIST_APPEND, - sal_uInt16 nCol = 0xffff, void* pUserData = NULL ); + sal_uInt16 nCol = 0xffff, void* pUserData = nullptr ); virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, SvTreeListEntry* pParent, - sal_uLong nPos, sal_uInt16 nCol, void* pUserData = NULL ); + sal_uLong nPos, sal_uInt16 nCol, void* pUserData = nullptr ); virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, const Image& rExpandedEntryBmp, - const Image& rCollapsedEntryBmp, SvTreeListEntry* pParent = NULL, - sal_uLong nPos = TREELIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL ); + const Image& rCollapsedEntryBmp, SvTreeListEntry* pParent = nullptr, + sal_uLong nPos = TREELIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = nullptr ); virtual OUString GetEntryText( SvTreeListEntry* pEntry ) const override; static OUString GetEntryText( SvTreeListEntry*, sal_uInt16 nCol ); @@ -148,12 +148,12 @@ public: static bool IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol ); virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, sal_uLong nPos = TREELIST_APPEND, - sal_uInt16 nCol = 0xffff, void* pUserData = NULL ) override; + sal_uInt16 nCol = 0xffff, void* pUserData = nullptr ) override; virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, SvTreeListEntry* pParent, - sal_uLong nPos, sal_uInt16 nCol, void* pUserData = NULL ) override; + sal_uLong nPos, sal_uInt16 nCol, void* pUserData = nullptr ) override; virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, const Image& rExpandedEntryBmp, - const Image& rCollapsedEntryBmp, SvTreeListEntry* pParent = NULL, - sal_uLong nPos = TREELIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL ) override; + const Image& rCollapsedEntryBmp, SvTreeListEntry* pParent = nullptr, + sal_uLong nPos = TREELIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = nullptr ) override; virtual sal_uLong Insert( SvTreeListEntry* pEnt,SvTreeListEntry* pPar,sal_uLong nPos=TREELIST_APPEND) override; virtual sal_uLong Insert( SvTreeListEntry* pEntry, sal_uLong nRootPos = TREELIST_APPEND ) override; void RemoveEntry( SvTreeListEntry* _pEntry ); diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx index e020aba5c009..255ac20a2fef 100644 --- a/include/svtools/toolbarmenu.hxx +++ b/include/svtools/toolbarmenu.hxx @@ -116,7 +116,7 @@ private: void appendEntry(ToolbarMenuEntry* pEntry); - void implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry* pThisOnly = NULL, bool bHighlight = false); + void implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry* pThisOnly = nullptr, bool bHighlight = false); void implHighlightEntry(vcl::RenderContext& rRenderContext, int nHighlightEntry, bool bHighlight); void implHighlightAtPosition(const MouseEvent& rMEvt, bool bMBDown); diff --git a/include/svtools/treelist.hxx b/include/svtools/treelist.hxx index fdd7879e075d..b7b42e3dc983 100644 --- a/include/svtools/treelist.hxx +++ b/include/svtools/treelist.hxx @@ -82,9 +82,9 @@ class SVT_DLLPUBLIC SvTreeList bool mbEnableInvalidate; SvTreeListEntry* FirstVisible() const { return First(); } - SvTreeListEntry* NextVisible( const SvListView*,SvTreeListEntry* pEntry, sal_uInt16* pDepth=0 ) const; - SvTreeListEntry* PrevVisible( const SvListView*,SvTreeListEntry* pEntry, sal_uInt16* pDepth=0 ) const; - SvTreeListEntry* LastVisible( const SvListView*,sal_uInt16* pDepth=0 ) const; + SvTreeListEntry* NextVisible( const SvListView*,SvTreeListEntry* pEntry, sal_uInt16* pDepth=nullptr ) const; + SvTreeListEntry* PrevVisible( const SvListView*,SvTreeListEntry* pEntry, sal_uInt16* pDepth=nullptr ) const; + SvTreeListEntry* LastVisible( const SvListView*,sal_uInt16* pDepth=nullptr ) const; SvTreeListEntry* NextVisible( const SvListView*,SvTreeListEntry* pEntry, sal_uInt16& rDelta ) const; SvTreeListEntry* PrevVisible( const SvListView*,SvTreeListEntry* pEntry, sal_uInt16& rDelta ) const; @@ -142,12 +142,12 @@ public: void RemoveView( SvListView* ); SvListView* GetView( sal_uLong nPos ) const - { return ( nPos < aViewList.size() ) ? aViewList[ nPos ] : NULL; } + { return ( nPos < aViewList.size() ) ? aViewList[ nPos ] : nullptr; } void Broadcast( SvListAction nActionId, - SvTreeListEntry* pEntry1=0, - SvTreeListEntry* pEntry2=0, + SvTreeListEntry* pEntry1=nullptr, + SvTreeListEntry* pEntry2=nullptr, sal_uLong nPos=0 ); @@ -158,8 +158,8 @@ public: sal_uLong GetEntryCount() const { return nEntryCount; } SvTreeListEntry* First() const; - SvTreeListEntry* Next( SvTreeListEntry* pEntry, sal_uInt16* pDepth=0 ) const; - SvTreeListEntry* Prev( SvTreeListEntry* pEntry, sal_uInt16* pDepth=0 ) const; + SvTreeListEntry* Next( SvTreeListEntry* pEntry, sal_uInt16* pDepth=nullptr ) const; + SvTreeListEntry* Prev( SvTreeListEntry* pEntry, sal_uInt16* pDepth=nullptr ) const; SvTreeListEntry* Last() const; SvTreeListEntry* FirstChild( SvTreeListEntry* pParent ) const; @@ -269,13 +269,13 @@ public: SvTreeListEntry* FirstVisible() const { return pModel->FirstVisible(); } - SvTreeListEntry* NextVisible( SvTreeListEntry* pEntry, sal_uInt16* pDepth=0 ) const + SvTreeListEntry* NextVisible( SvTreeListEntry* pEntry, sal_uInt16* pDepth=nullptr ) const { return pModel->NextVisible(this,pEntry,pDepth); } - SvTreeListEntry* PrevVisible( SvTreeListEntry* pEntry, sal_uInt16* pDepth=0 ) const + SvTreeListEntry* PrevVisible( SvTreeListEntry* pEntry, sal_uInt16* pDepth=nullptr ) const { return pModel->PrevVisible(this,pEntry,pDepth); } - SvTreeListEntry* LastVisible( sal_uInt16* pDepth=0 ) const + SvTreeListEntry* LastVisible( sal_uInt16* pDepth=nullptr ) const { return pModel->LastVisible(this,pDepth); } SvTreeListEntry* NextVisible( SvTreeListEntry* pEntry, sal_uInt16& rDelta ) const diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 667f8ddd3195..ed52d9eeb952 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -171,7 +171,7 @@ public: virtual void InitViewData(SvTreeListBox* pView, SvTreeListEntry* pEntry, // If != 0: this Pointer must be used! // If == 0: it needs to be retrieved via the View - SvViewDataItem* pViewData = 0) = 0; + SvViewDataItem* pViewData = nullptr) = 0; virtual SvLBoxItem* Create() const = 0; // View-dependent data is not cloned virtual void Clone(SvLBoxItem* pSource) = 0; @@ -376,19 +376,19 @@ public: } SvTreeListEntry* First() const { - return pModel ? pModel->First() : NULL; + return pModel ? pModel->First() : nullptr; } - SvTreeListEntry* Next( SvTreeListEntry* pEntry, sal_uInt16* pDepth = 0 ) const + SvTreeListEntry* Next( SvTreeListEntry* pEntry, sal_uInt16* pDepth = nullptr ) const { return pModel->Next(pEntry, pDepth); } - SvTreeListEntry* Prev( SvTreeListEntry* pEntry, sal_uInt16* pDepth = 0 ) const + SvTreeListEntry* Prev( SvTreeListEntry* pEntry, sal_uInt16* pDepth = nullptr ) const { return pModel->Prev(pEntry, pDepth); } SvTreeListEntry* Last() const { - return pModel ? pModel->Last() : NULL; + return pModel ? pModel->Last() : nullptr; } SvTreeListEntry* FirstChild( SvTreeListEntry* pParent ) const; @@ -578,7 +578,7 @@ protected: // Is called automatically when inserting/changing Bitmaps, changing the Model etc. virtual void SetTabs(); void AddTab( long nPos, SvLBoxTabFlags nFlags=SvLBoxTabFlags::ADJUST_LEFT, - void* pUserData = 0 ); + void* pUserData = nullptr ); sal_uInt16 TabCount() const { return aTabs.size(); } SvLBoxTab* GetFirstDynamicTab() const; SvLBoxTab* GetFirstDynamicTab( sal_uInt16& rTabPos ) const; @@ -645,17 +645,17 @@ public: ); } - virtual SvTreeListEntry* InsertEntry( const OUString& rText, SvTreeListEntry* pParent = 0, + virtual SvTreeListEntry* InsertEntry( const OUString& rText, SvTreeListEntry* pParent = nullptr, bool bChildrenOnDemand = false, - sal_uLong nPos=TREELIST_APPEND, void* pUserData = 0, + sal_uLong nPos=TREELIST_APPEND, void* pUserData = nullptr, SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox ); virtual SvTreeListEntry* InsertEntry( const OUString& rText, const Image& rExpandedEntryBmp, const Image& rCollapsedEntryBmp, - SvTreeListEntry* pParent = 0, + SvTreeListEntry* pParent = nullptr, bool bChildrenOnDemand = false, - sal_uLong nPos = TREELIST_APPEND, void* pUserData = 0, + sal_uLong nPos = TREELIST_APPEND, void* pUserData = nullptr, SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox ); const Image& GetDefaultExpandedEntryBmp( ) const; @@ -685,7 +685,7 @@ public: void EnableInplaceEditing( bool bEnable ); // Edits the Entry's first StringItem, 0 == Cursor - void EditEntry( SvTreeListEntry* pEntry = NULL ); + void EditEntry( SvTreeListEntry* pEntry = nullptr ); virtual bool EditingEntry( SvTreeListEntry* pEntry, Selection& ); virtual bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ); diff --git a/include/svtools/xwindowitem.hxx b/include/svtools/xwindowitem.hxx index 90bbe7a96bc1..1326b7814074 100644 --- a/include/svtools/xwindowitem.hxx +++ b/include/svtools/xwindowitem.hxx @@ -43,7 +43,7 @@ public: XWindowItem( const XWindowItem &rItem ); virtual ~XWindowItem(); - virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const override; + virtual SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) const override; virtual bool operator == ( const SfxPoolItem& rAttr ) const override; vcl::Window * GetWindowPtr() const { return VCLUnoHelper::GetWindow( m_xWin ); } diff --git a/svtools/qa/unit/GraphicObjectTest.cxx b/svtools/qa/unit/GraphicObjectTest.cxx index dd4cbf6d2e61..cbefed1f1f66 100644 --- a/svtools/qa/unit/GraphicObjectTest.cxx +++ b/svtools/qa/unit/GraphicObjectTest.cxx @@ -164,8 +164,8 @@ void GraphicObjectTest::testSizeBasedAutoSwap() SwNodes& aNodes = pDoc->GetNodes(); // Find images - const GraphicObject* pGrafObj1 = 0; - const GraphicObject* pGrafObj2 = 0; + const GraphicObject* pGrafObj1 = nullptr; + const GraphicObject* pGrafObj2 = nullptr; for( sal_uLong nIndex = 0; nIndex < aNodes.Count(); ++nIndex) { if( aNodes[nIndex]->IsGrfNode() ) @@ -182,7 +182,7 @@ void GraphicObjectTest::testSizeBasedAutoSwap() } } } - CPPUNIT_ASSERT_MESSAGE("Missing image", pGrafObj1 != 0 && pGrafObj2 != 0); + CPPUNIT_ASSERT_MESSAGE("Missing image", pGrafObj1 != nullptr && pGrafObj2 != nullptr); { // First image should be swapped out @@ -254,8 +254,8 @@ void GraphicObjectTest::testTdf88935() SwNodes& aNodes = pDoc->GetNodes(); // Find images - const GraphicObject* pGraphObj1 = 0; - const GraphicObject* pGraphObj2 = 0; + const GraphicObject* pGraphObj1 = nullptr; + const GraphicObject* pGraphObj2 = nullptr; for( sal_uLong nIndex = 0; nIndex < aNodes.Count(); ++nIndex) { if( aNodes[nIndex]->IsGrfNode() ) @@ -272,7 +272,7 @@ void GraphicObjectTest::testTdf88935() } } } - CPPUNIT_ASSERT_MESSAGE("Missing image", pGraphObj1 != 0 && pGraphObj2 != 0); + CPPUNIT_ASSERT_MESSAGE("Missing image", pGraphObj1 != nullptr && pGraphObj2 != nullptr); // Set cache size { diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 037aa341b356..a69c17d65b6f 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -62,9 +62,9 @@ void BrowseBox::ConstructImpl( BrowserMode nMode ) { OSL_TRACE( "BrowseBox: %p->ConstructImpl", this ); bMultiSelection = false; - pColSel = 0; - pDataWin = 0; - pVScroll = 0; + pColSel = nullptr; + pDataWin = nullptr; + pVScroll = nullptr; pDataWin = VclPtr<BrowserDataWin>::Create( this ).get(); pCols = new BrowserColumns; @@ -1579,7 +1579,7 @@ bool BrowseBox::GoToColumnId( sal_uInt16 nColId, bool bMakeVisible, bool bRowCol if ( nColId != nCurColId || (bMakeVisible && !IsFieldVisible(nCurRow, nColId, true))) { sal_uInt16 nNewPos = GetColumnPos(nColId); - BrowserColumn* pColumn = (nNewPos < pCols->size()) ? (*pCols)[ nNewPos ] : NULL; + BrowserColumn* pColumn = (nNewPos < pCols->size()) ? (*pCols)[ nNewPos ] : nullptr; DBG_ASSERT( pColumn, "no column object - invalid id?" ); if ( !pColumn ) return false; @@ -2252,7 +2252,7 @@ void BrowseBox::SetMode( BrowserMode nMode ) BrowserMode::NO_SCROLLBACK == ( nMode & BrowserMode::NO_SCROLLBACK); long nOldRowSel = bMultiSelection ? uRow.pSel->FirstSelected() : uRow.nSel; - MultiSelection *pOldRowSel = bMultiSelection ? uRow.pSel : 0; + MultiSelection *pOldRowSel = bMultiSelection ? uRow.pSel : nullptr; MultiSelection *pOldColSel = pColSel; pVScroll.disposeAndClear(); @@ -2317,7 +2317,7 @@ void BrowseBox::SetMode( BrowserMode nMode ) else { delete pColSel; - pColSel = 0; + pColSel = nullptr; } if ( bMultiSelection ) diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 47f0101cc862..660cf9036123 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -167,7 +167,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange ) // do we have a handle column? bool bHandleCol = !pCols->empty() && (0 == (*pCols)[ 0 ]->GetId()); // do we have a header bar? - bool bHeaderBar = (NULL != static_cast<BrowserDataWin&>(GetDataWindow()).pHeaderBar.get()); + bool bHeaderBar = (nullptr != static_cast<BrowserDataWin&>(GetDataWindow()).pHeaderBar.get()); if ( nTitleLines && ( !bHeaderBar @@ -280,7 +280,7 @@ void BrowseBox::ToggleSelection( bool bForce ) long nLastRowInRect = 0; // for the CFront // don't highlight handle column - BrowserColumn *pFirstCol = pCols->empty() ? NULL : (*pCols)[ 0 ]; + BrowserColumn *pFirstCol = pCols->empty() ? nullptr : (*pCols)[ 0 ]; long nOfsX = (!pFirstCol || pFirstCol->GetId()) ? 0 : pFirstCol->Width(); // accumulate old row selection @@ -601,7 +601,7 @@ void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect BrowserColumn *pFirstCol = (*pCols)[ 0 ]; bool bHandleCol = pFirstCol && pFirstCol->GetId() == 0; - bool bHeaderBar = getDataWindow()->pHeaderBar.get() != NULL; + bool bHeaderBar = getDataWindow()->pHeaderBar.get() != nullptr; // draw delimitational lines if (!getDataWindow()->bNoHScroll) @@ -754,7 +754,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, long nTitleHeight = PixelToLogic(Size(0, GetTitleHeight()), MAP_10TH_MM).Height(); nTitleHeight = pDev->LogicToPixel(Size(0, nTitleHeight), MAP_10TH_MM).Height(); - BrowserColumn* pFirstCol = !pCols->empty() ? (*pCols)[ 0 ] : NULL; + BrowserColumn* pFirstCol = !pCols->empty() ? (*pCols)[ 0 ] : nullptr; Point aHeaderPos(pFirstCol && (pFirstCol->GetId() == 0) ? pFirstCol->Width() : 0, 0); Size aHeaderSize(aRealSize.Width() - aHeaderPos.X(), nTitleHeight); @@ -908,7 +908,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool if ( nCol < nFirstCol && !pCol->IsFrozen() ) { nCol = nFirstCol; - pCol = (nCol < pCols->size() ) ? (*pCols)[ nCol ] : NULL; + pCol = (nCol < pCols->size() ) ? (*pCols)[ nCol ] : nullptr; if (!pCol) { // FS - 21.05.99 - 66325 // actually this has been fixed elsewhere (in the right place), @@ -1990,7 +1990,7 @@ void BrowseBox::SetCursorColor(const Color& _rCol) Rectangle BrowseBox::calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen) { - vcl::Window* pParent = NULL; + vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); @@ -2014,12 +2014,12 @@ Rectangle BrowseBox::calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen) Rectangle BrowseBox::calcTableRect(bool _bOnScreen) { - vcl::Window* pParent = NULL; + vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); Rectangle aRect( GetWindowExtentsRelative( pParent ) ); - Rectangle aRowBar = calcHeaderRect(false, pParent == NULL); + Rectangle aRowBar = calcHeaderRect(false, pParent == nullptr); long nX = aRowBar.Right() - aRect.Left(); long nY = aRowBar.Top() - aRect.Top(); @@ -2030,7 +2030,7 @@ Rectangle BrowseBox::calcTableRect(bool _bOnScreen) Rectangle BrowseBox::GetFieldRectPixelAbs( sal_Int32 _nRowId, sal_uInt16 _nColId, bool /*_bIsHeader*/, bool _bOnScreen ) { - vcl::Window* pParent = NULL; + vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index fd8ead611073..0c8a015c1712 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -55,7 +55,7 @@ namespace svt _nPos, _rParent, _rBrowseBox, - NULL, + nullptr, _eType ); aFind = _raHeaderCells.insert( BrowseBoxImpl::THeaderCellMap::value_type( _nPos, xAccessible ) ).first; @@ -71,7 +71,7 @@ namespace svt { if ( m_pAccessible && m_pAccessible->isAlive() ) return m_pAccessible->getHeaderBar( _eObjType ); - return NULL; + return nullptr; } @@ -79,7 +79,7 @@ namespace svt { if ( m_pAccessible && m_pAccessible->isAlive() ) return m_pAccessible->getTable( ); - return NULL; + return nullptr; } } @@ -119,7 +119,7 @@ Reference< XAccessible > BrowseBox::CreateAccessibleCell( sal_Int32 _nRow, sal_u return m_pImpl->m_aFactoryAccess.getFactory().createAccessibleBrowseBoxTableCell( m_pImpl->getAccessibleTable(), *this, - NULL, + nullptr, _nRow, _nColumnPos, OFFSET_DEFAULT @@ -162,7 +162,7 @@ sal_Int32 BrowseBox::GetAccessibleControlCount() const Reference< XAccessible > BrowseBox::CreateAccessibleControl( sal_Int32 ) { DBG_ASSERT( false, "BrowseBox::CreateAccessibleControl: to be overwritten!" ); - return NULL; + return nullptr; } @@ -435,7 +435,7 @@ void BrowseBox::commitBrowseBoxEvent( sal_Int16 _nEventId, const Any& _rNewValue bool BrowseBox::isAccessibleAlive( ) const { - return ( NULL != m_pImpl->m_pAccessible ) && m_pImpl->m_pAccessible->isAlive(); + return ( nullptr != m_pImpl->m_pAccessible ) && m_pImpl->m_pAccessible->isAlive(); } // IAccessibleTableProvider diff --git a/svtools/source/brwbox/brwimpl.hxx b/svtools/source/brwbox/brwimpl.hxx index 4738f5bb772b..26809e9311aa 100644 --- a/svtools/source/brwbox/brwimpl.hxx +++ b/svtools/source/brwbox/brwimpl.hxx @@ -58,7 +58,7 @@ namespace svt THeaderCellMap m_aRowHeaderCellMap; public: - BrowseBoxImpl() : m_pAccessible(NULL) + BrowseBoxImpl() : m_pAccessible(nullptr) { } diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 3968c17aee8b..aec67c3b2ef4 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -196,9 +196,9 @@ BrowserDataWin::BrowserDataWin( BrowseBox* pParent ) :Control( pParent, WinBits(WB_CLIPCHILDREN) ) ,DragSourceHelper( this ) ,DropTargetHelper( this ) - ,pHeaderBar( 0 ) + ,pHeaderBar( nullptr ) ,pEventWin( pParent ) - ,pCornerWin( 0 ) + ,pCornerWin( nullptr ) ,bInDtor( false ) ,bInPaint( false ) ,bInCommand( false ) diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index b5ad2ce63224..c9cedc8e1299 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -135,10 +135,10 @@ namespace svt EditBrowseBox::EditBrowseBox(vcl::Window* pParent, const ResId& rId, EditBrowseBoxFlags nBrowserFlags, BrowserMode _nMode ) :BrowseBox( pParent, rId, _nMode ) - ,nStartEvent(0) - ,nEndEvent(0) - ,nCellModifiedEvent(0) - ,m_pFocusWhileRequest(0) + ,nStartEvent(nullptr) + ,nEndEvent(nullptr) + ,nCellModifiedEvent(nullptr) + ,m_pFocusWhileRequest(nullptr) ,nPaintRow(-1) ,nEditRow(-1) ,nOldEditRow(-1) @@ -148,7 +148,7 @@ namespace svt ,bPaintStatus(true) ,bActiveBeforeTracking( false ) ,m_nBrowserFlags(nBrowserFlags) - ,pHeader(NULL) + ,pHeader(nullptr) { impl_construct(); } @@ -156,10 +156,10 @@ namespace svt EditBrowseBox::EditBrowseBox( vcl::Window* pParent, EditBrowseBoxFlags nBrowserFlags, WinBits nBits, BrowserMode _nMode ) :BrowseBox( pParent, nBits, _nMode ) - ,nStartEvent(0) - ,nEndEvent(0) - ,nCellModifiedEvent(0) - ,m_pFocusWhileRequest(0) + ,nStartEvent(nullptr) + ,nEndEvent(nullptr) + ,nCellModifiedEvent(nullptr) + ,m_pFocusWhileRequest(nullptr) ,nPaintRow(-1) ,nEditRow(-1) ,nOldEditRow(-1) @@ -169,7 +169,7 @@ namespace svt ,bPaintStatus(true) ,bActiveBeforeTracking( false ) ,m_nBrowserFlags(nBrowserFlags) - ,pHeader(NULL) + ,pHeader(nullptr) { impl_construct(); } @@ -254,7 +254,7 @@ namespace svt IMPL_LINK_NOARG_TYPED(EditBrowseBox, StartEditHdl, void*, void) { - nStartEvent = 0; + nStartEvent = nullptr; if (IsEditing()) { EnableAndShow(); @@ -490,8 +490,8 @@ namespace svt if ( nCellModifiedEvent ) { Application::RemoveUserEvent( nCellModifiedEvent ); - nCellModifiedEvent = 0; - LINK( this, EditBrowseBox, CellModifiedHdl ).Call( NULL ); + nCellModifiedEvent = nullptr; + LINK( this, EditBrowseBox, CellModifiedHdl ).Call( nullptr ); } if (rEvt.GetColumnId() == HandleColumnId) @@ -712,7 +712,7 @@ namespace svt Dispatch(nId); - if (bLocalSelect && (GetSelectRowCount() || GetSelection() != NULL)) + if (bLocalSelect && (GetSelectRowCount() || GetSelection() != nullptr)) DeactivateCell(); return true; } @@ -845,7 +845,7 @@ namespace svt if (GetSelectColumnCount() || (aMouseEvent.Is() && aMouseEvent->GetRow() < 0)) nInfo |= COLSELECT; - if ((GetSelection() != NULL && GetSelectRowCount()) || + if ((GetSelection() != nullptr && GetSelectRowCount()) || (aMouseEvent.Is() && aMouseEvent->GetColumnId() == HandleColumnId)) nInfo |= ROWSELECT; if (!nInfo && nNewRow != nEditRow) @@ -987,7 +987,7 @@ namespace svt nEditCol = nCol; - if ((GetSelectRowCount() && GetSelection() != NULL) || GetSelectColumnCount() || + if ((GetSelectRowCount() && GetSelection() != nullptr) || GetSelectColumnCount() || (aMouseEvent.Is() && (aMouseEvent.IsDown() || aMouseEvent->GetClicks() > 1))) // nothing happens on MouseDown { return; @@ -1061,7 +1061,7 @@ namespace svt // release the controller (asynchronously) if (nEndEvent) Application::RemoveUserEvent(nEndEvent); - nEndEvent = Application::PostUserEvent(LINK(this,EditBrowseBox,EndEditHdl), NULL, true); + nEndEvent = Application::PostUserEvent(LINK(this,EditBrowseBox,EndEditHdl), nullptr, true); } } @@ -1080,7 +1080,7 @@ namespace svt IMPL_LINK_NOARG_TYPED(EditBrowseBox, EndEditHdl, void*, void) { - nEndEvent = 0; + nEndEvent = nullptr; aOldController = CellControllerRef(); nOldEditRow = -1; @@ -1092,13 +1092,13 @@ namespace svt { if (nCellModifiedEvent) Application::RemoveUserEvent(nCellModifiedEvent); - nCellModifiedEvent = Application::PostUserEvent(LINK(this,EditBrowseBox,CellModifiedHdl), NULL, true); + nCellModifiedEvent = Application::PostUserEvent(LINK(this,EditBrowseBox,CellModifiedHdl), nullptr, true); } IMPL_LINK_NOARG_TYPED(EditBrowseBox, CellModifiedHdl, void*, void) { - nCellModifiedEvent = 0; + nCellModifiedEvent = nullptr; CellModified(); } @@ -1172,7 +1172,7 @@ namespace svt CellController* EditBrowseBox::GetController(long, sal_uInt16) { - return NULL; + return nullptr; } @@ -1272,7 +1272,7 @@ namespace svt Application::RemoveUserEvent(nStartEvent); m_pFocusWhileRequest = Application::GetFocusWindow(); - nStartEvent = Application::PostUserEvent(LINK(this,EditBrowseBox,StartEditHdl), NULL, true); + nStartEvent = Application::PostUserEvent(LINK(this,EditBrowseBox,StartEditHdl), nullptr, true); } diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx index b349391b7668..8c186d1bdccf 100644 --- a/svtools/source/brwbox/editbrowsebox2.cxx +++ b/svtools/source/brwbox/editbrowsebox2.cxx @@ -45,7 +45,7 @@ Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(long _nRow, xReturn = getAccessibleFactory().createAccessibleCheckBoxCell( xAccContext->getAccessibleChild( ::svt::BBINDEX_TABLE ), *this, - NULL, + nullptr, _nRow, _nColumnPos, eState, @@ -120,7 +120,7 @@ void EditBrowseBoxImpl::clearActiveCell() OSL_FAIL( "EditBrowseBoxImpl::clearActiveCell: caught an exception while disposing the AccessibleCell!" ); } - m_xActiveCell = NULL; + m_xActiveCell = nullptr; } void EditBrowseBox::GrabTableFocus() diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx index b05c7a8640df..bead1d82d232 100644 --- a/svtools/source/config/accessibilityoptions.cxx +++ b/svtools/source/config/accessibilityoptions.cxx @@ -97,7 +97,7 @@ public: // initialization of static members -------------------------------------- -SvtAccessibilityOptions_Impl* SvtAccessibilityOptions::sm_pSingleImplConfig =NULL; +SvtAccessibilityOptions_Impl* SvtAccessibilityOptions::sm_pSingleImplConfig =nullptr; sal_Int32 SvtAccessibilityOptions::sm_nAccessibilityRefCount(0); namespace diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index ef3c698df375..f08cd6ffdf3a 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -60,7 +60,7 @@ namespace : public rtl::Static< ::osl::Mutex, ColorMutex_Impl > {}; } -ColorConfig_Impl* ColorConfig::m_pImpl = NULL; +ColorConfig_Impl* ColorConfig::m_pImpl = nullptr; class ColorConfig_Impl : public utl::ConfigItem { @@ -409,7 +409,7 @@ ColorConfig::~ColorConfig() if(!--nColorRefCount_Impl) { delete m_pImpl; - m_pImpl = 0; + m_pImpl = nullptr; } } diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx index a2fa5ec37eb6..9c1e0a66ed72 100644 --- a/svtools/source/config/extcolorcfg.cxx +++ b/svtools/source/config/extcolorcfg.cxx @@ -55,7 +55,7 @@ namespace : public rtl::Static< ::osl::Mutex, ColorMutex_Impl > {}; } -ExtendedColorConfig_Impl* ExtendedColorConfig::m_pImpl = NULL; +ExtendedColorConfig_Impl* ExtendedColorConfig::m_pImpl = nullptr; class ExtendedColorConfig_Impl : public utl::ConfigItem, public SfxBroadcaster { @@ -526,7 +526,7 @@ void ExtendedColorConfig_Impl::UnlockBroadcast() { if ( m_bBroadcastWhenUnlocked ) { - m_bBroadcastWhenUnlocked = ExtendedColorConfig::m_pImpl != NULL; + m_bBroadcastWhenUnlocked = ExtendedColorConfig::m_pImpl != nullptr; if ( m_bBroadcastWhenUnlocked ) { if ( ExtendedColorConfig_Impl::IsEnableBroadcast() ) @@ -572,7 +572,7 @@ ExtendedColorConfig::~ExtendedColorConfig() if(!--nExtendedColorRefCount_Impl) { delete m_pImpl; - m_pImpl = 0; + m_pImpl = nullptr; } } diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx index 75863365c572..347df644fc58 100644 --- a/svtools/source/config/fontsubstconfig.cxx +++ b/svtools/source/config/fontsubstconfig.cxx @@ -155,7 +155,7 @@ const SubstitutionStruct* SvtFontSubstConfig::GetSubstitution(sal_Int32 nPos) DBG_ASSERT(nPos >= 0 && nPos < nCount, "illegal array index"); if(nPos >= 0 && nPos < nCount) return &pImpl->aSubstArr[nPos]; - return NULL; + return nullptr; } void SvtFontSubstConfig::AddSubstitution(const SubstitutionStruct& rToAdd) diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx index ba494a5a2437..dc12c7603bb0 100644 --- a/svtools/source/config/helpopt.cxx +++ b/svtools/source/config/helpopt.cxx @@ -37,7 +37,7 @@ using namespace com::sun::star::uno; using namespace com::sun::star; -static SvtHelpOptions_Impl* pOptions = NULL; +static SvtHelpOptions_Impl* pOptions = nullptr; static sal_Int32 nRefCount = 0; #define EXTENDEDHELP 0 @@ -105,7 +105,7 @@ Sequence< OUString > SvtHelpOptions_Impl::GetPropertyNames() ::osl::Mutex & SvtHelpOptions_Impl::getInitMutex() { - static ::osl::Mutex *pMutex = 0; + static ::osl::Mutex *pMutex = nullptr; if( ! pMutex ) { diff --git a/svtools/source/config/itemholder2.cxx b/svtools/source/config/itemholder2.cxx index ea3b6c866c53..bf6c4d1cd284 100644 --- a/svtools/source/config/itemholder2.cxx +++ b/svtools/source/config/itemholder2.cxx @@ -182,7 +182,7 @@ void ItemHolder2::impl_deleteItem(TItemInfo& rItem) if (rItem.pItem) { delete rItem.pItem; - rItem.pItem = 0; + rItem.pItem = nullptr; } } diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx index 3444cbd4f472..1f27fc73c12d 100644 --- a/svtools/source/config/menuoptions.cxx +++ b/svtools/source/config/menuoptions.cxx @@ -362,7 +362,7 @@ void SvtMenuOptions_Impl::RemoveListenerLink( const Link<LinkParamNone*,void>& r // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtMenuOptions_Impl* SvtMenuOptions::m_pDataContainer = NULL ; +SvtMenuOptions_Impl* SvtMenuOptions::m_pDataContainer = nullptr ; sal_Int32 SvtMenuOptions::m_nRefCount = 0 ; @@ -375,7 +375,7 @@ SvtMenuOptions::SvtMenuOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtMenuOptions_Impl(); @@ -397,7 +397,7 @@ SvtMenuOptions::~SvtMenuOptions() if( m_nRefCount <= 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } @@ -434,15 +434,15 @@ void SvtMenuOptions::SetMenuIconsState(TriState eState) Mutex& SvtMenuOptions::GetOwnStaticMutex() { // Initialize static mutex only for one time! - static Mutex* pMutex = NULL; + static Mutex* pMutex = nullptr; // If these method first called (Mutex not already exist!) ... - if( pMutex == NULL ) + if( pMutex == nullptr ) { // ... we must create a new one. Protect follow code with the global mutex - // It must be - we create a static variable! MutexGuard aGuard( Mutex::getGlobalMutex() ); // We must check our pointer again - because it can be that another instance of our class will be faster than these! - if( pMutex == NULL ) + if( pMutex == nullptr ) { // Create the new mutex and set it for return on static variable. static Mutex aMutex; diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index de1593ad637a..5df1acf4a7a0 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -677,7 +677,7 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames() // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtMiscOptions_Impl* SvtMiscOptions::m_pDataContainer = NULL ; +SvtMiscOptions_Impl* SvtMiscOptions::m_pDataContainer = nullptr ; sal_Int32 SvtMiscOptions::m_nRefCount = 0 ; @@ -693,7 +693,7 @@ SvtMiscOptions::SvtMiscOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already exist! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtMiscOptions_Impl; svtools::ItemHolder2::holdConfigItem(E_MISCOPTIONS); @@ -714,7 +714,7 @@ SvtMiscOptions::~SvtMiscOptions() if( m_nRefCount <= 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/svtools/source/config/optionsdrawinglayer.cxx b/svtools/source/config/optionsdrawinglayer.cxx index b7dbadf42b74..337f2b1f0d41 100644 --- a/svtools/source/config/optionsdrawinglayer.cxx +++ b/svtools/source/config/optionsdrawinglayer.cxx @@ -811,7 +811,7 @@ Sequence< OUString > SvtOptionsDrawinglayer_Impl::impl_GetPropertyNames() // DON'T DO IT IN YOUR HEADER! // see definition for further information -SvtOptionsDrawinglayer_Impl* SvtOptionsDrawinglayer::m_pDataContainer = NULL; +SvtOptionsDrawinglayer_Impl* SvtOptionsDrawinglayer::m_pDataContainer = nullptr; sal_Int32 SvtOptionsDrawinglayer::m_nRefCount = 0; @@ -824,7 +824,7 @@ SvtOptionsDrawinglayer::SvtOptionsDrawinglayer() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtOptionsDrawinglayer_Impl(); } @@ -846,7 +846,7 @@ SvtOptionsDrawinglayer::~SvtOptionsDrawinglayer() if (m_pDataContainer->IsModified()) m_pDataContainer->Commit(); delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx index 1137e21a89cc..cb862f2ba8b2 100644 --- a/svtools/source/config/printoptions.cxx +++ b/svtools/source/config/printoptions.cxx @@ -60,13 +60,13 @@ using namespace ::utl; using namespace ::osl; using namespace ::com::sun::star::uno; -static SvtPrintOptions_Impl* pPrinterOptionsDataContainer = NULL; -static SvtPrintOptions_Impl* pPrintFileOptionsDataContainer = NULL; +static SvtPrintOptions_Impl* pPrinterOptionsDataContainer = nullptr; +static SvtPrintOptions_Impl* pPrintFileOptionsDataContainer = nullptr; -SvtPrintOptions_Impl* SvtPrinterOptions::m_pStaticDataContainer = NULL; +SvtPrintOptions_Impl* SvtPrinterOptions::m_pStaticDataContainer = nullptr; sal_Int32 SvtPrinterOptions::m_nRefCount = 0; -SvtPrintOptions_Impl* SvtPrintFileOptions::m_pStaticDataContainer = NULL; +SvtPrintOptions_Impl* SvtPrintFileOptions::m_pStaticDataContainer = nullptr; sal_Int32 SvtPrintFileOptions::m_nRefCount = 0; class SvtPrintOptions_Impl @@ -499,7 +499,7 @@ void SvtPrintOptions_Impl::impl_setValue (const OUString& sProp, } SvtBasePrintOptions::SvtBasePrintOptions() - : m_pDataContainer(NULL) + : m_pDataContainer(nullptr) { } @@ -510,15 +510,15 @@ SvtBasePrintOptions::~SvtBasePrintOptions() Mutex& SvtBasePrintOptions::GetOwnStaticMutex() { // Initialize static mutex only for one time! - static Mutex* pMutex = NULL; + static Mutex* pMutex = nullptr; // If these method first called (Mutex not already exist!) ... - if( pMutex == NULL ) + if( pMutex == nullptr ) { // ... we must create a new one. Protect follow code with the global mutex - // It must be - we create a static variable! MutexGuard aGuard( Mutex::getGlobalMutex() ); // We must check our pointer again - because it can be that another instance of our class will be faster than these! - if( pMutex == NULL ) + if( pMutex == nullptr ) { // Create the new mutex and set it for return on static variable. static Mutex aMutex; @@ -717,7 +717,7 @@ SvtPrinterOptions::SvtPrinterOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already! - if( m_pStaticDataContainer == NULL ) + if( m_pStaticDataContainer == nullptr ) { OUString aRootPath( ROOTNODE_START ); m_pStaticDataContainer = new SvtPrintOptions_Impl( aRootPath += "/Printer" ); @@ -739,8 +739,8 @@ SvtPrinterOptions::~SvtPrinterOptions() if( m_nRefCount <= 0 ) { delete m_pStaticDataContainer; - m_pStaticDataContainer = NULL; - pPrinterOptionsDataContainer = NULL; + m_pStaticDataContainer = nullptr; + pPrinterOptionsDataContainer = nullptr; } } @@ -751,7 +751,7 @@ SvtPrintFileOptions::SvtPrintFileOptions() // Increase our refcount ... ++m_nRefCount; // ... and initialize our data container only if it not already! - if( m_pStaticDataContainer == NULL ) + if( m_pStaticDataContainer == nullptr ) { OUString aRootPath( ROOTNODE_START ); m_pStaticDataContainer = new SvtPrintOptions_Impl( aRootPath += "/File" ); @@ -774,8 +774,8 @@ SvtPrintFileOptions::~SvtPrintFileOptions() if( m_nRefCount <= 0 ) { delete m_pStaticDataContainer; - m_pStaticDataContainer = NULL; - pPrintFileOptionsDataContainer = NULL; + m_pStaticDataContainer = nullptr; + pPrintFileOptionsDataContainer = nullptr; } } diff --git a/svtools/source/config/slidesorterbaropt.cxx b/svtools/source/config/slidesorterbaropt.cxx index b1d9886d55fe..49607c03e724 100644 --- a/svtools/source/config/slidesorterbaropt.cxx +++ b/svtools/source/config/slidesorterbaropt.cxx @@ -345,7 +345,7 @@ void SvtSlideSorterBarOptions_Impl::SetVisibleViewImpl( bool& bVisibleView, bool // initialize static member, see definition for further information // DON'T DO IT IN YOUR HEADER! -SvtSlideSorterBarOptions_Impl* SvtSlideSorterBarOptions::m_pDataContainer = NULL ; +SvtSlideSorterBarOptions_Impl* SvtSlideSorterBarOptions::m_pDataContainer = nullptr ; sal_Int32 SvtSlideSorterBarOptions::m_nRefCount = 0 ; SvtSlideSorterBarOptions::SvtSlideSorterBarOptions() @@ -354,7 +354,7 @@ SvtSlideSorterBarOptions::SvtSlideSorterBarOptions() MutexGuard aGuard( GetInitMutex() ); ++m_nRefCount; // ... and initialize our data container only if it not already exist! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtSlideSorterBarOptions_Impl; } @@ -371,7 +371,7 @@ SvtSlideSorterBarOptions::~SvtSlideSorterBarOptions() if (m_pDataContainer->IsModified()) m_pDataContainer->Commit(); delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/svtools/source/config/toolpanelopt.cxx b/svtools/source/config/toolpanelopt.cxx index 31d9a7560947..bddf81d75c82 100644 --- a/svtools/source/config/toolpanelopt.cxx +++ b/svtools/source/config/toolpanelopt.cxx @@ -299,7 +299,7 @@ Sequence< OUString > SvtToolPanelOptions_Impl::GetPropertyNames() // initialize static member, see definition for further information // DON'T DO IT IN YOUR HEADER! -SvtToolPanelOptions_Impl* SvtToolPanelOptions::m_pDataContainer = NULL; +SvtToolPanelOptions_Impl* SvtToolPanelOptions::m_pDataContainer = nullptr; sal_Int32 SvtToolPanelOptions::m_nRefCount = 0; SvtToolPanelOptions::SvtToolPanelOptions() @@ -308,7 +308,7 @@ SvtToolPanelOptions::SvtToolPanelOptions() MutexGuard aGuard( GetInitMutex() ); ++m_nRefCount; // ... and initialize our data container only if it not already exist! - if( m_pDataContainer == NULL ) + if( m_pDataContainer == nullptr ) { m_pDataContainer = new SvtToolPanelOptions_Impl; } @@ -323,7 +323,7 @@ SvtToolPanelOptions::~SvtToolPanelOptions() if( m_nRefCount <= 0 ) { delete m_pDataContainer; - m_pDataContainer = NULL; + m_pDataContainer = nullptr; } } diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx index f4eed434078f..d2e6c1699019 100644 --- a/svtools/source/contnr/contentenumeration.cxx +++ b/svtools/source/contnr/contentenumeration.cxx @@ -81,7 +81,7 @@ namespace svt ,m_rContentMutex ( _rContentMutex ) ,m_xCommandEnv ( _rxCommandEnv ) ,m_pTranslator ( _pTranslator ) - ,m_pResultHandler ( NULL ) + ,m_pResultHandler ( nullptr ) ,m_bCancelled ( false ) ,m_rBlackList ( css::uno::Sequence< OUString >() ) { @@ -97,8 +97,8 @@ namespace svt { ::osl::MutexGuard aGuard( m_aMutex ); m_bCancelled = true; - m_pResultHandler = NULL; - m_pTranslator = NULL; + m_pResultHandler = nullptr; + m_pTranslator = nullptr; m_aFolder.aContent = ::ucbhelper::Content(); m_aFolder.sURL.clear(); } @@ -111,7 +111,7 @@ namespace svt { ::osl::MutexGuard aGuard( m_aMutex ); m_aFolder = _rFolder; - m_pResultHandler = NULL; + m_pResultHandler = nullptr; m_rBlackList = rBlackList; } return enumerateFolderContent(); @@ -208,7 +208,7 @@ namespace svt // don't show hidden files if ( !bIsHidden || xRow->wasNull() ) { - pData = NULL; + pData = nullptr; aDT = xRow->getTimestamp( ROW_DATE_MOD ); bool bContainsDate = !xRow->wasNull(); @@ -322,7 +322,7 @@ namespace svt SAL_WARN( "svtools.contnr", "FileViewContentEnumerator::enumerateFolderContent: caught an exception other than CommandAbortedException!" ); } - IEnumerationResultHandler* pHandler = NULL; + IEnumerationResultHandler* pHandler = nullptr; { ::osl::MutexGuard aGuard( m_aMutex ); pHandler = m_pResultHandler; diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 9fadd0bc3537..8ec8c3749829 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -469,7 +469,7 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( vcl::Window* pParentWin, SvHeaderTabListBox( pParentWin, WB_TABSTOP ), - mpHeaderBar ( NULL ), + mpHeaderBar ( nullptr ), mpParent ( pParent ), msAccessibleDescText( SVT_RESSTR(STR_SVT_ACC_DESC_FILEVIEW) ), msFolder ( SVT_RESSTR(STR_SVT_ACC_DESC_FOLDER) ), @@ -526,7 +526,7 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( vcl::Window* pParentWin, Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW ); + InteractionHandler::createWithParent(xContext, nullptr), UNO_QUERY_THROW ); mxCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); @@ -596,14 +596,14 @@ void ViewTabListBox_Impl::KeyInput( const KeyEvent& rKEvt ) { if ( rKeyCode.GetCode() == KEY_RETURN ) { - ResetQuickSearch_Impl( NULL ); + ResetQuickSearch_Impl( nullptr ); GetDoubleClickHdl().Call( this ); bHandled = true; } else if ( ( rKeyCode.GetCode() == KEY_DELETE ) && mbEnableDelete ) { - ResetQuickSearch_Impl( NULL ); + ResetQuickSearch_Impl( nullptr ); DeleteEntries(); bHandled = true; } @@ -617,7 +617,7 @@ void ViewTabListBox_Impl::KeyInput( const KeyEvent& rKEvt ) if ( !bHandled ) { - ResetQuickSearch_Impl( NULL ); + ResetQuickSearch_Impl( nullptr ); SvHeaderTabListBox::KeyInput( rKEvt ); } } @@ -691,7 +691,7 @@ std::unique_ptr<PopupMenu> ViewTabListBox_Impl::CreateContextMenu() pEntry = ( bEnableDelete || bEnableRename ) ? NextSelected( pEntry ) - : 0; + : nullptr; } } @@ -705,7 +705,7 @@ std::unique_ptr<PopupMenu> ViewTabListBox_Impl::CreateContextMenu() return pRet; } - return NULL; + return nullptr; } @@ -977,7 +977,7 @@ SvtFileView::SvtFileView( vcl::Window* pParent, WinBits nBits, Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW ); + InteractionHandler::createWithParent(xContext, nullptr), UNO_QUERY_THROW ); Reference < XCommandEnvironment > xCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); mpImp = new SvtFileView_Impl( this, xCmdEnv, nFlags, bOnlyFolder ); @@ -998,7 +998,7 @@ void SvtFileView::dispose() { // use temp pointer to prevent access of deleted member (GetFocus()) SvtFileView_Impl* pTemp = mpImp; - mpImp = NULL; + mpImp = nullptr; delete pTemp; Control::dispose(); } @@ -1127,7 +1127,7 @@ bool SvtFileView::Initialize( const css::uno::Reference< css::ucb::XContent>& _x mpImp->Clear(); ::ucbhelper::Content aContent(_xContent, mpImp->mxCmdEnv, comphelper::getProcessComponentContext() ); - FileViewResult eResult = mpImp->GetFolderContent_Impl( FolderDescriptor( aContent ), NULL ); + FileViewResult eResult = mpImp->GetFolderContent_Impl( FolderDescriptor( aContent ), nullptr ); OSL_ENSURE( eResult != eStillRunning, "SvtFileView::Initialize: this was expected to be synchronous!" ); if ( eResult != eSuccess ) return false; @@ -1451,7 +1451,7 @@ bool NameTranslator_Impl::GetTranslation( const OUString& rOrg, OUString& rTrans const OUString* NameTranslator_Impl::GetTransTableFileName() const { - return mpActFolder? &mpActFolder->GetTransTableFileName() : NULL; + return mpActFolder? &mpActFolder->GetTransTableFileName() : nullptr; } @@ -1464,7 +1464,7 @@ SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommand ,m_eAsyncActionResult ( ::svt::ERROR ) ,m_bRunningAsyncAction ( false ) ,m_bAsyncActionCancelled ( false ) - ,mpNameTrans ( NULL ) + ,mpNameTrans ( nullptr ) ,mnSortColumn ( COLUMN_TITLE ) ,mbAscending ( true ) ,mbOnlyFolder ( bOnlyFolder ) @@ -1534,7 +1534,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl( OSL_ENSURE( !m_xContentEnumerator.is(), "SvtFileView_Impl::GetFolderContent_Impl: still running another enumeration!" ); m_xContentEnumerator.set(new ::svt::FileViewContentEnumerator( - mpView->GetCommandEnvironment(), maContent, maMutex, mbReplaceNames ? mpNameTrans : NULL)); + mpView->GetCommandEnvironment(), maContent, maMutex, mbReplaceNames ? mpNameTrans : nullptr)); // TODO: should we cache and re-use this thread? if ( !pAsyncDescriptor ) @@ -1929,7 +1929,7 @@ void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, bool bAscending ) return; // reset the quick search index - mpView->ResetQuickSearch_Impl( NULL ); + mpView->ResetQuickSearch_Impl( nullptr ); OUString aEntryURL; SvTreeListEntry* pEntry = mpView->GetCurEntry(); @@ -1961,7 +1961,7 @@ void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, bool bAscending ) static bool gbAscending = true; static sal_Int16 gnColumn = COLUMN_TITLE; -static const CollatorWrapper* pCollatorWrapper = NULL; +static const CollatorWrapper* pCollatorWrapper = nullptr; /* this function returns true, if aOne is less then aTwo */ @@ -2056,7 +2056,7 @@ void SvtFileView_Impl::SortFolderContent_Impl() std::stable_sort( maContent.begin(), maContent.end(), CompareSortingData_Impl ); - pCollatorWrapper = NULL; + pCollatorWrapper = nullptr; } } diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx index 3c7e3cb7474c..d5732e20dc3d 100644 --- a/svtools/source/contnr/foldertree.cxx +++ b/svtools/source/contnr/foldertree.cxx @@ -18,7 +18,7 @@ FolderTree::FolderTree( vcl::Window* pParent, WinBits nBits ) { Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent( xContext, 0 ), UNO_QUERY_THROW ); + InteractionHandler::createWithParent( xContext, nullptr ), UNO_QUERY_THROW ); m_xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); SetDefaultCollapsedEntryBmp( m_aFolderImage ); @@ -54,7 +54,7 @@ void FolderTree::FillTreeEntry( SvTreeListEntry* pEntry ) ::rtl::Reference< ::svt::FileViewContentEnumerator > xContentEnumerator(new FileViewContentEnumerator( - m_xEnv, aContent, m_aMutex, NULL)); + m_xEnv, aContent, m_aMutex, nullptr)); FolderDescriptor aFolder( *pURL ); diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index 1b3053911d14..0dfbd0a72b28 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -133,13 +133,13 @@ public: { return ( nPos < maIconChoiceCtrlEntryList.size() ) ? maIconChoiceCtrlEntryList[ nPos ] - : NULL; + : nullptr; } SvxIconChoiceCtrlEntry* operator[]( size_t nPos ) const { return ( nPos < maIconChoiceCtrlEntryList.size() ) ? maIconChoiceCtrlEntryList[ nPos ] - : NULL; + : nullptr; } void insert( size_t nPos, SvxIconChoiceCtrlEntry* pEntry ); }; @@ -260,7 +260,7 @@ class SvxIconChoiceCtrl_Impl SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2, bool bAdd = true, - std::vector<Rectangle*>* pOtherRects = 0 + std::vector<Rectangle*>* pOtherRects = nullptr ); void SelectRange( @@ -280,7 +280,7 @@ class SvxIconChoiceCtrl_Impl Rectangle CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const; void ClipAtVirtOutRect( Rectangle& rRect ) const; - void AdjustAtGrid( const SvxIconChoiceCtrlEntryPtrVec& rRow, SvxIconChoiceCtrlEntry* pStart=0 ); + void AdjustAtGrid( const SvxIconChoiceCtrlEntryPtrVec& rRow, SvxIconChoiceCtrlEntry* pStart=nullptr ); Point AdjustAtGrid( const Rectangle& rCenterRect, // balance point of object (typically Bmp-Rect) const Rectangle& rBoundRect @@ -334,8 +334,8 @@ public: void Clear( bool bInCtor = false ); void SetStyle( WinBits nWinStyle ); WinBits GetStyle() const { return nWinBits; } - void InsertEntry( SvxIconChoiceCtrlEntry*, size_t nPos, const Point* pPos=0 ); - void CreateAutoMnemonics( MnemonicGenerator* _pGenerator = NULL ); + void InsertEntry( SvxIconChoiceCtrlEntry*, size_t nPos, const Point* pPos=nullptr ); + void CreateAutoMnemonics( MnemonicGenerator* _pGenerator = nullptr ); void FontModified(); void SelectAll( bool bSelect = true, bool bPaint = true ); void SelectEntry( @@ -396,12 +396,12 @@ public: ); Rectangle CalcFocusRect( SvxIconChoiceCtrlEntry* ); - Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = 0 ); + Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr ); Rectangle CalcTextRect( SvxIconChoiceCtrlEntry*, - const Point* pPos = 0, + const Point* pPos = nullptr, bool bForInplaceEdit = false, - const OUString* pStr = 0 + const OUString* pStr = nullptr ); long CalcBoundingWidth( SvxIconChoiceCtrlEntry* ) const; @@ -428,8 +428,8 @@ public: bool bIsBackgroundPainted = false); void PaintItem(const Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, - sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext, const OUString* pStr = 0, - vcl::ControlLayoutData* _pLayoutData = NULL); + sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext, const OUString* pStr = nullptr, + vcl::ControlLayoutData* _pLayoutData = nullptr); // recalculates all BoundingRects if bMustRecalcBoundingRects == true void CheckBoundingRects() { if (bBoundRectsDirty) RecalcAllBoundingRectsSmart(); } @@ -452,7 +452,7 @@ public: void SelectRect( const Rectangle&, bool bAdd = true, - std::vector<Rectangle*>* pOtherRects = 0 + std::vector<Rectangle*>* pOtherRects = nullptr ); bool IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ); @@ -462,15 +462,15 @@ public: bool bCallRectChangedHdl = true ); - void AdjustEntryAtGrid( SvxIconChoiceCtrlEntry* pStart = 0 ); + void AdjustEntryAtGrid( SvxIconChoiceCtrlEntry* pStart = nullptr ); #ifdef DBG_UTIL void SetEntryTextMode( SvxIconChoiceCtrlTextMode, - SvxIconChoiceCtrlEntry* pEntry = 0 + SvxIconChoiceCtrlEntry* pEntry = nullptr ); #endif bool IsEntryEditingEnabled() const { return bEntryEditingEnabled; } - bool IsEntryEditing() const { return (pCurEditedEntry!=0); } + bool IsEntryEditing() const { return (pCurEditedEntry!=nullptr); } void EditEntry( SvxIconChoiceCtrlEntry* pEntry ); void StopEntryEditing( bool bCancel ); size_t GetEntryCount() const { return aEntries.size(); } @@ -514,7 +514,7 @@ public: ); void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const Rectangle& rBmpRect, bool bHide); - void CallEventListeners( sal_uLong nEvent, void* pData = NULL ); + void CallEventListeners( sal_uLong nEvent, void* pData = nullptr ); ::svt::IAccessibleFactory& GetAccessibleFactory() { @@ -573,7 +573,7 @@ public: // Creates a list of entries for every row (height = nGridDY) sorted by // BoundRect.Left(). A list may be empty. The lists become the property of // the caller and have to be deleted with DestroyGridAdjustData. - void CreateGridAjustData( IconChoiceMap& pLists, SvxIconChoiceCtrlEntry* pRow=0); + void CreateGridAjustData( IconChoiceMap& pLists, SvxIconChoiceCtrlEntry* pRow=nullptr); static void DestroyGridAdjustData( IconChoiceMap& rLists ); }; @@ -602,7 +602,7 @@ public: void Clear(); - GridId GetGrid( const Point& rDocPos, bool* pbClipped = 0 ); + GridId GetGrid( const Point& rDocPos, bool* pbClipped = nullptr ); GridId GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY ); GridId GetUnoccupiedGrid( bool bOccupyFound=true ); diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 9e17d95afa55..f7ea4cf05502 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -95,18 +95,18 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( aHorSBar( VclPtr<ScrollBar>::Create(pCurView, WB_DRAG | WB_HSCROLL) ), aScrBarBox( VclPtr<ScrollBarBox>::Create(pCurView) ), aImageSize( 32, 32 ), - pColumns( 0 ) + pColumns( nullptr ) { bChooseWithCursor = false; - pEntryPaintDev = 0; - pCurEditedEntry = 0; - pCurHighlightFrame = 0; - pEdit = 0; - pAnchor = 0; - pPrevDropTarget = 0; - pHdlEntry = 0; - pHead = NULL; - pCursor = NULL; + pEntryPaintDev = nullptr; + pCurEditedEntry = nullptr; + pCurHighlightFrame = nullptr; + pEdit = nullptr; + pAnchor = nullptr; + pPrevDropTarget = nullptr; + pHdlEntry = nullptr; + pHead = nullptr; + pCursor = nullptr; bUpdateMode = true; bEntryEditingEnabled = false; bHighlightFramePressed = false; @@ -116,14 +116,14 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( ePositionMode = IcnViewPositionModeFree; SetStyle( nWinStyle ); nFlags = 0; - nUserEventAdjustScrBars = 0; - nUserEventShowCursor = 0; + nUserEventAdjustScrBars = nullptr; + nUserEventShowCursor = nullptr; nMaxVirtWidth = DEFAULT_MAX_VIRT_WIDTH; nMaxVirtHeight = DEFAULT_MAX_VIRT_HEIGHT; - pDDRefEntry = 0; - pDDDev = 0; - pDDBufDev = 0; - pDDTempDev = 0; + pDDRefEntry = nullptr; + pDDDev = nullptr; + pDDBufDev = nullptr; + pDDTempDev = nullptr; eTextMode = IcnShowTextShort; pImpCursor = new IcnCursor_Impl( this ); pGridMap = new IcnGridMap_Impl( this ); @@ -153,7 +153,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl() { - pCurEditedEntry = 0; + pCurEditedEntry = nullptr; pEdit.disposeAndClear(); Clear(); StopEditTimer(); @@ -176,7 +176,7 @@ void SvxIconChoiceCtrl_Impl::Clear( bool bInCtor ) { StopEntryEditing( true ); nSelectionCount = 0; - pCurHighlightFrame = 0; + pCurHighlightFrame = nullptr; StopEditTimer(); CancelUserEvents(); ShowCursor( false ); @@ -184,7 +184,7 @@ void SvxIconChoiceCtrl_Impl::Clear( bool bInCtor ) nMaxBoundHeight = 0; nFlags &= ~(F_PAINTED | F_MOVED_ENTRIES); - pCursor = 0; + pCursor = nullptr; if( !bInCtor ) { pImpCursor->Clear(); @@ -386,7 +386,7 @@ void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, bool b pEntry->AssignFlags( nEntryFlags ); nSelectionCount--; if( bCallHdl ) - CallSelectHandler( 0 ); + CallSelectHandler( nullptr ); } EntrySelected( pEntry, bSelect, bSyncPaint ); } @@ -521,7 +521,7 @@ void SvxIconChoiceCtrl_Impl::InitPredecessors() pHead = aEntries[ 0 ]; } else - pHead = 0; + pHead = nullptr; nFlags &= ~F_MOVED_ENTRIES; } @@ -533,11 +533,11 @@ void SvxIconChoiceCtrl_Impl::ClearPredecessors() for( size_t nCur = 0; nCur < nCount; nCur++ ) { SvxIconChoiceCtrlEntry* pCur = aEntries[ nCur ]; - pCur->pflink = 0; - pCur->pblink = 0; + pCur->pflink = nullptr; + pCur->pblink = nullptr; pCur->ClearFlags( SvxIconViewFlags::PRED_SET ); } - pHead = 0; + pHead = nullptr; } } @@ -765,7 +765,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) else if( rMEvt.IsMod1() ) { AddSelectedRect( aCurSelectionRect ); - pAnchor = 0; + pAnchor = nullptr; aCurSelectionRect.SetPos( aDocPos ); } @@ -832,7 +832,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt) { if( rMEvt.IsLeft() && (nWinBits & WB_HIGHLIGHTFRAME) ) { - pCurHighlightFrame = 0; // force repaint of frame + pCurHighlightFrame = nullptr; // force repaint of frame bHighlightFramePressed = true; SetEntryHighlightFrame( pEntry, true ); } @@ -907,7 +907,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt ) { bHandled = true; SvxIconChoiceCtrlEntry* pEntry = pCurHighlightFrame; - pCurHighlightFrame = 0; // force repaint of frame + pCurHighlightFrame = nullptr; // force repaint of frame bHighlightFramePressed = false; SetEntryHighlightFrame( pEntry, true ); @@ -918,7 +918,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt ) SvxIconChoiceCtrlEntry* pOldCursor = pCursor; SetCursor_Impl( pOldCursor, pHdlEntry, false, false, true ); - pHdlEntry = 0; + pHdlEntry = nullptr; } return bHandled; } @@ -944,7 +944,7 @@ void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor, { if( pNewCursor ) { - SvxIconChoiceCtrlEntry* pFilterEntry = 0; + SvxIconChoiceCtrlEntry* pFilterEntry = nullptr; bool bDeselectAll = false; if( eSelectionMode != SINGLE_SELECTION ) { @@ -966,7 +966,7 @@ void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor, if( pAnchor ) { AddSelectedRect( pAnchor, pOldCursor ); - pAnchor = 0; + pAnchor = nullptr; } } else if( bShift ) @@ -1048,12 +1048,12 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) } } - if ( bChooseWithCursor && pNewCursor != NULL ) + if ( bChooseWithCursor && pNewCursor != nullptr ) { pHdlEntry = pNewCursor;//GetCurEntry(); pCurHighlightFrame = pHdlEntry; pView->ClickIcon(); - pCurHighlightFrame = NULL; + pCurHighlightFrame = nullptr; } } break; @@ -1068,12 +1068,12 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) pNewCursor=pImpCursor->GoPageUpDown( pCursor,true ); SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, true ); - if ( bChooseWithCursor && pNewCursor != NULL) + if ( bChooseWithCursor && pNewCursor != nullptr) { pHdlEntry = pNewCursor;//GetCurEntry(); pCurHighlightFrame = pHdlEntry; pView->ClickIcon(); - pCurHighlightFrame = NULL; + pCurHighlightFrame = nullptr; } } break; @@ -1107,7 +1107,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) case KEY_F2: if( !bMod1 && !bShift ) - EditTimeoutHdl( 0 ); + EditTimeoutHdl( nullptr ); else bKeyUsed = false; break; @@ -1137,7 +1137,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt ) SetEntryHighlightFrame( GetCurEntry(), true ); pView->ClickIcon(); pHdlEntry = pCurHighlightFrame; - pCurHighlightFrame=0; + pCurHighlightFrame=nullptr; } else ToggleSelection( pCursor ); @@ -1776,7 +1776,7 @@ void SvxIconChoiceCtrl_Impl::SetNoSelection() if( !(nFlags & F_CLEARING_SELECTION )) { nFlags |= F_CLEARING_SELECTION; - DeselectAllBut( 0, true ); + DeselectAllBut( nullptr, true ); nFlags &= ~F_CLEARING_SELECTION; } } @@ -1809,7 +1809,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, return pEntry; } } - return 0; + return nullptr; } void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, bool bBound ) @@ -2106,7 +2106,7 @@ void SvxIconChoiceCtrl_Impl::HideDDIcon() pView->Update(); ImpHideDDIcon(); pDDBufDev = pDDDev; - pDDDev = 0; + pDDDev = nullptr; } void SvxIconChoiceCtrl_Impl::ImpHideDDIcon() @@ -2371,7 +2371,7 @@ void SvxIconChoiceCtrl_Impl::DeselectAllBut( SvxIconChoiceCtrlEntry* pThisEntryN if( pEntry != pThisEntryNot && pEntry->IsSelected() ) SelectEntry( pEntry, false, true, true, bPaintSync ); } - pAnchor = 0; + pAnchor = nullptr; nFlags &= (~F_ADD_MODE); } @@ -2963,12 +2963,12 @@ IMPL_LINK_TYPED(SvxIconChoiceCtrl_Impl, UserEventHdl, void*, nId, void ) { if( nId == EVENTID_ADJUST_SCROLLBARS ) { - nUserEventAdjustScrBars = 0; + nUserEventAdjustScrBars = nullptr; AdjustScrollBars(); } else if( nId == EVENTID_SHOW_CURSOR ) { - nUserEventShowCursor = 0; + nUserEventShowCursor = nullptr; ShowCursor( true ); } } @@ -2978,12 +2978,12 @@ void SvxIconChoiceCtrl_Impl::CancelUserEvents() if( nUserEventAdjustScrBars ) { Application::RemoveUserEvent( nUserEventAdjustScrBars ); - nUserEventAdjustScrBars = 0; + nUserEventAdjustScrBars = nullptr; } if( nUserEventShowCursor ) { Application::RemoveUserEvent( nUserEventShowCursor ); - nUserEventShowCursor = 0; + nUserEventShowCursor = nullptr; } } @@ -3010,7 +3010,7 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry ) pCurEditedEntry = pEntry; OUString aEntryText( SvtIconChoiceCtrl::GetEntryText( pEntry, true ) ); - Rectangle aRect( CalcTextRect( pEntry, 0, true, &aEntryText ) ); + Rectangle aRect( CalcTextRect( pEntry, nullptr, true, &aEntryText ) ); MakeVisible( aRect ); Point aPos( aRect.TopLeft() ); aPos = pView->GetPixelPos( aPos ); @@ -3030,7 +3030,7 @@ IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, TextEditEndedHdl, LinkParamNone*, DBG_ASSERT(pEdit,"TextEditEnded: pEdit not set"); if( !pEdit ) { - pCurEditedEntry = 0; + pCurEditedEntry = nullptr; return; } DBG_ASSERT(pCurEditedEntry,"TextEditEnded: pCurEditedEntry not set"); @@ -3058,7 +3058,7 @@ IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, TextEditEndedHdl, LinkParamNone*, pView->GrabFocus(); // The edit can not be deleted here, because it is not within a handler. It // will be deleted in the dtor or in the next EditEntry. - pCurEditedEntry = 0; + pCurEditedEntry = nullptr; } void SvxIconChoiceCtrl_Impl::StopEntryEditing( bool bCancel ) @@ -3070,7 +3070,7 @@ void SvxIconChoiceCtrl_Impl::StopEntryEditing( bool bCancel ) SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry() const { if( !GetSelectionCount() ) - return 0; + return nullptr; if( (nWinBits & WB_HIGHLIGHTFRAME) && (eSelectionMode == NO_SELECTION) ) { @@ -3102,11 +3102,11 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry() const if( nCount && pEntry == pHead ) { OSL_FAIL("SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry > infinite loop!"); - return 0; + return nullptr; } } } - return 0; + return nullptr; } void SvxIconChoiceCtrl_Impl::SelectAll( bool bSelect, bool bPaint ) @@ -3120,7 +3120,7 @@ void SvxIconChoiceCtrl_Impl::SelectAll( bool bSelect, bool bPaint ) SelectEntry( pEntry, bSelect, true, true, bPaint ); } nFlags &= (~F_ADD_MODE); - pAnchor = 0; + pAnchor = nullptr; } IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPos, @@ -3295,17 +3295,17 @@ void SvxIconChoiceCtrl_Impl::InitSettings() EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner ) : _pOwner( pOwner ) { - _pOwner->pHead = 0; + _pOwner->pHead = nullptr; } EntryList_Impl::~EntryList_Impl() { - _pOwner->pHead = 0; + _pOwner->pHead = nullptr; } void EntryList_Impl::clear() { - _pOwner->pHead = 0; + _pOwner->pHead = nullptr; maIconChoiceCtrlEntryList.clear(); } @@ -3416,7 +3416,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconCho sal_uLong nGrid = GetPredecessorGrid( aNewPos ); size_t nCount = aEntries.size(); if( nGrid == ULONG_MAX ) - return 0; + return nullptr; if( nGrid >= nCount ) nGrid = nCount - 1; if( !pHead ) @@ -3469,7 +3469,7 @@ bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) OUString sQuickHelpText = pEntry->GetQuickHelpText(); OUString aEntryText( SvtIconChoiceCtrl::GetEntryText( pEntry, false ) ); - Rectangle aTextRect( CalcTextRect( pEntry, 0, false, &aEntryText ) ); + Rectangle aTextRect( CalcTextRect( pEntry, nullptr, false, &aEntryText ) ); if ( ( !aTextRect.IsInside( aPos ) || aEntryText.isEmpty() ) && sQuickHelpText.isEmpty() ) return false; @@ -3528,10 +3528,10 @@ void SvxIconChoiceCtrl_Impl::SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCt const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( sal_uInt16 nIndex ) const { if (!pColumns) - return 0; + return nullptr; SvxIconChoiceCtrlColumnInfoMap::const_iterator it = pColumns->find( nIndex ); if( it == pColumns->end() ) - return 0; + return nullptr; return it->second; } @@ -3598,7 +3598,7 @@ void SvxIconChoiceCtrl_Impl::CallSelectHandler( SvxIconChoiceCtrlEntry* ) // WB_NOASYNCSELECTHDL. if( nWinBits & (WB_NOASYNCSELECTHDL | WB_HIGHLIGHTFRAME) ) { - pHdlEntry = 0; + pHdlEntry = nullptr; pView->ClickIcon(); //pView->Select(); } @@ -3608,7 +3608,7 @@ void SvxIconChoiceCtrl_Impl::CallSelectHandler( SvxIconChoiceCtrlEntry* ) IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, CallSelectHdlHdl, Idle *, void) { - pHdlEntry = 0; + pHdlEntry = nullptr; pView->ClickIcon(); //pView->Select(); } diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx index dc0778999ff5..66a1986ae7ef 100644 --- a/svtools/source/contnr/imivctl2.cxx +++ b/svtools/source/contnr/imivctl2.cxx @@ -22,7 +22,7 @@ IcnCursor_Impl::IcnCursor_Impl( SvxIconChoiceCtrl_Impl* pOwner ) { pView = pOwner; - pCurEntry = 0; + pCurEntry = nullptr; nDeltaWidth = 0; nDeltaHeight= 0; nCols = 0; @@ -62,7 +62,7 @@ sal_uInt16 IcnCursor_Impl::GetSortListPos( SvxIconChoiceCtrlEntryPtrVec& rList, void IcnCursor_Impl::ImplCreate() { pView->CheckBoundingRects(); - DBG_ASSERT(xColumns==0&&xRows==0,"ImplCreate: Not cleared"); + DBG_ASSERT(xColumns==nullptr&&xRows==nullptr,"ImplCreate: Not cleared"); SetDeltas(); @@ -106,7 +106,7 @@ void IcnCursor_Impl::Clear() { xColumns.reset(); xRows.reset(); - pCurEntry = 0; + pCurEntry = nullptr; nDeltaWidth = 0; nDeltaHeight = 0; } @@ -118,11 +118,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT DBG_ASSERT(pCurEntry, "SearchCol: No reference entry"); IconChoiceMap::iterator mapIt = xColumns->find( nCol ); if ( mapIt == xColumns->end() ) - return 0; + return nullptr; SvxIconChoiceCtrlEntryPtrVec const & rList = mapIt->second; const sal_uInt16 nCount = rList.size(); if( !nCount ) - return 0; + return nullptr; const Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); @@ -132,7 +132,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT assert(it != rList.end()); //Entry not in Col-List if (it == rList.end()) - return 0; + return nullptr; if( bDown ) { @@ -143,7 +143,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT if( rRect.Top() > rRefRect.Top() ) return pEntry; } - return 0; + return nullptr; } else { @@ -156,7 +156,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT return pEntry; ++it2; } - return 0; + return nullptr; } } @@ -167,7 +167,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT nBottom = nTemp; } long nMinDistance = LONG_MAX; - SvxIconChoiceCtrlEntry* pResult = 0; + SvxIconChoiceCtrlEntry* pResult = nullptr; for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ ) { SvxIconChoiceCtrlEntry* pEntry = rList[ nCur ]; @@ -197,11 +197,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL DBG_ASSERT(pCurEntry,"SearchRow: No reference entry"); IconChoiceMap::iterator mapIt = xRows->find( nRow ); if ( mapIt == xRows->end() ) - return 0; + return nullptr; SvxIconChoiceCtrlEntryPtrVec const & rList = mapIt->second; const sal_uInt16 nCount = rList.size(); if( !nCount ) - return 0; + return nullptr; const Rectangle& rRefRect = pView->GetEntryBoundRect(pCurEntry); @@ -211,7 +211,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL assert(it != rList.end()); //Entry not in Row-List if (it == rList.end()) - return 0; + return nullptr; if( bRight ) { @@ -222,7 +222,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL if( rRect.Left() > rRefRect.Left() ) return pEntry; } - return 0; + return nullptr; } else { @@ -235,7 +235,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL return pEntry; ++it2; } - return 0; + return nullptr; } } @@ -246,7 +246,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL nLeft = nTemp; } long nMinDistance = LONG_MAX; - SvxIconChoiceCtrlEntry* pResult = 0; + SvxIconChoiceCtrlEntry* pResult = nullptr; for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ ) { SvxIconChoiceCtrlEntry* pEntry = rList[ nCur ]; @@ -334,7 +334,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCt nRowMax++; nCurCol += nColOffs; } while( nCurCol != nLastCol ); - return 0; + return nullptr; } SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pStart, bool bDown) @@ -360,7 +360,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS } if( nPos != nNewPos ) return pView->aEntries[ (size_t)nNewPos ]; - return 0; + return nullptr; } long nOpt = pView->GetEntryBoundRect( pStart ).Top(); if( bDown ) @@ -394,7 +394,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS } if( pPrev != pStart ) return pPrev; - return 0; + return nullptr; } SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlEntry, bool bDown) @@ -406,7 +406,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlE return pView->aEntries[ nPos + 1 ]; else if( !bDown && nPos > 0 ) return pView->aEntries[ nPos - 1 ]; - return 0; + return nullptr; } SvxIconChoiceCtrlEntry* pResult; @@ -453,7 +453,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlE nColMax++; nCurRow += nRowOffs; } while( nCurRow != nLastRow ); - return 0; + return nullptr; } void IcnCursor_Impl::SetDeltas() @@ -534,14 +534,14 @@ void IcnCursor_Impl::DestroyGridAdjustData( IconChoiceMap& rLists ) IcnGridMap_Impl::IcnGridMap_Impl(SvxIconChoiceCtrl_Impl* pView) { _pView = pView; - _pGridMap = 0; + _pGridMap = nullptr; _nGridCols = 0; _nGridRows = 0; } IcnGridMap_Impl::~IcnGridMap_Impl() { - delete[] _pGridMap, _pGridMap=0; + delete[] _pGridMap, _pGridMap=nullptr; } void IcnGridMap_Impl::Expand() @@ -722,7 +722,7 @@ void IcnGridMap_Impl::Clear() { if( _pGridMap ) { - delete[] _pGridMap, _pGridMap=0; + delete[] _pGridMap, _pGridMap=nullptr; _nGridRows = 0; _nGridCols = 0; _aLastOccupiedGrid.SetEmpty(); diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index e512931e5f39..b69ce115308e 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -38,10 +38,10 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const OUString& rText, SvxIconViewFlags _nFlags ) : aImage(rImage) , aText(rText) - , pUserData(NULL) + , pUserData(nullptr) , nPos(0) - , pblink(0) - , pflink(0) + , pblink(nullptr) + , pflink(nullptr) , eTextMode(IcnShowTextShort) , nX(0) , nY(0) @@ -75,7 +75,7 @@ SvtIconChoiceCtrl::SvtIconChoiceCtrl( vcl::Window* pParent, WinBits nWinStyle ) // WB_CLIPCHILDREN on, as ScrollBars lie on the window! Control( pParent, nWinStyle | WB_CLIPCHILDREN ), - _pCurKeyEvent ( NULL ), + _pCurKeyEvent ( nullptr ), _pImp ( new SvxIconChoiceCtrl_Impl( this, nWinStyle ) ), _bAutoFontColor ( false ) @@ -97,7 +97,7 @@ void SvtIconChoiceCtrl::dispose() { _pImp->CallEventListeners( VCLEVENT_OBJECT_DYING ); delete _pImp; - _pImp = NULL; + _pImp = nullptr; } Control::dispose(); } @@ -263,7 +263,7 @@ sal_Int32 SvtIconChoiceCtrl::GetEntryCount() const SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( sal_Int32 nPos ) const { - return _pImp ? _pImp->GetEntry( nPos ) : NULL; + return _pImp ? _pImp->GetEntry( nPos ) : nullptr; } void SvtIconChoiceCtrl::CreateAutoMnemonics( MnemonicGenerator& _rUsedMnemonics ) @@ -273,7 +273,7 @@ void SvtIconChoiceCtrl::CreateAutoMnemonics( MnemonicGenerator& _rUsedMnemonics SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetSelectedEntry() const { - return _pImp ? _pImp->GetFirstSelectedEntry() : NULL; + return _pImp ? _pImp->GetFirstSelectedEntry() : nullptr; } void SvtIconChoiceCtrl::ClickIcon() @@ -298,7 +298,7 @@ void SvtIconChoiceCtrl::KeyInput( const KeyEvent& rKEvt ) { _pCurKeyEvent = const_cast<KeyEvent*>(&rKEvt); Control::KeyInput( rKEvt ); - _pCurKeyEvent = NULL; + _pCurKeyEvent = nullptr; } } bool SvtIconChoiceCtrl::DoKeyInput( const KeyEvent& rKEvt ) @@ -308,7 +308,7 @@ bool SvtIconChoiceCtrl::DoKeyInput( const KeyEvent& rKEvt ) return true; _pCurKeyEvent = const_cast<KeyEvent*>(&rKEvt); bool bHandled = _pImp->KeyInput( rKEvt ); - _pCurKeyEvent = NULL; + _pCurKeyEvent = nullptr; return bHandled; } sal_Int32 SvtIconChoiceCtrl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx index 3b356140bffa..e22acfe95d33 100644 --- a/svtools/source/contnr/simptabl.cxx +++ b/svtools/source/contnr/simptabl.cxx @@ -27,7 +27,7 @@ SvSimpleTableContainer::SvSimpleTableContainer(vcl::Window* pParent, WinBits nBits) : Control(pParent, nBits) - , m_pTable(NULL) + , m_pTable(nullptr) { } @@ -123,7 +123,7 @@ SvSimpleTable::~SvSimpleTable() void SvSimpleTable::dispose() { - m_rParentTableContainer.SetTable(NULL); + m_rParentTableContainer.SetTable(nullptr); aHeaderBar.disposeAndClear(); SvHeaderTabListBox::dispose(); } @@ -423,7 +423,7 @@ IMPL_LINK_TYPED( SvSimpleTable, HeaderBarClick, HeaderBar*, pCtr, void) SvLBoxItem* SvSimpleTable::GetEntryAtPos( SvTreeListEntry* pEntry, sal_uInt16 nPos ) const { DBG_ASSERT(pEntry,"GetEntryText:Invalid Entry"); - SvLBoxItem* pItem = NULL; + SvLBoxItem* pItem = nullptr; if( pEntry ) { @@ -449,7 +449,7 @@ sal_Int32 SvSimpleTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* pRig SvLBoxItem* pRightItem = GetEntryAtPos( pRight, nSortCol); - if(pLeftItem != NULL && pRightItem != NULL) + if(pLeftItem != nullptr && pRightItem != nullptr) { sal_uInt16 nLeftKind = pLeftItem->GetType(); sal_uInt16 nRightKind = pRightItem->GetType(); diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 7cf3a8c9f43a..17b8c76fa761 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -43,8 +43,8 @@ #define FIRST_ENTRY_TAB 1 // #i27063# (pl), #i32300# (pb) never access VCL after DeInitVCL - also no destructors -Image* SvImpLBox::s_pDefCollapsed = NULL; -Image* SvImpLBox::s_pDefExpanded = NULL; +Image* SvImpLBox::s_pDefCollapsed = nullptr; +Image* SvImpLBox::s_pDefExpanded = nullptr; sal_Int32 SvImpLBox::s_nImageRefCount = 0; SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinStyle) @@ -57,7 +57,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS , nNextVerVisSize(0) , nExtendedWinBits(0) , bAreChildrenTransient(true) - , m_pStringSorter(NULL) + , m_pStringSorter(nullptr) { osl_atomic_increment(&s_nImageRefCount); pView = pLBView; @@ -81,9 +81,9 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS nHorSBarHeight = (short)aHorSBar->GetSizePixel().Height(); nVerSBarWidth = (short)aVerSBar->GetSizePixel().Width(); - pStartEntry = 0; - pCursor = 0; - pAnchor = 0; + pStartEntry = nullptr; + pCursor = nullptr; + pAnchor = nullptr; nVisibleCount = 0; // number of rows of data in control nNodeBmpTabDistance = NODE_BMP_TABDIST_NOTVALID; nYoffsNodeBmp = 0; @@ -93,9 +93,9 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS aAsyncBeginDragIdle.SetPriority( SchedulerPriority::HIGHEST ); aAsyncBeginDragIdle.SetIdleHdl( LINK(this,SvImpLBox,BeginDragHdl)); // button animation in listbox - pActiveButton = 0; - pActiveEntry = 0; - pActiveTab = 0; + pActiveButton = nullptr; + pActiveEntry = nullptr; + pActiveTab = nullptr; nFlags = 0; nCurTabPos = FIRST_ENTRY_TAB; @@ -104,8 +104,8 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS aEditIdle.SetIdleHdl( LINK(this,SvImpLBox,EditTimerCall) ); nMostRight = -1; - pMostRightEntry = 0; - nCurUserEvent = 0; + pMostRightEntry = nullptr; + nCurUserEvent = nullptr; bUpdateMode = true; bInVScrollHdl = false; @@ -143,7 +143,7 @@ void SvImpLBox::UpdateStringSorter() aLocale.Variant != rNewLocale.Variant ) { delete m_pStringSorter; - m_pStringSorter = NULL; + m_pStringSorter = nullptr; } } @@ -254,22 +254,22 @@ void SvImpLBox::SetExtendedWindowBits( ExtendedWinBits _nBits ) void SvImpLBox::Clear() { StopUserEvent(); - pStartEntry = 0; - pAnchor = 0; + pStartEntry = nullptr; + pAnchor = nullptr; - pActiveButton = 0; - pActiveEntry = 0; - pActiveTab = 0; + pActiveButton = nullptr; + pActiveEntry = nullptr; + pActiveTab = nullptr; nMostRight = -1; - pMostRightEntry = 0; + pMostRightEntry = nullptr; // don't touch the cursor any more if( pCursor ) { if( pView->HasFocus() ) pView->HideFocus(); - pCursor = 0; + pCursor = nullptr; } aVerSBar->Hide(); aVerSBar->SetThumbPos( 0 ); @@ -610,7 +610,7 @@ void SvImpLBox::RecalcFocusRect() void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect ) { - SvViewDataEntry* pViewDataNewCur = 0; + SvViewDataEntry* pViewDataNewCur = nullptr; if( pEntry ) pViewDataNewCur= pView->GetViewDataEntry(pEntry); if( pEntry && @@ -626,7 +626,7 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect ) while( pEntry && pViewDataNewCur && !pViewDataNewCur->IsSelectable() ) { pEntry = pView->NextVisible(pEntry); - pViewDataNewCur = pEntry ? pView->GetViewDataEntry(pEntry) : 0; + pViewDataNewCur = pEntry ? pView->GetViewDataEntry(pEntry) : nullptr; } SvTreeListEntry* pOldCursor = pCursor; @@ -706,7 +706,7 @@ void SvImpLBox::UpdateAll( bool bInvalidateCompleteView, bool bUpdateVerScrollBar ) { if( bUpdateVerScrollBar ) - FindMostRight(0); + FindMostRight(nullptr); aVerSBar->SetRange( Range(0, pView->GetVisibleCount()-1 ) ); SyncVerThumb(); FillView(); @@ -773,9 +773,9 @@ SvTreeListEntry* SvImpLBox::GetClickedEntry( const Point& rPoint ) const // suggest it isn't. Okay, make it safe, and wait for somebody to reproduce it // reliably :-\ .... // #122359# / 2005-05-23 / frank.schoenheit@sun.com - return NULL; + return nullptr; if( pView->GetEntryCount() == 0 || !pStartEntry || !pView->GetEntryHeight()) - return 0; + return nullptr; sal_uInt16 nClickedEntry = (sal_uInt16)(rPoint.Y() / pView->GetEntryHeight() ); sal_uInt16 nTemp = nClickedEntry; @@ -818,13 +818,13 @@ SvTreeListEntry* SvImpLBox::GetEntry( const Point& rPoint ) const if( (pView->GetEntryCount() == 0) || !pStartEntry || (rPoint.Y() > aOutputSize.Height()) || !pView->GetEntryHeight()) - return 0; + return nullptr; sal_uInt16 nClickedEntry = (sal_uInt16)(rPoint.Y() / pView->GetEntryHeight() ); sal_uInt16 nTemp = nClickedEntry; SvTreeListEntry* pEntry = pView->NextVisible(pStartEntry, nTemp); if( nTemp != nClickedEntry ) - pEntry = 0; + pEntry = nullptr; return pEntry; } @@ -832,9 +832,9 @@ SvTreeListEntry* SvImpLBox::GetEntry( const Point& rPoint ) const SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint, bool bNotifyScroll) { if( !pCursor ) - return 0; + return nullptr; long nY = rPoint.Y(); - SvTreeListEntry* pEntry = 0; + SvTreeListEntry* pEntry = nullptr; long nMax = aOutputSize.Height(); if( nY < 0 || nY >= nMax ) // aOutputSize.Height() ) { @@ -1515,7 +1515,7 @@ void SvImpLBox::EntryExpanded( SvTreeListEntry* pEntry ) if( IsLineVisible(nY) ) { InvalidateEntriesFrom( nY ); - FindMostRight( pEntry, 0 ); + FindMostRight( pEntry, nullptr ); } aVerSBar->SetRange( Range(0, pView->GetVisibleCount()-1 ) ); // if we expanded before the thumb, the thumb's position has to be @@ -1535,7 +1535,7 @@ void SvImpLBox::EntryCollapsed( SvTreeListEntry* pEntry ) if( !pMostRightEntry || pTree->IsChild( pEntry,pMostRightEntry ) ) { - FindMostRight(0); + FindMostRight(nullptr); } if( pStartEntry ) @@ -1729,7 +1729,7 @@ void SvImpLBox::EntryRemoved() if( GetUpdateMode()) { if( nFlags & F_REMOVED_RECALC_MOST_RIGHT ) - FindMostRight(0); + FindMostRight(nullptr); aVerSBar->SetRange( Range(0, pView->GetVisibleCount()-1 ) ); FillView(); if( pStartEntry ) @@ -1773,7 +1773,7 @@ void SvImpLBox::MovingEntry( SvTreeListEntry* pEntry ) pView->Invalidate(); if( pEntry == pStartEntry ) { - SvTreeListEntry* pNew = 0; + SvTreeListEntry* pNew = nullptr; if( !pEntry->HasChildren() ) { pNew = pView->NextVisible(pStartEntry); @@ -1802,7 +1802,7 @@ void SvImpLBox::EntryMoved( SvTreeListEntry* pEntry ) aVerSBar->SetRange( Range(0, pView->GetVisibleCount()-1)); sal_uInt16 nFirstPos = (sal_uInt16)pTree->GetAbsPos( pStartEntry ); sal_uInt16 nNewPos = (sal_uInt16)pTree->GetAbsPos( pEntry ); - FindMostRight(0); + FindMostRight(nullptr); if( nNewPos < nFirstPos ) // HACK! pStartEntry = pEntry; SyncVerThumb(); @@ -1862,8 +1862,8 @@ void SvImpLBox::EntryInserted( SvTreeListEntry* pEntry ) if( nCurDispEntries < nVisibleCount ) { // set at the next paint event - pStartEntry = 0; - SetCursor( 0 ); + pStartEntry = nullptr; + SetCursor( nullptr ); pView->Invalidate(); } } @@ -1904,7 +1904,7 @@ bool SvImpLBox::ButtonDownCheckCtrl(const MouseEvent& rMEvt, SvTreeListEntry* pE return true; } else - pActiveButton = 0; + pActiveButton = nullptr; return false; } @@ -1948,9 +1948,9 @@ bool SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt ) InvalidateEntry(pActiveEntry); if (pCursor == pActiveEntry) ShowCursor(true); - pActiveButton = 0; - pActiveEntry = 0; - pActiveTab = 0; + pActiveButton = nullptr; + pActiveEntry = nullptr; + pActiveTab = nullptr; return true; } return false; @@ -2045,7 +2045,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt ) { SvLBoxTab* pXTab = pView->GetTab( pEntry, pXItem ); if ( !rMEvt.IsMod1() && !rMEvt.IsMod2() && rMEvt.IsLeft() && pXTab->IsEditable() - && pEntry == pView->FirstSelected() && NULL == pView->NextSelected( pEntry ) ) + && pEntry == pView->FirstSelected() && nullptr == pView->NextSelected( pEntry ) ) // #i8234# FirstSelected() and NextSelected() ensures, that inplace editing is only triggered, when only one entry is selected nFlags |= F_START_EDITTIMER; if ( !pView->IsSelected( pEntry ) ) @@ -2409,7 +2409,7 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt) if( !bShift && !bMod1 ) { aEditClickPos = Point( -1, -1 ); - EditTimerCall( 0 ); + EditTimerCall( nullptr ); } else bKeyUsed = false; @@ -2470,7 +2470,7 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt) sal_uInt16 nRefDepth; // special case explorer: if the root only has a single // entry, don't collapse the root entry - if (pTree->GetChildList(0).size() < 2) + if (pTree->GetChildList(nullptr).size() < 2) { nRefDepth = 1; pParentToCollapse = pCursor; @@ -2606,7 +2606,7 @@ void SvImpLBox::LoseFocus() if( m_nStyle & WB_HIDESELECTION ) { - SvTreeListEntry* pEntry = pView ? pView->FirstSelected() : NULL; + SvTreeListEntry* pEntry = pView ? pView->FirstSelected() : nullptr; while( pEntry ) { InvalidateEntry( pEntry ); @@ -2649,7 +2649,7 @@ void ImpLBSelEng::CreateAnchor() void ImpLBSelEng::DestroyAnchor() { - pImp->pAnchor = 0; + pImp->pAnchor = nullptr; } bool ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, bool bDontSelectAtCursor) @@ -2835,7 +2835,7 @@ void SvImpLBox::SelAllDestrAnch( if( bDestroyAnchor ) DestroyAnchor(); // delete anchor & reset SelectionEngine else - pAnchor = 0; // always delete internal anchor + pAnchor = nullptr; // always delete internal anchor return; } @@ -2865,7 +2865,7 @@ void SvImpLBox::SelAllDestrAnch( if( bDestroyAnchor ) DestroyAnchor(); // delete anchor & reset SelectionEngine else - pAnchor = 0; // always delete internal anchor + pAnchor = nullptr; // always delete internal anchor ShowCursor( true ); } @@ -3211,13 +3211,13 @@ SvLBoxTab* SvImpLBox::NextTab( SvLBoxTab* pTab ) { sal_uInt16 nTabCount = pView->TabCount(); if( nTabCount <= 1 ) - return 0; + return nullptr; for( int nTab=0; nTab < (nTabCount-1); nTab++) { if( pView->aTabs[nTab]==pTab ) return pView->aTabs[nTab+1]; } - return 0; + return nullptr; } void SvImpLBox::EndSelection() @@ -3281,7 +3281,7 @@ bool SvImpLBox::SetMostRight( SvTreeListEntry* pEntry ) void SvImpLBox::FindMostRight( SvTreeListEntry* pEntryToIgnore ) { nMostRight = -1; - pMostRightEntry = 0; + pMostRightEntry = nullptr; if( !pView->GetModel() ) return; @@ -3322,7 +3322,7 @@ void SvImpLBox::FindMostRight_Impl( SvTreeListEntry* pParent, SvTreeListEntry* p void SvImpLBox::NotifyTabsChanged() { if( GetUpdateMode() && !(nFlags & F_IGNORE_CHANGED_TABS ) && - nCurUserEvent == 0 ) + nCurUserEvent == nullptr ) { nCurUserEvent = Application::PostUserEvent(LINK(this,SvImpLBox,MyUserEvent)); } @@ -3340,7 +3340,7 @@ bool SvImpLBox::IsNowExpandable() const IMPL_LINK_TYPED(SvImpLBox, MyUserEvent, void*, pArg, void ) { - nCurUserEvent = 0; + nCurUserEvent = nullptr; if( !pArg ) { pView->Invalidate(); @@ -3348,7 +3348,7 @@ IMPL_LINK_TYPED(SvImpLBox, MyUserEvent, void*, pArg, void ) } else { - FindMostRight( 0 ); + FindMostRight( nullptr ); ShowVerSBar(); pView->Invalidate( GetVisibleArea() ); } @@ -3357,10 +3357,10 @@ IMPL_LINK_TYPED(SvImpLBox, MyUserEvent, void*, pArg, void ) void SvImpLBox::StopUserEvent() { - if( nCurUserEvent != 0 ) + if( nCurUserEvent != nullptr ) { Application::RemoveUserEvent( nCurUserEvent ); - nCurUserEvent = 0; + nCurUserEvent = nullptr; } } @@ -3438,7 +3438,7 @@ bool SvImpLBox::IsSelectable( const SvTreeListEntry* pEntry ) if( pEntry ) { SvViewDataEntry* pViewDataNewCur = pView->GetViewDataEntry(const_cast<SvTreeListEntry*>(pEntry)); - return (pViewDataNewCur == 0) || pViewDataNewCur->IsSelectable(); + return (pViewDataNewCur == nullptr) || pViewDataNewCur->IsSelectable(); } else { diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index aa4e86993b60..8301c179892f 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -32,7 +32,7 @@ struct SvLBoxButtonData_Impl bool bDefaultImages; bool bShowRadioButton; - SvLBoxButtonData_Impl() : pEntry( NULL ), bDefaultImages( false ), bShowRadioButton( false ) {} + SvLBoxButtonData_Impl() : pEntry( nullptr ), bDefaultImages( false ), bShowRadioButton( false ) {} }; void SvLBoxButtonData::InitData( bool bImagesFromDefault, bool _bRadioBtn, const Control* pCtrl ) @@ -67,7 +67,7 @@ SvLBoxButtonData::~SvLBoxButtonData() delete pImpl; #ifdef DBG_UTIL - pImpl = NULL; + pImpl = nullptr; #endif } @@ -223,7 +223,7 @@ void SvLBoxString::InitViewData( long nTextWidth; if (pView->GetEntryCount() > 100) { - static SvTreeListBox *pPreviousView = NULL; + static SvTreeListBox *pPreviousView = nullptr; static float fApproximateCharWidth = 0.0; if (pPreviousView != pView) { @@ -300,7 +300,7 @@ SvLBoxButton::SvLBoxButton( SvTreeListEntry* pEntry, SvLBoxButtonKind eTheKind, SvLBoxButton::SvLBoxButton() : SvLBoxItem() , isVis(false) - , pData(0) + , pData(nullptr) , eKind(SvLBoxButtonKind_enabledCheckbox) , nItemFlags(SvItemStateFlags::NONE) { diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index f12c49bdf802..068758ac8e62 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -90,9 +90,9 @@ void SvTabListBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, SvTabListBox::SvTabListBox( vcl::Window* pParent, WinBits nBits ) : SvTreeListBox( pParent, nBits ) { - pTabList = 0; + pTabList = nullptr; nTabCount = 0; - pViewParent = 0; + pViewParent = nullptr; SetHighlightRange(); // select full width } @@ -115,7 +115,7 @@ void SvTabListBox::dispose() // delete array delete [] pTabList; #ifdef DBG_UTIL - pTabList = 0; + pTabList = nullptr; nTabCount = 0; #endif SvTreeListBox::dispose(); @@ -245,7 +245,7 @@ SvTreeListEntry* SvTabListBox::InsertEntryToColumn( const OUString& rStr, SvTreeListEntry* SvTabListBox::InsertEntryToColumn( const OUString& rStr, sal_uLong nPos, sal_uInt16 nCol, void* pUser ) { - return InsertEntryToColumn( rStr,0,nPos, nCol, pUser ); + return InsertEntryToColumn( rStr,nullptr,nPos, nCol, pUser ); } OUString SvTabListBox::GetEntryText( SvTreeListEntry* pEntry ) const @@ -429,8 +429,8 @@ OUString SvTabListBox::GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const SvTreeListEntry* SvTabListBox::GetEntryOnPos( sal_uLong _nEntryPos ) const { - SvTreeListEntry* pEntry = NULL; - sal_uLong i, nPos = 0, nCount = GetLevelChildCount( NULL ); + SvTreeListEntry* pEntry = nullptr; + sal_uLong i, nPos = 0, nCount = GetLevelChildCount( nullptr ); for ( i = 0; i < nCount; ++i ) { SvTreeListEntry* pParent = GetEntry(i); @@ -468,7 +468,7 @@ SvTreeListEntry* SvTabListBox::GetChildOnPos( SvTreeListEntry* _pParent, sal_uLo } } - return NULL; + return nullptr; } void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify) @@ -501,7 +501,7 @@ namespace svt VclPtr<HeaderBar> m_pHeaderBar; AccessibleFactoryAccess m_aFactoryAccess; - SvHeaderTabListBoxImpl() : m_pHeaderBar( NULL ) { } + SvHeaderTabListBoxImpl() : m_pHeaderBar( nullptr ) { } }; } @@ -509,7 +509,7 @@ SvHeaderTabListBox::SvHeaderTabListBox( vcl::Window* pParent, WinBits nWinStyle : SvTabListBox(pParent, nWinStyle) , m_bFirstPaint(true) , m_pImpl(new ::svt::SvHeaderTabListBoxImpl) - , m_pAccessible(NULL) + , m_pAccessible(nullptr) { } @@ -800,7 +800,7 @@ Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScree Rectangle aRect; if ( _bIsColumnBar ) { - vcl::Window* pParent = NULL; + vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = m_pImpl->m_pHeaderBar->GetAccessibleParentWindow(); @@ -811,7 +811,7 @@ Rectangle SvHeaderTabListBox::calcHeaderRect( bool _bIsColumnBar, bool _bOnScree Rectangle SvHeaderTabListBox::calcTableRect( bool _bOnScreen ) { - vcl::Window* pParent = NULL; + vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); @@ -833,7 +833,7 @@ Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 aTopLeft.X() = aItemRect.Left(); Size aSize = aItemRect.GetSize(); aRect = Rectangle( aTopLeft, aSize ); - vcl::Window* pParent = NULL; + vcl::Window* pParent = nullptr; if ( !_bOnScreen ) pParent = GetAccessibleParentWindow(); aTopLeft = aRect.TopLeft(); @@ -872,10 +872,10 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleCell( sal_Int32 _nR bool bIsCheckBox = IsCellCheckBox( _nRow, _nColumnPos, eState ); if ( bIsCheckBox ) xChild = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleCheckBoxCell( - m_pAccessible->getHeaderBar(), *this, NULL, _nRow, _nColumnPos, eState, false ); + m_pAccessible->getHeaderBar(), *this, nullptr, _nRow, _nColumnPos, eState, false ); else xChild = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleBrowseBoxTableCell( - m_pAccessible->getHeaderBar(), *this, NULL, _nRow, _nColumnPos, OFFSET_NONE ); + m_pAccessible->getHeaderBar(), *this, nullptr, _nRow, _nColumnPos, OFFSET_NONE ); // insert into list if ( !AreChildrenTransient() ) @@ -910,7 +910,7 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleColumnHeader( sal_u // no -> create new header cell xChild = m_pImpl->m_aFactoryAccess.getFactory().createAccessibleBrowseBoxHeaderCell( _nColumn, m_pAccessible->getHeaderBar(), - *this, NULL, ::svt::BBTYPE_COLUMNHEADERCELL + *this, nullptr, ::svt::BBTYPE_COLUMNHEADERCELL ); // insert into list diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 231baec4d912..cf12ad3dbc65 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -71,7 +71,7 @@ SvTreeList::~SvTreeList() Clear(); delete pRootItem; #ifdef DBG_UTIL - pRootItem = 0; + pRootItem = nullptr; #endif } @@ -500,14 +500,14 @@ SvTreeListEntry* SvTreeList::First() const if ( nEntryCount ) return pRootItem->m_Children[0].get(); else - return 0; + return nullptr; } SvTreeListEntry* SvTreeList::Next( SvTreeListEntry* pActEntry, sal_uInt16* pDepth ) const { DBG_ASSERT( pActEntry && pActEntry->pParent, "SvTreeList::Next: invalid entry/parent!" ); if ( !pActEntry || !pActEntry->pParent ) - return NULL; + return nullptr; sal_uInt16 nDepth = 0; bool bWithDepth = false; @@ -543,9 +543,9 @@ SvTreeListEntry* SvTreeList::Next( SvTreeListEntry* pActEntry, sal_uInt16* pDept // Move up level(s) until we find the level where the next sibling exists. SvTreeListEntry* pParent = pActEntry->pParent; nDepth--; - while( pParent != pRootItem && pParent != 0 ) + while( pParent != pRootItem && pParent != nullptr ) { - DBG_ASSERT(pParent!=0,"TreeData corrupt!"); + DBG_ASSERT(pParent!=nullptr,"TreeData corrupt!"); pActualList = &pParent->pParent->m_Children; nActualPos = pParent->GetChildListPos(); if (pActualList->size() > (nActualPos+1)) @@ -558,12 +558,12 @@ SvTreeListEntry* SvTreeList::Next( SvTreeListEntry* pActEntry, sal_uInt16* pDept pParent = pParent->pParent; nDepth--; } - return 0; + return nullptr; } SvTreeListEntry* SvTreeList::Prev( SvTreeListEntry* pActEntry, sal_uInt16* pDepth ) const { - DBG_ASSERT(pActEntry!=0,"Entry?"); + DBG_ASSERT(pActEntry!=nullptr,"Entry?"); sal_uInt16 nDepth = 0; bool bWithDepth = false; @@ -590,7 +590,7 @@ SvTreeListEntry* SvTreeList::Prev( SvTreeListEntry* pActEntry, sal_uInt16* pDept return pActEntry; } if ( pActEntry->pParent == pRootItem ) - return 0; + return nullptr; pActEntry = pActEntry->pParent; @@ -601,13 +601,13 @@ SvTreeListEntry* SvTreeList::Prev( SvTreeListEntry* pActEntry, sal_uInt16* pDept *pDepth = nDepth; return pActEntry; } - return 0; + return nullptr; } SvTreeListEntry* SvTreeList::Last() const { SvTreeListEntries* pActList = &pRootItem->m_Children; - SvTreeListEntry* pEntry = NULL; + SvTreeListEntry* pEntry = nullptr; while (!pActList->empty()) { pEntry = pActList->back().get(); @@ -665,7 +665,7 @@ SvTreeListEntry* SvTreeList::NextVisible(const SvListView* pView,SvTreeListEntry { DBG_ASSERT(pView,"NextVisible:No View"); if ( !pActEntry ) - return 0; + return nullptr; sal_uInt16 nDepth = 0; bool bWithDepth = false; @@ -715,7 +715,7 @@ SvTreeListEntry* SvTreeList::NextVisible(const SvListView* pView,SvTreeListEntry pParent = pParent->pParent; nDepth--; } - return 0; + return nullptr; } @@ -752,7 +752,7 @@ SvTreeListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvTreeListEntr } if ( pActEntry->pParent == pRootItem ) - return 0; + return nullptr; pActEntry = pActEntry->pParent; if ( pActEntry ) @@ -762,7 +762,7 @@ SvTreeListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvTreeListEntr *pActDepth = nDepth; return pActEntry; } - return 0; + return nullptr; } SvTreeListEntry* SvTreeList::LastVisible( const SvListView* pView, sal_uInt16* pDepth) const @@ -823,7 +823,7 @@ SvTreeListEntry* SvTreeList::FirstSelected( const SvListView* pView) const { DBG_ASSERT(pView,"FirstSel:No View"); if( !pView ) - return 0; + return nullptr; SvTreeListEntry* pActSelEntry = First(); while( pActSelEntry && !pView->IsSelected(pActSelEntry) ) pActSelEntry = NextVisible( pView, pActSelEntry ); @@ -839,7 +839,7 @@ SvTreeListEntry* SvTreeList::FirstChild( SvTreeListEntry* pParent ) const if (!pParent->m_Children.empty()) pResult = pParent->m_Children[0].get(); else - pResult = 0; + pResult = nullptr; return pResult; } @@ -847,7 +847,7 @@ SvTreeListEntry* SvTreeList::NextSibling( SvTreeListEntry* pEntry ) { DBG_ASSERT(pEntry,"Entry?"); if( !pEntry ) - return 0; + return nullptr; SvTreeListEntries& rList = pEntry->pParent->m_Children; sal_uLong nPos = pEntry->GetChildListPos(); @@ -859,12 +859,12 @@ SvTreeListEntry* SvTreeList::PrevSibling( SvTreeListEntry* pEntry ) { DBG_ASSERT(pEntry,"Entry?"); if( !pEntry ) - return 0; + return nullptr; SvTreeListEntries& rList = pEntry->pParent->m_Children; sal_uLong nPos = pEntry->GetChildListPos(); if ( nPos == 0 ) - return 0; + return nullptr; nPos--; pEntry = rList[nPos].get(); return pEntry; @@ -875,7 +875,7 @@ SvTreeListEntry* SvTreeList::LastSibling( SvTreeListEntry* pEntry ) { DBG_ASSERT(pEntry,"LastSibling:Entry?"); if( !pEntry ) - return 0; + return nullptr; SvTreeListEntries& rChildren = pEntry->pParent->m_Children; return (rChildren.empty()) ? nullptr : rChildren.back().get(); @@ -1155,7 +1155,7 @@ void SvTreeList::InvalidateEntry( SvTreeListEntry* pEntry ) SvTreeListEntry* SvTreeList::GetRootLevelParent( SvTreeListEntry* pEntry ) const { DBG_ASSERT(pEntry,"GetRootLevelParent:No Entry"); - SvTreeListEntry* pCurParent = 0; + SvTreeListEntry* pCurParent = nullptr; if ( pEntry ) { pCurParent = pEntry->pParent; @@ -1270,7 +1270,7 @@ void SvListView::SetModel( SvTreeList* pNewModel ) { pModel->RemoveView( this ); bBroadcastCleared = true; - ModelNotification( SvListAction::CLEARING,0,0,0 ); + ModelNotification( SvListAction::CLEARING,nullptr,nullptr,0 ); if ( pModel->GetRefCount() == 0 ) delete pModel; } @@ -1278,7 +1278,7 @@ void SvListView::SetModel( SvTreeList* pNewModel ) m_pImpl->InitTable(); pNewModel->InsertView( this ); if( bBroadcastCleared ) - ModelNotification( SvListAction::CLEARED,0,0,0 ); + ModelNotification( SvListAction::CLEARED,nullptr,nullptr,0 ); } @@ -1375,7 +1375,7 @@ void SvListView::Impl::ActionInsertedTree( SvTreeListEntry* pEntry ) m_DataTable.insert( pCurEntry, pViewData ); pCurEntry = m_rThis.pModel->Next( pCurEntry ); if ( pCurEntry && m_rThis.pModel->GetDepth(pCurEntry) <= nRefDepth) - pCurEntry = 0; + pCurEntry = nullptr; } } @@ -1521,7 +1521,7 @@ const SvViewDataEntry* SvListView::GetViewData( const SvTreeListEntry* pEntry ) SvDataTable::const_iterator itr = m_pImpl->m_DataTable.find(const_cast<SvTreeListEntry*>(pEntry)); if (itr == m_pImpl->m_DataTable.end()) - return NULL; + return nullptr; return itr->second; } @@ -1680,7 +1680,7 @@ bool SvTreeList::HasParent( const SvTreeListEntry* pEntry ) const SvTreeListEntry* SvTreeList::GetEntry( SvTreeListEntry* pParent, sal_uLong nPos ) const { if ( !pParent ) pParent = pRootItem; - SvTreeListEntry* pRet = 0; + SvTreeListEntry* pRet = nullptr; if (nPos < pParent->m_Children.size()) pRet = pParent->m_Children[nPos].get(); return pRet; @@ -1688,7 +1688,7 @@ SvTreeListEntry* SvTreeList::GetEntry( SvTreeListEntry* pParent, sal_uLong nPos SvTreeListEntry* SvTreeList::GetEntry( sal_uLong nRootPos ) const { - SvTreeListEntry* pRet = 0; + SvTreeListEntry* pRet = nullptr; if (nEntryCount && nRootPos < pRootItem->m_Children.size()) pRet = pRootItem->m_Children[nRootPos].get(); return pRet; @@ -1712,7 +1712,7 @@ const SvTreeListEntry* SvTreeList::GetParent( const SvTreeListEntry* pEntry ) co { const SvTreeListEntry* pParent = pEntry->pParent; if (pParent == pRootItem) - pParent = NULL; + pParent = nullptr; return pParent; } @@ -1720,7 +1720,7 @@ SvTreeListEntry* SvTreeList::GetParent( SvTreeListEntry* pEntry ) { SvTreeListEntry* pParent = pEntry->pParent; if (pParent == pRootItem) - pParent = NULL; + pParent = nullptr; return pParent; } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 2c907e2fdc40..b3fcfa1a124a 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -62,7 +62,7 @@ class MyEdit_Impl : public Edit public: MyEdit_Impl( vcl::Window* pParent, SvInplaceEdit2* pOwner ); virtual ~MyEdit_Impl() { disposeOnce(); } - virtual void dispose() override { pOwner = NULL; Edit::dispose(); } + virtual void dispose() override { pOwner = nullptr; Edit::dispose(); } virtual void KeyInput( const KeyEvent& rKEvt ) override; virtual void LoseFocus() override; }; @@ -73,7 +73,7 @@ class MyMultiEdit_Impl : public MultiLineEdit public: MyMultiEdit_Impl( vcl::Window* pParent, SvInplaceEdit2* pOwner ); virtual ~MyMultiEdit_Impl() { disposeOnce(); } - virtual void dispose() override { pOwner = NULL; MultiLineEdit::dispose(); } + virtual void dispose() override { pOwner = nullptr; MultiLineEdit::dispose(); } virtual void KeyInput( const KeyEvent& rKEvt ) override; virtual void LoseFocus() override; }; @@ -270,14 +270,14 @@ OUString SvInplaceEdit2::GetText() const SvLBoxTab::SvLBoxTab() { nPos = 0; - pUserData = 0; + pUserData = nullptr; nFlags = SvLBoxTabFlags::NONE; } SvLBoxTab::SvLBoxTab( long nPosition, SvLBoxTabFlags nTabFlags ) { nPos = nPosition; - pUserData = 0; + pUserData = nullptr; nFlags = nTabFlags; } @@ -382,15 +382,15 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) : { nDragOptions = DND_ACTION_COPYMOVE | DND_ACTION_LINK; nImpFlags = SvTreeListBoxFlags::NONE; - pTargetEntry = 0; + pTargetEntry = nullptr; nDragDropMode = DragDropMode::NONE; SvTreeList* pTempModel = new SvTreeList; pTempModel->SetRefCount( 0 ); SetBaseModel(pTempModel); pModel->SetCloneLink( LINK(this, SvTreeListBox, CloneHdl_Impl )); pModel->InsertView( this ); - pHdlEntry = 0; - pEdCtrl = 0; + pHdlEntry = nullptr; + pEdCtrl = nullptr; eSelMode = SINGLE_SELECTION; nDragDropMode = DragDropMode::NONE; SetType(WINDOW_TREELISTBOX); @@ -411,7 +411,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, const ResId& rResId) : eSelMode(NO_SELECTION), nMinWidthInChars(0) { - pTargetEntry = 0; + pTargetEntry = nullptr; nImpFlags = SvTreeListBoxFlags::NONE; nDragOptions = DND_ACTION_COPYMOVE | DND_ACTION_LINK; nDragDropMode = DragDropMode::NONE; @@ -419,8 +419,8 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, const ResId& rResId) : pTempModel->SetRefCount( 0 ); SetBaseModel(pTempModel); pModel->InsertView( this ); - pHdlEntry = 0; - pEdCtrl = 0; + pHdlEntry = nullptr; + pEdCtrl = nullptr; pModel->SetCloneLink( LINK(this, SvTreeListBox, CloneHdl_Impl )); SetType(WINDOW_TREELISTBOX); @@ -569,7 +569,7 @@ TriState SvTreeListBox::NotifyMoving( DBG_ASSERT(pEntry,"NotifyMoving:SoureEntry?"); if( !pTarget ) { - rpNewParent = 0; + rpNewParent = nullptr; rNewChildPos = 0; return TRISTATE_TRUE; } @@ -643,7 +643,7 @@ bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry* pTar for (; it != itEnd; ++it) { pSourceEntry = *it; - SvTreeListEntry* pNewParent = 0; + SvTreeListEntry* pNewParent = nullptr; sal_uLong nInsertionPos = TREELIST_APPEND; TriState nOk = NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos); if ( nOk ) @@ -700,7 +700,7 @@ bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSource, S { pSourceEntry = *it; - SvTreeListEntry* pNewParent = 0; + SvTreeListEntry* pNewParent = nullptr; sal_uLong nInsertionPos = TREELIST_APPEND; TriState nOk = NotifyMoving(pTarget,pSourceEntry,pNewParent,nInsertionPos); TriState nCopyOk = nOk; @@ -810,8 +810,8 @@ SvTreeListEntry* SvTreeListBox::GetEntry( sal_uLong nRootPos ) const SvTreeListEntry* SvTreeListBox::GetEntryFromPath( const ::std::deque< sal_Int32 >& _rPath ) const { - SvTreeListEntry* pEntry = NULL; - SvTreeListEntry* pParent = NULL; + SvTreeListEntry* pEntry = nullptr; + SvTreeListEntry* pParent = nullptr; for( ::std::deque< sal_Int32 >::const_iterator pItem = _rPath.begin(); pItem != _rPath.end(); ++pItem ) { pEntry = GetEntry( pParent, *pItem ); @@ -1251,7 +1251,7 @@ sal_Int8 SvTreeListBox::ExecuteDrop( const ExecuteDropEvent& rEvt ) void SvTreeListBox::SetupDragOrigin() { pDDSource = this; - pDDTarget = 0; + pDDTarget = nullptr; } void SvTreeListBox::StartDrag( sal_Int8, const Point& rPosPixel ) @@ -1323,9 +1323,9 @@ nAction #endif ImplShowTargetEmphasis( pTargetEntry, false ); - pDDSource = 0; - pDDTarget = 0; - pTargetEntry = 0; + pDDSource = nullptr; + pDDTarget = nullptr; + pTargetEntry = nullptr; nDragDropMode = nOldDragMode; } @@ -1392,11 +1392,11 @@ Link<sal_Int8,void> SvTreeListBox::GetDragFinishedHdl() const void SvTreeListBox::InitTreeView() { - pCheckButtonData = NULL; - pEdEntry = NULL; - pEdItem = NULL; + pCheckButtonData = nullptr; + pEdEntry = nullptr; + pEdItem = nullptr; nEntryHeight = 0; - pEdCtrl = NULL; + pEdCtrl = nullptr; nFirstSelTab = 0; nLastSelTab = 0; nFocusWidth = -1; @@ -1504,14 +1504,14 @@ void SvTreeListBox::dispose() { pImp->CallEventListeners( VCLEVENT_OBJECT_DYING ); delete pImp; - pImp = NULL; + pImp = nullptr; } if( mpImpl ) { ClearTabList(); delete pEdCtrl; - pEdCtrl = NULL; + pEdCtrl = nullptr; if( pModel ) { @@ -1520,18 +1520,18 @@ void SvTreeListBox::dispose() { pModel->Clear(); delete pModel; - pModel = NULL; + pModel = nullptr; } } SvTreeListBox::RemoveBoxFromDDList_Impl( *this ); if( this == pDDSource ) - pDDSource = 0; + pDDSource = nullptr; if( this == pDDTarget ) - pDDTarget = 0; + pDDTarget = nullptr; delete mpImpl; - mpImpl = NULL; + mpImpl = nullptr; } Control::dispose(); @@ -1841,7 +1841,7 @@ void SvTreeListBox::SetEntryText(SvTreeListEntry* pEntry, const OUString& rStr) SvLBoxString* pItem = static_cast<SvLBoxString*>(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); DBG_ASSERT(pItem,"SetText:Item not found"); pItem->SetText(rStr); - pItem->InitViewData( this, pEntry, 0 ); + pItem->InitViewData( this, pEntry, nullptr ); GetModel()->InvalidateEntry( pEntry ); } @@ -2176,9 +2176,9 @@ void SvTreeListBox::LoseFocus() void SvTreeListBox::ModelHasCleared() { - pImp->pCursor = 0; // else we crash in GetFocus when editing in-place + pImp->pCursor = nullptr; // else we crash in GetFocus when editing in-place delete pEdCtrl; - pEdCtrl = NULL; + pEdCtrl = nullptr; pImp->Clear(); nFocusWidth = -1; @@ -2468,7 +2468,7 @@ void SvTreeListBox::ModelHasMoved( SvTreeListEntry* pSource ) void SvTreeListBox::ModelIsRemoving( SvTreeListEntry* pEntry ) { if(pEdEntry == pEntry) - pEdEntry = NULL; + pEdEntry = nullptr; pImp->RemovingEntry( pEntry ); } @@ -2476,7 +2476,7 @@ void SvTreeListBox::ModelIsRemoving( SvTreeListEntry* pEntry ) void SvTreeListBox::ModelHasRemoved( SvTreeListEntry* pEntry ) { if ( pEntry == pHdlEntry) - pHdlEntry = NULL; + pHdlEntry = nullptr; pImp->EntryRemoved(); } @@ -2681,7 +2681,7 @@ void SvTreeListBox::ImplEditEntry( SvTreeListEntry* pEntry ) long nClickX = pImp->aEditClickPos.X(); bool bIsMouseTriggered = nClickX >= 0; - SvLBoxString* pItem = NULL; + SvLBoxString* pItem = nullptr; sal_uInt16 nCount = pEntry->ItemCount(); long nTabPos, nNextTabPos = 0; for( sal_uInt16 i = 0 ; i < nCount ; i++ ) @@ -2771,7 +2771,7 @@ SvTreeListEntry* SvTreeListBox::GetDropTarget( const Point& rPos ) return LastVisible(); else if( (GetDragDropMode() & DragDropMode::ENABLE_TOP) && pTarget == First() && rPos.Y() < 6 ) - return 0; + return nullptr; return pTarget; } @@ -2784,14 +2784,14 @@ SvTreeListEntry* SvTreeListBox::GetEntry( const Point& rPos, bool bHit ) const { long nLine = pImp->GetEntryLine( pEntry ); if( !(pImp->EntryReallyHit( pEntry, rPos, nLine)) ) - return 0; + return nullptr; } return pEntry; } SvTreeListEntry* SvTreeListBox::GetCurEntry() const { - return pImp ? pImp->GetCurEntry() : NULL; + return pImp ? pImp->GetCurEntry() : nullptr; } void SvTreeListBox::ImplInitStyle() @@ -2884,8 +2884,8 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render { SvLBoxTab* pTab = aTabs[nCurTab]; sal_uInt16 nNextTab = nCurTab + 1; - SvLBoxTab* pNextTab = nNextTab < nTabCount ? aTabs[nNextTab] : 0; - SvLBoxItem* pItem = nCurItem < nItemCount ? &rEntry.GetItem(nCurItem) : 0; + SvLBoxTab* pNextTab = nNextTab < nTabCount ? aTabs[nNextTab] : nullptr; + SvLBoxItem* pItem = nCurItem < nItemCount ? &rEntry.GetItem(nCurItem) : nullptr; SvLBoxTabFlags nFlags = pTab->nFlags; Size aSize(SvLBoxItem::GetSize(pViewDataEntry, nCurItem)); @@ -3070,7 +3070,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render do { nNextTab++; - pNextTab = nNextTab < nTabCount ? aTabs[nNextTab] : 0; + pNextTab = nNextTab < nTabCount ? aTabs[nNextTab] : nullptr; } while (pNextTab && pNextTab->IsDynamic()); if (!pNextTab || (GetTabPos( &rEntry, pNextTab ) > nDynTabPos)) @@ -3080,7 +3080,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, long nLine, vcl::Render Point aPos(GetTabPos(&rEntry, pFirstDynamicTab), nLine); aPos.X() += pImp->nNodeBmpTabDistance; - const Image* pImg = 0; + const Image* pImg = nullptr; if (IsExpanded(&rEntry)) pImg = &pImp->GetExpandedNodeBmp(); @@ -3204,7 +3204,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvTreeListEntry* pEntry, long nLine ) // if SelTab != 0, we have to calculate also if( nFocusWidth == -1 || nFirstSelTab ) { - SvLBoxTab* pLastTab = NULL; // default to select whole width + SvLBoxTab* pLastTab = nullptr; // default to select whole width sal_uInt16 nLastTab; GetLastTab(SvLBoxTabFlags::SHOW_SELECTION,nLastTab); @@ -3262,7 +3262,7 @@ sal_IntPtr SvTreeListBox::GetTabPos( SvTreeListEntry* pEntry, SvLBoxTab* pTab) SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX, SvLBoxTab** ppTab, sal_uInt16 nEmptyWidth ) { - SvLBoxItem* pItemClicked = 0; + SvLBoxItem* pItemClicked = nullptr; sal_uInt16 nTabCount = aTabs.size(); sal_uInt16 nItemCount = pEntry->ItemCount(); SvLBoxTab* pTab = aTabs.front(); @@ -3274,7 +3274,7 @@ SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX, while( true ) { - SvLBoxTab* pNextTab=nNextItem<nTabCount ? aTabs[nNextItem] : 0; + SvLBoxTab* pNextTab=nNextItem<nTabCount ? aTabs[nNextItem] : nullptr; long nStart = GetTabPos( pEntry, pTab ); long nNextTabPos; @@ -3443,7 +3443,7 @@ SvLBoxTab* SvTreeListBox::GetFirstDynamicTab( sal_uInt16& rPos ) const } nCurTab++; } - return 0; + return nullptr; } SvLBoxTab* SvTreeListBox::GetFirstDynamicTab() const @@ -3562,7 +3562,7 @@ SvLBoxTab* SvTreeListBox::GetFirstTab( SvLBoxTabFlags nFlagMask, sal_uInt16& rPo } } rPos = 0xffff; - return 0; + return nullptr; } SvLBoxTab* SvTreeListBox::GetLastTab( SvLBoxTabFlags nFlagMask, sal_uInt16& rTabPos ) @@ -3579,7 +3579,7 @@ SvLBoxTab* SvTreeListBox::GetLastTab( SvLBoxTabFlags nFlagMask, sal_uInt16& rTab } } rTabPos = 0xffff; - return 0; + return nullptr; } void SvTreeListBox::RequestHelp( const HelpEvent& rHEvt ) @@ -3688,7 +3688,7 @@ SvTreeListEntry* SvTreeListBox::GetNextEntryInView(SvTreeListEntry* pEntry ) con Point aPos( GetEntryPosition(pNext) ); const Size& rSize = pImp->GetOutputSize(); if( aPos.Y() < 0 || aPos.Y() >= rSize.Height() ) - return 0; + return nullptr; } return pNext; } @@ -3696,7 +3696,7 @@ SvTreeListEntry* SvTreeListBox::GetNextEntryInView(SvTreeListEntry* pEntry ) con SvTreeListEntry* SvTreeListBox::GetLastEntryInView() const { SvTreeListEntry* pEntry = GetFirstEntryInView(); - SvTreeListEntry* pNext = 0; + SvTreeListEntry* pNext = nullptr; while( pEntry ) { pNext = NextVisible( pEntry ); @@ -3811,7 +3811,7 @@ void SvTreeListBox::InitStartEntry() std::unique_ptr<PopupMenu> SvTreeListBox::CreateContextMenu() { - return NULL; + return nullptr; } void SvTreeListBox::ExcecuteContextMenuAction( sal_uInt16 ) diff --git a/svtools/source/contnr/treelistentry.cxx b/svtools/source/contnr/treelistentry.cxx index 54d88937df82..e32c65d81262 100644 --- a/svtools/source/contnr/treelistentry.cxx +++ b/svtools/source/contnr/treelistentry.cxx @@ -50,18 +50,18 @@ void SvTreeListEntry::InvalidateChildrensListPositions() } SvTreeListEntry::SvTreeListEntry() - : pParent(NULL) + : pParent(nullptr) , nAbsPos(0) , nListPos(0) , bIsMarked(false) - , pUserData(NULL) + , pUserData(nullptr) , nEntryFlags(SvTLEntryFlags::NONE) , maBackColor(Application::GetSettings().GetStyleSettings().GetWindowColor()) { } SvTreeListEntry::SvTreeListEntry(const SvTreeListEntry& r) - : pParent(NULL) + : pParent(nullptr) , nAbsPos(r.nAbsPos) , nListPos(r.nListPos & 0x7FFFFFFF) , bIsMarked(r.bIsMarked) @@ -76,7 +76,7 @@ SvTreeListEntry::SvTreeListEntry(const SvTreeListEntry& r) SvTreeListEntry::~SvTreeListEntry() { #ifdef DBG_UTIL - pParent = 0; + pParent = nullptr; #endif m_Children.clear(); diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx index c6280d5070e8..1622d9dedc0e 100644 --- a/svtools/source/control/accessibleruler.cxx +++ b/svtools/source/control/accessibleruler.cxx @@ -336,7 +336,7 @@ void SAL_CALL SvtRulerAccessible::disposing() { { ::osl::MutexGuard aGuard( m_aMutex ); - mpRepr = NULL; // object dies with representation + mpRepr = nullptr; // object dies with representation } diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx index 66390cfefe15..c2803024c0aa 100644 --- a/svtools/source/control/asynclink.cxx +++ b/svtools/source/control/asynclink.cxx @@ -80,7 +80,7 @@ AsynchronLink::~AsynchronLink() IMPL_LINK_NOARG_TYPED( AsynchronLink, HandleCall_Idle, Idle*, void ) { if( _pMutex ) _pMutex->acquire(); - _nEventId = 0; + _nEventId = nullptr; if( _pMutex ) _pMutex->release(); Call_Impl( _pArg ); } @@ -96,7 +96,7 @@ void AsynchronLink::ClearPendingCall() if( _nEventId ) { Application::RemoveUserEvent( _nEventId ); - _nEventId = 0; + _nEventId = nullptr; } if( _pMutex ) _pMutex->release(); if( _pIdle ) _pIdle->Stop(); @@ -111,7 +111,7 @@ void AsynchronLink::Call_Impl( void* pArg ) if( !bDeleted ) { _bInCall = false; - _pDeleted = 0; + _pDeleted = nullptr; } } diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index ccd41253f7bf..13c14468a50a 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -150,11 +150,11 @@ inline void ImplCalendarClearSelectDate( IntDateSet* pTable ) void Calendar::ImplInit( WinBits nWinStyle ) { mpSelectTable = new IntDateSet; - mpOldSelectTable = NULL; - mpRestoreSelectTable = NULL; - mpStandardColor = NULL; - mpSaturdayColor = NULL; - mpSundayColor = NULL; + mpOldSelectTable = nullptr; + mpRestoreSelectTable = nullptr; + mpStandardColor = nullptr; + mpSaturdayColor = nullptr; + mpSundayColor = nullptr; mnDayCount = 0; mnWinStyle = nWinStyle; mnFirstYear = 0; @@ -686,7 +686,7 @@ void Calendar::ImplDrawDate(vcl::RenderContext& rRenderContext, DayOfWeek eDayOfWeek, bool bBack, bool bOther, sal_uLong nToday ) { - Color* pTextColor = NULL; + Color* pTextColor = nullptr; const OUString& rDay = maDayTexts[nDay - 1]; Rectangle aDateRect(nX, nY, nX + mnDayWidth - 1, nY + mnDayHeight - 1); @@ -1241,10 +1241,10 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate ) mbMenuDown = false; // destroy menu - aPopupMenu.SetPopupMenu( 2, NULL ); + aPopupMenu.SetPopupMenu( 2, nullptr ); for ( i = 0; i < MENU_YEAR_COUNT; i++ ) { - aPopupMenu.SetPopupMenu( 10+i, NULL ); + aPopupMenu.SetPopupMenu( 10+i, nullptr ); delete pYearPopupMenus[i]; } @@ -1346,9 +1346,9 @@ void Calendar::ImplEndTracking( bool bCancel ) GrabFocus(); delete mpOldSelectTable; - mpOldSelectTable = NULL; + mpOldSelectTable = nullptr; delete mpRestoreSelectTable; - mpRestoreSelectTable = NULL; + mpRestoreSelectTable = nullptr; } } @@ -2064,10 +2064,10 @@ public: ImplCFieldFloatWin::ImplCFieldFloatWin( vcl::Window* pParent ) : FloatingWindow( pParent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ) { - mpCalendar = NULL; - mpTodayBtn = NULL; - mpNoneBtn = NULL; - mpFixedLine = NULL; + mpCalendar = nullptr; + mpTodayBtn = nullptr; + mpNoneBtn = nullptr; + mpFixedLine = nullptr; } ImplCFieldFloatWin::~ImplCFieldFloatWin() @@ -2210,11 +2210,11 @@ bool ImplCFieldFloatWin::Notify( NotifyEvent& rNEvt ) CalendarField::CalendarField(vcl::Window* pParent, WinBits nWinStyle) : DateField(pParent, nWinStyle) - , mpFloatWin(NULL) - , mpCalendar(NULL) + , mpFloatWin(nullptr) + , mpCalendar(nullptr) , mnCalendarStyle(0) - , mpTodayBtn(NULL) - , mpNoneBtn(NULL) + , mpTodayBtn(nullptr) + , mpNoneBtn(nullptr) , maDefaultDate( 0, 0, 0 ) , mbToday(false) , mbNone(false) diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 9b52255e0ca7..09be79df18da 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -123,7 +123,7 @@ void ColorListBox::dispose() { ImplDestroyColorEntries(); delete pColorList; - pColorList = NULL; + pColorList = nullptr; } ListBox::dispose(); } @@ -237,7 +237,7 @@ Color ColorListBox::GetEntryColor( sal_Int32 nPos ) const { Color aColor; ImplColorListData* pData = ( 0 <= nPos && static_cast<size_t>(nPos) < pColorList->size() ) ? - (*pColorList)[ nPos ] : NULL; + (*pColorList)[ nPos ] : nullptr; if ( pData && pData->bColor ) aColor = pData->aColor; return aColor; @@ -246,7 +246,7 @@ Color ColorListBox::GetEntryColor( sal_Int32 nPos ) const void ColorListBox::UserDraw( const UserDrawEvent& rUDEvt ) { size_t nPos = rUDEvt.GetItemId(); - ImplColorListData* pData = ( nPos < pColorList->size() ) ? (*pColorList)[ nPos ] : NULL; + ImplColorListData* pData = ( nPos < pColorList->size() ) ? (*pColorList)[ nPos ] : nullptr; if ( pData ) { if ( pData->bColor ) @@ -822,7 +822,7 @@ sal_Int32 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const sal_uInt16 LineListBox::GetEntryStyle( sal_Int32 nPos ) const { - ImpLineListData* pData = (0 <= nPos && static_cast<size_t>(nPos) < pLineList->size()) ? (*pLineList)[ nPos ] : NULL; + ImpLineListData* pData = (0 <= nPos && static_cast<size_t>(nPos) < pLineList->size()) ? (*pLineList)[ nPos ] : nullptr; return ( pData ) ? pData->GetStyle() : table::BorderLineStyle::NONE; } @@ -931,7 +931,7 @@ void LineListBox::DataChanged( const DataChangedEvent& rDCEvt ) FontNameBox::FontNameBox( vcl::Window* pParent, WinBits nWinStyle ) : ComboBox( pParent, nWinStyle ) { - mpFontList = NULL; + mpFontList = nullptr; mbWYSIWYG = false; InitFontMRUEntriesFile(); } @@ -1018,7 +1018,7 @@ void FontNameBox::InitFontMRUEntriesFile() void FontNameBox::ImplDestroyFontList() { delete mpFontList; - mpFontList = NULL; + mpFontList = nullptr; } void FontNameBox::Fill( const FontList* pList ) @@ -1538,7 +1538,7 @@ void FontSizeBox::ImplInit() bPtRelative = false; bRelative = false; bStdSize = false; - pFontList = NULL; + pFontList = nullptr; SetShowTrailingZeros( false ); SetDecimalDigits( 1 ); @@ -1626,7 +1626,7 @@ void FontSizeBox::Fill( const vcl::FontInfo* pInfo, const FontList* pList ) // query font sizes const sal_IntPtr* pTempAry; - const sal_IntPtr* pAry = 0; + const sal_IntPtr* pAry = nullptr; if( pInfo ) { diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index ef263e7ea607..de4c2155828e 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -80,7 +80,7 @@ private: public: ImplFontListFontInfo( const vcl::FontInfo& rInfo, OutputDevice* pDev ) : - vcl::FontInfo( rInfo ), mpNext(NULL) + vcl::FontInfo( rInfo ), mpNext(nullptr) { mpDevice = pDev; } @@ -110,7 +110,7 @@ private: ImplFontListNameInfo(const OUString& rSearchName) : maSearchName(rSearchName) - , mpFirst(NULL) + , mpFirst(nullptr) , mnType(FontListFontNameType::NONE) { } @@ -172,7 +172,7 @@ ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uLong* { if ( pIndex ) *pIndex = ULONG_MAX; - return NULL; + return nullptr; } else { @@ -182,7 +182,7 @@ ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uLong* { if ( pIndex ) *pIndex = ULONG_MAX; - return NULL; + return nullptr; } else if (nComp == 0) return const_cast<ImplFontListNameInfo*>(pCmpData); @@ -190,7 +190,7 @@ ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uLong* // search fonts in the list const ImplFontListNameInfo* pCompareData; - const ImplFontListNameInfo* pFoundData = NULL; + const ImplFontListNameInfo* pFoundData = nullptr; size_t nLow = 0; size_t nHigh = m_Entries.size() - 1; size_t nMid; @@ -234,7 +234,7 @@ ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uLong* ImplFontListNameInfo* FontList::ImplFindByName(const OUString& rStr) const { OUString aSearchName = ImplMakeSearchStringFromName(rStr); - return ImplFind( aSearchName, NULL ); + return ImplFind( aSearchName, nullptr ); } void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll, @@ -272,7 +272,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll, ImplFontListFontInfo* pNewInfo = new ImplFontListFontInfo( aFontInfo, pDevice ); pData = new ImplFontListNameInfo( aSearchName ); pData->mpFirst = pNewInfo; - pNewInfo->mpNext = NULL; + pNewInfo->mpNext = nullptr; if (nIndex < m_Entries.size()) m_Entries.insert(m_Entries.begin()+nIndex, @@ -286,7 +286,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll, if ( bInsertData ) { bool bInsert = true; - ImplFontListFontInfo* pPrev = NULL; + ImplFontListFontInfo* pPrev = nullptr; ImplFontListFontInfo* pTemp = pData->mpFirst; ImplFontListFontInfo* pNewInfo = new ImplFontListFontInfo( aFontInfo, pDevice ); while ( pTemp ) @@ -337,7 +337,7 @@ FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, bool bAll ) // initialise variables mpDev = pDevice; mpDev2 = pDevice2; - mpSizeAry = NULL; + mpSizeAry = nullptr; // store style names maLight = SVT_RESSTR(STR_SVT_STYLE_LIGHT); @@ -577,8 +577,8 @@ namespace vcl::FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) const { ImplFontListNameInfo* pData = ImplFindByName( rName ); - ImplFontListFontInfo* pFontInfo = NULL; - ImplFontListFontInfo* pFontNameInfo = NULL; + ImplFontListFontInfo* pFontInfo = nullptr; + ImplFontListFontInfo* pFontNameInfo = nullptr; if ( pData ) { ImplFontListFontInfo* pSearchInfo = pData->mpFirst; @@ -659,8 +659,8 @@ vcl::FontInfo FontList::Get(const OUString& rName, FontWeight eWeight, FontItalic eItalic) const { ImplFontListNameInfo* pData = ImplFindByName( rName ); - ImplFontListFontInfo* pFontInfo = NULL; - ImplFontListFontInfo* pFontNameInfo = NULL; + ImplFontListFontInfo* pFontInfo = nullptr; + ImplFontListFontInfo* pFontNameInfo = nullptr; if ( pData ) { ImplFontListFontInfo* pSearchInfo = pData->mpFirst; @@ -693,7 +693,7 @@ vcl::FontInfo FontList::Get(const OUString& rName, bool FontList::IsAvailable(const OUString& rName) const { - return (ImplFindByName( rName ) != 0); + return (ImplFindByName( rName ) != nullptr); } const vcl::FontInfo& FontList::GetFontName( sal_uInt16 nFont ) const @@ -730,7 +730,7 @@ const sal_IntPtr* FontList::GetSizeAry( const vcl::FontInfo& rInfo ) const if ( mpSizeAry ) { delete[] const_cast<FontList*>(this)->mpSizeAry; - const_cast<FontList*>(this)->mpSizeAry = NULL; + const_cast<FontList*>(this)->mpSizeAry = nullptr; } // use standarad sizes if no name @@ -813,7 +813,7 @@ FontSizeNames::FontSizeNames( LanguageType eLanguage ) } else { - mpArray = NULL; + mpArray = nullptr; mnElem = 0; } } diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index 84bc9d7dfd0a..987ad98d3dc2 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -265,7 +265,7 @@ namespace validation } } -SvNumberFormatter* FormattedField::StaticFormatter::s_cFormatter = NULL; +SvNumberFormatter* FormattedField::StaticFormatter::s_cFormatter = nullptr; sal_uLong FormattedField::StaticFormatter::s_nReferences = 0; SvNumberFormatter* FormattedField::StaticFormatter::GetFormatter() @@ -291,7 +291,7 @@ FormattedField::StaticFormatter::~StaticFormatter() if (--s_nReferences == 0) { delete s_cFormatter; - s_cFormatter = NULL; + s_cFormatter = nullptr; } } @@ -311,12 +311,12 @@ FormattedField::FormattedField(vcl::Window* pParent, WinBits nStyle, SvNumberFor ,m_dCurrentValue(0) ,m_dDefaultValue(0) ,m_nFormatKey(0) - ,m_pFormatter(NULL) + ,m_pFormatter(nullptr) ,m_dSpinSize(1) ,m_dSpinFirst(-1000000) ,m_dSpinLast(1000000) ,m_bTreatAsNumber(true) - ,m_pLastOutputColor(NULL) + ,m_pLastOutputColor(nullptr) ,m_bUseInputStringForFormatting(false) { @@ -532,7 +532,7 @@ void FormattedField::ImplSetFormatKey(sal_uLong nFormatKey) { m_nFormatKey = nFormatKey; - bool bNeedFormatter = (m_pFormatter == NULL) && (nFormatKey != 0); + bool bNeedFormatter = (m_pFormatter == nullptr) && (nFormatKey != 0); if (bNeedFormatter) { ImplGetFormatter(); // this creates a standard formatter @@ -543,15 +543,15 @@ void FormattedField::ImplSetFormatKey(sal_uLong nFormatKey) m_nFormatKey = nFormatKey; // When calling SetFormatKey without a formatter, the key must be one of the standard values // that is available for all formatters (and, thus, also in this new one). - DBG_ASSERT(m_pFormatter->GetEntry(nFormatKey) != NULL, "FormattedField::ImplSetFormatKey : invalid format key !"); + DBG_ASSERT(m_pFormatter->GetEntry(nFormatKey) != nullptr, "FormattedField::ImplSetFormatKey : invalid format key !"); } } void FormattedField::SetFormatKey(sal_uLong nFormatKey) { - bool bNoFormatter = (m_pFormatter == NULL); + bool bNoFormatter = (m_pFormatter == nullptr); ImplSetFormatKey(nFormatKey); - FormatChanged((bNoFormatter && (m_pFormatter != NULL)) ? FORMAT_CHANGE_TYPE::FORMATTER : FORMAT_CHANGE_TYPE::KEYONLY); + FormatChanged((bNoFormatter && (m_pFormatter != nullptr)) ? FORMAT_CHANGE_TYPE::FORMATTER : FORMAT_CHANGE_TYPE::KEYONLY); } void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, bool bResetFormat) @@ -599,7 +599,7 @@ void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, bool bResetForm OUString FormattedField::GetFormat(LanguageType& eLang) const { const SvNumberformat* pFormatEntry = ImplGetFormatter()->GetEntry(m_nFormatKey); - DBG_ASSERT(pFormatEntry != NULL, "FormattedField::GetFormat: no number format for the given format key."); + DBG_ASSERT(pFormatEntry != nullptr, "FormattedField::GetFormat: no number format for the given format key."); OUString sFormatString = pFormatEntry ? pFormatEntry->GetFormatstring() : OUString(); eLang = pFormatEntry ? pFormatEntry->GetLanguage() : LANGUAGE_DONTKNOW; @@ -708,7 +708,7 @@ void FormattedField::SetDecimalDigits(sal_uInt16 _nPrecision) void FormattedField::FormatChanged( FORMAT_CHANGE_TYPE _nWhat ) { - m_pLastOutputColor = NULL; + m_pLastOutputColor = nullptr; if ( (_nWhat == FORMAT_CHANGE_TYPE::FORMATTER) && m_pFormatter ) m_pFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_INTL_FORMAT ); @@ -868,7 +868,7 @@ void FormattedField::ImplSetValue(double dVal, bool bForce) if (!bForce && (dVal == GetValue())) return; - DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplSetValue : can't set a value without a formatter !"); + DBG_ASSERT(ImplGetFormatter() != nullptr, "FormattedField::ImplSetValue : can't set a value without a formatter !"); m_ValueState = valueDouble; m_dCurrentValue = dVal; @@ -894,7 +894,7 @@ void FormattedField::ImplSetValue(double dVal, bool bForce) } } - ImplSetTextImpl(sNewText, NULL); + ImplSetTextImpl(sNewText, nullptr); m_ValueState = valueDouble; DBG_ASSERT(CheckText(sNewText), "FormattedField::ImplSetValue : formatted string doesn't match the criteria !"); } @@ -911,7 +911,7 @@ bool FormattedField::ImplGetValue(double& dNewVal) if (sText.isEmpty()) return true; - DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplGetValue : can't give you a current value without a formatter !"); + DBG_ASSERT(ImplGetFormatter() != nullptr, "FormattedField::ImplGetValue : can't give you a current value without a formatter !"); sal_uInt32 nFormatKey = m_nFormatKey; // IsNumberFormat changes the FormatKey! diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 4391d6a3afbb..b0d6192d115b 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -73,7 +73,7 @@ void HeaderBar::ImplInit( WinBits nWinStyle ) mbOutDrag = false; mbItemMode = false; - m_pVCLXHeaderBar = NULL; + m_pVCLXHeaderBar = nullptr; // StyleBits auswerten if ( nWinStyle & WB_DRAG ) mbDragable = true; @@ -116,7 +116,7 @@ void HeaderBar::dispose() for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) delete (*mpItemList)[ i ]; delete mpItemList; - mpItemList = NULL; + mpItemList = nullptr; } Window::dispose(); } @@ -1233,7 +1233,7 @@ sal_uInt16 HeaderBar::GetItemPos( sal_uInt16 nItemId ) const sal_uInt16 HeaderBar::GetItemId( sal_uInt16 nPos ) const { - ImplHeadItem* pItem = (nPos < mpItemList->size() ) ? (*mpItemList)[ nPos ] : NULL; + ImplHeadItem* pItem = (nPos < mpItemList->size() ) ? (*mpItemList)[ nPos ] : nullptr; if ( pItem ) return pItem->mnId; else diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 60c459a77f71..330a7c7ca505 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -1307,7 +1307,7 @@ bool SvtURLBox_Impl::TildeParsing( sal_Int32 nNameEnd = aText.indexOf( '/' ); OUString aUserName = aText.copy( 1, ( nNameEnd != -1 ) ? nNameEnd : ( aText.getLength() - 1 ) ); - struct passwd* pPasswd = NULL; + struct passwd* pPasswd = nullptr; #ifdef SOLARIS Sequence< sal_Int8 > sBuf( 1024 ); struct passwd aTmp; diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 9201731ebb20..216d3db6bd43 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -105,7 +105,7 @@ public: , m_bInteractive(true) , m_bComplete(true) , m_bPaintInitialized(false) - , InCompleteHyperLabel(NULL) + , InCompleteHyperLabel(nullptr) {} RoadmapItem* InCompleteHyperLabel; @@ -212,7 +212,7 @@ void ORoadmap::implInit(vcl::RenderContext& rRenderContext) aFont.SetUnderline(UNDERLINE_SINGLE); rRenderContext.SetFont(aFont); rRenderContext.SetBackground(Wallpaper(rStyleSettings.GetFieldColor())); - m_pImpl->InCompleteHyperLabel = NULL; + m_pImpl->InCompleteHyperLabel = nullptr; m_pImpl->setCurItemID(-1); m_pImpl->setComplete(true); m_pImpl->m_bPaintInitialized = true; @@ -250,7 +250,7 @@ void ORoadmap::dispose() if ( ! m_pImpl->isComplete() ) delete m_pImpl->InCompleteHyperLabel; delete m_pImpl; - m_pImpl = NULL; + m_pImpl = nullptr; Control::dispose(); } @@ -261,7 +261,7 @@ RoadmapTypes::ItemId ORoadmap::GetCurrentRoadmapItemID() const RoadmapItem* ORoadmap::GetPreviousHyperLabel(ItemIndex _Index) { - RoadmapItem* pOldItem = NULL; + RoadmapItem* pOldItem = nullptr; if ( _Index > 0 ) pOldItem = m_pImpl->getHyperLabels().at( _Index - 1 ); return pOldItem; @@ -272,7 +272,7 @@ RoadmapItem* ORoadmap::InsertHyperLabel(ItemIndex _Index, const OUString& _sLabe if (m_pImpl->getItemCount() == 0) m_pImpl->initItemSize(); - RoadmapItem* pItem = NULL; + RoadmapItem* pItem = nullptr; RoadmapItem* pOldItem = GetPreviousHyperLabel( _Index ); pItem = new RoadmapItem( *this, m_pImpl->getItemSize() ); @@ -327,10 +327,10 @@ void ORoadmap::SetRoadmapComplete(bool _bComplete) m_pImpl->setComplete( _bComplete ); if (_bComplete) { - if (m_pImpl->InCompleteHyperLabel != NULL) + if (m_pImpl->InCompleteHyperLabel != nullptr) { delete m_pImpl->InCompleteHyperLabel; - m_pImpl->InCompleteHyperLabel = NULL; + m_pImpl->InCompleteHyperLabel = nullptr; } } else if (bWasComplete) @@ -364,7 +364,7 @@ void ORoadmap::UpdatefollowingHyperLabels(ItemIndex _nIndex) void ORoadmap::ReplaceRoadmapItem(ItemIndex _Index, const OUString& _RoadmapItem, ItemId _RMID, bool _bEnabled) { RoadmapItem* pItem = GetByIndex( _Index); - if ( pItem != NULL ) + if ( pItem != nullptr ) { pItem->Update( _Index, _RoadmapItem ); pItem->SetID( _RMID ); @@ -409,14 +409,14 @@ bool ORoadmap::IsRoadmapComplete() const void ORoadmap::EnableRoadmapItem( ItemId _nItemId, bool _bEnable, ItemIndex _nStartIndex ) { RoadmapItem* pItem = GetByID( _nItemId, _nStartIndex ); - if ( pItem != NULL ) + if ( pItem != nullptr ) pItem->Enable( _bEnable ); } void ORoadmap::ChangeRoadmapItemLabel( ItemId _nID, const OUString& _sLabel, ItemIndex _nStartIndex ) { RoadmapItem* pItem = GetByID( _nID, _nStartIndex ); - if ( pItem != NULL ) + if ( pItem != nullptr ) { pItem->Update( pItem->GetIndex(), _sLabel ); @@ -434,7 +434,7 @@ void ORoadmap::ChangeRoadmapItemLabel( ItemId _nID, const OUString& _sLabel, Ite void ORoadmap::ChangeRoadmapItemID(ItemId _nID, ItemId _NewID, ItemIndex _nStartIndex) { RoadmapItem* pItem = GetByID( _nID, _nStartIndex ); - if ( pItem != NULL ) + if ( pItem != nullptr ) pItem->SetID( _NewID ); } @@ -451,7 +451,7 @@ RoadmapItem* ORoadmap::GetByID(ItemId _nID, ItemIndex _nStartIndex) if ( nLocID == _nID ) return *i; } - return NULL; + return nullptr; } const RoadmapItem* ORoadmap::GetByID(ItemId _nID, ItemIndex _nStartIndex) const @@ -466,7 +466,7 @@ RoadmapItem* ORoadmap::GetByIndex(ItemIndex _nItemIndex) { return rItems.at( _nItemIndex ); } - return NULL; + return nullptr; } const RoadmapItem* ORoadmap::GetByIndex(ItemIndex _nItemIndex) const @@ -533,7 +533,7 @@ void ORoadmap::Select() void ORoadmap::GetFocus() { RoadmapItem* pCurHyperLabel = GetByID( GetCurrentRoadmapItemID() ); - if ( pCurHyperLabel != NULL ) + if ( pCurHyperLabel != nullptr ) pCurHyperLabel->GrabFocus(); } @@ -541,7 +541,7 @@ bool ORoadmap::SelectRoadmapItemByID( ItemId _nNewID ) { DeselectOldRoadmapItems(); RoadmapItem* pItem = GetByID( _nNewID ); - if ( pItem != NULL ) + if ( pItem != nullptr ) { if ( pItem->IsEnabled() ) { @@ -606,7 +606,7 @@ RoadmapItem* ORoadmap::GetByPointer(vcl::Window* pWindow) if ( (*i)->Contains( pWindow ) ) return *i; } - return NULL; + return nullptr; } bool ORoadmap::PreNotify(NotifyEvent& _rNEvt) @@ -616,7 +616,7 @@ bool ORoadmap::PreNotify(NotifyEvent& _rNEvt) { vcl::Window* pWindow = _rNEvt.GetWindow(); RoadmapItem* pItem = GetByPointer( pWindow ); - if ( pItem != NULL ) + if ( pItem != nullptr ) { sal_Int16 nKeyCode = _rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); switch( nKeyCode ) @@ -664,7 +664,7 @@ void ORoadmap::DataChanged(const DataChangedEvent& rDCEvt) SetFont( aFont ); RoadmapTypes::ItemId curItemID = GetCurrentRoadmapItemID(); RoadmapItem* pLabelItem = GetByID( curItemID ); - if (pLabelItem != NULL) + if (pLabelItem != nullptr) { pLabelItem->ToggleBackgroundColor(rStyleSettings.GetHighlightColor()); } @@ -740,7 +740,7 @@ RoadmapTypes::ItemIndex RoadmapItem::GetIndex() const void RoadmapItem::SetPosition(RoadmapItem* _pOldItem) { Point aIDPos; - if ( _pOldItem == NULL ) + if ( _pOldItem == nullptr ) { aIDPos = mpID->LogicToPixel( Point( ROADMAP_INDENT_X, ROADMAP_INDENT_Y ), MAP_APPFONT ); } diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 40328b708fae..b48f1e84f6fd 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -235,7 +235,7 @@ void Ruler::ImplInit( WinBits nWinBits ) mnVirWidth = 0; // width or height from VirtualDevice mnVirHeight = 0; // height of width from VirtualDevice mnDragPos = 0; // Drag-Position (Null point) - mnUpdateEvtId = 0; // Update event was not sent yet + mnUpdateEvtId = nullptr; // Update event was not sent yet mnDragAryPos = 0; // Drag-Array-Index mnDragSize = 0; // Did size change at dragging mnDragModifier = 0; // Modifier key at dragging @@ -283,7 +283,7 @@ void Ruler::ImplInit( WinBits nWinBits ) aDefSize.Width() = nDefHeight; SetOutputSizePixel( aDefSize ); SetType(WINDOW_RULER); - pAccContext = NULL; + pAccContext = nullptr; } Ruler::Ruler( vcl::Window* pParent, WinBits nWinStyle ) : @@ -291,7 +291,7 @@ Ruler::Ruler( vcl::Window* pParent, WinBits nWinStyle ) : maVirDev( VclPtr<VirtualDevice>::Create(*this) ), maMapMode( MAP_100TH_MM ), mpSaveData(new ImplRulerData), - mpData(NULL), + mpData(nullptr), mpDragData(new ImplRulerData) { // Check to see if the ruler constructor has @@ -331,13 +331,13 @@ void Ruler::dispose() if ( mnUpdateEvtId ) Application::RemoveUserEvent( mnUpdateEvtId ); delete mpSaveData; - mpSaveData = NULL; + mpSaveData = nullptr; delete mpDragData; - mpDragData = NULL; + mpDragData = nullptr; if( pAccContext ) { pAccContext->release(); - pAccContext = NULL; + pAccContext = nullptr; } Window::dispose(); } @@ -861,7 +861,7 @@ void Ruler::ImplDrawIndents(vcl::RenderContext& rRenderContext, long nMin, long if (RULER_INDENT_BORDER != nIndentStyle) { bool bIsHit = false; - if(mxCurrentHitTest.get() != NULL && mxCurrentHitTest->eType == RULER_TYPE_INDENT) + if(mxCurrentHitTest.get() != nullptr && mxCurrentHitTest->eType == RULER_TYPE_INDENT) { bIsHit = mxCurrentHitTest->nAryPos == j; } @@ -2109,7 +2109,7 @@ void Ruler::MouseMove( const MouseEvent& rMEvt ) } } - if (mxPreviousHitTest.get() != NULL && mxPreviousHitTest->eType != mxCurrentHitTest->eType) + if (mxPreviousHitTest.get() != nullptr && mxPreviousHitTest->eType != mxCurrentHitTest->eType) { mbFormat = true; } @@ -2724,7 +2724,7 @@ void Ruler::SetIndents( sal_uInt32 aIndentArraySize, const RulerIndent* pIndentA void Ruler::SetTabs( sal_uInt32 aTabArraySize, const RulerTab* pTabArray ) { - if ( aTabArraySize == 0 || pTabArray == NULL ) + if ( aTabArraySize == 0 || pTabArray == nullptr ) { if ( mpData->pTabs.empty() ) return; diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx index f74ba8c5f276..cc2760efd840 100644 --- a/svtools/source/control/scriptedtext.cxx +++ b/svtools/source/control/scriptedtext.cxx @@ -305,7 +305,7 @@ void SvtScriptedTextHelper_Impl::DrawText( const Point& _rPos ) SvtScriptedTextHelper::SvtScriptedTextHelper( OutputDevice& _rOutDevice ) : - mpImpl( new SvtScriptedTextHelper_Impl( _rOutDevice, NULL, NULL, NULL ) ) + mpImpl( new SvtScriptedTextHelper_Impl( _rOutDevice, nullptr, nullptr, nullptr ) ) { } @@ -326,7 +326,7 @@ void SvtScriptedTextHelper::SetFonts( vcl::Font* _pLatinFont, vcl::Font* _pAsian void SvtScriptedTextHelper::SetDefaultFont() { - mpImpl->SetFonts( NULL, NULL, NULL ); + mpImpl->SetFonts( nullptr, nullptr, nullptr ); } void SvtScriptedTextHelper::SetText( const OUString& _rText, const uno::Reference< i18n::XBreakIterator >& _xBreakIter ) diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index c7fe5c767c06..35a7f1e02321 100644 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.cxx @@ -76,11 +76,11 @@ void ScrollableWindow::Command( const CommandEvent& rCEvt ) if ( aHScroll->IsVisible() ) pHScrBar = aHScroll.get(); else - pHScrBar = NULL; + pHScrBar = nullptr; if ( aVScroll->IsVisible() ) pVScrBar = aVScroll.get(); else - pVScrBar = NULL; + pVScrBar = nullptr; if ( HandleScrollCommand( rCEvt, pHScrBar, pVScrBar ) ) return; } diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index cf006a8e0885..4296dbb3b093 100644 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -102,7 +102,7 @@ void FontNameMenu::SetCurName(const OUString& rName) } FontSizeMenu::FontSizeMenu() -: mpHeightAry( NULL ) +: mpHeightAry( nullptr ) , mnCurHeight( 100 ) { SetMenuFlags( GetMenuFlags() | MenuFlags::NoAutoMnemonics ); diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index dec6f6fd9ef3..eb2f5aacb0a5 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -472,7 +472,7 @@ IMPL_LINK_TYPED( TabBarEdit, ImplEndEditHdl, void*, pCancel, void ) maLoseFocusIdle.Start(); } else - GetParent()->EndEditMode( pCancel != 0 ); + GetParent()->EndEditMode( pCancel != nullptr ); } IMPL_LINK_NOARG_TYPED(TabBarEdit, ImplEndTimerHdl, Idle *, void) @@ -599,7 +599,7 @@ ImplTabBarItem* TabBar::seek( size_t i ) maCurrentItemList = i; return mpImpl->mpItemList[maCurrentItemList]; } - return NULL; + return nullptr; } ImplTabBarItem* TabBar::prev() @@ -608,7 +608,7 @@ ImplTabBarItem* TabBar::prev() { return mpImpl->mpItemList[--maCurrentItemList]; } - return NULL; + return nullptr; } ImplTabBarItem* TabBar::next() @@ -617,7 +617,7 @@ ImplTabBarItem* TabBar::next() { return mpImpl->mpItemList[++maCurrentItemList]; } - return NULL; + return nullptr; } void TabBar::ImplInitSettings( bool bFont, bool bBackground ) @@ -1222,7 +1222,7 @@ void TabBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rect) // Now, start drawing the tabs. ImplTabBarItem* pItem = ImplGetLastTabBarItem(nItemCount); - ImplTabBarItem* pCurItem = NULL; + ImplTabBarItem* pCurItem = nullptr; while (pItem) { // emit CurrentItem last, as it covers all others @@ -1291,7 +1291,7 @@ void TabBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rect) if (bCurrent) break; - pItem = NULL; + pItem = nullptr; } if (!pItem) @@ -1923,7 +1923,7 @@ void TabBar::SetCurPageId(sal_uInt16 nPageId) if (mnCurPageId) pOldItem = mpImpl->mpItemList[GetPagePos(mnCurPageId)]; else - pOldItem = NULL; + pOldItem = nullptr; // deselect previous page if page was not selected, if this is the // only selected page @@ -2176,7 +2176,7 @@ bool TabBar::StartEditMode(sal_uInt16 nPageId) bool TabBar::IsInEditMode() const { - return mpImpl->mpEdit.get() != NULL; + return mpImpl->mpEdit.get() != nullptr; } void TabBar::EndEditMode(bool bCancel) diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index e1871b8c372e..08503e372f1a 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -47,7 +47,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() ) @@ -59,7 +59,7 @@ static vcl::Window* GetTopMostParentSystemWindow( vcl::Window* pWindow ) return pWindow; } - return NULL; + return nullptr; } @@ -74,7 +74,7 @@ void ToolbarMenuEntry::init( int nEntryId, MenuItemBits nBits ) mbChecked = false; mbEnabled = true; - mpControl = NULL; + mpControl = nullptr; } @@ -204,7 +204,7 @@ ToolbarMenu_Impl::ToolbarMenu_Impl( ToolbarMenu& rMenu, const css::uno::Referenc ToolbarMenu_Impl::~ToolbarMenu_Impl() { - setAccessible( 0 ); + setAccessible( nullptr ); } @@ -418,7 +418,7 @@ void ToolbarMenu_Impl::notifyHighlightedEntry() ToolbarMenuEntry* ToolbarMenu_Impl::implGetEntry( int nEntry ) const { if( (nEntry < 0) || (nEntry >= (int)maEntryVector.size() ) ) - return NULL; + return nullptr; return maEntryVector[nEntry]; } @@ -479,7 +479,7 @@ void ToolbarMenu::dispose() } delete mpImpl; - mpImpl = NULL; + mpImpl = nullptr; DockingWindow::dispose(); } @@ -803,7 +803,7 @@ void ToolbarMenu::appendEntry( ToolbarMenuEntry* pEntry ) void ToolbarMenu::appendSeparator() { - appendEntry( 0 ); + appendEntry( nullptr ); } @@ -840,7 +840,7 @@ ToolbarMenuEntry* ToolbarMenu::implSearchEntry( int nEntryId ) const } } - return NULL; + return nullptr; } @@ -945,7 +945,7 @@ void ToolbarMenu::implSelectEntry( int nSelectedEntry ) { mpImpl->mnSelectedEntry = nSelectedEntry; - ToolbarMenuEntry* pEntry = NULL; + ToolbarMenuEntry* pEntry = nullptr; if( nSelectedEntry != -1 ) pEntry = mpImpl->maEntryVector[ nSelectedEntry ]; @@ -1139,7 +1139,7 @@ ToolbarMenuEntry* ToolbarMenu::implCursorUpDown( bool bUp, bool bHomeEnd ) } } while ( n != nLoop ); - return 0; + return nullptr; } @@ -1179,7 +1179,7 @@ void ToolbarMenu_Impl::implHighlightControl( sal_uInt16 nCode, Control* pControl void ToolbarMenu::KeyInput( const KeyEvent& rKEvent ) { - Control* pForwardControl = 0; + Control* pForwardControl = nullptr; sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode(); switch ( nCode ) { @@ -1273,7 +1273,7 @@ static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Wi { const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings(); Color aColor(i_bHighlight ? rSettings.GetMenuHighlightTextColor() : rSettings.GetHighlightColor()); - vcl::RenderTools::DrawSelectionBackground(rRenderContext, rWindow, i_rRect, 0, i_bHighlight, true, false, NULL, 2, &aColor); + vcl::RenderTools::DrawSelectionBackground(rRenderContext, rWindow, i_rRect, 0, i_bHighlight, true, false, nullptr, 2, &aColor); } } @@ -1304,7 +1304,7 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry aPos.Y() += nBorder; aPos.Y() += nStartY; - if ((pEntry == 0) && !pThisOnly) + if ((pEntry == nullptr) && !pThisOnly) { // Separator aTmpPos.Y() = aPos.Y() + ((SEPARATOR_HEIGHT - 2) / 2); diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx index c27c689f665a..73d1cf1108d6 100644 --- a/svtools/source/control/toolbarmenuacc.cxx +++ b/svtools/source/control/toolbarmenuacc.cxx @@ -86,7 +86,7 @@ void ToolbarMenuAcc::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) case VCLEVENT_OBJECT_DYING: { mpParent->mrMenu.RemoveEventListener( LINK( this, ToolbarMenuAcc, WindowEventListener ) ); - mpParent = 0; + mpParent = nullptr; } break; @@ -538,7 +538,7 @@ void SAL_CALL ToolbarMenuAcc::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. @@ -598,7 +598,7 @@ void SAL_CALL ToolbarMenuEntryAcc::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. diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 89eb0756073f..24c3b27edef4 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -40,7 +40,7 @@ ValueSetItem::ValueSetItem( ValueSet& rParent ) , mnId(0) , meType(VALUESETITEM_NONE) , mbVisible(true) - , mpData(NULL) + , mpData(nullptr) , mbSelected(false) , mxAcc() { @@ -130,11 +130,11 @@ ValueSetAcc* ValueSetAcc::getImplementation( const uno::Reference< uno::XInterfa try { uno::Reference< lang::XUnoTunnel > xUnoTunnel( rxData, uno::UNO_QUERY ); - return( xUnoTunnel.is() ? reinterpret_cast<ValueSetAcc*>(sal::static_int_cast<sal_IntPtr>(xUnoTunnel->getSomething( ValueSetAcc::getUnoTunnelId() ))) : NULL ); + return( xUnoTunnel.is() ? reinterpret_cast<ValueSetAcc*>(sal::static_int_cast<sal_IntPtr>(xUnoTunnel->getSomething( ValueSetAcc::getUnoTunnelId() ))) : nullptr ); } catch(const css::uno::Exception&) { - return NULL; + return nullptr; } } @@ -554,7 +554,7 @@ void SAL_CALL ValueSetAcc::selectAccessibleChild( sal_Int32 nChildIndex ) const SolarMutexGuard aSolarGuard; ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex)); - if(pItem != NULL) + if(pItem != nullptr) { mpParent->SelectItem( pItem->mnId ); mpParent->Select (); @@ -573,7 +573,7 @@ sal_Bool SAL_CALL ValueSetAcc::isAccessibleChildSelected( sal_Int32 nChildIndex ValueSetItem* 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(); @@ -683,7 +683,7 @@ void SAL_CALL ValueSetAcc::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. @@ -719,7 +719,7 @@ sal_uInt16 ValueSetAcc::getItemCount() const ValueSetItem* ValueSetAcc::getItem (sal_uInt16 nIndex) const { - ValueSetItem* pItem = NULL; + ValueSetItem* pItem = nullptr; if (HasNoneField()) { @@ -730,7 +730,7 @@ ValueSetItem* ValueSetAcc::getItem (sal_uInt16 nIndex) const // Shift down the index to compensate for the none field. nIndex -= 1; } - if (pItem == NULL) + if (pItem == nullptr) pItem = mpParent->ImplGetItem (static_cast<sal_uInt16>(nIndex)); return pItem; @@ -797,7 +797,7 @@ void ValueItemAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOldValu void ValueItemAcc::ParentDestroyed() { const ::osl::MutexGuard aGuard( maMutex ); - mpParent = NULL; + mpParent = nullptr; } namespace @@ -818,11 +818,11 @@ ValueItemAcc* ValueItemAcc::getImplementation( const uno::Reference< uno::XInter try { uno::Reference< lang::XUnoTunnel > xUnoTunnel( rxData, uno::UNO_QUERY ); - return( xUnoTunnel.is() ? reinterpret_cast<ValueItemAcc*>(sal::static_int_cast<sal_IntPtr>(xUnoTunnel->getSomething( ValueItemAcc::getUnoTunnelId() ))) : NULL ); + return( xUnoTunnel.is() ? reinterpret_cast<ValueItemAcc*>(sal::static_int_cast<sal_IntPtr>(xUnoTunnel->getSomething( ValueItemAcc::getUnoTunnelId() ))) : nullptr ); } catch(const css::uno::Exception&) { - return NULL; + return nullptr; } } @@ -890,11 +890,11 @@ sal_Int32 SAL_CALL ValueItemAcc::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/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 5f780ca34592..5696b8ac4a41 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -57,8 +57,8 @@ enum void ValueSet::ImplInit() { - mpNoneItem.reset(NULL); - mxScrollBar.reset(NULL); + mpNoneItem.reset(nullptr); + mxScrollBar.reset(nullptr); mnItemWidth = 0; mnItemHeight = 0; @@ -408,7 +408,7 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext) nNoneSpace = 0; if (mpNoneItem.get()) - mpNoneItem.reset(NULL); + mpNoneItem.reset(nullptr); } // calculate ScrollBar width @@ -585,7 +585,7 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext) // create NoSelection field and show it if (nStyle & WB_NONEFIELD) { - if (mpNoneItem.get() == NULL) + if (mpNoneItem.get() == nullptr) mpNoneItem.reset(new ValueSetItem(*this)); mpNoneItem->mnId = 0; @@ -910,7 +910,7 @@ void ValueSet::ImplHideSelect( sal_uInt16 nItemId ) } else { - if (mpNoneItem.get() == NULL) + if (mpNoneItem.get() == nullptr) { return; } @@ -1079,12 +1079,12 @@ ValueSetItem* ValueSet::ImplGetItem( size_t nPos ) if (nPos == VALUESET_ITEM_NONEITEM) return mpNoneItem.get(); else - return (nPos < mItemList.size()) ? mItemList[nPos] : NULL; + return (nPos < mItemList.size()) ? mItemList[nPos] : nullptr; } ValueSetItem* ValueSet::ImplGetFirstItem() { - return mItemList.size() ? mItemList[0] : NULL; + return mItemList.size() ? mItemList[0] : nullptr; } sal_uInt16 ValueSet::ImplGetVisibleItemCount() const @@ -1169,7 +1169,7 @@ void ValueSet::ImplEndTracking( const Point& rPos, bool bCancel ) // restore the old status in case of termination if ( bCancel ) - pItem = NULL; + pItem = nullptr; else pItem = ImplGetItem( ImplGetItem( rPos ) ); @@ -1419,7 +1419,7 @@ void ValueSet::Command( const CommandEvent& rCommandEvent ) rCommandEvent.GetCommand() == CommandEventId::StartAutoScroll || rCommandEvent.GetCommand() == CommandEventId::AutoScroll ) { - if ( HandleScrollCommand( rCommandEvent, NULL, mxScrollBar.get() ) ) + if ( HandleScrollCommand( rCommandEvent, nullptr, mxScrollBar.get() ) ) return; } @@ -1896,8 +1896,8 @@ void ValueSet::SelectItem( sal_uInt16 nItemId ) else pItem = mpNoneItem.get(); - ValueItemAcc* pItemAcc = NULL; - if (pItem != NULL) + ValueItemAcc* pItemAcc = nullptr; + if (pItem != nullptr) pItemAcc = ValueItemAcc::getImplementation( pItem->GetAccessible( mbIsTransientChildrenDisabled ) ); if( pItemAcc ) @@ -2024,7 +2024,7 @@ void* ValueSet::GetItemData( sal_uInt16 nItemId ) const if ( nPos != VALUESET_ITEM_NOTFOUND ) return mItemList[nPos]->mpData; else - return NULL; + return nullptr; } void ValueSet::SetItemText(sal_uInt16 nItemId, const OUString& rText) diff --git a/svtools/source/control/vclxaccessibleheaderbar.cxx b/svtools/source/control/vclxaccessibleheaderbar.cxx index aa1470553671..7430cbd5153c 100644 --- a/svtools/source/control/vclxaccessibleheaderbar.cxx +++ b/svtools/source/control/vclxaccessibleheaderbar.cxx @@ -54,7 +54,7 @@ css::uno::Reference< css::accessibility::XAccessibleContext > VCLXHeaderBar::Cre VCLXAccessibleHeaderBar::VCLXAccessibleHeaderBar( VCLXWindow* pVCLWindow ) :VCLXAccessibleComponent( pVCLWindow ) - ,m_pHeadBar(NULL) + ,m_pHeadBar(nullptr) { m_pHeadBar = GetAs< HeaderBar >(); } diff --git a/svtools/source/control/vclxaccessibleheaderbaritem.cxx b/svtools/source/control/vclxaccessibleheaderbaritem.cxx index c55bf0be9e73..fd4fe47d9268 100644 --- a/svtools/source/control/vclxaccessibleheaderbaritem.cxx +++ b/svtools/source/control/vclxaccessibleheaderbaritem.cxx @@ -58,7 +58,7 @@ VCLXAccessibleHeaderBarItem::VCLXAccessibleHeaderBarItem( HeaderBar* pHeadBar VCLXAccessibleHeaderBarItem::~VCLXAccessibleHeaderBarItem() { delete m_pExternalLock; - m_pExternalLock = NULL; + m_pExternalLock = nullptr; } void VCLXAccessibleHeaderBarItem::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index 02f933cc5876..19634b7990b3 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -297,7 +297,7 @@ IMPL_LINK_NOARG_TYPED( PlaceEditDialog, ModifyHdl, Edit&, void ) IMPL_LINK_NOARG_TYPED( PlaceEditDialog, EditLabelHdl, Edit&, void ) { bLabelChanged = true; - EditHdl(NULL); + EditHdl(nullptr); } IMPL_LINK_NOARG_TYPED( PlaceEditDialog, EditUsernameHdl, Edit&, void ) @@ -309,7 +309,7 @@ IMPL_LINK_NOARG_TYPED( PlaceEditDialog, EditUsernameHdl, Edit&, void ) ( *it )->setPassword( m_pEDPassword->GetText() ); } - EditHdl(NULL); + EditHdl(nullptr); } IMPL_LINK_NOARG_TYPED( PlaceEditDialog, SelectTypeHdl, ListBox&, void ) @@ -339,7 +339,7 @@ IMPL_LINK_NOARG_TYPED( PlaceEditDialog, SelectTypeHdl, ListBox&, void ) SetSizePixel(GetOptimalSize()); - EditHdl(NULL); + EditHdl(nullptr); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index 7e2aa397a622..dc84d71146f0 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -282,7 +282,7 @@ CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder, OUStr { Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< XInteractionHandler > xGlobalInteractionHandler( - InteractionHandler::createWithParent(xContext, 0), UNO_QUERY ); + InteractionHandler::createWithParent(xContext, nullptr), UNO_QUERY ); m_xCmdEnv = new ucbhelper::CommandEnvironment( xGlobalInteractionHandler, Reference< XProgressHandler >() ); pBuilder->get( m_pFTRepository, "repositoryLabel" ); @@ -437,7 +437,7 @@ IMPL_LINK_NOARG_TYPED( CmisDetailsContainer, RefreshReposHdl, Button*, void ) if( !sUrl.isEmpty() && !m_sUsername.isEmpty() && !m_sPassword.isEmpty() ) { Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent( xContext, 0 ), + InteractionHandler::createWithParent( xContext, nullptr ), UNO_QUERY ); Sequence< OUString > aPasswd( 1 ); diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 1f19223ff404..6ca87a9b625d 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -653,7 +653,7 @@ void AssignmentPersistentData::ImplCommit() for (sal_Int32 i = 0; i<nAdjustedTokenCount; ++i) m_pImpl->aLogicalFieldNames.push_back(sLogicalFieldNames.getToken(i, ';')); - PostUserEvent(LINK(this, AddressBookSourceDialog, OnDelayedInitialize), NULL, true); + PostUserEvent(LINK(this, AddressBookSourceDialog, OnDelayedInitialize), nullptr, true); // so the dialog will at least show up before we do the loading of the // configuration data and the (maybe time consuming) analysis of the data source/table to select @@ -804,7 +804,7 @@ void AssignmentPersistentData::ImplCommit() try { xHandler.set( - InteractionHandler::createWithParent(m_xORB, 0), + InteractionHandler::createWithParent(m_xORB, nullptr), UNO_QUERY_THROW ); } catch(const Exception&) { } @@ -820,7 +820,7 @@ void AssignmentPersistentData::ImplCommit() m_pTable->Clear(); - m_xCurrentDatasourceTables= NULL; + m_xCurrentDatasourceTables= nullptr; // get the tables of the connection Sequence< OUString > aTableNames; diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index e7aec0197af7..877c7eadaa0b 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -62,7 +62,7 @@ const SvObjectServer * SvObjectServerList::Get( const OUString & rHumanName ) co if( rHumanName == aObjectServerList[ i ].GetHumanName() ) return &aObjectServerList[ i ]; } - return NULL; + return nullptr; } const SvObjectServer * SvObjectServerList::Get( const SvGlobalName & rName ) const @@ -72,7 +72,7 @@ const SvObjectServer * SvObjectServerList::Get( const SvGlobalName & rName ) con if( rName == aObjectServerList[ i ].GetClassName() ) return &aObjectServerList[ i ]; } - return NULL; + return nullptr; } void SvObjectServerList::Remove( const SvGlobalName & rName ) diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index 505fc3124f3d..ef75158c66d0 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -233,8 +233,8 @@ PrinterSetupDialog::PrinterSetupDialog(vcl::Window* pParent) // show options button only if link is set m_pBtnOptions->Hide(); - mpPrinter = NULL; - mpTempPrinter = NULL; + mpPrinter = nullptr; + mpTempPrinter = nullptr; maStatusTimer.SetTimeout( IMPL_PRINTDLG_STATUS_UPDATE ); maStatusTimer.SetTimeoutHdl( LINK( this, PrinterSetupDialog, ImplStatusHdl ) ); diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index 5993e2bad133..eb0730cbb7b5 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -61,7 +61,7 @@ namespace svt bool bActivePathIsDefinite; RoadmapWizardImpl() - :pRoadmap( NULL ) + :pRoadmap( nullptr ) ,nActivePath( -1 ) ,bActivePathIsDefinite( false ) { @@ -153,7 +153,7 @@ namespace svt void RoadmapWizard::dispose() { delete m_pImpl; - m_pImpl = NULL; + m_pImpl = nullptr; OWizardMachine::dispose(); } @@ -307,7 +307,7 @@ namespace svt if ( pCurrentPage ) { const IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) ); - OSL_ENSURE( pController != NULL, "RoadmapWizard::implUpdateRoadmap: no controller for the current page!" ); + OSL_ENSURE( pController != nullptr, "RoadmapWizard::implUpdateRoadmap: no controller for the current page!" ); bCurrentPageCanAdvance = !pController || pController->canAdvance(); } diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 458598b3e673..f987cbd28b80 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -108,11 +108,11 @@ namespace svt OWizardMachine::OWizardMachine(vcl::Window* _pParent, const WinBits i_nStyle, WizardButtonFlags _nButtonFlags ) :WizardDialog( _pParent, i_nStyle ) - ,m_pFinish(NULL) - ,m_pCancel(NULL) - ,m_pNextPage(NULL) - ,m_pPrevPage(NULL) - ,m_pHelp(NULL) + ,m_pFinish(nullptr) + ,m_pCancel(nullptr) + ,m_pNextPage(nullptr) + ,m_pPrevPage(nullptr) + ,m_pHelp(nullptr) ,m_pImpl( new WizardMachineImplData ) { implConstruct( _nButtonFlags ); @@ -120,11 +120,11 @@ namespace svt OWizardMachine::OWizardMachine(vcl::Window* _pParent, WizardButtonFlags _nButtonFlags ) :WizardDialog( _pParent, "WizardDialog", "svt/ui/wizarddialog.ui" ) - ,m_pFinish(NULL) - ,m_pCancel(NULL) - ,m_pNextPage(NULL) - ,m_pPrevPage(NULL) - ,m_pHelp(NULL) + ,m_pFinish(nullptr) + ,m_pCancel(nullptr) + ,m_pNextPage(nullptr) + ,m_pPrevPage(nullptr) + ,m_pHelp(nullptr) ,m_pImpl( new WizardMachineImplData ) { implConstruct( _nButtonFlags ); @@ -222,7 +222,7 @@ namespace svt pPage->disposeOnce(); } delete m_pImpl; - m_pImpl = NULL; + m_pImpl = nullptr; } WizardDialog::dispose(); @@ -253,7 +253,7 @@ namespace svt TabPage* OWizardMachine::GetOrCreatePage( const WizardState i_nState ) { - if ( NULL == GetPage( i_nState ) ) + if ( nullptr == GetPage( i_nState ) ) { TabPage* pNewPage = createPage( i_nState ); DBG_ASSERT( pNewPage, "OWizardMachine::GetOrCreatePage: invalid new page (NULL)!" ); @@ -261,7 +261,7 @@ namespace svt // fill up the page sequence of our base class (with dummies) while ( m_pImpl->nFirstUnknownPage < i_nState ) { - AddPage( NULL ); + AddPage( nullptr ); ++m_pImpl->nFirstUnknownPage; } @@ -302,7 +302,7 @@ namespace svt void OWizardMachine::defaultButton(WizardButtonFlags _nWizardButtonFlags) { // the new default button - PushButton* pNewDefButton = NULL; + PushButton* pNewDefButton = nullptr; if (m_pFinish && (_nWizardButtonFlags & WizardButtonFlags::FINISH)) pNewDefButton = m_pFinish; if (m_pNextPage && (_nWizardButtonFlags & WizardButtonFlags::NEXT)) @@ -434,7 +434,7 @@ namespace svt bool OWizardMachine::prepareLeaveCurrentState( CommitPageReason _eReason ) { IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) ); - ENSURE_OR_RETURN( pController != NULL, "OWizardMachine::prepareLeaveCurrentState: no controller for the current page!", true ); + ENSURE_OR_RETURN( pController != nullptr, "OWizardMachine::prepareLeaveCurrentState: no controller for the current page!", true ); return pController->commitPage( _eReason ); } @@ -674,7 +674,7 @@ namespace svt void OWizardMachine::updateTravelUI() { const IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) ); - OSL_ENSURE( pController != NULL, "RoadmapWizard::updateTravelUI: no controller for the current page!" ); + OSL_ENSURE( pController != nullptr, "RoadmapWizard::updateTravelUI: no controller for the current page!" ); bool bCanAdvance = ( !pController || pController->canAdvance() ) // the current page allows to advance diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 185725bcda3b..ee6f7ec44dec 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -50,12 +50,12 @@ struct ImplWizButtonData void WizardDialog::ImplInitData() { - mpFirstPage = NULL; - mpFirstBtn = NULL; - mpCurTabPage = NULL; - mpPrevBtn = NULL; - mpNextBtn = NULL; - mpViewWindow = NULL; + mpFirstPage = nullptr; + mpFirstBtn = nullptr; + mpCurTabPage = nullptr; + mpPrevBtn = nullptr; + mpNextBtn = nullptr; + mpViewWindow = nullptr; mnCurLevel = 0; meViewAlign = WindowAlign::Left; mbEmptyViewMargin = false; @@ -343,7 +343,7 @@ TabPage* WizardDialog::ImplGetPage( sal_uInt16 nLevel ) const if ( pPageData ) return pPageData->mpPage; - return NULL; + return nullptr; } WizardDialog::WizardDialog( vcl::Window* pParent, WinBits nStyle ) : @@ -550,7 +550,7 @@ bool WizardDialog::Finish( long nResult ) void WizardDialog::AddPage( TabPage* pPage ) { ImplWizPageData* pNewPageData = new ImplWizPageData; - pNewPageData->mpNext = NULL; + pNewPageData->mpNext = nullptr; pNewPageData->mpPage = pPage; if ( !mpFirstPage ) @@ -568,7 +568,7 @@ void WizardDialog::AddPage( TabPage* pPage ) void WizardDialog::RemovePage( TabPage* pPage ) { - ImplWizPageData* pPrevPageData = NULL; + ImplWizPageData* pPrevPageData = nullptr; ImplWizPageData* pPageData = mpFirstPage; while ( pPageData ) { @@ -579,7 +579,7 @@ void WizardDialog::RemovePage( TabPage* pPage ) else mpFirstPage = pPageData->mpNext; if ( pPage == mpCurTabPage ) - mpCurTabPage = NULL; + mpCurTabPage = nullptr; delete pPageData; return; } @@ -609,7 +609,7 @@ void WizardDialog::SetPage( sal_uInt16 nLevel, TabPage* pPage ) if ( pPageData ) { if ( pPageData->mpPage == mpCurTabPage ) - mpCurTabPage = NULL; + mpCurTabPage = nullptr; pPageData->mpPage = pPage; } } @@ -628,7 +628,7 @@ TabPage* WizardDialog::GetPage( sal_uInt16 nLevel ) const nTempLevel++; } - return NULL; + return nullptr; } @@ -636,7 +636,7 @@ TabPage* WizardDialog::GetPage( sal_uInt16 nLevel ) const void WizardDialog::AddButton( Button* pButton, long nOffset ) { ImplWizButtonData* pNewBtnData = new ImplWizButtonData; - pNewBtnData->mpNext = NULL; + pNewBtnData->mpNext = nullptr; pNewBtnData->mpButton = pButton; pNewBtnData->mnOffset = nOffset; @@ -655,7 +655,7 @@ void WizardDialog::AddButton( Button* pButton, long nOffset ) void WizardDialog::RemoveButton( Button* pButton ) { - ImplWizButtonData* pPrevBtnData = NULL; + ImplWizButtonData* pPrevBtnData = nullptr; ImplWizButtonData* pBtnData = mpFirstBtn; while ( pBtnData ) { diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx index 4877fee8e921..e1083e21b075 100644 --- a/svtools/source/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter/SvFilterOptionsDialog.cxx @@ -247,7 +247,7 @@ sal_Int16 SvFilterOptionsDialog::execute() } if ( nFormat < nFilterCount ) { - FltCallDialogParameter aFltCallDlgPara( Application::GetDefDialogParent(), NULL, meFieldUnit ); + FltCallDialogParameter aFltCallDlgPara( Application::GetDefDialogParent(), nullptr, meFieldUnit ); aFltCallDlgPara.aFilterData = maFilterDataSequence; std::unique_ptr<ResMgr> pResMgr(ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag() )); diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index 930684f86eae..ebe0d29e2c1a 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -502,7 +502,7 @@ Bitmap ExportDialog::GetGraphicBitmap( SvStream& rInputStream ) Bitmap aRet; Graphic aGraphic; GraphicFilter aFilter( false ); - if ( aFilter.ImportGraphic( aGraphic, "", rInputStream, GRFILTER_FORMAT_NOTFOUND, NULL, GraphicFilterImportFlags::NONE, static_cast<css::uno::Sequence< css::beans::PropertyValue >*>(NULL) ) == GRFILTER_OK ) + if ( aFilter.ImportGraphic( aGraphic, "", rInputStream, GRFILTER_FORMAT_NOTFOUND, nullptr, GraphicFilterImportFlags::NONE, static_cast<css::uno::Sequence< css::beans::PropertyValue >*>(nullptr) ) == GRFILTER_OK ) { aRet = aGraphic.GetBitmap(); } @@ -558,8 +558,8 @@ ExportDialog::ExportDialog(FltCallDialogParameter& rPara, , mrFltCallPara(rPara) , mxContext(rxContext) , mxSourceDocument(rxSourceDocument) - , mpSbCompression(NULL) - , mpNfCompression(NULL) + , mpSbCompression(nullptr) + , mpNfCompression(nullptr) , msEstimatedSizePix1(SVT_RESSTR(STR_SVT_ESTIMATED_SIZE_PIX_1)) , msEstimatedSizePix2(SVT_RESSTR(STR_SVT_ESTIMATED_SIZE_PIX_2)) , msEstimatedSizeVec(SVT_RESSTR(STR_SVT_ESTIMATED_SIZE_VEC)) diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index 6db1ffa47839..eff107dd3a02 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -54,7 +54,7 @@ namespace unographic { GraphicDescriptor::GraphicDescriptor() : ::comphelper::PropertySetHelper( createPropertySetInfo(), SAL_NO_ACQUIRE ), - mpGraphic( NULL ), + mpGraphic( nullptr ), meType( GRAPHIC_NONE ), mnBitsPerPixel ( 0 ), mbTransparent ( false ), @@ -96,7 +96,7 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL ) aURL = *pURL; ::GraphicDescriptor aDescriptor( rIStm, &aURL ); - mpGraphic = NULL; + mpGraphic = nullptr; maMimeType.clear(); meType = GRAPHIC_NONE; mnBitsPerPixel = 0; @@ -104,7 +104,7 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL ) if( aDescriptor.Detect( true ) && aDescriptor.GetFileFormat() != GraphicFileFormat::NOT ) { - const char* pMimeType = NULL; + const char* pMimeType = nullptr; sal_uInt8 cType = graphic::GraphicType::EMPTY; switch( aDescriptor.GetFileFormat() ) @@ -351,7 +351,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** case( GFX_LINK_TYPE_NATIVE_SVG ): pMimeType = MIMETYPE_SVG; break; default: - pMimeType = NULL; + pMimeType = nullptr; break; } diff --git a/svtools/source/graphic/graphic.cxx b/svtools/source/graphic/graphic.cxx index 1a29182b45a1..980f04bc11d1 100644 --- a/svtools/source/graphic/graphic.cxx +++ b/svtools/source/graphic/graphic.cxx @@ -34,7 +34,7 @@ using namespace com::sun::star; namespace unographic { Graphic::Graphic() : - mpGraphic( NULL ) + mpGraphic( nullptr ) { } @@ -237,7 +237,7 @@ const ::Graphic* Graphic::getImplementation( const uno::Reference< uno::XInterfa throw() { uno::Reference< lang::XUnoTunnel > xTunnel( rxIFace, uno::UNO_QUERY ); - return( xTunnel.is() ? reinterpret_cast< ::Graphic* >( xTunnel->getSomething( ::Graphic::getUnoTunnelId() ) ) : NULL ); + return( xTunnel.is() ? reinterpret_cast< ::Graphic* >( xTunnel->getSomething( ::Graphic::getUnoTunnelId() ) ) : nullptr ); } diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 9d0e6c58ed1c..fd30407e1db7 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -178,9 +178,9 @@ public: GraphicCacheEntry::GraphicCacheEntry( const GraphicObject& rObj ) : maID ( rObj ), - mpBmpEx ( NULL ), - mpMtf ( NULL ), - mpAnimation ( NULL ), + mpBmpEx ( nullptr ), + mpMtf ( nullptr ), + mpAnimation ( nullptr ), mbSwappedAll ( true ) { mbSwappedAll = !ImplInit( rObj ); @@ -208,13 +208,13 @@ bool GraphicCacheEntry::ImplInit( const GraphicObject& rObj ) const Graphic& rGraphic = rObj.GetGraphic(); if( mpBmpEx ) - delete mpBmpEx, mpBmpEx = NULL; + delete mpBmpEx, mpBmpEx = nullptr; if( mpMtf ) - delete mpMtf, mpMtf = NULL; + delete mpMtf, mpMtf = nullptr; if( mpAnimation ) - delete mpAnimation, mpAnimation = NULL; + delete mpAnimation, mpAnimation = nullptr; switch( rGraphic.GetType() ) { @@ -361,9 +361,9 @@ void GraphicCacheEntry::GraphicObjectWasSwappedOut( const GraphicObject& /*rObj* if( mbSwappedAll ) { - delete mpBmpEx, mpBmpEx = NULL; - delete mpMtf, mpMtf = NULL; - delete mpAnimation, mpAnimation = NULL; + delete mpBmpEx, mpBmpEx = nullptr; + delete mpMtf, mpMtf = nullptr; + delete mpAnimation, mpAnimation = nullptr; // #119176# also reset SvgData maSvgData.reset(); @@ -408,7 +408,7 @@ public: const GraphicObject& rObj, const GraphicAttr& rAttr, const BitmapEx& rBmpEx ) : mpRefCacheEntry( pRefCacheEntry ), - mpMtf( NULL ), mpBmpEx( new BitmapEx( rBmpEx ) ), + mpMtf( nullptr ), mpBmpEx( new BitmapEx( rBmpEx ) ), maAttr( rAttr ), maOutSizePix( pOut->LogicToPixel( rSz ) ), mnCacheSize( GetNeededSize( pOut, rPt, rSz, rObj, rAttr ) ), mnOutDevDrawMode( pOut->GetDrawMode() ), @@ -421,7 +421,7 @@ public: const GraphicObject& rObj, const GraphicAttr& rAttr, const GDIMetaFile& rMtf ) : mpRefCacheEntry( pRefCacheEntry ), - mpMtf( new GDIMetaFile( rMtf ) ), mpBmpEx( NULL ), + mpMtf( new GDIMetaFile( rMtf ) ), mpBmpEx( nullptr ), maAttr( rAttr ), maOutSizePix( pOut->LogicToPixel( rSz ) ), mnCacheSize( GetNeededSize( pOut, rPt, rSz, rObj, rAttr ) ), mnOutDevDrawMode( pOut->GetDrawMode() ), @@ -984,7 +984,7 @@ void GraphicCache::GraphicObjectWasSwappedIn( const GraphicObject& rObj ) if( pEntry->GetID().IsEmpty() ) { ReleaseGraphicObject( rObj ); - AddGraphicObject( rObj, (Graphic&) rObj.GetGraphic(), NULL, NULL ); + AddGraphicObject( rObj, (Graphic&) rObj.GetGraphic(), nullptr, nullptr ); } else pEntry->GraphicObjectWasSwappedIn( rObj ); @@ -1160,7 +1160,7 @@ bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co const Point aPtPixel( pOut->LogicToPixel( rPt ) ); const Size aSzPixel( pOut->LogicToPixel( rSz ) ); const GraphicCacheEntry* pCacheEntry = ImplGetCacheEntry( rObj ); - GraphicDisplayCacheEntry* pDisplayCacheEntry = NULL; + GraphicDisplayCacheEntry* pDisplayCacheEntry = nullptr; GraphicDisplayCacheEntryList::iterator it = maDisplayCache.begin(); bool bRet = false; @@ -1224,7 +1224,7 @@ bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ) GraphicCacheEntry* GraphicCache::ImplGetCacheEntry( const GraphicObject& rObj ) { - GraphicCacheEntry* pRet = NULL; + GraphicCacheEntry* pRet = nullptr; for( GraphicCacheEntryList::iterator it = maGraphicCache.begin(); diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 9289c43421b0..eef174cba873 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -46,7 +46,7 @@ using com::sun::star::uno::Sequence; using com::sun::star::container::XNameContainer; using com::sun::star::beans::XPropertySet; -GraphicManager* GraphicObject::mpGlobalMgr = NULL; +GraphicManager* GraphicObject::mpGlobalMgr = nullptr; struct GrfSimpleCacheObj { @@ -99,7 +99,7 @@ GraphicObject::GraphicObject( const GraphicObject& rGraphicObj, const GraphicMan { ImplConstruct(); ImplAssignGraphicData(); - ImplSetGraphicManager( pMgr, NULL, &rGraphicObj ); + ImplSetGraphicManager( pMgr, nullptr, &rGraphicObj ); if( rGraphicObj.HasUserData() && rGraphicObj.IsSwappedOut() ) SetSwapState(); } @@ -126,7 +126,7 @@ GraphicObject::~GraphicObject() mpMgr->ImplUnregisterObj( *this ); if( ( mpMgr == mpGlobalMgr ) && !mpGlobalMgr->ImplHasObjects() ) - delete mpGlobalMgr, mpGlobalMgr = NULL; + delete mpGlobalMgr, mpGlobalMgr = nullptr; } delete mpSwapOutTimer; @@ -135,10 +135,10 @@ GraphicObject::~GraphicObject() void GraphicObject::ImplConstruct() { - mpMgr = NULL; + mpMgr = nullptr; maSwapStreamHdl = Link<const GraphicObject*, SvStream*>(); - mpSwapOutTimer = NULL; - mpSimpleCache = NULL; + mpSwapOutTimer = nullptr; + mpSimpleCache = nullptr; mnAnimationLoopCount = 0; mbAutoSwapped = false; mbIsInSwapIn = false; @@ -177,7 +177,7 @@ void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const OSt mpMgr->ImplUnregisterObj( *this ); if( ( mpMgr == mpGlobalMgr ) && !mpGlobalMgr->ImplHasObjects() ) - delete mpGlobalMgr, mpGlobalMgr = NULL; + delete mpGlobalMgr, mpGlobalMgr = nullptr; } if( !pMgr ) @@ -350,7 +350,7 @@ GraphicObject& GraphicObject::operator=( const GraphicObject& rGraphicObj ) mpMgr->ImplUnregisterObj( *this ); maSwapStreamHdl = Link<const GraphicObject*, SvStream*>(); - delete mpSimpleCache, mpSimpleCache = NULL; + delete mpSimpleCache, mpSimpleCache = nullptr; maGraphic = rGraphicObj.GetGraphic(); maAttr = rGraphicObj.maAttr; @@ -359,7 +359,7 @@ GraphicObject& GraphicObject::operator=( const GraphicObject& rGraphicObj ) ImplAssignGraphicData(); mbAutoSwapped = false; mpMgr = rGraphicObj.mpMgr; - mpMgr->ImplRegisterObj( *this, maGraphic, NULL, &rGraphicObj ); + mpMgr->ImplRegisterObj( *this, maGraphic, nullptr, &rGraphicObj ); if( rGraphicObj.HasUserData() && rGraphicObj.IsSwappedOut() ) SetSwapState(); } @@ -400,7 +400,7 @@ void GraphicObject::SetAttr( const GraphicAttr& rAttr ) maAttr = rAttr; if( mpSimpleCache && ( mpSimpleCache->maAttr != rAttr ) ) - delete mpSimpleCache, mpSimpleCache = NULL; + delete mpSimpleCache, mpSimpleCache = nullptr; } void GraphicObject::SetLink() @@ -454,7 +454,7 @@ void GraphicObject::SetSwapStreamHdl(const Link<const GraphicObject*, SvStream*> mpSwapOutTimer->Start(); } else - delete mpSwapOutTimer, mpSwapOutTimer = NULL; + delete mpSwapOutTimer, mpSwapOutTimer = nullptr; } void GraphicObject::FireSwapInRequest() @@ -464,14 +464,14 @@ void GraphicObject::FireSwapInRequest() void GraphicObject::FireSwapOutRequest() { - ImplAutoSwapOutHdl( NULL ); + ImplAutoSwapOutHdl( nullptr ); } void GraphicObject::GraphicManagerDestroyed() { // we're alive, but our manager doesn't live anymore ==> connect to default manager - mpMgr = NULL; - ImplSetGraphicManager( NULL ); + mpMgr = nullptr; + ImplSetGraphicManager( nullptr ); } bool GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz, @@ -577,7 +577,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, bool GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize, const Size& rOffset, const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags, int nTileCacheSize1D ) { - if( pOut == NULL || rSize.Width() == 0 || rSize.Height() == 0 ) + if( pOut == nullptr || rSize.Width() == 0 || rSize.Height() == 0 ) return false; const MapMode aOutMapMode( pOut->GetMapMode() ); @@ -684,9 +684,9 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pC mbAutoSwapped = false; ImplAssignGraphicData(); maLink.clear(); - delete mpSimpleCache, mpSimpleCache = NULL; + delete mpSimpleCache, mpSimpleCache = nullptr; - mpMgr->ImplRegisterObj( *this, maGraphic, 0, pCopyObj); + mpMgr->ImplRegisterObj( *this, maGraphic, nullptr, pCopyObj); if( mpSwapOutTimer ) mpSwapOutTimer->Start(); diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index c6eae94a354b..45176740e8d0 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -794,9 +794,9 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib Bitmap aMsk( rBmpEx.GetMask() ); const BitmapColor aB( pWriteAccess->GetBestMatchingColor( Color( COL_BLACK ) ) ); const BitmapColor aW( pWriteAccess->GetBestMatchingColor( Color( COL_WHITE ) ) ); - BitmapReadAccess* pMAcc = NULL; + BitmapReadAccess* pMAcc = nullptr; - if( !aMsk || ( ( pMAcc = aMsk.AcquireReadAccess() ) != NULL ) ) + if( !aMsk || ( ( pMAcc = aMsk.AcquireReadAccess() ) != nullptr ) ) { std::unique_ptr<long[]> pMapLX(new long[ aUnrotatedWidth ]); std::unique_ptr<long[]> pMapLY(new long[ aUnrotatedHeight ]); @@ -1126,7 +1126,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, for( nCurPos = 0, pAct = rOutMtf.FirstAction(); pAct; pAct = rOutMtf.NextAction(), nCurPos++ ) { - MetaAction* pModAct = NULL; + MetaAction* pModAct = nullptr; switch( pAct->GetType() ) { case MetaActionType::FONT: @@ -1992,7 +1992,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel, int nX, nY; // #107607# Use logical coordinates for metafile playing, too - bool bDrawInPixel( rOut.GetConnectMetaFile() == NULL && GRAPHIC_BITMAP == GetType() ); + bool bDrawInPixel( rOut.GetConnectMetaFile() == nullptr && GRAPHIC_BITMAP == GetType() ); bool bRet = false; // #105229# Switch off mapping (converting to logic and back to diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index ca850ebc1714..d13cae8b7474 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -481,12 +481,12 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co aExtHeader.xExt = nExtWidth; aExtHeader.yExt = nExtHeight; aExtHeader.mapMode = nExtMapMode; - WMF_EXTERNALHEADER *pExtHeader = NULL; + WMF_EXTERNALHEADER *pExtHeader = nullptr; if ( nExtMapMode > 0 ) pExtHeader = &aExtHeader; if( ( rFilter.ImportGraphic( aVCLGraphic, aPath, *pIStm, - GRFILTER_FORMAT_DONTKNOW, NULL, GraphicFilterImportFlags::NONE, pExtHeader ) == GRFILTER_OK ) && + GRFILTER_FORMAT_DONTKNOW, nullptr, GraphicFilterImportFlags::NONE, pExtHeader ) == GRFILTER_OK ) && ( aVCLGraphic.GetType() != GRAPHIC_NONE ) ) { ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic; @@ -758,7 +758,7 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG if( pOStm ) { uno::Sequence< beans::PropertyValue > aFilterDataSeq; - const char* pFilterShortName = NULL; + const char* pFilterShortName = nullptr; for( i = 0; i < rMediaProperties.getLength(); ++i ) { @@ -837,7 +837,7 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG { rFilter.ExportGraphic( aGraphic, aPath, aMemStrm, rFilter.GetExportFormatNumberForShortName( OUString::createFromAscii( pFilterShortName ) ), - ( aFilterDataSeq.getLength() ? &aFilterDataSeq : NULL ) ); + ( aFilterDataSeq.getLength() ? &aFilterDataSeq : nullptr ) ); } aMemStrm.Seek( STREAM_SEEK_TO_END ); pOStm->Write( aMemStrm.GetData(), aMemStrm.Tell() ); diff --git a/svtools/source/graphic/renderer.cxx b/svtools/source/graphic/renderer.cxx index 297166fb858c..593f8e12b504 100644 --- a/svtools/source/graphic/renderer.cxx +++ b/svtools/source/graphic/renderer.cxx @@ -44,7 +44,7 @@ namespace { GraphicRendererVCL::GraphicRendererVCL() : ::comphelper::PropertySetHelper( createPropertySetInfo() ), - mpOutDev( NULL ) + mpOutDev( nullptr ) { } @@ -200,7 +200,7 @@ void GraphicRendererVCL::_setPropertyValues( const comphelper::PropertyMapEntry* else { mxDevice.clear(); - mpOutDev = NULL; + mpOutDev = nullptr; } } break; diff --git a/svtools/source/hatchwindow/documentcloser.cxx b/svtools/source/hatchwindow/documentcloser.cxx index 1e6afc1c1558..fd7de2b4ba8d 100644 --- a/svtools/source/hatchwindow/documentcloser.cxx +++ b/svtools/source/hatchwindow/documentcloser.cxx @@ -90,10 +90,10 @@ void MainThreadFrameCloserRequest::Start( MainThreadFrameCloserRequest* pMTReque if ( Application::GetMainThreadIdentifier() == osl::Thread::getCurrentIdentifier() ) { // this is the main thread - worker( NULL, pMTRequest ); + worker( nullptr, pMTRequest ); } else - Application::PostUserEvent( LINK( NULL, MainThreadFrameCloserRequest, worker ), pMTRequest ); + Application::PostUserEvent( LINK( nullptr, MainThreadFrameCloserRequest, worker ), pMTRequest ); } } @@ -143,7 +143,7 @@ IMPL_STATIC_LINK_TYPED( MainThreadFrameCloserRequest, worker, void*, p, void ) } ODocumentCloser::ODocumentCloser(const css::uno::Sequence< css::uno::Any >& aArguments) -: m_pListenersContainer( NULL ) +: m_pListenersContainer( nullptr ) , m_bDisposed( false ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -170,7 +170,7 @@ ODocumentCloser::~ODocumentCloser() if ( m_pListenersContainer ) { delete m_pListenersContainer; - m_pListenersContainer = NULL; + m_pListenersContainer = nullptr; } } diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx index 46ba831ceec0..148ff37d0d9f 100644 --- a/svtools/source/hatchwindow/hatchwindow.cxx +++ b/svtools/source/hatchwindow/hatchwindow.cxx @@ -31,7 +31,7 @@ using namespace ::com::sun::star; VCLXHatchWindow::VCLXHatchWindow() : VCLXWindow() -, pHatchWindow(0) +, pHatchWindow(nullptr) { } @@ -45,7 +45,7 @@ void VCLXHatchWindow::initializeWindow( const uno::Reference< awt::XWindowPeer > { SolarMutexGuard aGuard; - vcl::Window* pParent = NULL; + vcl::Window* pParent = nullptr; VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( xParent ); if ( pParentComponent ) @@ -140,13 +140,13 @@ void SAL_CALL VCLXHatchWindow::release() uno::Sequence< uno::Type > SAL_CALL VCLXHatchWindow::getTypes() throw( uno::RuntimeException, std::exception ) { - static ::cppu::OTypeCollection* pTypeCollection = NULL ; + static ::cppu::OTypeCollection* pTypeCollection = nullptr ; - if ( pTypeCollection == NULL ) + if ( pTypeCollection == nullptr ) { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ) ; - if ( pTypeCollection == NULL ) + if ( pTypeCollection == nullptr ) { static ::cppu::OTypeCollection aTypeCollection( cppu::UnoType<embed::XHatchWindow>::get(), diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx index be5a80af48e8..786119b0fcef 100644 --- a/svtools/source/hatchwindow/ipwin.cxx +++ b/svtools/source/hatchwindow/ipwin.cxx @@ -444,7 +444,7 @@ SvResizeWindow::SvResizeWindow , m_bActive( false ) , m_pWrapper( pWrapper ) { - OSL_ENSURE( pParent != NULL && pWrapper != NULL, "Wrong initialization of hatch window!\n" ); + OSL_ENSURE( pParent != nullptr && pWrapper != nullptr, "Wrong initialization of hatch window!\n" ); SetBackground(); SetAccessibleRole( css::accessibility::AccessibleRole::EMBEDDED_OBJECT ); m_aResizer.SetOuterRectPixel( Rectangle( Point(), GetOutputSizePixel() ) ); diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index f8b2ad325c3e..835c2397dad3 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -310,7 +310,7 @@ public: void Command( const CommandEvent& rCEvt ); void Invalidate(); - void DestroyAnchor() { pAnchor=0; aSelEng.Reset(); } + void DestroyAnchor() { pAnchor=nullptr; aSelEng.Reset(); } void SelAllDestrAnch( bool bSelect, bool bDestroyAnchor = true, bool bSingleSelToo = false ); void ShowCursor( bool bShow ); @@ -323,7 +323,7 @@ public: Rectangle GetClipRegionRect() const; bool HasHorScrollBar() const { return aHorSBar->IsVisible(); } void ShowFocusRect( const SvTreeListEntry* pEntry ); - void CallEventListeners( sal_uLong nEvent, void* pData = NULL ); + void CallEventListeners( sal_uLong nEvent, void* pData = nullptr ); /** Enables, that one cell of a tablistbox entry can be focused */ bool IsCellFocusEnabled() const { return bIsCellFocusEnabled; } diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index 2f9bf8f87ecc..abdafe4a5dd5 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -203,7 +203,7 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque SolarMutexGuard aSolarGuard; m_bRestartRequired_Handled = true; svtools::executeRestartDialog( - comphelper::getProcessComponentContext(), 0, + comphelper::getProcessComponentContext(), nullptr, svtools::RESTART_REASON_JAVA); } nResult = RET_OK; diff --git a/svtools/source/misc/dialogcontrolling.cxx b/svtools/source/misc/dialogcontrolling.cxx index 12219e4f0e94..8ab29197b385 100644 --- a/svtools/source/misc/dialogcontrolling.cxx +++ b/svtools/source/misc/dialogcontrolling.cxx @@ -98,7 +98,7 @@ namespace svt { m_pImpl->aConcernedWindows.push_back( &_rWindow ); - VclWindowEvent aEvent( &_rWindow, 0, NULL ); + VclWindowEvent aEvent( &_rWindow, 0, nullptr ); impl_update( aEvent, _rWindow ); } @@ -169,7 +169,7 @@ namespace svt void ControlDependencyManager::addController( const PDialogController& _pController ) { - OSL_ENSURE( _pController.get() != NULL, "ControlDependencyManager::addController: invalid controller, this will crash, sooner or later!" ); + OSL_ENSURE( _pController.get() != nullptr, "ControlDependencyManager::addController: invalid controller, this will crash, sooner or later!" ); m_pImpl->aControllers.push_back( _pController ); } diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index 9e058f5c3153..c7248717dbbd 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -144,7 +144,7 @@ static sal_uInt16 aWndFunc( SfxErrorHandler::SfxErrorHandler(sal_uInt16 nIdP, sal_uLong lStartP, sal_uLong lEndP, ResMgr *pMgrP) : - lStart(lStartP), lEnd(lEndP), nId(nIdP), pMgr(pMgrP), pFreeMgr( NULL ) + lStart(lStartP), lEnd(lEndP), nId(nIdP), pMgr(pMgrP), pFreeMgr( nullptr ) { RegisterDisplay(&aWndFunc); @@ -398,7 +398,7 @@ bool SfxErrorContext::GetString(sal_uLong nErrId, OUString &rStr) { bool bRet = false; - ResMgr* pFreeMgr = NULL; + ResMgr* pFreeMgr = nullptr; if( ! pMgr ) { pFreeMgr = pMgr = ResMgr::CreateResMgr("ofa", Application::GetSettings().GetUILanguageTag() ); @@ -434,7 +434,7 @@ bool SfxErrorContext::GetString(sal_uLong nErrId, OUString &rStr) if( pFreeMgr ) { delete pFreeMgr; - pMgr = NULL; + pMgr = nullptr; } return bRet; } diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index 8ea50c2f015f..461de46f349c 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -210,7 +210,7 @@ void SAL_CALL EmbedEventListener_Impl::notifyClosing( const lang::EventObject& S if ( pObject && Source.Source == pObject->GetObject() ) { pObject->Clear(); - pObject = 0; + pObject = nullptr; } } @@ -219,7 +219,7 @@ void SAL_CALL EmbedEventListener_Impl::disposing( const lang::EventObject& aEven if ( pObject && aEvent.Source == pObject->GetObject() ) { pObject->Clear(); - pObject = 0; + pObject = nullptr; } } @@ -241,9 +241,9 @@ struct EmbeddedObjectRef_Impl awt::Size aDefaultSizeForChart_In_100TH_MM;//#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this member EmbeddedObjectRef_Impl() : - xListener(0), - pContainer(NULL), - pGraphic(NULL), + xListener(nullptr), + pContainer(nullptr), + pGraphic(nullptr), nViewAspect(embed::Aspects::MSOLE_CONTENT), bIsLocked(false), bNeedUpdate(false), @@ -253,11 +253,11 @@ struct EmbeddedObjectRef_Impl EmbeddedObjectRef_Impl( const EmbeddedObjectRef_Impl& r ) : mxObj(r.mxObj), - xListener(0), + xListener(nullptr), aPersistName(r.aPersistName), aMediaType(r.aMediaType), pContainer(r.pContainer), - pGraphic(NULL), + pGraphic(nullptr), nViewAspect(r.nViewAspect), bIsLocked(r.bIsLocked), bNeedUpdate(r.bNeedUpdate), @@ -361,16 +361,16 @@ void EmbeddedObjectRef::Clear() if ( mpImpl->xListener ) { - mpImpl->xListener->pObject = 0; + mpImpl->xListener->pObject = nullptr; mpImpl->xListener->release(); - mpImpl->xListener = 0; + mpImpl->xListener = nullptr; } - mpImpl->mxObj = NULL; + mpImpl->mxObj = nullptr; mpImpl->bNeedUpdate = false; } - mpImpl->pContainer = 0; + mpImpl->pContainer = nullptr; mpImpl->bIsLocked = false; mpImpl->bNeedUpdate = false; } @@ -638,13 +638,13 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( bool bUpdate ) const } } - return NULL; + return nullptr; } void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUString &rText, OutputDevice *pOut ) { MapMode aMM( MAP_APPFONT ); - Size aAppFontSz = pOut->LogicToLogic( Size( 0, 8 ), &aMM, NULL ); + Size aAppFontSz = pOut->LogicToLogic( Size( 0, 8 ), &aMM, nullptr ); vcl::Font aFnt( OUString("Helvetica"), aAppFontSz ); aFnt.SetTransparent( true ); aFnt.SetColor( Color( COL_LIGHTRED ) ); diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx index bd70919a1063..a0a952388a1c 100644 --- a/svtools/source/misc/embedtransfer.cxx +++ b/svtools/source/misc/embedtransfer.cxx @@ -42,14 +42,14 @@ SvEmbedTransferHelper::SvEmbedTransferHelper( const uno::Reference< embed::XEmbe const Graphic* pGraphic, sal_Int64 nAspect ) : m_xObj( xObj ) -, m_pGraphic( pGraphic ? new Graphic( *pGraphic ) : NULL ) +, m_pGraphic( pGraphic ? new Graphic( *pGraphic ) : nullptr ) , m_nAspect( nAspect ) { if( xObj.is() ) { TransferableObjectDescriptor aObjDesc; - FillTransferableObjectDescriptor( aObjDesc, m_xObj, NULL, m_nAspect ); + FillTransferableObjectDescriptor( aObjDesc, m_xObj, nullptr, m_nAspect ); PrepareOLE( aObjDesc ); } } @@ -61,7 +61,7 @@ SvEmbedTransferHelper::~SvEmbedTransferHelper() if ( m_pGraphic ) { delete m_pGraphic; - m_pGraphic = NULL; + m_pGraphic = nullptr; } } @@ -111,7 +111,7 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo { uno::Reference < embed::XStorage > xStg = comphelper::OStorageHelper::GetTemporaryStorage(); OUString aName( "Dummy" ); - SvStream* pStream = NULL; + SvStream* pStream = nullptr; bool bDeleteStream = false; uno::Sequence < beans::PropertyValue > aEmpty; uno::Sequence<beans::PropertyValue> aObjArgs(2); diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 27c3c8e9b0e6..7f011fb29430 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -169,7 +169,7 @@ static SvtExtensionResIdMapping_Impl const ExtensionMap_Impl[] = { "pps", false, STR_DESCRIPTION_POWERPOINT_SHOW, IMG_IMPRESS }, { "pptx", false, STR_DESCRIPTION_POWERPOINT, IMG_IMPRESS }, { "oxt", false, STR_DESCRIPTION_EXTENSION, IMG_EXTENSION }, - { 0, false, 0, 0 } + { nullptr, false, 0, 0 } }; struct SvtFactory2ExtensionMapping_Impl @@ -190,7 +190,7 @@ static SvtFactory2ExtensionMapping_Impl const Fac2ExtMap_Impl[] = { "sdraw", "odg" }, { "smath", "odf" }, { "sdatabase", "odb" }, - { NULL, NULL } + { nullptr, nullptr } }; @@ -490,10 +490,10 @@ static Image GetImageFromList_Impl( sal_uInt16 nImageId, bool bBig ) // return our new small folder image (256 colors) return Image( SvtResId( IMG_SVT_FOLDER ) ); - ImageList* pList = NULL; + ImageList* pList = nullptr; - static vcl::DeleteOnDeinit< ImageList > xSmallImageList( NULL ); - static vcl::DeleteOnDeinit< ImageList > xBigImageList( NULL ); + static vcl::DeleteOnDeinit< ImageList > xSmallImageList( nullptr ); + static vcl::DeleteOnDeinit< ImageList > xBigImageList( nullptr ); static OUString style = Application::GetSettings().GetStyleSettings().DetermineIconTheme(); // If the style has been changed, throw away our cache of the older images diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx index 67aaf64d6d22..60a6c0e1be7e 100644 --- a/svtools/source/misc/imageresourceaccess.cxx +++ b/svtools/source/misc/imageresourceaccess.cxx @@ -140,7 +140,7 @@ namespace svt SvStream* GraphicAccess::getImageStream( const Reference< XComponentContext >& _rxContext, const OUString& _rImageResourceURL ) { - SvStream* pReturn = NULL; + SvStream* pReturn = nullptr; try { diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index 63aa45bd68b1..c2ad3f1aecbf 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -787,7 +787,7 @@ IMapObject* ImageMap::GetHitIMapObject( const Size& rTotalSize, } // walk over all objects and execute HitTest - IMapObject* pObj = NULL; + IMapObject* pObj = nullptr; for( size_t i = 0, n = maList.size(); i < n; ++i ) { if ( maList[ i ]->IsHit( aRelPoint ) ) { pObj = maList[ i ]; @@ -795,7 +795,7 @@ IMapObject* ImageMap::GetHitIMapObject( const Size& rTotalSize, } } - return( pObj ? ( pObj->IsActive() ? pObj : NULL ) : NULL ); + return( pObj ? ( pObj->IsActive() ? pObj : nullptr ) : nullptr ); } void ImageMap::Scale( const Fraction& rFracX, const Fraction& rFracY ) diff --git a/svtools/source/misc/openfiledroptargetlistener.cxx b/svtools/source/misc/openfiledroptargetlistener.cxx index 91cb541dbea0..671c9668fb9c 100644 --- a/svtools/source/misc/openfiledroptargetlistener.cxx +++ b/svtools/source/misc/openfiledroptargetlistener.cxx @@ -51,7 +51,7 @@ OpenFileDropTargetListener::~OpenFileDropTargetListener() m_xTargetFrame.clear(); m_xContext.clear(); delete m_pFormats; - m_pFormats = NULL; + m_pFormats = nullptr; } diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index ff029c0a25bc..54e62dbd1fff 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -194,7 +194,7 @@ OUString makeShortRepresentativeSymbolTextForSelectedFont(OutputDevice &rDevice) return OUString(aText); } - pFontCharMap = 0; + pFontCharMap = nullptr; } static const sal_Unicode aImplSymbolFontText[] = { diff --git a/svtools/source/misc/svtaccessiblefactory.cxx b/svtools/source/misc/svtaccessiblefactory.cxx index 68bef791c846..e5bc5b136b00 100644 --- a/svtools/source/misc/svtaccessiblefactory.cxx +++ b/svtools/source/misc/svtaccessiblefactory.cxx @@ -33,10 +33,10 @@ namespace svt namespace { #ifndef DISABLE_DYNLOADING - static oslModule s_hAccessibleImplementationModule = NULL; + static oslModule s_hAccessibleImplementationModule = nullptr; #endif #if HAVE_FEATURE_DESKTOP - static GetSvtAccessibilityComponentFactory s_pAccessibleFactoryFunc = NULL; + static GetSvtAccessibilityComponentFactory s_pAccessibleFactoryFunc = nullptr; #endif static ::rtl::Reference< IAccessibleFactory > s_pFactory; @@ -60,7 +60,7 @@ namespace svt SvHeaderTabListBox& /*rBox*/ ) const override { - return NULL; + return nullptr; } virtual IAccessibleBrowseBox* @@ -69,7 +69,7 @@ namespace svt IAccessibleTableProvider& /*_rBrowseBox*/ ) const override { - return NULL; + return nullptr; } virtual table::IAccessibleTableControl* @@ -78,7 +78,7 @@ namespace svt table::IAccessibleTable& /*_rTable*/ ) const override { - return NULL; + return nullptr; } virtual css::uno::Reference< css::accessibility::XAccessible > @@ -87,7 +87,7 @@ namespace svt const css::uno::Reference< css::accessibility::XAccessible >& /*_xParent*/ ) const override { - return NULL; + return nullptr; } virtual css::uno::Reference< css::accessibility::XAccessible > @@ -95,7 +95,7 @@ namespace svt TabBar& /*_rTabBar*/ ) const override { - return NULL; + return nullptr; } virtual css::uno::Reference< css::accessibility::XAccessibleContext > @@ -103,7 +103,7 @@ namespace svt VCLXWindow* /*pVclXWindow*/, TextEngine& /*rEngine*/, TextView& /*rView*/ ) const override { - return NULL; + return nullptr; } virtual css::uno::Reference< css::accessibility::XAccessible > @@ -112,7 +112,7 @@ namespace svt const css::uno::Reference< css::accessibility::XAccessible >& /*_xParent*/ ) const override { - return NULL; + return nullptr; } virtual css::uno::Reference< css::accessibility::XAccessible > @@ -122,7 +122,7 @@ namespace svt AccessibleBrowseBoxObjType /*_eObjType*/ ) const override { - return NULL; + return nullptr; } virtual css::uno::Reference< css::accessibility::XAccessible > @@ -135,7 +135,7 @@ namespace svt sal_Int32 /*_nOffset*/ ) const override { - return NULL; + return nullptr; } virtual css::uno::Reference< css::accessibility::XAccessible > @@ -147,7 +147,7 @@ namespace svt AccessibleBrowseBoxObjType /*_eObjType*/ ) const override { - return NULL; + return nullptr; } virtual css::uno::Reference< css::accessibility::XAccessible > @@ -161,7 +161,7 @@ namespace svt bool /*_bIsTriState*/ ) const override { - return NULL; + return nullptr; } virtual css::uno::Reference< css::accessibility::XAccessible > @@ -174,7 +174,7 @@ namespace svt sal_uInt16 /*_nColPos*/ ) const override { - return NULL; + return nullptr; } virtual css::uno::Reference< css::accessibility::XAccessibleContext > @@ -183,7 +183,7 @@ namespace svt ::svt::ToolPanelDeck& /*i_rPanelDeck*/ ) override { - return NULL; + return nullptr; } virtual css::uno::Reference< css::accessibility::XAccessibleContext > createAccessibleToolPanelTabBar( @@ -192,7 +192,7 @@ namespace svt ::svt::PanelTabBar& /*i_rTabBar*/ ) override { - return NULL; + return nullptr; } }; @@ -239,7 +239,7 @@ namespace svt #ifndef DISABLE_DYNLOADING const OUString sModuleName( SVLIBRARY( "acc" )); s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 ); - if ( s_hAccessibleImplementationModule != NULL ) + if ( s_hAccessibleImplementationModule != nullptr ) { const OUString sFactoryCreationFunc( "getSvtAccessibilityComponentFactory" ); s_pAccessibleFactoryFunc = reinterpret_cast<GetSvtAccessibilityComponentFactory>( diff --git a/svtools/source/misc/svtresid.cxx b/svtools/source/misc/svtresid.cxx index ff3b965a5e34..24906fd8eef5 100644 --- a/svtools/source/misc/svtresid.cxx +++ b/svtools/source/misc/svtresid.cxx @@ -22,7 +22,7 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> -static ResMgr* pMgr=NULL; +static ResMgr* pMgr=nullptr; namespace { diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index 18652a333892..4487b12e5879 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -468,7 +468,7 @@ namespace svt TemplateFolderCacheImpl::TemplateFolderCacheImpl( bool _bAutoStoreState ) - :m_pCacheStream ( NULL ) + :m_pCacheStream ( nullptr ) ,m_bNeedsUpdate ( true ) ,m_bKnowState ( false ) ,m_bValidCurrentState ( false ) @@ -773,7 +773,7 @@ namespace svt if ( m_pCacheStream ) m_pCacheStream->SetStreamCharSet( RTL_TEXTENCODING_UTF8 ); - return NULL != m_pCacheStream; + return nullptr != m_pCacheStream; } diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 6f7a9bb2f23d..1d0bfb51b7d8 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -269,7 +269,7 @@ void SAL_CALL TransferableHelper::TerminateListener::notifyTermination( const Ev TransferableHelper::TransferableHelper() : mpFormats( new DataFlavorExVector ), - mpObjDesc( NULL ) + mpObjDesc( nullptr ) { } @@ -372,7 +372,7 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co SvMemoryStream aDstStm( 65535, 65535 ); // taking wmf without file header - if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, NULL, false ) ) + if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, nullptr, false ) ) { maAny <<= ( aSeq = Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ), aDstStm.Seek( STREAM_SEEK_TO_END ) ) ); @@ -1085,7 +1085,7 @@ void TransferableHelper::ClearSelection( vcl::Window *pWindow ) Reference< XClipboard > xSelection( pWindow->GetPrimarySelection() ); if( xSelection.is() ) - xSelection->setContents( NULL, NULL ); + xSelection->setContents( nullptr, nullptr ); } @@ -1135,7 +1135,7 @@ public: inline bool isListening() const { return !isDisposed(); } /// determines whether the instance is disposed - inline bool isDisposed() const { return mpListener == NULL; } + inline bool isDisposed() const { return mpListener == nullptr; } /// makes the instance non-functional void dispose(); @@ -1154,7 +1154,7 @@ TransferableClipboardNotifier::TransferableClipboardNotifier( const Reference< X mxNotifier->addClipboardListener( this ); else // born dead - mpListener = NULL; + mpListener = nullptr; } osl_atomic_decrement( &m_refCount ); } @@ -1193,7 +1193,7 @@ void TransferableClipboardNotifier::dispose() mxNotifier->removeClipboardListener( this ); mxNotifier.clear(); - mpListener = NULL; + mpListener = nullptr; } @@ -1206,7 +1206,7 @@ struct TransferableDataHelper_Impl TransferableClipboardNotifier* mpClipboardListener; TransferableDataHelper_Impl() - :mpClipboardListener( NULL ) + :mpClipboardListener( nullptr ) { } }; @@ -1252,7 +1252,7 @@ TransferableDataHelper& TransferableDataHelper::operator=( const TransferableDat { ::osl::MutexGuard aGuard( mpImpl->maMutex ); - bool bWasClipboardListening = ( NULL != mpImpl->mpClipboardListener ); + bool bWasClipboardListening = ( nullptr != mpImpl->mpClipboardListener ); if ( bWasClipboardListening ) StopClipboardListening(); @@ -1276,8 +1276,8 @@ TransferableDataHelper::~TransferableDataHelper() StopClipboardListening( ); { ::osl::MutexGuard aGuard( mpImpl->maMutex ); - delete mpFormats, mpFormats = NULL; - delete mpObjDesc, mpObjDesc = NULL; + delete mpFormats, mpFormats = nullptr; + delete mpObjDesc, mpObjDesc = nullptr; } delete mpImpl; } @@ -2191,7 +2191,7 @@ void TransferableDataHelper::StopClipboardListening( ) { mpImpl->mpClipboardListener->dispose(); mpImpl->mpClipboardListener->release(); - mpImpl->mpClipboardListener = NULL; + mpImpl->mpClipboardListener = nullptr; } } diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx index 5bafeccf10a1..f6fb07e0344e 100644 --- a/svtools/source/misc/transfer2.cxx +++ b/svtools/source/misc/transfer2.cxx @@ -109,7 +109,7 @@ void DragSourceHelper::StartDrag( sal_Int8, const Point& ) DropTargetHelper::DropTargetListener::DropTargetListener( DropTargetHelper& rDropTargetHelper ) : mrParent( rDropTargetHelper ), - mpLastDragOverEvent( NULL ) + mpLastDragOverEvent( nullptr ) { } @@ -168,7 +168,7 @@ void SAL_CALL DropTargetHelper::DropTargetListener::drop( const DropTargetDropEv if( mpLastDragOverEvent ) { delete mpLastDragOverEvent; - mpLastDragOverEvent = NULL; + mpLastDragOverEvent = nullptr; } } catch( const css::uno::Exception& ) @@ -231,7 +231,7 @@ void SAL_CALL DropTargetHelper::DropTargetListener::dragExit( const DropTargetEv mpLastDragOverEvent->mbLeaving = true; mrParent.AcceptDrop( *mpLastDragOverEvent ); delete mpLastDragOverEvent; - mpLastDragOverEvent = NULL; + mpLastDragOverEvent = nullptr; } mrParent.ImplEndDrag(); @@ -363,7 +363,7 @@ struct TransferDataContainer_Impl Graphic* pGrf; TransferDataContainer_Impl() - : pBookmk( 0 ), pGrf( 0 ) + : pBookmk( nullptr ), pGrf( nullptr ) { } @@ -572,7 +572,7 @@ void TransferDataContainer::CopyAny( SotClipboardFormatId nFmt, bool TransferDataContainer::HasAnyData() const { return pImpl->aFmtList.begin() != pImpl->aFmtList.end() || - 0 != pImpl->pBookmk; + nullptr != pImpl->pBookmk; } diff --git a/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx index 17927fb618e7..166fb5c0ea73 100644 --- a/svtools/source/svhtml/htmlkywd.cxx +++ b/svtools/source/svhtml/htmlkywd.cxx @@ -213,7 +213,7 @@ int GetHTMLToken( const OUString& rName ) sizeof( aHTMLTokenTab ) / sizeof( HTML_TokenEntry ), sizeof( HTML_TokenEntry ), HTMLKeyCompare ); - if( 0 != pFound ) + if( nullptr != pFound ) nRet = static_cast<HTML_TokenEntry*>(pFound)->nToken; return nRet; } @@ -541,7 +541,7 @@ sal_Unicode GetHTMLCharName( const OUString& rName ) aSrch.pUName = &rName; aSrch.cChar = USHRT_MAX; - if( 0 != ( pFound = bsearch( &aSrch, + if( nullptr != ( pFound = bsearch( &aSrch, static_cast<void*>(aHTMLCharNameTab), sizeof( aHTMLCharNameTab) / sizeof( HTML_CharEntry ), sizeof( HTML_CharEntry ), @@ -724,7 +724,7 @@ int GetHTMLOption( const OUString& rName ) aSrch.pUToken = &rName; aSrch.nToken = -1; - if( 0 != ( pFound = bsearch( &aSrch, + if( nullptr != ( pFound = bsearch( &aSrch, static_cast<void*>(aHTMLOptionTab), sizeof( aHTMLOptionTab ) / sizeof( HTML_TokenEntry ), sizeof( HTML_TokenEntry ), @@ -942,7 +942,7 @@ sal_uInt32 GetHTMLColor( const OUString& rName ) aSrch.pUName = &aLowerCase; aSrch.nColor = HTML_NO_COLOR; - if( 0 != ( pFound = bsearch( &aSrch, + if( nullptr != ( pFound = bsearch( &aSrch, static_cast<void*>(aHTMLColorNameTab), sizeof( aHTMLColorNameTab) / sizeof( HTML_ColorEntry ), sizeof( HTML_ColorEntry ), diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index 9be535c0f2d1..c90552947704 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -58,7 +58,7 @@ HTMLOutContext::~HTMLOutContext() static const sal_Char *lcl_svhtml_GetEntityForChar( sal_Unicode c, rtl_TextEncoding eDestEnc ) { - const sal_Char* pStr = 0; + const sal_Char* pStr = nullptr; // Note: We currently handle special cases for ISO-8859-2 here simply because // the code was already submitted. But we should also handle other code pages @@ -395,7 +395,7 @@ static OString lcl_ConvertCharToHTML( sal_Unicode c, OStringBuffer aDest; DBG_ASSERT( RTL_TEXTENCODING_DONTKNOW != rContext.m_eDestEnc, "wrong destination encoding" ); - const sal_Char *pStr = 0; + const sal_Char *pStr = nullptr; switch( c ) { case 0xA0: // is a hard blank @@ -636,7 +636,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, if( pObj ) { - const sal_Char *pShape = 0; + const sal_Char *pShape = nullptr; OString aCoords; switch( pObj->GetType() ) { @@ -1012,7 +1012,7 @@ void HtmlWriterHelper::applyEvents(HtmlWriter& rHtmlWriter, const SvxMacroTableD if (pMacro && pMacro->HasMacro() && (JAVASCRIPT == pMacro->GetScriptType() || bOutStarBasic)) { - const sal_Char* pAttributeName = NULL; + const sal_Char* pAttributeName = nullptr; if (STARBASIC == pMacro->GetScriptType()) pAttributeName = pEventTable[i].pBasicName; else diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx index b9109260177d..f2963081ebed 100644 --- a/svtools/source/svhtml/htmlsupp.cxx +++ b/svtools/source/svhtml/htmlsupp.cxx @@ -32,7 +32,7 @@ static HTMLOptionEnum const aScriptLangOptEnums[] = { OOO_STRING_SVTOOLS_HTML_LG_javascript, HTML_SL_JAVASCRIPT }, { OOO_STRING_SVTOOLS_HTML_LG_javascript11,HTML_SL_JAVASCRIPT }, { OOO_STRING_SVTOOLS_HTML_LG_livescript, HTML_SL_JAVASCRIPT }, - { 0, 0 } + { nullptr, 0 } }; bool HTMLParser::ParseScriptOptions( OUString& rLangString, const OUString& rBaseURL, diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 0c4d1dc6485b..3f156b7f8629 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -64,7 +64,7 @@ static HTMLOptionEnum const aInputTypeOptEnums[] = { OOO_STRING_SVTOOLS_HTML_IT_image, HTML_IT_IMAGE }, { OOO_STRING_SVTOOLS_HTML_IT_reset, HTML_IT_RESET }, { OOO_STRING_SVTOOLS_HTML_IT_button, HTML_IT_BUTTON }, - { 0, 0 } + { nullptr, 0 } }; // <TABLE FRAME=xxx> @@ -79,7 +79,7 @@ static HTMLOptionEnum const aTableFrameOptEnums[] = { OOO_STRING_SVTOOLS_HTML_TF_vsides, HTML_TF_VSIDES }, { OOO_STRING_SVTOOLS_HTML_TF_box, HTML_TF_BOX }, { OOO_STRING_SVTOOLS_HTML_TF_border, HTML_TF_BOX }, - { 0, 0 } + { nullptr, 0 } }; // <TABLE RULES=xxx> @@ -90,7 +90,7 @@ static HTMLOptionEnum const aTableRulesOptEnums[] = { OOO_STRING_SVTOOLS_HTML_TR_rows, HTML_TR_ROWS }, { OOO_STRING_SVTOOLS_HTML_TR_cols, HTML_TR_COLS }, { OOO_STRING_SVTOOLS_HTML_TR_all, HTML_TR_ALL }, - { 0, 0 } + { nullptr, 0 } }; sal_uInt16 HTMLOption::GetEnum( const HTMLOptionEnum *pOptEnums, sal_uInt16 nDflt ) const @@ -123,7 +123,7 @@ bool HTMLOption::GetEnum( sal_uInt16 &rEnum, const HTMLOptionEnum *pOptEnums ) c if( pName ) rEnum = pOptEnums->nValue; - return (pName != 0); + return (pName != nullptr); } HTMLOption::HTMLOption( sal_uInt16 nTok, const OUString& rToken, @@ -1904,7 +1904,7 @@ static HTMLOptionEnum const aHTMLMetaNameTable[] = { OOO_STRING_SVTOOLS_HTML_META_refresh, HTML_META_REFRESH }, { OOO_STRING_SVTOOLS_HTML_META_sdendnote, HTML_META_SDENDNOTE }, { OOO_STRING_SVTOOLS_HTML_META_sdfootnote, HTML_META_SDFOOTNOTE }, - { 0, 0 } + { nullptr, 0 } }; diff --git a/svtools/source/svrtf/rtfkeywd.cxx b/svtools/source/svrtf/rtfkeywd.cxx index 93f0092e15df..39e0b84c7efc 100644 --- a/svtools/source/svrtf/rtfkeywd.cxx +++ b/svtools/source/svrtf/rtfkeywd.cxx @@ -1222,7 +1222,7 @@ int GetRTFToken( const OUString& rSearch ) aSrch.pUToken = &rSearch; aSrch.nToken = -1; - if( 0 != ( pFound = bsearch( &aSrch, + if( nullptr != ( pFound = bsearch( &aSrch, static_cast<void*>(aRTFTokenTab), sizeof( aRTFTokenTab ) / sizeof( RTF_TokenEntry ), sizeof( RTF_TokenEntry ), diff --git a/svtools/source/svrtf/rtfout.cxx b/svtools/source/svrtf/rtfout.cxx index 517e83142435..922d2ebbec12 100644 --- a/svtools/source/svrtf/rtfout.cxx +++ b/svtools/source/svrtf/rtfout.cxx @@ -27,7 +27,7 @@ SvStream& RTFOutFuncs::Out_Char(SvStream& rStream, sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc, bool bWriteHelpFile) { - const sal_Char* pStr = 0; + const sal_Char* pStr = nullptr; switch (c) { case 0x1: diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx index 6aa1e30224dc..e0c552242486 100644 --- a/svtools/source/svrtf/svparser.cxx +++ b/svtools/source/svrtf/svparser.cxx @@ -50,7 +50,7 @@ struct SvParser_Impl , nToken(0) , nNextCh(0) , nSaveToken(0) - , hConv( 0 ) + , hConv( nullptr ) , hContext( reinterpret_cast<rtl_TextToUnicodeContext>(1) ) { } @@ -64,7 +64,7 @@ SvParser::SvParser( SvStream& rIn, sal_uInt8 nStackSize ) : rInput( rIn ) , nlLineNr( 1 ) , nlLinePos( 1 ) - , pImplData( 0 ) + , pImplData( nullptr ) , nTokenValue( 0 ) , bTokenHasValue( false ) , eState( SVPAR_NOTSTARTED ) @@ -115,7 +115,7 @@ void SvParser::SetSrcEncoding( rtl_TextEncoding eEnc ) rtl_destroyTextToUnicodeContext( pImplData->hConv, pImplData->hContext ); rtl_destroyTextToUnicodeConverter( pImplData->hConv ); - pImplData->hConv = 0; + pImplData->hConv = nullptr; pImplData->hContext = reinterpret_cast<rtl_TextToUnicodeContext>(1); } @@ -332,7 +332,7 @@ sal_Unicode SvParser::GetNextChar() sBuffer[nLen++] = c1; nChars = rtl_convertTextToUnicode( - pImplData->hConv, 0, sBuffer, nLen, &cUC, 1, + pImplData->hConv, nullptr, sBuffer, nLen, &cUC, 1, RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR| RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR| RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR, diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index a7cce61b38d1..b3eca3e9c2a1 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -268,7 +268,7 @@ namespace svt { namespace table // draw sort indicator if the model data is sorted by the given column ITableDataSort const * pSortAdapter = m_pImpl->rModel.getSortAdapter(); ColumnSort aCurrentSortOrder; - if ( pSortAdapter != NULL ) + if ( pSortAdapter != nullptr ) aCurrentSortOrder = pSortAdapter->getCurrentSortOrder(); if ( aCurrentSortOrder.nColumnPos == _nCol ) { diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx index 015f7f938627..ffd035e71725 100644 --- a/svtools/source/table/mousefunction.cxx +++ b/svtools/source/table/mousefunction.cxx @@ -229,7 +229,7 @@ namespace svt { namespace table return ContinueFunction; } - if ( i_tableControl.getModel()->getSortAdapter() == NULL ) + if ( i_tableControl.getModel()->getSortAdapter() == nullptr ) // no sorting support at the model return SkipFunction; @@ -253,7 +253,7 @@ namespace svt { namespace table if ( ( tableCell.nRow == ROW_COL_HEADERS ) && ( tableCell.nColumn == m_nActiveColumn ) ) { ITableDataSort* pSort = i_tableControl.getModel()->getSortAdapter(); - ENSURE_OR_RETURN( pSort != NULL, "ColumnSortHandler::handleMouseUp: somebody is mocking with us!", DeactivateFunction ); + ENSURE_OR_RETURN( pSort != nullptr, "ColumnSortHandler::handleMouseUp: somebody is mocking with us!", DeactivateFunction ); // in handleMousButtonDown, the model claimed to have sort support ... ColumnSortDirection eSortDirection = ColumnSortAscending; diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 6f643dc18310..1f5061153597 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -282,7 +282,7 @@ namespace svt { namespace table Reference< XAccessible > TableControl::CreateAccessible() { vcl::Window* pParent = GetAccessibleParentWindow(); - ENSURE_OR_RETURN( pParent, "TableControl::CreateAccessible - parent not found", NULL ); + ENSURE_OR_RETURN( pParent, "TableControl::CreateAccessible - parent not found", nullptr ); return m_pImpl->getAccessible( *pParent ); } @@ -292,7 +292,7 @@ namespace svt { namespace table { (void)_nIndex; DBG_ASSERT( false, "TableControl::CreateAccessibleControl: to be overwritten!" ); - return NULL; + return nullptr; } diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index aace80aef05a..6538e03d4166 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -200,7 +200,7 @@ namespace svt { namespace table } virtual ITableDataSort* getSortAdapter() override { - return NULL; + return nullptr; } virtual bool isEnabled() const override { @@ -237,15 +237,15 @@ namespace svt { namespace table ,m_nTopRow ( 0 ) ,m_nCursorHidden ( 1 ) ,m_pDataWindow ( VclPtr<TableDataWindow>::Create( *this ) ) - ,m_pVScroll ( NULL ) - ,m_pHScroll ( NULL ) - ,m_pScrollCorner ( NULL ) + ,m_pVScroll ( nullptr ) + ,m_pHScroll ( nullptr ) + ,m_pScrollCorner ( nullptr ) ,m_pSelEngine ( ) ,m_aSelectedRows ( ) ,m_pTableFunctionSet ( new TableFunctionSet( this ) ) ,m_nAnchor ( -1 ) ,m_bUpdatingColWidths ( false ) - ,m_pAccessibleTable ( NULL ) + ,m_pAccessibleTable ( nullptr ) { m_pSelEngine = new SelectionEngine( m_pDataWindow.get(), m_pTableFunctionSet ); m_pSelEngine->SetSelectionMode(SINGLE_SELECTION); @@ -2402,7 +2402,7 @@ namespace svt { namespace table Reference< XAccessible > TableControl_Impl::getAccessible( vcl::Window& i_parentWindow ) { DBG_TESTSOLARMUTEX(); - if ( m_pAccessibleTable == NULL ) + if ( m_pAccessibleTable == nullptr ) { Reference< XAccessible > const xAccParent = i_parentWindow.GetAccessible(); if ( xAccParent.is() ) @@ -2424,13 +2424,13 @@ namespace svt { namespace table { if ( m_pAccessibleTable ) m_pAccessibleTable->DisposeAccessImpl(); - m_pAccessibleTable = NULL; + m_pAccessibleTable = nullptr; } bool TableControl_Impl::impl_isAccessibleAlive() const { - return ( NULL != m_pAccessibleTable ) && m_pAccessibleTable->isAlive(); + return ( nullptr != m_pAccessibleTable ) && m_pAccessibleTable->isAlive(); } diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 37997eb31cdb..79ee86c71ac8 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -178,7 +178,7 @@ namespace svt { namespace table size_t const nCurSelRowCount = m_rTableControl.getSelectedRowCount(); if ( isRowSelected != wasRowSelected || nCurSelRowCount != nPrevSelRowCount ) { - m_aSelectHdl.Call( NULL ); + m_aSelectHdl.Call( nullptr ); } } diff --git a/svtools/source/toolpanel/drawerlayouter.cxx b/svtools/source/toolpanel/drawerlayouter.cxx index 6ff118a64982..753d53c84079 100644 --- a/svtools/source/toolpanel/drawerlayouter.cxx +++ b/svtools/source/toolpanel/drawerlayouter.cxx @@ -130,7 +130,7 @@ namespace svt Reference< XAccessible > DrawerDeckLayouter::GetAccessibleChild( const size_t i_nChildIndex, const Reference< XAccessible >& i_rParentAccessible ) { - ENSURE_OR_RETURN( i_nChildIndex < m_aDrawers.size(), "illegal index", NULL ); + ENSURE_OR_RETURN( i_nChildIndex < m_aDrawers.size(), "illegal index", nullptr ); VclPtr<ToolPanelDrawer> pDrawer( m_aDrawers[ i_nChildIndex ] ); @@ -138,7 +138,7 @@ namespace svt if ( !xItemAccessible.is() ) { xItemAccessible = pDrawer->GetAccessible(); - ENSURE_OR_RETURN( xItemAccessible.is(), "illegal accessible provided by the drawer implementation!", NULL ); + ENSURE_OR_RETURN( xItemAccessible.is(), "illegal accessible provided by the drawer implementation!", nullptr ); OSL_VERIFY( ::comphelper::OAccessibleImplementationAccess::setAccessibleParent( xItemAccessible->getAccessibleContext(), i_rParentAccessible ) ); } @@ -156,7 +156,7 @@ namespace svt // proper Z-Order if ( i_nPosition == 0 ) { - pDrawer->SetZOrder( NULL, ZOrderFlags::First ); + pDrawer->SetZOrder( nullptr, ZOrderFlags::First ); } else { diff --git a/svtools/source/toolpanel/dummypanel.cxx b/svtools/source/toolpanel/dummypanel.cxx index 7ba14f893572..6d29a2ccbf30 100644 --- a/svtools/source/toolpanel/dummypanel.cxx +++ b/svtools/source/toolpanel/dummypanel.cxx @@ -88,7 +88,7 @@ namespace svt Reference< XAccessible > DummyPanel::CreatePanelAccessible( const Reference< XAccessible >& i_rParentAccessible ) { (void)i_rParentAccessible; - return NULL; + return nullptr; } diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx index 710081e1cd1a..fde226dfe2e2 100644 --- a/svtools/source/toolpanel/paneltabbar.cxx +++ b/svtools/source/toolpanel/paneltabbar.cxx @@ -168,8 +168,8 @@ namespace svt true /* border */, false /* ext border only */, 0 /* corner radius */, - NULL, - NULL + nullptr, + nullptr ); } } @@ -900,7 +900,7 @@ namespace svt GetActualLogicalItemRect( rItem.GetCurrentRect() ), m_eTabAlignment ) ); - const Rectangle aTabBarRect( m_rTabBar.GetWindowExtentsRelative( NULL ) ); + const Rectangle aTabBarRect( m_rTabBar.GetWindowExtentsRelative( nullptr ) ); return Rectangle( Point( aTabBarRect.Left() + aItemRect.Left(), aTabBarRect.Top() + aItemRect.Top() ), aItemRect.GetSize() diff --git a/svtools/source/toolpanel/paneltabbarpeer.cxx b/svtools/source/toolpanel/paneltabbarpeer.cxx index 4fd01f993999..cc375b72b704 100644 --- a/svtools/source/toolpanel/paneltabbarpeer.cxx +++ b/svtools/source/toolpanel/paneltabbarpeer.cxx @@ -70,7 +70,7 @@ namespace svt vcl::Window* pAccessibleParent( m_pTabBar->GetAccessibleParentWindow() ); - ENSURE_OR_RETURN( pAccessibleParent != NULL, "no accessible parent => no accessible context", NULL ); + ENSURE_OR_RETURN( pAccessibleParent != nullptr, "no accessible parent => no accessible context", nullptr ); Reference< XAccessible > xAccessibleParent( pAccessibleParent->GetAccessible(), UNO_SET_THROW ); return m_aAccessibleFactory.getFactory().createAccessibleToolPanelTabBar( xAccessibleParent, m_pTabBar->GetPanelDeck(), *m_pTabBar ); } diff --git a/svtools/source/toolpanel/tablayouter.cxx b/svtools/source/toolpanel/tablayouter.cxx index 154e7783c444..9c1a8661d71b 100644 --- a/svtools/source/toolpanel/tablayouter.cxx +++ b/svtools/source/toolpanel/tablayouter.cxx @@ -195,7 +195,7 @@ namespace svt (void)i_nChildIndex; (void)i_rParentAccessible; if ( lcl_checkDisposed( *m_pData ) ) - return NULL; + return nullptr; return m_pData->pTabBar->GetAccessible(); } diff --git a/svtools/source/toolpanel/toolpanelcollection.cxx b/svtools/source/toolpanel/toolpanelcollection.cxx index 9537b11e4323..c6491dc621ff 100644 --- a/svtools/source/toolpanel/toolpanelcollection.cxx +++ b/svtools/source/toolpanel/toolpanelcollection.cxx @@ -125,7 +125,7 @@ namespace svt { OSL_ENSURE( i_nPosition < m_pData->aPanels.size(), "ToolPanelCollection::RemovePanel: illegal position!" ); if ( i_nPosition >= m_pData->aPanels.size() ) - return NULL; + return nullptr; // if the active panel is going to be removed, activate another one (before the actual removal) if ( m_pData->aActivePanel == i_nPosition ) diff --git a/svtools/source/toolpanel/toolpaneldeckpeer.cxx b/svtools/source/toolpanel/toolpaneldeckpeer.cxx index 76f15af12ca3..37b79453a335 100644 --- a/svtools/source/toolpanel/toolpaneldeckpeer.cxx +++ b/svtools/source/toolpanel/toolpaneldeckpeer.cxx @@ -68,7 +68,7 @@ namespace svt throw DisposedException( OUString(), *this ); vcl::Window* pAccessibleParent( m_pDeck->GetAccessibleParentWindow() ); - ENSURE_OR_RETURN( pAccessibleParent != NULL, "no accessible parent => no accessible context", NULL ); + ENSURE_OR_RETURN( pAccessibleParent != nullptr, "no accessible parent => no accessible context", nullptr ); Reference< XAccessible > xAccessibleParent( pAccessibleParent->GetAccessible(), UNO_SET_THROW ); return m_aAccessibleFactory.getFactory().createAccessibleToolPanelDeck( xAccessibleParent, *m_pDeck ); } diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx index ce325fd018eb..3ea93dbd90e7 100644 --- a/svtools/source/uno/contextmenuhelper.cxx +++ b/svtools/source/uno/contextmenuhelper.cxx @@ -225,18 +225,18 @@ static const PopupMenu* lcl_FindPopupFromItemId( const PopupMenu* pPopupMenu, sa return pPopupMenu; else { - const PopupMenu* pResult( 0 ); + const PopupMenu* pResult( nullptr ); const PopupMenu* pSubPopup = pPopupMenu->GetPopupMenu( i ); if ( pPopupMenu ) pResult = lcl_FindPopupFromItemId( pSubPopup, nItemId ); - if ( pResult != 0 ) + if ( pResult != nullptr ) return pResult; } } } - return NULL; + return nullptr; } static OUString lcl_GetItemCommandRecursive( const PopupMenu* pPopupMenu, sal_uInt16 nItemId ) @@ -367,7 +367,7 @@ ContextMenuHelper::dispatchCommand( pExecuteInfo->aTargetURL = aTargetURL; pExecuteInfo->aArgs = m_aDefaultArgs; - Application::PostUserEvent( LINK(0, ContextMenuHelper , ExecuteHdl_Impl), pExecuteInfo ); + Application::PostUserEvent( LINK(nullptr, ContextMenuHelper , ExecuteHdl_Impl), pExecuteInfo ); return true; } diff --git a/svtools/source/uno/generictoolboxcontroller.cxx b/svtools/source/uno/generictoolboxcontroller.cxx index 98184a1d56cf..d8ecef4fff67 100644 --- a/svtools/source/uno/generictoolboxcontroller.cxx +++ b/svtools/source/uno/generictoolboxcontroller.cxx @@ -119,7 +119,7 @@ throw ( RuntimeException, std::exception ) pExecuteInfo->xDispatch = xDispatch; pExecuteInfo->aTargetURL = aTargetURL; pExecuteInfo->aArgs = aArgs; - Application::PostUserEvent( LINK(0, GenericToolboxController , ExecuteHdl_Impl), pExecuteInfo ); + Application::PostUserEvent( LINK(nullptr, GenericToolboxController , ExecuteHdl_Impl), pExecuteInfo ); } } diff --git a/svtools/source/uno/genericunodialog.cxx b/svtools/source/uno/genericunodialog.cxx index 8713938d37cc..65b365bc0542 100644 --- a/svtools/source/uno/genericunodialog.cxx +++ b/svtools/source/uno/genericunodialog.cxx @@ -48,7 +48,7 @@ namespace svt OGenericUnoDialog::OGenericUnoDialog(const Reference< XComponentContext >& _rxContext) :OPropertyContainer(GetBroadcastHelper()) - ,m_pDialog(NULL) + ,m_pDialog(nullptr) ,m_bExecuting(false) ,m_bCanceled(false) ,m_bTitleAmbiguous(true) @@ -170,7 +170,7 @@ bool OGenericUnoDialog::impl_ensureDialog_lck() // get the parameters for the dialog from the current settings // the parent window - vcl::Window* pParent = NULL; + vcl::Window* pParent = nullptr; VCLXWindow* pImplementation = VCLXWindow::GetImplementation(m_xParent); if (pImplementation) pParent = pImplementation->GetWindow(); @@ -202,7 +202,7 @@ sal_Int16 SAL_CALL OGenericUnoDialog::execute( ) throw(RuntimeException, std::e // both creation and execution of the dialog must be guarded with the SolarMutex, so be generous here SolarMutexGuard aSolarGuard; - Dialog* pDialogToExecute = NULL; + Dialog* pDialogToExecute = nullptr; // create the dialog, if necessary { UnoDialogEntryGuard aGuard( *this ); @@ -322,7 +322,7 @@ IMPL_LINK_TYPED( OGenericUnoDialog, OnDialogDying, VclWindowEvent&, _rEvent, voi { OSL_ENSURE( _rEvent.GetWindow() == m_pDialog, "OGenericUnoDialog::OnDialogDying: where does this come from?" ); if ( _rEvent.GetId() == VCLEVENT_OBJECT_DYING ) - m_pDialog = NULL; + m_pDialog = nullptr; } diff --git a/svtools/source/uno/miscservices.cxx b/svtools/source/uno/miscservices.cxx index ff1dcf77e944..5bc360795a61 100644 --- a/svtools/source/uno/miscservices.cxx +++ b/svtools/source/uno/miscservices.cxx @@ -39,7 +39,7 @@ namespace FilePicker_CreateInstance, FilePicker_getImplementationName, FilePicker_getSupportedServiceNames, - ::cppu::createSingleComponentFactory, 0, 0 + ::cppu::createSingleComponentFactory, nullptr, 0 }, { // FolderPicker should not use a constructor, it is only a @@ -47,9 +47,9 @@ namespace FolderPicker_CreateInstance, FolderPicker_getImplementationName, FolderPicker_getSupportedServiceNames, - ::cppu::createSingleComponentFactory, 0, 0 + ::cppu::createSingleComponentFactory, nullptr, 0 }, - { 0, 0, 0, 0, 0, 0 } + { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } }; } @@ -59,7 +59,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL svt_component_getFactory( const sal_Char * pImplementationName, void * _pServiceManager, void * pRegistryKey) { - void * pResult = 0; + void * pResult = nullptr; if (_pServiceManager) { Reference< XMultiServiceFactory > xSMgr(static_cast< XMultiServiceFactory * >(_pServiceManager)); diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx index 914ae1da651e..b455692b158f 100644 --- a/svtools/source/uno/popupmenucontrollerbase.cxx +++ b/svtools/source/uno/popupmenucontrollerbase.cxx @@ -139,7 +139,7 @@ void PopupMenuControllerBase::dispatchCommand( const OUString& sCommandURL, cons Reference< XDispatch > xDispatch( xDispatchProvider->queryDispatch( aURL, OUString(), 0 ), UNO_QUERY_THROW ); - Application::PostUserEvent( LINK(0, PopupMenuControllerBase, ExecuteHdl_Impl), new PopupMenuControllerBaseDispatchInfo( xDispatch, aURL, rArgs ) ); + Application::PostUserEvent( LINK(nullptr, PopupMenuControllerBase, ExecuteHdl_Impl), new PopupMenuControllerBaseDispatchInfo( xDispatch, aURL, rArgs ) ); } catch( Exception& ) diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx index 127ba7a6f0c4..be1b07e64851 100644 --- a/svtools/source/uno/popupwindowcontroller.cxx +++ b/svtools/source/uno/popupwindowcontroller.cxx @@ -50,15 +50,15 @@ private: }; PopupWindowControllerImpl::PopupWindowControllerImpl() -: mpPopupWindow( 0 ) -, mpToolBox( 0 ) +: mpPopupWindow( nullptr ) +, mpToolBox( nullptr ) { } PopupWindowControllerImpl::~PopupWindowControllerImpl() { if( mpPopupWindow ) - SetPopupWindow(0,0); + SetPopupWindow(nullptr,nullptr); } void PopupWindowControllerImpl::SetPopupWindow( vcl::Window* pPopupWindow, ToolBox* pToolBox ) @@ -83,7 +83,7 @@ IMPL_LINK_TYPED( PopupWindowControllerImpl, WindowEventListener, VclWindowEvent& { case VCLEVENT_WINDOW_CLOSE: case VCLEVENT_WINDOW_ENDPOPUPMODE: - SetPopupWindow(0,0); + SetPopupWindow(nullptr,nullptr); break; case VCLEVENT_WINDOW_SHOW: diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 63928d1471c8..b45f5abff8bb 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -688,7 +688,7 @@ void ToolboxController::dispatchCommand( const OUString& sCommandURL, const Sequ Reference< XDispatch > xDispatch( xDispatchProvider->queryDispatch( aURL, sTarget, 0 ), UNO_QUERY_THROW ); DispatchInfo *pDispatchInfo = new DispatchInfo( xDispatch, aURL, rArgs ); - if ( !Application::PostUserEvent( LINK(0, ToolboxController, ExecuteHdl_Impl), + if ( !Application::PostUserEvent( LINK(nullptr, ToolboxController, ExecuteHdl_Impl), pDispatchInfo ) ) delete pDispatchInfo; @@ -772,7 +772,7 @@ IMPL_STATIC_LINK_TYPED( ToolboxController, ExecuteHdl_Impl, void*, p, void ) void ToolboxController::enable( bool bEnable ) { - ToolBox* pToolBox = 0; + ToolBox* pToolBox = nullptr; sal_uInt16 nItemId = 0; if( getToolboxId( nItemId, &pToolBox ) ) { @@ -782,7 +782,7 @@ void ToolboxController::enable( bool bEnable ) bool ToolboxController::getToolboxId( sal_uInt16& rItemId, ToolBox** ppToolBox ) { - if( (m_nToolBoxId != SAL_MAX_UINT16) && (ppToolBox == 0) ) + if( (m_nToolBoxId != SAL_MAX_UINT16) && (ppToolBox == nullptr) ) return m_nToolBoxId; ToolBox* pToolBox = static_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ).get() ); @@ -806,7 +806,7 @@ bool ToolboxController::getToolboxId( sal_uInt16& rItemId, ToolBox** ppToolBox ) rItemId = m_nToolBoxId; - return (rItemId != SAL_MAX_UINT16) && (( ppToolBox == 0) || (*ppToolBox != 0) ); + return (rItemId != SAL_MAX_UINT16) && (( ppToolBox == nullptr) || (*ppToolBox != nullptr) ); } //end diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 8a729d27d8f6..0f4ed9b865d0 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -143,9 +143,9 @@ TreeControlPeer::TreeControlPeer() , maTreeExpansionListeners( *this ) , maTreeEditListeners( *this ) , mbIsRootDisplayed(false) - , mpTreeImpl( 0 ) + , mpTreeImpl( nullptr ) , mnEditLock( 0 ) - , mpTreeNodeMap( 0 ) + , mpTreeNodeMap( nullptr ) { } @@ -201,7 +201,7 @@ UnoTreeListEntry* TreeControlPeer::getEntry( const Reference< XTreeNode >& xNode if( bThrow ) throw IllegalArgumentException(); - return 0; + return nullptr; } @@ -218,8 +218,8 @@ vcl::Window* TreeControlPeer::createVclControl( vcl::Window* pParent, sal_Int64 void TreeControlPeer::disposeControl() { delete mpTreeNodeMap; - mpTreeNodeMap = 0; - mpTreeImpl = 0; + mpTreeNodeMap = nullptr; + mpTreeImpl = nullptr; } @@ -233,7 +233,7 @@ void TreeControlPeer::SetWindow( const VclPtr< vcl::Window > &pWindow ) UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos /* = TREELIST_APPEND */ ) { - UnoTreeListEntry* pEntry = 0; + UnoTreeListEntry* pEntry = nullptr; if( mpTreeImpl ) { Image aImage; @@ -423,13 +423,13 @@ void TreeControlPeer::fillTree( UnoTreeListBoxImpl& rTree, const Reference< XTre { if( mbIsRootDisplayed ) { - addNode( rTree, xRootNode, 0 ); + addNode( rTree, xRootNode, nullptr ); } else { const sal_Int32 nChildCount = xRootNode->getChildCount(); for( sal_Int32 nChild = 0; nChild < nChildCount; nChild++ ) - addNode( rTree, xRootNode->getChildAt( nChild ), 0 ); + addNode( rTree, xRootNode->getChildAt( nChild ), nullptr ); } } } @@ -467,7 +467,7 @@ void TreeControlPeer::ChangeNodesSelection( const Any& rSelection, bool bSelect, Reference< XTreeNode > xTempNode; - const Reference< XTreeNode > *pNodes = 0; + const Reference< XTreeNode > *pNodes = nullptr; sal_Int32 nCount = 0; if( rSelection.hasValue() ) @@ -556,7 +556,7 @@ Any SAL_CALL TreeControlPeer::getSelection() throw (RuntimeException, std::excep --nSelectionCount; } - OSL_ASSERT( (pEntry == 0) && (nSelectionCount == 0) ); + OSL_ASSERT( (pEntry == nullptr) && (nSelectionCount == 0) ); aRet <<= aSelection; } @@ -667,7 +667,7 @@ Reference< XEnumeration > SAL_CALL TreeControlPeer::createSelectionEnumeration() --nSelectionCount; } - OSL_ASSERT( (pEntry == 0) && (nSelectionCount == 0) ); + OSL_ASSERT( (pEntry == nullptr) && (nSelectionCount == 0) ); return Reference< XEnumeration >( new TreeSelectionEnumeration( aSelection ) ); } @@ -691,7 +691,7 @@ Reference< XEnumeration > SAL_CALL TreeControlPeer::createReverseSelectionEnumer --nSelectionCount; } - OSL_ASSERT( (pEntry == 0) && (nSelectionCount == 0) ); + OSL_ASSERT( (pEntry == nullptr) && (nSelectionCount == 0) ); return Reference< XEnumeration >( new TreeSelectionEnumeration( aSelection ) ); } @@ -1076,7 +1076,7 @@ void TreeControlPeer::updateNode( UnoTreeListBoxImpl& rTree, const Reference< XT if( !pNodeEntry ) { Reference< XTreeNode > xParentNode( xNode->getParent() ); - UnoTreeListEntry* pParentEntry = 0; + UnoTreeListEntry* pParentEntry = nullptr; sal_uLong nChild = TREELIST_APPEND; if( xParentNode.is() ) @@ -1106,7 +1106,7 @@ void TreeControlPeer::updateChildNodes( UnoTreeListBoxImpl& rTree, const Referen if( !pCurrentChild || ( pCurrentChild->mxNode != xNode ) ) { UnoTreeListEntry* pNodeEntry = getEntry( xNode, false ); - if( pNodeEntry == 0 ) + if( pNodeEntry == nullptr ) { // child node is not yet part of the tree, add it pCurrentChild = createEntry( xNode, pParentEntry, nChild ); diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 66a3b96ce846..29aacfa70e80 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -266,7 +266,7 @@ namespace svt { namespace table // dispose the column UnoGridColumnFacade* pColumnImpl = dynamic_cast< UnoGridColumnFacade* >( pColumn.get() ); - OSL_ENSURE( pColumnImpl != NULL, "UnoControlTableModel::removeColumn: illegal column implementation!" ); + OSL_ENSURE( pColumnImpl != nullptr, "UnoControlTableModel::removeColumn: illegal column implementation!" ); if ( pColumnImpl ) pColumnImpl->dispose(); } @@ -497,7 +497,7 @@ namespace svt { namespace table PColumnModel const pColumn = getColumnModel( i_col ); UnoGridColumnFacade* pColumnImpl = dynamic_cast< UnoGridColumnFacade* >( pColumn.get() ); - ENSURE_OR_RETURN_VOID( pColumnImpl != NULL, "UnoControlTableModel::getCellContent: no (valid) column at this position!" ); + ENSURE_OR_RETURN_VOID( pColumnImpl != nullptr, "UnoControlTableModel::getCellContent: no (valid) column at this position!" ); sal_Int32 const nDataColumnIndex = pColumnImpl->getDataColumnIndex() >= 0 ? pColumnImpl->getDataColumnIndex() : i_col; if ( nDataColumnIndex >= xDataModel->getColumnCount() ) @@ -773,7 +773,7 @@ namespace svt { namespace table Reference< XSortableGridData > const xSortAccess( getDataModel(), UNO_QUERY ); if ( xSortAccess.is() ) return this; - return NULL; + return nullptr; } diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 5abca39ef371..74ac2a7c9ee4 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -52,7 +52,7 @@ SvBaseEventDescriptor::SvBaseEventDescriptor( const SvEventDescription* pSupport mpSupportedMacroItems(pSupportedMacroItems), mnMacroItems(0) { - assert(pSupportedMacroItems != NULL && "Need a list of supported events!"); + assert(pSupportedMacroItems != nullptr && "Need a list of supported events!"); for( ; mpSupportedMacroItems[mnMacroItems].mnEvent != 0; mnMacroItems++) ; } @@ -426,7 +426,7 @@ SvDetachedEventDescriptor::SvDetachedEventDescriptor( // ... and initialize for(sal_Int16 i = 0; i < mnMacroItems; i++) { - aMacros[i] = NULL; + aMacros[i] = nullptr; } } @@ -435,7 +435,7 @@ SvDetachedEventDescriptor::~SvDetachedEventDescriptor() // delete contents of aMacros for(sal_Int16 i = 0; i < mnMacroItems; i++) { - if (NULL != aMacros[i]) + if (nullptr != aMacros[i]) delete aMacros[i]; } @@ -503,7 +503,7 @@ bool SvDetachedEventDescriptor::hasById( if (-1 == nIndex) throw IllegalArgumentException(); - return (NULL != aMacros[nIndex]) && aMacros[nIndex]->HasMacro(); + return (nullptr != aMacros[nIndex]) && aMacros[nIndex]->HasMacro(); } @@ -531,7 +531,7 @@ void SvMacroTableEventDescriptor::copyMacrosFromTable( { const sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent; const SvxMacro* pMacro = rMacroTable.Get(nEvent); - if (NULL != pMacro) + if (nullptr != pMacro) replaceByName(nEvent, *pMacro); } diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx index 944d971fcc48..5c739b68dfeb 100644 --- a/svtools/source/uno/unogridcolumnfacade.cxx +++ b/svtools/source/uno/unogridcolumnfacade.cxx @@ -129,7 +129,7 @@ namespace svt { namespace table void ColumnChangeMultiplexer::dispose() { DBG_TESTSOLARMUTEX(); - m_pColumnImplementation = NULL; + m_pColumnImplementation = nullptr; } @@ -138,7 +138,7 @@ namespace svt { namespace table if ( i_event.AttributeName == "DataColumnIndex" ) { SolarMutexGuard aGuard; - if ( m_pColumnImplementation != NULL ) + if ( m_pColumnImplementation != nullptr ) m_pColumnImplementation->dataColumnIndexChanged(); return; } @@ -161,7 +161,7 @@ namespace svt { namespace table "ColumnChangeMultiplexer::columnChanged: unknown column attributed changed!" ); SolarMutexGuard aGuard; - if ( m_pColumnImplementation != NULL ) + if ( m_pColumnImplementation != nullptr ) m_pColumnImplementation->columnChanged( nChangedAttributes ); } @@ -193,13 +193,13 @@ namespace svt { namespace table void UnoGridColumnFacade::dispose() { DBG_TESTSOLARMUTEX(); - ENSURE_OR_RETURN_VOID( m_pOwner != NULL, "UnoGridColumnFacade::dispose: already disposed!" ); + ENSURE_OR_RETURN_VOID( m_pOwner != nullptr, "UnoGridColumnFacade::dispose: already disposed!" ); m_xGridColumn->removeGridColumnListener( m_pChangeMultiplexer.get() ); m_pChangeMultiplexer->dispose(); m_pChangeMultiplexer.clear(); m_xGridColumn.clear(); - m_pOwner = NULL; + m_pOwner = nullptr; } @@ -222,7 +222,7 @@ namespace svt { namespace table { DBG_TESTSOLARMUTEX(); impl_updateDataColumnIndex_nothrow(); - if ( m_pOwner != NULL ) + if ( m_pOwner != nullptr ) m_pOwner->notifyAllDataChanged(); } @@ -230,7 +230,7 @@ namespace svt { namespace table void UnoGridColumnFacade::columnChanged( ColumnAttributeGroup const i_attributeGroup ) { DBG_TESTSOLARMUTEX(); - if ( m_pOwner != NULL ) + if ( m_pOwner != nullptr ) m_pOwner->notifyColumnChange( m_pOwner->getColumnPos( *this ), i_attributeGroup ); } diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index 9f1d537ce3c3..7946fda76724 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -62,7 +62,7 @@ extern "C" { SAL_DLLPUBLIC_EXPORT vcl::Window* CreateWindow( VCLXWindow** ppNewComp, const css::awt::WindowDescriptor* pDescriptor, vcl::Window* pParent, WinBits nWinBits ) { - vcl::Window* pWindow = NULL; + vcl::Window* pWindow = nullptr; OUString aServiceName( pDescriptor->WindowServiceName ); if ( aServiceName.equalsIgnoreAsciiCase( "MultiLineEdit" ) ) { @@ -74,8 +74,8 @@ SAL_DLLPUBLIC_EXPORT vcl::Window* CreateWindow( VCLXWindow** ppNewComp, const cs } else { - *ppNewComp = NULL; - return NULL; + *ppNewComp = nullptr; + return nullptr; } } else if ( aServiceName.equalsIgnoreAsciiCase( "FileControl" ) ) @@ -87,8 +87,8 @@ SAL_DLLPUBLIC_EXPORT vcl::Window* CreateWindow( VCLXWindow** ppNewComp, const cs } else { - *ppNewComp = NULL; - return NULL; + *ppNewComp = nullptr; + return nullptr; } } else if (aServiceName.equalsIgnoreAsciiCase("FormattedField") ) @@ -130,8 +130,8 @@ SAL_DLLPUBLIC_EXPORT vcl::Window* CreateWindow( VCLXWindow** ppNewComp, const cs } else { - *ppNewComp = NULL; - return NULL; + *ppNewComp = nullptr; + return nullptr; } } else if ( aServiceName.equalsIgnoreAsciiCase( "Tree" ) ) @@ -149,8 +149,8 @@ SAL_DLLPUBLIC_EXPORT vcl::Window* CreateWindow( VCLXWindow** ppNewComp, const cs } else { - *ppNewComp = NULL; - return NULL; + *ppNewComp = nullptr; + return nullptr; } } else if ( aServiceName.equalsIgnoreAsciiCase( "Grid" ) ) @@ -162,8 +162,8 @@ SAL_DLLPUBLIC_EXPORT vcl::Window* CreateWindow( VCLXWindow** ppNewComp, const cs } else { - *ppNewComp = NULL; - return NULL; + *ppNewComp = nullptr; + return nullptr; } } return pWindow; @@ -811,7 +811,7 @@ void VCLXFileControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) SVTXFormattedField::SVTXFormattedField() - :m_pCurrentSupplier(NULL) + :m_pCurrentSupplier(nullptr) ,bIsStandardSupplier(true) ,nKeyToSetDelayed(-1) { @@ -823,7 +823,7 @@ SVTXFormattedField::~SVTXFormattedField() if (m_pCurrentSupplier) { m_pCurrentSupplier->release(); - m_pCurrentSupplier = NULL; + m_pCurrentSupplier = nullptr; } } @@ -878,7 +878,7 @@ void SVTXFormattedField::setProperty( const OUString& PropertyName, const css::u case BASEPROPERTY_FORMATSSUPPLIER: if (!Value.hasValue()) - setFormatsSupplier(css::uno::Reference< css::util::XNumberFormatsSupplier > (NULL)); + setFormatsSupplier(css::uno::Reference< css::util::XNumberFormatsSupplier > (nullptr)); else { css::uno::Reference< css::util::XNumberFormatsSupplier > xNFS; @@ -1302,7 +1302,7 @@ void SVTXFormattedField::setFormatsSupplier(const css::uno::Reference< css::util { FormattedField* pField = GetAs< FormattedField >(); - SvNumberFormatsSupplierObj* pNew = NULL; + SvNumberFormatsSupplierObj* pNew = nullptr; if (!xSupplier.is()) { if (pField) @@ -2324,7 +2324,7 @@ void SAL_CALL SVTXDateField::setProperty( const OUString& PropertyName, const cs // some properties need to be forwarded to the sub edit, too SolarMutexGuard g; - VclPtr< Edit > pSubEdit = GetWindow() ? static_cast< Edit* >( GetWindow().get() )->GetSubEdit() : NULL; + VclPtr< Edit > pSubEdit = GetWindow() ? static_cast< Edit* >( GetWindow().get() )->GetSubEdit() : nullptr; if ( !pSubEdit ) return; diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index f0a6b11dd44e..75d18ce5a3db 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -594,7 +594,7 @@ SvUnoImageMapObject* SvUnoImageMap::getObject( const Any& aElement ) aElement >>= xObject; SvUnoImageMapObject* pObject = SvUnoImageMapObject::getImplementation( xObject ); - if( NULL == pObject ) + if( nullptr == pObject ) throw IllegalArgumentException(); return pObject; @@ -606,7 +606,7 @@ void SAL_CALL SvUnoImageMap::insertByIndex( sal_Int32 Index, const Any& Element { SvUnoImageMapObject* pObject = getObject( Element ); const sal_Int32 nCount = maObjectList.size(); - if( NULL == pObject || Index > nCount ) + if( nullptr == pObject || Index > nCount ) throw IndexOutOfBoundsException(); pObject->acquire(); @@ -649,7 +649,7 @@ void SAL_CALL SvUnoImageMap::replaceByIndex( sal_Int32 Index, const Any& Element { SvUnoImageMapObject* pObject = getObject( Element ); const sal_Int32 nCount = maObjectList.size(); - if( NULL == pObject || Index >= nCount ) + if( nullptr == pObject || Index >= nCount ) throw IndexOutOfBoundsException(); std::list< SvUnoImageMapObject* >::iterator aIter = maObjectList.begin(); @@ -764,7 +764,7 @@ Reference< XInterface > SvUnoImageMap_createInstance( const ImageMap& rMap, cons bool SvUnoImageMap_fillImageMap( Reference< XInterface > xImageMap, ImageMap& rMap ) { SvUnoImageMap* pUnoImageMap = SvUnoImageMap::getImplementation( xImageMap ); - if( NULL == pUnoImageMap ) + if( nullptr == pUnoImageMap ) return false; return pUnoImageMap->fillImageMap( rMap ); diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index ba07e6145c45..0184419c8c38 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -349,7 +349,7 @@ namespace { SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); - ENSURE_OR_RETURN( m_pDialog, "Wizard::getDialogWindow: illegal call (execution did not start, yet)!", NULL ); + ENSURE_OR_RETURN( m_pDialog, "Wizard::getDialogWindow: illegal call (execution did not start, yet)!", nullptr ); return Reference< XWindow >( m_pDialog->GetComponentInterface(), UNO_QUERY ); } diff --git a/svtools/source/uno/wizard/wizardpagecontroller.cxx b/svtools/source/uno/wizard/wizardpagecontroller.cxx index 3951c93d8cee..b48eb3ae9dc9 100644 --- a/svtools/source/uno/wizard/wizardpagecontroller.cxx +++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx @@ -98,12 +98,12 @@ namespace svt { namespace uno TabPage* WizardPageController::getTabPage() const { - ENSURE_OR_RETURN( m_xWizardPage.is(), "WizardPageController::getTabPage: no external wizard page!", NULL ); + ENSURE_OR_RETURN( m_xWizardPage.is(), "WizardPageController::getTabPage: no external wizard page!", nullptr ); try { Reference< XWindow > xPageWindow( m_xWizardPage->getWindow(), UNO_SET_THROW ); vcl::Window* pPageWindow = VCLUnoHelper::GetWindow( xPageWindow ); - if ( pPageWindow == NULL ) + if ( pPageWindow == nullptr ) { // windows created via the XContainerWindowProvider might be controls, not real windows, so resolve // that one indirection @@ -112,14 +112,14 @@ namespace svt { namespace uno pPageWindow = VCLUnoHelper::GetWindow( xPageWindow ); } - OSL_ENSURE( pPageWindow != NULL, "WizardPageController::getTabPage: unable to find the Window implementation for the page's window!" ); + OSL_ENSURE( pPageWindow != nullptr, "WizardPageController::getTabPage: unable to find the Window implementation for the page's window!" ); return dynamic_cast< TabPage* >( pPageWindow ); } catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); } - return NULL; + return nullptr; } diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index 744a9c41b818..6849f3f9e856 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -170,7 +170,7 @@ namespace svt { namespace uno const WizardState eState = getCurrentState(); PWizardPageController pController( impl_getController( GetPage( eState ) ) ); - ENSURE_OR_RETURN( pController, "WizardShell::getCurrentWizardPage: invalid page/controller!", NULL ); + ENSURE_OR_RETURN( pController, "WizardShell::getCurrentWizardPage: invalid page/controller!", nullptr ); return pController->getWizardPage(); } @@ -184,7 +184,7 @@ namespace svt { namespace uno VclPtr<TabPage> WizardShell::createPage( WizardState i_nState ) { - ENSURE_OR_RETURN( m_xController.is(), "WizardShell::createPage: no WizardController!", NULL ); + ENSURE_OR_RETURN( m_xController.is(), "WizardShell::createPage: no WizardController!", nullptr ); std::shared_ptr< WizardPageController > pController( new WizardPageController( *this, m_xController, impl_stateToPageId( i_nState ) ) ); VclPtr<TabPage> pPage = pController->getTabPage(); |