summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/app/i18n_cb.cxx24
-rw-r--r--vcl/unx/generic/app/i18n_ic.cxx90
-rw-r--r--vcl/unx/generic/app/i18n_im.cxx28
-rw-r--r--vcl/unx/generic/app/i18n_keysym.cxx4
-rw-r--r--vcl/unx/generic/app/i18n_status.cxx26
-rw-r--r--vcl/unx/generic/app/i18n_xkb.cxx4
-rw-r--r--vcl/unx/generic/app/randrwrapper.cxx12
-rw-r--r--vcl/unx/generic/app/saldata.cxx48
-rw-r--r--vcl/unx/generic/app/saldisp.cxx50
-rw-r--r--vcl/unx/generic/app/salinst.cxx6
-rw-r--r--vcl/unx/generic/app/saltimer.cxx2
-rw-r--r--vcl/unx/generic/app/sm.cxx62
-rw-r--r--vcl/unx/generic/app/wmadaptor.cxx88
-rw-r--r--vcl/unx/generic/desktopdetect/desktopdetector.cxx18
-rw-r--r--vcl/unx/generic/dtrans/X11_droptarget.cxx2
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx84
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.hxx6
-rw-r--r--vcl/unx/generic/dtrans/bmp.cxx14
-rw-r--r--vcl/unx/generic/gdi/cairo_xlib_cairo.cxx8
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx20
-rw-r--r--vcl/unx/generic/gdi/gcach_xpeer.cxx4
-rw-r--r--vcl/unx/generic/gdi/gdiimpl.cxx38
-rw-r--r--vcl/unx/generic/gdi/openglx11cairotextrender.cxx4
-rw-r--r--vcl/unx/generic/gdi/salbmp.cxx52
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx26
-rw-r--r--vcl/unx/generic/gdi/salvd.cxx10
-rw-r--r--vcl/unx/generic/gdi/x11cairotextrender.cxx4
-rw-r--r--vcl/unx/generic/gdi/x11windowprovider.cxx6
-rw-r--r--vcl/unx/generic/gdi/xrender_peer.cxx2
-rw-r--r--vcl/unx/generic/plugadapt/salplug.cxx26
-rw-r--r--vcl/unx/generic/printer/cupsmgr.cxx38
-rw-r--r--vcl/unx/generic/printer/jobdata.cxx6
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx94
-rw-r--r--vcl/unx/generic/printer/printerinfomanager.cxx26
-rw-r--r--vcl/unx/generic/window/salframe.cxx100
-rw-r--r--vcl/unx/generic/window/salobj.cxx30
-rw-r--r--vcl/unx/generic/window/screensaverinhibitor.cxx10
-rw-r--r--vcl/unx/gtk/a11y/atkaction.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkcomponent.cxx10
-rw-r--r--vcl/unx/gtk/a11y/atkeditabletext.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkfactory.cxx16
-rw-r--r--vcl/unx/gtk/a11y/atkhypertext.cxx28
-rw-r--r--vcl/unx/gtk/a11y/atkimage.cxx4
-rw-r--r--vcl/unx/gtk/a11y/atklistener.cxx10
-rw-r--r--vcl/unx/gtk/a11y/atkregistry.cxx6
-rw-r--r--vcl/unx/gtk/a11y/atkselection.cxx4
-rw-r--r--vcl/unx/gtk/a11y/atktable.cxx22
-rw-r--r--vcl/unx/gtk/a11y/atktext.cxx24
-rw-r--r--vcl/unx/gtk/a11y/atktextattributes.cxx54
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx8
-rw-r--r--vcl/unx/gtk/a11y/atkvalue.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkwindow.cxx12
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.cxx58
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.hxx2
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx42
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx16
-rw-r--r--vcl/unx/gtk/app/gtksys.cxx10
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx94
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx2
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx14
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkPicker.cxx16
-rw-r--r--vcl/unx/gtk/gdi/gtkprintwrapper.cxx38
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx180
-rw-r--r--vcl/unx/gtk/gdi/salprn-gtk.cxx48
-rw-r--r--vcl/unx/gtk/window/gloactiongroup.cxx56
-rw-r--r--vcl/unx/gtk/window/glomenu.cxx82
-rw-r--r--vcl/unx/gtk/window/gtkobject.cxx16
-rw-r--r--vcl/unx/gtk/window/gtksalframe.cxx204
-rw-r--r--vcl/unx/gtk/window/gtksalmenu.cxx96
-rw-r--r--vcl/unx/gtk/window/hudawareness.cxx8
-rw-r--r--vcl/unx/gtk3/app/gtk3gtkinst.cxx2
-rw-r--r--vcl/unx/gtk3/gdi/cairo_gtk3_cairo.cxx4
-rw-r--r--vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx96
-rw-r--r--vcl/unx/kde4/KDE4FilePicker.cxx4
-rw-r--r--vcl/unx/kde4/KDESalDisplay.cxx10
-rw-r--r--vcl/unx/kde4/KDESalFrame.cxx2
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx2
-rw-r--r--vcl/unx/kde4/KDEXLib.cxx18
-rw-r--r--vcl/unx/kde4/main.cxx2
79 files changed, 1199 insertions, 1199 deletions
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx
index 9f267a36ea87..b18f7ef72aa8 100644
--- a/vcl/unx/generic/app/i18n_cb.cxx
+++ b/vcl/unx/generic/app/i18n_cb.cxx
@@ -151,7 +151,7 @@ Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where)
if (pInsertText->encoding_is_wchar)
{
wchar_t *pWCString = pInsertText->string.wide_char;
- size_t nBytes = wcstombs ( NULL, pWCString, 1024 /* don't care */);
+ size_t nBytes = wcstombs ( nullptr, pWCString, 1024 /* don't care */);
pMBString = static_cast<char*>(alloca( nBytes + 1 ));
nMBLength = wcstombs ( pMBString, pWCString, nBytes + 1);
}
@@ -306,8 +306,8 @@ PreeditDrawCallback(XIC ic, XPointer client_data,
preedit_data_t* pPreeditData = reinterpret_cast<preedit_data_t*>(client_data);
// if there's nothing to change then change nothing
- if ( ( (call_data->text == NULL) && (call_data->chg_length == 0) )
- || pPreeditData->pFrame == NULL )
+ if ( ( (call_data->text == nullptr) && (call_data->chg_length == 0) )
+ || pPreeditData->pFrame == nullptr )
return;
// Solaris 7 deletes the preedit buffer after commit
@@ -317,13 +317,13 @@ PreeditDrawCallback(XIC ic, XPointer client_data,
if ( pPreeditData->eState == ePreeditStatusStartPending )
pPreeditData->eState = ePreeditStatusActivationRequired;
- PreeditStartCallback( ic, client_data, NULL );
+ PreeditStartCallback( ic, client_data, nullptr );
// Edit the internal textbuffer as indicated by the call_data,
// chg_first and chg_length are guaranteed to be nonnegative
// handle text deletion
- if (call_data->text == NULL)
+ if (call_data->text == nullptr)
{
Preedit_DeleteText(&(pPreeditData->aText),
call_data->chg_first, call_data->chg_length );
@@ -332,13 +332,13 @@ PreeditDrawCallback(XIC ic, XPointer client_data,
{
// handle text insertion
if ( (call_data->chg_length == 0)
- && (call_data->text->string.wide_char != NULL))
+ && (call_data->text->string.wide_char != nullptr))
{
Preedit_InsertText(&(pPreeditData->aText), call_data->text,
call_data->chg_first);
}
else if ( (call_data->chg_length != 0)
- && (call_data->text->string.wide_char != NULL))
+ && (call_data->text->string.wide_char != nullptr))
{
// handle text replacement by deletion and insertion of text,
// not smart, just good enough
@@ -349,7 +349,7 @@ PreeditDrawCallback(XIC ic, XPointer client_data,
call_data->chg_first);
}
else if ( (call_data->chg_length != 0)
- && (call_data->text->string.wide_char == NULL))
+ && (call_data->text->string.wide_char == nullptr))
{
// not really a text update, only attributes are concerned
Preedit_UpdateAttributes(&(pPreeditData->aText),
@@ -484,14 +484,14 @@ StatusDrawCallback (XIC, XPointer, XIMStatusDrawCallbackStruct *call_data)
if( call_data->data.text )
{
// XIM with text
- sal_Char* pMBString = NULL;
+ sal_Char* pMBString = nullptr;
size_t nLength = 0;
if( call_data->data.text->encoding_is_wchar )
{
if( call_data->data.text->string.wide_char )
{
wchar_t* pWString = call_data->data.text->string.wide_char;
- size_t nBytes = wcstombs( NULL, pWString, 1024 );
+ size_t nBytes = wcstombs( nullptr, pWString, 1024 );
pMBString = static_cast<sal_Char*>(alloca( nBytes+1 ));
nLength = wcstombs( pMBString, pWString, nBytes+1 );
}
@@ -525,7 +525,7 @@ void
IC_IMDestroyCallback (XIM, XPointer client_data, XPointer)
{
SalI18N_InputContext *pContext = reinterpret_cast<SalI18N_InputContext*>(client_data);
- if (pContext != NULL)
+ if (pContext != nullptr)
pContext->HandleDestroyIM();
}
@@ -533,7 +533,7 @@ void
IM_IMDestroyCallback (XIM, XPointer client_data, XPointer)
{
SalI18N_InputMethod *pMethod = reinterpret_cast<SalI18N_InputMethod*>(client_data);
- if (pMethod != NULL)
+ if (pMethod != nullptr)
pMethod->HandleDestroyIM();
}
diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx
index e9ddd68de972..c160612550b4 100644
--- a/vcl/unx/generic/app/i18n_ic.cxx
+++ b/vcl/unx/generic/app/i18n_ic.cxx
@@ -44,14 +44,14 @@ static void sendEmptyCommit( SalFrame* pFrame )
SalExtTextInputEvent aEmptyEv;
aEmptyEv.mnTime = 0;
- aEmptyEv.mpTextAttr = 0;
+ aEmptyEv.mpTextAttr = nullptr;
aEmptyEv.maText.clear();
aEmptyEv.mnCursorPos = 0;
aEmptyEv.mnCursorFlags = 0;
aEmptyEv.mbOnlyCursor = False;
pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, static_cast<void*>(&aEmptyEv) );
if( ! aDel.isDeleted() )
- pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
+ pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, nullptr );
}
// Constructor / Destructor, the InputContext is bound to the SalFrame, as it
@@ -59,18 +59,18 @@ static void sendEmptyCommit( SalFrame* pFrame )
SalI18N_InputContext::~SalI18N_InputContext()
{
- if ( maContext != NULL )
+ if ( maContext != nullptr )
XDestroyIC( maContext );
- if ( mpAttributes != NULL )
+ if ( mpAttributes != nullptr )
XFree( mpAttributes );
- if ( mpStatusAttributes != NULL )
+ if ( mpStatusAttributes != nullptr )
XFree( mpStatusAttributes );
- if ( mpPreeditAttributes != NULL )
+ if ( mpPreeditAttributes != nullptr )
XFree( mpPreeditAttributes );
- if (maClientData.aText.pUnicodeBuffer != NULL)
+ if (maClientData.aText.pUnicodeBuffer != nullptr)
free(maClientData.aText.pUnicodeBuffer);
- if (maClientData.aText.pCharStyle != NULL)
+ if (maClientData.aText.pCharStyle != nullptr)
free(maClientData.aText.pCharStyle);
}
@@ -84,7 +84,7 @@ XVaAddToNestedList( XVaNestedList a_srclist, char* name, XPointer value )
// if ( value == NULL )
// return a_srclist;
- if ( a_srclist == NULL )
+ if ( a_srclist == nullptr )
{
a_dstlist = XVaCreateNestedList(
0,
@@ -100,7 +100,7 @@ XVaAddToNestedList( XVaNestedList a_srclist, char* name, XPointer value )
NULL );
}
- return a_dstlist != NULL ? a_dstlist : a_srclist ;
+ return a_dstlist != nullptr ? a_dstlist : a_srclist ;
}
// convenience routine to create a fontset
@@ -108,9 +108,9 @@ XVaAddToNestedList( XVaNestedList a_srclist, char* name, XPointer value )
static XFontSet
get_font_set( Display *p_display )
{
- static XFontSet p_font_set = NULL;
+ static XFontSet p_font_set = nullptr;
- if (p_font_set == NULL)
+ if (p_font_set == nullptr)
{
char **pp_missing_list;
int n_missing_count;
@@ -140,9 +140,9 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
),
mnStatusStyle( 0 ),
mnPreeditStyle( 0 ),
- mpAttributes( NULL ),
- mpStatusAttributes( NULL ),
- mpPreeditAttributes( NULL )
+ mpAttributes( nullptr ),
+ mpStatusAttributes( nullptr ),
+ mpPreeditAttributes( nullptr )
{
#ifdef SOLARIS
static const char* pIIIMPEnable = getenv( "SAL_DISABLE_OWN_IM_STATUS" );
@@ -158,10 +158,10 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
memset(&maSwitchIMCallback, 0, sizeof(maSwitchIMCallback));
memset(&maDestroyCallback, 0, sizeof(maDestroyCallback));
- maClientData.aText.pUnicodeBuffer = NULL;
- maClientData.aText.pCharStyle = NULL;
+ maClientData.aText.pUnicodeBuffer = nullptr;
+ maClientData.aText.pCharStyle = nullptr;
maClientData.aInputEv.mnTime = 0;
- maClientData.aInputEv.mpTextAttr = NULL;
+ maClientData.aInputEv.mpTextAttr = nullptr;
maClientData.aInputEv.mnCursorPos = 0;
maClientData.aInputEv.mnCursorFlags = 0;
maClientData.aInputEv.mbOnlyCursor = false;
@@ -279,7 +279,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
Display* pDisplay = vcl_sal::getSalDisplay(GetGenericData())->GetDisplay();
XFontSet pFontSet = get_font_set(pDisplay);
- if (pFontSet != NULL)
+ if (pFontSet != nullptr)
{
mpPreeditAttributes = XVaAddToNestedList( mpPreeditAttributes,
const_cast<char*>(XNFontSet), reinterpret_cast<XPointer>(pFontSet));
@@ -309,7 +309,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
if ( mnPreeditStyle != XIMPreeditNone )
{
#if defined LINUX || defined FREEBSD || defined NETBSD || defined OPENBSD || defined DRAGONFLY
- if ( mpPreeditAttributes != NULL )
+ if ( mpPreeditAttributes != nullptr )
#endif
mpAttributes = XVaAddToNestedList( mpAttributes,
const_cast<char*>(XNPreeditAttributes), static_cast<XPointer>(mpPreeditAttributes) );
@@ -317,7 +317,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
if ( mnStatusStyle != XIMStatusNone )
{
#if defined LINUX || defined FREEBSD || defined NETBSD || defined OPENBSD || defined DRAGONFLY
- if ( mpStatusAttributes != NULL )
+ if ( mpStatusAttributes != nullptr )
#endif
mpAttributes = XVaAddToNestedList( mpAttributes,
const_cast<char*>(XNStatusAttributes), static_cast<XPointer>(mpStatusAttributes) );
@@ -327,7 +327,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
NULL );
}
- if ( maContext == NULL )
+ if ( maContext == nullptr )
{
#if OSL_DEBUG_LEVEL > 1
fprintf(stderr, "input context creation failed\n");
@@ -335,25 +335,25 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
mbUseable = False;
- if ( mpAttributes != NULL )
+ if ( mpAttributes != nullptr )
XFree( mpAttributes );
- if ( mpStatusAttributes != NULL )
+ if ( mpStatusAttributes != nullptr )
XFree( mpStatusAttributes );
- if ( mpPreeditAttributes != NULL )
+ if ( mpPreeditAttributes != nullptr )
XFree( mpPreeditAttributes );
- if ( maClientData.aText.pUnicodeBuffer != NULL )
+ if ( maClientData.aText.pUnicodeBuffer != nullptr )
free ( maClientData.aText.pUnicodeBuffer );
- if ( maClientData.aText.pCharStyle != NULL )
+ if ( maClientData.aText.pCharStyle != nullptr )
free ( maClientData.aText.pCharStyle );
- mpAttributes = NULL;
- mpStatusAttributes = NULL;
- mpPreeditAttributes = NULL;
- maClientData.aText.pUnicodeBuffer = NULL;
- maClientData.aText.pCharStyle = NULL;
+ mpAttributes = nullptr;
+ mpStatusAttributes = nullptr;
+ mpPreeditAttributes = nullptr;
+ maClientData.aText.pUnicodeBuffer = nullptr;
+ maClientData.aText.pCharStyle = nullptr;
}
- if ( maContext != NULL)
+ if ( maContext != nullptr)
{
maDestroyCallback.callback = static_cast<XIMProc>(IC_IMDestroyCallback);
maDestroyCallback.client_data = reinterpret_cast<XPointer>(this);
@@ -369,7 +369,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
void
SalI18N_InputContext::Unmap( SalFrame* pFrame )
{
- if ( maContext != NULL )
+ if ( maContext != nullptr )
{
I18NStatus& rStatus( I18NStatus::get() );
if( rStatus.getParent() == pFrame )
@@ -377,7 +377,7 @@ SalI18N_InputContext::Unmap( SalFrame* pFrame )
}
UnsetICFocus( pFrame );
- maClientData.pFrame = NULL;
+ maClientData.pFrame = nullptr;
}
void
@@ -390,7 +390,7 @@ SalI18N_InputContext::Map( SalFrame *pFrame )
if( pFrame )
{
rStatus.show( true, I18NStatus::contextmap );
- if ( maContext == NULL )
+ if ( maContext == nullptr )
{
SalI18N_InputMethod *pInputMethod;
pInputMethod = vcl_sal::getSalDisplay(GetGenericData())->GetInputMethod();
@@ -411,7 +411,7 @@ SalI18N_InputContext::Map( SalFrame *pFrame )
void
SalI18N_InputContext::HandleDestroyIM()
{
- maContext = 0; // don't change
+ maContext = nullptr; // don't change
mbUseable = False;
}
@@ -488,7 +488,7 @@ SalI18N_InputContext::SupportInputMethodStyle( XIMStyles *pIMStyles )
mnPreeditStyle = 0;
mnStatusStyle = 0;
- if ( pIMStyles != NULL )
+ if ( pIMStyles != nullptr )
{
int nBestScore = 0;
int nActualScore = 0;
@@ -534,7 +534,7 @@ SalI18N_InputContext::CommitKeyEvent(sal_Unicode* pText, sal_Size nLength)
SalExtTextInputEvent aTextEvent;
aTextEvent.mnTime = 0;
- aTextEvent.mpTextAttr = 0;
+ aTextEvent.mpTextAttr = nullptr;
aTextEvent.mnCursorPos = nLength;
aTextEvent.maText = OUString(pText, nLength);
aTextEvent.mnCursorFlags = 0;
@@ -554,7 +554,7 @@ SalI18N_InputContext::CommitKeyEvent(sal_Unicode* pText, sal_Size nLength)
int
SalI18N_InputContext::UpdateSpotLocation()
{
- if (maContext == 0 || maClientData.pFrame == NULL)
+ if (maContext == nullptr || maClientData.pFrame == nullptr)
return -1;
SalExtTextInputPosEvent aPosEvent;
@@ -581,7 +581,7 @@ void
SalI18N_InputContext::SetICFocus( SalFrame* pFocusFrame )
{
I18NStatus::get().setParent( pFocusFrame );
- if ( mbUseable && (maContext != NULL) )
+ if ( mbUseable && (maContext != nullptr) )
{
maClientData.pFrame = pFocusFrame;
@@ -610,13 +610,13 @@ SalI18N_InputContext::UnsetICFocus( SalFrame* pFrame )
{
I18NStatus& rStatus( I18NStatus::get() );
if( rStatus.getParent() == pFrame )
- rStatus.setParent( NULL );
+ rStatus.setParent( nullptr );
- if ( mbUseable && (maContext != NULL) )
+ if ( mbUseable && (maContext != nullptr) )
{
// cancel an eventual event posted to begin preedit again
vcl_sal::getSalDisplay(GetGenericData())->CancelInternalEvent( maClientData.pFrame, &maClientData.aInputEv, SALEVENT_EXTTEXTINPUT );
- maClientData.pFrame = NULL;
+ maClientData.pFrame = nullptr;
XUnsetICFocus( maContext );
}
}
@@ -626,7 +626,7 @@ SalI18N_InputContext::UnsetICFocus( SalFrame* pFrame )
void
SalI18N_InputContext::EndExtTextInput( EndExtTextInputFlags /*nFlags*/ )
{
- if ( mbUseable && (maContext != NULL) && maClientData.pFrame )
+ if ( mbUseable && (maContext != nullptr) && maClientData.pFrame )
{
vcl::DeletionListener aDel( maClientData.pFrame );
// delete preedit in sal (commit an empty string)
diff --git a/vcl/unx/generic/app/i18n_im.cxx b/vcl/unx/generic/app/i18n_im.cxx
index d9dfc831e6bb..c4a9b7f3ede8 100644
--- a/vcl/unx/generic/app/i18n_im.cxx
+++ b/vcl/unx/generic/app/i18n_im.cxx
@@ -66,7 +66,7 @@ void
XKeyEventOp::init()
{
type = 0; /* serial = 0; */
- send_event = 0; display = 0;
+ send_event = 0; display = nullptr;
window = 0; root = 0;
subwindow = 0; /* time = 0; */
/* x = 0; y = 0; */
@@ -135,7 +135,7 @@ SetSystemLocale( const char* p_inlocale )
{
char *p_outlocale;
- if ( (p_outlocale = setlocale(LC_ALL, p_inlocale)) == NULL )
+ if ( (p_outlocale = setlocale(LC_ALL, p_inlocale)) == nullptr )
{
fprintf( stderr, "I18N: Operating system doesn't support locale \"%s\"\n",
p_inlocale );
@@ -159,7 +159,7 @@ SetSystemEnvironment( const OUString& rLocale )
static Bool
IsPosixLocale( const char* p_locale )
{
- if ( p_locale == NULL )
+ if ( p_locale == nullptr )
return False;
if ( (p_locale[ 0 ] == 'C') && (p_locale[ 1 ] == '\0') )
return True;
@@ -174,7 +174,7 @@ IsPosixLocale( const char* p_locale )
static Bool
IsXWindowCompatibleLocale( const char* p_locale )
{
- if ( p_locale == NULL )
+ if ( p_locale == nullptr )
return False;
if ( !XSupportsLocale() )
@@ -222,7 +222,7 @@ SalI18N_InputMethod::SetLocale( const char* pLocale )
}
// must not fail if mbUseable since XSupportsLocale() asserts success
- if ( mbUseable && XSetLocaleModifiers("") == NULL )
+ if ( mbUseable && XSetLocaleModifiers("") == nullptr )
{
fprintf (stderr, "I18N: Can't set X modifiers for locale \"%s\"\n",
locale);
@@ -251,16 +251,16 @@ SalI18N_InputMethod::SalI18N_InputMethod( )
maDestroyCallback.callback = nullptr;
maDestroyCallback.client_data = nullptr;
const char *pUseInputMethod = getenv( "SAL_USEINPUTMETHOD" );
- if ( pUseInputMethod != NULL )
+ if ( pUseInputMethod != nullptr )
mbUseable = pUseInputMethod[0] != '\0' ;
}
SalI18N_InputMethod::~SalI18N_InputMethod()
{
vcl::I18NStatus::free();
- if ( mpStyles != NULL )
+ if ( mpStyles != nullptr )
XFree( mpStyles );
- if ( maMethod != NULL )
+ if ( maMethod != nullptr )
XCloseIM ( maMethod );
}
@@ -336,20 +336,20 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
{
if ( mbUseable )
{
- maMethod = XOpenIM(pDisplay, NULL, NULL, NULL);
+ maMethod = XOpenIM(pDisplay, nullptr, nullptr, nullptr);
- if ((maMethod == nullptr) && (getenv("XMODIFIERS") != NULL))
+ if ((maMethod == nullptr) && (getenv("XMODIFIERS") != nullptr))
{
OUString envVar("XMODIFIERS");
osl_clearEnvironment(envVar.pData);
XSetLocaleModifiers("");
- maMethod = XOpenIM(pDisplay, NULL, NULL, NULL);
+ maMethod = XOpenIM(pDisplay, nullptr, nullptr, nullptr);
}
if ( maMethod != nullptr )
{
if ( XGetIMValues(maMethod, XNQueryInputStyle, &mpStyles, NULL)
- != NULL)
+ != nullptr)
mbUseable = False;
#if OSL_DEBUG_LEVEL > 1
fprintf(stderr, "Creating Mono-Lingual InputMethod\n" );
@@ -369,7 +369,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
maDestroyCallback.callback = static_cast<XIMProc>(IM_IMDestroyCallback);
maDestroyCallback.client_data = reinterpret_cast<XPointer>(this);
- if (mbUseable && maMethod != NULL)
+ if (mbUseable && maMethod != nullptr)
XSetIMValues(maMethod, XNDestroyCallback, &maDestroyCallback, NULL);
return mbUseable;
@@ -415,7 +415,7 @@ void
SalI18N_InputMethod::HandleDestroyIM()
{
mbUseable = False;
- maMethod = NULL;
+ maMethod = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/app/i18n_keysym.cxx b/vcl/unx/generic/app/i18n_keysym.cxx
index 123f0ec74bef..880f46ef8d4b 100644
--- a/vcl/unx/generic/app/i18n_keysym.cxx
+++ b/vcl/unx/generic/app/i18n_keysym.cxx
@@ -339,13 +339,13 @@ KeysymToUnicode (KeySym nKeySym)
if (n_byte2 != 0)
return 0;
- keymap_t const* p_map = NULL;
+ keymap_t const* p_map = nullptr;
if (n_byte3 < INITIAL_KEYMAPS)
p_map = p_keymap[n_byte3];
else if (n_byte3 == 255)
p_map = &keymap255;
- if ((p_map != NULL) && (n_byte4 >= p_map->first) && (n_byte4 <= p_map->last) )
+ if ((p_map != nullptr) && (n_byte4 >= p_map->first) && (n_byte4 <= p_map->last) )
return p_map->map[n_byte4 - p_map->first];
}
diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx
index 82fc6774cf6a..207a4b4a6406 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -62,7 +62,7 @@ public:
}
StatusWindow::StatusWindow( WinBits nWinBits ) :
- WorkWindow( NULL, nWinBits )
+ WorkWindow( nullptr, nWinBits )
{
}
@@ -112,11 +112,11 @@ public:
XIMStatusWindow::XIMStatusWindow( bool bOn ) :
StatusWindow( WB_BORDER | WB_SYSTEMFLOATWIN | WB_TOOLTIPWIN ),
m_aStatusText(VclPtr<FixedText>::Create(this, 0)),
- m_pLastParent( NULL ),
+ m_pLastParent( nullptr ),
m_bAnchoredAtRight( false ),
m_bDelayedShow( false ),
m_eDelayedReason( I18NStatus::contextmap ),
- m_nDelayedEvent( 0 ),
+ m_nDelayedEvent( nullptr ),
m_bOn( bOn )
{
layout();
@@ -260,7 +260,7 @@ void XIMStatusWindow::setPosition( SalFrame* pParent )
IMPL_LINK_NOARG_TYPED(XIMStatusWindow, DelayedShowHdl, void*, void)
{
- m_nDelayedEvent = 0;
+ m_nDelayedEvent = nullptr;
const SystemEnvData* pData = GetSystemData();
SalFrame* pStatusFrame = static_cast<SalFrame*>(pData->pSalFrame);
if( m_bDelayedShow )
@@ -286,7 +286,7 @@ void XIMStatusWindow::show( bool bShow, I18NStatus::ShowReason eReason )
m_bDelayedShow = bShow;
m_eDelayedReason = eReason;
if( ! m_nDelayedEvent )
- m_nDelayedEvent = Application::PostUserEvent( LINK( this, XIMStatusWindow, DelayedShowHdl ), NULL, true );
+ m_nDelayedEvent = Application::PostUserEvent( LINK( this, XIMStatusWindow, DelayedShowHdl ), nullptr, true );
}
void XIMStatusWindow::setText( const OUString& rText )
@@ -455,7 +455,7 @@ void IIIMPStatusWindow::GetFocus()
XSync( static_cast<Display*>(pParentEnvData->pDisplay), False );
GetGenericData()->ErrorTrapPop();
}
- m_pResetFocus = NULL;
+ m_pResetFocus = nullptr;
}
}
@@ -493,7 +493,7 @@ IMPL_LINK_TYPED( IIIMPStatusWindow, SelectHdl, MenuButton*, pBtn, void )
* I18NStatus
*/
-I18NStatus* I18NStatus::pInstance = NULL;
+I18NStatus* I18NStatus::pInstance = nullptr;
I18NStatus& I18NStatus::get()
{
@@ -504,18 +504,18 @@ I18NStatus& I18NStatus::get()
bool I18NStatus::exists()
{
- return pInstance != NULL;
+ return pInstance != nullptr;
}
void I18NStatus::free()
{
if( pInstance )
- delete pInstance, pInstance = NULL;
+ delete pInstance, pInstance = nullptr;
}
I18NStatus::I18NStatus() :
- m_pParent( NULL ),
- m_pStatusWindow( NULL )
+ m_pParent( nullptr ),
+ m_pStatusWindow( nullptr )
{
}
@@ -523,7 +523,7 @@ I18NStatus::~I18NStatus()
{
m_pStatusWindow.disposeAndClear();
if( pInstance == this )
- pInstance = NULL;
+ pInstance = nullptr;
}
void I18NStatus::setParent( SalFrame* pParent )
@@ -588,7 +588,7 @@ void I18NStatus::setStatusText( const OUString& rText )
SalFrame* I18NStatus::getStatusFrame() const
{
- SalFrame* pRet = NULL;
+ SalFrame* pRet = nullptr;
if( m_pStatusWindow )
{
const SystemEnvData* pData = m_pStatusWindow->GetSystemData();
diff --git a/vcl/unx/generic/app/i18n_xkb.cxx b/vcl/unx/generic/app/i18n_xkb.cxx
index f9618f4d9826..aebca9f2c58f 100644
--- a/vcl/unx/generic/app/i18n_xkb.cxx
+++ b/vcl/unx/generic/app/i18n_xkb.cxx
@@ -38,11 +38,11 @@ SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
// setenv SAL_XKEYBOARDGROUP 2 sets the keyboard group index to 2
// keyboard group index must be in [1,4], may be specified in hex or decimal
static char *pUseKeyboardExtension = getenv( "SAL_XKEYBOARDGROUP" );
- if ( pUseKeyboardExtension != NULL )
+ if ( pUseKeyboardExtension != nullptr )
{
mbUseExtension = pUseKeyboardExtension[0] != '\0' ;
if ( mbUseExtension )
- mnDefaultGroup = strtol( pUseKeyboardExtension, NULL, 0 );
+ mnDefaultGroup = strtol( pUseKeyboardExtension, nullptr, 0 );
if ( mnDefaultGroup > XkbMaxKbdGroup )
mnDefaultGroup = 0;
}
diff --git a/vcl/unx/generic/app/randrwrapper.cxx b/vcl/unx/generic/app/randrwrapper.cxx
index 9509c195e71f..3e899e8c05a0 100644
--- a/vcl/unx/generic/app/randrwrapper.cxx
+++ b/vcl/unx/generic/app/randrwrapper.cxx
@@ -190,7 +190,7 @@ public:
}
XRRScreenConfiguration* XRRGetScreenInfo( Display* i_pDisp, Drawable i_aDrawable )
{
- return m_bValid ? ::XRRGetScreenInfo( i_pDisp, i_aDrawable ) : NULL;
+ return m_bValid ? ::XRRGetScreenInfo( i_pDisp, i_aDrawable ) : nullptr;
}
void XRRFreeScreenConfigInfo( XRRScreenConfiguration* i_pConfig )
{
@@ -208,7 +208,7 @@ public:
}
XRRScreenSize* XRRConfigSizes( XRRScreenConfiguration* i_pConfig, int* o_nSizes )
{
- return m_bValid ? ::XRRConfigSizes( i_pConfig, o_nSizes ) : NULL;
+ return m_bValid ? ::XRRConfigSizes( i_pConfig, o_nSizes ) : nullptr;
}
SizeID XRRConfigCurrentConfiguration( XRRScreenConfiguration* i_pConfig, Rotation* o_pRot )
{
@@ -228,7 +228,7 @@ RandRWrapper::RandRWrapper( Display* pDisplay ) :
m_bValid = false;
}
-static RandRWrapper* pWrapper = NULL;
+static RandRWrapper* pWrapper = nullptr;
RandRWrapper& RandRWrapper::get( Display* i_pDisplay )
{
@@ -240,7 +240,7 @@ RandRWrapper& RandRWrapper::get( Display* i_pDisplay )
void RandRWrapper::releaseWrapper()
{
delete pWrapper;
- pWrapper = NULL;
+ pWrapper = nullptr;
}
#endif
@@ -295,8 +295,8 @@ int SalDisplay::processRandREvent( XEvent* pEvent )
{
if( m_aScreens[i].m_bInit )
{
- XRRScreenConfiguration *pConfig = NULL;
- XRRScreenSize *pSizes = NULL;
+ XRRScreenConfiguration *pConfig = nullptr;
+ XRRScreenSize *pSizes = nullptr;
int nSizes = 0;
Rotation nRot = 0;
SizeID nId = 0;
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index 93285bdfe680..fc1e72dd4431 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -62,9 +62,9 @@
X11SalData* GetX11SalData()
{
SalData * p1 = ImplGetSVData()->mpSalData;
- OSL_ASSERT(p1 != 0);
+ OSL_ASSERT(p1 != nullptr);
X11SalData * p2 = dynamic_cast< X11SalData * >(p1);
- OSL_ASSERT(p2 != 0);
+ OSL_ASSERT(p2 != nullptr);
return p2;
}
@@ -88,7 +88,7 @@ static int XIOErrorHdl( Display * )
// really bad hack
if( ! SessionManagerClient::checkDocumentsSaved() )
- /* oslSignalAction eToDo = */ osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, NULL);
+ /* oslSignalAction eToDo = */ osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, nullptr);
}
std::fprintf( stderr, "X IO Error\n" );
@@ -110,7 +110,7 @@ static const struct timeval yield__ = { 0, 10000 };
static const char* XRequest[] = {
// see /usr/lib/X11/XErrorDB, /usr/openwin/lib/XErrorDB ...
- NULL,
+ nullptr,
"X_CreateWindow",
"X_ChangeWindowAttributes",
"X_GetWindowAttributes",
@@ -230,21 +230,21 @@ static const char* XRequest[] = {
"X_GetPointerMapping",
"X_SetModifierMapping",
"X_GetModifierMapping",
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
"X_NoOperation"
};
X11SalData::X11SalData( SalGenericDataType t, SalInstance *pInstance )
: SalGenericData( t, pInstance )
{
- pXLib_ = NULL;
- m_pPlugin = NULL;
+ pXLib_ = nullptr;
+ m_pPlugin = nullptr;
m_aOrigXIOErrorHandler = XSetIOErrorHandler ( XIOErrorHdl );
PushXErrorLevel( !!getenv( "SAL_IGNOREXERRORS" ) );
@@ -261,15 +261,15 @@ void X11SalData::Dispose()
{
deInitNWF();
delete GetDisplay();
- SetSalData( NULL );
+ SetSalData( nullptr );
}
void X11SalData::DeleteDisplay()
{
delete GetDisplay();
- SetDisplay( NULL );
+ SetDisplay( nullptr );
delete pXLib_;
- pXLib_ = NULL;
+ pXLib_ = nullptr;
}
void X11SalData::Init()
@@ -490,7 +490,7 @@ void X11SalData::XError( Display *pDisplay, XErrorEvent *pEvent )
PrintXError( pDisplay, pEvent );
- oslSignalAction eToDo = osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, NULL);
+ oslSignalAction eToDo = osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, nullptr);
switch (eToDo)
{
case osl_Signal_ActIgnore :
@@ -572,7 +572,7 @@ bool SalXLib::CheckTimeout( bool bExecuteTimers )
if( m_aTimeout.tv_sec ) // timer is started
{
timeval aTimeOfDay;
- gettimeofday( &aTimeOfDay, 0 );
+ gettimeofday( &aTimeOfDay, nullptr );
if( aTimeOfDay >= m_aTimeout )
{
bRet = true;
@@ -612,7 +612,7 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
blockIdleTimeout = !bWait;
// check for timeouts here if you want to make screenshots
static char* p_prioritize_timer = getenv ("SAL_HIGHPRIORITY_REPAINT");
- if (p_prioritize_timer != NULL)
+ if (p_prioritize_timer != nullptr)
CheckTimeout();
const int nMaxEvents = bHandleAllCurrentEvents ? 100 : 1;
@@ -647,11 +647,11 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
if (bWait)
{
- pTimeout = 0;
+ pTimeout = nullptr;
if (m_aTimeout.tv_sec) // Timer is started.
{
// determine remaining timeout.
- gettimeofday (&Timeout, 0);
+ gettimeofday (&Timeout, nullptr);
Timeout = m_aTimeout - Timeout;
if (yield__ >= Timeout)
{
@@ -665,7 +665,7 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
// release YieldMutex (and re-acquire at block end)
SalYieldMutexReleaser aReleaser;
- nFound = select( nFDs, &ReadFDS, NULL, &ExceptionFDS, pTimeout );
+ nFound = select( nFDs, &ReadFDS, nullptr, &ExceptionFDS, pTimeout );
}
if( nFound < 0 ) // error
{
@@ -679,7 +679,7 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
}
// usually handle timeouts here (as in 5.2)
- if (p_prioritize_timer == NULL)
+ if (p_prioritize_timer == nullptr)
CheckTimeout();
// handle wakeup events.
@@ -698,7 +698,7 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
// recall select if we have acquired fd's, ready for reading,
struct timeval noTimeout = { 0, 0 };
- nFound = select( nFDs_, &ReadFDS, NULL,
+ nFound = select( nFDs_, &ReadFDS, nullptr,
&ExceptionFDS, &noTimeout );
// someone-else has done the job for us
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 7510addf0681..b86fa3792bf6 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -163,7 +163,7 @@ sal_GetServerVendor( Display *p_display )
const vendor_t p_vendorlist[] = {
{ vendor_sun, "Sun Microsystems, Inc.", 10 },
// always the last entry: vendor_none to indicate eol
- { vendor_none, NULL, 0 },
+ { vendor_none, nullptr, 0 },
};
// handle regular server vendors
@@ -253,10 +253,10 @@ bool SalDisplay::BestVisual( Display *pDisplay,
}
SalDisplay::SalDisplay( Display *display ) :
- pXLib_( NULL ),
- mpInputMethod( NULL ),
- mpKbdExtension( NULL ),
- mpFactory( NULL ),
+ pXLib_( nullptr ),
+ mpInputMethod( nullptr ),
+ mpKbdExtension( nullptr ),
+ mpFactory( nullptr ),
pDisp_( display ),
m_nXDefaultScreen( 0 ),
nMaxRequestSize_( 0 ),
@@ -267,7 +267,7 @@ SalDisplay::SalDisplay( Display *display ) :
nShiftKeySym_( 0 ),
nCtrlKeySym_( 0 ),
nMod1KeySym_( 0 ),
- m_pWMAdaptor( NULL ),
+ m_pWMAdaptor( nullptr ),
m_bXinerama( false ),
m_bUseRandRWrapper( true ),
m_nLastUserEventTime( CurrentTime )
@@ -294,7 +294,7 @@ SalDisplay::~SalDisplay()
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "display %p closed\n", pDisp_ );
#endif
- pDisp_ = NULL;
+ pDisp_ = nullptr;
}
// don't do this in doDestruct since RandR extension adds hooks into Display
// that is XCloseDisplay still needs the RandR library if it was used
@@ -306,14 +306,14 @@ void SalDisplay::doDestruct()
SalGenericData *pData = GetGenericData();
delete m_pWMAdaptor;
- m_pWMAdaptor = NULL;
+ m_pWMAdaptor = nullptr;
X11SalBitmap::ImplDestroyCache();
X11SalGraphics::releaseGlyphPeer();
if( IsDisplay() )
{
- delete mpInputMethod, mpInputMethod = NULL;
- delete mpKbdExtension, mpKbdExtension = NULL;
+ delete mpInputMethod, mpInputMethod = nullptr;
+ delete mpKbdExtension, mpKbdExtension = nullptr;
for( size_t i = 0; i < m_aScreens.size(); i++ )
{
@@ -346,7 +346,7 @@ void SalDisplay::doDestruct()
}
if( pData->GetDisplay() == static_cast<const SalGenericDisplay *>( this ) )
- pData->SetDisplay( NULL );
+ pData->SetDisplay( nullptr );
}
static int DisplayHasEvent( int fd, SalX11Display *pDisplay )
@@ -412,7 +412,7 @@ SalX11Display::~SalX11Display()
{
doDestruct();
XCloseDisplay( pDisp_ );
- pDisp_ = NULL;
+ pDisp_ = nullptr;
}
}
@@ -429,7 +429,7 @@ SalDisplay::initScreen( SalX11Screen nXScreen ) const
nXScreen = m_nXDefaultScreen;
ScreenData* pSD = const_cast<ScreenData *>(&m_aScreens[nXScreen.getXScreen()]);
if( pSD->m_bInit )
- return NULL;
+ return nullptr;
pSD->m_bInit = true;
XVisualInfo aVI;
@@ -571,7 +571,7 @@ void SalDisplay::Init()
* it is what modern desktops use.
*/
const char* pValStr = XGetDefault( pDisp_, "Xft", "dpi" );
- if( pValStr != NULL )
+ if( pValStr != nullptr )
{
const OString aValStr( pValStr );
const long nDPI = (long) aValStr.toDouble();
@@ -1397,13 +1397,13 @@ KeySym SalDisplay::GetKeySym( XKeyEvent *pEvent,
*pStatusReturn = 0;
// first get the printable of the possibly modified KeySym
- if ( (aInputContext == 0)
+ if ( (aInputContext == nullptr)
|| (pEvent->type == KeyRelease)
- || (mpInputMethod != NULL && mpInputMethod->PosixLocale()) )
+ || (mpInputMethod != nullptr && mpInputMethod->PosixLocale()) )
{
// XmbLookupString must not be called for KeyRelease events
// Cannot enter space in c locale problem #89616# #88978# btraq #4478197
- *pLen = XLookupString( pEvent, reinterpret_cast<char*>(pPrintable), 1, &nKeySym, NULL );
+ *pLen = XLookupString( pEvent, reinterpret_cast<char*>(pPrintable), 1, &nKeySym, nullptr );
}
else
{
@@ -1840,14 +1840,14 @@ int SalDisplay::CaptureMouse( SalFrame *pCapture )
if( !pCapture )
{
- m_pCapture = NULL;
+ m_pCapture = nullptr;
if( !pEnv || !*pEnv )
XUngrabPointer( GetDisplay(), CurrentTime );
XFlush( GetDisplay() );
return 0;
}
- m_pCapture = NULL;
+ m_pCapture = nullptr;
// FIXME: get rid of X11SalFrame
const SystemEnvData* pEnvData = pCapture->GetSystemData();
@@ -1957,7 +1957,7 @@ bool SalX11Display::Dispatch( XEvent *pEvent )
{
std::list< SalFrame* >::const_iterator it;
for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it )
- (*it)->CallCallback( SALEVENT_SETTINGSCHANGED, NULL );
+ (*it)->CallCallback( SALEVENT_SETTINGSCHANGED, nullptr );
return false;
}
}
@@ -2021,8 +2021,8 @@ void SalDisplay::DbgPrintDisplayEvent(const char *pComment, XEvent *pEvent) cons
{
static const char* const EventNames[] =
{
- NULL,
- NULL,
+ nullptr,
+ nullptr,
"KeyPress",
"KeyRelease",
"ButtonPress",
@@ -2564,7 +2564,7 @@ SalColormap::SalColormap()
m_nWhitePixel( 1 ),
m_nBlackPixel( 0 ),
m_nUsed( 2 ),
- m_nXScreen( m_pDisplay != NULL ? m_pDisplay->GetDefaultXScreen() : SalX11Screen( 0 ) )
+ m_nXScreen( m_pDisplay != nullptr ? m_pDisplay->GetDefaultXScreen() : SalX11Screen( 0 ) )
{
m_aPalette = std::vector<SalColor>(m_nUsed);
@@ -2639,7 +2639,7 @@ SalColormap::SalColormap( sal_uInt16 nDepth )
aVI.colormap_size = 0;
aVI.bits_per_rgb = 8;
- aVI.visual->ext_data = NULL;
+ aVI.visual->ext_data = nullptr;
aVI.visual->visualid = aVI.visualid;
aVI.visual->c_class = aVI.c_class;
aVI.visual->red_mask = aVI.red_mask;
@@ -2663,7 +2663,7 @@ SalColormap::~SalColormap()
{
#ifdef DBG_UTIL
m_hColormap = None;
- m_pDisplay = NULL;
+ m_pDisplay = nullptr;
#endif
}
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index ca469dc948b5..057b9894c504 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -176,7 +176,7 @@ SalFrame *X11SalInstance::CreateFrame( SalFrame *pParent, SalFrameStyleFlags nSa
SalFrame* X11SalInstance::CreateChildFrame( SystemParentData* pParentData, SalFrameStyleFlags nStyle )
{
- SalFrame* pFrame = new X11SalFrame( NULL, nStyle, pParentData );
+ SalFrame* pFrame = new X11SalFrame( nullptr, nStyle, pParentData );
return pFrame;
}
@@ -192,7 +192,7 @@ void X11SalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUS
{
typedef void (*PFUNC_ADD_TO_RECENTLY_USED_LIST)(const OUString&, const OUString&, const OUString&);
- PFUNC_ADD_TO_RECENTLY_USED_LIST add_to_recently_used_file_list = 0;
+ PFUNC_ADD_TO_RECENTLY_USED_LIST add_to_recently_used_file_list = nullptr;
osl::Module module;
module.loadRelative( &thisModule, "librecentfile.so" );
@@ -208,7 +208,7 @@ void X11SalInstance::PostPrintersChanged()
const std::list< SalFrame* >& rList = pDisp->getFrames();
for( std::list< SalFrame* >::const_iterator it = rList.begin();
it != rList.end(); ++it )
- pDisp->SendInternalEvent( *it, NULL, SALEVENT_PRINTERCHANGED );
+ pDisp->SendInternalEvent( *it, nullptr, SALEVENT_PRINTERCHANGED );
}
GenPspGraphics *X11SalInstance::CreatePrintGraphics()
diff --git a/vcl/unx/generic/app/saltimer.cxx b/vcl/unx/generic/app/saltimer.cxx
index 1de121f9907f..604f4acf6ee0 100644
--- a/vcl/unx/generic/app/saltimer.cxx
+++ b/vcl/unx/generic/app/saltimer.cxx
@@ -45,7 +45,7 @@ void SalXLib::StopTimer()
void SalXLib::StartTimer( sal_uLong nMS )
{
timeval Timeout (m_aTimeout); // previous timeout.
- gettimeofday (&m_aTimeout, 0);
+ gettimeofday (&m_aTimeout, nullptr);
m_nTimeoutMS = nMS;
m_aTimeout += m_nTimeoutMS;
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx
index f8d1c3f05118..e179ea94b2a7 100644
--- a/vcl/unx/generic/app/sm.cxx
+++ b/vcl/unx/generic/app/sm.cxx
@@ -123,12 +123,12 @@ public:
osl::Mutex m_ICEMutex;
ICEConnectionObserver()
- : m_pFilehandles(NULL)
+ : m_pFilehandles(nullptr)
, m_nConnections(0)
- , m_pConnections(NULL)
- , m_ICEThread(NULL)
- , m_origIOErrorHandler(NULL)
- , m_origErrorHandler(NULL)
+ , m_pConnections(nullptr)
+ , m_ICEThread(nullptr)
+ , m_origIOErrorHandler(nullptr)
+ , m_origErrorHandler(nullptr)
{
m_nWakeupFiles[0] = m_nWakeupFiles[1] = 0;
}
@@ -138,10 +138,10 @@ public:
void terminate(oslThread iceThread);
};
-SalSession * SessionManagerClient::m_pSession = NULL;
+SalSession * SessionManagerClient::m_pSession = nullptr;
std::unique_ptr< ICEConnectionObserver >
SessionManagerClient::m_xICEConnectionObserver;
-SmcConn SessionManagerClient::m_pSmcConnection = NULL;
+SmcConn SessionManagerClient::m_pSmcConnection = nullptr;
OString SessionManagerClient::m_aClientID;
bool SessionManagerClient::m_bDocSaveDone = false; // HACK
@@ -158,10 +158,10 @@ static void IgnoreIceIOErrors(SAL_UNUSED_PARAMETER IceConn) {}
}
-static SmProp* pSmProps = NULL;
-static SmProp** ppSmProps = NULL;
+static SmProp* pSmProps = nullptr;
+static SmProp** ppSmProps = nullptr;
static int nSmProps = 0;
-static unsigned char *pSmRestartHint = NULL;
+static unsigned char *pSmRestartHint = nullptr;
static void BuildSmPropertyList()
{
@@ -333,7 +333,7 @@ void SessionManagerClient::SaveYourselfProc(
}
// Smuggle argument in as void*:
sal_uIntPtr nStateVal = shutdown;
- Application::PostUserEvent( LINK( 0, SessionManagerClient, SaveYourselfHdl ), reinterpret_cast< void * >(nStateVal) );
+ Application::PostUserEvent( LINK( nullptr, SessionManagerClient, SaveYourselfHdl ), reinterpret_cast< void * >(nStateVal) );
SAL_INFO("vcl.sm", "waiting for save yourself event to be processed" );
}
@@ -348,7 +348,7 @@ IMPL_STATIC_LINK_NOARG_TYPED( SessionManagerClient, ShutDownHdl, void*, void )
const std::list< SalFrame* >& rFrames = vcl_sal::getSalDisplay(GetGenericData())->getFrames();
SAL_INFO("vcl.sm", (!rFrames.empty() ? "shutdown on first frame" : "shutdown event but no frame"));
if( !rFrames.empty() )
- rFrames.front()->CallCallback( SALEVENT_SHUTDOWN, 0 );
+ rFrames.front()->CallCallback( SALEVENT_SHUTDOWN, nullptr );
}
void SessionManagerClient::DieProc(
@@ -359,7 +359,7 @@ void SessionManagerClient::DieProc(
SAL_INFO("vcl.sm", "Session: die");
if( connection == m_pSmcConnection )
{
- Application::PostUserEvent( LINK( NULL, SessionManagerClient, ShutDownHdl ) );
+ Application::PostUserEvent( LINK( nullptr, SessionManagerClient, ShutDownHdl ) );
SAL_INFO("vcl.sm", "waiting for shutdown event to be processed" );
}
}
@@ -378,7 +378,7 @@ void SessionManagerClient::ShutdownCanceledProc(
{
SAL_INFO("vcl.sm", "Session: shutdown canceled" );
if( connection == m_pSmcConnection )
- Application::PostUserEvent( LINK( NULL, SessionManagerClient, ShutDownCancelHdl ) );
+ Application::PostUserEvent( LINK( nullptr, SessionManagerClient, ShutDownCancelHdl ) );
}
void SessionManagerClient::InteractProc(
@@ -387,7 +387,7 @@ void SessionManagerClient::InteractProc(
{
SAL_INFO("vcl.sm", "Session: interaction request completed" );
if( connection == m_pSmcConnection )
- Application::PostUserEvent( LINK( NULL, SessionManagerClient, InteractionHdl ) );
+ Application::PostUserEvent( LINK( nullptr, SessionManagerClient, InteractionHdl ) );
}
void SessionManagerClient::saveDone()
@@ -419,18 +419,18 @@ void SessionManagerClient::open(SalSession * pSession)
static SmcCallbacks aCallbacks; // does this need to be static?
aCallbacks.save_yourself.callback = SaveYourselfProc;
- aCallbacks.save_yourself.client_data = NULL;
+ aCallbacks.save_yourself.client_data = nullptr;
aCallbacks.die.callback = DieProc;
- aCallbacks.die.client_data = NULL;
+ aCallbacks.die.client_data = nullptr;
aCallbacks.save_complete.callback = SaveCompleteProc;
- aCallbacks.save_complete.client_data = NULL;
+ aCallbacks.save_complete.client_data = nullptr;
aCallbacks.shutdown_cancelled.callback = ShutdownCanceledProc;
- aCallbacks.shutdown_cancelled.client_data = NULL;
+ aCallbacks.shutdown_cancelled.client_data = nullptr;
OString aPrevId(getPreviousSessionID());
- char* pClientID = NULL;
+ char* pClientID = nullptr;
char aErrBuf[1024];
- m_pSmcConnection = SmcOpenConnection( NULL,
- NULL,
+ m_pSmcConnection = SmcOpenConnection( nullptr,
+ nullptr,
SmProtoMajor,
SmProtoMinor,
SmcSaveYourselfProcMask |
@@ -438,7 +438,7 @@ void SessionManagerClient::open(SalSession * pSession)
SmcSaveCompleteProcMask |
SmcShutdownCancelledProcMask ,
&aCallbacks,
- aPrevId.isEmpty() ? NULL : const_cast<char*>(aPrevId.getStr()),
+ aPrevId.isEmpty() ? nullptr : const_cast<char*>(aPrevId.getStr()),
&pClientID,
sizeof( aErrBuf ),
aErrBuf );
@@ -448,7 +448,7 @@ void SessionManagerClient::open(SalSession * pSession)
SAL_INFO("vcl.sm", "SmcOpenConnection succeeded, client ID is " << pClientID );
m_aClientID = OString(pClientID);
free( pClientID );
- pClientID = NULL;
+ pClientID = nullptr;
}
SalDisplay* pDisp = vcl_sal::getSalDisplay(GetGenericData());
@@ -484,12 +484,12 @@ void SessionManagerClient::close()
{
osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex);
SAL_INFO("vcl.sm", "attempting SmcCloseConnection");
- SmcCloseConnection( m_pSmcConnection, 0, NULL );
+ SmcCloseConnection( m_pSmcConnection, 0, nullptr );
SAL_INFO("vcl.sm", "SmcConnection closed");
}
m_xICEConnectionObserver->deactivate();
m_xICEConnectionObserver.reset();
- m_pSmcConnection = NULL;
+ m_pSmcConnection = nullptr;
}
}
@@ -500,7 +500,7 @@ bool SessionManagerClient::queryInteraction()
{
assert(m_xICEConnectionObserver);
osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex);
- if( SmcInteractRequest( m_pSmcConnection, SmDialogNormal, InteractProc, NULL ) )
+ if( SmcInteractRequest( m_pSmcConnection, SmDialogNormal, InteractProc, nullptr ) )
bRet = true;
}
return bRet;
@@ -570,7 +570,7 @@ void ICEConnectionObserver::deactivate()
IceSetIOErrorHandler( m_origIOErrorHandler );
m_nConnections = 0;
t = m_ICEThread;
- m_ICEThread = NULL;
+ m_ICEThread = nullptr;
}
if (t)
{
@@ -604,7 +604,7 @@ void ICEConnectionWorker(void * data)
oslThread t;
{
osl::MutexGuard g(pThis->m_ICEMutex);
- if (pThis->m_ICEThread == NULL || pThis->m_nConnections == 0)
+ if (pThis->m_ICEThread == nullptr || pThis->m_nConnections == 0)
{
break;
}
@@ -654,7 +654,7 @@ void ICEConnectionWorker(void * data)
Bool bReply;
for( int i = 0; i < pThis->m_nConnections; i++ )
if( pThis->m_pFilehandles[i+1].revents & POLLIN )
- IceProcessMessages( pThis->m_pConnections[i], NULL, &bReply );
+ IceProcessMessages( pThis->m_pConnections[i], nullptr, &bReply );
}
}
}
@@ -734,7 +734,7 @@ void ICEWatchProc(
{
SAL_INFO("vcl.sm", "terminating ICEThread");
oslThread t = pThis->m_ICEThread;
- pThis->m_ICEThread = NULL;
+ pThis->m_ICEThread = nullptr;
// must release the mutex here
pThis->m_ICEMutex.release();
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 3822d09beaae..2f8d250a2bd3 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -56,7 +56,7 @@ public:
virtual void setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const override;
virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const override;
virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const override;
- virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame = NULL ) const override;
+ virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame = nullptr ) const override;
virtual void enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const override;
virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const override;
virtual void showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const override;
@@ -176,12 +176,12 @@ static int compareProtocol( const void* pLeft, const void* pRight )
WMAdaptor* WMAdaptor::createWMAdaptor( SalDisplay* pSalDisplay )
{
- WMAdaptor* pAdaptor = NULL;
+ WMAdaptor* pAdaptor = nullptr;
// try a NetWM
pAdaptor = new NetWMAdaptor( pSalDisplay );
if( ! pAdaptor->isValid() )
- delete pAdaptor, pAdaptor = NULL;
+ delete pAdaptor, pAdaptor = nullptr;
#if OSL_DEBUG_LEVEL > 1
else
fprintf( stderr, "WM supports extended WM hints\n" );
@@ -192,7 +192,7 @@ WMAdaptor* WMAdaptor::createWMAdaptor( SalDisplay* pSalDisplay )
{
pAdaptor = new GnomeWMAdaptor( pSalDisplay );
if( ! pAdaptor->isValid() )
- delete pAdaptor, pAdaptor = NULL;
+ delete pAdaptor, pAdaptor = nullptr;
#if OSL_DEBUG_LEVEL > 1
else
fprintf( stderr, "WM supports GNOME WM hints\n" );
@@ -228,7 +228,7 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
// default desktops
m_nDesktops = 1;
@@ -336,7 +336,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
initAtoms();
@@ -361,7 +361,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
// collect supported protocols
if( XGetWindowProperty( m_pDisplay,
@@ -388,7 +388,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
for( unsigned long i = 0; i < nItems; i++ )
{
// #i80971# protect against invalid atoms
- if( pAtomNames[i] == NULL )
+ if( pAtomNames[i] == nullptr )
continue;
WMAdaptorProtocol aSearch;
@@ -412,12 +412,12 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
}
}
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
// get number of desktops
@@ -438,7 +438,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
{
m_nDesktops = *reinterpret_cast<long*>(pProperty);
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
// get work areas
if( m_aWMAtoms[ NET_WORKAREA ]
&& XGetWindowProperty( m_pDisplay,
@@ -487,20 +487,20 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
if( pProperty )
{
XFree(pProperty);
- pProperty = NULL;
+ pProperty = nullptr;
}
}
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
@@ -526,7 +526,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
initAtoms();
@@ -552,7 +552,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
{
aWMChild = *reinterpret_cast< ::Window* >(pProperty);
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
::Window aCheckWindow = None;
GetGenericData()->ErrorTrapPush();
if( XGetWindowProperty( m_pDisplay,
@@ -576,7 +576,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
aCheckWindow = *reinterpret_cast< ::Window* >(pProperty);
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
if( aCheckWindow == aWMChild )
{
m_bValid = true;
@@ -597,7 +597,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
if( m_bValid
@@ -619,7 +619,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
// collect supported protocols
if( XGetWindowProperty( m_pDisplay,
@@ -646,7 +646,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
for( unsigned long i = 0; i < nItems; i++ )
{
// #i80971# protect against invalid atoms
- if( pAtomNames[i] == NULL )
+ if( pAtomNames[i] == nullptr )
continue;
WMAdaptorProtocol aSearch;
@@ -676,12 +676,12 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
}
}
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
// get number of desktops
@@ -702,18 +702,18 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
{
m_nDesktops = *reinterpret_cast<long*>(pProperty);
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
@@ -733,7 +733,7 @@ bool WMAdaptor::getNetWmName()
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
bool bNetWM = false;
if( m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] && m_aWMAtoms[ NET_WM_NAME ] )
@@ -757,7 +757,7 @@ bool WMAdaptor::getNetWmName()
{
aWMChild = *reinterpret_cast< ::Window* >(pProperty);
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
::Window aCheckWindow = None;
GetGenericData()->ErrorTrapPush();
if( XGetWindowProperty( m_pDisplay,
@@ -780,7 +780,7 @@ bool WMAdaptor::getNetWmName()
GetGenericData()->ErrorTrapPush();
aCheckWindow = *reinterpret_cast< ::Window* >(pProperty);
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
if( aCheckWindow == aWMChild )
{
bNetWM = true;
@@ -806,12 +806,12 @@ bool WMAdaptor::getNetWmName()
m_aWMName = OUString( reinterpret_cast<char*>(pProperty), nItems, RTL_TEXTENCODING_ISO_8859_1 );
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
// if this is metacity, check for version to enable a legacy workaround
@@ -842,7 +842,7 @@ bool WMAdaptor::getNetWmName()
if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
if( nVersionMajor < 2 || (nVersionMajor == 2 && nVersionMinor < 12) )
@@ -855,7 +855,7 @@ bool WMAdaptor::getNetWmName()
if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
GetGenericData()->ErrorTrapPush();
}
@@ -866,7 +866,7 @@ bool WMAdaptor::getNetWmName()
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
return bNetWM;
@@ -977,7 +977,7 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const
osl_getThreadTextEncoding()));
OString aWMLocale;
- rtl_Locale* pLocale = NULL;
+ rtl_Locale* pLocale = nullptr;
osl_getProcessLocale( &pLocale );
if( pLocale )
{
@@ -993,7 +993,7 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const
static bool bTrustXmb = true;
char* pT = const_cast<char*>(aTitle.getStr());
- XTextProperty aProp = { NULL, None, 0, 0 };
+ XTextProperty aProp = { nullptr, None, 0, 0 };
if( bTrustXmb )
{
XmbTextListToTextProperty( m_pDisplay,
@@ -1032,7 +1032,7 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const
PropModeReplace,
reinterpret_cast<unsigned char const *>(aWMLocale.getStr()),
aWMLocale.getLength() );
- if (aProp.value != NULL)
+ if (aProp.value != nullptr)
XFree( aProp.value );
}
@@ -1797,7 +1797,7 @@ int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEv
Atom nType, *pStates;
int nFormat;
unsigned long nItems, nBytesLeft;
- unsigned char* pData = NULL;
+ unsigned char* pData = nullptr;
long nOffset = 0;
do
{
@@ -1827,7 +1827,7 @@ int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEv
}
}
XFree( pData );
- pData = NULL;
+ pData = nullptr;
nOffset += nItems * nFormat / 32;
}
else
@@ -1874,7 +1874,7 @@ int GnomeWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* p
int nFormat = 0;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pData = 0;
+ unsigned char* pData = nullptr;
XGetWindowProperty( m_pDisplay,
pEvent->window,
m_aWMAtoms[ WIN_STATE ],
@@ -2090,7 +2090,7 @@ void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const
pFrame->maGeometry.nWidth = aSize.Width();
pFrame->maGeometry.nHeight = aSize.Height();
}
- pFrame->CallCallback( SALEVENT_MOVERESIZE, NULL );
+ pFrame->CallCallback( SALEVENT_MOVERESIZE, nullptr );
}
}
else WMAdaptor::showFullScreen( pFrame, bFullScreen );
@@ -2109,7 +2109,7 @@ int WMAdaptor::getCurrentWorkArea() const
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
if( XGetWindowProperty( m_pDisplay,
m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultXScreen() ),
m_aWMAtoms[ NET_CURRENT_DESKTOP ],
@@ -2130,7 +2130,7 @@ int WMAdaptor::getCurrentWorkArea() const
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
return nCurrent;
@@ -2148,7 +2148,7 @@ int WMAdaptor::getWindowWorkArea( ::Window aWindow ) const
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
if( XGetWindowProperty( m_pDisplay,
aWindow,
m_aWMAtoms[ NET_WM_DESKTOP ],
@@ -2169,7 +2169,7 @@ int WMAdaptor::getWindowWorkArea( ::Window aWindow ) const
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
return nCurrent;
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
index f769bf075438..3c8f8bfdb218 100644
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
@@ -40,7 +40,7 @@ static bool is_gnome_desktop( Display* pDisplay )
// warning: these checks are coincidental, GNOME does not
// explicitly advertise itself
- if ( NULL != getenv( "GNOME_DESKTOP_SESSION_ID" ) )
+ if ( nullptr != getenv( "GNOME_DESKTOP_SESSION_ID" ) )
ret = true;
if( ! ret )
@@ -71,7 +71,7 @@ static bool is_gnome_desktop( Display* pDisplay )
if( nUTFAtom && nNetWMNameAtom )
{
// another, more expensive check: search for a gnome-panel
- ::Window aRoot, aParent, *pChildren = NULL;
+ ::Window aRoot, aParent, *pChildren = nullptr;
unsigned int nChildren = 0;
XQueryTree( pDisplay, DefaultRootWindow( pDisplay ),
&aRoot, &aParent, &pChildren, &nChildren );
@@ -82,7 +82,7 @@ static bool is_gnome_desktop( Display* pDisplay )
Atom nType = None;
int nFormat = 0;
unsigned long nItems = 0, nBytes = 0;
- unsigned char* pProp = NULL;
+ unsigned char* pProp = nullptr;
XGetWindowProperty( pDisplay,
pChildren[i],
nNetWMNameAtom,
@@ -152,7 +152,7 @@ static int TDEVersion( Display* pDisplay )
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
XGetWindowProperty( pDisplay,
DefaultRootWindow( pDisplay ),
nTDEVersion,
@@ -171,7 +171,7 @@ static int TDEVersion( Display* pDisplay )
if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
return nRet;
@@ -193,7 +193,7 @@ static int KDEVersion( Display* pDisplay )
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
XGetWindowProperty( pDisplay,
DefaultRootWindow( pDisplay ),
nKDEVersion,
@@ -212,7 +212,7 @@ static int KDEVersion( Display* pDisplay )
if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
return nRet;
@@ -220,7 +220,7 @@ static int KDEVersion( Display* pDisplay )
static bool is_tde_desktop( Display* pDisplay )
{
- if ( NULL != getenv( "TDE_FULL_SESSION" ) )
+ if ( nullptr != getenv( "TDE_FULL_SESSION" ) )
{
return true; // TDE
}
@@ -381,7 +381,7 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
XInitThreads();
Display* pDisplay = XOpenDisplay( pDisplayStr );
- if( pDisplay == NULL )
+ if( pDisplay == nullptr )
return DESKTOP_NONE;
XErrorHandler pOldHdl = XSetErrorHandler( autodect_error_handler );
diff --git a/vcl/unx/generic/dtrans/X11_droptarget.cxx b/vcl/unx/generic/dtrans/X11_droptarget.cxx
index 98fcb7e9dcef..23e590a73f67 100644
--- a/vcl/unx/generic/dtrans/X11_droptarget.cxx
+++ b/vcl/unx/generic/dtrans/X11_droptarget.cxx
@@ -36,7 +36,7 @@ DropTarget::DropTarget() :
m_bActive( false ),
m_nDefaultActions( 0 ),
m_aTargetWindow( None ),
- m_pSelectionManager( NULL )
+ m_pSelectionManager( nullptr )
{
}
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index c42ca79ff33e..c3b6d3ad72b7 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -209,9 +209,9 @@ std::unordered_map< OUString, SelectionManager*, OUStringHash >& SelectionManage
SelectionManager::SelectionManager() :
m_nIncrementalThreshold( 15*1024 ),
- m_pDisplay( NULL ),
- m_aThread( NULL ),
- m_aDragExecuteThread( NULL ),
+ m_pDisplay( nullptr ),
+ m_aThread( nullptr ),
+ m_aDragExecuteThread( nullptr ),
m_aWindow( None ),
m_nSelectionTimeout( 0 ),
m_nSelectionTimestamp( CurrentTime ),
@@ -354,7 +354,7 @@ void SelectionManager::initialize( const Sequence< Any >& arguments ) throw (::c
OString aDisplayName( OUStringToOString( aUDisplay, RTL_TEXTENCODING_ISO_8859_1 ) );
- m_pDisplay = XOpenDisplay( aDisplayName.isEmpty() ? NULL : aDisplayName.getStr());
+ m_pDisplay = XOpenDisplay( aDisplayName.isEmpty() ? nullptr : aDisplayName.getStr());
if( m_pDisplay )
{
@@ -485,7 +485,7 @@ SelectionManager::~SelectionManager()
{
osl_terminateThread( m_aDragExecuteThread );
osl_joinWithThread( m_aDragExecuteThread );
- m_aDragExecuteThread = NULL;
+ m_aDragExecuteThread = nullptr;
// thread handle is freed in dragDoDispatch()
}
@@ -524,7 +524,7 @@ SelectionAdaptor* SelectionManager::getAdaptor( Atom selection )
{
std::unordered_map< Atom, Selection* >::iterator it =
m_aSelections.find( selection );
- return it != m_aSelections.end() ? it->second->m_pAdaptor : NULL;
+ return it != m_aSelections.end() ? it->second->m_pAdaptor : nullptr;
}
OUString SelectionManager::convertFromCompound( const char* pText, int nLen )
@@ -534,7 +534,7 @@ OUString SelectionManager::convertFromCompound( const char* pText, int nLen )
if( nLen < 0 )
nLen = strlen( pText );
- char** pTextList = NULL;
+ char** pTextList = nullptr;
int nTexts = 0;
XTextProperty aProp;
@@ -560,7 +560,7 @@ OString SelectionManager::convertToCompound( const OUString& rText )
{
osl::MutexGuard aGuard( m_aMutex );
XTextProperty aProp;
- aProp.value = NULL;
+ aProp.value = nullptr;
aProp.encoding = XA_STRING;
aProp.format = 8;
aProp.nitems = 0;
@@ -679,7 +679,7 @@ SelectionManager& SelectionManager::get( const OUString& rDisplayName )
OUString aDisplayName( rDisplayName );
if( aDisplayName.isEmpty() )
aDisplayName = OStringToOUString( getenv( "DISPLAY" ), RTL_TEXTENCODING_ISO_8859_1 );
- SelectionManager* pInstance = NULL;
+ SelectionManager* pInstance = nullptr;
std::unordered_map< OUString, SelectionManager*, OUStringHash >::iterator it = getInstances().find( aDisplayName );
if( it != getInstances().end() )
@@ -696,7 +696,7 @@ const OUString& SelectionManager::getString( Atom aAtom )
if( m_aAtomToString.find( aAtom ) == m_aAtomToString.end() )
{
static OUString aEmpty;
- char* pAtom = m_pDisplay ? XGetAtomName( m_pDisplay, aAtom ) : NULL;
+ char* pAtom = m_pDisplay ? XGetAtomName( m_pDisplay, aAtom ) : nullptr;
if( ! pAtom )
return aEmpty;
OUString aString( OStringToOUString( pAtom, RTL_TEXTENCODING_ISO_8859_1 ) );
@@ -742,7 +742,7 @@ bool SelectionManager::requestOwnership( Atom selection )
Selection* pSel = m_aSelections[ selection ];
pSel->m_bOwner = bSuccess;
delete pSel->m_pPixmap;
- pSel->m_pPixmap = NULL;
+ pSel->m_pPixmap = nullptr;
pSel->m_nOrigTimestamp = m_nSelectionTimestamp;
}
#if OSL_DEBUG_LEVEL > 1
@@ -904,7 +904,7 @@ bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_In
// do a reschedule
struct timeval tv_last, tv_current;
- gettimeofday( &tv_last, NULL );
+ gettimeofday( &tv_last, nullptr );
tv_current = tv_last;
XEvent aEvent;
@@ -966,7 +966,7 @@ bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_In
aGuard.reset();
}
}
- gettimeofday( &tv_current, NULL );
+ gettimeofday( &tv_current, nullptr );
if( bAdjustTime )
tv_last = tv_current;
} while( ! it->second->m_aDataArrived.check() && (tv_current.tv_sec - tv_last.tv_sec) < getSelectionTimeout() );
@@ -1114,14 +1114,14 @@ bool SelectionManager::getPasteData( Atom selection, const OUString& rType, Sequ
int format = 0;
unsigned long nItems = 0;
unsigned long nBytes = 0;
- unsigned char* pReturn = NULL;
+ unsigned char* pReturn = nullptr;
XGetWindowProperty( m_pDisplay, m_aWindow, XA_PIXMAP, 0, 1, True, XA_PIXMAP, &type, &format, &nItems, &nBytes, &pReturn );
if( pReturn )
{
if( type == XA_PIXMAP )
aPixmap = *reinterpret_cast<Pixmap*>(pReturn);
XFree( pReturn );
- pReturn = NULL;
+ pReturn = nullptr;
if( pReturnedTypes[2] == XA_COLORMAP && pReturnedTypes[3] == XA_COLORMAP )
{
XGetWindowProperty( m_pDisplay, m_aWindow, XA_COLORMAP, 0, 1, True, XA_COLORMAP, &type, &format, &nItems, &nBytes, &pReturn );
@@ -1210,7 +1210,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
it = m_aSelections.find( selection );
if( it != m_aSelections.end() &&
it->second->m_aTypes.getLength() &&
- std::abs( it->second->m_nLastTimestamp - time( NULL ) ) < 2
+ std::abs( it->second->m_nLastTimestamp - time( nullptr ) ) < 2
)
{
rTypes = it->second->m_aTypes;
@@ -1240,7 +1240,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
Atom nType;
int nFormat;
unsigned long nItems, nBytes;
- unsigned char* pBytes = NULL;
+ unsigned char* pBytes = nullptr;
XGetWindowProperty( m_pDisplay, m_aDropEnterEvent.data.l[0],
m_nXdndTypeList, 0, atomcount, False,
@@ -1255,7 +1255,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
aAtoms.realloc( sizeof( Atom )*atomcount+nBytes );
memcpy( aAtoms.getArray(), pBytes, sizeof( Atom )*atomcount );
XFree( pBytes );
- pBytes = NULL;
+ pBytes = nullptr;
XGetWindowProperty( m_pDisplay, m_aDropEnterEvent.data.l[0],
m_nXdndTypeList, atomcount, nBytes/sizeof(Atom),
False, XA_ATOM,
@@ -1374,7 +1374,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
{
it->second->m_aTypes = rTypes;
it->second->m_aNativeTypes = aNativeTypes;
- it->second->m_nLastTimestamp = time( NULL );
+ it->second->m_nLastTimestamp = time( nullptr );
it->second->m_bHaveUTF16 = bHaveUTF16;
it->second->m_aUTF8Type = aUTF8Type;
it->second->m_bHaveCompound = bHaveCompound;
@@ -1406,7 +1406,7 @@ PixmapHolder* SelectionManager::getPixmapHolder( Atom selection )
{
std::unordered_map< Atom, Selection* >::const_iterator it = m_aSelections.find( selection );
if( it == m_aSelections.end() )
- return NULL;
+ return nullptr;
if( ! it->second->m_pPixmap )
it->second->m_pPixmap = new PixmapHolder( m_pDisplay );
return it->second->m_pPixmap;
@@ -1530,7 +1530,7 @@ bool SelectionManager::sendData( SelectionAdaptor* pAdaptor,
rInc.m_aProperty = property;
rInc.m_aTarget = target;
rInc.m_nFormat = nFormat;
- rInc.m_nTransferStartTime = time( NULL );
+ rInc.m_nTransferStartTime = time( nullptr );
// use incr protocol, signal start to requestor
long nMinSize = m_nIncrementalThreshold;
@@ -1633,7 +1633,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest
Atom nType = None;
int nFormat = 0;
unsigned long nItems = 0, nBytes = 0;
- unsigned char* pData = NULL;
+ unsigned char* pData = nullptr;
// get number of atoms
XGetWindowProperty( m_pDisplay,
@@ -1650,7 +1650,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest
if( pData ) // ?? should not happen
{
XFree( pData );
- pData = NULL;
+ pData = nullptr;
}
XGetWindowProperty( m_pDisplay,
rRequest.requestor,
@@ -1798,7 +1798,7 @@ bool SelectionManager::handleReceivePropertyNotify( XPropertyEvent& rNotify )
Atom nType = None;
int nFormat = 0;
unsigned long nItems = 0, nBytes = 0;
- unsigned char* pData = NULL;
+ unsigned char* pData = nullptr;
// get type and length
XGetWindowProperty( m_pDisplay,
@@ -1819,7 +1819,7 @@ bool SelectionManager::handleReceivePropertyNotify( XPropertyEvent& rNotify )
if( pData )
{
XFree( pData );
- pData = NULL;
+ pData = nullptr;
}
if( nType == m_nINCRAtom )
@@ -1905,7 +1905,7 @@ bool SelectionManager::handleSendPropertyNotify( XPropertyEvent& rNotify )
if( it != m_aIncrementals.end() )
{
bHandled = true;
- int nCurrentTime = time( NULL );
+ int nCurrentTime = time( nullptr );
std::unordered_map< Atom, IncrementalTransfer >::iterator inc_it;
// throw out aborted transfers
std::list< Atom > aTimeouts;
@@ -2019,7 +2019,7 @@ bool SelectionManager::handleSelectionNotify( XSelectionEvent& rNotify )
Atom nType = None;
int nFormat = 0;
unsigned long nItems = 0, nBytes = 0;
- unsigned char* pData = NULL;
+ unsigned char* pData = nullptr;
// get type and length
XGetWindowProperty( m_pDisplay,
@@ -2725,7 +2725,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
dtde.SourceActions = m_nSourceActions;
dtde.Transferable = m_xDragSourceTransferable;
m_bDropSent = true;
- m_nDropTimeout = time( NULL );
+ m_nDropTimeout = time( nullptr );
m_bDropWaitingForCompletion = true;
aGuard.clear();
it->second->drop( dtde );
@@ -2750,7 +2750,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
aEvent.xclient.data.l[4] = 0;
m_bDropSent = true;
- m_nDropTimeout = time( NULL );
+ m_nDropTimeout = time( nullptr );
XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent );
bCancel = false;
}
@@ -2789,11 +2789,11 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
XSendEvent( m_pDisplay, m_aDropWindow, False, ButtonReleaseMask, &aEvent );
m_bDropSent = true;
- m_nDropTimeout = time( NULL );
+ m_nDropTimeout = time( nullptr );
XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent );
m_bWaitingForPrimaryConversion = true;
m_bDropSent = true;
- m_nDropTimeout = time( NULL );
+ m_nDropTimeout = time( nullptr );
// HACK :-)
aGuard.clear();
static_cast< X11Clipboard* >( pAdaptor )->setContents( m_xDragSourceTransferable, css::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >() );
@@ -2887,12 +2887,12 @@ sal_Int32 SelectionManager::getDefaultCursor( sal_Int8 dragAction ) throw(std::e
int SelectionManager::getXdndVersion( ::Window aWindow, ::Window& rProxy )
{
- Atom* pProperties = NULL;
+ Atom* pProperties = nullptr;
int nProperties = 0;
Atom nType;
int nFormat;
unsigned long nItems, nBytes;
- unsigned char* pBytes = NULL;
+ unsigned char* pBytes = nullptr;
int nVersion = -1;
rProxy = None;
@@ -2915,7 +2915,7 @@ int SelectionManager::getXdndVersion( ::Window aWindow, ::Window& rProxy )
if( nType == XA_WINDOW )
rProxy = *reinterpret_cast< ::Window* >(pBytes);
XFree( pBytes );
- pBytes = NULL;
+ pBytes = nullptr;
if( rProxy != None )
{
// now check proxy whether it points to itself
@@ -2926,7 +2926,7 @@ int SelectionManager::getXdndVersion( ::Window aWindow, ::Window& rProxy )
if( nType == XA_WINDOW && *reinterpret_cast< ::Window* >(pBytes) != rProxy )
rProxy = None;
XFree( pBytes );
- pBytes = NULL;
+ pBytes = nullptr;
}
else
rProxy = None;
@@ -3145,7 +3145,7 @@ void SelectionManager::startDrag(
return;
}
- SalFrame* pCaptureFrame = NULL;
+ SalFrame* pCaptureFrame = nullptr;
{
osl::ClearableMutexGuard aGuard(m_aMutex);
@@ -3229,7 +3229,7 @@ void SelectionManager::startDrag(
pCaptureFrame = vcl_sal::getSalDisplay(GetGenericData())->GetCaptureFrame();
if( pCaptureFrame )
{
- vcl_sal::getSalDisplay(GetGenericData())->CaptureMouse( NULL );
+ vcl_sal::getSalDisplay(GetGenericData())->CaptureMouse( nullptr );
nPointerGrabSuccess =
XGrabPointer( m_pDisplay, it->second.m_aRootWindow, True,
DRAG_EVENT_MASK,
@@ -3387,7 +3387,7 @@ void SelectionManager::dragDoDispatch()
aTVal.Seconds = 0;
aTVal.Nanosec = 200000000;
oslThread aThread = m_aDragExecuteThread;
- while( m_xDragSourceListener.is() && ( ! m_bDropSent || time(NULL)-m_nDropTimeout < 5 ) && osl_scheduleThread( aThread ) )
+ while( m_xDragSourceListener.is() && ( ! m_bDropSent || time(nullptr)-m_nDropTimeout < 5 ) && osl_scheduleThread( aThread ) )
{
// let the thread in the run method do the dispatching
// just look occasionally here whether drop timed out or is completed
@@ -3435,7 +3435,7 @@ void SelectionManager::dragDoDispatch()
XUngrabKeyboard( m_pDisplay, CurrentTime );
XFlush( m_pDisplay );
- m_aDragExecuteThread = NULL;
+ m_aDragExecuteThread = nullptr;
m_aDragRunning.reset();
aGuard.clear();
@@ -3653,7 +3653,7 @@ void SelectionManager::run( void* pThis )
SelectionManager* This = static_cast<SelectionManager*>(pThis);
timeval aLast;
- gettimeofday( &aLast, 0 );
+ gettimeofday( &aLast, nullptr );
css::uno::Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
This->m_xDesktop.set( Desktop::create(xContext) );
@@ -3668,7 +3668,7 @@ void SelectionManager::run( void* pThis )
This->dispatchEvent( timeout );
timeval aNow;
- gettimeofday( &aNow, 0 );
+ gettimeofday( &aNow, nullptr );
if( (aNow.tv_sec - aLast.tv_sec) > 0 )
{
@@ -3757,7 +3757,7 @@ void SelectionManager::shutdown() throw()
}
osl_joinWithThread( m_aThread );
osl_destroyThread( m_aThread );
- m_aThread = NULL;
+ m_aThread = nullptr;
aGuard.reset();
}
m_xDesktop.clear();
diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx
index 6e43e9a6dea4..39034a18728f 100644
--- a/vcl/unx/generic/dtrans/X11_selection.hxx
+++ b/vcl/unx/generic/dtrans/X11_selection.hxx
@@ -208,7 +208,7 @@ namespace x11 {
Time m_nOrigTimestamp;
Selection() : m_eState( Inactive ),
- m_pAdaptor( NULL ),
+ m_pAdaptor( nullptr ),
m_aAtom( None ),
m_aRequestedType( None ),
m_nLastTimestamp( 0 ),
@@ -217,7 +217,7 @@ namespace x11 {
m_bHaveCompound( false ),
m_bOwner( false ),
m_aLastOwner( None ),
- m_pPixmap( NULL ),
+ m_pPixmap( nullptr ),
m_nOrigTimestamp( CurrentTime )
{}
};
@@ -228,7 +228,7 @@ namespace x11 {
DropTarget* m_pTarget;
::Window m_aRootWindow;
- DropTargetEntry() : m_pTarget( NULL ), m_aRootWindow( None ) {}
+ DropTargetEntry() : m_pTarget( nullptr ), m_aRootWindow( None ) {}
explicit DropTargetEntry( DropTarget* pTarget ) :
m_pTarget( pTarget ),
m_aRootWindow( None )
diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx
index b84681e8a1b3..e156f590b575 100644
--- a/vcl/unx/generic/dtrans/bmp.cxx
+++ b/vcl/unx/generic/dtrans/bmp.cxx
@@ -110,7 +110,7 @@ static sal_uInt8* X11_getPaletteBmpFromImage(
rOutSize = 0;
- sal_uInt8* pBuffer = 0;
+ sal_uInt8* pBuffer = nullptr;
sal_uInt32 nHeaderSize, nScanlineSize;
sal_uInt16 nBitCount;
// determine header and scanline size
@@ -242,11 +242,11 @@ static sal_uInt8* X11_getTCBmpFromImage(
// get masks from visual info (guesswork)
XVisualInfo aVInfo;
if( ! XMatchVisualInfo( pDisplay, nScreenNo, pImage->depth, TrueColor, &aVInfo ) )
- return NULL;
+ return nullptr;
rOutSize = 0;
- sal_uInt8* pBuffer = 0;
+ sal_uInt8* pBuffer = nullptr;
sal_uInt32 nHeaderSize = 60;
sal_uInt32 nScanlineSize = pImage->width*3;
@@ -329,7 +329,7 @@ sal_uInt8* x11::X11_getBmpFromPixmap(
break;
}
if( nScreenNo < 0 )
- return NULL;
+ return nullptr;
if( aColormap == None )
aColormap = DefaultColormap( pDisplay, nScreenNo );
@@ -337,7 +337,7 @@ sal_uInt8* x11::X11_getBmpFromPixmap(
// get the image
XImage* pImage = XGetImage( pDisplay, aDrawable, 0, 0, w, h, AllPlanes, ZPixmap );
if( ! pImage )
- return NULL;
+ return nullptr;
sal_uInt8* pBmp = d <= 8 ?
X11_getPaletteBmpFromImage( pDisplay, pImage, aColormap, rOutSize ) :
@@ -666,7 +666,7 @@ Pixmap PixmapHolder::setBitmapData( const sal_uInt8* pData )
aImage.height = (int)nHeight;
aImage.xoffset = 0;
aImage.format = ZPixmap;
- aImage.data = NULL;
+ aImage.data = nullptr;
aImage.byte_order = ImageByteOrder( m_pDisplay );
aImage.bitmap_unit = BitmapUnit( m_pDisplay );
aImage.bitmap_bit_order = BitmapBitOrder( m_pDisplay );
@@ -680,7 +680,7 @@ Pixmap PixmapHolder::setBitmapData( const sal_uInt8* pData )
aImage.bits_per_pixel = m_aInfo.depth;
else
aImage.bits_per_pixel = 8*((m_aInfo.depth+7)/8);
- aImage.obdata = NULL;
+ aImage.obdata = nullptr;
XInitImage( &aImage );
aImage.data = static_cast<char*>(rtl_allocateMemory( nHeight*aImage.bytes_per_line ));
diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
index 0bc8004c58b8..71cba584eb22 100644
--- a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
+++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
@@ -59,13 +59,13 @@ namespace cairo
#include <cairo-xlib-xrender.h>
X11SysData::X11SysData() :
- pDisplay(NULL),
+ pDisplay(nullptr),
hDrawable(0),
- pVisual(NULL),
+ pVisual(nullptr),
nScreen(0),
nDepth(-1),
aColormap(-1),
- pRenderFormat(NULL)
+ pRenderFormat(nullptr)
{}
X11SysData::X11SysData( const SystemGraphicsData& pSysDat ) :
@@ -85,7 +85,7 @@ namespace cairo
nScreen(pSysDat.nScreen),
nDepth(pSysDat.nDepth),
aColormap(pSysDat.aColormap),
- pRenderFormat(NULL)
+ pRenderFormat(nullptr)
{}
X11Pixmap::~X11Pixmap()
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 10f4f57043ff..8f08e466caa2 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -46,7 +46,7 @@ CairoTextRender::CairoTextRender()
: mnTextColor(MAKE_SALCOLOR(0x00, 0x00, 0x00)) //black
{
for( int i = 0; i < MAX_FALLBACK; ++i )
- mpServerFont[i] = NULL;
+ mpServerFont[i] = nullptr;
#if ENABLE_GRAPHITE
// check if graphite fonts have been disabled
@@ -60,11 +60,11 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev
// release all no longer needed font resources
for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )
{
- if( mpServerFont[i] != NULL )
+ if( mpServerFont[i] != nullptr )
{
// old server side font is no longer referenced
GlyphCache::GetInstance().UncacheFont( *mpServerFont[i] );
- mpServerFont[i] = NULL;
+ mpServerFont[i] = nullptr;
}
}
@@ -78,7 +78,7 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev
// handle the request for a non-native X11-font => use the GlyphCache
ServerFont* pServerFont = GlyphCache::GetInstance().CacheFont( *pEntry );
- if( pServerFont != NULL )
+ if( pServerFont != nullptr )
{
// ignore fonts with e.g. corrupted font files
if( !pServerFont->TestFont() )
@@ -152,7 +152,7 @@ void* CairoFontsCache::FindCachedFont(const CairoFontsCache::CacheId &rId)
for (LRUFonts::iterator aI = maLRUFonts.begin(); aI != aEnd; ++aI)
if (aI->second == rId)
return aI->first;
- return NULL;
+ return nullptr;
}
namespace
@@ -258,7 +258,7 @@ void CairoTextRender::DrawServerFontLayout( const ServerFontLayout& rLayout )
if (!font_face)
{
const FontConfigFontOptions *pOptions = rFont.GetFontOptions().get();
- void *pPattern = pOptions ? pOptions->GetPattern(aFace, aId.mbEmbolden) : NULL;
+ void *pPattern = pOptions ? pOptions->GetPattern(aFace, aId.mbEmbolden) : nullptr;
if (pPattern)
font_face = cairo_ft_font_face_create_for_pattern(static_cast<FcPattern*>(pPattern));
if (!font_face)
@@ -348,7 +348,7 @@ void CairoTextRender::DrawServerFontLayout( const ServerFontLayout& rLayout )
const FontCharMapPtr CairoTextRender::GetFontCharMap() const
{
if( !mpServerFont[0] )
- return NULL;
+ return nullptr;
const FontCharMapPtr pFCMap = mpServerFont[0]->GetFontCharMap();
return pFCMap;
@@ -457,7 +457,7 @@ CairoTextRender::GetFontMetric( ImplFontMetricData *pMetric, int nFallbackLevel
if( nFallbackLevel >= MAX_FALLBACK )
return;
- if( mpServerFont[nFallbackLevel] != NULL )
+ if( mpServerFont[nFallbackLevel] != nullptr )
{
long rDummyFactor;
mpServerFont[nFallbackLevel]->FetchFontMetric( *pMetric, rDummyFactor );
@@ -514,7 +514,7 @@ bool CairoTextRender::GetGlyphOutline( sal_GlyphId aGlyphId,
SalLayout* CairoTextRender::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel )
{
- SalLayout* pLayout = NULL;
+ SalLayout* pLayout = nullptr;
if( mpServerFont[ nFallbackLevel ]
&& !(rArgs.mnFlags & SalLayoutFlags::DisableGlyphProcessing) )
@@ -541,7 +541,7 @@ SystemFontData CairoTextRender::GetSysFontData( int nFallbackLevel ) const
if (nFallbackLevel >= MAX_FALLBACK) nFallbackLevel = MAX_FALLBACK - 1;
if (nFallbackLevel < 0 ) nFallbackLevel = 0;
- if (mpServerFont[nFallbackLevel] != NULL)
+ if (mpServerFont[nFallbackLevel] != nullptr)
{
ServerFont* rFont = mpServerFont[nFallbackLevel];
aSysFontData.nFontId = rFont->GetFtFace();
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 26bd47ffb366..486f3c169abe 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -79,8 +79,8 @@ namespace
{
delete m_pX11GlyphCache;
delete m_pX11GlyphPeer;
- m_pX11GlyphCache = NULL;
- m_pX11GlyphPeer = NULL;
+ m_pX11GlyphCache = nullptr;
+ m_pX11GlyphPeer = nullptr;
}
X11GlyphCache& getGlyphCache()
{
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index e85b096560cc..3e333bd27e3e 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -124,7 +124,7 @@ namespace
X11SalGraphicsImpl::X11SalGraphicsImpl(X11SalGraphics& rParent):
mrParent(rParent),
mnBrushColor( MAKE_SALCOLOR( 0xFF, 0xFF, 0XFF ) ),
- mpBrushGC(NULL),
+ mpBrushGC(nullptr),
mnBrushPixel(0),
mbPenGC(false),
mbBrushGC(false),
@@ -136,16 +136,16 @@ X11SalGraphicsImpl::X11SalGraphicsImpl(X11SalGraphics& rParent):
mbTrackingGC(false),
mbDitherBrush(false),
mbXORMode(false),
- mpPenGC(NULL),
+ mpPenGC(nullptr),
mnPenColor( MAKE_SALCOLOR( 0x00, 0x00, 0x00 ) ),
mnPenPixel(0),
- mpMonoGC(NULL),
- mpCopyGC(NULL),
- mpMaskGC(NULL),
- mpInvertGC(NULL),
- mpInvert50GC(NULL),
- mpStippleGC(NULL),
- mpTrackingGC(NULL)
+ mpMonoGC(nullptr),
+ mpCopyGC(nullptr),
+ mpMaskGC(nullptr),
+ mpInvertGC(nullptr),
+ mpInvert50GC(nullptr),
+ mpStippleGC(nullptr),
+ mpTrackingGC(nullptr)
{
}
@@ -163,7 +163,7 @@ bool X11SalGraphicsImpl::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int n
{
//TODO lfrb: don't hardcode the depth
Display* pDpy = mrParent.GetXDisplay();
- GC aTmpGC = XCreateGC( pDpy, pPixmap->GetPixmap(), 0, NULL );
+ GC aTmpGC = XCreateGC( pDpy, pPixmap->GetPixmap(), 0, nullptr );
if( !aTmpGC )
{
@@ -191,7 +191,7 @@ bool X11SalGraphicsImpl::RenderPixmapToScreen( X11Pixmap* pPixmap, X11Pixmap* /*
GC aFontGC = mrParent.GetFontGC();
// The GC can't be null, otherwise we'd have no clip region
- if( aFontGC == NULL )
+ if( aFontGC == nullptr )
{
SAL_WARN( "vcl", "no valid GC to render pixmap" );
return false;
@@ -234,7 +234,7 @@ XID X11SalGraphicsImpl::GetXRenderPicture()
if( !pXRenderFormat )
return 0;
// get the matching xrender target for drawable
- mrParent.m_aXRenderPicture = rRenderPeer.CreatePicture( mrParent.hDrawable_, pXRenderFormat, 0, NULL );
+ mrParent.m_aXRenderPicture = rRenderPeer.CreatePicture( mrParent.hDrawable_, pXRenderFormat, 0, nullptr );
}
{
@@ -623,7 +623,7 @@ void X11SalGraphicsImpl::copyArea ( long nDestX, long nDestY,
sal_uInt16 )
{
SalTwoRect aPosAry(nSrcX, nSrcY, nSrcWidth, nSrcHeight, nDestX, nDestY, nSrcWidth, nSrcHeight);
- copyBits(aPosAry, 0);
+ copyBits(aPosAry, nullptr);
}
void X11SalGraphicsImpl::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap )
@@ -660,7 +660,7 @@ void X11SalGraphicsImpl::drawBitmap( const SalTwoRect& rPosAry,
// decide if alpha masking or transparency masking is needed
BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rMaskBitmap).AcquireBuffer( BITMAP_READ_ACCESS );
- if( pAlphaBuffer != NULL )
+ if( pAlphaBuffer != nullptr )
{
int nMaskFormat = pAlphaBuffer->mnFormat;
const_cast<SalBitmap&>(rMaskBitmap).ReleaseBuffer( pAlphaBuffer, BITMAP_READ_ACCESS );
@@ -829,7 +829,7 @@ bool X11SalGraphicsImpl::drawAlphaBitmap( const SalTwoRect& rTR,
XRenderPictFormat* pSrcVisFmt = rPeer.FindVisualFormat( pSrcXVisual );
if( !pSrcVisFmt )
return false;
- Picture aSrcPic = rPeer.CreatePicture( aSrcPM, pSrcVisFmt, 0, NULL );
+ Picture aSrcPic = rPeer.CreatePicture( aSrcPM, pSrcVisFmt, 0, nullptr );
if( !aSrcPic )
return false;
@@ -1003,7 +1003,7 @@ void X11SalGraphicsImpl::ResetClipRegion()
mbTrackingGC = false;
XDestroyRegion( mrParent.mpClipRegion );
- mrParent.mpClipRegion = NULL;
+ mrParent.mpClipRegion = nullptr;
}
}
@@ -1069,7 +1069,7 @@ bool X11SalGraphicsImpl::setClipRegion( const vcl::Region& i_rClip )
if( XEmptyRegion( mrParent.mpClipRegion ) )
{
XDestroyRegion( mrParent.mpClipRegion );
- mrParent.mpClipRegion= NULL;
+ mrParent.mpClipRegion= nullptr;
}
return true;
}
@@ -1335,7 +1335,7 @@ void X11SalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly,
if( mnBrushColor != SALCOLOR_NONE )
{
sal_uInt32 i, n;
- Region pXRegA = NULL;
+ Region pXRegA = nullptr;
for( i = 0; i < nPoly; i++ ) {
n = pPoints[i];
@@ -1695,7 +1695,7 @@ SalColor X11SalGraphicsImpl::getPixel( long nX, long nY )
SalBitmap *X11SalGraphicsImpl::getBitmap( long nX, long nY, long nDX, long nDY )
{
if( mrParent.bPrinter_ && !mrParent.bVirDev_ )
- return NULL;
+ return nullptr;
bool bFakeWindowBG = false;
diff --git a/vcl/unx/generic/gdi/openglx11cairotextrender.cxx b/vcl/unx/generic/gdi/openglx11cairotextrender.cxx
index dbb6ecfbc065..885145c7366b 100644
--- a/vcl/unx/generic/gdi/openglx11cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/openglx11cairotextrender.cxx
@@ -25,7 +25,7 @@ cairo_t* OpenGLX11CairoTextRender::getCairoContext()
// static size_t id = 0;
// OString aFileName = OString("/tmp/libo_logs/text_rendering") + OString::number(id++) + OString(".svg");
// cairo_surface_t* surface = cairo_svg_surface_create(aFileName.getStr(), GetWidth(), GetHeight());
- cairo_surface_t* surface = NULL;
+ cairo_surface_t* surface = nullptr;
OpenGLSalGraphicsImpl *pImpl = dynamic_cast< OpenGLSalGraphicsImpl* >(mrParent.GetImpl());
if( pImpl )
{
@@ -38,7 +38,7 @@ cairo_t* OpenGLX11CairoTextRender::getCairoContext()
surface = cairo_image_surface_create( CAIRO_FORMAT_ARGB32, aClipRect.GetWidth(), aClipRect.GetHeight() );
}
if (!surface)
- return NULL;
+ return nullptr;
cairo_t *cr = cairo_create(surface);
cairo_surface_destroy(surface);
return cr;
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index 8487b5e98d38..ebe6a89a25b1 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -61,12 +61,12 @@ SalBitmap* X11SalInstance::CreateSalBitmap()
return new X11SalBitmap();
}
-ImplSalBitmapCache* X11SalBitmap::mpCache = NULL;
+ImplSalBitmapCache* X11SalBitmap::mpCache = nullptr;
sal_uLong X11SalBitmap::mnCacheInstCount = 0;
X11SalBitmap::X11SalBitmap()
- : mpDIB( NULL )
- , mpDDB( NULL )
+ : mpDIB( nullptr )
+ , mpDDB( nullptr )
, mbGrey( false )
{
}
@@ -87,13 +87,13 @@ void X11SalBitmap::ImplDestroyCache()
DBG_ASSERT( mnCacheInstCount, "X11SalBitmap::ImplDestroyCache(): underflow" );
if( mnCacheInstCount && !--mnCacheInstCount )
- delete mpCache, mpCache = NULL;
+ delete mpCache, mpCache = nullptr;
}
void X11SalBitmap::ImplRemovedFromCache()
{
if( mpDDB )
- delete mpDDB, mpDDB = NULL;
+ delete mpDDB, mpDDB = nullptr;
}
#if defined HAVE_VALGRIND_HEADERS
@@ -128,7 +128,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
, "Unsupported BitCount!"
);
- BitmapBuffer* pDIB = NULL;
+ BitmapBuffer* pDIB = nullptr;
if( rSize.Width() && rSize.Height() )
{
@@ -138,7 +138,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
}
catch (const std::bad_alloc&)
{
- pDIB = NULL;
+ pDIB = nullptr;
}
if( pDIB )
@@ -209,12 +209,12 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
catch (const std::bad_alloc&)
{
delete pDIB;
- pDIB = NULL;
+ pDIB = nullptr;
}
}
}
else
- pDIB = NULL;
+ pDIB = nullptr;
return pDIB;
}
@@ -229,7 +229,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
long nHeight,
bool bGrey
) {
- BitmapBuffer* pDIB = NULL;
+ BitmapBuffer* pDIB = nullptr;
if( aDrawable && nWidth && nHeight && nDrawableDepth )
{
@@ -249,7 +249,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
{
const SalTwoRect aTwoRect = { 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight };
BitmapBuffer aSrcBuf;
- const BitmapPalette* pDstPal = NULL;
+ const BitmapPalette* pDstPal = nullptr;
aSrcBuf.mnFormat = BMP_FORMAT_TOP_DOWN;
aSrcBuf.mnWidth = nWidth;
@@ -395,7 +395,7 @@ XImage* X11SalBitmap::ImplCreateXImage(
const SalTwoRect& rTwoRect
) const
{
- XImage* pImage = NULL;
+ XImage* pImage = nullptr;
if( !mpDIB && mpDDB )
{
@@ -419,7 +419,7 @@ XImage* X11SalBitmap::ImplCreateXImage(
nDepth = 1;
pImage = XCreateImage( pXDisp, pSalDisp->GetVisual( nScreen ).GetVisual(),
- nDepth, ( 1 == nDepth ) ? XYBitmap :ZPixmap, 0, NULL,
+ nDepth, ( 1 == nDepth ) ? XYBitmap :ZPixmap, 0, nullptr,
nWidth, nHeight, 32, 0 );
if( pImage )
@@ -557,7 +557,7 @@ XImage* X11SalBitmap::ImplCreateXImage(
else
{
XDestroyImage( pImage );
- pImage = NULL;
+ pImage = nullptr;
}
// destroy buffer; doesn't destroy allocated data in buffer
@@ -582,7 +582,7 @@ bool X11SalBitmap::ImplCreateFromDrawable(
if( aDrawable && nWidth && nHeight && nDrawableDepth )
mpDDB = new ImplSalDDB( aDrawable, nScreen, nDrawableDepth, nX, nY, nWidth, nHeight );
- return( mpDDB != NULL );
+ return( mpDDB != nullptr );
}
ImplSalDDB* X11SalBitmap::ImplGetDDB(
@@ -608,7 +608,7 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB(
mbGrey );
}
- delete mpDDB, const_cast<X11SalBitmap*>(this)->mpDDB = NULL;
+ delete mpDDB, const_cast<X11SalBitmap*>(this)->mpDDB = nullptr;
}
if( mpCache )
@@ -643,7 +643,7 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB(
// than image bitmap (broken)
if( aTwoRect.mnSrcX >= aSize.Width() ||
aTwoRect.mnSrcY >= aSize.Height() )
- return NULL; // this would be a really mad case
+ return nullptr; // this would be a really mad case
if( aTwoRect.mnSrcWidth+aTwoRect.mnSrcX > aSize.Width() )
{
@@ -671,7 +671,7 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB(
if( pImage )
{
const_cast<X11SalBitmap*>(this)->mpDDB = new ImplSalDDB( pImage, aDrawable, nXScreen, aTwoRect );
- delete[] pImage->data, pImage->data = NULL;
+ delete[] pImage->data, pImage->data = nullptr;
XDestroyImage( pImage );
if( mpCache )
@@ -700,7 +700,7 @@ bool X11SalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const Bitmap
Destroy();
mpDIB = ImplCreateDIB( rSize, nBitCount, rPal );
- return( mpDIB != NULL );
+ return( mpDIB != nullptr );
}
bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
@@ -725,7 +725,7 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
catch (const std::bad_alloc&)
{
delete mpDIB;
- mpDIB = NULL;
+ mpDIB = nullptr;
}
if( mpDIB )
@@ -738,8 +738,8 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
0, 0, rSalBmp.mpDDB->ImplGetWidth(), rSalBmp.mpDDB->ImplGetHeight() );
return( ( !rSalBmp.mpDIB && !rSalBmp.mpDDB ) ||
- ( rSalBmp.mpDIB && ( mpDIB != NULL ) ) ||
- ( rSalBmp.mpDDB && ( mpDDB != NULL ) ) );
+ ( rSalBmp.mpDIB && ( mpDIB != nullptr ) ) ||
+ ( rSalBmp.mpDDB && ( mpDDB != nullptr ) ) );
}
bool X11SalBitmap::Create( const SalBitmap&, SalGraphics* )
@@ -796,11 +796,11 @@ void X11SalBitmap::Destroy()
if( mpDIB )
{
delete[] mpDIB->mpBits;
- delete mpDIB, mpDIB = NULL;
+ delete mpDIB, mpDIB = nullptr;
}
if( mpDDB )
- delete mpDDB, mpDDB = NULL;
+ delete mpDDB, mpDDB = nullptr;
if( mpCache )
mpCache->ImplRemove( this );
@@ -855,7 +855,7 @@ void X11SalBitmap::ReleaseBuffer( BitmapBuffer*, BitmapAccessMode nMode )
if( nMode == BITMAP_WRITE_ACCESS )
{
if( mpDDB )
- delete mpDDB, mpDDB = NULL;
+ delete mpDDB, mpDDB = nullptr;
if( mpCache )
mpCache->ImplRemove( this );
@@ -1066,7 +1066,7 @@ ImplSalBitmapCache::~ImplSalBitmapCache()
void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, sal_uLong nMemSize, sal_uLong nFlags )
{
- ImplBmpObj* pObj = NULL;
+ ImplBmpObj* pObj = nullptr;
bool bFound = false;
for(
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 699dab03a5b5..a6fba00c0143 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -68,17 +68,17 @@
#include <vcl/opengl/OpenGLHelper.hxx>
X11SalGraphics::X11SalGraphics():
- m_pFrame(NULL),
- m_pVDev(NULL),
- m_pColormap(NULL),
- m_pDeleteColormap(NULL),
+ m_pFrame(nullptr),
+ m_pVDev(nullptr),
+ m_pColormap(nullptr),
+ m_pDeleteColormap(nullptr),
hDrawable_(None),
m_nXScreen( 0 ),
- m_pXRenderFormat(NULL),
+ m_pXRenderFormat(nullptr),
m_aXRenderPicture(0),
- pPaintRegion_(NULL),
- mpClipRegion(NULL),
- pFontGC_(NULL),
+ pPaintRegion_(nullptr),
+ mpClipRegion(nullptr),
+ pFontGC_(nullptr),
nTextPixel_(0),
hBrush_(None),
bWindow_(false),
@@ -118,7 +118,7 @@ void X11SalGraphics::freeResources()
if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ), hBrush_ = None;
if( pFontGC_ ) XFreeGC( pDisplay, pFontGC_ ), pFontGC_ = None;
if( m_pDeleteColormap )
- delete m_pDeleteColormap, m_pColormap = m_pDeleteColormap = NULL;
+ delete m_pDeleteColormap, m_pColormap = m_pDeleteColormap = nullptr;
if( m_aXRenderPicture )
XRenderPeer::GetInstance().FreePicture( m_aXRenderPicture ), m_aXRenderPicture = 0;
@@ -146,7 +146,7 @@ void X11SalGraphics::SetDrawable( Drawable aDrawable, SalX11Screen nXScreen )
}
hDrawable_ = aDrawable;
- SetXRenderFormat( NULL );
+ SetXRenderFormat( nullptr );
if( m_aXRenderPicture )
{
XRenderPeer::GetInstance().FreePicture( m_aXRenderPicture );
@@ -163,7 +163,7 @@ void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget,
m_nXScreen = nXScreen;
m_pFrame = pFrame;
- m_pVDev = NULL;
+ m_pVDev = nullptr;
bWindow_ = true;
bVirDev_ = false;
@@ -272,7 +272,7 @@ bool X11SalGraphics::GetDitherPixmap( SalColor nSalColor )
8, 8 ); // width & height
// destroy image-frame but not palette-data
- pImage->data = NULL;
+ pImage->data = nullptr;
XDestroyImage( pImage );
return true;
@@ -442,7 +442,7 @@ bool X11SalGraphics::drawEPS( long nX, long nY, long nWidth,
XRenderPictFormat* X11SalGraphics::GetXRenderFormat() const
{
- if( m_pXRenderFormat == NULL )
+ if( m_pXRenderFormat == nullptr )
m_pXRenderFormat = XRenderPeer::GetInstance().FindVisualFormat( GetVisual().visual );
return m_pXRenderFormat;
}
diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx
index f4bce82a0509..8aa87bfc8d46 100644
--- a/vcl/unx/generic/gdi/salvd.cxx
+++ b/vcl/unx/generic/gdi/salvd.cxx
@@ -78,7 +78,7 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap,
delete pOrigDeleteColormap;
m_pVDev = pDevice;
- m_pFrame = NULL;
+ m_pFrame = nullptr;
bWindow_ = pDisplay->IsDisplay();
bVirDev_ = true;
@@ -95,7 +95,7 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics* pGraphics, long &nDX, long
m_nXScreen(0),
bGraphics_(false)
{
- SalColormap* pColormap = NULL;
+ SalColormap* pColormap = nullptr;
bool bDeleteColormap = false;
if( !nBitCount && pGraphics )
@@ -140,7 +140,7 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics* pGraphics, long &nDX, long
bExternPixmap_ = false;
}
- XRenderPictFormat* pXRenderFormat = pData ? static_cast<XRenderPictFormat*>(pData->pXRenderFormat) : NULL;
+ XRenderPictFormat* pXRenderFormat = pData ? static_cast<XRenderPictFormat*>(pData->pXRenderFormat) : nullptr;
if( pXRenderFormat )
{
pGraphics_->SetXRenderFormat( pXRenderFormat );
@@ -163,7 +163,7 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics* pGraphics, long &nDX, long
X11SalVirtualDevice::~X11SalVirtualDevice()
{
delete pGraphics_;
- pGraphics_ = NULL;
+ pGraphics_ = nullptr;
if( GetDrawable() && !bExternPixmap_ )
XFreePixmap( GetXDisplay(), GetDrawable() );
@@ -172,7 +172,7 @@ X11SalVirtualDevice::~X11SalVirtualDevice()
SalGraphics* X11SalVirtualDevice::AcquireGraphics()
{
if( bGraphics_ )
- return NULL;
+ return nullptr;
if( pGraphics_ )
bGraphics_ = true;
diff --git a/vcl/unx/generic/gdi/x11cairotextrender.cxx b/vcl/unx/generic/gdi/x11cairotextrender.cxx
index b6187c88fa56..8734526193fd 100644
--- a/vcl/unx/generic/gdi/x11cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/x11cairotextrender.cxx
@@ -59,7 +59,7 @@ cairo_t* X11CairoTextRender::getCairoContext()
Display* pDisplay = mrParent.GetXDisplay();
- cairo_surface_t* surface = NULL;
+ cairo_surface_t* surface = nullptr;
if (pVisualFormat)
{
surface = cairo_xlib_surface_create_with_xrender_format (
@@ -74,7 +74,7 @@ cairo_t* X11CairoTextRender::getCairoContext()
}
if (!surface)
- return NULL;
+ return nullptr;
cairo_t *cr = cairo_create(surface);
cairo_surface_destroy(surface);
diff --git a/vcl/unx/generic/gdi/x11windowprovider.cxx b/vcl/unx/generic/gdi/x11windowprovider.cxx
index ec1cb09a074b..4f507c3911e0 100644
--- a/vcl/unx/generic/gdi/x11windowprovider.cxx
+++ b/vcl/unx/generic/gdi/x11windowprovider.cxx
@@ -26,7 +26,7 @@ Display *OpenX11Display(OString& rDisplay)
* o default display
*/
- Display *pDisp = NULL;
+ Display *pDisp = nullptr;
// is there a -display command line parameter?
@@ -41,7 +41,7 @@ Display *OpenX11Display(OString& rDisplay)
rDisplay = OUStringToOString(
aParam, osl_getThreadTextEncoding());
- if ((pDisp = XOpenDisplay(rDisplay.getStr()))!=NULL)
+ if ((pDisp = XOpenDisplay(rDisplay.getStr()))!=nullptr)
{
/*
* if a -display switch was used, we need
@@ -60,7 +60,7 @@ Display *OpenX11Display(OString& rDisplay)
{
// Open $DISPLAY or default...
char *pDisplay = getenv("DISPLAY");
- if (pDisplay != NULL)
+ if (pDisplay != nullptr)
rDisplay = OString(pDisplay);
pDisp = XOpenDisplay(pDisplay);
}
diff --git a/vcl/unx/generic/gdi/xrender_peer.cxx b/vcl/unx/generic/gdi/xrender_peer.cxx
index 808fe14871d9..b29bc6697d7c 100644
--- a/vcl/unx/generic/gdi/xrender_peer.cxx
+++ b/vcl/unx/generic/gdi/xrender_peer.cxx
@@ -26,7 +26,7 @@
XRenderPeer::XRenderPeer()
: mpDisplay( vcl_sal::getSalDisplay(GetGenericData())->GetDisplay() )
- , mpStandardFormatA8( NULL )
+ , mpStandardFormatA8( nullptr )
{
InitRenderLib();
}
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index 337e4d494688..c51d1ecb515b 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -60,14 +60,14 @@ bool IsHeadlessModeRequested()
}
-static oslModule pCloseModule = NULL;
+static oslModule pCloseModule = nullptr;
static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = false )
{
if (rModuleBase == "svp")
return svp_create_SalInstance();
- SalInstance* pInst = NULL;
+ SalInstance* pInst = nullptr;
OUString aModule(
#ifdef SAL_DLLPREFIX
SAL_DLLPREFIX
@@ -101,7 +101,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals
*/
if( rModuleBase == "gtk" || rModuleBase == "gtk3" || rModuleBase == "tde" || rModuleBase == "kde" || rModuleBase == "kde4" )
{
- pCloseModule = NULL;
+ pCloseModule = nullptr;
}
#endif
GetSalData()->m_pPlugin = aMod;
@@ -171,7 +171,7 @@ static SalInstance* autodetect_plugin()
#if ENABLE_KDE4
"kde4",
#endif
- "gtk3", "gtk", "gen", 0
+ "gtk3", "gtk", "gen", nullptr
};
static const char* const pKDEFallbackList[] =
@@ -179,17 +179,17 @@ static SalInstance* autodetect_plugin()
#if ENABLE_KDE4
"kde4",
#endif
- "gtk3", "gtk", "gen", 0
+ "gtk3", "gtk", "gen", nullptr
};
static const char* const pStandardFallbackList[] =
{
- "gtk3", "gtk", "gen", 0
+ "gtk3", "gtk", "gen", nullptr
};
static const char* const pHeadlessFallbackList[] =
{
- "svp", 0
+ "svp", nullptr
};
DesktopType desktop = get_desktop_environment();
@@ -210,8 +210,8 @@ static SalInstance* autodetect_plugin()
else if( desktop == DESKTOP_KDE4 || desktop == DESKTOP_KDE5 )
pList = pKDEFallbackList;
- SalInstance* pInst = NULL;
- while( pList[nListEntry] && pInst == NULL )
+ SalInstance* pInst = nullptr;
+ while( pList[nListEntry] && pInst == nullptr )
{
OUString aTry( OUString::createFromAscii( pList[nListEntry] ) );
pInst = tryInstance( aTry );
@@ -226,7 +226,7 @@ static SalInstance* autodetect_plugin()
SalInstance *CreateSalInstance()
{
- SalInstance *pInst = NULL;
+ SalInstance *pInst = nullptr;
OUString aUsePlugin;
if( IsHeadlessModeRequested() )
@@ -312,9 +312,9 @@ const OUString& SalGetDesktopEnvironment()
}
SalData::SalData() :
- m_pInstance(NULL),
- m_pPlugin(NULL),
- m_pPIManager(NULL)
+ m_pInstance(nullptr),
+ m_pPlugin(nullptr),
+ m_pPIManager(nullptr)
{
}
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index 5d171d8bb64d..5c47442d8789 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -147,7 +147,7 @@ OString CUPSManager::threadedCupsGetPPD( const char* pPrinter )
static const char* setPasswordCallback( const char* pIn )
{
- const char* pRet = NULL;
+ const char* pRet = nullptr;
PrinterInfoManager& rMgr = PrinterInfoManager::get();
if( rMgr.getType() == PrinterInfoManager::CUPS ) // sanity check
@@ -161,7 +161,7 @@ static const char* setPasswordCallback( const char* pIn )
CUPSManager* CUPSManager::tryLoadCUPS()
{
- CUPSManager* pManager = NULL;
+ CUPSManager* pManager = nullptr;
static const char* pEnv = getenv("SAL_DISABLE_CUPS");
if (!pEnv || !*pEnv)
@@ -181,7 +181,7 @@ static void run_dest_thread_stub( void* pThis )
CUPSManager::CUPSManager() :
PrinterInfoManager( CUPS ),
m_nDests( 0 ),
- m_pDests( NULL ),
+ m_pDests( nullptr ),
m_bNewDests( false ),
m_bPPDThreadRunning( false ),
batchMode( false )
@@ -211,14 +211,14 @@ void CUPSManager::runDestThread( void* pThis )
void CUPSManager::runDests()
{
SAL_INFO("vcl.unx.print", "starting cupsGetDests");
- cups_dest_t* pDests = NULL;
+ cups_dest_t* pDests = nullptr;
// n#722902 - do a fast-failing check for cups working *at all* first
http_t* p_http;
if( (p_http=httpConnectEncrypt(
cupsServer(),
ippPort(),
- cupsEncryption())) != NULL )
+ cupsEncryption())) != nullptr )
{
// neat, cups is up, clean up the canary
httpClose(p_http);
@@ -251,7 +251,7 @@ void CUPSManager::initialize()
{
osl_joinWithThread( m_aDestThread );
osl_destroyThread( m_aDestThread );
- m_aDestThread = NULL;
+ m_aDestThread = nullptr;
}
m_bNewDests = false;
@@ -288,7 +288,7 @@ void CUPSManager::initialize()
int nPrinter = m_nDests;
// reset global default PPD options; these are queried on demand from CUPS
- m_aGlobalDefaults.m_pParser = NULL;
+ m_aGlobalDefaults.m_pParser = nullptr;
m_aGlobalDefaults.m_aContext = PPDContext();
// add CUPS printers, should there be a printer
@@ -333,8 +333,8 @@ void CUPSManager::initialize()
// would mean we'd have to download PPDs for each and
// every printer - which would be really bad runtime
// behaviour
- aPrinter.m_aInfo.m_pParser = NULL;
- aPrinter.m_aInfo.m_aContext.setParser( NULL );
+ aPrinter.m_aInfo.m_pParser = nullptr;
+ aPrinter.m_aInfo.m_aContext.setParser( nullptr );
std::unordered_map< OUString, PPDContext, OUStringHash >::const_iterator c_it = m_aDefaultContexts.find( aPrinterName );
if( c_it != m_aDefaultContexts.end() )
{
@@ -415,7 +415,7 @@ static void updatePrinterContextInfo( ppd_group_t* pPPDGroup, PPDContext& rConte
const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
{
- const PPDParser* pNewParser = NULL;
+ const PPDParser* pNewParser = nullptr;
OUString aPrinter;
if( rPrinter.startsWith("CUPS:") )
@@ -519,13 +519,13 @@ void CUPSManager::setupJobContextData( JobData& rData )
return;
}
- if( p_it->second.m_aInfo.m_pParser == NULL )
+ if( p_it->second.m_aInfo.m_pParser == nullptr )
{
// in turn calls createCUPSParser
// which updates the printer info
p_it->second.m_aInfo.m_pParser = PPDParser::getParser( p_it->second.m_aInfo.m_aDriverName );
}
- if( p_it->second.m_aInfo.m_aContext.getParser() == NULL )
+ if( p_it->second.m_aInfo.m_aContext.getParser() == nullptr )
{
OUString aPrinter;
if( p_it->second.m_aInfo.m_aDriverName.startsWith("CUPS:") )
@@ -553,7 +553,7 @@ FILE* CUPSManager::startSpool( const OUString& rPrintername, bool bQuickCommand
}
OUString aTmpURL, aTmpFile;
- osl_createTempFile( NULL, NULL, &aTmpURL.pData );
+ osl_createTempFile( nullptr, nullptr, &aTmpURL.pData );
osl_getSystemPathFromFileURL( aTmpURL.pData, &aTmpFile.pData );
OString aSysFile = OUStringToOString( aTmpFile, osl_getThreadTextEncoding() );
FILE* fp = fopen( aSysFile.getStr(), "w" );
@@ -572,7 +572,7 @@ struct less_ppd_key : public ::std::binary_function<double, double, bool>
void CUPSManager::getOptionsFromDocumentSetup( const JobData& rJob, bool bBanner, int& rNumOptions, void** rOptions )
{
rNumOptions = 0;
- *rOptions = NULL;
+ *rOptions = nullptr;
// emit features ordered to OrderDependency
// ignore features that are set to default
@@ -711,7 +711,7 @@ bool CUPSManager::printJobs( const PendingJob& job, const std::vector< OString >
// setup cups options
int nNumOptions = 0;
- cups_option_t* pOptions = NULL;
+ cups_option_t* pOptions = nullptr;
getOptionsFromDocumentSetup( job.jobData, job.banner, nNumOptions, reinterpret_cast<void**>(&pOptions) );
OString sJobName(OUStringToOString(job.jobTitle, aEnc));
@@ -776,7 +776,7 @@ bool CUPSManager::checkPrintersChanged( bool bWait )
SAL_INFO("vcl.unx.print", "syncing cups discovery thread");
osl_joinWithThread( m_aDestThread );
osl_destroyThread( m_aDestThread );
- m_aDestThread = NULL;
+ m_aDestThread = nullptr;
SAL_INFO("vcl.unx.print", "done: syncing cups discovery thread");
}
else
@@ -793,7 +793,7 @@ bool CUPSManager::checkPrintersChanged( bool bWait )
if( m_nDests && m_pDests )
cupsFreeDests( m_nDests, static_cast<cups_dest_t*>(m_pDests) );
m_nDests = 0;
- m_pDests = NULL;
+ m_pDests = nullptr;
runDests();
}
}
@@ -881,7 +881,7 @@ bool CUPSManager::writePrinterConfig()
// create new option list
int nNewOptions = 0;
- cups_option_t* pNewOptions = NULL;
+ cups_option_t* pNewOptions = nullptr;
int nValues = rInfo.m_aContext.countValuesModified();
for( int i = 0; i < nValues; i++ )
{
@@ -981,7 +981,7 @@ namespace
const char* CUPSManager::authenticateUser( const char* /*pIn*/ )
{
- const char* pRet = NULL;
+ const char* pRet = nullptr;
osl::MutexGuard aGuard( m_aCUPSMutex );
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx
index 840ef7b1b516..9169b01f175c 100644
--- a/vcl/unx/generic/printer/jobdata.cxx
+++ b/vcl/unx/generic/printer/jobdata.cxx
@@ -83,7 +83,7 @@ void JobData::setCollate( bool bCollate )
const PPDKey* pKey = pParser->getKey( OUString( "Collate" ) );
if( pKey )
{
- const PPDValue* pVal = NULL;
+ const PPDValue* pVal = nullptr;
if( bCollate )
pVal = pKey->getValue( OUString( "True" ) );
else
@@ -105,7 +105,7 @@ bool JobData::setPaper( int i_nWidth, int i_nHeight )
OUString aPaper( m_pParser->matchPaper( i_nWidth, i_nHeight ) );
const PPDKey* pKey = m_pParser->getKey( OUString( "PageSize" ) );
- const PPDValue* pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : NULL;
+ const PPDValue* pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : nullptr;
bSuccess = pKey && pValue && m_aContext.setValue( pKey, pValue );
}
@@ -118,7 +118,7 @@ bool JobData::setPaperBin( int i_nPaperBin )
if( m_pParser )
{
const PPDKey* pKey = m_pParser->getKey( OUString( "InputSlot" ) );
- const PPDValue* pValue = pKey ? pKey->getValue( i_nPaperBin ) : NULL;
+ const PPDValue* pValue = pKey ? pKey->getValue( i_nPaperBin ) : nullptr;
bSuccess = pKey && pValue && m_aContext.setValue( pKey, pValue );
}
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 9ed3e7dd30d5..77bc1648ca37 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -244,7 +244,7 @@ namespace psp
std::list< PPDParser* > aAllParsers;
std::unordered_map< OUString, OUString, OUStringHash >* pAllPPDFiles;
PPDCache()
- : pAllPPDFiles(NULL)
+ : pAllPPDFiles(nullptr)
{}
~PPDCache()
{
@@ -254,7 +254,7 @@ namespace psp
aAllParsers.pop_front();
}
delete pAllPPDFiles;
- pAllPPDFiles = NULL;
+ pAllPPDFiles = nullptr;
}
};
}
@@ -289,8 +289,8 @@ public:
};
PPDDecompressStream::PPDDecompressStream( const OUString& i_rFile ) :
- mpFileStream( NULL ),
- mpMemStream( NULL )
+ mpFileStream( nullptr ),
+ mpMemStream( nullptr )
{
Open( i_rFile );
}
@@ -330,13 +330,13 @@ void PPDDecompressStream::Open( const OUString& i_rFile )
if( nComp < 0 )
{
// decompression failed, must be an uncompressed stream after all
- delete mpMemStream, mpMemStream = NULL;
+ delete mpMemStream, mpMemStream = nullptr;
mpFileStream->Seek( 0 );
}
else
{
// compression successful, can get rid of file stream
- delete mpFileStream, mpFileStream = NULL;
+ delete mpFileStream, mpFileStream = nullptr;
mpMemStream->Seek( 0 );
}
}
@@ -344,8 +344,8 @@ void PPDDecompressStream::Open( const OUString& i_rFile )
void PPDDecompressStream::Close()
{
- delete mpMemStream, mpMemStream = NULL;
- delete mpFileStream, mpFileStream = NULL;
+ delete mpMemStream, mpMemStream = nullptr;
+ delete mpFileStream, mpFileStream = nullptr;
}
bool PPDDecompressStream::IsOpen() const
@@ -509,7 +509,7 @@ OUString PPDParser::getPPDFile( const OUString& rFile )
if( it == rPPDCache.pAllPPDFiles->end() && bRetry )
{
// a new file ? rehash
- delete rPPDCache.pAllPPDFiles; rPPDCache.pAllPPDFiles = NULL;
+ delete rPPDCache.pAllPPDFiles; rPPDCache.pAllPPDFiles = nullptr;
bRetry = false;
// note this is optimized for office start where
// no new files occur and initPPDFiles is called only once
@@ -553,7 +553,7 @@ const PPDParser* PPDParser::getParser( const OUString& rFile )
{
SAL_INFO("vcl.unx.print", "Could not get printer PPD file \""
<< rFile << "\" !");
- return NULL;
+ return nullptr;
}
PPDCache &rPPDCache = thePPDCache::get();
@@ -561,7 +561,7 @@ const PPDParser* PPDParser::getParser( const OUString& rFile )
if( (*it)->m_aFile == aFile )
return *it;
- PPDParser* pNewParser = NULL;
+ PPDParser* pNewParser = nullptr;
if( !aFile.startsWith( "CUPS:" ) )
pNewParser = new PPDParser( aFile );
else
@@ -589,17 +589,17 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_aFile( rFile ),
m_bType42Capable( false ),
m_aFileEncoding( RTL_TEXTENCODING_MS_1252 ),
- m_pDefaultImageableArea( NULL ),
- m_pImageableAreas( NULL ),
- m_pDefaultPaperDimension( NULL ),
- m_pPaperDimensions( NULL ),
- m_pDefaultInputSlot( NULL ),
- m_pInputSlots( NULL ),
- m_pDefaultResolution( NULL ),
- m_pResolutions( NULL ),
- m_pDefaultDuplexType( NULL ),
- m_pDuplexTypes( NULL ),
- m_pFontList( NULL ),
+ m_pDefaultImageableArea( nullptr ),
+ m_pImageableAreas( nullptr ),
+ m_pDefaultPaperDimension( nullptr ),
+ m_pPaperDimensions( nullptr ),
+ m_pDefaultInputSlot( nullptr ),
+ m_pInputSlots( nullptr ),
+ m_pDefaultResolution( nullptr ),
+ m_pResolutions( nullptr ),
+ m_pDefaultDuplexType( nullptr ),
+ m_pDuplexTypes( nullptr ),
+ m_pFontList( nullptr ),
m_pTranslator( new PPDTranslator() )
{
// read in the file
@@ -713,12 +713,12 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_pImageableAreas = getKey( OUString( "ImageableArea" ) );
if( m_pImageableAreas )
m_pDefaultImageableArea = m_pImageableAreas->getDefaultValue();
- if (m_pImageableAreas == 0) {
+ if (m_pImageableAreas == nullptr) {
OSL_TRACE(
"Warning: no ImageableArea in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
}
- if (m_pDefaultImageableArea == 0) {
+ if (m_pDefaultImageableArea == nullptr) {
OSL_TRACE(
"Warning: no DefaultImageableArea in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
@@ -727,12 +727,12 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_pPaperDimensions = getKey( OUString( "PaperDimension" ) );
if( m_pPaperDimensions )
m_pDefaultPaperDimension = m_pPaperDimensions->getDefaultValue();
- if (m_pPaperDimensions == 0) {
+ if (m_pPaperDimensions == nullptr) {
OSL_TRACE(
"Warning: no PaperDimensions in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
}
- if (m_pDefaultPaperDimension == 0) {
+ if (m_pDefaultPaperDimension == nullptr) {
OSL_TRACE(
"Warning: no DefaultPaperDimensions in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
@@ -741,12 +741,12 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_pResolutions = getKey( OUString( "Resolution" ) );
if( m_pResolutions )
m_pDefaultResolution = m_pResolutions->getDefaultValue();
- if (m_pResolutions == 0) {
+ if (m_pResolutions == nullptr) {
OSL_TRACE(
"Warning: no Resolution in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
}
- if (m_pDefaultResolution == 0) {
+ if (m_pDefaultResolution == nullptr) {
OSL_TRACE(
"Warning: no DefaultResolution in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
@@ -755,12 +755,12 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_pInputSlots = getKey( OUString( "InputSlot" ) );
if( m_pInputSlots )
m_pDefaultInputSlot = m_pInputSlots->getDefaultValue();
- if (m_pInputSlots == 0) {
+ if (m_pInputSlots == nullptr) {
OSL_TRACE(
"Warning: no InputSlot in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
}
- if (m_pDefaultInputSlot == 0) {
+ if (m_pDefaultInputSlot == nullptr) {
OSL_TRACE(
"Warning: no DefaultInputSlot in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
@@ -771,7 +771,7 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_pDefaultDuplexType = m_pDuplexTypes->getDefaultValue();
m_pFontList = getKey( OUString( "Font" ) );
- if (m_pFontList == 0) {
+ if (m_pFontList == nullptr) {
OSL_TRACE(
"Warning: no Font in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
@@ -806,13 +806,13 @@ void PPDParser::insertKey( const OUString& rKey, PPDKey* pKey )
const PPDKey* PPDParser::getKey( int n ) const
{
- return ((unsigned int)n < m_aOrderedKeys.size() && n >= 0) ? m_aOrderedKeys[n] : NULL;
+ return ((unsigned int)n < m_aOrderedKeys.size() && n >= 0) ? m_aOrderedKeys[n] : nullptr;
}
const PPDKey* PPDParser::getKey( const OUString& rKey ) const
{
PPDParser::hash_type::const_iterator it = m_aKeys.find( rKey );
- return it != m_aKeys.end() ? it->second : NULL;
+ return it != m_aKeys.end() ? it->second : nullptr;
}
bool PPDParser::hasKey( const PPDKey* pKey ) const
@@ -1115,7 +1115,7 @@ void PPDParser::parse( ::std::list< OString >& rLines )
continue;
}
- PPDKey* pKey = NULL;
+ PPDKey* pKey = nullptr;
keyit = m_aKeys.find( aUniKey );
if( keyit == m_aKeys.end() )
{
@@ -1166,7 +1166,7 @@ void PPDParser::parse( ::std::list< OString >& rLines )
{
PPDKey* pKey = keyit->second;
const PPDValue* pDefValue = pKey->getValue( aOption );
- if( pKey->m_pDefaultValue == NULL )
+ if( pKey->m_pDefaultValue == nullptr )
pKey->m_pDefaultValue = pDefValue;
}
else
@@ -1498,7 +1498,7 @@ OUString PPDParser::translateOption( const OUString& i_rKey,
PPDKey::PPDKey( const OUString& rKey ) :
m_aKey( rKey ),
- m_pDefaultValue( NULL ),
+ m_pDefaultValue( nullptr ),
m_bQueryValue( false ),
m_bUIOption( false ),
m_eUIType( PickOne ),
@@ -1513,13 +1513,13 @@ PPDKey::~PPDKey()
const PPDValue* PPDKey::getValue( int n ) const
{
- return ((unsigned int)n < m_aOrderedValues.size() && n >= 0) ? m_aOrderedValues[n] : NULL;
+ return ((unsigned int)n < m_aOrderedValues.size() && n >= 0) ? m_aOrderedValues[n] : nullptr;
}
const PPDValue* PPDKey::getValue( const OUString& rOption ) const
{
PPDKey::hash_type::const_iterator it = m_aValues.find( rOption );
- return it != m_aValues.end() ? &it->second : NULL;
+ return it != m_aValues.end() ? &it->second : nullptr;
}
const PPDValue* PPDKey::getValueCaseInsensitive( const OUString& rOption ) const
@@ -1555,7 +1555,7 @@ void PPDKey::eraseValue( const OUString& rOption )
PPDValue* PPDKey::insertValue(const OUString& rOption, PPDValueType eType, bool bCustomOption)
{
if( m_aValues.find( rOption ) != m_aValues.end() )
- return NULL;
+ return nullptr;
PPDValue aValue;
aValue.m_aOption = rOption;
@@ -1592,7 +1592,7 @@ const PPDKey* PPDContext::getModifiedKey( int n ) const
hash_type::const_iterator it;
for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end() && n--; ++it )
;
- return it != m_aCurrentValues.end() ? it->first : NULL;
+ return it != m_aCurrentValues.end() ? it->first : nullptr;
}
void PPDContext::setParser( const PPDParser* pParser )
@@ -1607,7 +1607,7 @@ void PPDContext::setParser( const PPDParser* pParser )
const PPDValue* PPDContext::getValue( const PPDKey* pKey ) const
{
if( ! m_pParser )
- return NULL;
+ return nullptr;
hash_type::const_iterator it;
it = m_aCurrentValues.find( pKey );
@@ -1615,7 +1615,7 @@ const PPDValue* PPDContext::getValue( const PPDKey* pKey ) const
return it->second;
if( ! m_pParser->hasKey( pKey ) )
- return NULL;
+ return nullptr;
const PPDValue* pValue = pKey->getDefaultValue();
if( ! pValue )
@@ -1627,12 +1627,12 @@ const PPDValue* PPDContext::getValue( const PPDKey* pKey ) const
const PPDValue* PPDContext::setValue( const PPDKey* pKey, const PPDValue* pValue, bool bDontCareForConstraints )
{
if( ! m_pParser || ! pKey )
- return NULL;
+ return nullptr;
// pValue can be NULL - it means ignore this option
if( ! m_pParser->hasKey( pKey ) )
- return NULL;
+ return nullptr;
// check constraints
if( pValue )
@@ -1667,7 +1667,7 @@ const PPDValue* PPDContext::setValue( const PPDKey* pKey, const PPDValue* pValue
}
}
else
- m_aCurrentValues[ pKey ] = NULL;
+ m_aCurrentValues[ pKey ] = nullptr;
return pValue;
}
@@ -1800,7 +1800,7 @@ char* PPDContext::getStreamableBuffer( sal_uLong& rBytes ) const
{
rBytes = 0;
if( m_aCurrentValues.empty() )
- return NULL;
+ return nullptr;
hash_type::const_iterator it;
for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end(); ++it )
{
@@ -1857,7 +1857,7 @@ void PPDContext::rebuildFromStreamBuffer( char* pBuffer, sal_uLong nBytes )
const PPDKey* pKey = m_pParser->getKey( OStringToOUString( aLine.copy( 0, nPos ), RTL_TEXTENCODING_MS_1252 ) );
if( pKey )
{
- const PPDValue* pValue = NULL;
+ const PPDValue* pValue = nullptr;
OUString aOption(OStringToOUString(aLine.copy(nPos+1), RTL_TEXTENCODING_MS_1252));
if (aOption != "*nil")
pValue = pKey->getValue( aOption );
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index e4ddbc8d3ba6..3bb9475e32be 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -101,11 +101,11 @@ void PrinterInfoManager::release()
{
SalData* pSalData = GetSalData();
delete pSalData->m_pPIManager;
- pSalData->m_pPIManager = NULL;
+ pSalData->m_pPIManager = nullptr;
}
PrinterInfoManager::PrinterInfoManager( Type eType ) :
- m_pQueueInfo( NULL ),
+ m_pQueueInfo( nullptr ),
m_eType( eType ),
m_bUseIncludeFeature( false ),
m_bUseJobPatch( true ),
@@ -206,7 +206,7 @@ void PrinterInfoManager::initialize()
}
std::list< OUString > aDirList;
- psp::getPrinterPathList( aDirList, NULL );
+ psp::getPrinterPathList( aDirList, nullptr );
std::list< OUString >::const_iterator print_dir_it;
for( print_dir_it = aDirList.begin(); print_dir_it != aDirList.end(); ++print_dir_it )
{
@@ -265,7 +265,7 @@ void PrinterInfoManager::initialize()
{
m_aGlobalDefaults.m_aContext.
setValue( pKey,
- aValue.equals("*nil") ? NULL : pKey->getValue(OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)),
+ aValue.equals("*nil") ? nullptr : pKey->getValue(OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)),
true );
}
}
@@ -353,7 +353,7 @@ void PrinterInfoManager::initialize()
{
const PPDKey* pDefKey = m_aGlobalDefaults.m_aContext.getModifiedKey( nPPDValueModified );
const PPDValue* pDefValue = m_aGlobalDefaults.m_aContext.getValue( pDefKey );
- const PPDKey* pPrinterKey = pDefKey ? aPrinter.m_aInfo.m_pParser->getKey( pDefKey->getKey() ) : NULL;
+ const PPDKey* pPrinterKey = pDefKey ? aPrinter.m_aInfo.m_pParser->getKey( pDefKey->getKey() ) : nullptr;
if( pDefKey && pPrinterKey )
// at least the options exist in both PPDs
{
@@ -365,7 +365,7 @@ void PrinterInfoManager::initialize()
aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, pPrinterValue );
}
else
- aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, NULL );
+ aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, nullptr );
}
}
@@ -449,7 +449,7 @@ void PrinterInfoManager::initialize()
{
aPrinter.m_aInfo.m_aContext.
setValue( pKey,
- aValue.equals("*nil") ? NULL : pKey->getValue(OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)),
+ aValue.equals("*nil") ? nullptr : pKey->getValue(OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)),
true );
}
}
@@ -499,7 +499,7 @@ void PrinterInfoManager::initialize()
const PPDKey* pDefKey = aDefaultInfo.m_pParser->getKey( OUString( "PageSize" ) );
const PPDKey* pMergeKey = aMergeInfo.m_pParser->getKey( OUString( "PageSize" ) );
const PPDValue* pDefValue = aDefaultInfo.m_aContext.getValue( pDefKey );
- const PPDValue* pMergeValue = pMergeKey ? pMergeKey->getValue( pDefValue->m_aOption ) : NULL;
+ const PPDValue* pMergeValue = pMergeKey ? pMergeKey->getValue( pDefValue->m_aOption ) : nullptr;
if( pMergeKey && pMergeValue )
aMergeInfo.m_aContext.setValue( pMergeKey, pMergeValue );
}
@@ -716,7 +716,7 @@ bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUStrin
{
bool bSuccess = false;
- const PPDParser* pParser = NULL;
+ const PPDParser* pParser = nullptr;
if( m_aPrinters.find( rPrinterName ) == m_aPrinters.end() && ( pParser = PPDParser::getParser( rDriverName ) ) )
{
Printer aPrinter;
@@ -732,7 +732,7 @@ bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUStrin
{
const PPDKey* pDefKey = m_aGlobalDefaults.m_aContext.getModifiedKey( nPPDValueModified );
const PPDValue* pDefValue = m_aGlobalDefaults.m_aContext.getValue( pDefKey );
- const PPDKey* pPrinterKey = pDefKey ? aPrinter.m_aInfo.m_pParser->getKey( pDefKey->getKey() ) : NULL;
+ const PPDKey* pPrinterKey = pDefKey ? aPrinter.m_aInfo.m_pParser->getKey( pDefKey->getKey() ) : nullptr;
if( pDefKey && pPrinterKey )
// at least the options exist in both PPDs
{
@@ -744,7 +744,7 @@ bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUStrin
aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, pPrinterValue );
}
else
- aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, NULL );
+ aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, nullptr );
}
}
@@ -840,7 +840,7 @@ const std::list< PrinterInfoManager::SystemPrintQueue >& PrinterInfoManager::get
{
m_aSystemPrintCommand = m_pQueueInfo->getCommand();
m_pQueueInfo->getSystemQueues( m_aSystemPrintQueues );
- delete m_pQueueInfo, m_pQueueInfo = NULL;
+ delete m_pQueueInfo, m_pQueueInfo = nullptr;
}
return m_aSystemPrintQueues;
@@ -912,7 +912,7 @@ void PrinterInfoManager::setDefaultPaper( PPDContext& rContext ) const
}
// paper not set, fill in default value
- const PPDValue* pPaperVal = NULL;
+ const PPDValue* pPaperVal = nullptr;
int nValues = pPageSizeKey->countValues();
for( int i = 0; i < nValues && ! pPaperVal; i++ )
{
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 0b55e286acb5..781721b511fa 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -459,7 +459,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
if( ! mpParent )
{
// find the last document window (if any)
- const X11SalFrame* pFrame = NULL;
+ const X11SalFrame* pFrame = nullptr;
const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames();
std::list< SalFrame* >::const_iterator it = rFrames.begin();
while( it != rFrames.end() )
@@ -600,7 +600,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
nAttrMask,
&Attributes );
// FIXME: see above: fake shell window for now to own window
- if( pParentData == NULL )
+ if( pParentData == nullptr )
{
mhShellWindow = mhWindow;
}
@@ -725,7 +725,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
setFrameTypeAndDecoration( this,
eType,
nDecoFlags,
- hPresentationWindow ? NULL : mpParent );
+ hPresentationWindow ? nullptr : mpParent );
if( (nStyle_ & (SalFrameStyleFlags::DEFAULT |
SalFrameStyleFlags::OWNERDRAWDECORATION|
@@ -771,8 +771,8 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle,
mhBackgroundPixmap = None;
m_bSetFocusOnMap = false;
- pGraphics_ = NULL;
- pFreeGraphics_ = NULL;
+ pGraphics_ = nullptr;
+ pFreeGraphics_ = nullptr;
hCursor_ = None;
nCaptured_ = 0;
@@ -801,7 +801,7 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle,
m_bXEmbed = false;
- mpInputContext = NULL;
+ mpInputContext = nullptr;
mbInputFocus = False;
maAlwaysOnTopRaiseTimer.SetTimeoutHdl( LINK( this, X11SalFrame, HandleAlwaysOnTopRaise ) );
@@ -816,7 +816,7 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle,
mnIconID = 1; // ICON_LO_DEFAULT
- m_pClipRectangles = NULL;
+ m_pClipRectangles = nullptr;
m_nCurClipRect = 0;
m_nMaxClipRect = 0;
@@ -833,7 +833,7 @@ X11SalFrame::~X11SalFrame()
if( m_pClipRectangles )
{
delete [] m_pClipRectangles;
- m_pClipRectangles = NULL;
+ m_pClipRectangles = nullptr;
m_nCurClipRect = m_nMaxClipRect = 0;
}
@@ -930,26 +930,26 @@ const SystemEnvData* X11SalFrame::GetSystemData() const
pFrame->maSystemChildData.pDisplay = GetXDisplay();
pFrame->maSystemChildData.aWindow = pFrame->GetWindow();
pFrame->maSystemChildData.pSalFrame = pFrame;
- pFrame->maSystemChildData.pWidget = NULL;
+ pFrame->maSystemChildData.pWidget = nullptr;
pFrame->maSystemChildData.pVisual = GetDisplay()->GetVisual( m_nXScreen ).GetVisual();
pFrame->maSystemChildData.nScreen = m_nXScreen.getXScreen();
pFrame->maSystemChildData.nDepth = GetDisplay()->GetVisual( m_nXScreen ).GetDepth();
pFrame->maSystemChildData.aColormap = GetDisplay()->GetColormap( m_nXScreen ).GetXColormap();
- pFrame->maSystemChildData.pAppContext = NULL;
+ pFrame->maSystemChildData.pAppContext = nullptr;
pFrame->maSystemChildData.aShellWindow = pFrame->GetShellWindow();
- pFrame->maSystemChildData.pShellWidget = NULL;
+ pFrame->maSystemChildData.pShellWidget = nullptr;
return &maSystemChildData;
}
SalGraphics *X11SalFrame::AcquireGraphics()
{
if( pGraphics_ )
- return NULL;
+ return nullptr;
if( pFreeGraphics_ )
{
pGraphics_ = pFreeGraphics_;
- pFreeGraphics_ = NULL;
+ pFreeGraphics_ = nullptr;
}
else
{
@@ -968,7 +968,7 @@ void X11SalFrame::ReleaseGraphics( SalGraphics *pGraphics )
return;
pFreeGraphics_ = pGraphics_;
- pGraphics_ = NULL;
+ pGraphics_ = nullptr;
}
void X11SalFrame::updateGraphics( bool bClear )
@@ -990,7 +990,7 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon )
mnIconID = nIcon;
- XIconSize *pIconSize = NULL;
+ XIconSize *pIconSize = nullptr;
int nSizes = 0;
int iconSize = 32;
if ( XGetIconSizes( GetXDisplay(), GetDisplay()->GetRootWindow( m_nXScreen ), &pIconSize, &nSizes ) )
@@ -1281,7 +1281,7 @@ void X11SalFrame::Show( bool bVisible, bool bNoActivate )
);
}
}
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
/*
* sometimes a message box/dialogue is brought up when a frame is not mapped
@@ -1618,7 +1618,7 @@ void X11SalFrame::SetAlwaysOnTop( bool bOnTop )
void X11SalFrame::SetWindowState( const SalFrameState *pState )
{
- if (pState == NULL)
+ if (pState == nullptr)
return;
// Request for position or size change
@@ -1870,7 +1870,7 @@ void X11SalFrame::SetSize( const Size &rSize )
maGeometry.nHeight = rSize.Height();
// allow the external status window to reposition
- if (mbInputFocus && mpInputContext != NULL)
+ if (mbInputFocus && mpInputContext != nullptr)
mpInputContext->SetICFocus ( this );
}
}
@@ -1978,14 +1978,14 @@ void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
updateScreenNumber();
if( bSized && ! bMoved )
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
else if( bMoved && ! bSized )
- CallCallback( SALEVENT_MOVE, NULL );
+ CallCallback( SALEVENT_MOVE, nullptr );
else
- CallCallback( SALEVENT_MOVERESIZE, NULL );
+ CallCallback( SALEVENT_MOVERESIZE, nullptr );
// allow the external status window to reposition
- if (mbInputFocus && mpInputContext != NULL)
+ if (mbInputFocus && mpInputContext != nullptr)
mpInputContext->SetICFocus ( this );
}
@@ -2293,7 +2293,7 @@ void X11SalFrame::Flush()
void X11SalFrame::SetInputContext( SalInputContext* pContext )
{
- if (pContext == NULL)
+ if (pContext == nullptr)
return;
// 1. We should create an input context for this frame
@@ -2309,7 +2309,7 @@ void X11SalFrame::SetInputContext( SalInputContext* pContext )
// 2. We should use on-the-spot inputstyle
// only when InputContextFlags::ExtTExt is set.
- if (mpInputContext == NULL)
+ if (mpInputContext == nullptr)
{
vcl::I18NStatus& rStatus( vcl::I18NStatus::get() );
rStatus.setParent( this );
@@ -2328,7 +2328,7 @@ void X11SalFrame::SetInputContext( SalInputContext* pContext )
void X11SalFrame::EndExtTextInput( EndExtTextInputFlags nFlags )
{
- if (mpInputContext != NULL)
+ if (mpInputContext != nullptr)
mpInputContext->EndExtTextInput( nFlags );
}
@@ -2361,7 +2361,7 @@ void X11SalFrame::UpdateSettings( AllSettings& rSettings )
void X11SalFrame::CaptureMouse( bool bCapture )
{
- nCaptured_ = pDisplay_->CaptureMouse( bCapture ? this : NULL );
+ nCaptured_ = pDisplay_->CaptureMouse( bCapture ? this : nullptr );
}
void X11SalFrame::SetParent( SalFrame* pNewParent )
@@ -2437,7 +2437,7 @@ void X11SalFrame::createNewWindow( ::Window aNewParent, SalX11Screen nXScreen )
if ( aParentData.aWindow != None )
Init( nStyle_ | SalFrameStyleFlags::PLUG, nXScreen, &aParentData );
else
- Init( nStyle_ & ~SalFrameStyleFlags::PLUG, nXScreen, NULL, true );
+ Init( nStyle_ & ~SalFrameStyleFlags::PLUG, nXScreen, nullptr, true );
// update graphics if necessary
updateGraphics(false);
@@ -2448,7 +2448,7 @@ void X11SalFrame::createNewWindow( ::Window aNewParent, SalX11Screen nXScreen )
if( mpParent )
{
if( mpParent->m_nXScreen != m_nXScreen )
- SetParent( NULL );
+ SetParent( nullptr );
else
pDisplay_->getWMAdaptor()->changeReferenceFrame( this, mpParent );
}
@@ -2936,7 +2936,7 @@ bool X11SalFrame::endUnicodeSequence()
bool bWasInput = !rSeq.isEmpty();
rSeq.clear();
if( bWasInput && ! aDeleteWatch.isDeleted() )
- CallCallback(SALEVENT_ENDEXTTEXTINPUT, NULL);
+ CallCallback(SALEVENT_ENDEXTTEXTINPUT, nullptr);
return bWasInput;
}
@@ -3008,7 +3008,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
unsigned char *pPrintable = static_cast<unsigned char*>(alloca( nLen ));
// singlebyte code composed by input method, the new default
- if (mpInputContext != NULL && mpInputContext->UseContext())
+ if (mpInputContext != nullptr && mpInputContext->UseContext())
{
// returns a keysym as well as the pPrintable (in system encoding)
// printable may be empty.
@@ -3229,7 +3229,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
nSize = 0;
}
- if ( mpInputContext != NULL
+ if ( mpInputContext != nullptr
&& mpInputContext->UseContext()
&& KeyRelease != pEvent->type
&& ( (nSize > 1)
@@ -3271,7 +3271,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
if (! aDeleteWatch.isDeleted())
{
- if (mpInputContext != NULL && mpInputContext->UseContext())
+ if (mpInputContext != nullptr && mpInputContext->UseContext())
mpInputContext->UpdateSpotLocation();
}
@@ -3295,7 +3295,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
* status window does not follow the application frame
*/
- if ( mpInputContext != NULL )
+ if ( mpInputContext != nullptr )
{
if( FocusIn == pEvent->type )
mpInputContext->SetICFocus( this );
@@ -3323,8 +3323,8 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
mbInputFocus = True;
ImplSVData* pSVData = ImplGetSVData();
- long nRet = CallCallback( SALEVENT_GETFOCUS, 0 );
- if ((mpParent != NULL && nStyle_ == SalFrameStyleFlags::NONE)
+ long nRet = CallCallback( SALEVENT_GETFOCUS, nullptr );
+ if ((mpParent != nullptr && nStyle_ == SalFrameStyleFlags::NONE)
&& pSVData->maWinData.mpFirstFloat )
{
FloatWinPopupFlags nMode = pSVData->maWinData.mpFirstFloat->GetPopupModeFlags();
@@ -3338,7 +3338,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
mbInputFocus = False;
mbSendExtKeyModChange = false;
mnExtKeyMod = 0;
- return CallCallback( SALEVENT_LOSEFOCUS, 0 );
+ return CallCallback( SALEVENT_LOSEFOCUS, nullptr );
}
}
@@ -3435,7 +3435,7 @@ void X11SalFrame::RestackChildren()
if( ! GetDisplay()->getWMAdaptor()->isTransientBehaviourAsExpected()
&& !maChildren.empty() )
{
- ::Window aRoot, aParent, *pChildren = NULL;
+ ::Window aRoot, aParent, *pChildren = nullptr;
unsigned int nChildren;
if( XQueryTree( GetXDisplay(),
GetDisplay()->GetRootWindow( m_nXScreen ),
@@ -3517,7 +3517,7 @@ long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
{
maGeometry.nX = pEvent->x;
maGeometry.nY = pEvent->y;
- CallCallback( SALEVENT_MOVE, NULL );
+ CallCallback( SALEVENT_MOVE, nullptr );
}
return 1;
}
@@ -3552,11 +3552,11 @@ long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
RestackChildren();
if( bSized && ! bMoved )
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
else if( bMoved && ! bSized )
- CallCallback( SALEVENT_MOVE, NULL );
+ CallCallback( SALEVENT_MOVE, nullptr );
else if( bMoved && bSized )
- CallCallback( SALEVENT_MOVERESIZE, NULL );
+ CallCallback( SALEVENT_MOVERESIZE, nullptr );
return 1;
}
@@ -3588,7 +3588,7 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
hWM_Parent = GetShellWindow();
do
{
- Children = NULL;
+ Children = nullptr;
XQueryTree( pDisplay,
hWM_Parent,
&hRoot,
@@ -3744,7 +3744,7 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
}
}
if( bResized )
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
GetGenericData()->ErrorTrapPop();
@@ -3756,7 +3756,7 @@ long X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent )
Atom actual_type;
int actual_format;
unsigned long nitems, bytes_after;
- unsigned char *prop = NULL;
+ unsigned char *prop = nullptr;
if( 0 != XGetWindowProperty( GetXDisplay(),
GetShellWindow(),
@@ -3922,9 +3922,9 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
bMapped_ = true;
bViewable_ = true;
nRet = 1;
- if ( mpInputContext != NULL )
+ if ( mpInputContext != nullptr )
mpInputContext->Map( this );
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
bool bSetFocus = m_bSetFocusOnMap;
/* another workaround for sawfish: if a transient window for the same parent is shown
@@ -3981,9 +3981,9 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
bMapped_ = false;
bViewable_ = false;
nRet = 1;
- if ( mpInputContext != NULL )
+ if ( mpInputContext != nullptr )
mpInputContext->Unmap( this );
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
}
break;
@@ -4062,7 +4062,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
void X11SalFrame::ResetClipRegion()
{
delete [] m_pClipRectangles;
- m_pClipRectangles = NULL;
+ m_pClipRectangles = nullptr;
m_nCurClipRect = m_nMaxClipRect = 0;
const int dest_kind = ShapeBounding;
@@ -4099,7 +4099,7 @@ void X11SalFrame::BeginSetClipRegion( sal_uLong nRects )
if( nRects )
m_pClipRectangles = new XRectangle[nRects];
else
- m_pClipRectangles = NULL;
+ m_pClipRectangles = nullptr;
m_nMaxClipRect = static_cast<int>(nRects);
m_nCurClipRect = 0;
}
diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx
index e538ae423e99..3622aae2f144 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -55,7 +55,7 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
&event_base, &error_base ) )
{
delete pObject;
- return NULL;
+ return nullptr;
}
pObject->mpParent = pParent;
@@ -141,7 +141,7 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
{
pObject->maSecondary = None;
delete pObject;
- return NULL;
+ return nullptr;
}
XReparentWindow( pDisp, pObject->maSecondary, pObject->maPrimary, 0, 0 );
}
@@ -154,18 +154,18 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
pObjData->pDisplay = pDisp;
pObjData->aWindow = pObject->maSecondary;
- pObjData->pWidget = NULL;
+ pObjData->pWidget = nullptr;
pObjData->pVisual = pVisual;
pObjData->nDepth = nDepth;
pObjData->aColormap = aVisID == pSalDisp->GetVisual( nXScreen ).GetVisualId() ?
pSalDisp->GetColormap( nXScreen ).GetXColormap() : None;
- pObjData->pAppContext = NULL;
+ pObjData->pAppContext = nullptr;
XSync(pDisp, False);
if( GetGenericData()->ErrorTrapPop( false ) )
{
delete pObject;
- return NULL;
+ return nullptr;
}
return pObject;
@@ -181,7 +181,7 @@ void X11SalInstance::DestroyObject( SalObject* pObject )
SalClipRegion::SalClipRegion()
{
- ClipRectangleList = NULL;
+ ClipRectangleList = nullptr;
numClipRectangles = 0;
maxClipRectangles = 0;
nClipRegionType = SAL_OBJECT_CLIP_INCLUDERECTS;
@@ -222,7 +222,7 @@ SalClipRegion::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
// SalObject Implementation
X11SalObject::X11SalObject()
- : mpParent(NULL)
+ : mpParent(nullptr)
, maPrimary(0)
, maSecondary(0)
, maColormap(0)
@@ -231,14 +231,14 @@ X11SalObject::X11SalObject()
maSystemChildData.nSize = sizeof( SystemEnvData );
maSystemChildData.pDisplay = vcl_sal::getSalDisplay(GetGenericData())->GetDisplay();
maSystemChildData.aWindow = None;
- maSystemChildData.pSalFrame = 0;
- maSystemChildData.pWidget = 0;
- maSystemChildData.pVisual = 0;
+ maSystemChildData.pSalFrame = nullptr;
+ maSystemChildData.pWidget = nullptr;
+ maSystemChildData.pVisual = nullptr;
maSystemChildData.nDepth = 0;
maSystemChildData.aColormap = 0;
- maSystemChildData.pAppContext = NULL;
+ maSystemChildData.pAppContext = nullptr;
maSystemChildData.aShellWindow = 0;
- maSystemChildData.pShellWidget = NULL;
+ maSystemChildData.pShellWidget = nullptr;
std::list< SalObject* >& rObjects = vcl_sal::getSalDisplay(GetGenericData())->getSalObjects();
rObjects.push_back( this );
@@ -484,13 +484,13 @@ bool X11SalObject::Dispatch( XEvent* pEvent )
pObject->mbVisible = true;
return true;
case ButtonPress:
- pObject->CallCallback( SALOBJ_EVENT_TOTOP, NULL );
+ pObject->CallCallback( SALOBJ_EVENT_TOTOP, nullptr );
return true;
case FocusIn:
- pObject->CallCallback( SALOBJ_EVENT_GETFOCUS, NULL );
+ pObject->CallCallback( SALOBJ_EVENT_GETFOCUS, nullptr );
return true;
case FocusOut:
- pObject->CallCallback( SALOBJ_EVENT_LOSEFOCUS, NULL );
+ pObject->CallCallback( SALOBJ_EVENT_LOSEFOCUS, nullptr );
return true;
default: break;
}
diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx b/vcl/unx/generic/window/screensaverinhibitor.cxx
index 2d515f363631..206737062a6a 100644
--- a/vcl/unx/generic/window/screensaverinhibitor.cxx
+++ b/vcl/unx/generic/window/screensaverinhibitor.cxx
@@ -78,11 +78,11 @@ void dbusInhibit( bool bInhibit,
}
gboolean res;
- GError *error = NULL;
- DBusGProxy *proxy = NULL;
+ GError *error = nullptr;
+ DBusGProxy *proxy = nullptr;
DBusGConnection *session_connection = dbus_g_bus_get( DBUS_BUS_SESSION, &error );
- if (error != NULL) {
+ if (error != nullptr) {
SAL_WARN( "vcl.screensaverinhibitor", "failed to connect to dbus session bus: " << error->message );
g_error_free( error );
return;
@@ -92,7 +92,7 @@ void dbusInhibit( bool bInhibit,
service,
path,
interface );
- if (proxy == NULL) {
+ if (proxy == nullptr) {
SAL_INFO( "vcl.screensaverinhibitor", "could not get dbus proxy: " << service );
return;
}
@@ -122,7 +122,7 @@ void dbusInhibit( bool bInhibit,
}
}
- if (error != NULL)
+ if (error != nullptr)
{
SAL_INFO( "vcl.screensaverinhibitor", "Error: " << error->message );
g_error_free( error );
diff --git a/vcl/unx/gtk/a11y/atkaction.cxx b/vcl/unx/gtk/a11y/atkaction.cxx
index 7bdf93206c63..c9e3ec776f6a 100644
--- a/vcl/unx/gtk/a11y/atkaction.cxx
+++ b/vcl/unx/gtk/a11y/atkaction.cxx
@@ -260,7 +260,7 @@ action_wrapper_set_description (AtkAction *, gint, const gchar *)
void
actionIfaceInit (AtkActionIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->do_action = action_wrapper_do_action;
iface->get_n_actions = action_wrapper_get_n_actions;
diff --git a/vcl/unx/gtk/a11y/atkcomponent.cxx b/vcl/unx/gtk/a11y/atkcomponent.cxx
index 2afdca099d19..cbc4b8e38b27 100644
--- a/vcl/unx/gtk/a11y/atkcomponent.cxx
+++ b/vcl/unx/gtk/a11y/atkcomponent.cxx
@@ -126,7 +126,7 @@ component_wrapper_ref_accessible_at_point (AtkComponent *component,
g_warning( "Exception in getAccessibleAtPoint()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -289,14 +289,14 @@ component_wrapper_add_focus_handler (AtkComponent *component,
match_type = (GSignalMatchType) (G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC);
signal_id = g_signal_lookup( "focus-event", ATK_TYPE_OBJECT );
- ret = g_signal_handler_find( component, match_type, signal_id, 0, NULL,
- static_cast<gpointer>(&handler), NULL);
+ ret = g_signal_handler_find( component, match_type, signal_id, 0, nullptr,
+ static_cast<gpointer>(&handler), nullptr);
if (!ret)
{
return g_signal_connect_closure_by_id (component,
signal_id, 0,
g_cclosure_new (
- G_CALLBACK (handler), NULL,
+ G_CALLBACK (handler), nullptr,
nullptr),
FALSE);
}
@@ -322,7 +322,7 @@ component_wrapper_remove_focus_handler (AtkComponent *component,
void
componentIfaceInit (AtkComponentIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->add_focus_handler = component_wrapper_add_focus_handler;
iface->contains = component_wrapper_contains;
diff --git a/vcl/unx/gtk/a11y/atkeditabletext.cxx b/vcl/unx/gtk/a11y/atkeditabletext.cxx
index cc058b5b1019..f601f137dd04 100644
--- a/vcl/unx/gtk/a11y/atkeditabletext.cxx
+++ b/vcl/unx/gtk/a11y/atkeditabletext.cxx
@@ -179,7 +179,7 @@ editable_text_wrapper_copy_text( AtkEditableText *text,
void
editableTextIfaceInit (AtkEditableTextIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->set_text_contents = editable_text_wrapper_set_text_contents;
iface->insert_text = editable_text_wrapper_insert_text;
diff --git a/vcl/unx/gtk/a11y/atkfactory.cxx b/vcl/unx/gtk/a11y/atkfactory.cxx
index 7512815b9859..a8428fb4ec86 100644
--- a/vcl/unx/gtk/a11y/atkfactory.cxx
+++ b/vcl/unx/gtk/a11y/atkfactory.cxx
@@ -62,11 +62,11 @@ atk_noop_object_wrapper_get_type()
nullptr,
reinterpret_cast<GClassInitFunc>(atk_noop_object_wrapper_class_init),
nullptr,
- NULL,
+ nullptr,
sizeof (AtkObjectWrapper),
0,
nullptr,
- NULL
+ nullptr
} ;
type = g_type_register_static (ATK_TYPE_OBJECT, "OOoAtkNoOpObj", &typeInfo, (GTypeFlags)0) ;
@@ -79,8 +79,8 @@ atk_noop_object_wrapper_new()
{
AtkObject *accessible;
- accessible = static_cast<AtkObject *>(g_object_new (atk_noop_object_wrapper_get_type(), NULL));
- g_return_val_if_fail (accessible != NULL, NULL);
+ accessible = static_cast<AtkObject *>(g_object_new (atk_noop_object_wrapper_get_type(), nullptr));
+ g_return_val_if_fail (accessible != nullptr, NULL);
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 != NULL, NULL );
+ g_return_val_if_fail( pFrame != nullptr, NULL );
vcl::Window* pFrameWindow = pFrame->GetWindow();
if( pFrameWindow )
@@ -150,7 +150,7 @@ wrapper_factory_create_accessible( GObject *obj )
}
}
- return NULL;
+ return nullptr;
}
AtkObject* ooo_fixed_get_accessible(GtkWidget *obj)
@@ -174,8 +174,8 @@ wrapper_factory_get_type()
static const GTypeInfo tinfo =
{
sizeof (AtkObjectFactoryClass),
- NULL, NULL, reinterpret_cast<GClassInitFunc>(wrapper_factory_class_init),
- NULL, NULL, sizeof (AtkObjectFactory), 0, NULL, NULL
+ nullptr, nullptr, reinterpret_cast<GClassInitFunc>(wrapper_factory_class_init),
+ nullptr, nullptr, sizeof (AtkObjectFactory), 0, nullptr, nullptr
};
t = g_type_register_static (
diff --git a/vcl/unx/gtk/a11y/atkhypertext.cxx b/vcl/unx/gtk/a11y/atkhypertext.cxx
index aebb11a19f68..25f41163cdc9 100644
--- a/vcl/unx/gtk/a11y/atkhypertext.cxx
+++ b/vcl/unx/gtk/a11y/atkhypertext.cxx
@@ -38,7 +38,7 @@ static uno::Reference< accessibility::XAccessibleHyperlink >
return pLink->xLink;
}
-static GObjectClass *hyper_parent_class = NULL;
+static GObjectClass *hyper_parent_class = nullptr;
extern "C" {
@@ -62,7 +62,7 @@ hyper_link_get_uri( AtkHyperlink *pLink,
catch(const uno::Exception&) {
g_warning( "Exception in hyper_link_get_uri" );
}
- return NULL;
+ return nullptr;
}
static AtkObject *
@@ -77,7 +77,7 @@ hyper_link_get_object( AtkHyperlink *pLink,
catch(const uno::Exception&) {
g_warning( "Exception in hyper_link_get_object" );
}
- return NULL;
+ return nullptr;
}
static gint
hyper_link_get_end_index( AtkHyperlink *pLink )
@@ -160,21 +160,21 @@ hyper_link_get_type()
if (!type) {
static const GTypeInfo tinfo = {
sizeof (AtkHyperlinkClass),
- NULL, /* base init */
- NULL, /* base finalize */
+ nullptr, /* base init */
+ nullptr, /* base finalize */
reinterpret_cast<GClassInitFunc>(hyper_link_class_init),
- NULL, /* class finalize */
- NULL, /* class data */
+ nullptr, /* class finalize */
+ nullptr, /* class data */
sizeof (HyperLink), /* instance size */
0, /* nb preallocs */
- NULL, /* instance init */
- NULL /* value table */
+ nullptr, /* instance init */
+ nullptr /* value table */
};
static const GInterfaceInfo atk_action_info = {
reinterpret_cast<GInterfaceInitFunc>(actionIfaceInit),
nullptr,
- NULL
+ nullptr
};
type = g_type_register_static (ATK_TYPE_HYPERLINK,
@@ -215,11 +215,11 @@ hypertext_get_link( AtkHypertext *hypertext,
= getHypertext( hypertext );
if( pHypertext.is() )
{
- HyperLink *pLink = static_cast<HyperLink *>(g_object_new( hyper_link_get_type(), NULL ));
+ HyperLink *pLink = static_cast<HyperLink *>(g_object_new( hyper_link_get_type(), nullptr ));
pLink->xLink = pHypertext->getHyperLink( link_index );
if( !pLink->xLink.is() ) {
g_object_unref( G_OBJECT( pLink ) );
- pLink = NULL;
+ pLink = nullptr;
}
return ATK_HYPERLINK( pLink );
}
@@ -228,7 +228,7 @@ hypertext_get_link( AtkHypertext *hypertext,
g_warning( "Exception in getHyperLink()" );
}
- return NULL;
+ return nullptr;
}
static gint
@@ -269,7 +269,7 @@ hypertext_get_link_index( AtkHypertext *hypertext,
void
hypertextIfaceInit (AtkHypertextIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->get_link = hypertext_get_link;
iface->get_n_links = hypertext_get_n_links;
diff --git a/vcl/unx/gtk/a11y/atkimage.cxx b/vcl/unx/gtk/a11y/atkimage.cxx
index c6f6e75f1ece..c1652a4ee582 100644
--- a/vcl/unx/gtk/a11y/atkimage.cxx
+++ b/vcl/unx/gtk/a11y/atkimage.cxx
@@ -67,7 +67,7 @@ image_get_image_description( AtkImage *image )
g_warning( "Exception in getAccessibleImageDescription()" );
}
- return NULL;
+ return nullptr;
}
static void
@@ -120,7 +120,7 @@ image_set_image_description( AtkImage *, const gchar * )
void
imageIfaceInit (AtkImageIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->set_image_description = image_set_image_description;
iface->get_image_description = image_get_image_description;
diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx
index 753a7c2be3f9..f9c25fdd6fae 100644
--- a/vcl/unx/gtk/a11y/atklistener.cxx
+++ b/vcl/unx/gtk/a11y/atklistener.cxx
@@ -77,7 +77,7 @@ extern "C" {
if( atk_get_focus_object() == atk_obj )
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
- atk_focus_tracker_notify( NULL );
+ atk_focus_tracker_notify( nullptr );
SAL_WNODEPRECATED_DECLARATIONS_POP
}
g_object_unref( G_OBJECT( atk_obj ) );
@@ -101,7 +101,7 @@ void AtkListener::disposing( const lang::EventObject& ) throw (uno::RuntimeExcep
// Release the wrapper object so that it can vanish ..
g_object_unref( mpWrapper );
- mpWrapper = NULL;
+ mpWrapper = nullptr;
}
}
@@ -111,7 +111,7 @@ static AtkObject *getObjFromAny( const uno::Any &rAny )
{
uno::Reference< accessibility::XAccessible > xAccessible;
rAny >>= xAccessible;
- return xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : NULL;
+ return xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : nullptr;
}
/*****************************************************************************/
@@ -154,7 +154,7 @@ void AtkListener::handleChildAdded(
const uno::Reference< accessibility::XAccessibleContext >& rxParent,
const uno::Reference< accessibility::XAccessible>& rxAccessible)
{
- AtkObject * pChild = rxAccessible.is() ? atk_object_wrapper_ref( rxAccessible ) : NULL;
+ AtkObject * pChild = rxAccessible.is() ? atk_object_wrapper_ref( rxAccessible ) : nullptr;
if( pChild )
{
@@ -490,7 +490,7 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven
const char *col;
} aSignalNames[] =
{
- { NULL, NULL }, // dummy
+ { nullptr, nullptr }, // dummy
{ "row_inserted", "column_inserted" }, // INSERT = 1
{ "row_deleted", "column_deleted" } // DELETE = 2
};
diff --git a/vcl/unx/gtk/a11y/atkregistry.cxx b/vcl/unx/gtk/a11y/atkregistry.cxx
index 5fdae5cbd2fb..ff96378c41dc 100644
--- a/vcl/unx/gtk/a11y/atkregistry.cxx
+++ b/vcl/unx/gtk/a11y/atkregistry.cxx
@@ -22,7 +22,7 @@
using namespace ::com::sun::star::accessibility;
using namespace ::com::sun::star::uno;
-static GHashTable *uno_to_gobject = NULL;
+static GHashTable *uno_to_gobject = nullptr;
/*****************************************************************************/
@@ -38,7 +38,7 @@ ooo_wrapper_registry_get(const Reference< XAccessible >& rxAccessible)
return ATK_OBJECT( cached );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -47,7 +47,7 @@ void
ooo_wrapper_registry_add(const Reference< XAccessible >& rxAccessible, AtkObject *obj)
{
if( !uno_to_gobject )
- uno_to_gobject = g_hash_table_new (NULL, NULL);
+ uno_to_gobject = g_hash_table_new (nullptr, nullptr);
g_hash_table_insert( uno_to_gobject, static_cast<gpointer>(rxAccessible.get()), obj );
}
diff --git a/vcl/unx/gtk/a11y/atkselection.cxx b/vcl/unx/gtk/a11y/atkselection.cxx
index 3c75865c6689..eb3b2fcef167 100644
--- a/vcl/unx/gtk/a11y/atkselection.cxx
+++ b/vcl/unx/gtk/a11y/atkselection.cxx
@@ -95,7 +95,7 @@ selection_ref_selection( AtkSelection *selection,
g_warning( "Exception in getSelectedAccessibleChild()" );
}
- return NULL;
+ return nullptr;
}
static gint
@@ -175,7 +175,7 @@ selection_select_all_selection( AtkSelection *selection)
void
selectionIfaceInit( AtkSelectionIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->add_selection = selection_add_selection;
iface->clear_selection = selection_clear_selection;
diff --git a/vcl/unx/gtk/a11y/atktable.cxx b/vcl/unx/gtk/a11y/atktable.cxx
index f4e975264652..a3423f6084d4 100644
--- a/vcl/unx/gtk/a11y/atktable.cxx
+++ b/vcl/unx/gtk/a11y/atktable.cxx
@@ -29,7 +29,7 @@ atk_object_wrapper_conditional_ref( const uno::Reference< accessibility::XAccess
if( rxAccessible.is() )
return atk_object_wrapper_ref( rxAccessible );
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -84,7 +84,7 @@ table_wrapper_ref_at (AtkTable *table,
g_warning( "Exception in getAccessibleCellAt()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -237,7 +237,7 @@ table_wrapper_get_caption( AtkTable *table )
g_warning( "Exception in getAccessibleCaption()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -256,7 +256,7 @@ table_wrapper_get_row_description( AtkTable *table,
g_warning( "Exception in getAccessibleRowDescription()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -275,7 +275,7 @@ table_wrapper_get_column_description( AtkTable *table,
g_warning( "Exception in getAccessibleColumnDescription()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -298,7 +298,7 @@ table_wrapper_get_row_header( AtkTable *table,
g_warning( "Exception in getAccessibleRowHeaders()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -321,7 +321,7 @@ table_wrapper_get_column_header( AtkTable *table,
g_warning( "Exception in getAccessibleColumnHeaders()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -341,7 +341,7 @@ table_wrapper_get_summary( AtkTable *table )
g_warning( "Exception in getAccessibleSummary()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -366,7 +366,7 @@ static gint
table_wrapper_get_selected_columns( AtkTable *table,
gint **pSelected )
{
- *pSelected = NULL;
+ *pSelected = nullptr;
try {
css::uno::Reference<css::accessibility::XAccessibleTable> pTable
= getTable( table );
@@ -386,7 +386,7 @@ static gint
table_wrapper_get_selected_rows( AtkTable *table,
gint **pSelected )
{
- *pSelected = NULL;
+ *pSelected = nullptr;
try {
css::uno::Reference<css::accessibility::XAccessibleTable> pTable
= getTable( table );
@@ -543,7 +543,7 @@ table_wrapper_set_summary( AtkTable *, AtkObject * )
void
tableIfaceInit (AtkTableIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->ref_at = table_wrapper_ref_at;
iface->get_n_rows = table_wrapper_get_n_rows;
diff --git a/vcl/unx/gtk/a11y/atktext.cxx b/vcl/unx/gtk/a11y/atktext.cxx
index 7ae5ff4b3ffc..28f2306fadf6 100644
--- a/vcl/unx/gtk/a11y/atktext.cxx
+++ b/vcl/unx/gtk/a11y/atktext.cxx
@@ -121,7 +121,7 @@ adjust_boundaries( css::uno::Reference<css::accessibility::XAccessibleText> cons
break;
default:
- return NULL;
+ return nullptr;
}
}
@@ -216,7 +216,7 @@ text_wrapper_get_text (AtkText *text,
gint start_offset,
gint end_offset)
{
- gchar * ret = NULL;
+ gchar * ret = nullptr;
g_return_val_if_fail( (end_offset == -1) || (end_offset >= start_offset), NULL );
@@ -225,7 +225,7 @@ text_wrapper_get_text (AtkText *text,
* fool libatk-bridge.so here ..
*/
void * pData = g_object_get_data( G_OBJECT(text), "ooo::text_changed::delete" );
- if( pData != NULL )
+ if( pData != nullptr )
{
accessibility::TextSegment * pTextSegment =
static_cast <accessibility::TextSegment *> (pData);
@@ -281,7 +281,7 @@ text_wrapper_get_text_after_offset (AtkText *text,
g_warning( "Exception in get_text_after_offset()" );
}
- return NULL;
+ return nullptr;
}
static gchar *
@@ -324,7 +324,7 @@ text_wrapper_get_text_at_offset (AtkText *text,
g_warning( "Exception in get_text_at_offset()" );
}
- return NULL;
+ return nullptr;
}
static gunichar
@@ -366,7 +366,7 @@ text_wrapper_get_text_before_offset (AtkText *text,
g_warning( "Exception in text_before_offset()" );
}
- return NULL;
+ return nullptr;
}
static gint
@@ -487,7 +487,7 @@ text_wrapper_get_run_attributes( AtkText *text,
gint *start_offset,
gint *end_offset)
{
- AtkAttributeSet *pSet = NULL;
+ AtkAttributeSet *pSet = nullptr;
try {
bool bOffsetsAreValid = false;
@@ -559,7 +559,7 @@ text_wrapper_get_run_attributes( AtkText *text,
if( pSet )
{
atk_attribute_set_free( pSet );
- pSet = NULL;
+ pSet = nullptr;
}
}
@@ -571,7 +571,7 @@ text_wrapper_get_run_attributes( AtkText *text,
static AtkAttributeSet *
text_wrapper_get_default_attributes( AtkText *text )
{
- AtkAttributeSet *pSet = NULL;
+ AtkAttributeSet *pSet = nullptr;
try {
css::uno::Reference<css::accessibility::XAccessibleTextAttributes>
@@ -591,7 +591,7 @@ text_wrapper_get_default_attributes( AtkText *text )
if( pSet )
{
atk_attribute_set_free( pSet );
- pSet = NULL;
+ pSet = nullptr;
}
}
@@ -732,7 +732,7 @@ text_wrapper_get_selection (AtkText *text,
g_warning( "Exception in getSelectionEnd(), getSelectionStart() or getSelectedText()" );
}
- return NULL;
+ return nullptr;
}
static gboolean
@@ -801,7 +801,7 @@ text_wrapper_set_selection (AtkText *text,
void
textIfaceInit (AtkTextIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->get_text = text_wrapper_get_text;
iface->get_character_at_offset = text_wrapper_get_character_at_offset;
diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx
index cff769c25941..37df30f099e2 100644
--- a/vcl/unx/gtk/a11y/atktextattributes.cxx
+++ b/vcl/unx/gtk/a11y/atktextattributes.cxx
@@ -154,7 +154,7 @@ get_value( const uno::Sequence< beans::PropertyValue >& rAttributeList,
if( nIndex != -1 )
return func(rAttributeList[nIndex].Value);
- return NULL;
+ return nullptr;
}
#define get_bool_value( list, index ) get_value( list, index, Bool2String )
@@ -278,7 +278,7 @@ get_color_value(const uno::Sequence< beans::PropertyValue >& rAttributeList,
return g_strdup_printf( "%u,%u,%u", red, green, blue );
}
- return NULL;
+ return nullptr;
}
static bool
@@ -299,7 +299,7 @@ String2Color( uno::Any& rAny, const gchar * value )
static gchar*
FontSlant2Style(const uno::Any& rAny)
{
- const gchar * value = NULL;
+ const gchar * value = nullptr;
switch( rAny.get<awt::FontSlant>() )
{
@@ -330,7 +330,7 @@ FontSlant2Style(const uno::Any& rAny)
if( value )
return g_strdup( value );
- return NULL;
+ return nullptr;
}
static bool
@@ -380,7 +380,7 @@ String2Weight( uno::Any& rAny, const gchar * value )
static gchar*
Adjust2Justification(const uno::Any& rAny)
{
- const gchar * value = NULL;
+ const gchar * value = nullptr;
switch( rAny.get<short>() )
{
@@ -408,7 +408,7 @@ Adjust2Justification(const uno::Any& rAny)
if( value )
return g_strdup( value );
- return NULL;
+ return nullptr;
}
static bool
@@ -437,7 +437,7 @@ const gchar * font_strikethrough[] = {
"none", // FontStrikeout::NONE
"single", // FontStrikeout::SINGLE
"double", // FontStrikeout::DOUBLE
- NULL, // FontStrikeout::DONTKNOW
+ nullptr, // FontStrikeout::DONTKNOW
"bold", // FontStrikeout::BOLD
"with /", // FontStrikeout::SLASH
"with X" // FontStrikeout::X
@@ -453,7 +453,7 @@ Strikeout2String(const uno::Any& rAny)
if( n >= 0 && n < n_strikeout_constants )
return g_strdup( font_strikethrough[n] );
- return NULL;
+ return nullptr;
}
static bool
@@ -461,7 +461,7 @@ String2Strikeout( uno::Any& rAny, const gchar * value )
{
for( sal_Int16 n=0; n < n_strikeout_constants; ++n )
{
- if( ( NULL != font_strikethrough[n] ) &&
+ if( ( nullptr != font_strikethrough[n] ) &&
0 == strncmp( value, font_strikethrough[n], strlen( font_strikethrough[n] ) ) )
{
rAny = uno::makeAny( n );
@@ -477,7 +477,7 @@ String2Strikeout( uno::Any& rAny, const gchar * value )
static gchar*
Underline2String(const uno::Any& rAny)
{
- const gchar * value = NULL;
+ const gchar * value = nullptr;
switch( rAny.get<sal_Int16>() )
{
@@ -500,7 +500,7 @@ Underline2String(const uno::Any& rAny)
if( value )
return g_strdup( value );
- return NULL;
+ return nullptr;
}
static bool
@@ -531,7 +531,7 @@ GetString(const uno::Any& rAny)
if( !aFontName.isEmpty() )
return g_strdup( aFontName.getStr() );
- return NULL;
+ return nullptr;
}
static bool
@@ -713,14 +713,14 @@ String2Locale( uno::Any& rAny, const gchar * value )
bool ret = false;
gchar ** str_array = g_strsplit_set( value, "-.@", -1 );
- if( str_array[0] != NULL )
+ if( str_array[0] != nullptr )
{
ret = true;
lang::Locale aLocale;
aLocale.Language = OUString::createFromAscii(str_array[0]);
- if( str_array[1] != NULL )
+ if( str_array[1] != nullptr )
{
gchar * country = g_ascii_strup(str_array[1], -1);
aLocale.Country = OUString::createFromAscii(country);
@@ -757,7 +757,7 @@ get_font_effect(const uno::Sequence< beans::PropertyValue >& rAttributeList,
return g_strdup(relief[n]);
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -779,12 +779,12 @@ get_text_decoration(const uno::Sequence< beans::PropertyValue >& rAttributeList,
sal_Int32 nBlinkIndex, sal_Int32 nUnderlineIndex,
sal_Int16 nStrikeoutIndex)
{
- gchar * value_list[4] = { NULL, NULL, NULL, NULL };
+ gchar * value_list[4] = { nullptr, nullptr, nullptr, nullptr };
gint count = 0;
// no property value found
if( ( nBlinkIndex == -1 ) && (nUnderlineIndex == -1 ) && (nStrikeoutIndex == -1))
- return NULL;
+ return nullptr;
if( nBlinkIndex != -1 )
{
@@ -848,7 +848,7 @@ WritingMode2Direction( const uno::Any& rAny )
if( 0 <= n && n <= text::WritingMode2::PAGE )
return g_strdup(directions[n]);
- return NULL;
+ return nullptr;
}
// @see http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection
@@ -862,7 +862,7 @@ WritingMode2String( const uno::Any& rAny )
if( 0 <= n && n <= text::WritingMode2::PAGE )
return g_strdup(writing_modes[n]);
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -874,7 +874,7 @@ static gchar *
Escapement2VerticalAlign( const uno::Any& rAny )
{
sal_Int16 n = rAny.get<sal_Int16>();
- gchar * ret = NULL;
+ gchar * ret = nullptr;
// Values are in %, 101% means "automatic"
if( n == 0 )
@@ -896,7 +896,7 @@ static gchar *
LineSpacing2LineHeight( const uno::Any& rAny )
{
style::LineSpacing ls;
- gchar * ret = NULL;
+ gchar * ret = nullptr;
if( rAny >>= ls )
{
@@ -916,7 +916,7 @@ static gchar *
TabStopList2String( const uno::Any& rAny, bool default_tabs )
{
uno::Sequence< style::TabStop > theTabStops;
- gchar * ret = NULL;
+ gchar * ret = nullptr;
if( rAny >>= theTabStops)
{
@@ -1066,7 +1066,7 @@ attribute_set_new_from_property_values(
bool run_attributes_only,
AtkText *text)
{
- AtkAttributeSet* attribute_set = NULL;
+ AtkAttributeSet* attribute_set = nullptr;
sal_Int32 aIndexList[TEXT_ATTRIBUTE_LAST] = { -1 };
@@ -1077,10 +1077,10 @@ attribute_set_new_from_property_values(
find_exported_attributes(aIndexList, rAttributeList);
attribute_set = attribute_set_prepend(attribute_set, ATK_TEXT_ATTR_BG_COLOR,
- get_color_value(rAttributeList, aIndexList, TEXT_ATTRIBUTE_BACKGROUND_COLOR, run_attributes_only ? NULL : text ) );
+ get_color_value(rAttributeList, aIndexList, TEXT_ATTRIBUTE_BACKGROUND_COLOR, run_attributes_only ? nullptr : text ) );
attribute_set = attribute_set_prepend(attribute_set, ATK_TEXT_ATTR_FG_COLOR,
- get_color_value(rAttributeList, aIndexList, TEXT_ATTRIBUTE_FOREGROUND_COLOR, run_attributes_only ? NULL : text) );
+ get_color_value(rAttributeList, aIndexList, TEXT_ATTRIBUTE_FOREGROUND_COLOR, run_attributes_only ? nullptr : text) );
attribute_set = attribute_set_prepend(attribute_set, ATK_TEXT_ATTR_INVISIBLE,
get_bool_value(rAttributeList, aIndexList[TEXT_ATTRIBUTE_HIDDEN]));
@@ -1214,7 +1214,7 @@ AtkAttributeSet*
attribute_set_new_from_extended_attributes(
const css::uno::Reference< css::accessibility::XAccessibleExtendedAttributes >& rExtendedAttributes )
{
- AtkAttributeSet *pSet = NULL;
+ AtkAttributeSet *pSet = nullptr;
// extended attributes is a string of colon-separated pairs of property and value,
// with pairs separated by semicolons. Example: "heading-level:2;weight:bold;"
@@ -1348,7 +1348,7 @@ attribute_set_map_to_property_values(
uno::Sequence< beans::PropertyValue > aAttributeList (g_TextAttrMapSize);
sal_Int32 nIndex = 0;
- for( GSList * item = attribute_set; item != NULL; item = g_slist_next( item ) )
+ for( GSList * item = attribute_set; item != nullptr; item = g_slist_next( item ) )
{
AtkAttribute* attribute = reinterpret_cast<AtkAttribute *>(item);
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index 5108fe04e250..1cb92cdc094a 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -72,7 +72,7 @@ atk_wrapper_focus_idle_handler (gpointer data)
uno::Reference< accessibility::XAccessible > xAccessible = theNextFocusObject::get();
if( xAccessible.get() == static_cast < accessibility::XAccessible * > (data) )
{
- AtkObject *atk_obj = xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : NULL;
+ AtkObject *atk_obj = xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : nullptr;
// Gail does not notify focus changes to NULL, so do we ..
if( atk_obj )
{
@@ -654,7 +654,7 @@ void WindowEventHandler(void *, VclSimpleEvent& rEvent)
}
}
-static Link<VclSimpleEvent&,void> g_aEventListenerLink( NULL, WindowEventHandler );
+static Link<VclSimpleEvent&,void> g_aEventListenerLink( nullptr, WindowEventHandler );
/*****************************************************************************/
@@ -732,11 +732,11 @@ ooo_atk_util_get_type()
nullptr,
reinterpret_cast<GClassInitFunc>(ooo_atk_util_class_init),
nullptr,
- NULL,
+ nullptr,
static_cast<guint16>(type_query.instance_size),
0,
nullptr,
- NULL
+ nullptr
} ;
type = g_type_register_static (parent_type, "OOoUtil", &typeInfo, (GTypeFlags)0) ;
diff --git a/vcl/unx/gtk/a11y/atkvalue.cxx b/vcl/unx/gtk/a11y/atkvalue.cxx
index 1fa6d3bfc099..5e4b943886a3 100644
--- a/vcl/unx/gtk/a11y/atkvalue.cxx
+++ b/vcl/unx/gtk/a11y/atkvalue.cxx
@@ -128,7 +128,7 @@ value_wrapper_set_current_value( AtkValue *value,
void
valueIfaceInit (AtkValueIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->get_current_value = value_wrapper_get_current_value;
iface->get_maximum_value = value_wrapper_get_maximum_value;
diff --git a/vcl/unx/gtk/a11y/atkwindow.cxx b/vcl/unx/gtk/a11y/atkwindow.cxx
index a55312eaf043..cca3aee51f8e 100644
--- a/vcl/unx/gtk/a11y/atkwindow.cxx
+++ b/vcl/unx/gtk/a11y/atkwindow.cxx
@@ -33,8 +33,8 @@ using namespace ::com::sun::star::uno;
extern "C" {
-static void (* window_real_initialize) (AtkObject *obj, gpointer data) = NULL;
-static void (* window_real_finalize) (GObject *obj) = NULL;
+static void (* window_real_initialize) (AtkObject *obj, gpointer data) = nullptr;
+static void (* window_real_finalize) (GObject *obj) = nullptr;
static void
init_from_window( AtkObject *accessible, vcl::Window *pWindow )
@@ -126,7 +126,7 @@ ooo_window_wrapper_clear_focus(gpointer)
{
SolarMutexGuard aGuard;
SAL_WNODEPRECATED_DECLARATIONS_PUSH
- atk_focus_tracker_notify( NULL );
+ atk_focus_tracker_notify( nullptr );
SAL_WNODEPRECATED_DECLARATIONS_POP
return FALSE;
}
@@ -136,7 +136,7 @@ ooo_window_wrapper_clear_focus(gpointer)
static gboolean
ooo_window_wrapper_real_focus_gtk (GtkWidget *, GdkEventFocus *)
{
- g_idle_add( ooo_window_wrapper_clear_focus, NULL );
+ g_idle_add( ooo_window_wrapper_clear_focus, nullptr );
return FALSE;
}
@@ -297,11 +297,11 @@ ooo_window_wrapper_get_type()
nullptr,
reinterpret_cast<GClassInitFunc>(ooo_window_wrapper_class_init),
nullptr,
- NULL,
+ nullptr,
static_cast<guint16>(type_query.instance_size),
0,
nullptr,
- NULL
+ nullptr
} ;
type = g_type_register_static (parent_type, "OOoWindowAtkObject", &typeInfo, (GTypeFlags)0) ;
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index ef04c5862b0f..38f5435a1c0e 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -69,7 +69,7 @@
using namespace ::com::sun::star;
-static GObjectClass *parent_class = NULL;
+static GObjectClass *parent_class = nullptr;
static AtkRelationType mapRelationType( sal_Int16 nRelation )
{
@@ -395,7 +395,7 @@ static AtkAttributeSet *
wrapper_get_attributes( AtkObject *atk_obj )
{
AtkObjectWrapper *obj = ATK_OBJECT_WRAPPER( atk_obj );
- AtkAttributeSet *pSet = NULL;
+ AtkAttributeSet *pSet = nullptr;
try
{
@@ -440,7 +440,7 @@ wrapper_ref_child( AtkObject *atk_obj,
gint i )
{
AtkObjectWrapper *obj = ATK_OBJECT_WRAPPER (atk_obj);
- AtkObject* child = NULL;
+ AtkObject* child = nullptr;
// see comments above atk_object_wrapper_remove_child
if( -1 < i && obj->index_of_child_about_to_be_removed == i )
@@ -525,7 +525,7 @@ wrapper_ref_relation_set( AtkObject *atk_obj )
}
catch(const uno::Exception &) {
g_object_unref( G_OBJECT( pSet ) );
- pSet = NULL;
+ pSet = nullptr;
}
}
@@ -621,15 +621,15 @@ static void
atk_object_wrapper_init (AtkObjectWrapper *wrapper,
AtkObjectWrapperClass*)
{
- wrapper->mpAction = NULL;
- wrapper->mpComponent = NULL;
- wrapper->mpEditableText = NULL;
- wrapper->mpHypertext = NULL;
- wrapper->mpImage = NULL;
- wrapper->mpSelection = NULL;
- wrapper->mpTable = NULL;
- wrapper->mpText = NULL;
- wrapper->mpValue = NULL;
+ wrapper->mpAction = nullptr;
+ wrapper->mpComponent = nullptr;
+ wrapper->mpEditableText = nullptr;
+ wrapper->mpHypertext = nullptr;
+ wrapper->mpImage = nullptr;
+ wrapper->mpSelection = nullptr;
+ wrapper->mpTable = nullptr;
+ wrapper->mpText = nullptr;
+ wrapper->mpValue = nullptr;
}
} // extern "C"
@@ -648,11 +648,11 @@ atk_object_wrapper_get_type()
nullptr,
reinterpret_cast<GClassInitFunc>(atk_object_wrapper_class_init),
nullptr,
- NULL,
+ nullptr,
sizeof (AtkObjectWrapper),
0,
reinterpret_cast<GInstanceInitFunc>(atk_object_wrapper_init),
- NULL
+ nullptr
} ;
type = g_type_register_static (ATK_TYPE_OBJECT,
"OOoAtkObj",
@@ -664,14 +664,14 @@ atk_object_wrapper_get_type()
static bool
isOfType( uno::XInterface *pInterface, const uno::Type & rType )
{
- g_return_val_if_fail( pInterface != NULL, false );
+ g_return_val_if_fail( pInterface != nullptr, false );
bool bIs = false;
try {
uno::Any aRet = pInterface->queryInterface( rType );
bIs = ( ( typelib_TypeClass_INTERFACE == aRet.pType->eTypeClass ) &&
- ( aRet.pReserved != NULL ) );
+ ( aRet.pReserved != nullptr ) );
} catch( const uno::Exception &) { }
return bIs;
@@ -759,9 +759,9 @@ ensureTypeFor( uno::XInterface *pAccessible )
{
GTypeInfo aTypeInfo = {
sizeof( AtkObjectWrapperClass ),
- NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr,
sizeof( AtkObjectWrapper ),
- 0, NULL, NULL
+ 0, nullptr, nullptr
} ;
nType = g_type_register_static( ATK_TYPE_OBJECT_WRAPPER,
aTypeName.getStr(), &aTypeInfo,
@@ -770,7 +770,7 @@ ensureTypeFor( uno::XInterface *pAccessible )
for( int j = 0; j < aTypeTableSize; j++ )
if( bTypes[j] )
{
- GInterfaceInfo aIfaceInfo = { NULL, NULL, NULL };
+ GInterfaceInfo aIfaceInfo = { nullptr, nullptr, nullptr };
aIfaceInfo.interface_init = aTypeTable[j].aInit;
g_type_add_interface_static (nType, aTypeTable[j].aGetGIfaceType(),
&aIfaceInfo);
@@ -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() != NULL, NULL );
+ g_return_val_if_fail( rxAccessible.get() != nullptr, NULL );
AtkObject *obj = ooo_wrapper_registry_get(rxAccessible);
if( obj )
@@ -794,30 +794,30 @@ atk_object_wrapper_ref( const uno::Reference< accessibility::XAccessible > &rxAc
if( create )
return atk_object_wrapper_new( rxAccessible );
- return NULL;
+ return nullptr;
}
AtkObject *
atk_object_wrapper_new( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible,
AtkObject* parent )
{
- g_return_val_if_fail( rxAccessible.get() != NULL, NULL );
+ g_return_val_if_fail( rxAccessible.get() != nullptr, NULL );
- AtkObjectWrapper *pWrap = NULL;
+ AtkObjectWrapper *pWrap = nullptr;
try {
uno::Reference< accessibility::XAccessibleContext > xContext(rxAccessible->getAccessibleContext());
- g_return_val_if_fail( xContext.get() != NULL, NULL );
+ g_return_val_if_fail( xContext.get() != nullptr, NULL );
GType nType = ensureTypeFor( xContext.get() );
- gpointer obj = g_object_new( nType, NULL);
+ gpointer obj = g_object_new( nType, nullptr);
pWrap = ATK_OBJECT_WRAPPER( obj );
pWrap->mpAccessible = rxAccessible;
pWrap->index_of_child_about_to_be_removed = -1;
- pWrap->child_about_to_be_removed = NULL;
+ pWrap->child_about_to_be_removed = nullptr;
pWrap->mpContext = xContext;
@@ -860,7 +860,7 @@ atk_object_wrapper_new( const ::com::sun::star::uno::Reference< ::com::sun::star
if( pWrap )
g_object_unref( pWrap );
- return NULL;
+ return nullptr;
}
}
@@ -888,7 +888,7 @@ void atk_object_wrapper_remove_child(AtkObjectWrapper* wrapper, AtkObject *child
g_signal_emit_by_name( ATK_OBJECT( wrapper ), "children_changed::remove", index, child, NULL );
wrapper->index_of_child_about_to_be_removed = -1;
- wrapper->child_about_to_be_removed = NULL;
+ wrapper->child_about_to_be_removed = nullptr;
}
/*****************************************************************************/
diff --git a/vcl/unx/gtk/a11y/atkwrapper.hxx b/vcl/unx/gtk/a11y/atkwrapper.hxx
index 5662625a3493..939071316692 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.hxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.hxx
@@ -82,7 +82,7 @@ AtkObject * atk_object_wrapper_ref(
AtkObject * atk_object_wrapper_new(
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible,
- AtkObject* parent = NULL );
+ AtkObject* parent = nullptr );
void atk_object_wrapper_add_child(AtkObjectWrapper* wrapper, AtkObject *child, gint index);
void atk_object_wrapper_remove_child(AtkObjectWrapper* wrapper, AtkObject *child, gint index);
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 94d069dba884..5fd4c0ecb5b3 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -80,14 +80,14 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) :
m_bStartupCompleted( false )
{
for(GdkCursor* & rpCsr : m_aCursors)
- rpCsr = NULL;
+ rpCsr = nullptr;
#if !GTK_CHECK_VERSION(3,0,0)
m_bUseRandRWrapper = false; // use gdk signal instead
Init ();
#endif
// FIXME: unify this with SalInst's filter too ?
- gdk_window_add_filter( NULL, call_filterGdkEvent, this );
+ gdk_window_add_filter( nullptr, call_filterGdkEvent, this );
if ( getenv( "SAL_IGNOREXERRORS" ) )
GetGenericData()->ErrorTrapPush(); // and leak the trap
@@ -114,14 +114,14 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) :
GtkSalDisplay::~GtkSalDisplay()
{
- gdk_window_remove_filter( NULL, call_filterGdkEvent, this );
+ gdk_window_remove_filter( nullptr, call_filterGdkEvent, this );
if( !m_bStartupCompleted )
gdk_notify_startup_complete();
#if !GTK_CHECK_VERSION(3,0,0)
doDestruct();
- pDisp_ = NULL;
+ pDisp_ = nullptr;
#endif
for(GdkCursor* & rpCsr : m_aCursors)
@@ -169,7 +169,7 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* sys_event,
! m_aFrames.empty()
)
{
- SendInternalEvent( m_aFrames.front(), NULL, SALEVENT_SETTINGSCHANGED );
+ SendInternalEvent( m_aFrames.front(), nullptr, SALEVENT_SETTINGSCHANGED );
}
// let's see if one of our frames wants to swallow these events
// get the frame
@@ -220,7 +220,7 @@ GtkSalDisplay::initScreen( SalX11Screen nXScreen ) const
// choose visual for screen
ScreenData *pSD;
if (!(pSD = SalDisplay::initScreen( nXScreen )))
- return NULL;
+ return nullptr;
// now set a gdk default colormap matching the chosen visual to the screen
GdkScreen* pScreen = gdk_display_get_screen( m_pGdkDisplay, nXScreen.getXScreen() );
@@ -363,7 +363,7 @@ GdkCursor *GtkSalDisplay::getCursor( PointerStyle ePointerStyle )
{
if ( !m_aCursors[ ePointerStyle ] )
{
- GdkCursor *pCursor = NULL;
+ GdkCursor *pCursor = nullptr;
switch( ePointerStyle )
{
@@ -499,7 +499,7 @@ int GtkSalDisplay::CaptureMouse( SalFrame* pSFrame )
{
if( m_pCapture )
static_cast<GtkSalFrame*>(m_pCapture)->grabPointer( FALSE );
- m_pCapture = NULL;
+ m_pCapture = nullptr;
return 0;
}
@@ -527,13 +527,13 @@ GtkData::GtkData( SalInstance *pInstance )
#endif
, blockIdleTimeout( false )
{
- m_pUserEvent = NULL;
+ m_pUserEvent = nullptr;
m_aDispatchMutex = osl_createMutex();
m_aDispatchCondition = osl_createCondition();
}
#if defined(GDK_WINDOWING_X11)
-XIOErrorHandler aOrigXIOErrorHandler = NULL;
+XIOErrorHandler aOrigXIOErrorHandler = nullptr;
extern "C" {
@@ -562,7 +562,7 @@ GtkData::~GtkData()
{
g_source_destroy (m_pUserEvent);
g_source_unref (m_pUserEvent);
- m_pUserEvent = NULL;
+ m_pUserEvent = nullptr;
}
osl_destroyCondition( m_aDispatchCondition );
osl_releaseMutex( m_aDispatchMutex );
@@ -605,7 +605,7 @@ void GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents )
gboolean wasOneEvent = TRUE;
while( nMaxEvents-- && wasOneEvent )
{
- wasOneEvent = g_main_context_iteration( NULL, bWait && !bWasEvent );
+ wasOneEvent = g_main_context_iteration( nullptr, bWait && !bWasEvent );
if( wasOneEvent )
bWasEvent = true;
}
@@ -650,7 +650,7 @@ void GtkData::Init()
* o default display
*/
- GdkDisplay *pGdkDisp = NULL;
+ GdkDisplay *pGdkDisp = nullptr;
// is there a -display command line parameter?
rtl_TextEncoding aEnc = osl_getThreadTextEncoding();
@@ -881,7 +881,7 @@ extern "C" {
sal_gtk_timeout_prepare,
sal_gtk_timeout_check,
sal_gtk_timeout_dispatch,
- NULL, NULL, NULL
+ nullptr, nullptr, nullptr
};
}
@@ -898,7 +898,7 @@ create_sal_gtk_timeout( GtkSalTimer *pTimer )
g_source_set_can_recurse( pSource, TRUE );
g_source_set_callback( pSource,
/* unused dummy */ g_idle_remove_by_data,
- NULL, NULL );
+ nullptr, nullptr );
g_source_attach( pSource, g_main_context_default() );
sal_gtk_timeout_defer( pTSource );
@@ -907,7 +907,7 @@ create_sal_gtk_timeout( GtkSalTimer *pTimer )
}
GtkSalTimer::GtkSalTimer()
- : m_pTimeout(NULL)
+ : m_pTimeout(nullptr)
, m_nTimeoutMS(0)
{
}
@@ -943,7 +943,7 @@ void GtkSalTimer::Stop()
{
g_source_destroy( &m_pTimeout->aParent );
g_source_unref( &m_pTimeout->aParent );
- m_pTimeout = NULL;
+ m_pTimeout = nullptr;
}
}
@@ -964,7 +964,7 @@ gboolean GtkData::userEventFn( gpointer data )
if( pThis->m_pUserEvent )
{
g_source_unref (pThis->m_pUserEvent);
- pThis->m_pUserEvent = NULL;
+ pThis->m_pUserEvent = nullptr;
}
bContinue = FALSE;
}
@@ -991,14 +991,14 @@ extern "C" {
void GtkData::PostUserEvent()
{
if (m_pUserEvent)
- g_main_context_wakeup (NULL); // really needed ?
+ g_main_context_wakeup (nullptr); // really needed ?
else // nothing pending anyway
{
m_pUserEvent = g_idle_source_new();
g_source_set_priority (m_pUserEvent, G_PRIORITY_HIGH);
g_source_set_can_recurse (m_pUserEvent, TRUE);
g_source_set_callback (m_pUserEvent, call_userEventFn,
- static_cast<gpointer>(this), NULL);
+ static_cast<gpointer>(this), nullptr);
g_source_attach (m_pUserEvent, g_main_context_default ());
}
}
@@ -1013,7 +1013,7 @@ void GtkSalDisplay::deregisterFrame( SalFrame* pFrame )
if( m_pCapture == pFrame )
{
static_cast<GtkSalFrame*>(m_pCapture)->grabPointer( FALSE );
- m_pCapture = NULL;
+ m_pCapture = nullptr;
}
SalGenericDisplay::deregisterFrame( pFrame );
}
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 6243c92833fc..eeb75de2c902 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -68,7 +68,7 @@ extern "C"
( gtk_major_version == 2 && gtk_minor_version < 4 ) )
{
g_warning("require a newer gtk than %d.%d for gdk_threads_set_lock_functions", (int) gtk_major_version, gtk_minor_version);
- return NULL;
+ return nullptr;
}
/* #i92121# workaround deadlocks in the X11 implementation
@@ -85,14 +85,14 @@ extern "C"
if (gtk_minor_version < 14)
{
g_warning("require a newer gtk than 3.%d for theme expectations", gtk_minor_version);
- return NULL;
+ return nullptr;
}
const gchar* pVersion = gtk_check_version( 3, 2, 0 );
if( pVersion )
{
SAL_WARN("vcl.gtk", "gtk version conflict: " << pVersion);
- return NULL;
+ return nullptr;
}
#endif
@@ -100,7 +100,7 @@ extern "C"
// init gdk thread protection
if ( !g_thread_supported() )
- g_thread_init( NULL );
+ g_thread_init( nullptr );
gdk_threads_set_lock_functions (GdkThreadsEnter, GdkThreadsLeave);
SAL_INFO("vcl.gtk", "Hooked gdk threads locks");
@@ -245,7 +245,7 @@ void GtkInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUStri
//Convert back to system locale encoding
OString sSystemUrl = OUStringToOString(sDecodedUri, aSystemEnc);
//Encode to an escaped ASCII-encoded URI
- gchar *g_uri = g_filename_to_uri(sSystemUrl.getStr(), NULL, NULL);
+ gchar *g_uri = g_filename_to_uri(sSystemUrl.getStr(), nullptr, nullptr);
sGtkURL = OString(g_uri);
g_free(g_uri);
}
@@ -372,9 +372,9 @@ void GtkInstance::DestroyMenuItem( SalMenuItem* pItem )
#else // not ENABLE_GMENU_INTEGRATION
-SalMenu* GtkInstance::CreateMenu( bool, Menu* ) { return NULL; }
+SalMenu* GtkInstance::CreateMenu( bool, Menu* ) { return nullptr; }
void GtkInstance::DestroyMenu( SalMenu* ) {}
-SalMenuItem* GtkInstance::CreateMenuItem( const SalItemParams* ) { return NULL; }
+SalMenuItem* GtkInstance::CreateMenuItem( const SalItemParams* ) { return nullptr; }
void GtkInstance::DestroyMenuItem( SalMenuItem* ) {}
#endif
@@ -431,7 +431,7 @@ bool GtkInstance::AnyInput( VclInputFlags nType )
bool bRet = false;
std::stack<GdkEvent*> aEvents;
- GdkEvent *pEvent = NULL;
+ GdkEvent *pEvent = nullptr;
while ((pEvent = gdk_event_get()))
{
aEvents.push(pEvent);
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index b43ac634b376..8d79c98cbe70 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -25,7 +25,7 @@
GtkSalSystem *GtkSalSystem::GetSingleton()
{
- static GtkSalSystem *pSingleton = NULL;
+ static GtkSalSystem *pSingleton = nullptr;
if (!pSingleton)
pSingleton = new GtkSalSystem();
return pSingleton;
@@ -130,7 +130,7 @@ GtkSalSystem::getXScreenFromDisplayScreen(unsigned int nScreen)
GdkScreen *
GtkSalSystem::getScreenMonitorFromIdx (int nIdx, gint &nMonitor)
{
- GdkScreen *pScreen = NULL;
+ GdkScreen *pScreen = nullptr;
for (ScreenMonitors_t::const_iterator aIt(maScreenMonitors.begin()), aEnd(maScreenMonitors.end()); aIt != aEnd; ++aIt)
{
pScreen = aIt->first;
@@ -145,7 +145,7 @@ GtkSalSystem::getScreenMonitorFromIdx (int nIdx, gint &nMonitor)
// handle invalid monitor indexes as non-existent screens
if (nMonitor < 0 || (pScreen && nMonitor >= gdk_screen_get_n_monitors (pScreen)))
- pScreen = NULL;
+ pScreen = nullptr;
return pScreen;
}
@@ -205,14 +205,14 @@ static int _fallback_get_primary_monitor (GdkScreen *pScreen)
static int _get_primary_monitor (GdkScreen *pScreen)
{
- static int (*get_fn) (GdkScreen *) = NULL;
+ static int (*get_fn) (GdkScreen *) = nullptr;
#if GTK_CHECK_VERSION(3,0,0)
get_fn = gdk_screen_get_primary_monitor;
#endif
// Perhaps we have a newer gtk+ with this symbol:
if (!get_fn)
{
- get_fn = reinterpret_cast<int(*)(GdkScreen*)>(osl_getAsciiFunctionSymbol(NULL,
+ get_fn = reinterpret_cast<int(*)(GdkScreen*)>(osl_getAsciiFunctionSymbol(nullptr,
"gdk_screen_get_primary_monitor"));
}
if (!get_fn)
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 9fce8872780a..79b9b58859a2 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -79,15 +79,15 @@ void SalGtkFilePicker::InitialMapping()
SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext >& xContext ) :
SalGtkPicker( xContext ),
SalGtkFilePicker_Base( m_rbHelperMtx ),
- m_pFilterList( NULL ),
- m_pVBox ( NULL ),
+ m_pFilterList( nullptr ),
+ m_pVBox ( nullptr ),
mnHID_FolderChange( 0 ),
mnHID_SelectionChange( 0 ),
bVersionWidthUnset( false ),
mbPreviewState( false ),
mHID_Preview( 0 ),
- m_pPreview( NULL ),
- m_pPseudoFilter( NULL ),
+ m_pPreview( nullptr ),
+ m_pPseudoFilter( nullptr ),
m_PreviewImageWidth( 256 ),
m_PreviewImageHeight( 256 )
{
@@ -95,22 +95,22 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
for( i = 0; i < TOGGLE_LAST; i++ )
{
- m_pToggles[i] = NULL;
+ m_pToggles[i] = nullptr;
mbToggleVisibility[i] = false;
}
for( i = 0; i < BUTTON_LAST; i++ )
{
- m_pButtons[i] = NULL;
+ m_pButtons[i] = nullptr;
mbButtonVisibility[i] = false;
}
for( i = 0; i < LIST_LAST; i++ )
{
- m_pHBoxs[i] = NULL;
- m_pAligns[i] = NULL;
- m_pLists[i] = NULL;
- m_pListLabels[i] = NULL;
+ m_pHBoxs[i] = nullptr;
+ m_pAligns[i] = nullptr;
+ m_pLists[i] = nullptr;
+ m_pListLabels[i] = nullptr;
mbListVisibility[i] = false;
}
@@ -118,7 +118,7 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
m_pDialog = gtk_file_chooser_dialog_new(
OUStringToOString( aFilePickerTitle, RTL_TEXTENCODING_UTF8 ).getStr(),
- NULL,
+ nullptr,
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
@@ -219,7 +219,7 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pFilterExpander, false, true, 0 );
- GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+ GtkWidget *scrolled_window = gtk_scrolled_window_new (nullptr, nullptr);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
@@ -266,11 +266,11 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
gtk_widget_show( m_pVBox );
- PangoLayout *layout = gtk_widget_create_pango_layout (m_pFilterView, NULL);
+ PangoLayout *layout = gtk_widget_create_pango_layout (m_pFilterView, nullptr);
guint ypad;
PangoRectangle row_height;
pango_layout_set_markup (layout, "All Files", -1);
- pango_layout_get_pixel_extents (layout, NULL, &row_height);
+ pango_layout_get_pixel_extents (layout, nullptr, &row_height);
g_object_unref (layout);
g_object_get (cell, "ypad", &ypad, nullptr);
@@ -538,7 +538,7 @@ void SAL_CALL SalGtkFilePicker::appendFilter( const OUString& aTitle, const OUSt
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
if( FilterNameExists( aTitle ) )
throw IllegalArgumentException();
@@ -555,7 +555,7 @@ void SAL_CALL SalGtkFilePicker::setCurrentFilter( const OUString& aTitle )
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OSL_TRACE( "Setting current filter to %s\n",
OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -617,7 +617,7 @@ OUString SAL_CALL SalGtkFilePicker::getCurrentFilter() throw( uno::RuntimeExcept
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OSL_TRACE( "GetCURRENTfilter" );
@@ -636,7 +636,7 @@ void SAL_CALL SalGtkFilePicker::appendFilterGroup( const OUString& /*sGroupTitle
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO m_pImpl->appendFilterGroup( sGroupTitle, aFilters );
// check the names
@@ -665,7 +665,7 @@ void SAL_CALL SalGtkFilePicker::setMultiSelectionMode( sal_Bool bMode ) throw( u
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER(m_pDialog), bMode );
}
@@ -675,7 +675,7 @@ void SAL_CALL SalGtkFilePicker::setDefaultName( const OUString& aName )
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OString aStr = OUStringToOString( aName, RTL_TEXTENCODING_UTF8 );
GtkFileChooserAction eAction = gtk_file_chooser_get_action( GTK_FILE_CHOOSER( m_pDialog ) );
@@ -737,7 +737,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
GSList* pPathList = gtk_file_chooser_get_uris( GTK_FILE_CHOOSER(m_pDialog) );
@@ -768,7 +768,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno
GtkTreeModel *model;
if (gtk_tree_selection_get_selected (selection, &model, &iter))
{
- gchar *title = NULL;
+ gchar *title = nullptr;
gtk_tree_model_get (model, &iter, 2, &title, -1);
if (title)
sFilterName = OUString( title, strlen( title ), RTL_TEXTENCODING_UTF8 );
@@ -817,7 +817,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno
GtkFileFilter *filter = gtk_file_chooser_get_filter(GTK_FILE_CHOOSER(m_pDialog));
if (m_pPseudoFilter != filter)
{
- const gchar* filtername = filter ? gtk_file_filter_get_name(filter) : NULL;
+ const gchar* filtername = filter ? gtk_file_filter_get_name(filter) : nullptr;
if (filtername)
sFilterName = OUString(filtername, strlen( filtername ), RTL_TEXTENCODING_UTF8);
else
@@ -898,7 +898,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException, std
SolarMutexGuard g;
OSL_TRACE( "1: HERE WE ARE");
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
sal_Int16 retVal = 0;
@@ -941,7 +941,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException, std
if( aPathSeq.getLength() == 1 )
{
OString sFileName = unicodetouri( aPathSeq[0] );
- gchar *gFileName = g_filename_from_uri ( sFileName.getStr(), NULL, NULL );
+ gchar *gFileName = g_filename_from_uri ( sFileName.getStr(), nullptr, nullptr );
if( g_file_test( gFileName, G_FILE_TEST_IS_REGULAR ) )
{
INetURLObject aFileObj( OStringToOUString(sFileName, RTL_TEXTENCODING_UTF8) );
@@ -970,7 +970,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException, std
baseName
);
- GtkWidget *dlg = gtk_message_dialog_new( NULL,
+ GtkWidget *dlg = gtk_message_dialog_new( nullptr,
GTK_DIALOG_MODAL,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
@@ -1063,7 +1063,7 @@ GtkWidget *SalGtkFilePicker::getWidget( sal_Int16 nControlId, GType *pType )
{
OSL_TRACE("control id is %d", nControlId);
GType tType = GTK_TYPE_TOGGLE_BUTTON; //prevent waring by initializing
- GtkWidget *pWidget = 0;
+ GtkWidget *pWidget = nullptr;
#define MAP_TOGGLE( elem ) \
case ExtendedFilePickerElementIds::CHECKBOX_##elem: \
@@ -1167,7 +1167,7 @@ void SalGtkFilePicker::HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nContr
GtkTreeIter aIter;
GtkListStore *pStore = GTK_LIST_STORE(
gtk_combo_box_get_model(GTK_COMBO_BOX(pWidget)));
- if(gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(pStore), &aIter, NULL, nPos))
+ if(gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(pStore), &aIter, nullptr, nPos))
gtk_list_store_remove(pStore, &aIter);
}
break;
@@ -1194,7 +1194,7 @@ void SalGtkFilePicker::HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nContr
//I think its best to make it insensitive unless there is the chance to
//actually select something from the list.
gint nItems = gtk_tree_model_iter_n_children(
- gtk_combo_box_get_model(pWidget), NULL);
+ gtk_combo_box_get_model(pWidget), nullptr);
gtk_widget_set_sensitive(GTK_WIDGET(pWidget), nItems > 1);
}
@@ -1212,7 +1212,7 @@ uno::Any SalGtkFilePicker::HandleGetListValue(GtkComboBox *pWidget, sal_Int16 nC
if (gtk_tree_model_get_iter_first(pTree, &iter))
{
sal_Int32 nSize = gtk_tree_model_iter_n_children(
- pTree, NULL);
+ pTree, nullptr);
aItemList.realloc(nSize);
for (sal_Int32 i=0; i < nSize; ++i)
@@ -1260,7 +1260,7 @@ void SAL_CALL SalGtkFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nContr
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OSL_TRACE( "SETTING VALUE %d", nControlAction );
GType tType;
@@ -1288,7 +1288,7 @@ uno::Any SAL_CALL SalGtkFilePicker::getValue( sal_Int16 nControlId, sal_Int16 nC
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
uno::Any aRetval;
@@ -1313,7 +1313,7 @@ throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
GtkWidget *pWidget;
@@ -1339,7 +1339,7 @@ void SAL_CALL SalGtkFilePicker::setLabel( sal_Int16 nControlId, const OUString&
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
GType tType;
GtkWidget *pWidget;
@@ -1376,7 +1376,7 @@ OUString SAL_CALL SalGtkFilePicker::getLabel( sal_Int16 nControlId )
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
GType tType;
OString aTxt;
@@ -1398,7 +1398,7 @@ uno::Sequence<sal_Int16> SAL_CALL SalGtkFilePicker::getSupportedImageFormats() t
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO return m_pImpl->getSupportedImageFormats();
return uno::Sequence<sal_Int16>();
@@ -1408,7 +1408,7 @@ sal_Int32 SAL_CALL SalGtkFilePicker::getTargetColorDepth() throw( uno::RuntimeEx
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO return m_pImpl->getTargetColorDepth();
return 0;
@@ -1418,7 +1418,7 @@ sal_Int32 SAL_CALL SalGtkFilePicker::getAvailableWidth() throw( uno::RuntimeExce
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
return m_PreviewImageWidth;
}
@@ -1427,7 +1427,7 @@ sal_Int32 SAL_CALL SalGtkFilePicker::getAvailableHeight() throw( uno::RuntimeExc
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
return m_PreviewImageHeight;
}
@@ -1437,7 +1437,7 @@ void SAL_CALL SalGtkFilePicker::setImage( sal_Int16 /*aImageFormat*/, const uno:
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO m_pImpl->setImage( aImageFormat, aImage );
}
@@ -1517,9 +1517,9 @@ void SalGtkFilePicker::update_preview_cb( GtkFileChooser *file_chooser, SalGtkFi
pixbuf = gdk_pixbuf_new_from_file_at_size(
filename,
pobjFP->m_PreviewImageWidth,
- pobjFP->m_PreviewImageHeight, NULL );
+ pobjFP->m_PreviewImageHeight, nullptr );
- have_preview = ( pixbuf != NULL );
+ have_preview = ( pixbuf != nullptr );
gtk_image_set_from_pixbuf( GTK_IMAGE( preview ), pixbuf );
if( pixbuf )
@@ -1537,7 +1537,7 @@ sal_Bool SAL_CALL SalGtkFilePicker::setShowState( sal_Bool bShowState ) throw( u
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO return m_pImpl->setShowState( bShowState );
if( bool(bShowState) != mbPreviewState )
@@ -1571,7 +1571,7 @@ sal_Bool SAL_CALL SalGtkFilePicker::getShowState() throw( uno::RuntimeException,
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
return mbPreviewState;
}
@@ -1745,7 +1745,7 @@ void SAL_CALL SalGtkFilePicker::cancel() throw( uno::RuntimeException, std::exce
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO m_pImpl->cancel();
}
@@ -1784,8 +1784,8 @@ case_insensitive_filter (const GtkFileFilterInfo *filter_info, gpointer data)
gboolean bRetval = false;
const char *pFilter = static_cast<const char *>(data);
- g_return_val_if_fail( data != NULL, false );
- g_return_val_if_fail( filter_info != NULL, false );
+ g_return_val_if_fail( data != nullptr, false );
+ g_return_val_if_fail( filter_info != nullptr, false );
if( !filter_info->uri )
return false;
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx
index 25b39e09f079..c825439f1b55 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx
@@ -236,7 +236,7 @@ class SalGtkFilePicker : public SalGtkPicker, public SalGtkFilePicker_Base
sal_Int32 m_PreviewImageWidth;
sal_Int32 m_PreviewImageHeight;
- GtkWidget *getWidget( sal_Int16 nControlId, GType *pType = NULL);
+ GtkWidget *getWidget( sal_Int16 nControlId, GType *pType = nullptr);
void SetCurFilter( const OUString& rFilter );
void SetFilters();
diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
index 78682cb738aa..49ab71d25388 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
@@ -53,7 +53,7 @@ SalGtkFolderPicker::SalGtkFolderPicker( const uno::Reference< uno::XComponentCon
{
m_pDialog = gtk_file_chooser_dialog_new(
OUStringToOString( getResString( FOLDERPICKER_TITLE ), RTL_TEXTENCODING_UTF8 ).getStr(),
- NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ nullptr, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, nullptr );
gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT );
@@ -68,7 +68,7 @@ void SAL_CALL SalGtkFolderPicker::setDisplayDirectory( const OUString& aDirector
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OString aTxt = unicodetouri( aDirectory );
if( aTxt.isEmpty() ){
@@ -88,7 +88,7 @@ OUString SAL_CALL SalGtkFolderPicker::getDisplayDirectory() throw( uno::RuntimeE
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
gchar* pCurrentFolder =
gtk_file_chooser_get_current_folder_uri( GTK_FILE_CHOOSER( m_pDialog ) );
@@ -102,7 +102,7 @@ OUString SAL_CALL SalGtkFolderPicker::getDirectory() throw( uno::RuntimeExceptio
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
gchar* pSelectedFolder =
gtk_file_chooser_get_uri( GTK_FILE_CHOOSER( m_pDialog ) );
@@ -123,7 +123,7 @@ void SAL_CALL SalGtkFolderPicker::setTitle( const OUString& aTitle ) throw( uno:
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OString aWindowTitle = OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 );
@@ -135,7 +135,7 @@ sal_Int16 SAL_CALL SalGtkFolderPicker::execute() throw( uno::RuntimeException, s
SolarMutexGuard g;
OSL_TRACE( "1: HERE WE ARE");
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
sal_Int16 retVal = 0;
@@ -173,7 +173,7 @@ void SAL_CALL SalGtkFolderPicker::cancel() throw( uno::RuntimeException, std::ex
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO m_pImpl->cancel();
}
diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
index a071bdaee5a6..701cd627c364 100644
--- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
@@ -56,7 +56,7 @@ OUString SalGtkPicker::uritounicode(const gchar* pIn)
{
// all the URLs are handled by office in UTF-8
// so the Gnome FP related URLs should be converted accordingly
- gchar *pEncodedFileName = g_filename_from_uri(pIn, NULL, NULL);
+ gchar *pEncodedFileName = g_filename_from_uri(pIn, nullptr, nullptr);
if ( pEncodedFileName )
{
OUString sEncoded(pEncodedFileName, strlen(pEncodedFileName),
@@ -107,7 +107,7 @@ extern "C"
GtkWindow* RunDialog::GetTransientFor()
{
- GtkWindow *pParent = NULL;
+ GtkWindow *pParent = nullptr;
vcl::Window * pWindow = ::Application::GetActiveTopWindow();
if( pWindow )
@@ -151,7 +151,7 @@ void SAL_CALL RunDialog::windowOpened(const css::lang::EventObject& e)
}
}
- g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast<GSourceFunc>(canceldialog), this, NULL);
+ g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast<GSourceFunc>(canceldialog), this, nullptr);
}
void SAL_CALL RunDialog::queryTermination( const ::com::sun::star::lang::EventObject& )
@@ -164,7 +164,7 @@ void SAL_CALL RunDialog::notifyTermination( const ::com::sun::star::lang::EventO
{
SolarMutexGuard g;
- g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast<GSourceFunc>(canceldialog), this, NULL);
+ g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast<GSourceFunc>(canceldialog), this, nullptr);
}
void RunDialog::cancel()
@@ -190,7 +190,7 @@ gint RunDialog::run()
}
SalGtkPicker::SalGtkPicker( const uno::Reference<uno::XComponentContext>& xContext )
- : m_pDialog( 0 ), m_xContext( xContext )
+ : m_pDialog( nullptr ), m_xContext( xContext )
{
}
@@ -207,7 +207,7 @@ SalGtkPicker::~SalGtkPicker()
void SAL_CALL SalGtkPicker::implsetDisplayDirectory( const OUString& aDirectory )
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OString aTxt = unicodetouri(aDirectory);
if( aTxt.isEmpty() ){
@@ -225,7 +225,7 @@ void SAL_CALL SalGtkPicker::implsetDisplayDirectory( const OUString& aDirectory
OUString SAL_CALL SalGtkPicker::implgetDisplayDirectory() throw( uno::RuntimeException )
{
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
gchar* pCurrentFolder =
gtk_file_chooser_get_current_folder_uri( GTK_FILE_CHOOSER( m_pDialog ) );
@@ -237,7 +237,7 @@ OUString SAL_CALL SalGtkPicker::implgetDisplayDirectory() throw( uno::RuntimeExc
void SAL_CALL SalGtkPicker::implsetTitle( const OUString& aTitle ) throw( uno::RuntimeException )
{
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OString aWindowTitle = OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 );
diff --git a/vcl/unx/gtk/gdi/gtkprintwrapper.cxx b/vcl/unx/gtk/gdi/gtkprintwrapper.cxx
index 5e610fe1f2e1..e552042478ef 100644
--- a/vcl/unx/gtk/gdi/gtkprintwrapper.cxx
+++ b/vcl/unx/gtk/gdi/gtkprintwrapper.cxx
@@ -21,25 +21,25 @@ namespace unx
#if !GTK_CHECK_VERSION(3,0,0)
GtkPrintWrapper::GtkPrintWrapper()
- : m_page_setup_new(0)
- , m_print_job_new(0)
- , m_print_job_send(0)
- , m_print_job_set_source_file(0)
- , m_print_settings_get(0)
- , m_print_settings_get_collate(0)
- , m_print_settings_set_collate(0)
- , m_print_settings_get_n_copies(0)
- , m_print_settings_set_n_copies(0)
- , m_print_settings_get_page_ranges(0)
- , m_print_settings_set_print_pages(0)
- , m_print_unix_dialog_new(0)
- , m_print_unix_dialog_add_custom_tab(0)
- , m_print_unix_dialog_get_selected_printer(0)
- , m_print_unix_dialog_set_manual_capabilities(0)
- , m_print_unix_dialog_get_settings(0)
- , m_print_unix_dialog_set_settings(0)
- , m_print_unix_dialog_set_support_selection(0)
- , m_print_unix_dialog_set_has_selection(0)
+ : m_page_setup_new(nullptr)
+ , m_print_job_new(nullptr)
+ , m_print_job_send(nullptr)
+ , m_print_job_set_source_file(nullptr)
+ , m_print_settings_get(nullptr)
+ , m_print_settings_get_collate(nullptr)
+ , m_print_settings_set_collate(nullptr)
+ , m_print_settings_get_n_copies(nullptr)
+ , m_print_settings_set_n_copies(nullptr)
+ , m_print_settings_get_page_ranges(nullptr)
+ , m_print_settings_set_print_pages(nullptr)
+ , m_print_unix_dialog_new(nullptr)
+ , m_print_unix_dialog_add_custom_tab(nullptr)
+ , m_print_unix_dialog_get_selected_printer(nullptr)
+ , m_print_unix_dialog_set_manual_capabilities(nullptr)
+ , m_print_unix_dialog_get_settings(nullptr)
+ , m_print_unix_dialog_set_settings(nullptr)
+ , m_print_unix_dialog_set_support_selection(nullptr)
+ , m_print_unix_dialog_set_has_selection(nullptr)
{
impl_load();
}
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index ff520abbdd36..f0bfa7088686 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -133,44 +133,44 @@ struct NWFWidgetData
NWPixmapCache* gCacheTabPages;
NWFWidgetData() :
- gCacheWindow( NULL ),
- gDumbContainer( NULL ),
- gBtnWidget( NULL ),
- gRadioWidget( NULL ),
- gRadioWidgetSibling( NULL ),
- gCheckWidget( NULL ),
- gScrollHorizWidget( NULL ),
- gScrollVertWidget( NULL ),
- gArrowWidget( NULL ),
- gDropdownWidget( NULL ),
- gEditBoxWidget( NULL ),
- gSpinButtonWidget( NULL ),
- gNotebookWidget( NULL ),
- gOptionMenuWidget( NULL ),
- gComboWidget( NULL ),
- gScrolledWindowWidget( NULL ),
- gToolbarWidget( NULL ),
- gToolbarButtonWidget( NULL ),
- gHandleBoxWidget( NULL ),
- gMenubarWidget( NULL ),
- gMenuItemMenubarWidget( NULL ),
- gMenuWidget( NULL ),
- gMenuItemMenuWidget( NULL ),
- gMenuItemCheckMenuWidget( NULL ),
- gMenuItemRadioMenuWidget( NULL ),
- gMenuItemSeparatorMenuWidget( NULL ),
- gImageMenuItem( NULL ),
- gTooltipPopup( NULL ),
- gProgressBar( NULL ),
- gTreeView( NULL ),
- gHScale( NULL ),
- gVScale( NULL ),
- gSeparator( NULL ),
- gDialog( NULL ),
- gFrame( NULL ),
- gNWPixmapCacheList( NULL ),
- gCacheTabItems( NULL ),
- gCacheTabPages( NULL )
+ gCacheWindow( nullptr ),
+ gDumbContainer( nullptr ),
+ gBtnWidget( nullptr ),
+ gRadioWidget( nullptr ),
+ gRadioWidgetSibling( nullptr ),
+ gCheckWidget( nullptr ),
+ gScrollHorizWidget( nullptr ),
+ gScrollVertWidget( nullptr ),
+ gArrowWidget( nullptr ),
+ gDropdownWidget( nullptr ),
+ gEditBoxWidget( nullptr ),
+ gSpinButtonWidget( nullptr ),
+ gNotebookWidget( nullptr ),
+ gOptionMenuWidget( nullptr ),
+ gComboWidget( nullptr ),
+ gScrolledWindowWidget( nullptr ),
+ gToolbarWidget( nullptr ),
+ gToolbarButtonWidget( nullptr ),
+ gHandleBoxWidget( nullptr ),
+ gMenubarWidget( nullptr ),
+ gMenuItemMenubarWidget( nullptr ),
+ gMenuWidget( nullptr ),
+ gMenuItemMenuWidget( nullptr ),
+ gMenuItemCheckMenuWidget( nullptr ),
+ gMenuItemRadioMenuWidget( nullptr ),
+ gMenuItemSeparatorMenuWidget( nullptr ),
+ gImageMenuItem( nullptr ),
+ gTooltipPopup( nullptr ),
+ gProgressBar( nullptr ),
+ gTreeView( nullptr ),
+ gHScale( nullptr ),
+ gVScale( nullptr ),
+ gSeparator( nullptr ),
+ gDialog( nullptr ),
+ gFrame( nullptr ),
+ gNWPixmapCacheList( nullptr ),
+ gCacheTabItems( nullptr ),
+ gCacheTabPages( nullptr )
{}
};
@@ -296,7 +296,7 @@ protected:
GdkX11Pixmap::GdkX11Pixmap( int nWidth, int nHeight, int nDepth )
: X11Pixmap( nWidth, nHeight )
{
- mpGdkPixmap = gdk_pixmap_new( NULL, nWidth, nHeight, nDepth );
+ mpGdkPixmap = gdk_pixmap_new( nullptr, nWidth, nHeight, nDepth );
mnDepth = gdk_drawable_get_depth( GDK_DRAWABLE( mpGdkPixmap ) );
GdkScreen *pScreen = gdk_drawable_get_screen( GDK_DRAWABLE( mpGdkPixmap ) );
@@ -352,9 +352,9 @@ public:
GdkX11Pixmap* m_pixmap;
GdkX11Pixmap* m_mask;
- NWPixmapCacheData() : m_nType(0), m_nState(ControlState::NONE), m_pixmap(0), m_mask(0) {}
+ NWPixmapCacheData() : m_nType(0), m_nState(ControlState::NONE), m_pixmap(nullptr), m_mask(nullptr) {}
~NWPixmapCacheData()
- { SetPixmap( NULL, NULL ); };
+ { SetPixmap( nullptr, nullptr ); };
void SetPixmap( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask );
};
@@ -404,7 +404,7 @@ NWPixmapCache::NWPixmapCache( SalX11Screen nScreen )
m_idx = 0;
m_size = 0;
m_screen = nScreen.getXScreen();
- pData = NULL;
+ pData = nullptr;
if( gWidgetData[m_screen].gNWPixmapCacheList )
gWidgetData[m_screen].gNWPixmapCacheList->AddCache(this);
}
@@ -419,7 +419,7 @@ void NWPixmapCache::ThemeChanged()
// throw away cached pixmaps
int i;
for(i=0; i<m_size; i++)
- pData[i].SetPixmap( NULL, NULL );
+ pData[i].SetPixmap( nullptr, nullptr );
}
bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask )
@@ -432,7 +432,7 @@ bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectang
pData[i].m_nState == aState &&
pData[i].m_pixmapRect.GetWidth() == r_pixmapRect.GetWidth() &&
pData[i].m_pixmapRect.GetHeight() == r_pixmapRect.GetHeight() &&
- pData[i].m_pixmap != NULL )
+ pData[i].m_pixmap != nullptr )
{
*pPixmap = pData[i].m_pixmap;
*pMask = pData[i].m_mask;
@@ -595,11 +595,11 @@ void GtkData::deInitNWF()
if( gWidgetData[i].gDialog )
gtk_widget_destroy( gWidgetData[i].gDialog );
delete gWidgetData[i].gCacheTabPages;
- gWidgetData[i].gCacheTabPages = NULL;
+ gWidgetData[i].gCacheTabPages = nullptr;
delete gWidgetData[i].gCacheTabItems;
- gWidgetData[i].gCacheTabItems = NULL;
+ gWidgetData[i].gCacheTabItems = nullptr;
delete gWidgetData[i].gNWPixmapCacheList;
- gWidgetData[i].gNWPixmapCacheList = NULL;
+ gWidgetData[i].gNWPixmapCacheList = nullptr;
}
}
@@ -968,7 +968,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart,
for( int i = 0; i < nPasses; ++i )
{
assert(gdkDrawable[i] && "rhbz#1050162");
- if( gdkDrawable[i] == 0 )
+ if( gdkDrawable[i] == nullptr )
return false;
returnVal = DoDrawNativeControl(gdkDrawable[i], nType, nPart, aCtrlRect, aClip,
@@ -1411,7 +1411,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
{ \
_nPasses = 1; \
pixmap = NWGetPixmapFromScreen( aRect, BG_FILL ); \
- mask = NULL; \
+ mask = nullptr; \
} \
if( !pixmap || ( bNeedTwoPasses && !mask ) ) \
return false; \
@@ -1504,9 +1504,9 @@ bool GtkSalGraphics::NWPaintGTKFixedLine(
const OUString& )
{
if(nPart == PART_SEPARATOR_HORZ)
- gtk_paint_hline(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,NULL,m_pWindow,"hseparator",rControlRectangle.Left(),rControlRectangle.Right(),rControlRectangle.Top());
+ gtk_paint_hline(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,nullptr,m_pWindow,"hseparator",rControlRectangle.Left(),rControlRectangle.Right(),rControlRectangle.Top());
else
- gtk_paint_vline(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,NULL,m_pWindow,"vseparator",rControlRectangle.Top(),rControlRectangle.Bottom(),rControlRectangle.Left());
+ gtk_paint_vline(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,nullptr,m_pWindow,"vseparator",rControlRectangle.Top(),rControlRectangle.Bottom(),rControlRectangle.Left());
return true;
}
@@ -1955,13 +1955,13 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
{
assert(aValue.getType() == CTRL_SCROLLBAR);
const ScrollbarValue& rScrollbarVal = static_cast<const ScrollbarValue&>(aValue);
- GdkX11Pixmap* pixmap = NULL;
+ GdkX11Pixmap* pixmap = nullptr;
Rectangle pixmapRect, scrollbarRect;
GtkStateType stateType;
GtkShadowType shadowType;
GtkScrollbar * scrollbarWidget;
GtkStyle * style;
- GtkAdjustment* scrollbarValues = NULL;
+ GtkAdjustment* scrollbarValues = nullptr;
GtkOrientation scrollbarOrientation;
Rectangle thumbRect = rScrollbarVal.maThumbRect;
Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward
@@ -1972,7 +1972,7 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
GtkArrowType button2Type; // forward
gchar * scrollbarTagH = const_cast<gchar *>("hscrollbar");
gchar * scrollbarTagV = const_cast<gchar *>("vscrollbar");
- gchar * scrollbarTag = NULL;
+ gchar * scrollbarTag = nullptr;
Rectangle arrowRect;
gint slider_width = 0;
gint stepper_size = 0;
@@ -2111,7 +2111,7 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
bool has_slider = ( thumbRect.GetWidth() > 0 && thumbRect.GetHeight() > 0 );
scrollbarValues = gtk_range_get_adjustment( GTK_RANGE(scrollbarWidget) );
- if ( scrollbarValues == NULL )
+ if ( scrollbarValues == nullptr )
scrollbarValues = GTK_ADJUSTMENT( gtk_adjustment_new(0, 0, 0, 0, 0, 0) );
if ( nPart == PART_DRAW_BACKGROUND_HORZ )
{
@@ -2140,7 +2140,7 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
h = pixmapRect.GetHeight();
GdkDrawable* const &gdkDrawable = pixmap->GetGdkDrawable();
- GdkRectangle* gdkRect = NULL;
+ GdkRectangle* gdkRect = nullptr;
NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
NWSetWidgetState( GTK_WIDGET(scrollbarWidget), nState, stateType );
@@ -2260,7 +2260,7 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
- bool bRet = NWRenderPixmapToScreen( pixmap, NULL, pixmapRect );
+ bool bRet = NWRenderPixmapToScreen( pixmap, nullptr, pixmapRect );
delete pixmap;
return bRet;
@@ -2491,7 +2491,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
Rectangle pixmapRect;
GtkStateType stateType;
GtkShadowType shadowType;
- const SpinbuttonValue * pSpinVal = (aValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue *>(&aValue) : NULL;
+ const SpinbuttonValue * pSpinVal = (aValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue *>(&aValue) : nullptr;
Rectangle upBtnRect;
ControlPart upBtnPart = PART_BUTTON_UP;
ControlState upBtnState = ControlState::ENABLED;
@@ -2531,7 +2531,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
BEGIN_PIXMAP_RENDER( pixmapRect, gdkPixmap )
{
// First render background
- gtk_paint_flat_box(m_pWindow->style,gdkPixmap,GTK_STATE_NORMAL,GTK_SHADOW_NONE,NULL,m_pWindow,"base",
+ gtk_paint_flat_box(m_pWindow->style,gdkPixmap,GTK_STATE_NORMAL,GTK_SHADOW_NONE,nullptr,m_pWindow,"base",
-pixmapRect.Left(),
-pixmapRect.Top(),
pixmapRect.Right(),
@@ -2551,7 +2551,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
aEditBoxRect.setX( 0 );
aEditBoxRect.setY( 0 );
- NWPaintOneEditBox( m_nXScreen, gdkPixmap, NULL, nType, nPart, aEditBoxRect, nState, aValue, rCaption );
+ NWPaintOneEditBox( m_nXScreen, gdkPixmap, nullptr, nType, nPart, aEditBoxRect, nState, aValue, rCaption );
}
NWSetWidgetState( gWidgetData[m_nXScreen].gSpinButtonWidget, nState, stateType );
@@ -2562,7 +2562,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
Rectangle shadowRect( upBtnRect );
shadowRect.Union( downBtnRect );
- gtk_paint_box( gWidgetData[m_nXScreen].gSpinButtonWidget->style, gdkPixmap, GTK_STATE_NORMAL, shadowType, NULL,
+ gtk_paint_box( gWidgetData[m_nXScreen].gSpinButtonWidget->style, gdkPixmap, GTK_STATE_NORMAL, shadowType, nullptr,
gWidgetData[m_nXScreen].gSpinButtonWidget, "spinbutton",
(shadowRect.Left() - pixmapRect.Left()), (shadowRect.Top() - pixmapRect.Top()),
shadowRect.GetWidth(), shadowRect.GetHeight() );
@@ -2645,7 +2645,7 @@ static void NWPaintOneSpinButton( SalX11Screen nScreen,
buttonRect = NWGetSpinButtonRect( nScreen, nType, nPart, aAreaRect, nState, aValue, rCaption );
NWSetWidgetState( gWidgetData[nScreen].gSpinButtonWidget, nState, stateType );
- gtk_paint_box( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, shadowType, NULL, gWidgetData[nScreen].gSpinButtonWidget,
+ gtk_paint_box( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, shadowType, nullptr, gWidgetData[nScreen].gSpinButtonWidget,
(nPart == PART_BUTTON_UP) ? "spinbutton_up" : "spinbutton_down",
(buttonRect.Left() - aAreaRect.Left()), (buttonRect.Top() - aAreaRect.Top()),
buttonRect.GetWidth(), buttonRect.GetHeight() );
@@ -2659,7 +2659,7 @@ static void NWPaintOneSpinButton( SalX11Screen nScreen,
else
arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 - 1);
- gtk_paint_arrow( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[nScreen].gSpinButtonWidget,
+ gtk_paint_arrow( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, GTK_SHADOW_OUT, nullptr, gWidgetData[nScreen].gSpinButtonWidget,
"spinbutton", (nPart == PART_BUTTON_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN, true,
(arrowRect.Left() - aAreaRect.Left()), (arrowRect.Top() - aAreaRect.Top()),
arrowRect.GetWidth(), arrowRect.GetHeight() );
@@ -2902,7 +2902,7 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
break;
case CTRL_TAB_PANE:
- gtk_paint_box_gap( gWidgetData[m_nXScreen].gNotebookWidget->style, gdkPixmap, GTK_STATE_NORMAL, GTK_SHADOW_OUT, NULL, gWidgetData[m_nXScreen].gNotebookWidget,
+ gtk_paint_box_gap( gWidgetData[m_nXScreen].gNotebookWidget->style, gdkPixmap, GTK_STATE_NORMAL, GTK_SHADOW_OUT, nullptr, gWidgetData[m_nXScreen].gNotebookWidget,
"notebook", 0, 0, pixmapRect.GetWidth(), pixmapRect.GetHeight(), GTK_POS_TOP, 0, 0 );
break;
@@ -2912,7 +2912,7 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
// First draw the background
gtk_paint_flat_box(gWidgetData[m_nXScreen].gNotebookWidget->style, gdkPixmap,
- GTK_STATE_NORMAL, GTK_SHADOW_NONE, NULL, m_pWindow, "base",
+ GTK_STATE_NORMAL, GTK_SHADOW_NONE, nullptr, m_pWindow, "base",
-rControlRectangle.Left(),
-rControlRectangle.Top(),
pixmapRect.GetWidth()+rControlRectangle.Left(),
@@ -2922,7 +2922,7 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
if( nState & ControlState::ROLLOVER )
g_object_set_data(G_OBJECT(gdkPixmap),tabPrelitDataName,reinterpret_cast<gpointer>(TRUE));
- gtk_paint_extension( gWidgetData[m_nXScreen].gNotebookWidget->style, gdkPixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[m_nXScreen].gNotebookWidget,
+ gtk_paint_extension( gWidgetData[m_nXScreen].gNotebookWidget->style, gdkPixmap, stateType, GTK_SHADOW_OUT, nullptr, gWidgetData[m_nXScreen].gNotebookWidget,
"tab", (tabRect.Left() - pixmapRect.Left()), (tabRect.Top() - pixmapRect.Top()),
tabRect.GetWidth(), tabRect.GetHeight(), GTK_POS_BOTTOM );
@@ -2930,7 +2930,7 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
if ( nState & ControlState::SELECTED )
{
- gtk_paint_flat_box( m_pWindow->style, gdkPixmap, stateType, GTK_SHADOW_NONE, NULL, m_pWindow,
+ gtk_paint_flat_box( m_pWindow->style, gdkPixmap, stateType, GTK_SHADOW_NONE, nullptr, m_pWindow,
"base", 0, (pixmapRect.GetHeight() - 1), pixmapRect.GetWidth(), 1 );
}
break;
@@ -3536,7 +3536,7 @@ bool GtkSalGraphics::NWPaintGTKListNode(
gtk_paint_expander( gWidgetData[m_nXScreen].gTreeView->style,
pixDrawable,
stateType,
- NULL,
+ nullptr,
gWidgetData[m_nXScreen].gTreeView,
"treeview",
w/2, h/2,
@@ -3568,7 +3568,7 @@ bool GtkSalGraphics::NWPaintGTKProgress(
{
// paint background
gtk_paint_flat_box(gWidgetData[m_nXScreen].gProgressBar->style, pixDrawable,
- GTK_STATE_NORMAL, GTK_SHADOW_NONE, NULL, m_pWindow, "base",
+ GTK_STATE_NORMAL, GTK_SHADOW_NONE, nullptr, m_pWindow, "base",
-rControlRectangle.Left(),-rControlRectangle.Top(),
rControlRectangle.Left()+w,rControlRectangle.Top()+h);
@@ -3576,7 +3576,7 @@ bool GtkSalGraphics::NWPaintGTKProgress(
pixDrawable,
GTK_STATE_NORMAL,
GTK_SHADOW_NONE,
- NULL,
+ nullptr,
gWidgetData[m_nXScreen].gProgressBar,
"trough",
0, 0, w, h );
@@ -3588,7 +3588,7 @@ bool GtkSalGraphics::NWPaintGTKProgress(
gtk_paint_box( gWidgetData[m_nXScreen].gProgressBar->style,
pixDrawable,
GTK_STATE_PRELIGHT, GTK_SHADOW_OUT,
- NULL,
+ nullptr,
gWidgetData[m_nXScreen].gProgressBar,
"bar",
w-nProgressWidth, 0, nProgressWidth, h
@@ -3599,7 +3599,7 @@ bool GtkSalGraphics::NWPaintGTKProgress(
gtk_paint_box( gWidgetData[m_nXScreen].gProgressBar->style,
pixDrawable,
GTK_STATE_PRELIGHT, GTK_SHADOW_OUT,
- NULL,
+ nullptr,
gWidgetData[m_nXScreen].gProgressBar,
"bar",
0, 0, nProgressWidth, h
@@ -3652,7 +3652,7 @@ bool GtkSalGraphics::NWPaintGTKSlider(
pixDrawable,
eState,
GTK_SHADOW_IN,
- NULL,
+ nullptr,
pWidget,
"trough",
0, (h-slider_width-2*trough_border)/2, w, slider_width + 2*trough_border);
@@ -3661,7 +3661,7 @@ bool GtkSalGraphics::NWPaintGTKSlider(
pixDrawable,
eState,
GTK_SHADOW_OUT,
- NULL,
+ nullptr,
pWidget,
pDetail,
x, (h-slider_width)/2,
@@ -3674,7 +3674,7 @@ bool GtkSalGraphics::NWPaintGTKSlider(
pixDrawable,
eState,
GTK_SHADOW_IN,
- NULL,
+ nullptr,
pWidget,
"trough",
(w-slider_width-2*trough_border)/2, 0, slider_width + 2*trough_border, h);
@@ -3683,7 +3683,7 @@ bool GtkSalGraphics::NWPaintGTKSlider(
pixDrawable,
eState,
GTK_SHADOW_OUT,
- NULL,
+ nullptr,
pWidget,
pDetail,
(w-slider_width)/2, y,
@@ -3710,8 +3710,8 @@ static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen,
const OUString& )
{
Rectangle aPartRect;
- GtkRequisition *pIndicatorSize = NULL;
- GtkBorder *pIndicatorSpacing = NULL;
+ GtkRequisition *pIndicatorSize = nullptr;
+ GtkBorder *pIndicatorSpacing = nullptr;
gint width = 13; // GTK+ default
gint right = 5; // GTK+ default
gint nButtonAreaWidth = 0;
@@ -3773,8 +3773,8 @@ static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen,
const OUString& )
{
Rectangle aIndicatorRect;
- GtkRequisition *pIndicatorSize = NULL;
- GtkBorder *pIndicatorSpacing = NULL;
+ GtkRequisition *pIndicatorSize = nullptr;
+ GtkBorder *pIndicatorSpacing = nullptr;
gint width = 13; // GTK+ default
gint height = 13; // GTK+ default
gint right = 5; // GTK+ default
@@ -3894,7 +3894,7 @@ void printStyleColors( GtkStyle* pStyle )
void GtkSalGraphics::signalSettingsNotify( GObject *pSettings, GParamSpec *pSpec, gpointer )
{
- g_return_if_fail( pSpec != NULL );
+ g_return_if_fail( pSpec != nullptr );
if( !strcmp( pSpec->name, "gtk-fontconfig-timestamp" ) )
GtkSalGraphics::refreshFontconfig( GTK_SETTINGS( pSettings ) );
@@ -3931,7 +3931,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
GUINT_TO_POINTER( 1 ) );
g_signal_connect_data( G_OBJECT( pSettings ), "notify",
G_CALLBACK( signalSettingsNotify ),
- NULL, NULL, G_CONNECT_AFTER );
+ nullptr, nullptr, G_CONNECT_AFTER );
}
refreshFontconfig( pSettings );
@@ -4008,13 +4008,13 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetHighlightTextColor( aHighlightTextColor );
// hyperlink colors
- GdkColor *link_color = NULL;
+ GdkColor *link_color = nullptr;
gtk_widget_style_get (m_pWindow, "link-color", &link_color, NULL);
if (link_color)
{
aStyleSet.SetLinkColor(getColor(*link_color));
gdk_color_free (link_color);
- link_color = NULL;
+ link_color = nullptr;
}
gtk_widget_style_get (m_pWindow, "visited-link-color", &link_color, NULL);
if (link_color)
@@ -4237,7 +4237,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetMinThumbSize( min_slider_length - magic );
// preferred icon style
- gchar* pIconThemeName = NULL;
+ gchar* pIconThemeName = nullptr;
g_object_get( pSettings, "gtk-icon-theme-name", &pIconThemeName, nullptr );
aStyleSet.SetPreferredIconTheme( OUString::createFromAscii( pIconThemeName ) );
g_free( pIconThemeName );
@@ -4387,7 +4387,7 @@ static void NWEnsureGTKRadio( SalX11Screen nScreen )
{
if ( !gWidgetData[nScreen].gRadioWidget || !gWidgetData[nScreen].gRadioWidgetSibling )
{
- gWidgetData[nScreen].gRadioWidget = gtk_radio_button_new( NULL );
+ gWidgetData[nScreen].gRadioWidget = gtk_radio_button_new( nullptr );
gWidgetData[nScreen].gRadioWidgetSibling = gtk_radio_button_new_from_widget( GTK_RADIO_BUTTON(gWidgetData[nScreen].gRadioWidget) );
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gRadioWidget, nScreen );
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gRadioWidgetSibling, nScreen );
@@ -4407,13 +4407,13 @@ static void NWEnsureGTKScrollbars( SalX11Screen nScreen )
{
if ( !gWidgetData[nScreen].gScrollHorizWidget )
{
- gWidgetData[nScreen].gScrollHorizWidget = gtk_hscrollbar_new( NULL );
+ gWidgetData[nScreen].gScrollHorizWidget = gtk_hscrollbar_new( nullptr );
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gScrollHorizWidget, nScreen );
}
if ( !gWidgetData[nScreen].gScrollVertWidget )
{
- gWidgetData[nScreen].gScrollVertWidget = gtk_vscrollbar_new( NULL );
+ gWidgetData[nScreen].gScrollVertWidget = gtk_vscrollbar_new( nullptr );
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gScrollVertWidget, nScreen );
}
}
@@ -4558,7 +4558,7 @@ static void NWEnsureGTKMenu( SalX11Screen nScreen )
gWidgetData[nScreen].gMenuWidget = gtk_menu_new();
gWidgetData[nScreen].gMenuItemMenuWidget = gtk_menu_item_new_with_label( "b" );
gWidgetData[nScreen].gMenuItemCheckMenuWidget = gtk_check_menu_item_new_with_label( "b" );
- gWidgetData[nScreen].gMenuItemRadioMenuWidget = gtk_radio_menu_item_new_with_label( NULL, "b" );
+ gWidgetData[nScreen].gMenuItemRadioMenuWidget = gtk_radio_menu_item_new_with_label( nullptr, "b" );
gWidgetData[nScreen].gMenuItemSeparatorMenuWidget = gtk_separator_menu_item_new();
gWidgetData[nScreen].gImageMenuItem = gtk_image_menu_item_new();
@@ -4631,7 +4631,7 @@ static void NWEnsureGTKFrame( SalX11Screen nScreen )
{
if( !gWidgetData[nScreen].gFrame )
{
- gWidgetData[nScreen].gFrame = gtk_frame_new(NULL);
+ gWidgetData[nScreen].gFrame = gtk_frame_new(nullptr);
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gFrame, nScreen );
}
}
diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx
index 3615f8c0c4d2..767949468563 100644
--- a/vcl/unx/gtk/gdi/salprn-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx
@@ -125,8 +125,8 @@ struct GtkSalPrinter_Impl
};
GtkSalPrinter_Impl::GtkSalPrinter_Impl()
- : m_pPrinter(0)
- , m_pSettings(0)
+ : m_pPrinter(nullptr)
+ , m_pSettings(nullptr)
{
}
@@ -135,12 +135,12 @@ GtkSalPrinter_Impl::~GtkSalPrinter_Impl()
if (m_pPrinter)
{
g_object_unref(G_OBJECT(m_pPrinter));
- m_pPrinter = NULL;
+ m_pPrinter = nullptr;
}
if (m_pSettings)
{
g_object_unref(G_OBJECT(m_pSettings));
- m_pSettings = NULL;
+ m_pSettings = nullptr;
}
}
@@ -290,10 +290,10 @@ GtkSalPrinter::EndJob()
OUStringToOString(m_xImpl->m_sJobName, RTL_TEXTENCODING_UTF8).getStr(),
m_xImpl->m_pPrinter, m_xImpl->m_pSettings, pPageSetup);
- GError* error = NULL;
+ GError* error = nullptr;
bRet = xWrapper->print_job_set_source_file(pJob, m_xImpl->m_sSpoolFile.getStr(), &error);
if (bRet)
- xWrapper->print_job_send(pJob, NULL, NULL, NULL);
+ xWrapper->print_job_send(pJob, nullptr, nullptr, nullptr);
else
{
//To-Do, do something with this
@@ -330,7 +330,7 @@ lcl_makeFrame(
const uno::Sequence<OUString> &i_rHelpTexts,
sal_Int32* const io_pCurHelpText)
{
- GtkWidget* const pLabel = gtk_label_new(NULL);
+ GtkWidget* const pLabel = gtk_label_new(nullptr);
lcl_setHelpText(pLabel, i_rHelpTexts, !io_pCurHelpText ? 0 : (*io_pCurHelpText)++);
gtk_misc_set_alignment(GTK_MISC(pLabel), 0.0, 0.5);
@@ -404,7 +404,7 @@ void
GtkPrintDialog::impl_initDialog()
{
//To-Do, like fpicker, set UI language
- m_pDialog = m_xWrapper->print_unix_dialog_new(NULL, NULL);
+ m_pDialog = m_xWrapper->print_unix_dialog_new(nullptr, nullptr);
vcl::Window* const pTopWindow(Application::GetActiveTopWindow());
if (pTopWindow)
@@ -437,10 +437,10 @@ GtkPrintDialog::impl_initCustomTab()
const uno::Sequence<beans::PropertyValue>& rOptions(m_rController.getUIOptions());
DependencyMap_t aPropertyToDependencyRowMap;
CustomTabs_t aCustomTabs;
- GtkWidget* pCurParent = NULL;
- GtkWidget* pCurTabPage = NULL;
- GtkWidget* pCurSubGroup = NULL;
- GtkWidget* pStandardPrintRangeContainer = NULL;
+ GtkWidget* pCurParent = nullptr;
+ GtkWidget* pCurTabPage = nullptr;
+ GtkWidget* pCurSubGroup = nullptr;
+ GtkWidget* pStandardPrintRangeContainer = nullptr;
bool bIgnoreSubgroup = false;
for (int i = 0; i != rOptions.getLength(); i++)
{
@@ -459,7 +459,7 @@ GtkPrintDialog::impl_initCustomTab()
sal_Int32 nDependsOnValue = 0;
bool bUseDependencyRow = false;
bool bIgnore = false;
- GtkWidget* pGroup = NULL;
+ GtkWidget* pGroup = nullptr;
bool bGtkInternal = false;
//Fix fdo#69381
@@ -508,7 +508,7 @@ GtkPrintDialog::impl_initCustomTab()
const int nLen = aHelpIds.getLength();
aHelpTexts.realloc(nLen);
for (int j = 0; j != nLen; ++j)
- aHelpTexts[j] = pHelp->GetHelpText(aHelpIds[j], 0);
+ aHelpTexts[j] = pHelp->GetHelpText(aHelpIds[j], nullptr);
}
else // fallback
aHelpTexts = aHelpIds;
@@ -553,7 +553,7 @@ GtkPrintDialog::impl_initCustomTab()
pCurParent = gtk_vbox_new(FALSE, 12);
gtk_container_set_border_width(GTK_CONTAINER(pCurParent), 0);
- pCurSubGroup = lcl_makeFrame(pCurParent, aText, aHelpTexts, NULL);
+ pCurSubGroup = lcl_makeFrame(pCurParent, aText, aHelpTexts, nullptr);
gtk_box_pack_start(GTK_BOX(pCurTabPage), pCurSubGroup, FALSE, FALSE, 0);
}
// special case: we need to map these to controls of the gtk print dialog
@@ -577,8 +577,8 @@ GtkPrintDialog::impl_initCustomTab()
// 2. it may cause warning because the widget may not
// have been placed in m_aControlToPropertyMap yet
- GtkWidget* pWidget = NULL;
- beans::PropertyValue* pVal = NULL;
+ GtkWidget* pWidget = nullptr;
+ beans::PropertyValue* pVal = nullptr;
if (aCtrlType == "Bool" && pCurParent)
{
pWidget = gtk_check_button_new_with_mnemonic(
@@ -592,7 +592,7 @@ GtkPrintDialog::impl_initCustomTab()
pVal->Value >>= bVal;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pWidget), bVal);
gtk_widget_set_sensitive(pWidget,
- m_rController.isUIOptionEnabled(aPropertyName) && pVal != NULL);
+ m_rController.isUIOptionEnabled(aPropertyName) && pVal != nullptr);
g_signal_connect(pWidget, "toggled", G_CALLBACK(GtkPrintDialog::UIOption_CheckHdl), this);
}
else if (aCtrlType == "Radio" && pCurParent)
@@ -611,7 +611,7 @@ GtkPrintDialog::impl_initCustomTab()
for (sal_Int32 m = 0; m != aChoices.getLength(); m++)
{
pWidget = gtk_radio_button_new_with_mnemonic_from_widget(
- GTK_RADIO_BUTTON(m == 0 ? NULL : pWidget),
+ GTK_RADIO_BUTTON(m == 0 ? nullptr : pWidget),
OUStringToOString(aChoices[m].replace('~', '_'), RTL_TEXTENCODING_UTF8).getStr());
lcl_setHelpText(pWidget, aHelpTexts, nCurHelpText++);
m_aControlToPropertyMap[pWidget] = aPropertyName;
@@ -622,7 +622,7 @@ GtkPrintDialog::impl_initCustomTab()
aPropertyToDependencyRowMap[aPropertyName + OUString::number(m)] = pRow;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pWidget), m == nSelectVal);
gtk_widget_set_sensitive(pWidget,
- m_rController.isUIOptionEnabled(aPropertyName) && pVal != NULL);
+ m_rController.isUIOptionEnabled(aPropertyName) && pVal != nullptr);
g_signal_connect(pWidget, "toggled",
G_CALLBACK(GtkPrintDialog::UIOption_RadioHdl), this);
}
@@ -683,7 +683,7 @@ GtkPrintDialog::impl_initCustomTab()
m_aControlToPropertyMap[pWidget] = aPropertyName;
gtk_widget_set_sensitive(pWidget,
- m_rController.isUIOptionEnabled(aPropertyName) && pVal != NULL);
+ m_rController.isUIOptionEnabled(aPropertyName) && pVal != nullptr);
if (!aText.isEmpty())
{
@@ -701,7 +701,7 @@ GtkPrintDialog::impl_initCustomTab()
else
SAL_INFO("vcl.gtk", "unhandled option type: " << aCtrlType);
- GtkWidget* pRow = NULL;
+ GtkWidget* pRow = nullptr;
if (pWidget)
{
if (bUseDependencyRow && !aDependsOnName.isEmpty())
@@ -710,7 +710,7 @@ GtkPrintDialog::impl_initCustomTab()
if (!pRow)
{
gtk_widget_destroy(pWidget);
- pWidget = NULL;
+ pWidget = nullptr;
}
}
}
@@ -804,7 +804,7 @@ GtkPrintDialog::impl_checkOptionalControlDependencies()
beans::PropertyValue*
GtkPrintDialog::impl_queryPropertyValue(GtkWidget* const i_pWidget) const
{
- beans::PropertyValue* pVal(0);
+ beans::PropertyValue* pVal(nullptr);
std::map<GtkWidget*, OUString>::const_iterator aIt(m_aControlToPropertyMap.find(i_pWidget));
if (aIt != m_aControlToPropertyMap.end())
{
diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx b/vcl/unx/gtk/window/gloactiongroup.cxx
index 23307fd2a8df..838538801ca7 100644
--- a/vcl/unx/gtk/window/gloactiongroup.cxx
+++ b/vcl/unx/gtk/window/gloactiongroup.cxx
@@ -51,7 +51,7 @@ G_DEFINE_TYPE (GLOAction, g_lo_action, G_TYPE_OBJECT);
GLOAction*
g_lo_action_new()
{
- return G_LO_ACTION (g_object_new (G_TYPE_LO_ACTION, NULL));
+ return G_LO_ACTION (g_object_new (G_TYPE_LO_ACTION, nullptr));
}
static void
@@ -60,10 +60,10 @@ g_lo_action_init (GLOAction *action)
action->item_id = -1;
action->submenu = FALSE;
action->enabled = TRUE;
- action->parameter_type = NULL;
- action->state_type = NULL;
- action->state_hint = NULL;
- action->state = NULL;
+ action->parameter_type = nullptr;
+ action->state_type = nullptr;
+ action->state_hint = nullptr;
+ action->state = nullptr;
}
static void
@@ -131,10 +131,10 @@ g_lo_action_group_list_actions (GActionGroup *group)
keys = g_new (gchar *, n + 1);
g_hash_table_iter_init (&iter, loGroup->priv->table);
- while (g_hash_table_iter_next (&iter, &key, NULL))
+ while (g_hash_table_iter_next (&iter, &key, nullptr))
keys[i++] = g_strdup (static_cast<gchar*>(key));
g_assert_cmpint (i, ==, n);
- keys[n] = NULL;
+ keys[n] = nullptr;
return keys;
}
@@ -154,7 +154,7 @@ g_lo_action_group_query_action (GActionGroup *group,
action = G_LO_ACTION (g_hash_table_lookup (lo_group->priv->table, action_name));
- if (action == NULL)
+ if (action == nullptr)
return FALSE;
if (enabled)
@@ -173,10 +173,10 @@ g_lo_action_group_query_action (GActionGroup *group,
*state_type = action->state_type;
if (state_hint)
- *state_hint = (action->state_hint) ? g_variant_ref (action->state_hint) : NULL;
+ *state_hint = (action->state_hint) ? g_variant_ref (action->state_hint) : nullptr;
if (state)
- *state = (action->state) ? g_variant_ref (action->state) : NULL;
+ *state = (action->state) ? g_variant_ref (action->state) : nullptr;
return TRUE;
}
@@ -190,13 +190,13 @@ g_lo_action_group_perform_submenu_action (GLOActionGroup *group,
GtkSalFrame* pFrame = group->priv->frame;
SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << group << " for frame " << pFrame);
- if (pFrame == NULL)
+ if (pFrame == nullptr)
return;
GtkSalMenu* pSalMenu = static_cast<GtkSalMenu*> (pFrame->GetMenu());
SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << group << " for menu " << pSalMenu);
- if (pSalMenu != NULL) {
+ if (pSalMenu != nullptr) {
gboolean bState = g_variant_get_boolean (state);
SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << group << " to " << bState);
@@ -213,16 +213,16 @@ g_lo_action_group_change_state (GActionGroup *group,
GVariant *value)
{
SAL_INFO("vcl.unity", "g_lo_action_group_change_state on " << group );
- g_return_if_fail (value != NULL);
+ g_return_if_fail (value != nullptr);
g_variant_ref_sink (value);
- if (action_name != NULL)
+ if (action_name != nullptr)
{
GLOActionGroup* lo_group = G_LO_ACTION_GROUP (group);
GLOAction* action = G_LO_ACTION (g_hash_table_lookup (lo_group->priv->table, action_name));
- if (action != NULL)
+ if (action != nullptr)
{
if (action->submenu)
g_lo_action_group_perform_submenu_action (lo_group, action_name, value);
@@ -231,7 +231,7 @@ g_lo_action_group_change_state (GActionGroup *group,
gboolean is_new = FALSE;
/* If action already exists but has no state, it should be removed and added again. */
- if (action->state_type == NULL)
+ if (action->state_type == nullptr)
{
g_action_group_action_removed (G_ACTION_GROUP (group), action_name);
action->state_type = g_variant_type_copy (g_variant_get_type(value));
@@ -266,15 +266,15 @@ g_lo_action_group_activate (GActionGroup *group,
GtkSalFrame *pFrame = lo_group->priv->frame;
SAL_INFO("vcl.unity", "g_lo_action_group_activate on group " << group << " for frame " << pFrame << " with parameter " << parameter);
- if ( parameter != NULL )
+ if ( parameter != nullptr )
g_action_group_change_action_state( group, action_name, parameter );
- if ( pFrame != NULL )
+ if ( pFrame != nullptr )
{
GtkSalMenu* pSalMenu = static_cast< GtkSalMenu* >( pFrame->GetMenu() );
SAL_INFO("vcl.unity", "g_lo_action_group_activate for menu " << pSalMenu);
- if ( pSalMenu != NULL )
+ if ( pSalMenu != nullptr )
{
GLOAction* action = G_LO_ACTION (g_hash_table_lookup (lo_group->priv->table, action_name));
SAL_INFO("vcl.unity", "g_lo_action_group_activate dispatching action " << action << " named " << action_name << " on menu " << pSalMenu);
@@ -289,7 +289,7 @@ g_lo_action_group_insert (GLOActionGroup *group,
gint item_id,
gboolean submenu)
{
- g_lo_action_group_insert_stateful (group, action_name, item_id, submenu, NULL, NULL, NULL, NULL);
+ g_lo_action_group_insert_stateful (group, action_name, item_id, submenu, nullptr, nullptr, nullptr, nullptr);
}
void
@@ -306,9 +306,9 @@ g_lo_action_group_insert_stateful (GLOActionGroup *group,
GLOAction* old_action = G_LO_ACTION (g_hash_table_lookup (group->priv->table, action_name));
- if (old_action == NULL || old_action->item_id != item_id)
+ if (old_action == nullptr || old_action->item_id != item_id)
{
- if (old_action != NULL)
+ if (old_action != nullptr)
g_lo_action_group_remove (group, action_name);
// g_action_group_action_removed (G_ACTION_GROUP (group), action_name);
@@ -354,7 +354,7 @@ g_lo_action_group_init (GLOActionGroup *group)
GLOActionGroupPrivate);
group->priv->table = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, g_object_unref);
- group->priv->frame = NULL;
+ group->priv->frame = nullptr;
}
static void
@@ -379,7 +379,7 @@ g_lo_action_group_iface_init (GActionGroupInterface *iface)
GLOActionGroup *
g_lo_action_group_new (gpointer frame)
{
- GLOActionGroup* group = G_LO_ACTION_GROUP (g_object_new (G_TYPE_LO_ACTION_GROUP, NULL));
+ GLOActionGroup* group = G_LO_ACTION_GROUP (g_object_new (G_TYPE_LO_ACTION_GROUP, nullptr));
group->priv->frame = static_cast< GtkSalFrame* > (frame);
return group;
@@ -392,11 +392,11 @@ g_lo_action_group_set_action_enabled (GLOActionGroup *group,
{
SAL_INFO("vcl.unity", "g_lo_action_group_set_action_enabled on " << group);
g_return_if_fail (G_IS_LO_ACTION_GROUP (group));
- g_return_if_fail (action_name != NULL);
+ g_return_if_fail (action_name != nullptr);
GLOAction* action = G_LO_ACTION (g_hash_table_lookup (group->priv->table, action_name));
- if (action == NULL)
+ if (action == nullptr)
return;
action->enabled = enabled;
@@ -411,7 +411,7 @@ g_lo_action_group_remove (GLOActionGroup *group,
SAL_INFO("vcl.unity", "g_lo_action_group_remove on " << group);
g_return_if_fail (G_IS_LO_ACTION_GROUP (group));
- if (action_name != NULL)
+ if (action_name != nullptr)
{
g_action_group_action_removed (G_ACTION_GROUP (group), action_name);
g_hash_table_remove (group->priv->table, action_name);
@@ -426,7 +426,7 @@ g_lo_action_group_clear (GLOActionGroup *group)
GList* keys = g_hash_table_get_keys (group->priv->table);
- for (GList* element = g_list_first (keys); element != NULL; element = g_list_next (element))
+ for (GList* element = g_list_first (keys); element != nullptr; element = g_list_next (element))
{
g_lo_action_group_remove (group, static_cast<gchar*>(element->data));
}
diff --git a/vcl/unx/gtk/window/glomenu.cxx b/vcl/unx/gtk/window/glomenu.cxx
index b6d86c23346d..6aa19e6b74a9 100644
--- a/vcl/unx/gtk/window/glomenu.cxx
+++ b/vcl/unx/gtk/window/glomenu.cxx
@@ -95,9 +95,9 @@ g_lo_menu_is_mutable (GMenuModel*)
static gint
g_lo_menu_get_n_items (GMenuModel *model)
{
- g_return_val_if_fail (model != NULL, 0);
+ g_return_val_if_fail (model != nullptr, 0);
GLOMenu *menu = G_LO_MENU (model);
- g_return_val_if_fail (menu->items != NULL, 0);
+ g_return_val_if_fail (menu->items != nullptr, 0);
return menu->items->len;
}
@@ -110,7 +110,7 @@ g_lo_menu_get_n_items_from_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_val_if_fail (model != NULL, 0);
+ g_return_val_if_fail (model != nullptr, 0);
gint length = model->items->len;
@@ -142,7 +142,7 @@ g_lo_menu_insert (GLOMenu *menu,
gint position,
const gchar *label)
{
- g_lo_menu_insert_section (menu, position, label, NULL);
+ g_lo_menu_insert_section (menu, position, label, nullptr);
}
void
@@ -156,7 +156,7 @@ g_lo_menu_insert_in_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
g_lo_menu_insert (model, position, label);
@@ -166,7 +166,7 @@ g_lo_menu_insert_in_section (GLOMenu *menu,
GLOMenu *
g_lo_menu_new()
{
- return G_LO_MENU( g_object_new (G_TYPE_LO_MENU, NULL) );
+ return G_LO_MENU( g_object_new (G_TYPE_LO_MENU, nullptr) );
}
void
@@ -176,7 +176,7 @@ g_lo_menu_set_attribute_value (GLOMenu *menu,
GVariant *value)
{
g_return_if_fail (G_IS_LO_MENU (menu));
- g_return_if_fail (attribute != NULL);
+ g_return_if_fail (attribute != nullptr);
g_return_if_fail (valid_attribute_name (attribute));
if (position >= (gint) menu->items->len)
@@ -184,7 +184,7 @@ g_lo_menu_set_attribute_value (GLOMenu *menu,
struct item menu_item = g_array_index (menu->items, struct item, position);
- if (value != NULL)
+ if (value != nullptr)
g_hash_table_insert (menu_item.attributes, g_strdup (attribute), g_variant_ref_sink (value));
else
g_hash_table_remove (menu_item.attributes, attribute);
@@ -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 != NULL, NULL);
+ g_return_val_if_fail (model != nullptr, NULL);
GVariant *value = g_menu_model_get_item_attribute_value (model,
position,
@@ -220,10 +220,10 @@ g_lo_menu_set_label (GLOMenu *menu,
GVariant *value;
- if (label != NULL)
+ if (label != nullptr)
value = g_variant_new_string (label);
else
- value = NULL;
+ value = nullptr;
g_lo_menu_set_attribute_value (menu, position, G_MENU_ATTRIBUTE_LABEL, value);
}
@@ -238,7 +238,7 @@ g_lo_menu_set_label_to_item_in_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
g_lo_menu_set_label (model, position, label);
@@ -261,11 +261,11 @@ g_lo_menu_get_label_from_item_in_section (GLOMenu *menu,
G_MENU_ATTRIBUTE_LABEL,
G_VARIANT_TYPE_STRING);
- gchar *label = NULL;
+ gchar *label = nullptr;
if (label_value)
{
- label = g_variant_dup_string (label_value, NULL);
+ label = g_variant_dup_string (label_value, nullptr);
g_variant_unref (label_value);
}
@@ -282,14 +282,14 @@ g_lo_menu_set_action_and_target_value (GLOMenu *menu,
GVariant *action_value;
- if (action != NULL)
+ if (action != nullptr)
{
action_value = g_variant_new_string (action);
}
else
{
- action_value = NULL;
- target_value = NULL;
+ action_value = nullptr;
+ target_value = nullptr;
}
g_lo_menu_set_attribute_value (menu, position, G_MENU_ATTRIBUTE_ACTION, action_value);
@@ -309,7 +309,7 @@ g_lo_menu_set_action_and_target_value_to_item_in_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
g_lo_menu_set_action_and_target_value (model, position, command, target_value);
@@ -326,14 +326,14 @@ g_lo_menu_set_accelerator_to_item_in_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
GVariant *value;
- if (accelerator != NULL)
+ if (accelerator != nullptr)
value = g_variant_new_string (accelerator);
else
- value = NULL;
+ value = nullptr;
g_lo_menu_set_attribute_value (model, position, G_LO_MENU_ATTRIBUTE_ACCELERATOR, value);
@@ -356,11 +356,11 @@ g_lo_menu_get_accelerator_from_item_in_section (GLOMenu *menu,
G_LO_MENU_ATTRIBUTE_ACCELERATOR,
G_VARIANT_TYPE_STRING);
- gchar *accel = NULL;
+ gchar *accel = nullptr;
- if (accel_value != NULL)
+ if (accel_value != nullptr)
{
- accel = g_variant_dup_string (accel_value, NULL);
+ accel = g_variant_dup_string (accel_value, nullptr);
g_variant_unref (accel_value);
}
@@ -377,14 +377,14 @@ g_lo_menu_set_command_to_item_in_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
GVariant *value;
- if (command != NULL)
+ if (command != nullptr)
value = g_variant_new_string (command);
else
- value = NULL;
+ value = nullptr;
g_lo_menu_set_attribute_value (model, position, G_LO_MENU_ATTRIBUTE_COMMAND, value);
@@ -407,11 +407,11 @@ g_lo_menu_get_command_from_item_in_section (GLOMenu *menu,
G_LO_MENU_ATTRIBUTE_COMMAND,
G_VARIANT_TYPE_STRING);
- gchar *command = NULL;
+ gchar *command = nullptr;
- if (command_value != NULL)
+ if (command_value != nullptr)
{
- command = g_variant_dup_string (command_value, NULL);
+ command = g_variant_dup_string (command_value, nullptr);
g_variant_unref (command_value);
}
@@ -425,7 +425,7 @@ g_lo_menu_set_link (GLOMenu *menu,
GMenuModel *model)
{
g_return_if_fail (G_IS_LO_MENU (menu));
- g_return_if_fail (link != NULL);
+ g_return_if_fail (link != nullptr);
g_return_if_fail (valid_attribute_name (link));
if (position < 0 || position >= (gint) menu->items->len)
@@ -433,7 +433,7 @@ g_lo_menu_set_link (GLOMenu *menu,
struct item menu_item = g_array_index (menu->items, struct item, position);
- if (model != NULL)
+ if (model != nullptr)
g_hash_table_insert (menu_item.links, g_strdup (link), g_object_ref (model));
else
g_hash_table_remove (menu_item.links, link);
@@ -494,7 +494,7 @@ g_lo_menu_new_submenu_in_item_in_section (GLOMenu *menu,
GLOMenu* model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
if (0 <= position && position < (gint) model->items->len) {
GMenuModel* submenu = G_MENU_MODEL (g_lo_menu_new());
@@ -519,9 +519,9 @@ g_lo_menu_get_submenu_from_item_in_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_val_if_fail (model != NULL, NULL);
+ g_return_val_if_fail (model != nullptr, NULL);
- GLOMenu *submenu = NULL;
+ GLOMenu *submenu = nullptr;
if (0 <= position && position < (gint) model->items->len)
submenu = G_LO_MENU (G_MENU_MODEL_CLASS (g_lo_menu_parent_class)
@@ -543,14 +543,14 @@ g_lo_menu_set_submenu_action_to_item_in_section (GLOMenu *menu,
GMenuModel *model = G_MENU_MODEL (g_lo_menu_get_section (menu, section));
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
GVariant *value;
- if (action != NULL)
+ if (action != nullptr)
value = g_variant_new_string (action);
else
- value = NULL;
+ value = nullptr;
g_lo_menu_set_attribute_value (G_LO_MENU (model), position, G_LO_MENU_ATTRIBUTE_SUBMENU_ACTION, value);
@@ -563,9 +563,9 @@ g_lo_menu_set_submenu_action_to_item_in_section (GLOMenu *menu,
static void
g_lo_menu_clear_item (struct item *menu_item)
{
- if (menu_item->attributes != NULL)
+ if (menu_item->attributes != nullptr)
g_hash_table_unref (menu_item->attributes);
- if (menu_item->links != NULL)
+ if (menu_item->links != nullptr)
g_hash_table_unref (menu_item->links);
}
@@ -591,7 +591,7 @@ g_lo_menu_remove_from_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
g_lo_menu_remove (model, position);
diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx
index 463c3c1ff486..1d510a45c610 100644
--- a/vcl/unx/gtk/window/gtkobject.cxx
+++ b/vcl/unx/gtk/window/gtkobject.cxx
@@ -30,8 +30,8 @@
#include <unx/gtk/gtkgdi.hxx>
GtkSalObject::GtkSalObject( GtkSalFrame* pParent, bool bShow )
- : m_pSocket( NULL ),
- m_pRegion( NULL )
+ : m_pSocket( nullptr ),
+ m_pRegion( nullptr )
{
if( pParent )
{
@@ -65,10 +65,10 @@ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, bool bShow )
m_aSystemData.aShellWindow = pParent->GetSystemData()->aWindow;
++nWindow;
#endif
- m_aSystemData.pSalFrame = NULL;
+ m_aSystemData.pSalFrame = nullptr;
m_aSystemData.pWidget = m_pSocket;
m_aSystemData.nScreen = pParent->getXScreenNumber().getXScreen();
- m_aSystemData.pAppContext = NULL;
+ m_aSystemData.pAppContext = nullptr;
m_aSystemData.pShellWidget = GTK_WIDGET(pParent->getWindow());
g_signal_connect( G_OBJECT(m_pSocket), "button-press-event", G_CALLBACK(signalButton), this );
@@ -109,7 +109,7 @@ GtkSalObject::~GtkSalObject()
void GtkSalObject::ResetClipRegion()
{
if( m_pSocket )
- gdk_window_shape_combine_region( widget_get_window(m_pSocket), NULL, 0, 0 );
+ gdk_window_shape_combine_region( widget_get_window(m_pSocket), nullptr, 0, 0 );
}
sal_uInt16 GtkSalObject::GetClipRegionType()
@@ -184,7 +184,7 @@ gboolean GtkSalObject::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointe
if( pEvent->type == GDK_BUTTON_PRESS )
{
- pThis->CallCallback( SALOBJ_EVENT_TOTOP, NULL );
+ pThis->CallCallback( SALOBJ_EVENT_TOTOP, nullptr );
}
return FALSE;
@@ -194,7 +194,7 @@ gboolean GtkSalObject::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer
{
GtkSalObject* pThis = static_cast<GtkSalObject*>(object);
- pThis->CallCallback( pEvent->in ? SALOBJ_EVENT_GETFOCUS : SALOBJ_EVENT_LOSEFOCUS, NULL );
+ pThis->CallCallback( pEvent->in ? SALOBJ_EVENT_GETFOCUS : SALOBJ_EVENT_LOSEFOCUS, nullptr );
return FALSE;
}
@@ -204,7 +204,7 @@ void GtkSalObject::signalDestroy( GtkWidget* pObj, gpointer object )
GtkSalObject* pThis = static_cast<GtkSalObject*>(object);
if( pObj == pThis->m_pSocket )
{
- pThis->m_pSocket = NULL;
+ pThis->m_pSocket = nullptr;
}
}
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 8fe61521902a..fbd7cc70117e 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -106,7 +106,7 @@ using namespace com::sun::star;
int GtkSalFrame::m_nFloats = 0;
#if defined ENABLE_GMENU_INTEGRATION
-static GDBusConnection* pSessionBus = NULL;
+static GDBusConnection* pSessionBus = nullptr;
#endif
static sal_uInt16 GetKeyModCode( guint state )
@@ -331,7 +331,7 @@ static guint GetKeyValFor(GdkKeymap* pKeyMap, guint16 hardware_keycode, guint8 g
{
guint updated_keyval = 0;
gdk_keymap_translate_keyboard_state(pKeyMap, hardware_keycode,
- (GdkModifierType)0, group, &updated_keyval, NULL, NULL, NULL);
+ (GdkModifierType)0, group, &updated_keyval, nullptr, nullptr, nullptr);
return updated_keyval;
}
@@ -505,7 +505,7 @@ GtkSalFrame::GtkSalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle )
m_bDefaultSize = ( (nStyle & SalFrameStyleFlags::SIZEABLE) && ! pParent );
m_bWindowIsGtkPlug = false;
#if defined(ENABLE_DBUS) && defined(ENABLE_GIO)
- m_pLastSyncedDbusMenu = NULL;
+ m_pLastSyncedDbusMenu = nullptr;
#endif
Init( pParent, nStyle );
}
@@ -519,7 +519,7 @@ GtkSalFrame::GtkSalFrame( SystemParentData* pSysData )
m_bDefaultPos = true;
m_bDefaultSize = true;
#if defined(ENABLE_DBUS) && defined(ENABLE_GIO)
- m_pLastSyncedDbusMenu = NULL;
+ m_pLastSyncedDbusMenu = nullptr;
#endif
Init( pSysData );
}
@@ -534,7 +534,7 @@ gdk_x11_window_set_utf8_property (GdkWindow *window,
#if !GTK_CHECK_VERSION(3,0,0)
GdkDisplay* display = gdk_window_get_display (window);
- if (value != NULL)
+ if (value != nullptr)
{
XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
GDK_WINDOW_XID (window),
@@ -601,7 +601,7 @@ static void activate_uno(GSimpleAction *action, GVariant*, gpointer)
if (!xDispatchProvider.is())
return;
- gchar *strval = NULL;
+ gchar *strval = nullptr;
g_object_get(action, "name", &strval, NULL);
if (!strval)
return;
@@ -642,11 +642,11 @@ static void activate_uno(GSimpleAction *action, GVariant*, gpointer)
}
static const GActionEntry app_entries[] = {
- { "OptionsTreeDialog", activate_uno, NULL, NULL, NULL, {0} },
- { "About", activate_uno, NULL, NULL, NULL, {0} },
- { "HelpIndex", activate_uno, NULL, NULL, NULL, {0} },
- { "Quit", activate_uno, NULL, NULL, NULL, {0} },
- { "New", activate_uno, NULL, NULL, NULL, {0} }
+ { "OptionsTreeDialog", activate_uno, nullptr, nullptr, nullptr, {0} },
+ { "About", activate_uno, nullptr, nullptr, nullptr, {0} },
+ { "HelpIndex", activate_uno, nullptr, nullptr, nullptr, {0} },
+ { "Quit", activate_uno, nullptr, nullptr, nullptr, {0} },
+ { "New", activate_uno, nullptr, nullptr, nullptr, {0} }
};
gboolean ensure_dbus_setup( gpointer data )
@@ -654,11 +654,11 @@ gboolean ensure_dbus_setup( gpointer data )
GtkSalFrame* pSalFrame = static_cast< GtkSalFrame* >( data );
GdkWindow* gdkWindow = widget_get_window( pSalFrame->getWindow() );
- if ( gdkWindow != NULL && g_object_get_data( G_OBJECT( gdkWindow ), "g-lo-menubar" ) == NULL )
+ if ( gdkWindow != nullptr && g_object_get_data( G_OBJECT( gdkWindow ), "g-lo-menubar" ) == nullptr )
{
// Get a DBus session connection.
if(!pSessionBus)
- pSessionBus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
+ pSessionBus = g_bus_get_sync (G_BUS_TYPE_SESSION, nullptr, nullptr);
if( !pSessionBus )
{
return FALSE;
@@ -685,10 +685,10 @@ gboolean ensure_dbus_setup( gpointer data )
// Publish the menu model and the action group.
SAL_INFO("vcl.unity", "exporting menu model at " << pMenuModel << " for window " << windowId);
- pSalFrame->m_nMenuExportId = g_dbus_connection_export_menu_model (pSessionBus, aDBusMenubarPath, pMenuModel, NULL);
+ pSalFrame->m_nMenuExportId = g_dbus_connection_export_menu_model (pSessionBus, aDBusMenubarPath, pMenuModel, nullptr);
SAL_INFO("vcl.unity", "exporting action group at " << pActionGroup << " for window " << windowId);
- pSalFrame->m_nActionGroupExportId = g_dbus_connection_export_action_group( pSessionBus, aDBusWindowPath, pActionGroup, NULL);
- pSalFrame->m_nHudAwarenessId = hud_awareness_register( pSessionBus, aDBusMenubarPath, hud_activated, pSalFrame, NULL, NULL );
+ pSalFrame->m_nActionGroupExportId = g_dbus_connection_export_action_group( pSessionBus, aDBusWindowPath, pActionGroup, nullptr);
+ pSalFrame->m_nHudAwarenessId = hud_awareness_register( pSessionBus, aDBusMenubarPath, hud_activated, pSalFrame, nullptr, nullptr );
// fdo#70885 we don't want app menu under Unity
bool bDesktopIsUnity = (SalGetDesktopEnvironment() == "UNITY");
@@ -712,7 +712,7 @@ gboolean ensure_dbus_setup( gpointer data )
g_menu_append_item( firstsubmenu, item );
g_object_unref(item);
- g_menu_append_section( menu, NULL, G_MENU_MODEL(firstsubmenu));
+ g_menu_append_section( menu, nullptr, G_MENU_MODEL(firstsubmenu));
g_object_unref(firstsubmenu);
GMenu *secondsubmenu = g_menu_new ();
@@ -724,7 +724,7 @@ gboolean ensure_dbus_setup( gpointer data )
g_menu_append_item( secondsubmenu, item );
g_object_unref(item);
- g_menu_append_section( menu, NULL, G_MENU_MODEL(secondsubmenu));
+ g_menu_append_section( menu, nullptr, G_MENU_MODEL(secondsubmenu));
g_object_unref(secondsubmenu);
GMenu *thirdsubmenu = g_menu_new ();
@@ -749,20 +749,20 @@ gboolean ensure_dbus_setup( gpointer data )
item = g_menu_item_new(sQuit.getStr(), "app.Quit");
g_menu_append_item( thirdsubmenu, item );
g_object_unref(item);
- g_menu_append_section( menu, NULL, G_MENU_MODEL(thirdsubmenu));
+ g_menu_append_section( menu, nullptr, G_MENU_MODEL(thirdsubmenu));
g_object_unref(thirdsubmenu);
GSimpleActionGroup *group = g_simple_action_group_new ();
#if GLIB_CHECK_VERSION(2,38,0) // g_simple_action_group_add_entries is deprecated since 2.38
- g_action_map_add_action_entries (G_ACTION_MAP (group), app_entries, G_N_ELEMENTS (app_entries), NULL);
+ g_action_map_add_action_entries (G_ACTION_MAP (group), app_entries, G_N_ELEMENTS (app_entries), nullptr);
#else
g_simple_action_group_add_entries (group, app_entries, G_N_ELEMENTS (app_entries), NULL);
#endif
GActionGroup* pAppActionGroup = G_ACTION_GROUP(group);
- pSalFrame->m_nAppActionGroupExportId = g_dbus_connection_export_action_group( pSessionBus, "/org/libreoffice", pAppActionGroup, NULL);
+ pSalFrame->m_nAppActionGroupExportId = g_dbus_connection_export_action_group( pSessionBus, "/org/libreoffice", pAppActionGroup, nullptr);
g_object_unref(pAppActionGroup);
- pSalFrame->m_nAppMenuExportId = g_dbus_connection_export_menu_model (pSessionBus, "/org/libreoffice/menus/appmenu", G_MENU_MODEL (menu), NULL);
+ pSalFrame->m_nAppMenuExportId = g_dbus_connection_export_menu_model (pSessionBus, "/org/libreoffice/menus/appmenu", G_MENU_MODEL (menu), nullptr);
g_object_unref(menu);
}
@@ -784,7 +784,7 @@ void on_registrar_available( GDBusConnection * /*connection*/,
SalMenu* pSalMenu = pSalFrame->GetMenu();
- if ( pSalMenu != NULL )
+ if ( pSalMenu != nullptr )
{
GtkSalMenu* pGtkSalMenu = static_cast<GtkSalMenu*>(pSalMenu);
pGtkSalMenu->Display( true );
@@ -819,11 +819,11 @@ void GtkSalFrame::EnsureAppMenuWatch()
if ( !m_nWatcherId )
{
// Get a DBus session connection.
- if ( pSessionBus == NULL )
+ if ( pSessionBus == nullptr )
{
- pSessionBus = g_bus_get_sync( G_BUS_TYPE_SESSION, NULL, NULL );
+ pSessionBus = g_bus_get_sync( G_BUS_TYPE_SESSION, nullptr, nullptr );
- if ( pSessionBus == NULL )
+ if ( pSessionBus == nullptr )
return;
}
@@ -834,7 +834,7 @@ void GtkSalFrame::EnsureAppMenuWatch()
on_registrar_available,
on_registrar_unavailable,
static_cast<GtkSalFrame*>(this),
- NULL );
+ nullptr );
}
//ensure_dbus_setup( this );
@@ -851,7 +851,7 @@ void GtkSalFrame::InvalidateGraphics()
continue;
#if !GTK_CHECK_VERSION(3,0,0)
m_aGraphics[i].pGraphics->SetDrawable( None, m_nXScreen );
- m_aGraphics[i].pGraphics->SetWindow(NULL);
+ m_aGraphics[i].pGraphics->SetWindow(nullptr);
#endif
m_aGraphics[i].bInUse = false;
}
@@ -902,7 +902,7 @@ GtkSalFrame::~GtkSalFrame()
#endif
if( m_pWindow )
{
- g_object_set_data( G_OBJECT( m_pWindow ), "SalFrame", NULL );
+ g_object_set_data( G_OBJECT( m_pWindow ), "SalFrame", nullptr );
#if defined ENABLE_GMENU_INTEGRATION
if ( pSessionBus )
@@ -1007,11 +1007,11 @@ ooo_fixed_get_type()
nullptr, /* class init */
#endif
nullptr, /* class finalize */
- NULL, /* class data */
+ nullptr, /* class data */
sizeof (GtkFixed), /* instance size */
0, /* nb preallocs */
nullptr, /* instance init */
- NULL /* value table */
+ nullptr /* value table */
};
type = g_type_register_static( GTK_TYPE_FIXED, "OOoFixed",
@@ -1049,13 +1049,13 @@ void GtkSalFrame::InitCommon()
// add the fixed container child,
// fixed is needed since we have to position plugin windows
- m_pFixedContainer = GTK_FIXED(g_object_new( ooo_fixed_get_type(), NULL ));
+ m_pFixedContainer = GTK_FIXED(g_object_new( ooo_fixed_get_type(), nullptr ));
gtk_container_add( GTK_CONTAINER(m_pEventBox), GTK_WIDGET(m_pFixedContainer) );
#else
- m_pEventBox = 0;
+ m_pEventBox = nullptr;
// add the fixed container child,
// fixed is needed since we have to position plugin windows
- m_pFixedContainer = GTK_FIXED(g_object_new( ooo_fixed_get_type(), NULL ));
+ m_pFixedContainer = GTK_FIXED(g_object_new( ooo_fixed_get_type(), nullptr ));
gtk_container_add( GTK_CONTAINER(m_pWindow), GTK_WIDGET(m_pFixedContainer) );
#endif
@@ -1108,20 +1108,20 @@ void GtkSalFrame::InitCommon()
g_signal_connect( G_OBJECT(m_pWindow), "destroy", G_CALLBACK(signalDestroy), this );
// init members
- m_pCurrentCursor = NULL;
+ m_pCurrentCursor = nullptr;
m_nKeyModifiers = 0;
m_bFullscreen = false;
m_bSpanMonitorsWhenFullscreen = false;
m_nState = GDK_WINDOW_STATE_WITHDRAWN;
m_nVisibility = GDK_VISIBILITY_FULLY_OBSCURED;
m_bSendModChangeOnRelease = false;
- m_pIMHandler = NULL;
+ m_pIMHandler = nullptr;
m_hBackgroundPixmap = None;
m_nExtStyle = 0;
- m_pRegion = NULL;
+ m_pRegion = nullptr;
m_ePointerStyle = static_cast<PointerStyle>(0xffff);
m_bSetFocusOnMap = false;
- m_pSalMenu = NULL;
+ m_pSalMenu = nullptr;
m_nWatcherId = 0;
m_nMenuExportId = 0;
m_nAppMenuExportId = 0;
@@ -1164,7 +1164,7 @@ void GtkSalFrame::InitCommon()
m_aSystemData.pSalFrame = this;
m_aSystemData.pWidget = m_pWindow;
m_aSystemData.nScreen = m_nXScreen.getXScreen();
- m_aSystemData.pAppContext = NULL;
+ m_aSystemData.pAppContext = nullptr;
m_aSystemData.pShellWidget = m_aSystemData.pWidget;
// fake an initial geometry, gets updated via configure event or SetPosSize
@@ -1224,11 +1224,11 @@ void GtkSalFrame::InitCommon()
#if !GTK_CHECK_VERSION(3,0,0)
extern "C" {
typedef void(*setAcceptFn)( GtkWindow*, gboolean );
- static setAcceptFn p_gtk_window_set_accept_focus = NULL;
+ static setAcceptFn p_gtk_window_set_accept_focus = nullptr;
static bool bGetAcceptFocusFn = true;
typedef void(*setUserTimeFn)( GdkWindow*, guint32 );
- static setUserTimeFn p_gdk_x11_window_set_user_time = NULL;
+ static setUserTimeFn p_gdk_x11_window_set_user_time = nullptr;
static bool bGetSetUserTimeFn = true;
}
#endif
@@ -1266,7 +1266,7 @@ static void lcl_set_accept_focus( GtkWindow* pWindow, gboolean bAccept, bool bBe
* want to handle it ourselves (as to sometimes not get
* the focus)
*/
- Atom* pProtocols = NULL;
+ Atom* pProtocols = nullptr;
int nProtocols = 0;
XGetWMProtocols( pDisplay,
aWindow,
@@ -1346,9 +1346,9 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
}
m_pParent = static_cast<GtkSalFrame*>(pParent);
- m_pForeignParent = NULL;
+ m_pForeignParent = nullptr;
m_aForeignParentWindow = None;
- m_pForeignTopLevel = NULL;
+ m_pForeignTopLevel = nullptr;
m_aForeignTopLevelWindow = None;
m_nStyle = nStyle;
@@ -1395,7 +1395,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
if( bDecoHandling )
{
GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
- if( (nStyle & SalFrameStyleFlags::DIALOG) && m_pParent != 0 )
+ if( (nStyle & SalFrameStyleFlags::DIALOG) && m_pParent != nullptr )
eType = GDK_WINDOW_TYPE_HINT_DIALOG;
if( (nStyle & SalFrameStyleFlags::INTRO) )
{
@@ -1472,7 +1472,7 @@ GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow )
bool bBreak = false;
do
{
- pChildren = NULL;
+ pChildren = nullptr;
nChildren = 0;
aParent = aRoot = None;
XQueryTree( getDisplay()->GetDisplay(), aWindow,
@@ -1500,9 +1500,9 @@ GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow )
void GtkSalFrame::Init( SystemParentData* pSysData )
{
- m_pParent = NULL;
+ m_pParent = nullptr;
m_aForeignParentWindow = (GdkNativeWindow)pSysData->aWindow;
- m_pForeignParent = NULL;
+ m_pForeignParent = nullptr;
m_aForeignTopLevelWindow = findTopLevelSystemWindow( (GdkNativeWindow)pSysData->aWindow );
m_pForeignTopLevel = gdk_window_foreign_new_for_display( getGdkDisplay(), m_aForeignTopLevelWindow );
gdk_window_set_events( m_pForeignTopLevel, GDK_STRUCTURE_MASK );
@@ -1617,7 +1617,7 @@ SalGraphics* GtkSalFrame::AcquireGraphics()
}
}
- return NULL;
+ return nullptr;
}
void GtkSalFrame::ReleaseGraphics( SalGraphics* pGraphics )
@@ -1700,7 +1700,7 @@ void GtkSalFrame::Center()
}
else
{
- GdkScreen *pScreen = NULL;
+ GdkScreen *pScreen = nullptr;
gint px, py;
GdkModifierType nMask;
gdk_display_get_pointer( getGdkDisplay(), &pScreen, &px, &py, &nMask );
@@ -1865,7 +1865,7 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
// the display connection used for clipboard and our connection
Flush();
}
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
TriggerPaintEvent();
}
}
@@ -1918,7 +1918,7 @@ void GtkSalFrame::setMinMaxSize()
if( aHints )
{
gtk_window_set_geometry_hints( GTK_WINDOW(m_pWindow),
- NULL,
+ nullptr,
&aGeo,
GdkWindowHints( aHints ) );
}
@@ -2043,11 +2043,11 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
AllocateFrame();
if( bSized && ! bMoved )
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
else if( bMoved && ! bSized )
- CallCallback( SALEVENT_MOVE, NULL );
+ CallCallback( SALEVENT_MOVE, nullptr );
else if( bMoved && bSized )
- CallCallback( SALEVENT_MOVERESIZE, NULL );
+ CallCallback( SALEVENT_MOVERESIZE, nullptr );
if (bSized)
TriggerPaintEvent();
@@ -2117,7 +2117,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
m_nState = GdkWindowState( m_nState | GDK_WINDOW_STATE_MAXIMIZED );
m_aRestorePosSize = Rectangle( Point( pState->mnX, pState->mnY ),
Size( pState->mnWidth, pState->mnHeight ) );
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
}
else if( pState->mnMask & (WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y |
WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT ) )
@@ -2214,7 +2214,7 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
if (maGeometry.nDisplayScreenNumber == nNewScreen && eType == SET_RETAIN_SIZE)
return;
- GdkScreen *pScreen = NULL;
+ GdkScreen *pScreen = nullptr;
GdkRectangle aNewMonitor;
bool bSpanAllScreens = nNewScreen == (unsigned int)-1;
@@ -2336,14 +2336,14 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
// FIXME: we should really let gtk+ handle our widget hierarchy ...
if( m_pParent && gtk_widget_get_screen( m_pParent->m_pWindow ) != pScreen )
- SetParent( NULL );
+ SetParent( nullptr );
std::list< GtkSalFrame* > aChildren = m_aChildren;
for( std::list< GtkSalFrame* >::iterator it = aChildren.begin(); it != aChildren.end(); ++it )
(*it)->SetScreen( nNewScreen, SET_RETAIN_SIZE );
m_bDefaultPos = m_bDefaultSize = false;
updateScreenNumber();
- CallCallback( SALEVENT_MOVERESIZE, NULL );
+ CallCallback( SALEVENT_MOVERESIZE, nullptr );
if( bVisible )
Show( true );
@@ -2411,7 +2411,7 @@ void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen )
else
{
SetScreen( nScreen, SET_UN_FULLSCREEN,
- !m_aRestorePosSize.IsEmpty() ? &m_aRestorePosSize : NULL );
+ !m_aRestorePosSize.IsEmpty() ? &m_aRestorePosSize : nullptr );
m_aRestorePosSize = Rectangle();
}
}
@@ -2536,7 +2536,7 @@ void GtkSalFrame::grabPointer( bool bGrab, bool bOwnerEvents )
if( bUseGdkGrab )
{
gdk_pointer_grab( widget_get_window( m_pWindow ), bOwnerEvents,
- (GdkEventMask) nMask, NULL, m_pCurrentCursor,
+ (GdkEventMask) nMask, nullptr, m_pCurrentCursor,
GDK_CURRENT_TIME );
}
else
@@ -2583,7 +2583,7 @@ void GtkSalFrame::grabKeyboard( bool bGrab )
if (bGrab)
{
gdk_device_grab(pKeyboard, widget_get_window(m_pWindow), GDK_OWNERSHIP_NONE,
- true, (GdkEventMask)(GDK_KEY_PRESS | GDK_KEY_RELEASE), NULL, GDK_CURRENT_TIME);
+ true, (GdkEventMask)(GDK_KEY_PRESS | GDK_KEY_RELEASE), nullptr, GDK_CURRENT_TIME);
}
else
{
@@ -2604,7 +2604,7 @@ void GtkSalFrame::grabKeyboard( bool bGrab )
void GtkSalFrame::CaptureMouse( bool bCapture )
{
- getDisplay()->CaptureMouse( bCapture ? this : NULL );
+ getDisplay()->CaptureMouse( bCapture ? this : nullptr );
}
void GtkSalFrame::SetPointerPos( long nX, long nY )
@@ -2658,7 +2658,7 @@ void GtkSalFrame::Flush()
void GtkSalFrame::KeyCodeToGdkKey(const vcl::KeyCode& rKeyCode,
guint* pGdkKeyCode, GdkModifierType *pGdkModifiers)
{
- if ( pGdkKeyCode == NULL || pGdkModifiers == NULL )
+ if ( pGdkKeyCode == nullptr || pGdkModifiers == nullptr )
return;
// Get GDK key modifiers
@@ -2868,7 +2868,7 @@ void GtkSalFrame::SetParent( SalFrame* pNewParent )
m_pParent->m_aChildren.push_back( this );
if( ! isChild() )
gtk_window_set_transient_for( GTK_WINDOW(m_pWindow),
- (m_pParent && ! m_pParent->isChild(true,false)) ? GTK_WINDOW(m_pParent->m_pWindow) : NULL
+ (m_pParent && ! m_pParent->isChild(true,false)) ? GTK_WINDOW(m_pParent->m_pWindow) : nullptr
);
}
@@ -2917,7 +2917,7 @@ void GtkSalFrame::createNewWindow( ::Window aNewParent, bool bXEmbed, SalX11Scre
if( m_pIMHandler )
{
delete m_pIMHandler;
- m_pIMHandler = NULL;
+ m_pIMHandler = nullptr;
}
if( m_pRegion )
{
@@ -2948,7 +2948,7 @@ void GtkSalFrame::createNewWindow( ::Window aNewParent, bool bXEmbed, SalX11Scre
else
{
m_nStyle &= ~SalFrameStyleFlags::PLUG;
- Init( (m_pParent && m_pParent->m_nXScreen == m_nXScreen) ? m_pParent : NULL, m_nStyle );
+ Init( (m_pParent && m_pParent->m_nXScreen == m_nXScreen) ? m_pParent : nullptr, m_nStyle );
}
// update graphics
@@ -2992,7 +2992,7 @@ bool GtkSalFrame::SetPluginParent( SystemParentData* pSysParent )
void GtkSalFrame::ResetClipRegion()
{
if( m_pWindow )
- gdk_window_shape_combine_region( widget_get_window( m_pWindow ), NULL, 0, 0 );
+ gdk_window_shape_combine_region( widget_get_window( m_pWindow ), nullptr, 0, 0 );
}
void GtkSalFrame::BeginSetClipRegion( sal_uLong )
@@ -3060,7 +3060,7 @@ bool GtkSalFrame::Dispatch( const XEvent* pEvent )
maGeometry.nWidth = pEvent->xconfigure.width;
maGeometry.nHeight = pEvent->xconfigure.height;
setMinMaxSize();
- getDisplay()->SendInternalEvent( this, NULL, SALEVENT_RESIZE );
+ getDisplay()->SendInternalEvent( this, nullptr, SALEVENT_RESIZE );
}
}
else if( m_pForeignTopLevel && pEvent->xconfigure.window == m_aForeignTopLevelWindow )
@@ -3079,7 +3079,7 @@ bool GtkSalFrame::Dispatch( const XEvent* pEvent )
{
maGeometry.nX = x;
maGeometry.nY = y;
- getDisplay()->SendInternalEvent( this, NULL, SALEVENT_MOVE );
+ getDisplay()->SendInternalEvent( this, nullptr, SALEVENT_MOVE );
}
}
}
@@ -3146,7 +3146,7 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
{
// close popups if user clicks outside our application
gint x, y;
- bClosePopups = (gdk_display_get_window_at_pointer( GtkSalFrame::getGdkDisplay(), &x, &y ) == NULL);
+ bClosePopups = (gdk_display_get_window_at_pointer( GtkSalFrame::getGdkDisplay(), &x, &y ) == nullptr);
}
/* #i30306# release implicit pointer grab if no popups are open; else
* Drag cannot grab the pointer and will fail.
@@ -3191,7 +3191,7 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
{
pThis->maGeometry.nX = frame_x;
pThis->maGeometry.nY = frame_y;
- pThis->CallCallback( SALEVENT_MOVE, NULL );
+ pThis->CallCallback( SALEVENT_MOVE, nullptr );
}
}
}
@@ -3307,7 +3307,7 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer
{
pThis->maGeometry.nX = frame_x;
pThis->maGeometry.nY = frame_y;
- pThis->CallCallback( SALEVENT_MOVE, NULL );
+ pThis->CallCallback( SALEVENT_MOVE, nullptr );
}
if( ! aDel.isDeleted() )
@@ -3467,7 +3467,7 @@ gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer f
// in the meantime do not propagate focus get/lose if floats are open
if( m_nFloats == 0 )
- pThis->CallCallback( pEvent->in ? SALEVENT_GETFOCUS : SALEVENT_LOSEFOCUS, NULL );
+ pThis->CallCallback( pEvent->in ? SALEVENT_GETFOCUS : SALEVENT_LOSEFOCUS, nullptr );
return false;
}
@@ -3539,7 +3539,7 @@ gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, GdkEvent*, gpointer frame )
//FIXME: no set input focus ...
#endif
- pThis->CallCallback( SALEVENT_RESIZE, NULL );
+ pThis->CallCallback( SALEVENT_RESIZE, nullptr );
pThis->TriggerPaintEvent();
return false;
@@ -3549,7 +3549,7 @@ gboolean GtkSalFrame::signalUnmap( GtkWidget*, GdkEvent*, gpointer frame )
{
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
- pThis->CallCallback( SALEVENT_RESIZE, NULL );
+ pThis->CallCallback( SALEVENT_RESIZE, nullptr );
return false;
}
@@ -3630,11 +3630,11 @@ gboolean GtkSalFrame::signalConfigure( GtkWidget*, GdkEventConfigure* pEvent, gp
pThis->AllocateFrame();
if( bMoved && bSized )
- pThis->CallCallback( SALEVENT_MOVERESIZE, NULL );
+ pThis->CallCallback( SALEVENT_MOVERESIZE, nullptr );
else if( bMoved )
- pThis->CallCallback( SALEVENT_MOVE, NULL );
+ pThis->CallCallback( SALEVENT_MOVE, nullptr );
else if( bSized )
- pThis->CallCallback( SALEVENT_RESIZE, NULL );
+ pThis->CallCallback( SALEVENT_RESIZE, nullptr );
if (bSized)
pThis->TriggerPaintEvent();
@@ -3769,7 +3769,7 @@ gboolean GtkSalFrame::signalDelete( GtkWidget*, GdkEvent*, gpointer frame )
pThis->GetWindow()->Enable();
#endif
- pThis->CallCallback( SALEVENT_CLOSE, NULL );
+ pThis->CallCallback( SALEVENT_CLOSE, nullptr );
return true;
}
@@ -3782,13 +3782,13 @@ void GtkSalFrame::signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer fram
// do not post these as the whole application tends to
// redraw itself to adjust to the new style
// where there IS no new style resulting in tremendous unnecessary flickering
- if( pPrevious != NULL )
+ if( pPrevious != nullptr )
{
// signalStyleSet does NOT usually have the gdk lock
// so post user event to safely dispatch the SALEVENT_SETTINGSCHANGED
// note: settings changed for multiple frames is avoided in winproc.cxx ImplHandleSettings
- GtkSalFrame::getDisplay()->SendInternalEvent( pThis, NULL, SALEVENT_SETTINGSCHANGED );
- GtkSalFrame::getDisplay()->SendInternalEvent( pThis, NULL, SALEVENT_FONTCHANGED );
+ GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, SALEVENT_SETTINGSCHANGED );
+ GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, SALEVENT_FONTCHANGED );
}
#if !GTK_CHECK_VERSION(3,0,0)
@@ -3820,7 +3820,7 @@ gboolean GtkSalFrame::signalWindowState( GtkWidget*, GdkEvent* pEvent, gpointer
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
if( (pThis->m_nState & GDK_WINDOW_STATE_ICONIFIED) != (pEvent->window_state.new_window_state & GDK_WINDOW_STATE_ICONIFIED ) )
{
- GtkSalFrame::getDisplay()->SendInternalEvent( pThis, NULL, SALEVENT_RESIZE );
+ GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, SALEVENT_RESIZE );
pThis->TriggerPaintEvent();
}
@@ -3857,9 +3857,9 @@ void GtkSalFrame::signalDestroy( GtkWidget* pObj, gpointer frame )
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
if( pObj == pThis->m_pWindow )
{
- pThis->m_pFixedContainer = NULL;
- pThis->m_pEventBox = NULL;
- pThis->m_pWindow = NULL;
+ pThis->m_pFixedContainer = nullptr;
+ pThis->m_pEventBox = nullptr;
+ pThis->m_pWindow = nullptr;
pThis->InvalidateGraphics();
}
}
@@ -3869,11 +3869,11 @@ void GtkSalFrame::signalDestroy( GtkWidget* pObj, gpointer frame )
GtkSalFrame::IMHandler::IMHandler( GtkSalFrame* pFrame )
: m_pFrame(pFrame),
m_nPrevKeyPresses( 0 ),
- m_pIMContext( NULL ),
+ m_pIMContext( nullptr ),
m_bFocused( true ),
m_bPreeditJustChanged( false )
{
- m_aInputEvent.mpTextAttr = NULL;
+ m_aInputEvent.mpTextAttr = nullptr;
createIMContext();
}
@@ -3916,18 +3916,18 @@ void GtkSalFrame::IMHandler::deleteIMContext()
{
// first give IC a chance to deinitialize
GetGenericData()->ErrorTrapPush();
- gtk_im_context_set_client_window( m_pIMContext, NULL );
+ gtk_im_context_set_client_window( m_pIMContext, nullptr );
GetGenericData()->ErrorTrapPop();
// destroy old IC
g_object_unref( m_pIMContext );
- m_pIMContext = NULL;
+ m_pIMContext = nullptr;
}
}
void GtkSalFrame::IMHandler::doCallEndExtTextInput()
{
- m_aInputEvent.mpTextAttr = NULL;
- m_pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
+ m_aInputEvent.mpTextAttr = nullptr;
+ m_pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, nullptr );
}
void GtkSalFrame::IMHandler::updateIMSpotLocation()
@@ -3950,14 +3950,14 @@ void GtkSalFrame::IMHandler::sendEmptyCommit()
SalExtTextInputEvent aEmptyEv;
aEmptyEv.mnTime = 0;
- aEmptyEv.mpTextAttr = 0;
+ aEmptyEv.mpTextAttr = nullptr;
aEmptyEv.maText.clear();
aEmptyEv.mnCursorPos = 0;
aEmptyEv.mnCursorFlags = 0;
aEmptyEv.mbOnlyCursor = False;
m_pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, static_cast<void*>(&aEmptyEv) );
if( ! aDel.isDeleted() )
- m_pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
+ m_pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, nullptr );
}
void GtkSalFrame::IMHandler::endExtTextInput( EndExtTextInputFlags /*nFlags*/ )
@@ -4133,11 +4133,11 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* pContext, gchar* pTex
vcl::DeletionListener aDel( pThis->m_pFrame );
{
const bool bWasPreedit =
- (pThis->m_aInputEvent.mpTextAttr != 0) ||
+ (pThis->m_aInputEvent.mpTextAttr != nullptr) ||
pThis->m_bPreeditJustChanged;
pThis->m_aInputEvent.mnTime = 0;
- pThis->m_aInputEvent.mpTextAttr = 0;
+ pThis->m_aInputEvent.mpTextAttr = nullptr;
pThis->m_aInputEvent.maText = OUString( pText, strlen(pText), RTL_TEXTENCODING_UTF8 );
pThis->m_aInputEvent.mnCursorPos = pThis->m_aInputEvent.maText.getLength();
pThis->m_aInputEvent.mnCursorFlags = 0;
@@ -4201,8 +4201,8 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
{
GtkSalFrame::IMHandler* pThis = static_cast<GtkSalFrame::IMHandler*>(im_handler);
- char* pText = NULL;
- PangoAttrList* pAttrs = NULL;
+ char* pText = nullptr;
+ PangoAttrList* pAttrs = nullptr;
gint nCursorPos = 0;
gtk_im_context_get_preedit_string( pThis->m_pIMContext,
@@ -4224,7 +4224,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
pThis->m_bPreeditJustChanged = true;
- bool bEndPreedit = (!pText || !*pText) && pThis->m_aInputEvent.mpTextAttr != NULL;
+ bool bEndPreedit = (!pText || !*pText) && pThis->m_aInputEvent.mpTextAttr != nullptr;
pThis->m_aInputEvent.mnTime = 0;
pThis->m_aInputEvent.maText = pText ? OUString( pText, strlen(pText), RTL_TEXTENCODING_UTF8 ) : OUString();
pThis->m_aInputEvent.mnCursorPos = nCursorPos;
@@ -4236,8 +4236,8 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
PangoAttrIterator *iter = pango_attr_list_get_iterator(pAttrs);
do
{
- GSList *attr_list = NULL;
- GSList *tmp_list = NULL;
+ GSList *attr_list = nullptr;
+ GSList *tmp_list = nullptr;
gint start, end;
guint sal_attr = 0;
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index d34a98e7bce9..a0cc9779da8a 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -39,7 +39,7 @@ static bool bMenuVisibility = false;
*/
static gchar* GetCommandForItem( GtkSalMenuItem* pSalMenuItem, gchar* aCurrentCommand, GActionGroup* pActionGroup )
{
- gchar* aCommand = NULL;
+ gchar* aCommand = nullptr;
sal_uInt16 nId = pSalMenuItem->mnId;
Menu* pMenu = pSalMenuItem->mpVCLMenu;
@@ -50,7 +50,7 @@ static gchar* GetCommandForItem( GtkSalMenuItem* pSalMenuItem, gchar* aCurrentCo
else
{
if ( !pMenu )
- return NULL;
+ return nullptr;
OUString aMenuCommand = pMenu->GetItemCommand( nId );
gchar* aCommandStr = g_strdup( OUStringToOString( aMenuCommand, RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -103,7 +103,7 @@ void RemoveSpareItemsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, un
{
gchar* aCommand = g_lo_menu_get_command_from_item_in_section( pMenu, nSection, --nSectionItems );
- if ( aCommand != NULL && pOldCommandList != NULL )
+ if ( aCommand != nullptr && pOldCommandList != nullptr )
*pOldCommandList = g_list_append( *pOldCommandList, g_strdup( aCommand ) );
g_free( aCommand );
@@ -114,7 +114,7 @@ void RemoveSpareItemsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, un
void RemoveSpareSectionsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, unsigned nLastSection )
{
- if ( pMenu == NULL || pOldCommandList == NULL )
+ if ( pMenu == nullptr || pOldCommandList == nullptr )
return;
sal_Int32 n = g_menu_model_get_n_items( G_MENU_MODEL( pMenu ) ) - 1;
@@ -133,14 +133,14 @@ gint CompareStr( gpointer str1, gpointer str2 )
void RemoveUnusedCommands( GLOActionGroup* pActionGroup, GList* pOldCommandList, GList* pNewCommandList )
{
- if ( pActionGroup == NULL || pOldCommandList == NULL )
+ if ( pActionGroup == nullptr || pOldCommandList == nullptr )
{
g_list_free_full( pOldCommandList, g_free );
g_list_free_full( pNewCommandList, g_free );
return;
}
- while ( pNewCommandList != NULL )
+ while ( pNewCommandList != nullptr )
{
GList* pNewCommand = g_list_first( pNewCommandList );
pNewCommandList = g_list_remove_link( pNewCommandList, pNewCommand );
@@ -149,7 +149,7 @@ void RemoveUnusedCommands( GLOActionGroup* pActionGroup, GList* pOldCommandList,
GList* pOldCommand = g_list_find_custom( pOldCommandList, aCommand, reinterpret_cast<GCompareFunc>(CompareStr) );
- if ( pOldCommand != NULL )
+ if ( pOldCommand != nullptr )
{
pOldCommandList = g_list_remove_link( pOldCommandList, pOldCommand );
g_list_free_full( pOldCommand, g_free );
@@ -158,7 +158,7 @@ void RemoveUnusedCommands( GLOActionGroup* pActionGroup, GList* pOldCommandList,
g_list_free_full( pNewCommand, g_free );
}
- while ( pOldCommandList != NULL )
+ while ( pOldCommandList != nullptr )
{
GList* pCommand = g_list_first( pOldCommandList );
pOldCommandList = g_list_remove_link( pOldCommandList, pCommand );
@@ -183,13 +183,13 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse )
GLOMenu* pLOMenu = G_LO_MENU( mpMenuModel );
GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP( mpActionGroup );
SAL_INFO("vcl.unity", "Syncing vcl menu " << pVCLMenu << " to menu model " << pLOMenu << " and action group " << pActionGroup);
- GList *pOldCommandList = NULL;
- GList *pNewCommandList = NULL;
+ GList *pOldCommandList = nullptr;
+ GList *pNewCommandList = nullptr;
sal_uInt16 nLOMenuSize = g_menu_model_get_n_items( G_MENU_MODEL( pLOMenu ) );
if ( nLOMenuSize == 0 )
- g_lo_menu_new_section( pLOMenu, 0, NULL );
+ g_lo_menu_new_section( pLOMenu, 0, nullptr );
sal_Int32 nSection = 0;
sal_Int32 nItemPos = 0;
@@ -214,7 +214,7 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse )
if ( nLOMenuSize <= nSection )
{
- g_lo_menu_new_section( pLOMenu, nSection, NULL );
+ g_lo_menu_new_section( pLOMenu, nSection, nullptr );
nLOMenuSize++;
}
@@ -234,7 +234,7 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse )
// Store current item command in command list.
gchar *aCurrentCommand = g_lo_menu_get_command_from_item_in_section( pLOMenu, nSection, nItemPos );
- if ( aCurrentCommand != NULL )
+ if ( aCurrentCommand != nullptr )
pOldCommandList = g_list_append( pOldCommandList, aCurrentCommand );
// Get the new command for the item.
@@ -244,7 +244,7 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse )
NativeSetItemText( nSection, nItemPos, aText );
NativeSetAccelerator( nSection, nItemPos, nAccelKey, nAccelKey.GetName( GetFrame()->GetWindow() ) );
- if ( g_strcmp0( aNativeCommand, "" ) != 0 && pSalMenuItem->mpSubMenu == NULL )
+ if ( g_strcmp0( aNativeCommand, "" ) != 0 && pSalMenuItem->mpSubMenu == nullptr )
{
NativeSetItemCommand( nSection, nItemPos, nId, aNativeCommand, itemBits, bChecked, FALSE );
NativeCheckItem( nSection, nItemPos, itemBits, bChecked );
@@ -262,7 +262,7 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse )
GLOMenu* pSubMenuModel = g_lo_menu_get_submenu_from_item_in_section( pLOMenu, nSection, nItemPos );
- if ( pSubMenuModel == NULL )
+ if ( pSubMenuModel == nullptr )
{
g_lo_menu_new_submenu_in_item_in_section( pLOMenu, nSection, nItemPos );
pSubMenuModel = g_lo_menu_get_submenu_from_item_in_section( pLOMenu, nSection, nItemPos );
@@ -311,11 +311,11 @@ void GtkSalMenu::UpdateFull()
GtkSalMenu::GtkSalMenu( bool bMenuBar ) :
mbMenuBar( bMenuBar ),
- mpVCLMenu( NULL ),
- mpParentSalMenu( NULL ),
- mpFrame( NULL ),
- mpMenuModel( NULL ),
- mpActionGroup( NULL )
+ mpVCLMenu( nullptr ),
+ mpParentSalMenu( nullptr ),
+ mpFrame( nullptr ),
+ mpMenuModel( nullptr ),
+ mpActionGroup( nullptr )
{
}
@@ -365,7 +365,7 @@ void GtkSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsig
GtkSalMenuItem *pItem = static_cast< GtkSalMenuItem* >( pSalMenuItem );
GtkSalMenu *pGtkSubMenu = static_cast< GtkSalMenu* >( pSubMenu );
- if ( pGtkSubMenu == NULL )
+ if ( pGtkSubMenu == nullptr )
return;
pGtkSubMenu->mpParentSalMenu = this;
@@ -399,16 +399,16 @@ static gboolean RefreshMenusUnity(gpointer)
static void RefreshMenusUnity(void*, LinkParamNone*)
{
if(!bInvalidMenus) {
- g_timeout_add(10, &RefreshMenusUnity, NULL);
+ g_timeout_add(10, &RefreshMenusUnity, nullptr);
bInvalidMenus = true;
}
}
static Link<LinkParamNone*,void>* getRefreshLinkInstance()
{
- static Link<LinkParamNone*,void>* pLink = NULL;
+ static Link<LinkParamNone*,void>* pLink = nullptr;
if(!pLink) {
- pLink = new Link<LinkParamNone*,void>(NULL, &RefreshMenusUnity);
+ pLink = new Link<LinkParamNone*,void>(nullptr, &RefreshMenusUnity);
}
return pLink;
}
@@ -457,7 +457,7 @@ void GtkSalMenu::SetFrame( const SalFrame* pFrame )
if (bMenuVisibility)
UpdateFull();
- g_lo_menu_insert_section( pMenuModel, 0, NULL, mpMenuModel );
+ g_lo_menu_insert_section( pMenuModel, 0, nullptr, mpMenuModel );
}
const GtkSalFrame* GtkSalMenu::GetFrame() const
@@ -466,21 +466,21 @@ const GtkSalFrame* GtkSalMenu::GetFrame() const
const GtkSalMenu* pMenu = this;
while( pMenu && ! pMenu->mpFrame )
pMenu = pMenu->mpParentSalMenu;
- return pMenu ? pMenu->mpFrame : NULL;
+ return pMenu ? pMenu->mpFrame : nullptr;
}
void GtkSalMenu::NativeCheckItem( unsigned nSection, unsigned nItemPos, MenuItemBits bits, gboolean bCheck )
{
SolarMutexGuard aGuard;
- if ( mpActionGroup == NULL )
+ if ( mpActionGroup == nullptr )
return;
gchar* aCommand = g_lo_menu_get_command_from_item_in_section( G_LO_MENU( mpMenuModel ), nSection, nItemPos );
- if ( aCommand != NULL || g_strcmp0( aCommand, "" ) != 0 )
+ if ( aCommand != nullptr || g_strcmp0( aCommand, "" ) != 0 )
{
- GVariant *pCheckValue = NULL;
+ GVariant *pCheckValue = nullptr;
GVariant *pCurrentState = g_action_group_get_action_state( mpActionGroup, aCommand );
if ( bits & MenuItemBits::RADIOCHECK )
@@ -488,13 +488,13 @@ void GtkSalMenu::NativeCheckItem( unsigned nSection, unsigned nItemPos, MenuItem
else
{
// By default, all checked items are checkmark buttons.
- if (bCheck || pCurrentState != NULL)
+ if (bCheck || pCurrentState != nullptr)
pCheckValue = g_variant_new_boolean( bCheck );
}
- if ( pCheckValue != NULL )
+ if ( pCheckValue != nullptr )
{
- if ( pCurrentState == NULL || g_variant_equal( pCurrentState, pCheckValue ) == FALSE )
+ if ( pCurrentState == nullptr || g_variant_equal( pCurrentState, pCheckValue ) == FALSE )
{
g_action_group_change_action_state( mpActionGroup, aCommand, pCheckValue );
}
@@ -504,7 +504,7 @@ void GtkSalMenu::NativeCheckItem( unsigned nSection, unsigned nItemPos, MenuItem
}
}
- if ( pCurrentState != NULL )
+ if ( pCurrentState != nullptr )
g_variant_unref( pCurrentState );
}
@@ -533,7 +533,7 @@ void GtkSalMenu::NativeSetItemText( unsigned nSection, unsigned nItemPos, const
// Update item text only when necessary.
gchar* aLabel = g_lo_menu_get_label_from_item_in_section( G_LO_MENU( mpMenuModel ), nSection, nItemPos );
- if ( aLabel == NULL || g_strcmp0( aLabel, aConvertedText.getStr() ) != 0 )
+ if ( aLabel == nullptr || g_strcmp0( aLabel, aConvertedText.getStr() ) != 0 )
g_lo_menu_set_label_to_item_in_section( G_LO_MENU( mpMenuModel ), nSection, nItemPos, aConvertedText.getStr() );
if ( aLabel )
@@ -555,7 +555,7 @@ void GtkSalMenu::NativeSetAccelerator( unsigned nSection, unsigned nItemPos, con
gchar* aCurrentAccel = g_lo_menu_get_accelerator_from_item_in_section( G_LO_MENU( mpMenuModel ), nSection, nItemPos );
- if ( aCurrentAccel == NULL && g_strcmp0( aCurrentAccel, aAccelerator ) != 0 )
+ if ( aCurrentAccel == nullptr && g_strcmp0( aCurrentAccel, aAccelerator ) != 0 )
g_lo_menu_set_accelerator_to_item_in_section ( G_LO_MENU( mpMenuModel ), nSection, nItemPos, aAccelerator );
g_free( aAccelerator );
@@ -573,7 +573,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
SolarMutexGuard aGuard;
GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP( mpActionGroup );
- GVariant *pTarget = NULL;
+ GVariant *pTarget = nullptr;
if ( g_action_group_has_action( mpActionGroup, aCommand ) == FALSE ) {
if ( ( nBits & MenuItemBits::CHECKABLE ) || bIsSubmenu )
@@ -582,7 +582,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
GVariantType* pStateType = g_variant_type_new( reinterpret_cast<gchar const *>(G_VARIANT_TYPE_BOOLEAN) );
GVariant* pState = g_variant_new_boolean( bChecked );
- g_lo_action_group_insert_stateful( pActionGroup, aCommand, nId, bIsSubmenu, NULL, pStateType, NULL, pState );
+ g_lo_action_group_insert_stateful( pActionGroup, aCommand, nId, bIsSubmenu, nullptr, pStateType, nullptr, pState );
}
else if ( nBits & MenuItemBits::RADIOCHECK )
{
@@ -592,7 +592,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
GVariant* pState = g_variant_new_string( "" );
pTarget = g_variant_new_string( aCommand );
- g_lo_action_group_insert_stateful( pActionGroup, aCommand, nId, FALSE, pParameterType, pStateType, NULL, pState );
+ g_lo_action_group_insert_stateful( pActionGroup, aCommand, nId, FALSE, pParameterType, pStateType, nullptr, pState );
}
else
{
@@ -606,7 +606,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
// Menu item is not updated unless it's necessary.
gchar* aCurrentCommand = g_lo_menu_get_command_from_item_in_section( pMenu, nSection, nItemPos );
- if ( aCurrentCommand == NULL || g_strcmp0( aCurrentCommand, aCommand ) != 0 )
+ if ( aCurrentCommand == nullptr || g_strcmp0( aCurrentCommand, aCommand ) != 0 )
{
g_lo_menu_set_command_to_item_in_section( pMenu, nSection, nItemPos, aCommand );
@@ -627,7 +627,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
GtkSalMenu* GtkSalMenu::GetMenuForItemCommand( gchar* aCommand, gboolean bGetSubmenu )
{
SolarMutexGuard aGuard;
- GtkSalMenu* pMenu = NULL;
+ GtkSalMenu* pMenu = nullptr;
for ( size_t nPos = 0; nPos < maItems.size(); nPos++ )
{
GtkSalMenuItem *pSalItem = maItems[ nPos ];
@@ -646,10 +646,10 @@ GtkSalMenu* GtkSalMenu::GetMenuForItemCommand( gchar* aCommand, gboolean bGetSub
}
else
{
- if ( pSalItem->mpSubMenu != NULL )
+ if ( pSalItem->mpSubMenu != nullptr )
pMenu = pSalItem->mpSubMenu->GetMenuForItemCommand( aCommand, bGetSubmenu );
- if ( pMenu != NULL )
+ if ( pMenu != nullptr )
break;
}
}
@@ -665,7 +665,7 @@ void GtkSalMenu::DispatchCommand( gint itemId, const gchar *aCommand )
return;
GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( const_cast<gchar*>(aCommand), FALSE );
- Menu* pSubMenu = ( pSalSubMenu != NULL ) ? pSalSubMenu->GetMenu() : NULL;
+ Menu* pSubMenu = ( pSalSubMenu != nullptr ) ? pSalSubMenu->GetMenu() : nullptr;
MenuBar* pMenuBar = static_cast< MenuBar* >( mpVCLMenu );
pMenuBar->HandleMenuCommandEvent( pSubMenu, itemId );
@@ -677,7 +677,7 @@ void GtkSalMenu::ActivateAllSubmenus(MenuBar* pMenuBar)
for ( size_t nPos = 0; nPos < maItems.size(); nPos++ )
{
GtkSalMenuItem *pSalItem = maItems[ nPos ];
- if ( pSalItem->mpSubMenu != NULL )
+ if ( pSalItem->mpSubMenu != nullptr )
{
pSalItem->mpSubMenu->ActivateAllSubmenus(pMenuBar);
pSalItem->mpSubMenu->Update();
@@ -699,7 +699,7 @@ void GtkSalMenu::Deactivate( const gchar* aMenuCommand )
GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( const_cast<gchar*>(aMenuCommand), TRUE );
- if ( pSalSubMenu != NULL ) {
+ if ( pSalSubMenu != nullptr ) {
MenuBar* pMenuBar = static_cast< MenuBar* >( mpVCLMenu );
pMenuBar->HandleMenuDeActivateEvent( pSalSubMenu->mpVCLMenu );
}
@@ -707,7 +707,7 @@ void GtkSalMenu::Deactivate( const gchar* aMenuCommand )
void GtkSalMenu::Display( bool bVisible )
{
- if ( !mbMenuBar || mpVCLMenu == NULL )
+ if ( !mbMenuBar || mpVCLMenu == nullptr )
return;
bMenuVisibility = bVisible;
@@ -769,8 +769,8 @@ GtkSalMenuItem::GtkSalMenuItem( const SalItemParams* pItemData ) :
mnType( pItemData->eType ),
mbVisible( true ),
mpVCLMenu( pItemData->pMenu ),
- mpParentMenu( NULL ),
- mpSubMenu( NULL )
+ mpParentMenu( nullptr ),
+ mpSubMenu( nullptr )
{
}
diff --git a/vcl/unx/gtk/window/hudawareness.cxx b/vcl/unx/gtk/window/hudawareness.cxx
index 760103314d7c..0cfcd8635736 100644
--- a/vcl/unx/gtk/window/hudawareness.cxx
+++ b/vcl/unx/gtk/window/hudawareness.cxx
@@ -44,7 +44,7 @@ hud_awareness_method_call (GDBusConnection * /* connection */,
(* handle->callback) (active, handle->user_data);
}
- g_dbus_method_invocation_return_value (invocation, NULL);
+ g_dbus_method_invocation_return_value (invocation, nullptr);
}
guint
@@ -64,9 +64,9 @@ hud_awareness_register (GDBusConnection *connection,
memset (static_cast<void *>(&vtable), 0, sizeof (vtable));
vtable.method_call = hud_awareness_method_call;
- if G_UNLIKELY (iface == NULL)
+ if G_UNLIKELY (iface == nullptr)
{
- GError *local_error = NULL;
+ GError *local_error = nullptr;
info = g_dbus_node_info_new_for_xml ("<node>"
"<interface name='com.canonical.hud.Awareness'>"
@@ -79,7 +79,7 @@ hud_awareness_register (GDBusConnection *connection,
&local_error);
g_assert_no_error (local_error);
iface = g_dbus_node_info_lookup_interface (info, "com.canonical.hud.Awareness");
- g_assert (iface != NULL);
+ g_assert (iface != nullptr);
}
handle = static_cast<HudAwarenessHandle*>(g_malloc (sizeof (HudAwarenessHandle)));
diff --git a/vcl/unx/gtk3/app/gtk3gtkinst.cxx b/vcl/unx/gtk3/app/gtk3gtkinst.cxx
index 38e28ccdeb20..0b3d40517c14 100644
--- a/vcl/unx/gtk3/app/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/app/gtk3gtkinst.cxx
@@ -510,7 +510,7 @@ VclGtkClipboard::VclGtkClipboard(GdkAtom nSelection)
GtkClipboard* clipboard = gtk_clipboard_get(m_nSelection);
m_nOwnerChangedSignalId = g_signal_connect(clipboard, "owner-change",
G_CALLBACK(handle_owner_change), this);
- m_pOwner = CLIPBOARD_OWNER(g_object_new(CLIPBOARD_OWNER_OBJECT, NULL));
+ m_pOwner = CLIPBOARD_OWNER(g_object_new(CLIPBOARD_OWNER_OBJECT, nullptr));
m_pOwner->m_pThis = this;
}
diff --git a/vcl/unx/gtk3/gdi/cairo_gtk3_cairo.cxx b/vcl/unx/gtk3/gdi/cairo_gtk3_cairo.cxx
index b9a2751fc4aa..ec5e641f150e 100644
--- a/vcl/unx/gtk3/gdi/cairo_gtk3_cairo.cxx
+++ b/vcl/unx/gtk3/gdi/cairo_gtk3_cairo.cxx
@@ -33,8 +33,8 @@ namespace cairo
* Set the mpSurface as pSurface
**/
Gtk3Surface::Gtk3Surface(const CairoSurfaceSharedPtr& pSurface)
- : mpGraphics(NULL)
- , cr(NULL)
+ : mpGraphics(nullptr)
+ , cr(nullptr)
, mpSurface(pSurface)
{}
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 1cf9c2eb2d4a..a1927e4e47f8 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -22,31 +22,31 @@
#include <boost/optional.hpp>
-GtkStyleContext* GtkSalGraphics::mpButtonStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpEntryStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpTextViewStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpVScrollbarStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpHScrollbarStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpToolbarStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpToolButtonStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpToolbarSeperatorStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpCheckButtonStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpMenuBarStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpMenuBarItemStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpMenuStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpCheckMenuItemStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpSpinStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpComboboxStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpComboboxButtonStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpListboxStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpListboxButtonStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpNoteBookStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpFrameInStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpFrameOutStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpFixedHoriLineStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpFixedVertLineStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpTreeHeaderButtonStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpProgressBarStyle = NULL;
+GtkStyleContext* GtkSalGraphics::mpButtonStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpEntryStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpTextViewStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpVScrollbarStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpHScrollbarStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpToolbarStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpToolButtonStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpToolbarSeperatorStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpCheckButtonStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpMenuBarStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpMenuBarItemStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpMenuStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpCheckMenuItemStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpSpinStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpComboboxStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpComboboxButtonStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpListboxStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpListboxButtonStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpNoteBookStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpFrameInStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpFrameOutStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpFixedHoriLineStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpFixedVertLineStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpTreeHeaderButtonStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpProgressBarStyle = nullptr;
bool GtkSalGraphics::style_loaded = false;
/************************************************************************
@@ -177,7 +177,7 @@ Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, Rectangle aAre
Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle aAreaRect )
{
- GtkStyleContext* pScrollbarStyle = NULL;
+ GtkStyleContext* pScrollbarStyle = nullptr;
if ((nPart == PART_BUTTON_LEFT) || (nPart == PART_BUTTON_RIGHT))
pScrollbarStyle = mpHScrollbarStyle;
else // (nPart == PART_BUTTON_UP) || (nPart == PART_BUTTON_DOWN)
@@ -282,8 +282,8 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
gdouble arrow1Angle; // backward
gdouble arrow2Angle; // forward
Rectangle arrowRect;
- const gchar* button1StyleClass = NULL;
- const gchar* button2StyleClass = NULL;
+ const gchar* button1StyleClass = nullptr;
+ const gchar* button2StyleClass = nullptr;
gint slider_width = 0;
gint stepper_size = 0;
gint stepper_spacing = 0;
@@ -602,8 +602,8 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context,
GdkPixbuf *pixbuf = gtk_icon_info_load_symbolic_for_context
(info,
context,
- NULL,
- NULL);
+ nullptr,
+ nullptr);
iconWidth = gdk_pixbuf_get_width(pixbuf);
iconHeight = gdk_pixbuf_get_height(pixbuf);
Rectangle arrowRect;
@@ -626,7 +626,7 @@ void GtkSalGraphics::PaintSpinButton(GtkStyleContext *context,
const ImplControlValue& rValue )
{
Rectangle areaRect;
- const SpinbuttonValue *pSpinVal = (rValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue *>(&rValue) : NULL;
+ const SpinbuttonValue *pSpinVal = (rValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue *>(&rValue) : nullptr;
ControlPart upBtnPart = PART_BUTTON_UP;
ControlState upBtnState = ControlState::NONE;
ControlPart downBtnPart = PART_BUTTON_DOWN;
@@ -869,9 +869,9 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
GtkStateFlags flags;
GtkShadowType shadow;
gint renderType = nPart == PART_FOCUS ? RENDER_FOCUS : RENDER_BACKGROUND_AND_FRAME;
- GtkStyleContext *context = NULL;
- const gchar *styleClass = NULL;
- GdkPixbuf *pixbuf = NULL;
+ GtkStyleContext *context = nullptr;
+ const gchar *styleClass = nullptr;
+ GdkPixbuf *pixbuf = nullptr;
NWConvertVCLStateToGTKState(nState, &flags, &shadow);
@@ -1059,7 +1059,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
GtkIconTheme *pIconTheme = gtk_icon_theme_get_for_screen(gtk_widget_get_screen(mpWindow));
pixbuf = gtk_icon_theme_load_icon(pIconTheme, icon,
std::max(rControlRegion.GetWidth(), rControlRegion.GetHeight()),
- static_cast<GtkIconLookupFlags>(0), NULL);
+ static_cast<GtkIconLookupFlags>(0), nullptr);
flags = GTK_STATE_FLAG_SELECTED;
renderType = RENDER_ICON;
styleClass = GTK_STYLE_CLASS_ARROW;
@@ -1225,7 +1225,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
Rectangle GetWidgetSize(const Rectangle& rControlRegion, GtkWidget* widget)
{
GtkRequisition aReq;
- gtk_widget_get_preferred_size(widget, NULL, &aReq);
+ gtk_widget_get_preferred_size(widget, nullptr, &aReq);
long nHeight = (rControlRegion.GetHeight() > aReq.height) ? rControlRegion.GetHeight() : aReq.height;
return Rectangle(rControlRegion.TopLeft(), Size(rControlRegion.GetWidth(), nHeight));
}
@@ -1593,7 +1593,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetMenuHighlightTextColor( aHighlightTextColor );
// hyperlink colors
- GdkColor *link_color = NULL;
+ GdkColor *link_color = nullptr;
gtk_style_context_get_style(pStyle,
"link-color", &link_color,
NULL);
@@ -1602,7 +1602,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
gdk_color_free(link_color);
}
- link_color = NULL;
+ link_color = nullptr;
gtk_style_context_get_style(pStyle,
"visited-link-color", &link_color,
NULL);
@@ -1793,7 +1793,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetMinThumbSize( min_slider_length - magic );
// preferred icon style
- gchar* pIconThemeName = NULL;
+ gchar* pIconThemeName = nullptr;
g_object_get( pSettings, "gtk-icon-theme-name", &pIconThemeName, nullptr );
aStyleSet.SetPreferredIconTheme( OUString::createFromAscii( pIconThemeName ) );
g_free( pIconThemeName );
@@ -2005,7 +2005,7 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
return;
style_loaded = true;
- gtk_init(NULL, NULL);
+ gtk_init(nullptr, nullptr);
/* Load the GtkStyleContexts, it might be a bit slow, but usually,
* gtk apps create a lot of widgets at startup, so, it shouldn't be
* too slow */
@@ -2030,13 +2030,13 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
mpToolbarSeperatorStyle = gtk_widget_get_style_context(GTK_WIDGET(item));
GtkWidget *pButton = gtk_button_new();
- item = gtk_tool_button_new(pButton, NULL);
+ item = gtk_tool_button_new(pButton, nullptr);
gtk_toolbar_insert(GTK_TOOLBAR(pToolbar), item, -1);
mpToolButtonStyle = gtk_widget_get_style_context(GTK_WIDGET(pButton));
- getStyleContext(&mpVScrollbarStyle, gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, NULL));
+ getStyleContext(&mpVScrollbarStyle, gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, nullptr));
gtk_style_context_add_class(mpVScrollbarStyle, GTK_STYLE_CLASS_SCROLLBAR);
- getStyleContext(&mpHScrollbarStyle, gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, NULL));
+ getStyleContext(&mpHScrollbarStyle, gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, nullptr));
gtk_style_context_add_class(mpHScrollbarStyle, GTK_STYLE_CLASS_SCROLLBAR);
getStyleContext(&mpCheckButtonStyle, gtk_check_button_new());
@@ -2059,7 +2059,7 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
mpCheckMenuItemStyle = gtk_widget_get_style_context(gCheckMenuItemWidget);
/* Spinbutton */
- gSpinBox = gtk_spin_button_new(NULL, 0, 0);
+ gSpinBox = gtk_spin_button_new(nullptr, 0, 0);
getStyleContext(&mpSpinStyle, gSpinBox);
/* NoteBook */
@@ -2071,7 +2071,7 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
/* Get ComboBox Entry and Button */
gtk_container_forall(GTK_CONTAINER(gComboBox),
get_combo_box_entry_inner_widgets,
- NULL);
+ nullptr);
mpComboboxButtonStyle = gtk_widget_get_style_context(gComboBoxButtonWidget);
/* Listbox */
@@ -2081,14 +2081,14 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
/* Get ComboBox Button */
gtk_container_forall(GTK_CONTAINER(gListBox),
get_combo_box_inner_button,
- NULL);
+ nullptr);
mpListboxButtonStyle = gtk_widget_get_style_context(gListBoxButtonWidget);
/* Frames */
- gFrameIn = gtk_frame_new(NULL);
+ gFrameIn = gtk_frame_new(nullptr);
gtk_frame_set_shadow_type(GTK_FRAME(gFrameIn), GTK_SHADOW_IN);
- gFrameOut = gtk_frame_new(NULL);
+ gFrameOut = gtk_frame_new(nullptr);
gtk_frame_set_shadow_type(GTK_FRAME(gFrameOut), GTK_SHADOW_OUT);
getStyleContext(&mpFrameInStyle, gFrameIn);
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index 048018927c40..5576c097c70c 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -116,7 +116,7 @@ KDE4FilePicker::KDE4FilePicker( const uno::Reference<uno::XComponentContext>& )
_extraControls = new QWidget();
_layout = new QGridLayout(_extraControls);
- _dialog = new KFileDialog(KUrl("~"), QString(""), 0, _extraControls);
+ _dialog = new KFileDialog(KUrl("~"), QString(""), nullptr, _extraControls);
#if ALLOW_REMOTE_URLS
if( KFileWidget* fileWidget = dynamic_cast< KFileWidget* >( _dialog->fileWidget()))
{
@@ -545,7 +545,7 @@ QString KDE4FilePicker::getResString( sal_Int16 aRedId )
void KDE4FilePicker::addCustomControl(sal_Int16 controlId)
{
- QWidget* widget = 0;
+ QWidget* widget = nullptr;
sal_Int32 resId = -1;
switch (controlId)
diff --git a/vcl/unx/kde4/KDESalDisplay.cxx b/vcl/unx/kde4/KDESalDisplay.cxx
index 06e7b6d06c76..105393fd9b54 100644
--- a/vcl/unx/kde4/KDESalDisplay.cxx
+++ b/vcl/unx/kde4/KDESalDisplay.cxx
@@ -25,12 +25,12 @@
#include <assert.h>
#include <unx/saldata.hxx>
-SalKDEDisplay* SalKDEDisplay::selfptr = NULL;
+SalKDEDisplay* SalKDEDisplay::selfptr = nullptr;
SalKDEDisplay::SalKDEDisplay( Display* pDisp )
: SalX11Display( pDisp )
{
- assert( selfptr == NULL );
+ assert( selfptr == nullptr );
selfptr = this;
xim_protocol = XInternAtom( pDisp_, "_XIM_PROTOCOL", False );
}
@@ -41,9 +41,9 @@ SalKDEDisplay::~SalKDEDisplay()
static_cast<KDEXLib*>(GetXLib())->doStartup();
// clean up own members
doDestruct();
- selfptr = NULL;
+ selfptr = nullptr;
// prevent SalDisplay from closing KApplication's display
- pDisp_ = NULL;
+ pDisp_ = nullptr;
}
void SalKDEDisplay::Yield()
@@ -79,7 +79,7 @@ bool SalKDEDisplay::checkDirectInputEvent( XEvent* ev )
if( ev->xany.type == KeyPress || ev->xany.type == KeyRelease
|| ( ev->xany.type == ClientMessage && ev->xclient.message_type == xim_protocol ))
{
- if( QApplication::activeWindow() == NULL )
+ if( QApplication::activeWindow() == nullptr )
{
Dispatch(ev);
return true;
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index cae5f1561f87..b75409af1b44 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -383,7 +383,7 @@ SalGraphics* KDESalFrame::AcquireGraphics()
}
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 927c0df9cb79..b8c98c306490 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -235,7 +235,7 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
}
m_image->fill(KApplication::palette().color(QPalette::Window).rgb());
- QRegion* clipRegion = NULL;
+ QRegion* clipRegion = nullptr;
if (type == CTRL_PUSHBUTTON)
{
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index fd8469a72ba9..6c3023b9ab77 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -50,7 +50,7 @@
KDEXLib::KDEXLib() :
SalXLib(), m_bStartupDone(false),
- m_pFreeCmdLineArgs(0), m_pAppCmdLineArgs(0), m_nFakeCmdLineArgs( 0 ),
+ m_pFreeCmdLineArgs(nullptr), m_pAppCmdLineArgs(nullptr), m_nFakeCmdLineArgs( 0 ),
m_frameWidth( -1 ), m_isGlibEventLoopType(false),
m_allowKdeDialogs(false), blockIdleTimeout(false)
{
@@ -168,14 +168,14 @@ void KDEXLib::Init()
// (QApplication::disableSessionManagement(false) wouldn't quite do,
// since that still actually connects to the session manager, it just
// won't save the application data on session shutdown).
- char* session_manager = NULL;
- if( getenv( "SESSION_MANAGER" ) != NULL )
+ char* session_manager = nullptr;
+ if( getenv( "SESSION_MANAGER" ) != nullptr )
{
session_manager = strdup( getenv( "SESSION_MANAGER" ));
unsetenv( "SESSION_MANAGER" );
}
m_pApplication.reset( new VCLKDEApplication() );
- if( session_manager != NULL )
+ if( session_manager != nullptr )
{
// coverity[tainted_string] - trusted source for setenv
setenv( "SESSION_MANAGER", session_manager, 1 );
@@ -215,7 +215,7 @@ void KDEXLib::Init()
#if KDE_HAVE_GLIB
#include <glib.h>
-static GPollFunc old_gpoll = NULL;
+static GPollFunc old_gpoll = nullptr;
static gint gpoll_wrapper( GPollFD* ufds, guint nfds, gint timeout )
{
@@ -227,7 +227,7 @@ static gint gpoll_wrapper( GPollFD* ufds, guint nfds, gint timeout )
static bool ( *old_qt_event_filter )( void* );
static bool qt_event_filter( void* m )
{
- if( old_qt_event_filter != NULL && old_qt_event_filter( m ))
+ if( old_qt_event_filter != nullptr && old_qt_event_filter( m ))
return true;
if( SalKDEDisplay::self() && SalKDEDisplay::self()->checkDirectInputEvent( static_cast< XEvent* >( m )))
return true;
@@ -240,8 +240,8 @@ void KDEXLib::setupEventLoop()
#if KDE_HAVE_GLIB
if( m_isGlibEventLoopType )
{
- old_gpoll = g_main_context_get_poll_func( NULL );
- g_main_context_set_poll_func( NULL, gpoll_wrapper );
+ old_gpoll = g_main_context_get_poll_func( nullptr );
+ g_main_context_set_poll_func( nullptr, gpoll_wrapper );
if( m_allowKdeDialogs )
QApplication::clipboard()->setProperty( "useEventLoopWhenWaiting", true );
return;
@@ -434,7 +434,7 @@ int KDEXLib::getFrameWidth()
}
// fill in a default
- QFrame aFrame( NULL );
+ QFrame aFrame( nullptr );
aFrame.setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
aFrame.ensurePolished();
m_frameWidth = aFrame.frameWidth();
diff --git a/vcl/unx/kde4/main.cxx b/vcl/unx/kde4/main.cxx
index 131dc9c37267..3b318eb44816 100644
--- a/vcl/unx/kde4/main.cxx
+++ b/vcl/unx/kde4/main.cxx
@@ -68,7 +68,7 @@ extern "C" {
nMicro = aVersion.getToken( 0, '.', nIndex ).toInt32();
SAL_INFO( "vcl.kde4", "unsuitable qt version " << nMajor << "." << nMinor << "." << nMicro );
#endif
- return NULL;
+ return nullptr;
}
#endif