summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/inc/accessibility/helper/listboxhelper.hxx2
-rw-r--r--avmedia/source/gstreamer/gstframegrabber.cxx4
-rw-r--r--avmedia/source/gstreamer/gstplayer.cxx20
-rw-r--r--avmedia/source/vlc/wrapper/SymbolLoader.hxx2
-rw-r--r--basctl/source/basicide/basicmod.hxx2
-rw-r--r--basebmp/source/bitmapdevice.cxx4
-rw-r--r--compilerplugins/clang/store/nullptr.cxx167
-rw-r--r--connectivity/source/drivers/evoab2/NResultSet.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OStatement.cxx2
-rw-r--r--connectivity/source/inc/java/GlobalRef.hxx12
-rw-r--r--connectivity/source/inc/java/LocalRef.hxx10
-rw-r--r--dbaccess/source/core/api/KeySet.cxx2
-rw-r--r--extensions/source/plugin/unx/npnapi.cxx42
-rw-r--r--extensions/source/plugin/unx/nppapi.cxx48
-rw-r--r--extensions/source/plugin/unx/npwrap.cxx2
-rw-r--r--extensions/source/plugin/unx/sysplug.cxx2
-rw-r--r--framework/inc/classes/checkediterator.hxx4
-rw-r--r--hwpfilter/source/list.hxx12
-rw-r--r--include/canvas/vclwrapper.hxx2
-rw-r--r--include/comphelper/listenernotification.hxx4
-rw-r--r--include/comphelper/sequence.hxx8
-rw-r--r--include/comphelper/types.hxx6
-rw-r--r--include/comphelper/uno3.hxx2
-rw-r--r--include/editeng/AccessibleParaManager.hxx2
-rw-r--r--include/registry/registry.hxx2
-rw-r--r--include/svx/svdobj.hxx2
-rw-r--r--include/unotools/sharedunocomponent.hxx2
-rw-r--r--include/vcl/lazydelete.hxx8
-rw-r--r--include/vcl/vclptr.hxx2
-rw-r--r--libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx74
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx20
-rw-r--r--mysqlc/source/mysqlc_subcomponent.hxx2
-rw-r--r--sc/inc/fstalgorithm.hxx4
-rw-r--r--sc/source/core/data/documen8.cxx2
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx18
-rw-r--r--sc/source/ui/app/scmod.cxx2
-rw-r--r--sc/source/ui/dbgui/PivotLayoutDialog.cxx2
-rw-r--r--sc/source/ui/inc/ChildWindowWrapper.hxx2
-rw-r--r--sc/source/ui/unoobj/confuno.cxx2
-rw-r--r--sc/source/ui/vba/excelvbahelper.hxx2
-rw-r--r--sd/source/ui/app/sdmod.cxx2
-rw-r--r--sd/source/ui/remotecontrol/AvahiNetworkService.cxx2
-rw-r--r--sfx2/source/appl/shutdowniconunx.cxx8
-rw-r--r--sfx2/source/dialog/titledockwin.cxx2
-rw-r--r--svx/source/form/fmcontrollayout.cxx2
-rw-r--r--svx/source/form/fmshell.cxx4
-rw-r--r--sw/source/uibase/app/swmodule.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/NeonSession.cxx8
-rw-r--r--vcl/unx/generic/app/i18n_cb.cxx4
-rw-r--r--vcl/unx/generic/app/i18n_ic.cxx26
-rw-r--r--vcl/unx/generic/app/i18n_im.cxx4
-rw-r--r--vcl/unx/generic/app/i18n_status.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkfactory.cxx4
-rw-r--r--vcl/unx/gtk/a11y/atktext.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkwindow.cxx6
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.cxx10
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx2
-rw-r--r--vcl/unx/gtk/glomenu.cxx16
-rw-r--r--vcl/unx/gtk/gtksalframe.cxx4
-rw-r--r--vcl/unx/gtk/gtksalmenu.cxx2
-rw-r--r--vcl/unx/gtk/gtksys.cxx2
-rw-r--r--vcl/unx/gtk/salnativewidgets-gtk.cxx24
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx2
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx12
-rw-r--r--xmloff/source/forms/formcellbinding.cxx2
66 files changed, 349 insertions, 316 deletions
diff --git a/accessibility/inc/accessibility/helper/listboxhelper.hxx b/accessibility/inc/accessibility/helper/listboxhelper.hxx
index 71bc7df5e394..eafbbbb9bf79 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 cd2eadf9e9a8..9608e7e36c36 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 6dd0f5c3538d..4e220866f8d1 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 3cf33b6afb2a..8e3faf41b975 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 f30c30b3fff4..f4629278a003 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 37ebf9136686..9469d5691668 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 5b38bbffa790..8bed1ce40424 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 0b9310bbfdc0..1f1d1d970d4c 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 42d081866ca8..39c04609c429 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 104a98f4b625..301522d14515 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 760e01886c99..5160e81c58ac 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 2e0369a384c0..95135dfa0bba 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 5b108c823ce3..8aafd7eb76ab 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 7f70a5e39ea7..80a201f27b7f 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 eb073e383f51..ec842dc87eef 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 c0a0649f5665..e58c0f28de5e 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 b7a1d8162f6a..0693033c81f7 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 978dc4d255b8..ab3879ea302b 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 99dcc7f0ab21..c4371d29a070 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 330e88cb88ad..b3a28771c8c8 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 65edfa5c36a1..fd11ce6574a4 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 17d1b67c0d64..a5fba55f1ec6 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 6901e6c52ded..e01e6f640f8f 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 a75a4abbb9d3..b5167181e03a 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 e4684d2984b1..295d7b12a4be 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 dbbe0f1eab8a..7c42e57d11f2 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 e14d1d306c2f..a76cb712915a 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 0d7921b75a1f..137d1314fbc2 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 0b4bdca556bd..c643b9bdcde1 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 0eb16a9678bb..392d8476a2ec 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 875fefc46400..e49b5a403622 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 741760214be4..e0654b1447ae 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 92bb81564108..f0cc68a4e6d5 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 08d68d4e7812..aae070c97980 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 12be8260b9c9..4ff5fc61d548 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 0e257dda4c5d..fd92c7bde008 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 8a376e7da751..eaafb66c388b 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 531eb49dc31b..4b01bf9a175a 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 29d6374f139d..1f4920d7a566 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 ff102347e5b7..a2ccffdaeba2 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 a0b66de14845..c62f5bf0beb8 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 1cdb5cf80691..ce537a53c4de 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 a5c5a94d5dfb..9d1204eda148 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 986326f83e93..ceaacfb06f81 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 89d69a926ab6..22af458a4d8e 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 85061c89531f..87d1bc2dd052 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 c8bbc1bc60bd..18a29f44c7ed 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 af8329ee454a..6977c6f473a1 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 f696e5513251..56a28374ce10 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 b18f7ef72aa8..ee9ec8f0a49f 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 c160612550b4..df63ead54078 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 c4a9b7f3ede8..962e5aeed764 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 4142825e669c..ef1c3f9c71ec 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);
+ nullptr);
// FIXME: get rid of X11SalFrame
X11SalFrame* pParent = static_cast<X11SalFrame*>(I18NStatus::get().getParent());
if( pParent && pParent->isMapped() )
diff --git a/vcl/unx/gtk/a11y/atkfactory.cxx b/vcl/unx/gtk/a11y/atkfactory.cxx
index a8428fb4ec86..bca68a6f9584 100644
--- a/vcl/unx/gtk/a11y/atkfactory.cxx
+++ b/vcl/unx/gtk/a11y/atkfactory.cxx
@@ -80,7 +80,7 @@ atk_noop_object_wrapper_new()
AtkObject *accessible;
accessible = static_cast<AtkObject *>(g_object_new (atk_noop_object_wrapper_get_type(), nullptr));
- g_return_val_if_fail (accessible != nullptr, NULL);
+ g_return_val_if_fail (accessible != nullptr, nullptr);
accessible->role = ATK_ROLE_INVALID;
accessible->layer = ATK_LAYER_INVALID;
@@ -122,7 +122,7 @@ wrapper_factory_create_accessible( GObject *obj )
#endif
GtkSalFrame* pFrame = GtkSalFrame::getFromWindow(GTK_WINDOW(pTopLevel));
- g_return_val_if_fail( pFrame != nullptr, NULL );
+ g_return_val_if_fail( pFrame != nullptr, nullptr );
vcl::Window* pFrameWindow = pFrame->GetWindow();
if( pFrameWindow )
diff --git a/vcl/unx/gtk/a11y/atktext.cxx b/vcl/unx/gtk/a11y/atktext.cxx
index c38c43231d6f..5c662a711131 100644
--- a/vcl/unx/gtk/a11y/atktext.cxx
+++ b/vcl/unx/gtk/a11y/atktext.cxx
@@ -218,7 +218,7 @@ text_wrapper_get_text (AtkText *text,
{
gchar * ret = nullptr;
- g_return_val_if_fail( (end_offset == -1) || (end_offset >= start_offset), NULL );
+ g_return_val_if_fail( (end_offset == -1) || (end_offset >= start_offset), nullptr );
/* at-spi expects the delete event to be send before the deletion happened
* so we save the deleted string object in the UNO event notification and
diff --git a/vcl/unx/gtk/a11y/atkwindow.cxx b/vcl/unx/gtk/a11y/atkwindow.cxx
index cca3aee51f8e..cafa3a1b585f 100644
--- a/vcl/unx/gtk/a11y/atkwindow.cxx
+++ b/vcl/unx/gtk/a11y/atkwindow.cxx
@@ -220,16 +220,16 @@ ooo_window_wrapper_real_initialize(AtkObject *obj, gpointer data)
g_signal_connect_after( GTK_WIDGET( data ), "focus-out-event",
G_CALLBACK (ooo_window_wrapper_real_focus_gtk),
- NULL);
+ nullptr);
if( obj->role == ATK_ROLE_TOOL_TIP )
{
g_signal_connect_after( GTK_WIDGET( data ), "map-event",
G_CALLBACK (ooo_tooltip_map),
- NULL);
+ nullptr);
g_signal_connect_after( GTK_WIDGET( data ), "unmap-event",
G_CALLBACK (ooo_tooltip_unmap),
- NULL);
+ nullptr);
}
}
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 2c3e78b8dd66..0e12b0eb964f 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -782,7 +782,7 @@ ensureTypeFor( uno::XInterface *pAccessible )
AtkObject *
atk_object_wrapper_ref( const uno::Reference< accessibility::XAccessible > &rxAccessible, bool create )
{
- g_return_val_if_fail( rxAccessible.get() != nullptr, NULL );
+ g_return_val_if_fail( rxAccessible.get() != nullptr, nullptr );
AtkObject *obj = ooo_wrapper_registry_get(rxAccessible);
if( obj )
@@ -801,14 +801,14 @@ AtkObject *
atk_object_wrapper_new( const css::uno::Reference< css::accessibility::XAccessible >& rxAccessible,
AtkObject* parent )
{
- g_return_val_if_fail( rxAccessible.get() != nullptr, NULL );
+ g_return_val_if_fail( rxAccessible.get() != nullptr, nullptr );
AtkObjectWrapper *pWrap = nullptr;
try {
uno::Reference< accessibility::XAccessibleContext > xContext(rxAccessible->getAccessibleContext());
- g_return_val_if_fail( xContext.get() != nullptr, NULL );
+ g_return_val_if_fail( xContext.get() != nullptr, nullptr );
GType nType = ensureTypeFor( xContext.get() );
gpointer obj = g_object_new( nType, nullptr);
@@ -871,7 +871,7 @@ void atk_object_wrapper_add_child(AtkObjectWrapper* wrapper, AtkObject *child, g
AtkObject *atk_obj = ATK_OBJECT( wrapper );
atk_object_set_parent( child, atk_obj );
- g_signal_emit_by_name( atk_obj, "children_changed::add", index, child, NULL );
+ g_signal_emit_by_name( atk_obj, "children_changed::add", index, child, nullptr );
}
/*****************************************************************************/
@@ -885,7 +885,7 @@ void atk_object_wrapper_remove_child(AtkObjectWrapper* wrapper, AtkObject *child
wrapper->child_about_to_be_removed = child;
wrapper->index_of_child_about_to_be_removed = index;
- g_signal_emit_by_name( ATK_OBJECT( wrapper ), "children_changed::remove", index, child, NULL );
+ g_signal_emit_by_name( ATK_OBJECT( wrapper ), "children_changed::remove", index, child, nullptr );
wrapper->index_of_child_about_to_be_removed = -1;
wrapper->child_about_to_be_removed = nullptr;
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 9798639e58f9..965768d36b08 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -184,7 +184,7 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
gtk_cell_layout_pack_start(
GTK_CELL_LAYOUT(m_pLists[i]), pCell, TRUE);
gtk_cell_layout_set_attributes(
- GTK_CELL_LAYOUT (m_pLists[i]), pCell, "text", 0, NULL);
+ GTK_CELL_LAYOUT (m_pLists[i]), pCell, "text", 0, nullptr);
m_pListLabels[i] = gtk_label_new( "" );
diff --git a/vcl/unx/gtk/glomenu.cxx b/vcl/unx/gtk/glomenu.cxx
index 6aa19e6b74a9..835e832f57b7 100644
--- a/vcl/unx/gtk/glomenu.cxx
+++ b/vcl/unx/gtk/glomenu.cxx
@@ -199,7 +199,7 @@ g_lo_menu_get_attribute_value_from_item_in_section (GLOMenu *menu,
{
GMenuModel *model = G_MENU_MODEL (g_lo_menu_get_section (menu, section));
- g_return_val_if_fail (model != nullptr, NULL);
+ g_return_val_if_fail (model != nullptr, nullptr);
GVariant *value = g_menu_model_get_item_attribute_value (model,
position,
@@ -253,7 +253,7 @@ g_lo_menu_get_label_from_item_in_section (GLOMenu *menu,
gint section,
gint position)
{
- g_return_val_if_fail (G_IS_LO_MENU (menu), NULL);
+ g_return_val_if_fail (G_IS_LO_MENU (menu), nullptr);
GVariant *label_value = g_lo_menu_get_attribute_value_from_item_in_section (menu,
section,
@@ -348,7 +348,7 @@ g_lo_menu_get_accelerator_from_item_in_section (GLOMenu *menu,
gint section,
gint position)
{
- g_return_val_if_fail (G_IS_LO_MENU (menu), NULL);
+ g_return_val_if_fail (G_IS_LO_MENU (menu), nullptr);
GVariant *accel_value = g_lo_menu_get_attribute_value_from_item_in_section (menu,
section,
@@ -399,7 +399,7 @@ g_lo_menu_get_command_from_item_in_section (GLOMenu *menu,
gint section,
gint position)
{
- g_return_val_if_fail (G_IS_LO_MENU (menu), NULL);
+ g_return_val_if_fail (G_IS_LO_MENU (menu), nullptr);
GVariant *command_value = g_lo_menu_get_attribute_value_from_item_in_section (menu,
section,
@@ -478,7 +478,7 @@ GLOMenu *
g_lo_menu_get_section (GLOMenu *menu,
gint section)
{
- g_return_val_if_fail (G_IS_LO_MENU (menu), NULL);
+ g_return_val_if_fail (G_IS_LO_MENU (menu), nullptr);
return G_LO_MENU (G_MENU_MODEL_CLASS (g_lo_menu_parent_class)
->get_item_link (G_MENU_MODEL (menu), section, G_MENU_LINK_SECTION));
@@ -514,12 +514,12 @@ g_lo_menu_get_submenu_from_item_in_section (GLOMenu *menu,
gint section,
gint position)
{
- g_return_val_if_fail (G_IS_LO_MENU (menu), NULL);
- g_return_val_if_fail (0 <= section && section < (gint) menu->items->len, NULL);
+ g_return_val_if_fail (G_IS_LO_MENU (menu), nullptr);
+ g_return_val_if_fail (0 <= section && section < (gint) menu->items->len, nullptr);
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_val_if_fail (model != nullptr, NULL);
+ g_return_val_if_fail (model != nullptr, nullptr);
GLOMenu *submenu = nullptr;
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index b104456a765a..085eb0e22f56 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -532,7 +532,7 @@ static void activate_uno(GSimpleAction *action, GVariant*, gpointer)
return;
gchar *strval = nullptr;
- g_object_get(action, "name", &strval, NULL);
+ g_object_get(action, "name", &strval, nullptr);
if (!strval)
return;
@@ -1225,7 +1225,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
else
{
m_pWindow = gtk_widget_new( GTK_TYPE_WINDOW, "type", eWinType,
- "visible", FALSE, NULL );
+ "visible", FALSE, nullptr );
}
g_object_set_data( G_OBJECT( m_pWindow ), "SalFrame", this );
g_object_set_data( G_OBJECT( m_pWindow ), "libo-version", const_cast<char *>(LIBO_VERSION_DOTTED));
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index a0cc9779da8a..35250a0e4264 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -610,7 +610,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
{
g_lo_menu_set_command_to_item_in_section( pMenu, nSection, nItemPos, aCommand );
- gchar* aItemCommand = g_strconcat("win.", aCommand, NULL );
+ gchar* aItemCommand = g_strconcat("win.", aCommand, nullptr );
if ( bIsSubmenu )
g_lo_menu_set_submenu_action_to_item_in_section( pMenu, nSection, nItemPos, aItemCommand );
diff --git a/vcl/unx/gtk/gtksys.cxx b/vcl/unx/gtk/gtksys.cxx
index 8d79c98cbe70..80153fe555b5 100644
--- a/vcl/unx/gtk/gtksys.cxx
+++ b/vcl/unx/gtk/gtksys.cxx
@@ -261,7 +261,7 @@ int GtkSalSystem::ShowNativeDialog (const OUString& rTitle, const OUString& rMes
"title", aTitle.getStr(),
"message-type", (int)GTK_MESSAGE_WARNING,
"text", aMessage.getStr(),
- NULL));
+ nullptr));
int nButton = 0;
std::list< OUString >::const_iterator it;
for (it = rButtonNames.begin(); it != rButtonNames.end(); ++it)
diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx
index 1a104532df2d..32b4fe59c576 100644
--- a/vcl/unx/gtk/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx
@@ -568,10 +568,10 @@ void GtkData::initNWF()
GtkSettings *gtks = gtk_settings_get_default ();
gint val;
- g_object_get (gtks, "gtk-auto-mnemonics", &val, NULL);
+ g_object_get (gtks, "gtk-auto-mnemonics", &val, nullptr);
if (val) pSVData->maNWFData.mbAutoAccel = true;
else pSVData->maNWFData.mbAutoAccel = false;
- g_object_get (gtks, "gtk-enable-mnemonics", &val, NULL);
+ g_object_get (gtks, "gtk-enable-mnemonics", &val, nullptr);
if (val) pSVData->maNWFData.mbEnableAccel = true;
else pSVData->maNWFData.mbEnableAccel = false;
}
@@ -1246,7 +1246,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
gtk_widget_style_get( widget,
"horizontal-padding", &horizontal_padding,
- NULL );
+ nullptr );
// Use arrow-scaling property if available (2.15+), avoid warning otherwise
if ( gtk_widget_class_find_style_property( GTK_WIDGET_GET_CLASS( widget ),
@@ -1254,7 +1254,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
{
gtk_widget_style_get( widget,
"arrow-scaling", &arrow_scaling,
- NULL );
+ nullptr );
}
child = GTK_BIN( widget )->child;
@@ -1663,7 +1663,7 @@ bool GtkSalGraphics::NWPaintGTKButtonReal(
{
gtk_widget_style_get (GTK_WIDGET (gWidgetData[m_nXScreen].gToolbarWidget),
"internal-padding", &internal_padding,
- NULL);
+ nullptr);
x += internal_padding/2;
w -= internal_padding;
stateType = GTK_STATE_PRELIGHT;
@@ -3161,7 +3161,7 @@ bool GtkSalGraphics::NWPaintGTKToolbar(
"wide-separators", &wide_separators,
"separator-width", &separator_width,
"separator-height", &separator_height,
- NULL);
+ nullptr);
if (wide_separators)
{
@@ -3643,7 +3643,7 @@ bool GtkSalGraphics::NWPaintGTKSlider(
"slider-width", &slider_width,
"slider-length", &slider_length,
"trough-border", &trough_border,
- NULL);
+ nullptr);
GtkStateType eState = (nState & ControlState::ENABLED) ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE;
if( nPart == PART_TRACK_HORZ_AREA )
@@ -3974,7 +3974,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
"content-area-spacing", &aDialogStyle.content_area_spacing,
"button-spacing", &aDialogStyle.button_spacing,
"action-area-border", &aDialogStyle.action_area_border,
- NULL);
+ nullptr);
aStyleSet.SetDialogStyle(aDialogStyle);
FrameStyle aFrameStyle(aStyleSet.GetFrameStyle());
@@ -4008,14 +4008,14 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
// hyperlink colors
GdkColor *link_color = nullptr;
- gtk_widget_style_get (m_pWindow, "link-color", &link_color, NULL);
+ gtk_widget_style_get (m_pWindow, "link-color", &link_color, nullptr);
if (link_color)
{
aStyleSet.SetLinkColor(getColor(*link_color));
gdk_color_free (link_color);
link_color = nullptr;
}
- gtk_widget_style_get (m_pWindow, "visited-link-color", &link_color, NULL);
+ gtk_widget_style_get (m_pWindow, "visited-link-color", &link_color, nullptr);
if (link_color)
{
aStyleSet.SetVisitedLinkColor(getColor(*link_color));
@@ -4649,12 +4649,12 @@ static void NWEnsureGTKTreeView( SalX11Screen nScreen )
// Columns will be used for tree header rendering
GtkCellRenderer* renderer=gtk_cell_renderer_text_new();
- GtkTreeViewColumn* column=gtk_tree_view_column_new_with_attributes("",renderer,"text",0,NULL);
+ GtkTreeViewColumn* column=gtk_tree_view_column_new_with_attributes("",renderer,"text",0,nullptr);
gtk_tree_view_column_set_widget(column,gtk_label_new(""));
gtk_tree_view_append_column(GTK_TREE_VIEW(gWidgetData[nScreen].gTreeView), column);
// Add one more column so that some engines like clearlooks did render separators between columns
- column=gtk_tree_view_column_new_with_attributes("",renderer,"text",0,NULL);
+ column=gtk_tree_view_column_new_with_attributes("",renderer,"text",0,nullptr);
gtk_tree_view_append_column(GTK_TREE_VIEW(gWidgetData[nScreen].gTreeView), column);
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gTreeView, nScreen );
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 5a3efe0d2eaa..31b608f2e7fc 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1127,7 +1127,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
else
{
m_pWindow = gtk_widget_new( GTK_TYPE_WINDOW, "type", eWinType,
- "visible", FALSE, NULL );
+ "visible", FALSE, nullptr );
}
g_object_set_data( G_OBJECT( m_pWindow ), "SalFrame", this );
g_object_set_data( G_OBJECT( m_pWindow ), "libo-version", const_cast<char *>(LIBO_VERSION_DOTTED));
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index e0cc8d5121e8..9d5266fec8d1 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -828,7 +828,7 @@ void GtkSalGraphics::PaintCheckOrRadio(GtkStyleContext *context,
gint indicator_size;
gtk_style_context_get_style(mpCheckButtonStyle,
"indicator-size", &indicator_size,
- NULL);
+ nullptr);
gint x = (rControlRectangle.GetWidth() - indicator_size) / 2;
gint y = (rControlRectangle.GetHeight() - indicator_size) / 2;
@@ -1103,7 +1103,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
gint initial_gap(0);
gtk_style_context_get_style(mpNoteBookStyle,
"initial-gap", &initial_gap,
- NULL);
+ nullptr);
nX += initial_gap/2;
nWidth -= initial_gap;
@@ -1308,7 +1308,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
"wide-separators", &wide_separators,
"separator-width", &separator_width,
"separator-height", &separator_height,
- NULL);
+ nullptr);
aEditRect = Rectangle( aEditRect.TopLeft(),
Size( aEditRect.GetWidth(), wide_separators ? separator_height : 1 ) );
@@ -1320,7 +1320,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar
arrow_scaling = 0;
gtk_style_context_get_style (mpCheckMenuItemStyle,
"arrow-scaling", &arrow_scaling,
- NULL);
+ nullptr);
arrow_size = 11 * arrow_scaling;
aEditRect = Rectangle( aEditRect.TopLeft(),
@@ -1594,7 +1594,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
GdkColor *link_color = nullptr;
gtk_style_context_get_style(pStyle,
"link-color", &link_color,
- NULL);
+ nullptr);
if (link_color) {
aStyleSet.SetLinkColor(getColorFromColor(*link_color));
gdk_color_free(link_color);
@@ -1603,7 +1603,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
link_color = nullptr;
gtk_style_context_get_style(pStyle,
"visited-link-color", &link_color,
- NULL);
+ nullptr);
if (link_color) {
aStyleSet.SetVisitedLinkColor(getColorFromColor(*link_color));
gdk_color_free(link_color);
diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx
index bbd610dc3bf2..486a98a3e02f 100644
--- a/xmloff/source/forms/formcellbinding.cxx
+++ b/xmloff/source/forms/formcellbinding.cxx
@@ -71,7 +71,7 @@ namespace
if ( xChild.is() )
return getTypedModelNode< TYPE >( xChild->getParent() );
else
- return NULL;
+ return nullptr;
}
}