[Libreoffice-commits] core.git: accessibility/inc avmedia/source basctl/source basebmp/source compilerplugins/clang connectivity/source dbaccess/source extensions/source framework/inc hwpfilter/source include/canvas include/comphelper include/editeng include/registry include/svx include/unotools include/vcl libreofficekit/qa libreofficekit/source mysqlc/source sc/inc sc/source sd/source sfx2/source svx/source sw/source ucb/source vcl/unx xmloff/source

Stephan Bergmann sbergman at redhat.com
Wed Dec 9 23:06:57 PST 2015


 accessibility/inc/accessibility/helper/listboxhelper.hxx |    2 
 avmedia/source/gstreamer/gstframegrabber.cxx             |    4 
 avmedia/source/gstreamer/gstplayer.cxx                   |   20 -
 avmedia/source/vlc/wrapper/SymbolLoader.hxx              |    2 
 basctl/source/basicide/basicmod.hxx                      |    2 
 basebmp/source/bitmapdevice.cxx                          |    4 
 compilerplugins/clang/store/nullptr.cxx                  |  167 ++++++++-------
 connectivity/source/drivers/evoab2/NResultSet.cxx        |    2 
 connectivity/source/drivers/odbc/OResultSet.cxx          |    2 
 connectivity/source/drivers/odbc/OStatement.cxx          |    2 
 connectivity/source/inc/java/GlobalRef.hxx               |   12 -
 connectivity/source/inc/java/LocalRef.hxx                |   10 
 dbaccess/source/core/api/KeySet.cxx                      |    2 
 extensions/source/plugin/unx/npnapi.cxx                  |   42 +--
 extensions/source/plugin/unx/nppapi.cxx                  |   48 ++--
 extensions/source/plugin/unx/npwrap.cxx                  |    2 
 extensions/source/plugin/unx/sysplug.cxx                 |    2 
 framework/inc/classes/checkediterator.hxx                |    4 
 hwpfilter/source/list.hxx                                |   12 -
 include/canvas/vclwrapper.hxx                            |    2 
 include/comphelper/listenernotification.hxx              |    4 
 include/comphelper/sequence.hxx                          |    8 
 include/comphelper/types.hxx                             |    6 
 include/comphelper/uno3.hxx                              |    2 
 include/editeng/AccessibleParaManager.hxx                |    2 
 include/registry/registry.hxx                            |    2 
 include/svx/svdobj.hxx                                   |    2 
 include/unotools/sharedunocomponent.hxx                  |    2 
 include/vcl/lazydelete.hxx                               |    8 
 include/vcl/vclptr.hxx                                   |    2 
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx      |   74 +++---
 libreofficekit/source/gtk/lokdocview.cxx                 |   20 -
 mysqlc/source/mysqlc_subcomponent.hxx                    |    2 
 sc/inc/fstalgorithm.hxx                                  |    4 
 sc/source/core/data/documen8.cxx                         |    2 
 sc/source/core/opencl/formulagroupcl.cxx                 |   18 -
 sc/source/ui/app/scmod.cxx                               |    2 
 sc/source/ui/dbgui/PivotLayoutDialog.cxx                 |    2 
 sc/source/ui/inc/ChildWindowWrapper.hxx                  |    2 
 sc/source/ui/unoobj/confuno.cxx                          |    2 
 sc/source/ui/vba/excelvbahelper.hxx                      |    2 
 sd/source/ui/app/sdmod.cxx                               |    2 
 sd/source/ui/remotecontrol/AvahiNetworkService.cxx       |    2 
 sfx2/source/appl/shutdowniconunx.cxx                     |    8 
 sfx2/source/dialog/titledockwin.cxx                      |    2 
 svx/source/form/fmcontrollayout.cxx                      |    2 
 svx/source/form/fmshell.cxx                              |    4 
 sw/source/uibase/app/swmodule.cxx                        |    2 
 ucb/source/ucp/webdav-neon/NeonSession.cxx               |    8 
 vcl/unx/generic/app/i18n_cb.cxx                          |    4 
 vcl/unx/generic/app/i18n_ic.cxx                          |   26 +-
 vcl/unx/generic/app/i18n_im.cxx                          |    4 
 vcl/unx/generic/app/i18n_status.cxx                      |    2 
 vcl/unx/gtk/a11y/atkfactory.cxx                          |    4 
 vcl/unx/gtk/a11y/atktext.cxx                             |    2 
 vcl/unx/gtk/a11y/atkwindow.cxx                           |    6 
 vcl/unx/gtk/a11y/atkwrapper.cxx                          |   10 
 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx                 |    2 
 vcl/unx/gtk/glomenu.cxx                                  |   16 -
 vcl/unx/gtk/gtksalframe.cxx                              |    4 
 vcl/unx/gtk/gtksalmenu.cxx                               |    2 
 vcl/unx/gtk/gtksys.cxx                                   |    2 
 vcl/unx/gtk/salnativewidgets-gtk.cxx                     |   24 +-
 vcl/unx/gtk3/gtk3gtkframe.cxx                            |    2 
 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx                |   12 -
 xmloff/source/forms/formcellbinding.cxx                  |    2 
 66 files changed, 349 insertions(+), 316 deletions(-)

New commits:
commit fb8a3fac5d448451794804a7470be45fa14da453
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Dec 10 08:06:06 2015 +0100

    loplugin:nullptr: More NULL -> nullptr automatic rewrite
    
    Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d

diff --git a/accessibility/inc/accessibility/helper/listboxhelper.hxx b/accessibility/inc/accessibility/helper/listboxhelper.hxx
index 71bc7df..eafbbbb 100644
--- a/accessibility/inc/accessibility/helper/listboxhelper.hxx
+++ b/accessibility/inc/accessibility/helper/listboxhelper.hxx
@@ -53,7 +53,7 @@ public:
 
     virtual Rectangle       GetDropDownPosSizePixel() const override
     {
-        Rectangle aTemp = m_aComboListBox.GetWindowExtentsRelative(NULL);
+        Rectangle aTemp = m_aComboListBox.GetWindowExtentsRelative(nullptr);
         Rectangle aRet = m_aComboListBox.GetDropDownPosSizePixel();
         aRet.Move(aTemp.TopLeft().X(),aTemp.TopLeft().Y());
         return aRet;
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx
index cd2eadf..9608e7e 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -127,12 +127,12 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
 
     // synchronously fetch the frame
 #ifdef AVMEDIA_GST_0_10
-    g_signal_emit_by_name( pSink, "pull-preroll", &pBuf, NULL );
+    g_signal_emit_by_name( pSink, "pull-preroll", &pBuf, nullptr );
     if( pBuf )
         pCaps = GST_BUFFER_CAPS( pBuf );
 #else
     GstSample *pSample = nullptr;
-    g_signal_emit_by_name( pSink, "pull-preroll", &pSample, NULL );
+    g_signal_emit_by_name( pSink, "pull-preroll", &pSample, nullptr );
 
     if( pSample )
     {
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index 6dd0f5c..4e22086 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -458,7 +458,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
              GST_MESSAGE_TYPE_NAME( message ), (int)mnWindowID );
         if( mpXOverlay )
             g_object_unref( G_OBJECT ( mpXOverlay ) );
-        g_object_set( GST_MESSAGE_SRC( message ), "force-aspect-ratio", FALSE, NULL );
+        g_object_set( GST_MESSAGE_SRC( message ), "force-aspect-ratio", FALSE, nullptr );
         mpXOverlay = GST_VIDEO_OVERLAY( GST_MESSAGE_SRC( message ) );
         g_object_ref( G_OBJECT ( mpXOverlay ) );
         if ( mnWindowID != 0 )
@@ -489,7 +489,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
                 if( mnWidth == 0 ) {
                     GList *pStreamInfo = nullptr;
 
-                    g_object_get( G_OBJECT( mpPlaybin ), "stream-info", &pStreamInfo, NULL );
+                    g_object_get( G_OBJECT( mpPlaybin ), "stream-info", &pStreamInfo, nullptr );
 
                     for ( ; pStreamInfo != nullptr; pStreamInfo = pStreamInfo->next) {
                         GObject *pInfo = G_OBJECT( pStreamInfo->data );
@@ -498,7 +498,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
                             continue;
 
                         int nType;
-                        g_object_get( pInfo, "type", &nType, NULL );
+                        g_object_get( pInfo, "type", &nType, nullptr );
                         GEnumValue *pValue = g_enum_get_value( G_PARAM_SPEC_ENUM( g_object_class_find_property( G_OBJECT_GET_CLASS( pInfo ), "type" ) )->enum_class,
                                                                nType );
 
@@ -506,7 +506,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
                             GstStructure *pStructure;
                             GstPad *pPad;
 
-                            g_object_get( pInfo, "object", &pPad, NULL );
+                            g_object_get( pInfo, "object", &pPad, nullptr );
                             pStructure = gst_caps_get_structure( GST_PAD_CAPS( pPad ), 0 );
                             if( pStructure ) {
                                 gst_structure_get_int( pStructure, "width", &mnWidth );
@@ -542,7 +542,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
                 if( gst_structure_get( gst_caps_get_structure( caps, 0 ),
                                        "width", G_TYPE_INT, &w,
                                        "height", G_TYPE_INT, &h,
-                                       NULL ) ) {
+                                       nullptr ) ) {
                     mnWidth = w;
                     mnHeight = h;
 
@@ -585,14 +585,14 @@ void Player::preparePlaybin( const OUString& rURL, GstElement *pSink )
         mpPlaybin = gst_element_factory_make( "playbin", nullptr );
         if( pSink != nullptr ) // used for getting preferred size etc.
         {
-            g_object_set( G_OBJECT( mpPlaybin ), "video-sink", pSink, NULL );
+            g_object_set( G_OBJECT( mpPlaybin ), "video-sink", pSink, nullptr );
             mbFakeVideo = true;
         }
         else
             mbFakeVideo = false;
 
         OString ascURL = OUStringToOString( rURL, RTL_TEXTENCODING_UTF8 );
-        g_object_set( G_OBJECT( mpPlaybin ), "uri", ascURL.getStr() , NULL );
+        g_object_set( G_OBJECT( mpPlaybin ), "uri", ascURL.getStr() , nullptr );
 
         pBus = gst_element_get_bus( mpPlaybin );
         if (mbWatchID)
@@ -782,7 +782,7 @@ void SAL_CALL Player::setMute( sal_Bool bSet )
             nVolume = 0.0;
         }
 
-        g_object_set( G_OBJECT( mpPlaybin ), "volume", nVolume, NULL );
+        g_object_set( G_OBJECT( mpPlaybin ), "volume", nVolume, nullptr );
 
         mbMuted = bSet;
     }
@@ -812,7 +812,7 @@ void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB )
     // change volume
      if( !mbMuted && mpPlaybin )
      {
-         g_object_set( G_OBJECT( mpPlaybin ), "volume", (gdouble) mnUnmutedVolume, NULL );
+         g_object_set( G_OBJECT( mpPlaybin ), "volume", (gdouble) mnUnmutedVolume, nullptr );
      }
 }
 
@@ -828,7 +828,7 @@ sal_Int16 SAL_CALL Player::getVolumeDB()
     if( mpPlaybin ) {
         double nGstVolume = 0.0;
 
-        g_object_get( G_OBJECT( mpPlaybin ), "volume", &nGstVolume, NULL );
+        g_object_get( G_OBJECT( mpPlaybin ), "volume", &nGstVolume, nullptr );
 
         nVolumeDB = (sal_Int16) ( 20.0*log10 ( nGstVolume ) );
     }
diff --git a/avmedia/source/vlc/wrapper/SymbolLoader.hxx b/avmedia/source/vlc/wrapper/SymbolLoader.hxx
index 3cf33b6..8e3faf4 100644
--- a/avmedia/source/vlc/wrapper/SymbolLoader.hxx
+++ b/avmedia/source/vlc/wrapper/SymbolLoader.hxx
@@ -79,7 +79,7 @@ namespace
             if ( !aMethod )
             {
                 SAL_WARN("avmedia", "Cannot load method " << pMap[ i ].symName);
-                *pMap[ i ].refValue = NULL;
+                *pMap[ i ].refValue = nullptr;
                 return false;
             }
             else
diff --git a/basctl/source/basicide/basicmod.hxx b/basctl/source/basicide/basicmod.hxx
index f30c30b..f462927 100644
--- a/basctl/source/basicide/basicmod.hxx
+++ b/basctl/source/basicide/basicmod.hxx
@@ -31,7 +31,7 @@ class Module : public SfxModule
     static Module* mpModule;
 public:
     Module ( ResMgr *pMgr, SfxObjectFactory *pObjFact) :
-        SfxModule( pMgr, false, pObjFact, NULL )
+        SfxModule( pMgr, false, pObjFact, nullptr )
     { }
 public:
     static Module*& Get () { return mpModule; }
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index 37ebf91..9469d56 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -383,7 +383,7 @@ namespace
         {
             // TODO(P1): dynamic_cast usually called twice for
             // compatible formats
-            return getCompatibleBitmap(bmp).get() != NULL;
+            return getCompatibleBitmap(bmp).get() != nullptr;
         }
 
         std::shared_ptr<mask_bitmap_type> getCompatibleClipMask( const BitmapDeviceSharedPtr& bmp ) const
@@ -403,7 +403,7 @@ namespace
         {
             // TODO(P1): dynamic_cast usually called twice for
             // compatible formats
-            return std::dynamic_pointer_cast<mask_bitmap_type>( bmp ).get() != NULL;
+            return std::dynamic_pointer_cast<mask_bitmap_type>( bmp ).get() != nullptr;
         }
 
         static std::shared_ptr<alphamask_bitmap_type> getCompatibleAlphaMask( const BitmapDeviceSharedPtr& bmp )
diff --git a/compilerplugins/clang/store/nullptr.cxx b/compilerplugins/clang/store/nullptr.cxx
index 5b38bbf..8bed1ce 100644
--- a/compilerplugins/clang/store/nullptr.cxx
+++ b/compilerplugins/clang/store/nullptr.cxx
@@ -8,6 +8,7 @@
  */
 
 #include <cassert>
+#include <set>
 
 #include "compat.hxx"
 #include "plugin.hxx"
@@ -41,6 +42,8 @@ public:
 
     bool VisitImplicitCastExpr(CastExpr const * expr);
 
+    bool VisitGNUNullExpr(GNUNullExpr const * expr);
+
 private:
     bool isInLokIncludeFile(SourceLocation spellingLocation) const;
 
@@ -48,10 +51,16 @@ private:
 
     bool isMacroBodyExpansion(SourceLocation location) const;
 
+    void handleNull(
+        Expr const * expr, char const * castKind,
+        Expr::NullPointerConstantKind nullPointerKind);
+
     void rewriteOrWarn(
-        Expr const & expr, char const * castKind,
-        Expr::NullPointerConstantKind nullPointerkind,
+        Expr const * expr, char const * castKind,
+        Expr::NullPointerConstantKind nullPointerKind,
         char const * replacement);
+
+    std::set<Expr const *> gnuNulls_;
 };
 
 bool Nullptr::VisitImplicitCastExpr(CastExpr const * expr) {
@@ -78,7 +87,7 @@ bool Nullptr::VisitImplicitCastExpr(CastExpr const * expr) {
         case Expr::NPCK_ZeroLiteral:
             report(
                 DiagnosticsEngine::Warning,
-                "suspicious ValueDependendIsNull %0", expr->getLocStart())
+                "suspicious ValueDependentIsNull %0", expr->getLocStart())
                 << kindName(k) << expr->getSourceRange();
             break;
         default:
@@ -88,67 +97,20 @@ bool Nullptr::VisitImplicitCastExpr(CastExpr const * expr) {
     case Expr::NPCK_CXX11_nullptr:
         break;
     default:
-        {
-            Expr const * e = expr->getSubExpr();
-            SourceLocation loc;
-            for (;;) {
-                e = e->IgnoreImpCasts();
-                loc = e->getLocStart();
-                while (compiler.getSourceManager().isMacroArgExpansion(loc)) {
-                    loc = compiler.getSourceManager()
-                        .getImmediateMacroCallerLoc(
-                            loc);
-                }
-                if (isMacroBodyExpansion(loc)) {
-                    if (Lexer::getImmediateMacroName(
-                            loc, compiler.getSourceManager(),
-                            compiler.getLangOpts())
-                        == "NULL")
-                    {
-                        if (!compiler.getLangOpts().CPlusPlus) {
-                            return true;
-                        }
-                        loc = compiler.getSourceManager()
-                            .getImmediateExpansionRange(loc).first;
-                        if (isInUnoIncludeFile(
-                                compiler.getSourceManager().getSpellingLoc(loc))
-                            || isInLokIncludeFile(
-                                compiler.getSourceManager().getSpellingLoc(loc))
-                            || isFromCIncludeFile(
-                                compiler.getSourceManager().getSpellingLoc(
-                                    loc)))
-                        {
-                            return true;
-                        }
-                    } else if (ignoreLocation(
-                                   compiler.getSourceManager().getSpellingLoc(
-                                       loc)))
-                    {
-                        return true;
-                    }
-                }
-                ParenExpr const * pe = dyn_cast<ParenExpr>(e);
-                if (pe == nullptr) {
-                    break;
-                }
-                e = pe->getSubExpr();
-            }
-            rewriteOrWarn(
-                *e, expr->getCastKindName(), k,
-                ((!compiler.getLangOpts().CPlusPlus
-                  || isInUnoIncludeFile(
-                      compiler.getSourceManager().getSpellingLoc(loc))
-                  || isInLokIncludeFile(
-                      compiler.getSourceManager().getSpellingLoc(loc))
-                  || isFromCIncludeFile(
-                      compiler.getSourceManager().getSpellingLoc(loc)))
-                 ? "NULL" : "nullptr"));
-        }
+        handleNull(expr->getSubExpr(), expr->getCastKindName(), k);
         break;
     }
     return true;
 }
 
+bool Nullptr::VisitGNUNullExpr(GNUNullExpr const * expr) {
+    if (ignoreLocation(expr)) {
+        return true;
+    }
+    handleNull(expr, nullptr, Expr::NPCK_GNUNull);
+    return true;
+}
+
 bool Nullptr::isInLokIncludeFile(SourceLocation spellingLocation) const {
     return compiler.getSourceManager().getFilename(spellingLocation)
         .startswith(SRCDIR "/include/LibreOfficeKit/");
@@ -171,12 +133,77 @@ bool Nullptr::isMacroBodyExpansion(SourceLocation location) const {
 #endif
 }
 
+void Nullptr::handleNull(
+    Expr const * expr, char const * castKind,
+    Expr::NullPointerConstantKind nullPointerKind)
+{
+    auto e = expr;
+    SourceLocation loc;
+    for (;;) {
+        e = e->IgnoreImpCasts();
+        loc = e->getLocStart();
+        while (compiler.getSourceManager().isMacroArgExpansion(loc)) {
+            loc = compiler.getSourceManager().getImmediateMacroCallerLoc(loc);
+        }
+        if (isMacroBodyExpansion(loc)) {
+            if (Lexer::getImmediateMacroName(
+                    loc, compiler.getSourceManager(), compiler.getLangOpts())
+                == "NULL")
+            {
+                if (!compiler.getLangOpts().CPlusPlus) {
+                    //TODO: if !castKind, warn if NULL is passed into fn call
+                    // ellipsis, cast to void*
+                    return;
+                }
+                loc = compiler.getSourceManager()
+                    .getImmediateExpansionRange(loc).first;
+                if (isInUnoIncludeFile(
+                        compiler.getSourceManager().getSpellingLoc(loc))
+                    || isInLokIncludeFile(
+                        compiler.getSourceManager().getSpellingLoc(loc))
+                    || isFromCIncludeFile(
+                        compiler.getSourceManager().getSpellingLoc(loc)))
+                {
+                    //TODO: if !castKind, warn if NULL is passed into fn call
+                    // ellipsis, cast to void*
+                    return;
+                }
+            } else if (ignoreLocation(
+                           compiler.getSourceManager().getSpellingLoc(loc)))
+            {
+                return;
+            }
+        }
+        ParenExpr const * pe = dyn_cast<ParenExpr>(e);
+        if (pe == nullptr) {
+            break;
+        }
+        e = pe->getSubExpr();
+    }
+    if (nullPointerKind == Expr::NPCK_GNUNull) {
+        if (castKind == nullptr) {
+            if (gnuNulls_.erase(expr) == 1) {
+                return;
+            }
+        } else {
+            auto const ok = gnuNulls_.insert(expr).second;
+            assert(ok); (void) ok;
+        }
+    }
+    auto const asMacro = !compiler.getLangOpts().CPlusPlus
+        || isInUnoIncludeFile(compiler.getSourceManager().getSpellingLoc(loc))
+        || isInLokIncludeFile(compiler.getSourceManager().getSpellingLoc(loc))
+        || isFromCIncludeFile(compiler.getSourceManager().getSpellingLoc(loc));
+    assert(!asMacro || nullPointerKind != Expr::NPCK_GNUNull);
+    rewriteOrWarn(e, castKind, nullPointerKind, asMacro ? "NULL" : "nullptr");
+}
+
 void Nullptr::rewriteOrWarn(
-    Expr const & expr, char const * castKind,
+    Expr const * expr, char const * castKind,
     Expr::NullPointerConstantKind nullPointerKind, char const * replacement)
 {
     if (rewriter != nullptr) {
-        SourceLocation locStart(expr.getLocStart());
+        SourceLocation locStart(expr->getLocStart());
         while (compiler.getSourceManager().isMacroArgExpansion(locStart)) {
             locStart = compiler.getSourceManager()
                 .getImmediateMacroCallerLoc(locStart);
@@ -190,7 +217,7 @@ void Nullptr::rewriteOrWarn(
             locStart = compiler.getSourceManager().getImmediateExpansionRange(
                 locStart).first;
         }
-        SourceLocation locEnd(expr.getLocEnd());
+        SourceLocation locEnd(expr->getLocEnd());
         while (compiler.getSourceManager().isMacroArgExpansion(locEnd)) {
             locEnd = compiler.getSourceManager()
                 .getImmediateMacroCallerLoc(locEnd);
@@ -208,11 +235,17 @@ void Nullptr::rewriteOrWarn(
             return;
         }
     }
-    report(
-        DiagnosticsEngine::Warning, "%0 ValueDependendIsNotNull %1 -> %2",
-        expr.getLocStart())
-        << castKind << kindName(nullPointerKind) << replacement
-        << expr.getSourceRange();
+    if (castKind == nullptr) {
+        report(DiagnosticsEngine::Warning, "%0 -> %1", expr->getLocStart())
+            << kindName(nullPointerKind) << replacement
+            << expr->getSourceRange();
+    } else {
+        report(
+            DiagnosticsEngine::Warning, "%0 ValueDependentIsNotNull %1 -> %2",
+            expr->getLocStart())
+            << castKind << kindName(nullPointerKind) << replacement
+            << expr->getSourceRange();
+    }
 }
 
 loplugin::Plugin::Registration<Nullptr> X("nullptr", true);
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 0b9310b..1f1d1d9 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -499,7 +499,7 @@ ESource * findSource( const char *id )
 {
     ESourceList *pSourceList = nullptr;
 
-    g_return_val_if_fail (id != nullptr, NULL);
+    g_return_val_if_fail (id != nullptr, nullptr);
 
     if (!e_book_get_addressbooks (&pSourceList, nullptr))
         pSourceList = nullptr;
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index 42d0818..39c0460 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -1281,7 +1281,7 @@ template < typename T, SQLINTEGER BufferLength > T OResultSet::getStmtOption (SQ
 {
     T result (dflt);
     OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!");
-    N3SQLGetStmtAttr(m_aStatementHandle, fOption, &result, BufferLength, NULL);
+    N3SQLGetStmtAttr(m_aStatementHandle, fOption, &result, BufferLength, nullptr);
     return result;
 }
 template < typename T, SQLINTEGER BufferLength > SQLRETURN OResultSet::setStmtOption (SQLINTEGER fOption, T value) const
diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx
index 104a98f..301522d 100644
--- a/connectivity/source/drivers/odbc/OStatement.cxx
+++ b/connectivity/source/drivers/odbc/OStatement.cxx
@@ -426,7 +426,7 @@ template < typename T, SQLINTEGER BufferLength > T OStatement_Base::getStmtOptio
 {
     T result (dflt);
     OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!");
-    N3SQLGetStmtAttr(m_aStatementHandle, fOption, &result, BufferLength, NULL);
+    N3SQLGetStmtAttr(m_aStatementHandle, fOption, &result, BufferLength, nullptr);
     return result;
 }
 template < typename T, SQLINTEGER BufferLength > SQLRETURN OStatement_Base::setStmtOption (SQLINTEGER fOption, T value) const
diff --git a/connectivity/source/inc/java/GlobalRef.hxx b/connectivity/source/inc/java/GlobalRef.hxx
index 760e018..5160e81 100644
--- a/connectivity/source/inc/java/GlobalRef.hxx
+++ b/connectivity/source/inc/java/GlobalRef.hxx
@@ -35,12 +35,12 @@ namespace connectivity { namespace jdbc
     {
     public:
         GlobalRef()
-            :m_object( NULL )
+            :m_object( nullptr )
         {
         }
 
         GlobalRef( const GlobalRef& _source )
-            :m_object( NULL )
+            :m_object( nullptr )
         {
             *this = _source;
         }
@@ -62,17 +62,17 @@ namespace connectivity { namespace jdbc
 
         void reset()
         {
-            if ( m_object != NULL )
+            if ( m_object != nullptr )
             {
                 SDBThreadAttach t;
                 t.env().DeleteGlobalRef( m_object );
-                m_object = NULL;
+                m_object = nullptr;
             }
         }
 
         void set( JNIEnv& _environment, T _object )
         {
-            if ( m_object != NULL )
+            if ( m_object != nullptr )
                 _environment.DeleteGlobalRef( m_object );
             m_object = _object;
             if ( m_object )
@@ -91,7 +91,7 @@ namespace connectivity { namespace jdbc
 
         bool is() const
         {
-            return m_object != NULL;
+            return m_object != nullptr;
         }
 
     private:
diff --git a/connectivity/source/inc/java/LocalRef.hxx b/connectivity/source/inc/java/LocalRef.hxx
index 2e0369a..95135df 100644
--- a/connectivity/source/inc/java/LocalRef.hxx
+++ b/connectivity/source/inc/java/LocalRef.hxx
@@ -38,7 +38,7 @@ namespace connectivity { namespace jdbc
     public:
         explicit LocalRef( JNIEnv& environment )
             :m_environment( environment )
-            ,m_object( NULL )
+            ,m_object( nullptr )
         {
         }
 
@@ -56,7 +56,7 @@ namespace connectivity { namespace jdbc
         T release()
         {
             T t = m_object;
-            m_object = NULL;
+            m_object = nullptr;
             return t;
         }
 
@@ -64,16 +64,16 @@ namespace connectivity { namespace jdbc
 
         void reset()
         {
-            if ( m_object != NULL )
+            if ( m_object != nullptr )
             {
                 m_environment.DeleteLocalRef( m_object );
-                m_object = NULL;
+                m_object = nullptr;
             }
         }
 
         JNIEnv& env() const { return m_environment; }
         T       get() const { return m_object; }
-        bool    is()  const { return m_object != NULL; }
+        bool    is()  const { return m_object != nullptr; }
 
     private:
         LocalRef(LocalRef &) = delete;
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 5b108c8..8aafd7e 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -93,7 +93,7 @@ namespace
         }
         catch(const Exception&)
         {
-            r = NULL;
+            r = nullptr;
         }
         catch(...)
         {
diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx
index 7f70a5e..80a201f 100644
--- a/extensions/source/plugin/unx/npnapi.cxx
+++ b/extensions/source/plugin/unx/npnapi.cxx
@@ -88,7 +88,7 @@ static NPError l_NPN_DestroyStream( NPP instance, NPStream* stream, NPError reas
                   &nFileID, sizeof( nFileID ),
                   POST_STRING( stream->url ),
                   &reason, sizeof( reason ),
-                  NULL );
+                  nullptr );
 
     if( ! pMes )
         return NPERR_GENERIC_ERROR;
@@ -137,7 +137,7 @@ static NPError l_NPN_GetURL( NPP instance, const char* url, const char* window )
                   &nInstance, sizeof( nInstance ),
                   POST_STRING(url),
                   POST_STRING(window),
-                  NULL );
+                  nullptr );
     SAL_WARN_IF(!pMes, "extensions.plugin", "geturl: message unanswered");
     if( ! pMes )
         return NPERR_GENERIC_ERROR;
@@ -165,7 +165,7 @@ static NPError l_NPN_GetURLNotify( NPP instance, const char* url, const char* ta
                   &notifyData, sizeof( void* ), // transmit the actual pointer
                   // since it is a pointer to private data fed back
                   // by NPP_URLNotify; this can be thought of as an ID
-                  NULL );
+                  nullptr );
     if( ! pMes )
         return NPERR_GENERIC_ERROR;
 
@@ -189,7 +189,7 @@ static NPError l_NPN_NewStream( NPP instance, NPMIMEType type, const char* targe
                   &nInstance, sizeof( nInstance ),
                   POST_STRING(type),
                   POST_STRING(target),
-                  NULL );
+                  nullptr );
     if( ! pMes )
         return NPERR_GENERIC_ERROR;
 
@@ -226,7 +226,7 @@ static NPError l_NPN_PostURLNotify( NPP instance, const char* url, const char* t
                   buf, len,
                   &file, sizeof( NPBool ),
                   &notifyData, sizeof( void* ), // send the real pointer
-                  NULL );
+                  nullptr );
 
     if( ! pMes )
         return NPERR_GENERIC_ERROR;
@@ -250,7 +250,7 @@ static NPError l_NPN_PostURL( NPP instance, const char* url, const char* window,
                   &len, sizeof( len ),
                   buf, len,
                   &file, sizeof( NPBool ),
-                  NULL );
+                  nullptr );
     if( ! pMes )
         return NPERR_GENERIC_ERROR;
 
@@ -287,7 +287,7 @@ static NPError l_NPN_RequestRead( NPStream* stream, NPByteRange* rangeList )
                   &nFileID, sizeof( nFileID ),
                   &nRanges, sizeof( nRanges ),
                   pArray.get(), sizeof( sal_uInt32 ) * 2 * nRanges,
-                  NULL );
+                  nullptr );
 
     if( ! pMes )
     {
@@ -308,7 +308,7 @@ static void l_NPN_Status( NPP instance, const char* message )
     pConnector->Send( eNPN_Status,
                       &nInstance, sizeof( nInstance ),
                       POST_STRING( message ),
-                      NULL );
+                      nullptr );
 }
 
 static const char* l_NPN_UserAgent( NPP instance )
@@ -327,7 +327,7 @@ static const char* l_NPN_UserAgent( NPP instance )
     MediatorMessage* pMes = pConnector->
         Transact( eNPN_UserAgent,
                   &nInstance, sizeof( nInstance ),
-                  NULL );
+                  nullptr );
 
     if( ! pMes )
         return pAgent;
@@ -358,7 +358,7 @@ static int32_t l_NPN_Write( NPP instance, NPStream* stream, int32_t len, void* b
                   &nFileID, sizeof( nFileID ),
                   &len, sizeof( len ),
                   buffer, len,
-                  NULL );
+                  nullptr );
 
     if( ! pMes )
         return 0;
@@ -542,7 +542,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                 aReason = aPluginFuncs.destroystream( instance, pStream, aReason );
                 Respond( pMessage->m_nID,
                          reinterpret_cast<char*>(&aReason), sizeof( aReason ),
-                         NULL );
+                         nullptr );
 
                 delete [] pStream->url;
                 delete pStream;
@@ -563,7 +563,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
 
                 // the other side will call eNPP_DestroyPhase2 after this
                 NPError aReason = NPERR_NO_ERROR;
-                Respond( pMessage->m_nID, reinterpret_cast<char*>(&aReason), sizeof( aReason ), NULL );
+                Respond( pMessage->m_nID, reinterpret_cast<char*>(&aReason), sizeof( aReason ), nullptr );
             }
             break;
             case eNPP_DestroyPhase2:
@@ -580,14 +580,14 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                     Respond( pMessage->m_nID,
                              reinterpret_cast<char*>(&aRet), sizeof( aRet ),
                              pSave->buf, pSave->len,
-                             NULL );
+                             nullptr );
                     delete [] static_cast<char*>(pSave->buf);
                 }
                 else
                     Respond( pMessage->m_nID,
                              reinterpret_cast<char*>(&aRet), sizeof( aRet ),
                              "0000", 4,
-                             NULL );
+                             nullptr );
 
                 #if ENABLE_GTK
                 if( pInst->pGtkWindow )
@@ -633,7 +633,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                 Respond( pMessage->m_nID,
                          reinterpret_cast<char*>(&aRet), sizeof( aRet ),
                          &nStype, sizeof( nStype ),
-                         NULL );
+                         nullptr );
                 delete [] pType;
                 delete [] pSeekable;
             }
@@ -695,7 +695,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
 
                 Respond( pMessage->m_nID,
                          reinterpret_cast<char*>(&aRet), sizeof( aRet ),
-                         NULL );
+                         nullptr );
                 delete [] pMode;
                 delete [] pArgc;
                 delete [] pType;
@@ -801,7 +801,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                     "pluginapp: NPP_SetWindow returns " << aRet);
                 Respond( pMessage->m_nID,
                          reinterpret_cast<char*>(&aRet), sizeof( aRet ),
-                         NULL );
+                         nullptr );
                 delete [] reinterpret_cast<char*>(pWindow);
             }
             break;
@@ -848,7 +848,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
 
                 Respond( pMessage->m_nID,
                          reinterpret_cast<char*>(&nRet), sizeof( nRet ),
-                         NULL );
+                         nullptr );
             }
             break;
             case eNPP_Write:
@@ -875,7 +875,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
 
                 Respond( pMessage->m_nID,
                          reinterpret_cast<char*>(&nRet), sizeof( nRet ),
-                         NULL );
+                         nullptr );
                 delete [] buffer;
             }
             break;
@@ -887,7 +887,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                 char* pMIME = pNPP_GetMIMEDescription();
                 Respond( pMessage->m_nID,
                          POST_NONCONST_STRING( pMIME ),
-                         NULL );
+                         nullptr );
             }
             break;
             case eNPP_Initialize:
@@ -910,7 +910,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                 SAL_INFO(
                     "extensions.plugin",
                     "pluginapp: NP_Initialize returns " << aRet);
-                Respond( pMessage->m_nID, reinterpret_cast<char*>(&aRet), sizeof( aRet ), NULL );
+                Respond( pMessage->m_nID, reinterpret_cast<char*>(&aRet), sizeof( aRet ), nullptr );
             }
             break;
             case eNPP_Shutdown:
diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx
index eb073e3..ec842dc 100644
--- a/extensions/source/plugin/unx/nppapi.cxx
+++ b/extensions/source/plugin/unx/nppapi.cxx
@@ -107,7 +107,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                 char* pWindow       = pMessage->GetString();
                 NPError aRet = NPN_GetURL( instance, pUrl, pWindow );
                 Respond( pMessage->m_nID,
-                         reinterpret_cast<char*>(&aRet), sizeof( NPError ), NULL );
+                         reinterpret_cast<char*>(&aRet), sizeof( NPError ), nullptr );
                 delete [] pUrl;
                 delete [] pWindow;
             }
@@ -122,7 +122,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                 NPError aRet = NPN_GetURLNotify( instance, pUrl, pWindow,
                                                  *pNotifyData );
                 Respond( pMessage->m_nID,
-                         reinterpret_cast<char*>(&aRet), sizeof( NPError ), NULL );
+                         reinterpret_cast<char*>(&aRet), sizeof( NPError ), nullptr );
                 delete [] pUrl;
                 delete [] pWindow;
                 delete [] pNotifyData;
@@ -158,7 +158,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                         "nonexistent StreamID " << nFileID);
 
                 Respond( pMessage->m_nID,
-                         reinterpret_cast<char*>(&aRet), sizeof( NPError ), NULL );
+                         reinterpret_cast<char*>(&aRet), sizeof( NPError ), nullptr );
 
                 delete [] pUrl;
                 delete [] pReason;
@@ -183,7 +183,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                              "", 0,
                              &nDummy, sizeof(sal_uInt32),
                              &nDummy, sizeof(sal_uInt32),
-                             NULL );
+                             nullptr );
                 }
                 else
                 {
@@ -195,7 +195,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                              pStream->url, nLen,
                              &pStream->end, sizeof(sal_uInt32),
                              &pStream->lastmodified, sizeof(sal_uInt32),
-                             NULL );
+                             nullptr );
                 }
 
                 delete [] pTarget;
@@ -214,7 +214,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                 void** pNData   = static_cast<void**>(pMessage->GetBytes());
                 NPError aRet =
                     NPN_PostURLNotify( instance, pUrl, pTarget, nLen, pBuf, *pFile, *pNData );
-                Respond( pMessage->m_nID, reinterpret_cast<char*>(&aRet), sizeof( aRet ), NULL );
+                Respond( pMessage->m_nID, reinterpret_cast<char*>(&aRet), sizeof( aRet ), nullptr );
                 delete [] pUrl;
                 delete [] pTarget;
                 delete [] pBuf;
@@ -233,7 +233,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                 NPBool* pFile   = static_cast<NPBool*>(pMessage->GetBytes());
                 NPError aRet =
                     NPN_PostURL( instance, pUrl, pWindow, nLen, pBuf, *pFile );
-                Respond( pMessage->m_nID, reinterpret_cast<char*>(&aRet), sizeof( aRet ), NULL );
+                Respond( pMessage->m_nID, reinterpret_cast<char*>(&aRet), sizeof( aRet ), nullptr );
                 delete [] pUrl;
                 delete [] pWindow;
                 delete [] pBuf;
@@ -257,7 +257,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                     pRun = pRun->next;
                 }
                 NPError aRet = NPN_RequestRead( pStream, pFirst );
-                Respond( pMessage->m_nID, reinterpret_cast<char*>(&aRet), sizeof( aRet ), NULL );
+                Respond( pMessage->m_nID, reinterpret_cast<char*>(&aRet), sizeof( aRet ), nullptr );
                 while( pFirst )
                 {
                     pRun = pFirst->next;
@@ -285,7 +285,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                          &minor, sizeof( int ),
                          &net_major, sizeof( int ),
                          &net_minor, sizeof( int ),
-                         NULL );
+                         nullptr );
             }
             break;
             case eNPN_Write:
@@ -299,7 +299,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                 sal_Int32 nRet = NPN_Write( instance, pStream, nLen, pBuffer );
                 Respond( pMessage->m_nID,
                          reinterpret_cast<char*>(&nRet), sizeof( nRet ),
-                         NULL );
+                         nullptr );
                 delete [] static_cast<char*>(pBuffer);
                 delete instance;
             }
@@ -311,7 +311,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
                 const char* pAnswer = NPN_UserAgent( instance );
                 Respond( pMessage->m_nID,
                          const_cast<char*>(pAnswer), strlen( pAnswer ),
-                         NULL );
+                         nullptr );
             }
             break;
             default:
@@ -343,14 +343,14 @@ NPError UnxPluginComm::NPP_Destroy( NPP instance, NPSavedData** save )
     MediatorMessage* pMes =
         Transact( eNPP_Destroy,
                   POST_INSTANCE(),
-                  NULL );
+                  nullptr );
     if( ! pMes )
         return NPERR_GENERIC_ERROR;
     delete pMes;
 
     pMes = Transact( eNPP_DestroyPhase2,
                      POST_INSTANCE(),
-                     NULL );
+                     nullptr );
     if( ! pMes )
         return NPERR_GENERIC_ERROR;
 
@@ -383,7 +383,7 @@ NPError UnxPluginComm::NPP_DestroyStream( NPP instance, NPStream* stream, NPErro
                   POST_INSTANCE(),
                   &nFileID, sizeof( nFileID ),
                   &reason, sizeof( reason ),
-                  NULL );
+                  nullptr );
     m_aNPWrapStreams.erase( m_aNPWrapStreams.begin() + nFileID );
     if( ! pMes )
         return NPERR_GENERIC_ERROR;
@@ -397,7 +397,7 @@ NPError UnxPluginComm::NPP_Initialize()
 {
     MediatorMessage* pMes =
         Transact( eNPP_Initialize,
-                  NULL );
+                  nullptr );
     if( ! pMes )
         return NPERR_GENERIC_ERROR;
 
@@ -445,7 +445,7 @@ NPError UnxPluginComm::NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mo
                       pArgnBuf, nArgnLen,
                       pArgvBuf, nArgvLen,
                       saved->buf, static_cast<size_t>(saved->len),
-                      NULL );
+                      nullptr );
     else
         pMes =
             Transact( eNPP_New,
@@ -455,7 +455,7 @@ NPError UnxPluginComm::NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mo
                       pArgnBuf, nArgnLen,
                       pArgvBuf, nArgvLen,
                       "0000", size_t(4),
-                      NULL );
+                      nullptr );
     delete [] pArgnBuf;
     delete [] pArgvBuf;
     if( ! pMes )
@@ -482,7 +482,7 @@ NPError UnxPluginComm::NPP_NewStream( NPP instance, NPMIMEType type, NPStream* s
                   &stream->end, sizeof( stream->end ),
                   &stream->lastmodified, sizeof( stream->lastmodified ),
                   &seekable, sizeof( seekable ),
-                  NULL );
+                  nullptr );
 
     if( ! pMes )
         return NPERR_GENERIC_ERROR;
@@ -505,7 +505,7 @@ NPError UnxPluginComm::NPP_SetWindow( NPP instance, NPWindow* window )
         Transact( eNPP_SetWindow,
                   POST_INSTANCE(),
                   window, sizeof( NPWindow ),
-                  NULL );
+                  nullptr );
     if( ! pMes )
         return NPERR_GENERIC_ERROR;
 
@@ -516,7 +516,7 @@ NPError UnxPluginComm::NPP_SetWindow( NPP instance, NPWindow* window )
 
 void UnxPluginComm::NPP_Shutdown()
 {
-    Send( eNPP_Shutdown, NULL );
+    Send( eNPP_Shutdown, nullptr );
 }
 
 void UnxPluginComm::NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname )
@@ -530,7 +530,7 @@ void UnxPluginComm::NPP_StreamAsFile( NPP instance, NPStream* stream, const char
           POST_INSTANCE(),
           &nFileID, sizeof( nFileID ),
           fname, strlen( fname ),
-          NULL );
+          nullptr );
 }
 
 void UnxPluginComm::NPP_URLNotify( NPP instance, const char* url, NPReason reason, void* notifyData )
@@ -542,7 +542,7 @@ void UnxPluginComm::NPP_URLNotify( NPP instance, const char* url, NPReason reaso
           url, strlen( url ),
           &reason, sizeof( reason ),
           &notifyData, sizeof( void* ),
-          NULL );
+          nullptr );
 }
 
 int32_t UnxPluginComm::NPP_Write( NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer )
@@ -558,7 +558,7 @@ int32_t UnxPluginComm::NPP_Write( NPP instance, NPStream* stream, int32_t offset
                   &nFileID, sizeof( nFileID ),
                   &offset, sizeof( offset ),
                   buffer, static_cast<size_t>(len),
-                  NULL );
+                  nullptr );
     if( ! pMes )
         return 0;
 
@@ -579,7 +579,7 @@ int32_t UnxPluginComm::NPP_WriteReady( NPP instance, NPStream* stream )
         Transact( eNPP_WriteReady,
                   POST_INSTANCE(),
                   &nFileID, sizeof( nFileID ),
-                  NULL );
+                  nullptr );
 
     if( ! pMes )
         return 0;
diff --git a/extensions/source/plugin/unx/npwrap.cxx b/extensions/source/plugin/unx/npwrap.cxx
index c0a0649..e58c0f2 100644
--- a/extensions/source/plugin/unx/npwrap.cxx
+++ b/extensions/source/plugin/unx/npwrap.cxx
@@ -438,7 +438,7 @@ int main( int argc, char **argv)
         // send that we are ready to go
         MediatorMessage* pMessage =
             pConnector->Transact( "init req", 8,
-                                  NULL );
+                                  nullptr );
         delete pMessage;
 
     #if OSL_DEBUG_LEVEL > 3
diff --git a/extensions/source/plugin/unx/sysplug.cxx b/extensions/source/plugin/unx/sysplug.cxx
index b7a1d81..0693033 100644
--- a/extensions/source/plugin/unx/sysplug.cxx
+++ b/extensions/source/plugin/unx/sysplug.cxx
@@ -116,7 +116,7 @@ UnxPluginComm::UnxPluginComm(
         MediatorMessage* pMessage = GetNextMessage( true );
         Respond( pMessage->m_nID,
                  const_cast<char*>("init ack"),8,
-                 NULL );
+                 nullptr );
         delete pMessage;
         NPP_Initialize();
     }
diff --git a/framework/inc/classes/checkediterator.hxx b/framework/inc/classes/checkediterator.hxx
index 978dc4d..ab3879e 100644
--- a/framework/inc/classes/checkediterator.hxx
+++ b/framework/inc/classes/checkediterator.hxx
@@ -62,7 +62,7 @@ class CheckedIterator
 
         inline CheckedIterator()
                 :   m_eEndState ( E_UNKNOWN )
-                ,   m_pContainer( NULL      )
+                ,   m_pContainer( nullptr      )
         {
         }
 
@@ -81,7 +81,7 @@ class CheckedIterator
         inline CheckedIterator& operator++()
         {
             // Warn programmer if he forget to initailize object!
-            SAL_WARN_IF( m_pContainer==NULL, "fwk", "CheckedIterator::operator++(): Object not initialized!" );
+            SAL_WARN_IF( m_pContainer==nullptr, "fwk", "CheckedIterator::operator++(): Object not initialized!" );
             // Step to next element if any exist or set our end states.
             switch( m_eEndState )
             {
diff --git a/hwpfilter/source/list.hxx b/hwpfilter/source/list.hxx
index 99dcc7f..c4371d2 100644
--- a/hwpfilter/source/list.hxx
+++ b/hwpfilter/source/list.hxx
@@ -89,7 +89,7 @@ public:
 template<class T>
 LinkedList<T>::LinkedList( T* pItem )
 {
-    if( pItem != NULL )
+    if( pItem != nullptr )
         maList.push_back( pItem );
 }
 
@@ -103,7 +103,7 @@ LinkedListIterator<T>::LinkedListIterator( LinkedList<T>* pList ) :
     mpList( pList ),
     mnPosition( 0 )
 {
-    ASSERT( pList != NULL );
+    ASSERT( pList != nullptr );
 }
 
 template<class T>
@@ -114,7 +114,7 @@ LinkedListIterator<T>::~LinkedListIterator()
 template<class T>
 void LinkedListIterator<T>::operator++( int )
 {
-    ASSERT( mpList != NULL );
+    ASSERT( mpList != nullptr );
 
     // bug-compatible with LinkedList.cxx: ignore parameter!
     mnPosition ++;
@@ -123,7 +123,7 @@ void LinkedListIterator<T>::operator++( int )
 template<class T>
 void LinkedListIterator<T>::operator--( int )
 {
-    ASSERT( mpList != NULL );
+    ASSERT( mpList != nullptr );
 
     // bug-compatible with LinkedList.cxx: ignore parameter!
     mnPosition --;
@@ -132,14 +132,14 @@ void LinkedListIterator<T>::operator--( int )
 template<class T>
 void LinkedListIterator<T>::operator++()
 {
-    ASSERT( mpList != NULL );
+    ASSERT( mpList != nullptr );
     mnPosition ++;
 }
 
 template<class T>
 void LinkedListIterator<T>::operator--()
 {
-    ASSERT( mpList != NULL );
+    ASSERT( mpList != nullptr );
     mnPosition --;
 }
 
diff --git a/include/canvas/vclwrapper.hxx b/include/canvas/vclwrapper.hxx
index 330e88c..b3a2877 100644
--- a/include/canvas/vclwrapper.hxx
+++ b/include/canvas/vclwrapper.hxx
@@ -76,7 +76,7 @@ namespace canvas
                 if( rOrig.mpWrappee )
                     mpWrappee = new Wrappee( *rOrig.mpWrappee );
                 else
-                    mpWrappee = NULL;
+                    mpWrappee = nullptr;
             }
 
             // This object has value semantics, thus, forward copy
diff --git a/include/comphelper/listenernotification.hxx b/include/comphelper/listenernotification.hxx
index 65edfa5..fd11ce6 100644
--- a/include/comphelper/listenernotification.hxx
+++ b/include/comphelper/listenernotification.hxx
@@ -166,7 +166,7 @@ namespace comphelper
     public:
         OSimpleListenerContainer( ::osl::Mutex& _rMutex )
             :OListenerContainer( _rMutex )
-            ,m_pNotificationMethod( NULL )
+            ,m_pNotificationMethod( nullptr )
         {
         }
 
@@ -208,7 +208,7 @@ namespace comphelper
     {
         m_pNotificationMethod = _pNotify;
         bool bRet = OListenerContainer::impl_notify( _rEvent );
-        m_pNotificationMethod = NULL;
+        m_pNotificationMethod = nullptr;
         return bRet;
     }
 
diff --git a/include/comphelper/sequence.hxx b/include/comphelper/sequence.hxx
index 17d1b67..a5fba55 100644
--- a/include/comphelper/sequence.hxx
+++ b/include/comphelper/sequence.hxx
@@ -157,9 +157,9 @@ namespace comphelper
 
     template <class TYPE>
     inline OSequenceIterator<TYPE>::OSequenceIterator(const css::uno::Sequence< TYPE >& _rSeq)
-        :m_pElements(NULL)
+        :m_pElements(nullptr)
         ,m_nLen(0)
-        ,m_pCurrent(NULL)
+        ,m_pCurrent(nullptr)
     {
         construct(_rSeq);
     }
@@ -167,9 +167,9 @@ namespace comphelper
 
     template <class TYPE>
     inline OSequenceIterator<TYPE>::OSequenceIterator(const css::uno::Any& _rSequenceAny)
-        :m_pElements(NULL)
+        :m_pElements(nullptr)
         ,m_nLen(0)
-        ,m_pCurrent(NULL)
+        ,m_pCurrent(nullptr)
     {
         css::uno::Sequence< TYPE > aContainer;
         bool bSuccess = _rSequenceAny >>= aContainer;
diff --git a/include/comphelper/types.hxx b/include/comphelper/types.hxx
index 6901e6c..e01e6f6 100644
--- a/include/comphelper/types.hxx
+++ b/include/comphelper/types.hxx
@@ -57,19 +57,19 @@ namespace comphelper
         if (xComp.is())
         {
             xComp->dispose();
-            _rxComp = NULL;
+            _rxComp = nullptr;
         }
     }
 
     template <class TYPE>
     bool getImplementation(TYPE*& _pObject, const css::uno::Reference< css::uno::XInterface >& _rxIFace)
     {
-        _pObject = NULL;
+        _pObject = nullptr;
         css::uno::Reference< css::lang::XUnoTunnel > xTunnel(_rxIFace, css::uno::UNO_QUERY);
         if (xTunnel.is())
             _pObject = reinterpret_cast< TYPE* >(xTunnel->getSomething(TYPE::getUnoTunnelImplementationId()));
 
-        return (_pObject != NULL);
+        return (_pObject != nullptr);
     }
 
 
diff --git a/include/comphelper/uno3.hxx b/include/comphelper/uno3.hxx
index a75a4ab..b516718 100644
--- a/include/comphelper/uno3.hxx
+++ b/include/comphelper/uno3.hxx
@@ -170,7 +170,7 @@ namespace comphelper
     template <class iface>
     bool query_aggregation(const css::uno::Reference< css::uno::XAggregation >& _rxAggregate, css::uno::Reference<iface>& _rxOut)
     {
-        _rxOut = static_cast<iface*>(NULL);
+        _rxOut = static_cast<iface*>(nullptr);
         if (_rxAggregate.is())
         {
             css::uno::Any aCheck = _rxAggregate->queryAggregation(
diff --git a/include/editeng/AccessibleParaManager.hxx b/include/editeng/AccessibleParaManager.hxx
index e4684d2..295d7b1 100644
--- a/include/editeng/AccessibleParaManager.hxx
+++ b/include/editeng/AccessibleParaManager.hxx
@@ -98,7 +98,7 @@ namespace accessibility
         typedef CppType InterfaceType;
         typedef HardCppRef< UnoInterfaceType, InterfaceType >  HardRefType;
 
-        WeakCppRef() : maWeakRef(), maUnsafeRef( NULL ) {}
+        WeakCppRef() : maWeakRef(), maUnsafeRef( nullptr ) {}
         WeakCppRef( InterfaceType& rImpl ) :
             maWeakRef( css::uno::Reference< UnoInterfaceType >( rImpl, css::uno::UNO_QUERY ) ),
             maUnsafeRef( &rImpl )
diff --git a/include/registry/registry.hxx b/include/registry/registry.hxx
index dbbe0f1..7c42e57 100644
--- a/include/registry/registry.hxx
+++ b/include/registry/registry.hxx
@@ -275,7 +275,7 @@ public:
     /// Default constructor
     RegistryValueList()
         : m_length(0)
-        , m_pValueList(NULL)
+        , m_pValueList(nullptr)
         , m_valueType(RegValueType::NOT_DEFINED)
         {}
 
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index e14d1d3..a76cb71 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -1020,7 +1020,7 @@ template< typename T > T* SdrObject::CloneHelper() const
 {
     OSL_ASSERT( typeid( T ) == typeid( *this ));
     T* pObj = dynamic_cast< T* >( SdrObjFactory::MakeNewObject(GetObjInventor(),GetObjIdentifier(),nullptr));
-    if (pObj!=NULL)
+    if (pObj!=nullptr)
         *pObj=*static_cast< const T* >( this );
     return pObj;
 }
diff --git a/include/unotools/sharedunocomponent.hxx b/include/unotools/sharedunocomponent.hxx
index 0d7921b..137d131 100644
--- a/include/unotools/sharedunocomponent.hxx
+++ b/include/unotools/sharedunocomponent.hxx
@@ -233,7 +233,7 @@ namespace utl
     template < class INTERFACE, class COMPONENT >
     void SharedUNOComponent< INTERFACE, COMPONENT >::reset( const css::uno::Reference< INTERFACE >& _rxComponent, AssignmentMode _eMode )
     {
-        m_xComponent.reset(_eMode == TakeOwnership ? new COMPONENT( _rxComponent ) : NULL);
+        m_xComponent.reset(_eMode == TakeOwnership ? new COMPONENT( _rxComponent ) : nullptr);
         m_xTypedComponent = _rxComponent;
     }
 
diff --git a/include/vcl/lazydelete.hxx b/include/vcl/lazydelete.hxx
index 0b4bdca..c643b9b 100644
--- a/include/vcl/lazydelete.hxx
+++ b/include/vcl/lazydelete.hxx
@@ -239,7 +239,7 @@ namespace vcl
     class DeleteOnDeinit : public DeleteOnDeinitBase
     {
         T* m_pT;
-        virtual void doCleanup() override { delete m_pT; m_pT = NULL; }
+        virtual void doCleanup() override { delete m_pT; m_pT = nullptr; }
     public:
         DeleteOnDeinit( T* i_pT ) : m_pT( i_pT ) { addDeinitContainer( this ); }
         virtual ~DeleteOnDeinit() {}
@@ -253,8 +253,8 @@ namespace vcl
 
         // set contents, deleting old contents
         // ownership is transferred !
-        void reset( T* i_pNew = NULL )
-            { OSL_ASSERT( i_pNew != m_pT || i_pNew == NULL ); T* pOld = m_pT; m_pT = i_pNew; delete pOld; }
+        void reset( T* i_pNew = nullptr )
+            { OSL_ASSERT( i_pNew != m_pT || i_pNew == nullptr ); T* pOld = m_pT; m_pT = i_pNew; delete pOld; }
     };
 
     /** Similar to DeleteOnDeinit, the DeleteUnoReferenceOnDeinit
@@ -272,7 +272,7 @@ namespace vcl
     class DeleteUnoReferenceOnDeinit : public vcl::DeleteOnDeinitBase
     {
         css::uno::Reference<I> m_xI;
-        virtual void doCleanup() override { set(NULL); }
+        virtual void doCleanup() override { set(nullptr); }
     public:
         DeleteUnoReferenceOnDeinit(const css::uno::Reference<I>& r_xI ) : m_xI( r_xI ) {
             addDeinitContainer( this ); }
diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx
index 0eb16a9..392d847 100644
--- a/include/vcl/vclptr.hxx
+++ b/include/vcl/vclptr.hxx
@@ -184,7 +184,7 @@ public:
 
     inline explicit operator bool () const
     {
-        return m_rInnerRef.get() != NULL;
+        return m_rInnerRef.get() != nullptr;
     }
 
     inline void clear()
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 875fefc..e49b5a4 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -971,7 +971,7 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
     gtk_tool_item_set_tooltip_text(pSave, "Save");
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pSave, -1);
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), gtk_separator_tool_item_new(), -1);
-    g_signal_connect(G_OBJECT(pSave), "clicked", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(pSave), "clicked", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, pSave, ".uno:Save");
 
     // Copy and paste.
@@ -979,12 +979,12 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(pCopyButton), "edit-copy-symbolic");
     gtk_tool_item_set_tooltip_text(pCopyButton, "Copy");
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pCopyButton, -1);
-    g_signal_connect(G_OBJECT(pCopyButton), "clicked", G_CALLBACK(doCopy), NULL);
+    g_signal_connect(G_OBJECT(pCopyButton), "clicked", G_CALLBACK(doCopy), nullptr);
     GtkToolItem* pPasteButton = gtk_tool_button_new( nullptr, nullptr);
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(pPasteButton), "edit-paste-symbolic");
     gtk_tool_item_set_tooltip_text(pPasteButton, "Paste");
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pPasteButton, -1);
-    g_signal_connect(G_OBJECT(pPasteButton), "clicked", G_CALLBACK(doPaste), NULL);
+    g_signal_connect(G_OBJECT(pPasteButton), "clicked", G_CALLBACK(doPaste), nullptr);
     gtk_toolbar_insert( GTK_TOOLBAR(pUpperToolbar), gtk_separator_tool_item_new(), -1);
 
     // Undo and redo.
@@ -992,13 +992,13 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(pUndo), "edit-undo-symbolic");
     gtk_tool_item_set_tooltip_text(pUndo, "Undo");
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pUndo, -1);
-    g_signal_connect(G_OBJECT(pUndo), "clicked", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(pUndo), "clicked", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, pUndo, ".uno:Undo");
     GtkToolItem* pRedo = gtk_tool_button_new(nullptr, nullptr);
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(pRedo), "edit-redo-symbolic");
     gtk_tool_item_set_tooltip_text(pRedo, "Redo");
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pRedo, -1);
-    g_signal_connect(G_OBJECT(pRedo), "clicked", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(pRedo), "clicked", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, pRedo, ".uno:Redo");
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), gtk_separator_tool_item_new(), -1);
 
@@ -1007,7 +1007,7 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (pFindButton), "edit-find-symbolic");
     gtk_tool_item_set_tooltip_text(pFindButton, "Find");
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pFindButton, -1);
-    g_signal_connect(G_OBJECT(pFindButton), "clicked", G_CALLBACK(toggleFindbar), NULL);
+    g_signal_connect(G_OBJECT(pFindButton), "clicked", G_CALLBACK(toggleFindbar), nullptr);
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), gtk_separator_tool_item_new(), -1);
 
     // Misc upper toolbar.
@@ -1015,19 +1015,19 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (pZoomIn), "zoom-in-symbolic");
     gtk_tool_item_set_tooltip_text(pZoomIn, "Zoom In");
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pZoomIn, -1);
-    g_signal_connect(G_OBJECT(pZoomIn), "clicked", G_CALLBACK(changeZoom), NULL);
+    g_signal_connect(G_OBJECT(pZoomIn), "clicked", G_CALLBACK(changeZoom), nullptr);
 
     GtkToolItem* pZoom1 = gtk_tool_button_new(nullptr, nullptr);
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(pZoom1), "zoom-original-symbolic");
     gtk_tool_item_set_tooltip_text(pZoom1, "Normal Size");
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pZoom1, -1);
-    g_signal_connect(G_OBJECT(pZoom1), "clicked", G_CALLBACK(changeZoom), NULL);
+    g_signal_connect(G_OBJECT(pZoom1), "clicked", G_CALLBACK(changeZoom), nullptr);
 
     GtkToolItem* pZoomOut = gtk_tool_button_new(nullptr, nullptr);
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (pZoomOut), "zoom-out-symbolic");
     gtk_tool_item_set_tooltip_text(pZoomOut, "Zoom Out");
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pZoomOut, -1);
-    g_signal_connect(G_OBJECT(pZoomOut), "clicked", G_CALLBACK(changeZoom), NULL);
+    g_signal_connect(G_OBJECT(pZoomOut), "clicked", G_CALLBACK(changeZoom), nullptr);
 
     GtkToolItem* pPartSelectorToolItem = gtk_tool_item_new();
     GtkWidget* pComboBox = gtk_combo_box_text_new();
@@ -1046,13 +1046,13 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (pEnableEditing), "insert-text-symbolic");
     gtk_tool_item_set_tooltip_text(pEnableEditing, "Edit");
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pEnableEditing, -1);
-    g_signal_connect(G_OBJECT(pEnableEditing), "toggled", G_CALLBACK(toggleEditing), NULL);
+    g_signal_connect(G_OBJECT(pEnableEditing), "toggled", G_CALLBACK(toggleEditing), nullptr);
 
     GtkToolItem* pNewViewButton = gtk_tool_button_new( nullptr, nullptr);
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (pNewViewButton), "view-continuous-symbolic");
     gtk_tool_item_set_tooltip_text(pNewViewButton, "New View");
     gtk_toolbar_insert(GTK_TOOLBAR(pUpperToolbar), pNewViewButton, -1);
-    g_signal_connect(G_OBJECT(pNewViewButton), "clicked", G_CALLBACK(createView), NULL);
+    g_signal_connect(G_OBJECT(pNewViewButton), "clicked", G_CALLBACK(createView), nullptr);
     gtk_box_pack_start(GTK_BOX(rWindow.m_pVBox), pUpperToolbar, FALSE, FALSE, 0 ); // Adds to top.
 
     // Lower toolbar.
@@ -1064,25 +1064,25 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(rWindow.m_pBold), "format-text-bold-symbolic");
     gtk_tool_item_set_tooltip_text(rWindow.m_pBold, "Bold");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), rWindow.m_pBold, -1);
-    g_signal_connect(G_OBJECT(rWindow.m_pBold), "toggled", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(rWindow.m_pBold), "toggled", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, rWindow.m_pBold, ".uno:Bold");
     rWindow.m_pItalic = gtk_toggle_tool_button_new();
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (rWindow.m_pItalic), "format-text-italic-symbolic");
     gtk_tool_item_set_tooltip_text(rWindow.m_pItalic, "Italic");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), rWindow.m_pItalic, -1);
-    g_signal_connect(G_OBJECT(rWindow.m_pItalic), "toggled", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(rWindow.m_pItalic), "toggled", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, rWindow.m_pItalic, ".uno:Italic");
     rWindow.m_pUnderline = gtk_toggle_tool_button_new();
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (rWindow.m_pUnderline), "format-text-underline-symbolic");
     gtk_tool_item_set_tooltip_text(rWindow.m_pUnderline, "Underline");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), rWindow.m_pUnderline, -1);
-    g_signal_connect(G_OBJECT(rWindow.m_pUnderline), "toggled", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(rWindow.m_pUnderline), "toggled", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, rWindow.m_pUnderline, ".uno:Underline");
     rWindow.m_pStrikethrough = gtk_toggle_tool_button_new ();
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(rWindow.m_pStrikethrough), "format-text-strikethrough-symbolic");
     gtk_tool_item_set_tooltip_text(rWindow.m_pStrikethrough, "Strikethrough");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), rWindow.m_pStrikethrough, -1);
-    g_signal_connect(G_OBJECT(rWindow.m_pStrikethrough), "toggled", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(rWindow.m_pStrikethrough), "toggled", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, rWindow.m_pStrikethrough, ".uno:Strikeout");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), gtk_separator_tool_item_new(), -1);
 
@@ -1091,13 +1091,13 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(rWindow.m_pSuperscript), "go-up-symbolic");
     gtk_tool_item_set_tooltip_text(rWindow.m_pSuperscript, "Superscript");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), rWindow.m_pSuperscript, -1);
-    g_signal_connect(G_OBJECT(rWindow.m_pSuperscript), "toggled", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(rWindow.m_pSuperscript), "toggled", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, rWindow.m_pSuperscript, ".uno:SuperScript");
     rWindow.m_pSubscript = gtk_toggle_tool_button_new();
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(rWindow.m_pSubscript), "go-down-symbolic");
     gtk_tool_item_set_tooltip_text(rWindow.m_pSubscript, "Subscript");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), rWindow.m_pSubscript, -1);
-    g_signal_connect(G_OBJECT(rWindow.m_pSubscript), "toggled", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(rWindow.m_pSubscript), "toggled", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, rWindow.m_pSubscript, ".uno:SubScript");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), gtk_separator_tool_item_new(), -1);
 
@@ -1106,25 +1106,25 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(rWindow.m_pLeftpara), "format-justify-left-symbolic");
     gtk_tool_item_set_tooltip_text(rWindow.m_pLeftpara, "Align Left");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), rWindow.m_pLeftpara, -1);
-    g_signal_connect(G_OBJECT(rWindow.m_pLeftpara), "toggled", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(rWindow.m_pLeftpara), "toggled", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, rWindow.m_pLeftpara, ".uno:LeftPara");
     rWindow.m_pCenterpara = gtk_toggle_tool_button_new();
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(rWindow.m_pCenterpara), "format-justify-center-symbolic");
     gtk_tool_item_set_tooltip_text(rWindow.m_pCenterpara, "Center Horizontally");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), rWindow.m_pCenterpara, -1);
-    g_signal_connect(G_OBJECT(rWindow.m_pCenterpara), "toggled", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(rWindow.m_pCenterpara), "toggled", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, rWindow.m_pCenterpara, ".uno:CenterPara");
     rWindow.m_pRightpara = gtk_toggle_tool_button_new();
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(rWindow.m_pRightpara), "format-justify-right-symbolic");
     gtk_tool_item_set_tooltip_text(rWindow.m_pRightpara, "Align Right");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), rWindow.m_pRightpara, -1);
-    g_signal_connect(G_OBJECT(rWindow.m_pRightpara), "toggled", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(rWindow.m_pRightpara), "toggled", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, rWindow.m_pRightpara, ".uno:RightPara");
     rWindow.m_pJustifypara = gtk_toggle_tool_button_new();
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(rWindow.m_pJustifypara), "format-justify-fill-symbolic");
     gtk_tool_item_set_tooltip_text(rWindow.m_pJustifypara, "Justified");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), rWindow.m_pJustifypara, -1);
-    g_signal_connect(G_OBJECT(rWindow.m_pJustifypara), "toggled", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(rWindow.m_pJustifypara), "toggled", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, rWindow.m_pJustifypara, ".uno:JustifyPara");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), gtk_separator_tool_item_new(), -1);
 
@@ -1133,14 +1133,14 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(pInsertAnnotation), "changes-allow-symbolic");
     gtk_tool_item_set_tooltip_text(pInsertAnnotation, "Insert Comment");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), pInsertAnnotation, -1);
-    g_signal_connect(G_OBJECT(pInsertAnnotation), "clicked", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(pInsertAnnotation), "clicked", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, pInsertAnnotation, ".uno:InsertAnnotation");
 
     GtkToolItem* pDeleteComment = gtk_tool_button_new(nullptr, nullptr);
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(pDeleteComment), "changes-prevent-symbolic");
     gtk_tool_item_set_tooltip_text(pDeleteComment, "Delete Comment");
     gtk_toolbar_insert(GTK_TOOLBAR(pLowerToolbar), pDeleteComment, -1);
-    g_signal_connect(G_OBJECT(pDeleteComment), "clicked", G_CALLBACK(toggleToolItem), NULL);
+    g_signal_connect(G_OBJECT(pDeleteComment), "clicked", G_CALLBACK(toggleToolItem), nullptr);
     lcl_registerToolItem(rWindow, pDeleteComment, ".uno:DeleteComment");
 
     // Formula bar
@@ -1158,7 +1158,7 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
     GtkToolItem* pFindbarClose = gtk_tool_button_new( nullptr, nullptr);
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (pFindbarClose), "window-close-symbolic");
     gtk_toolbar_insert(GTK_TOOLBAR(rWindow.m_pFindbar), pFindbarClose, -1);
-    g_signal_connect(G_OBJECT(pFindbarClose), "clicked", G_CALLBACK(toggleFindbar), NULL);
+    g_signal_connect(G_OBJECT(pFindbarClose), "clicked", G_CALLBACK(toggleFindbar), nullptr);
 
     GtkToolItem* pEntryContainer = gtk_tool_item_new();
     rWindow.m_pFindbarEntry = gtk_entry_new();
@@ -1169,17 +1169,17 @@ static GtkWidget* createWindow(TiledWindow& rWindow)
     GtkToolItem* pFindbarNext = gtk_tool_button_new( nullptr, nullptr);
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (pFindbarNext), "go-down-symbolic");
     gtk_toolbar_insert(GTK_TOOLBAR(rWindow.m_pFindbar), pFindbarNext, -1);
-    g_signal_connect(G_OBJECT(pFindbarNext), "clicked", G_CALLBACK(signalSearchNext), NULL);
+    g_signal_connect(G_OBJECT(pFindbarNext), "clicked", G_CALLBACK(signalSearchNext), nullptr);
 
     GtkToolItem* pFindbarPrev = gtk_tool_button_new( nullptr, nullptr);
     gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (pFindbarPrev), "go-up-symbolic");
     gtk_toolbar_insert(GTK_TOOLBAR(rWindow.m_pFindbar), pFindbarPrev, -1);
-    g_signal_connect(G_OBJECT(pFindbarPrev), "clicked", G_CALLBACK(signalSearchPrev), NULL);
+    g_signal_connect(G_OBJECT(pFindbarPrev), "clicked", G_CALLBACK(signalSearchPrev), nullptr);
 
     GtkToolItem* pFindAll = gtk_toggle_tool_button_new();
     gtk_tool_button_set_label(GTK_TOOL_BUTTON(pFindAll), "Highlight All");
     gtk_toolbar_insert(GTK_TOOLBAR(rWindow.m_pFindbar), pFindAll, -1);
-    g_signal_connect(G_OBJECT(pFindAll), "toggled", G_CALLBACK(toggleFindAll), NULL);
+    g_signal_connect(G_OBJECT(pFindAll), "toggled", G_CALLBACK(toggleFindAll), nullptr);
 
     GtkToolItem* pFindbarLabelContainer = gtk_tool_item_new();
     rWindow.m_pFindbarLabel = gtk_label_new("");
@@ -1254,16 +1254,16 @@ static void setupDocView(GtkWidget* pDocView)
 #if GLIB_CHECK_VERSION(2,40,0)
     g_assert_nonnull(pDocView);
 #endif
-    g_signal_connect(pDocView, "edit-changed", G_CALLBACK(signalEdit), NULL);
-    g_signal_connect(pDocView, "command-changed", G_CALLBACK(signalCommand), NULL);
-    g_signal_connect(pDocView, "command-result", G_CALLBACK(signalCommandResult), NULL);
-    g_signal_connect(pDocView, "search-not-found", G_CALLBACK(signalSearch), NULL);
-    g_signal_connect(pDocView, "search-result-count", G_CALLBACK(signalSearchResultCount), NULL);
-    g_signal_connect(pDocView, "part-changed", G_CALLBACK(signalPart), NULL);
-    g_signal_connect(pDocView, "size-changed", G_CALLBACK(signalSize), NULL);
-    g_signal_connect(pDocView, "hyperlink-clicked", G_CALLBACK(signalHyperlink), NULL);
-    g_signal_connect(pDocView, "cursor-changed", G_CALLBACK(cursorChanged), NULL);
-    g_signal_connect(pDocView, "formula-changed", G_CALLBACK(formulaChanged), NULL);
+    g_signal_connect(pDocView, "edit-changed", G_CALLBACK(signalEdit), nullptr);
+    g_signal_connect(pDocView, "command-changed", G_CALLBACK(signalCommand), nullptr);
+    g_signal_connect(pDocView, "command-result", G_CALLBACK(signalCommandResult), nullptr);
+    g_signal_connect(pDocView, "search-not-found", G_CALLBACK(signalSearch), nullptr);
+    g_signal_connect(pDocView, "search-result-count", G_CALLBACK(signalSearchResultCount), nullptr);
+    g_signal_connect(pDocView, "part-changed", G_CALLBACK(signalPart), nullptr);
+    g_signal_connect(pDocView, "size-changed", G_CALLBACK(signalSize), nullptr);
+    g_signal_connect(pDocView, "hyperlink-clicked", G_CALLBACK(signalHyperlink), nullptr);
+    g_signal_connect(pDocView, "cursor-changed", G_CALLBACK(cursorChanged), nullptr);
+    g_signal_connect(pDocView, "formula-changed", G_CALLBACK(formulaChanged), nullptr);
 }
 
 int main( int argc, char* argv[] )
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 7417602..e0654b1 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1007,7 +1007,7 @@ callback (gpointer pData)
                                     twipToPixel(priv->m_nDocumentWidthTwips, priv->m_fZoom),
                                     twipToPixel(priv->m_nDocumentHeightTwips, priv->m_fZoom));
 
-        g_signal_emit(pDocView, doc_view_signals[SIZE_CHANGED], 0, NULL);
+        g_signal_emit(pDocView, doc_view_signals[SIZE_CHANGED], 0, nullptr);
     }
     break;
     case LOK_CALLBACK_SET_PART:
@@ -1161,9 +1161,9 @@ paintTileFinish(LOKDocView* pDocView, GAsyncResult* res, GError **error)
 {
     GTask* task = G_TASK(res);
 
-    g_return_val_if_fail(LOK_IS_DOC_VIEW(pDocView), NULL);
-    g_return_val_if_fail(g_task_is_valid(res, pDocView), NULL);
-    g_return_val_if_fail(error == nullptr || *error == nullptr, NULL);
+    g_return_val_if_fail(LOK_IS_DOC_VIEW(pDocView), nullptr);
+    g_return_val_if_fail(g_task_is_valid(res, pDocView), nullptr);
+    g_return_val_if_fail(error == nullptr || *error == nullptr, nullptr);
 
     return g_task_propagate_pointer(task, error);
 }
@@ -1294,7 +1294,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
     if (priv->m_bEdit && priv->m_bCursorVisible && !isEmptyRectangle(priv->m_aVisibleCursor) && priv->m_aTextSelectionRectangles.empty())
     {
         // Have a cursor, but no selection: we need the middle handle.
-        gchar* handleMiddlePath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_image_middle.png", NULL);
+        gchar* handleMiddlePath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_image_middle.png", nullptr);
         if (!priv->m_pHandleMiddle)
         {
             priv->m_pHandleMiddle = cairo_image_surface_create_from_png(handleMiddlePath);
@@ -1322,7 +1322,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
         if (!isEmptyRectangle(priv->m_aTextSelectionStart))
         {
             // Have a start position: we need a start handle.
-            gchar* handleStartPath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_image_start.png", NULL);
+            gchar* handleStartPath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_image_start.png", nullptr);
             if (!priv->m_pHandleStart)
             {
                 priv->m_pHandleStart = cairo_image_surface_create_from_png(handleStartPath);
@@ -1334,7 +1334,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
         if (!isEmptyRectangle(priv->m_aTextSelectionEnd))
         {
             // Have a start position: we need an end handle.
-            gchar* handleEndPath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_image_end.png", NULL);
+            gchar* handleEndPath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_image_end.png", nullptr);
             if (!priv->m_pHandleEnd)
             {
                 priv->m_pHandleEnd = cairo_image_surface_create_from_png(handleEndPath);
@@ -1347,7 +1347,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
 
     if (!isEmptyRectangle(priv->m_aGraphicSelection))
     {
-        gchar* handleGraphicPath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_graphic.png", NULL);
+        gchar* handleGraphicPath = g_strconcat (priv->m_aLOPath, "/../..", CURSOR_HANDLE_DIR, "handle_graphic.png", nullptr);
         if (!priv->m_pGraphicHandle)
         {
             priv->m_pGraphicHandle = cairo_image_surface_create_from_png(handleGraphicPath);
@@ -2386,14 +2386,14 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
 SAL_DLLPUBLIC_EXPORT GtkWidget*
 lok_doc_view_new (const gchar* pPath, GCancellable *cancellable, GError **error)
 {
-    return GTK_WIDGET (g_initable_new (LOK_TYPE_DOC_VIEW, cancellable, error, "lopath", pPath == nullptr ? LOK_PATH : pPath, NULL));
+    return GTK_WIDGET (g_initable_new (LOK_TYPE_DOC_VIEW, cancellable, error, "lopath", pPath == nullptr ? LOK_PATH : pPath, nullptr));
 }
 
 SAL_DLLPUBLIC_EXPORT GtkWidget* lok_doc_view_new_from_widget(LOKDocView* pOldLOKDocView)
 {
     LOKDocViewPrivate& pOldPriv = getPrivate(pOldLOKDocView);
     GtkWidget* pNewDocView = GTK_WIDGET(g_initable_new(LOK_TYPE_DOC_VIEW, /*cancellable=*/nullptr, /*error=*/nullptr,
-                                                       "lopath", pOldPriv->m_aLOPath, "lopointer", pOldPriv->m_pOffice, "docpointer", pOldPriv->m_pDocument, NULL));
+                                                       "lopath", pOldPriv->m_aLOPath, "lopointer", pOldPriv->m_pOffice, "docpointer", pOldPriv->m_pDocument, nullptr));
 
     // No documentLoad(), just a createView().
     LibreOfficeKitDocument* pDocument = lok_doc_view_get_document(LOK_DOC_VIEW(pNewDocView));
diff --git a/mysqlc/source/mysqlc_subcomponent.hxx b/mysqlc/source/mysqlc_subcomponent.hxx
index 92bb815..f0cc68a 100644
--- a/mysqlc/source/mysqlc_subcomponent.hxx
+++ b/mysqlc/source/mysqlc_subcomponent.hxx
@@ -77,7 +77,7 @@ namespace connectivity
             void dispose_ChildImpl()
             {
                 ::osl::MutexGuard aGuard(m_pDerivedImplementation->rBHelper.rMutex);
-                m_xParent = NULL;
+                m_xParent = nullptr;
             }
             void relase_ChildImpl()
             {
diff --git a/sc/inc/fstalgorithm.hxx b/sc/inc/fstalgorithm.hxx
index 08d68d4..aae070c 100644
--- a/sc/inc/fstalgorithm.hxx
+++ b/sc/inc/fstalgorithm.hxx
@@ -86,7 +86,7 @@ std::vector<_Span> toSpanArray( const mdds::flat_segment_tree<_Key,bool>& rTree
     std::vector<_Span> aSpans;
 
     typename FstType::const_iterator it = rTree.begin(), itEnd = rTree.end();
-    buildSpan<_Key,_Span>(aSpans, it, itEnd, NULL);
+    buildSpan<_Key,_Span>(aSpans, it, itEnd, nullptr);
     return aSpans;
 }
 
@@ -105,7 +105,7 @@ std::vector<_Span> toSpanArrayWithValue( const mdds::flat_segment_tree<_Key,_Val
     std::vector<_Span> aSpans;
 
     typename FstType::const_iterator it = rTree.begin(), itEnd = rTree.end();
-    buildSpanWithValue<_Key,_Val,_Span>(aSpans, it, itEnd, NULL);
+    buildSpanWithValue<_Key,_Val,_Span>(aSpans, it, itEnd, nullptr);
     return aSpans;
 }
 
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 12be826..4ff5fc6 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -127,7 +127,7 @@ SfxPrinter* ScDocument::GetPrinter(bool bCreateIfNotExist)
                             SID_PRINTER_CHANGESTODOC,   SID_PRINTER_CHANGESTODOC,
                             SID_PRINT_SELECTEDSHEET,    SID_PRINT_SELECTEDSHEET,
                             SID_SCPRINTOPTIONS,         SID_SCPRINTOPTIONS,
-                            NULL );
+                            nullptr );
 
         ::utl::MiscCfg aMisc;
         SfxPrinterChangeFlags nFlags = SfxPrinterChangeFlags::NONE;
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 0e257dd..fd92c7b 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -1119,7 +1119,7 @@ public:
             cl_int err;
             err = clReleaseMemObject(mpClmem2);
             SAL_WARN_IF(err != CL_SUCCESS, "sc.opencl", "clReleaseMemObject failed: " << ::opencl::errorString(err));
-            mpClmem2 = NULL;
+            mpClmem2 = nullptr;
         }
     }
 
@@ -1486,7 +1486,7 @@ public:
 
     virtual size_t Marshal( cl_kernel k, int argno, int w, cl_program mpProgram )
     {
-        assert(Base::mpClmem == NULL);
+        assert(Base::mpClmem == nullptr);
         // Obtain cl context
         ::opencl::KernelEnv kEnv;
         ::opencl::setKernelEnv(&kEnv);
@@ -1494,7 +1494,7 @@ public:
         size_t nInput = mpDVR->GetArrayLength();
         size_t nCurWindowSize = mpDVR->GetRefRowSize();
         // create clmem buffer
-        if (mpDVR->GetArrays()[Base::mnIndex].mpNumericArray == NULL)
+        if (mpDVR->GetArrays()[Base::mnIndex].mpNumericArray == nullptr)
             throw Unhandled();
         double* pHostBuffer = const_cast<double*>(
             mpDVR->GetArrays()[Base::mnIndex].mpNumericArray);
@@ -1565,14 +1565,14 @@ public:
             double* resbuf = static_cast<double*>(clEnqueueMapBuffer(kEnv.mpkCmdQueue,
                 mpClmem2,
                 CL_TRUE, CL_MAP_READ, 0,
-                sizeof(double) * w, 0, NULL, NULL,
+                sizeof(double) * w, 0, nullptr, nullptr,
                 &err));
             if (err != CL_SUCCESS)
                 throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
 
             for (int i = 0; i < w; i++)
                 pAllBuffer[i] = resbuf[i];
-            err = clEnqueueUnmapMemObject(kEnv.mpkCmdQueue, mpClmem2, resbuf, 0, NULL, NULL);
+            err = clEnqueueUnmapMemObject(kEnv.mpkCmdQueue, mpClmem2, resbuf, 0, nullptr, nullptr);
             if (err != CL_SUCCESS)
                 throw OpenCLError("clEnqueueUnmapMemObject", err, __FILE__, __LINE__);
 
@@ -1619,13 +1619,13 @@ public:
             resbuf = static_cast<double*>(clEnqueueMapBuffer(kEnv.mpkCmdQueue,
                 mpClmem2,
                 CL_TRUE, CL_MAP_READ, 0,
-                sizeof(double) * w, 0, NULL, NULL,
+                sizeof(double) * w, 0, nullptr, nullptr,
                 &err));
             if (err != CL_SUCCESS)
                 throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
             for (int i = 0; i < w; i++)
                 pAllBuffer[i + w] = resbuf[i];
-            err = clEnqueueUnmapMemObject(kEnv.mpkCmdQueue, mpClmem2, resbuf, 0, NULL, NULL);
+            err = clEnqueueUnmapMemObject(kEnv.mpkCmdQueue, mpClmem2, resbuf, 0, nullptr, nullptr);
             // FIXME: Is it intentional to not throw an OpenCLError even if the clEnqueueUnmapMemObject() fails?
             if (CL_SUCCESS != err)
                 SAL_WARN("sc.opencl", "clEnqueueUnmapMemObject failed: " << ::opencl::errorString(err));
@@ -1633,7 +1633,7 @@ public:
             {
                 err = clReleaseMemObject(mpClmem2);
                 SAL_WARN_IF(err != CL_SUCCESS, "sc.opencl", "clReleaseMemObject failed: " << ::opencl::errorString(err));
-                mpClmem2 = NULL;
+                mpClmem2 = nullptr;
             }
             mpClmem2 = clCreateBuffer(kEnv.mpkContext,
                 (cl_mem_flags)CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR,
@@ -1656,7 +1656,7 @@ public:
             cl_int err;
             err = clReleaseMemObject(mpClmem2);
             SAL_WARN_IF(err != CL_SUCCESS, "sc.opencl", "clReleaseMemObject failed: " << ::opencl::errorString(err));
-            mpClmem2 = NULL;
+            mpClmem2 = nullptr;
         }
     }
 
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 8a376e7..eaafb66 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -130,7 +130,7 @@ void ScModule::InitInterface_Impl()
 }
 
 ScModule::ScModule( SfxObjectFactory* pFact ) :
-    SfxModule( ResMgr::CreateResMgr( "sc" ), false, pFact, NULL ),
+    SfxModule( ResMgr::CreateResMgr( "sc" ), false, pFact, nullptr ),
     mpDragData(new ScDragData),
     mpClipData(new ScClipData),
     pSelTransfer( nullptr ),
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 531eb49..4b01bf9 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -505,7 +505,7 @@ bool ScPivotLayoutDialog::ApplyChanges()
 
     SfxDispatcher* pDispatcher = GetBindings().GetDispatcher();
     SfxCallMode nCallMode = SfxCallMode::SLOT | SfxCallMode::RECORD;
-    const SfxPoolItem* pResult = pDispatcher->Execute(SID_PIVOT_TABLE, nCallMode, &aPivotItem, NULL, 0);
+    const SfxPoolItem* pResult = pDispatcher->Execute(SID_PIVOT_TABLE, nCallMode, &aPivotItem, nullptr, 0);
 
     if (pResult != nullptr)
     {
diff --git a/sc/source/ui/inc/ChildWindowWrapper.hxx b/sc/source/ui/inc/ChildWindowWrapper.hxx
index 29d6374..1f4920d 100644
--- a/sc/source/ui/inc/ChildWindowWrapper.hxx
+++ b/sc/source/ui/inc/ChildWindowWrapper.hxx
@@ -34,7 +34,7 @@ public:
         if (pViewShell)
             SetWindow( pViewShell->CreateRefDialog( pBindings, this, pInfo, pParentP, WindowID ) );
         else
-            SetWindow( NULL );
+            SetWindow( nullptr );
 
         if (pViewShell && !GetWindow())
             pViewShell->GetViewFrame()->SetChildWindow( nId, false );
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index ff10234..a2ccffd 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -223,7 +223,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
                             SID_PRINTER_CHANGESTODOC,  SID_PRINTER_CHANGESTODOC,
                             SID_PRINT_SELECTEDSHEET,   SID_PRINT_SELECTEDSHEET,
                             SID_SCPRINTOPTIONS,        SID_SCPRINTOPTIONS,
-                            NULL );
+                            nullptr );
                     pDocShell->SetPrinter( SfxPrinter::Create( aStream, pSet ) );
                 }
             }
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx
index a0b66de..c62f5bf 100644
--- a/sc/source/ui/vba/excelvbahelper.hxx
+++ b/sc/source/ui/vba/excelvbahelper.hxx
@@ -70,7 +70,7 @@ public:
 template < typename ImplObject >
     ImplObject* getImplFromDocModuleWrapper( const css::uno::Reference< css::uno::XInterface >& rxWrapperIf, bool bThrow = true ) throw (css::uno::RuntimeException)
     {
-        ImplObject* pObj = NULL;
+        ImplObject* pObj = nullptr;
         css::uno::Reference< css::lang::XUnoTunnel >  xTunnel( rxWrapperIf, css::uno::UNO_QUERY );
         if ( xTunnel.is() )
             pObj = reinterpret_cast<ImplObject*>( xTunnel->getSomething(ImplObject::getUnoTunnelId()));
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 1cdb5cf..ce537a5 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -68,7 +68,7 @@ void SdModule::InitInterface_Impl()
 // Ctor
 SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
 :   SfxModule( ResMgr::CreateResMgr("sd"), false,
-                  pFact1, pFact2, NULL ),
+                  pFact1, pFact2, nullptr ),
     pTransferClip(nullptr),
     pTransferDrag(nullptr),
     pTransferSelection(nullptr),
diff --git a/sd/source/ui/remotecontrol/AvahiNetworkService.cxx b/sd/source/ui/remotecontrol/AvahiNetworkService.cxx
index a5c5a94..9d1204e 100644
--- a/sd/source/ui/remotecontrol/AvahiNetworkService.cxx
+++ b/sd/source/ui/remotecontrol/AvahiNetworkService.cxx
@@ -104,7 +104,7 @@ static bool create_services(AvahiClient *c) {
         snprintf(r, sizeof(r), "random=%i", nRandom);
         int ret = avahi_entry_group_add_service(
             group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, static_cast<AvahiPublishFlags>(0),
-            avahiService->getName().c_str(), kREG_TYPE, nullptr, nullptr, 1599, "local", r, NULL
+            avahiService->getName().c_str(), kREG_TYPE, nullptr, nullptr, 1599, "local", r, nullptr
         );
         if (ret < 0) {
 
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index 986326f..ceaacfb 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -198,7 +198,7 @@ add_image_menu_item( GtkMenuShell *pMenuShell,
     gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM( pMenuItem ), pImage );
 
     gtk_menu_shell_append( pMenuShell, pMenuItem );
-    g_signal_connect( pMenuItem, "activate", activate_cb, NULL);
+    g_signal_connect( pMenuItem, "activate", activate_cb, nullptr);
 
     return pMenuItem;
 }
@@ -341,13 +341,13 @@ void plugin_init_sys_tray()
     pTrayIcon = gtk_status_icon_new_from_icon_name ("libreoffice-main");
 
     g_object_set (pTrayIcon, "title", aLabel.getStr(),
-                  "tooltip_text", aLabel.getStr(), NULL);
+                  "tooltip_text", aLabel.getStr(), nullptr);
 
     GtkWidget *pMenu = gtk_menu_new();
     g_signal_connect(pTrayIcon,  "button-press-event",
                      G_CALLBACK(display_menu_cb), pMenu);
     g_signal_connect (pMenu, "deactivate",
-                      G_CALLBACK (menu_deactivate_cb), NULL);
+                      G_CALLBACK (menu_deactivate_cb), nullptr);
 
     // disable shutdown
     pShutdownIcon->SetVeto( true );
@@ -362,7 +362,7 @@ void plugin_init_sys_tray()
     if (pFile)
     {
         if ((pMonitor = g_file_monitor_file(pFile, G_FILE_MONITOR_NONE, nullptr, nullptr)))
-            g_signal_connect(pMonitor, "changed", reinterpret_cast<GCallback>(notify_file_changed), NULL);
+            g_signal_connect(pMonitor, "changed", reinterpret_cast<GCallback>(notify_file_changed), nullptr);
         g_object_unref(pFile);
     }
 #endif
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index 89d69a9..22af458 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -267,7 +267,7 @@ namespace sfx2
                 nChildWindowId,
                 SfxCallMode::ASYNCHRON | SfxCallMode::RECORD,
                 &aVisibility,
-                NULL
+                nullptr
             );
         }
     }
diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx
index 85061c8..87d1bc2 100644
--- a/svx/source/form/fmcontrollayout.cxx
+++ b/svx/source/form/fmcontrollayout.cxx
@@ -94,7 +94,7 @@ namespace svxform
                 if ( xChild.is() )
                     return getTypedModelNode< INTERFACE_TYPE >( xChild->getParent() );
                 else
-                    return NULL;
+                    return nullptr;
             }
         }
 
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index c8bbc1b..18a29f4 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -521,7 +521,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
                 // name, so I do not really have a big problem with this ....
                 SfxBoolItem aGrabFocusIndicatorItem( SID_FM_TOGGLECONTROLFOCUS, true );
                 GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( nSlot, SfxCallMode::ASYNCHRON,
-                                          &aGrabFocusIndicatorItem, NULL );
+                                          &aGrabFocusIndicatorItem, nullptr );
             }
 
             rReq.Done();
@@ -816,7 +816,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
             // initially open the filter navigator, the whole form based filter is pretty useless without it
             SfxBoolItem aIdentifierItem( SID_FM_FILTER_NAVIGATOR, true );
             GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( SID_FM_FILTER_NAVIGATOR, SfxCallMode::ASYNCHRON,
-                &aIdentifierItem, NULL );
+                &aIdentifierItem, nullptr );
         }   break;
     }
 }
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index af8329e..6977c6f 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -145,7 +145,7 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
                     SfxObjectFactory* pFact,
                     SfxObjectFactory* pGlobalFact )
     : SfxModule( ResMgr::CreateResMgr( "sw" ), false, pWebFact,
-                     pFact, pGlobalFact, NULL ),
+                     pFact, pGlobalFact, nullptr ),
     m_pModuleConfig(nullptr),
     m_pUsrPref(nullptr),
     m_pWebUsrPref(nullptr),
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index f696e55..56a2837 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -510,7 +510,7 @@ extern "C" void NeonSession_PreSendRequest( ne_request * req,
     {
         // If there is a proxy server in between, it shall never use
         // cached data. We always want 'up-to-date' data.
-        ne_buffer_concat( headers, "Pragma: no-cache", EOL, NULL );
+        ne_buffer_concat( headers, "Pragma: no-cache", EOL, nullptr );
         // alternative, but understoud by HTTP 1.1 servers only:
         // ne_buffer_concat( headers, "Cache-Control: max-age=0", EOL, NULL );
 
@@ -530,7 +530,7 @@ extern "C" void NeonSession_PreSendRequest( ne_request * req,
                         = OUStringToOString( (*it).second.aContentType,
                                                   RTL_TEXTENCODING_UTF8 );
                     ne_buffer_concat( headers, "Content-Type: ",
-                                      aType.getStr(), EOL, NULL );
+                                      aType.getStr(), EOL, nullptr );
                 }
             }
 
@@ -543,7 +543,7 @@ extern "C" void NeonSession_PreSendRequest( ne_request * req,
                         = OUStringToOString( (*it).second.aReferer,
                                                   RTL_TEXTENCODING_UTF8 );
                     ne_buffer_concat( headers, "Referer: ",
-                                      aReferer.getStr(), EOL, NULL );
+                                      aReferer.getStr(), EOL, nullptr );
                 }
             }
         }
@@ -563,7 +563,7 @@ extern "C" void NeonSession_PreSendRequest( ne_request * req,
                 = OUStringToOString( (*it1).second,
                                           RTL_TEXTENCODING_UTF8 );
             ne_buffer_concat( headers, aHeader.getStr(), ": ",
-                              aValue.getStr(), EOL, NULL );
+                              aValue.getStr(), EOL, nullptr );
 
             ++it1;
         }
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx
index b18f7ef..ee9ec8f 100644
--- a/vcl/unx/generic/app/i18n_cb.cxx
+++ b/vcl/unx/generic/app/i18n_cb.cxx
@@ -397,8 +397,8 @@ GetPreeditSpotLocation(XIC ic, XPointer client_data)
     point.y = mPosEvent.mnY + mPosEvent.mnHeight;
 
     XVaNestedList preedit_attr;
-    preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &point, NULL);
-    XSetICValues(ic, XNPreeditAttributes, preedit_attr, NULL);
+    preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &point, nullptr);
+    XSetICValues(ic, XNPreeditAttributes, preedit_attr, nullptr);
     XFree(preedit_attr);
 
     return;
diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx
index c160612..df63ead 100644
--- a/vcl/unx/generic/app/i18n_ic.cxx
+++ b/vcl/unx/generic/app/i18n_ic.cxx
@@ -89,7 +89,7 @@ XVaAddToNestedList( XVaNestedList a_srclist, char* name, XPointer value )
         a_dstlist = XVaCreateNestedList(
                                         0,
                                         name,           value,
-                                        NULL );
+                                        nullptr );
     }
     else
     {
@@ -97,7 +97,7 @@ XVaAddToNestedList( XVaNestedList a_srclist, char* name, XPointer value )
                                         0,
                                         XNVaNestedList, a_srclist,
                                         name,           value,
-                                        NULL );
+                                        nullptr );
     }
 
     return a_dstlist != nullptr ? a_dstlist : a_srclist ;
@@ -212,7 +212,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
                                                           XNStatusStartCallback, &aStatusStartCallback,
                                                           XNStatusDoneCallback,  &aStatusDoneCallback,
                                                           XNStatusDrawCallback,  &aStatusDrawCallback,
-                                                          NULL );
+                                                          nullptr );
 
                 break;
             }
@@ -249,7 +249,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
                                                            XNPreeditDoneCallback,  &maPreeditDoneCallback,
                                                            XNPreeditDrawCallback,   &maPreeditDrawCallback,
                                                            XNPreeditCaretCallback, &maPreeditCaretCallback,
-                                                           NULL );
+                                                           nullptr );
 
                 break;
 
@@ -271,7 +271,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
                 mpPreeditAttributes = XVaCreateNestedList (
                                                            0,
                                                            XNSpotLocation, &aSpot,
-                                                           NULL );
+                                                           nullptr );
 
                 // XCreateIC() fails on Redflag Linux 2.0 if there is no
                 // fontset though the data itself is not evaluated nor is
@@ -304,7 +304,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
                                            XNFocusWindow,       aFocusWindow,
                                            XNClientWindow,      aClientWindow,
                                            XNInputStyle,        mnPreeditStyle | mnStatusStyle,
-                                           NULL );
+                                           nullptr );
 
         if ( mnPreeditStyle != XIMPreeditNone )
         {
@@ -324,7 +324,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
         }
         maContext = XCreateIC( pInputMethod->GetMethod(),
                                XNVaNestedList, mpAttributes,
-                               NULL );
+                               nullptr );
     }
 
     if ( maContext == nullptr )
@@ -359,7 +359,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
         maDestroyCallback.client_data = reinterpret_cast<XPointer>(this);
         XSetICValues( maContext,
                       XNDestroyCallback,      &maDestroyCallback,
-                      NULL );
+                      nullptr );
     }
 }
 
@@ -397,7 +397,7 @@ SalI18N_InputContext::Map( SalFrame *pFrame )
 
                 maContext = XCreateIC( pInputMethod->GetMethod(),
                                        XNVaNestedList, mpAttributes,
-                                       NULL );
+                                       nullptr );
             }
             if( maClientData.pFrame != pFrame )
                 SetICFocus( pFrame );
@@ -432,7 +432,7 @@ SalI18N_InputContext::ExtendEventMask( ::Window aFocusWindow )
                               &aWindowAttributes );
         XGetICValues ( maContext,
                        XNFilterEvents, &nIMEventMask,
-                       NULL);
+                       nullptr);
         nIMEventMask |= aWindowAttributes.your_event_mask;
         XSelectInput ( pDisplay, aFocusWindow, nIMEventMask );
     }
@@ -564,8 +564,8 @@ SalI18N_InputContext::UpdateSpotLocation()
     aSpot.x = aPosEvent.mnX + aPosEvent.mnWidth;
     aSpot.y = aPosEvent.mnY + aPosEvent.mnHeight;
 
-    XVaNestedList preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &aSpot, NULL);
-    XSetICValues(maContext, XNPreeditAttributes, preedit_attr, NULL);
+    XVaNestedList preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &aSpot, nullptr);
+    XSetICValues(maContext, XNPreeditAttributes, preedit_attr, nullptr);
     XFree(preedit_attr);
 
     I18NStatus::get().show( true, I18NStatus::contextmap );
@@ -592,7 +592,7 @@ SalI18N_InputContext::SetICFocus( SalFrame* pFocusFrame )
         XSetICValues( maContext,
                       XNFocusWindow,       aFocusWindow,
                       XNClientWindow,      aClientWindow,
-                      NULL );
+                      nullptr );
 
         if( maClientData.aInputEv.mpTextAttr )
         {
diff --git a/vcl/unx/generic/app/i18n_im.cxx b/vcl/unx/generic/app/i18n_im.cxx
index c4a9b7f..962e5ae 100644
--- a/vcl/unx/generic/app/i18n_im.cxx
+++ b/vcl/unx/generic/app/i18n_im.cxx
@@ -348,7 +348,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
 
         if ( maMethod != nullptr )
         {
-            if (   XGetIMValues(maMethod, XNQueryInputStyle, &mpStyles, NULL)
+            if (   XGetIMValues(maMethod, XNQueryInputStyle, &mpStyles, nullptr)
                 != nullptr)
                 mbUseable = False;
             #if OSL_DEBUG_LEVEL > 1
@@ -370,7 +370,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
     maDestroyCallback.callback    = static_cast<XIMProc>(IM_IMDestroyCallback);
     maDestroyCallback.client_data = reinterpret_cast<XPointer>(this);
     if (mbUseable && maMethod != nullptr)
-        XSetIMValues(maMethod, XNDestroyCallback, &maDestroyCallback, NULL);
+        XSetIMValues(maMethod, XNDestroyCallback, &maDestroyCallback, nullptr);
 
     return mbUseable;
 }
diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx
index 4142825..ef1c3f9 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -470,7 +470,7 @@ IMPL_LINK_TYPED( IIIMPStatusWindow, SelectHdl, MenuButton*, pBtn, void )
             XSetICValues( static_cast<X11SalFrame*>(I18NStatus::get().getParent())->getInputContext()->GetContext(),
                           XNUnicodeCharacterSubset,
                           rChoices[nIndex].pData,
-                          NULL);

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list