summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:28:29 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:32:00 +0100
commitd3b6cb7ec2da4afb5687c9d28b2be2f96e6aa7b1 (patch)
treee9d209d6d5f06cacd8e0df78c7f6b8ad45d74be5 /vcl/source
parent45979047abbd9da7a29401f298e8ef9ab58ad337 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/brand.cxx2
-rw-r--r--vcl/source/app/dbggui.cxx2
-rw-r--r--vcl/source/app/dndhelp.cxx2
-rw-r--r--vcl/source/app/help.cxx10
-rw-r--r--vcl/source/app/i18nhelp.cxx12
-rw-r--r--vcl/source/app/salvtables.cxx12
-rw-r--r--vcl/source/app/scheduler.cxx24
-rw-r--r--vcl/source/app/settings.cxx24
-rw-r--r--vcl/source/app/svapp.cxx76
-rw-r--r--vcl/source/app/svdata.cxx6
-rw-r--r--vcl/source/app/svmain.cxx72
-rw-r--r--vcl/source/app/unohelp2.cxx2
-rw-r--r--vcl/source/components/factory.cxx2
-rw-r--r--vcl/source/control/button.cxx36
-rw-r--r--vcl/source/control/ctrl.cxx12
-rw-r--r--vcl/source/control/edit.cxx34
-rw-r--r--vcl/source/control/field.cxx14
-rw-r--r--vcl/source/control/field2.cxx18
-rw-r--r--vcl/source/control/fixed.cxx24
-rw-r--r--vcl/source/control/group.cxx6
-rw-r--r--vcl/source/control/ilstbox.cxx26
-rw-r--r--vcl/source/control/lstbox.cxx10
-rw-r--r--vcl/source/control/menubtn.cxx6
-rw-r--r--vcl/source/control/morebtn.cxx2
-rw-r--r--vcl/source/control/quickselectionengine.cxx2
-rw-r--r--vcl/source/control/scrbar.cxx14
-rw-r--r--vcl/source/control/slider.cxx2
-rw-r--r--vcl/source/control/spinbtn.cxx8
-rw-r--r--vcl/source/control/spinfld.cxx6
-rw-r--r--vcl/source/control/tabctrl.cxx44
-rw-r--r--vcl/source/edit/textdata.cxx8
-rw-r--r--vcl/source/edit/textdoc.cxx14
-rw-r--r--vcl/source/edit/textdoc.hxx2
-rw-r--r--vcl/source/edit/texteng.cxx54
-rw-r--r--vcl/source/edit/textundo.cxx2
-rw-r--r--vcl/source/edit/textview.cxx24
-rw-r--r--vcl/source/edit/vclmedit.cxx16
-rw-r--r--vcl/source/filter/FilterConfigCache.cxx8
-rw-r--r--vcl/source/filter/FilterConfigItem.cxx2
-rw-r--r--vcl/source/filter/graphicfilter.cxx56
-rw-r--r--vcl/source/filter/graphicfilter2.cxx2
-rw-r--r--vcl/source/filter/igif/decode.cxx4
-rw-r--r--vcl/source/filter/igif/gifread.cxx22
-rw-r--r--vcl/source/filter/ixbm/xbmread.cxx6
-rw-r--r--vcl/source/filter/ixbm/xbmread.hxx2
-rw-r--r--vcl/source/filter/ixpm/rgbtable.hxx2
-rw-r--r--vcl/source/filter/ixpm/xpmread.cxx36
-rw-r--r--vcl/source/filter/jpeg/Exif.cxx2
-rw-r--r--vcl/source/filter/jpeg/JpegReader.cxx28
-rw-r--r--vcl/source/filter/jpeg/JpegWriter.cxx12
-rw-r--r--vcl/source/filter/jpeg/JpegWriter.hxx2
-rw-r--r--vcl/source/filter/jpeg/jpeg.cxx2
-rw-r--r--vcl/source/filter/jpeg/jpeg.hxx2
-rw-r--r--vcl/source/filter/jpeg/jpegc.cxx4
-rw-r--r--vcl/source/filter/sgvmain.cxx4
-rw-r--r--vcl/source/filter/sgvtext.cxx24
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx6
-rw-r--r--vcl/source/filter/wmf/emfwr.hxx2
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx2
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx12
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx20
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx12
-rw-r--r--vcl/source/filter/wmf/wmf.cxx4
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx18
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx42
-rw-r--r--vcl/source/font/PhysicalFontFace.cxx2
-rw-r--r--vcl/source/font/PhysicalFontFamily.cxx12
-rw-r--r--vcl/source/fontsubset/cff.cxx82
-rw-r--r--vcl/source/fontsubset/fontsubset.cxx20
-rw-r--r--vcl/source/fontsubset/gsub.cxx2
-rw-r--r--vcl/source/fontsubset/list.cxx50
-rw-r--r--vcl/source/fontsubset/sft.cxx178
-rw-r--r--vcl/source/fontsubset/ttcr.cxx112
-rw-r--r--vcl/source/fontsubset/xlat.cxx4
-rw-r--r--vcl/source/gdi/animate.cxx10
-rw-r--r--vcl/source/gdi/bitmap.cxx18
-rw-r--r--vcl/source/gdi/bitmap3.cxx20
-rw-r--r--vcl/source/gdi/bitmap4.cxx2
-rw-r--r--vcl/source/gdi/bitmapex.cxx2
-rw-r--r--vcl/source/gdi/bmpacc.cxx26
-rw-r--r--vcl/source/gdi/bmpacc3.cxx2
-rw-r--r--vcl/source/gdi/bmpfast.cxx2
-rw-r--r--vcl/source/gdi/cvtsvm.cxx6
-rw-r--r--vcl/source/gdi/dibtools.cxx26
-rw-r--r--vcl/source/gdi/embeddedfontshelper.cxx8
-rw-r--r--vcl/source/gdi/font.cxx2
-rw-r--r--vcl/source/gdi/gdimtf.cxx76
-rw-r--r--vcl/source/gdi/gfxlink.cxx26
-rw-r--r--vcl/source/gdi/graph.cxx10
-rw-r--r--vcl/source/gdi/image.cxx22
-rw-r--r--vcl/source/gdi/impanmvw.cxx4
-rw-r--r--vcl/source/gdi/impanmvw.hxx4
-rw-r--r--vcl/source/gdi/impfont.cxx22
-rw-r--r--vcl/source/gdi/impgraph.cxx72
-rw-r--r--vcl/source/gdi/impimage.cxx6
-rw-r--r--vcl/source/gdi/impvect.cxx4
-rw-r--r--vcl/source/gdi/jobset.cxx6
-rw-r--r--vcl/source/gdi/metaact.cxx22
-rw-r--r--vcl/source/gdi/octree.cxx8
-rw-r--r--vcl/source/gdi/oldprintadaptor.cxx2
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx204
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx18
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx26
-rw-r--r--vcl/source/gdi/pngread.cxx30
-rw-r--r--vcl/source/gdi/pngwrite.cxx22
-rw-r--r--vcl/source/gdi/print.cxx112
-rw-r--r--vcl/source/gdi/print2.cxx2
-rw-r--r--vcl/source/gdi/print3.cxx14
-rw-r--r--vcl/source/gdi/regband.cxx68
-rw-r--r--vcl/source/gdi/region.cxx48
-rw-r--r--vcl/source/gdi/regionband.cxx44
-rw-r--r--vcl/source/gdi/salgdilayout.cxx2
-rw-r--r--vcl/source/gdi/sallayout.cxx6
-rw-r--r--vcl/source/gdi/salmisc.cxx20
-rw-r--r--vcl/source/gdi/textlayout.cxx4
-rw-r--r--vcl/source/gdi/virdev.cxx24
-rw-r--r--vcl/source/gdi/wall.cxx40
-rw-r--r--vcl/source/glyphs/graphite_features.cxx6
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx14
-rw-r--r--vcl/source/helper/canvasbitmap.cxx2
-rw-r--r--vcl/source/helper/canvastools.cxx6
-rw-r--r--vcl/source/helper/evntpost.cxx4
-rw-r--r--vcl/source/helper/lazydelete.cxx8
-rw-r--r--vcl/source/helper/strhelper.cxx4
-rw-r--r--vcl/source/helper/threadex.cxx2
-rw-r--r--vcl/source/helper/xconnection.cxx2
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx74
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx30
-rw-r--r--vcl/source/outdev/bitmap.cxx6
-rw-r--r--vcl/source/outdev/clipping.cxx4
-rw-r--r--vcl/source/outdev/font.cxx50
-rw-r--r--vcl/source/outdev/gradient.cxx4
-rw-r--r--vcl/source/outdev/hatch.cxx2
-rw-r--r--vcl/source/outdev/line.cxx2
-rw-r--r--vcl/source/outdev/map.cxx6
-rw-r--r--vcl/source/outdev/nativecontrols.cxx2
-rw-r--r--vcl/source/outdev/outdev.cxx62
-rw-r--r--vcl/source/outdev/outdevstate.cxx28
-rw-r--r--vcl/source/outdev/polygon.cxx2
-rw-r--r--vcl/source/outdev/text.cxx36
-rw-r--r--vcl/source/outdev/transparent.cxx6
-rw-r--r--vcl/source/outdev/wallpaper.cxx4
-rw-r--r--vcl/source/window/abstdlg.cxx4
-rw-r--r--vcl/source/window/accel.cxx18
-rw-r--r--vcl/source/window/accessibility.cxx22
-rw-r--r--vcl/source/window/accmgr.cxx10
-rw-r--r--vcl/source/window/brdwin.cxx16
-rw-r--r--vcl/source/window/btndlg.cxx6
-rw-r--r--vcl/source/window/builder.cxx32
-rw-r--r--vcl/source/window/cairo_cairo.cxx2
-rw-r--r--vcl/source/window/clipping.cxx10
-rw-r--r--vcl/source/window/cmdevt.cxx4
-rw-r--r--vcl/source/window/cursor.cxx12
-rw-r--r--vcl/source/window/debug.cxx2
-rw-r--r--vcl/source/window/debugevent.cxx16
-rw-r--r--vcl/source/window/decoview.cxx6
-rw-r--r--vcl/source/window/dialog.cxx36
-rw-r--r--vcl/source/window/dlgctrl.cxx62
-rw-r--r--vcl/source/window/dndevdis.cxx12
-rw-r--r--vcl/source/window/dockingarea.cxx2
-rw-r--r--vcl/source/window/dockmgr.cxx28
-rw-r--r--vcl/source/window/dockwin.cxx24
-rw-r--r--vcl/source/window/event.cxx12
-rw-r--r--vcl/source/window/floatwin.cxx38
-rw-r--r--vcl/source/window/introwin.cxx2
-rw-r--r--vcl/source/window/layout.cxx54
-rw-r--r--vcl/source/window/legacyaccessibility.cxx14
-rw-r--r--vcl/source/window/menu.cxx96
-rw-r--r--vcl/source/window/menubarwindow.cxx14
-rw-r--r--vcl/source/window/menufloatingwindow.cxx34
-rw-r--r--vcl/source/window/menufloatingwindow.hxx4
-rw-r--r--vcl/source/window/menuitemlist.cxx18
-rw-r--r--vcl/source/window/menuitemlist.hxx18
-rw-r--r--vcl/source/window/menuwindow.cxx4
-rw-r--r--vcl/source/window/mnemonicengine.cxx2
-rw-r--r--vcl/source/window/mouse.cxx8
-rw-r--r--vcl/source/window/msgbox.cxx6
-rw-r--r--vcl/source/window/openglwin.cxx4
-rw-r--r--vcl/source/window/paint.cxx30
-rw-r--r--vcl/source/window/printdlg.cxx6
-rw-r--r--vcl/source/window/scrwnd.cxx4
-rw-r--r--vcl/source/window/split.cxx8
-rw-r--r--vcl/source/window/splitwin.cxx38
-rw-r--r--vcl/source/window/stacking.cxx60
-rw-r--r--vcl/source/window/status.cxx10
-rw-r--r--vcl/source/window/syschild.cxx14
-rw-r--r--vcl/source/window/syswin.cxx22
-rw-r--r--vcl/source/window/tabdlg.cxx6
-rw-r--r--vcl/source/window/tabpage.cxx2
-rw-r--r--vcl/source/window/taskpanelist.cxx6
-rw-r--r--vcl/source/window/toolbox.cxx74
-rw-r--r--vcl/source/window/toolbox2.cxx18
-rw-r--r--vcl/source/window/window.cxx190
-rw-r--r--vcl/source/window/window2.cxx34
-rw-r--r--vcl/source/window/winproc.cxx66
-rw-r--r--vcl/source/window/wrkwin.cxx6
197 files changed, 2068 insertions, 2068 deletions
diff --git a/vcl/source/app/brand.cxx b/vcl/source/app/brand.cxx
index 3304c86d2685..5a7bd2d04b8b 100644
--- a/vcl/source/app/brand.cxx
+++ b/vcl/source/app/brand.cxx
@@ -56,7 +56,7 @@ bool Application::LoadBrandBitmap (const char* pName, BitmapEx &rBitmap)
OUString aBaseName( "/" + OUString::createFromAscii( pName ) );
OUString aPng( ".png" );
- rtl_Locale *pLoc = NULL;
+ rtl_Locale *pLoc = nullptr;
osl_getProcessLocale (&pLoc);
LanguageTag aLanguageTag( *pLoc);
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 17f350b5dfeb..7e53c09d8ffa 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -54,7 +54,7 @@ void DbgGUIInitSolarMutexCheck()
void DbgGUIDeInitSolarMutexCheck()
{
- DbgSetTestSolarMutex( NULL );
+ DbgSetTestSolarMutex( nullptr );
}
#endif // DBG_UTIL
diff --git a/vcl/source/app/dndhelp.cxx b/vcl/source/app/dndhelp.cxx
index 82961c2d154b..7e2ef1c918f7 100644
--- a/vcl/source/app/dndhelp.cxx
+++ b/vcl/source/app/dndhelp.cxx
@@ -86,7 +86,7 @@ void vcl::unohelper::DragAndDropWrapper::disposing( const ::com::sun::star::lang
{
// Empty Source means it's the client, because the client is not a XInterface
if ( !rEvent.Source.is() )
- mpClient = NULL;
+ mpClient = nullptr;
}
// ::com::sun::star::datatransfer::dnd::XDragGestureListener
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index f8702df094db..912607d788b5 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -196,7 +196,7 @@ bool Help::ShowQuickHelp( vcl::Window* pParent,
void Help::HideBalloonAndQuickHelp()
{
HelpTextWindow const * pHelpWin = ImplGetSVData()->maHelpData.mpHelpWin;
- bool const bIsVisible = ( pHelpWin != NULL ) && pHelpWin->IsVisible();
+ bool const bIsVisible = ( pHelpWin != nullptr ) && pHelpWin->IsVisible();
ImplDestroyHelpWindow( bIsVisible );
}
@@ -216,7 +216,7 @@ sal_uIntPtr Help::ShowTip( vcl::Window* pParent, const Rectangle& rScreenRect,
void Help::UpdateTip( sal_uIntPtr nId, vcl::Window* pParent, const Rectangle& rScreenRect, const OUString& rText )
{
HelpTextWindow* pHelpWin = reinterpret_cast< HelpTextWindow* >( nId );
- ENSURE_OR_RETURN_VOID( pHelpWin != NULL, "Help::UpdateTip: invalid ID!" );
+ ENSURE_OR_RETURN_VOID( pHelpWin != nullptr, "Help::UpdateTip: invalid ID!" );
Size aSz = pHelpWin->CalcOutSize();
pHelpWin->SetOutputSizePixel( aSz );
@@ -304,7 +304,7 @@ void HelpTextWindow::dispose()
maHideTimer.Stop();
if( this == ImplGetSVData()->maHelpData.mpHelpWin )
- ImplGetSVData()->maHelpData.mpHelpWin = NULL;
+ ImplGetSVData()->maHelpData.mpHelpWin = nullptr;
FloatingWindow::dispose();
}
@@ -497,7 +497,7 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
bool bWasVisible = pHelpWin->IsVisible();
if ( bWasVisible )
nDelayMode = HELPDELAY_NONE; // display it quickly if we were already in quick help mode
- pHelpWin = NULL;
+ pHelpWin = nullptr;
ImplDestroyHelpWindow( bWasVisible );
}
else
@@ -556,7 +556,7 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime )
Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) );
if( pHelpWin->IsVisible() )
pWindow->Invalidate( aInvRect );
- pSVData->maHelpData.mpHelpWin = NULL;
+ pSVData->maHelpData.mpHelpWin = nullptr;
pSVData->maHelpData.mbKeyboardHelp = false;
pHelpWin->Hide();
pHelpWin.disposeAndClear();
diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx
index 0ea1286cd9b0..75176fb6bbb2 100644
--- a/vcl/source/app/i18nhelp.cxx
+++ b/vcl/source/app/i18nhelp.cxx
@@ -37,8 +37,8 @@ vcl::I18nHelper::I18nHelper( const ::com::sun::star::uno::Reference< ::com::sun
maLanguageTag( rLanguageTag)
{
m_xContext = rxContext;
- mpLocaleDataWrapper = NULL;
- mpTransliterationWrapper= NULL;
+ mpLocaleDataWrapper = nullptr;
+ mpTransliterationWrapper= nullptr;
mbTransliterateIgnoreCase = false;
}
@@ -50,10 +50,10 @@ vcl::I18nHelper::~I18nHelper()
void vcl::I18nHelper::ImplDestroyWrappers()
{
delete mpLocaleDataWrapper;
- mpLocaleDataWrapper = NULL;
+ mpLocaleDataWrapper = nullptr;
delete mpTransliterationWrapper;
- mpTransliterationWrapper= NULL;
+ mpTransliterationWrapper= nullptr;
}
utl::TransliterationWrapper& vcl::I18nHelper::ImplGetTransliterationWrapper() const
@@ -120,7 +120,7 @@ sal_Int32 vcl::I18nHelper::CompareString( const OUString& rStr1, const OUString&
// ImplGetTransliterationWrapper() will create a wrapper with the correct bIgnoreCase
const_cast<vcl::I18nHelper*>(this)->mbTransliterateIgnoreCase = false;
delete const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper;
- const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper = NULL;
+ const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper = nullptr;
}
OUString aStr1( filterFormattingChars(rStr1) );
@@ -138,7 +138,7 @@ bool vcl::I18nHelper::MatchString( const OUString& rStr1, const OUString& rStr2
// ImplGetTransliterationWrapper() will create a wrapper with the correct bIgnoreCase
const_cast<vcl::I18nHelper*>(this)->mbTransliterateIgnoreCase = true;
delete const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper;
- const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper = NULL;
+ const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper = nullptr;
}
OUString aStr1( filterFormattingChars(rStr1) );
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 227e1e27235d..c540eef538f3 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -31,8 +31,8 @@
SalFrame::SalFrame()
: m_bPaintsBlocked(false)
- , m_pWindow(NULL)
- , m_pProc(NULL)
+ , m_pWindow(nullptr)
+ , m_pProc(nullptr)
{
}
@@ -68,24 +68,24 @@ SalInstance::~SalInstance()
SalMenu* SalInstance::CreateMenu( bool, Menu* )
{
// default: no native menus
- return NULL;
+ return nullptr;
}
void SalInstance::DestroyMenu( SalMenu* pMenu )
{
(void)pMenu;
- OSL_ENSURE( pMenu == 0, "DestroyMenu called with non-native menus" );
+ OSL_ENSURE( pMenu == nullptr, "DestroyMenu called with non-native menus" );
}
SalMenuItem* SalInstance::CreateMenuItem( const SalItemParams* )
{
- return NULL;
+ return nullptr;
}
void SalInstance::DestroyMenuItem( SalMenuItem* pItem )
{
(void)pItem;
- OSL_ENSURE( pItem == 0, "DestroyMenu called with non-native menus" );
+ OSL_ENSURE( pItem == nullptr, "DestroyMenu called with non-native menus" );
}
SalTimer::~SalTimer()
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 3f18ab7136af..9e43a9326c6f 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -44,7 +44,7 @@ void ImplSchedulerData::Invoke()
ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( bool bTimer )
{
ImplSVData* pSVData = ImplGetSVData();
- ImplSchedulerData *pMostUrgent = NULL;
+ ImplSchedulerData *pMostUrgent = nullptr;
for ( ImplSchedulerData *pSchedulerData = pSVData->mpFirstSchedulerData; pSchedulerData; pSchedulerData = pSchedulerData->mpNext )
{
@@ -89,19 +89,19 @@ void Scheduler::ImplDeInitScheduler()
if ( pSchedulerData->mpScheduler )
{
pSchedulerData->mpScheduler->mbActive = false;
- pSchedulerData->mpScheduler->mpSchedulerData = NULL;
+ pSchedulerData->mpScheduler->mpSchedulerData = nullptr;
}
pSchedulerData = pSchedulerData->mpNext;
delete pTempSchedulerData;
}
while ( pSchedulerData );
- pSVData->mpFirstSchedulerData = NULL;
+ pSVData->mpFirstSchedulerData = nullptr;
pSVData->mnTimerPeriod = 0;
}
delete pSVData->mpSalTimer;
- pSVData->mpSalTimer = 0;
+ pSVData->mpSalTimer = nullptr;
}
/**
@@ -155,8 +155,8 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
{
// process all pending Tasks
// if bTimer True, only handle timer
- ImplSchedulerData* pSchedulerData = NULL;
- ImplSchedulerData* pPrevSchedulerData = NULL;
+ ImplSchedulerData* pSchedulerData = nullptr;
+ ImplSchedulerData* pPrevSchedulerData = nullptr;
ImplSVData* pSVData = ImplGetSVData();
sal_uInt64 nTime = tools::Time::GetSystemTicks();
sal_uInt64 nMinPeriod = MaximumTimeoutMs;
@@ -185,7 +185,7 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
else
pSVData->mpFirstSchedulerData = pSchedulerData->mpNext;
if ( pSchedulerData->mpScheduler )
- pSchedulerData->mpScheduler->mpSchedulerData = NULL;
+ pSchedulerData->mpScheduler->mpSchedulerData = nullptr;
ImplSchedulerData* pTempSchedulerData = pSchedulerData;
pSchedulerData = pSchedulerData->mpNext;
delete pTempSchedulerData;
@@ -227,14 +227,14 @@ void Scheduler::Start()
mpSchedulerData->mbInScheduler = false;
// insert last due to SFX!
- ImplSchedulerData* pPrev = NULL;
+ ImplSchedulerData* pPrev = nullptr;
ImplSchedulerData* pData = pSVData->mpFirstSchedulerData;
while ( pData )
{
pPrev = pData;
pData = pData->mpNext;
}
- mpSchedulerData->mpNext = NULL;
+ mpSchedulerData->mpNext = nullptr;
if ( pPrev )
pPrev->mpNext = mpSchedulerData;
else
@@ -268,7 +268,7 @@ Scheduler& Scheduler::operator=( const Scheduler& rScheduler )
}
Scheduler::Scheduler(const sal_Char *pDebugName):
- mpSchedulerData(NULL),
+ mpSchedulerData(nullptr),
mpDebugName(pDebugName),
mePriority(SchedulerPriority::HIGH),
mbActive(false)
@@ -276,7 +276,7 @@ Scheduler::Scheduler(const sal_Char *pDebugName):
}
Scheduler::Scheduler( const Scheduler& rScheduler ):
- mpSchedulerData(NULL),
+ mpSchedulerData(nullptr),
mpDebugName(rScheduler.mpDebugName),
mePriority(rScheduler.mePriority),
mbActive(false)
@@ -290,7 +290,7 @@ Scheduler::~Scheduler()
if ( mpSchedulerData )
{
mpSchedulerData->mbDelete = true;
- mpSchedulerData->mpScheduler = NULL;
+ mpSchedulerData->mpScheduler = nullptr;
}
}
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index cd3e91d8abc1..3d7a76c41067 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -549,7 +549,7 @@ ImplStyleData::ImplStyleData() :
mbAutoMnemonic = true;
mnToolbarIconSize = ToolbarIconSize::Unknown;
meUseImagesInMenus = TRISTATE_INDET;
- mpFontOptions = NULL;
+ mpFontOptions = nullptr;
mnEdgeBlending = 35;
maEdgeBlendingTopLeftColor = RGB_COLORDATA(0xC0, 0xC0, 0xC0);
maEdgeBlendingBottomRightColor = RGB_COLORDATA(0x40, 0x40, 0x40);
@@ -2422,7 +2422,7 @@ ImplMiscData::ImplMiscData()
mnEnableATT = TRISTATE_INDET;
mnDisablePrinting = TRISTATE_INDET;
static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
- mbEnableLocalizedDecimalSep = (pEnv != NULL);
+ mbEnableLocalizedDecimalSep = (pEnv != nullptr);
// Should we display any windows?
mbPseudoHeadless = getenv("VCL_HIDE_WINDOWS") || comphelper::LibreOfficeKit::isActive();
}
@@ -2707,10 +2707,10 @@ ImplAllSettingsData::ImplAllSettingsData()
{
mnWindowUpdate = AllSettingsFlags::MOUSE | AllSettingsFlags::STYLE |
AllSettingsFlags::MISC | AllSettingsFlags::LOCALE;
- mpLocaleDataWrapper = NULL;
- mpUILocaleDataWrapper = NULL;
- mpI18nHelper = NULL;
- mpUII18nHelper = NULL;
+ mpLocaleDataWrapper = nullptr;
+ mpUILocaleDataWrapper = nullptr;
+ mpI18nHelper = nullptr;
+ mpUII18nHelper = nullptr;
if (!utl::ConfigManager::IsAvoidConfig())
maMiscSettings.SetEnableLocalizedDecimalSep( maSysLocale.GetOptions().IsDecimalSeparatorAsLocale() );
}
@@ -2727,10 +2727,10 @@ ImplAllSettingsData::ImplAllSettingsData( const ImplAllSettingsData& rData ) :
// Pointer couldn't shared and objects haven't a copy ctor
// So we create the cache objects new, if the GetFunction is
// called
- mpLocaleDataWrapper = NULL;
- mpUILocaleDataWrapper = NULL;
- mpI18nHelper = NULL;
- mpUII18nHelper = NULL;
+ mpLocaleDataWrapper = nullptr;
+ mpUILocaleDataWrapper = nullptr;
+ mpI18nHelper = nullptr;
+ mpUII18nHelper = nullptr;
}
ImplAllSettingsData::~ImplAllSettingsData()
@@ -2857,12 +2857,12 @@ void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag )
if ( mxData->mpLocaleDataWrapper )
{
delete mxData->mpLocaleDataWrapper;
- mxData->mpLocaleDataWrapper = NULL;
+ mxData->mpLocaleDataWrapper = nullptr;
}
if ( mxData->mpI18nHelper )
{
delete mxData->mpI18nHelper;
- mxData->mpI18nHelper = NULL;
+ mxData->mpI18nHelper = nullptr;
}
}
}
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index a14b8841ef9f..b57b45e7f3b8 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -168,9 +168,9 @@ struct ImplPostEventData
ScrollEvent maScrollEvent;
ImplPostEventData( sal_uLong nEvent, vcl::Window* pWin, const KeyEvent& rKeyEvent ) :
- mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maKeyEvent( rKeyEvent ) {}
+ mnEvent( nEvent ), mpWin( pWin ), mnEventId( nullptr ), maKeyEvent( rKeyEvent ) {}
ImplPostEventData( sal_uLong nEvent, vcl::Window* pWin, const MouseEvent& rMouseEvent ) :
- mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maMouseEvent( rMouseEvent ) {}
+ mnEvent( nEvent ), mpWin( pWin ), mnEventId( nullptr ), maMouseEvent( rMouseEvent ) {}
#if !HAVE_FEATURE_DESKTOP
ImplPostEventData( sal_uLong nEvent, vcl::Window* pWin, const ZoomEvent& rZoomEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maZoomEvent( rZoomEvent ) {}
@@ -189,7 +189,7 @@ Application* GetpApp()
{
ImplSVData* pSVData = ImplGetSVData();
if ( !pSVData )
- return NULL;
+ return nullptr;
return pSVData->mpApp;
}
@@ -207,7 +207,7 @@ Application::~Application()
{
ImplDeInitSVData();
DeInitSalData();
- ImplGetSVData()->mpApp = NULL;
+ ImplGetSVData()->mpApp = nullptr;
}
int Application::Main()
@@ -326,7 +326,7 @@ sal_uLong Application::GetReservedKeyCodeCount()
const vcl::KeyCode* Application::GetReservedKeyCode( sal_uLong i )
{
if( i >= GetReservedKeyCodeCount() )
- return NULL;
+ return nullptr;
else
return &ImplReservedKeys::get()->first[i].mKeyCode;
}
@@ -350,12 +350,12 @@ IMPL_STATIC_LINK_NOARG_TYPED( ImplSVAppData, ImplEndAllDialogsMsg, void*, void )
void Application::EndAllDialogs()
{
- Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplEndAllDialogsMsg ) );
+ Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplEndAllDialogsMsg ) );
}
void Application::EndAllPopups()
{
- Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplEndAllPopupsMsg ) );
+ Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplEndAllPopupsMsg ) );
}
@@ -406,7 +406,7 @@ namespace
{
Application::EndAllPopups();
Application::EndAllDialogs();
- Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplPrepareExitMsg ) );
+ Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplPrepareExitMsg ) );
}
}
@@ -418,7 +418,7 @@ IMPL_LINK_NOARG_TYPED(ImplSVAppData, VclEventTestingHdl, Idle *, void)
}
else
{
- Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplVclEventTestingHdl ) );
+ Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplVclEventTestingHdl ) );
}
}
@@ -441,7 +441,7 @@ IMPL_STATIC_LINK_NOARG_TYPED( ImplSVAppData, ImplVclEventTestingHdl, void*, void
SAL_INFO("vcl.eventtesting", "Event Input exhausted, exit next cycle");
pSVData->maAppData.mnEventTestLimit = 0;
}
- Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplVclEventTestingHdl ) );
+ Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplVclEventTestingHdl ) );
}
}
@@ -565,7 +565,7 @@ IMPL_STATIC_LINK_NOARG_TYPED( ImplSVAppData, ImplQuitMsg, void*, void )
void Application::Quit()
{
- Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplQuitMsg ) );
+ Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplQuitMsg ) );
}
comphelper::SolarMutex& Application::GetSolarMutex()
@@ -679,7 +679,7 @@ void Application::SetSettings( const AllSettings& rSettings )
pSVData->mpResMgr )
{
delete pSVData->mpResMgr;
- pSVData->mpResMgr = NULL;
+ pSVData->mpResMgr = nullptr;
}
ResMgr::SetDefaultLocale( rSettings.GetUILanguageTag() );
*pSVData->maAppData.mpSettings = rSettings;
@@ -689,7 +689,7 @@ void Application::SetSettings( const AllSettings& rSettings )
DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, &aOldSettings, nChangeFlags );
// notify data change handler
- ImplCallEventListeners( VCLEVENT_APPLICATION_DATACHANGED, NULL, &aDCEvt);
+ ImplCallEventListeners( VCLEVENT_APPLICATION_DATACHANGED, nullptr, &aDCEvt);
// Update all windows
vcl::Window* pFirstFrame = pSVData->maWinData.mpFirstFrame;
@@ -883,14 +883,14 @@ bool Application::HandleKey( sal_uLong nEvent, vcl::Window *pWin, KeyEvent* pKey
ImplSVEvent * Application::PostKeyEvent( sal_uLong nEvent, vcl::Window *pWin, KeyEvent* pKeyEvent )
{
const SolarMutexGuard aGuard;
- ImplSVEvent * nEventId = 0;
+ ImplSVEvent * nEventId = nullptr;
if( pWin && pKeyEvent )
{
ImplPostEventData* pPostEventData = new ImplPostEventData( nEvent, pWin, *pKeyEvent );
nEventId = PostUserEvent(
- LINK( NULL, Application, PostEventHandler ),
+ LINK( nullptr, Application, PostEventHandler ),
pPostEventData );
if( nEventId )
@@ -908,7 +908,7 @@ ImplSVEvent * Application::PostKeyEvent( sal_uLong nEvent, vcl::Window *pWin, Ke
ImplSVEvent * Application::PostMouseEvent( sal_uLong nEvent, vcl::Window *pWin, MouseEvent* pMouseEvent )
{
const SolarMutexGuard aGuard;
- ImplSVEvent * nEventId = 0;
+ ImplSVEvent * nEventId = nullptr;
if( pWin && pMouseEvent )
{
@@ -923,7 +923,7 @@ ImplSVEvent * Application::PostMouseEvent( sal_uLong nEvent, vcl::Window *pWin,
ImplPostEventData* pPostEventData = new ImplPostEventData( nEvent, pWin, aTransformedEvent );
nEventId = PostUserEvent(
- LINK( NULL, Application, PostEventHandler ),
+ LINK( nullptr, Application, PostEventHandler ),
pPostEventData );
if( nEventId )
@@ -986,12 +986,12 @@ IMPL_STATIC_LINK_TYPED( Application, PostEventHandler, void*, pCallData, void )
default:
nEvent = 0;
- pEventData = NULL;
+ pEventData = nullptr;
break;
};
if( pData->mpWin && pData->mpWin.get()->mpWindowImpl->mpFrameWindow.get() && pEventData )
- ImplWindowFrameProc( pData->mpWin.get()->mpWindowImpl->mpFrameWindow.get(), NULL, (sal_uInt16) nEvent, pEventData );
+ ImplWindowFrameProc( pData->mpWin.get()->mpWindowImpl->mpFrameWindow.get(), nullptr, (sal_uInt16) nEvent, pEventData );
// remove this event from list of posted events, watch for destruction of internal data
::std::list< ImplPostEventPair >::iterator aIter( aPostedEventList.begin() );
@@ -1036,7 +1036,7 @@ ImplSVEvent * Application::PostUserEvent( const Link<void*,void>& rLink, void* p
ImplSVEvent* pSVEvent = new ImplSVEvent;
pSVEvent->mpData = pCaller;
pSVEvent->maLink = rLink;
- pSVEvent->mpWindow = NULL;
+ pSVEvent->mpWindow = nullptr;
pSVEvent->mbCall = true;
if (bReferenceLink)
{
@@ -1049,10 +1049,10 @@ ImplSVEvent * Application::PostUserEvent( const Link<void*,void>& rLink, void* p
}
vcl::Window* pDefWindow = ImplGetDefaultWindow();
- if ( pDefWindow == 0 || !pDefWindow->ImplGetFrame()->PostEvent( pSVEvent ) )
+ if ( pDefWindow == nullptr || !pDefWindow->ImplGetFrame()->PostEvent( pSVEvent ) )
{
delete pSVEvent;
- pSVEvent = 0;
+ pSVEvent = nullptr;
}
return pSVEvent;
}
@@ -1159,7 +1159,7 @@ long Application::GetTopWindowCount()
{
long nRet = 0;
ImplSVData* pSVData = ImplGetSVData();
- vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame.get() : NULL;
+ vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame.get() : nullptr;
while( pWin )
{
if( pWin->ImplGetWindow()->IsTopWindow() )
@@ -1173,7 +1173,7 @@ vcl::Window* Application::GetTopWindow( long nIndex )
{
long nIdx = 0;
ImplSVData* pSVData = ImplGetSVData();
- vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame.get() : NULL;
+ vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame.get() : nullptr;
while( pWin )
{
if( pWin->ImplGetWindow()->IsTopWindow() )
@@ -1185,7 +1185,7 @@ vcl::Window* Application::GetTopWindow( long nIndex )
}
pWin = pWin->mpWindowImpl->mpFrameData->mpNextFrame;
}
- return NULL;
+ return nullptr;
}
vcl::Window* Application::GetActiveTopWindow()
@@ -1197,7 +1197,7 @@ vcl::Window* Application::GetActiveTopWindow()
return pWin;
pWin = pWin->mpWindowImpl->mpParent;
}
- return NULL;
+ return nullptr;
}
void Application::SetAppName( const OUString& rUniqueName )
@@ -1417,7 +1417,7 @@ vcl::Window* Application::GetDefDialogParent()
// #103442# find some useful dialog parent if there
// was no default set
// NOTE: currently even the default is not used
- if( false && pSVData->maWinData.mpDefDialogParent.get() != NULL )
+ if( false && pSVData->maWinData.mpDefDialogParent.get() != nullptr )
return pSVData->maWinData.mpDefDialogParent;
else
{
@@ -1426,8 +1426,8 @@ vcl::Window* Application::GetDefDialogParent()
// as DefDialogParent
// current focus frame
- vcl::Window *pWin = NULL;
- if( (pWin = pSVData->maWinData.mpFocusWin) != NULL )
+ vcl::Window *pWin = nullptr;
+ if( (pWin = pSVData->maWinData.mpFocusWin) != nullptr )
{
while( pWin->mpWindowImpl && pWin->mpWindowImpl->mpParent )
pWin = pWin->mpWindowImpl->mpParent;
@@ -1436,8 +1436,8 @@ vcl::Window* Application::GetDefDialogParent()
if( !pWin->mpWindowImpl )
{
OSL_FAIL( "Window hierarchy corrupted!" );
- pSVData->maWinData.mpFocusWin = NULL; // avoid further access
- return NULL;
+ pSVData->maWinData.mpFocusWin = nullptr; // avoid further access
+ return nullptr;
}
if( (pWin->mpWindowImpl->mnStyle & WB_INTROWIN) == 0 )
@@ -1446,7 +1446,7 @@ vcl::Window* Application::GetDefDialogParent()
}
}
// last active application frame
- if( NULL != (pWin = pSVData->maWinData.mpActiveApplicationFrame) )
+ if( nullptr != (pWin = pSVData->maWinData.mpActiveApplicationFrame) )
{
return pWin->mpWindowImpl->mpFrameWindow->ImplGetWindow();
}
@@ -1468,7 +1468,7 @@ vcl::Window* Application::GetDefDialogParent()
pWin = pWin->mpWindowImpl->mpFrameData->mpNextFrame;
}
// use the desktop
- return NULL;
+ return nullptr;
}
}
}
@@ -1599,7 +1599,7 @@ void ImplFreeHotKeyData()
pHotKeyData = pTempHotKeyData;
}
- pSVData->maAppData.mpFirstHotKey = NULL;
+ pSVData->maAppData.mpFirstHotKey = nullptr;
}
void ImplFreeEventHookData()
@@ -1614,7 +1614,7 @@ void ImplFreeEventHookData()
pEventHookData = pTempEventHookData;
}
- pSVData->maAppData.mpFirstEventHook = NULL;
+ pSVData->maAppData.mpFirstEventHook = nullptr;
}
long Application::CallEventHooks( NotifyEvent& rEvt )
@@ -1790,8 +1790,8 @@ void Application::setDeInitHook(Link<LinkParamNone*,void> const & hook) {
}
ImplDelData::ImplDelData( vcl::Window* pWindow ) :
- mpNext( NULL ),
- mpWindow( NULL ),
+ mpNext( nullptr ),
+ mpWindow( nullptr ),
mbDel( false )
{
if( pWindow ) AttachToWindow( pWindow );
@@ -1818,7 +1818,7 @@ ImplDelData::~ImplDelData()
{
// the window still exists but we were not removed
mpWindow.get()->ImplRemoveDel( this );
- mpWindow = NULL;
+ mpWindow = nullptr;
}
}
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index a4b03dec9afe..487c8959c4f7 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -107,11 +107,11 @@ void ImplDeInitSVData()
delete pSVData->mpDockingManager;
if( pSVData->maCtrlData.mpFieldUnitStrings )
- delete pSVData->maCtrlData.mpFieldUnitStrings, pSVData->maCtrlData.mpFieldUnitStrings = NULL;
+ delete pSVData->maCtrlData.mpFieldUnitStrings, pSVData->maCtrlData.mpFieldUnitStrings = nullptr;
if( pSVData->maCtrlData.mpCleanUnitStrings )
- delete pSVData->maCtrlData.mpCleanUnitStrings, pSVData->maCtrlData.mpCleanUnitStrings = NULL;
+ delete pSVData->maCtrlData.mpCleanUnitStrings, pSVData->maCtrlData.mpCleanUnitStrings = nullptr;
if( pSVData->mpPaperNames )
- delete pSVData->mpPaperNames, pSVData->mpPaperNames = NULL;
+ delete pSVData->mpPaperNames, pSVData->mpPaperNames = nullptr;
}
vcl::Window* ImplGetDefaultWindow()
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 684546f430e0..ca2ae8245436 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -208,10 +208,10 @@ int SVMain()
// This variable is set when no Application object has been instantiated
// before InitVCL is called
-static Application * pOwnSvApp = NULL;
+static Application * pOwnSvApp = nullptr;
// Exception handler. pExceptionHandler != NULL => VCL already inited
-static oslSignalHandler pExceptionHandler = NULL;
+static oslSignalHandler pExceptionHandler = nullptr;
class DesktopEnvironmentContext: public cppu::WeakImplHelper< com::sun::star::uno::XCurrentContext >
{
@@ -245,7 +245,7 @@ uno::Any SAL_CALL DesktopEnvironmentContext::getValueByName( const OUString& Nam
bool InitVCL()
{
- if( pExceptionHandler != NULL )
+ if( pExceptionHandler != nullptr )
return false;
EmbeddedFontsHelper::clearTemporaryFontFiles();
@@ -293,7 +293,7 @@ bool InitVCL()
pSVData->maGDIData.mpGrfConverter = new GraphicConverter;
// Set exception handler
- pExceptionHandler = osl_addSignalHandler(VCLExceptionSignal_impl, NULL);
+ pExceptionHandler = osl_addSignalHandler(VCLExceptionSignal_impl, nullptr);
DBGGUI_INIT_SOLARMUTEXCHECK();
@@ -325,7 +325,7 @@ VCLUnoWrapperDeleter::disposing(lang::EventObject const& /* rSource */)
if (pSVData && pSVData->mpUnoWrapper)
{
pSVData->mpUnoWrapper->Destroy();
- pSVData->mpUnoWrapper = NULL;
+ pSVData->mpUnoWrapper = nullptr;
}
}
@@ -340,7 +340,7 @@ void DeInitVCL()
// give ime status a chance to destroy its own windows
delete pSVData->mpImeStatus;
- pSVData->mpImeStatus = NULL;
+ pSVData->mpImeStatus = nullptr;
#if OSL_DEBUG_LEVEL > 0
OStringBuffer aBuf( 256 );
@@ -371,13 +371,13 @@ void DeInitVCL()
ImplImageTree::get().shutDown();
osl_removeSignalHandler( pExceptionHandler);
- pExceptionHandler = NULL;
+ pExceptionHandler = nullptr;
// free global data
delete pSVData->maGDIData.mpGrfConverter;
if( pSVData->mpSettingsConfigItem )
- delete pSVData->mpSettingsConfigItem, pSVData->mpSettingsConfigItem = NULL;
+ delete pSVData->mpSettingsConfigItem, pSVData->mpSettingsConfigItem = nullptr;
if ( pSVData->maAppData.mpIdleMgr )
delete pSVData->maAppData.mpIdleMgr;
@@ -386,52 +386,52 @@ void DeInitVCL()
if ( pSVData->maWinData.mpMsgBoxImgList )
{
delete pSVData->maWinData.mpMsgBoxImgList;
- pSVData->maWinData.mpMsgBoxImgList = NULL;
+ pSVData->maWinData.mpMsgBoxImgList = nullptr;
}
if ( pSVData->maCtrlData.mpCheckImgList )
{
delete pSVData->maCtrlData.mpCheckImgList;
- pSVData->maCtrlData.mpCheckImgList = NULL;
+ pSVData->maCtrlData.mpCheckImgList = nullptr;
}
if ( pSVData->maCtrlData.mpRadioImgList )
{
delete pSVData->maCtrlData.mpRadioImgList;
- pSVData->maCtrlData.mpRadioImgList = NULL;
+ pSVData->maCtrlData.mpRadioImgList = nullptr;
}
if ( pSVData->maCtrlData.mpPinImgList )
{
delete pSVData->maCtrlData.mpPinImgList;
- pSVData->maCtrlData.mpPinImgList = NULL;
+ pSVData->maCtrlData.mpPinImgList = nullptr;
}
if ( pSVData->maCtrlData.mpSplitHPinImgList )
{
delete pSVData->maCtrlData.mpSplitHPinImgList;
- pSVData->maCtrlData.mpSplitHPinImgList = NULL;
+ pSVData->maCtrlData.mpSplitHPinImgList = nullptr;
}
if ( pSVData->maCtrlData.mpSplitVPinImgList )
{
delete pSVData->maCtrlData.mpSplitVPinImgList;
- pSVData->maCtrlData.mpSplitVPinImgList = NULL;
+ pSVData->maCtrlData.mpSplitVPinImgList = nullptr;
}
if ( pSVData->maCtrlData.mpSplitHArwImgList )
{
delete pSVData->maCtrlData.mpSplitHArwImgList;
- pSVData->maCtrlData.mpSplitHArwImgList = NULL;
+ pSVData->maCtrlData.mpSplitHArwImgList = nullptr;
}
if ( pSVData->maCtrlData.mpSplitVArwImgList )
{
delete pSVData->maCtrlData.mpSplitVArwImgList;
- pSVData->maCtrlData.mpSplitVArwImgList = NULL;
+ pSVData->maCtrlData.mpSplitVArwImgList = nullptr;
}
if ( pSVData->maCtrlData.mpDisclosurePlus )
{
delete pSVData->maCtrlData.mpDisclosurePlus;
- pSVData->maCtrlData.mpDisclosurePlus = NULL;
+ pSVData->maCtrlData.mpDisclosurePlus = nullptr;
}
if ( pSVData->maCtrlData.mpDisclosureMinus )
{
delete pSVData->maCtrlData.mpDisclosureMinus;
- pSVData->maCtrlData.mpDisclosureMinus = NULL;
+ pSVData->maCtrlData.mpDisclosureMinus = nullptr;
}
pSVData->mpDefaultWin.disposeAndClear();
@@ -463,7 +463,7 @@ void DeInitVCL()
}
if( pSVData->maDeInitHook.IsSet() )
{
- pSVData->maDeInitHook.Call(0);
+ pSVData->maDeInitHook.Call(nullptr);
}
}
@@ -476,42 +476,42 @@ void DeInitVCL()
}
delete pSVData->maAppData.mpSettings;
- pSVData->maAppData.mpSettings = NULL;
+ pSVData->maAppData.mpSettings = nullptr;
}
if ( pSVData->maAppData.mpAccelMgr )
{
delete pSVData->maAppData.mpAccelMgr;
- pSVData->maAppData.mpAccelMgr = NULL;
+ pSVData->maAppData.mpAccelMgr = nullptr;
}
if ( pSVData->maAppData.mpAppFileName )
{
delete pSVData->maAppData.mpAppFileName;
- pSVData->maAppData.mpAppFileName = NULL;
+ pSVData->maAppData.mpAppFileName = nullptr;
}
if ( pSVData->maAppData.mpAppName )
{
delete pSVData->maAppData.mpAppName;
- pSVData->maAppData.mpAppName = NULL;
+ pSVData->maAppData.mpAppName = nullptr;
}
if ( pSVData->maAppData.mpDisplayName )
{
delete pSVData->maAppData.mpDisplayName;
- pSVData->maAppData.mpDisplayName = NULL;
+ pSVData->maAppData.mpDisplayName = nullptr;
}
if ( pSVData->maAppData.mpEventListeners )
{
delete pSVData->maAppData.mpEventListeners;
- pSVData->maAppData.mpEventListeners = NULL;
+ pSVData->maAppData.mpEventListeners = nullptr;
}
if ( pSVData->maAppData.mpKeyListeners )
{
delete pSVData->maAppData.mpKeyListeners;
- pSVData->maAppData.mpKeyListeners = NULL;
+ pSVData->maAppData.mpKeyListeners = nullptr;
}
if ( pSVData->maAppData.mpPostYieldListeners )
{
delete pSVData->maAppData.mpPostYieldListeners;
- pSVData->maAppData.mpPostYieldListeners = NULL;
+ pSVData->maAppData.mpPostYieldListeners = nullptr;
}
if ( pSVData->maAppData.mpFirstHotKey )
@@ -520,18 +520,18 @@ void DeInitVCL()
ImplFreeEventHookData();
if (pSVData->mpBlendFrameCache)
- delete pSVData->mpBlendFrameCache, pSVData->mpBlendFrameCache = NULL;
+ delete pSVData->mpBlendFrameCache, pSVData->mpBlendFrameCache = nullptr;
ImplDeletePrnQueueList();
delete pSVData->maGDIData.mpScreenFontList;
- pSVData->maGDIData.mpScreenFontList = NULL;
+ pSVData->maGDIData.mpScreenFontList = nullptr;
delete pSVData->maGDIData.mpScreenFontCache;
- pSVData->maGDIData.mpScreenFontCache = NULL;
+ pSVData->maGDIData.mpScreenFontCache = nullptr;
if ( pSVData->mpResMgr )
{
delete pSVData->mpResMgr;
- pSVData->mpResMgr = NULL;
+ pSVData->mpResMgr = nullptr;
}
ResMgr::DestroyAllResMgr();
@@ -539,9 +539,9 @@ void DeInitVCL()
// destroy all Sal interfaces before destorying the instance
// and thereby unloading the plugin
delete pSVData->mpSalSystem;
- pSVData->mpSalSystem = NULL;
+ pSVData->mpSalSystem = nullptr;
delete pSVData->mpSalTimer;
- pSVData->mpSalTimer = NULL;
+ pSVData->mpSalTimer = nullptr;
// Deinit Sal
DestroySalInstance( pSVData->mpDefInst );
@@ -549,7 +549,7 @@ void DeInitVCL()
if( pOwnSvApp )
{
delete pOwnSvApp;
- pOwnSvApp = NULL;
+ pOwnSvApp = nullptr;
}
EmbeddedFontsHelper::clearTemporaryFontFiles();
@@ -579,14 +579,14 @@ static unsigned __stdcall _threadmain( void *pArgs )
return 0;
}
#else
-static oslThread hThreadID = 0;
+static oslThread hThreadID = nullptr;
extern "C"
{
static void SAL_CALL MainWorkerFunction( void* pArgs )
{
static_cast<WorkerThreadData*>(pArgs)->pWorker( static_cast<WorkerThreadData*>(pArgs)->pThreadData );
delete static_cast<WorkerThreadData*>(pArgs);
- hThreadID = 0;
+ hThreadID = nullptr;
}
} // extern "C"
#endif
diff --git a/vcl/source/app/unohelp2.cxx b/vcl/source/app/unohelp2.cxx
index 280f04eeadeb..73389919f4bf 100644
--- a/vcl/source/app/unohelp2.cxx
+++ b/vcl/source/app/unohelp2.cxx
@@ -50,7 +50,7 @@ namespace vcl { namespace unohelper {
SolarMutexReleaser aReleaser;
try
{
- rxClipboard->setContents( pDataObj, NULL );
+ rxClipboard->setContents( pDataObj, nullptr );
uno::Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( rxClipboard, uno::UNO_QUERY );
if( xFlushableClipboard.is() )
diff --git a/vcl/source/components/factory.cxx b/vcl/source/components/factory.cxx
index 403232c0c91f..856bddc23d35 100644
--- a/vcl/source/components/factory.cxx
+++ b/vcl/source/components/factory.cxx
@@ -38,7 +38,7 @@ extern "C" {
void* /*pXUnoKey*/
)
{
- void* pRet = 0;
+ void* pRet = nullptr;
if( pXUnoSMgr )
{
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 5a259d07c779..0bfd72004960 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -256,8 +256,8 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
WinBits nWinStyle = GetStyle();
Rectangle aOutRect( rPos, rSize );
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
ImageAlign eImageAlign = mpButtonData->meImageAlign;
Size aImageSize = mpButtonData->maImage.GetSizePixel();
@@ -611,7 +611,7 @@ bool Button::set_property(const OString &rKey, const OString &rValue)
IMPL_STATIC_LINK_TYPED( Button, dispatchCommandHandler, Button*, pButton, void )
{
- if (pButton == NULL)
+ if (pButton == nullptr)
return;
comphelper::dispatchCommand(pButton->maCommand, uno::Sequence<beans::PropertyValue>());
@@ -633,14 +633,14 @@ namespace
{
vcl::Window* getPreviousSibling(vcl::Window *pParent)
{
- return pParent ? pParent->GetWindow(GetWindowType::LastChild) : NULL;
+ return pParent ? pParent->GetWindow(GetWindowType::LastChild) : nullptr;
}
}
void PushButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle);
- Button::ImplInit( pParent, nStyle, NULL );
+ Button::ImplInit( pParent, nStyle, nullptr );
if ( nStyle & WB_NOLIGHTBORDER )
ImplGetButtonState() |= DrawButtonFlags::NoLightBorder;
@@ -868,7 +868,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
aSymbolRect.Left() = aSymbolRect.Right() - nSymbolSize;
ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep,
- nDrawFlags, nTextStyle, NULL, true );
+ nDrawFlags, nTextStyle, nullptr, true );
}
else
ImplCalcSymbolRect( aSymbolRect );
@@ -893,7 +893,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
{
Rectangle aSymbolRect;
ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep, nDrawFlags,
- nTextStyle, IsSymbol() ? &aSymbolRect : NULL, true );
+ nTextStyle, IsSymbol() ? &aSymbolRect : nullptr, true );
if ( IsSymbol() && ! bLayout )
{
@@ -1479,9 +1479,9 @@ void PushButton::DataChanged( const DataChangedEvent& rDCEvt )
bool PushButton::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow() )
{
@@ -1817,7 +1817,7 @@ void RadioButton::ImplInitRadioButtonData()
void RadioButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle);
- Button::ImplInit( pParent, nStyle, NULL );
+ Button::ImplInit( pParent, nStyle, nullptr );
ImplInitSettings( true, true, true );
}
@@ -2003,8 +2003,8 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
{
WinBits nWinStyle = GetStyle();
OUString aText( GetText() );
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
pDev->Push( PushFlags::CLIPREGION );
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
@@ -2610,9 +2610,9 @@ void RadioButton::DataChanged( const DataChangedEvent& rDCEvt )
bool RadioButton::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
{
@@ -2960,7 +2960,7 @@ void CheckBox::ImplInitCheckBoxData()
void CheckBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle);
- Button::ImplInit( pParent, nStyle, NULL );
+ Button::ImplInit( pParent, nStyle, nullptr );
ImplInitSettings( true, true, true );
}
@@ -3565,9 +3565,9 @@ void CheckBox::DataChanged( const DataChangedEvent& rDCEvt )
bool CheckBox::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
{
@@ -3896,7 +3896,7 @@ void DisclosureButton::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext)
if (!rCtrlData.mpDisclosureMinus)
rCtrlData.mpDisclosureMinus = new Image(BitmapEx(VclResId(SV_DISCLOSURE_MINUS)));
- Image* pImg = NULL;
+ Image* pImg = nullptr;
pImg = IsChecked() ? rCtrlData.mpDisclosureMinus : rCtrlData.mpDisclosurePlus;
DBG_ASSERT(pImg, "no disclosure image");
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index db1af03e1862..f7e04c7eb1cb 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -50,7 +50,7 @@ Control::Control( vcl::Window* pParent, WinBits nStyle ) :
Window( WINDOW_CONTROL )
{
ImplInitControlData();
- ImplInit( pParent, nStyle, NULL );
+ ImplInit( pParent, nStyle, nullptr );
}
Control::Control( vcl::Window* pParent, const ResId& rResId ) :
@@ -59,7 +59,7 @@ Control::Control( vcl::Window* pParent, const ResId& rResId ) :
ImplInitControlData();
rResId.SetRT( RSC_CONTROL );
WinBits nStyle = ImplInitRes( rResId );
- ImplInit( pParent, nStyle, NULL );
+ ImplInit( pParent, nStyle, nullptr );
ImplLoadRes( rResId );
if ( !(nStyle & WB_HIDE) )
@@ -73,7 +73,7 @@ Control::~Control()
void Control::dispose()
{
- delete mpControlData, mpControlData = NULL;
+ delete mpControlData, mpControlData = nullptr;
Window::dispose();
}
@@ -114,7 +114,7 @@ void Control::CreateLayoutData() const
bool Control::HasLayoutData() const
{
- return mpControlData && mpControlData->mpLayoutData != NULL;
+ return mpControlData && mpControlData->mpLayoutData != nullptr;
}
void Control::SetText( const OUString& rStr )
@@ -123,7 +123,7 @@ void Control::SetText( const OUString& rStr )
Window::SetText( rStr );
}
-ControlLayoutData::ControlLayoutData() : m_pParent( NULL )
+ControlLayoutData::ControlLayoutData() : m_pParent( nullptr )
{
}
@@ -350,7 +350,7 @@ void Control::ImplClearLayoutData() const
if (mpControlData)
{
delete mpControlData->mpLayoutData;
- mpControlData->mpLayoutData = NULL;
+ mpControlData->mpLayoutData = nullptr;
}
}
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 7ac3a4443d1e..e905fba3df8b 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -77,7 +77,7 @@ using namespace ::com::sun::star::lang;
// - Redo
// - Bei Tracking-Cancel DefaultSelection wieder herstellen
-static FncGetSpecialChars pImplFncGetSpecialChars = NULL;
+static FncGetSpecialChars pImplFncGetSpecialChars = nullptr;
#define EDIT_ALIGN_LEFT 1
#define EDIT_ALIGN_CENTER 2
@@ -133,7 +133,7 @@ Impl_IMEInfos::Impl_IMEInfos(sal_Int32 nP, const OUString& rOldTextAfterStartPos
nPos = nP;
nLen = 0;
bCursor = true;
- pAttribs = NULL;
+ pAttribs = nullptr;
bWasCursorOverwrite = false;
}
@@ -153,7 +153,7 @@ void Impl_IMEInfos::CopyAttribs(const sal_uInt16* pA, sal_Int32 nL)
void Impl_IMEInfos::DestroyAttribs()
{
delete[] pAttribs;
- pAttribs = NULL;
+ pAttribs = nullptr;
nLen = 0;
}
@@ -256,20 +256,20 @@ Edit::~Edit()
void Edit::dispose()
{
delete mpDDInfo;
- mpDDInfo = NULL;
+ mpDDInfo = nullptr;
vcl::Cursor* pCursor = GetCursor();
if ( pCursor )
{
- SetCursor( NULL );
+ SetCursor( nullptr );
delete pCursor;
}
delete mpIMEInfos;
- mpIMEInfos = NULL;
+ mpIMEInfos = nullptr;
delete mpUpdateDataTimer;
- mpUpdateDataTimer = NULL;
+ mpUpdateDataTimer = nullptr;
if ( mxDnDListener.is() )
{
@@ -298,8 +298,8 @@ void Edit::dispose()
void Edit::ImplInitEditData()
{
mpSubEdit = VclPtr<Edit>();
- mpUpdateDataTimer = NULL;
- mpFilterText = NULL;
+ mpUpdateDataTimer = nullptr;
+ mpFilterText = nullptr;
mnXOffset = 0;
mnAlign = EDIT_ALIGN_LEFT;
mnMaxTextLen = EDIT_NOLIMIT;
@@ -314,8 +314,8 @@ void Edit::ImplInitEditData()
mbActivePopup = false;
mbIsSubEdit = false;
mbInMBDown = false;
- mpDDInfo = NULL;
- mpIMEInfos = NULL;
+ mpDDInfo = nullptr;
+ mpIMEInfos = nullptr;
mcEchoChar = 0;
// --- RTL --- no default mirroring for Edit controls
@@ -349,7 +349,7 @@ void Edit::ImplInit(vcl::Window* pParent, WinBits nStyle)
if (!(nStyle & (WB_CENTER | WB_RIGHT)))
nStyle |= WB_LEFT;
- Control::ImplInit(pParent, nStyle, NULL);
+ Control::ImplInit(pParent, nStyle, nullptr);
mbReadOnly = (nStyle & WB_READONLY) != 0;
@@ -1758,7 +1758,7 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
bDone = true; // read characters also when in ReadOnly
if ( !mbReadOnly )
{
- ImplInsertText(OUString(rKEvt.GetCharCode()), 0, true);
+ ImplInsertText(OUString(rKEvt.GetCharCode()), nullptr, true);
if (!m_pImpl->m_AutocompleteSignal.empty())
{
if ( (maSelection.Min() == maSelection.Max()) && (maSelection.Min() == maText.getLength()) )
@@ -2117,7 +2117,7 @@ void Edit::Command( const CommandEvent& rCEvt )
{
bool bInsertMode = !mpIMEInfos->bWasCursorOverwrite;
delete mpIMEInfos;
- mpIMEInfos = NULL;
+ mpIMEInfos = nullptr;
SetInsertMode(bInsertMode);
ImplModified();
@@ -2185,7 +2185,7 @@ void Edit::Command( const CommandEvent& rCEvt )
if ( mpIMEInfos )
{
sal_Int32 nCursorPos = GetSelection().Max();
- SetCursorRect( NULL, GetTextWidth( maText.toString(), nCursorPos, mpIMEInfos->nPos+mpIMEInfos->nLen-nCursorPos ) );
+ SetCursorRect( nullptr, GetTextWidth( maText.toString(), nCursorPos, mpIMEInfos->nPos+mpIMEInfos->nLen-nCursorPos ) );
}
else
{
@@ -2936,7 +2936,7 @@ void Edit::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSourceDro
ImplHideDDCursor();
delete mpDDInfo;
- mpDDInfo = NULL;
+ mpDDInfo = nullptr;
}
// ::com::sun::star::datatransfer::dnd::XDropTargetListener
@@ -2980,7 +2980,7 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent&
if ( !mpDDInfo->bStarterOfDD )
{
delete mpDDInfo;
- mpDDInfo = NULL;
+ mpDDInfo = nullptr;
}
}
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 040cfa87d9a0..8036d1640d1d 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -370,7 +370,7 @@ static void ImplUpdateSeparators( const OUString& rOldDecSep, const OUString& rN
FormatterBase::FormatterBase( Edit* pField )
{
mpField = pField;
- mpLocaleDataWrapper = NULL;
+ mpLocaleDataWrapper = nullptr;
mbReformat = false;
mbStrictFormat = false;
mbEmptyFieldValue = false;
@@ -802,7 +802,7 @@ NumericField::NumericField( vcl::Window* pParent, const ResId& rResId ) :
void NumericField::dispose()
{
- NumericFormatter::SetField( NULL );
+ NumericFormatter::SetField( nullptr );
SpinField::dispose();
}
@@ -957,7 +957,7 @@ NumericBox::NumericBox( vcl::Window* pParent, WinBits nWinStyle ) :
void NumericBox::dispose()
{
- NumericFormatter::SetField( NULL );
+ NumericFormatter::SetField( nullptr );
ComboBox::dispose();
}
@@ -1626,7 +1626,7 @@ MetricField::MetricField( vcl::Window* pParent, const ResId& rResId ) :
void MetricField::dispose()
{
- MetricFormatter::SetField( NULL );
+ MetricFormatter::SetField( nullptr );
SpinField::dispose();
}
@@ -1796,7 +1796,7 @@ MetricBox::MetricBox( vcl::Window* pParent, WinBits nWinStyle ) :
void MetricBox::dispose()
{
- MetricFormatter::SetField(NULL);
+ MetricFormatter::SetField(nullptr);
ComboBox::dispose();
}
@@ -2030,7 +2030,7 @@ CurrencyField::CurrencyField( vcl::Window* pParent, WinBits nWinStyle ) :
void CurrencyField::dispose()
{
- CurrencyFormatter::SetField( NULL );
+ CurrencyFormatter::SetField( nullptr );
SpinField::dispose();
}
@@ -2114,7 +2114,7 @@ CurrencyBox::CurrencyBox( vcl::Window* pParent, WinBits nWinStyle ) :
void CurrencyBox::dispose()
{
- CurrencyFormatter::SetField( NULL );
+ CurrencyFormatter::SetField( nullptr );
ComboBox::dispose();
}
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 0c2644994e93..8fd5b2215899 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -821,7 +821,7 @@ PatternField::PatternField( vcl::Window* pParent, WinBits nWinStyle ) :
void PatternField::dispose()
{
- PatternFormatter::SetField( NULL );
+ PatternFormatter::SetField( nullptr );
SpinField::dispose();
}
@@ -873,7 +873,7 @@ PatternBox::PatternBox( vcl::Window* pParent, WinBits nWinStyle ) :
void PatternBox::dispose()
{
- PatternFormatter::SetField( NULL );
+ PatternFormatter::SetField( nullptr );
ComboBox::dispose();
}
@@ -1407,7 +1407,7 @@ void DateFormatter::ImplInit()
{
mbLongFormat = false;
mbShowDateCentury = true;
- mpCalendarWrapper = NULL;
+ mpCalendarWrapper = nullptr;
mnDateFormat = 0xFFFF;
mnExtDateFormat = XTDATEF_SYSTEM_SHORT;
}
@@ -1425,13 +1425,13 @@ DateFormatter::DateFormatter() :
DateFormatter::~DateFormatter()
{
delete mpCalendarWrapper;
- mpCalendarWrapper = NULL;
+ mpCalendarWrapper = nullptr;
}
void DateFormatter::SetLocale( const ::com::sun::star::lang::Locale& rLocale )
{
delete mpCalendarWrapper;
- mpCalendarWrapper = NULL;
+ mpCalendarWrapper = nullptr;
FormatterBase::SetLocale( rLocale );
}
@@ -1730,7 +1730,7 @@ DateField::DateField( vcl::Window* pParent, WinBits nWinStyle ) :
void DateField::dispose()
{
- DateFormatter::SetField( NULL );
+ DateFormatter::SetField( nullptr );
SpinField::dispose();
}
@@ -1835,7 +1835,7 @@ DateBox::DateBox( vcl::Window* pParent, WinBits nWinStyle ) :
void DateBox::dispose()
{
- DateFormatter::SetField( NULL );
+ DateFormatter::SetField( nullptr );
ComboBox::dispose();
}
@@ -2513,7 +2513,7 @@ TimeField::TimeField( vcl::Window* pParent, WinBits nWinStyle ) :
void TimeField::dispose()
{
- TimeFormatter::SetField( NULL );
+ TimeFormatter::SetField( nullptr );
SpinField::dispose();
}
@@ -2656,7 +2656,7 @@ TimeBox::TimeBox( vcl::Window* pParent, WinBits nWinStyle ) :
void TimeBox::dispose()
{
- TimeFormatter::SetField( NULL );
+ TimeFormatter::SetField( nullptr );
ComboBox::dispose();
}
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 9502c08e97fc..a5f9e95d60f0 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -83,7 +83,7 @@ static Point ImplCalcPos( WinBits nStyle, const Point& rPos,
void FixedText::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
ApplySettings(*this);
}
@@ -108,7 +108,7 @@ FixedText::FixedText( vcl::Window* pParent, WinBits nStyle )
: Control(WINDOW_FIXEDTEXT)
, m_nMaxWidthChars(-1)
, m_nMinWidthChars(-1)
- , m_pMnemonicWindow(NULL)
+ , m_pMnemonicWindow(nullptr)
{
ImplInit( pParent, nStyle );
}
@@ -117,7 +117,7 @@ FixedText::FixedText( vcl::Window* pParent, const ResId& rResId )
: Control(WINDOW_FIXEDTEXT)
, m_nMaxWidthChars(-1)
, m_nMinWidthChars(-1)
- , m_pMnemonicWindow(NULL)
+ , m_pMnemonicWindow(nullptr)
{
rResId.SetRT( RSC_TEXT );
WinBits nStyle = ImplInitRes( rResId );
@@ -199,8 +199,8 @@ void FixedText::ImplDraw(OutputDevice* pDev, DrawFlags nDrawFlags,
Rectangle aRect( Rectangle( aPos, rSize ) );
DrawControlText(*pDev, aRect, aText, nTextStyle,
- bFillLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL,
- bFillLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL);
+ bFillLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr,
+ bFillLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr);
}
void FixedText::ApplySettings(vcl::RenderContext& rRenderContext)
@@ -445,7 +445,7 @@ void FixedText::set_mnemonic_widget(vcl::Window *pWindow)
if (m_pMnemonicWindow)
{
vcl::Window *pTempReEntryGuard = m_pMnemonicWindow;
- m_pMnemonicWindow = NULL;
+ m_pMnemonicWindow = nullptr;
pTempReEntryGuard->remove_mnemonic_label(this);
}
m_pMnemonicWindow = pWindow;
@@ -460,7 +460,7 @@ FixedText::~FixedText()
void FixedText::dispose()
{
- set_mnemonic_widget(NULL);
+ set_mnemonic_widget(nullptr);
m_pMnemonicWindow.clear();
Control::dispose();
}
@@ -492,7 +492,7 @@ void SelectableFixedText::LoseFocus()
void FixedLine::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
ApplySettings(*this);
}
@@ -521,8 +521,8 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
OUString aText = GetText();
WinBits nWinStyle = GetStyle();
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
DecorationView aDecoView(&rRenderContext);
if (aText.isEmpty())
@@ -713,7 +713,7 @@ Size FixedLine::GetOptimalSize() const
void FixedBitmap::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
ApplySettings(*this);
}
@@ -851,7 +851,7 @@ void FixedImage::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
mbInUserDraw = false;
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
ApplySettings(*this);
}
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index 18906a58efc4..680362a7c9ba 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -33,7 +33,7 @@
void GroupBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
SetMouseTransparent( true );
ImplInitSettings( true, true, true );
}
@@ -177,8 +177,8 @@ void GroupBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
}
}
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
DrawControlText( *pDev, aRect, aText, nTextStyle, pVector, pDisplayText );
}
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 358fcf2cc93b..caf3099eea05 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -373,7 +373,7 @@ void ImplEntryList::SetEntryData( sal_Int32 nPos, void* pNewData )
void* ImplEntryList::GetEntryData( sal_Int32 nPos ) const
{
ImplEntryType* pImplEntry = GetEntry( nPos );
- return pImplEntry ? pImplEntry->mpUserData : NULL;
+ return pImplEntry ? pImplEntry->mpUserData : nullptr;
}
void ImplEntryList::SetEntryFlags( sal_Int32 nPos, ListBoxEntryFlags nFlags )
@@ -733,11 +733,11 @@ void ImplListBoxWindow::ImplCallSelect()
ImplUpdateEntryMetrics( *pNewEntry );
GetEntryList()->SetMRUCount( ++nMRUCount );
SetSeparatorPos( nMRUCount ? nMRUCount-1 : 0 );
- maMRUChangedHdl.Call( NULL );
+ maMRUChangedHdl.Call( nullptr );
}
}
- maSelectHdl.Call( NULL );
+ maSelectHdl.Call( nullptr );
mbSelectionChanged = false;
}
@@ -801,7 +801,7 @@ sal_Int32 ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
nY += pEntry->mnHeight;
pEntry = mpEntryList->GetEntryPtr( ++nSelect );
}
- if( pEntry == NULL )
+ if( pEntry == nullptr )
nSelect = LISTBOX_ENTRY_NOTFOUND;
return nSelect;
@@ -934,7 +934,7 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt )
// VCLEVENT_LISTBOX_SELECT vcl event.
else
{
- maListItemSelectHdl.Call(NULL);
+ maListItemSelectHdl.Call(nullptr);
}
}
mbTrackingSelect = false;
@@ -1188,7 +1188,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
}
else
{
- maCancelHdl.Call( NULL );
+ maCancelHdl.Call( nullptr );
if ( !mbMulti )
{
mbTrackingSelect = true;
@@ -1813,8 +1813,8 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
if (bDrawText)
{
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
OUString aStr(mpEntryList->GetEntryText(nPos));
if (!aStr.isEmpty())
{
@@ -2633,9 +2633,9 @@ void ImplWin::FillLayoutData() const
bool ImplWin::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow() )
{
@@ -2850,8 +2850,8 @@ void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, boo
aTextRect.Left() += nMaxWidth + IMG_TXT_DISTANCE;
}
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
rRenderContext.DrawText( aTextRect, maString, nTextStyle, pVector, pDisplayText );
}
@@ -2939,7 +2939,7 @@ void ImplBtn::MouseButtonDown( const MouseEvent& )
ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( vcl::Window* pParent ) :
FloatingWindow( pParent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ) // no drop shadow for list boxes
{
- mpImplLB = NULL;
+ mpImplLB = nullptr;
mnDDLineCount = 0;
mbAutoWidth = false;
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index cf1230b154c7..2858c08287d7 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -44,7 +44,7 @@ void ListBox::EnableQuickSelection( const bool& b )
ListBox::ListBox(WindowType nType)
: Control(nType)
- , mpImplLB(NULL)
+ , mpImplLB(nullptr)
{
ImplInitListBoxData();
}
@@ -87,9 +87,9 @@ void ListBox::dispose()
void ListBox::ImplInitListBoxData()
{
- mpFloatWin = NULL;
- mpImplWin = NULL;
- mpBtn = NULL;
+ mpFloatWin = nullptr;
+ mpImplWin = nullptr;
+ mpBtn = nullptr;
mnDDHeight = 0;
mnSaveValue = LISTBOX_ENTRY_NOTFOUND;
mnLineCount = 0;
@@ -104,7 +104,7 @@ void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
if ( !(nStyle & WB_NOBORDER) && ( nStyle & WB_DROPDOWN ) )
nStyle |= WB_BORDER;
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener> xDrop = new DNDEventDispatcher(this);
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 7da797e51a50..773d439a6572 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -30,9 +30,9 @@ void MenuButton::ImplInitMenuButtonData()
{
mnDDStyle = PushButtonDropdownStyle::MenuButton;
- mpMenuTimer = NULL;
- mpMenu = NULL;
- mpOwnMenu = NULL;
+ mpMenuTimer = nullptr;
+ mpMenu = nullptr;
+ mpOwnMenu = nullptr;
mnCurItemId = 0;
mnMenuMode = 0;
}
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index b8bcbc2632b8..fa375da538c9 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -36,7 +36,7 @@ void MoreButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
meUnit = MAP_PIXEL;
mbState = false;
- mpMBData->mpItemList = NULL;
+ mpMBData->mpItemList = nullptr;
PushButton::ImplInit( pParent, nStyle );
diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx
index 2ed4d8e38e25..dc0e8117fc19 100644
--- a/vcl/source/control/quickselectionengine.cxx
+++ b/vcl/source/control/quickselectionengine.cxx
@@ -88,7 +88,7 @@ namespace vcl
pSearchEntry = _engineData.rEntryList.NextEntry( pSearchEntry, sEntryText );
if ( pSearchEntry == pStartedWith )
- pSearchEntry = NULL;
+ pSearchEntry = nullptr;
}
return pSearchEntry;
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index be52f24918f5..be571fddb93e 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -76,7 +76,7 @@ struct ImplScrollBarData
void ScrollBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
- mpData = NULL;
+ mpData = nullptr;
mnThumbPixRange = 0;
mnThumbPixPos = 0;
mnThumbPixSize = 0;
@@ -102,7 +102,7 @@ void ScrollBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
ImplInitStyle( nStyle );
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
long nScrollSize = GetSettings().GetStyleSettings().GetScrollBarSize();
SetSizePixel( Size( nScrollSize, nScrollSize ) );
@@ -129,7 +129,7 @@ ScrollBar::~ScrollBar()
void ScrollBar::dispose()
{
- delete mpData; mpData = NULL;
+ delete mpData; mpData = nullptr;
Control::dispose();
}
@@ -1258,14 +1258,14 @@ Rectangle* ScrollBar::ImplFindPartRect( const Point& rPt )
maThumbRect.IsInside( rPt ) )
return &maThumbRect;
else
- return NULL;
+ return nullptr;
}
bool ScrollBar::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
{
@@ -1436,7 +1436,7 @@ Size ScrollBar::getCurrentCalcSize() const
void ScrollBarBox::ImplInit(vcl::Window* pParent, WinBits nStyle)
{
- Window::ImplInit( pParent, nStyle, NULL );
+ Window::ImplInit( pParent, nStyle, nullptr );
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
long nScrollSize = rStyleSettings.GetScrollBarSize();
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index ef6bd776f40f..149041421797 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -63,7 +63,7 @@ void Slider::ImplInit( vcl::Window* pParent, WinBits nStyle )
mpLinkedField = nullptr;
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
ImplInitSettings();
SetSizePixel( CalcWindowSizePixel() );
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index a675f01bb518..f720420a9546 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -45,7 +45,7 @@ void SpinButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
else
mbHorz = false;
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
}
SpinButton::SpinButton( vcl::Window* pParent, WinBits nStyle )
@@ -433,14 +433,14 @@ Rectangle* SpinButton::ImplFindPartRect( const Point& rPt )
else if( maLowerRect.IsInside( rPt ) )
return &maLowerRect;
else
- return NULL;
+ return nullptr;
}
bool SpinButton::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if ((rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL)
+ if ((rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr)
{
if (!pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged())
{
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index b21c70344135..5f86629d5d17 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -862,14 +862,14 @@ Rectangle* SpinField::ImplFindPartRect(const Point& rPt)
else if (maLowerRect.IsInside(rPt))
return &maLowerRect;
else
- return NULL;
+ return nullptr;
}
bool SpinField::PreNotify(NotifyEvent& rNEvt)
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if ((rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL)
+ if ((rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr)
{
if (!pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged())
{
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 1a725a30c818..d848ab04d945 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -55,7 +55,7 @@ struct ImplTabItem
Image maTabImage;
ImplTabItem()
- : mnId( 0 ), mpTabPage( NULL ),
+ : mnId( 0 ), mpTabPage( nullptr ),
mnLine( 0 ), mbFullVisible( false ), mbEnabled( true )
{}
};
@@ -84,7 +84,7 @@ void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle )
if ( !(nStyle & WB_NODIALOGCONTROL) )
nStyle |= WB_DIALOGCONTROL;
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
mnLastWidth = 0;
mnLastHeight = 0;
@@ -97,7 +97,7 @@ void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle )
mbRestoreUnqId = false;
mbSmallInvalidate = false;
mpTabCtrlData = new ImplTabCtrlData;
- mpTabCtrlData->mpListBox = NULL;
+ mpTabCtrlData->mpListBox = nullptr;
ImplInitSettings( true, true, true );
@@ -198,7 +198,7 @@ void TabControl::dispose()
if (mpTabCtrlData)
mpTabCtrlData->mpListBox.disposeAndClear();
delete mpTabCtrlData;
- mpTabCtrlData = NULL;
+ mpTabCtrlData = nullptr;
Control::dispose();
}
@@ -211,7 +211,7 @@ ImplTabItem* TabControl::ImplGetItem( sal_uInt16 nId ) const
return &(*it);
}
- return NULL;
+ return nullptr;
}
Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
@@ -571,8 +571,8 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId )
ImplTabItem* pOldItem = ImplGetItem( nOldId );
ImplTabItem* pItem = ImplGetItem( nId );
- TabPage* pOldPage = (pOldItem) ? pOldItem->mpTabPage.get() : NULL;
- TabPage* pPage = (pItem) ? pItem->mpTabPage.get() : NULL;
+ TabPage* pOldPage = (pOldItem) ? pOldItem->mpTabPage.get() : nullptr;
+ TabPage* pPage = (pItem) ? pItem->mpTabPage.get() : nullptr;
vcl::Window* pCtrlParent = GetParent();
if ( IsReallyVisible() && IsUpdateMode() )
@@ -954,8 +954,8 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
Rectangle aOutRect(nXPos + aImageSize.Width(), nYPos,
nXPos + aImageSize.Width() + nTextWidth, nYPos + nTextHeight);
DrawControlText(rRenderContext, aOutRect, pItem->maFormatText, nStyle,
- bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL,
- bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL);
+ bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr,
+ bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr);
rRenderContext.SetTextColor(aOldColor);
}
@@ -1022,7 +1022,7 @@ IMPL_LINK_TYPED( TabControl, ImplWindowEventListener, VclWindowEvent&, rEvent, v
void TabControl::MouseButtonDown( const MouseEvent& rMEvt )
{
- if( mpTabCtrlData->mpListBox.get() == NULL )
+ if( mpTabCtrlData->mpListBox.get() == nullptr )
{
if( rMEvt.IsLeft() )
{
@@ -1068,7 +1068,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle&
Rectangle aRect = ImplGetTabRect(TAB_PAGERECT);
// find current item
- ImplTabItem* pCurItem = NULL;
+ ImplTabItem* pCurItem = nullptr;
for (std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin();
it != mpTabCtrlData->maItemList.end(); ++it )
{
@@ -1092,7 +1092,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle&
// in this case we're only interested in the top border of the tabpage because the tabitems are used
// standalone (eg impress)
bool bNoTabPage = false;
- TabPage* pCurPage = pCurItem ? pCurItem->mpTabPage.get() : NULL;
+ TabPage* pCurPage = pCurItem ? pCurItem->mpTabPage.get() : nullptr;
if (!pCurPage || !pCurPage->IsVisible())
{
bNoTabPage = true;
@@ -1197,8 +1197,8 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle&
// Some native toolkits (GTK+) draw tabs right-to-left, with an
// overlap between adjacent tabs
bool bDrawTabsRTL = rRenderContext.IsNativeControlSupported(CTRL_TAB_ITEM, PART_TABS_DRAW_RTL);
- ImplTabItem* pFirstTab = NULL;
- ImplTabItem* pLastTab = NULL;
+ ImplTabItem* pFirstTab = nullptr;
+ ImplTabItem* pLastTab = nullptr;
size_t idx;
// Event though there is a tab overlap with GTK+, the first tab is not
@@ -1542,7 +1542,7 @@ void TabControl::DataChanged( const DataChangedEvent& rDCEvt )
Rectangle* TabControl::ImplFindPartRect( const Point& rPt )
{
- ImplTabItem* pFoundItem = NULL;
+ ImplTabItem* pFoundItem = nullptr;
int nFound = 0;
for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin();
it != mpTabCtrlData->maItemList.end(); ++it )
@@ -1555,14 +1555,14 @@ Rectangle* TabControl::ImplFindPartRect( const Point& rPt )
}
}
// assure that only one tab is highlighted at a time
- return nFound == 1 ? &pFoundItem->maRect : NULL;
+ return nFound == 1 ? &pFoundItem->maRect : nullptr;
}
bool TabControl::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
{
@@ -1652,7 +1652,7 @@ void TabControl::InsertPage( sal_uInt16 nPageId, const OUString& rText,
"TabControl::InsertPage(): PageId already exists" );
// insert new page item
- ImplTabItem* pItem = NULL;
+ ImplTabItem* pItem = nullptr;
if( nPos == TAB_APPEND || size_t(nPos) >= mpTabCtrlData->maItemList.size() )
{
mpTabCtrlData->maItemList.push_back( ImplTabItem() );
@@ -1681,7 +1681,7 @@ void TabControl::InsertPage( sal_uInt16 nPageId, const OUString& rText,
// init new page item
pItem->mnId = nPageId;
- pItem->mpTabPage = NULL;
+ pItem->mpTabPage = nullptr;
pItem->maText = rText;
pItem->mbFullVisible = false;
@@ -1926,7 +1926,7 @@ void TabControl::SetTabPage( sal_uInt16 nPageId, TabPage* pTabPage )
}
else
{
- pItem->mpTabPage = NULL;
+ pItem->mpTabPage = nullptr;
queue_resize();
}
}
@@ -1939,7 +1939,7 @@ TabPage* TabControl::GetTabPage( sal_uInt16 nPageId ) const
if ( pItem )
return pItem->mpTabPage;
else
- return NULL;
+ return nullptr;
}
void TabControl::SetPageText( sal_uInt16 nPageId, const OUString& rText )
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index 19adc7d4cfca..a3b32c8287c8 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -222,14 +222,14 @@ TEParaPortions::~TEParaPortions()
IdleFormatter::IdleFormatter()
{
- mpView = 0;
+ mpView = nullptr;
mnRestarts = 0;
SetPriority(SchedulerPriority::HIGH);
}
IdleFormatter::~IdleFormatter()
{
- mpView = 0;
+ mpView = nullptr;
}
void IdleFormatter::DoIdleFormat( TextView* pV, sal_uInt16 nMaxRestarts )
@@ -274,7 +274,7 @@ TEIMEInfos::TEIMEInfos( const TextPaM& rPos, const OUString& rOldTextAfterStartP
aPos = rPos;
nLen = 0;
bCursor = true;
- pAttribs = NULL;
+ pAttribs = nullptr;
bWasCursorOverwrite = false;
}
@@ -294,7 +294,7 @@ void TEIMEInfos::CopyAttribs(const sal_uInt16* pA, sal_Int32 nL)
void TEIMEInfos::DestroyAttribs()
{
delete[] pAttribs;
- pAttribs = NULL;
+ pAttribs = nullptr;
nLen = 0;
}
diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx
index 2398fffc9482..f90331090b30 100644
--- a/vcl/source/edit/textdoc.cxx
+++ b/vcl/source/edit/textdoc.cxx
@@ -92,12 +92,12 @@ TextCharAttrib* TextCharAttribList::FindAttrib( sal_uInt16 nWhich, sal_Int32 nPo
for (TextCharAttribs::reverse_iterator it = maAttribs.rbegin(); it != maAttribs.rend(); ++it)
{
if ( it->GetEnd() < nPos )
- return 0;
+ return nullptr;
if ( ( it->Which() == nWhich ) && it->IsIn(nPos) )
return &*it;
}
- return NULL;
+ return nullptr;
}
const TextCharAttrib* TextCharAttribList::FindNextAttrib( sal_uInt16 nWhich, sal_Int32 nFromPos, sal_Int32 nMaxPos ) const
@@ -110,7 +110,7 @@ const TextCharAttrib* TextCharAttribList::FindNextAttrib( sal_uInt16 nWhich, sal
( it->Which() == nWhich ) )
return &*it;
}
- return NULL;
+ return nullptr;
}
bool TextCharAttribList::HasAttrib( sal_uInt16 nWhich ) const
@@ -139,17 +139,17 @@ bool TextCharAttribList::HasBoundingAttrib( sal_Int32 nBound )
TextCharAttrib* TextCharAttribList::FindEmptyAttrib( sal_uInt16 nWhich, sal_Int32 nPos )
{
if ( !mbHasEmptyAttribs )
- return 0;
+ return nullptr;
for (TextCharAttribs::iterator it = maAttribs.begin(); it != maAttribs.end(); ++it)
{
if ( it->GetStart() > nPos )
- return 0;
+ return nullptr;
if ( ( it->GetStart() == nPos ) && ( it->GetEnd() == nPos ) && ( it->Which() == nWhich ) )
return &*it;
}
- return 0;
+ return nullptr;
}
void TextCharAttribList::DeleteEmptyAttribs()
@@ -446,7 +446,7 @@ OUString TextDoc::GetText( const sal_Unicode* pSep ) const
OUString TextDoc::GetText( sal_uInt32 nPara ) const
{
- TextNode* pNode = ( nPara < maTextNodes.size() ) ? maTextNodes[ nPara ] : 0;
+ TextNode* pNode = ( nPara < maTextNodes.size() ) ? maTextNodes[ nPara ] : nullptr;
if ( pNode )
return pNode->GetText();
diff --git a/vcl/source/edit/textdoc.hxx b/vcl/source/edit/textdoc.hxx
index 4a3e7c2f7a09..f332f8bb0f59 100644
--- a/vcl/source/edit/textdoc.hxx
+++ b/vcl/source/edit/textdoc.hxx
@@ -113,7 +113,7 @@ public:
TextPaM InsertParaBreak( const TextPaM& rPaM, bool bKeepEndingAttribs );
TextPaM ConnectParagraphs( TextNode* pLeft, TextNode* pRight );
- sal_Int32 GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = NULL ) const;
+ sal_Int32 GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = nullptr ) const;
OUString GetText( const sal_Unicode* pSep ) const;
OUString GetText( sal_uInt32 nPara ) const;
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index b91f1bdd0d9a..5eeded23a498 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -64,11 +64,11 @@ using namespace ::com::sun::star::uno;
TextEngine::TextEngine()
{
- mpDoc = 0;
- mpTEParaPortions = 0;
+ mpDoc = nullptr;
+ mpTEParaPortions = nullptr;
mpViews = new TextViews;
- mpActiveView = NULL;
+ mpActiveView = nullptr;
mbIsFormatting = false;
mbFormatted = false;
@@ -87,9 +87,9 @@ TextEngine::TextEngine()
mnCurTextWidth = -1;
mnCurTextHeight = 0;
- mpUndoManager = NULL;
- mpIMEInfos = NULL;
- mpLocaleDataWrapper = NULL;
+ mpUndoManager = nullptr;
+ mpIMEInfos = nullptr;
+ mpLocaleDataWrapper = nullptr;
mpIdleFormatter = new IdleFormatter;
mpIdleFormatter->SetIdleHdl( LINK( this, TextEngine, IdleFormatHdl ) );
@@ -140,7 +140,7 @@ void TextEngine::RemoveView( TextView* pTextView )
pTextView->HideCursor();
mpViews->erase( it );
if ( pTextView == GetActiveView() )
- SetActiveView( 0 );
+ SetActiveView( nullptr );
}
}
@@ -237,7 +237,7 @@ static const sal_Unicode static_aCRLFText[] = { '\r', '\n', 0 };
static inline const sal_Unicode* static_getLineEndText( LineEnd aLineEnd )
{
- const sal_Unicode* pRet = NULL;
+ const sal_Unicode* pRet = nullptr;
switch( aLineEnd )
{
@@ -892,7 +892,7 @@ Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bP
long nY = 0;
sal_Int32 nCurIndex = 0;
- TextLine* pLine = 0;
+ TextLine* pLine = nullptr;
for ( size_t nLine = 0; nLine < pPortion->GetLines().size(); nLine++ )
{
TextLine& pTmpLine = pPortion->GetLines()[ nLine ];
@@ -1009,7 +1009,7 @@ long TextEngine::ImpGetXPos( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex
const TextAttrib* TextEngine::FindAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const
{
- const TextAttrib* pAttr = NULL;
+ const TextAttrib* pAttr = nullptr;
const TextCharAttrib* pCharAttr = FindCharAttrib( rPaM, nWhich );
if ( pCharAttr )
pAttr = &pCharAttr->GetAttr();
@@ -1018,7 +1018,7 @@ const TextAttrib* TextEngine::FindAttrib( const TextPaM& rPaM, sal_uInt16 nWhich
const TextCharAttrib* TextEngine::FindCharAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const
{
- const TextCharAttrib* pAttr = NULL;
+ const TextCharAttrib* pAttr = nullptr;
TextNode* pNode = mpDoc->GetNodes()[ rPaM.GetPara() ];
if ( pNode && ( rPaM.GetIndex() < pNode->GetText().getLength() ) )
pAttr = pNode->GetCharAttribs().FindAttrib( nWhich, rPaM.GetIndex() );
@@ -1072,7 +1072,7 @@ sal_Int32 TextEngine::ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara
sal_Int32 nCurIndex = 0;
long nY = 0;
- TextLine* pLine = 0;
+ TextLine* pLine = nullptr;
sal_uInt16 nLine;
for ( nLine = 0; nLine < pPortion->GetLines().size(); nLine++ )
{
@@ -1123,7 +1123,7 @@ sal_Int32 TextEngine::GetCharPos( sal_uInt32 nPortion, sal_uInt16 nLine, long nX
nTmpX -= pTextPortion->GetWidth(); // position before Portion
// TODO: Optimize: no GetTextBreak if fixed-width Font
vcl::Font aFont;
- SeekCursor( nPortion, nCurIndex+1, aFont, NULL );
+ SeekCursor( nPortion, nCurIndex+1, aFont, nullptr );
mpRefDev->SetFont( aFont);
long nPosInPortion = nXPos-nTmpX;
if ( IsRightToLeft() != pTextPortion->IsRightToLeft() )
@@ -1228,7 +1228,7 @@ long TextEngine::CalcTextWidth( sal_uInt32 nPara, sal_Int32 nPortionStart, sal_I
else
{
vcl::Font aFont;
- SeekCursor( nPara, nPortionStart+1, aFont, NULL );
+ SeekCursor( nPara, nPortionStart+1, aFont, nullptr );
mpRefDev->SetFont( aFont );
}
TextNode* pNode = mpDoc->GetNodes()[ nPara ];
@@ -1660,7 +1660,7 @@ void TextEngine::ImpBreakLine( sal_uInt32 nPara, TextLine* pLine, TETextPortion*
nMaxBreakPos = pNode->GetText().getLength() - 1;
uno::Reference < i18n::XBreakIterator > xBI = GetBreakIterator();
- i18n::LineBreakHyphenationOptions aHyphOptions( NULL, uno::Sequence< beans::PropertyValue >(), 1 );
+ i18n::LineBreakHyphenationOptions aHyphOptions( nullptr, uno::Sequence< beans::PropertyValue >(), 1 );
i18n::LineBreakUserOptions aUserOptions;
aUserOptions.forbiddenBeginCharacters = ImpGetLocaleDataWrapper()->getForbiddenCharacters().beginLine;
@@ -1706,7 +1706,7 @@ sal_uInt16 TextEngine::SplitTextPortion( sal_uInt32 nPara, sal_Int32 nPos )
sal_uInt16 nSplitPortion;
sal_Int32 nTmpPos = 0;
- TETextPortion* pTextPortion = 0;
+ TETextPortion* pTextPortion = nullptr;
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
const sal_uInt16 nPortions = pTEParaPortion->GetTextPortions().size();
for ( nSplitPortion = 0; nSplitPortion < nPortions; nSplitPortion++ )
@@ -1882,7 +1882,7 @@ void TextEngine::RecalcTextPortion( sal_uInt32 nPara, sal_Int32 nStartPos, sal_I
sal_Int32 nPos = 0;
sal_Int32 nEnd = nStartPos-nNewChars;
const size_t nPortions = pTEParaPortion->GetTextPortions().size();
- TETextPortion* pTP = 0;
+ TETextPortion* pTP = nullptr;
for ( nPortion = 0; nPortion < nPortions; nPortion++ )
{
pTP = pTEParaPortion->GetTextPortions()[ nPortion ];
@@ -1924,8 +1924,8 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
long nY = rStartPos.Y();
- TextPaM const* pSelStart = 0;
- TextPaM const* pSelEnd = 0;
+ TextPaM const* pSelStart = nullptr;
+ TextPaM const* pSelEnd = nullptr;
if ( pSelection && pSelection->HasRange() )
{
bool bInvers = pSelection->GetEnd() < pSelection->GetStart();
@@ -2223,7 +2223,7 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
nXWidth = nTmpWidth;
// search for Portion that does not fit anymore into line
- TETextPortion* pPortion = 0;
+ TETextPortion* pPortion = nullptr;
bool bBrokenLine = false;
while ( ( nTmpWidth <= nXWidth ) && !bEOL && ( nTmpPortion < pTEParaPortion->GetTextPortions().size() ) )
@@ -2382,7 +2382,7 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
sal_uInt16 nEndPortion = pLine->GetEndPortion();
// next line or new line
- pLine = NULL;
+ pLine = nullptr;
if ( nLine < pTEParaPortion->GetLines().size()-1 )
pLine = &( pTEParaPortion->GetLines()[ ++nLine ] );
if ( pLine && ( nIndex >= pNode->GetText().getLength() ) )
@@ -2587,7 +2587,7 @@ void TextEngine::RemoveAttribs( sal_uInt32 nPara, bool bIdleFormatAndUpdate )
mbFormatted = false;
if ( bIdleFormatAndUpdate )
- IdleFormatAndUpdate( NULL, 0xFFFF );
+ IdleFormatAndUpdate( nullptr, 0xFFFF );
else
FormatAndUpdate();
}
@@ -2611,7 +2611,7 @@ void TextEngine::RemoveAttribs( sal_uInt32 nPara, sal_uInt16 nWhich, bool bIdleF
pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().getLength() );
mbFormatted = false;
if(bIdleFormatAndUpdate)
- IdleFormatAndUpdate( NULL, 0xFFFF );
+ IdleFormatAndUpdate( nullptr, 0xFFFF );
else
FormatAndUpdate();
}
@@ -2666,7 +2666,7 @@ void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uInt32 nPara, sal_Int32
mbFormatted = false;
if ( bIdleFormatAndUpdate )
- IdleFormatAndUpdate( NULL, 0xFFFF );
+ IdleFormatAndUpdate( nullptr, 0xFFFF );
else
FormatAndUpdate();
}
@@ -2823,7 +2823,7 @@ void TextEngine::ImpTextFormatted()
void TextEngine::Draw( OutputDevice* pDev, const Point& rPos )
{
- ImpPaint( pDev, rPos, NULL );
+ ImpPaint( pDev, rPos, nullptr );
}
void TextEngine::SetLeftMargin( sal_uInt16 n )
@@ -2843,7 +2843,7 @@ void TextEngine::SetLocale( const ::com::sun::star::lang::Locale& rLocale )
{
maLocale = rLocale;
delete mpLocaleDataWrapper;
- mpLocaleDataWrapper = NULL;
+ mpLocaleDataWrapper = nullptr;
}
::com::sun::star::lang::Locale TextEngine::GetLocale()
@@ -2891,7 +2891,7 @@ void TextEngine::ImpInitWritingDirections( sal_uInt32 nPara )
UBiDi* pBidi = ubidi_openSized( aText.getLength(), 0, &nError );
nError = U_ZERO_ERROR;
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nBidiLevel, NULL, &nError ); // UChar != sal_Unicode in MinGW
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nBidiLevel, nullptr, &nError ); // UChar != sal_Unicode in MinGW
nError = U_ZERO_ERROR;
long nCount = ubidi_countRuns( pBidi, &nError );
diff --git a/vcl/source/edit/textundo.cxx b/vcl/source/edit/textundo.cxx
index ad46c8b28ad4..6fc11ef96d4b 100644
--- a/vcl/source/edit/textundo.cxx
+++ b/vcl/source/edit/textundo.cxx
@@ -275,7 +275,7 @@ void TextUndoInsertChars::Redo()
bool TextUndoInsertChars::Merge( SfxUndoAction* pNextAction )
{
- if ( 0 == dynamic_cast< const TextUndoInsertChars*>( pNextAction ) )
+ if ( nullptr == dynamic_cast< const TextUndoInsertChars*>( pNextAction ) )
return false;
TextUndoInsertChars* pNext = static_cast<TextUndoInsertChars*>(pNextAction);
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index eef662d8139a..28bdd32ac37d 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -186,7 +186,7 @@ TextView::TextView( TextEngine* pEng, vcl::Window* pWindow ) :
mpImpl->mpWindow = pWindow;
mpImpl->mpTextEngine = pEng;
- mpImpl->mpVirtDev = NULL;
+ mpImpl->mpVirtDev = nullptr;
mpImpl->mbPaintSelection = true;
mpImpl->mbAutoScroll = true;
@@ -217,7 +217,7 @@ TextView::TextView( TextEngine* pEng, vcl::Window* pWindow ) :
pWindow->SetLineColor();
- mpImpl->mpDDInfo = NULL;
+ mpImpl->mpDDInfo = nullptr;
if ( pWindow->GetDragGestureRecognizer().is() )
{
@@ -240,7 +240,7 @@ TextView::~TextView()
mpImpl->mpVirtDev.disposeAndClear();
if ( mpImpl->mpWindow->GetCursor() == mpImpl->mpCursor )
- mpImpl->mpWindow->SetCursor( 0 );
+ mpImpl->mpWindow->SetCursor( nullptr );
delete mpImpl->mpCursor;
delete mpImpl->mpDDInfo;
delete mpImpl;
@@ -299,7 +299,7 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartP
{
if (!mpImpl->mbPaintSelection)
{
- pSelection = NULL;
+ pSelection = nullptr;
}
else
{
@@ -330,7 +330,7 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRe
if ( !mpImpl->mpTextEngine->GetUpdateMode() || mpImpl->mpTextEngine->IsInUndo() )
return;
- TextSelection *pDrawSelection = NULL;
+ TextSelection *pDrawSelection = nullptr;
if (!mpImpl->mbHighlightSelection && mpImpl->maSelection.HasRange())
pDrawSelection = &mpImpl->maSelection;
@@ -375,7 +375,7 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRe
Point aDocPos(mpImpl->maStartDocPos.X(), mpImpl->maStartDocPos.Y() + rRect.Top());
Point aStartPos = ImpGetOutputStartPos(aDocPos);
- ImpPaint(*pVDev, aStartPos, &aTmpRect, NULL, pDrawSelection);
+ ImpPaint(*pVDev, aStartPos, &aTmpRect, nullptr, pDrawSelection);
rRenderContext.DrawOutDev(rRect.TopLeft(), rRect.GetSize(), Point(0,0), rRect.GetSize(), *pVDev);
if (mpImpl->mbHighlightSelection)
ImpHighlight(mpImpl->maSelection);
@@ -383,7 +383,7 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRe
else
{
Point aStartPos = ImpGetOutputStartPos(mpImpl->maStartDocPos);
- ImpPaint(rRenderContext, aStartPos, &rRect, NULL, pDrawSelection);
+ ImpPaint(rRenderContext, aStartPos, &rRect, nullptr, pDrawSelection);
if (mpImpl->mbHighlightSelection)
ImpHighlight(mpImpl->maSelection);
}
@@ -930,7 +930,7 @@ void TextView::Command( const CommandEvent& rCEvt )
bool bInsertMode = !mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite;
delete mpImpl->mpTextEngine->mpIMEInfos;
- mpImpl->mpTextEngine->mpIMEInfos = NULL;
+ mpImpl->mpTextEngine->mpIMEInfos = nullptr;
mpImpl->mpTextEngine->FormatAndUpdate( this );
@@ -1128,7 +1128,7 @@ void TextView::Copy( uno::Reference< datatransfer::clipboard::XClipboard >& rxCl
try
{
- rxClipboard->setContents( pDataObj, NULL );
+ rxClipboard->setContents( pDataObj, nullptr );
uno::Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( rxClipboard, uno::UNO_QUERY );
if( xFlushableClipboard.is() )
@@ -2010,7 +2010,7 @@ void TextView::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSourc
{
ImpHideDDCursor();
delete mpImpl->mpDDInfo;
- mpImpl->mpDDInfo = NULL;
+ mpImpl->mpDDInfo = nullptr;
}
void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& rDTDE ) throw (::com::sun::star::uno::RuntimeException, std::exception)
@@ -2111,7 +2111,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
mpImpl->mpTextEngine->UndoActionEnd();
delete mpImpl->mpDDInfo;
- mpImpl->mpDDInfo = 0;
+ mpImpl->mpDDInfo = nullptr;
mpImpl->mpTextEngine->FormatAndUpdate( this );
@@ -2148,7 +2148,7 @@ void TextView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDr
const TextCharAttrib* pStartAttr = mpImpl->mpTextEngine->FindCharAttrib(
mpImpl->mpDDInfo->maDropPos,
TEXTATTR_PROTECTED );
- bProtected = pStartAttr != 0 &&
+ bProtected = pStartAttr != nullptr &&
pStartAttr->GetStart() != mpImpl->mpDDInfo->maDropPos.GetIndex() &&
pStartAttr->GetEnd() != mpImpl->mpDDInfo->maDropPos.GetIndex();
}
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index b8ff14c923f3..a2e075555368 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -147,9 +147,9 @@ public:
};
ImpVclMEdit::ImpVclMEdit( VclMultiLineEdit* pEdt, WinBits nWinStyle )
- :mpHScrollBar(NULL)
- ,mpVScrollBar(NULL)
- ,mpScrollBox(NULL)
+ :mpHScrollBar(nullptr)
+ ,mpVScrollBar(nullptr)
+ ,mpScrollBox(nullptr)
{
pVclMultiLineEdit = pEdt;
mnTextWidth = 0;
@@ -735,9 +735,9 @@ TextWindow::~TextWindow()
void TextWindow::dispose()
{
delete mpExtTextView;
- mpExtTextView = NULL;
+ mpExtTextView = nullptr;
delete mpExtTextEngine;
- mpExtTextEngine = NULL;
+ mpExtTextEngine = nullptr;
Window::dispose();
}
@@ -936,7 +936,7 @@ VclMultiLineEdit::VclMultiLineEdit( vcl::Window* pParent, WinBits nWinStyle )
SetType( WINDOW_MULTILINEEDIT );
pImpVclMEdit = new ImpVclMEdit( this, nWinStyle );
ImplInitSettings( true, true, true );
- pUpdateDataTimer = 0;
+ pUpdateDataTimer = nullptr;
SetCompoundControl( true );
SetStyle( ImplInitStyle( nWinStyle ) );
@@ -951,10 +951,10 @@ void VclMultiLineEdit::dispose()
{
{
std::unique_ptr< ImpVclMEdit > xDelete(pImpVclMEdit);
- pImpVclMEdit = NULL;
+ pImpVclMEdit = nullptr;
}
delete pUpdateDataTimer;
- pUpdateDataTimer = NULL;
+ pUpdateDataTimer = nullptr;
Edit::dispose();
}
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index 6c11e98925cd..5d090f1b3b68 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -37,19 +37,19 @@ using namespace ::com::sun::star::configuration ;
const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] =
{
IMP_BMP, IMP_GIF, IMP_PNG,IMP_JPEG, IMP_XBM, IMP_XPM,
- EXP_BMP, EXP_JPEG, EXP_PNG, IMP_MOV, NULL
+ EXP_BMP, EXP_JPEG, EXP_PNG, IMP_MOV, nullptr
};
const char* FilterConfigCache::FilterConfigCacheEntry::InternalVectorFilterNameList[] =
{
IMP_SVMETAFILE, IMP_WMF, IMP_EMF, IMP_SVSGF, IMP_SVSGV, IMP_SVG,
- EXP_SVMETAFILE, EXP_WMF, EXP_EMF, EXP_SVG, NULL
+ EXP_SVMETAFILE, EXP_WMF, EXP_EMF, EXP_SVG, nullptr
};
const char* FilterConfigCache::FilterConfigCacheEntry::ExternalPixelFilterNameList[] =
{
"egi", "icd", "ipd", "ipx", "ipb", "epb", "epg",
- "epp", "ira", "era", "itg", "iti", "eti", "exp", NULL
+ "epp", "ira", "era", "itg", "iti", "eti", "exp", nullptr
};
bool FilterConfigCache::bInitialized = false;
@@ -268,7 +268,7 @@ const char* FilterConfigCache::InternalFilterListForSvxLight[] =
"xpm","2","exp",
"svg","1","SVISVG",
"svg","2","SVESVG",
- NULL
+ nullptr
};
void FilterConfigCache::ImplInitSmart()
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index a70a0c46313a..428cf72225d6 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -239,7 +239,7 @@ bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XProper
// otherwise the result is null
PropertyValue* FilterConfigItem::GetPropertyValue( Sequence< PropertyValue >& rPropSeq, const OUString& rName )
{
- PropertyValue* pPropValue = NULL;
+ PropertyValue* pPropValue = nullptr;
sal_Int32 i, nCount;
for ( i = 0, nCount = rPropSeq.getLength(); i < nCount; i++ )
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 5f19fa4c86ec..653d5367a165 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star;
using comphelper::string::getTokenCount;
typedef ::std::vector< GraphicFilter* > FilterList_impl;
-static FilterList_impl* pFilterHdlList = NULL;
+static FilterList_impl* pFilterHdlList = nullptr;
static ::osl::Mutex& getListMutex()
{
@@ -172,7 +172,7 @@ sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest, sal_uLo
return pSource;
pSource++;
}
- return NULL;
+ return nullptr;
}
inline OUString ImpGetExtension( const OUString &rPath )
@@ -946,13 +946,13 @@ struct ImpFilterLibCacheEntry
};
ImpFilterLibCacheEntry::ImpFilterLibCacheEntry( const OUString& rPathname, const OUString& rFiltername, const OUString& rFormatName ) :
- mpNext ( NULL ),
+ mpNext ( nullptr ),
#ifndef DISABLE_DYNLOADING
maLibrary ( rPathname ),
#endif
maFiltername ( rFiltername ),
maFormatName ( rFormatName ),
- mpfnImport ( NULL )
+ mpfnImport ( nullptr )
{
#ifdef DISABLE_DYNLOADING
(void) rPathname;
@@ -1044,8 +1044,8 @@ public:
};
ImpFilterLibCache::ImpFilterLibCache() :
- mpFirst ( NULL ),
- mpLast ( NULL )
+ mpFirst ( nullptr ),
+ mpLast ( nullptr )
{
}
@@ -1088,7 +1088,7 @@ ImpFilterLibCacheEntry* ImpFilterLibCache::GetFilter(const OUString& rFilterPath
else
{
delete pEntry;
- pEntry = NULL;
+ pEntry = nullptr;
}
#endif
}
@@ -1098,7 +1098,7 @@ ImpFilterLibCacheEntry* ImpFilterLibCache::GetFilter(const OUString& rFilterPath
namespace { struct Cache : public rtl::Static<ImpFilterLibCache, Cache> {}; }
GraphicFilter::GraphicFilter( bool bConfig )
- : pErrorEx(NULL)
+ : pErrorEx(nullptr)
, bUseConfig(bConfig)
, nExpGraphHint(0)
{
@@ -1122,7 +1122,7 @@ GraphicFilter::~GraphicFilter()
}
if( pFilterHdlList->empty() )
{
- delete pFilterHdlList, pFilterHdlList = NULL;
+ delete pFilterHdlList, pFilterHdlList = nullptr;
delete pConfig;
}
}
@@ -1289,7 +1289,7 @@ sal_uInt16 GraphicFilter::CanImportGraphic( const OUString& rMainUrl, SvStream&
rIStream.Seek(nStreamPos);
- if( nRes==GRFILTER_OK && pDeterminedFormat!=NULL )
+ if( nRes==GRFILTER_OK && pDeterminedFormat!=nullptr )
*pDeterminedFormat = nFormat;
return (sal_uInt16) ImplSetError( nRes, &rIStream );
@@ -1314,7 +1314,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject&
sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, SvStream& rIStream,
sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat, GraphicFilterImportFlags nImportFlags, WMF_EXTERNALHEADER *pExtHeader )
{
- return ImportGraphic( rGraphic, rPath, rIStream, nFormat, pDeterminedFormat, nImportFlags, NULL, pExtHeader );
+ return ImportGraphic( rGraphic, rPath, rIStream, nFormat, pDeterminedFormat, nImportFlags, nullptr, pExtHeader );
}
sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, SvStream& rIStream,
@@ -1330,13 +1330,13 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
GfxLinkType eLinkType = GFX_LINK_TYPE_NONE;
bool bDummyContext = ( pContext == reinterpret_cast<GraphicReader*>(1) );
const bool bLinkSet = rGraphic.IsLink();
- FilterConfigItem* pFilterConfigItem = NULL;
+ FilterConfigItem* pFilterConfigItem = nullptr;
Size aPreviewSizeHint( 0, 0 );
bool bAllowPartialStreamRead = false;
bool bCreateNativeLink = true;
- sal_uInt8* pGraphicContent = NULL;
+ sal_uInt8* pGraphicContent = nullptr;
bool bGraphicContentOwned = true;
sal_Int32 nGraphicContentSize = 0;
@@ -1378,7 +1378,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
{
if( bDummyContext )
{
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
nStreamBegin = 0;
}
else
@@ -1421,7 +1421,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
if( aFilterName.equalsIgnoreAsciiCase( IMP_GIF ) )
{
if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
if( !ImportGIF( rIStream, rGraphic ) )
nStatus = GRFILTER_FILTERERROR;
@@ -1431,7 +1431,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
else if( aFilterName.equalsIgnoreAsciiCase( IMP_PNG ) )
{
if ( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
vcl::PNGReader aPNGReader( rIStream );
@@ -1489,14 +1489,14 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
else if( aFilterName.equalsIgnoreAsciiCase( IMP_JPEG ) )
{
if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
// set LOGSIZE flag always, if not explicitly disabled
// (see #90508 and #106763)
if( !( nImportFlags & GraphicFilterImportFlags::DontSetLogsizeForJpeg ) )
nImportFlags |= GraphicFilterImportFlags::SetLogsizeForJpeg;
- if( !ImportJPEG( rIStream, rGraphic, NULL, nImportFlags ) )
+ if( !ImportJPEG( rIStream, rGraphic, nullptr, nImportFlags ) )
nStatus = GRFILTER_FILTERERROR;
else
eLinkType = GFX_LINK_TYPE_NATIVE_JPG;
@@ -1504,7 +1504,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
else if( aFilterName.equalsIgnoreAsciiCase( IMP_SVG ) )
{
if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
const sal_uInt32 nStreamPosition(rIStream.Tell());
const sal_uInt32 nStreamLength(rIStream.Seek(STREAM_SEEK_TO_END) - nStreamPosition);
@@ -1574,7 +1574,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
else if( aFilterName.equalsIgnoreAsciiCase( IMP_XBM ) )
{
if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
if( !ImportXBM( rIStream, rGraphic ) )
nStatus = GRFILTER_FILTERERROR;
@@ -1582,7 +1582,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
else if( aFilterName.equalsIgnoreAsciiCase( IMP_XPM ) )
{
if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
if( !ImportXPM( rIStream, rGraphic ) )
nStatus = GRFILTER_FILTERERROR;
@@ -1618,7 +1618,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
aFilterName.equalsIgnoreAsciiCase( IMP_EMF ) )
{
GDIMetaFile aMtf;
- if( !ConvertWMFToGDIMetaFile( rIStream, aMtf, NULL, pExtHeader ) )
+ if( !ConvertWMFToGDIMetaFile( rIStream, aMtf, nullptr, pExtHeader ) )
nStatus = GRFILTER_FORMATERROR;
else
{
@@ -1693,12 +1693,12 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
}
else
{
- ImpFilterLibCacheEntry* pFilter = NULL;
+ ImpFilterLibCacheEntry* pFilter = nullptr;
// find first filter in filter paths
sal_Int32 i, nTokenCount = getTokenCount(aFilterPath, ';');
ImpFilterLibCache &rCache = Cache::get();
- for( i = 0; ( i < nTokenCount ) && ( pFilter == NULL ); i++ )
+ for( i = 0; ( i < nTokenCount ) && ( pFilter == nullptr ); i++ )
pFilter = rCache.GetFilter(aFilterPath.getToken(i, ';'), aFilterName, aExternalFilterName);
if( !pFilter )
nStatus = GRFILTER_FILTERERROR;
@@ -1714,7 +1714,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
if( nFormat != GRFILTER_FORMAT_DONTKNOW )
{
aShortName = GetImportFormatShortName( nFormat ).toAsciiUpperCase();
- if ( ( pFilterConfigItem == NULL ) && aShortName == "PCD" )
+ if ( ( pFilterConfigItem == nullptr ) && aShortName == "PCD" )
{
OUString aFilterConfigPath( "Office.Common/Filter/Graphic/Import/PCD" );
pFilterConfigItem = new FilterConfigItem( aFilterConfigPath );
@@ -1741,7 +1741,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
if( nStatus == GRFILTER_OK && bCreateNativeLink && ( eLinkType != GFX_LINK_TYPE_NONE ) && !rGraphic.GetContext() && !bLinkSet )
{
- if (pGraphicContent == NULL)
+ if (pGraphicContent == nullptr)
{
const sal_uLong nStreamEnd = rIStream.Tell();
nGraphicContentSize = nStreamEnd - nStreamBegin;
@@ -2118,7 +2118,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString
OUString aPhysicalName( ImpCreateFullFilterPath( aFilterPath.getToken(i, ';'), aFilterName ) );
osl::Module aLibrary( aPhysicalName );
- PFilterCall pFunc = NULL;
+ PFilterCall pFunc = nullptr;
OUString tmpFilterName = aExternalFilterName;
if (tmpFilterName == "egi")
pFunc = reinterpret_cast<PFilterCall>(aLibrary.getFunctionSymbol("egiGraphicExport"));
@@ -2276,7 +2276,7 @@ int GraphicFilter::LoadGraphic( const OUString &rPath, const OUString &rFilterNa
aURL.SetSmartURL( rPath );
}
- SvStream* pStream = NULL;
+ SvStream* pStream = nullptr;
if ( INetProtocol::File != aURL.GetProtocol() )
{
pStream = ::utl::UcbStreamHelper::CreateStream( rPath, StreamMode::READ );
diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx
index 1e52932920fe..822452bd450e 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -1100,7 +1100,7 @@ bool GraphicDescriptor::ImpDetectSVG( SvStream& /*rStm*/, bool /*bExtendedInfo*/
OUString GraphicDescriptor::GetImportFormatShortName( GraphicFileFormat nFormat )
{
- const char *pKeyName = 0;
+ const char *pKeyName = nullptr;
switch( nFormat )
{
diff --git a/vcl/source/filter/igif/decode.cxx b/vcl/source/filter/igif/decode.cxx
index 00d7e7575678..b0454d2cb270 100644
--- a/vcl/source/filter/igif/decode.cxx
+++ b/vcl/source/filter/igif/decode.cxx
@@ -27,7 +27,7 @@ struct GIFLZWTableEntry
};
GIFLZWDecompressor::GIFLZWDecompressor(sal_uInt8 cDataSize)
- : pBlockBuf(NULL)
+ : pBlockBuf(nullptr)
, nInputBitsBuf(0)
, nOutBufDataLen(0)
, nInputBitsBufSize(0)
@@ -49,7 +49,7 @@ GIFLZWDecompressor::GIFLZWDecompressor(sal_uInt8 cDataSize)
for (sal_uInt16 i = 0; i < nTableSize; ++i)
{
- pTable[i].pPrev = NULL;
+ pTable[i].pPrev = nullptr;
pTable[i].pFirst = pTable + i;
pTable[i].nData = (sal_uInt8) i;
}
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index be41ccebf5b6..cb0e0ee79201 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -29,9 +29,9 @@ GIFReader::GIFReader( SvStream& rStm )
: aGPalette ( 256 )
, aLPalette ( 256 )
, rIStm ( rStm )
- , pDecomp ( NULL )
- , pAcc8 ( NULL )
- , pAcc1 ( NULL )
+ , pDecomp ( nullptr )
+ , pAcc8 ( nullptr )
+ , pAcc1 ( nullptr )
, nYAcc ( 0 )
, nLastPos ( rStm.Tell() )
, nLogWidth100 ( 0UL )
@@ -66,7 +66,7 @@ GIFReader::GIFReader( SvStream& rStm )
GIFReader::~GIFReader()
{
- aImGraphic.SetContext( NULL );
+ aImGraphic.SetContext( nullptr );
if( pAcc1 )
Bitmap::ReleaseAccess( pAcc1 );
@@ -133,7 +133,7 @@ bool GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal,
aBmp8.Erase( Color( COL_WHITE ) );
pAcc8 = aBmp8.AcquireWriteAccess();
- bStatus = ( pAcc8 != NULL );
+ bStatus = ( pAcc8 != nullptr );
}
return bStatus;
@@ -459,7 +459,7 @@ void GIFReader::FillImages( sal_uInt8* pBytes, sal_uLong nCount )
{
sal_uInt8* pScanline8 = pAcc8->GetScanline( nYAcc );
sal_uLong nSize8 = pAcc8->GetScanlineSize();
- sal_uInt8* pScanline1 = 0;
+ sal_uInt8* pScanline1 = nullptr;
sal_uLong nSize1 = 0;
if( bGCTransparent )
@@ -545,12 +545,12 @@ void GIFReader::CreateNewBitmaps()
AnimationBitmap aAnimBmp;
Bitmap::ReleaseAccess( pAcc8 );
- pAcc8 = NULL;
+ pAcc8 = nullptr;
if( bGCTransparent )
{
Bitmap::ReleaseAccess( pAcc1 );
- pAcc1 = NULL;
+ pAcc1 = nullptr;
aAnimBmp.aBmpEx = BitmapEx( aBmp8, aBmp1 );
}
else
@@ -593,13 +593,13 @@ const Graphic& GIFReader::GetIntermediateGraphic()
aImGraphic = BitmapEx( aBmp8, aBmp1 );
pAcc1 = aBmp1.AcquireWriteAccess();
- bStatus = bStatus && ( pAcc1 != NULL );
+ bStatus = bStatus && ( pAcc1 != nullptr );
}
else
aImGraphic = aBmp8;
pAcc8 = aBmp8.AcquireWriteAccess();
- bStatus = bStatus && ( pAcc8 != NULL );
+ bStatus = bStatus && ( pAcc8 != nullptr );
}
return aImGraphic;
@@ -814,7 +814,7 @@ VCL_DLLPUBLIC bool ImportGIF( SvStream & rStm, Graphic& rGraphic )
if( !pGIFReader )
pGIFReader = new GIFReader( rStm );
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
eReadState = pGIFReader->ReadGIF( rGraphic );
if( eReadState == GIFREAD_ERROR )
diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx
index 0ab94ba02da2..b12aea3b973c 100644
--- a/vcl/source/filter/ixbm/xbmread.cxx
+++ b/vcl/source/filter/ixbm/xbmread.cxx
@@ -24,7 +24,7 @@
XBMReader::XBMReader( SvStream& rStm ) :
rIStm ( rStm ),
- pAcc1 ( NULL ),
+ pAcc1 ( nullptr ),
nLastPos ( rStm.Tell() ),
nWidth ( 0 ),
nHeight ( 0 ),
@@ -319,7 +319,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
{
Bitmap aBlackBmp( Size( pAcc1->Width(), pAcc1->Height() ), 1 );
- Bitmap::ReleaseAccess( pAcc1 ), pAcc1 = NULL;
+ Bitmap::ReleaseAccess( pAcc1 ), pAcc1 = nullptr;
aBlackBmp.Erase( Color( COL_BLACK ) );
rGraphic = BitmapEx( aBlackBmp, aBmp1 );
eReadState = XBMREAD_OK;
@@ -345,7 +345,7 @@ VCL_DLLPUBLIC bool ImportXBM( SvStream& rStm, Graphic& rGraphic )
if( !pXBMReader )
pXBMReader = new XBMReader( rStm );
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
eReadState = pXBMReader->ReadXBM( rGraphic );
if( eReadState == XBMREAD_ERROR )
diff --git a/vcl/source/filter/ixbm/xbmread.hxx b/vcl/source/filter/ixbm/xbmread.hxx
index 94ada437b1a8..3794a374ca4b 100644
--- a/vcl/source/filter/ixbm/xbmread.hxx
+++ b/vcl/source/filter/ixbm/xbmread.hxx
@@ -53,7 +53,7 @@ class XBMReader : public GraphicReader
void InitTable();
OString FindTokenLine( SvStream* pInStm, const char* pTok1,
- const char* pTok2 = NULL, const char* pTok3 = NULL );
+ const char* pTok2 = nullptr, const char* pTok3 = nullptr );
long ParseDefine( const sal_Char* pDefine );
bool ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat );
diff --git a/vcl/source/filter/ixpm/rgbtable.hxx b/vcl/source/filter/ixpm/rgbtable.hxx
index 73786a488c29..7dcc340938d8 100644
--- a/vcl/source/filter/ixpm/rgbtable.hxx
+++ b/vcl/source/filter/ixpm/rgbtable.hxx
@@ -686,7 +686,7 @@ static const XPMRGBTab pRGBTable[] = {
{ "DarkMagenta", 139, 0, 139 },
{ "DarkRed", 139, 0, 0 },
{ "LightGreen", 144, 238, 144 },
-{ NULL, 0 , 0, 0}
+{ nullptr, 0 , 0, 0}
};
#endif // INCLUDED_VCL_SOURCE_FILTER_IXPM_RGBTABLE_HXX
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index 40ac67565240..cfc7956f33cd 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -26,8 +26,8 @@
XPMReader::XPMReader(SvStream& rStm)
: mrIStm(rStm)
- , mpAcc(NULL)
- , mpMaskAcc(NULL)
+ , mpAcc(nullptr)
+ , mpMaskAcc(nullptr)
, mnLastPos(rStm.Tell())
, mnWidth(0)
, mnHeight(0)
@@ -40,14 +40,14 @@ XPMReader::XPMReader(SvStream& rStm)
, mcThisByte(0)
, mcLastByte(0)
, mnTempAvail(0)
- , mpTempBuf(NULL)
- , mpTempPtr(NULL)
- , mpFastColorTable(NULL)
- , mpColMap(NULL)
+ , mpTempBuf(nullptr)
+ , mpTempPtr(nullptr)
+ , mpFastColorTable(nullptr)
+ , mpColMap(nullptr)
, mnStringSize(0)
- , mpStringBuf(NULL)
+ , mpStringBuf(nullptr)
, mnParaSize(0)
- , mpPara(NULL)
+ , mpPara(nullptr)
{
}
@@ -128,7 +128,7 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
if ( mbTransparent )
{
maMaskBmp = Bitmap( Size( mnWidth, mnHeight ), 1 );
- if ( ( mpMaskAcc = maMaskBmp.AcquireWriteAccess() ) == NULL )
+ if ( ( mpMaskAcc = maMaskBmp.AcquireWriteAccess() ) == nullptr )
mbStatus = false;
}
if( mpAcc && mbStatus )
@@ -181,21 +181,21 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
{
if ( mpMaskAcc )
{
- Bitmap::ReleaseAccess ( mpMaskAcc), mpMaskAcc = NULL;
- Bitmap::ReleaseAccess( mpAcc ), mpAcc = NULL;
+ Bitmap::ReleaseAccess ( mpMaskAcc), mpMaskAcc = nullptr;
+ Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr;
rGraphic = Graphic( BitmapEx( maBmp, maMaskBmp ) );
}
else
{
- Bitmap::ReleaseAccess( mpAcc ), mpAcc = NULL;
+ Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr;
rGraphic = maBmp;
}
eReadState = XPMREAD_OK;
}
else
{
- if ( mpMaskAcc ) Bitmap::ReleaseAccess ( mpMaskAcc), mpMaskAcc = NULL;
- if ( mpAcc ) Bitmap::ReleaseAccess( mpAcc ), mpAcc = NULL;
+ if ( mpMaskAcc ) Bitmap::ReleaseAccess ( mpMaskAcc), mpMaskAcc = nullptr;
+ if ( mpAcc ) Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr;
eReadState = XPMREAD_ERROR;
}
}
@@ -336,7 +336,7 @@ bool XPMReader::ImplGetColSub( sal_uInt8* pDest )
sal_uLong i = 0;
while ( true )
{
- if ( pRGBTable[ i ].name == NULL )
+ if ( pRGBTable[ i ].name == nullptr )
break;
if ( std::strlen(pRGBTable[i].name) > mnParaSize &&
pRGBTable[ i ].name[ mnParaSize ] == 0 )
@@ -500,7 +500,7 @@ bool XPMReader::ImplGetPara ( sal_uLong nNumb )
}
else
{
- mpPara = NULL;
+ mpPara = nullptr;
nCount = 0xffffffff;
}
@@ -515,7 +515,7 @@ bool XPMReader::ImplGetPara ( sal_uLong nNumb )
if ( nCount == nNumb )
break;
else
- mpPara = NULL;
+ mpPara = nullptr;
}
else
mnParaSize++;
@@ -644,7 +644,7 @@ VCL_DLLPUBLIC bool ImportXPM( SvStream& rStm, Graphic& rGraphic )
if( !pXPMReader )
pXPMReader = new XPMReader( rStm );
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
eReadState = pXPMReader->ReadXPM( rGraphic );
if( eReadState == XPMREAD_ERROR )
diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx
index 14f3ca4319bf..b1a4034532ea 100644
--- a/vcl/source/filter/jpeg/Exif.cxx
+++ b/vcl/source/filter/jpeg/Exif.cxx
@@ -152,7 +152,7 @@ bool Exif::processJpeg(SvStream& rStream, bool bSetValue)
bool Exif::processIFD(sal_uInt8* pExifData, sal_uInt16 aLength, sal_uInt16 aOffset, sal_uInt16 aNumberOfTags, bool bSetValue, bool bSwap)
{
- ExifIFD* ifd = NULL;
+ ExifIFD* ifd = nullptr;
while (aOffset <= aLength - 12 && aNumberOfTags > 0)
{
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index 66c94576c30d..5f42009d6ca9 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -156,7 +156,7 @@ void jpeg_svstream_src (j_decompress_ptr cinfo, void* input)
* manager serially with the same JPEG object. Caveat programmer.
*/
- if (cinfo->src == NULL)
+ if (cinfo->src == nullptr)
{ /* first time for this JPEG object? */
cinfo->src = static_cast<jpeg_source_mgr *>(
(*cinfo->mem->alloc_small) (reinterpret_cast<j_common_ptr>(cinfo), JPOOL_PERMANENT, sizeof(SourceManagerStruct)));
@@ -173,14 +173,14 @@ void jpeg_svstream_src (j_decompress_ptr cinfo, void* input)
source->pub.term_source = term_source;
source->stream = stream;
source->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */
- source->pub.next_input_byte = NULL; /* until buffer loaded */
+ source->pub.next_input_byte = nullptr; /* until buffer loaded */
}
JPEGReader::JPEGReader( SvStream& rStream, void* /*pCallData*/, bool bSetLogSize ) :
mrStream ( rStream ),
- mpAcc ( NULL ),
- mpAcc1 ( NULL ),
- mpBuffer ( NULL ),
+ mpAcc ( nullptr ),
+ mpAcc1 ( nullptr ),
+ mpBuffer ( nullptr ),
mnLastPos ( rStream.Tell() ),
mnLastLines ( 0 ),
mbSetLogSize ( bSetLogSize )
@@ -203,34 +203,34 @@ JPEGReader::~JPEGReader()
unsigned char * JPEGReader::CreateBitmap(JPEGCreateBitmapParam& rParam)
{
if (rParam.nWidth > SAL_MAX_INT32 / 8 || rParam.nHeight > SAL_MAX_INT32 / 8)
- return NULL; // avoid overflows later
+ return nullptr; // avoid overflows later
if (rParam.nWidth == 0 || rParam.nHeight == 0)
- return NULL;
+ return nullptr;
Size aSize(rParam.nWidth, rParam.nHeight );
bool bGray = rParam.bGray != 0;
- unsigned char * pBmpBuf = NULL;
+ unsigned char * pBmpBuf = nullptr;
if( mpAcc )
{
Bitmap::ReleaseAccess( mpAcc );
maBmp = Bitmap();
- mpAcc = NULL;
+ mpAcc = nullptr;
}
sal_uInt64 nSize = aSize.Width();
nSize *= aSize.Height();
if (nSize > SAL_MAX_INT32 / (bGray?1:3))
- return NULL;
+ return nullptr;
// Check if the bitmap is untypically large.
if (nSize*(bGray?1:3) > MAX_BITMAP_BYTE_SIZE)
{
// Do not try to acquire resources for the large bitmap or to
// read the bitmap into memory.
- return NULL;
+ return nullptr;
}
if( bGray )
@@ -295,7 +295,7 @@ unsigned char * JPEGReader::CreateBitmap(JPEGCreateBitmapParam& rParam)
{
Bitmap::ReleaseAccess( mpAcc );
maBmp = Bitmap();
- mpAcc = NULL;
+ mpAcc = nullptr;
}
return pBmpBuf;
@@ -460,11 +460,11 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
{
FillBitmap();
delete[] mpBuffer;
- mpBuffer = NULL;
+ mpBuffer = nullptr;
}
Bitmap::ReleaseAccess( mpAcc );
- mpAcc = NULL;
+ mpAcc = nullptr;
if( mrStream.GetError() == ERRCODE_IO_PENDING )
{
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx
index 1c6594b61e54..cb1a67f90712 100644
--- a/vcl/source/filter/jpeg/JpegWriter.cxx
+++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -90,7 +90,7 @@ void jpeg_svstream_dest (j_compress_ptr cinfo, void* output)
* manager serially with the same JPEG object, because their private object
* sizes may be different. Caveat programmer.
*/
- if (cinfo->dest == NULL)
+ if (cinfo->dest == nullptr)
{ /* first time for this JPEG object? */
cinfo->dest = static_cast<jpeg_destination_mgr*>(
(*cinfo->mem->alloc_small) (reinterpret_cast<j_common_ptr>(cinfo), JPOOL_PERMANENT, sizeof(DestinationManagerStruct)));
@@ -105,8 +105,8 @@ void jpeg_svstream_dest (j_compress_ptr cinfo, void* output)
JPEGWriter::JPEGWriter( SvStream& rStream, const css::uno::Sequence< css::beans::PropertyValue >* pFilterData, bool* pExportWasGrey ) :
mrStream ( rStream ),
- mpReadAccess ( NULL ),
- mpBuffer ( NULL ),
+ mpReadAccess ( nullptr ),
+ mpBuffer ( nullptr ),
mbNative ( false ),
mpExpWasGrey ( pExportWasGrey )
{
@@ -132,7 +132,7 @@ JPEGWriter::JPEGWriter( SvStream& rStream, const css::uno::Sequence< css::beans:
void* JPEGWriter::GetScanline( long nY )
{
- void* pScanline = NULL;
+ void* pScanline = nullptr;
if( mpReadAccess )
{
@@ -233,10 +233,10 @@ bool JPEGWriter::Write( const Graphic& rGraphic )
bRet = WriteJPEG( this, &mrStream, mpReadAccess->Width(), mpReadAccess->Height(), mbGreys, mnQuality, maChromaSubsampling, mxStatusIndicator );
delete[] mpBuffer;
- mpBuffer = NULL;
+ mpBuffer = nullptr;
Bitmap::ReleaseAccess( mpReadAccess );
- mpReadAccess = NULL;
+ mpReadAccess = nullptr;
}
if ( mxStatusIndicator.is() )
mxStatusIndicator->end();
diff --git a/vcl/source/filter/jpeg/JpegWriter.hxx b/vcl/source/filter/jpeg/JpegWriter.hxx
index 8c4b13bbf197..a9f765a7c67e 100644
--- a/vcl/source/filter/jpeg/JpegWriter.hxx
+++ b/vcl/source/filter/jpeg/JpegWriter.hxx
@@ -44,7 +44,7 @@ class JPEGWriter
public:
JPEGWriter( SvStream& rStream,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData,
- bool* pExportWasGrey = NULL );
+ bool* pExportWasGrey = nullptr );
virtual ~JPEGWriter() {};
diff --git a/vcl/source/filter/jpeg/jpeg.cxx b/vcl/source/filter/jpeg/jpeg.cxx
index 467c1b89b6bb..e403dce69cfe 100644
--- a/vcl/source/filter/jpeg/jpeg.cxx
+++ b/vcl/source/filter/jpeg/jpeg.cxx
@@ -46,7 +46,7 @@ VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, void*
pJPEGReader->DisablePreviewMode();
}
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
eReadState = pJPEGReader->Read( rGraphic );
if( eReadState == JPEGREAD_ERROR )
diff --git a/vcl/source/filter/jpeg/jpeg.hxx b/vcl/source/filter/jpeg/jpeg.hxx
index 9076a4f85386..e53eab2be6b9 100644
--- a/vcl/source/filter/jpeg/jpeg.hxx
+++ b/vcl/source/filter/jpeg/jpeg.hxx
@@ -32,7 +32,7 @@ VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, void*
bool ExportJPEG(SvStream& rOutputStream,
const Graphic& rGraphic,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData,
- bool* pExportWasGrey = NULL);
+ bool* pExportWasGrey = nullptr);
#endif // INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEG_HXX
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index c8f27b987aea..d42ae785b623 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -325,8 +325,8 @@ long Transform(void* pInputStream, void* pOutputStream, long nAngle)
ErrorManagerStruct aSourceError;
ErrorManagerStruct aDestinationError;
- jvirt_barray_ptr* aSourceCoefArrays = 0;
- jvirt_barray_ptr* aDestinationCoefArrays = 0;
+ jvirt_barray_ptr* aSourceCoefArrays = nullptr;
+ jvirt_barray_ptr* aDestinationCoefArrays = nullptr;
aTransformOption.force_grayscale = FALSE;
aTransformOption.trim = FALSE;
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index e666b3f0f570..18e2d2ce16bc 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -92,7 +92,7 @@
// - no rotated ellipses
// for font translation
-SgfFontLst* pSgfFonts = 0;
+SgfFontLst* pSgfFonts = nullptr;
// for circle kinds, text and rotated rectangles
void RotatePoint(PointType& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs)
@@ -250,7 +250,7 @@ SvStream& ReadTextType(SvStream& rInp, TextType& rText)
SWAPPOINT(rText.FitSize);
rText.FitBreit = OSL_SWAPWORD(rText.FitBreit);
#endif
- rText.Buffer=NULL;
+ rText.Buffer=nullptr;
return rInp;
}
SvStream& ReadBmapType(SvStream& rInp, BmapType& rBmap)
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index 545def3963e3..976683b5dd42 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -466,7 +466,7 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u
pSgfFont = pSgfFonts->GetFontDesc(Atr.GetFont());
- if ( pSgfFont!=NULL )
+ if ( pSgfFont!=nullptr )
{
FNam =pSgfFont->SVFName;
StdBrei=pSgfFont->SVWidth;
@@ -995,7 +995,7 @@ void ObjTextType::SetFont(sal_uInt32 FontID)
// SGF.Ini lesen
SgfFontOne::SgfFontOne()
{
- Next=NULL;
+ Next=nullptr;
IFID=0;
Bold=false;
Ital=false;
@@ -1058,10 +1058,10 @@ void SgfFontOne::ReadOne( const OString& rID, OString& Dsc )
SgfFontLst::SgfFontLst()
{
- pList=NULL;
- Last=NULL;
+ pList=nullptr;
+ Last=nullptr;
LastID=0;
- LastLn=NULL;
+ LastLn=nullptr;
Tried=false;
}
@@ -1075,16 +1075,16 @@ void SgfFontLst::RausList()
SgfFontOne* P;
SgfFontOne* P1;
P=pList;
- while (P!=NULL) {
+ while (P!=nullptr) {
P1=P->Next;
delete P;
P=P1;
}
- pList=NULL;
- Last=NULL;
+ pList=nullptr;
+ Last=nullptr;
Tried=false;
LastID=0;
- LastLn=NULL;
+ LastLn=nullptr;
}
void SgfFontLst::AssignFN(const OUString& rFName)
@@ -1096,7 +1096,7 @@ void SgfFontLst::ReadList()
{
Tried=true;
LastID=0;
- LastLn=NULL;
+ LastLn=nullptr;
SgfFontOne* P,P1;
Config aCfg(FNam);
aCfg.SetGroup("SGV Fonts fuer StarView");
@@ -1112,7 +1112,7 @@ void SgfFontLst::ReadList()
if (comphelper::string::isdigitAsciiString(FID))
{
P=new SgfFontOne; // new entry
- if (Last!=NULL) Last->Next=P; else pList=P; Last=P; // link it
+ if (Last!=nullptr) Last->Next=P; else pList=P; Last=P; // link it
P->ReadOne(FID,Dsc); // interpret line
}
}
@@ -1124,7 +1124,7 @@ SgfFontOne* SgfFontLst::GetFontDesc(sal_uInt32 ID)
if (ID!=LastID) {
SgfFontOne* P;
P=pList;
- while (P!=NULL && P->IFID!=ID) P=P->Next;
+ while (P!=nullptr && P->IFID!=ID) P=P->Next;
LastID=ID;
LastLn=P;
}
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 2d022b27f3b3..15375dd10394 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -1370,7 +1370,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const OUString aText = pA->GetText().copy( pA->GetIndex(), std::min(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
ImplCheckTextAttr();
- ImplWriteTextRecord( pA->GetPoint(), aText, NULL, 0 );
+ ImplWriteTextRecord( pA->GetPoint(), aText, nullptr, 0 );
}
break;
@@ -1380,7 +1380,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const OUString aText( pA->GetText() );
ImplCheckTextAttr();
- ImplWriteTextRecord( pA->GetRect().TopLeft(), aText, NULL, 0 );
+ ImplWriteTextRecord( pA->GetRect().TopLeft(), aText, nullptr, 0 );
}
break;
@@ -1400,7 +1400,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const OUString aText = pA->GetText().copy( pA->GetIndex(), std::min(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
ImplCheckTextAttr();
- ImplWriteTextRecord( pA->GetPoint(), aText, NULL, pA->GetWidth() );
+ ImplWriteTextRecord( pA->GetPoint(), aText, nullptr, pA->GetWidth() );
}
break;
diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx
index 35506c209b36..a7aa6fb3aab5 100644
--- a/vcl/source/filter/wmf/emfwr.hxx
+++ b/vcl/source/filter/wmf/emfwr.hxx
@@ -92,7 +92,7 @@ public:
explicit EMFWriter(SvStream &rStream)
: maVDev( VclPtr<VirtualDevice>::Create() )
, m_rStm(rStream)
- , mpHandlesUsed(NULL)
+ , mpHandlesUsed(nullptr)
, mnHandleCount(0)
, mnRecordCount(0)
, mnRecordPos(0)
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 47679f6dc39a..eabb1fd72dd9 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -623,7 +623,7 @@ bool EnhWMFReader::ReadEnhWMF()
bool bStatus = ReadHeader();
bool bHaveDC = false;
- static bool bEnableEMFPlus = ( getenv( "EMF_PLUS_DISABLE" ) == NULL );
+ static bool bEnableEMFPlus = ( getenv( "EMF_PLUS_DISABLE" ) == nullptr );
while( bStatus && nRecordCount-- && pWMF->good())
{
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index a34beda5366d..c19642ad9fb5 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -532,7 +532,7 @@ tools::PolyPolygon& WinMtfOutput::ImplMap( tools::PolyPolygon& rPolyPolygon )
void WinMtfOutput::SelectObject( sal_Int32 nIndex )
{
- GDIObj* pGDIObj = NULL;
+ GDIObj* pGDIObj = nullptr;
if ( nIndex & ENHMETA_STOCK_OBJECT )
pGDIObj = new GDIObj();
@@ -544,7 +544,7 @@ void WinMtfOutput::SelectObject( sal_Int32 nIndex )
pGDIObj = vGDIObj[ nIndex ];
}
- if( pGDIObj == NULL )
+ if( pGDIObj == nullptr )
return;
if ( nIndex & ENHMETA_STOCK_OBJECT )
@@ -649,7 +649,7 @@ void WinMtfOutput::SetTextAlign( sal_uInt32 nAlign )
void WinMtfOutput::ImplResizeObjectArry( sal_uInt32 nNewEntrys )
{
- vGDIObj.resize(nNewEntrys, NULL);
+ vGDIObj.resize(nNewEntrys, nullptr);
}
void WinMtfOutput::ImplDrawClippedPolyPolygon( const tools::PolyPolygon& rPolyPoly )
@@ -703,7 +703,7 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle )
sal_uInt32 nIndex;
for ( nIndex = 0; nIndex < vGDIObj.size(); nIndex++ )
{
- if ( vGDIObj[ nIndex ] == NULL )
+ if ( vGDIObj[ nIndex ] == nullptr )
break;
}
if ( nIndex == vGDIObj.size() )
@@ -737,7 +737,7 @@ void WinMtfOutput::CreateObject( sal_Int32 nIndex, GDIObjectType eType, void* pS
if ( (sal_uInt32)nIndex >= vGDIObj.size() )
ImplResizeObjectArry( nIndex + 16 );
- if ( vGDIObj[ nIndex ] != NULL )
+ if ( vGDIObj[ nIndex ] != nullptr )
delete vGDIObj[ nIndex ];
vGDIObj[ nIndex ] = new GDIObj( eType, pStyle );
@@ -770,7 +770,7 @@ void WinMtfOutput::DeleteObject( sal_Int32 nIndex )
if ( (sal_uInt32)nIndex < vGDIObj.size() )
{
delete vGDIObj[ nIndex ];
- vGDIObj[ nIndex ] = NULL;
+ vGDIObj[ nIndex ] = nullptr;
}
}
}
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index 095dfbe1d28d..ab7b1aefbddc 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -490,7 +490,7 @@ struct GDIObj
GDIObjectType eType;
GDIObj()
- : pStyle (NULL)
+ : pStyle (nullptr)
, eType (GDI_DUMMY)
{}
@@ -508,7 +508,7 @@ struct GDIObj
void Delete()
{
- if (pStyle == NULL)
+ if (pStyle == nullptr)
return;
switch (eType)
@@ -527,7 +527,7 @@ struct GDIObj
OSL_FAIL( "unsupported style deleted" );
break;
}
- pStyle = NULL;
+ pStyle = nullptr;
}
~GDIObj()
@@ -643,8 +643,8 @@ public:
void SetBkColor( const Color& rColor );
void SetTextColor( const Color& rColor );
void SetTextAlign( sal_uInt32 nAlign );
- void CreateObject( GDIObjectType, void* pStyle = NULL );
- void CreateObject( sal_Int32 nIndex, GDIObjectType, void* pStyle = NULL );
+ void CreateObject( GDIObjectType, void* pStyle = nullptr );
+ void CreateObject( sal_Int32 nIndex, GDIObjectType, void* pStyle = nullptr );
void DeleteObject( sal_Int32 nIndex );
void SelectObject( sal_Int32 nIndex );
rtl_TextEncoding GetCharSet(){ return maFont.GetCharSet(); };
@@ -695,7 +695,7 @@ public:
);
void DrawText( Point& rPosition,
OUString& rString,
- long* pDXArry = NULL,
+ long* pDXArry = nullptr,
bool bRecordPath = false,
sal_Int32 nGraphicsMode = GM_COMPATIBLE);
@@ -742,7 +742,7 @@ protected:
WinMtf(
WinMtfOutput* pOut,
SvStream& rStreamWMF,
- FilterConfigItem* pConfigItem = NULL
+ FilterConfigItem* pConfigItem = nullptr
);
~WinMtf();
};
@@ -758,7 +758,7 @@ class EnhWMFReader : public WinMtf
static Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 );
public:
- EnhWMFReader(SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL);
+ EnhWMFReader(SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = nullptr);
~EnhWMFReader();
bool ReadEnhWMF();
@@ -812,8 +812,8 @@ private:
public:
WMFReader(SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile,
- FilterConfigItem* pConfigItem = NULL,
- WMF_EXTERNALHEADER* pExtHeader = NULL);
+ FilterConfigItem* pConfigItem = nullptr,
+ WMF_EXTERNALHEADER* pExtHeader = nullptr);
~WMFReader();
// read WMF file from stream and fill the GDIMetaFile
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index 0cf9f569c265..29d2f5529829 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -1107,7 +1107,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
// total records should be the same as in previous comments
nEMFRecCount = 0xFFFFFFFF;
delete pEMFStream;
- pEMFStream = NULL;
+ pEMFStream = nullptr;
}
nEMFRec++;
@@ -1115,7 +1115,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
nEMFRecCount = 0xFFFFFFFF;
delete pEMFStream;
- pEMFStream = NULL;
+ pEMFStream = nullptr;
}
if( pEMFStream )
@@ -1211,7 +1211,7 @@ bool WMFReader::ReadHeader()
nUnitsPerInch = 96;
- if ( pExternalHeader != NULL
+ if ( pExternalHeader != nullptr
&& pExternalHeader->xExt > 0
&& pExternalHeader->yExt > 0
&& (pExternalHeader->mapMode == MM_ISOTROPIC || pExternalHeader->mapMode == MM_ANISOTROPIC))
@@ -1307,7 +1307,7 @@ void WMFReader::ReadWMF()
nCurrentAction = 0;
nUnicodeEscapeAction = 0;
- pEMFStream = NULL;
+ pEMFStream = nullptr;
nEMFRecCount = 0;
nEMFRec = 0;
nEMFSize = 0;
@@ -1393,7 +1393,7 @@ void WMFReader::ReadWMF()
// something went wrong
// continue with WMF, don't try this again
delete pEMFStream;
- pEMFStream = NULL;
+ pEMFStream = nullptr;
}
}
}
@@ -1803,7 +1803,7 @@ WMFReader::WMFReader(SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile,
: WinMtf(new WinMtfOutput(rGDIMetaFile) , rStreamWMF, pConfigItem)
, nUnitsPerInch(96)
, nRecSize(0)
- , pEMFStream(NULL)
+ , pEMFStream(nullptr)
, nEMFRecCount(0)
, nEMFRec(0)
, nEMFSize(0)
diff --git a/vcl/source/filter/wmf/wmf.cxx b/vcl/source/filter/wmf/wmf.cxx
index c566bc3e7b04..e2f1b6b4b6d3 100644
--- a/vcl/source/filter/wmf/wmf.cxx
+++ b/vcl/source/filter/wmf/wmf.cxx
@@ -76,7 +76,7 @@ bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem*
if ( nMetaType == 0x464d4520 )
{
- if ( !EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() )
+ if ( !EnhWMFReader( rStream, rMTF, nullptr ).ReadEnhWMF() )
rStream.SetError( SVSTREAM_FILEFORMAT_ERROR );
}
else
@@ -122,7 +122,7 @@ bool ConvertGDIMetaFileToEMF(const GDIMetaFile & rMTF, SvStream & rTargetStream)
bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF )
{
- return WMFWriter().WriteWMF( rMTF, rStream, NULL, false );
+ return WMFWriter().WriteWMF( rMTF, rStream, nullptr, false );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index bdcf8701445e..dbb9ad3a7a34 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -136,15 +136,15 @@
WMFWriter::WMFWriter()
: bStatus(false)
, nLastPercent(0)
- , pWMF(NULL)
- , pVirDev(NULL)
+ , pWMF(nullptr)
+ , pVirDev(nullptr)
, nMetafileHeaderPos(0)
, nMaxRecordSize(0)
, nActRecordPos(0)
, eSrcRasterOp(ROP_OVERPAINT)
, eSrcTextAlign(ALIGN_BASELINE)
, bSrcIsClipping(false)
- , pAttrStack(NULL)
+ , pAttrStack(nullptr)
, eSrcHorTextAlign(W_TA_LEFT)
, eDstROP2(ROP_OVERPAINT)
, eDstTextAlign(ALIGN_BASELINE)
@@ -545,7 +545,7 @@ void WMFWriter::WMFRecord_ExtTextOut( const Point& rPoint,
{
sal_Int32 nOriginalTextLen = rString.getLength();
- if ( (nOriginalTextLen <= 1) || (pDXAry == NULL) )
+ if ( (nOriginalTextLen <= 1) || (pDXAry == nullptr) )
{
WMFRecord_TextOut(rPoint, rString);
return;
@@ -956,7 +956,7 @@ void WMFWriter::SetAllAttr()
aSrcFont.SetCharSet( RTL_TEXTENCODING_MS_1252 );
}
- pFontCharMap = 0;
+ pFontCharMap = nullptr;
}
aDstFont = aSrcFont;
@@ -1164,7 +1164,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
SetAllAttr();
Point aPos( pA->GetRect().TopLeft() );
- if ( !WMFRecord_Escape_Unicode( aPos, aTemp, NULL ) )
+ if ( !WMFRecord_Escape_Unicode( aPos, aTemp, nullptr ) )
WMFRecord_TextOut( aPos, aTemp );
}
break;
@@ -1175,7 +1175,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
OUString aTemp = pA->GetText().copy( pA->GetIndex(), std::min<sal_Int32>(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
aSrcLineInfo = LineInfo();
SetAllAttr();
- if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, NULL ) )
+ if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, nullptr ) )
WMFRecord_TextOut( pA->GetPoint(), aTemp );
}
break;
@@ -1199,7 +1199,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
pVirDev->SetFont( aSrcFont );
const sal_Int32 nLen = aTemp.getLength();
- std::unique_ptr<long[]> pDXAry(nLen ? new long[ nLen ] : NULL);
+ std::unique_ptr<long[]> pDXAry(nLen ? new long[ nLen ] : nullptr);
const sal_Int32 nNormSize = pVirDev->GetTextArray( aTemp, pDXAry.get() );
if (nLen && nNormSize == 0)
{
@@ -1748,7 +1748,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
pVirDev->SetMapMode( aTargetMapMode );
- pAttrStack=NULL;
+ pAttrStack=nullptr;
for (sal_uInt16 i=0; i<MAXOBJECTHANDLES; i++)
bHandleAllocated[i]=false;
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index cd89bdf0e6a1..c33924247352 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -73,9 +73,9 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName )
PhysicalFontCollection::PhysicalFontCollection()
: mbMatchData( false )
, mbMapNames( false )
- , mpPreMatchHook( NULL )
- , mpFallbackHook( NULL )
- , mpFallbackList( NULL )
+ , mpPreMatchHook( nullptr )
+ , mpFallbackHook( nullptr )
+ , mpFallbackList( nullptr )
, mnFallbackCount( -1 )
{}
@@ -98,7 +98,7 @@ void PhysicalFontCollection::Clear()
{
// remove fallback lists
delete[] mpFallbackList;
- mpFallbackList = NULL;
+ mpFallbackList = nullptr;
mnFallbackCount = -1;
// clear all entries in the device font list
@@ -141,13 +141,13 @@ void PhysicalFontCollection::InitGenericGlyphFallback() const
"phetsarathot", "",
"padauk", "pinlonmyanmar", "",
"iskoolapota", "lklug", "",
- 0
+ nullptr
};
bool bHasEudc = false;
int nMaxLevel = 0;
int nBestQuality = 0;
- PhysicalFontFamily** pFallbackList = NULL;
+ PhysicalFontFamily** pFallbackList = nullptr;
for( const char** ppNames = &aGlyphFallbackList[0];; ++ppNames )
{
@@ -218,7 +218,7 @@ PhysicalFontFamily* PhysicalFontCollection::GetGlyphFallbackFont( FontSelectPatt
OUString& rMissingCodes,
int nFallbackLevel ) const
{
- PhysicalFontFamily* pFallbackData = NULL;
+ PhysicalFontFamily* pFallbackData = nullptr;
// find a matching font candidate for platform specific glyph fallback
if( mpFallbackHook )
@@ -335,7 +335,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindBySearchName( const OUString
PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.find( rSearchName );
if( it == maPhysicalFontFamilies.end() )
- return NULL;
+ return nullptr;
PhysicalFontFamily* pFoundData = (*it).second;
return pFoundData;
@@ -346,11 +346,11 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByAliasName(const OUString&
{
// short circuit for impossible font name alias
if (rSearchName.isEmpty())
- return NULL;
+ return nullptr;
// short circuit if no alias names are available
if (!mbMapNames)
- return NULL;
+ return nullptr;
// use the font's alias names to find the font
// TODO: get rid of linear search
@@ -375,7 +375,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByAliasName(const OUString&
while ( nIndex != -1 );
}
- return NULL;
+ return nullptr;
}
PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( const OUString& rFontName ) const
@@ -386,7 +386,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( const OUString& rFon
PhysicalFontFamily *PhysicalFontCollection::FindOrCreateFamily( const OUString &rFamilyName )
{
PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.find( rFamilyName );
- PhysicalFontFamily* pFoundData = NULL;
+ PhysicalFontFamily* pFoundData = nullptr;
if( it != maPhysicalFontFamilies.end() )
pFoundData = (*it).second;
@@ -402,7 +402,7 @@ PhysicalFontFamily *PhysicalFontCollection::FindOrCreateFamily( const OUString &
PhysicalFontFamily* PhysicalFontCollection::ImplFindByTokenNames(const OUString& rTokenStr) const
{
- PhysicalFontFamily* pFoundData = NULL;
+ PhysicalFontFamily* pFoundData = nullptr;
// use normalized font name tokens to find the font
for( sal_Int32 nTokenPos = 0; nTokenPos != -1; )
@@ -422,7 +422,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByTokenNames(const OUString&
PhysicalFontFamily* PhysicalFontCollection::ImplFindBySubstFontAttr( const utl::FontNameAttr& rFontAttr ) const
{
- PhysicalFontFamily* pFoundData = NULL;
+ PhysicalFontFamily* pFoundData = nullptr;
// use the font substitutions suggested by the FontNameAttr to find the font
::std::vector< OUString >::const_iterator it = rFontAttr.Substitutions.begin();
@@ -449,7 +449,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindBySubstFontAttr( const utl::
return pFoundData;
}
- return NULL;
+ return nullptr;
}
void PhysicalFontCollection::InitMatchData() const
@@ -488,10 +488,10 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByAttributes( ImplFontAttrs
if( nSearchType == ImplFontAttrs::None
&& ((eSearchWeight == WEIGHT_DONTKNOW) || (eSearchWeight == WEIGHT_NORMAL))
&& ((eSearchWidth == WIDTH_DONTKNOW) || (eSearchWidth == WIDTH_NORMAL)) )
- return NULL;
+ return nullptr;
InitMatchData();
- PhysicalFontFamily* pFoundData = NULL;
+ PhysicalFontFamily* pFoundData = nullptr;
long nBestMatch = 40000;
ImplFontAttrs nBestType = ImplFontAttrs::None;
@@ -993,7 +993,7 @@ ImplGetDevSizeList* PhysicalFontCollection::GetDevSizeList( const OUString& rFon
ImplGetDevSizeList* pGetDevSizeList = new ImplGetDevSizeList;
PhysicalFontFamily* pFontFamily = FindFontFamily( rFontName );
- if( pFontFamily != NULL )
+ if( pFontFamily != nullptr )
{
std::set<int> rHeights;
pFontFamily->GetFontHeights( rHeights );
@@ -1010,7 +1010,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByFont( FontSelectPattern& r
{
// give up if no fonts are available
if( !Count() )
- return NULL;
+ return nullptr;
bool bMultiToken = false;
sal_Int32 nTokenPos = 0;
@@ -1181,7 +1181,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByFont( FontSelectPattern& r
}
// use font fallback
- const utl::FontNameAttr* pFontAttr = NULL;
+ const utl::FontNameAttr* pFontAttr = nullptr;
if (!aSearchName.isEmpty() && !utl::ConfigManager::IsAvoidConfig())
{
// get fallback info using FontSubstConfiguration and
@@ -1240,7 +1240,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByFont( FontSelectPattern& r
return pFoundData;
}
- const utl::FontNameAttr* pTempFontAttr = NULL;
+ const utl::FontNameAttr* pTempFontAttr = nullptr;
if (!utl::ConfigManager::IsAvoidConfig())
{
// use a font name from font fallback list to determine font attributes
diff --git a/vcl/source/font/PhysicalFontFace.cxx b/vcl/source/font/PhysicalFontFace.cxx
index b79969b498fd..b93022333635 100644
--- a/vcl/source/font/PhysicalFontFace.cxx
+++ b/vcl/source/font/PhysicalFontFace.cxx
@@ -30,7 +30,7 @@ PhysicalFontFace::PhysicalFontFace( const ImplDevFontAttributes& rDFA, int nMagi
, mnWidth(0)
, mnHeight(0)
, mnMagic( nMagic )
- , mpNext( NULL )
+ , mpNext( nullptr )
{
// StarSymbol is a unicode font, but it still deserves the symbol flag
if( !IsSymbolFont() )
diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx
index b3c650cf4c94..8cfc0e895836 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -90,7 +90,7 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName )
}
PhysicalFontFamily::PhysicalFontFamily( const OUString& rSearchName )
-: mpFirst( NULL ),
+: mpFirst( nullptr ),
maSearchName( rSearchName ),
mnTypeFaces( 0 ),
mnMatchType( ImplFontAttrs::None ),
@@ -114,7 +114,7 @@ PhysicalFontFamily::~PhysicalFontFamily()
bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* pNewData )
{
- pNewData->mpNext = NULL;
+ pNewData->mpNext = nullptr;
if( !mpFirst )
{
@@ -167,7 +167,7 @@ bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* pNewData )
// TODO: get rid of linear search?
PhysicalFontFace* pData;
PhysicalFontFace** ppHere = &mpFirst;
- for(; (pData=*ppHere) != NULL; ppHere=&pData->mpNext )
+ for(; (pData=*ppHere) != nullptr; ppHere=&pData->mpNext )
{
sal_Int32 eComp = pNewData->CompareWithSize( *pData );
if( eComp > 0 )
@@ -219,14 +219,14 @@ void PhysicalFontFamily::InitMatchData( const utl::FontSubstConfiguration& rFont
PhysicalFontFace* PhysicalFontFamily::FindBestFontFace( const FontSelectPattern& rFSD ) const
{
if( !mpFirst )
- return NULL;
+ return nullptr;
if( !mpFirst->GetNextFace() )
return mpFirst;
// FontName+StyleName should map to FamilyName+StyleName
const OUString& rSearchName = rFSD.maTargetName;
OUString aTargetStyleName;
- const OUString* pTargetStyleName = NULL;
+ const OUString* pTargetStyleName = nullptr;
if( (rSearchName.getLength() > maSearchName.getLength())
&& rSearchName.startsWith( maSearchName ) )
{
@@ -249,7 +249,7 @@ PhysicalFontFace* PhysicalFontFamily::FindBestFontFace( const FontSelectPattern&
// meaning different font attributes, but not different fonts sizes
void PhysicalFontFamily::UpdateDevFontList( ImplGetDevFontList& rDevFontList ) const
{
- PhysicalFontFace* pPrevFace = NULL;
+ PhysicalFontFace* pPrevFace = nullptr;
for( PhysicalFontFace* pFace = mpFirst; pFace; pFace = pFace->GetNextFace() )
{
if( !pPrevFace || pFace->CompareIgnoreSize( *pPrevFace ) )
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index f026a67e9dfb..3a46f474e00b 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -146,9 +146,9 @@ static const char* pDictOps[] = {
"dFamilyBlues", "dFamilyOtherBlues", "nStdHW", "nStdVW",
"xESC", "nUniqueID", "aXUID", "nCharset",
"nEncoding", "nCharStrings", "PPrivate", "nSubrs",
- "nDefaultWidthX", "nNominalWidthX", NULL, NULL,
- NULL, NULL, NULL, NULL,
- "shortint", "longint", "BCD", NULL
+ "nDefaultWidthX", "nNominalWidthX", nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ "shortint", "longint", "BCD", nullptr
};
// TOP DICT escapes (also covers PRIV DICT escapes)
@@ -156,36 +156,36 @@ static const char* pDictEscs[] = {
"sCopyright", "bIsFixedPitch", "nItalicAngle", "nUnderlinePosition",
"nUnderlineThickness", "nPaintType", "tCharstringType", "aFontMatrix",
"nStrokeWidth", "nBlueScale", "nBlueShift", "nBlueFuzz",
- "dStemSnapH", "dStemSnapV", "bForceBold", NULL,
- NULL, "nLanguageGroup", "nExpansionFactor", "nInitialRandomSeed",
+ "dStemSnapH", "dStemSnapV", "bForceBold", nullptr,
+ nullptr, "nLanguageGroup", "nExpansionFactor", "nInitialRandomSeed",
"nSyntheticBase", "sPostScript", "sBaseFontName", "dBaseFontBlend",
- NULL, NULL, NULL, NULL,
- NULL, NULL, "rROS", "nCIDFontVersion",
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, "rROS", "nCIDFontVersion",
"nCIDFontRevision", "nCIDFontType", "nCIDCount", "nUIDBase",
"nFDArray", "nFDSelect", "sFontName"
};
static const char* pType1Ops[] = {
- NULL, "2hstem", NULL, "2vstem",
+ nullptr, "2hstem", nullptr, "2vstem",
"1vmoveto", "Arlineto", "1hlineto", "1vlineto",
"Crrcurveto", "0closepath", "Lcallsubr", "0return",
- "xT1ESC", "2hsbw", "0endchar", NULL,
- NULL, NULL, NULL, NULL,
- NULL, "2rmoveto", "1hmoveto", NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, "4vhcurveto", "4hvcurveto"
+ "xT1ESC", "2hsbw", "0endchar", nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, "2rmoveto", "1hmoveto", nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, "4vhcurveto", "4hvcurveto"
};
static const char* pT1EscOps[] = {
- "0dotsection", "6vstem3", "6hstem3", NULL,
- NULL, NULL, "5seac", "4sbw",
- NULL, "1abs", "2add", "2sub",
- "2div", NULL, NULL, NULL,
- "Gcallothersubr", "1pop", NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, "2setcurrentpoint"
+ "0dotsection", "6vstem3", "6hstem3", nullptr,
+ nullptr, nullptr, "5seac", "4sbw",
+ nullptr, "1abs", "2add", "2sub",
+ "2div", nullptr, nullptr, nullptr,
+ "Gcallothersubr", "1pop", nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, "2setcurrentpoint"
};
struct TYPE1OP
@@ -208,26 +208,26 @@ struct TYPE1OP
};
static const char* pType2Ops[] = {
- NULL, "hhstem", NULL, "vvstem",
+ nullptr, "hhstem", nullptr, "vvstem",
"mvmoveto", "Arlineto", "Ehlineto", "Evlineto",
- "Crrcurveto", NULL, "Lcallsubr", "Xreturn",
- "xT2ESC", NULL, "eendchar", NULL,
- NULL, NULL, "Hhstemhm", "Khintmask",
+ "Crrcurveto", nullptr, "Lcallsubr", "Xreturn",
+ "xT2ESC", nullptr, "eendchar", nullptr,
+ nullptr, nullptr, "Hhstemhm", "Khintmask",
"Kcntrmask", "Mrmoveto", "mhmoveto", "Vvstemhm",
".rcurveline", ".rlinecurve", ".vvcurveto", ".hhcurveto",
".shortint", "Gcallgsubr", ".vhcurveto", ".hvcurveto"
};
static const char* pT2EscOps[] = {
- NULL, NULL, NULL, "2and",
- "2or", "1not", NULL, NULL,
- NULL, "1abs", "2add", "2sub",
- "2div", NULL, "1neg", "2eq",
- NULL, NULL, "1drop", NULL,
+ nullptr, nullptr, nullptr, "2and",
+ "2or", "1not", nullptr, nullptr,
+ nullptr, "1abs", "2add", "2sub",
+ "2div", nullptr, "1neg", "2eq",
+ nullptr, nullptr, "1drop", nullptr,
"1put", "1get", "4ifelse", "0random",
- "2mul", NULL, "1sqrt", "1dup",
- "2exch", "Iindex", "Rroll", NULL,
- NULL, NULL, "7hflex", "Fflex",
+ "2mul", nullptr, "1sqrt", "1dup",
+ "2exch", "Iindex", "Rroll", nullptr,
+ nullptr, nullptr, "7hflex", "Fflex",
"9hflex1", "fflex1"
};
@@ -414,15 +414,15 @@ private:
CffSubsetterContext::CffSubsetterContext( const U8* pBasePtr, int nBaseLen)
: mpBasePtr( pBasePtr)
, mpBaseEnd( pBasePtr+nBaseLen)
- , mpReadPtr(NULL)
- , mpReadEnd(NULL)
- , mpWritePtr(NULL)
+ , mpReadPtr(nullptr)
+ , mpReadEnd(nullptr)
+ , mpWritePtr(nullptr)
, mbSawError(false)
, mbNeedClose(false)
, mbIgnoreHints(false)
, mnCntrMask(0)
- , mpCharStringOps(NULL)
- , mpCharStringEscs(NULL)
+ , mpCharStringOps(nullptr)
+ , mpCharStringEscs(nullptr)
, mnStackIdx(0)
, mnHintSize(0)
, mnHorzHintSize(0)
@@ -509,7 +509,7 @@ void CffSubsetterContext::readDictOp()
const U8 c = *mpReadPtr;
if( c <= 21 ) {
int nOpId = *(mpReadPtr++);
- const char* pCmdName = 0;
+ const char* pCmdName = nullptr;
if( nOpId != 12)
pCmdName = pDictOps[nOpId];
else {
@@ -1748,7 +1748,7 @@ Type1Emitter::~Type1Emitter()
return;
if( mbCloseOutfile )
fclose( mpFileOut);
- mpFileOut = NULL;
+ mpFileOut = nullptr;
}
void Type1Emitter::setSubsetName( const char* pSubsetName)
diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx
index a50b50e1e166..26403cc88f2d 100644
--- a/vcl/source/fontsubset/fontsubset.cxx
+++ b/vcl/source/fontsubset/fontsubset.cxx
@@ -29,15 +29,15 @@ FontSubsetInfo::FontSubsetInfo()
, m_nDescent( 0)
, m_nCapHeight( 0)
, m_nFontType( FontSubsetInfo::NO_FONT)
- , mpInFontBytes( NULL)
+ , mpInFontBytes( nullptr)
, mnInByteLength( 0)
, meInFontType( FontSubsetInfo::NO_FONT)
- , mpSftTTFont( NULL)
+ , mpSftTTFont( nullptr)
, mnReqFontTypeMask(0)
- , mpOutFile(NULL)
- , mpReqFontName(NULL)
- , mpReqGlyphIds(NULL)
- , mpReqEncodedIds(NULL)
+ , mpOutFile(nullptr)
+ , mpReqFontName(nullptr)
+ , mpReqGlyphIds(nullptr)
+ , mpReqEncodedIds(nullptr)
, mnReqGlyphCount(0)
{
}
@@ -51,7 +51,7 @@ bool FontSubsetInfo::LoadFont(
FontSubsetInfo::FontType eInFontType,
const unsigned char* pInFontBytes, int nInByteLength)
{
- DBG_ASSERT( (mpSftTTFont == NULL), "Subset from SFT and from mapped font-file requested");
+ DBG_ASSERT( (mpSftTTFont == nullptr), "Subset from SFT and from mapped font-file requested");
meInFontType = eInFontType;
mpInFontBytes = pInFontBytes;
mnInByteLength = nInByteLength;
@@ -61,10 +61,10 @@ bool FontSubsetInfo::LoadFont(
// prepare subsetting for fonts that are known to the SFT-parser
bool FontSubsetInfo::LoadFont( vcl::_TrueTypeFont* pSftTTFont )
{
- DBG_ASSERT( (mpInFontBytes == NULL), "Subset from SFT and from mapped font-file requested");
+ DBG_ASSERT( (mpInFontBytes == nullptr), "Subset from SFT and from mapped font-file requested");
mpSftTTFont = pSftTTFont;
meInFontType = ANY_SFNT;
- return (mpSftTTFont == NULL);
+ return (mpSftTTFont == nullptr);
}
bool FontSubsetInfo::CreateFontSubset(
@@ -117,7 +117,7 @@ bool FontSubsetInfo::CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths )
{
// handle SFNT_CFF fonts
int nCffLength = 0;
- const sal_uInt8* pCffBytes = NULL;
+ const sal_uInt8* pCffBytes = nullptr;
if( GetSfntTable( mpSftTTFont, O_CFF, &pCffBytes, &nCffLength))
{
LoadFont( CFF_FONT, pCffBytes, nCffLength);
diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx
index cd76e54303a6..8966ce3f41d2 100644
--- a/vcl/source/fontsubset/gsub.cxx
+++ b/vcl/source/fontsubset/gsub.cxx
@@ -325,7 +325,7 @@ void ReleaseGSUB(struct _TrueTypeFont* pTTFile)
int UseGSUB( struct _TrueTypeFont* pTTFile, int nGlyph )
{
GlyphSubstitution* pGlyphSubstitution = static_cast<GlyphSubstitution*>(pTTFile->pGSubstitution);
- if( pGlyphSubstitution != 0 )
+ if( pGlyphSubstitution != nullptr )
{
GlyphSubstitution::const_iterator it( pGlyphSubstitution->find( sal::static_int_cast<sal_uInt16>(nGlyph) ) );
if( it != pGlyphSubstitution->end() )
diff --git a/vcl/source/fontsubset/list.cxx b/vcl/source/fontsubset/list.cxx
index 6578183ebe0e..42cc6577f0c2 100644
--- a/vcl/source/fontsubset/list.cxx
+++ b/vcl/source/fontsubset/list.cxx
@@ -50,7 +50,7 @@ struct _list {
static lnode *newNode(void *el)
{
lnode *ptr = static_cast<lnode *>(rtl_allocateMemory(sizeof(lnode)));
- assert(ptr != 0);
+ assert(ptr != nullptr);
ptr->value = el;
@@ -62,12 +62,12 @@ static lnode *appendPrim(list pThis, void *el)
lnode *ptr = newNode(el);
lnode **flink, *blink;
- if (pThis->tail != 0) {
+ if (pThis->tail != nullptr) {
flink = &(pThis->tail->next);
blink = pThis->tail;
} else {
flink = &pThis->head;
- blink = 0;
+ blink = nullptr;
pThis->cptr = ptr; /*- list was empty - set current to this element */
}
@@ -75,7 +75,7 @@ static lnode *appendPrim(list pThis, void *el)
pThis->tail = ptr;
ptr->prev = blink;
- ptr->next = 0;
+ ptr->next = nullptr;
pThis->aCount++;
return ptr;
@@ -85,45 +85,45 @@ static lnode *appendPrim(list pThis, void *el)
list listNewEmpty() /*- default ctor */
{
list pThis = static_cast<list>(rtl_allocateMemory(sizeof(struct _list)));
- assert(pThis != 0);
+ assert(pThis != nullptr);
pThis->aCount = 0;
- pThis->eDtor = 0;
- pThis->head = pThis->tail = pThis->cptr = 0;
+ pThis->eDtor = nullptr;
+ pThis->head = pThis->tail = pThis->cptr = nullptr;
return pThis;
}
void listDispose(list pThis) /*- dtor */
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
listClear(pThis);
rtl_freeMemory(pThis);
}
void listSetElementDtor(list pThis, list_destructor f)
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
pThis->eDtor = f;
}
/* calling this function on an empty list is a run-time error */
void *listCurrent(list pThis)
{
- assert(pThis != 0);
- assert(pThis->cptr != 0);
+ assert(pThis != nullptr);
+ assert(pThis->cptr != nullptr);
return pThis->cptr->value;
}
int listCount(list pThis)
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
return pThis->aCount;
}
int listIsEmpty(list pThis)
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
return pThis->aCount == 0;
}
@@ -135,12 +135,12 @@ int listNext(list pThis)
int listSkipForward(list pThis, int n)
{
int m = 0;
- assert(pThis != 0);
+ assert(pThis != nullptr);
- if (pThis->cptr == 0) return 0;
+ if (pThis->cptr == nullptr) return 0;
while (n != 0) {
- if (pThis->cptr->next == 0) break;
+ if (pThis->cptr->next == nullptr) break;
pThis->cptr = pThis->cptr->next;
n--;
m++;
@@ -150,7 +150,7 @@ int listSkipForward(list pThis, int n)
int listToFirst(list pThis)
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
if (pThis->cptr != pThis->head) {
pThis->cptr = pThis->head;
@@ -161,7 +161,7 @@ int listToFirst(list pThis)
int listToLast(list pThis)
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
if (pThis->cptr != pThis->tail) {
pThis->cptr = pThis->tail;
@@ -172,7 +172,7 @@ int listToLast(list pThis)
list listAppend(list pThis, void *el)
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
appendPrim(pThis, el);
return pThis;
@@ -180,18 +180,18 @@ list listAppend(list pThis, void *el)
list listRemove(list pThis)
{
- lnode *ptr = 0;
- if (pThis->cptr == 0) return pThis;
+ lnode *ptr = nullptr;
+ if (pThis->cptr == nullptr) return pThis;
- if (pThis->cptr->next != 0) {
+ if (pThis->cptr->next != nullptr) {
ptr = pThis->cptr->next;
pThis->cptr->next->prev = pThis->cptr->prev;
} else {
pThis->tail = pThis->cptr->prev;
}
- if (pThis->cptr->prev != 0) {
- if (ptr == 0) ptr = pThis->cptr->prev;
+ if (pThis->cptr->prev != nullptr) {
+ if (ptr == nullptr) ptr = pThis->cptr->prev;
pThis->cptr->prev->next = pThis->cptr->next;
} else {
pThis->head = pThis->cptr->next;
@@ -217,7 +217,7 @@ list listClear(list pThis)
node = ptr;
}
- pThis->head = pThis->tail = pThis->cptr = 0;
+ pThis->head = pThis->tail = pThis->cptr = nullptr;
assert(pThis->aCount == 0);
return pThis;
}
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 7461f56b80d5..7e3932c2a5ee 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -141,14 +141,14 @@ static const sal_uInt32 T_otto = 0x4f54544f; /* 'OTTO' */
_inline void *smalloc(size_t size)
{
void *res = malloc(size);
- assert(res != 0);
+ assert(res != nullptr);
return res;
}
_inline void *scalloc(size_t n, size_t size)
{
void *res = calloc(n, size);
- assert(res != 0);
+ assert(res != nullptr);
return res;
}
@@ -156,7 +156,7 @@ _inline void *scalloc(size_t n, size_t size)
_inline sal_Int16 GetInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
{
sal_Int16 t;
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
t = (ptr+offset)[0] << 8 | (ptr+offset)[1];
@@ -170,7 +170,7 @@ _inline sal_Int16 GetInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
_inline sal_uInt16 GetUInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
{
sal_uInt16 t;
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
t = (ptr+offset)[0] << 8 | (ptr+offset)[1];
@@ -184,7 +184,7 @@ _inline sal_uInt16 GetUInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
_inline sal_Int32 GetInt32(const sal_uInt8 *ptr, size_t offset, int bigendian)
{
sal_Int32 t;
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
t = (ptr+offset)[0] << 24 | (ptr+offset)[1] << 16 |
@@ -200,7 +200,7 @@ _inline sal_Int32 GetInt32(const sal_uInt8 *ptr, size_t offset, int bigendian)
_inline sal_uInt32 GetUInt32(const sal_uInt8 *ptr, size_t offset, int bigendian)
{
sal_uInt32 t;
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
t = (ptr+offset)[0] << 24 | (ptr+offset)[1] << 16 |
@@ -406,7 +406,7 @@ static int GetSimpleTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoin
sal_uInt8 flag, n;
int i, j, z;
- *pointArray = 0;
+ *pointArray = nullptr;
/* printf("GetSimpleTTOutline(%d)\n", glyphID); */
@@ -528,7 +528,7 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo
int i, np;
F16Dot16 a = 0x10000, b = 0, c = 0, d = 0x10000, m, n, abs1, abs2, abs3;
- *pointArray = 0;
+ *pointArray = nullptr;
/* printf("GetCompoundTTOutline(%d)\n", glyphID); */
if (glyphID >= ttf->nglyphs) /*- incorrect glyphID */
@@ -572,7 +572,7 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo
glyphlist.push_back( index );
- if ((np = GetTTGlyphOutline(ttf, index, &nextComponent, 0, &glyphlist)) == 0)
+ if ((np = GetTTGlyphOutline(ttf, index, &nextComponent, nullptr, &glyphlist)) == 0)
{
/* XXX that probably indicates a corrupted font */
#if OSL_DEBUG_LEVEL > 1
@@ -665,7 +665,7 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo
np = myPoints.size();
pa = static_cast<ControlPoint*>(calloc(np, sizeof(ControlPoint)));
- assert(pa != 0);
+ assert(pa != nullptr);
if (np > 0)
memcpy( pa, &myPoints[0], np*sizeof(ControlPoint) );
@@ -686,7 +686,7 @@ static int GetTTGlyphOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoint
const sal_uInt8 *table = getTable( ttf, O_glyf );
sal_Int16 numberOfContours;
int res;
- *pointArray = 0;
+ *pointArray = nullptr;
if (metrics) {
memset(metrics, 0, sizeof(TTGlyphMetrics)); /*- metrics is initialized to all zeroes */
@@ -733,7 +733,7 @@ static int BSplineToPSPath(ControlPoint *srcA, int srcCount, PSPathElement **pat
int cp = 0; /*- current point */
int StartContour = 0, EndContour = 1;
- *path = 0;
+ *path = nullptr;
/* if (srcCount > 0) for(;;) */
while (srcCount > 0) { /*- srcCount does not get changed inside the loop. */
@@ -839,7 +839,7 @@ static int BSplineToPSPath(ControlPoint *srcA, int srcCount, PSPathElement **pat
if( (nPathCount = (int)aPathList.size()) > 0)
{
*path = static_cast<PSPathElement*>(calloc(nPathCount, sizeof(PSPathElement)));
- assert(*path != 0);
+ assert(*path != nullptr);
memcpy( *path, &aPathList[0], nPathCount * sizeof(PSPathElement) );
}
@@ -860,15 +860,15 @@ static char *nameExtract( const sal_uInt8* name, int nTableSize, int n, int dbFl
if( (len <= 0) || len > available_space)
{
if( ucs2result )
- *ucs2result = NULL;
- return NULL;
+ *ucs2result = nullptr;
+ return nullptr;
}
if( ucs2result )
- *ucs2result = NULL;
+ *ucs2result = nullptr;
if (dbFlag) {
res = static_cast<char*>(malloc(1 + len/2));
- assert(res != 0);
+ assert(res != nullptr);
for (int i = 0; i < len/2; i++)
res[i] = *(ptr + i * 2 + 1);
res[len/2] = 0;
@@ -881,7 +881,7 @@ static char *nameExtract( const sal_uInt8* name, int nTableSize, int n, int dbFl
}
} else {
res = static_cast<char*>(malloc(1 + len));
- assert(res != 0);
+ assert(res != nullptr);
memcpy(res, ptr, len);
res[len] = 0;
}
@@ -956,20 +956,20 @@ static void GetNames(TrueTypeFont *t)
bool bPSNameOK = true;
/* PostScript name: preferred Microsoft */
- t->psname = NULL;
+ t->psname = nullptr;
if ((r = findname(table, n, 3, 1, 0x0409, 6)) != -1)
- t->psname = nameExtract(table, nTableSize, r, 1, NULL);
+ t->psname = nameExtract(table, nTableSize, r, 1, nullptr);
if ( ! t->psname && (r = findname(table, n, 1, 0, 0, 6)) != -1)
- t->psname = nameExtract(table, nTableSize, r, 0, NULL);
+ t->psname = nameExtract(table, nTableSize, r, 0, nullptr);
if ( ! t->psname && (r = findname(table, n, 3, 0, 0x0409, 6)) != -1)
{
// some symbol fonts like Marlett have a 3,0 name!
- t->psname = nameExtract(table, nTableSize, r, 1, NULL);
+ t->psname = nameExtract(table, nTableSize, r, 1, nullptr);
}
// for embedded font in Ghostscript PDFs
if ( ! t->psname && (r = findname(table, n, 2, 2, 0, 6)) != -1)
{
- t->psname = nameExtract(table, nTableSize, r, 0, NULL);
+ t->psname = nameExtract(table, nTableSize, r, 0, nullptr);
}
if ( ! t->psname )
{
@@ -980,7 +980,7 @@ static void GetNames(TrueTypeFont *t)
while(pReverse != t->fname && *pReverse != '/') pReverse--;
if(*pReverse == '/') pReverse++;
t->psname = strdup(pReverse);
- assert(t->psname != 0);
+ assert(t->psname != nullptr);
for (i=strlen(t->psname) - 1; i > 0; i--)
{
/*- Remove the suffix -*/
@@ -995,13 +995,13 @@ static void GetNames(TrueTypeFont *t)
}
/* Font family and subfamily names: preferred Apple */
- t->family = NULL;
+ t->family = nullptr;
if ((r = findname(table, n, 0, 0, 0, 1)) != -1)
t->family = nameExtract(table, nTableSize, r, 1, &t->ufamily);
if ( ! t->family && (r = findname(table, n, 3, 1, 0x0409, 1)) != -1)
t->family = nameExtract(table, nTableSize, r, 1, &t->ufamily);
if ( ! t->family && (r = findname(table, n, 1, 0, 0, 1)) != -1)
- t->family = nameExtract(table, nTableSize, r, 0, NULL);
+ t->family = nameExtract(table, nTableSize, r, 0, nullptr);
if ( ! t->family && (r = findname(table, n, 3, 1, 0x0411, 1)) != -1)
t->family = nameExtract(table, nTableSize, r, 1, &t->ufamily);
if ( ! t->family && (r = findname(table, n, 3, 0, 0x0409, 1)) != -1)
@@ -1009,11 +1009,11 @@ static void GetNames(TrueTypeFont *t)
if ( ! t->family )
{
t->family = strdup(t->psname);
- assert(t->family != 0);
+ assert(t->family != nullptr);
}
- t->subfamily = NULL;
- t->usubfamily = NULL;
+ t->subfamily = nullptr;
+ t->usubfamily = nullptr;
if ((r = findname(table, n, 1, 0, 0, 2)) != -1)
t->subfamily = nameExtract(table, nTableSize, r, 0, &t->usubfamily);
if ( ! t->subfamily && (r = findname(table, n, 3, 1, 0x0409, 2)) != -1)
@@ -1338,7 +1338,7 @@ static void FindCmap(TrueTypeFont *ttf)
ttf->cmap = table + ThreeZero;
} else {
ttf->cmapType = CMAP_NOT_USABLE;
- ttf->cmap = 0;
+ ttf->cmap = nullptr;
}
if (ttf->cmapType != CMAP_NOT_USABLE) {
@@ -1354,8 +1354,8 @@ static void FindCmap(TrueTypeFont *ttf)
printf("%s: %d is not a recognized cmap format.\n", ttf->fname, GetUInt16(ttf->cmap, 0, 1));
#endif
ttf->cmapType = CMAP_NOT_USABLE;
- ttf->cmap = 0;
- ttf->mapper = 0;
+ ttf->cmap = nullptr;
+ ttf->mapper = nullptr;
}
}
}
@@ -1386,7 +1386,7 @@ static void GetKern(TrueTypeFont *ttf)
}
ttf->kerntables = static_cast<const sal_uInt8**>(calloc(ttf->nkern, sizeof(sal_uInt8 *)));
- assert(ttf->kerntables != 0);
+ assert(ttf->kerntables != nullptr);
for( unsigned i = 0; i < ttf->nkern; ++i) {
ttf->kerntables[i] = ptr;
@@ -1418,7 +1418,7 @@ static void GetKern(TrueTypeFont *ttf)
}
ttf->kerntables = static_cast<const sal_uInt8**>(calloc(ttf->nkern, sizeof(sal_uInt8 *)));
- assert(ttf->kerntables != 0);
+ assert(ttf->kerntables != nullptr);
for( unsigned i = 0; i < ttf->nkern; ++i) {
ttf->kerntables[i] = ptr;
@@ -1435,7 +1435,7 @@ static void GetKern(TrueTypeFont *ttf)
badtable:
ttf->kerntype = KT_NONE;
- ttf->kerntables = 0;
+ ttf->kerntables = nullptr;
return;
}
@@ -1460,14 +1460,14 @@ int CountTTCFonts(const char* fname)
static void allocTrueTypeFont( TrueTypeFont** ttf )
{
*ttf = static_cast<TrueTypeFont*>(calloc(1,sizeof(TrueTypeFont)));
- if( *ttf != NULL )
+ if( *ttf != nullptr )
{
(*ttf)->tag = 0;
- (*ttf)->fname = 0;
+ (*ttf)->fname = nullptr;
(*ttf)->fsize = -1;
- (*ttf)->ptr = 0;
+ (*ttf)->ptr = nullptr;
(*ttf)->nglyphs = 0xFFFFFFFF;
- (*ttf)->pGSubstitution = 0;
+ (*ttf)->pGSubstitution = nullptr;
}
}
@@ -1516,7 +1516,7 @@ int OpenTTFontFile( const char* fname, sal_uInt32 facenum, TrueTypeFont** ttf )
goto cleanup;
}
- if (((*ttf)->ptr = static_cast<sal_uInt8 *>(mmap(0, (*ttf)->fsize, PROT_READ, MAP_SHARED, fd, 0))) == MAP_FAILED) {
+ if (((*ttf)->ptr = static_cast<sal_uInt8 *>(mmap(nullptr, (*ttf)->fsize, PROT_READ, MAP_SHARED, fd, 0))) == MAP_FAILED) {
ret = SF_MEMORY;
goto cleanup;
}
@@ -1529,7 +1529,7 @@ cleanup:
/*- t and t->fname have been allocated! */
free((*ttf)->fname);
free(*ttf);
- *ttf = NULL;
+ *ttf = nullptr;
return ret;
}
#endif
@@ -1537,10 +1537,10 @@ cleanup:
int OpenTTFontBuffer(const void* pBuffer, sal_uInt32 nLen, sal_uInt32 facenum, TrueTypeFont** ttf)
{
allocTrueTypeFont( ttf );
- if( *ttf == NULL )
+ if( *ttf == nullptr )
return SF_MEMORY;
- (*ttf)->fname = NULL;
+ (*ttf)->fname = nullptr;
(*ttf)->fsize = nLen;
(*ttf)->ptr = const_cast<sal_uInt8 *>(static_cast<sal_uInt8 const *>(pBuffer));
@@ -1584,9 +1584,9 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
return SF_TTFORMAT;
t->tables = static_cast<const sal_uInt8**>(calloc(NUM_TAGS, sizeof(sal_uInt8 *)));
- assert(t->tables != 0);
+ assert(t->tables != nullptr);
t->tlens = static_cast<sal_uInt32*>(calloc(NUM_TAGS, sizeof(sal_uInt32)));
- assert(t->tlens != 0);
+ assert(t->tlens != nullptr);
/* parse the tables */
for (i=0; i<(int)t->ntables; i++) {
@@ -1630,7 +1630,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
if( pHead > t->ptr + (t->fsize - 54) )
pHead = t->ptr + (t->fsize - 54);
/* TODO: find better method than searching head table's magic */
- sal_uInt8* p = NULL;
+ sal_uInt8* p = nullptr;
for( p = pHead + 12; p > t->ptr; --p ) {
if( p[0]==0x5F && p[1]==0x0F && p[2]==0x3C && p[3]==0xF5 ) {
int nDelta = (pHead + 12) - p;
@@ -1660,7 +1660,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
fprintf( stderr, "font file %s has bad table offset %" SAL_PRI_PTRDIFFT "d (tagnum=%d)\n", t->fname, (sal_uInt8*)t->tables[i]-t->ptr, i );
#endif
t->tlens[i] = 0;
- t->tables[i] = NULL;
+ t->tables[i] = nullptr;
}
else if( const_cast<sal_uInt8*>(t->tables[i]) + t->tlens[i] > t->ptr + t->fsize )
{
@@ -1706,7 +1706,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
table = getTable(t, O_loca);
t->goffsets = static_cast<sal_uInt32 *>(calloc(1+t->nglyphs, sizeof(sal_uInt32)));
- assert(t->goffsets != 0);
+ assert(t->goffsets != nullptr);
for( i = 0; i <= (int)t->nglyphs; ++i )
t->goffsets[i] = indexfmt ? GetUInt32(table, i << 2, 1) : (sal_uInt32)GetUInt16(table, i << 1, 1) << 1;
@@ -1716,17 +1716,17 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
t->nglyphs = k;
t->goffsets = static_cast<sal_uInt32 *>(calloc(1+t->nglyphs, sizeof(sal_uInt32)));
/* TODO: implement to get subsetting */
- assert(t->goffsets != 0);
+ assert(t->goffsets != nullptr);
} else {
CloseTTFont(t);
return SF_TTFORMAT;
}
table = getTable(t, O_hhea);
- t->numberOfHMetrics = (table != 0) ? GetUInt16(table, 34, 1) : 0;
+ t->numberOfHMetrics = (table != nullptr) ? GetUInt16(table, 34, 1) : 0;
table = getTable(t, O_vhea);
- t->numOfLongVerMetrics = (table != 0) ? GetUInt16(table, 34, 1) : 0;
+ t->numOfLongVerMetrics = (table != nullptr) ? GetUInt16(table, 34, 1) : 0;
GetNames(t);
FindCmap(t);
@@ -1763,7 +1763,7 @@ void CloseTTFont(TrueTypeFont *ttf)
int GetTTGlyphPoints(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoint **pointArray)
{
- return GetTTGlyphOutline(ttf, glyphID, pointArray, 0, 0);
+ return GetTTGlyphOutline(ttf, glyphID, pointArray, nullptr, nullptr);
}
int GetTTGlyphComponents(TrueTypeFont *ttf, sal_uInt32 glyphID, std::vector< sal_uInt32 >& glyphlist)
@@ -1905,13 +1905,13 @@ int CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname,
for (i = 0; i < nGlyphs; i++) {
fprintf(outf, h33, i);
- int r = GetTTGlyphOutline(ttf, glyphArray[i] < ttf->nglyphs ? glyphArray[i] : 0, &pa, &metrics, 0);
+ int r = GetTTGlyphOutline(ttf, glyphArray[i] < ttf->nglyphs ? glyphArray[i] : 0, &pa, &metrics, nullptr);
if (r > 0) {
n = BSplineToPSPath(pa, r, &path);
} else {
n = 0; /* glyph might have zero contours but valid metrics ??? */
- path = 0;
+ path = nullptr;
if (r < 0) { /* glyph is not present in the font - pa array was not allocated, so no need to free it */
continue;
}
@@ -1972,7 +1972,7 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
sal_uInt32 flags)
{
TrueTypeCreator *ttcr;
- TrueTypeTable *head=0, *hhea=0, *maxp=0, *cvt=0, *prep=0, *glyf=0, *fpgm=0, *cmap=0, *name=0, *post = 0, *os2 = 0;
+ TrueTypeTable *head=nullptr, *hhea=nullptr, *maxp=nullptr, *cvt=nullptr, *prep=nullptr, *glyf=nullptr, *fpgm=nullptr, *cmap=nullptr, *name=nullptr, *post = nullptr, *os2 = nullptr;
int i;
int res;
@@ -2002,9 +2002,9 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
*/
const sal_uInt8 ptr[] = {0,'T',0,'r',0,'u',0,'e',0,'T',0,'y',0,'p',0,'e',0,'S',0,'u',0,'b',0,'s',0,'e',0,'t'};
NameRecord n1 = {1, 0, 0, 6, 14, const_cast<sal_uInt8 *>(reinterpret_cast<sal_uInt8 const *>("TrueTypeSubset"))};
- NameRecord n2 = {3, 1, 1033, 6, 28, 0};
+ NameRecord n2 = {3, 1, 1033, 6, 28, nullptr};
n2.sptr = const_cast<sal_uInt8 *>(ptr);
- name = TrueTypeTableNew_name(0, 0);
+ name = TrueTypeTableNew_name(0, nullptr);
nameAdd(name, &n1);
nameAdd(name, &n2);
} else {
@@ -2032,7 +2032,7 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
/** head **/
p = getTable(ttf, O_head);
- assert(p != 0);
+ assert(p != nullptr);
head = TrueTypeTableNew_head(GetUInt32(p, 4, 1),
GetUInt16(p, 16, 1),
GetUInt16(p, 18, 1),
@@ -2058,22 +2058,22 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
}
/** cvt **/
- if ((p = getTable(ttf, O_cvt)) != 0) {
+ if ((p = getTable(ttf, O_cvt)) != nullptr) {
cvt = TrueTypeTableNew(T_cvt, getTableSize(ttf, O_cvt), p);
}
/** prep **/
- if ((p = getTable(ttf, O_prep)) != 0) {
+ if ((p = getTable(ttf, O_prep)) != nullptr) {
prep = TrueTypeTableNew(T_prep, getTableSize(ttf, O_prep), p);
}
/** fpgm **/
- if ((p = getTable(ttf, O_fpgm)) != 0) {
+ if ((p = getTable(ttf, O_fpgm)) != nullptr) {
fpgm = TrueTypeTableNew(T_fpgm, getTableSize(ttf, O_fpgm), p);
}
/** post **/
- if ((p = getTable(ttf, O_post)) != 0) {
+ if ((p = getTable(ttf, O_post)) != nullptr) {
post = TrueTypeTableNew_post(0x00030000,
GetUInt32(p, 4, 1),
GetUInt16(p, 8, 1),
@@ -2084,7 +2084,7 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
}
if (flags & TTCF_IncludeOS2) {
- if ((p = getTable(ttf, O_OS2)) != 0) {
+ if ((p = getTable(ttf, O_OS2)) != nullptr) {
os2 = TrueTypeTableNew(T_OS2, getTableSize(ttf, O_OS2), p);
}
}
@@ -2109,7 +2109,7 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
static GlyphOffsets *GlyphOffsetsNew(sal_uInt8 *sfntP, sal_uInt32 sfntLen)
{
GlyphOffsets* res = static_cast<GlyphOffsets*>(smalloc(sizeof(GlyphOffsets)));
- sal_uInt8 *loca = NULL;
+ sal_uInt8 *loca = nullptr;
sal_uInt16 i, numTables = GetUInt16(sfntP, 4, 1);
sal_uInt32 locaLen = 0;
sal_Int16 indexToLocFormat = 0;
@@ -2260,7 +2260,7 @@ int CreateT42FromTTGlyphs(TrueTypeFont *ttf,
int nGlyphs)
{
TrueTypeCreator *ttcr;
- TrueTypeTable *head=0, *hhea=0, *maxp=0, *cvt=0, *prep=0, *glyf=0, *fpgm=0;
+ TrueTypeTable *head=nullptr, *hhea=nullptr, *maxp=nullptr, *cvt=nullptr, *prep=nullptr, *glyf=nullptr, *fpgm=nullptr;
int i;
int res;
@@ -2272,14 +2272,14 @@ int CreateT42FromTTGlyphs(TrueTypeFont *ttf,
if (nGlyphs >= 256) return SF_GLYPHNUM;
- assert(psname != 0);
+ assert(psname != nullptr);
TrueTypeCreatorNewEmpty(T_true, &ttcr);
/* head */
const sal_uInt8* p = getTable(ttf, O_head);
const sal_uInt8* headP = p;
- assert(p != 0);
+ assert(p != nullptr);
head = TrueTypeTableNew_head(GetUInt32(p, 4, 1), GetUInt16(p, 16, 1), GetUInt16(p, 18, 1), p+20, GetUInt16(p, 44, 1), GetUInt16(p, 46, 1), GetInt16(p, 48, 1));
ver = GetUInt32(p, 0, 1);
rev = GetUInt32(p, 4, 1);
@@ -2296,17 +2296,17 @@ int CreateT42FromTTGlyphs(TrueTypeFont *ttf,
maxp = TrueTypeTableNew_maxp(getTable(ttf, O_maxp), getTableSize(ttf, O_maxp));
/** cvt **/
- if ((p = getTable(ttf, O_cvt)) != 0) {
+ if ((p = getTable(ttf, O_cvt)) != nullptr) {
cvt = TrueTypeTableNew(T_cvt, getTableSize(ttf, O_cvt), p);
}
/** prep **/
- if ((p = getTable(ttf, O_prep)) != 0) {
+ if ((p = getTable(ttf, O_prep)) != nullptr) {
prep = TrueTypeTableNew(T_prep, getTableSize(ttf, O_prep), p);
}
/** fpgm **/
- if ((p = getTable(ttf, O_fpgm)) != 0) {
+ if ((p = getTable(ttf, O_fpgm)) != nullptr) {
fpgm = TrueTypeTableNew(T_fpgm, getTableSize(ttf, O_fpgm), p);
}
@@ -2372,7 +2372,7 @@ int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphA
if (ttf->cmapType == CMAP_NOT_USABLE ) return -1;
if (!nchars) return 0;
- if (glyphArray == 0) {
+ if (glyphArray == nullptr) {
cp = str;
} else {
cp = glyphArray;
@@ -2394,7 +2394,7 @@ int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphA
break;
case CMAP_MS_Unicode:
- if (glyphArray != 0) {
+ if (glyphArray != nullptr) {
memcpy(glyphArray, str, nchars * 2);
}
break;
@@ -2464,7 +2464,7 @@ bool GetSfntTable( TrueTypeFont* ttf, int nSubtableIndex,
return false;
*pRawLength = ttf->tlens[ nSubtableIndex ];
*ppRawBytes = ttf->tables[ nSubtableIndex ];
- bool bOk = (*pRawLength > 0) && (*ppRawBytes != NULL);
+ bool bOk = (*pRawLength > 0) && (*ppRawBytes != nullptr);
return bOk;
}
@@ -2484,11 +2484,11 @@ TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *gly
nTableSize = getTableSize( ttf, O_vmtx );
}
- if (!nGlyphs || !glyphArray) return 0; /* invalid parameters */
- if (!n || !pTable) return 0; /* the font does not contain the requested metrics */
+ if (!nGlyphs || !glyphArray) return nullptr; /* invalid parameters */
+ if (!n || !pTable) return nullptr; /* the font does not contain the requested metrics */
TTSimpleGlyphMetrics* res = static_cast<TTSimpleGlyphMetrics*>(calloc(nGlyphs, sizeof(TTSimpleGlyphMetrics)));
- assert(res != 0);
+ assert(res != nullptr);
const int UPEm = ttf->unitsPerEm;
for( int i = 0; i < nGlyphs; ++i) {
@@ -2524,14 +2524,14 @@ TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *gly
TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont * ttf, sal_uInt16 firstChar, int nChars, bool vertical)
{
- TTSimpleGlyphMetrics *res = 0;
+ TTSimpleGlyphMetrics *res = nullptr;
int i, n;
sal_uInt16* str = static_cast<sal_uInt16*>(malloc(nChars * 2));
- assert(str != 0);
+ assert(str != nullptr);
for (i=0; i<nChars; i++) str[i] = (sal_uInt16)(firstChar + i);
- if ((n = MapString(ttf, str, nChars, 0, vertical)) != -1) {
+ if ((n = MapString(ttf, str, nChars, nullptr, vertical)) != -1) {
res = GetTTSimpleGlyphMetrics(ttf, str, n, vertical);
}
@@ -2620,26 +2620,26 @@ GlyphData *GetTTRawGlyphData(TrueTypeFont *ttf, sal_uInt32 glyphID)
int n;
if( glyphID >= ttf->nglyphs )
- return 0;
+ return nullptr;
/* #127161# check the glyph offsets */
sal_uInt32 length = getTableSize( ttf, O_glyf );
if( length < ttf->goffsets[ glyphID+1 ] )
- return 0;
+ return nullptr;
length = ttf->goffsets[glyphID+1] - ttf->goffsets[glyphID];
- GlyphData* d = static_cast<GlyphData*>(malloc(sizeof(GlyphData))); assert(d != 0);
+ GlyphData* d = static_cast<GlyphData*>(malloc(sizeof(GlyphData))); assert(d != nullptr);
if (length > 0) {
const sal_uInt8* srcptr = glyf + ttf->goffsets[glyphID];
const size_t nChunkLen = ((length + 1) & ~1);
- d->ptr = static_cast<sal_uInt8*>(malloc(nChunkLen)); assert(d->ptr != 0);
+ d->ptr = static_cast<sal_uInt8*>(malloc(nChunkLen)); assert(d->ptr != nullptr);
memcpy(d->ptr, srcptr, length);
memset(d->ptr + length, 0, nChunkLen - length);
d->compflag = (GetInt16( srcptr, 0, 1 ) < 0);
} else {
- d->ptr = 0;
+ d->ptr = nullptr;
d->compflag = false;
}
@@ -2694,7 +2694,7 @@ int GetTTNameRecords(TrueTypeFont *ttf, NameRecord **nr)
int nStrBase = GetUInt16(table, 4, 1);
int i;
- *nr = 0;
+ *nr = nullptr;
if (n == 0) return 0;
const sal_uInt32 remaining_table_size = nTableSize-6;
@@ -2729,7 +2729,7 @@ int GetTTNameRecords(TrueTypeFont *ttf, NameRecord **nr)
int nStrOffset = GetUInt16(table, nLargestFixedOffsetPos, 1);
if (rec[i].slen) {
if( nStrBase+nStrOffset+rec[i].slen >= nTableSize ) {
- rec[i].sptr = 0;
+ rec[i].sptr = nullptr;
rec[i].slen = 0;
continue;
}
@@ -2740,16 +2740,16 @@ int GetTTNameRecords(TrueTypeFont *ttf, NameRecord **nr)
const size_t available_space = rec_string > end_table ? 0 : (end_table - rec_string);
if (rec[i].slen <= available_space)
{
- rec[i].sptr = static_cast<sal_uInt8 *>(malloc(rec[i].slen)); assert(rec[i].sptr != 0);
+ rec[i].sptr = static_cast<sal_uInt8 *>(malloc(rec[i].slen)); assert(rec[i].sptr != nullptr);
memcpy(rec[i].sptr, rec_string, rec[i].slen);
}
else
{
- rec[i].sptr = 0;
+ rec[i].sptr = nullptr;
rec[i].slen = 0;
}
} else {
- rec[i].sptr = 0;
+ rec[i].sptr = nullptr;
}
// some fonts have 3.0 names => fix them to 3.1
if( (rec[i].platformID == 3) && (rec[i].encodingID == 0) )
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index a916c2d445bd..16e831fdea31 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -77,7 +77,7 @@ typedef struct {
_inline sal_Int16 GetInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendian)
{
sal_Int16 t;
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
t = (ptr+offset)[0] << 8 | (ptr+offset)[1];
@@ -91,7 +91,7 @@ _inline sal_Int16 GetInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendi
_inline sal_uInt16 GetUInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendian)
{
sal_uInt16 t;
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
t = (ptr+offset)[0] << 8 | (ptr+offset)[1];
@@ -104,7 +104,7 @@ _inline sal_uInt16 GetUInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigen
_inline void PutInt16(sal_Int16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
{
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
ptr[offset] = (sal_uInt8)((val >> 8) & 0xFF);
@@ -117,7 +117,7 @@ _inline void PutInt16(sal_Int16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bige
_inline void PutUInt16(sal_uInt16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
{
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
ptr[offset] = (sal_uInt8)((val >> 8) & 0xFF);
@@ -130,7 +130,7 @@ _inline void PutUInt16(sal_uInt16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bi
_inline void PutUInt32(sal_uInt32 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
{
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
ptr[offset] = (sal_uInt8)((val >> 24) & 0xFF);
@@ -183,14 +183,14 @@ static sal_uInt32 CheckSum(sal_uInt32 *ptr, sal_uInt32 length)
_inline void *smalloc(sal_uInt32 size)
{
void *res = malloc(size);
- assert(res != 0);
+ assert(res != nullptr);
return res;
}
_inline void *scalloc(sal_uInt32 n, sal_uInt32 size)
{
void *res = calloc(n, size);
- assert(res != 0);
+ assert(res != nullptr);
return res;
}
@@ -212,7 +212,7 @@ void TrueTypeCreatorNewEmpty(sal_uInt32 tag, TrueTypeCreator **_this)
int AddTable(TrueTypeCreator *_this, TrueTypeTable *table)
{
- if (table != 0) {
+ if (table != nullptr) {
listAppend(_this->tables, table);
}
return SF_OK;
@@ -247,7 +247,7 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, sal_uInt32 *length)
sal_uInt16 searchRange=1, entrySelector=0, rangeShift;
sal_uInt32 s, offset, checkSumAdjustment = 0;
sal_uInt32 *p;
- sal_uInt8 *head = NULL; /* saved pointer to the head table data for checkSumAdjustment calculation */
+ sal_uInt8 *head = nullptr; /* saved pointer to the head table data for checkSumAdjustment calculation */
if (listIsEmpty(_this->tables)) return SF_TTFORMAT;
@@ -329,7 +329,7 @@ int StreamToFile(TrueTypeCreator *_this, const char* fname)
FILE* fd;
if ((r = StreamToMemory(_this, &ptr, &length)) != SF_OK) return r;
- if (fname && (fd = fopen(fname, "wb")) != NULL)
+ if (fname && (fd = fopen(fname, "wb")) != nullptr)
{
if (fwrite(ptr, 1, length, fd) != length) {
r = SF_FILEIO;
@@ -413,7 +413,7 @@ static sal_uInt8 *ttmalloc(sal_uInt32 nbytes)
n = (nbytes + 3) & (sal_uInt32) ~3;
sal_uInt8* res = static_cast<sal_uInt8*>(calloc(n, 1));
- assert(res != 0);
+ assert(res != nullptr);
return res;
}
@@ -545,8 +545,8 @@ static struct {
static int GetRawData_generic(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt32 *tag)
{
- assert(_this != 0);
- assert(_this->data != 0);
+ assert(_this != nullptr);
+ assert(_this->data != nullptr);
*ptr = static_cast<tdata_generic *>(_this->data)->ptr;
*len = static_cast<tdata_generic *>(_this->data)->nbytes;
@@ -577,7 +577,7 @@ static int GetRawData_loca(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
{
tdata_loca *p;
- assert(_this->data != 0);
+ assert(_this->data != nullptr);
p = static_cast<tdata_loca *>(_this->data);
@@ -606,7 +606,7 @@ static int GetRawData_glyf(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
/* sal_uInt16 curID = 0; */ /* to check if glyph IDs are sequential and start from zero */
sal_uInt8 *p;
- *ptr = 0;
+ *ptr = nullptr;
*len = 0;
*tag = 0;
@@ -706,9 +706,9 @@ static int GetRawData_cmap(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
sal_uInt8 *cmap;
sal_uInt32 coffset;
- assert(_this != 0);
+ assert(_this != nullptr);
t = static_cast<table_cmap *>(_this->data);
- assert(t != 0);
+ assert(t != nullptr);
assert(t->n != 0);
sal_uInt8** subtables = static_cast<sal_uInt8**>(scalloc(t->n, sizeof(sal_uInt8 *)));
@@ -753,13 +753,13 @@ static int GetRawData_name(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
int stringLen = 0;
sal_uInt8 *p1, *p2;
- *ptr = 0;
+ *ptr = nullptr;
*len = 0;
*tag = 0;
- assert(_this != 0);
+ assert(_this != nullptr);
l = static_cast<list>(_this->data);
- assert(l != 0);
+ assert(l != nullptr);
if ((n = (sal_Int16)listCount(l)) == 0) return TTCR_NONAMES;
@@ -820,7 +820,7 @@ static int GetRawData_name(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
static int GetRawData_post(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt32 *tag)
{
tdata_post *p = static_cast<tdata_post *>(_this->data);
- sal_uInt8 *post = 0;
+ sal_uInt8 *post = nullptr;
sal_uInt32 postLen = 0;
int ret;
@@ -891,12 +891,12 @@ TrueTypeTable *TrueTypeTableNew(sal_uInt32 tag,
pdata->ptr = ttmalloc(nbytes);
memcpy(pdata->ptr, ptr, nbytes);
} else {
- pdata->ptr = 0;
+ pdata->ptr = nullptr;
}
table->tag = 0;
table->data = pdata;
- table->rawdata = 0;
+ table->rawdata = nullptr;
return table;
}
@@ -909,7 +909,7 @@ TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
sal_uInt16 lowestRecPPEM,
sal_Int16 fontDirectionHint)
{
- assert(created != 0);
+ assert(created != nullptr);
TrueTypeTable* table = static_cast<TrueTypeTable*>(smalloc(sizeof(TrueTypeTable)));
sal_uInt8* ptr = ttmalloc(TABLESIZE_head);
@@ -928,7 +928,7 @@ TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
table->data = static_cast<void *>(ptr);
table->tag = T_head;
- table->rawdata = 0;
+ table->rawdata = nullptr;
return table;
}
@@ -957,7 +957,7 @@ TrueTypeTable *TrueTypeTableNew_hhea(sal_Int16 ascender,
table->data = static_cast<void *>(ptr);
table->tag = T_hhea;
- table->rawdata = 0;
+ table->rawdata = nullptr;
return table;
}
@@ -968,10 +968,10 @@ TrueTypeTable *TrueTypeTableNew_loca()
table->data = smalloc(sizeof(tdata_loca));
static_cast<tdata_loca *>(table->data)->nbytes = 0;
- static_cast<tdata_loca *>(table->data)->ptr = 0;
+ static_cast<tdata_loca *>(table->data)->ptr = nullptr;
table->tag = T_loca;
- table->rawdata = 0;
+ table->rawdata = nullptr;
return table;
}
@@ -986,7 +986,7 @@ TrueTypeTable *TrueTypeTableNew_maxp( const sal_uInt8* maxp, int size)
}
table->tag = T_maxp;
- table->rawdata = 0;
+ table->rawdata = nullptr;
return table;
}
@@ -996,12 +996,12 @@ TrueTypeTable *TrueTypeTableNew_glyf()
TrueTypeTable* table = static_cast<TrueTypeTable*>(smalloc(sizeof(TrueTypeTable)));
list l = listNewEmpty();
- assert(l != 0);
+ assert(l != nullptr);
listSetElementDtor(l, FreeGlyphData);
table->data = l;
- table->rawdata = 0;
+ table->rawdata = nullptr;
table->tag = T_glyf;
return table;
@@ -1019,7 +1019,7 @@ TrueTypeTable *TrueTypeTableNew_cmap()
table->data = cmap;
- table->rawdata = 0;
+ table->rawdata = nullptr;
table->tag = T_cmap;
return table;
@@ -1027,7 +1027,7 @@ TrueTypeTable *TrueTypeTableNew_cmap()
static void DisposeNameRecord(void *ptr)
{
- if (ptr != 0) {
+ if (ptr != nullptr) {
NameRecord *nr = static_cast<NameRecord *>(ptr);
if (nr->sptr) free(nr->sptr);
free(ptr);
@@ -1053,7 +1053,7 @@ TrueTypeTable *TrueTypeTableNew_name(int n, NameRecord *nr)
TrueTypeTable* table = static_cast<TrueTypeTable*>(smalloc(sizeof(TrueTypeTable)));
list l = listNewEmpty();
- assert(l != 0);
+ assert(l != nullptr);
listSetElementDtor(l, DisposeNameRecord);
@@ -1065,7 +1065,7 @@ TrueTypeTable *TrueTypeTableNew_name(int n, NameRecord *nr)
}
table->data = l;
- table->rawdata = 0;
+ table->rawdata = nullptr;
table->tag = T_name;
return table;
@@ -1086,10 +1086,10 @@ TrueTypeTable *TrueTypeTableNew_post(sal_uInt32 format,
post->underlinePosition = underlinePosition;
post->underlineThickness = underlineThickness;
post->isFixedPitch = isFixedPitch;
- post->ptr = 0;
+ post->ptr = nullptr;
table->data = post;
- table->rawdata = 0;
+ table->rawdata = nullptr;
table->tag = T_post;
return table;
@@ -1100,16 +1100,16 @@ int GetRawData(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt3
/* XXX do a binary search */
unsigned int i;
- assert(_this != 0);
- assert(ptr != 0);
- assert(len != 0);
- assert(tag != 0);
+ assert(_this != nullptr);
+ assert(ptr != nullptr);
+ assert(len != nullptr);
+ assert(tag != nullptr);
- *ptr = 0; *len = 0; *tag = 0;
+ *ptr = nullptr; *len = 0; *tag = 0;
if (_this->rawdata) {
free(_this->rawdata);
- _this->rawdata = 0;
+ _this->rawdata = nullptr;
}
for(i=0; i < sizeof(vtable2)/sizeof(*vtable2); i++) {
@@ -1128,10 +1128,10 @@ void cmapAdd(TrueTypeTable *table, sal_uInt32 id, sal_uInt32 c, sal_uInt32 g)
table_cmap *t;
CmapSubTable *s;
- assert(table != 0);
+ assert(table != nullptr);
assert(table->tag == T_cmap);
- t = static_cast<table_cmap *>(table->data); assert(t != 0);
- s = t->s; assert(s != 0);
+ t = static_cast<table_cmap *>(table->data); assert(t != nullptr);
+ s = t->s; assert(s != nullptr);
found = 0;
@@ -1173,8 +1173,8 @@ void cmapAdd(TrueTypeTable *table, sal_uInt32 id, sal_uInt32 c, sal_uInt32 g)
if (s[i].n == s[i].m) {
sal_uInt32* tmp1 = static_cast<sal_uInt32*>(scalloc(s[i].m + CMAP_PAIR_INCR, sizeof(sal_uInt32)));
sal_uInt32* tmp2 = static_cast<sal_uInt32*>(scalloc(s[i].m + CMAP_PAIR_INCR, sizeof(sal_uInt32)));
- assert(tmp1 != 0);
- assert(tmp2 != 0);
+ assert(tmp1 != nullptr);
+ assert(tmp2 != nullptr);
memcpy(tmp1, s[i].xc, sizeof(sal_uInt32) * s[i].m);
memcpy(tmp2, s[i].xg, sizeof(sal_uInt32) * s[i].m);
s[i].m += CMAP_PAIR_INCR;
@@ -1195,7 +1195,7 @@ sal_uInt32 glyfAdd(TrueTypeTable *table, GlyphData *glyphdata, TrueTypeFont *fnt
sal_uInt32 currentID;
int ret, n, ncomponents;
- assert(table != 0);
+ assert(table != nullptr);
assert(table->tag == T_glyf);
if (!glyphdata) return (sal_uInt32)~0;
@@ -1245,7 +1245,7 @@ sal_uInt32 glyfAdd(TrueTypeTable *table, GlyphData *glyphdata, TrueTypeFont *fnt
sal_uInt32 glyfCount(const TrueTypeTable *table)
{
- assert(table != 0);
+ assert(table != nullptr);
assert(table->tag == T_glyf);
return listCount(static_cast<list>(table->data));
}
@@ -1254,7 +1254,7 @@ void nameAdd(TrueTypeTable *table, NameRecord *nr)
{
list l;
- assert(table != 0);
+ assert(table != nullptr);
assert(table->tag == T_name);
l = static_cast<list>(table->data);
@@ -1264,7 +1264,7 @@ void nameAdd(TrueTypeTable *table, NameRecord *nr)
static TrueTypeTable *FindTable(TrueTypeCreator *tt, sal_uInt32 tag)
{
- if (listIsEmpty(tt->tables)) return 0;
+ if (listIsEmpty(tt->tables)) return nullptr;
listToFirst(tt->tables);
@@ -1274,7 +1274,7 @@ static TrueTypeTable *FindTable(TrueTypeCreator *tt, sal_uInt32 tag)
}
} while (listNext(tt->tables));
- return 0;
+ return nullptr;
}
/* This function processes all the tables and synchronizes them before creating
@@ -1432,7 +1432,7 @@ static void ProcessTables(TrueTypeCreator *tt)
glyf->rawdata = glyfPtr;
- loca = TrueTypeTableNew_loca(); assert(loca != 0);
+ loca = TrueTypeTableNew_loca(); assert(loca != nullptr);
static_cast<tdata_loca *>(loca->data)->ptr = locaPtr;
static_cast<tdata_loca *>(loca->data)->nbytes = locaLen;
@@ -1458,7 +1458,7 @@ static void ProcessTables(TrueTypeCreator *tt)
/*
* Generate an htmx table and update hhea table
*/
- hhea = FindTable(tt, T_hhea); assert(hhea != 0);
+ hhea = FindTable(tt, T_hhea); assert(hhea != nullptr);
hheaPtr = static_cast<sal_uInt8 *>(hhea->data);
if (nGlyphs > 2) {
for (i = nGlyphs - 1; i > 0; i--) {
@@ -1509,7 +1509,7 @@ extern "C"
/* XXX do a binary search */
unsigned int i;
- assert(_this != 0);
+ assert(_this != nullptr);
if (_this->rawdata) free(_this->rawdata);
diff --git a/vcl/source/fontsubset/xlat.cxx b/vcl/source/fontsubset/xlat.cxx
index 53daa33bf744..3716a1cd153e 100644
--- a/vcl/source/fontsubset/xlat.cxx
+++ b/vcl/source/fontsubset/xlat.cxx
@@ -43,8 +43,8 @@ ConverterCache::ConverterCache()
{
for( int i = 0; i <= MAX_CVT_SELECT; ++i)
{
- maConverterCache[i] = NULL;
- maContexts[i] = NULL;
+ maConverterCache[i] = nullptr;
+ maContexts[i] = nullptr;
}
}
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 0630a9c809cc..911e0ca0a051 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -246,7 +246,7 @@ bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDe
)
{
ImplAnimView* pView;
- ImplAnimView* pMatch = NULL;
+ ImplAnimView* pMatch = nullptr;
for( size_t i = 0; i < maViewList.size(); ++i )
{
@@ -263,7 +263,7 @@ bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDe
{
delete maViewList[ i ];
maViewList.erase( maViewList.begin() + i );
- pView = NULL;
+ pView = nullptr;
}
break;
@@ -421,7 +421,7 @@ IMPL_LINK_NOARG_TYPED(Animation, ImplTimeoutHdl, Timer *, void)
ImplRestartTimer( 10 );
else
{
- AnimationBitmap* pStepBmp = (++mnPos < maList.size()) ? maList[ mnPos ] : NULL;
+ AnimationBitmap* pStepBmp = (++mnPos < maList.size()) ? maList[ mnPos ] : nullptr;
if( !pStepBmp )
{
@@ -799,8 +799,8 @@ SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation )
return rIStm;
}
-AInfo::AInfo() : pOutDev( NULL ),
- pViewData( NULL ),
+AInfo::AInfo() : pOutDev( nullptr ),
+ pViewData( nullptr ),
nExtraData( 0L ),
bWithSize( false ),
bPause( false ) {}
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index e8bf0dd23595..6b675edc4f5e 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -35,12 +35,12 @@
#include <memory>
Bitmap::Bitmap() :
- mpImpBmp( NULL )
+ mpImpBmp( nullptr )
{
}
Bitmap::Bitmap( const ResId& rResId ) :
- mpImpBmp( NULL )
+ mpImpBmp( nullptr )
{
const BitmapEx aBmpEx( rResId );
@@ -70,7 +70,7 @@ Bitmap::Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalett
if( rSizePixel.Width() && rSizePixel.Height() )
{
BitmapPalette aPal;
- BitmapPalette* pRealPal = NULL;
+ BitmapPalette* pRealPal = nullptr;
if( nBitCount <= 8 )
{
@@ -125,7 +125,7 @@ Bitmap::Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalett
mpImpBmp->ImplCreate( rSizePixel, nBitCount, pRealPal ? *pRealPal : aPal );
}
else
- mpImpBmp = NULL;
+ mpImpBmp = nullptr;
}
Bitmap::~Bitmap()
@@ -255,7 +255,7 @@ void Bitmap::SetEmpty()
maPrefSize = Size();
ImplReleaseRef();
- mpImpBmp = NULL;
+ mpImpBmp = nullptr;
}
Size Bitmap::GetSizePixel() const
@@ -305,7 +305,7 @@ void Bitmap::ImplReleaseRef()
else
{
delete mpImpBmp;
- mpImpBmp = NULL;
+ mpImpBmp = nullptr;
}
}
}
@@ -361,7 +361,7 @@ BitmapInfoAccess* Bitmap::AcquireInfoAccess()
if( !*pInfoAccess )
{
delete pInfoAccess;
- pInfoAccess = NULL;
+ pInfoAccess = nullptr;
}
return pInfoAccess;
@@ -374,7 +374,7 @@ BitmapReadAccess* Bitmap::AcquireReadAccess()
if( !*pReadAccess )
{
delete pReadAccess;
- pReadAccess = NULL;
+ pReadAccess = nullptr;
}
return pReadAccess;
@@ -387,7 +387,7 @@ BitmapWriteAccess* Bitmap::AcquireWriteAccess()
if( !*pWriteAccess )
{
delete pWriteAccess;
- pWriteAccess = NULL;
+ pWriteAccess = nullptr;
}
return pWriteAccess;
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 85c64a11193f..9359fb981308 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -704,7 +704,7 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color* pExtColor)
std::vector<ImpErrorQuad> pErrQuad1(nWidth);
std::vector<ImpErrorQuad> pErrQuad2(nWidth);
ImpErrorQuad* pQLine1 = pErrQuad1.data();
- ImpErrorQuad* pQLine2 = NULL;
+ ImpErrorQuad* pQLine2 = nullptr;
long nYTmp = 0L;
sal_uInt8 cIndex;
bool bQ1 = true;
@@ -1394,16 +1394,16 @@ namespace
if(pReadAcc)
{
- double* pWeights = 0;
- sal_uInt32* pPixels = 0;
- sal_uInt32* pCount = 0;
+ double* pWeights = nullptr;
+ sal_uInt32* pPixels = nullptr;
+ sal_uInt32* pCount = nullptr;
sal_uInt32 aNumberOfContributions(0);
const sal_uInt32 nHeight(rSource.GetSizePixel().Height());
ImplCalculateContributions(nWidth, nNewWidth, aNumberOfContributions, pWeights, pPixels, pCount, aKernel);
rTarget = Bitmap(Size(nNewWidth, nHeight), 24);
BitmapWriteAccess* pWriteAcc = rTarget.AcquireWriteAccess();
- bool bResult(0 != pWriteAcc);
+ bool bResult(nullptr != pWriteAcc);
if(bResult)
{
@@ -1485,16 +1485,16 @@ namespace
if(pReadAcc)
{
- double* pWeights = 0;
- sal_uInt32* pPixels = 0;
- sal_uInt32* pCount = 0;
+ double* pWeights = nullptr;
+ sal_uInt32* pPixels = nullptr;
+ sal_uInt32* pCount = nullptr;
sal_uInt32 aNumberOfContributions(0);
const sal_uInt32 nWidth(rSource.GetSizePixel().Width());
ImplCalculateContributions(nHeight, nNewHeight, aNumberOfContributions, pWeights, pPixels, pCount, aKernel);
rTarget = Bitmap(Size(nWidth, nNewHeight), 24);
BitmapWriteAccess* pWriteAcc = rTarget.AcquireWriteAccess();
- bool bResult(0 != pWriteAcc);
+ bool bResult(nullptr != pWriteAcc);
if(pWriteAcc)
{
@@ -1916,7 +1916,7 @@ bool Bitmap::ImplDitherFloyd16()
std::unique_ptr<ImpErrorQuad[]> pErrQuad1(new ImpErrorQuad[ nWidth ]);
std::unique_ptr<ImpErrorQuad[]> pErrQuad2(new ImpErrorQuad[ nWidth ]);
ImpErrorQuad* pQLine1 = pErrQuad1.get();
- ImpErrorQuad* pQLine2 = 0;
+ ImpErrorQuad* pQLine2 = nullptr;
long nYTmp = 0L;
bool bQ1 = true;
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index d669f8a563ee..3d56db313825 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -777,7 +777,7 @@ bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam )
if( GetBitCount() > 8 )
{
- pNewBmp = NULL;
+ pNewBmp = nullptr;
pReadAcc = pWriteAcc = AcquireWriteAccess();
}
else
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 8fa1211498c5..5f836a20351b 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -95,7 +95,7 @@ BitmapEx::BitmapEx( const ResId& rResId ) :
eTransparent( TRANSPARENT_NONE ),
bAlpha ( false )
{
- ResMgr* pResMgr = NULL;
+ ResMgr* pResMgr = nullptr;
ResMgr::GetResourceSkipHeader( rResId.SetRT( RSC_BITMAP ), &pResMgr );
pResMgr->ReadLong();
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index 87bc60f1be46..74edb56856a4 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -28,14 +28,14 @@
#include <string.h>
BitmapInfoAccess::BitmapInfoAccess( Bitmap& rBitmap, BitmapAccessMode nMode ) :
- mpBuffer ( NULL ),
+ mpBuffer ( nullptr ),
mnAccessMode ( nMode )
{
ImplCreate( rBitmap );
}
BitmapInfoAccess::BitmapInfoAccess( Bitmap& rBitmap ) :
- mpBuffer ( NULL ),
+ mpBuffer ( nullptr ),
mnAccessMode ( BITMAP_INFO_ACCESS )
{
ImplCreate( rBitmap );
@@ -93,7 +93,7 @@ void BitmapInfoAccess::ImplDestroy()
if( mpBuffer && pImpBmp )
{
pImpBmp->ImplReleaseBuffer( mpBuffer, mnAccessMode );
- mpBuffer = NULL;
+ mpBuffer = nullptr;
}
}
@@ -104,18 +104,18 @@ sal_uInt16 BitmapInfoAccess::GetBestPaletteIndex( const BitmapColor& rBitmapColo
BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, BitmapAccessMode nMode ) :
BitmapInfoAccess( rBitmap, nMode ),
- mpScanBuf ( NULL ),
- mFncGetPixel ( NULL ),
- mFncSetPixel ( NULL )
+ mpScanBuf ( nullptr ),
+ mFncGetPixel ( nullptr ),
+ mFncSetPixel ( nullptr )
{
ImplInitScanBuffer( rBitmap );
}
BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap ) :
BitmapInfoAccess( rBitmap, BITMAP_READ_ACCESS ),
- mpScanBuf ( NULL ),
- mFncGetPixel ( NULL ),
- mFncSetPixel ( NULL )
+ mpScanBuf ( nullptr ),
+ mFncGetPixel ( nullptr ),
+ mFncSetPixel ( nullptr )
{
ImplInitScanBuffer( rBitmap );
}
@@ -162,17 +162,17 @@ void BitmapReadAccess::ImplInitScanBuffer( Bitmap& rBitmap )
if (!bOk)
{
delete[] mpScanBuf;
- mpScanBuf = NULL;
+ mpScanBuf = nullptr;
pImpBmp->ImplReleaseBuffer( mpBuffer, mnAccessMode );
- mpBuffer = NULL;
+ mpBuffer = nullptr;
}
}
void BitmapReadAccess::ImplClearScanBuffer()
{
delete[] mpScanBuf;
- mpScanBuf = NULL;
+ mpScanBuf = nullptr;
}
bool BitmapReadAccess::ImplSetAccessPointers( sal_uLong nFormat )
@@ -467,7 +467,7 @@ void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
case( BMP_FORMAT_32BIT_TC_MASK ): pFncGetPixel = GetPixelFor_32BIT_TC_MASK; break;
default:
- pFncGetPixel = NULL;
+ pFncGetPixel = nullptr;
break;
}
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index c94fb0060631..5d680c76ba72 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -83,7 +83,7 @@ void BitmapWriteAccess::Erase( const Color& rColor )
return;
// use the canonical method to clear the bitmap
- BitmapColor* pOldFillColor = mpFillColor ? new BitmapColor(*mpFillColor) : NULL;
+ BitmapColor* pOldFillColor = mpFillColor ? new BitmapColor(*mpFillColor) : nullptr;
const Point aPoint;
const Rectangle aRect(aPoint, maBitmap.GetSizePixel());
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index c5793b3e2578..76b2aa54d750 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -30,7 +30,7 @@ typedef unsigned char PIXBYTE;
class BasePixelPtr
{
public:
- explicit BasePixelPtr( PIXBYTE* p = NULL ) : mpPixel( p ) {}
+ explicit BasePixelPtr( PIXBYTE* p = nullptr ) : mpPixel( p ) {}
void SetRawPtr( PIXBYTE* pRawPtr ) { mpPixel = pRawPtr; }
PIXBYTE* GetRawPtr() const { return mpPixel; }
void AddByteOffset( int nByteOffset ) { mpPixel += nByteOffset; }
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 2d939bb5f66e..7452856e3d0c 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -1141,7 +1141,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
LineInfo* pLineInfo;
if (aLIStack.empty())
- pLineInfo = NULL;
+ pLineInfo = nullptr;
else
{
pLineInfo = aLIStack.top();
@@ -1332,7 +1332,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
rIStm.Read( pData, nDataSize );
}
else
- pData = NULL;
+ pData = nullptr;
rIStm.ReadInt32( nFollowingActionCount );
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -2093,7 +2093,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
Color* pCol;
if (rLineColStack.empty())
- pCol = NULL;
+ pCol = nullptr;
else
{
pCol = rLineColStack.top();
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 05bb8f2353b1..e281498f3fc3 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -770,7 +770,7 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon
return false;
}
Bitmap aNewBmpAlpha;
- BitmapWriteAccess* pAccAlpha = 0;
+ BitmapWriteAccess* pAccAlpha = nullptr;
bool bAlphaPossible(pBmpAlpha && aHeader.nBitCount == 32);
if (bAlphaPossible)
@@ -797,8 +797,8 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon
sal_uInt16 nColors(0);
SvStream* pIStm;
- SvMemoryStream* pMemStm = NULL;
- sal_uInt8* pData = NULL;
+ SvMemoryStream* pMemStm = nullptr;
+ sal_uInt8* pData = nullptr;
if (aHeader.nBitCount <= 8)
{
@@ -1494,12 +1494,12 @@ bool ImplReadDIB(
{
if(ImplReadDIBFileHeader(rIStm, nOffset))
{
- bRet = ImplReadDIBBody(rIStm, rTarget, nOffset >= DIBV5HEADERSIZE ? pTargetAlpha : 0, nOffset);
+ bRet = ImplReadDIBBody(rIStm, rTarget, nOffset >= DIBV5HEADERSIZE ? pTargetAlpha : nullptr, nOffset);
}
}
else
{
- bRet = ImplReadDIBBody(rIStm, rTarget, 0, nOffset, bMSOFormat);
+ bRet = ImplReadDIBBody(rIStm, rTarget, nullptr, nOffset, bMSOFormat);
}
if(!bRet)
@@ -1530,7 +1530,7 @@ bool ImplWriteDIB(
if(aSizePix.Width() && aSizePix.Height())
{
BitmapReadAccess* pAcc = const_cast< Bitmap& >(rSource).AcquireReadAccess();
- BitmapReadAccess* pAccAlpha = 0;
+ BitmapReadAccess* pAccAlpha = nullptr;
const SvStreamEndian nOldFormat(rOStm.GetEndian());
const sal_uLong nOldPos(rOStm.Tell());
@@ -1554,7 +1554,7 @@ bool ImplWriteDIB(
{
if(bFileHeader)
{
- if(ImplWriteDIBFileHeader(rOStm, *pAcc, 0 != pSourceAlpha))
+ if(ImplWriteDIBFileHeader(rOStm, *pAcc, nullptr != pSourceAlpha))
{
bRet = ImplWriteDIBBody(rSource, rOStm, *pAcc, pAccAlpha, bCompressed);
}
@@ -1590,7 +1590,7 @@ bool ReadDIB(
bool bFileHeader,
bool bMSOFormat)
{
- return ImplReadDIB(rTarget, 0, rIStm, bFileHeader, bMSOFormat);
+ return ImplReadDIB(rTarget, nullptr, rIStm, bFileHeader, bMSOFormat);
}
bool ReadDIBBitmapEx(
@@ -1598,7 +1598,7 @@ bool ReadDIBBitmapEx(
SvStream& rIStm)
{
Bitmap aBmp;
- bool bRetval(ImplReadDIB(aBmp, 0, rIStm, true) && !rIStm.GetError());
+ bool bRetval(ImplReadDIB(aBmp, nullptr, rIStm, true) && !rIStm.GetError());
if(bRetval)
{
@@ -1626,7 +1626,7 @@ bool ReadDIBBitmapEx(
{
Bitmap aMask;
- bRetval = ImplReadDIB(aMask, 0, rIStm, true);
+ bRetval = ImplReadDIB(aMask, nullptr, rIStm, true);
if(bRetval)
{
@@ -1692,14 +1692,14 @@ bool WriteDIB(
bool bCompressed,
bool bFileHeader)
{
- return ImplWriteDIB(rSource, 0, rOStm, bCompressed, bFileHeader);
+ return ImplWriteDIB(rSource, nullptr, rOStm, bCompressed, bFileHeader);
}
bool WriteDIBBitmapEx(
const BitmapEx& rSource,
SvStream& rOStm)
{
- if(ImplWriteDIB(rSource.GetBitmap(), 0, rOStm, true, true))
+ if(ImplWriteDIB(rSource.GetBitmap(), nullptr, rOStm, true, true))
{
rOStm.WriteUInt32( 0x25091962 );
rOStm.WriteUInt32( 0xACB20201 );
@@ -1707,7 +1707,7 @@ bool WriteDIBBitmapEx(
if(TRANSPARENT_BITMAP == rSource.eTransparent)
{
- return ImplWriteDIB(rSource.aMask, 0, rOStm, true, true);
+ return ImplWriteDIB(rSource.aMask, nullptr, rOStm, true, true);
}
else if(TRANSPARENT_COLOR == rSource.eTransparent)
{
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx
index 6a4f79260d99..fa7fb59eee5c 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -109,7 +109,7 @@ bool EmbeddedFontsHelper::addEmbeddedFont( uno::Reference< io::XInputStream > st
if( eot )
{
unsigned uncompressedFontSize = 0;
- unsigned char *nakedPointerToUncompressedFont = NULL;
+ unsigned char *nakedPointerToUncompressedFont = nullptr;
libeot::EOTMetadata eotMetadata;
libeot::EOTError uncompressError =
libeot::EOT2ttf_buffer( reinterpret_cast<unsigned char *>(&fontData[0]), fontData.size(), &eotMetadata, &nakedPointerToUncompressedFont, &uncompressedFontSize );
@@ -231,7 +231,7 @@ OUString EmbeddedFontsHelper::fontFileUrl( const OUString& familyName, FontFamil
PhysicalFontCollection fonts;
graphics->GetDevFontList( &fonts );
std::unique_ptr< ImplGetDevFontList > fontInfo( fonts.GetDevFontList());
- PhysicalFontFace* selected = NULL;
+ PhysicalFontFace* selected = nullptr;
for( int i = 0;
i < fontInfo->Count();
++i )
@@ -261,11 +261,11 @@ OUString EmbeddedFontsHelper::fontFileUrl( const OUString& familyName, FontFamil
}
}
}
- if( selected != NULL )
+ if( selected != nullptr )
{
FontSubsetInfo info;
long size;
- if( const void* data = graphics->GetEmbedFontData( selected, NULL, NULL, 0, info, &size ))
+ if( const void* data = graphics->GetEmbedFontData( selected, nullptr, nullptr, 0, info, &size ))
{
if( sufficientTTFRights( data, size, rights ))
{
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index e8ba5dfa28f9..827bfdb23b09 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -716,7 +716,7 @@ namespace
bool identifyTrueTypeFont( const void* i_pBuffer, sal_uInt32 i_nSize, Font& o_rResult )
{
bool bResult = false;
- TrueTypeFont* pTTF = NULL;
+ TrueTypeFont* pTTF = nullptr;
if( OpenTTFontBuffer( i_pBuffer, i_nSize, 0, &pTTF ) == SF_OK )
{
TTGlobalFontInfo aInfo;
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 37032f9295bb..c7b8e35657df 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -113,9 +113,9 @@ struct ImplBmpReplaceParam
GDIMetaFile::GDIMetaFile() :
nCurrentActionElement( 0 ),
aPrefSize ( 1, 1 ),
- pPrev ( NULL ),
- pNext ( NULL ),
- pOutDev ( NULL ),
+ pPrev ( nullptr ),
+ pNext ( nullptr ),
+ pOutDev ( nullptr ),
bPause ( false ),
bRecord ( false ),
bUseCanvas ( false )
@@ -128,7 +128,7 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
aPrefSize ( rMtf.aPrefSize ),
pPrev ( rMtf.pPrev ),
pNext ( rMtf.pNext ),
- pOutDev ( NULL ),
+ pOutDev ( nullptr ),
bPause ( false ),
bRecord ( false ),
bUseCanvas ( rMtf.bUseCanvas )
@@ -161,18 +161,18 @@ size_t GDIMetaFile::GetActionSize() const
MetaAction* GDIMetaFile::GetAction( size_t nAction ) const
{
- return (nAction < aList.size()) ? aList[ nAction ] : NULL;
+ return (nAction < aList.size()) ? aList[ nAction ] : nullptr;
}
MetaAction* GDIMetaFile::FirstAction()
{
nCurrentActionElement = 0;
- return aList.empty() ? NULL : aList[ 0 ];
+ return aList.empty() ? nullptr : aList[ 0 ];
}
MetaAction* GDIMetaFile::NextAction()
{
- return ( nCurrentActionElement + 1 < aList.size() ) ? aList[ ++nCurrentActionElement ] : NULL;
+ return ( nCurrentActionElement + 1 < aList.size() ) ? aList[ ++nCurrentActionElement ] : nullptr;
}
MetaAction* GDIMetaFile::ReplaceAction( MetaAction* pAction, size_t nAction )
@@ -182,7 +182,7 @@ MetaAction* GDIMetaFile::ReplaceAction( MetaAction* pAction, size_t nAction )
// this method takes ownership of pAction and is
// therefore responsible for deleting it
pAction->Delete();
- return NULL;
+ return nullptr;
}
//fdo#39995 This does't increment the incoming action ref-count nor does it
//decrement the outgoing action ref-count
@@ -207,7 +207,7 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
aPrefSize = rMtf.aPrefSize;
pPrev = rMtf.pPrev;
pNext = rMtf.pNext;
- pOutDev = NULL;
+ pOutDev = nullptr;
bPause = false;
bRecord = false;
bUseCanvas = rMtf.bUseCanvas;
@@ -264,7 +264,7 @@ void GDIMetaFile::Linker( OutputDevice* pOut, bool bLink )
{
if( bLink )
{
- pNext = NULL;
+ pNext = nullptr;
pPrev = pOut->GetConnectMetaFile();
pOut->SetConnectMetaFile( this );
@@ -283,13 +283,13 @@ void GDIMetaFile::Linker( OutputDevice* pOut, bool bLink )
else
{
if( pPrev )
- pPrev->pNext = NULL;
+ pPrev->pNext = nullptr;
pOut->SetConnectMetaFile( pPrev );
}
- pPrev = NULL;
- pNext = NULL;
+ pPrev = nullptr;
+ pNext = nullptr;
}
}
@@ -1412,7 +1412,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaAction* pAction = GetAction(a);
const MetaActionType nActionType = pAction->GetType();
- Rectangle* pUseHairline = (pHairline && aMapVDev->IsLineColor()) ? pHairline : 0;
+ Rectangle* pUseHairline = (pHairline && aMapVDev->IsLineColor()) ? pHairline : nullptr;
switch( nActionType )
{
@@ -1448,7 +1448,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
const LineInfo& rLineInfo = pAct->GetLineInfo();
if(0 != rLineInfo.GetWidth())
- pUseHairline = 0;
+ pUseHairline = nullptr;
}
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, pUseHairline );
@@ -1513,7 +1513,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
const LineInfo& rLineInfo = pAct->GetLineInfo();
if(0 != rLineInfo.GetWidth())
- pUseHairline = 0;
+ pUseHairline = nullptr;
}
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, pUseHairline );
@@ -1544,7 +1544,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
aMapVDev->GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen() );
Point aPt( pAct->GetPoint() );
aRect.Move( aPt.X(), aPt.Y() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1557,7 +1557,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
0, pAct->GetDXArray() );
Point aPt( pAct->GetPoint() );
aRect.Move( aPt.X(), aPt.Y() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1570,7 +1570,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
pAct->GetWidth() );
Point aPt( pAct->GetPoint() );
aRect.Move( aPt.X(), aPt.Y() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1586,7 +1586,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
Point aPt( pAct->GetStartPoint() );
aRect.Move( aPt.X(), aPt.Y() );
aRect.Right() = aRect.Left() + pAct->GetWidth();
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1594,7 +1594,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1602,7 +1602,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction);
Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1610,7 +1610,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaBmpExScaleAction* pAct = static_cast<MetaBmpExScaleAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1618,7 +1618,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaBmpExScalePartAction* pAct = static_cast<MetaBmpExScalePartAction*>(pAction);
Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1626,7 +1626,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaGradientAction* pAct = static_cast<MetaGradientAction*>(pAction);
Rectangle aRect( pAct->GetRect() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1634,7 +1634,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaGradientExAction* pAct = static_cast<MetaGradientExAction*>(pAction);
Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1648,7 +1648,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaHatchAction* pAct = static_cast<MetaHatchAction*>(pAction);
Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1656,7 +1656,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaTransparentAction* pAct = static_cast<MetaTransparentAction*>(pAction);
Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1666,7 +1666,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
// MetaFloatTransparentAction is defined limiting it's content Metafile
// to it's geometry definition(Point, Size), so use these directly
const Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1674,7 +1674,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaEPSAction* pAct = static_cast<MetaEPSAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1714,7 +1714,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaBmpAction* pAct = static_cast<MetaBmpAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1722,7 +1722,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaBmpExAction* pAct = static_cast<MetaBmpExAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmapEx().GetSizePixel() ) );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1730,7 +1730,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaMaskAction* pAct = static_cast<MetaMaskAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1738,7 +1738,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaMaskScalePartAction* pAct = static_cast<MetaMaskScalePartAction*>(pAction);
Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1746,7 +1746,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaMaskScalePartAction* pAct = static_cast<MetaMaskScalePartAction*>(pAction);
Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1754,7 +1754,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaWallpaperAction* pAct = static_cast<MetaWallpaperAction*>(pAction);
Rectangle aRect( pAct->GetRect() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1762,7 +1762,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaTextRectAction* pAct = static_cast<MetaTextRectAction*>(pAction);
Rectangle aRect( pAct->GetRect() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -2813,7 +2813,7 @@ SvStream& WriteGDIMetaFile( SvStream& rOStm, const GDIMetaFile& rGDIMetaFile )
if( !rOStm.GetError() )
{
static const char* pEnableSVM1 = getenv( "SAL_ENABLE_SVM1" );
- static const bool bNoSVM1 = (NULL == pEnableSVM1 ) || ( '0' == *pEnableSVM1 );
+ static const bool bNoSVM1 = (nullptr == pEnableSVM1 ) || ( '0' == *pEnableSVM1 );
if( bNoSVM1 || rOStm.GetVersion() >= SOFFICE_FILEFORMAT_50 )
{
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 26a69d260493..cab29181f625 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -32,8 +32,8 @@
GfxLink::GfxLink() :
meType ( GFX_LINK_TYPE_NONE ),
- mpBuf ( NULL ),
- mpSwap ( NULL ),
+ mpBuf ( nullptr ),
+ mpSwap ( nullptr ),
mnBufSize ( 0 ),
mnUserId ( 0UL ),
mpImpData ( new ImpGfxLink )
@@ -49,12 +49,12 @@ GfxLink::GfxLink( const GfxLink& rGfxLink ) :
GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, bool bOwns ) :
mpImpData( new ImpGfxLink )
{
- DBG_ASSERT( (pBuf != NULL && nSize) || (!bOwns && nSize == 0),
+ DBG_ASSERT( (pBuf != nullptr && nSize) || (!bOwns && nSize == 0),
"GfxLink::GfxLink(): empty/NULL buffer given" );
meType = nType;
mnBufSize = nSize;
- mpSwap = NULL;
+ mpSwap = nullptr;
mnUserId = 0UL;
if( bOwns )
@@ -65,7 +65,7 @@ GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, bool bOw
memcpy( mpBuf->mpBuffer, pBuf, nSize );
}
else
- mpBuf = NULL;
+ mpBuf = nullptr;
}
GfxLink::~GfxLink()
@@ -109,7 +109,7 @@ bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const
{
bIsEqual = memcmp( pSource, pDest, nSourceSize ) == 0;
}
- else if ( ( pSource == 0 ) && ( pDest == 0 ) )
+ else if ( ( pSource == nullptr ) && ( pDest == nullptr ) )
bIsEqual = true;
}
return bIsEqual;
@@ -143,7 +143,7 @@ const sal_uInt8* GfxLink::GetData() const
if( IsSwappedOut() )
const_cast<GfxLink*>(this)->SwapIn();
- return( mpBuf ? mpBuf->mpBuffer : NULL );
+ return( mpBuf ? mpBuf->mpBuffer : nullptr );
}
@@ -212,14 +212,14 @@ void GfxLink::SwapOut()
if( !mpSwap->IsSwapped() )
{
delete mpSwap;
- mpSwap = NULL;
+ mpSwap = nullptr;
}
else
{
if( !( --mpBuf->mnRefCount ) )
delete mpBuf;
- mpBuf = NULL;
+ mpBuf = nullptr;
}
}
}
@@ -233,7 +233,7 @@ void GfxLink::SwapIn()
if( !( --mpSwap->mnRefCount ) )
delete mpSwap;
- mpSwap = NULL;
+ mpSwap = nullptr;
}
}
@@ -366,13 +366,13 @@ sal_uInt8* ImpSwap::GetData() const
xIStm.reset();
if( bError )
- delete[] pData, pData = NULL;
+ delete[] pData, pData = nullptr;
}
else
- pData = NULL;
+ pData = nullptr;
}
else
- pData = NULL;
+ pData = nullptr;
return pData;
}
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 80fd0f53dd6d..3a1707100188 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -41,7 +41,7 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText,
sal_uInt16 nPixelWidth = nPixel;
Point aPoint( rDestPt.X() + nPixelWidth, rDestPt.Y() + nPixelWidth );
Size aSize( rDestSize.Width() - ( nPixelWidth << 1 ), rDestSize.Height() - ( nPixelWidth << 1 ) );
- bool bFilled = ( pBitmap != NULL || pBitmapEx != NULL || pFont != NULL );
+ bool bFilled = ( pBitmap != nullptr || pBitmapEx != nullptr || pFont != nullptr );
Rectangle aBorderRect( aPoint, aSize );
pOutDev->Push();
@@ -93,7 +93,7 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText,
&& !(!pOutDev->IsOutputEnabled() /*&& pOutDev->GetConnectMetaFile() */) )
{
MapMode aMapMode( MAP_POINT );
- Size aSz = pOutDev->LogicToLogic( Size( 0, 12 ), &aMapMode, NULL );
+ Size aSz = pOutDev->LogicToLogic( Size( 0, 12 ), &aMapMode, nullptr );
long nThreshold = aSz.Height() / 2;
long nStep = nThreshold / 3;
@@ -225,7 +225,7 @@ Graphic::Graphic( const ::com::sun::star::uno::Reference< ::com::sun::star::grap
uno::Reference< lang::XUnoTunnel > xTunnel( rxGraphic, uno::UNO_QUERY );
const ::Graphic* pGraphic = ( xTunnel.is() ?
reinterpret_cast< ::Graphic* >( xTunnel->getSomething( getUnoTunnelId() ) ) :
- NULL );
+ nullptr );
if( pGraphic )
{
@@ -433,7 +433,7 @@ void Graphic::Draw( OutputDevice* pOutDev,
const Point& rDestPt, const Size& rDestSz ) const
{
if( GRAPHIC_DEFAULT == mpImpGraphic->ImplGetType() )
- ImplDrawDefault( pOutDev, NULL, NULL, NULL, NULL, rDestPt, rDestSz );
+ ImplDrawDefault( pOutDev, nullptr, nullptr, nullptr, nullptr, rDestPt, rDestSz );
else
mpImpGraphic->ImplDraw( pOutDev, rDestPt, rDestSz );
}
@@ -442,7 +442,7 @@ void Graphic::DrawEx( OutputDevice* pOutDev, const OUString& rText,
vcl::Font& rFont, const BitmapEx& rBitmap,
const Point& rDestPt, const Size& rDestSz )
{
- ImplDrawDefault( pOutDev, &rText, &rFont, NULL, &rBitmap, rDestPt, rDestSz );
+ ImplDrawDefault( pOutDev, &rText, &rFont, nullptr, &rBitmap, rDestPt, rDestSz );
}
void Graphic::StartAnimation( OutputDevice* pOutDev, const Point& rDestPt,
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index f6e70cf78799..811fca530ca4 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -40,12 +40,12 @@
using namespace ::com::sun::star;
Image::Image() :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
}
Image::Image( const ResId& rResId ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
rResId.SetRT( RSC_IMAGE );
@@ -99,21 +99,21 @@ Image::Image( const Image& rImage ) :
}
Image::Image( const BitmapEx& rBitmapEx ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
ImplInit( rBitmapEx );
}
Image::Image( const Bitmap& rBitmap ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
ImplInit( rBitmap );
}
Image::Image( const Bitmap& rBitmap, const Bitmap& rMaskBitmap ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
const BitmapEx aBmpEx( rBitmap, rMaskBitmap );
@@ -122,7 +122,7 @@ Image::Image( const Bitmap& rBitmap, const Bitmap& rMaskBitmap ) :
}
Image::Image( const Bitmap& rBitmap, const Color& rColor ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
const BitmapEx aBmpEx( rBitmap, rColor );
@@ -131,7 +131,7 @@ Image::Image( const Bitmap& rBitmap, const Color& rColor ) :
}
Image::Image( const uno::Reference< graphic::XGraphic >& rxGraphic ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
const Graphic aGraphic( rxGraphic );
@@ -139,7 +139,7 @@ Image::Image( const uno::Reference< graphic::XGraphic >& rxGraphic ) :
}
Image::Image( const OUString &rFileUrl ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
OUString aTmp;
osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp );
@@ -275,14 +275,14 @@ bool Image::operator==( const Image& rImage ) const
}
ImageList::ImageList( sal_uInt16 nInit, sal_uInt16 nGrow ) :
- mpImplData( NULL ),
+ mpImplData( nullptr ),
mnInitSize( nInit ),
mnGrowSize( nGrow )
{
}
ImageList::ImageList( const ResId& rResId ) :
- mpImplData( NULL ),
+ mpImplData( nullptr ),
mnInitSize( 1 ),
mnGrowSize( 4 )
{
@@ -330,7 +330,7 @@ ImageList::ImageList( const ResId& rResId ) :
ImageList::ImageList( const ::std::vector< OUString >& rNameVector,
const OUString& rPrefix,
const Color* ) :
- mpImplData( NULL ),
+ mpImplData( nullptr ),
mnInitSize( 1 ),
mnGrowSize( 4 )
{
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 65c321685b54..f368132c5b65 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -165,7 +165,7 @@ void ImplAnimView::drawToPos( sal_uLong nPos )
}
ScopedVclPtrInstance<VirtualDevice> aVDev;
- std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( pRenderContext->GetClipRegion() ) : NULL);
+ std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( pRenderContext->GetClipRegion() ) : nullptr);
aVDev->SetOutputSizePixel( maSzPix, false );
nPos = std::min( nPos, (sal_uLong) mpParent->Count() - 1UL );
@@ -283,7 +283,7 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
if( !pVDev )
{
- std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( pRenderContext->GetClipRegion() ) : NULL);
+ std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( pRenderContext->GetClipRegion() ) : nullptr);
if (xOldClip)
pRenderContext->SetClipRegion( maClip );
diff --git a/vcl/source/gdi/impanmvw.hxx b/vcl/source/gdi/impanmvw.hxx
index d7eab0f89b22..d2c10d637ef3 100644
--- a/vcl/source/gdi/impanmvw.hxx
+++ b/vcl/source/gdi/impanmvw.hxx
@@ -57,12 +57,12 @@ private:
private:
ImplAnimView( Animation* pParent, OutputDevice* pOut,
const Point& rPt, const Size& rSz, sal_uLong nExtraData,
- OutputDevice* pFirstFrameOutDev = NULL );
+ OutputDevice* pFirstFrameOutDev = nullptr );
~ImplAnimView();
bool matches( OutputDevice* pOut, long nExtraData ) const;
void drawToPos( sal_uLong nPos );
- void draw( sal_uLong nPos, VirtualDevice* pVDev=NULL );
+ void draw( sal_uLong nPos, VirtualDevice* pVDev=nullptr );
void repaint();
AInfo* createAInfo() const;
diff --git a/vcl/source/gdi/impfont.cxx b/vcl/source/gdi/impfont.cxx
index 57e8b05e9bb4..e8c68fc3cb5d 100644
--- a/vcl/source/gdi/impfont.cxx
+++ b/vcl/source/gdi/impfont.cxx
@@ -92,9 +92,9 @@ static int GetSShort( const unsigned char* p ){ return static_cast<sal_Int16>((p
// TODO: move CMAP parsing directly into the ImplFontCharMap class
bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
{
- rResult.mpRangeCodes = NULL;
- rResult.mpStartGlyphs= NULL;
- rResult.mpGlyphIds = NULL;
+ rResult.mpRangeCodes = nullptr;
+ rResult.mpStartGlyphs= nullptr;
+ rResult.mpGlyphIds = nullptr;
rResult.mnRangeCount = 0;
rResult.mbRecoded = false;
rResult.mbSymbolic = false;
@@ -166,8 +166,8 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
// parse the best CMAP subtable
int nRangeCount = 0;
- sal_UCS4* pCodePairs = NULL;
- int* pStartGlyphs = NULL;
+ sal_UCS4* pCodePairs = nullptr;
+ int* pStartGlyphs = nullptr;
typedef std::vector<sal_uInt16> U16Vector;
U16Vector aGlyphIdArray;
@@ -278,8 +278,8 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
}
// recode the code ranges to their unicode encoded ranges if needed
- rtl_TextToUnicodeConverter aConverter = NULL;
- rtl_UnicodeToTextContext aCvtContext = NULL;
+ rtl_TextToUnicodeConverter aConverter = nullptr;
+ rtl_UnicodeToTextContext aCvtContext = nullptr;
rResult.mbRecoded = ( eRecodeFrom != RTL_TEXTENCODING_UNICODE );
if( rResult.mbRecoded )
@@ -352,7 +352,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
// glyph mapping for non-unicode fonts not implemented
delete[] pStartGlyphs;
- pStartGlyphs = NULL;
+ pStartGlyphs = nullptr;
aGlyphIdArray.clear();
// make a pCodePairs array using the vector from above
@@ -368,7 +368,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
// prepare the glyphid-array if needed
// TODO: merge ranges if they are close enough?
- sal_uInt16* pGlyphIds = NULL;
+ sal_uInt16* pGlyphIds = nullptr;
if( !aGlyphIdArray.empty())
{
pGlyphIds = new sal_uInt16[ aGlyphIdArray.size() ];
@@ -405,7 +405,7 @@ FontCharMap::FontCharMap( const CmapResult& rCR )
FontCharMap::~FontCharMap()
{
- mpImplFontCharMap = 0;
+ mpImplFontCharMap = nullptr;
}
FontCharMapPtr FontCharMap::GetDefaultMap( bool bSymbol )
@@ -453,7 +453,7 @@ bool FontCharMap::HasChar( sal_UCS4 cChar ) const
{
bool bHasChar = false;
- if( mpImplFontCharMap->mpStartGlyphs == NULL ) { // only the char-ranges are known
+ if( mpImplFontCharMap->mpStartGlyphs == nullptr ) { // only the char-ranges are known
const int nRange = findRangeIndex( cChar );
if( nRange==0 && cChar < mpImplFontCharMap->mpRangeCodes[0] )
return false;
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 31613aa22c78..4d3f9875b557 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -90,10 +90,10 @@ Size GraphicReader::GetPreviewSize() const
}
ImpGraphic::ImpGraphic() :
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
+ mpAnimation ( nullptr ),
+ mpContext ( nullptr ),
+ mpSwapFile ( nullptr ),
+ mpGfxLink ( nullptr ),
meType ( GRAPHIC_NONE ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
@@ -105,7 +105,7 @@ ImpGraphic::ImpGraphic() :
ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
maMetaFile ( rImpGraphic.maMetaFile ),
maEx ( rImpGraphic.maEx ),
- mpContext ( NULL ),
+ mpContext ( nullptr ),
mpSwapFile ( rImpGraphic.mpSwapFile ),
meType ( rImpGraphic.meType ),
mnSizeBytes ( rImpGraphic.mnSizeBytes ),
@@ -119,7 +119,7 @@ ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
if( rImpGraphic.mpGfxLink )
mpGfxLink = new GfxLink( *rImpGraphic.mpGfxLink );
else
- mpGfxLink = NULL;
+ mpGfxLink = nullptr;
if( rImpGraphic.mpAnimation )
{
@@ -127,17 +127,17 @@ ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
maEx = mpAnimation->GetBitmapEx();
}
else
- mpAnimation = NULL;
+ mpAnimation = nullptr;
maSvgData = rImpGraphic.maSvgData;
}
ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) :
maEx ( rBitmap ),
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
+ mpAnimation ( nullptr ),
+ mpContext ( nullptr ),
+ mpSwapFile ( nullptr ),
+ mpGfxLink ( nullptr ),
meType ( !rBitmap.IsEmpty() ? GRAPHIC_BITMAP : GRAPHIC_NONE ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
@@ -148,10 +148,10 @@ ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) :
ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
maEx ( rBitmapEx ),
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
+ mpAnimation ( nullptr ),
+ mpContext ( nullptr ),
+ mpSwapFile ( nullptr ),
+ mpGfxLink ( nullptr ),
meType ( !rBitmapEx.IsEmpty() ? GRAPHIC_BITMAP : GRAPHIC_NONE ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
@@ -161,10 +161,10 @@ ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
}
ImpGraphic::ImpGraphic(const SvgDataPtr& rSvgDataPtr)
-: mpAnimation( NULL ),
- mpContext( NULL ),
- mpSwapFile( NULL ),
- mpGfxLink( NULL ),
+: mpAnimation( nullptr ),
+ mpContext( nullptr ),
+ mpSwapFile( nullptr ),
+ mpGfxLink( nullptr ),
meType( rSvgDataPtr.get() ? GRAPHIC_BITMAP : GRAPHIC_NONE ),
mnSizeBytes( 0UL ),
mnRefCount( 1UL ),
@@ -177,9 +177,9 @@ ImpGraphic::ImpGraphic(const SvgDataPtr& rSvgDataPtr)
ImpGraphic::ImpGraphic( const Animation& rAnimation ) :
maEx ( rAnimation.GetBitmapEx() ),
mpAnimation ( new Animation( rAnimation ) ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
+ mpContext ( nullptr ),
+ mpSwapFile ( nullptr ),
+ mpGfxLink ( nullptr ),
meType ( GRAPHIC_BITMAP ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
@@ -190,10 +190,10 @@ ImpGraphic::ImpGraphic( const Animation& rAnimation ) :
ImpGraphic::ImpGraphic( const GDIMetaFile& rMtf ) :
maMetaFile ( rMtf ),
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
+ mpAnimation ( nullptr ),
+ mpContext ( nullptr ),
+ mpSwapFile ( nullptr ),
+ mpGfxLink ( nullptr ),
meType ( GRAPHIC_GDIMETAFILE ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
@@ -230,7 +230,7 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic )
}
else
{
- mpAnimation = NULL;
+ mpAnimation = nullptr;
maEx = rImpGraphic.maEx;
}
@@ -248,7 +248,7 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic )
if( rImpGraphic.mpGfxLink )
mpGfxLink = new GfxLink( *rImpGraphic.mpGfxLink );
else
- mpGfxLink = NULL;
+ mpGfxLink = nullptr;
maSvgData = rImpGraphic.maSvgData;
}
@@ -334,13 +334,13 @@ void ImpGraphic::ImplClearGraphics( bool bCreateSwapInfo )
{
mpAnimation->Clear();
delete mpAnimation;
- mpAnimation = NULL;
+ mpAnimation = nullptr;
}
if( mpGfxLink )
{
delete mpGfxLink;
- mpGfxLink = NULL;
+ mpGfxLink = nullptr;
}
maSvgData.reset();
@@ -379,7 +379,7 @@ void ImpGraphic::ImplClear()
delete mpSwapFile;
}
- mpSwapFile = NULL;
+ mpSwapFile = nullptr;
}
mbSwapOut = false;
@@ -424,7 +424,7 @@ bool ImpGraphic::ImplIsAlpha() const
}
else if( meType == GRAPHIC_BITMAP )
{
- bRet = ( NULL == mpAnimation ) && maEx.IsAlpha();
+ bRet = ( nullptr == mpAnimation ) && maEx.IsAlpha();
}
return bRet;
@@ -432,7 +432,7 @@ bool ImpGraphic::ImplIsAlpha() const
bool ImpGraphic::ImplIsAnimated() const
{
- return( mpAnimation != NULL );
+ return( mpAnimation != nullptr );
}
bool ImpGraphic::ImplIsEPS() const
@@ -1307,7 +1307,7 @@ bool ImpGraphic::ImplSwapIn()
delete mpSwapFile;
}
- mpSwapFile = NULL;
+ mpSwapFile = nullptr;
}
}
}
@@ -1357,7 +1357,7 @@ GfxLink ImpGraphic::ImplGetLink()
bool ImpGraphic::ImplIsLink() const
{
- return ( mpGfxLink != NULL );
+ return ( mpGfxLink != nullptr );
}
BitmapChecksum ImpGraphic::ImplGetChecksum() const
@@ -1461,7 +1461,7 @@ SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
if( !rIStm.GetError() && aLink.LoadNative( aGraphic ) )
{
// set link only, if no other link was set
- const bool bSetLink = ( rImpGraphic.mpGfxLink == NULL );
+ const bool bSetLink = ( rImpGraphic.mpGfxLink == nullptr );
// assign graphic
rImpGraphic = *aGraphic.ImplGetImpGraphic();
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index 76e65a3a3bb1..813f05e5d108 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -102,7 +102,7 @@ void ImplImageList::RemoveImage( sal_uInt16 nPos )
}
ImplImageData::ImplImageData( const BitmapEx& rBmpEx ) :
- mpImageBitmap( NULL ),
+ mpImageBitmap( nullptr ),
maBmpEx( rBmpEx )
{
}
@@ -119,7 +119,7 @@ bool ImplImageData::IsEqual( const ImplImageData& rData )
ImplImage::ImplImage()
: mnRefCount(1)
- , mpData(NULL)
+ , mpData(nullptr)
, meType(IMAGETYPE_BITMAP)
{
}
@@ -158,7 +158,7 @@ void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHe
maDisabledBmpEx.SetEmpty();
delete mpDisplayBmp;
- mpDisplayBmp = NULL;
+ mpDisplayBmp = nullptr;
maSize = Size( nItemWidth, nItemHeight );
mnSize = nInitSize;
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 33dfccc3436d..1fce7910b23f 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -143,7 +143,7 @@ public:
};
ImplPointArray::ImplPointArray() :
- mpArray ( NULL ),
+ mpArray ( nullptr ),
mnSize ( 0UL ),
mnRealSize ( 0UL )
@@ -853,7 +853,7 @@ void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly )
ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
{
- ImplVectMap* pMap = NULL;
+ ImplVectMap* pMap = nullptr;
if( pRAcc && pRAcc->Width() && pRAcc->Height() )
{
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 62049b5a823c..8c23aa3ce0a3 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -60,7 +60,7 @@ ImplJobSetup::ImplJobSetup()
mnPaperWidth = 0;
mnPaperHeight = 0;
mnDriverDataLen = 0;
- mpDriverData = NULL;
+ mpDriverData = nullptr;
mbPapersizeFromSetup = false;
}
@@ -83,7 +83,7 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
memcpy( mpDriverData, rJobSetup.mpDriverData, mnDriverDataLen );
}
else
- mpDriverData = NULL;
+ mpDriverData = nullptr;
mbPapersizeFromSetup = rJobSetup.mbPapersizeFromSetup;
maValueMap = rJobSetup.maValueMap;
}
@@ -123,7 +123,7 @@ const ImplJobSetup* JobSetup::ImplGetConstData() const
JobSetup::JobSetup()
{
- mpData = NULL;
+ mpData = nullptr;
}
JobSetup::JobSetup( const JobSetup& rJobSetup )
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 0d1bb1ba831c..22fa9b6f4245 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -191,7 +191,7 @@ void MetaAction::Read( SvStream&, ImplMetaReadData* )
MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData )
{
- MetaAction* pAction = NULL;
+ MetaAction* pAction = nullptr;
sal_uInt16 nTmp = 0;
rIStm.ReadUInt16( nTmp );
MetaActionType nType = static_cast<MetaActionType>(nTmp);
@@ -1078,7 +1078,7 @@ void MetaTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
MetaTextArrayAction::MetaTextArrayAction() :
MetaAction ( MetaActionType::TEXTARRAY ),
- mpDXAry ( NULL ),
+ mpDXAry ( nullptr ),
mnIndex ( 0 ),
mnLen ( 0 )
{}
@@ -1098,7 +1098,7 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( long ) );
}
else
- mpDXAry = NULL;
+ mpDXAry = nullptr;
}
MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
@@ -1120,7 +1120,7 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
memcpy( mpDXAry, pDXAry, nAryLen * sizeof(long) );
}
else
- mpDXAry = NULL;
+ mpDXAry = nullptr;
}
MetaTextArrayAction::~MetaTextArrayAction()
@@ -1193,7 +1193,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
if (mnLen > maStr.getLength() - mnIndex)
{
mnIndex = 0;
- mpDXAry = 0;
+ mpDXAry = nullptr;
return;
}
@@ -1219,12 +1219,12 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
}
else
{
- mpDXAry = NULL;
+ mpDXAry = nullptr;
return;
}
}
else
- mpDXAry = NULL;
+ mpDXAry = nullptr;
if ( aCompat.GetVersion() >= 2 ) // Version 2
{
@@ -1233,7 +1233,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
if ( mnIndex + mnLen > maStr.getLength() )
{
mnIndex = 0;
- delete[] mpDXAry, mpDXAry = NULL;
+ delete[] mpDXAry, mpDXAry = nullptr;
}
}
}
@@ -3167,7 +3167,7 @@ MetaCommentAction::MetaCommentAction( sal_Int32 nValue ) :
MetaAction ( MetaActionType::COMMENT ),
mnValue ( nValue )
{
- ImplInitDynamicData( NULL, 0UL );
+ ImplInitDynamicData( nullptr, 0UL );
}
MetaCommentAction::MetaCommentAction( const MetaCommentAction& rAct ) :
@@ -3202,7 +3202,7 @@ void MetaCommentAction::ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32
else
{
mnDataSize = 0;
- mpData = NULL;
+ mpData = nullptr;
}
}
@@ -3366,7 +3366,7 @@ void MetaCommentAction::Read( SvStream& rIStm, ImplMetaReadData* )
rIStm.Read( mpData, mnDataSize );
}
else
- mpData = NULL;
+ mpData = nullptr;
}
MetaLayoutModeAction::MetaLayoutModeAction() :
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index 6a0d891910c8..72066869803b 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -32,7 +32,7 @@ static const sal_uInt8 pImplMask[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02
// - NodeCache -
ImpNodeCache::ImpNodeCache( const sal_uLong nInitSize ) :
- pActNode( NULL )
+ pActNode( nullptr )
{
const sal_uLong nSize = nInitSize + 4;
@@ -61,7 +61,7 @@ ImpNodeCache::~ImpNodeCache()
Octree::Octree( const BitmapReadAccess& rReadAcc, sal_uLong nColors ) :
nMax ( nColors ),
nLeafCount ( 0L ),
- pTree ( NULL ),
+ pTree ( nullptr ),
pAcc ( &rReadAcc )
{
pNodeCache = new ImpNodeCache( nColors );
@@ -128,7 +128,7 @@ void Octree::ImplDeleteOctree( NODE** ppNode )
}
pNodeCache->ImplReleaseNode( *ppNode );
- *ppNode = NULL;
+ *ppNode = nullptr;
}
void Octree::ImplAdd( NODE** ppNode )
@@ -194,7 +194,7 @@ void Octree::ImplReduce()
pNode->nCount += pChild->nCount;
pNodeCache->ImplReleaseNode( pNode->pChild[ i ] );
- pNode->pChild[ i ] = NULL;
+ pNode->pChild[ i ] = nullptr;
nChildren++;
}
}
diff --git a/vcl/source/gdi/oldprintadaptor.cxx b/vcl/source/gdi/oldprintadaptor.cxx
index b71d9dd15654..46485b9ebde1 100644
--- a/vcl/source/gdi/oldprintadaptor.cxx
+++ b/vcl/source/gdi/oldprintadaptor.cxx
@@ -74,7 +74,7 @@ void OldStylePrintAdaptor::StartPage()
void OldStylePrintAdaptor::EndPage()
{
- getPrinter()->SetConnectMetaFile( NULL );
+ getPrinter()->SetConnectMetaFile( nullptr );
mpData->maPages.back().maPage.WindStart();
}
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index ca695480cbdb..5d4633146530 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -505,7 +505,7 @@ PDFExtOutDevData::PDFExtOutDevData( const OutputDevice& rOutDev ) :
mbExportNDests ( false ),
mnFormsFormat ( 0 ),
mnPage ( -1 ),
- mpPageSyncData ( NULL ),
+ mpPageSyncData ( nullptr ),
mpGlobalSyncData ( new GlobalSyncData() )
{
mpPageSyncData = new PageSyncData( mpGlobalSyncData );
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 156dc694f456..9fd3a127ab47 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -971,7 +971,7 @@ public:
void translate( double tx, double ty );
bool invert();
- void append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer, Point* pBack = NULL );
+ void append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer, Point* pBack = nullptr );
Point transform( const Point& rPoint ) const;
};
@@ -1288,7 +1288,7 @@ bool PDFWriterImpl::PDFPage::emit(sal_Int32 nParentObject )
aLine.append( "/Trans<</D " );
appendDouble( (double)m_nTransTime/1000.0, aLine, 3 );
aLine.append( "\n" );
- const char *pStyle = NULL, *pDm = NULL, *pM = NULL, *pDi = NULL;
+ const char *pStyle = nullptr, *pDm = nullptr, *pM = nullptr, *pDi = nullptr;
switch( m_eTransition )
{
case PDFWriter::SplitHorizontalInward:
@@ -1517,9 +1517,9 @@ void PDFWriterImpl::PDFPage::appendPolygon( const basegfx::B2DPolygon& rPoly, OS
basegfx::B2DPoint aBL( aRange.getMinX(), aRange.getMaxY() );
appendPixelPoint( aBL, rBuffer );
rBuffer.append( ' ' );
- appendMappedLength( aRange.getWidth(), rBuffer, false, NULL, nLog10Divisor );
+ appendMappedLength( aRange.getWidth(), rBuffer, false, nullptr, nLog10Divisor );
rBuffer.append( ' ' );
- appendMappedLength( aRange.getHeight(), rBuffer, true, NULL, nLog10Divisor );
+ appendMappedLength( aRange.getHeight(), rBuffer, true, nullptr, nLog10Divisor );
rBuffer.append( " re\n" );
return;
}
@@ -1737,7 +1737,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
const com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >& xEnc,
PDFWriter& i_rOuterFace)
:
- m_pReferenceDevice( NULL ),
+ m_pReferenceDevice( nullptr ),
m_aMapMode( MAP_POINT, Point(), Fraction( 1L, pointToPixel(1) ), Fraction( 1L, pointToPixel(1) ) ),
m_nCurrentStructElement( 0 ),
m_bEmitStructure( true ),
@@ -1756,16 +1756,16 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
m_aContext(rContext),
m_aFile(m_aContext.URL),
m_bOpen(false),
- m_pCodec( NULL ),
- m_pMemStream(NULL),
+ m_pCodec( nullptr ),
+ m_pMemStream(nullptr),
m_aDocDigest( rtl_digest_createMD5() ),
m_aCipher( nullptr ),
- m_aDigest( NULL ),
+ m_aDigest( nullptr ),
m_nKeyLength(0),
m_nRC4KeyLength(0),
m_bEncryptThisStream( false ),
m_nAccessPermissions(0),
- m_pEncryptionBuffer( NULL ),
+ m_pEncryptionBuffer( nullptr ),
m_nEncryptionBufferSize( 0 ),
m_bIsPDF_A1( false ),
m_rOuterFace( i_rOuterFace )
@@ -2007,7 +2007,7 @@ void PDFWriterImpl::computeDocumentIdentifier( std::vector< sal_uInt8 >& o_rIden
o_rCString2 = aCreationMetaDateString.makeStringAndClear();
rtlDigest aDigest = rtl_digest_createMD5();
- OSL_ENSURE( aDigest != NULL, "PDFWriterImpl::computeDocumentIdentifier: cannot obtain a digest object !" );
+ OSL_ENSURE( aDigest != nullptr, "PDFWriterImpl::computeDocumentIdentifier: cannot obtain a digest object !" );
if( aDigest )
{
rtlDigestError nError = rtl_digest_updateMD5( aDigest, &aGMT, sizeof( aGMT ) );
@@ -2158,12 +2158,12 @@ void PDFWriterImpl::endCompression()
{
m_pCodec->EndCompression();
delete m_pCodec;
- m_pCodec = NULL;
+ m_pCodec = nullptr;
sal_uInt64 nLen = m_pMemStream->Tell();
m_pMemStream->Seek( 0 );
writeBuffer( m_pMemStream->GetData(), nLen );
delete m_pMemStream;
- m_pMemStream = NULL;
+ m_pMemStream = nullptr;
}
#endif
}
@@ -2257,7 +2257,7 @@ public:
inline const ImplPdfBuiltinFontData* GetPdfFontData( const PhysicalFontFace* pFontData )
{
- const ImplPdfBuiltinFontData* pFD = NULL;
+ const ImplPdfBuiltinFontData* pFD = nullptr;
if( pFontData && pFontData->CheckMagic( ImplPdfBuiltinFontData::PDF_FONT_MAGIC ) )
pFD = static_cast<const ImplPdfBuiltinFontData*>( pFontData );
return pFD;
@@ -2360,7 +2360,7 @@ void PDFWriterImpl::endPage()
{
writeJPG( *jpeg );
delete jpeg->m_pStream;
- jpeg->m_pStream = NULL;
+ jpeg->m_pStream = nullptr;
jpeg->m_aMask = Bitmap();
}
}
@@ -2371,7 +2371,7 @@ void PDFWriterImpl::endPage()
{
writeTransparentObject( *t );
delete t->m_pContentStream;
- t->m_pContentStream = NULL;
+ t->m_pContentStream = nullptr;
}
}
}
@@ -2928,7 +2928,7 @@ bool PDFWriterImpl::emitTilings()
checkAndEnableStreamEncryption( it->m_nObject );
bool written = writeBuffer( it->m_pTilingStream->GetData(), nTilingStreamSize );
delete it->m_pTilingStream;
- it->m_pTilingStream = NULL;
+ it->m_pTilingStream = nullptr;
if( !written )
return false;
disableStreamEncryption();
@@ -2985,7 +2985,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const PhysicalFo
if( pFont->IsEmbeddable() )
{
- const unsigned char* pFontData = NULL;
+ const unsigned char* pFontData = nullptr;
long nFontLen = 0;
sal_Ucs nEncodedCodes[256];
sal_Int32 pEncWidths[256];
@@ -3013,7 +3013,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const PhysicalFo
pGraphics->GetGlyphWidths( pFont, false, aGlyphWidths, aUnicodeMap );
OUString aTmpName;
- osl_createTempFile( NULL, NULL, &aTmpName.pData );
+ osl_createTempFile( nullptr, nullptr, &aTmpName.pData );
sal_GlyphId aGlyphIds[ 256 ];
sal_uInt8 pEncoding[ 256 ];
sal_Int32 pDuWidths[ 256 ];
@@ -3128,7 +3128,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
assert(pGraphics);
// prepare font encoding
- std::set<sal_Unicode> const * pPriority(0);
+ std::set<sal_Unicode> const * pPriority(nullptr);
const Ucs2SIntMap *const pEncoding =
pGraphics->GetFontEncodingVector( pFont, nullptr, &pPriority );
sal_Int32 nToUnicodeStream = 0;
@@ -3193,12 +3193,12 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
FontSubsetInfo aInfo;
sal_Int32 pWidths[256];
- const unsigned char* pFontData = NULL;
+ const unsigned char* pFontData = nullptr;
long nFontLen = 0;
sal_Int32 nLength1, nLength2;
try
{
- if( (pFontData = static_cast<const unsigned char*>(pGraphics->GetEmbedFontData(pFont, nEncodedCodes, pWidths, 256, aInfo, &nFontLen))) != NULL )
+ if( (pFontData = static_cast<const unsigned char*>(pGraphics->GetEmbedFontData(pFont, nEncodedCodes, pWidths, 256, aInfo, &nFontLen))) != nullptr )
{
if( (aInfo.m_nFontType & FontSubsetInfo::ANY_TYPE1) == 0 )
throw FontException();
@@ -3587,7 +3587,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
"<</Type/Font/Subtype/Type1/BaseFont/" );
appendName( aInfo.m_aPSName, aLine );
aLine.append( "\n" );
- if( !pFont->IsSymbolFont() && pEncoding == 0 )
+ if( !pFont->IsSymbolFont() && pEncoding == nullptr )
aLine.append( "/Encoding/WinAnsiEncoding\n" );
if( nToUnicodeStream )
{
@@ -3939,7 +3939,7 @@ bool PDFWriterImpl::emitFonts()
std::map< sal_Int32, sal_Int32 > aFontIDToObject;
OUString aTmpName;
- osl_createTempFile( NULL, NULL, &aTmpName.pData );
+ osl_createTempFile( nullptr, nullptr, &aTmpName.pData );
for( FontSubsetData::iterator it = m_aSubsets.begin(); it != m_aSubsets.end(); ++it )
{
for( FontEmitList::iterator lit = it->second.m_aSubsets.begin(); lit != it->second.m_aSubsets.end(); ++lit )
@@ -5262,7 +5262,7 @@ bool PDFWriterImpl::emitAppearances( PDFWidget& rWidget, OStringBuffer& rAnnotDi
stream_it != dict_it->second.end(); ++stream_it )
{
SvMemoryStream* pApppearanceStream = stream_it->second;
- dict_it->second[ stream_it->first ] = NULL;
+ dict_it->second[ stream_it->first ] = nullptr;
bool bDeflate = compressStream( pApppearanceStream );
@@ -6056,7 +6056,7 @@ class HashContextScope {
public:
explicit HashContextScope(HASHContext *pPtr) : mpPtr(pPtr) {}
~HashContextScope() { clear(); }
- void clear() { if (mpPtr) { HASH_Destroy(mpPtr); } mpPtr = NULL; }
+ void clear() { if (mpPtr) { HASH_Destroy(mpPtr); } mpPtr = nullptr; }
HASHContext *get() { return mpPtr; }
};
@@ -6304,19 +6304,19 @@ TimeStampResp ::= SEQUENCE {
const SEC_ASN1Template MessageImprint_Template[] =
{
- { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(MessageImprint) },
+ { SEC_ASN1_SEQUENCE, 0, nullptr, sizeof(MessageImprint) },
{ SEC_ASN1_INLINE, offsetof(MessageImprint, hashAlgorithm), SECOID_AlgorithmIDTemplate, 0 },
- { SEC_ASN1_OCTET_STRING, offsetof(MessageImprint, hashedMessage), 0, 0 },
- { 0, 0, 0, 0 }
+ { SEC_ASN1_OCTET_STRING, offsetof(MessageImprint, hashedMessage), nullptr, 0 },
+ { 0, 0, nullptr, 0 }
};
const SEC_ASN1Template Extension_Template[] =
{
- { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(Extension) },
- { SEC_ASN1_OBJECT_ID, offsetof(Extension, extnID), 0, 0 },
- { SEC_ASN1_BOOLEAN, offsetof(Extension, critical), 0, 0 },
- { SEC_ASN1_OCTET_STRING, offsetof(Extension, extnValue), 0, 0 },
- { 0, 0, 0, 0 }
+ { SEC_ASN1_SEQUENCE, 0, nullptr, sizeof(Extension) },
+ { SEC_ASN1_OBJECT_ID, offsetof(Extension, extnID), nullptr, 0 },
+ { SEC_ASN1_BOOLEAN, offsetof(Extension, critical), nullptr, 0 },
+ { SEC_ASN1_OCTET_STRING, offsetof(Extension, extnValue), nullptr, 0 },
+ { 0, 0, nullptr, 0 }
};
const SEC_ASN1Template Extensions_Template[] =
@@ -6326,14 +6326,14 @@ const SEC_ASN1Template Extensions_Template[] =
const SEC_ASN1Template TimeStampReq_Template[] =
{
- { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(TimeStampReq) },
- { SEC_ASN1_INTEGER, offsetof(TimeStampReq, version), 0, 0 },
+ { SEC_ASN1_SEQUENCE, 0, nullptr, sizeof(TimeStampReq) },
+ { SEC_ASN1_INTEGER, offsetof(TimeStampReq, version), nullptr, 0 },
{ SEC_ASN1_INLINE, offsetof(TimeStampReq, messageImprint), MessageImprint_Template, 0 },
- { SEC_ASN1_OBJECT_ID | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, reqPolicy), 0, 0 },
- { SEC_ASN1_INTEGER | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, nonce), 0, 0 },
- { SEC_ASN1_BOOLEAN | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, certReq), 0, 0 },
+ { SEC_ASN1_OBJECT_ID | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, reqPolicy), nullptr, 0 },
+ { SEC_ASN1_INTEGER | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, nonce), nullptr, 0 },
+ { SEC_ASN1_BOOLEAN | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, certReq), nullptr, 0 },
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | 0, offsetof(TimeStampReq, extensions), Extensions_Template, 0 },
- { 0, 0, 0, 0 }
+ { 0, 0, nullptr, 0 }
};
typedef struct {
@@ -6344,16 +6344,16 @@ typedef struct {
const SEC_ASN1Template PKIStatusInfo_Template[] =
{
- { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(PKIStatusInfo) },
- { SEC_ASN1_INTEGER, offsetof(PKIStatusInfo, status), 0, 0 },
- { SEC_ASN1_CONSTRUCTED | SEC_ASN1_SEQUENCE | SEC_ASN1_OPTIONAL, offsetof(PKIStatusInfo, statusString), 0, 0 },
- { SEC_ASN1_BIT_STRING | SEC_ASN1_OPTIONAL, offsetof(PKIStatusInfo, failInfo), 0, 0 },
- { 0, 0, 0, 0 }
+ { SEC_ASN1_SEQUENCE, 0, nullptr, sizeof(PKIStatusInfo) },
+ { SEC_ASN1_INTEGER, offsetof(PKIStatusInfo, status), nullptr, 0 },
+ { SEC_ASN1_CONSTRUCTED | SEC_ASN1_SEQUENCE | SEC_ASN1_OPTIONAL, offsetof(PKIStatusInfo, statusString), nullptr, 0 },
+ { SEC_ASN1_BIT_STRING | SEC_ASN1_OPTIONAL, offsetof(PKIStatusInfo, failInfo), nullptr, 0 },
+ { 0, 0, nullptr, 0 }
};
const SEC_ASN1Template Any_Template[] =
{
- { SEC_ASN1_ANY, 0, NULL, sizeof(SECItem) }
+ { SEC_ASN1_ANY, 0, nullptr, sizeof(SECItem) }
};
typedef struct {
@@ -6363,10 +6363,10 @@ typedef struct {
const SEC_ASN1Template TimeStampResp_Template[] =
{
- { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(TimeStampResp) },
+ { SEC_ASN1_SEQUENCE, 0, nullptr, sizeof(TimeStampResp) },
{ SEC_ASN1_INLINE, offsetof(TimeStampResp, status), PKIStatusInfo_Template, 0 },
{ SEC_ASN1_ANY | SEC_ASN1_OPTIONAL, offsetof(TimeStampResp, timeStampToken), Any_Template, 0 },
- { 0, 0, 0, 0 }
+ { 0, 0, nullptr, 0 }
};
/* Will see if these are needed or not
@@ -6523,7 +6523,7 @@ bad_data:
PORT_Memcpy(to->data, result, to->len = result_bytes);
rv = SECSuccess;
} else {
- SECItem result_item = {siBuffer, NULL, 0 };
+ SECItem result_item = {siBuffer, nullptr, 0 };
result_item.data = result;
result_item.len = result_bytes;
rv = SECITEM_CopyItem(pool, to, &result_item);
@@ -6537,35 +6537,35 @@ my_NSS_CMSAttributeArray_FindAttrByOidTag(NSSCMSAttribute **attrs, SECOidTag oid
SECOidData *oid;
NSSCMSAttribute *attr1, *attr2;
- if (attrs == NULL)
- return NULL;
+ if (attrs == nullptr)
+ return nullptr;
oid = SECOID_FindOIDByTag(oidtag);
- if (oid == NULL)
- return NULL;
+ if (oid == nullptr)
+ return nullptr;
- while ((attr1 = *attrs++) != NULL) {
+ while ((attr1 = *attrs++) != nullptr) {
if (attr1->type.len == oid->oid.len && PORT_Memcmp (attr1->type.data,
oid->oid.data,
oid->oid.len) == 0)
break;
}
- if (attr1 == NULL)
- return NULL;
+ if (attr1 == nullptr)
+ return nullptr;
if (!only)
return attr1;
- while ((attr2 = *attrs++) != NULL) {
+ while ((attr2 = *attrs++) != nullptr) {
if (attr2->type.len == oid->oid.len && PORT_Memcmp (attr2->type.data,
oid->oid.data,
oid->oid.len) == 0)
break;
}
- if (attr2 != NULL)
- return NULL;
+ if (attr2 != nullptr)
+ return nullptr;
return attr1;
}
@@ -6577,10 +6577,10 @@ my_NSS_CMSArray_Add(PLArenaPool *poolp, void ***array, void *obj)
void **dest;
PORT_Assert(array != NULL);
- if (array == NULL)
+ if (array == nullptr)
return SECFailure;
- if (*array == NULL) {
+ if (*array == nullptr) {
dest = static_cast<void **>(PORT_ArenaAlloc(poolp, 2 * sizeof(void *)));
} else {
void **p = *array;
@@ -6592,11 +6592,11 @@ my_NSS_CMSArray_Add(PLArenaPool *poolp, void ***array, void *obj)
(n + 2) * sizeof(void *)));
}
- if (dest == NULL)
+ if (dest == nullptr)
return SECFailure;
dest[n] = obj;
- dest[n+1] = NULL;
+ dest[n+1] = nullptr;
*array = dest;
return SECSuccess;
}
@@ -6607,7 +6607,7 @@ my_NSS_CMSAttribute_GetType(NSSCMSAttribute *attr)
SECOidData *typetag;
typetag = SECOID_FindOID(&(attr->type));
- if (typetag == NULL)
+ if (typetag == nullptr)
return SEC_OID_UNKNOWN;
return typetag->offset;
@@ -6628,7 +6628,7 @@ my_NSS_CMSAttributeArray_AddAttr(PLArenaPool *poolp, NSSCMSAttribute ***attrs, N
/* see if we have one already */
oattr = my_NSS_CMSAttributeArray_FindAttrByOidTag(*attrs, type, PR_FALSE);
PORT_Assert (oattr == NULL);
- if (oattr != NULL)
+ if (oattr != nullptr)
goto loser; /* XXX or would it be better to replace it? */
/* no, shove it in */
@@ -6655,11 +6655,11 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
CERTCertificate *cert,
SECItem *digest)
{
- NSSCMSMessage *result = NSS_CMSMessage_Create(NULL);
+ NSSCMSMessage *result = NSS_CMSMessage_Create(nullptr);
if (!result)
{
SAL_WARN("vcl.pdfwriter", "NSS_CMSMessage_Create failed");
- return NULL;
+ return nullptr;
}
*cms_sd = NSS_CMSSignedData_Create(result);
@@ -6667,7 +6667,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
{
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignedData_Create failed");
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
NSSCMSContentInfo *cms_cinfo = NSS_CMSMessage_GetContentInfo(result);
@@ -6676,18 +6676,18 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSContentInfo_SetContent_SignedData failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
cms_cinfo = NSS_CMSSignedData_GetContentInfo(*cms_sd);
// Attach NULL data as detached data
- if (NSS_CMSContentInfo_SetContent_Data(result, cms_cinfo, NULL, PR_TRUE) != SECSuccess)
+ if (NSS_CMSContentInfo_SetContent_Data(result, cms_cinfo, nullptr, PR_TRUE) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "NSS_CMSContentInfo_SetContent_Data failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
*cms_signer = NSS_CMSSignerInfo_Create(result, cert, SEC_OID_SHA1);
@@ -6696,7 +6696,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignerInfo_Create failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
if (NSS_CMSSignerInfo_AddSigningTime(*cms_signer, time) != SECSuccess)
@@ -6704,7 +6704,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignerInfo_AddSigningTime failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
if (NSS_CMSSignerInfo_IncludeCerts(*cms_signer, NSSCMSCM_CertChain, certUsageEmailSigner) != SECSuccess)
@@ -6712,7 +6712,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignerInfo_IncludeCerts failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
if (NSS_CMSSignedData_AddCertificate(*cms_sd, cert) != SECSuccess)
@@ -6720,7 +6720,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignedData_AddCertificate failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
if (NSS_CMSSignedData_AddSignerInfo(*cms_sd, *cms_signer) != SECSuccess)
@@ -6728,7 +6728,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignedData_AddSignerInfo failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
if (NSS_CMSSignedData_SetDigestValue(*cms_sd, SEC_OID_SHA1, digest) != SECSuccess)
@@ -6736,7 +6736,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignedData_SetDigestValue failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
return result;
@@ -6869,7 +6869,7 @@ bool PDFWriterImpl::finalizeSignature()
SECItem values[2];
SECItem *valuesp[2];
valuesp[0] = values;
- valuesp[1] = NULL;
+ valuesp[1] = nullptr;
SECOidData typetag;
if( !m_aContext.SignTSA.isEmpty() )
@@ -6888,11 +6888,11 @@ bool PDFWriterImpl::finalizeSignature()
}
SECItem ts_cms_output;
- ts_cms_output.data = 0;
+ ts_cms_output.data = nullptr;
ts_cms_output.len = 0;
PLArenaPool *ts_arena = PORT_NewArena(10000);
NSSCMSEncoderContext *ts_cms_ecx;
- ts_cms_ecx = NSS_CMSEncoder_Start(ts_cms_msg, NULL, NULL, &ts_cms_output, ts_arena, PDFSigningPKCS7PasswordCallback, pass, NULL, NULL, NULL, NULL);
+ ts_cms_ecx = NSS_CMSEncoder_Start(ts_cms_msg, nullptr, nullptr, &ts_cms_output, ts_arena, PDFSigningPKCS7PasswordCallback, pass, nullptr, nullptr, nullptr, nullptr);
if (NSS_CMSEncoder_Finish(ts_cms_ecx) != SECSuccess)
{
@@ -6943,13 +6943,13 @@ bool PDFWriterImpl::finalizeSignature()
src.version.data = &cOne;
src.version.len = sizeof(cOne);
- src.messageImprint.hashAlgorithm.algorithm.data = NULL;
- src.messageImprint.hashAlgorithm.parameters.data = NULL;
- SECOID_SetAlgorithmID(NULL, &src.messageImprint.hashAlgorithm, SEC_OID_SHA1, NULL);
+ src.messageImprint.hashAlgorithm.algorithm.data = nullptr;
+ src.messageImprint.hashAlgorithm.parameters.data = nullptr;
+ SECOID_SetAlgorithmID(nullptr, &src.messageImprint.hashAlgorithm, SEC_OID_SHA1, nullptr);
src.messageImprint.hashedMessage = ts_digest;
src.reqPolicy.type = siBuffer;
- src.reqPolicy.data = NULL;
+ src.reqPolicy.data = nullptr;
src.reqPolicy.len = 0;
unsigned int nNonce = comphelper::rng::uniform_uint_distribution(0, SAL_MAX_UINT32);
@@ -6961,17 +6961,17 @@ bool PDFWriterImpl::finalizeSignature()
src.certReq.data = &cOne;
src.certReq.len = sizeof(cOne);
- src.extensions = NULL;
+ src.extensions = nullptr;
- SECItem* timestamp_request = SEC_ASN1EncodeItem(NULL, NULL, &src, TimeStampReq_Template);
- if (timestamp_request == NULL)
+ SECItem* timestamp_request = SEC_ASN1EncodeItem(nullptr, nullptr, &src, TimeStampReq_Template);
+ if (timestamp_request == nullptr)
{
SAL_WARN("vcl.pdfwriter", "SEC_ASN1EncodeItem failed");
free(pass);
return false;
}
- if (timestamp_request->data == NULL)
+ if (timestamp_request->data == nullptr)
{
SAL_WARN("vcl.pdfwriter", "SEC_ASN1EncodeItem succeeded but got NULL data");
free(pass);
@@ -6993,7 +6993,7 @@ bool PDFWriterImpl::finalizeSignature()
CURL* curl = curl_easy_init();
CURLcode rc;
- struct curl_slist* slist = NULL;
+ struct curl_slist* slist = nullptr;
if (!curl)
{
@@ -7106,7 +7106,7 @@ bool PDFWriterImpl::finalizeSignature()
response_item.data = reinterpret_cast<unsigned char*>(const_cast<char*>(response_buffer.getStr()));
response_item.len = response_buffer.getLength();
- if (SEC_ASN1DecodeItem(NULL, &response, TimeStampResp_Template, &response_item) != SECSuccess)
+ if (SEC_ASN1DecodeItem(nullptr, &response, TimeStampResp_Template, &response_item) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "SEC_ASN1DecodeItem failed");
free(pass);
@@ -7130,16 +7130,16 @@ bool PDFWriterImpl::finalizeSignature()
// like experimenting.
values[0] = response.timeStampToken;
values[1].type = siBuffer;
- values[1].data = NULL;
+ values[1].data = nullptr;
values[1].len = 0;
timestamp.values = valuesp;
- typetag.oid.data = NULL;
+ typetag.oid.data = nullptr;
// id-aa-timeStampToken OBJECT IDENTIFIER ::= { iso(1)
// member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
// smime(16) aa(2) 14 }
- if (my_SEC_StringToOID(NULL, &typetag.oid, "1.2.840.113549.1.9.16.2.14", 0) != SECSuccess)
+ if (my_SEC_StringToOID(nullptr, &typetag.oid, "1.2.840.113549.1.9.16.2.14", 0) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "SEC_StringToOID failed");
free(pass);
@@ -7169,7 +7169,7 @@ bool PDFWriterImpl::finalizeSignature()
}
SECItem cms_output;
- cms_output.data = 0;
+ cms_output.data = nullptr;
cms_output.len = 0;
PLArenaPool *arena = PORT_NewArena(10000);
NSSCMSEncoderContext *cms_ecx;
@@ -7179,7 +7179,7 @@ bool PDFWriterImpl::finalizeSignature()
// with, the software itself pops up a dialog asking for the PIN (password). But I am not going
// to test it and risk locking up my token...
- cms_ecx = NSS_CMSEncoder_Start(cms_msg, NULL, NULL, &cms_output, arena, PDFSigningPKCS7PasswordCallback, pass, NULL, NULL, NULL, NULL);
+ cms_ecx = NSS_CMSEncoder_Start(cms_msg, nullptr, nullptr, &cms_output, arena, PDFSigningPKCS7PasswordCallback, pass, nullptr, nullptr, nullptr, nullptr);
if (!cms_ecx)
{
@@ -7758,7 +7758,7 @@ sal_Int32 PDFWriterImpl::emitOutputIntent()
//force ICC profile version 2.1
cmsSetProfileVersion(hProfile, 2.1);
cmsUInt32Number nBytesNeeded = 0;
- cmsSaveProfileToMem(hProfile, NULL, &nBytesNeeded);
+ cmsSaveProfileToMem(hProfile, nullptr, &nBytesNeeded);
if (!nBytesNeeded)
return 0;
std::vector<unsigned char> xBuffer(nBytesNeeded);
@@ -8314,7 +8314,7 @@ bool PDFWriterImpl::emitAdditionalStreams()
rStream.m_pStream->write( xStream );
xStream.clear();
delete rStream.m_pStream;
- rStream.m_pStream = NULL;
+ rStream.m_pStream = nullptr;
disableStreamEncryption();
if( rStream.m_bCompress )
@@ -8501,11 +8501,11 @@ bool PDFWriterImpl::registerGlyphs( int nGlyphs,
}
EmbedFont& rEmbedFont = m_aEmbeddedFonts[pCurrentFont];
- const Ucs2SIntMap* pEncoding = NULL;
- const Ucs2OStrMap* pNonEncoded = NULL;
+ const Ucs2SIntMap* pEncoding = nullptr;
+ const Ucs2OStrMap* pNonEncoded = nullptr;
if (!getReferenceDevice()->AcquireGraphics())
return false;
- pEncoding = pGraphics->GetFontEncodingVector( pCurrentFont, &pNonEncoded, 0);
+ pEncoding = pGraphics->GetFontEncodingVector( pCurrentFont, &pNonEncoded, nullptr);
Ucs2SIntMap::const_iterator enc_it;
Ucs2OStrMap::const_iterator nonenc_it;
@@ -8552,7 +8552,7 @@ bool PDFWriterImpl::registerGlyphs( int nGlyphs,
}
}
else
- pEncoding = NULL;
+ pEncoding = nullptr;
}
if( ! pEncoding )
{
@@ -8864,7 +8864,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
sal_Int32 pUnicodesPerGlyph[nMaxGlyphs];
int pCharPosAry[nMaxGlyphs];
DeviceCoordinate nAdvanceWidths[nMaxGlyphs];
- const PhysicalFontFace* pFallbackFonts[nMaxGlyphs] = { NULL };
+ const PhysicalFontFace* pFallbackFonts[nMaxGlyphs] = { nullptr };
bool bVertical = m_aCurrentPDFState.m_aFont.IsVertical();
int nGlyphs;
int nIndex = 0;
@@ -10139,7 +10139,7 @@ void PDFWriterImpl::beginRedirect( SvStream* pStream, const Rectangle& rTargetRe
SvStream* PDFWriterImpl::endRedirect()
{
- SvStream* pStream = NULL;
+ SvStream* pStream = nullptr;
if( ! m_aOutputStreams.empty() )
{
pStream = m_aOutputStreams.front().m_pStream;
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index d5421cd7e603..23d27c54c526 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -138,7 +138,7 @@ public:
// to page (useful for transformation matrices
// if pOutPoint is set it will be updated to the emitted point
// (in PDF map mode, that is 10th of point)
- void appendPoint( const Point& rPoint, OStringBuffer& rBuffer, bool bNeg = false, Point* pOutPoint = NULL ) const;
+ void appendPoint( const Point& rPoint, OStringBuffer& rBuffer, bool bNeg = false, Point* pOutPoint = nullptr ) const;
// appends a B2DPoint without further transformation
void appendPixelPoint( const basegfx::B2DPoint& rPoint, OStringBuffer& rBuffer ) const;
// appends a rectangle
@@ -158,9 +158,9 @@ public:
// symmetrical) to page length and appends it to the buffer
// if pOutLength is set it will be updated to the emitted length
// (in PDF map mode, that is 10th of point)
- void appendMappedLength( sal_Int32 nLength, OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = NULL ) const;
+ void appendMappedLength( sal_Int32 nLength, OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = nullptr ) const;
// the same for double values
- void appendMappedLength( double fLength, OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = NULL, sal_Int32 nPrecision = 5 ) const;
+ void appendMappedLength( double fLength, OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = nullptr, sal_Int32 nPrecision = 5 ) const;
// appends LineInfo
// returns false if too many dash array entry were created for
// the implementation limits of some PDF readers
@@ -214,7 +214,7 @@ public:
bool m_bTrueColor;
JPGEmit()
- : m_pStream(NULL)
+ : m_pStream(nullptr)
, m_nObject(0)
, m_bTrueColor(false)
{
@@ -241,7 +241,7 @@ public:
TilingEmit()
: m_nObject( 0 ),
- m_pTilingStream( NULL )
+ m_pTilingStream( nullptr )
{}
};
@@ -259,8 +259,8 @@ public:
: m_nObject( 0 ),
m_nExtGStateObject( -1 ),
m_fAlpha( 0.0 ),
- m_pContentStream( NULL ),
- m_pSoftMaskStream( NULL )
+ m_pContentStream( nullptr ),
+ m_pSoftMaskStream( nullptr )
{}
~TransparencyEmit()
{
@@ -547,7 +547,7 @@ public:
sal_Int32 m_nStreamObject;
bool m_bCompress;
- PDFAddStream() : m_pStream( NULL ), m_nStreamObject( 0 ), m_bCompress( true ) {}
+ PDFAddStream() : m_pStream( nullptr ), m_nStreamObject( 0 ), m_bCompress( true ) {}
};
// helper structure for drawLayout and friends
@@ -1041,7 +1041,7 @@ public:
bool emit();
const std::set< PDFWriter::ErrorCode > & getErrors() const { return m_aErrors;}
void insertError( PDFWriter::ErrorCode eErr ) { m_aErrors.insert( eErr ); }
- void playMetafile( const GDIMetaFile&, vcl::PDFExtOutDevData*, const vcl::PDFWriter::PlayMetafileContext&, VirtualDevice* pDummyDev = NULL );
+ void playMetafile( const GDIMetaFile&, vcl::PDFExtOutDevData*, const vcl::PDFWriter::PlayMetafileContext&, VirtualDevice* pDummyDev = nullptr );
Size getCurPageSize() const
{
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index f7c3d2759d54..3477fa8ef56d 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -61,7 +61,7 @@ void PDFWriterImpl::implWriteGradient( const tools::PolyPolygon& i_rPolyPoly, co
m_rOuterFace.Push();
m_rOuterFace.IntersectClipRegion( i_rPolyPoly.getB2DPolyPolygon() );
- playMetafile( aTmpMtf, NULL, i_rContext, i_pDummyVDev );
+ playMetafile( aTmpMtf, nullptr, i_rContext, i_pDummyVDev );
m_rOuterFace.Pop();
}
@@ -411,7 +411,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
const Color aTransCol( rTransparenceGradient.GetStartColor() );
const sal_uInt16 nTransPercent = aTransCol.GetLuminance() * 100 / 255;
m_rOuterFace.BeginTransparencyGroup();
- playMetafile( aTmpMtf, NULL, i_rContext, pDummyVDev );
+ playMetafile( aTmpMtf, nullptr, i_rContext, pDummyVDev );
m_rOuterFace.EndTransparencyGroup( Rectangle( rPos, rSize ), nTransPercent );
}
else
@@ -505,7 +505,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
m_rOuterFace.SetMapMode( aMapMode );
pDummyVDev->SetMapMode( aMapMode );
- playMetafile( aSubstitute, NULL, i_rContext, pDummyVDev );
+ playMetafile( aSubstitute, nullptr, i_rContext, pDummyVDev );
pDummyVDev->Pop();
m_rOuterFace.Pop();
}
@@ -518,7 +518,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
if( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN"))
{
- const MetaGradientExAction* pGradAction = NULL;
+ const MetaGradientExAction* pGradAction = nullptr;
bool bDone = false;
while( !bDone && ( ++i < nCount ) )
@@ -1101,7 +1101,7 @@ public:
if( maUDigest )
{
rtl_digest_destroyMD5( maUDigest );
- maUDigest = NULL;
+ maUDigest = nullptr;
}
}
@@ -1119,7 +1119,7 @@ std::map< sal_IntPtr, EncHashTransporter* > EncHashTransporter::sTransporters;
EncHashTransporter* EncHashTransporter::getEncHashTransporter( const uno::Reference< beans::XMaterialHolder >& xRef )
{
- EncHashTransporter* pResult = NULL;
+ EncHashTransporter* pResult = nullptr;
if( xRef.is() )
{
uno::Any aMat( xRef->getMaterial() );
@@ -1165,7 +1165,7 @@ void PDFWriterImpl::checkAndEnableStreamEncryption( register sal_Int32 nObject )
rtl_digest_MD5( &m_aContext.Encryption.EncryptionKey[0], i+2, nMD5Sum, sizeof(nMD5Sum) );
// initialize the RC4 with the key
// key length: see algorithm 3.1, step 4: (N+5) max 16
- rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, NULL, 0 );
+ rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, nullptr, 0 );
}
}
@@ -1184,7 +1184,7 @@ void PDFWriterImpl::enableStringEncryption( register sal_Int32 nObject )
rtl_digest_MD5( &m_aContext.Encryption.EncryptionKey[0], i+2, nMD5Sum, sizeof(nMD5Sum) );
// initialize the RC4 with the key
// key length: see algorithm 3.1, step 4: (N+5) max 16
- rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, NULL, 0 );
+ rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, nullptr, 0 );
}
}
@@ -1431,7 +1431,7 @@ bool PDFWriterImpl::computeODictionaryValue( const sal_uInt8* i_pPaddedOwnerPass
//step 5 already done, data is in i_pPaddedUserPassword
//step 6
rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode,
- nMD5Sum, i_nKeyLength , NULL, 0 );
+ nMD5Sum, i_nKeyLength , nullptr, 0 );
// encrypt the user password using the key set above
rtl_cipher_encodeARCFOUR( aCipher, i_pPaddedUserPassword, ENCRYPTED_PWD_SIZE, // the data to be encrypted
&io_rOValue[0], sal_Int32(io_rOValue.size()) ); //encrypted data
@@ -1447,7 +1447,7 @@ bool PDFWriterImpl::computeODictionaryValue( const sal_uInt8* i_pPaddedOwnerPass
nLocalKey[y] = (sal_uInt8)( nMD5Sum[y] ^ i );
rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode,
- nLocalKey, SECUR_128BIT_KEY, NULL, 0 ); //destination data area, on init can be NULL
+ nLocalKey, SECUR_128BIT_KEY, nullptr, 0 ); //destination data area, on init can be NULL
rtl_cipher_encodeARCFOUR( aCipher, &io_rOValue[0], sal_Int32(io_rOValue.size()), // the data to be encrypted
&io_rOValue[0], sal_Int32(io_rOValue.size()) ); // encrypted data, can be the same as the input, encrypt "in place"
//step 8, store in class data member
@@ -1500,7 +1500,7 @@ bool PDFWriterImpl::computeUDictionaryValue( EncHashTransporter* i_pTransporter,
//step 2 and 3
rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode,
&io_rProperties.EncryptionKey[0], 5 , // key and key length
- NULL, 0 ); //destination data area
+ nullptr, 0 ); //destination data area
// encrypt the user password using the key set above, save for later use
rtl_cipher_encodeARCFOUR( aCipher, s_nPadString, sizeof( s_nPadString ), // the data to be encrypted
&io_rProperties.UValue[0], sal_Int32(io_rProperties.UValue.size()) ); //encrypted data, stored in class data member
@@ -1522,7 +1522,7 @@ bool PDFWriterImpl::computeUDictionaryValue( EncHashTransporter* i_pTransporter,
rtl_digest_getMD5( aDigest, nMD5Sum, sizeof(nMD5Sum) );
//Step 4
rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode,
- &io_rProperties.EncryptionKey[0], SECUR_128BIT_KEY, NULL, 0 ); //destination data area
+ &io_rProperties.EncryptionKey[0], SECUR_128BIT_KEY, nullptr, 0 ); //destination data area
rtl_cipher_encodeARCFOUR( aCipher, nMD5Sum, sizeof( nMD5Sum ), // the data to be encrypted
&io_rProperties.UValue[0], sizeof( nMD5Sum ) ); //encrypted data, stored in class data member
//step 5
@@ -1536,7 +1536,7 @@ bool PDFWriterImpl::computeUDictionaryValue( EncHashTransporter* i_pTransporter,
rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode,
nLocalKey, SECUR_128BIT_KEY, // key and key length
- NULL, 0 ); //destination data area, on init can be NULL
+ nullptr, 0 ); //destination data area, on init can be NULL
rtl_cipher_encodeARCFOUR( aCipher, &io_rProperties.UValue[0], SECUR_128BIT_KEY, // the data to be encrypted
&io_rProperties.UValue[0], SECUR_128BIT_KEY ); // encrypted data, can be the same as the input, encrypt "in place"
}
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index fd487c12a769..7996f46fe7c1 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -165,15 +165,15 @@ public:
PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
: mrPNGStream( rPNGStream ),
- mpBmp ( NULL ),
- mpAcc ( NULL ),
- mpMaskBmp ( NULL ),
- mpAlphaMask ( NULL ),
- mpMaskAcc ( NULL ),
- mpInflateInBuf ( NULL ),
- mpScanPrior ( NULL ),
- mpTransTab ( NULL ),
- mpScanCurrent ( NULL ),
+ mpBmp ( nullptr ),
+ mpAcc ( nullptr ),
+ mpMaskBmp ( nullptr ),
+ mpAlphaMask ( nullptr ),
+ mpMaskAcc ( nullptr ),
+ mpInflateInBuf ( nullptr ),
+ mpScanPrior ( nullptr ),
+ mpTransTab ( nullptr ),
+ mpScanCurrent ( nullptr ),
mpColorTable ( const_cast<sal_uInt8*>(mpDefaultColorTable) ),
mnChunkType ( 0 ),
mnChunkLen ( 0 ),
@@ -208,8 +208,8 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
mnAllocSizeScanline(0),
mnAllocSizeScanlineAlpha(0),
#endif
- mpScanline(0),
- mpScanlineAlpha(0)
+ mpScanline(nullptr),
+ mpScanlineAlpha(nullptr)
{
// prepare the PNG data stream
mnOrigStreamMode = mrPNGStream.GetEndian();
@@ -424,7 +424,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
// release write access of the bitmaps
if ( mpAcc )
- Bitmap::ReleaseAccess( mpAcc ), mpAcc = NULL;
+ Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr;
if ( mpMaskAcc )
{
@@ -433,7 +433,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
else if ( mpMaskBmp )
Bitmap::ReleaseAccess( mpMaskAcc );
- mpMaskAcc = NULL;
+ mpMaskAcc = nullptr;
}
// return the resulting BitmapEx
@@ -729,7 +729,7 @@ bool PNGReaderImpl::ImplReadTransparent()
{
bool bNeedAlpha = false;
- if ( mpTransTab == NULL )
+ if ( mpTransTab == nullptr )
{
switch ( mnColorType )
{
@@ -793,7 +793,7 @@ bool PNGReaderImpl::ImplReadTransparent()
mpMaskBmp = new Bitmap( maTargetSize, 1 );
mpMaskAcc = mpMaskBmp->AcquireWriteAccess();
}
- mbTransparent = (mpMaskAcc != NULL);
+ mbTransparent = (mpMaskAcc != nullptr);
if( !mbTransparent )
return false;
mcOpaqueColor = BitmapColor( 0x00 );
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 88ddc059400a..f7c7ed8b6675 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -48,7 +48,7 @@ class PNGWriterImpl
public:
PNGWriterImpl(const BitmapEx& BmpEx,
- const css::uno::Sequence<css::beans::PropertyValue>* pFilterData = NULL);
+ const css::uno::Sequence<css::beans::PropertyValue>* pFilterData = nullptr);
bool Write(SvStream& rOutStream);
@@ -102,11 +102,11 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
, mnInterlaced(0)
, mnMaxChunkSize(0)
, mbStatus(true)
- , mpAccess(NULL)
- , mpMaskAccess(NULL)
- , mpDeflateInBuf(NULL)
- , mpPreviousScan(NULL)
- , mpCurrentScan(NULL)
+ , mpAccess(nullptr)
+ , mpMaskAccess(nullptr)
+ , mpDeflateInBuf(nullptr)
+ , mpPreviousScan(nullptr)
+ , mpCurrentScan(nullptr)
, mnDeflateInSize(0)
, mnWidth(0)
, mnHeight(0)
@@ -168,7 +168,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
ImplWriteIDAT();
}
Bitmap::ReleaseAccess(mpAccess);
- mpAccess = NULL;
+ mpAccess = nullptr;
}
else
{
@@ -192,7 +192,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
ImplWriteIDAT();
}
aMask.ReleaseAccess(mpMaskAccess);
- mpMaskAccess = NULL;
+ mpMaskAccess = nullptr;
}
else
{
@@ -211,7 +211,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
ImplWriteIDAT();
}
Bitmap::ReleaseAccess(mpMaskAccess);
- mpMaskAccess = NULL;
+ mpMaskAccess = nullptr;
}
else
{
@@ -219,7 +219,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
}
}
Bitmap::ReleaseAccess(mpAccess);
- mpAccess = NULL;
+ mpAccess = nullptr;
}
else
{
@@ -241,7 +241,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
ImplWriteIDAT();
}
Bitmap::ReleaseAccess(mpAccess);
- mpAccess = NULL;
+ mpAccess = nullptr;
}
else
{
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 6b02440f026e..ebe19e95b327 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -255,10 +255,10 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
// operation explicitly further below.
if( mpAlphaVDev )
- mpAlphaVDev = NULL;
+ mpAlphaVDev = nullptr;
GDIMetaFile* pOldMetaFile = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
mpMetaFile = pOldMetaFile;
@@ -391,7 +391,7 @@ SalPrinterQueueInfo::SalPrinterQueueInfo()
{
mnStatus = PrintQueueFlags::NONE;
mnJobs = QUEUE_JOBS_DONTKNOW;
- mpSysData = NULL;
+ mpSysData = nullptr;
}
SalPrinterQueueInfo::~SalPrinterQueueInfo()
@@ -416,7 +416,7 @@ void ImplPrnQueueList::Add( SalPrinterQueueInfo* pData )
{
m_aNameToIndex[ pData->maPrinterName ] = m_aQueueInfos.size();
m_aQueueInfos.push_back( ImplPrnQueueData() );
- m_aQueueInfos.back().mpQueueInfo = NULL;
+ m_aQueueInfos.back().mpQueueInfo = nullptr;
m_aQueueInfos.back().mpSalQueueInfo = pData;
m_aPrinterList.push_back( pData->maPrinterName );
}
@@ -424,7 +424,7 @@ void ImplPrnQueueList::Add( SalPrinterQueueInfo* pData )
{
ImplPrnQueueData& rData = m_aQueueInfos[ it->second ];
delete rData.mpQueueInfo;
- rData.mpQueueInfo = NULL;
+ rData.mpQueueInfo = nullptr;
ImplGetSVData()->mpDefInst->DeletePrinterQueueInfo( rData.mpSalQueueInfo );
rData.mpSalQueueInfo = pData;
}
@@ -432,7 +432,7 @@ void ImplPrnQueueList::Add( SalPrinterQueueInfo* pData )
ImplPrnQueueData* ImplPrnQueueList::Get( const OUString& rPrinter )
{
- ImplPrnQueueData* pData = NULL;
+ ImplPrnQueueData* pData = nullptr;
std::unordered_map<OUString,sal_Int32,OUStringHash>::iterator it =
m_aNameToIndex.find( rPrinter );
if( it != m_aNameToIndex.end() )
@@ -459,7 +459,7 @@ void ImplDeletePrnQueueList()
if ( pPrnList )
{
delete pPrnList;
- pSVData->maGDIData.mpPrinterQueueList = NULL;
+ pSVData->maGDIData.mpPrinterQueueList = nullptr;
}
}
@@ -479,7 +479,7 @@ const QueueInfo* Printer::GetQueueInfo( const OUString& rPrinterName, bool bStat
ImplInitPrnQueueList();
if ( !pSVData->maGDIData.mpPrinterQueueList )
- return NULL;
+ return nullptr;
ImplPrnQueueData* pInfo = pSVData->maGDIData.mpPrinterQueueList->Get( rPrinterName );
if( pInfo )
@@ -498,7 +498,7 @@ const QueueInfo* Printer::GetQueueInfo( const OUString& rPrinterName, bool bStat
pInfo->mpQueueInfo->mnJobs = pInfo->mpSalQueueInfo->mnJobs;
return pInfo->mpQueueInfo;
}
- return NULL;
+ return nullptr;
}
OUString Printer::GetDefaultPrinterName()
@@ -529,16 +529,16 @@ void Printer::ImplInitData()
mbPrintFile = false;
mbInPrintPage = false;
mbNewJobSetup = false;
- mpInfoPrinter = NULL;
- mpPrinter = NULL;
- mpDisplayDev = NULL;
+ mpInfoPrinter = nullptr;
+ mpPrinter = nullptr;
+ mpDisplayDev = nullptr;
mbIsQueuePrinter = false;
mpPrinterOptions = new PrinterOptions;
// Add printer to the list
ImplSVData* pSVData = ImplGetSVData();
mpNext = pSVData->maGDIData.mpFirstPrinter;
- mpPrev = NULL;
+ mpPrev = nullptr;
if ( mpNext )
mpNext->mpPrev = this;
else
@@ -633,19 +633,19 @@ void Printer::ImplReleaseFonts()
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
}
@@ -697,9 +697,9 @@ void Printer::ReleaseGraphics( bool bRelease )
}
}
- mpGraphics = NULL;
- mpPrevGraphics = NULL;
- mpNextGraphics = NULL;
+ mpGraphics = nullptr;
+ mpPrevGraphics = nullptr;
+ mpNextGraphics = nullptr;
}
void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
@@ -717,7 +717,7 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
(pJobSetup->maDriver != pInfo->maDriver) )
{
rtl_freeMemory( pJobSetup->mpDriverData );
- pJobSetup->mpDriverData = NULL;
+ pJobSetup->mpDriverData = nullptr;
pJobSetup->mnDriverDataLen = 0;
}
}
@@ -731,20 +731,20 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
pJobSetup->maDriver = maDriver;
mpInfoPrinter = pSVData->mpDefInst->CreateInfoPrinter( pInfo, pJobSetup );
- mpPrinter = NULL;
- mpJobGraphics = NULL;
+ mpPrinter = nullptr;
+ mpJobGraphics = nullptr;
ImplUpdateJobSetupPaper( maJobSetup );
if ( !mpInfoPrinter )
{
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
return;
}
// we need a graphics
if ( !AcquireGraphics() )
{
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
return;
}
@@ -759,9 +759,9 @@ void Printer::ImplInitDisplay( const vcl::Window* pWindow )
{
ImplSVData* pSVData = ImplGetSVData();
- mpInfoPrinter = NULL;
- mpPrinter = NULL;
- mpJobGraphics = NULL;
+ mpInfoPrinter = nullptr;
+ mpPrinter = nullptr;
+ mpJobGraphics = nullptr;
if ( pWindow )
mpDisplayDev = VclPtr<VirtualDevice>::Create( *pWindow );
@@ -824,7 +824,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
GDIMetaFile* pOldMetaFile = mpMetaFile;
const bool bOldMap = mbMap;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
mbMap = false;
Push( PushFlags::FILLCOLOR | PushFlags::LINECOLOR );
SetLineColor( rMaskColor );
@@ -903,7 +903,7 @@ SalPrinterQueueInfo* Printer::ImplGetQueueInfo( const OUString& rPrinterName,
return pPrnList->m_aQueueInfos[0].mpSalQueueInfo;
}
- return NULL;
+ return nullptr;
}
void Printer::ImplUpdatePageData()
@@ -935,7 +935,7 @@ long Printer::GetGradientStepCount( long nMinRect )
Printer::Printer()
{
ImplInitData();
- SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( GetDefaultPrinterName(), NULL );
+ SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( GetDefaultPrinterName(), nullptr );
if ( pInfo )
{
ImplInit( pInfo );
@@ -943,7 +943,7 @@ Printer::Printer()
mbDefPrinter = true;
}
else
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
}
Printer::Printer( const JobSetup& rJobSetup ) :
@@ -959,7 +959,7 @@ Printer::Printer( const JobSetup& rJobSetup ) :
}
else
{
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
maJobSetup = JobSetup();
}
}
@@ -972,17 +972,17 @@ Printer::Printer( const QueueInfo& rQueueInfo )
if ( pInfo )
ImplInit( pInfo );
else
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
}
Printer::Printer( const OUString& rPrinterName )
{
ImplInitData();
- SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( rPrinterName, NULL );
+ SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( rPrinterName, nullptr );
if ( pInfo )
ImplInit( pInfo );
else
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
}
Printer::~Printer()
@@ -996,7 +996,7 @@ void Printer::dispose()
DBG_ASSERT( !IsJobActive(), "Printer::~Printer() - Job is active" );
delete mpPrinterOptions;
- mpPrinterOptions = NULL;
+ mpPrinterOptions = nullptr;
ReleaseGraphics();
if ( mpInfoPrinter )
@@ -1011,20 +1011,20 @@ void Printer::dispose()
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
delete mpFontCache;
- mpFontCache = NULL;
+ mpFontCache = nullptr;
// font list deleted by OutputDevice dtor
}
@@ -1165,31 +1165,31 @@ bool Printer::SetPrinterProps( const Printer* pPrinter )
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
// clean up font list
delete mpFontCache;
delete mpFontCollection;
- mpFontCache = NULL;
- mpFontCollection = NULL;
+ mpFontCache = nullptr;
+ mpFontCollection = nullptr;
mbInitFont = true;
mbNewFont = true;
- mpInfoPrinter = NULL;
+ mpInfoPrinter = nullptr;
}
// Construct new printer
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
return true;
}
@@ -1208,25 +1208,25 @@ bool Printer::SetPrinterProps( const Printer* pPrinter )
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
delete mpFontCache;
delete mpFontCollection;
- mpFontCache = NULL;
- mpFontCollection = NULL;
+ mpFontCache = nullptr;
+ mpFontCollection = nullptr;
mbInitFont = true;
mbNewFont = true;
- mpInfoPrinter = NULL;
+ mpInfoPrinter = nullptr;
}
// Construct new printer
@@ -1238,7 +1238,7 @@ bool Printer::SetPrinterProps( const Printer* pPrinter )
SetJobSetup( pPrinter->GetJobSetup() );
}
else
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
}
else
SetJobSetup( pPrinter->GetJobSetup() );
@@ -1698,7 +1698,7 @@ bool Printer::EndJob()
// can't handle destroying a printer object and printing
// at the same time
ImplGetSVData()->mpDefInst->DestroyPrinter( mpPrinter );
- mpPrinter = NULL;
+ mpPrinter = nullptr;
}
return bRet;
@@ -1742,7 +1742,7 @@ void Printer::ImplEndPage()
ReleaseGraphics();
mbDevOutput = false;
- mpJobGraphics = NULL;
+ mpJobGraphics = nullptr;
mbNewJobSetup = false;
}
}
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 1bb93c90e353..84acd47b3036 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -1124,7 +1124,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
aTmpSize = pThis->GetPaperSizePixel();
}
const Rectangle aOutputRect( aPageOffset, aTmpSize );
- bool bTiling = dynamic_cast<Printer*>(this) != NULL;
+ bool bTiling = dynamic_cast<Printer*>(this) != nullptr;
// iterate over all aCCList members and generate bitmaps for the special ones
for( aCurr = aCCList.begin(); aCurr != aLast; ++aCurr )
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 9a1fbf187115..b434ac4fd242 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -188,7 +188,7 @@ public:
mbPapersizeFromSetup( false ),
mbPrinterModified( false ),
meJobState( view::PrintableState_JOB_STARTED ),
- mpProgress( NULL ),
+ mpProgress( nullptr ),
mnDefaultPaperBin( -1 ),
mnFixedPaperBin( -1 )
{}
@@ -589,7 +589,7 @@ bool Printer::StartJob( const OUString& i_rJobName, std::shared_ptr<vcl::Printer
}
}
- OUString* pPrintFile = NULL;
+ OUString* pPrintFile = nullptr;
if ( mbPrintFile )
pPrintFile = &maPrintFile;
mpPrinterOptions->ReadFromConfig( mbPrintFile );
@@ -622,7 +622,7 @@ bool Printer::StartJob( const OUString& i_rJobName, std::shared_ptr<vcl::Printer
mnCurPage = 0;
mnCurPrintPage = 0;
mbPrinting = false;
- mpPrinter = NULL;
+ mpPrinter = nullptr;
mbJobActive = false;
GDIMetaFile aDummyFile;
@@ -737,7 +737,7 @@ bool Printer::StartJob( const OUString& i_rJobName, std::shared_ptr<vcl::Printer
mnCurPage = 0;
mnCurPrintPage = 0;
mbPrinting = false;
- mpPrinter = NULL;
+ mpPrinter = nullptr;
return false;
}
@@ -1434,14 +1434,14 @@ PropertyValue* PrinterController::getValue( const OUString& i_rProperty )
{
std::unordered_map< OUString, size_t, OUStringHash >::const_iterator it =
mpImplData->maPropertyToIndex.find( i_rProperty );
- return it != mpImplData->maPropertyToIndex.end() ? &mpImplData->maUIProperties[it->second] : NULL;
+ return it != mpImplData->maPropertyToIndex.end() ? &mpImplData->maUIProperties[it->second] : nullptr;
}
const PropertyValue* PrinterController::getValue( const OUString& i_rProperty ) const
{
std::unordered_map< OUString, size_t, OUStringHash >::const_iterator it =
mpImplData->maPropertyToIndex.find( i_rProperty );
- return it != mpImplData->maPropertyToIndex.end() ? &mpImplData->maUIProperties[it->second] : NULL;
+ return it != mpImplData->maPropertyToIndex.end() ? &mpImplData->maUIProperties[it->second] : nullptr;
}
void PrinterController::setValue( const OUString& i_rName, const Any& i_rValue )
@@ -1956,7 +1956,7 @@ Any PrinterOptionsHelper::setSubgroupControlOpt(const OUString& i_rID,
}
Sequence< OUString > aIds(1);
aIds[0] = i_rID;
- return setUIControlOpt(aIds, i_rTitle, aHelpId, "Subgroup", NULL, i_rControlOptions);
+ return setUIControlOpt(aIds, i_rTitle, aHelpId, "Subgroup", nullptr, i_rControlOptions);
}
Any PrinterOptionsHelper::setBoolControlOpt(const OUString& i_rID,
diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx
index ecf55c860fb4..a729fa94d574 100644
--- a/vcl/source/gdi/regband.cxx
+++ b/vcl/source/gdi/regband.cxx
@@ -46,10 +46,10 @@ ImplRegionBand::ImplRegionBand( long nTop, long nBottom )
mnYBottom = nBottom;
// initialize lists
- mpNextBand = NULL;
- mpPrevBand = NULL;
- mpFirstSep = NULL;
- mpFirstBandPoint = NULL;
+ mpNextBand = nullptr;
+ mpPrevBand = nullptr;
+ mpFirstSep = nullptr;
+ mpFirstBandPoint = nullptr;
mbTouched = false;
}
@@ -63,14 +63,14 @@ ImplRegionBand::ImplRegionBand(
mbTouched = rRegionBand.mbTouched;
// initialisation
- mpNextBand = NULL;
- mpPrevBand = NULL;
- mpFirstSep = NULL;
- mpFirstBandPoint = NULL;
+ mpNextBand = nullptr;
+ mpPrevBand = nullptr;
+ mpFirstSep = nullptr;
+ mpFirstBandPoint = nullptr;
// copy all elements of the list with separations
ImplRegionBandSep* pNewSep;
- ImplRegionBandSep* pPrevSep = 0;
+ ImplRegionBandSep* pPrevSep = nullptr;
ImplRegionBandSep* pSep = rRegionBand.mpFirstSep;
while ( pSep )
{
@@ -79,7 +79,7 @@ ImplRegionBand::ImplRegionBand(
pNewSep->mnXLeft = pSep->mnXLeft;
pNewSep->mnXRight = pSep->mnXRight;
pNewSep->mbRemoved = pSep->mbRemoved;
- pNewSep->mpNextSep = NULL;
+ pNewSep->mpNextSep = nullptr;
if ( pSep == rRegionBand.mpFirstSep )
mpFirstSep = pNewSep;
else
@@ -93,8 +93,8 @@ ImplRegionBand::ImplRegionBand(
{
// Copy points.
ImplRegionBandPoint* pPoint = rRegionBand.mpFirstBandPoint;
- ImplRegionBandPoint* pPrevPointCopy = NULL;
- while (pPoint != NULL)
+ ImplRegionBandPoint* pPrevPointCopy = nullptr;
+ while (pPoint != nullptr)
{
ImplRegionBandPoint* pPointCopy = new ImplRegionBandPoint();
pPointCopy->mnX = pPoint->mnX;
@@ -102,7 +102,7 @@ ImplRegionBand::ImplRegionBand(
pPointCopy->mbEndPoint = pPoint->mbEndPoint;
pPointCopy->meLineType = pPoint->meLineType;
- if (pPrevPointCopy != NULL)
+ if (pPrevPointCopy != nullptr)
pPrevPointCopy->mpNextBandPoint = pPointCopy;
else
mpFirstBandPoint = pPointCopy;
@@ -115,7 +115,7 @@ ImplRegionBand::ImplRegionBand(
ImplRegionBand::~ImplRegionBand()
{
- DBG_ASSERT( mpFirstBandPoint == NULL, "ImplRegionBand::~ImplRegionBand -> pointlist not empty" );
+ DBG_ASSERT( mpFirstBandPoint == nullptr, "ImplRegionBand::~ImplRegionBand -> pointlist not empty" );
// delete elements of the list
ImplRegionBandSep* pSep = mpFirstSep;
@@ -184,7 +184,7 @@ void ImplRegionBand::ProcessPoints()
delete pRegionBandPoint;
// list is now empty
- mpFirstBandPoint = NULL;
+ mpFirstBandPoint = nullptr;
}
// generate separations from lines and process union with existing
@@ -200,13 +200,13 @@ bool ImplRegionBand::InsertPoint( long nX, long nLineId,
mpFirstBandPoint->mnLineId = nLineId;
mpFirstBandPoint->mbEndPoint = bEndPoint;
mpFirstBandPoint->meLineType = eLineType;
- mpFirstBandPoint->mpNextBandPoint = NULL;
+ mpFirstBandPoint->mpNextBandPoint = nullptr;
return true;
}
// look if line already touched the band
ImplRegionBandPoint* pRegionBandPoint = mpFirstBandPoint;
- ImplRegionBandPoint* pLastTestedRegionBandPoint = NULL;
+ ImplRegionBandPoint* pLastTestedRegionBandPoint = nullptr;
while( pRegionBandPoint )
{
if ( pRegionBandPoint->mnLineId == nLineId )
@@ -257,7 +257,7 @@ bool ImplRegionBand::InsertPoint( long nX, long nLineId,
ImplRegionBandPoint* pNewRegionBandPoint;
pRegionBandPoint = mpFirstBandPoint;
- pLastTestedRegionBandPoint = NULL;
+ pLastTestedRegionBandPoint = nullptr;
while ( pRegionBandPoint )
{
// new point completely left? -> insert as first point
@@ -290,7 +290,7 @@ bool ImplRegionBand::InsertPoint( long nX, long nLineId,
pNewRegionBandPoint->mnLineId = nLineId;
pNewRegionBandPoint->mbEndPoint = bEndPoint;
pNewRegionBandPoint->meLineType = eLineType;
- pNewRegionBandPoint->mpNextBandPoint = NULL;
+ pNewRegionBandPoint->mpNextBandPoint = nullptr;
// connections to the new point
pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint;
@@ -325,7 +325,7 @@ void ImplRegionBand::ScaleX( double fHorzScale )
bool ImplRegionBand::OptimizeBand()
{
- ImplRegionBandSep* pPrevSep = 0;
+ ImplRegionBandSep* pPrevSep = nullptr;
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
@@ -375,13 +375,13 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
mpFirstSep->mnXLeft = nXLeft;
mpFirstSep->mnXRight = nXRight;
mpFirstSep->mbRemoved = false;
- mpFirstSep->mpNextSep = NULL;
+ mpFirstSep->mpNextSep = nullptr;
return;
}
// process real union
ImplRegionBandSep* pNewSep;
- ImplRegionBandSep* pPrevSep = 0;
+ ImplRegionBandSep* pPrevSep = nullptr;
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
@@ -425,7 +425,7 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
pNewSep->mbRemoved = false;
pSep->mpNextSep = pNewSep;
- pNewSep->mpNextSep = NULL;
+ pNewSep->mpNextSep = nullptr;
break;
}
@@ -494,7 +494,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
// process real exclusion
ImplRegionBandSep* pNewSep;
- ImplRegionBandSep* pPrevSep = 0;
+ ImplRegionBandSep* pPrevSep = nullptr;
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
@@ -614,13 +614,13 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
mpFirstSep->mnXLeft = nXLeft;
mpFirstSep->mnXRight = nXRight;
mpFirstSep->mbRemoved = false;
- mpFirstSep->mpNextSep = NULL;
+ mpFirstSep->mpNextSep = nullptr;
return;
}
// process real xor
ImplRegionBandSep* pNewSep;
- ImplRegionBandSep* pPrevSep = 0;
+ ImplRegionBandSep* pPrevSep = nullptr;
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
@@ -652,14 +652,14 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
mpFirstSep = pNewSep;
else
pPrevSep->mpNextSep = pNewSep;
- pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
+ pPrevSep = nullptr; // do not run accidentally into the "right" case when breaking the loop
break;
}
else if( nXLeft == nOldLeft && nXRight == nOldRight )
{
// #3
pSep->mbRemoved = true;
- pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
+ pPrevSep = nullptr; // do not run accidentally into the "right" case when breaking the loop
break;
}
else if( nXLeft != nOldLeft && nXRight == nOldRight )
@@ -678,7 +678,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pSep->mnXLeft = nXLeft;
pSep->mnXRight = nXRight-1;
- pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
+ pPrevSep = nullptr; // do not run accidentally into the "right" case when breaking the loop
break;
}
else if( nXLeft == nOldLeft && nXRight != nOldRight )
@@ -697,7 +697,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
{
pSep->mnXLeft = nXRight+1; // 9
- pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
+ pPrevSep = nullptr; // do not run accidentally into the "right" case when breaking the loop
break;
}
}
@@ -776,7 +776,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
// connections from the new separation
pSep->mpNextSep = pNewSep;
- pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
+ pPrevSep = nullptr; // do not run accidentally into the "right" case when breaking the loop
break;
}
}
@@ -792,7 +792,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep = new ImplRegionBandSep;
pNewSep->mnXLeft = nXLeft;
pNewSep->mnXRight = nXRight;
- pNewSep->mpNextSep = NULL;
+ pNewSep->mpNextSep = nullptr;
pNewSep->mbRemoved = false;
// connections from the new separation
@@ -825,7 +825,7 @@ long ImplRegionBand::GetXLeftBoundary() const
long ImplRegionBand::GetXRightBoundary() const
{
- DBG_ASSERT( mpFirstSep != NULL, "ImplRegionBand::XRightBoundary -> no separation in band!" );
+ DBG_ASSERT( mpFirstSep != nullptr, "ImplRegionBand::XRightBoundary -> no separation in band!" );
// search last separation
ImplRegionBandSep* pSep = mpFirstSep;
@@ -882,7 +882,7 @@ ImplRegionBand* ImplRegionBand::SplitBand (const sal_Int32 nY)
pLowerBand->mpNextBand = mpNextBand;
mpNextBand = pLowerBand;
pLowerBand->mpPrevBand = this;
- if (pLowerBand->mpNextBand != NULL)
+ if (pLowerBand->mpNextBand != nullptr)
pLowerBand->mpNextBand->mpPrevBand = pLowerBand;
return pLowerBand;
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 243c53033c24..c77e9cd7b374 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -132,12 +132,12 @@ namespace
// Find top-most band that may contain nTop.
ImplRegionBand* pBand = pRegionBand->ImplGetFirstRegionBand();
- while (pBand!=NULL && pBand->mnYBottom < nTop)
+ while (pBand!=nullptr && pBand->mnYBottom < nTop)
pBand = pBand->mpNextBand;
ImplRegionBand* pTopBand = pBand;
// If necessary split the band at nTop so that nTop is contained
// in the lower band.
- if (pBand!=NULL
+ if (pBand!=nullptr
// Prevent the current band from becoming 0 pixel high
&& pBand->mnYTop<nTop
// this allows the lowest pixel of the band to be split off
@@ -150,11 +150,11 @@ namespace
}
// Advance to band that may contain nBottom.
- while (pBand!=NULL && pBand->mnYBottom < nBottom)
+ while (pBand!=nullptr && pBand->mnYBottom < nBottom)
pBand = pBand->mpNextBand;
// The lowest band may have to be split at nBottom so that
// nBottom itself remains in the upper band.
- if (pBand!=NULL
+ if (pBand!=nullptr
// allow the current band becoming 1 pixel high
&& pBand->mnYTop<=nBottom
// prevent splitting off a band that is 0 pixel high
@@ -171,7 +171,7 @@ namespace
// coordinates.
// Add the x-value as point to all bands in the nTop->nBottom range.
- for (pBand=pTopBand; pBand!=NULL&&pBand->mnYTop<=nBottom; pBand=pBand->mpNextBand)
+ for (pBand=pTopBand; pBand!=nullptr&&pBand->mnYTop<=nBottom; pBand=pBand->mpNextBand)
pBand->InsertPoint(aStart.X(), nLineId++, true, eLineType);
}
}
@@ -233,7 +233,7 @@ bool vcl::Region::IsEmpty() const
RegionBand* ImplCreateRegionBandFromPolyPolygon(const tools::PolyPolygon& rPolyPolygon)
{
- RegionBand* pRetval = 0;
+ RegionBand* pRetval = nullptr;
if(rPolyPolygon.Count())
{
@@ -269,7 +269,7 @@ RegionBand* ImplCreateRegionBandFromPolyPolygon(const tools::PolyPolygon& rPolyP
if(!pRetval->OptimizeBandList())
{
delete pRetval;
- pRetval = 0;
+ pRetval = nullptr;
}
}
}
@@ -322,7 +322,7 @@ Region::Region(const Rectangle& rRect)
mpRegionBand(),
mbIsNull(false)
{
- mpRegionBand.reset(rRect.IsEmpty() ? 0 : new RegionBand(rRect));
+ mpRegionBand.reset(rRect.IsEmpty() ? nullptr : new RegionBand(rRect));
}
Region::Region(const tools::Polygon& rPolygon)
@@ -430,7 +430,7 @@ void vcl::Region::Move( long nHorzMove, long nVertMove )
basegfx::B2DPolyPolygon aPoly(*getB2DPolyPolygon());
aPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(nHorzMove, nVertMove));
- mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : 0);
+ mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : nullptr);
mpPolyPolygon.reset();
mpRegionBand.reset();
}
@@ -440,7 +440,7 @@ void vcl::Region::Move( long nHorzMove, long nVertMove )
aPoly.Move(nHorzMove, nVertMove);
mpB2DPolyPolygon.reset();
- mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : 0);
+ mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : nullptr);
mpRegionBand.reset();
}
else if(getRegionBand())
@@ -477,7 +477,7 @@ void vcl::Region::Scale( double fScaleX, double fScaleY )
basegfx::B2DPolyPolygon aPoly(*getB2DPolyPolygon());
aPoly.transform(basegfx::tools::createScaleB2DHomMatrix(fScaleX, fScaleY));
- mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : 0);
+ mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : nullptr);
mpPolyPolygon.reset();
mpRegionBand.reset();
}
@@ -487,7 +487,7 @@ void vcl::Region::Scale( double fScaleX, double fScaleY )
aPoly.Scale(fScaleX, fScaleY);
mpB2DPolyPolygon.reset();
- mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : 0);
+ mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : nullptr);
mpRegionBand.reset();
}
else if(getRegionBand())
@@ -580,7 +580,7 @@ bool vcl::Region::Union( const Rectangle& rRect )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -625,7 +625,7 @@ bool vcl::Region::Intersect( const Rectangle& rRect )
true,
false));
- mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : 0);
+ mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : nullptr);
mpPolyPolygon.reset();
mpRegionBand.reset();
}
@@ -639,7 +639,7 @@ bool vcl::Region::Intersect( const Rectangle& rRect )
aPoly.Clip(rRect);
mpB2DPolyPolygon.reset();
- mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : 0);
+ mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : nullptr);
mpRegionBand.reset();
}
@@ -673,7 +673,7 @@ bool vcl::Region::Intersect( const Rectangle& rRect )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -754,7 +754,7 @@ bool vcl::Region::Exclude( const Rectangle& rRect )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -839,7 +839,7 @@ bool vcl::Region::XOr( const Rectangle& rRect )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -927,7 +927,7 @@ bool vcl::Region::Union( const vcl::Region& rRegion )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -1047,7 +1047,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -1134,7 +1134,7 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion )
if(!bSuccess)
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -1223,7 +1223,7 @@ bool vcl::Region::XOr( const vcl::Region& rRegion )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -1458,7 +1458,7 @@ Region& vcl::Region::operator=( const Rectangle& rRect )
{
mpB2DPolyPolygon.reset();
mpPolyPolygon.reset();
- mpRegionBand.reset(rRect.IsEmpty() ? 0 : new RegionBand(rRect));
+ mpRegionBand.reset(rRect.IsEmpty() ? nullptr : new RegionBand(rRect));
mbIsNull = false;
return *this;
@@ -1683,7 +1683,7 @@ void vcl::Region::GetRegionRectangles(RectangleVector& rTarget) const
}
}
-static inline bool ImplPolygonRectTest( const tools::Polygon& rPoly, Rectangle* pRectOut = NULL )
+static inline bool ImplPolygonRectTest( const tools::Polygon& rPoly, Rectangle* pRectOut = nullptr )
{
bool bIsRect = false;
const Point* pPoints = rPoly.GetConstPointAry();
diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx
index 32cf3269d56b..55f49040523a 100644
--- a/vcl/source/gdi/regionband.cxx
+++ b/vcl/source/gdi/regionband.cxx
@@ -23,21 +23,21 @@
#include <osl/diagnose.h>
RegionBand::RegionBand()
-: mpFirstBand(0),
- mpLastCheckedBand(0)
+: mpFirstBand(nullptr),
+ mpLastCheckedBand(nullptr)
{
}
RegionBand::RegionBand(const RegionBand& rRef)
-: mpFirstBand(0),
- mpLastCheckedBand(0)
+: mpFirstBand(nullptr),
+ mpLastCheckedBand(nullptr)
{
*this = rRef;
}
RegionBand& RegionBand::operator=(const RegionBand& rRef)
{
- ImplRegionBand* pPrevBand = 0;
+ ImplRegionBand* pPrevBand = nullptr;
ImplRegionBand* pBand = rRef.mpFirstBand;
while(pBand)
@@ -62,8 +62,8 @@ RegionBand& RegionBand::operator=(const RegionBand& rRef)
}
RegionBand::RegionBand(const Rectangle& rRect)
-: mpFirstBand(0),
- mpLastCheckedBand(0)
+: mpFirstBand(nullptr),
+ mpLastCheckedBand(nullptr)
{
const long nTop(std::min(rRect.Top(), rRect.Bottom()));
const long nBottom(std::max(rRect.Top(), rRect.Bottom()));
@@ -89,8 +89,8 @@ void RegionBand::implReset()
pBand = pTempBand;
}
- mpLastCheckedBand = 0;
- mpFirstBand = 0;
+ mpLastCheckedBand = nullptr;
+ mpFirstBand = nullptr;
}
RegionBand::~RegionBand()
@@ -196,7 +196,7 @@ void RegionBand::load(SvStream& rIStrm)
implReset();
// get all bands
- ImplRegionBand* pCurrBand = 0;
+ ImplRegionBand* pCurrBand = nullptr;
// get header from first element
sal_uInt16 nTmp16(STREAMENTRY_END);
@@ -317,7 +317,7 @@ bool RegionBand::isSingleRectangle() const
void RegionBand::InsertBand(ImplRegionBand* pPreviousBand, ImplRegionBand* pBandToInsert)
{
- OSL_ASSERT(pBandToInsert!=NULL);
+ OSL_ASSERT(pBandToInsert!=nullptr);
if(!pPreviousBand)
{
@@ -361,11 +361,11 @@ void RegionBand::ImplAddMissingBands(const long nTop, const long nBottom)
{
// Iterate over already existing bands and add missing bands atop the
// first and between two bands.
- ImplRegionBand* pPreviousBand = NULL;
+ ImplRegionBand* pPreviousBand = nullptr;
ImplRegionBand* pBand = ImplGetFirstRegionBand();
long nCurrentTop (nTop);
- while (pBand != NULL && nCurrentTop<nBottom)
+ while (pBand != nullptr && nCurrentTop<nBottom)
{
if (nCurrentTop < pBand->mnYTop)
{
@@ -388,7 +388,7 @@ void RegionBand::ImplAddMissingBands(const long nTop, const long nBottom)
// 1. The region does not yet contain any bands.
// 2. The intervall nTop->nBottom extends past the bottom most band.
if (nCurrentTop <= nBottom
- && (pBand==NULL || nBottom>pBand->mnYBottom))
+ && (pBand==nullptr || nBottom>pBand->mnYBottom))
{
// When there is no previous band then the new one will be the
// first. Otherwise the new band is inserted behind the last band.
@@ -519,7 +519,7 @@ bool RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi
bool RegionBand::InsertPoint(const Point &rPoint, long nLineID, bool bEndPoint, LineType eLineType)
{
- DBG_ASSERT( mpFirstBand != NULL, "RegionBand::InsertPoint - no bands available!" );
+ DBG_ASSERT( mpFirstBand != nullptr, "RegionBand::InsertPoint - no bands available!" );
if ( rPoint.Y() == mpLastCheckedBand->mnYTop )
{
@@ -572,7 +572,7 @@ bool RegionBand::InsertPoint(const Point &rPoint, long nLineID, bool bEndPoint,
bool RegionBand::OptimizeBandList()
{
- ImplRegionBand* pPrevBand = 0;
+ ImplRegionBand* pPrevBand = nullptr;
ImplRegionBand* pBand = mpFirstBand;
while ( pBand )
@@ -634,7 +634,7 @@ bool RegionBand::OptimizeBandList()
pBand = mpFirstBand;
while ( pBand )
{
- DBG_ASSERT( pBand->mpFirstSep != NULL, "Exiting RegionBand::OptimizeBandList(): empty band in region!" );
+ DBG_ASSERT( pBand->mpFirstSep != nullptr, "Exiting RegionBand::OptimizeBandList(): empty band in region!" );
if ( pBand->mnYBottom < pBand->mnYTop )
OSL_ENSURE(false, "RegionBand::OptimizeBandList(): YBottomBoundary < YTopBoundary" );
@@ -649,7 +649,7 @@ bool RegionBand::OptimizeBandList()
}
#endif
- return (0 != mpFirstBand);
+ return (nullptr != mpFirstBand);
}
void RegionBand::Move(long nHorzMove, long nVertMove)
@@ -902,7 +902,7 @@ void RegionBand::Union(long nLeft, long nTop, long nRight, long nBottom)
void RegionBand::Intersect(long nLeft, long nTop, long nRight, long nBottom)
{
// process intersections
- ImplRegionBand* pPrevBand = 0;
+ ImplRegionBand* pPrevBand = nullptr;
ImplRegionBand* pBand = mpFirstBand;
while(pBand)
@@ -1072,7 +1072,7 @@ void RegionBand::Intersect(const RegionBand& rSource)
}
// right boundary?
- if ( pSep->mpNextSep == NULL )
+ if ( pSep->mpNextSep == nullptr )
{
// process intersection and do not remove untouched bands
Exclude( pSep->mnXRight+1, pBand->mnYTop, LONG_MAX-1, pBand->mnYBottom );
@@ -1090,7 +1090,7 @@ void RegionBand::Intersect(const RegionBand& rSource)
}
// remove all untouched bands if bands already left
- ImplRegionBand* pPrevBand = 0;
+ ImplRegionBand* pPrevBand = nullptr;
pBand = mpFirstBand;
while ( pBand )
@@ -1332,7 +1332,7 @@ const char* ImplDbgTestRegionBand(const void* pObj)
}
}
- return 0;
+ return nullptr;
}
#endif
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 945f7ae9f687..6c7490798905 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -82,7 +82,7 @@ rtl::Reference<OpenGLContext> SalGraphics::GetOpenGLContext() const
if (pImpl)
return pImpl->GetOpenGLContext();
- return NULL;
+ return nullptr;
}
bool SalGraphics::drawTransformedBitmap(
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index e351deb77eee..505b55862060 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -464,7 +464,7 @@ ImplLayoutArgs::ImplLayoutArgs(const OUString& rStr,
mnMinCharPos( nMinCharPos ),
mnEndCharPos( nEndCharPos ),
m_pTextLayoutCache(pLayoutCache),
- mpDXArray( NULL ),
+ mpDXArray( nullptr ),
mnLayoutWidth( 0 ),
mnOrientation( 0 )
{
@@ -493,7 +493,7 @@ ImplLayoutArgs::ImplLayoutArgs(const OUString& rStr,
UBiDi* pParaBidi = ubidi_openSized(nLength, 0, &rcI18n);
if( !pParaBidi )
return;
- ubidi_setPara(pParaBidi, reinterpret_cast<const UChar *>(mrStr.getStr()), nLength, nLevel, NULL, &rcI18n); // UChar != sal_Unicode in MinGW
+ ubidi_setPara(pParaBidi, reinterpret_cast<const UChar *>(mrStr.getStr()), nLength, nLevel, nullptr, &rcI18n); // UChar != sal_Unicode in MinGW
UBiDi* pLineBidi = pParaBidi;
int nSubLength = mnEndCharPos - mnMinCharPos;
@@ -2069,7 +2069,7 @@ bool MultiSalLayout::GetOutline( SalGraphics& rGraphics,
std::shared_ptr<vcl::TextLayoutCache> SalLayout::CreateTextLayoutCache(
OUString const&) const
{
- return 0; // by default, nothing to cache
+ return nullptr; // by default, nothing to cache
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 43e450398f5f..a28c4b0fd51b 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -185,7 +185,7 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer
if( BMP_SCANLINE_FORMAT( rSrcBuffer.mnFormat ) == BMP_FORMAT_24BIT_TC_BGR )
{
BitmapColor aCol;
- sal_uInt8* pPixel = NULL;
+ sal_uInt8* pPixel = nullptr;
for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
{
@@ -338,9 +338,9 @@ BitmapBuffer* StretchAndConvert(
catch( const std::bad_alloc& )
{
// memory exception, clean up
- pDstBuffer->mpBits = NULL;
+ pDstBuffer->mpBits = nullptr;
delete pDstBuffer;
- return NULL;
+ return nullptr;
}
// do we need a destination palette or color mask?
@@ -354,7 +354,7 @@ BitmapBuffer* StretchAndConvert(
if (!pDstPal)
{
delete pDstBuffer;
- return NULL;
+ return nullptr;
}
pDstBuffer->maPalette = *pDstPal;
}
@@ -368,7 +368,7 @@ BitmapBuffer* StretchAndConvert(
if (!pDstMask)
{
delete pDstBuffer;
- return NULL;
+ return nullptr;
}
pDstBuffer->maColorMask = *pDstMask;
}
@@ -378,10 +378,10 @@ BitmapBuffer* StretchAndConvert(
if( bFastConvert )
return pDstBuffer;
- Scanline* pSrcScan = NULL;
- Scanline* pDstScan = NULL;
- long* pMapX = NULL;
- long* pMapY = NULL;
+ Scanline* pSrcScan = nullptr;
+ Scanline* pDstScan = nullptr;
+ long* pMapX = nullptr;
+ long* pMapY = nullptr;
try
{
@@ -400,7 +400,7 @@ BitmapBuffer* StretchAndConvert(
delete[] pMapX;
delete[] pMapY;
delete pDstBuffer;
- return NULL;
+ return nullptr;
}
// horizontal mapping table
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 0f03e6723b45..2138c0d11599 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -205,7 +205,7 @@ namespace vcl
long ReferenceDeviceTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
- return GetTextArray( _rText, NULL, _nStartIndex, _nLength );
+ return GetTextArray( _rText, nullptr, _nStartIndex, _nLength );
}
void ReferenceDeviceTextLayout::DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, MetricVector* _pVector, OUString* _pDisplayText )
@@ -286,7 +286,7 @@ namespace vcl
// the disadvantage of less accuracy, compared with the approach to calculate the rect from the
// single "DrawText( Point, ... )" calls, since more intermediate arithmetic will translate
// from ref- to target-units.
- aTextRect = m_rTargetDevice.GetTextRect( aRect, _rText, _nStyle, NULL, this );
+ aTextRect = m_rTargetDevice.GetTextRect( aRect, _rText, _nStyle, nullptr, this );
}
// similar to above, the text rect now contains TWIPs (or whatever unit the ref device has), but the caller
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 5cdb7066bddd..bc28605cba0e 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -119,9 +119,9 @@ void VirtualDevice::ReleaseGraphics( bool bRelease )
else
pSVData->maGDIData.mpLastVirGraphics = mpPrevGraphics;
- mpGraphics = NULL;
- mpPrevGraphics = NULL;
- mpNextGraphics = NULL;
+ mpGraphics = nullptr;
+ mpPrevGraphics = nullptr;
+ mpNextGraphics = nullptr;
}
void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
@@ -151,7 +151,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
if ( pGraphics )
mpVirDev = pSVData->mpDefInst->CreateVirtualDevice( pGraphics, nDX, nDY, nBitCount, pData );
else
- mpVirDev = NULL;
+ mpVirDev = nullptr;
if ( !mpVirDev )
{
// do not abort but throw an exception, may be the current thread terminates anyway (plugin-scenario)
@@ -198,7 +198,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
// register VirDev in the list
mpNext = pSVData->maGDIData.mpFirstVirDev;
- mpPrev = NULL;
+ mpPrev = nullptr;
if ( mpNext )
mpNext->mpPrev = this;
else
@@ -207,7 +207,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
}
VirtualDevice::VirtualDevice( sal_uInt16 nBitCount )
-: mpVirDev( NULL ),
+: mpVirDev( nullptr ),
meRefDevMode( REFDEV_NONE )
{
SAL_WARN_IF( nBitCount > 1 && nBitCount != 8, "vcl.gdi",
@@ -218,7 +218,7 @@ VirtualDevice::VirtualDevice( sal_uInt16 nBitCount )
}
VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount )
- : mpVirDev( NULL ),
+ : mpVirDev( nullptr ),
meRefDevMode( REFDEV_NONE )
{
SAL_WARN_IF( nBitCount > 1 && nBitCount != 8 && nBitCount != rCompDev.GetBitCount(), "vcl.gdi",
@@ -229,7 +229,7 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount
}
VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount, sal_uInt16 nAlphaBitCount )
- : mpVirDev( NULL ),
+ : mpVirDev( nullptr ),
meRefDevMode( REFDEV_NONE )
{
SAL_WARN_IF( nBitCount > 1 && nBitCount != 8, "vcl.gdi",
@@ -245,7 +245,7 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount
VirtualDevice::VirtualDevice(const SystemGraphicsData *pData, const Size &rSize,
sal_uInt16 nBitCount)
-: mpVirDev( NULL ),
+: mpVirDev( nullptr ),
meRefDevMode( REFDEV_NONE )
{
SAL_INFO( "vcl.gdi", "VirtualDevice::VirtualDevice( " << nBitCount << " )" );
@@ -516,17 +516,17 @@ void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
// preserve global font lists
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 7fa5f23cccec..4065877b56da 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -32,10 +32,10 @@ ImplWallpaper::ImplWallpaper() :
maColor( COL_TRANSPARENT )
{
mnRefCount = 1;
- mpBitmap = NULL;
- mpCache = NULL;
- mpGradient = NULL;
- mpRect = NULL;
+ mpBitmap = nullptr;
+ mpCache = nullptr;
+ mpGradient = nullptr;
+ mpRect = nullptr;
meStyle = WallpaperStyle::NONE;
}
@@ -48,19 +48,19 @@ ImplWallpaper::ImplWallpaper( const ImplWallpaper& rImplWallpaper ) :
if ( rImplWallpaper.mpBitmap )
mpBitmap = new BitmapEx( *rImplWallpaper.mpBitmap );
else
- mpBitmap = NULL;
+ mpBitmap = nullptr;
if( rImplWallpaper.mpCache )
mpCache = new BitmapEx( *rImplWallpaper.mpCache );
else
- mpCache = NULL;
+ mpCache = nullptr;
if ( rImplWallpaper.mpGradient )
mpGradient = new Gradient( *rImplWallpaper.mpGradient );
else
- mpGradient = NULL;
+ mpGradient = nullptr;
if ( rImplWallpaper.mpRect )
mpRect = new Rectangle( *rImplWallpaper.mpRect );
else
- mpRect = NULL;
+ mpRect = nullptr;
}
ImplWallpaper::~ImplWallpaper()
@@ -82,7 +82,7 @@ void ImplWallpaper::ImplSetCachedBitmap( BitmapEx& rBmp )
void ImplWallpaper::ImplReleaseCachedBitmap()
{
delete mpCache;
- mpCache = NULL;
+ mpCache = nullptr;
}
SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
@@ -91,13 +91,13 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
sal_uInt16 nTmp16;
delete rImplWallpaper.mpRect;
- rImplWallpaper.mpRect = NULL;
+ rImplWallpaper.mpRect = nullptr;
delete rImplWallpaper.mpGradient;
- rImplWallpaper.mpGradient = NULL;
+ rImplWallpaper.mpGradient = nullptr;
delete rImplWallpaper.mpBitmap;
- rImplWallpaper.mpBitmap = NULL;
+ rImplWallpaper.mpBitmap = nullptr;
// version 1
ReadColor( rIStm, rImplWallpaper.maColor );
@@ -141,9 +141,9 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
SvStream& WriteImplWallpaper( SvStream& rOStm, const ImplWallpaper& rImplWallpaper )
{
VersionCompat aCompat( rOStm, StreamMode::WRITE, 3 );
- bool bRect = ( rImplWallpaper.mpRect != NULL );
- bool bGrad = ( rImplWallpaper.mpGradient != NULL );
- bool bBmp = ( rImplWallpaper.mpBitmap != NULL );
+ bool bRect = ( rImplWallpaper.mpRect != nullptr );
+ bool bGrad = ( rImplWallpaper.mpGradient != nullptr );
+ bool bBmp = ( rImplWallpaper.mpBitmap != nullptr );
bool bDummy = false;
// version 1
@@ -283,7 +283,7 @@ void Wallpaper::SetBitmap( const BitmapEx& rBitmap )
{
ImplMakeUnique();
delete mpImplWallpaper->mpBitmap;
- mpImplWallpaper->mpBitmap = NULL;
+ mpImplWallpaper->mpBitmap = nullptr;
}
}
else
@@ -314,7 +314,7 @@ BitmapEx Wallpaper::GetBitmap() const
bool Wallpaper::IsBitmap() const
{
- return (mpImplWallpaper->mpBitmap != 0);
+ return (mpImplWallpaper->mpBitmap != nullptr);
}
void Wallpaper::SetGradient( const Gradient& rGradient )
@@ -348,7 +348,7 @@ Gradient Wallpaper::GetGradient() const
bool Wallpaper::IsGradient() const
{
- return (mpImplWallpaper->mpGradient != 0);
+ return (mpImplWallpaper->mpGradient != nullptr);
}
Gradient Wallpaper::ImplGetApplicationGradient() const
@@ -375,7 +375,7 @@ void Wallpaper::SetRect( const Rectangle& rRect )
if ( mpImplWallpaper->mpRect )
{
delete mpImplWallpaper->mpRect;
- mpImplWallpaper->mpRect = NULL;
+ mpImplWallpaper->mpRect = nullptr;
}
}
else
@@ -402,7 +402,7 @@ Rectangle Wallpaper::GetRect() const
bool Wallpaper::IsRect() const
{
- return (mpImplWallpaper->mpRect != 0);
+ return (mpImplWallpaper->mpRect != nullptr);
}
bool Wallpaper::IsFixed() const
diff --git a/vcl/source/glyphs/graphite_features.cxx b/vcl/source/glyphs/graphite_features.cxx
index 83a240508e46..f190b523cefc 100644
--- a/vcl/source/glyphs/graphite_features.cxx
+++ b/vcl/source/glyphs/graphite_features.cxx
@@ -38,14 +38,14 @@ const char GrFeatureParser::FEAT_SEPARATOR = '&';
const char GrFeatureParser::FEAT_ID_VALUE_SEPARATOR = '=';
GrFeatureParser::GrFeatureParser(const gr_face * pFace, const OString& lang)
- : mnNumSettings(0), mbErrors(false), mpSettings(NULL)
+ : mnNumSettings(0), mbErrors(false), mpSettings(nullptr)
{
maLang.label[0] = maLang.label[1] = maLang.label[2] = maLang.label[3] = '\0';
setLang(pFace, lang);
}
GrFeatureParser::GrFeatureParser(const gr_face * pFace, const OString& features, const OString& lang)
- : mnNumSettings(0), mbErrors(false), mpSettings(NULL)
+ : mnNumSettings(0), mbErrors(false), mpSettings(nullptr)
{
sal_Int32 nEquals = 0;
sal_Int32 nFeatEnd = 0;
@@ -196,7 +196,7 @@ GrFeatureParser::~GrFeatureParser()
if (mpSettings)
{
gr_featureval_destroy(mpSettings);
- mpSettings = NULL;
+ mpSettings = nullptr;
}
}
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index eaff9713d316..d10538abcd9a 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -148,7 +148,7 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs &rArgs, float fSc
if (!nGlyphs || lastCharPos - mnSegCharOffset == 0) return;
const gr_slot* baseSlot = bRtl ? gr_seg_last_slot(pSegment) : gr_seg_first_slot(pSegment);
// find first base
- while (baseSlot && gr_slot_attached_to(baseSlot) != NULL && !gr_slot_can_insert_before(baseSlot))
+ while (baseSlot && gr_slot_attached_to(baseSlot) != nullptr && !gr_slot_can_insert_before(baseSlot))
baseSlot = bRtl ? gr_slot_prev_in_segment(baseSlot) : gr_slot_next_in_segment(baseSlot);
assert(baseSlot);
int nextChar = gr_cinfo_base(gr_seg_cinfo(pSegment, gr_slot_before(baseSlot))) + mnSegCharOffset;
@@ -354,7 +354,7 @@ GraphiteLayout::append(gr_segment *pSeg, ImplLayoutArgs &rArgs,
// Recursively append all the attached glyphs.
float cOrigin = nextGlyphOrigin;
- for (const gr_slot * agi = gr_slot_first_attachment(gi); agi != NULL; agi = gr_slot_next_sibling_attachment(agi))
+ for (const gr_slot * agi = gr_slot_first_attachment(gi); agi != nullptr; agi = gr_slot_next_sibling_attachment(agi))
if (!gr_slot_can_insert_before(agi))
cOrigin = append(pSeg, rArgs, agi, cOrigin, nextGlyphOrigin, scaling, rDXOffset, false, baseChar, baseGlyph, bRtl);
@@ -379,8 +379,8 @@ GraphiteLayout::~GraphiteLayout() throw()
{
clear();
// the features and font are owned by the platform layers
- mpFeatures = NULL;
- mpFont = NULL;
+ mpFeatures = nullptr;
+ mpFont = nullptr;
}
void GraphiteLayout::clear()
@@ -436,11 +436,11 @@ bool GraphiteLayout::LayoutText(ImplLayoutArgs & rArgs)
nBidiEndRunPos = minimum<int>(nLength, nBidiEndRunPos + EXTRA_CONTEXT_LENGTH);
const sal_Unicode *pStr = rArgs.mrStr.getStr();
size_t numchars = gr_count_unicode_characters(gr_utf16, pStr + nBidiMinRunPos,
- pStr + nBidiEndRunPos, NULL);
- gr_segment * pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures ? mpFeatures->values() : NULL,
+ pStr + nBidiEndRunPos, nullptr);
+ gr_segment * pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures ? mpFeatures->values() : nullptr,
gr_utf16, pStr + nBidiMinRunPos, numchars, 2 | int(bRightToLeft));
- if (pSegment != NULL)
+ if (pSegment != nullptr)
{
success = true;
mnSegCharOffset = nBidiMinRunPos;
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index 3efff8ca265d..bd09b4c41346 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -99,7 +99,7 @@ VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) :
m_aBitmap( rBitmap.GetBitmap() ),
m_aAlpha(),
m_pBmpAcc( m_aBitmap.AcquireReadAccess() ),
- m_pAlphaAcc( NULL ),
+ m_pAlphaAcc( nullptr ),
m_aComponentTags(),
m_aComponentBitCounts(),
m_aLayout(),
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index f632b16900b1..55a25df62cda 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -290,7 +290,7 @@ namespace vcl
::Bitmap aBitmap( aPixelSize,
sal::static_int_cast<sal_uInt16>(nDepth),
- aLayout.Palette.is() ? &aPalette : NULL );
+ aLayout.Palette.is() ? &aPalette : nullptr );
::Bitmap aAlpha;
if( nAlphaDepth )
aAlpha = ::Bitmap( aPixelSize,
@@ -300,10 +300,10 @@ namespace vcl
{ // limit scoped access
Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
- Bitmap::ScopedWriteAccess pAlphaWriteAccess( nAlphaDepth ? aAlpha.AcquireWriteAccess() : NULL,
+ Bitmap::ScopedWriteAccess pAlphaWriteAccess( nAlphaDepth ? aAlpha.AcquireWriteAccess() : nullptr,
aAlpha );
- ENSURE_OR_THROW(pWriteAccess.get() != NULL,
+ ENSURE_OR_THROW(pWriteAccess.get() != nullptr,
"Cannot get write access to bitmap");
const sal_Int32 nWidth(aPixelSize.Width());
diff --git a/vcl/source/helper/evntpost.cxx b/vcl/source/helper/evntpost.cxx
index abc9bbb8f01b..cccb8443057a 100644
--- a/vcl/source/helper/evntpost.cxx
+++ b/vcl/source/helper/evntpost.cxx
@@ -29,7 +29,7 @@ namespace vcl
EventPoster::EventPoster( const Link<LinkParamNone*,void>& rLink )
: m_aLink(rLink)
{
- m_nId = 0;
+ m_nId = nullptr;
}
EventPoster::~EventPoster()
@@ -48,7 +48,7 @@ void EventPoster::Post()
IMPL_LINK_TYPED( EventPoster, DoEvent_Impl, void*, /*p*/, void )
{
DBG_TESTSOLARMUTEX();
- m_nId = 0;
+ m_nId = nullptr;
m_aLink.Call( nullptr );
}
diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx
index 3b79b5f87565..6ca54bbeab99 100644
--- a/vcl/source/helper/lazydelete.cxx
+++ b/vcl/source/helper/lazydelete.cxx
@@ -33,7 +33,7 @@ LazyDeletorBase::~LazyDeletorBase()
}
// instantiate instance pointer for LazyDeletor<Window>
-LazyDeletor* LazyDeletor::s_pOneInstance = NULL;
+LazyDeletor* LazyDeletor::s_pOneInstance = nullptr;
// a list for all LazyeDeletor<T> singletons
static std::vector< LazyDeletorBase* > lcl_aDeletors;
@@ -62,7 +62,7 @@ bool LazyDeletor::is_less( vcl::Window* left, vcl::Window* right )
DeleteOnDeinitBase::~DeleteOnDeinitBase()
{
ImplSVData* pSVData = ImplGetSVData();
- if( pSVData && pSVData->mpDeinitDeleteList != NULL )
+ if( pSVData && pSVData->mpDeinitDeleteList != nullptr )
pSVData->mpDeinitDeleteList->remove( this );
}
@@ -74,7 +74,7 @@ void DeleteOnDeinitBase::addDeinitContainer( DeleteOnDeinitBase* i_pContainer )
if( pSVData->mbDeInit )
return;
- if( pSVData->mpDeinitDeleteList == NULL )
+ if( pSVData->mpDeinitDeleteList == nullptr )
pSVData->mpDeinitDeleteList = new std::list< DeleteOnDeinitBase* >();
pSVData->mpDeinitDeleteList->push_back( i_pContainer );
}
@@ -90,7 +90,7 @@ void DeleteOnDeinitBase::ImplDeleteOnDeInit()
(*it)->doCleanup();
}
delete pSVData->mpDeinitDeleteList;
- pSVData->mpDeinitDeleteList = NULL;
+ pSVData->mpDeinitDeleteList = nullptr;
}
}
diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx
index ea08f22b8317..65271087f024 100644
--- a/vcl/source/helper/strhelper.cxx
+++ b/vcl/source/helper/strhelper.cxx
@@ -106,7 +106,7 @@ OUString GetCommandLineToken( int nToken, const OUString& rLine )
int nActualToken = 0;
sal_Unicode* pBuffer = static_cast<sal_Unicode*>(alloca( sizeof(sal_Unicode)*( nLen + 1 ) ));
const sal_Unicode* pRun = rLine.getStr();
- sal_Unicode* pLeap = NULL;
+ sal_Unicode* pLeap = nullptr;
while( *pRun && nActualToken <= nToken )
{
@@ -156,7 +156,7 @@ OString GetCommandLineToken(int nToken, const OString& rLine)
int nActualToken = 0;
char* pBuffer = static_cast<char*>(alloca( nLen + 1 ));
const char* pRun = rLine.getStr();
- char* pLeap = NULL;
+ char* pLeap = nullptr;
while( *pRun && nActualToken <= nToken )
{
diff --git a/vcl/source/helper/threadex.cxx b/vcl/source/helper/threadex.cxx
index 5fe7376c6556..628a216c3a68 100644
--- a/vcl/source/helper/threadex.cxx
+++ b/vcl/source/helper/threadex.cxx
@@ -66,7 +66,7 @@ long SolarThreadExecutor::impl_execute( const TimeValue* _pTimeout )
Application::RemoveUserEvent( nEvent );
}
else
- osl_waitCondition( m_aFinish, NULL );
+ osl_waitCondition( m_aFinish, nullptr );
}
return m_nReturn;
}
diff --git a/vcl/source/helper/xconnection.cxx b/vcl/source/helper/xconnection.cxx
index 1d7741077445..ad420d303221 100644
--- a/vcl/source/helper/xconnection.cxx
+++ b/vcl/source/helper/xconnection.cxx
@@ -61,7 +61,7 @@ void DisplayConnection::terminate()
if( pSVData )
{
- pSVData->mpDefInst->SetEventCallback( NULL );
+ pSVData->mpDefInst->SetEventCallback( nullptr );
}
SolarMutexReleaser aRel;
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 695a2259c2ec..bf5b5d7c79e6 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -54,20 +54,20 @@ GLWindow::~GLWindow()
}
OpenGLContext::OpenGLContext():
- mpWindow(NULL),
- m_pChildWindow(NULL),
+ mpWindow(nullptr),
+ m_pChildWindow(nullptr),
mbInitialized(false),
mnRefCount(0),
mbRequestLegacyContext(false),
mbUseDoubleBufferedRendering(true),
mnFramebufferCount(0),
- mpCurrentFramebuffer(NULL),
- mpFirstFramebuffer(NULL),
- mpLastFramebuffer(NULL),
- mpCurrentProgram(NULL),
+ mpCurrentFramebuffer(nullptr),
+ mpFirstFramebuffer(nullptr),
+ mpLastFramebuffer(nullptr),
+ mpCurrentProgram(nullptr),
mnPainting(0),
- mpPrevContext(NULL),
- mpNextContext(NULL)
+ mpPrevContext(nullptr),
+ mpNextContext(nullptr)
{
VCL_GL_INFO("vcl.opengl", "new context: " << this);
@@ -477,7 +477,7 @@ private:
public:
TempErrorHandler(Display* dpy, errorHandler newErrorHandler)
- : oldErrorHandler(0)
+ : oldErrorHandler(nullptr)
, mdpy(dpy)
{
if (mdpy)
@@ -513,8 +513,8 @@ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubl
{
OpenGLZone aZone;
- if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) )
- return NULL;
+ if( dpy == nullptr || !glXQueryExtension( dpy, nullptr, nullptr ) )
+ return nullptr;
VCL_GL_INFO("vcl.opengl", "window: " << win);
@@ -522,8 +522,8 @@ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubl
if( !XGetWindowAttributes( dpy, win, &xattr ) )
{
SAL_WARN("vcl.opengl", "Failed to get window attributes for fbconfig " << win);
- xattr.screen = 0;
- xattr.visual = NULL;
+ xattr.screen = nullptr;
+ xattr.visual = nullptr;
}
int screen = XScreenNumberOfScreen( xattr.screen );
@@ -553,7 +553,7 @@ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubl
if(!pFBC)
{
SAL_WARN("vcl.opengl", "no suitable fb format found");
- return NULL;
+ return nullptr;
}
int best_num_samp = -1;
@@ -601,7 +601,7 @@ Visual* getVisual(Display* dpy, Window win)
if( !XGetWindowAttributes( dpy, win, &xattr ) )
{
SAL_WARN("vcl.opengl", "Failed to get window attributes for getVisual " << win);
- xattr.visual = NULL;
+ xattr.visual = nullptr;
}
VCL_GL_INFO("vcl.opengl", "using VisualID " << xattr.visual);
return xattr.visual;
@@ -622,7 +622,7 @@ bool OpenGLContext::init( vcl::Window* pParent )
mpWindow = pParent ? pParent : m_xWindow.get();
if(m_xWindow)
m_xWindow->setPosSizePixel(0,0,0,0);
- m_pChildWindow = 0;
+ m_pChildWindow = nullptr;
initWindow();
return ImplInit();
}
@@ -676,7 +676,7 @@ bool OpenGLContext::ImplInit()
OpenGLZone aZone;
- GLXContext pSharedCtx( NULL );
+ GLXContext pSharedCtx( nullptr );
#ifdef DBG_UTIL
TempErrorHandler aErrorHandler(m_aGLWin.dpy, unxErrorHandler);
#endif
@@ -1007,12 +1007,12 @@ void OpenGLContext::InitGLEWDebugging()
if (glDebugMessageCallbackARB)
{
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
- glDebugMessageCallbackARB(&debug_callback, NULL);
+ glDebugMessageCallbackARB(&debug_callback, nullptr);
}
else if ( glDebugMessageCallback )
{
glEnable(GL_DEBUG_OUTPUT);
- glDebugMessageCallback(&debug_callback, NULL);
+ glDebugMessageCallback(&debug_callback, nullptr);
}
}
@@ -1107,7 +1107,7 @@ bool OpenGLContext::initWindow()
bool OpenGLContext::initWindow()
{
- const SystemEnvData* pChildSysData = 0;
+ const SystemEnvData* pChildSysData = nullptr;
SystemWindowData winData = generateWinData(mpWindow, false);
if( winData.pVisual )
{
@@ -1191,8 +1191,8 @@ void OpenGLContext::reset()
delete pFramebuffer;
pFramebuffer = pPrevFramebuffer;
}
- mpFirstFramebuffer = NULL;
- mpLastFramebuffer = NULL;
+ mpFirstFramebuffer = nullptr;
+ mpLastFramebuffer = nullptr;
}
// destroy all programs
@@ -1232,7 +1232,7 @@ void OpenGLContext::reset()
if (itr != g_vShareList.end())
g_vShareList.erase(itr);
- glXMakeCurrent(m_aGLWin.dpy, None, NULL);
+ glXMakeCurrent(m_aGLWin.dpy, None, nullptr);
if( glGetError() != GL_NO_ERROR )
{
SAL_WARN("vcl.opengl", "glError: " << glGetError());
@@ -1241,7 +1241,7 @@ void OpenGLContext::reset()
if (mbPixmap && m_aGLWin.glPix != None)
glXDestroyPixmap(m_aGLWin.dpy, m_aGLWin.glPix);
- m_aGLWin.ctx = 0;
+ m_aGLWin.ctx = nullptr;
}
#endif
}
@@ -1268,7 +1268,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool)
SystemWindowData aWinData;
aWinData.nSize = sizeof(aWinData);
- aWinData.pVisual = NULL;
+ aWinData.pVisual = nullptr;
#if !defined(LIBO_HEADLESS)
const SystemEnvData* sysData(pParent->GetSystemData());
@@ -1276,7 +1276,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool)
Display *dpy = static_cast<Display*>(sysData->pDisplay);
Window win = sysData->aWindow;
- if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) )
+ if( dpy == nullptr || !glXQueryExtension( dpy, nullptr, nullptr ) )
return aWinData;
initOpenGLFunctionPointers();
@@ -1287,7 +1287,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool)
if (!pFBC)
return aWinData;
- XVisualInfo* vi = 0;
+ XVisualInfo* vi = nullptr;
if( best_fbc != -1 )
vi = glXGetVisualFromFBConfig( dpy, pFBC[best_fbc] );
@@ -1420,7 +1420,7 @@ void OpenGLContext::registerAsCurrent()
mpNextContext->mpPrevContext = mpPrevContext;
mpPrevContext = pSVData->maGDIData.mpLastContext;
- mpNextContext = NULL;
+ mpNextContext = nullptr;
pSVData->maGDIData.mpLastContext->mpNextContext = this;
pSVData->maGDIData.mpLastContext = this;
}
@@ -1441,7 +1441,7 @@ void OpenGLContext::resetCurrent()
// nothing
#elif defined( UNX )
if (m_aGLWin.dpy)
- glXMakeCurrent(m_aGLWin.dpy, None, NULL);
+ glXMakeCurrent(m_aGLWin.dpy, None, nullptr);
#endif
}
@@ -1524,16 +1524,16 @@ bool OpenGLContext::BindFramebuffer( OpenGLFramebuffer* pFramebuffer )
bool OpenGLContext::AcquireDefaultFramebuffer()
{
- return BindFramebuffer( NULL );
+ return BindFramebuffer( nullptr );
}
OpenGLFramebuffer* OpenGLContext::AcquireFramebuffer( const OpenGLTexture& rTexture )
{
OpenGLZone aZone;
- OpenGLFramebuffer* pFramebuffer = NULL;
- OpenGLFramebuffer* pFreeFbo = NULL;
- OpenGLFramebuffer* pSameSizeFbo = NULL;
+ OpenGLFramebuffer* pFramebuffer = nullptr;
+ OpenGLFramebuffer* pFreeFbo = nullptr;
+ OpenGLFramebuffer* pSameSizeFbo = nullptr;
// check if there is already a framebuffer attached to that texture
pFramebuffer = mpLastFramebuffer;
@@ -1631,7 +1631,7 @@ void OpenGLContext::ReleaseFramebuffer( const OpenGLTexture& rTexture )
BindFramebuffer( pFramebuffer );
pFramebuffer->DetachTexture();
if (mpCurrentFramebuffer == pFramebuffer)
- BindFramebuffer( NULL );
+ BindFramebuffer( nullptr );
}
pFramebuffer = pFramebuffer->mpPrevFramebuffer;
}
@@ -1651,7 +1651,7 @@ void OpenGLContext::ReleaseFramebuffers()
}
pFramebuffer = pFramebuffer->mpPrevFramebuffer;
}
- BindFramebuffer( NULL );
+ BindFramebuffer( nullptr );
}
OpenGLProgram* OpenGLContext::GetProgram( const OUString& rVertexShader, const OUString& rFragmentShader, const rtl::OString& preamble )
@@ -1677,7 +1677,7 @@ OpenGLProgram* OpenGLContext::GetProgram( const OUString& rVertexShader, const O
rtl::OString aPersistentKey = OpenGLHelper::GetDigest( rVertexShader, rFragmentShader, preamble );
std::shared_ptr<OpenGLProgram> pProgram = std::make_shared<OpenGLProgram>();
if( !pProgram->Load( rVertexShader, rFragmentShader, preamble, aPersistentKey ) )
- return NULL;
+ return nullptr;
maPrograms.insert(std::make_pair(aNameBasedKey, pProgram));
return pProgram.get();
@@ -1697,7 +1697,7 @@ OpenGLProgram* OpenGLContext::UseProgram( const OUString& rVertexShader, const O
if (!mpCurrentProgram)
{
SAL_WARN("vcl.opengl", "OpenGLContext::UseProgram: mpCurrentProgram is 0");
- return 0;
+ return nullptr;
}
mpCurrentProgram->Use();
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index a051245d411f..f16f217b7628 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -121,9 +121,9 @@ namespace {
{
std::vector<char> ErrorMessage(InfoLogLength+1);
if (bShaderNotProgram)
- glGetShaderInfoLog (nId, InfoLogLength, NULL, &ErrorMessage[0]);
+ glGetShaderInfoLog (nId, InfoLogLength, nullptr, &ErrorMessage[0]);
else
- glGetProgramInfoLog(nId, InfoLogLength, NULL, &ErrorMessage[0]);
+ glGetProgramInfoLog(nId, InfoLogLength, nullptr, &ErrorMessage[0]);
CHECK_GL_ERROR();
ErrorMessage.push_back('\0');
@@ -351,7 +351,7 @@ namespace
std::vector<sal_uInt8> aBinary( nBinaryLength + GLenumSize );
- glGetProgramBinary( nProgramID, nBinaryLength, NULL, &nBinaryFormat, aBinary.data() );
+ glGetProgramBinary( nProgramID, nBinaryLength, nullptr, &nBinaryFormat, aBinary.data() );
const sal_uInt8* pBF = reinterpret_cast<const sal_uInt8*>(&nBinaryFormat);
aBinary.insert( aBinary.end(), pBF, pBF + GLenumSize );
@@ -414,7 +414,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
if( !preamble.isEmpty())
addPreamble( aVertexShaderSource, preamble );
char const * VertexSourcePointer = aVertexShaderSource.getStr();
- glShaderSource(VertexShaderID, 1, &VertexSourcePointer , NULL);
+ glShaderSource(VertexShaderID, 1, &VertexSourcePointer , nullptr);
glCompileShader(VertexShaderID);
// Check Vertex Shader
@@ -427,7 +427,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
if( !preamble.isEmpty())
addPreamble( aFragmentShaderSource, preamble );
char const * FragmentSourcePointer = aFragmentShaderSource.getStr();
- glShaderSource(FragmentShaderID, 1, &FragmentSourcePointer , NULL);
+ glShaderSource(FragmentShaderID, 1, &FragmentSourcePointer , nullptr);
glCompileShader(FragmentShaderID);
// Check Fragment Shader
@@ -488,7 +488,7 @@ void OpenGLHelper::ConvertBitmapExToRGBATextureBuffer(const BitmapEx& rBitmapEx,
size_t i = 0;
for (long ny = (bFlip ? nBmpHeight - 1 : 0); (bFlip ? ny >= 0 : ny < nBmpHeight); (bFlip ? ny-- : ny++))
{
- Scanline pAScan = pAlphaReadAccess ? pAlphaReadAccess->GetScanline(ny) : 0;
+ Scanline pAScan = pAlphaReadAccess ? pAlphaReadAccess->GetScanline(ny) : nullptr;
for(long nx = 0; nx < nBmpWidth; nx++)
{
BitmapColor aCol = pReadAccces->GetColor( ny, nx );
@@ -565,7 +565,7 @@ const char* OpenGLHelper::GLErrorString(GLenum errorCode)
{GL_OUT_OF_MEMORY, "out of memory"},
{GL_INVALID_FRAMEBUFFER_OPERATION, "invalid framebuffer operation"},
- {0, NULL }
+ {0, nullptr }
};
int i;
@@ -578,7 +578,7 @@ const char* OpenGLHelper::GLErrorString(GLenum errorCode)
}
}
- return NULL;
+ return nullptr;
}
std::ostream& operator<<(std::ostream& rStrm, const glm::vec4& rPos)
@@ -636,7 +636,7 @@ void OpenGLHelper::createFramebuffer(long nWidth, long nHeight, GLuint& nFramebu
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, nWidth, nHeight, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, 0);
+ GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
glBindTexture(GL_TEXTURE_2D, 0);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
@@ -750,7 +750,7 @@ void OpenGLZone::leave() { gnLeaveCount++; }
namespace {
static volatile bool gbWatchdogFiring = false;
- static oslCondition gpWatchdogExit = NULL;
+ static oslCondition gpWatchdogExit = nullptr;
static rtl::Reference<OpenGLWatchdogThread> gxWatchdog;
}
@@ -835,7 +835,7 @@ void OpenGLWatchdogThread::execute()
void OpenGLWatchdogThread::start()
{
- assert (gxWatchdog == NULL);
+ assert (gxWatchdog == nullptr);
gpWatchdogExit = osl_createCondition();
gxWatchdog.set(new OpenGLWatchdogThread());
gxWatchdog->launch();
@@ -857,7 +857,7 @@ void OpenGLWatchdogThread::stop()
if (gpWatchdogExit)
osl_destroyCondition(gpWatchdogExit);
- gpWatchdogExit = NULL;
+ gpWatchdogExit = nullptr;
}
/**
@@ -1072,7 +1072,7 @@ GLXFBConfig OpenGLHelper::GetPixmapFBConfig( Display* pDisplay, bool& bInverted
if( i == nFbConfigs )
{
SAL_WARN( "vcl.opengl", "Unable to find FBconfig for pixmap texturing" );
- return 0;
+ return nullptr;
}
CHECK_GL_ERROR();
@@ -1082,7 +1082,7 @@ GLXFBConfig OpenGLHelper::GetPixmapFBConfig( Display* pDisplay, bool& bInverted
#endif
OutputDevice::PaintScope::PaintScope(OutputDevice *pDev)
- : pHandle( NULL )
+ : pHandle( nullptr )
{
if( pDev->mpGraphics || pDev->AcquireGraphics() )
{
@@ -1105,7 +1105,7 @@ void OutputDevice::PaintScope::flush()
if( pHandle )
{
OpenGLContext *pContext = static_cast<OpenGLContext *>( pHandle );
- pHandle = NULL;
+ pHandle = nullptr;
pContext->mnPainting--;
assert( pContext->mnPainting >= 0 );
if( pContext->mnPainting == 0 )
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index adddcaa84dfd..c48f653c8526 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -937,7 +937,7 @@ void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const Al
GDIMetaFile* pOldMetaFile = mpMetaFile;
const bool bOldMap = mbMap;
- mpMetaFile = NULL; // fdo#55044 reset before GetBitmap!
+ mpMetaFile = nullptr; // fdo#55044 reset before GetBitmap!
mbMap = false;
Bitmap aBmp(GetBitmap(aDstRect.TopLeft(), aDstRect.GetSize()));
@@ -1013,7 +1013,7 @@ void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const Al
// #110958# Disable alpha VDev, we're doing the necessary
// stuff explicitly further below
if (mpAlphaVDev)
- mpAlphaVDev = NULL;
+ mpAlphaVDev = nullptr;
DrawBitmap(aDstRect.TopLeft(), aNewBitmap);
@@ -1052,7 +1052,7 @@ bool OutputDevice::DrawTransformBitmapExDirect(
const basegfx::B2DPoint aTopX(aFullTransform * basegfx::B2DPoint(1.0, 0.0));
const basegfx::B2DPoint aTopY(aFullTransform * basegfx::B2DPoint(0.0, 1.0));
SalBitmap* pSalSrcBmp = rBitmapEx.GetBitmap().ImplGetImpBitmap()->ImplGetSalBitmap();
- SalBitmap* pSalAlphaBmp = 0;
+ SalBitmap* pSalAlphaBmp = nullptr;
if(rBitmapEx.IsTransparent())
{
diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx
index fbd26785b4b2..9396f262362b 100644
--- a/vcl/source/outdev/clipping.cxx
+++ b/vcl/source/outdev/clipping.cxx
@@ -43,7 +43,7 @@ void OutputDevice::SetClipRegion()
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaClipRegionAction( vcl::Region(), false ) );
- SetDeviceClipRegion( NULL );
+ SetDeviceClipRegion( nullptr );
if( mpAlphaVDev )
mpAlphaVDev->SetClipRegion();
@@ -57,7 +57,7 @@ void OutputDevice::SetClipRegion( const vcl::Region& rRegion )
if ( rRegion.IsNull() )
{
- SetDeviceClipRegion( NULL );
+ SetDeviceClipRegion( nullptr );
}
else
{
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 22567deaf993..3686d71ed76c 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -103,7 +103,7 @@ int OutputDevice::GetDevFontCount() const
bool OutputDevice::IsFontAvailable( const OUString& rFontName ) const
{
PhysicalFontFamily* pFound = mpFontCollection->FindFontFamily( rFontName );
- return (pFound != NULL);
+ return (pFound != nullptr);
}
int OutputDevice::GetDevFontSizeCount( const vcl::Font& rFont ) const
@@ -494,7 +494,7 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists )
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
mbInitFont = true;
@@ -505,12 +505,12 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists )
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
// release all physically selected fonts on this device
@@ -539,8 +539,8 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists )
delete mpFontCollection;
if( mpFontCache && mpFontCache != pSVData->maGDIData.mpScreenFontCache )
delete mpFontCache;
- mpFontCollection = 0;
- mpFontCache = 0;
+ mpFontCollection = nullptr;
+ mpFontCache = nullptr;
}
}
}
@@ -985,14 +985,14 @@ ImplFontEntry::ImplFontEntry( const FontSelectPattern& rFontSelData )
: m_pFontCache(nullptr)
, maFontSelData( rFontSelData )
, maMetric( rFontSelData )
- , mpConversion( NULL )
+ , mpConversion( nullptr )
, mnLineHeight( 0 )
, mnRefCount( 1 )
, mnSetFontFlags( 0 )
, mnOwnOrientation( 0 )
, mnOrientation( 0 )
, mbInit( false )
- , mpUnicodeFallbackList( NULL )
+ , mpUnicodeFallbackList( nullptr )
{
maFontSelData.mpFontEntry = this;
}
@@ -1076,8 +1076,8 @@ FontSelectPatternAttributes::FontSelectPatternAttributes( const vcl::Font& rFont
FontSelectPattern::FontSelectPattern( const vcl::Font& rFont,
const OUString& rSearchName, const Size& rSize, float fExactHeight)
: FontSelectPatternAttributes(rFont, rSearchName, rSize, fExactHeight)
- , mpFontData( NULL )
- , mpFontEntry( NULL )
+ , mpFontData( nullptr )
+ , mpFontEntry( nullptr )
{
}
@@ -1243,7 +1243,7 @@ bool ImplFontCache::IFSD_Equal::operator()(const FontSelectPattern& rA, const Fo
}
ImplFontCache::ImplFontCache()
-: mpFirstEntry( NULL ),
+: mpFirstEntry( nullptr ),
mnRef0Count( 0 )
{}
@@ -1272,8 +1272,8 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
{
// check if a directly matching logical font instance is already cached,
// the most recently used font usually has a hit rate of >50%
- ImplFontEntry *pEntry = NULL;
- PhysicalFontFamily* pFontFamily = NULL;
+ ImplFontEntry *pEntry = nullptr;
+ PhysicalFontFamily* pFontFamily = nullptr;
IFSD_Equal aIFSD_Equal;
if( mpFirstEntry && aIFSD_Equal( aFontSelData, mpFirstEntry->maFontSelData ) )
pEntry = mpFirstEntry;
@@ -1288,7 +1288,7 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
{
// find the best matching logical font family and update font selector accordingly
pFontFamily = pFontList->ImplFindByFont( aFontSelData );
- DBG_ASSERT( (pFontFamily != NULL), "ImplFontCache::Get() No logical font found!" );
+ DBG_ASSERT( (pFontFamily != nullptr), "ImplFontCache::Get() No logical font found!" );
if( pFontFamily )
aFontSelData.maSearchName = pFontFamily->GetSearchName();
@@ -1301,7 +1301,7 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
}
}
- PhysicalFontFace* pFontData = NULL;
+ PhysicalFontFace* pFontData = nullptr;
if (!pEntry && pFontFamily)// no cache hit => find the best matching physical font face
{
@@ -1372,7 +1372,7 @@ ImplFontEntry* ImplFontCache::GetGlyphFallbackFont( PhysicalFontCollection* pFon
// e.g. PsPrint Arial->Helvetica for udiaeresis when Helvetica doesn't support it
if( nFallbackLevel >= 1)
{
- PhysicalFontFamily* pFallbackData = NULL;
+ PhysicalFontFamily* pFallbackData = nullptr;
//fdo#33898 If someone has EUDC installed then they really want that to
//be used as the first-choice glyph fallback seeing as it's filled with
@@ -1388,7 +1388,7 @@ ImplFontEntry* ImplFontCache::GetGlyphFallbackFont( PhysicalFontCollection* pFon
pFallbackData = pFontCollection->GetGlyphFallbackFont(rFontSelData, rMissingCodes, nFallbackLevel-1);
// escape when there are no font candidates
if( !pFallbackData )
- return NULL;
+ return nullptr;
// override the font name
rFontSelData.SetFamilyName( pFallbackData->GetFamilyName() );
// clear the cached normalized name
@@ -1435,7 +1435,7 @@ void ImplFontCache::Release(ImplFontEntry* pEntry)
assert(mnRef0Count>=0 && "ImplFontCache::Release() - refcount0 underflow");
if( mpFirstEntry == pFontEntry )
- mpFirstEntry = NULL;
+ mpFirstEntry = nullptr;
}
assert(mnRef0Count==0 && "ImplFontCache::Release() - refcount0 mismatch");
@@ -1473,7 +1473,7 @@ void ImplFontCache::Invalidate()
}
// #112304# make sure the font cache is really clean
- mpFirstEntry = NULL;
+ mpFirstEntry = nullptr;
maFontInstanceList.clear();
assert(mnRef0Count==0 && "ImplFontCache::Invalidate() - mnRef0Count non-zero");
@@ -1990,7 +1990,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
Color aOldFillColor = GetFillColor();
bool bOldMap = mbMap;
GDIMetaFile* pOldMetaFile = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
EnableMapMode( false );
FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont );
@@ -2084,13 +2084,13 @@ SalLayout* OutputDevice::getFallbackFont(ImplFontEntry &rFallbackFont,
SalLayout* pFallback = mpGraphics->GetTextLayout( rLayoutArgs, nFallbackLevel );
if (!pFallback)
- return NULL;
+ return nullptr;
if (!pFallback->LayoutText(rLayoutArgs))
{
// there is no need for a font that couldn't resolve anything
pFallback->Release();
- return NULL;
+ return nullptr;
}
pFallback->AdjustLayout( rLayoutArgs );
@@ -2107,11 +2107,11 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay
{
SAL_WARN ("vcl.gdi", "No font entry set in OutputDevice");
assert(mpFontEntry);
- return NULL;
+ return nullptr;
}
// prepare multi level glyph fallback
- MultiSalLayout* pMultiSalLayout = NULL;
+ MultiSalLayout* pMultiSalLayout = nullptr;
ImplLayoutRuns aLayoutRuns = rLayoutArgs.maRuns;
rLayoutArgs.PrepareFallback();
rLayoutArgs.mnFlags |= SalLayoutFlags::ForFallback;
@@ -2280,7 +2280,7 @@ sal_Int32 OutputDevice::HasGlyphs( const vcl::Font& rTempFont, const OUString& r
if( ! pFontCharMap->HasChar( rStr[i] ) )
return nIndex;
- pFontCharMap = 0;
+ pFontCharMap = nullptr;
return -1;
}
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 847cce31089d..fdf6d33ba53c 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -139,9 +139,9 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
// if the clipping polypolygon is a rectangle, then it's the same size as the bounding of the
// polypolygon, so pass in a NULL for the clipping parameter
if( aGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL )
- DrawLinearGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? NULL : &aClixPolyPoly );
+ DrawLinearGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? nullptr : &aClixPolyPoly );
else
- DrawComplexGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? NULL : &aClixPolyPoly );
+ DrawComplexGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? nullptr : &aClixPolyPoly );
}
Pop();
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 484ba61dd3e4..ca8ccd1b4240 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -104,7 +104,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
aPolyPoly.Optimize( PolyOptimizeFlags::NO_SAME );
aHatch.SetDistance( ImplLogicWidthToDevicePixel( aHatch.GetDistance() ) );
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
EnableMapMode( false );
Push( PushFlags::LINECOLOR );
SetLineColor( aHatch.GetColor() );
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index 2e76acf2ef7d..bf4f2f6a3c8f 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -225,7 +225,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin
}
GDIMetaFile* pOldMetaFile = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
if(aLinePolyPolygon.count())
{
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index 70de3fb248e7..1a0b2799ab66 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -349,13 +349,13 @@ void OutputDevice::ImplInvalidateViewTransform()
if(mpOutDevData->mpViewTransform)
{
delete mpOutDevData->mpViewTransform;
- mpOutDevData->mpViewTransform = NULL;
+ mpOutDevData->mpViewTransform = nullptr;
}
if(mpOutDevData->mpInverseViewTransform)
{
delete mpOutDevData->mpInverseViewTransform;
- mpOutDevData->mpInverseViewTransform = NULL;
+ mpOutDevData->mpInverseViewTransform = nullptr;
}
}
@@ -821,7 +821,7 @@ void OutputDevice::SetRelativeMapMode( const MapMode& rNewMapMode )
rNewMapMode.GetScaleY().GetDenominator(),
maMapMode.GetScaleY().GetNumerator() );
- Point aPt( LogicToLogic( Point(), NULL, &rNewMapMode ) );
+ Point aPt( LogicToLogic( Point(), nullptr, &rNewMapMode ) );
if ( eNew != eOld )
{
if ( eOld > MAP_PIXEL )
diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx
index ae036d6d0193..650d08af2cc5 100644
--- a/vcl/source/outdev/nativecontrols.cxx
+++ b/vcl/source/outdev/nativecontrols.cxx
@@ -53,7 +53,7 @@ static bool EnableNativeWidget( const OutputDevice& i_rDevice )
{
const vcl::ExtOutDevData* pOutDevData( i_rDevice.GetExtOutDevData() );
const vcl::PDFExtOutDevData* pPDFData( dynamic_cast< const vcl::PDFExtOutDevData* >( pOutDevData ) );
- if ( pPDFData != NULL )
+ if ( pPDFData != nullptr )
return false;
return true;
}
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 4f13a3d86902..b343f502e0fe 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -88,20 +88,20 @@ OutputDevice::OutputDevice() :
maTextLineColor( COL_TRANSPARENT ),
mxSettings( new AllSettings(Application::GetSettings()) )
{
- mpGraphics = NULL;
- mpUnoGraphicsList = NULL;
- mpPrevGraphics = NULL;
- mpNextGraphics = NULL;
- mpMetaFile = NULL;
- mpFontEntry = NULL;
- mpFontCache = NULL;
- mpFontCollection = NULL;
- mpGetDevFontList = NULL;
- mpGetDevSizeList = NULL;
+ mpGraphics = nullptr;
+ mpUnoGraphicsList = nullptr;
+ mpPrevGraphics = nullptr;
+ mpNextGraphics = nullptr;
+ mpMetaFile = nullptr;
+ mpFontEntry = nullptr;
+ mpFontCache = nullptr;
+ mpFontCollection = nullptr;
+ mpGetDevFontList = nullptr;
+ mpGetDevSizeList = nullptr;
mpOutDevStateStack = new OutDevStateStack;
- mpPDFWriter = NULL;
- mpAlphaVDev = NULL;
- mpExtOutDevData = NULL;
+ mpPDFWriter = nullptr;
+ mpAlphaVDev = nullptr;
+ mpExtOutDevData = nullptr;
mnOutOffX = 0;
mnOutOffY = 0;
mnOutWidth = 0;
@@ -172,12 +172,12 @@ OutputDevice::OutputDevice() :
// struct ImplOutDevData- see #i82615#
mpOutDevData = new ImplOutDevData;
- mpOutDevData->mpRotateDev = NULL;
- mpOutDevData->mpRecordLayout = NULL;
+ mpOutDevData->mpRotateDev = nullptr;
+ mpOutDevData->mpRecordLayout = nullptr;
// #i75163#
- mpOutDevData->mpViewTransform = NULL;
- mpOutDevData->mpInverseViewTransform = NULL;
+ mpOutDevData->mpViewTransform = nullptr;
+ mpOutDevData->mpInverseViewTransform = nullptr;
mbDisposed = false;
}
@@ -210,7 +210,7 @@ void OutputDevice::dispose()
if ( pWrapper )
pWrapper->ReleaseAllGraphics( this );
delete mpUnoGraphicsList;
- mpUnoGraphicsList = NULL;
+ mpUnoGraphicsList = nullptr;
}
mpOutDevData->mpRotateDev.disposeAndClear();
@@ -219,7 +219,7 @@ void OutputDevice::dispose()
ImplInvalidateViewTransform();
delete mpOutDevData;
- mpOutDevData = NULL;
+ mpOutDevData = nullptr;
// for some reason, we haven't removed state from the stack properly
if ( !mpOutDevStateStack->empty() )
@@ -231,7 +231,7 @@ void OutputDevice::dispose()
}
}
delete mpOutDevStateStack;
- mpOutDevStateStack = NULL;
+ mpOutDevStateStack = nullptr;
// release the active font instance
if( mpFontEntry )
@@ -240,30 +240,30 @@ void OutputDevice::dispose()
// remove cached results of GetDevFontList/GetDevSizeList
// TODO: use smart pointers for them
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
// release ImplFontCache specific to this OutputDevice
// TODO: refcount ImplFontCache
if( mpFontCache
&& (mpFontCache != ImplGetSVData()->maGDIData.mpScreenFontCache)
- && (ImplGetSVData()->maGDIData.mpScreenFontCache != NULL) )
+ && (ImplGetSVData()->maGDIData.mpScreenFontCache != nullptr) )
{
delete mpFontCache;
- mpFontCache = NULL;
+ mpFontCache = nullptr;
}
// release ImplFontList specific to this OutputDevice
// TODO: refcount ImplFontList
if( mpFontCollection
&& (mpFontCollection != ImplGetSVData()->maGDIData.mpScreenFontList)
- && (ImplGetSVData()->maGDIData.mpScreenFontList != NULL) )
+ && (ImplGetSVData()->maGDIData.mpScreenFontList != nullptr) )
{
mpFontCollection->Clear();
delete mpFontCollection;
- mpFontCollection = NULL;
+ mpFontCollection = nullptr;
}
mpAlphaVDev.disposeAndClear();
@@ -516,7 +516,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
AdjustTwoRect( aPosAry, aSrcOutRect );
if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
- mpGraphics->CopyBits( aPosAry, NULL, this, NULL );
+ mpGraphics->CopyBits( aPosAry, nullptr, this, nullptr );
}
if( mpAlphaVDev )
@@ -649,7 +649,7 @@ void OutputDevice::CopyDeviceArea( SalTwoRect& aPosAry, bool /*bWindowInvalidate
aPosAry.mnDestWidth = aPosAry.mnSrcWidth;
aPosAry.mnDestHeight = aPosAry.mnSrcHeight;
- mpGraphics->CopyBits(aPosAry, NULL, this, NULL);
+ mpGraphics->CopyBits(aPosAry, nullptr, this, nullptr);
}
// Direct OutputDevice drawing private function
@@ -659,7 +659,7 @@ void OutputDevice::drawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect& rP
SalGraphics* pSrcGraphics;
if ( this == pSrcDev )
- pSrcGraphics = NULL;
+ pSrcGraphics = nullptr;
else
{
if ( (GetOutDevType() != pSrcDev->GetOutDevType()) ||
@@ -675,7 +675,7 @@ void OutputDevice::drawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect& rP
else
{
if ( static_cast<vcl::Window*>(this)->mpWindowImpl->mpFrameWindow == static_cast<const vcl::Window*>(pSrcDev)->mpWindowImpl->mpFrameWindow )
- pSrcGraphics = NULL;
+ pSrcGraphics = nullptr;
else
{
if ( !pSrcDev->mpGraphics )
@@ -833,7 +833,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
{
GDIMetaFile* pOldMetaFile = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
Graphic( *pSubst ).Draw( this, rPoint, rSize );
mpMetaFile = pOldMetaFile;
}
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index ad8e8aef9f1d..aa3de62f881d 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -40,17 +40,17 @@
#include "sallayout.hxx"
OutDevState::OutDevState()
- : mpMapMode(0)
+ : mpMapMode(nullptr)
, mbMapActive(false)
- , mpClipRegion(0)
- , mpLineColor(0)
- , mpFillColor(0)
- , mpFont(0)
- , mpTextColor(0)
- , mpTextFillColor(0)
- , mpTextLineColor(0)
- , mpOverlineColor(0)
- , mpRefPoint(0)
+ , mpClipRegion(nullptr)
+ , mpLineColor(nullptr)
+ , mpFillColor(nullptr)
+ , mpFont(nullptr)
+ , mpTextColor(nullptr)
+ , mpTextFillColor(nullptr)
+ , mpTextLineColor(nullptr)
+ , mpOverlineColor(nullptr)
+ , mpRefPoint(nullptr)
, meTextAlign(ALIGN_TOP)
, meRasterOp(ROP_OVERPAINT)
, mnTextLayoutMode(TEXT_LAYOUT_DEFAULT)
@@ -142,7 +142,7 @@ void OutputDevice::Pop()
mpMetaFile->AddAction( new MetaPopAction() );
GDIMetaFile* pOldMetaFile = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
if ( mpOutDevStateStack->empty() )
{
@@ -636,19 +636,19 @@ void OutputDevice::ImplReleaseFonts()
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
}
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index dca527b004ee..563a4b2454da 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -114,7 +114,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
if( aPoly.GetSize() >= 2 )
{
GDIMetaFile* pOldMF = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
DrawPolygon( aPoly );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index dc1bcfcbacb1..9a745bea0db5 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -275,7 +275,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
mnOutOffX = 0L;
mnOutOffY = 0L;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
EnableMapMode( false );
DrawMask( aPoint, aBmp, GetTextColor() );
@@ -929,7 +929,7 @@ long OutputDevice::GetTextWidth( const OUString& rStr, sal_Int32 nIndex, sal_Int
vcl::TextLayoutCache const*const pLayoutCache) const
{
- long nWidth = GetTextArray( rStr, NULL, nIndex, nLen, pLayoutCache );
+ long nWidth = GetTextArray( rStr, nullptr, nIndex, nLen, pLayoutCache );
return nWidth;
}
@@ -1318,12 +1318,12 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr,
// we need a graphics
if( !mpGraphics )
if( !AcquireGraphics() )
- return NULL;
+ return nullptr;
// initialize font if needed
if( mbNewFont )
if( !ImplNewFont() )
- return NULL;
+ return nullptr;
if( mbInitFont )
InitFont();
@@ -1332,7 +1332,7 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr,
{
const sal_Int32 nNewLen = rOrigStr.getLength() - nMinIndex;
if( nNewLen <= 0 )
- return NULL;
+ return nullptr;
nLen = nNewLen;
}
@@ -1391,11 +1391,11 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr,
if( pSalLayout && !pSalLayout->LayoutText( aLayoutArgs ) )
{
pSalLayout->Release();
- pSalLayout = NULL;
+ pSalLayout = nullptr;
}
if( !pSalLayout )
- return NULL;
+ return nullptr;
// do glyph fallback if needed
// #105768# avoid fallback for very small font sizes
@@ -1442,7 +1442,7 @@ std::shared_ptr<vcl::TextLayoutCache> OutputDevice::CreateTextLayoutCache(
bool OutputDevice::GetTextIsRTL( const OUString& rString, sal_Int32 nIndex, sal_Int32 nLen ) const
{
OUString aStr( rString );
- ImplLayoutArgs aArgs = ImplPrepareLayoutArgs( aStr, nIndex, nLen, 0, NULL );
+ ImplLayoutArgs aArgs = ImplPrepareLayoutArgs( aStr, nIndex, nLen, 0, nullptr );
bool bRTL = false;
int nCharPos = -1;
if (!aArgs.GetNextPos(&nCharPos, &bRTL))
@@ -1832,7 +1832,7 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect,
// #i47157# Factored out to ImplDrawTextRect(), to be shared
// between us and DrawText()
vcl::DefaultTextLayout aLayout( *this );
- ImplDrawText( *this, rRect, rOrigStr, nStyle, NULL, NULL, aLayout );
+ ImplDrawText( *this, rRect, rOrigStr, nStyle, nullptr, nullptr, aLayout );
// and restore again
EnableOutput( bOutputEnabled );
@@ -1851,7 +1851,7 @@ void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, D
pDisplayText = &mpOutDevData->mpRecordLayout->m_aDisplayText;
}
- bool bDecomposeTextRectAction = ( _pTextLayout != NULL ) && _pTextLayout->DecomposeTextRectAction();
+ bool bDecomposeTextRectAction = ( _pTextLayout != nullptr ) && _pTextLayout->DecomposeTextRectAction();
if ( mpMetaFile && !bDecomposeTextRectAction )
mpMetaFile->AddAction( new MetaTextRectAction( rRect, rOrigStr, nStyle ) );
@@ -1870,7 +1870,7 @@ void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, D
// create MetaActionType::TEXTs otherwise)
GDIMetaFile* pMtf = mpMetaFile;
if ( !bDecomposeTextRectAction )
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
// #i47157# Factored out to ImplDrawText(), to be used also
// from AddTextRectActions()
@@ -2063,7 +2063,7 @@ OUString OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice,
{
OUString aPath( rOrigStr );
OUString aAbbreviatedPath;
- osl_abbreviateSystemPath( aPath.pData, &aAbbreviatedPath.pData, nIndex, NULL );
+ osl_abbreviateSystemPath( aPath.pData, &aAbbreviatedPath.pData, nIndex, nullptr );
aStr = aAbbreviatedPath;
}
else if ( nStyle & DrawTextFlags::NewsEllipsis )
@@ -2449,7 +2449,7 @@ bool OutputDevice::GetTextBoundRect( Rectangle& rRect,
bool bRet = false;
rRect.SetEmpty();
- SalLayout* pSalLayout = NULL;
+ SalLayout* pSalLayout = nullptr;
const Point aPoint;
// calculate offset when nBase!=nIndex
long nXOffset = 0;
@@ -2653,7 +2653,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
const_cast<OutputDevice&>(*this).mbNewFont = true;
}
- SalLayout* pSalLayout = NULL;
+ SalLayout* pSalLayout = nullptr;
// calculate offset when nBase!=nIndex
long nXOffset = 0;
@@ -2725,7 +2725,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
// fall back to bitmap method to get the bounding rectangle,
// so we need a monochrome virtual device with matching font
pSalLayout = ImplLayout( rStr, nIndex, nLen, Point(0,0), nLayoutWidth, pDXArray );
- if (pSalLayout == 0)
+ if (pSalLayout == nullptr)
return false;
long nOrgWidth = pSalLayout->GetTextWidth();
long nOrgHeight = mpFontEntry->mnLineHeight + mnEmphasisAscent
@@ -2750,7 +2750,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
aVDev->SetTextFillColor();
pSalLayout = aVDev->ImplLayout( rStr, nIndex, nLen, Point(0,0), nLayoutWidth, pDXArray );
- if (pSalLayout == 0)
+ if (pSalLayout == nullptr)
return false;
long nWidth = pSalLayout->GetTextWidth();
long nHeight = aVDev->mpFontEntry->mnLineHeight + aVDev->mnEmphasisAscent +
@@ -2784,14 +2784,14 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
OUString aStr( rStr ); // prepare for e.g. localized digits
sal_Int32 nIndex2 = nIndex; // only needed until nIndex is sal_Int32
sal_Int32 nLen2 = nLen; // only needed until nLen is sal_Int32
- ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, nIndex2, nLen2, 0, NULL );
+ ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, nIndex2, nLen2, 0, nullptr );
for( int nCharPos = -1; aLayoutArgs.GetNextPos( &nCharPos, &bRTL);)
{
bool bSuccess = false;
// draw character into virtual device
pSalLayout = aVDev->ImplLayout( rStr, nCharPos, 1, Point(0,0), nLayoutWidth, pDXArray );
- if (pSalLayout == 0)
+ if (pSalLayout == nullptr)
return false;
long nCharWidth = pSalLayout->GetTextWidth();
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 38df3311f885..cbe7cd1833b4 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -374,10 +374,10 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
// operation explicitly further below.
if( mpAlphaVDev )
- mpAlphaVDev = NULL;
+ mpAlphaVDev = nullptr;
GDIMetaFile* pOldMetaFile = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
tools::PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
Rectangle aPolyRect( aPolyPoly.GetBoundRect() );
@@ -678,7 +678,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
Point aPoint;
Rectangle aDstRect( aPoint, GetOutputSizePixel() );
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
aDstRect.Intersection( aOutRect );
ClipToPaintRegion( aDstRect );
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index 175f0d199eda..d2c01dbeb25e 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -180,7 +180,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
aSize = Size( nWidth, nHeight );
}
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
EnableMapMode( false );
Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
@@ -355,7 +355,7 @@ void OutputDevice::DrawGradientWallpaper( long nX, long nY,
aBound = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) );
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
EnableMapMode( false );
Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx
index 3ae9e30fafc7..d12d4d47d451 100644
--- a/vcl/source/window/abstdlg.cxx
+++ b/vcl/source/window/abstdlg.cxx
@@ -33,7 +33,7 @@ extern "C" VclAbstractDialogFactory* CreateDialogFactory();
VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
{
- FuncPtrCreateDialogFactory fp = 0;
+ FuncPtrCreateDialogFactory fp = nullptr;
#if HAVE_FEATURE_DESKTOP
#ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary;
@@ -50,7 +50,7 @@ VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
#endif
if ( fp )
return fp();
- return 0;
+ return nullptr;
}
VclAbstractDialog::~VclAbstractDialog()
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index a8ce0a4ecfc5..d06e6a28ebd8 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -40,7 +40,7 @@ public:
};
sal_uInt16 ImplAccelEntryGetIndex( ImplAccelList* pList, sal_uInt16 nId,
- sal_uInt16* pIndex = NULL )
+ sal_uInt16* pIndex = nullptr )
{
size_t nLow;
size_t nHigh;
@@ -96,7 +96,7 @@ static void ImplAccelEntryInsert( ImplAccelList* pList, ImplAccelEntry* pEntry )
do
{
nIndex++;
- ImplAccelEntry* pTempEntry = NULL;
+ ImplAccelEntry* pTempEntry = nullptr;
if ( nIndex < pList->size() )
pTempEntry = (*pList)[ nIndex ];
if ( !pTempEntry || (pTempEntry->mnId != pEntry->mnId) )
@@ -147,7 +147,7 @@ void Accelerator::ImplInit()
mnCurId = 0;
mnCurRepeat = 0;
mbIsCancel = false;
- mpDel = NULL;
+ mpDel = nullptr;
}
ImplAccelEntry* Accelerator::ImplGetAccelData( const vcl::KeyCode& rKeyCode ) const
@@ -156,7 +156,7 @@ ImplAccelEntry* Accelerator::ImplGetAccelData( const vcl::KeyCode& rKeyCode ) co
if( it != mpData->maKeyMap.end() )
return it->second;
else
- return NULL;
+ return nullptr;
}
void Accelerator::ImplCopyData( ImplAccelData& rAccelData )
@@ -173,7 +173,7 @@ void Accelerator::ImplCopyData( ImplAccelData& rAccelData )
pEntry->mpAutoAccel = pEntry->mpAccel;
}
else
- pEntry->mpAutoAccel = NULL;
+ pEntry->mpAutoAccel = nullptr;
mpData->maKeyMap.insert( std::make_pair( pEntry->maKeyCode.GetFullCode(), pEntry ) );
mpData->maIdList.push_back( pEntry );
@@ -310,7 +310,7 @@ void Accelerator::Select()
void Accelerator::InsertItem( sal_uInt16 nItemId, const vcl::KeyCode& rKeyCode )
{
- ImplInsertAccel( nItemId, rKeyCode, true, NULL );
+ ImplInsertAccel( nItemId, rKeyCode, true, nullptr );
}
void Accelerator::InsertItem( const ResId& rResId )
@@ -320,7 +320,7 @@ void Accelerator::InsertItem( const ResId& rResId )
sal_uInt16 nAccelKeyId;
sal_uInt16 bDisable;
vcl::KeyCode aKeyCode;
- Accelerator* pAutoAccel = NULL;
+ Accelerator* pAutoAccel = nullptr;
GetRes( rResId.SetRT( RSC_ACCELITEM ) );
nObjMask = ReadLongRes();
@@ -364,7 +364,7 @@ vcl::KeyCode Accelerator::GetKeyCode( sal_uInt16 nItemId ) const
sal_uInt16 Accelerator::GetItemId( sal_uInt16 nPos ) const
{
- ImplAccelEntry* pEntry = ( nPos < mpData->maIdList.size() ) ? mpData->maIdList[ nPos ] : NULL;
+ ImplAccelEntry* pEntry = ( nPos < mpData->maIdList.size() ) ? mpData->maIdList[ nPos ] : nullptr;
if ( pEntry )
return pEntry->mnId;
else
@@ -378,7 +378,7 @@ Accelerator* Accelerator::GetAccel( sal_uInt16 nItemId ) const
if ( nIndex != ACCELENTRY_NOTFOUND )
return mpData->maIdList[ nIndex ]->mpAccel;
else
- return NULL;
+ return nullptr;
}
Accelerator& Accelerator::operator=( const Accelerator& rAccel )
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index 5b79b92e82cd..e0a708f78ff9 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -109,11 +109,11 @@ using ::com::sun::star::awt::XTopWindow;
ImplAccessibleInfos::ImplAccessibleInfos()
{
nAccessibleRole = 0xFFFF;
- pAccessibleName = NULL;
- pAccessibleDescription = NULL;
- pLabeledByWindow = NULL;
- pLabelForWindow = NULL;
- pMemberOfWindow = NULL;
+ pAccessibleName = nullptr;
+ pAccessibleDescription = nullptr;
+ pLabeledByWindow = nullptr;
+ pLabelForWindow = nullptr;
+ pMemberOfWindow = nullptr;
}
ImplAccessibleInfos::~ImplAccessibleInfos()
@@ -215,13 +215,13 @@ vcl::Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uIn
rChildCount++;
}
- return NULL;
+ return nullptr;
}
vcl::Window* Window::GetAccessibleParentWindow() const
{
if ( ImplIsAccessibleNativeFrame() )
- return NULL;
+ return nullptr;
vcl::Window* pParent = mpWindowImpl->mpParent;
if( GetType() == WINDOW_MENUBARWINDOW )
@@ -620,7 +620,7 @@ vcl::Window* Window::GetAccessibleRelationMemberOf() const
if (!isContainerWindow(this) && !isContainerWindow(GetParent()))
return getLegacyNonLayoutAccessibleRelationMemberOf();
- return NULL;
+ return nullptr;
}
vcl::Window* Window::getAccessibleRelationLabelFor() const
@@ -628,7 +628,7 @@ vcl::Window* Window::getAccessibleRelationLabelFor() const
if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabelForWindow)
return mpWindowImpl->mpAccessibleInfos->pLabelForWindow;
- return NULL;
+ return nullptr;
}
vcl::Window* Window::GetAccessibleRelationLabelFor() const
@@ -641,7 +641,7 @@ vcl::Window* Window::GetAccessibleRelationLabelFor() const
if (!isContainerWindow(this) && !isContainerWindow(GetParent()))
return getLegacyNonLayoutAccessibleRelationLabelFor();
- return NULL;
+ return nullptr;
}
vcl::Window* Window::GetAccessibleRelationLabeledBy() const
@@ -665,7 +665,7 @@ vcl::Window* Window::GetAccessibleRelationLabeledBy() const
if (!isContainerWindow(this) && !isContainerWindow(GetParent()))
return getLegacyNonLayoutAccessibleRelationLabeledBy();
- return NULL;
+ return nullptr;
}
bool Window::IsAccessibilityEventsSuppressed( bool bTraverseParentPath )
diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx
index b94e8c062414..295a1681d40a 100644
--- a/vcl/source/window/accmgr.cxx
+++ b/vcl/source/window/accmgr.cxx
@@ -90,12 +90,12 @@ void ImplAccelManager::EndSequence()
{
Accelerator* pTempAccel = (*mpSequenceList)[ i ];
pTempAccel->mbIsCancel = false;
- pTempAccel->mpDel = NULL;
+ pTempAccel->mpDel = nullptr;
}
// delete sequence-list
delete mpSequenceList;
- mpSequenceList = NULL;
+ mpSequenceList = nullptr;
}
bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode, sal_uInt16 nRepeat )
@@ -111,7 +111,7 @@ bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode, sal_uInt16 nRep
// are we in a sequence ?
if ( mpSequenceList )
{
- pAccel = mpSequenceList->empty() ? NULL : (*mpSequenceList)[ 0 ];
+ pAccel = mpSequenceList->empty() ? nullptr : (*mpSequenceList)[ 0 ];
// not found ?
if ( !pAccel )
@@ -160,7 +160,7 @@ bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode, sal_uInt16 nRep
pAccel->maCurKeyCode = vcl::KeyCode();
pAccel->mnCurId = 0;
pAccel->mnCurRepeat = 0;
- pAccel->mpDel = NULL;
+ pAccel->mpDel = nullptr;
}
return true;
@@ -230,7 +230,7 @@ bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode, sal_uInt16 nRep
pAccel->maCurKeyCode = vcl::KeyCode();
pAccel->mnCurId = 0;
pAccel->mnCurRepeat = 0;
- pAccel->mpDel = NULL;
+ pAccel->mpDel = nullptr;
}
return true;
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index adb0621ab66b..f65e69ec26d7 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -442,7 +442,7 @@ void ImplNoBorderWindowView::DrawWindow(vcl::RenderContext&, sal_uInt16, const P
// - ImplSmallBorderWindowView -
ImplSmallBorderWindowView::ImplSmallBorderWindowView( ImplBorderWindow* pBorderWindow )
: mpBorderWindow(pBorderWindow)
- , mpOutDev(NULL)
+ , mpOutDev(nullptr)
, mnWidth(0)
, mnHeight(0)
, mnLeftBorder(0)
@@ -460,7 +460,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
mnHeight = nHeight;
mbNWFBorder = false;
- vcl::Window *pWin = NULL, *pCtrl = NULL;
+ vcl::Window *pWin = nullptr, *pCtrl = nullptr;
if (mpOutDev->GetOutDevType() == OUTDEV_WINDOW)
pWin = static_cast<vcl::Window*>(mpOutDev.get());
@@ -552,7 +552,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
mpBorderWindow->SetBackground();
pCtrl->SetPaintTransparent( true );
- vcl::Window* pCompoundParent = NULL;
+ vcl::Window* pCompoundParent = nullptr;
if( pWin->GetParent() && pWin->GetParent()->IsCompoundControl() )
pCompoundParent = pWin->GetParent();
@@ -805,8 +805,8 @@ ImplStdBorderWindowView::ImplStdBorderWindowView( ImplBorderWindow* pBorderWindo
maFrameData.mnHelpState = DrawButtonFlags::NONE;
maFrameData.mbTitleClipped = false;
- mpATitleVirDev = NULL;
- mpDTitleVirDev = NULL;
+ mpATitleVirDev = nullptr;
+ mpDTitleVirDev = nullptr;
}
ImplStdBorderWindowView::~ImplStdBorderWindowView()
@@ -1728,7 +1728,7 @@ void ImplBorderWindow::ImplInit( vcl::Window* pParent,
WinBits nStyle, sal_uInt16 nTypeStyle,
const ::com::sun::star::uno::Any& )
{
- ImplInit( pParent, nStyle, nTypeStyle, NULL );
+ ImplInit( pParent, nStyle, nTypeStyle, nullptr );
}
void ImplBorderWindow::ImplInit( vcl::Window* pParent,
@@ -1786,7 +1786,7 @@ void ImplBorderWindow::ImplInit( vcl::Window* pParent,
SetBackground();
SetTextFillColor();
- mpMenuBarWindow = NULL;
+ mpMenuBarWindow = nullptr;
mnMinWidth = 0;
mnMinHeight = 0;
mnMaxWidth = SHRT_MAX;
@@ -1832,7 +1832,7 @@ ImplBorderWindow::~ImplBorderWindow()
void ImplBorderWindow::dispose()
{
delete mpBorderView;
- mpBorderView = NULL;
+ mpBorderView = nullptr;
mpMenuBarWindow.clear();
mpNotebookBarWindow.disposeAndClear();
vcl::Window::dispose();
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index ec9589aea781..6ad603ab1a76 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -101,7 +101,7 @@ ImplBtnDlgItem* ButtonDialog::ImplGetItem( sal_uInt16 nId ) const
return &(*it);
}
- return NULL;
+ return nullptr;
}
long ButtonDialog::ImplGetButtonSize()
@@ -236,7 +236,7 @@ void ButtonDialog::StateChanged( StateChangedType nType )
for (auto & it : m_ItemList)
{
if ( it->mpPushButton && it->mbOwnButton )
- it->mpPushButton->SetZOrder(0, ZOrderFlags::Last);
+ it->mpPushButton->SetZOrder(nullptr, ZOrderFlags::Last);
}
// Set focus on default button.
@@ -366,7 +366,7 @@ PushButton* ButtonDialog::GetPushButton( sal_uInt16 nId ) const
if ( pItem )
return pItem->mpPushButton;
else
- return NULL;
+ return nullptr;
}
void ButtonDialog::SetButtonText( sal_uInt16 nId, const OUString& rText )
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index f16d439f1bb5..e39eb6f8435f 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -376,9 +376,9 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr
for (std::vector<ButtonImageWidgetMap>::iterator aI = m_pParserState->m_aButtonImageWidgetMaps.begin(),
aEnd = m_pParserState->m_aButtonImageWidgetMaps.end(); aI != aEnd; ++aI)
{
- PushButton *pTargetButton = NULL;
- RadioButton *pTargetRadio = NULL;
- Button *pTarget = NULL;
+ PushButton *pTargetButton = nullptr;
+ RadioButton *pTargetRadio = nullptr;
+ Button *pTarget = nullptr;
if (!aI->m_bRadio)
{
@@ -1851,7 +1851,7 @@ VclPtr<vcl::Window> VclBuilder::insertObject(vcl::Window *pParent, const OString
//deferred due to waiting to encounter it in this .ui, and it hasn't
//been seen yet, then make unattached widgets parent-less toplevels
if (pParent == m_pParent.get() && m_bToplevelHasDeferredInit)
- pParent = NULL;
+ pParent = nullptr;
pCurrentChild = makeObject(pParent, rClass, rID, rProps);
}
@@ -2029,7 +2029,7 @@ bool VclBuilder::sortIntoBestTabTraversalOrder::operator()(const vcl::Window *pA
void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
{
- vcl::Window *pCurrentChild = NULL;
+ vcl::Window *pCurrentChild = nullptr;
xmlreader::Span name;
int nsId;
@@ -2102,7 +2102,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
else if (sInternalChild.startsWith("action_area") || sInternalChild.startsWith("messagedialog-action_area"))
{
vcl::Window *pContentArea = pCurrentChild->GetParent();
- if (Dialog *pBoxParent = dynamic_cast<Dialog*>(pContentArea ? pContentArea->GetParent() : NULL))
+ if (Dialog *pBoxParent = dynamic_cast<Dialog*>(pContentArea ? pContentArea->GetParent() : nullptr))
{
pBoxParent->set_action_area(static_cast<VclButtonBox*>(pCurrentChild)); // FIXME-VCLPTR
}
@@ -2117,7 +2117,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
aChilds.push_back(pChild);
}
- bool bIsButtonBox = dynamic_cast<VclButtonBox*>(pCurrentChild) != NULL;
+ bool bIsButtonBox = dynamic_cast<VclButtonBox*>(pCurrentChild) != nullptr;
//sort child order within parent so that tabbing
//between controls goes in a visually sensible sequence
@@ -2945,12 +2945,12 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm
if (sClass == "GtkAdjustment")
{
handleAdjustment(sID, aProperties);
- return NULL;
+ return nullptr;
}
else if (sClass == "GtkTextBuffer")
{
handleTextBuffer(sID, aProperties);
- return NULL;
+ return nullptr;
}
if (!pCurrentChild)
@@ -3010,7 +3010,7 @@ void VclBuilder::applyPackingProperty(vcl::Window *pCurrent,
//ToolBoxItems are not true widgets just elements
//of the ToolBox itself
- ToolBox *pToolBoxParent = NULL;
+ ToolBox *pToolBoxParent = nullptr;
if (pCurrent == pParent)
pToolBoxParent = dynamic_cast<ToolBox*>(pParent);
@@ -3217,7 +3217,7 @@ void VclBuilder::collectAccelerator(xmlreader::XmlReader &reader, stringmap &rMa
vcl::Window *VclBuilder::get_widget_root()
{
- return m_aChildren.empty() ? NULL : m_aChildren[0].m_pWindow.get();
+ return m_aChildren.empty() ? nullptr : m_aChildren[0].m_pWindow.get();
}
vcl::Window *VclBuilder::get_by_name(const OString& sID)
@@ -3229,7 +3229,7 @@ vcl::Window *VclBuilder::get_by_name(const OString& sID)
return aI->m_pWindow;
}
- return NULL;
+ return nullptr;
}
PopupMenu *VclBuilder::get_menu(const OString& sID)
@@ -3241,7 +3241,7 @@ PopupMenu *VclBuilder::get_menu(const OString& sID)
return aI->m_pMenu;
}
- return NULL;
+ return nullptr;
}
short VclBuilder::get_response(const vcl::Window *pWindow) const
@@ -3355,7 +3355,7 @@ const VclBuilder::ListStore *VclBuilder::get_model_by_name(const OString& sID) c
std::map<OString, ListStore>::const_iterator aI = m_pParserState->m_aModels.find(sID);
if (aI != m_pParserState->m_aModels.end())
return &(aI->second);
- return NULL;
+ return nullptr;
}
const VclBuilder::TextBuffer *VclBuilder::get_buffer_by_name(const OString& sID) const
@@ -3363,7 +3363,7 @@ const VclBuilder::TextBuffer *VclBuilder::get_buffer_by_name(const OString& sID)
std::map<OString, TextBuffer>::const_iterator aI = m_pParserState->m_aTextBuffers.find(sID);
if (aI != m_pParserState->m_aTextBuffers.end())
return &(aI->second);
- return NULL;
+ return nullptr;
}
const VclBuilder::Adjustment *VclBuilder::get_adjustment_by_name(const OString& sID) const
@@ -3371,7 +3371,7 @@ const VclBuilder::Adjustment *VclBuilder::get_adjustment_by_name(const OString&
std::map<OString, Adjustment>::const_iterator aI = m_pParserState->m_aAdjustments.find(sID);
if (aI != m_pParserState->m_aAdjustments.end())
return &(aI->second);
- return NULL;
+ return nullptr;
}
void VclBuilder::mungeModel(ListBox &rTarget, const ListStore &rStore, sal_uInt16 nActiveId)
diff --git a/vcl/source/window/cairo_cairo.cxx b/vcl/source/window/cairo_cairo.cxx
index a722c2e8d073..54b27dc98cf7 100644
--- a/vcl/source/window/cairo_cairo.cxx
+++ b/vcl/source/window/cairo_cairo.cxx
@@ -35,7 +35,7 @@ namespace cairo
const SystemEnvData* GetSysData(const vcl::Window *pOutputWindow)
{
- const SystemEnvData* pSysData = NULL;
+ const SystemEnvData* pSysData = nullptr;
// check whether we're a SysChild: have to fetch system data
// directly from SystemChildWindow, because the GetSystemData
// method is unfortunately not virtual
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index 9b088c3fa868..41ed2cb6d786 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -274,7 +274,7 @@ void Window::ImplInitWinChildClipRegion()
if ( mpWindowImpl->mpChildClipRegion )
{
delete mpWindowImpl->mpChildClipRegion;
- mpWindowImpl->mpChildClipRegion = NULL;
+ mpWindowImpl->mpChildClipRegion = nullptr;
}
}
else
@@ -375,7 +375,7 @@ bool Window::ImplSysObjClip( const vcl::Region* pOldRegion )
void Window::ImplUpdateSysObjChildrenClip()
{
if ( mpWindowImpl->mpSysObj && mpWindowImpl->mbInitWinClipRegion )
- ImplSysObjClip( NULL );
+ ImplSysObjClip( nullptr );
vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
while ( pWindow )
@@ -423,7 +423,7 @@ bool Window::ImplSetClipFlagChildren( bool bSysObjOnlySmaller )
bool bUpdate = true;
if ( mpWindowImpl->mpSysObj )
{
- vcl::Region* pOldRegion = NULL;
+ vcl::Region* pOldRegion = nullptr;
if ( bSysObjOnlySmaller && !mpWindowImpl->mbInitWinClipRegion )
pOldRegion = new vcl::Region( mpWindowImpl->maWinClipRegion );
@@ -898,7 +898,7 @@ void Window::ImplDeleteOverlapBackground()
if ( mpWindowImpl->mpOverlapData->mpSaveBackRgn )
{
delete mpWindowImpl->mpOverlapData->mpSaveBackRgn;
- mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL;
+ mpWindowImpl->mpOverlapData->mpSaveBackRgn = nullptr;
}
// remove window from the list
@@ -911,7 +911,7 @@ void Window::ImplDeleteOverlapBackground()
pTemp = pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin;
pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin = mpWindowImpl->mpOverlapData->mpNextBackWin;
}
- mpWindowImpl->mpOverlapData->mpNextBackWin = NULL;
+ mpWindowImpl->mpOverlapData->mpNextBackWin = nullptr;
}
}
diff --git a/vcl/source/window/cmdevt.cxx b/vcl/source/window/cmdevt.cxx
index 803d7e24f64a..1af5431a5c66 100644
--- a/vcl/source/window/cmdevt.cxx
+++ b/vcl/source/window/cmdevt.cxx
@@ -32,7 +32,7 @@ CommandExtTextInputData::CommandExtTextInputData( const OUString& rText,
memcpy( mpTextAttr, pTextAttr, maText.getLength()*sizeof(sal_uInt16) );
}
else
- mpTextAttr = NULL;
+ mpTextAttr = nullptr;
mnCursorPos = nCursorPos;
mnCursorFlags = nCursorFlags;
mbOnlyCursor = bOnlyCursor;
@@ -47,7 +47,7 @@ CommandExtTextInputData::CommandExtTextInputData( const CommandExtTextInputData&
memcpy( mpTextAttr, rData.mpTextAttr, maText.getLength()*sizeof(sal_uInt16) );
}
else
- mpTextAttr = NULL;
+ mpTextAttr = nullptr;
mnCursorPos = rData.mnCursorPos;
mnCursorFlags = rData.mnCursorFlags;
mbOnlyCursor = rData.mbOnlyCursor;
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 5a01d10e676a..738ff0d3418c 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -175,7 +175,7 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool bRestore )
pWindow = Application::GetFocusWindow();
if ( !pWindow || (pWindow->mpWindowImpl->mpCursor != this) || pWindow->mpWindowImpl->mbInPaint
|| !pWindow->mpWindowImpl->mpFrameData->mbHasFocus )
- pWindow = NULL;
+ pWindow = nullptr;
}
if ( pWindow )
@@ -216,7 +216,7 @@ bool vcl::Cursor::ImplDoHide( bool bSuspend )
if ( !bSuspend )
{
mpData->maTimer.Stop();
- mpData->mpWindow = NULL;
+ mpData->mpWindow = nullptr;
}
}
return bWasCurVisible;
@@ -269,8 +269,8 @@ IMPL_LINK_NOARG_TYPED(vcl::Cursor, ImplTimerHdl, Timer *, void)
vcl::Cursor::Cursor()
{
- mpData = NULL;
- mpWindow = NULL;
+ mpData = nullptr;
+ mpWindow = nullptr;
mnSlant = 0;
mnOrientation = 0;
mnDirection = CursorDirection::NONE;
@@ -282,8 +282,8 @@ vcl::Cursor::Cursor( const Cursor& rCursor ) :
maSize( rCursor.maSize ),
maPos( rCursor.maPos )
{
- mpData = NULL;
- mpWindow = NULL;
+ mpData = nullptr;
+ mpWindow = nullptr;
mnSlant = rCursor.mnSlant;
mnOrientation = rCursor.mnOrientation;
mnDirection = rCursor.mnDirection;
diff --git a/vcl/source/window/debug.cxx b/vcl/source/window/debug.cxx
index e1d48fc876e7..baa370027022 100644
--- a/vcl/source/window/debug.cxx
+++ b/vcl/source/window/debug.cxx
@@ -41,7 +41,7 @@ const char* ImplDbgCheckWindow( const void* pObj )
pChild = pChild->mpWindowImpl->mpNext;
}
- return NULL;
+ return nullptr;
}
#endif
diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index 11d17daa8f2a..e57b06b35db8 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -49,7 +49,7 @@ vcl::Window *DebugEventInjector::ChooseWindow()
if (!(pParent = Application::GetTopWindow( nIdx )))
pParent = static_cast<vcl::Window *>(Application::GetAppWindow());
}
- assert (pParent != NULL);
+ assert (pParent != nullptr);
std::vector< vcl::Window *> aChildren;
pParent->CollectChildren( aChildren );
@@ -104,7 +104,7 @@ void DebugEventInjector::InjectMenuEvent()
sal_uInt16 nEvent = nEvents[ (int)(getRandom() * SAL_N_ELEMENTS( nEvents )) ];
SalMenuEvent aEvent = aIds[ getRandom() * aIds.size() ];
- bool bHandled = ImplWindowFrameProc( pSysWin, NULL, nEvent, &aEvent);
+ bool bHandled = ImplWindowFrameProc( pSysWin, nullptr, nEvent, &aEvent);
SAL_INFO( "vcl.debugevent",
"Injected menu event " << aEvent.mpMenu
@@ -160,14 +160,14 @@ void DebugEventInjector::InjectTextEvent()
if( getRandom() < 0.05 ) // modifier
aKeyEvent.mnCode |= (sal_uInt16)( getRandom() * KEY_MODIFIERS_MASK ) & KEY_MODIFIERS_MASK;
- bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, &aKeyEvent);
+ bool bHandled = ImplWindowFrameProc( pWindow, nullptr, SALEVENT_KEYINPUT, &aKeyEvent);
SAL_INFO( "vcl.debugevent",
"Injected key 0x" << std::hex << (int) aKeyEvent.mnCode << std::dec
<< " -> " << bHandled
<< " win " << pWindow );
- ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYUP, &aKeyEvent );
+ ImplWindowFrameProc( pWindow, nullptr, SALEVENT_KEYUP, &aKeyEvent );
}
/*
@@ -242,13 +242,13 @@ void DebugEventInjector::InjectKeyNavEdit()
aKeyEvent.mnCharCode = 0x0; // hopefully unused.
- bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, &aKeyEvent );
+ bool bHandled = ImplWindowFrameProc( pWindow, nullptr, SALEVENT_KEYINPUT, &aKeyEvent );
SAL_INFO( "vcl.debugevent",
"Injected edit / move key 0x" << std::hex << (int) aKeyEvent.mnCode << std::dec
<< " -> " << bHandled
<< " win " << pWindow );
- ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYUP, &aKeyEvent );
+ ImplWindowFrameProc( pWindow, nullptr, SALEVENT_KEYUP, &aKeyEvent );
}
void DebugEventInjector::Invoke()
@@ -269,12 +269,12 @@ DebugEventInjector *DebugEventInjector::getCreate()
sal_uInt32 nEvents;
const char *pEvents = getenv("VCL_EVENT_INJECTION");
if (!pEvents)
- return NULL;
+ return nullptr;
nEvents = OString( pEvents ).toUInt32();
if (nEvents > 0)
return new DebugEventInjector( nEvents );
else
- return NULL;
+ return nullptr;
}
#endif // OSL_DEBUG_LEVEL > 0
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 376c7bf2bb4e..538c6b1d9573 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -623,7 +623,7 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
const StyleSettings& rStyleSettings, DrawFrameStyle nStyle, DrawFrameFlags nFlags )
{
- vcl::Window *const pWin = (pDev->GetOutDevType()==OUTDEV_WINDOW) ? static_cast<vcl::Window*>(pDev) : NULL;
+ vcl::Window *const pWin = (pDev->GetOutDevType()==OUTDEV_WINDOW) ? static_cast<vcl::Window*>(pDev) : nullptr;
const bool bMenuStyle(nFlags & DrawFrameFlags::Menu);
@@ -683,7 +683,7 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
if ( bNoDraw )
{
- ImplDrawDPILineRect( pDev, rRect, NULL, bRound );
+ ImplDrawDPILineRect( pDev, rRect, nullptr, bRound );
}
else
{
@@ -1055,7 +1055,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
{
Point aStart( rStart ), aStop( rStop );
const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
- vcl::Window *const pWin = (mpOutDev->GetOutDevType()==OUTDEV_WINDOW) ? static_cast<vcl::Window*>(mpOutDev.get()) : NULL;
+ vcl::Window *const pWin = (mpOutDev->GetOutDevType()==OUTDEV_WINDOW) ? static_cast<vcl::Window*>(mpOutDev.get()) : nullptr;
if(pWin)
{
ControlPart nPart = ( bVertical ? PART_SEPARATOR_VERT : PART_SEPARATOR_HORZ );
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index ea24882f7bba..c98270cf38e8 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -135,9 +135,9 @@ vcl::Window * nextLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi
{
vcl::Window *pParent = pLastChild->GetParent();
if (!pParent)
- return NULL;
+ return nullptr;
if (pParent == pTopLevel)
- return NULL;
+ return nullptr;
pLastChild = pParent;
pChild = pParent->GetWindow(GetWindowType::Next);
}
@@ -161,9 +161,9 @@ vcl::Window * prevLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi
{
vcl::Window *pParent = pLastChild->GetParent();
if (!pParent)
- return NULL;
+ return nullptr;
if (pParent == pTopLevel)
- return NULL;
+ return nullptr;
pLastChild = pParent;
pChild = pParent->GetWindow(GetWindowType::Prev);
}
@@ -237,7 +237,7 @@ void ImplWindowAutoMnemonic( vcl::Window* pWindow )
static VclButtonBox* getActionArea(Dialog *pDialog)
{
- VclButtonBox *pButtonBox = NULL;
+ VclButtonBox *pButtonBox = nullptr;
if (pDialog->isLayoutEnabled())
{
vcl::Window *pBox = pDialog->GetWindow(GetWindowType::FirstChild);
@@ -276,7 +276,7 @@ static PushButton* ImplGetDefaultButton( Dialog* pDialog )
pChild = pChild->GetWindow( GetWindowType::Next );
}
- return NULL;
+ return nullptr;
}
static PushButton* ImplGetOKButton( Dialog* pDialog )
@@ -290,7 +290,7 @@ static PushButton* ImplGetOKButton( Dialog* pDialog )
pChild = pChild->GetWindow( GetWindowType::Next );
}
- return NULL;
+ return nullptr;
}
static PushButton* ImplGetCancelButton( Dialog* pDialog )
@@ -305,7 +305,7 @@ static PushButton* ImplGetCancelButton( Dialog* pDialog )
pChild = pChild->GetWindow( GetWindowType::Next );
}
- return NULL;
+ return nullptr;
}
static void ImplMouseAutoPos( Dialog* pDialog )
@@ -342,7 +342,7 @@ struct DialogImpl
void Dialog::ImplInitDialogData()
{
mpWindowImpl->mbDialog = true;
- mpPrevExecuteDlg = NULL;
+ mpPrevExecuteDlg = nullptr;
mbInExecute = false;
mbOldSaveBack = false;
mbInClose = false;
@@ -365,7 +365,7 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
nStyle |= WB_SYSTEMWINDOW;
if (eFlag == InitFlag::NoParent)
- pParent = NULL;
+ pParent = nullptr;
else if (!pParent) // parent is NULL: get the default Dialog parent
{
pParent = Application::GetDefDialogParent();
@@ -402,7 +402,7 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
if ( (nStyle & (WB_BORDER | WB_NOBORDER | WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE)) == WB_BORDER )
{
VclPtrInstance<ImplBorderWindow> pBorderWin( pParent, nStyle, BORDERWINDOW_STYLE_FRAME );
- SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, NULL );
+ SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, nullptr );
pBorderWin->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
mpWindowImpl->mpBorderWindow = pBorderWin;
@@ -412,7 +412,7 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
{
mpWindowImpl->mbFrame = true;
mpWindowImpl->mbOverlapWin = true;
- SystemWindow::ImplInit( pParent, (nStyle & (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_CLOSEABLE | WB_STANDALONE)) | WB_CLOSEABLE, NULL );
+ SystemWindow::ImplInit( pParent, (nStyle & (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_CLOSEABLE | WB_STANDALONE)) | WB_CLOSEABLE, nullptr );
// Now set all style bits
mpWindowImpl->mnStyle = nStyle;
}
@@ -420,7 +420,7 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
else
{
VclPtrInstance<ImplBorderWindow> pBorderWin( pParent, nStyle, BORDERWINDOW_STYLE_OVERLAP | BORDERWINDOW_STYLE_BORDER );
- SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, NULL );
+ SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, nullptr );
pBorderWin->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
mpWindowImpl->mpBorderWindow = pBorderWin;
@@ -508,7 +508,7 @@ OUString VclBuilderContainer::getUIRootDir()
void Dialog::doDeferredInit(WinBits nBits)
{
VclPtr<vcl::Window> pParent = mpDialogParent;
- mpDialogParent = NULL;
+ mpDialogParent = nullptr;
ImplInit(pParent, nBits, mnInitFlag);
mbIsDefferedInit = false;
}
@@ -572,7 +572,7 @@ Dialog::~Dialog()
void Dialog::dispose()
{
delete mpDialogImpl;
- mpDialogImpl = NULL;
+ mpDialogImpl = nullptr;
mpPrevExecuteDlg.clear();
mpActionArea.clear();
mpContentArea.clear();
@@ -955,7 +955,7 @@ void Dialog::EndDialog( long nResult )
mpPrevExecuteDlg->GrabFocus();
}
}
- mpPrevExecuteDlg = NULL;
+ mpPrevExecuteDlg = nullptr;
Hide();
EnableSaveBackground( mbOldSaveBack );
@@ -1092,7 +1092,7 @@ void Dialog::GrabFocusToFirstControl()
// find focus control, even if the dialog has focus
if ( HasFocus() )
- pFocusControl = NULL;
+ pFocusControl = nullptr;
else
{
// prefer a child window which had focus before
@@ -1174,7 +1174,7 @@ bool Dialog::set_property(const OString &rKey, const OString &rValue)
}
VclBuilderContainer::VclBuilderContainer()
- : m_pUIBuilder(NULL)
+ : m_pUIBuilder(nullptr)
{
}
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 097f3ef95e8e..11f3c3c96fbd 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -70,8 +70,8 @@ static vcl::Window* ImplGetTopParentOfTabHierarchy( vcl::Window* pParent )
static vcl::Window* ImplGetSubChildWindow( vcl::Window* pParent, sal_uInt16 n, sal_uInt16& nIndex )
{
- vcl::Window* pTabPage = NULL;
- vcl::Window* pFoundWindow = NULL;
+ vcl::Window* pTabPage = nullptr;
+ vcl::Window* pFoundWindow = nullptr;
vcl::Window* pWindow = firstLogicalChildOfParent(pParent);
vcl::Window* pNextWindow = pWindow;
@@ -86,7 +86,7 @@ static vcl::Window* ImplGetSubChildWindow( vcl::Window* pParent, sal_uInt16 n, s
if ( pTabPage )
{
pFoundWindow = ImplGetSubChildWindow( pTabPage, n, nIndex );
- pTabPage = NULL;
+ pTabPage = nullptr;
}
else
{
@@ -189,7 +189,7 @@ vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, GetDlgWindowType nType
DBG_ASSERT( (nIndex >= nFormStart) && (nIndex <= nFormEnd),
"Window::ImplGetDlgWindow() - nIndex not in Form" );
- vcl::Window* pWindow = NULL;
+ vcl::Window* pWindow = nullptr;
sal_uInt16 i;
sal_uInt16 nTemp;
sal_uInt16 nStartIndex;
@@ -275,7 +275,7 @@ vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, GetDlgWindowType nType
}
if ( !(pWindow->GetStyle() & WB_TABSTOP) )
- pWindow = NULL;
+ pWindow = nullptr;
}
}
}
@@ -292,8 +292,8 @@ vcl::Window* ImplFindDlgCtrlWindow( vcl::Window* pParent, vcl::Window* pWindow,
sal_uInt16& rFormStart, sal_uInt16& rFormEnd )
{
vcl::Window* pSWindow;
- vcl::Window* pSecondWindow = NULL;
- vcl::Window* pTempWindow = NULL;
+ vcl::Window* pSecondWindow = nullptr;
+ vcl::Window* pTempWindow = nullptr;
sal_uInt16 i;
sal_uInt16 nSecond_i = 0;
sal_uInt16 nFormStart = 0;
@@ -303,7 +303,7 @@ vcl::Window* ImplFindDlgCtrlWindow( vcl::Window* pParent, vcl::Window* pWindow,
// find focus window in the child list
vcl::Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, false );
- if( pWindow == NULL )
+ if( pWindow == nullptr )
pWindow = pSWindow;
while ( pSWindow )
@@ -325,14 +325,14 @@ vcl::Window* ImplFindDlgCtrlWindow( vcl::Window* pParent, vcl::Window* pWindow,
pSWindow = ImplGetNextWindow( pParent, i, i, false );
if ( !i )
- pSWindow = NULL;
+ pSWindow = nullptr;
}
if ( !pSWindow )
{
// Window not found; we cannot handle it
if ( !pSecondWindow )
- return NULL;
+ return nullptr;
else
{
pSWindow = pSecondWindow;
@@ -445,7 +445,7 @@ vcl::Window* ImplFindAccelWindow( vcl::Window* pParent, sal_uInt16& rIndex, sal_
sal_uInt16 nChildFormEnd;
// get form start and end
- ::ImplFindDlgCtrlWindow( pWindow, NULL,
+ ::ImplFindDlgCtrlWindow( pWindow, nullptr,
nChildIndex, nChildFormStart, nChildFormEnd );
vcl::Window* pAccelWin = ImplFindAccelWindow( pWindow, nChildIndex, cCharCode,
nChildFormStart, nChildFormEnd,
@@ -467,7 +467,7 @@ vcl::Window* ImplFindAccelWindow( vcl::Window* pParent, sal_uInt16& rIndex, sal_
pWindow = ImplGetChildWindow( pParent, nFormStart, i, bCheckEnable );
}
- return NULL;
+ return nullptr;
}
namespace vcl {
@@ -619,7 +619,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
}
while ( pTempWindow );
- pButtonWindow = NULL;
+ pButtonWindow = nullptr;
if ( nKeyCode == KEY_RETURN )
{
@@ -634,7 +634,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
pButtonWindow = ImplGetNextWindow( this, iButton, iButton, true );
if ( (iButton <= iButtonStart) || (iButton > nFormEnd) )
- pButtonWindow = NULL;
+ pButtonWindow = nullptr;
}
if ( bKeyInput && !pButtonWindow && (nDlgCtrlFlags & DialogControlFlags::Return) )
@@ -679,7 +679,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
pTempWindow = ImplGetDlgWindow( i, nType, nFormStart, nFormEnd, &nNewIndex );
}
if ( (i <= iStart) || (i > nFormEnd) )
- pTempWindow = NULL;
+ pTempWindow = nullptr;
}
// if this is the same window, simulate a Get/LoseFocus,
// in case AROUND is being processed
@@ -709,7 +709,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
pButtonWindow = ImplGetNextWindow( this, iButton, iButton, true );
if ( (iButton <= iButtonStart) || (iButton > nFormEnd) )
- pButtonWindow = NULL;
+ pButtonWindow = nullptr;
}
if ( bKeyInput && mpWindowImpl->mpDlgCtrlDownWindow )
@@ -717,7 +717,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
if ( mpWindowImpl->mpDlgCtrlDownWindow.get() != pButtonWindow )
{
static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow.get())->SetPressed( false );
- mpWindowImpl->mpDlgCtrlDownWindow = NULL;
+ mpWindowImpl->mpDlgCtrlDownWindow = nullptr;
return true;
}
}
@@ -738,10 +738,10 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
if ( aKeyCode.IsMod1() )
{
// search group
- vcl::Window* pFormularFirstWindow = NULL;
- vcl::Window* pLastFormularFirstWindow = NULL;
+ vcl::Window* pFormularFirstWindow = nullptr;
+ vcl::Window* pLastFormularFirstWindow = nullptr;
pTempWindow = ImplGetChildWindow( this, 0, iTemp, false );
- vcl::Window* pPrevFirstFormularFirstWindow = NULL;
+ vcl::Window* pPrevFirstFormularFirstWindow = nullptr;
vcl::Window* pFirstFormularFirstWindow = pTempWindow;
while ( pTempWindow )
{
@@ -765,7 +765,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
pTempWindow = ImplGetNextWindow( this, iTemp, iTemp, false );
if ( !iTemp )
- pTempWindow = NULL;
+ pTempWindow = nullptr;
}
if ( bFormular )
@@ -929,7 +929,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
if ( mpWindowImpl->mpDlgCtrlDownWindow && (mpWindowImpl->mpDlgCtrlDownWindow.get() != pButtonWindow) )
{
static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow.get())->SetPressed( false );
- mpWindowImpl->mpDlgCtrlDownWindow = NULL;
+ mpWindowImpl->mpDlgCtrlDownWindow = nullptr;
}
static_cast<PushButton*>(pButtonWindow)->SetPressed( true );
@@ -937,7 +937,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
}
else if ( mpWindowImpl->mpDlgCtrlDownWindow.get() == pButtonWindow )
{
- mpWindowImpl->mpDlgCtrlDownWindow = NULL;
+ mpWindowImpl->mpDlgCtrlDownWindow = nullptr;
static_cast<PushButton*>(pButtonWindow)->SetPressed( false );
static_cast<PushButton*>(pButtonWindow)->Click();
}
@@ -1000,8 +1000,8 @@ if ( !pDlgCtrlParent || (GetStyle() & WB_NODIALOGCONTROL) || ((pDlgCtrlParent->G
static void ImplDlgCtrlUpdateDefButton( vcl::Window* pParent, vcl::Window* pFocusWindow,
bool bGetFocus )
{
- PushButton* pOldDefButton = NULL;
- PushButton* pNewDefButton = NULL;
+ PushButton* pOldDefButton = nullptr;
+ PushButton* pNewDefButton = nullptr;
vcl::Window* pSWindow;
sal_uInt16 i;
sal_uInt16 nFormStart;
@@ -1031,7 +1031,7 @@ static void ImplDlgCtrlUpdateDefButton( vcl::Window* pParent, vcl::Window* pFocu
pSWindow = ImplGetNextWindow( pParent, i, i, false );
if ( !i || (i > nFormEnd) )
- pSWindow = NULL;
+ pSWindow = nullptr;
}
if ( !bGetFocus )
@@ -1039,10 +1039,10 @@ static void ImplDlgCtrlUpdateDefButton( vcl::Window* pParent, vcl::Window* pFocu
sal_uInt16 nDummy;
vcl::Window* pNewFocusWindow = Application::GetFocusWindow();
if ( !pNewFocusWindow || !pParent->ImplIsWindowOrChild( pNewFocusWindow ) )
- pNewDefButton = NULL;
+ pNewDefButton = nullptr;
else if ( !::ImplFindDlgCtrlWindow( pParent, pNewFocusWindow, i, nDummy, nDummy ) ||
(i < nFormStart) || (i > nFormEnd) )
- pNewDefButton = NULL;
+ pNewDefButton = nullptr;
}
if ( pOldDefButton != pNewDefButton )
@@ -1059,7 +1059,7 @@ void Window::ImplDlgCtrlFocusChanged( vcl::Window* pWindow, bool bGetFocus )
if ( mpWindowImpl->mpDlgCtrlDownWindow && !bGetFocus )
{
static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow.get())->SetPressed( false );
- mpWindowImpl->mpDlgCtrlDownWindow = NULL;
+ mpWindowImpl->mpDlgCtrlDownWindow = nullptr;
}
ImplDlgCtrlUpdateDefButton( this, pWindow, bGetFocus );
@@ -1077,12 +1077,12 @@ vcl::Window* Window::ImplFindDlgCtrlWindow( vcl::Window* pWindow )
vcl::Window* Window::GetParentLabelFor( const vcl::Window* ) const
{
- return NULL;
+ return nullptr;
}
vcl::Window* Window::GetParentLabeledBy( const vcl::Window* ) const
{
- return NULL;
+ return nullptr;
}
KeyEvent Window::GetActivationKey() const
diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx
index 33dfbc44366c..a436bdefa002 100644
--- a/vcl/source/window/dndevdis.cxx
+++ b/vcl/source/window/dndevdis.cxx
@@ -35,14 +35,14 @@ using namespace ::com::sun::star::datatransfer::dnd;
// DNDEventDispatcher::DNDEventDispatcher
DNDEventDispatcher::DNDEventDispatcher( vcl::Window * pTopWindow ):
m_pTopWindow( pTopWindow ),
- m_pCurrentWindow( NULL )
+ m_pCurrentWindow( nullptr )
{
}
// DNDEventDispatcher::~DNDEventDispatcher
DNDEventDispatcher::~DNDEventDispatcher()
{
- designate_currentwindow(NULL);
+ designate_currentwindow(nullptr);
}
vcl::Window* DNDEventDispatcher::findTopLevelWindow(Point location)
@@ -55,7 +55,7 @@ vcl::Window* DNDEventDispatcher::findTopLevelWindow(Point location)
m_pTopWindow->ImplMirrorFramePos( location );
vcl::Window * pChildWindow = m_pTopWindow->ImplFindWindow( location );
- if( NULL == pChildWindow )
+ if( nullptr == pChildWindow )
pChildWindow = m_pTopWindow;
while( pChildWindow->ImplGetClientWindow() )
@@ -74,7 +74,7 @@ IMPL_LINK_TYPED(DNDEventDispatcher, WindowEventListener, VclWindowEvent&, rEvent
{
if (rEvent.GetId() == VCLEVENT_OBJECT_DYING)
{
- designate_currentwindow(NULL);
+ designate_currentwindow(nullptr);
}
}
@@ -120,7 +120,7 @@ void SAL_CALL DNDEventDispatcher::drop( const DropTargetDropEvent& dtde )
}
// this is a drop -> no further drag overs
- designate_currentwindow(NULL);
+ designate_currentwindow(nullptr);
m_aDataFlavorList.realloc( 0 );
}
@@ -160,7 +160,7 @@ void SAL_CALL DNDEventDispatcher::dragExit( const DropTargetEvent& /*dte*/ )
fireDragExitEvent( m_pCurrentWindow );
// reset member values
- designate_currentwindow(NULL);
+ designate_currentwindow(nullptr);
m_aDataFlavorList.realloc( 0 );
}
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index 41330fb1326e..6ea846de11f3 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -47,7 +47,7 @@ DockingAreaWindow::ImplData::~ImplData()
DockingAreaWindow::DockingAreaWindow( vcl::Window* pParent ) :
Window( WINDOW_DOCKINGAREA )
{
- ImplInit( pParent, WB_CLIPCHILDREN|WB_3DLOOK, NULL );
+ ImplInit( pParent, WB_CLIPCHILDREN|WB_3DLOOK, nullptr );
mpImplData = new ImplData;
}
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 05a08f599ca7..b3fc00522b08 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -75,7 +75,7 @@ ImplDockFloatWin2::ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits,
mpDockWin( pDockingWin ),
mnLastTicks( tools::Time::GetSystemTicks() ),
mbInMove( false ),
- mnLastUserEvent( 0 )
+ mnLastUserEvent( nullptr )
{
// copy state of DockingWindow
if ( pDockingWin )
@@ -154,7 +154,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockFloatWin2, EndDockTimerHdl, Idle *, void)
IMPL_LINK_NOARG_TYPED(ImplDockFloatWin2, DockingHdl, void*, void)
{
// called during move of a floating window
- mnLastUserEvent = 0;
+ mnLastUserEvent = nullptr;
vcl::Window *pDockingArea = mpDockWin->GetWindow()->GetParent();
PointerState aState = pDockingArea->GetPointerState();
@@ -242,7 +242,7 @@ void ImplDockFloatWin2::Move()
* last Move message.
*/
if( ! mnLastUserEvent )
- mnLastUserEvent = Application::PostUserEvent( LINK( this, ImplDockFloatWin2, DockingHdl ), NULL, true );
+ mnLastUserEvent = Application::PostUserEvent( LINK( this, ImplDockFloatWin2, DockingHdl ), nullptr, true );
}
void ImplDockFloatWin2::Resize()
@@ -314,7 +314,7 @@ ImplDockingWindowWrapper* DockingManager::GetDockingWindowWrapper( const vcl::Wi
else
++p;
}
- return NULL;
+ return nullptr;
}
bool DockingManager::IsDockable( const vcl::Window *pWindow )
@@ -325,7 +325,7 @@ bool DockingManager::IsDockable( const vcl::Window *pWindow )
if( pWindow->HasDockingHandler() )
return true;
*/
- return (pWrapper != NULL);
+ return (pWrapper != nullptr);
}
bool DockingManager::IsFloating( const vcl::Window *pWindow )
@@ -521,7 +521,7 @@ ImplPopupFloatWin::~ImplPopupFloatWin()
void ImplPopupFloatWin::dispose()
{
- mpDockingWin = NULL;
+ mpDockingWin = nullptr;
FloatingWindow::dispose();
}
@@ -794,8 +794,8 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt )
ImplDockingWindowWrapper::ImplDockingWindowWrapper( const vcl::Window *pWindow )
: mpDockingWindow(const_cast<vcl::Window*>(pWindow))
- , mpFloatWin(NULL)
- , mpOldBorderWin(NULL)
+ , mpFloatWin(nullptr)
+ , mpOldBorderWin(nullptr)
, mpParent(pWindow->GetParent())
, maMaxOutSize( SHRT_MAX, SHRT_MAX )
, mnTrackX(0)
@@ -1109,7 +1109,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent );
mpOldBorderWin = GetWindow()->GetWindow( GetWindowType::Border );
if( mpOldBorderWin.get() == GetWindow() )
- mpOldBorderWin = NULL; // no border window found
+ mpOldBorderWin = nullptr; // no border window found
// the new parent for popup mode
VclPtrInstance<ImplPopupFloatWin> pWin( mpParent, this, bool(nFlags & FloatWinPopupFlags::AllowTearOff) );
@@ -1119,7 +1119,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
pWin->SetOutputSizePixel( GetWindow()->GetSizePixel() );
- GetWindow()->mpWindowImpl->mpBorderWindow = NULL;
+ GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
GetWindow()->mpWindowImpl->mnLeftBorder = 0;
GetWindow()->mpWindowImpl->mnTopBorder = 0;
GetWindow()->mpWindowImpl->mnRightBorder = 0;
@@ -1168,7 +1168,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockingWindowWrapper, PopupModeEnd, FloatingWindow*, v
// before deleting change parent back, so we can delete the floating window alone
vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent );
- GetWindow()->mpWindowImpl->mpBorderWindow = NULL;
+ GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
if ( mpOldBorderWin )
{
GetWindow()->SetParent( mpOldBorderWin );
@@ -1216,7 +1216,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode )
vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent );
mpOldBorderWin = GetWindow()->GetWindow( GetWindowType::Border );
if( mpOldBorderWin == mpDockingWindow )
- mpOldBorderWin = NULL; // no border window found
+ mpOldBorderWin = nullptr; // no border window found
ImplDockFloatWin2* pWin =
VclPtr<ImplDockFloatWin2>::Create(
@@ -1228,7 +1228,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode )
: mnFloatBits,
this );
- GetWindow()->mpWindowImpl->mpBorderWindow = NULL;
+ GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
GetWindow()->mpWindowImpl->mnLeftBorder = 0;
GetWindow()->mpWindowImpl->mnTopBorder = 0;
GetWindow()->mpWindowImpl->mnRightBorder = 0;
@@ -1281,7 +1281,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode )
maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel();
vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent ); //mpWindowImpl->mpRealParent;
- GetWindow()->mpWindowImpl->mpBorderWindow = NULL;
+ GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
if ( mpOldBorderWin )
{
GetWindow()->SetParent( mpOldBorderWin );
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 083fd0e9a4bf..2f0fc5b57d9f 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -48,7 +48,7 @@ public:
DockingWindow::ImplData::ImplData()
{
- mpParent = NULL;
+ mpParent = nullptr;
maMaxOutSize = Size( SHRT_MAX, SHRT_MAX );
}
@@ -91,7 +91,7 @@ ImplDockFloatWin::ImplDockFloatWin( vcl::Window* pParent, WinBits nWinBits,
mpDockWin( pDockingWin ),
mnLastTicks( tools::Time::GetSystemTicks() ),
mbInMove( false ),
- mnLastUserEvent( 0 )
+ mnLastUserEvent( nullptr )
{
// copy settings of DockingWindow
if ( pDockingWin )
@@ -157,7 +157,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockFloatWin, DockingHdl, void*, void)
{
PointerState aState = mpDockWin->GetParent()->GetPointerState();
- mnLastUserEvent = 0;
+ mnLastUserEvent = nullptr;
if( mpDockWin->IsDockable() &&
(tools::Time::GetSystemTicks() - mnLastTicks > 500) &&
( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) &&
@@ -208,7 +208,7 @@ void ImplDockFloatWin::Move()
* last Move message.
*/
if( ! mnLastUserEvent )
- mnLastUserEvent = Application::PostUserEvent( LINK( this, ImplDockFloatWin, DockingHdl ), NULL, true );
+ mnLastUserEvent = Application::PostUserEvent( LINK( this, ImplDockFloatWin, DockingHdl ), nullptr, true );
}
void ImplDockFloatWin::Resize()
@@ -305,8 +305,8 @@ bool DockingWindow::ImplStartDocking( const Point& rPos )
void DockingWindow::ImplInitDockingWindowData()
{
mpWindowImpl->mbDockWin = true;
- mpFloatWin = NULL;
- mpOldBorderWin = NULL;
+ mpFloatWin = nullptr;
+ mpOldBorderWin = nullptr;
mpImplData = new ImplData;
mnTrackX = 0;
mnTrackY = 0;
@@ -333,7 +333,7 @@ void DockingWindow::ImplInitDockingWindowData()
mbIsDefferedInit = false;
mbIsCalculatingInitialLayoutSize = false;
mbInitialLayoutDone = false;
- mpDialogParent = NULL;
+ mpDialogParent = nullptr;
//To-Do, reuse maResizeTimer
maLayoutIdle.SetPriority(SchedulerPriority::RESIZE);
@@ -352,7 +352,7 @@ void DockingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
if ( nStyle & WB_DOCKBORDER )
nStyle |= WB_BORDER;
- Window::ImplInit( pParent, nStyle, NULL );
+ Window::ImplInit( pParent, nStyle, nullptr );
ImplInitSettings();
}
@@ -444,7 +444,7 @@ DockingWindow::DockingWindow( vcl::Window* pParent, const ResId& rResId ) :
void DockingWindow::doDeferredInit(WinBits nBits)
{
vcl::Window *pParent = mpDialogParent;
- mpDialogParent = NULL;
+ mpDialogParent = nullptr;
ImplInit(pParent, nBits);
mbIsDefferedInit = false;
}
@@ -479,7 +479,7 @@ void DockingWindow::dispose()
SetFloatingMode(false);
}
delete mpImplData;
- mpImplData = NULL;
+ mpImplData = nullptr;
mpFloatWin.clear();
mpOldBorderWin.clear();
mpDialogParent.clear();
@@ -805,7 +805,7 @@ void DockingWindow::SetFloatingMode( bool bFloatMode )
mnFloatBits & ( WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) ? mnFloatBits | WB_SYSTEMWINDOW : mnFloatBits,
this );
mpFloatWin = pWin;
- mpWindowImpl->mpBorderWindow = NULL;
+ mpWindowImpl->mpBorderWindow = nullptr;
mpWindowImpl->mnLeftBorder = 0;
mpWindowImpl->mnTopBorder = 0;
mpWindowImpl->mnRightBorder = 0;
@@ -866,7 +866,7 @@ void DockingWindow::SetFloatingMode( bool bFloatMode )
mpImplData->maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel();
vcl::Window* pRealParent = mpWindowImpl->mpRealParent;
- mpWindowImpl->mpBorderWindow = NULL;
+ mpWindowImpl->mpBorderWindow = nullptr;
if ( mpOldBorderWin )
{
SetParent( mpOldBorderWin );
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 548e8704054c..c31aa63e1fe4 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -316,7 +316,7 @@ ImplSVEvent * Window::PostUserEvent( const Link<void*,void>& rLink, void* pCalle
{
ImplRemoveDel( &(pSVEvent->maDelData) );
delete pSVEvent;
- pSVEvent = 0;
+ pSVEvent = nullptr;
}
return pSVEvent;
}
@@ -331,7 +331,7 @@ void Window::RemoveUserEvent( ImplSVEvent * nUserEvent )
if ( nUserEvent->mpWindow )
{
nUserEvent->mpWindow->ImplRemoveDel( &(nUserEvent->maDelData) );
- nUserEvent->mpWindow = NULL;
+ nUserEvent->mpWindow = nullptr;
}
nUserEvent->mbCall = false;
@@ -507,7 +507,7 @@ void Window::ImplCallMove()
if( mpWindowImpl->mbFrame )
{
// update frame position
- SalFrame *pParentFrame = NULL;
+ SalFrame *pParentFrame = nullptr;
vcl::Window *pParent = ImplGetParent();
while( pParent )
{
@@ -581,7 +581,7 @@ void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow,
pLastRealWindow->Activate();
}
}
- pSVData->maWinData.mpLastDeacWin = NULL;
+ pSVData->maWinData.mpLastDeacWin = nullptr;
}
}
@@ -623,8 +623,8 @@ void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow,
NotifyEvent::NotifyEvent()
{
- mpWindow = NULL;
- mpData = NULL;
+ mpWindow = nullptr;
+ mpData = nullptr;
mnEventType = MouseNotifyEvent::NONE;
mnRetValue = 0;
}
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index c470f754d004..b5c038ccdb53 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -45,7 +45,7 @@ public:
FloatingWindow::ImplData::ImplData()
{
- mpBox = NULL;
+ mpBox = nullptr;
}
FloatingWindow::ImplData::~ImplData()
@@ -77,7 +77,7 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
mpWindowImpl->mbOverlapWin = true;
nStyle |= WB_DIALOGCONTROL;
- SystemWindow::ImplInit(pParent, nStyle, NULL);
+ SystemWindow::ImplInit(pParent, nStyle, nullptr);
}
else
{
@@ -92,7 +92,7 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
// nFloatWinStyle |= WB_CLOSEABLE;
mpWindowImpl->mbFrame = true;
mpWindowImpl->mbOverlapWin = true;
- SystemWindow::ImplInit(pParent, nFloatWinStyle & ~WB_BORDER, NULL);
+ SystemWindow::ImplInit(pParent, nFloatWinStyle & ~WB_BORDER, nullptr);
}
else
{
@@ -110,7 +110,7 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
nStyle |= WB_CLOSEABLE; // make undecorated floaters closeable
}
pBorderWin = VclPtr<ImplBorderWindow>::Create(pParent, nStyle, nBorderStyle);
- SystemWindow::ImplInit(pBorderWin, nStyle & ~WB_BORDER, NULL);
+ SystemWindow::ImplInit(pBorderWin, nStyle & ~WB_BORDER, nullptr);
pBorderWin->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder(mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder,
mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder);
@@ -121,9 +121,9 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
SetActivateMode( ActivateModeFlags::NONE );
- mpNextFloat = NULL;
- mpFirstPopupModeWin = NULL;
- mnPostId = 0;
+ mpNextFloat = nullptr;
+ mpFirstPopupModeWin = nullptr;
+ mnPostId = nullptr;
mnTitle = (nStyle & (WB_MOVEABLE | WB_POPUP)) ? FloatWinTitleType::Normal : FloatWinTitleType::NONE;
mnOldTitle = mnTitle;
mnPopupModeFlags = FloatWinPopupFlags::NONE;
@@ -158,10 +158,10 @@ FloatingWindow::FloatingWindow(vcl::Window* pParent, WinBits nStyle) :
FloatingWindow::FloatingWindow(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame)
: SystemWindow(WINDOW_FLOATINGWINDOW)
- , mpNextFloat(0)
- , mpFirstPopupModeWin(0)
- , mpImplData(0)
- , mnPostId(0)
+ , mpNextFloat(nullptr)
+ , mpFirstPopupModeWin(nullptr)
+ , mpImplData(nullptr)
+ , mnPostId(nullptr)
, mnPopupModeFlags(FloatWinPopupFlags::NONE)
, mnTitle(FloatWinTitleType::Unknown)
, mnOldTitle(FloatWinTitleType::Unknown)
@@ -181,7 +181,7 @@ FloatingWindow::FloatingWindow(vcl::Window* pParent, const OString& rID, const O
void FloatingWindow::doDeferredInit(WinBits nBits)
{
vcl::Window *pParent = mpDialogParent;
- mpDialogParent = NULL;
+ mpDialogParent = nullptr;
ImplInit(pParent, nBits);
mbIsDefferedInit = false;
}
@@ -223,11 +223,11 @@ void FloatingWindow::dispose()
if ( mnPostId )
Application::RemoveUserEvent( mnPostId );
- mnPostId = 0;
+ mnPostId = nullptr;
}
delete mpImplData;
- mpImplData = NULL;
+ mpImplData = nullptr;
mpNextFloat.clear();
mpFirstPopupModeWin.clear();
@@ -503,7 +503,7 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const
while ( pWin );
rHitTest = HITTEST_OUTSIDE;
- return NULL;
+ return nullptr;
}
FloatingWindow* FloatingWindow::ImplFindLastLevelFloat()
@@ -542,7 +542,7 @@ bool FloatingWindow::ImplIsFloatPopupModeWindow( const vcl::Window* pWindow )
IMPL_LINK_NOARG_TYPED(FloatingWindow, ImplEndPopupModeHdl, void*, void)
{
VclPtr<FloatingWindow> pThis(this);
- mnPostId = 0;
+ mnPostId = nullptr;
mnPopupModeFlags = FloatWinPopupFlags::NONE;
mbPopupMode = false;
PopupModeEnd();
@@ -606,7 +606,7 @@ void FloatingWindow::ImplCallPopupModeEnd()
// call Handler asynchronously.
if ( mpImplData && !mnPostId )
- mnPostId = Application::PostUserEvent( LINK( this, FloatingWindow, ImplEndPopupModeHdl ), NULL, true );
+ mnPostId = Application::PostUserEvent( LINK( this, FloatingWindow, ImplEndPopupModeHdl ), nullptr, true );
}
void FloatingWindow::PopupModeEnd()
@@ -771,7 +771,7 @@ void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, sal_uLong n
// delete window from the list
pSVData->maWinData.mpFirstFloat = mpNextFloat;
- mpNextFloat = NULL;
+ mpNextFloat = nullptr;
FloatWinPopupFlags nPopupModeFlags = mnPopupModeFlags;
@@ -806,7 +806,7 @@ void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, sal_uLong n
if ( mpImplData->mpBox )
{
mpImplData->mpBox->ImplFloatControl( false, this );
- mpImplData->mpBox = NULL;
+ mpImplData->mpBox = nullptr;
}
// call PopupModeEnd-Handler depending on parameter
diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx
index b7bd49bba6a9..50c871203e90 100644
--- a/vcl/source/window/introwin.cxx
+++ b/vcl/source/window/introwin.cxx
@@ -35,7 +35,7 @@ IntroWindow::IntroWindow( ) :
WorkWindow( WINDOW_INTROWINDOW )
{
ImplInitIntroWindowData();
- WorkWindow::ImplInit( 0, WB_INTROWIN );
+ WorkWindow::ImplInit( nullptr, WB_INTROWIN );
}
IntroWindow::~IntroWindow()
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index aa8f6518161a..62e9e4fd7682 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -20,7 +20,7 @@ VclContainer::VclContainer(vcl::Window *pParent, WinBits nStyle)
: Window(WINDOW_CONTAINER)
, m_bLayoutDirty(true)
{
- ImplInit(pParent, nStyle, NULL);
+ ImplInit(pParent, nStyle, nullptr);
EnableChildTransparentMode();
SetPaintTransparent(true);
SetBackground();
@@ -757,7 +757,7 @@ struct GridEntry
int x;
int y;
GridEntry()
- : pChild(0)
+ : pChild(nullptr)
, nSpanWidth(0)
, nSpanHeight(0)
, x(-1)
@@ -1370,7 +1370,7 @@ void VclFrame::setAllocation(const Size &rAllocation)
IMPL_LINK_TYPED(VclFrame, WindowEventListener, VclWindowEvent&, rEvent, void)
{
if (rEvent.GetId() == VCLEVENT_OBJECT_DYING)
- designate_label(NULL);
+ designate_label(nullptr);
}
void VclFrame::designate_label(vcl::Window *pWindow)
@@ -1391,7 +1391,7 @@ const vcl::Window *VclFrame::get_label_widget() const
//The label widget is normally the first (of two) children
const WindowImpl* pWindowImpl = ImplGetWindowImpl();
if (pWindowImpl->mpFirstChild == pWindowImpl->mpLastChild) //no label exists
- return NULL;
+ return nullptr;
return pWindowImpl->mpFirstChild;
}
@@ -1408,7 +1408,7 @@ const vcl::Window *VclFrame::get_child() const
if (!m_pLabel)
return pWindowImpl->mpLastChild;
if (pWindowImpl->mpFirstChild == pWindowImpl->mpLastChild) //only label exists
- return NULL;
+ return nullptr;
return pWindowImpl->mpLastChild;
}
@@ -1520,7 +1520,7 @@ Size VclExpander::calculateRequisition() const
WindowImpl* pWindowImpl = ImplGetWindowImpl();
const vcl::Window *pChild = get_child();
- const vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild.get() : NULL;
+ const vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild.get() : nullptr;
if (pChild && pChild->IsVisible() && m_pDisclosureButton->IsChecked())
aRet = getLayoutRequisition(*pChild);
@@ -1557,7 +1557,7 @@ void VclExpander::setAllocation(const Size &rAllocation)
//The label widget is the last (of two) children
vcl::Window *pChild = get_child();
- vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild.get() ? pWindowImpl->mpLastChild.get() : NULL;
+ vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild.get() ? pWindowImpl->mpLastChild.get() : nullptr;
Size aButtonSize = getLayoutRequisition(*m_pDisclosureButton);
Size aLabelSize;
@@ -1631,7 +1631,7 @@ IMPL_LINK_TYPED( VclExpander, ClickHdl, CheckBox&, rBtn, void )
{
pChild->Show(rBtn.IsChecked());
queue_resize();
- Dialog* pResizeDialog = m_bResizeTopLevel ? GetParentDialog() : NULL;
+ Dialog* pResizeDialog = m_bResizeTopLevel ? GetParentDialog() : nullptr;
if (pResizeDialog)
pResizeDialog->setOptimalLayoutSize();
}
@@ -1999,12 +1999,12 @@ MessageDialog::MessageDialog(vcl::Window* pParent, WinBits nStyle)
: Dialog(pParent, nStyle)
, m_eButtonsType(VCL_BUTTONS_NONE)
, m_eMessageType(VCL_MESSAGE_INFO)
- , m_pOwnedContentArea(NULL)
- , m_pOwnedActionArea(NULL)
- , m_pGrid(NULL)
- , m_pImage(NULL)
- , m_pPrimaryMessage(NULL)
- , m_pSecondaryMessage(NULL)
+ , m_pOwnedContentArea(nullptr)
+ , m_pOwnedActionArea(nullptr)
+ , m_pGrid(nullptr)
+ , m_pImage(nullptr)
+ , m_pPrimaryMessage(nullptr)
+ , m_pSecondaryMessage(nullptr)
{
SetType(WINDOW_MESSBOX);
}
@@ -2017,10 +2017,10 @@ MessageDialog::MessageDialog(vcl::Window* pParent,
: Dialog(pParent, nStyle)
, m_eButtonsType(eButtonsType)
, m_eMessageType(eMessageType)
- , m_pGrid(NULL)
- , m_pImage(NULL)
- , m_pPrimaryMessage(NULL)
- , m_pSecondaryMessage(NULL)
+ , m_pGrid(nullptr)
+ , m_pImage(nullptr)
+ , m_pPrimaryMessage(nullptr)
+ , m_pSecondaryMessage(nullptr)
, m_sPrimaryString(rMessage)
{
SetType(WINDOW_MESSBOX);
@@ -2031,12 +2031,12 @@ MessageDialog::MessageDialog(vcl::Window* pParent, const OString& rID, const OUS
: Dialog(pParent, OStringToOUString(rID, RTL_TEXTENCODING_UTF8), rUIXMLDescription, WINDOW_MESSBOX)
, m_eButtonsType(VCL_BUTTONS_NONE)
, m_eMessageType(VCL_MESSAGE_INFO)
- , m_pOwnedContentArea(NULL)
- , m_pOwnedActionArea(NULL)
- , m_pGrid(NULL)
- , m_pImage(NULL)
- , m_pPrimaryMessage(NULL)
- , m_pSecondaryMessage(NULL)
+ , m_pOwnedContentArea(nullptr)
+ , m_pOwnedActionArea(nullptr)
+ , m_pGrid(nullptr)
+ , m_pImage(nullptr)
+ , m_pPrimaryMessage(nullptr)
+ , m_pSecondaryMessage(nullptr)
{
}
@@ -2194,7 +2194,7 @@ short MessageDialog::Execute()
m_pSecondaryMessage->SetText(m_sSecondaryString);
m_pSecondaryMessage->Show(bHasSecondaryText);
- MessageDialog::SetMessagesWidths(this, m_pPrimaryMessage, bHasSecondaryText ? m_pSecondaryMessage.get() : NULL);
+ MessageDialog::SetMessagesWidths(this, m_pPrimaryMessage, bHasSecondaryText ? m_pSecondaryMessage.get() : nullptr);
VclButtonBox *pButtonBox = get_action_area();
assert(pButtonBox);
@@ -2417,13 +2417,13 @@ bool isEnabledInLayout(const vcl::Window *pWindow)
bool isLayoutEnabled(const vcl::Window *pWindow)
{
//Child is a container => we're layout enabled
- const vcl::Window *pChild = pWindow ? pWindow->GetWindow(GetWindowType::FirstChild) : NULL;
+ const vcl::Window *pChild = pWindow ? pWindow->GetWindow(GetWindowType::FirstChild) : nullptr;
return pChild && isContainerWindow(*pChild) && !pChild->GetWindow(GetWindowType::Next);
}
bool isInitialLayout(const vcl::Window *pWindow)
{
- Dialog *pParentDialog = pWindow ? pWindow->GetParentDialog() : NULL;
+ Dialog *pParentDialog = pWindow ? pWindow->GetParentDialog() : nullptr;
return pParentDialog && pParentDialog->isCalculatingInitialLayoutSize();
}
diff --git a/vcl/source/window/legacyaccessibility.cxx b/vcl/source/window/legacyaccessibility.cxx
index aa0cf67ad3f3..1cddcab06201 100644
--- a/vcl/source/window/legacyaccessibility.cxx
+++ b/vcl/source/window/legacyaccessibility.cxx
@@ -40,7 +40,7 @@ using namespace ::com::sun::star;
static vcl::Window* ImplGetLabelFor( vcl::Window* pFrameWindow, WindowType nMyType, vcl::Window* pLabel, sal_Unicode nAccel )
{
- vcl::Window* pWindow = NULL;
+ vcl::Window* pWindow = nullptr;
if( nMyType == WINDOW_FIXEDTEXT ||
nMyType == WINDOW_FIXEDLINE ||
@@ -103,14 +103,14 @@ namespace vcl {
Window* Window::getLegacyNonLayoutAccessibleRelationLabelFor() const
{
- Window* pWindow = NULL;
+ Window* pWindow = nullptr;
Window* pFrameWindow = ImplGetFrameWindow();
WinBits nFrameStyle = pFrameWindow->GetStyle();
if( ! ( nFrameStyle & WB_DIALOGCONTROL )
|| ( nFrameStyle & WB_NODIALOGCONTROL )
)
- return NULL;
+ return nullptr;
if ( mpWindowImpl->mpRealParent )
pWindow = mpWindowImpl->mpRealParent->GetParentLabelFor( this );
@@ -128,7 +128,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabelFor() const
static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Window* pLabeled )
{
- Window* pWindow = NULL;
+ Window* pWindow = nullptr;
if ( (nMyType != WINDOW_GROUPBOX) && (nMyType != WINDOW_FIXEDLINE) )
{
// search for a control that labels this window
@@ -183,7 +183,7 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo
Window* Window::getLegacyNonLayoutAccessibleRelationLabeledBy() const
{
- Window* pWindow = NULL;
+ Window* pWindow = nullptr;
Window* pFrameWindow = ImplGetFrameWindow();
if ( mpWindowImpl->mpRealParent )
@@ -196,7 +196,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabeledBy() const
// #i62723#, #104191# checkboxes and radiobuttons are not supposed to have labels
if( GetType() == WINDOW_CHECKBOX || GetType() == WINDOW_RADIOBUTTON )
- return NULL;
+ return nullptr;
// if( ! ( GetType() == WINDOW_FIXEDTEXT ||
// GetType() == WINDOW_FIXEDLINE ||
@@ -213,7 +213,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabeledBy() const
Window* Window::getLegacyNonLayoutAccessibleRelationMemberOf() const
{
- Window* pWindow = NULL;
+ Window* pWindow = nullptr;
Window* pFrameWindow = GetParent();
if ( !pFrameWindow )
{
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 6ca2bd38b9bd..49acb2e0c10c 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -114,13 +114,13 @@ static void ImplSetMenuItemData( MenuItemData* pData )
}
Menu::Menu()
- : mpFirstDel(NULL),
+ : mpFirstDel(nullptr),
pItemList(new MenuItemList),
- pLogo(NULL),
- pStartedFrom(NULL),
- pWindow(NULL),
+ pLogo(nullptr),
+ pStartedFrom(nullptr),
+ pWindow(nullptr),
nTitleHeight(0),
- nEventId(0),
+ nEventId(nullptr),
mnHighlightedItemPos(ITEMPOS_INVALID),
nMenuFlags(MenuFlags::NONE),
nDefaultItem(0),
@@ -130,8 +130,8 @@ Menu::Menu()
bCanceled(false),
bInCallback(false),
bKilled(false),
- mpLayoutData(NULL),
- mpSalMenu(NULL)
+ mpLayoutData(nullptr),
+ mpSalMenu(nullptr)
{
}
@@ -145,7 +145,7 @@ Menu::~Menu()
{
MenuFloatingWindow* pFloat = static_cast<MenuFloatingWindow*>(pWindow.get());
if( pFloat->pMenu == this )
- pFloat->pMenu = NULL;
+ pFloat->pMenu = nullptr;
pWindow->SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >() );
}
@@ -164,7 +164,7 @@ Menu::~Menu()
ImplMenuDelData* pDelData = mpFirstDel;
while ( pDelData )
{
- pDelData->mpMenu = NULL;
+ pDelData->mpMenu = nullptr;
pDelData = pDelData->mpNext;
}
@@ -175,7 +175,7 @@ Menu::~Menu()
delete mpLayoutData;
// Native-support: destroy SalMenu
- ImplSetSalMenu( NULL );
+ ImplSetSalMenu( nullptr );
}
void Menu::CreateAutoMnemonics()
@@ -291,7 +291,7 @@ void Menu::ImplSelect()
// call select
ImplSVData* pSVData = ImplGetSVData();
- pSVData->maAppData.mpActivePopupMenu = NULL; // if new execute in select()
+ pSVData->maAppData.mpActivePopupMenu = nullptr; // if new execute in select()
nEventId = Application::PostUserEvent( LINK( this, Menu, ImplCallSelect ) );
}
@@ -395,7 +395,7 @@ void Menu::InsertItem(sal_uInt16 nItemId, const OUString& rStr, MenuItemBits nIt
NbcInsertItem(nItemId, nItemBits, rStr, this, nPos, rIdent);
vcl::Window* pWin = ImplGetWindow();
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
if ( pWin )
{
ImplCalcSize( pWin );
@@ -522,7 +522,7 @@ void Menu::InsertItem( const ResId& rResId, sal_uInt16 nPos )
}
IncrementRes( GetObjSizeRes( static_cast<RSHEADER_TYPE*>(GetClassRes()) ) );
}
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
}
void Menu::InsertSeparator(const OString &rIdent, sal_uInt16 nPos)
@@ -544,7 +544,7 @@ void Menu::InsertSeparator(const OString &rIdent, sal_uInt16 nPos)
if( ImplGetSalMenu() && pData && pData->pSalMenuItem )
ImplGetSalMenu()->InsertItem( pData->pSalMenuItem, nPos );
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
ImplCallEventListeners( VCLEVENT_MENU_INSERTITEM, nPos );
}
@@ -570,7 +570,7 @@ void Menu::RemoveItem( sal_uInt16 nPos )
if ( pWin->IsVisible() )
pWin->Invalidate();
}
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
if ( bRemove )
ImplCallEventListeners( VCLEVENT_MENU_REMOVEITEM, nPos );
@@ -793,7 +793,7 @@ void Menu::SetPopupMenu( sal_uInt16 nItemId, PopupMenu* pMenu )
// #112023# Make sure pStartedFrom does not point to invalid (old) data
if ( pData->pSubMenu )
- pData->pSubMenu->pStartedFrom = 0;
+ pData->pSubMenu->pStartedFrom = nullptr;
// set native submenu
if( ImplGetSalMenu() && pData->pSalMenuItem )
@@ -801,7 +801,7 @@ void Menu::SetPopupMenu( sal_uInt16 nItemId, PopupMenu* pMenu )
if( pMenu )
ImplGetSalMenu()->SetSubMenu( pData->pSalMenuItem, pMenu->ImplGetSalMenu(), nPos );
else
- ImplGetSalMenu()->SetSubMenu( pData->pSalMenuItem, NULL, nPos );
+ ImplGetSalMenu()->SetSubMenu( pData->pSalMenuItem, nullptr, nPos );
}
ImplCallEventListeners( VCLEVENT_MENU_SUBMENUCHANGED, nPos );
@@ -814,7 +814,7 @@ PopupMenu* Menu::GetPopupMenu( sal_uInt16 nItemId ) const
if ( pData )
return static_cast<PopupMenu*>(pData->pSubMenu);
else
- return NULL;
+ return nullptr;
}
void Menu::SetAccelKey( sal_uInt16 nItemId, const KeyCode& rKeyCode )
@@ -1030,7 +1030,7 @@ void Menu::SetItemText( sal_uInt16 nItemId, const OUString& rStr )
ImplGetSalMenu()->SetItemText( nPos, pData->pSalMenuItem, rStr );
vcl::Window* pWin = ImplGetWindow();
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
if (pWin && IsMenuBar())
{
ImplCalcSize( pWin );
@@ -1190,9 +1190,9 @@ OUString Menu::ImplGetHelpText( sal_uInt16 nItemId ) const
if ( pHelp )
{
if (!pData->aCommandStr.isEmpty())
- pData->aHelpText = pHelp->GetHelpText( pData->aCommandStr, NULL );
+ pData->aHelpText = pHelp->GetHelpText( pData->aCommandStr, nullptr );
if (pData->aHelpText.isEmpty() && !pData->aHelpId.isEmpty())
- pData->aHelpText = pHelp->GetHelpText( OStringToOUString( pData->aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
+ pData->aHelpText = pHelp->GetHelpText( OStringToOUString( pData->aHelpId, RTL_TEXTENCODING_UTF8 ), nullptr );
}
}
@@ -1286,7 +1286,7 @@ bool Menu::ImplIsVisible( sal_uInt16 nPos ) const
// always avoid adjacent separators
size_t nCount = pItemList->size();
size_t n;
- MenuItemData* pNextData = NULL;
+ MenuItemData* pNextData = nullptr;
// search next visible item
for( n = nPos + 1; n < nCount; n++ )
{
@@ -1470,7 +1470,7 @@ void Menu::ImplAddDel( ImplMenuDelData& rDel )
void Menu::ImplRemoveDel( ImplMenuDelData& rDel )
{
- rDel.mpMenu = NULL;
+ rDel.mpMenu = nullptr;
if ( mpFirstDel == &rDel )
{
mpFirstDel = rDel.mpNext;
@@ -1740,7 +1740,7 @@ static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Wi
{
const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings();
Color aColor( i_bHighlight ? rSettings.GetMenuHighlightTextColor() : rSettings.GetHighlightColor() );
- RenderTools::DrawSelectionBackground(rRenderContext, rWindow, i_rRect, 0, i_bHighlight, true, false, NULL, 2, &aColor);
+ RenderTools::DrawSelectionBackground(rRenderContext, rWindow, i_rRect, 0, i_bHighlight, true, false, nullptr, 2, &aColor);
}
}
@@ -2028,8 +2028,8 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
if (pData->bIsTemporary)
nStyle |= DrawTextFlags::Disable;
- MetricVector* pVector = bLayout ? &mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpLayoutData->m_aDisplayText : nullptr;
if (bLayout)
{
mpLayoutData->m_aLineIndices.push_back(mpLayoutData->m_aDisplayText.getLength());
@@ -2204,13 +2204,13 @@ void Menu::ImplCallHighlight(sal_uInt16 nItem)
IMPL_LINK_NOARG_TYPED(Menu, ImplCallSelect, void*, void)
{
- nEventId = 0;
+ nEventId = nullptr;
Select();
}
Menu* Menu::ImplFindSelectMenu()
{
- Menu* pSelMenu = nEventId ? this : NULL;
+ Menu* pSelMenu = nEventId ? this : nullptr;
for ( size_t n = GetItemList()->size(); n && !pSelMenu; )
{
@@ -2225,7 +2225,7 @@ Menu* Menu::ImplFindSelectMenu()
Menu* Menu::ImplFindMenu( sal_uInt16 nItemId )
{
- Menu* pSelMenu = NULL;
+ Menu* pSelMenu = nullptr;
for ( size_t n = GetItemList()->size(); n && !pSelMenu; )
{
@@ -2272,7 +2272,7 @@ void Menu::RemoveDisabledEntries( bool bCheckPopups, bool bRemoveEmptyPopups )
if ( pItem->eType == MenuItemType::SEPARATOR )
RemoveItem( nLast );
}
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
}
bool Menu::HasValidEntries( bool bCheckPopups )
@@ -2304,7 +2304,7 @@ void Menu::MenuBarKeyInput(const KeyEvent&)
void Menu::ImplKillLayoutData() const
{
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
}
void Menu::ImplFillLayoutData() const
@@ -2314,12 +2314,12 @@ void Menu::ImplFillLayoutData() const
mpLayoutData = new MenuLayoutData();
if (IsMenuBar())
{
- ImplPaint(*pWindow, 0, 0, 0, false, true); // FIXME
+ ImplPaint(*pWindow, 0, 0, nullptr, false, true); // FIXME
}
else
{
MenuFloatingWindow* pFloat = static_cast<MenuFloatingWindow*>(pWindow.get());
- ImplPaint(*pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), 0, false, true); //FIXME
+ ImplPaint(*pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), nullptr, false, true); //FIXME
}
}
}
@@ -2557,7 +2557,7 @@ vcl::Window* MenuBar::ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, Men
pWindow = pMenuBarWindow = VclPtr<MenuBarWindow>::Create( pParent );
}
- pMenu->pStartedFrom = 0;
+ pMenu->pStartedFrom = nullptr;
pMenu->pWindow = pWindow;
pMenuBarWindow->SetMenu(pMenu);
long nHeight = pWindow ? pMenu->ImplCalcSize(pWindow).Height() : 0;
@@ -2583,7 +2583,7 @@ void MenuBar::ImplDestroy( MenuBar* pMenu, bool bDelete )
pMenuWin->KillActivePopup();
pWindow->disposeOnce();
}
- pMenu->pWindow = NULL;
+ pMenu->pWindow = nullptr;
}
bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
@@ -2769,13 +2769,13 @@ MenuFloatingWindow * PopupMenu::ImplGetFloatingWindow() const {
}
PopupMenu::PopupMenu()
- : pRefAutoSubMenu(NULL)
+ : pRefAutoSubMenu(nullptr)
{
mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this);
}
PopupMenu::PopupMenu( const ResId& rResId )
- : pRefAutoSubMenu(NULL)
+ : pRefAutoSubMenu(nullptr)
{
mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this);
@@ -2809,7 +2809,7 @@ PopupMenu::PopupMenu( const ResId& rResId )
PopupMenu::PopupMenu( const PopupMenu& rMenu )
: Menu(),
- pRefAutoSubMenu(NULL)
+ pRefAutoSubMenu(nullptr)
{
mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this);
*this = rMenu;
@@ -2818,7 +2818,7 @@ PopupMenu::PopupMenu( const PopupMenu& rMenu )
PopupMenu::~PopupMenu()
{
if( pRefAutoSubMenu && *pRefAutoSubMenu == this )
- *pRefAutoSubMenu = NULL; // #111060# avoid second delete in ~MenuItemData
+ *pRefAutoSubMenu = nullptr; // #111060# avoid second delete in ~MenuItemData
}
void PopupMenu::ClosePopup(Menu* pMenu)
@@ -2909,7 +2909,7 @@ sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const Rectangle& rRect,
if (nFlags & PopupMenuFlags::NoHorzPlacement)
nPopupModeFlags |= FloatWinPopupFlags::NoHorzPlacement;
- return ImplExecute( pExecWindow, rRect, nPopupModeFlags, 0, false );
+ return ImplExecute( pExecWindow, rRect, nPopupModeFlags, nullptr, false );
}
sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst )
@@ -2921,7 +2921,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa
if( pSFrom && pSFrom->IsMenuBar())
((static_cast<MenuBarWindow*>(pSFrom->pWindow.get())))->SetMBWHideAccel(!(static_cast<MenuBarWindow*>(pSFrom->pWindow.get())->GetMBWMenuKey()));
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
ImplSVData* pSVData = ImplGetSVData();
@@ -2994,7 +2994,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa
{
OUString aTmpEntryText( ResId( SV_RESID_STRING_NOSELECTIONPOSSIBLE, *pResMgr ) );
- MenuItemData* pData = NbcInsertItem(0xFFFF, MenuItemBits::NONE, aTmpEntryText, NULL, 0xFFFF, OString());
+ MenuItemData* pData = NbcInsertItem(0xFFFF, MenuItemBits::NONE, aTmpEntryText, nullptr, 0xFFFF, OString());
size_t nPos = 0;
pData = pItemList->GetData( pData->nId, nPos );
assert(pData);
@@ -3079,7 +3079,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa
pWin->StopExecute();
pWin->doShutdown();
pWindow->doLazyDelete();
- pWindow = NULL;
+ pWindow = nullptr;
return nSelectedId;
}
else
@@ -3157,7 +3157,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa
}
pWin->doShutdown();
pWindow->doLazyDelete();
- pWindow = NULL;
+ pWindow = nullptr;
// is there still Select?
Menu* pSelect = ImplFindSelectMenu();
@@ -3165,7 +3165,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa
{
// Select should be called prior to leaving execute in a popup menu!
Application::RemoveUserEvent( pSelect->nEventId );
- pSelect->nEventId = 0;
+ pSelect->nEventId = nullptr;
pSelect->Select();
}
}
@@ -3222,8 +3222,8 @@ long PopupMenu::ImplCalcHeight( sal_uInt16 nEntries ) const
}
ImplMenuDelData::ImplMenuDelData( const Menu* pMenu )
-: mpNext( 0 )
-, mpMenu( 0 )
+: mpNext( nullptr )
+, mpMenu( nullptr )
{
if( pMenu )
const_cast< Menu* >( pMenu )->ImplAddDel( *this );
@@ -3242,7 +3242,7 @@ struct MenuInvalidateListeners : public vcl::DeletionNotifier
std::vector<Link<LinkParamNone*,void>> m_aListeners;
};
-static MenuInvalidateListeners* pMenuInvalidateListeners = NULL;
+static MenuInvalidateListeners* pMenuInvalidateListeners = nullptr;
void AddMenuInvalidateListener(const Link<LinkParamNone*,void>& rLink)
{
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 67eba4eed45f..32093142d5b6 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -124,8 +124,8 @@ MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) :
aHideBtn(VclPtr<PushButton>::Create(this, WB_NOPOINTERFOCUS | WB_SMALLSTYLE | WB_RECTSTYLE))
{
SetType(WINDOW_MENUBARWINDOW);
- pMenu = NULL;
- pActivePopup = NULL;
+ pMenu = nullptr;
+ pActivePopup = nullptr;
nSaveFocusId = 0;
nHighlightedItem = ITEMPOS_INVALID;
nRolloveredItem = ITEMPOS_INVALID;
@@ -287,7 +287,7 @@ IMPL_LINK_TYPED( MenuBarWindow, ShowHideListener, VclWindowEvent&, rEvent, void
void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst )
{
- MenuItemData* pItemData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : NULL;
+ MenuItemData* pItemData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : nullptr;
if ( pItemData )
{
bIgnoreFirstMove = true;
@@ -300,7 +300,7 @@ void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst )
{
pActivePopup = static_cast<PopupMenu*>(pItemData->pSubMenu);
long nX = 0;
- MenuItemData* pData = 0;
+ MenuItemData* pData = nullptr;
for ( sal_uLong n = 0; n < nHighlightedItem; n++ )
{
pData = pMenu->GetItemList()->GetDataFromPos( n );
@@ -353,9 +353,9 @@ void MenuBarWindow::KillActivePopup()
pActivePopup->ImplGetFloatingWindow()->StopExecute();
pActivePopup->ImplGetFloatingWindow()->doShutdown();
pActivePopup->pWindow->doLazyDelete();
- pActivePopup->pWindow = NULL;
+ pActivePopup->pWindow = nullptr;
}
- pActivePopup = 0;
+ pActivePopup = nullptr;
}
}
@@ -544,7 +544,7 @@ static int ImplGetTopDockingAreaHeight( vcl::Window *pWindow )
vcl::Window *pChildWin = pWin->GetWindow( GetWindowType::FirstChild ); //mpWindowImpl->mpFirstChild;
while( pChildWin )
{
- DockingAreaWindow *pDockingArea = NULL;
+ DockingAreaWindow *pDockingArea = nullptr;
if ( pChildWin->GetType() == WINDOW_DOCKINGAREA )
pDockingArea = static_cast< DockingAreaWindow* >( pChildWin );
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 0fff6618d878..327af121ba1d 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -31,7 +31,7 @@ MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, vcl::Window* pParent, WinBit
{
mpWindowImpl->mbMenuFloatingWindow= true;
pMenu = pMen;
- pActivePopup = 0;
+ pActivePopup = nullptr;
nSaveFocusId = 0;
bInExecute = false;
bScrollMenu = false;
@@ -98,7 +98,7 @@ void MenuFloatingWindow::doShutdown()
Rectangle aInvRect( GetWindowExtentsRelative( GetParent() ) );
GetParent()->Invalidate( aInvRect );
}
- pMenu = NULL;
+ pMenu = nullptr;
RemoveEventListener( LINK( this, MenuFloatingWindow, ShowHideListener ) );
}
}
@@ -231,7 +231,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDow
if ( bPopupArea && bAllowNewPopup )
{
- HighlightChanged( NULL );
+ HighlightChanged( nullptr );
}
}
else
@@ -243,7 +243,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDow
else if ( pItemData->nBits & MenuItemBits::POPUPSELECT )
{
if ( bPopupArea && ( pActivePopup != pItemData->pSubMenu ) )
- HighlightChanged( NULL );
+ HighlightChanged( nullptr );
}
}
bHighlighted = true;
@@ -284,7 +284,7 @@ IMPL_LINK_NOARG_TYPED(MenuFloatingWindow, PopupEnd, FloatingWindow*, void)
}
if ( pM )
- pM->pStartedFrom = 0;
+ pM->pStartedFrom = nullptr;
}
IMPL_LINK_NOARG_TYPED(MenuFloatingWindow, AutoScroll, Timer *, void)
@@ -311,7 +311,7 @@ IMPL_LINK_TYPED( MenuFloatingWindow, HighlightChanged, Timer*, pTimer, void )
{
pActivePopup = static_cast<PopupMenu*>(pItemData->pSubMenu);
long nY = nScrollerHeight+ImplGetStartY();
- MenuItemData* pData = 0;
+ MenuItemData* pData = nullptr;
for ( sal_uLong n = 0; n < nHighlightedItem; n++ )
{
pData = pMenu->pItemList->GetDataFromPos( n );
@@ -394,7 +394,7 @@ void MenuFloatingWindow::Execute()
while ( bInExecute )
Application::Yield();
- pSVData->maAppData.mpActivePopupMenu = NULL;
+ pSVData->maAppData.mpActivePopupMenu = nullptr;
}
void MenuFloatingWindow::StopExecute( sal_uLong nFocusId )
@@ -437,7 +437,7 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly )
// For all actions pActivePopup = 0, if e.g.
// PopupModeEndHdl the popups to destroy were called synchronous
PopupMenu* pPopup = pActivePopup;
- pActivePopup = NULL;
+ pActivePopup = nullptr;
pPopup->bInCallback = true;
pPopup->Deactivate();
pPopup->bInCallback = false;
@@ -446,7 +446,7 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly )
pPopup->ImplGetFloatingWindow()->StopExecute();
pPopup->ImplGetFloatingWindow()->doShutdown();
pPopup->pWindow->doLazyDelete();
- pPopup->pWindow = NULL;
+ pPopup->pWindow = nullptr;
Update();
}
@@ -455,7 +455,7 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly )
void MenuFloatingWindow::EndExecute()
{
- Menu* pStart = pMenu ? pMenu->ImplGetStartMenu() : NULL;
+ Menu* pStart = pMenu ? pMenu->ImplGetStartMenu() : nullptr;
sal_uLong nFocusId = 0;
if (pStart)
nFocusId = pStart->DeactivateMenuBar(nFocusId);
@@ -517,7 +517,7 @@ void MenuFloatingWindow::MouseButtonDown( const MouseEvent& rMEvt )
void MenuFloatingWindow::MouseButtonUp( const MouseEvent& rMEvt )
{
- MenuItemData* pData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : NULL;
+ MenuItemData* pData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : nullptr;
// nMBDownPos store in local variable and reset immediately,
// as it will be too late after EndExecute
sal_uInt16 _nMBDownPos = nMBDownPos;
@@ -548,7 +548,7 @@ void MenuFloatingWindow::MouseMove( const MouseEvent& rMEvt )
if ( rMEvt.IsLeaveWindow() )
{
// #102461# do not remove highlight if a popup menu is open at this position
- MenuItemData* pData = pMenu ? pMenu->pItemList->GetDataFromPos( nHighlightedItem ) : NULL;
+ MenuItemData* pData = pMenu ? pMenu->pItemList->GetDataFromPos( nHighlightedItem ) : nullptr;
// close popup with some delayed if we leave somewhere else
if( pActivePopup && pData && pData->pSubMenu != pActivePopup )
pActivePopup->ImplGetFloatingWindow()->aSubmenuCloseTimer.Start();
@@ -1055,7 +1055,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
MenuItemData* pData = pMenu->GetItemList()->GetDataFromPos( nHighlightedItem );
if ( pData && pData->pSubMenu )
{
- HighlightChanged( 0 );
+ HighlightChanged( nullptr );
bDone = true;
}
}
@@ -1079,7 +1079,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
if ( pData && pData->bEnabled )
{
if ( pData->pSubMenu )
- HighlightChanged( 0 );
+ HighlightChanged( nullptr );
else
EndExecute();
}
@@ -1107,7 +1107,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
sal_uInt16 nPos = 0;
sal_uInt16 nDuplicates = 0;
MenuItemData* pData = (nCharCode && pMenu) ?
- pMenu->GetItemList()->SearchItem(nCharCode, rKEvent.GetKeyCode(), nPos, nDuplicates, nHighlightedItem) : NULL;
+ pMenu->GetItemList()->SearchItem(nCharCode, rKEvent.GetKeyCode(), nPos, nDuplicates, nHighlightedItem) : nullptr;
bool bConsume = false;
bool accel = ImplGetSVData()->maNWFData.mbEnableAccel;
if (pData && accel)
@@ -1122,7 +1122,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
if ( pData->pSubMenu || nDuplicates > 1 )
{
ChangeHighlightItem( nPos, false );
- HighlightChanged( 0 );
+ HighlightChanged( nullptr );
}
else
{
@@ -1212,7 +1212,7 @@ void MenuFloatingWindow::RequestHelp( const HelpEvent& rHEvt )
{
nHighlightedItem = ITEMPOS_INVALID;
EndExecute();
- pW = NULL;
+ pW = nullptr;
}
if( !ImplHandleHelpEvent( pW, pM, nId, rHEvt, aHighlightRect ) )
diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx
index 8797d4ba9361..6fe08e4f8572 100644
--- a/vcl/source/window/menufloatingwindow.hxx
+++ b/vcl/source/window/menufloatingwindow.hxx
@@ -79,7 +79,7 @@ protected:
long ImplGetStartY() const;
Rectangle ImplGetItemRect( sal_uInt16 nPos );
void RenderHighlightItem( vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHighlight );
- long GetInitialItemY( long *pOptStartY = NULL ) const;
+ long GetInitialItemY( long *pOptStartY = nullptr ) const;
void InvalidateItem( sal_uInt16 nPos );
public:
@@ -113,7 +113,7 @@ public:
void EndExecute( sal_uInt16 nSelectId );
PopupMenu* GetActivePopup() const { return pActivePopup; }
- void KillActivePopup( PopupMenu* pThisOnly = NULL );
+ void KillActivePopup( PopupMenu* pThisOnly = nullptr );
void ChangeHighlightItem(sal_uInt16 n, bool bStartPopupTimer);
sal_uInt16 GetHighlightedItem() const { return nHighlightedItem; }
diff --git a/vcl/source/window/menuitemlist.cxx b/vcl/source/window/menuitemlist.cxx
index c104ba8a1ef8..d1042b4fb30b 100644
--- a/vcl/source/window/menuitemlist.cxx
+++ b/vcl/source/window/menuitemlist.cxx
@@ -36,9 +36,9 @@ MenuItemData::~MenuItemData()
aUserValueReleaseFunc(nUserValue);
if( pAutoSubMenu )
{
- static_cast<PopupMenu*>(pAutoSubMenu)->pRefAutoSubMenu = NULL;
+ static_cast<PopupMenu*>(pAutoSubMenu)->pRefAutoSubMenu = nullptr;
delete pAutoSubMenu;
- pAutoSubMenu = NULL;
+ pAutoSubMenu = nullptr;
}
if( pSalMenuItem )
ImplGetSVData()->mpDefInst->DestroyMenuItem( pSalMenuItem );
@@ -66,8 +66,8 @@ MenuItemData* MenuItemList::Insert(
pData->sIdent = rIdent;
pData->eType = eType;
pData->nBits = nBits;
- pData->pSubMenu = NULL;
- pData->pAutoSubMenu = NULL;
+ pData->pSubMenu = nullptr;
+ pData->pAutoSubMenu = nullptr;
pData->nUserValue = 0;
pData->bChecked = false;
pData->bEnabled = true;
@@ -102,8 +102,8 @@ void MenuItemList::InsertSeparator(const OString &rIdent, size_t nPos)
pData->sIdent = rIdent;
pData->eType = MenuItemType::SEPARATOR;
pData->nBits = MenuItemBits::NONE;
- pData->pSubMenu = NULL;
- pData->pAutoSubMenu = NULL;
+ pData->pSubMenu = nullptr;
+ pData->pAutoSubMenu = nullptr;
pData->nUserValue = 0;
pData->bChecked = false;
pData->bEnabled = true;
@@ -116,7 +116,7 @@ void MenuItemList::InsertSeparator(const OString &rIdent, size_t nPos)
aSalMIData.nId = 0;
aSalMIData.eType = MenuItemType::SEPARATOR;
aSalMIData.nBits = MenuItemBits::NONE;
- aSalMIData.pMenu = NULL;
+ aSalMIData.pMenu = nullptr;
aSalMIData.aText.clear();
aSalMIData.aImage = Image();
@@ -149,7 +149,7 @@ MenuItemData* MenuItemList::GetData( sal_uInt16 nSVId, size_t& rPos ) const
return maItemList[ i ];
}
}
- return NULL;
+ return nullptr;
}
MenuItemData* MenuItemList::SearchItem(
@@ -221,7 +221,7 @@ MenuItemData* MenuItemList::SearchItem(
}
}
- return NULL;
+ return nullptr;
}
size_t MenuItemList::GetItemCount( sal_Unicode cSelectChar ) const
diff --git a/vcl/source/window/menuitemlist.hxx b/vcl/source/window/menuitemlist.hxx
index 6f2b2631bdef..3f7f8d2d6166 100644
--- a/vcl/source/window/menuitemlist.hxx
+++ b/vcl/source/window/menuitemlist.hxx
@@ -62,28 +62,28 @@ struct MenuItemData
: nId(0)
, eType(MenuItemType::DONTKNOW)
, nBits(MenuItemBits::NONE)
- , pSubMenu(NULL)
- , pAutoSubMenu(NULL)
+ , pSubMenu(nullptr)
+ , pAutoSubMenu(nullptr)
, nUserValue(0)
- , aUserValueReleaseFunc(0)
+ , aUserValueReleaseFunc(nullptr)
, bChecked(false)
, bEnabled(false)
, bVisible(false)
, bIsTemporary(false)
, bMirrorMode(false)
, nItemImageAngle(0)
- , pSalMenuItem(NULL)
+ , pSalMenuItem(nullptr)
{
}
MenuItemData( const OUString& rStr, const Image& rImage )
: nId(0)
, eType(MenuItemType::DONTKNOW)
, nBits(MenuItemBits::NONE)
- , pSubMenu(NULL)
- , pAutoSubMenu(NULL)
+ , pSubMenu(nullptr)
+ , pAutoSubMenu(nullptr)
, aText(rStr)
, nUserValue(0)
- , aUserValueReleaseFunc(0)
+ , aUserValueReleaseFunc(nullptr)
, aImage(rImage)
, bChecked(false)
, bEnabled(false)
@@ -91,7 +91,7 @@ struct MenuItemData
, bIsTemporary(false)
, bMirrorMode(false)
, nItemImageAngle(0)
- , pSalMenuItem(NULL)
+ , pSalMenuItem(nullptr)
{
}
~MenuItemData();
@@ -134,7 +134,7 @@ public:
}
MenuItemData* GetDataFromPos( size_t nPos ) const
{
- return ( nPos < maItemList.size() ) ? maItemList[ nPos ] : NULL;
+ return ( nPos < maItemList.size() ) ? maItemList[ nPos ] : nullptr;
}
MenuItemData* SearchItem(
diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx
index e915c33e4c07..72a1baecbb3f 100644
--- a/vcl/source/window/menuwindow.cxx
+++ b/vcl/source/window/menuwindow.cxx
@@ -99,9 +99,9 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_
aHelpId = OOO_HELP_INDEX;
if ( !aCommand.isEmpty() )
- pHelp->Start( aCommand, NULL );
+ pHelp->Start( aCommand, nullptr );
else
- pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
+ pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), nullptr );
}
bDone = true;
}
diff --git a/vcl/source/window/mnemonicengine.cxx b/vcl/source/window/mnemonicengine.cxx
index f9f74398e172..6901d1aa4ed1 100644
--- a/vcl/source/window/mnemonicengine.cxx
+++ b/vcl/source/window/mnemonicengine.cxx
@@ -47,7 +47,7 @@ namespace vcl
OUString sEntryText;
const void* pSearchEntry = _rEntryList.FirstSearchEntry( sEntryText );
- const void* pFirstFoundEntry = NULL;
+ const void* pFirstFoundEntry = nullptr;
bool bCheckingAmbiguity = false;
const void* pStartedWith = pSearchEntry;
while ( pSearchEntry )
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index ad6c460d6d91..198e4cde7460 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -160,12 +160,12 @@ void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, bool bModChanged )
void Window::ImplGenerateMouseMove()
{
if ( !mpWindowImpl->mpFrameData->mnMouseMoveId )
- mpWindowImpl->mpFrameData->mnMouseMoveId = Application::PostUserEvent( LINK( mpWindowImpl->mpFrameWindow, Window, ImplGenerateMouseMoveHdl ), NULL, true );
+ mpWindowImpl->mpFrameData->mnMouseMoveId = Application::PostUserEvent( LINK( mpWindowImpl->mpFrameWindow, Window, ImplGenerateMouseMoveHdl ), nullptr, true );
}
IMPL_LINK_NOARG_TYPED(Window, ImplGenerateMouseMoveHdl, void*, void)
{
- mpWindowImpl->mpFrameData->mnMouseMoveId = 0;
+ mpWindowImpl->mpFrameData->mnMouseMoveId = nullptr;
vcl::Window* pCaptureWin = ImplGetSVData()->maWinData.mpCaptureWin;
if( ! pCaptureWin ||
(pCaptureWin->mpWindowImpl && pCaptureWin->mpWindowImpl->mpFrame == mpWindowImpl->mpFrame)
@@ -384,7 +384,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
if ( !ImplCallPreNotify( aNEvt ) && !aDogTag.IsDead() )
CompatGetFocus();
if( !aDogTag.IsDead() )
- ImplCallActivateListeners( (pOldFocusWindow && ! aOldFocusDel.IsDead()) ? pOldFocusWindow : NULL );
+ ImplCallActivateListeners( (pOldFocusWindow && ! aOldFocusDel.IsDead()) ? pOldFocusWindow : nullptr );
if( !aDogTag.IsDead() )
{
mpWindowImpl->mnGetFocusFlags = GetFocusFlags::NONE;
@@ -473,7 +473,7 @@ void Window::ReleaseMouse()
if ( pSVData->maWinData.mpCaptureWin.get() == this )
{
- pSVData->maWinData.mpCaptureWin = NULL;
+ pSVData->maWinData.mpCaptureWin = nullptr;
mpWindowImpl->mpFrame->CaptureMouse( false );
ImplGenerateMouseMove();
}
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 659c3fe33449..e892c1d3c7be 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -52,10 +52,10 @@ static void ImplInitMsgBoxImageList()
void MessBox::ImplInitMessBoxData()
{
- mpVCLMultiLineEdit = NULL;
- mpFixedImage = NULL;
+ mpVCLMultiLineEdit = nullptr;
+ mpFixedImage = nullptr;
mbHelpBtn = false;
- mpCheckBox = NULL;
+ mpCheckBox = nullptr;
mbCheck = false;
}
diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx
index 9af4c0ff399b..3f95894181d1 100644
--- a/vcl/source/window/openglwin.cxx
+++ b/vcl/source/window/openglwin.cxx
@@ -42,7 +42,7 @@ OpenGLWindowImpl::~OpenGLWindowImpl()
OpenGLWindow::OpenGLWindow(vcl::Window* pParent):
Window(pParent, 0),
mxImpl(new OpenGLWindowImpl(this)),
- mpRenderer(NULL)
+ mpRenderer(nullptr)
{
}
@@ -55,7 +55,7 @@ void OpenGLWindow::dispose()
{
if(mpRenderer)
mpRenderer->contextDestroyed();
- mpRenderer = NULL;
+ mpRenderer = nullptr;
mxImpl.reset();
Window::dispose();
}
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index ade79ba0d77d..6dd4da85a2ba 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -215,7 +215,7 @@ public:
PaintHelper::PaintHelper(vcl::Window *pWindow, sal_uInt16 nPaintFlags)
: m_pWindow(pWindow)
- , m_pChildRegion(NULL)
+ , m_pChildRegion(nullptr)
, m_nPaintFlags(nPaintFlags)
, m_bPop(false)
, m_bRestoreCursor(false)
@@ -519,7 +519,7 @@ void Window::PopPaintHelper(PaintHelper *pHelper)
}
mpWindowImpl->mbInPaint = false;
mbInitClipRegion = true;
- mpWindowImpl->mpPaintRegion = NULL;
+ mpWindowImpl->mpPaintRegion = nullptr;
if (mpWindowImpl->mpCursor)
mpWindowImpl->mpCursor->ImplResume(pHelper->GetRestoreCursor());
}
@@ -628,7 +628,7 @@ void Window::ImplCallOverlapPaint()
// - RTL - notify ImplCallPaint to check for re-mirroring (CHECKRTL)
// because we were called from the Sal layer
OutputDevice::PaintScope aScope( GetOutDev() );
- ImplCallPaint(NULL, mpWindowImpl->mnPaintFlags /*| IMPL_PAINT_CHECKRTL */);
+ ImplCallPaint(nullptr, mpWindowImpl->mnPaintFlags /*| IMPL_PAINT_CHECKRTL */);
}
}
@@ -671,12 +671,12 @@ IMPL_LINK_NOARG_TYPED(Window, ImplHandleResizeTimerHdl, Idle *, void)
ImplCallResize();
if( ImplDoTiledRendering() )
{
- ImplHandlePaintHdl(NULL);
+ ImplHandlePaintHdl(nullptr);
}
else if( mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
{
mpWindowImpl->mpFrameData->maPaintIdle.Stop();
- mpWindowImpl->mpFrameData->maPaintIdle.GetIdleHdl().Call( NULL );
+ mpWindowImpl->mpFrameData->maPaintIdle.GetIdleHdl().Call( nullptr );
}
}
}
@@ -811,7 +811,7 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags
if ( (nFlags & InvalidateFlags::NoChildren) && mpWindowImpl->mpFirstChild )
bInvalidateAll = false;
if ( bInvalidateAll )
- ImplInvalidateFrameRegion( NULL, nFlags );
+ ImplInvalidateFrameRegion( nullptr, nFlags );
else
{
Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
@@ -970,7 +970,7 @@ void Window::ImplValidate( const vcl::Region* pRegion, ValidateFlags nFlags )
if ( (nFlags & ValidateFlags::NoChildren) && mpWindowImpl->mpFirstChild )
bValidateAll = false;
if ( bValidateAll )
- ImplValidateFrameRegion( NULL, nFlags );
+ ImplValidateFrameRegion( nullptr, nFlags );
else
{
Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
@@ -1017,7 +1017,7 @@ void Window::ImplUpdateAll( bool bOverlapWindows )
else
{
if (pWindow->mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINT | IMPL_PAINT_PAINTCHILDREN))
- pWindow->ImplCallPaint(NULL, pWindow->mpWindowImpl->mnPaintFlags);
+ pWindow->ImplCallPaint(nullptr, pWindow->mpWindowImpl->mnPaintFlags);
}
if ( bFlush )
@@ -1208,8 +1208,8 @@ void Window::Invalidate( InvalidateFlags nFlags )
if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )
return;
- ImplInvalidate( NULL, nFlags );
- LogicInvalidate(0);
+ ImplInvalidate( nullptr, nFlags );
+ LogicInvalidate(nullptr);
}
void Window::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags )
@@ -1235,8 +1235,8 @@ void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
if ( rRegion.IsNull() )
{
- ImplInvalidate( NULL, nFlags );
- LogicInvalidate(0);
+ ImplInvalidate( nullptr, nFlags );
+ LogicInvalidate(nullptr);
}
else
{
@@ -1255,7 +1255,7 @@ void Window::Validate( ValidateFlags nFlags )
if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )
return;
- ImplValidate( NULL, nFlags );
+ ImplValidate( nullptr, nFlags );
}
bool Window::HasPaintEvent() const
@@ -1345,7 +1345,7 @@ void Window::Update()
pUpdateOverlapWindow = pUpdateOverlapWindow->mpWindowImpl->mpNext;
}
- pUpdateWindow->ImplCallPaint(NULL, pUpdateWindow->mpWindowImpl->mnPaintFlags);
+ pUpdateWindow->ImplCallPaint(nullptr, pUpdateWindow->mpWindowImpl->mnPaintFlags);
if (aDogTag.IsDead())
return;
@@ -1485,7 +1485,7 @@ void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& /
DBG_ASSERT( ! pDev->HasMirroredGraphics(), "PaintToDevice to mirroring graphics" );
DBG_ASSERT( ! pDev->IsRTLEnabled(), "PaintToDevice to mirroring device" );
- vcl::Window* pRealParent = NULL;
+ vcl::Window* pRealParent = nullptr;
if( ! mpWindowImpl->mbVisible )
{
vcl::Window* pTempParent = ImplGetDefaultWindow();
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index ef58f37eea17..71c175b52dfc 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -571,7 +571,7 @@ void PrintDialog::OutputOptPage::storeToSettings()
PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterController>& i_rController )
: ModalDialog(i_pParent, "PrintDialog", "vcl/ui/printdialog.ui")
- , mpCustomOptionsUIBuilder(NULL)
+ , mpCustomOptionsUIBuilder(nullptr)
, maPController( i_rController )
, maNUpPage(m_pUIBuilder)
, maJobPage(m_pUIBuilder)
@@ -1002,7 +1002,7 @@ void PrintDialog::setupOptionalUI()
if( pVal )
pVal->Value >>= bVal;
maNUpPage.mpBrochureBtn->Check( bVal );
- maNUpPage.mpBrochureBtn->Enable( maPController->isUIOptionEnabled( aPropertyName ) && pVal != NULL );
+ maNUpPage.mpBrochureBtn->Enable( maPController->isUIOptionEnabled( aPropertyName ) && pVal != nullptr );
maNUpPage.mpBrochureBtn->SetToggleHdl( LINK( this, PrintDialog, ToggleRadioHdl ) );
maPropertyToWindowMap[ aPropertyName ].push_back( maNUpPage.mpBrochureBtn );
@@ -1671,7 +1671,7 @@ IMPL_LINK_TYPED( PrintDialog, ModifyHdl, Edit&, rEdit, void )
PropertyValue* PrintDialog::getValueForWindow( vcl::Window* i_pWindow ) const
{
- PropertyValue* pVal = NULL;
+ PropertyValue* pVal = nullptr;
auto it = maControlToPropertyMap.find( i_pWindow );
if( it != maControlToPropertyMap.end() )
{
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 88e1cf1106d7..b438d1e6c009 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -91,7 +91,7 @@ void ImplWheelWindow::dispose()
{
ImplStop();
delete mpTimer;
- mpTimer = NULL;
+ mpTimer = nullptr;
FloatingWindow::dispose();
}
@@ -123,7 +123,7 @@ void ImplWheelWindow::ImplCreateImageList()
ResMgr* pResMgr = ImplGetResMgr();
if( pResMgr )
maImgList.InsertFromHorizontalBitmap
- ( ResId( SV_RESID_BITMAP_SCROLLBMP, *pResMgr ), 6, NULL );
+ ( ResId( SV_RESID_BITMAP_SCROLLBMP, *pResMgr ), 6, nullptr );
}
void ImplWheelWindow::ImplSetWheelMode( sal_uLong nWheelMode )
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 115ec625e159..de21f161c778 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -52,7 +52,7 @@ namespace
void Splitter::ImplInitSplitterData()
{
ImplGetWindowImpl()->mbSplitter = true;
- mpRefWin = NULL;
+ mpRefWin = nullptr;
mnSplitPos = 0;
mnLastSplitPos = 0;
mnStartSplitPos = 0;
@@ -88,7 +88,7 @@ void Splitter::ImplInitHorVer(bool bNew)
void Splitter::ImplInit( vcl::Window* pParent, WinBits nWinStyle )
{
- Window::ImplInit( pParent, nWinStyle, NULL );
+ Window::ImplInit( pParent, nWinStyle, nullptr );
mpRefWin = pParent;
@@ -183,7 +183,7 @@ Splitter* Splitter::ImplFindSibling()
{
// look for another splitter with the same parent but different orientation
vcl::Window *pWin = GetParent()->GetWindow( GetWindowType::FirstChild );
- Splitter *pSplitter = NULL;
+ Splitter *pSplitter = nullptr;
while( pWin )
{
if( pWin->ImplIsSplitter() )
@@ -194,7 +194,7 @@ Splitter* Splitter::ImplFindSibling()
}
pWin = pWin->GetWindow( GetWindowType::Next );
}
- return NULL;
+ return nullptr;
}
bool Splitter::ImplSplitterActive()
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 572a9a4b6966..e6d62d305580 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -111,7 +111,7 @@ ImplSplitItem::ImplSplitItem()
, mnOldSplitSize(0)
, mnOldWidth(0)
, mnOldHeight(0)
- , mpSet(0)
+ , mpSet(nullptr)
, mnId(0)
, mnBits(SplitWindowItemFlags::NONE)
, mbFixed(false)
@@ -130,15 +130,15 @@ void ImplSplitItem::dispose()
{
if (mpSet) {
delete mpSet ;
- mpSet = NULL;
+ mpSet = nullptr;
}
mpWindow.clear();
mpOrgParent.clear();
}
ImplSplitSet::ImplSplitSet() :
- mpWallpaper( NULL ),
- mpBitmap( NULL ),
+ mpWallpaper( nullptr ),
+ mpBitmap( nullptr ),
mnLastSize( 0 ),
mnSplitSize( SPLITWIN_SPLITSIZE ),
mnId( 0 ),
@@ -161,12 +161,12 @@ void ImplSplitSet::dispose()
if ( mpWallpaper ) {
delete mpWallpaper;
- mpWallpaper = NULL;
+ mpWallpaper = nullptr;
}
if ( mpBitmap ) {
delete mpBitmap;
- mpBitmap = NULL;
+ mpBitmap = nullptr;
}
}
@@ -359,7 +359,7 @@ static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, sal_uInt16 nId )
}
}
- return NULL;
+ return nullptr;
}
static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, sal_uInt16 nId, sal_uInt16& rPos )
@@ -387,7 +387,7 @@ static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, sal_uInt16 nId, sal_uInt1
}
}
- return NULL;
+ return nullptr;
}
static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, vcl::Window* pWindow )
@@ -1304,8 +1304,8 @@ void SplitWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
mpMainSet = pNewSet;
mpBaseSet = pNewSet;
- mpSplitSet = NULL;
- mpLastSizes = NULL;
+ mpSplitSet = nullptr;
+ mpLastSizes = nullptr;
mnDX = 0;
mnDY = 0;
mnLeftBorder = 0;
@@ -1404,7 +1404,7 @@ void SplitWindow::dispose()
// delete Sets
if (mpMainSet) {
delete mpMainSet ;
- mpMainSet = NULL; //NULL for base-class callbacks during destruction
+ mpMainSet = nullptr; //NULL for base-class callbacks during destruction
}
DockingWindow::dispose();
}
@@ -2487,8 +2487,8 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingEnded() )
{
delete [] mpLastSizes;
- mpLastSizes = NULL;
- mpSplitSet = NULL;
+ mpLastSizes = nullptr;
+ mpSplitSet = nullptr;
mnMouseOff = 0;
mnMStartPos = 0;
mnMSplitPos = 0;
@@ -2501,9 +2501,9 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
bool SplitWindow::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
{
@@ -2719,7 +2719,7 @@ void SplitWindow::InsertItem( sal_uInt16 nId, long nSize,
sal_uInt16 nPos, sal_uInt16 nIntoSetId,
SplitWindowItemFlags nBits )
{
- InsertItem( nId, NULL, nSize, nPos, nIntoSetId, nBits );
+ InsertItem( nId, nullptr, nSize, nPos, nIntoSetId, nBits );
}
void SplitWindow::RemoveItem( sal_uInt16 nId, bool bHide )
@@ -2743,7 +2743,7 @@ void SplitWindow::RemoveItem( sal_uInt16 nId, bool bHide )
// delete set if required
if ( !pWindow ) {
delete pItem->mpSet ;
- pItem->mpSet = NULL;
+ pItem->mpSet = nullptr;
}
// remove item
@@ -3100,7 +3100,7 @@ void SplitWindow::SetItemSizeRange (sal_uInt16 nId, const Range& rRange)
sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem(mpBaseSet, nId, nPos);
- if (pSet != NULL)
+ if (pSet != nullptr)
{
pSet->mpItems[nPos]->mnMinSize = rRange.Min();
pSet->mpItems[nPos]->mnMaxSize = rRange.Max();
@@ -3121,7 +3121,7 @@ sal_uInt16 SplitWindow::GetSet( sal_uInt16 nId ) const
bool SplitWindow::IsItemValid( sal_uInt16 nId ) const
{
sal_uInt16 nPos;
- ImplSplitSet* pSet = mpBaseSet ? ImplFindItem(mpBaseSet, nId, nPos) : NULL;
+ ImplSplitSet* pSet = mpBaseSet ? ImplFindItem(mpBaseSet, nId, nPos) : nullptr;
if ( pSet )
return true;
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index 3a3e8730565f..cb5f316b94aa 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -148,8 +148,8 @@ void Window::ImplRemoveWindow( bool bRemoveFrameData )
mpWindowImpl->mpParent->mpWindowImpl->mpLastChild = mpWindowImpl->mpPrev;
}
- mpWindowImpl->mpPrev = NULL;
- mpWindowImpl->mpNext = NULL;
+ mpWindowImpl->mpPrev = nullptr;
+ mpWindowImpl->mpNext = nullptr;
}
if ( bRemoveFrameData )
@@ -205,7 +205,7 @@ void Window::ImplToBottomChild()
mpWindowImpl->mpPrev = mpWindowImpl->mpParent->mpWindowImpl->mpLastChild;
mpWindowImpl->mpParent->mpWindowImpl->mpLastChild = this;
mpWindowImpl->mpPrev->mpWindowImpl->mpNext = this;
- mpWindowImpl->mpNext = NULL;
+ mpWindowImpl->mpNext = nullptr;
}
}
@@ -228,7 +228,7 @@ void Window::ImplCalcToTop( ImplCalcToTopData* pPrevData )
{
ImplCalcToTopData* pData = new ImplCalcToTopData;
pPrevData->mpNext = pData;
- pData->mpNext = NULL;
+ pData->mpNext = nullptr;
pData->mpWindow = this;
pData->mpInvalidateRegion = new vcl::Region( aInvalidateRegion );
}
@@ -339,7 +339,7 @@ void Window::ImplStartToTop( ToTopFlags nFlags )
// first calculate paint areas
vcl::Window* pTempOverlapWindow = pOverlapWindow;
- aStartData.mpNext = NULL;
+ aStartData.mpNext = nullptr;
pCurData = &aStartData;
do
{
@@ -577,7 +577,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags )
// Invalidate all windows which are next to each other
// Is INCOMPLETE !!!
Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
- vcl::Window* pWindow = NULL;
+ vcl::Window* pWindow = nullptr;
if ( ImplIsOverlapWindow() )
{
if ( mpWindowImpl->mpOverlapWindow )
@@ -676,7 +676,7 @@ vcl::Window* Window::ImplFindWindow( const Point& rFramePos )
// then we check our window
if ( !mpWindowImpl->mbVisible )
- return NULL;
+ return nullptr;
sal_uInt16 nHitTest = ImplHitTest( rFramePos );
if ( nHitTest & WINDOW_HITTEST_INSIDE )
@@ -692,12 +692,12 @@ vcl::Window* Window::ImplFindWindow( const Point& rFramePos )
}
if ( nHitTest & WINDOW_HITTEST_TRANSPARENT )
- return NULL;
+ return nullptr;
else
return this;
}
- return NULL;
+ return nullptr;
}
bool Window::ImplIsRealParentPath( const vcl::Window* pWindow ) const
@@ -844,7 +844,7 @@ SystemWindow* Window::GetSystemWindow() const
static SystemWindow *ImplGetLastSystemWindow( vcl::Window *pWin )
{
// get the most top-level system window, the one that contains the taskpanelist
- SystemWindow *pSysWin = NULL;
+ SystemWindow *pSysWin = nullptr;
if( !pWin )
return pSysWin;
vcl::Window *pMyParent = pWin;
@@ -867,7 +867,7 @@ void Window::SetParent( vcl::Window* pNewParent )
// check if the taskpanelist would change and move the window pointer accordingly
SystemWindow *pSysWin = ImplGetLastSystemWindow(this);
- SystemWindow *pNewSysWin = NULL;
+ SystemWindow *pNewSysWin = nullptr;
bool bChangeTaskPaneList = false;
if( pSysWin && pSysWin->ImplIsInTaskPaneList( this ) )
{
@@ -907,16 +907,16 @@ void Window::SetParent( vcl::Window* pNewParent )
// check if the overlap window changes
vcl::Window* pOldOverlapWindow;
- vcl::Window* pNewOverlapWindow = NULL;
+ vcl::Window* pNewOverlapWindow = nullptr;
if ( ImplIsOverlapWindow() )
- pOldOverlapWindow = NULL;
+ pOldOverlapWindow = nullptr;
else
{
pNewOverlapWindow = pNewParent->ImplGetFirstOverlapWindow();
if ( mpWindowImpl->mpOverlapWindow.get() != pNewOverlapWindow )
pOldOverlapWindow = mpWindowImpl->mpOverlapWindow;
else
- pOldOverlapWindow = NULL;
+ pOldOverlapWindow = nullptr;
}
// convert windows in the hierarchy
@@ -928,17 +928,17 @@ void Window::SetParent( vcl::Window* pNewParent )
if ( mpWindowImpl->mpFrameData->mpFocusWin )
{
if ( IsWindowOrChild( mpWindowImpl->mpFrameData->mpFocusWin ) )
- mpWindowImpl->mpFrameData->mpFocusWin = NULL;
+ mpWindowImpl->mpFrameData->mpFocusWin = nullptr;
}
if ( mpWindowImpl->mpFrameData->mpMouseMoveWin )
{
if ( IsWindowOrChild( mpWindowImpl->mpFrameData->mpMouseMoveWin ) )
- mpWindowImpl->mpFrameData->mpMouseMoveWin = NULL;
+ mpWindowImpl->mpFrameData->mpMouseMoveWin = nullptr;
}
if ( mpWindowImpl->mpFrameData->mpMouseDownWin )
{
if ( IsWindowOrChild( mpWindowImpl->mpFrameData->mpMouseDownWin ) )
- mpWindowImpl->mpFrameData->mpMouseDownWin = NULL;
+ mpWindowImpl->mpFrameData->mpMouseDownWin = nullptr;
}
}
ImplRemoveWindow( bNewFrame );
@@ -971,7 +971,7 @@ void Window::SetParent( vcl::Window* pNewParent )
if ( bFocusWin ||
(pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow &&
IsWindowOrChild( pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow )) )
- pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow = NULL;
+ pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow = nullptr;
vcl::Window* pOverlapWindow = pOldOverlapWindow->mpWindowImpl->mpFirstOverlap;
while ( pOverlapWindow )
@@ -1041,7 +1041,7 @@ sal_uInt16 Window::GetChildCount() const
vcl::Window* Window::GetChild( sal_uInt16 nChild ) const
{
if (!mpWindowImpl)
- return NULL;
+ return nullptr;
sal_uInt16 nChildCount = 0;
vcl::Window* pChild = mpWindowImpl->mpFirstChild;
@@ -1053,13 +1053,13 @@ vcl::Window* Window::GetChild( sal_uInt16 nChild ) const
nChildCount++;
}
- return NULL;
+ return nullptr;
}
vcl::Window* Window::GetWindow( GetWindowType nType ) const
{
if (!mpWindowImpl)
- return 0;
+ return nullptr;
switch ( nType )
{
@@ -1111,40 +1111,40 @@ vcl::Window* Window::GetWindow( GetWindowType nType ) const
return const_cast<vcl::Window*>(this);
case GetWindowType::FirstTopWindowChild:
- return ImplGetWinData()->maTopWindowChildren.empty() ? NULL : (*ImplGetWinData()->maTopWindowChildren.begin()).get();
+ return ImplGetWinData()->maTopWindowChildren.empty() ? nullptr : (*ImplGetWinData()->maTopWindowChildren.begin()).get();
case GetWindowType::LastTopWindowChild:
- return ImplGetWinData()->maTopWindowChildren.empty() ? NULL : (*ImplGetWinData()->maTopWindowChildren.rbegin()).get();
+ return ImplGetWinData()->maTopWindowChildren.empty() ? nullptr : (*ImplGetWinData()->maTopWindowChildren.rbegin()).get();
case GetWindowType::PrevTopWindowSibling:
{
if ( !mpWindowImpl->mpRealParent )
- return NULL;
+ return nullptr;
const ::std::list< VclPtr<vcl::Window> >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren );
::std::list< VclPtr<vcl::Window> >::const_iterator myPos =
::std::find( rTopWindows.begin(), rTopWindows.end(), this );
if ( myPos == rTopWindows.end() )
- return NULL;
+ return nullptr;
if ( myPos == rTopWindows.begin() )
- return NULL;
+ return nullptr;
return *--myPos;
}
case GetWindowType::NextTopWindowSibling:
{
if ( !mpWindowImpl->mpRealParent )
- return NULL;
+ return nullptr;
const ::std::list< VclPtr<vcl::Window> >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren );
::std::list< VclPtr<vcl::Window> >::const_iterator myPos =
::std::find( rTopWindows.begin(), rTopWindows.end(), this );
if ( ( myPos == rTopWindows.end() ) || ( ++myPos == rTopWindows.end() ) )
- return NULL;
+ return nullptr;
return *myPos;
}
}
- return NULL;
+ return nullptr;
}
bool Window::IsChild( const vcl::Window* pWindow, bool bSystemWindow ) const
@@ -1183,7 +1183,7 @@ void Window::ImplSetFrameParent( const vcl::Window* pParent )
{
DBG_ASSERT( mpWindowImpl->mpFrame != pFrameWindow->mpWindowImpl->mpFrame, "SetFrameParent to own" );
DBG_ASSERT( mpWindowImpl->mpFrame, "no frame" );
- SalFrame* pParentFrame = pParent ? pParent->mpWindowImpl->mpFrame : NULL;
+ SalFrame* pParentFrame = pParent ? pParent->mpWindowImpl->mpFrame : nullptr;
pFrameWindow->mpWindowImpl->mpFrame->SetParent( pParentFrame );
}
pFrameWindow = pFrameWindow->mpWindowImpl->mpFrameData->mpNextFrame;
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index c4a349012faf..c9649aaa8e77 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -53,7 +53,7 @@ public:
StatusBar::ImplData::ImplData()
{
- mpVirDev = NULL;
+ mpVirDev = nullptr;
mbDrawItemFrames = false;
mnItemBorderWidth = 0;
}
@@ -120,7 +120,7 @@ void StatusBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
if ( !(nStyle & (WB_LEFT | WB_RIGHT)) )
nStyle |= WB_RIGHT;
- Window::ImplInit( pParent, nStyle & ~WB_BORDER, NULL );
+ Window::ImplInit( pParent, nStyle & ~WB_BORDER, nullptr );
// remember WinBits
mpItemList = new ImplStatusItemList;
@@ -300,7 +300,7 @@ Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) const
{
Rectangle aRect;
ImplStatusItem* pItem;
- pItem = ( nPos < mpItemList->size() ) ? (*mpItemList)[ nPos ] : NULL;
+ pItem = ( nPos < mpItemList->size() ) ? (*mpItemList)[ nPos ] : nullptr;
if ( pItem )
{
if ( pItem->mbVisible )
@@ -940,7 +940,7 @@ void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uLong nWidth,
pItem->mnBits = nBits;
pItem->mnWidth = (long)nWidth+nFudge+STATUSBAR_OFFSET;
pItem->mnOffset = nOffset;
- pItem->mpUserData = 0;
+ pItem->mpUserData = nullptr;
pItem->mbVisible = true;
// add item to list
@@ -1255,7 +1255,7 @@ void* StatusBar::GetItemData( sal_uInt16 nItemId ) const
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
return (*mpItemList)[ nPos ]->mpUserData;
- return NULL;
+ return nullptr;
}
void StatusBar::RedrawItem(sal_uInt16 nItemId)
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index 0f16a49d717f..0615cf5f69e1 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -82,7 +82,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */,
if ( !pWindow->ImplGetFrameData()->mnFocusId )
{
pWindow->ImplGetFrameData()->mbStartFocusState = true;
- pWindow->ImplGetFrameData()->mnFocusId = Application::PostUserEvent( LINK( pWindow->ImplGetFrameWindow(), vcl::Window, ImplAsyncFocusHdl ), NULL, true );
+ pWindow->ImplGetFrameData()->mnFocusId = Application::PostUserEvent( LINK( pWindow->ImplGetFrameWindow(), vcl::Window, ImplAsyncFocusHdl ), nullptr, true );
}
break;
@@ -108,7 +108,7 @@ void SystemChildWindow::ImplInitSysChild( vcl::Window* pParent, WinBits nStyle,
{
mpWindowImpl->mpSysObj = ImplGetSVData()->mpDefInst->CreateObject( pParent->ImplGetFrame(), pData, bShow );
- Window::ImplInit( pParent, nStyle, NULL );
+ Window::ImplInit( pParent, nStyle, nullptr );
// we do not paint if it is the right SysChild
if ( GetSystemData() )
@@ -122,7 +122,7 @@ void SystemChildWindow::ImplInitSysChild( vcl::Window* pParent, WinBits nStyle,
SystemChildWindow::SystemChildWindow( vcl::Window* pParent, WinBits nStyle ) :
Window( WINDOW_SYSTEMCHILDWINDOW )
{
- ImplInitSysChild( pParent, nStyle, NULL );
+ ImplInitSysChild( pParent, nStyle, nullptr );
}
SystemChildWindow::SystemChildWindow( vcl::Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow ) :
@@ -142,7 +142,7 @@ void SystemChildWindow::dispose()
if ( mpWindowImpl && mpWindowImpl->mpSysObj )
{
ImplGetSVData()->mpDefInst->DestroyObject( mpWindowImpl->mpSysObj );
- mpWindowImpl->mpSysObj = NULL;
+ mpWindowImpl->mpSysObj = nullptr;
}
Window::dispose();
}
@@ -152,7 +152,7 @@ const SystemEnvData* SystemChildWindow::GetSystemData() const
if ( mpWindowImpl->mpSysObj )
return mpWindowImpl->mpSysObj->GetSystemData();
else
- return NULL;
+ return nullptr;
}
void SystemChildWindow::EnableEraseBackground( bool bEnable )
@@ -181,7 +181,7 @@ void SystemChildWindow::ImplTestJavaException( void* pEnv )
if(jsMessage)
{
- const jchar * jcMessage = pJavaEnv->GetStringChars(jsMessage, NULL);
+ const jchar * jcMessage = pJavaEnv->GetStringChars(jsMessage, nullptr);
ouMessage = OUString(jcMessage);
pJavaEnv->ReleaseStringChars(jsMessage, jcMessage);
}
@@ -234,7 +234,7 @@ sal_IntPtr SystemChildWindow::GetParentWindowHandle( bool bUseJava )
rtl_getGlobalProcessId( reinterpret_cast<sal_uInt8*>(aProcessID.getArray()) );
aProcessID[ 16 ] = 0;
OSL_ENSURE(sizeof (sal_Int64) >= sizeof (jvmaccess::VirtualMachine *), "Pointer cannot be represented as sal_Int64");
- sal_Int64 nPointer = reinterpret_cast< sal_Int64 >( static_cast< jvmaccess::VirtualMachine * >(0));
+ sal_Int64 nPointer = reinterpret_cast< sal_Int64 >( static_cast< jvmaccess::VirtualMachine * >(nullptr));
xJavaVM->getJavaVM(aProcessID) >>= nPointer;
xVM = reinterpret_cast< jvmaccess::VirtualMachine * >(nPointer);
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index a8f753800f0c..d353f4607d7d 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -58,7 +58,7 @@ public:
SystemWindow::ImplData::ImplData()
{
- mpTaskPaneList = NULL;
+ mpTaskPaneList = nullptr;
maMaxOutSize = Size( SHRT_MAX, SHRT_MAX );
}
@@ -73,7 +73,7 @@ void SystemWindow::Init()
mpWindowImpl->mbSysWin = true;
mpWindowImpl->mnActivateMode = ActivateModeFlags::GrabFocus;
- mpMenuBar = NULL;
+ mpMenuBar = nullptr;
mbPinned = false;
mbRollUp = false;
mbRollFunc = false;
@@ -84,7 +84,7 @@ void SystemWindow::Init()
mbInitialLayoutDone = false;
mnMenuBarMode = MenuBarMode::Normal;
mnIcon = 0;
- mpDialogParent = NULL;
+ mpDialogParent = nullptr;
//To-Do, reuse maResizeTimer
maLayoutIdle.SetPriority(SchedulerPriority::RESIZE);
@@ -115,7 +115,7 @@ void SystemWindow::dispose()
{
maLayoutIdle.Stop();
delete mpImplData;
- mpImplData = NULL;
+ mpImplData = nullptr;
// Hack to make sure code called from base ~Window does not interpret this
// as a SystemWindow (which it no longer is by then):
@@ -198,7 +198,7 @@ bool SystemWindow::PreNotify( NotifyEvent& rNEvt )
TaskPaneList* SystemWindow::GetTaskPaneList()
{
if( !mpImplData )
- return NULL;
+ return nullptr;
if( mpImplData->mpTaskPaneList )
return mpImplData->mpTaskPaneList ;
else
@@ -909,8 +909,8 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
if ( mpMenuBar != pMenuBar )
{
MenuBar* pOldMenuBar = mpMenuBar;
- vcl::Window* pOldWindow = NULL;
- vcl::Window* pNewWindow=NULL;
+ vcl::Window* pOldWindow = nullptr;
+ vcl::Window* pNewWindow=nullptr;
mpMenuBar = pMenuBar;
if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) )
@@ -918,7 +918,7 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
if ( pOldMenuBar )
pOldWindow = pOldMenuBar->ImplGetWindow();
else
- pOldWindow = NULL;
+ pOldWindow = nullptr;
if ( pOldWindow )
{
CallEventListeners( VCLEVENT_WINDOW_MENUBARREMOVED, static_cast<void*>(pOldMenuBar) );
@@ -934,11 +934,11 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
CallEventListeners( VCLEVENT_WINDOW_MENUBARADDED, static_cast<void*>(pMenuBar) );
}
else
- static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarWindow( NULL );
+ static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarWindow( nullptr );
ImplToBottomChild();
if ( pOldMenuBar )
{
- bool bDelete = (pMenuBar == 0);
+ bool bDelete = (pMenuBar == nullptr);
if( bDelete && pOldWindow )
{
if( mpImplData->mpTaskPaneList )
@@ -946,7 +946,7 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
}
MenuBar::ImplDestroy( pOldMenuBar, bDelete );
if( bDelete )
- pOldWindow = NULL; // will be deleted in MenuBar::ImplDestroy,
+ pOldWindow = nullptr; // will be deleted in MenuBar::ImplDestroy,
}
}
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index c5bea40f1278..3e8531b43cc2 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -25,8 +25,8 @@
void TabDialog::ImplInitTabDialogData()
{
- mpFixedLine = NULL;
- mpViewWindow = NULL;
+ mpFixedLine = nullptr;
+ mpViewWindow = nullptr;
meViewAlign = WindowAlign::Left;
mbPosControls = true;
}
@@ -39,7 +39,7 @@ void TabDialog::ImplPosControls()
Size aCtrlSize( IMPL_MINSIZE_BUTTON_WIDTH, IMPL_MINSIZE_BUTTON_HEIGHT );
long nDownCtrl = 0;
long nOffY = 0;
- vcl::Window* pTabControl = NULL;
+ vcl::Window* pTabControl = nullptr;
vcl::Window* pChild = GetWindow( GetWindowType::FirstChild );
while ( pChild )
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index e5c4c6c4d9f2..e22f91d9402c 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -36,7 +36,7 @@ void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle )
if ( !(nStyle & WB_NODIALOGCONTROL) )
nStyle |= WB_DIALOGCONTROL;
- Window::ImplInit( pParent, nStyle, NULL );
+ Window::ImplInit( pParent, nStyle, nullptr );
ImplInitSettings();
diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index 081947c538e3..e12f8d4ba418 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -180,7 +180,7 @@ bool TaskPaneList::HandleKeyEvent(const KeyEvent& rKeyEvent)
}
// activate next task pane
- vcl::Window *pNextWin = NULL;
+ vcl::Window *pNextWin = nullptr;
if( bSplitterOnly )
pNextWin = FindNextSplitter( *p );
@@ -213,9 +213,9 @@ bool TaskPaneList::HandleKeyEvent(const KeyEvent& rKeyEvent)
// the focus is not in the list: activate first float if F6 was pressed
vcl::Window *pWin;
if( bSplitterOnly )
- pWin = FindNextSplitter( NULL );
+ pWin = FindNextSplitter( nullptr );
else
- pWin = FindNextFloat( NULL, bForward );
+ pWin = FindNextFloat( nullptr, bForward );
if( pWin )
{
ImplTaskPaneListGrabFocus( pWin, bForward );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index cfcf37e8849b..3f414c759056 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -124,7 +124,7 @@ public:
void StartDragging( ToolBox* pDragBox,
const Point& rPos, const Rectangle& rRect,
sal_uInt16 nLineMode, bool bResizeItem,
- void* pData = NULL );
+ void* pData = nullptr );
void Dragging( const Point& rPos );
void EndDragging( bool bOK = true );
void HideDragRect() { if ( mbShowDragRect ) mpDragBox->HideTracking(); }
@@ -658,7 +658,7 @@ const ImplToolItem *ToolBox::ImplGetFirstClippedItem( const ToolBox* pThis )
return &(*it);
++it;
}
- return NULL;
+ return nullptr;
}
Size ToolBox::ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uInt16 nCalcMode )
@@ -1128,12 +1128,12 @@ sal_uInt16 ToolBox::ImplFindItemPos( ToolBox* pBox, const Point& rPos )
ImplTBDragMgr::ImplTBDragMgr()
: mpBoxList(new ImplTBList())
- , mpDragBox(NULL)
+ , mpDragBox(nullptr)
, mnMinWidth(0)
, mnMaxWidth(0)
, mnLineMode(0)
, mnStartLines(0)
- , mpCustomizeData(NULL)
+ , mpCustomizeData(nullptr)
, mbResizeMode(false)
, mbShowDragRect(false)
{
@@ -1173,7 +1173,7 @@ ToolBox* ImplTBDragMgr::FindToolBox( const Rectangle& rRect )
}
}
- return NULL;
+ return nullptr;
}
void ImplTBDragMgr::StartDragging( ToolBox* pToolBox,
@@ -1319,12 +1319,12 @@ void ImplTBDragMgr::EndDragging( bool bOK )
}
}
}
- mpCustomizeData = NULL;
+ mpCustomizeData = nullptr;
mbResizeMode = false;
mpDragBox->Deactivate();
}
- mpDragBox = NULL;
+ mpDragBox = nullptr;
}
void ImplTBDragMgr::UpdateDragRect()
@@ -1349,7 +1349,7 @@ void ToolBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
// initialize variables
ImplGetWindowImpl()->mbToolBox = true;
mpData = new ImplToolBoxPrivateData;
- mpFloatWin = NULL;
+ mpFloatWin = nullptr;
mnDX = 0;
mnDY = 0;
mnMaxItemWidth = 0;
@@ -1642,11 +1642,11 @@ void ToolBox::dispose()
// still connected
if ( mpFloatWin )
mpFloatWin->EndPopupMode( FloatWinPopupEndFlags::Cancel );
- mpFloatWin = NULL;
+ mpFloatWin = nullptr;
// delete private data
delete mpData;
- mpData = NULL;
+ mpData = nullptr;
// remove the lists when there are no more toolbox references to
// the lists
@@ -1660,7 +1660,7 @@ void ToolBox::dispose()
if ( !pSVData->maCtrlData.mpTBDragMgr->size() )
{
delete pSVData->maCtrlData.mpTBDragMgr;
- pSVData->maCtrlData.mpTBDragMgr = NULL;
+ pSVData->maCtrlData.mpTBDragMgr = nullptr;
}
}
mpFloatWin.clear();
@@ -1670,7 +1670,7 @@ void ToolBox::dispose()
ImplToolItem* ToolBox::ImplGetItem( sal_uInt16 nItemId ) const
{
if (!mpData)
- return NULL;
+ return nullptr;
std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
while ( it != mpData->m_aItems.end() )
@@ -1680,7 +1680,7 @@ ImplToolItem* ToolBox::ImplGetItem( sal_uInt16 nItemId ) const
++it;
}
- return NULL;
+ return nullptr;
}
static void ImplAddButtonBorder( long &rWidth, long& rHeight, bool bNativeButtons )
@@ -2399,7 +2399,7 @@ void ToolBox::ImplFormat( bool bResize )
// compute line breaks and visible lines give the current window width (nMax)
// the break indicators will be stored within each item (it->mbBreak)
- mnCurLines = ImplCalcBreaks( nMax, NULL, mbHorz );
+ mnCurLines = ImplCalcBreaks( nMax, nullptr, mbHorz );
// check for scrollbar buttons or dropdown menu
// (if a menu is enabled, this will be used to store clipped
@@ -2411,7 +2411,7 @@ void ToolBox::ImplFormat( bool bResize )
if( !IsMenuEnabled() )
{
nMax -= TB_SPIN_SIZE+TB_SPIN_OFFSET;
- mnCurLines = ImplCalcBreaks( nMax, NULL, mbHorz );
+ mnCurLines = ImplCalcBreaks( nMax, nullptr, mbHorz );
}
// compute scroll rectangles or menu button
@@ -2972,7 +2972,7 @@ void ToolBox::ImplDrawButton(vcl::RenderContext& rRenderContext, const Rectangle
}
if (!bNativeOk)
- vcl::RenderTools::DrawSelectionBackground(rRenderContext, *this, rRect, bIsWindow ? 3 : highlight, bChecked, true, bIsWindow, NULL, 2);
+ vcl::RenderTools::DrawSelectionBackground(rRenderContext, *this, rRect, bIsWindow ? 3 : highlight, bChecked, true, bIsWindow, nullptr, 2);
}
void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint, bool bLayout)
@@ -2988,8 +2988,8 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
rRenderContext.SetFillColor();
ImplToolItem* pItem = &mpData->m_aItems[nPos];
- MetricVector* pVector = bLayout ? &mpData->m_pLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpData->m_pLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpData->m_pLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpData->m_pLayoutData->m_aDisplayText : nullptr;
if (!pItem->mbEnabled)
nHighlight = 0;
@@ -3057,7 +3057,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
pMgr->HideDragRect();
}
else
- pMgr = NULL;
+ pMgr = nullptr;
// during configuration mode visible windows will be drawn in a special way
if ( mbCustomizeMode && pItem->mbShowWindow )
@@ -3346,7 +3346,7 @@ void ToolBox::ImplFloatControl( bool bStart, FloatingWindow* pFloatWindow )
}
else
{
- mpFloatWin = NULL;
+ mpFloatWin = nullptr;
// if focus is still in this toolbox, then the floater was opened by keyboard
// draw current item with highlight and keep old state
@@ -4953,7 +4953,7 @@ void ToolBox::GetFocus()
void ToolBox::LoseFocus()
{
- ImplChangeHighlight( NULL, true );
+ ImplChangeHighlight( nullptr, true );
DockingWindow::LoseFocus();
}
@@ -5069,7 +5069,7 @@ bool ToolBox::ImplOpenItem( vcl::KeyCode aKeyCode )
return bRet;
UpdateCustomMenu();
- mpData->mnEventId = Application::PostUserEvent( LINK( this, ToolBox, ImplCallExecuteCustomMenu ), NULL, true );
+ mpData->mnEventId = Application::PostUserEvent( LINK( this, ToolBox, ImplCallExecuteCustomMenu ), nullptr, true );
}
else if( mnHighItemId && ImplGetItem( mnHighItemId ) &&
(ImplGetItem( mnHighItemId )->mnBits & ToolBoxItemBits::DROPDOWN) )
@@ -5186,13 +5186,13 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
break;
case KEY_END:
{
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
ImplChangeHighlightUpDn( false );
}
break;
case KEY_HOME:
{
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
ImplChangeHighlightUpDn( true );
}
break;
@@ -5235,7 +5235,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
default:
{
sal_uInt16 aKeyGroup = aKeyCode.GetGroup();
- ImplToolItem *pItem = NULL;
+ ImplToolItem *pItem = nullptr;
if( mnHighItemId )
pItem = ImplGetItem( mnHighItemId );
// #i13931# forward alphanum keyinput into embedded control
@@ -5306,7 +5306,7 @@ sal_uInt16 ToolBox::ImplGetItemLine( ImplToolItem* pCurrentItem )
ImplToolItem* ToolBox::ImplGetFirstValidItem( sal_uInt16 nLine )
{
if( !nLine || nLine > mnCurLines )
- return NULL;
+ return nullptr;
nLine--;
@@ -5324,14 +5324,14 @@ ImplToolItem* ToolBox::ImplGetFirstValidItem( sal_uInt16 nLine )
{
++it;
if( it == mpData->m_aItems.end() || it->mbBreak )
- return NULL; // no valid items in this line
+ return nullptr; // no valid items in this line
}
return &(*it);
}
++it;
}
- return (it == mpData->m_aItems.end()) ? NULL : &(*it);
+ return (it == mpData->m_aItems.end()) ? nullptr : &(*it);
}
sal_uInt16 ToolBox::ImplFindItemPos( const ImplToolItem* pItem, const std::vector< ImplToolItem >& rList )
@@ -5362,7 +5362,7 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, bool bNoGrabFocus )
mbChangingHighlight = true;
- ImplToolItem* pOldItem = NULL;
+ ImplToolItem* pOldItem = nullptr;
if ( mnHighItemId )
{
@@ -5452,7 +5452,7 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )
{
// select last valid non-clipped item
std::vector< ImplToolItem >::iterator it = mpData->m_aItems.end();
- ImplToolItem* pItem = NULL;
+ ImplToolItem* pItem = nullptr;
while( it != mpData->m_aItems.begin() )
{
--it;
@@ -5498,11 +5498,11 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )
// select the menu button if a clipped item would be selected
if( (it != mpData->m_aItems.end() && &(*it) == ImplGetFirstClippedItem( this )) && IsMenuEnabled() )
{
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
InvalidateMenuButton();
}
else
- ImplChangeHighlight( (it != mpData->m_aItems.end()) ? &(*it) : NULL );
+ ImplChangeHighlight( (it != mpData->m_aItems.end()) ? &(*it) : nullptr );
return true;
}
else
@@ -5512,13 +5512,13 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )
// docked toolbars have the menubutton as last item - if this button is enabled
if( IsMenuEnabled() && !ImplIsFloatingMode() )
{
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
InvalidateMenuButton();
}
else
{
std::vector< ImplToolItem >::iterator it = mpData->m_aItems.end();
- ImplToolItem* pItem = NULL;
+ ImplToolItem* pItem = nullptr;
while( it != mpData->m_aItems.begin() )
{
--it;
@@ -5552,7 +5552,7 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )
// highlight the menu button if it is the last item
if( IsMenuEnabled() && !ImplIsFloatingMode() )
{
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
InvalidateMenuButton();
return true;
}
@@ -5570,7 +5570,7 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )
// highlight the menu button if it is the last item
if( IsMenuEnabled() && !ImplIsFloatingMode() )
{
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
InvalidateMenuButton();
return true;
}
@@ -5589,7 +5589,7 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )
if( pToolItem->IsClipped() && IsMenuEnabled() )
{
// select the menu button if a clipped item would be selected
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
InvalidateMenuButton();
}
else if( i != nCount )
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index f8dd351fab23..b2b6adf2e969 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -51,11 +51,11 @@ using namespace com::sun::star;
#define TB_SEP_SIZE 8
ImplToolBoxPrivateData::ImplToolBoxPrivateData() :
- m_pLayoutData( NULL )
+ m_pLayoutData( nullptr )
{
meButtonSize = TOOLBOX_BUTTONSIZE_DONTCARE;
mpMenu = new PopupMenu();
- mnEventId = 0;
+ mnEventId = nullptr;
maMenuType = TOOLBOX_MENUTYPE_NONE;
maMenubuttonItem.maItemSize = Size( TB_MENUBUTTON_SIZE+TB_MENUBUTTON_OFFSET, TB_MENUBUTTON_SIZE+TB_MENUBUTTON_OFFSET );
@@ -85,8 +85,8 @@ void ImplToolItem::init(sal_uInt16 nItemId, ToolBoxItemBits nItemBits,
bool bEmptyBtn)
{
mnId = nItemId;
- mpWindow = NULL;
- mpUserData = NULL;
+ mpWindow = nullptr;
+ mpUserData = nullptr;
meType = ToolBoxItemType::BUTTON;
mnBits = nItemBits;
meState = TRISTATE_FALSE;
@@ -744,7 +744,7 @@ void ToolBox::CopyItem( const ToolBox& rToolBox, sal_uInt16 nItemId,
// push ToolBox item onto the list
ImplToolItem aNewItem = rToolBox.mpData->m_aItems[nPos];
// reset state
- aNewItem.mpWindow = NULL;
+ aNewItem.mpWindow = nullptr;
aNewItem.mbShowWindow = false;
mpData->m_aItems.insert( (nNewPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nNewPos : mpData->m_aItems.end(), aNewItem );
@@ -1110,7 +1110,7 @@ void* ToolBox::GetItemData( sal_uInt16 nItemId ) const
if ( pItem )
return pItem->mpUserData;
else
- return NULL;
+ return nullptr;
}
void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
@@ -1315,7 +1315,7 @@ vcl::Window* ToolBox::GetItemWindow( sal_uInt16 nItemId ) const
if ( pItem )
return pItem->mpWindow;
else
- return NULL;
+ return nullptr;
}
void ToolBox::StartSelection()
@@ -1863,7 +1863,7 @@ IMPL_LINK_TYPED( ToolBox, ImplCustomMenuListener, VclMenuEvent&, rEvent, void )
IMPL_LINK_NOARG_TYPED(ToolBox, ImplCallExecuteCustomMenu, void*, void)
{
- mpData->mnEventId = 0;
+ mpData->mnEventId = nullptr;
ImplExecuteCustomMenu();
}
@@ -1939,7 +1939,7 @@ void ToolBox::ExecuteCustomMenu()
// handle custom menu asynchronously
// to avoid problems if the toolbox is closed during menu execute
UpdateCustomMenu();
- mpData->mnEventId = Application::PostUserEvent( LINK( this, ToolBox, ImplCallExecuteCustomMenu ), NULL, true );
+ mpData->mnEventId = Application::PostUserEvent( LINK( this, ToolBox, ImplCallExecuteCustomMenu ), nullptr, true );
}
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index c7f4fd615fd9..48be7171a994 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -93,16 +93,16 @@ Window::Window( vcl::Window* pParent, WinBits nStyle )
{
ImplInitWindowData( WINDOW_WINDOW );
- ImplInit( pParent, nStyle, NULL );
+ ImplInit( pParent, nStyle, nullptr );
}
Window::Window( vcl::Window* pParent, const ResId& rResId )
- : mpWindowImpl(NULL)
+ : mpWindowImpl(nullptr)
{
rResId.SetRT( RSC_WINDOW );
WinBits nStyle = ImplInitRes( rResId );
ImplInitWindowData( WINDOW_WINDOW );
- ImplInit( pParent, nStyle, NULL );
+ ImplInit( pParent, nStyle, nullptr );
ImplLoadRes( rResId );
if ( !(nStyle & WB_HIDE) )
@@ -258,7 +258,7 @@ void Window::dispose()
if ( pSVData->maWinData.mpCaptureWin == this )
ReleaseMouse();
if ( pSVData->maWinData.mpDefDialogParent == this )
- pSVData->maWinData.mpDefDialogParent = NULL;
+ pSVData->maWinData.mpDefDialogParent = nullptr;
#if OSL_DEBUG_LEVEL > 0
if ( true ) // always perform these tests in debug builds
@@ -282,7 +282,7 @@ void Window::dispose()
Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
}
- if (mpWindowImpl->mpFrameData != 0)
+ if (mpWindowImpl->mpFrameData != nullptr)
{
pTempWin = mpWindowImpl->mpFrameData->mpFirstOverlap;
while ( pTempWin )
@@ -345,7 +345,7 @@ void Window::dispose()
}
vcl::Window* pMyParent = GetParent();
- SystemWindow* pMySysWin = NULL;
+ SystemWindow* pMySysWin = nullptr;
while ( pMyParent )
{
@@ -369,7 +369,7 @@ void Window::dispose()
if( mpWindowImpl->mbIsInTaskPaneList )
{
vcl::Window* pMyParent = GetParent();
- SystemWindow* pMySysWin = NULL;
+ SystemWindow* pMySysWin = nullptr;
while ( pMyParent )
{
@@ -416,7 +416,7 @@ void Window::dispose()
{
EndExtTextInput( EndExtTextInputFlags::Complete );
if ( pSVData->maWinData.mpExtTextInputWin == this )
- pSVData->maWinData.mpExtTextInputWin = NULL;
+ pSVData->maWinData.mpExtTextInputWin = nullptr;
}
// check if the focus window is our child
@@ -442,8 +442,8 @@ void Window::dispose()
{
if ( mpWindowImpl->mbFrame )
{
- pSVData->maWinData.mpFocusWin = NULL;
- pOverlapWindow->mpWindowImpl->mpLastFocusWindow = NULL;
+ pSVData->maWinData.mpFocusWin = nullptr;
+ pOverlapWindow->mpWindowImpl->mpLastFocusWindow = nullptr;
}
else
{
@@ -467,43 +467,43 @@ void Window::dispose()
// If the focus was set back to 'this' set it to nothing
if ( pSVData->maWinData.mpFocusWin == this )
{
- pSVData->maWinData.mpFocusWin = NULL;
- pOverlapWindow->mpWindowImpl->mpLastFocusWindow = NULL;
+ pSVData->maWinData.mpFocusWin = nullptr;
+ pOverlapWindow->mpWindowImpl->mpLastFocusWindow = nullptr;
}
}
}
- if ( pOverlapWindow != 0 &&
+ if ( pOverlapWindow != nullptr &&
pOverlapWindow->mpWindowImpl->mpLastFocusWindow == this )
- pOverlapWindow->mpWindowImpl->mpLastFocusWindow = NULL;
+ pOverlapWindow->mpWindowImpl->mpLastFocusWindow = nullptr;
// reset hint for DefModalDialogParent
if( pSVData->maWinData.mpActiveApplicationFrame == this )
- pSVData->maWinData.mpActiveApplicationFrame = NULL;
+ pSVData->maWinData.mpActiveApplicationFrame = nullptr;
// reset marked windows
- if ( mpWindowImpl->mpFrameData != 0 )
+ if ( mpWindowImpl->mpFrameData != nullptr )
{
if ( mpWindowImpl->mpFrameData->mpFocusWin == this )
- mpWindowImpl->mpFrameData->mpFocusWin = NULL;
+ mpWindowImpl->mpFrameData->mpFocusWin = nullptr;
if ( mpWindowImpl->mpFrameData->mpMouseMoveWin == this )
- mpWindowImpl->mpFrameData->mpMouseMoveWin = NULL;
+ mpWindowImpl->mpFrameData->mpMouseMoveWin = nullptr;
if ( mpWindowImpl->mpFrameData->mpMouseDownWin == this )
- mpWindowImpl->mpFrameData->mpMouseDownWin = NULL;
+ mpWindowImpl->mpFrameData->mpMouseDownWin = nullptr;
}
// reset Deactivate-Window
if ( pSVData->maWinData.mpLastDeacWin == this )
- pSVData->maWinData.mpLastDeacWin = NULL;
+ pSVData->maWinData.mpLastDeacWin = nullptr;
if ( mpWindowImpl->mpFrameData )
{
if ( mpWindowImpl->mpFrameData->mnFocusId )
Application::RemoveUserEvent( mpWindowImpl->mpFrameData->mnFocusId );
- mpWindowImpl->mpFrameData->mnFocusId = NULL;
+ mpWindowImpl->mpFrameData->mnFocusId = nullptr;
if ( mpWindowImpl->mpFrameData->mnMouseMoveId )
Application::RemoveUserEvent( mpWindowImpl->mpFrameData->mnMouseMoveId );
- mpWindowImpl->mpFrameData->mnMouseMoveId = NULL;
+ mpWindowImpl->mpFrameData->mnMouseMoveId = nullptr;
}
// release SalGraphics
@@ -568,15 +568,15 @@ void Window::dispose()
assert (mpWindowImpl->mpFrameData->mpNextFrame.get() != pSysWin);
pSysWin->mpWindowImpl->mpFrameData->mpNextFrame = mpWindowImpl->mpFrameData->mpNextFrame;
}
- mpWindowImpl->mpFrame->SetCallback( NULL, NULL );
+ mpWindowImpl->mpFrame->SetCallback( nullptr, nullptr );
pSVData->mpDefInst->DestroyFrame( mpWindowImpl->mpFrame );
- assert (mpWindowImpl->mpFrameData->mnFocusId == NULL);
- assert (mpWindowImpl->mpFrameData->mnMouseMoveId == NULL);
+ assert (mpWindowImpl->mpFrameData->mnFocusId == nullptr);
+ assert (mpWindowImpl->mpFrameData->mnMouseMoveId == nullptr);
delete mpWindowImpl->mpFrameData;
}
// should be the last statements
- delete mpWindowImpl; mpWindowImpl = NULL;
+ delete mpWindowImpl; mpWindowImpl = nullptr;
OutputDevice::dispose();
}
@@ -611,32 +611,32 @@ WindowImpl::WindowImpl( WindowType nType )
maZoom = Fraction( 1, 1 );
maWinRegion = vcl::Region(true);
maWinClipRegion = vcl::Region(true);
- mpWinData = NULL; // Extra Window Data, that we don't need for all windows
- mpOverlapData = NULL; // Overlap Data
- mpFrameData = NULL; // Frame Data
- mpFrame = NULL; // Pointer to frame window
- mpSysObj = NULL;
- mpFrameWindow = NULL; // window to top level parent (same as frame window)
- mpOverlapWindow = NULL; // first overlap parent
- mpBorderWindow = NULL; // Border-Window
- mpClientWindow = NULL; // Client-Window of a FrameWindow
- mpParent = NULL; // parent (incl. BorderWindow)
- mpRealParent = NULL; // real parent (excl. BorderWindow)
- mpFirstChild = NULL; // first child window
- mpLastChild = NULL; // last child window
- mpFirstOverlap = NULL; // first overlap window (only set in overlap windows)
- mpLastOverlap = NULL; // last overlap window (only set in overlap windows)
- mpPrev = NULL; // prev window
- mpNext = NULL; // next window
- mpNextOverlap = NULL; // next overlap window of frame
- mpLastFocusWindow = NULL; // window for focus restore
- mpDlgCtrlDownWindow = NULL; // window for dialog control
- mpFirstDel = NULL; // Dtor notification list
- mpUserData = NULL; // user data
- mpCursor = NULL; // cursor
- mpControlFont = NULL; // font properties
- mpVCLXWindow = NULL;
- mpAccessibleInfos = NULL;
+ mpWinData = nullptr; // Extra Window Data, that we don't need for all windows
+ mpOverlapData = nullptr; // Overlap Data
+ mpFrameData = nullptr; // Frame Data
+ mpFrame = nullptr; // Pointer to frame window
+ mpSysObj = nullptr;
+ mpFrameWindow = nullptr; // window to top level parent (same as frame window)
+ mpOverlapWindow = nullptr; // first overlap parent
+ mpBorderWindow = nullptr; // Border-Window
+ mpClientWindow = nullptr; // Client-Window of a FrameWindow
+ mpParent = nullptr; // parent (incl. BorderWindow)
+ mpRealParent = nullptr; // real parent (excl. BorderWindow)
+ mpFirstChild = nullptr; // first child window
+ mpLastChild = nullptr; // last child window
+ mpFirstOverlap = nullptr; // first overlap window (only set in overlap windows)
+ mpLastOverlap = nullptr; // last overlap window (only set in overlap windows)
+ mpPrev = nullptr; // prev window
+ mpNext = nullptr; // next window
+ mpNextOverlap = nullptr; // next overlap window of frame
+ mpLastFocusWindow = nullptr; // window for focus restore
+ mpDlgCtrlDownWindow = nullptr; // window for dialog control
+ mpFirstDel = nullptr; // Dtor notification list
+ mpUserData = nullptr; // user data
+ mpCursor = nullptr; // cursor
+ mpControlFont = nullptr; // font properties
+ mpVCLXWindow = nullptr;
+ mpAccessibleInfos = nullptr;
maControlForeground = Color( COL_TRANSPARENT ); // no foreground set
maControlBackground = Color( COL_TRANSPARENT ); // no background set
mnLeftBorder = 0; // left border
@@ -650,8 +650,8 @@ WindowImpl::WindowImpl( WindowType nType )
mnX = 0; // X-Position to Parent
mnY = 0; // Y-Position to Parent
mnAbsScreenX = 0; // absolute X-position on screen, used for RTL window positioning
- mpChildClipRegion = NULL; // Child-Clip-Region when ClipChildren
- mpPaintRegion = NULL; // Paint-ClipRegion
+ mpChildClipRegion = nullptr; // Child-Clip-Region when ClipChildren
+ mpPaintRegion = nullptr; // Paint-ClipRegion
mnStyle = 0; // style (init in ImplInitWindow)
mnPrevStyle = 0; // prevstyle (set in SetStyle)
mnExtendedStyle = 0; // extended style (init in ImplInitWindow)
@@ -863,9 +863,9 @@ void Window::ReleaseGraphics( bool bRelease )
else
pSVData->maGDIData.mpLastWinGraphics = mpPrevGraphics;
- mpGraphics = NULL;
- mpPrevGraphics = NULL;
- mpNextGraphics = NULL;
+ mpGraphics = nullptr;
+ mpPrevGraphics = nullptr;
+ mpNextGraphics = nullptr;
}
static sal_Int32 CountDPIScaleFactor(sal_Int32 nDPI)
@@ -933,9 +933,9 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
if ( mpWindowImpl->mbOverlapWin )
{
mpWindowImpl->mpOverlapData = new ImplOverlapData;
- mpWindowImpl->mpOverlapData->mpSaveBackDev = NULL;
- mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL;
- mpWindowImpl->mpOverlapData->mpNextBackWin = NULL;
+ mpWindowImpl->mpOverlapData->mpSaveBackDev = nullptr;
+ mpWindowImpl->mpOverlapData->mpSaveBackRgn = nullptr;
+ mpWindowImpl->mpOverlapData->mpNextBackWin = nullptr;
mpWindowImpl->mpOverlapData->mnSaveBackSize = 0;
mpWindowImpl->mpOverlapData->mbSaveBack = false;
mpWindowImpl->mpOverlapData->mnTopLevel = 1;
@@ -1001,7 +1001,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
break;
}
- SalFrame* pParentFrame = NULL;
+ SalFrame* pParentFrame = nullptr;
if ( pParent )
pParentFrame = pParent->mpWindowImpl->mpFrame;
SalFrame* pFrame;
@@ -1029,16 +1029,16 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
assert (pSVData->maWinData.mpFirstFrame.get() != this);
mpWindowImpl->mpFrameData->mpNextFrame = pSVData->maWinData.mpFirstFrame;
pSVData->maWinData.mpFirstFrame = this;
- mpWindowImpl->mpFrameData->mpFirstOverlap = NULL;
- mpWindowImpl->mpFrameData->mpFocusWin = NULL;
- mpWindowImpl->mpFrameData->mpMouseMoveWin = NULL;
- mpWindowImpl->mpFrameData->mpMouseDownWin = NULL;
- mpWindowImpl->mpFrameData->mpFirstBackWin = NULL;
+ mpWindowImpl->mpFrameData->mpFirstOverlap = nullptr;
+ mpWindowImpl->mpFrameData->mpFocusWin = nullptr;
+ mpWindowImpl->mpFrameData->mpMouseMoveWin = nullptr;
+ mpWindowImpl->mpFrameData->mpMouseDownWin = nullptr;
+ mpWindowImpl->mpFrameData->mpFirstBackWin = nullptr;
mpWindowImpl->mpFrameData->mpFontCollection = pSVData->maGDIData.mpScreenFontList;
mpWindowImpl->mpFrameData->mpFontCache = pSVData->maGDIData.mpScreenFontCache;
mpWindowImpl->mpFrameData->mnAllSaveBackSize = 0;
- mpWindowImpl->mpFrameData->mnFocusId = 0;
- mpWindowImpl->mpFrameData->mnMouseMoveId = 0;
+ mpWindowImpl->mpFrameData->mnFocusId = nullptr;
+ mpWindowImpl->mpFrameData->mnMouseMoveId = nullptr;
mpWindowImpl->mpFrameData->mnLastMouseX = -1;
mpWindowImpl->mpFrameData->mnLastMouseY = -1;
mpWindowImpl->mpFrameData->mnBeforeLastMouseX = -1;
@@ -1259,7 +1259,7 @@ void Window::drawFrameDev( const Point& rPt, const Point& rDevPt, const Size& rD
GDIMetaFile* pOldMetaFile = mpMetaFile;
bool bOldMap = mbMap;
RasterOp eOldROP = GetRasterOp();
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
mbMap = false;
SetRasterOp( ROP_OVERPAINT );
@@ -1297,14 +1297,14 @@ ImplWinData* Window::ImplGetWinData() const
static const char* pNoNWF = getenv( "SAL_NO_NWF" );
const_cast<vcl::Window*>(this)->mpWindowImpl->mpWinData = new ImplWinData;
- mpWindowImpl->mpWinData->mpExtOldText = NULL;
- mpWindowImpl->mpWinData->mpExtOldAttrAry = NULL;
- mpWindowImpl->mpWinData->mpCursorRect = NULL;
+ mpWindowImpl->mpWinData->mpExtOldText = nullptr;
+ mpWindowImpl->mpWinData->mpExtOldAttrAry = nullptr;
+ mpWindowImpl->mpWinData->mpCursorRect = nullptr;
mpWindowImpl->mpWinData->mnCursorExtWidth = 0;
- mpWindowImpl->mpWinData->mpCompositionCharRects = NULL;
+ mpWindowImpl->mpWinData->mpCompositionCharRects = nullptr;
mpWindowImpl->mpWinData->mnCompositionCharRects = 0;
- mpWindowImpl->mpWinData->mpFocusRect = NULL;
- mpWindowImpl->mpWinData->mpTrackRect = NULL;
+ mpWindowImpl->mpWinData->mpFocusRect = nullptr;
+ mpWindowImpl->mpWinData->mpTrackRect = nullptr;
mpWindowImpl->mpWinData->mnTrackFlags = 0;
mpWindowImpl->mpWinData->mnIsTopWindow = (sal_uInt16) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow())
mpWindowImpl->mpWinData->mbMouseOver = false;
@@ -1352,7 +1352,7 @@ SalGraphics* Window::ImplGetFrameGraphics() const
OutputDevice* pFrameWinOutDev = mpWindowImpl->mpFrameWindow;
if ( ! pFrameWinOutDev->AcquireGraphics() )
{
- return NULL;
+ return nullptr;
}
}
mpWindowImpl->mpFrameWindow->mpGraphics->ResetClipRegion();
@@ -1418,7 +1418,7 @@ void Window::ImplAddDel( ImplDelData* pDel ) // TODO: make "const" when incompat
void Window::ImplRemoveDel( ImplDelData* pDel ) // TODO: make "const" when incompatibility ok
{
- pDel->mpWindow = NULL; // #112873# pDel is not associated with a Window anymore
+ pDel->mpWindow = nullptr; // #112873# pDel is not associated with a Window anymore
if ( IsDisposed() )
return;
@@ -1577,8 +1577,8 @@ void Window::ImplPosSizeWindow( long nX, long nY,
long nOldOutOffY = mnOutOffY;
long nOldOutWidth = mnOutWidth;
long nOldOutHeight = mnOutHeight;
- vcl::Region* pOverlapRegion = NULL;
- vcl::Region* pOldRegion = NULL;
+ vcl::Region* pOverlapRegion = nullptr;
+ vcl::Region* pOldRegion = nullptr;
if ( IsReallyVisible() )
{
@@ -1829,7 +1829,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
else
bInvalidate = true;
if ( bInvalidate )
- ImplInvalidateFrameRegion( NULL, InvalidateFlags::Children );
+ ImplInvalidateFrameRegion( nullptr, InvalidateFlags::Children );
}
else
{
@@ -1888,8 +1888,8 @@ void Window::ImplNewInputContext()
SalInputContext aNewContext;
const vcl::Font& rFont = rInputContext.GetFont();
const OUString& rFontName = rFont.GetName();
- ImplFontEntry* pFontEntry = NULL;
- aNewContext.mpFont = NULL;
+ ImplFontEntry* pFontEntry = nullptr;
+ aNewContext.mpFont = nullptr;
if (!rFontName.isEmpty())
{
OutputDevice *pFocusWinOutDev = pFocusWin->GetOutDev();
@@ -2153,8 +2153,8 @@ void Window::SetBorderStyle( WindowBorderStyle nBorderStyle )
// borders in case of NWF drawing. So they need a method to remove their border window
VclPtr<vcl::Window> pBorderWin = mpWindowImpl->mpBorderWindow;
// remove us as border window's client
- pBorderWin->mpWindowImpl->mpClientWindow = NULL;
- mpWindowImpl->mpBorderWindow = NULL;
+ pBorderWin->mpWindowImpl->mpClientWindow = nullptr;
+ mpWindowImpl->mpBorderWindow = nullptr;
mpWindowImpl->mpRealParent = pBorderWin->mpWindowImpl->mpParent;
// reparent us above the border window
SetParent( pBorderWin->mpWindowImpl->mpParent );
@@ -2246,7 +2246,7 @@ void Window::SetCursorRect( const Rectangle* pRect, long nExtTextInputWidth )
else
{
delete pWinData->mpCursorRect;
- pWinData->mpCursorRect = NULL;
+ pWinData->mpCursorRect = nullptr;
}
}
else
@@ -2278,7 +2278,7 @@ void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLe
ImplWinData* pWinData = ImplGetWinData();
delete[] pWinData->mpCompositionCharRects;
pWinData->mbVertical = bVertical;
- pWinData->mpCompositionCharRects = NULL;
+ pWinData->mpCompositionCharRects = nullptr;
pWinData->mnCompositionCharRects = nCompositionLength;
if ( pRect && (nCompositionLength > 0) )
{
@@ -2468,7 +2468,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
InvalidateFlags nInvalidateFlags = InvalidateFlags::Children;
if( ! IsPaintTransparent() )
nInvalidateFlags |= InvalidateFlags::NoTransparent;
- ImplInvalidate( NULL, nInvalidateFlags );
+ ImplInvalidate( nullptr, nInvalidateFlags );
ImplGenerateMouseMove();
}
}
@@ -2555,7 +2555,7 @@ Size Window::GetSizePixel() const
{
ImplDelData aDogtag( const_cast<Window*>(this) );
mpWindowImpl->mpFrameData->maResizeIdle.Stop();
- mpWindowImpl->mpFrameData->maResizeIdle.GetIdleHdl().Call( NULL );
+ mpWindowImpl->mpFrameData->maResizeIdle.GetIdleHdl().Call( nullptr );
if( aDogtag.IsDead() )
return Size(0,0);
}
@@ -3400,7 +3400,7 @@ Reference< XClipboard > Window::GetClipboard()
return mpWindowImpl->mpFrameData->mxClipboard;
}
- return static_cast < XClipboard * > (0);
+ return static_cast < XClipboard * > (nullptr);
}
Reference< XClipboard > Window::GetPrimarySelection()
@@ -3443,7 +3443,7 @@ Reference< XClipboard > Window::GetPrimarySelection()
return mpWindowImpl->mpFrameData->mxSelection;
}
- return static_cast < XClipboard * > (0);
+ return static_cast < XClipboard * > (nullptr);
}
void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect )
@@ -3452,12 +3452,12 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle&
mpOutDevData->mpRecordLayout = pLayout;
mpOutDevData->maRecordRect = rRect;
Paint(*this, rRect);
- mpOutDevData->mpRecordLayout = NULL;
+ mpOutDevData->mpRecordLayout = nullptr;
}
void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly )
{
- DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, NULL, NULL );
+ DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, nullptr, nullptr );
}
void Window::DrawSelectionBackground( const Rectangle& rRect,
@@ -3662,7 +3662,7 @@ void Window::ImplIncModalCount()
{
pParent = pParent->GetParent();
}
- pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow.get() : NULL;
+ pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow.get() : nullptr;
}
}
void Window::ImplDecModalCount()
@@ -3676,7 +3676,7 @@ void Window::ImplDecModalCount()
{
pParent = pParent->GetParent();
}
- pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow.get() : NULL;
+ pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow.get() : nullptr;
}
}
@@ -3897,7 +3897,7 @@ void Window::ApplySettings(vcl::RenderContext& /*rRenderContext*/)
const SystemEnvData* Window::GetSystemData() const
{
- return mpWindowImpl->mpFrame ? mpWindowImpl->mpFrame->GetSystemData() : NULL;
+ return mpWindowImpl->mpFrame ? mpWindowImpl->mpFrame->GetSystemData() : nullptr;
}
Any Window::GetSystemDataAny() const
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 5eaaf6f0eabe..d39810a8f44a 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -341,10 +341,10 @@ void Window::EndTracking( TrackingEventFlags nFlags )
if ( pSVData->maWinData.mpTrackTimer )
{
delete pSVData->maWinData.mpTrackTimer;
- pSVData->maWinData.mpTrackTimer = NULL;
+ pSVData->maWinData.mpTrackTimer = nullptr;
}
- pSVData->maWinData.mpTrackWin = NULL;
+ pSVData->maWinData.mpTrackWin = nullptr;
pSVData->maWinData.mnTrackFlags = StartTrackingFlags::NONE;
ReleaseMouse();
}
@@ -396,11 +396,11 @@ void Window::EndAutoScroll()
if ( pSVData->maWinData.mpAutoScrollWin.get() == this )
{
- pSVData->maWinData.mpAutoScrollWin = NULL;
+ pSVData->maWinData.mpAutoScrollWin = nullptr;
pSVData->maWinData.mnAutoScrollFlags = StartAutoScrollFlags::NONE;
pSVData->maAppData.mpWheelWindow->ImplStop();
pSVData->maAppData.mpWheelWindow->doLazyDelete();
- pSVData->maAppData.mpWheelWindow = NULL;
+ pSVData->maAppData.mpWheelWindow = nullptr;
}
}
@@ -512,7 +512,7 @@ void Window::SetControlFont()
if (mpWindowImpl && mpWindowImpl->mpControlFont)
{
delete mpWindowImpl->mpControlFont;
- mpWindowImpl->mpControlFont = NULL;
+ mpWindowImpl->mpControlFont = nullptr;
CompatStateChanged(StateChangedType::ControlFont);
}
}
@@ -762,7 +762,7 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
nLines = pData->GetNotchDelta() * (long)nScrollLines;
if ( nLines )
{
- ImplHandleScroll( NULL,
+ ImplHandleScroll( nullptr,
0L,
pData->IsHorz() ? pHScrl : pVScrl,
nLines );
@@ -931,27 +931,27 @@ vcl::Window* Window::ImplGetWindow()
ImplFrameData* Window::ImplGetFrameData()
{
- return mpWindowImpl ? mpWindowImpl->mpFrameData : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpFrameData : nullptr;
}
SalFrame* Window::ImplGetFrame() const
{
- return mpWindowImpl ? mpWindowImpl->mpFrame : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpFrame : nullptr;
}
vcl::Window* Window::ImplGetParent() const
{
- return mpWindowImpl ? mpWindowImpl->mpParent.get() : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpParent.get() : nullptr;
}
vcl::Window* Window::ImplGetClientWindow() const
{
- return mpWindowImpl ? mpWindowImpl->mpClientWindow.get() : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpClientWindow.get() : nullptr;
}
vcl::Window* Window::ImplGetBorderWindow() const
{
- return mpWindowImpl ? mpWindowImpl->mpBorderWindow.get() : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpBorderWindow.get() : nullptr;
}
vcl::Window* Window::ImplGetFirstOverlapWindow()
@@ -972,7 +972,7 @@ const vcl::Window* Window::ImplGetFirstOverlapWindow() const
vcl::Window* Window::ImplGetFrameWindow() const
{
- return mpWindowImpl ? mpWindowImpl->mpFrameWindow.get() : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpFrameWindow.get() : nullptr;
}
bool Window::IsDockingWindow() const
@@ -1148,7 +1148,7 @@ const InputContext& Window::GetInputContext() const
bool Window::IsControlFont() const
{
- return (mpWindowImpl->mpControlFont != 0);
+ return (mpWindowImpl->mpControlFont != nullptr);
}
Color Window::GetControlForeground() const
@@ -1178,7 +1178,7 @@ bool Window::IsInPaint() const
vcl::Window* Window::GetParent() const
{
- return mpWindowImpl ? mpWindowImpl->mpRealParent.get() : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpRealParent.get() : nullptr;
}
bool Window::IsVisible() const
@@ -1280,7 +1280,7 @@ bool Window::IsWait() const
vcl::Cursor* Window::GetCursor() const
{
if (!mpWindowImpl)
- return NULL;
+ return nullptr;
return mpWindowImpl->mpCursor;
}
@@ -1338,7 +1338,7 @@ const Pointer& Window::GetPointer() const
VCLXWindow* Window::GetWindowPeer() const
{
- return mpWindowImpl ? mpWindowImpl->mpVCLXWindow : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpVCLXWindow : nullptr;
}
void Window::SetPosPixel( const Point& rNewPos )
@@ -2012,7 +2012,7 @@ void Window::remove_mnemonic_label(FixedText *pLabel)
if (aFind == v.end())
return;
v.erase(aFind);
- pLabel->set_mnemonic_widget(NULL);
+ pLabel->set_mnemonic_widget(nullptr);
}
std::vector<VclPtr<FixedText> > Window::list_mnemonic_labels() const
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index ae7272735451..544ea6e95d3a 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -196,8 +196,8 @@ static void ImplSetMousePointer( vcl::Window* pChild )
pChild->ImplGetFrame()->SetPointer( pChild->ImplGetMousePointer() );
}
-static bool ImplCallCommand( vcl::Window* pChild, CommandEventId nEvt, void* pData = NULL,
- bool bMouse = false, Point* pPos = NULL )
+static bool ImplCallCommand( vcl::Window* pChild, CommandEventId nEvt, void* pData = nullptr,
+ bool bMouse = false, Point* pPos = nullptr )
{
Point aPos;
if ( pPos )
@@ -255,7 +255,7 @@ static void ContextMenuEventLink( void* pCEvent, void* )
if( ! pEv->aDelData.IsDead() )
{
pEv->pWindow->ImplRemoveDel( &pEv->aDelData );
- ImplCallCommand( pEv->pWindow, CommandEventId::ContextMenu, NULL, true, &pEv->aChildPos );
+ ImplCallCommand( pEv->pWindow, CommandEventId::ContextMenu, nullptr, true, &pEv->aChildPos );
}
delete pEv;
}
@@ -266,7 +266,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
{
ImplSVData* pSVData = ImplGetSVData();
Point aMousePos( nX, nY );
- vcl::Window* pChild(NULL);
+ vcl::Window* pChild(nullptr);
bool bRet(false);
sal_uInt16 nClicks(0);
ImplFrameData* pWinFrameData = pWindow->ImplGetFrameData();
@@ -349,7 +349,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
else
{
if ( bMouseLeave )
- pChild = NULL;
+ pChild = nullptr;
else
pChild = pWindow->ImplFindWindow( aMousePos );
}
@@ -488,7 +488,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
// create a uno mouse event out of the available data
::com::sun::star::awt::MouseEvent aMouseEvent(
- static_cast < ::com::sun::star::uno::XInterface * > ( 0 ),
+ static_cast < ::com::sun::star::uno::XInterface * > ( nullptr ),
#ifdef MACOSX
nCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_MOD3),
#else
@@ -544,13 +544,13 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
aNLeaveEvt.GetWindow()->ImplNotifyKeyMouseCommandEventListeners( aNLeaveEvt );
}
- pWinFrameData->mpMouseMoveWin = NULL;
+ pWinFrameData->mpMouseMoveWin = nullptr;
pWinFrameData->mbInMouseMove = false;
if ( pChild )
{
if ( aDelData2.IsDead() )
- pChild = NULL;
+ pChild = nullptr;
else
pChild->ImplRemoveDel( &aDelData2 );
}
@@ -787,9 +787,9 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
{
MouseMiddleButtonAction nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction();
if ( nMiddleAction == MouseMiddleButtonAction::AutoScroll )
- bRet = !ImplCallCommand( pChild, CommandEventId::StartAutoScroll, NULL, true, &aChildPos );
+ bRet = !ImplCallCommand( pChild, CommandEventId::StartAutoScroll, nullptr, true, &aChildPos );
else if ( nMiddleAction == MouseMiddleButtonAction::PasteSelection )
- bRet = !ImplCallCommand( pChild, CommandEventId::PasteSelection, NULL, true, &aChildPos );
+ bRet = !ImplCallCommand( pChild, CommandEventId::PasteSelection, nullptr, true, &aChildPos );
}
else
{
@@ -818,7 +818,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
Application::PostUserEvent( Link<void*,void>( pEv, ContextMenuEventLink ) );
}
else
- bRet = ! ImplCallCommand( pChild, CommandEventId::ContextMenu, NULL, true, &aChildPos );
+ bRet = ! ImplCallCommand( pChild, CommandEventId::ContextMenu, nullptr, true, &aChildPos );
}
}
}
@@ -836,8 +836,8 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow )
pSVData->maAppData.mnLastInputTime = tools::Time::GetSystemTicks();
// #127104# workaround for destroyed windows
- if( pWindow->ImplGetWindowImpl() == NULL )
- return 0;
+ if( pWindow->ImplGetWindowImpl() == nullptr )
+ return nullptr;
// find window - is every time the window which has currently the
// focus or the last time the focus.
@@ -853,7 +853,7 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow )
// no child - than no input
if ( !pChild )
- return 0;
+ return nullptr;
// We call also KeyInput if we haven't the focus, because on Unix
// system this is often the case when a Lookup Choice Window has
@@ -864,7 +864,7 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow )
// no keyinput to disabled windows
if ( !pChild->IsEnabled() || !pChild->IsInputEnabled() || pChild->IsInModalMode() )
- return 0;
+ return nullptr;
return pChild;
}
@@ -1153,7 +1153,7 @@ static bool ImplHandleExtTextInput( vcl::Window* pWindow,
sal_Int32 nCursorPos, sal_uInt16 nCursorFlags )
{
ImplSVData* pSVData = ImplGetSVData();
- vcl::Window* pChild = NULL;
+ vcl::Window* pChild = nullptr;
int nTries = 200;
while( nTries-- )
@@ -1180,7 +1180,7 @@ static bool ImplHandleExtTextInput( vcl::Window* pWindow,
if ( pWinData->mpExtOldAttrAry )
{
delete [] pWinData->mpExtOldAttrAry;
- pWinData->mpExtOldAttrAry = NULL;
+ pWinData->mpExtOldAttrAry = nullptr;
}
pSVData->maWinData.mpExtTextInputWin = pChild;
ImplCallCommand( pChild, CommandEventId::StartExtTextInput );
@@ -1230,7 +1230,7 @@ static bool ImplHandleExtTextInput( vcl::Window* pWindow,
if ( pWinData->mpExtOldAttrAry )
{
delete [] pWinData->mpExtOldAttrAry;
- pWinData->mpExtOldAttrAry = NULL;
+ pWinData->mpExtOldAttrAry = nullptr;
}
if ( pTextAttr )
{
@@ -1249,17 +1249,17 @@ static bool ImplHandleEndExtTextInput( vcl::Window* /* pWindow */ )
if ( pChild )
{
pChild->ImplGetWindowImpl()->mbExtTextInput = false;
- pSVData->maWinData.mpExtTextInputWin = NULL;
+ pSVData->maWinData.mpExtTextInputWin = nullptr;
ImplWinData* pWinData = pChild->ImplGetWinData();
if ( pWinData->mpExtOldText )
{
delete pWinData->mpExtOldText;
- pWinData->mpExtOldText = NULL;
+ pWinData->mpExtOldText = nullptr;
}
if ( pWinData->mpExtOldAttrAry )
{
delete [] pWinData->mpExtOldAttrAry;
- pWinData->mpExtOldAttrAry = NULL;
+ pWinData->mpExtOldAttrAry = nullptr;
}
nRet = !ImplCallCommand( pChild, CommandEventId::EndExtTextInput );
}
@@ -1308,9 +1308,9 @@ static void ImplHandleExtTextInputPos( vcl::Window* pWindow,
if ( !rInputWidth )
rInputWidth = rRect.GetWidth();
}
- if (pVertical != 0)
+ if (pVertical != nullptr)
*pVertical
- = pChild != 0 && pChild->GetInputContext().GetFont().IsVertical();
+ = pChild != nullptr && pChild->GetInputContext().GetFont().IsVertical();
}
static bool ImplHandleInputContextChange( vcl::Window* pWindow, LanguageType eNewLang )
@@ -1395,7 +1395,7 @@ bool HandleGestureEventBase::Setup()
vcl::Window* HandleGestureEventBase::FindTarget()
{
// first check any floating window ( eg. drop down listboxes)
- vcl::Window *pMouseWindow = NULL;
+ vcl::Window *pMouseWindow = nullptr;
if (m_pSVData->maWinData.mpFirstFloat && !m_pSVData->maWinData.mpCaptureWin &&
!m_pSVData->maWinData.mpFirstFloat->ImplIsFloatPopupModeWindow( m_pWindow ) )
@@ -1433,7 +1433,7 @@ vcl::Window* HandleGestureEventBase::FindTarget()
vcl::Window *HandleGestureEventBase::Dispatch(vcl::Window* pMouseWindow)
{
- vcl::Window *pDispatchedTo = NULL;
+ vcl::Window *pDispatchedTo = nullptr;
if (acceptableWheelScrollTarget(pMouseWindow) && pMouseWindow->IsEnabled())
{
@@ -1529,7 +1529,7 @@ bool HandleWheelEvent::HandleEvent(const SalWheelMouseEvent& rEvt)
pPreviousWindow = Dispatch(pMouseWindow);
- return pPreviousWindow != NULL;
+ return pPreviousWindow != nullptr;
}
class HandleGestureEvent : public HandleGestureEventBase
@@ -1549,7 +1549,7 @@ bool HandleGestureEvent::HandleEvent()
vcl::Window *pTarget = FindTarget();
- bool bHandled = Dispatch(pTarget) != NULL;
+ bool bHandled = Dispatch(pTarget) != nullptr;
return bHandled;
}
@@ -1771,7 +1771,7 @@ static void ImplActivateFloatingWindows( vcl::Window* pWindow, bool bActive )
IMPL_LINK_NOARG_TYPED(vcl::Window, ImplAsyncFocusHdl, void*, void)
{
- ImplGetWindowImpl()->mpFrameData->mnFocusId = 0;
+ ImplGetWindowImpl()->mpFrameData->mnFocusId = nullptr;
// If the status has been preserved, because we got back the focus
// in the meantime, we do nothing
@@ -1829,7 +1829,7 @@ IMPL_LINK_NOARG_TYPED(vcl::Window, ImplAsyncFocusHdl, void*, void)
// FocusWindow umsetzen
vcl::Window* pOverlapWindow = pFocusWin->ImplGetFirstOverlapWindow();
pOverlapWindow->ImplGetWindowImpl()->mpLastFocusWindow = pFocusWin;
- pSVData->maWinData.mpFocusWin = NULL;
+ pSVData->maWinData.mpFocusWin = nullptr;
if ( pFocusWin->ImplGetWindowImpl()->mpCursor )
pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide( true );
@@ -1864,7 +1864,7 @@ IMPL_LINK_NOARG_TYPED(vcl::Window, ImplAsyncFocusHdl, void*, void)
NotifyEvent aNEvt( MouseNotifyEvent::LOSEFOCUS, pFocusWin );
if ( !ImplCallPreNotify( aNEvt ) )
pFocusWin->CompatLoseFocus();
- pFocusWin->ImplCallDeactivateListeners( NULL );
+ pFocusWin->ImplCallDeactivateListeners( nullptr );
}
// XXX
}
@@ -1885,7 +1885,7 @@ static void ImplHandleGetFocus( vcl::Window* pWindow )
if ( !pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId )
{
pWindow->ImplGetWindowImpl()->mpFrameData->mbStartFocusState = !pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus;
- pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, vcl::Window, ImplAsyncFocusHdl ), NULL, true);
+ pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, vcl::Window, ImplAsyncFocusHdl ), nullptr, true);
vcl::Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin;
if ( pFocusWin && pFocusWin->ImplGetWindowImpl()->mpCursor )
pFocusWin->ImplGetWindowImpl()->mpCursor->ImplShow();
@@ -1914,7 +1914,7 @@ static void ImplHandleLoseFocus( vcl::Window* pWindow )
if ( !pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId )
{
pWindow->ImplGetWindowImpl()->mpFrameData->mbStartFocusState = !pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus;
- pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, vcl::Window, ImplAsyncFocusHdl ), NULL, true );
+ pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, vcl::Window, ImplAsyncFocusHdl ), nullptr, true );
}
vcl::Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin;
@@ -2379,7 +2379,7 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalFrame* /*pFrame*/,
// #119709# for some unknown reason it is possible to receive events (in this case key events)
// although the corresponding VCL window must have been destroyed already
// at least ImplGetWindowImpl() was NULL in these cases, so check this here
- if( pWindow->ImplGetWindowImpl() == NULL )
+ if( pWindow->ImplGetWindowImpl() == nullptr )
return false;
switch ( nEvent )
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 3881f15009d5..78dc4bb06e0d 100644
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -50,7 +50,7 @@ void WorkWindow::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentDat
nFrameStyle |= BORDERWINDOW_STYLE_APP;
VclPtrInstance<ImplBorderWindow> pBorderWin( pParent, pSystemParentData, nStyle, nFrameStyle );
- Window::ImplInit( pBorderWin, nStyle & (WB_3DLOOK | WB_CLIPCHILDREN | WB_DIALOGCONTROL | WB_SYSTEMFLOATWIN), NULL );
+ Window::ImplInit( pBorderWin, nStyle & (WB_3DLOOK | WB_CLIPCHILDREN | WB_DIALOGCONTROL | WB_SYSTEMFLOATWIN), nullptr );
pBorderWin->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
mpWindowImpl->mpBorderWindow = pBorderWin;
@@ -108,7 +108,7 @@ WorkWindow::WorkWindow( SystemParentData* pParent ) :
{
ImplInitWorkWindowData();
mbSysChild = true;
- ImplInit( NULL, 0, pParent );
+ ImplInit( nullptr, 0, pParent );
}
WorkWindow::~WorkWindow()
@@ -121,7 +121,7 @@ void WorkWindow::dispose()
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maWinData.mpAppWin == this )
{
- pSVData->maWinData.mpAppWin = NULL;
+ pSVData->maWinData.mpAppWin = nullptr;
Application::Quit();
}
SystemWindow::dispose();