summaryrefslogtreecommitdiff
path: root/vcl/osx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 16:20:12 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 16:20:39 +0100
commitd1775349e4ea619aa7b634bcd7161374107038a1 (patch)
tree300c60723c49ec7601f6ac886f37805b5afa0a6a /vcl/osx
parentaa4d195143fec01fba5c0a0f41950f1cbddbc9bd (diff)
loplugin:nullptr (automatic rewrite; Mac-specific code)
Change-Id: I90a955eb3e485723bb81e7164edcf60f7b0e94c7
Diffstat (limited to 'vcl/osx')
-rw-r--r--vcl/osx/DataFlavorMapping.cxx6
-rw-r--r--vcl/osx/DragSource.cxx6
-rw-r--r--vcl/osx/DropTarget.cxx2
-rw-r--r--vcl/osx/HtmlFmtFlt.cxx2
-rw-r--r--vcl/osx/OSXTransferable.cxx4
-rw-r--r--vcl/osx/a11yfocustracker.cxx4
-rw-r--r--vcl/osx/a11yrolehelper.mm2
-rw-r--r--vcl/osx/clipboard.cxx10
-rw-r--r--vcl/osx/clipboard.hxx2
-rw-r--r--vcl/osx/printaccessoryview.mm2
-rw-r--r--vcl/osx/saldata.cxx58
-rw-r--r--vcl/osx/salframe.cxx42
-rw-r--r--vcl/osx/salframeview.mm46
-rw-r--r--vcl/osx/salinst.cxx34
-rw-r--r--vcl/osx/salmenu.cxx42
-rw-r--r--vcl/osx/salnativewidgets.cxx24
-rw-r--r--vcl/osx/salnsmenu.mm4
-rw-r--r--vcl/osx/salobj.cxx4
-rw-r--r--vcl/osx/salprn.cxx8
-rw-r--r--vcl/osx/vclnsapp.mm14
20 files changed, 158 insertions, 158 deletions
diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx
index 1d33aeaf4946..081f6e5f53dc 100644
--- a/vcl/osx/DataFlavorMapping.cxx
+++ b/vcl/osx/DataFlavorMapping.cxx
@@ -364,7 +364,7 @@ NSData* PNGDataProvider::getSystemData()
mData >>= pngData;
Sequence<sal_Int8> imgData;
- NSData* sysData = NULL;
+ NSData* sysData = nullptr;
if( PNGToImage( pngData, imgData, meImageType))
sysData = [NSData dataWithBytes: imgData.getArray() length: imgData.getLength()];
@@ -505,7 +505,7 @@ DataFlavor DataFlavorMapper::systemToOpenOfficeFlavor( const NSString* systemDat
const NSString* DataFlavorMapper::openOfficeToSystemFlavor( const DataFlavor& oOOFlavor, bool& rbInternal) const
{
- const NSString* sysFlavor = NULL;
+ const NSString* sysFlavor = nullptr;
rbInternal = false;
for( size_t i = 0; i < SIZE_FLAVOR_MAP; ++i )
@@ -657,7 +657,7 @@ NSArray* DataFlavorMapper::flavorSequenceToTypesArray(const com::sun::star::uno:
{
const NSString* str = openOfficeToSystemFlavor(flavors[i], bNeedDummyInternalFlavor);
- if (str != NULL)
+ if (str != nullptr)
{
[str retain];
[array addObject: str];
diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx
index bc3ee9700284..c72b4bcaa2d0 100644
--- a/vcl/osx/DragSource.cxx
+++ b/vcl/osx/DragSource.cxx
@@ -143,8 +143,8 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
DragSource::DragSource():
WeakComponentImplHelper<XDragSource, XInitialization, XServiceInfo>(m_aMutex),
- mView(NULL),
- mpFrame(NULL),
+ mView(nullptr),
+ mpFrame(nullptr),
mLastMouseEventBeforeStartDrag(nil),
m_MouseButton(0)
{
@@ -231,7 +231,7 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
m_MouseButton= mMouseEvent.Buttons;
mXDragSrcListener = listener;
mXCurrentContext = static_cast<XDragSourceContext*>(new DragSourceContext);
- rtl::Reference<AquaClipboard> clipb(new AquaClipboard(NULL, false));
+ rtl::Reference<AquaClipboard> clipb(new AquaClipboard(nullptr, false));
g_XTransferable = transferable;
clipb->setContents(g_XTransferable, uno::Reference<XClipboardOwner>());
mDragSourceActions = sourceActions;
diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx
index bd7467db64cf..9253598ca9c7 100644
--- a/vcl/osx/DropTarget.cxx
+++ b/vcl/osx/DropTarget.cxx
@@ -117,7 +117,7 @@ namespace /* private */
DropTarget::DropTarget() :
WeakComponentImplHelper<XInitialization, XDropTarget, XDropTargetDragContext, XDropTargetDropContext, XServiceInfo>(m_aMutex),
mView(nil),
- mpFrame(NULL),
+ mpFrame(nullptr),
mDropTargetHelper(nil),
mbActive(false),
mDragSourceSupportedActions(DNDConstants::ACTION_NONE),
diff --git a/vcl/osx/HtmlFmtFlt.cxx b/vcl/osx/HtmlFmtFlt.cxx
index 239476dd7eea..301d9d1b6148 100644
--- a/vcl/osx/HtmlFmtFlt.cxx
+++ b/vcl/osx/HtmlFmtFlt.cxx
@@ -130,7 +130,7 @@ Sequence<sal_Int8> HTMLFormatToTextHtml(const Sequence<sal_Int8>& aHTMLFormat)
// It doesn't seem to be HTML? Well then simply return what has been
// provided in non-debug builds
- if (htmlStartTag == NULL)
+ if (htmlStartTag == nullptr)
{
return aHTMLFormat;
}
diff --git a/vcl/osx/OSXTransferable.cxx b/vcl/osx/OSXTransferable.cxx
index 120f6b169220..4c75bbcecc30 100644
--- a/vcl/osx/OSXTransferable.cxx
+++ b/vcl/osx/OSXTransferable.cxx
@@ -122,7 +122,7 @@ Any SAL_CALL OSXTransferable::getTransferData( const DataFlavor& aFlavor )
dp = DataFlavorMapper::getDataProvider(sysFormat, sysData);
}
- if (dp.get() == NULL)
+ if (dp.get() == nullptr)
{
throw UnsupportedFlavorException("AquaClipboard: Unsupported data flavor",
static_cast<XTransferable*>(this));
@@ -151,7 +151,7 @@ void OSXTransferable::initClipboardItemList()
{
NSArray* pboardFormats = [mPasteboard types];
- if (pboardFormats == NULL)
+ if (pboardFormats == nullptr)
{
throw RuntimeException("AquaClipboard: Cannot get clipboard data",
static_cast<XTransferable*>(this));
diff --git a/vcl/osx/a11yfocustracker.cxx b/vcl/osx/a11yfocustracker.cxx
index 8823ba8df2fe..03eabfa7cfdc 100644
--- a/vcl/osx/a11yfocustracker.cxx
+++ b/vcl/osx/a11yfocustracker.cxx
@@ -128,8 +128,8 @@ void AquaA11yFocusTracker::toolbox_open_floater(vcl::Window *pWindow)
{
bool bToolboxFound = false;
bool bFloatingWindowFound = false;
- vcl::Window * pFloatingWindow = NULL;
- while ( pWindow != NULL ) {
+ vcl::Window * pFloatingWindow = nullptr;
+ while ( pWindow != nullptr ) {
if ( pWindow->GetType() == WINDOW_TOOLBOX ) {
bToolboxFound = true;
} else if ( pWindow->GetType() == WINDOW_FLOATINGWINDOW ) {
diff --git a/vcl/osx/a11yrolehelper.mm b/vcl/osx/a11yrolehelper.mm
index 8d14fc77ab76..f3cb57dd1416 100644
--- a/vcl/osx/a11yrolehelper.mm
+++ b/vcl/osx/a11yrolehelper.mm
@@ -33,7 +33,7 @@ using namespace ::com::sun::star::uno;
+(id)simpleMapNativeRoleFrom: (XAccessibleContext *) accessibleContext {
id nativeRole = nil;
- if (accessibleContext == NULL)
+ if (accessibleContext == nullptr)
return nativeRole;
switch( accessibleContext -> getAccessibleRole() ) {
diff --git a/vcl/osx/clipboard.cxx b/vcl/osx/clipboard.cxx
index e674b74e95a9..d57e4bcf01cb 100644
--- a/vcl/osx/clipboard.cxx
+++ b/vcl/osx/clipboard.cxx
@@ -61,7 +61,7 @@ using namespace comphelper;
-(void)disposing
{
- pAquaClipboard = NULL;
+ pAquaClipboard = nullptr;
}
@end
@@ -86,7 +86,7 @@ AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard
mpDataFlavorMapper = DataFlavorMapperPtr_t(new DataFlavorMapper());
- if (pasteboard != NULL)
+ if (pasteboard != nullptr)
{
mPasteboard = pasteboard;
mIsSystemPasteboard = false;
@@ -289,9 +289,9 @@ void AquaClipboard::provideDataForType(NSPasteboard* sender, const NSString* typ
if( mXClipboardContent.is() )
{
DataProviderPtr_t dp = mpDataFlavorMapper->getDataProvider(type, mXClipboardContent);
- NSData* pBoardData = NULL;
+ NSData* pBoardData = nullptr;
- if (dp.get() != NULL)
+ if (dp.get() != nullptr)
{
pBoardData = (NSData*)dp->getSystemData();
[sender setData: pBoardData forType:const_cast<NSString*>(type)];
@@ -312,7 +312,7 @@ void SAL_CALL AquaClipboard::flushClipboard()
{
const NSString* sysType = mpDataFlavorMapper->openOfficeToSystemFlavor(flavorList[i], bInternal);
- if (sysType != NULL)
+ if (sysType != nullptr)
{
provideDataForType(mPasteboard, sysType);
}
diff --git a/vcl/osx/clipboard.hxx b/vcl/osx/clipboard.hxx
index ee769ad5b8dc..5e0edecbe8a3 100644
--- a/vcl/osx/clipboard.hxx
+++ b/vcl/osx/clipboard.hxx
@@ -80,7 +80,7 @@ public:
system clipboard will be created (bUseSystemClipboard == true) or if
the DragPasteboard if bUseSystemClipboard == false
*/
- AquaClipboard(NSPasteboard* pasteboard = NULL,
+ AquaClipboard(NSPasteboard* pasteboard = nullptr,
bool bUseSystemClipboard = true);
virtual ~AquaClipboard();
diff --git a/vcl/osx/printaccessoryview.mm b/vcl/osx/printaccessoryview.mm
index 4579b70b8732..075a396cb1c7 100644
--- a/vcl/osx/printaccessoryview.mm
+++ b/vcl/osx/printaccessoryview.mm
@@ -984,7 +984,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
[pAccessoryController withPrinterController: pController];
[pAccessoryController withViewState: pState];
- NSView* pCurParent = 0;
+ NSView* pCurParent = nullptr;
long nCurY = 0;
long nCurX = 0;
NSSize aMaxTabSize = NSZeroSize;
diff --git a/vcl/osx/saldata.cxx b/vcl/osx/saldata.cxx
index ea89aa5502ba..549e1cf882b8 100644
--- a/vcl/osx/saldata.cxx
+++ b/vcl/osx/saldata.cxx
@@ -26,7 +26,7 @@
#import "apple_remote/RemoteMainController.h"
-oslThreadKey SalData::s_aAutoReleaseKey = 0;
+oslThreadKey SalData::s_aAutoReleaseKey = nullptr;
static void SAL_CALL releasePool( void* pPool )
{
@@ -36,26 +36,26 @@ static void SAL_CALL releasePool( void* pPool )
SalData::SalData()
:
- mpTimerProc( NULL ),
- mpFirstInstance( NULL ),
- mpFirstObject( NULL ),
- mpFirstVD( NULL ),
- mpFirstPrinter( NULL ),
- mpFontList( NULL ),
+ mpTimerProc( nullptr ),
+ mpFirstInstance( nullptr ),
+ mpFirstObject( nullptr ),
+ mpFirstVD( nullptr ),
+ mpFirstPrinter( nullptr ),
+ mpFontList( nullptr ),
mpStatusItem( nil ),
mxRGBSpace( CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB) ),
mxGraySpace( CGColorSpaceCreateWithName(kCGColorSpaceGenericGray) ),
maCursors(),
mbIsScrollbarDoubleMax( false ),
#if !HAVE_FEATURE_MACOSX_SANDBOX
- mpAppleRemoteMainController( NULL ),
+ mpAppleRemoteMainController( nullptr ),
#endif
mpDockIconClickHandler( nil ),
mnDPIX( 0 ),
mnDPIY( 0 )
{
maCursors.fill( INVALID_CURSOR_PTR );
- if( s_aAutoReleaseKey == 0 )
+ if( s_aAutoReleaseKey == nullptr )
s_aAutoReleaseKey = osl_createThreadKey( releasePool );
}
@@ -74,12 +74,12 @@ SalData::~SalData()
NSAutoreleasePool* pPool = reinterpret_cast<NSAutoreleasePool*>( osl_getThreadKeyData( s_aAutoReleaseKey ) );
if( pPool )
{
- osl_setThreadKeyData( s_aAutoReleaseKey, NULL );
+ osl_setThreadKeyData( s_aAutoReleaseKey, nullptr );
[pPool release];
}
osl_destroyThreadKey( s_aAutoReleaseKey );
- s_aAutoReleaseKey = 0;
+ s_aAutoReleaseKey = nullptr;
}
#if !HAVE_FEATURE_MACOSX_SANDBOX
if ( mpAppleRemoteMainController )
@@ -113,35 +113,35 @@ typedef struct
const o3tl::enumarray<PointerStyle, curs_ent> aCursorTab =
{
-curs_ent{ NULL, { 0, 0 } }, //PointerStyle::Arrow
+curs_ent{ nullptr, { 0, 0 } }, //PointerStyle::Arrow
{ "nullptr", { 16, 16 } }, //PointerStyle::Null
{ "hourglass", { 15, 15 } }, //PointerStyle::Wait
-{ NULL, { 0, 0 } }, //PointerStyle::Text
+{ nullptr, { 0, 0 } }, //PointerStyle::Text
{ "help", { 0, 0 } }, //PointerStyle::Help
-{ NULL, { 0, 0 } }, //PointerStyle::Cross
-{ NULL, { 0, 0 } }, //PointerStyle::Move
-{ NULL, { 0, 0 } }, //PointerStyle::NSize
-{ NULL, { 0, 0 } }, //PointerStyle::SSize
-{ NULL, { 0, 0 } }, //PointerStyle::WSize
-{ NULL, { 0, 0 } }, //PointerStyle::ESize
+{ nullptr, { 0, 0 } }, //PointerStyle::Cross
+{ nullptr, { 0, 0 } }, //PointerStyle::Move
+{ nullptr, { 0, 0 } }, //PointerStyle::NSize
+{ nullptr, { 0, 0 } }, //PointerStyle::SSize
+{ nullptr, { 0, 0 } }, //PointerStyle::WSize
+{ nullptr, { 0, 0 } }, //PointerStyle::ESize
{ "nwsesize", { 15, 15 } }, //PointerStyle::NWSize
{ "neswsize", { 15, 15 } }, //PointerStyle::NESize
{ "neswsize", { 15, 15 } }, //PointerStyle::SWSize
{ "nwsesize", { 15, 15 } }, //PointerStyle::SESize
-{ NULL, { 0, 0 } }, //PointerStyle::WindowNSize
-{ NULL, { 0, 0 } }, //PointerStyle::WindowSSize
-{ NULL, { 0, 0 } }, //PointerStyle::WindowWSize
-{ NULL, { 0, 0 } }, //PointerStyle::WindowESize
+{ nullptr, { 0, 0 } }, //PointerStyle::WindowNSize
+{ nullptr, { 0, 0 } }, //PointerStyle::WindowSSize
+{ nullptr, { 0, 0 } }, //PointerStyle::WindowWSize
+{ nullptr, { 0, 0 } }, //PointerStyle::WindowESize
{ "nwsesize", { 15, 15 } }, //PointerStyle::WindowNWSize
{ "neswsize", { 15, 15 } }, //PointerStyle::WindowNESize
{ "neswsize", { 15, 15 } }, //PointerStyle::WindowSWSize
{ "nwsesize", { 15, 15 } }, //PointerStyle::WindowSESize
-{ NULL, { 0, 0 } }, //PointerStyle::HSplit
-{ NULL, { 0, 0 } }, //PointerStyle::VSplit
-{ NULL, { 0, 0 } }, //PointerStyle::HSizeBar
-{ NULL, { 0, 0 } }, //PointerStyle::VSizeBar
-{ NULL, { 0, 0 } }, //PointerStyle::Hand
-{ NULL, { 0, 0 } }, //PointerStyle::RefHand
+{ nullptr, { 0, 0 } }, //PointerStyle::HSplit
+{ nullptr, { 0, 0 } }, //PointerStyle::VSplit
+{ nullptr, { 0, 0 } }, //PointerStyle::HSizeBar
+{ nullptr, { 0, 0 } }, //PointerStyle::VSizeBar
+{ nullptr, { 0, 0 } }, //PointerStyle::Hand
+{ nullptr, { 0, 0 } }, //PointerStyle::RefHand
{ "pen", { 3, 27 } }, //PointerStyle::Pen
{ "magnify", { 12, 13 } }, //PointerStyle::Magnify
{ "fill", { 10, 22 } }, //PointerStyle::Fill
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index c4614a821c1d..5aed7bbf24b2 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -49,14 +49,14 @@
using namespace std;
-AquaSalFrame* AquaSalFrame::s_pCaptureFrame = NULL;
+AquaSalFrame* AquaSalFrame::s_pCaptureFrame = nullptr;
AquaSalFrame::AquaSalFrame( SalFrame* pParent, SalFrameStyleFlags salFrameStyle ) :
mpNSWindow(nil),
mpNSView(nil),
mpDockMenuEntry(nil),
- mpGraphics(NULL),
- mpParent(NULL),
+ mpGraphics(nullptr),
+ mpParent(nullptr),
mnMinWidth(0),
mnMinHeight(0),
mnMaxWidth(0),
@@ -72,11 +72,11 @@ AquaSalFrame::AquaSalFrame( SalFrame* pParent, SalFrameStyleFlags salFrameStyle
mnStyleMask( 0 ),
mnLastEventTime( 0 ),
mnLastModifierFlags( 0 ),
- mpMenu( NULL ),
+ mpMenu( nullptr ),
mnExtStyle( 0 ),
mePointerStyle( PointerStyle::Arrow ),
mnTrackingRectTag( 0 ),
- mrClippingPath( 0 ),
+ mrClippingPath( nullptr ),
mnICOptions( InputContextFlags::NONE )
{
maSysData.nSize = sizeof( SystemEnvData );
@@ -109,7 +109,7 @@ AquaSalFrame::~AquaSalFrame()
DBG_ASSERT( this != s_pCaptureFrame, "capture frame destroyed" );
if( this == s_pCaptureFrame )
- s_pCaptureFrame = NULL;
+ s_pCaptureFrame = nullptr;
delete mpGraphics;
@@ -172,7 +172,7 @@ void AquaSalFrame::initWindowAndView()
if( (mnStyle & SalFrameStyleFlags::MOVEABLE) )
{
mnStyleMask |= NSTitledWindowMask;
- if( mpParent == NULL )
+ if( mpParent == nullptr )
mnStyleMask |= NSMiniaturizableWindowMask;
}
if( (mnStyle & SalFrameStyleFlags::SIZEABLE) )
@@ -256,13 +256,13 @@ void AquaSalFrame::screenParametersChanged()
if( mpGraphics )
mpGraphics->updateResolution();
- CallCallback( SALEVENT_DISPLAYCHANGED, 0 );
+ CallCallback( SALEVENT_DISPLAYCHANGED, nullptr );
}
SalGraphics* AquaSalFrame::AcquireGraphics()
{
if ( mbGraphics )
- return NULL;
+ return nullptr;
if ( !mpGraphics )
{
@@ -300,10 +300,10 @@ void AquaSalFrame::SetTitle(const OUString& rTitle)
// create an entry in the dock menu
const SalFrameStyleFlags nAppWindowStyle = (SalFrameStyleFlags::CLOSEABLE | SalFrameStyleFlags::MOVEABLE);
- if( mpParent == NULL &&
+ if( mpParent == nullptr &&
(mnStyle & nAppWindowStyle) == nAppWindowStyle )
{
- if( mpDockMenuEntry == NULL )
+ if( mpDockMenuEntry == nullptr )
{
NSMenu* pDock = AquaSalInstance::GetDynamicDockMenu();
@@ -417,7 +417,7 @@ void AquaSalFrame::Show(bool bVisible, bool bNoActivate)
if( mbInitShow )
initShow();
- CallCallback(SALEVENT_RESIZE, 0);
+ CallCallback(SALEVENT_RESIZE, nullptr);
// trigger filling our backbuffer
SendPaintEvent();
@@ -589,7 +589,7 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
}
// send event that we were moved/sized
if( nEvent )
- CallCallback( nEvent, NULL );
+ CallCallback( nEvent, nullptr );
if( mbShown && mpNSWindow )
{
@@ -746,7 +746,7 @@ void AquaSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay )
UpdateFrameGeometry();
if( mbShown )
- CallCallback( SALEVENT_MOVERESIZE, NULL );
+ CallCallback( SALEVENT_MOVERESIZE, nullptr );
}
else
{
@@ -756,7 +756,7 @@ void AquaSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay )
UpdateFrameGeometry();
if( mbShown )
- CallCallback( SALEVENT_MOVERESIZE, NULL );
+ CallCallback( SALEVENT_MOVERESIZE, nullptr );
// show the dock and the menubar
[NSMenu setMenuBarVisible:YES];
@@ -1315,7 +1315,7 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_u
UpdateFrameGeometry();
if (nEvent)
- CallCallback(nEvent, NULL);
+ CallCallback(nEvent, nullptr);
if( mbShown && bPaint )
{
@@ -1577,7 +1577,7 @@ void AquaSalFrame::CaptureMouse( bool bCapture )
if( bCapture )
s_pCaptureFrame = this;
else if( ! bCapture && s_pCaptureFrame == this )
- s_pCaptureFrame = NULL;
+ s_pCaptureFrame = nullptr;
}
void AquaSalFrame::ResetClipRegion()
@@ -1592,7 +1592,7 @@ void AquaSalFrame::ResetClipRegion()
// release old path and indicate no clipping
CGPathRelease( mrClippingPath );
- mrClippingPath = NULL;
+ mrClippingPath = nullptr;
if( mpNSView && mbShown )
[mpNSView setNeedsDisplay: YES];
@@ -1617,7 +1617,7 @@ void AquaSalFrame::BeginSetClipRegion( sal_uLong nRects )
if( mrClippingPath )
{
CGPathRelease( mrClippingPath );
- mrClippingPath = NULL;
+ mrClippingPath = nullptr;
}
if( maClippingRects.size() > SAL_CLIPRECT_COUNT && nRects < maClippingRects.size() )
@@ -1655,13 +1655,13 @@ void AquaSalFrame::EndSetClipRegion()
if( ! maClippingRects.empty() )
{
mrClippingPath = CGPathCreateMutable();
- CGPathAddRects( mrClippingPath, NULL, &maClippingRects[0], maClippingRects.size() );
+ CGPathAddRects( mrClippingPath, nullptr, &maClippingRects[0], maClippingRects.size() );
}
if( mpNSView && mbShown )
[mpNSView setNeedsDisplay: YES];
if( mpNSWindow )
{
- [mpNSWindow setOpaque: (mrClippingPath != NULL) ? NO : YES];
+ [mpNSWindow setOpaque: (mrClippingPath != nullptr) ? NO : YES];
[mpNSWindow setBackgroundColor: [NSColor clearColor]];
// shadow is invalidated when view gets drawn again
}
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 4016090daf4c..c67d55218281 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -140,7 +140,7 @@ static sal_uInt16 ImplMapKeyCode(sal_uInt16 nKeyCode)
}
// store the frame the mouse last entered
-static AquaSalFrame* s_pMouseFrame = NULL;
+static AquaSalFrame* s_pMouseFrame = nullptr;
// store the last pressed button for enter/exit events
// which lack that information
static sal_uInt16 s_nLastButton = 0;
@@ -158,7 +158,7 @@ static const struct ExceptionalKey
static AquaSalFrame* getMouseContainerFrame()
{
- AquaSalFrame* pDispatchFrame = NULL;
+ AquaSalFrame* pDispatchFrame = nullptr;
NSArray* aWindows = [NSWindow windowNumbersWithOptions:0];
for(NSUInteger i = 0; i < [aWindows count] && ! pDispatchFrame; i++ )
{
@@ -185,7 +185,7 @@ static AquaSalFrame* getMouseContainerFrame()
// enable OSX>=10.7 fullscreen options if available and useful
bool bAllowFullScreen = (SalFrameStyleFlags::NONE == (mpFrame->mnStyle & (SalFrameStyleFlags::DIALOG | SalFrameStyleFlags::TOOLTIP | SalFrameStyleFlags::SYSTEMCHILD | SalFrameStyleFlags::FLOAT | SalFrameStyleFlags::TOOLWINDOW | SalFrameStyleFlags::INTRO)));
bAllowFullScreen &= (SalFrameStyleFlags::NONE == (~mpFrame->mnStyle & (SalFrameStyleFlags::SIZEABLE)));
- bAllowFullScreen &= (mpFrame->mpParent == NULL);
+ bAllowFullScreen &= (mpFrame->mpParent == nullptr);
const SEL setCollectionBehavior = @selector(setCollectionBehavior:);
if( bAllowFullScreen && [pNSWindow respondsToSelector: setCollectionBehavior])
{
@@ -273,7 +273,7 @@ static AquaSalFrame* getMouseContainerFrame()
if( (mpFrame->mpParent && mpFrame->mpParent->GetWindow()->IsInModalMode()) )
AquaSalMenu::enableMainMenu( false );
#endif
- mpFrame->CallCallback( SALEVENT_GETFOCUS, 0 );
+ mpFrame->CallCallback( SALEVENT_GETFOCUS, nullptr );
mpFrame->SendPaintEvent(); // repaint controls as active
}
}
@@ -285,7 +285,7 @@ static AquaSalFrame* getMouseContainerFrame()
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
{
- mpFrame->CallCallback(SALEVENT_LOSEFOCUS, 0);
+ mpFrame->CallCallback(SALEVENT_LOSEFOCUS, nullptr);
mpFrame->SendPaintEvent(); // repaint controls as inactive
}
}
@@ -307,7 +307,7 @@ static AquaSalFrame* getMouseContainerFrame()
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
{
mpFrame->UpdateFrameGeometry();
- mpFrame->CallCallback( SALEVENT_MOVE, 0 );
+ mpFrame->CallCallback( SALEVENT_MOVE, nullptr );
}
}
@@ -319,7 +319,7 @@ static AquaSalFrame* getMouseContainerFrame()
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
{
mpFrame->UpdateFrameGeometry();
- mpFrame->CallCallback( SALEVENT_RESIZE, 0 );
+ mpFrame->CallCallback( SALEVENT_RESIZE, nullptr );
mpFrame->SendPaintEvent();
}
}
@@ -333,7 +333,7 @@ static AquaSalFrame* getMouseContainerFrame()
{
mpFrame->mbShown = false;
mpFrame->UpdateFrameGeometry();
- mpFrame->CallCallback( SALEVENT_RESIZE, 0 );
+ mpFrame->CallCallback( SALEVENT_RESIZE, nullptr );
}
}
@@ -346,7 +346,7 @@ static AquaSalFrame* getMouseContainerFrame()
{
mpFrame->mbShown = true;
mpFrame->UpdateFrameGeometry();
- mpFrame->CallCallback( SALEVENT_RESIZE, 0 );
+ mpFrame->CallCallback( SALEVENT_RESIZE, nullptr );
}
}
@@ -359,10 +359,10 @@ static AquaSalFrame* getMouseContainerFrame()
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
{
// #i84461# end possible input
- mpFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, 0 );
+ mpFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, nullptr );
if( AquaSalFrame::isAlive( mpFrame ) )
{
- mpFrame->CallCallback( SALEVENT_CLOSE, 0 );
+ mpFrame->CallCallback( SALEVENT_CLOSE, nullptr );
bRet = NO; // application will close the window or not, AppKit shouldn't
}
}
@@ -451,7 +451,7 @@ static AquaSalFrame* getMouseContainerFrame()
+(void)unsetMouseFrame: (AquaSalFrame*)pFrame
{
if( pFrame == s_pMouseFrame )
- s_pMouseFrame = NULL;
+ s_pMouseFrame = nullptr;
}
-(id)initWithSalFrame: (AquaSalFrame*)pFrame
@@ -529,7 +529,7 @@ private:
{
// NOTE: the mpFrame access below is not guarded yet!
// TODO: mpFrame et al need to be guarded by an independent mutex
- AquaSalGraphics* pGraphics = (mpFrame && AquaSalFrame::isAlive(mpFrame)) ? mpFrame->mpGraphics : NULL;
+ AquaSalGraphics* pGraphics = (mpFrame && AquaSalFrame::isAlive(mpFrame)) ? mpFrame->mpGraphics : nullptr;
if( pGraphics )
{
// we did not get the mutex so we cannot draw now => request to redraw later
@@ -641,7 +641,7 @@ private:
if ( mpMouseEventListener != nil &&
[mpMouseEventListener respondsToSelector: @selector(mouseDown:)])
{
- [mpMouseEventListener mouseDown: [pEvent copyWithZone: NULL]];
+ [mpMouseEventListener mouseDown: [pEvent copyWithZone: nullptr]];
}
s_nLastButton = MOUSE_LEFT;
@@ -653,7 +653,7 @@ private:
if ( mpMouseEventListener != nil &&
[mpMouseEventListener respondsToSelector: @selector(mouseDragged:)])
{
- [mpMouseEventListener mouseDragged: [pEvent copyWithZone: NULL]];
+ [mpMouseEventListener mouseDragged: [pEvent copyWithZone: nullptr]];
}
s_nLastButton = MOUSE_LEFT;
[self sendMouseEventToFrame:pEvent button:MOUSE_LEFT eventtype:SALEVENT_MOUSEMOVE];
@@ -684,7 +684,7 @@ private:
-(void)mouseExited: (NSEvent*)pEvent
{
if( s_pMouseFrame == mpFrame )
- s_pMouseFrame = NULL;
+ s_pMouseFrame = nullptr;
// #i107215# the only mouse events we get when inactive are enter/exit
// actually we would like to have all of them, but better none than some
@@ -1076,13 +1076,13 @@ private:
SalExtTextInputEvent aEvent;
aEvent.mnTime = mpFrame->mnLastEventTime;
aEvent.maText = aInsertString;
- aEvent.mpTextAttr = NULL;
+ aEvent.mpTextAttr = nullptr;
aEvent.mnCursorPos = aInsertString.getLength();
aEvent.mnCursorFlags = 0;
aEvent.mbOnlyCursor = FALSE;
mpFrame->CallCallback( SALEVENT_EXTTEXTINPUT, &aEvent );
if( AquaSalFrame::isAlive( mpFrame ) )
- mpFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, 0 );
+ mpFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, nullptr );
}
}
else
@@ -1090,13 +1090,13 @@ private:
SalExtTextInputEvent aEvent;
aEvent.mnTime = mpFrame->mnLastEventTime;
aEvent.maText.clear();
- aEvent.mpTextAttr = NULL;
+ aEvent.mpTextAttr = nullptr;
aEvent.mnCursorPos = 0;
aEvent.mnCursorFlags = 0;
aEvent.mbOnlyCursor = FALSE;
mpFrame->CallCallback( SALEVENT_EXTTEXTINPUT, &aEvent );
if( AquaSalFrame::isAlive( mpFrame ) )
- mpFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, 0 );
+ mpFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, nullptr );
}
mbKeyHandled = true;
@@ -1645,9 +1645,9 @@ private:
aInputEvent.maText.clear();
aInputEvent.mnCursorPos = 0;
aInputEvent.mnCursorFlags = 0;
- aInputEvent.mpTextAttr = 0;
+ aInputEvent.mpTextAttr = nullptr;
mpFrame->CallCallback( SALEVENT_EXTTEXTINPUT, static_cast<void *>(&aInputEvent) );
- mpFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, 0 );
+ mpFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, nullptr );
}
mbKeyHandled= true;
}
@@ -1686,7 +1686,7 @@ private:
// fprintf( stderr, "SalFrameView: doCommandBySelector %s\n", (char*)aSelector );
#endif
if( (mpFrame->mnICOptions & InputContextFlags::Text) &&
- aSelector != NULL && [self respondsToSelector: aSelector] )
+ aSelector != nullptr && [self respondsToSelector: aSelector] )
{
[self performSelector: aSelector];
}
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 0ae4ff62946a..b4c4eec621f6 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -67,7 +67,7 @@
using namespace std;
using namespace ::com::sun::star;
-static int* gpnInit = 0;
+static int* gpnInit = nullptr;
static NSMenu* pDockMenu = nil;
static bool bNoSVMain = true;
static bool bLeftMain = false;
@@ -85,7 +85,7 @@ class AquaDelayedSettingsChanged : public Idle
{
SalData* pSalData = GetSalData();
if( ! pSalData->maFrames.empty() )
- pSalData->maFrames.front()->CallCallback( SALEVENT_SETTINGSCHANGED, NULL );
+ pSalData->maFrames.front()->CallCallback( SALEVENT_SETTINGSCHANGED, nullptr );
if( mbInvalidate )
{
@@ -205,7 +205,7 @@ bool ImplSVMainHook( int * pnInit )
const char* pArgv[] = { aByteExe.getStr(), NULL };
NSApplicationMain( 3, pArgv );
#else
- const char* pArgv[] = { aByteExe.getStr(), NULL };
+ const char* pArgv[] = { aByteExe.getStr(), nullptr };
NSApplicationMain( 1, pArgv );
#endif
@@ -246,7 +246,7 @@ void DeInitSalData()
pSalData->mpStatusItem = nil;
}
delete pSalData;
- SetSalData( NULL );
+ SetSalData( nullptr );
}
extern "C" {
@@ -322,7 +322,7 @@ SalInstance* CreateSalInstance()
initNSApp();
SalData* pSalData = GetSalData();
- DBG_ASSERT( pSalData->mpFirstInstance == NULL, "more than one instance created" );
+ DBG_ASSERT( pSalData->mpFirstInstance == nullptr, "more than one instance created" );
AquaSalInstance* pInst = new AquaSalInstance;
// init instance (only one instance in this version !!!)
@@ -360,7 +360,7 @@ AquaSalInstance::AquaSalInstance()
AquaSalInstance::~AquaSalInstance()
{
- ::comphelper::SolarMutex::setSolarMutex( 0 );
+ ::comphelper::SolarMutex::setSolarMutex( nullptr );
mpSalYieldMutex->release();
delete mpSalYieldMutex;
osl_destroyMutex( maUserEventListMutex );
@@ -524,7 +524,7 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent )
break;
}
AquaSalFrame* pFrame = pSalData->maFrames.front();
- vcl::Window* pWindow = pFrame ? pFrame->GetWindow() : NULL;
+ vcl::Window* pWindow = pFrame ? pFrame->GetWindow() : nullptr;
if( pWindow )
{
@@ -580,7 +580,7 @@ void AquaSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLon
// get one user event
osl_acquireMutex( maUserEventListMutex );
- SalUserEvent aEvent( NULL, NULL, 0 );
+ SalUserEvent aEvent( nullptr, nullptr, 0 );
if( ! maUserEvents.empty() )
{
aEvent = maUserEvents.front();
@@ -752,12 +752,12 @@ bool AquaSalInstance::AnyInput( VclInputFlags nType )
NSEvent* pEvent = [NSApp nextEventMatchingMask: nEventMask untilDate: nil
inMode: NSDefaultRunLoopMode dequeue: NO];
- return (pEvent != NULL);
+ return (pEvent != nullptr);
}
SalFrame* AquaSalInstance::CreateChildFrame( SystemParentData*, SalFrameStyleFlags /*nSalFrameStyle*/ )
{
- return NULL;
+ return nullptr;
}
SalFrame* AquaSalInstance::CreateFrame( SalFrame* pParent, SalFrameStyleFlags nSalFrameStyle )
@@ -775,7 +775,7 @@ void AquaSalInstance::DestroyFrame( SalFrame* pFrame )
SalObject* AquaSalInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool /* bShow */ )
{
- AquaSalObject *pObject = NULL;
+ AquaSalObject *pObject = nullptr;
if ( pParent )
pObject = new AquaSalObject( static_cast<AquaSalFrame*>(pParent), pWindowData );
@@ -817,7 +817,7 @@ void AquaSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
pInfo->maDriver = GetOUString( pType );
pInfo->mnStatus = PrintQueueFlags::NONE;
pInfo->mnJobs = 0;
- pInfo->mpSysData = NULL;
+ pInfo->mpSysData = nullptr;
pList->Add( pInfo );
}
@@ -863,7 +863,7 @@ SalInfoPrinter* AquaSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueI
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
- SalInfoPrinter* pNewInfoPrinter = NULL;
+ SalInfoPrinter* pNewInfoPrinter = nullptr;
if( pQueueInfo )
{
pNewInfoPrinter = new AquaSalInfoPrinter( *pQueueInfo );
@@ -968,7 +968,7 @@ SalBitmap* AquaSalInstance::CreateSalBitmap()
SalSession* AquaSalInstance::CreateSalSession()
{
- return NULL;
+ return nullptr;
}
class MacImeStatus : public SalI18NImeStatus
@@ -1011,15 +1011,15 @@ CGImageRef CreateCGImage( const Image& rImage )
Bitmap aBmp( aBmpEx.GetBitmap() );
if( ! aBmp || ! aBmp.ImplGetImpBitmap() )
- return NULL;
+ return nullptr;
// simple case, no transparency
QuartzSalBitmap* pSalBmp = static_cast<QuartzSalBitmap*>(aBmp.ImplGetImpBitmap()->ImplGetSalBitmap());
if( ! pSalBmp )
- return NULL;
+ return nullptr;
- CGImageRef xImage = NULL;
+ CGImageRef xImage = nullptr;
if( ! (aBmpEx.IsAlpha() || aBmpEx.IsTransparent() ) )
xImage = pSalBmp->CreateCroppedImage( 0, 0, pSalBmp->mnWidth, pSalBmp->mnHeight );
else if( aBmpEx.IsAlpha() )
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index b0144a829278..5119d6cf8f13 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -57,7 +57,7 @@ void releaseButtonEntry( AquaSalMenu::MenuBarButtonEntry& i_rEntry )
}
-const AquaSalMenu* AquaSalMenu::pCurrentMenuBar = NULL;
+const AquaSalMenu* AquaSalMenu::pCurrentMenuBar = nullptr;
@interface MainMenuSelector : NSObject
{
@@ -238,7 +238,7 @@ void AquaSalInstance::DestroyMenu( SalMenu* pSalMenu )
SalMenuItem* AquaSalInstance::CreateMenuItem( const SalItemParams* pItemData )
{
if( !pItemData )
- return NULL;
+ return nullptr;
AquaSalMenuItem *pSalMenuItem = new AquaSalMenuItem( pItemData );
@@ -257,9 +257,9 @@ void AquaSalInstance::DestroyMenuItem( SalMenuItem* pSalMenuItem )
AquaSalMenu::AquaSalMenu( bool bMenuBar ) :
mbMenuBar( bMenuBar ),
mpMenu( nil ),
- mpVCLMenu( NULL ),
- mpFrame( NULL ),
- mpParentSalMenu( NULL )
+ mpVCLMenu( nullptr ),
+ mpFrame( nullptr ),
+ mpParentSalMenu( nullptr )
{
if( ! mbMenuBar )
{
@@ -278,7 +278,7 @@ AquaSalMenu::~AquaSalMenu()
// actually someone should have done AquaSalFrame::SetMenu( NULL )
// on our frame, alas it is not so
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) && mpFrame->mpMenu == this )
- const_cast<AquaSalFrame*>(mpFrame)->mpMenu = NULL;
+ const_cast<AquaSalFrame*>(mpFrame)->mpMenu = nullptr;
// this should normally be empty already, but be careful...
for( size_t i = 0; i < maButtons.size(); i++ )
@@ -305,7 +305,7 @@ AquaSalMenu::~AquaSalMenu()
// in ! mbMenuBar case our mpMenu is actually a SalNSMenu*
// so we can safely cast here
- [static_cast<SalNSMenu*>(mpMenu) setSalMenu: NULL];
+ [static_cast<SalNSMenu*>(mpMenu) setSalMenu: nullptr];
/* #i89860# FIXME:
using [autorelease] here (and in AquaSalMenuItem::~AquaSalMenuItem)
instead of [release] fixes an occasional crash. That should
@@ -417,12 +417,12 @@ const AquaSalFrame* AquaSalMenu::getFrame() const
const AquaSalMenu* pMenu = this;
while( pMenu && ! pMenu->mpFrame )
pMenu = pMenu->mpParentSalMenu;
- return pMenu ? pMenu->mpFrame : NULL;
+ return pMenu ? pMenu->mpFrame : nullptr;
}
void AquaSalMenu::unsetMainMenu()
{
- pCurrentMenuBar = NULL;
+ pCurrentMenuBar = nullptr;
// remove items from main menu
NSMenu* pMenu = [NSApp mainMenu];
@@ -502,7 +502,7 @@ void AquaSalMenu::addFallbackMenuItem( NSMenuItem* pNewItem )
[pNewItem retain];
rFallbackMenu.push_back( pNewItem );
- if( pCurrentMenuBar == NULL )
+ if( pCurrentMenuBar == nullptr )
setDefaultMenu();
}
@@ -520,7 +520,7 @@ void AquaSalMenu::removeFallbackMenuItem( NSMenuItem* pOldItem )
rFallbackMenu.erase( rFallbackMenu.begin() + i );
[pOldItem release];
- if( pCurrentMenuBar == NULL )
+ if( pCurrentMenuBar == nullptr )
setDefaultMenu();
return;
@@ -554,9 +554,9 @@ void AquaSalMenu::InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos )
AquaSalMenuItem *pAquaSalMenuItem = static_cast<AquaSalMenuItem*>(pSalMenuItem);
pAquaSalMenuItem->mpParentMenu = this;
- DBG_ASSERT( pAquaSalMenuItem->mpVCLMenu == NULL ||
+ DBG_ASSERT( pAquaSalMenuItem->mpVCLMenu == nullptr ||
pAquaSalMenuItem->mpVCLMenu == mpVCLMenu ||
- mpVCLMenu == NULL,
+ mpVCLMenu == nullptr,
"resetting menu ?" );
if( pAquaSalMenuItem->mpVCLMenu )
mpVCLMenu = pAquaSalMenuItem->mpVCLMenu;
@@ -577,7 +577,7 @@ void AquaSalMenu::InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos )
void AquaSalMenu::RemoveItem( unsigned nPos )
{
- AquaSalMenuItem* pRemoveItem = NULL;
+ AquaSalMenuItem* pRemoveItem = nullptr;
if( nPos == MENU_APPEND || nPos == (maItems.size()-1) )
{
pRemoveItem = maItems.back();
@@ -594,7 +594,7 @@ void AquaSalMenu::RemoveItem( unsigned nPos )
return;
}
- pRemoveItem->mpParentMenu = NULL;
+ pRemoveItem->mpParentMenu = nullptr;
if( ! mbMenuBar || pCurrentMenuBar == this )
[mpMenu removeItemAtIndex: getItemIndexByPos(nPos)];
@@ -608,7 +608,7 @@ void AquaSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsi
if (subAquaSalMenu)
{
pAquaSalMenuItem->mpSubMenu = subAquaSalMenu;
- if( subAquaSalMenu->mpParentSalMenu == NULL )
+ if( subAquaSalMenu->mpParentSalMenu == nullptr )
{
subAquaSalMenu->mpParentSalMenu = this;
[pAquaSalMenuItem->mpMenuItem setSubmenu: subAquaSalMenu->mpMenu];
@@ -633,9 +633,9 @@ void AquaSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsi
if( pAquaSalMenuItem->mpSubMenu )
{
if( pAquaSalMenuItem->mpSubMenu->mpParentSalMenu == this )
- pAquaSalMenuItem->mpSubMenu->mpParentSalMenu = NULL;
+ pAquaSalMenuItem->mpSubMenu->mpParentSalMenu = nullptr;
}
- pAquaSalMenuItem->mpSubMenu = NULL;
+ pAquaSalMenuItem->mpSubMenu = nullptr;
[pAquaSalMenuItem->mpMenuItem setSubmenu: nil];
}
}
@@ -800,7 +800,7 @@ AquaSalMenu::MenuBarButtonEntry* AquaSalMenu::findButtonItem( sal_uInt16 i_nItem
if( maButtons[i].maButton.mnId == i_nItemId )
return &maButtons[i];
}
- return NULL;
+ return nullptr;
}
void AquaSalMenu::statusLayout()
@@ -903,8 +903,8 @@ Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame
AquaSalMenuItem::AquaSalMenuItem( const SalItemParams* pItemData ) :
mnId( pItemData->nId ),
mpVCLMenu( pItemData->pMenu ),
- mpParentMenu( NULL ),
- mpSubMenu( NULL ),
+ mpParentMenu( nullptr ),
+ mpSubMenu( nullptr ),
mpMenuItem( nil )
{
// Delete mnemonics
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index 278aa248d672..16ab4f67aca0 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -430,7 +430,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
aMenuItemDrawInfo.version = 0;
aMenuItemDrawInfo.state = kThemeMenuActive;
aMenuItemDrawInfo.itemType = kThemeMenuItemHierBackground;
- HIThemeDrawMenuItem(&rc, &rc, &aMenuItemDrawInfo, mrContext, kHIThemeOrientationNormal, NULL);
+ HIThemeDrawMenuItem(&rc, &rc, &aMenuItemDrawInfo, mrContext, kHIThemeOrientationNormal, nullptr);
}
#endif
bOK = true;
@@ -526,7 +526,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
// no animation
aPushInfo.animation.time.start = 0;
aPushInfo.animation.time.current = 0;
- PushButtonValue const * pPBVal = aValue.getType() == CTRL_PUSHBUTTON ? static_cast<PushButtonValue const *>(&aValue) : NULL;
+ PushButtonValue const * pPBVal = aValue.getType() == CTRL_PUSHBUTTON ? static_cast<PushButtonValue const *>(&aValue) : nullptr;
int nPaintHeight = static_cast<int>(rc.size.height);
if( pPBVal && pPBVal->mbBevelButton )
@@ -571,7 +571,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
if( nState & ControlState::FOCUSED )
aPushInfo.adornment |= kThemeAdornmentFocus;
- HIThemeDrawButton( &rc, &aPushInfo, mrContext, kHIThemeOrientationNormal, NULL );
+ HIThemeDrawButton( &rc, &aPushInfo, mrContext, kHIThemeOrientationNormal, nullptr );
bOK = true;
}
break;
@@ -601,7 +601,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
kThemeAdornmentNone;
if( nState & ControlState::FOCUSED )
aInfo.adornment |= kThemeAdornmentFocus;
- HIThemeDrawButton( &rc, &aInfo, mrContext, kHIThemeOrientationNormal, NULL );
+ HIThemeDrawButton( &rc, &aInfo, mrContext, kHIThemeOrientationNormal, nullptr );
bOK = true;
}
break;
@@ -658,7 +658,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
break;
}
- HIThemeDrawButton( &rc, &aInfo, mrContext, kHIThemeOrientationNormal, NULL );
+ HIThemeDrawButton( &rc, &aInfo, mrContext, kHIThemeOrientationNormal, nullptr );
}
bOK = true;
}
@@ -688,7 +688,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
aTrackInfo.filler1 = 0;
aTrackInfo.trackInfo.progress.phase = static_cast<UInt8>(CFAbsoluteTimeGetCurrent()*10.0);
- HIThemeDrawTrack( &aTrackInfo, NULL, mrContext, kHIThemeOrientationNormal );
+ HIThemeDrawTrack( &aTrackInfo, nullptr, mrContext, kHIThemeOrientationNormal );
bOK = true;
}
break;
@@ -717,7 +717,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
aSlideInfo.pressState = 0;
aTrackDraw.trackInfo.slider = aSlideInfo;
- HIThemeDrawTrack( &aTrackDraw, NULL, mrContext, kHIThemeOrientationNormal );
+ HIThemeDrawTrack( &aTrackDraw, nullptr, mrContext, kHIThemeOrientationNormal );
bOK = true;
}
}
@@ -725,7 +725,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
case CTRL_SCROLLBAR:
{
- const ScrollbarValue* pScrollbarVal = (aValue.getType() == CTRL_SCROLLBAR) ? static_cast<const ScrollbarValue*>(&aValue) : NULL;
+ const ScrollbarValue* pScrollbarVal = (aValue.getType() == CTRL_SCROLLBAR) ? static_cast<const ScrollbarValue*>(&aValue) : nullptr;
if( nPart == PART_DRAW_BACKGROUND_VERT ||
nPart == PART_DRAW_BACKGROUND_HORZ )
@@ -772,7 +772,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
aTrackDraw.trackInfo.scrollbar = aScrollInfo;
- HIThemeDrawTrack( &aTrackDraw, NULL, mrContext, kHIThemeOrientationNormal );
+ HIThemeDrawTrack( &aTrackDraw, nullptr, mrContext, kHIThemeOrientationNormal );
bOK = true;
}
}
@@ -945,7 +945,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
if(nState & ControlState::FOCUSED) HIThemeDrawFocusRect(&rc, true, mrContext, kHIThemeOrientationNormal);
//buttons:
- const SpinbuttonValue* pSpinButtonVal = (aValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue*>(&aValue) : NULL;
+ const SpinbuttonValue* pSpinButtonVal = (aValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue*>(&aValue) : nullptr;
ControlState nUpperState = ControlState::ENABLED;//state of the upper button
ControlState nLowerState = ControlState::ENABLED;//and of the lower button
if(pSpinButtonVal) {//pSpinButtonVal is sometimes null
@@ -993,7 +993,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
if( (nUpperState & ControlState::FOCUSED) || (nLowerState & ControlState::FOCUSED))
aSpinInfo.adornment |= kThemeAdornmentFocus;
- HIThemeDrawButton( &buttonRc, &aSpinInfo, mrContext, kHIThemeOrientationNormal, NULL );
+ HIThemeDrawButton( &buttonRc, &aSpinInfo, mrContext, kHIThemeOrientationNormal, nullptr );
}
bOK=true;
@@ -1014,7 +1014,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
if( rc.origin.y + rc.size.height >= mpFrame->maGeometry.nHeight-3 )
{
CGMutablePathRef rPath = CGPathCreateMutable();
- CGPathAddRect( rPath, NULL, CGRectMake( 0, 0, mpFrame->maGeometry.nWidth-1, mpFrame->maGeometry.nHeight-1 ) );
+ CGPathAddRect( rPath, nullptr, CGRectMake( 0, 0, mpFrame->maGeometry.nWidth-1, mpFrame->maGeometry.nHeight-1 ) );
CGContextBeginPath( mrContext );
CGContextAddPath( mrContext, rPath );
diff --git a/vcl/osx/salnsmenu.mm b/vcl/osx/salnsmenu.mm
index 23aac611dd7f..6bbc683fc5ec 100644
--- a/vcl/osx/salnsmenu.mm
+++ b/vcl/osx/salnsmenu.mm
@@ -79,7 +79,7 @@
(void)aSender;
SolarMutexGuard aGuard;
- const AquaSalFrame* pFrame = mpMenuItem->mpParentMenu ? mpMenuItem->mpParentMenu->getFrame() : NULL;
+ const AquaSalFrame* pFrame = mpMenuItem->mpParentMenu ? mpMenuItem->mpParentMenu->getFrame() : nullptr;
if( pFrame && AquaSalFrame::isAlive( pFrame ) && ! pFrame->GetWindow()->IsInModalMode() )
{
SalMenuEvent aMenuEvt( mpMenuItem->mnId, mpMenuItem->mpVCLMenu );
@@ -193,7 +193,7 @@
{ static_cast<CGFloat>(rButtons[i].maButton.maImage.GetSizePixel().Width()),
static_cast<CGFloat>(rButtons[i].maButton.maImage.GetSizePixel().Height()) } };
if( rButtons[i].mpToolTipString )
- [self addToolTipRect: aImgRect owner: rButtons[i].mpToolTipString userData: NULL];
+ [self addToolTipRect: aImgRect owner: rButtons[i].mpToolTipString userData: nullptr];
aSize.width += 2 + aImgRect.size.width;
}
}
diff --git a/vcl/osx/salobj.cxx b/vcl/osx/salobj.cxx
index ca09d6c20ec6..a747ae323d6c 100644
--- a/vcl/osx/salobj.cxx
+++ b/vcl/osx/salobj.cxx
@@ -37,7 +37,7 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame, SystemWindowData* pWindowDat
mnHeight( 20 )
{
maSysData.nSize = sizeof( maSysData );
- maSysData.mpNSView = NULL;
+ maSysData.mpNSView = nullptr;
maSysData.mbOpenGL = false;
NSRect aInitFrame = { NSZeroPoint, { 20, 20 } };
@@ -50,7 +50,7 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame, SystemWindowData* pWindowDat
if (pWindowData && pWindowData->bOpenGL)
{
maSysData.mbOpenGL = true;
- NSOpenGLPixelFormat* pixFormat = NULL;
+ NSOpenGLPixelFormat* pixFormat = nullptr;
if (pWindowData->bLegacy)
{
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index 9ef6d8ed216b..bd785491fbcc 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -46,7 +46,7 @@ using namespace com::sun::star;
using namespace com::sun::star::beans;
AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) :
- mpGraphics( 0 ),
+ mpGraphics( nullptr ),
mbGraphics( false ),
mbJob( false ),
mpPrinter( nil ),
@@ -143,7 +143,7 @@ void AquaSalInfoPrinter::SetupPrinterGraphics( CGContextRef i_rContext ) const
SalGraphics* AquaSalInfoPrinter::AcquireGraphics()
{
- SalGraphics* pGraphics = mbGraphics ? NULL : mpGraphics;
+ SalGraphics* pGraphics = mbGraphics ? nullptr : mpGraphics;
mbGraphics = true;
return pGraphics;
}
@@ -666,9 +666,9 @@ void AquaSalInfoPrinter::InitPaperFormats( const ImplJobSetup* )
const PaperInfo* AquaSalInfoPrinter::matchPaper( long i_nWidth, long i_nHeight, Orientation& o_rOrientation ) const
{
if( ! m_bPapersInit )
- const_cast<AquaSalInfoPrinter*>(this)->InitPaperFormats( NULL );
+ const_cast<AquaSalInfoPrinter*>(this)->InitPaperFormats( nullptr );
- const PaperInfo* pMatch = NULL;
+ const PaperInfo* pMatch = nullptr;
o_rOrientation = ORIENTATION_PORTRAIT;
for( int n = 0; n < 2 ; n++ )
{
diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm
index fd0d58333b57..3f5455a534a2 100644
--- a/vcl/osx/vclnsapp.mm
+++ b/vcl/osx/vclnsapp.mm
@@ -161,7 +161,7 @@
// the main menu just beeps for an unknown or disabled key equivalent
// and swallows the event wholesale
NSMenu* pMainMenu = [NSApp mainMenu];
- if( ! bHandled && (pMainMenu == 0 || ! [pMainMenu performKeyEquivalent: pEvent]) )
+ if( ! bHandled && (pMainMenu == nullptr || ! [pMainMenu performKeyEquivalent: pEvent]) )
{
[[pKeyWin contentView] keyDown: pEvent];
bHandled = GetSalData()->maKeyEventAnswer[ pEvent ];
@@ -247,7 +247,7 @@
++it;
if( it != rFrames.end() )
{
- if( (*it)->mpDockMenuEntry != NULL &&
+ if( (*it)->mpDockMenuEntry != nullptr &&
(*it)->mbShown )
{
[(*it)->getNSWindow() makeKeyAndOrderFront: NSApp];
@@ -259,7 +259,7 @@
it = rFrames.begin();
while( *it != pCurFrame )
{
- if( (*it)->mpDockMenuEntry != NULL &&
+ if( (*it)->mpDockMenuEntry != nullptr &&
(*it)->mbShown )
{
[(*it)->getNSWindow() makeKeyAndOrderFront: NSApp];
@@ -287,7 +287,7 @@
++it;
if( it != rFrames.rend() )
{
- if( (*it)->mpDockMenuEntry != NULL &&
+ if( (*it)->mpDockMenuEntry != nullptr &&
(*it)->mbShown )
{
[(*it)->getNSWindow() makeKeyAndOrderFront: NSApp];
@@ -299,7 +299,7 @@
it = rFrames.rbegin();
while( *it != pCurFrame )
{
- if( (*it)->mpDockMenuEntry != NULL &&
+ if( (*it)->mpDockMenuEntry != nullptr &&
(*it)->mbShown )
{
[(*it)->getNSWindow() makeKeyAndOrderFront: NSApp];
@@ -405,7 +405,7 @@
{
// the following QueryExit will likely present a message box, activate application
[NSApp activateIgnoringOtherApps: YES];
- aReply = pSalData->maFrames.front()->CallCallback( SALEVENT_SHUTDOWN, NULL ) ? NSTerminateCancel : NSTerminateNow;
+ aReply = pSalData->maFrames.front()->CallCallback( SALEVENT_SHUTDOWN, nullptr ) ? NSTerminateCancel : NSTerminateNow;
}
if( aReply == NSTerminateNow )
@@ -428,7 +428,7 @@
const SalData* pSalData = GetSalData();
if( !pSalData->maFrames.empty() )
- pSalData->maFrames.front()->CallCallback( SALEVENT_SETTINGSCHANGED, NULL );
+ pSalData->maFrames.front()->CallCallback( SALEVENT_SETTINGSCHANGED, nullptr );
}
-(void)screenParametersChanged: (NSNotification*) pNotification