summaryrefslogtreecommitdiff
path: root/vcl/osx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-21 23:46:33 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-21 23:47:23 +0100
commitfe7a4bccfdc6ff7e10789e5512ac469a4dc44f55 (patch)
tree2da6d63a8ff02d78999427a700fe823f07db2f70 /vcl/osx
parent216bcceee1ba908f617deb3f2404aff8085d5358 (diff)
Adapt vcl to various loplugin warnings on Mac OS X
Change-Id: I4553ce218fbcf2ac681b284c71e7d558a451511c
Diffstat (limited to 'vcl/osx')
-rw-r--r--vcl/osx/DataFlavorMapping.cxx3
-rw-r--r--vcl/osx/DragSource.cxx5
-rw-r--r--vcl/osx/HtmlFmtFlt.cxx7
-rw-r--r--vcl/osx/PictToBmpFlt.cxx4
-rw-r--r--vcl/osx/salframe.cxx10
-rw-r--r--vcl/osx/salinst.cxx2
-rw-r--r--vcl/osx/salmenu.cxx4
-rw-r--r--vcl/osx/salnativewidgets.cxx12
-rw-r--r--vcl/osx/salprn.cxx10
9 files changed, 29 insertions, 28 deletions
diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx
index 4590e97e2343..b24dffcb8411 100644
--- a/vcl/osx/DataFlavorMapping.cxx
+++ b/vcl/osx/DataFlavorMapping.cxx
@@ -31,6 +31,7 @@
#include <rtl/ustring.hxx>
#include <osl/endian.h>
+#include <cassert>
#include <stdio.h>
#include <string.h>
@@ -58,7 +59,7 @@ namespace // private
OUString NSStringToOUString( const NSString* cfString)
{
- BOOST_ASSERT(cfString && "Invalid parameter");
+ assert(cfString && "Invalid parameter");
const char* utf8Str = [cfString UTF8String];
unsigned int len = rtl_str_getLength(utf8Str);
diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx
index 1e5e5eb6ab8d..6c22424b51e0 100644
--- a/vcl/osx/DragSource.cxx
+++ b/vcl/osx/DragSource.cxx
@@ -34,6 +34,7 @@
#include "osx/salframe.h"
+#include <cassert>
#include <memory>
@@ -230,8 +231,8 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
{
MutexGuard guard(m_aMutex);
- OSL_ASSERT(listener.is() && "DragSource::startDrag: No XDragSourceListener provided\n");
- OSL_ASSERT(transferable.is() && "DragSource::startDrag: No transferable provided\n");
+ assert(listener.is() && "DragSource::startDrag: No XDragSourceListener provided\n");
+ assert(transferable.is() && "DragSource::startDrag: No transferable provided\n");
trigger.Event >>= mMouseEvent;
m_MouseButton= mMouseEvent.Buttons;
diff --git a/vcl/osx/HtmlFmtFlt.cxx b/vcl/osx/HtmlFmtFlt.cxx
index f5e0b2282004..74779df5a11e 100644
--- a/vcl/osx/HtmlFmtFlt.cxx
+++ b/vcl/osx/HtmlFmtFlt.cxx
@@ -25,8 +25,7 @@
#include <sstream>
#include <vector>
#include <iomanip>
-
-#include <boost/assert.hpp>
+#include <cassert>
using namespace com::sun::star::uno;
@@ -122,14 +121,14 @@ const char* HtmlStartTag = "<html";
Sequence<sal_Int8> HTMLFormatToTextHtml(const Sequence<sal_Int8>& aHTMLFormat)
{
- BOOST_ASSERT(isHTMLFormat(aHTMLFormat) && "No HTML Format provided");
+ assert(isHTMLFormat(aHTMLFormat) && "No HTML Format provided");
Sequence<sal_Int8>& nonconstHTMLFormatRef = const_cast< Sequence<sal_Int8>& >(aHTMLFormat);
sal_Char* dataStart = reinterpret_cast<sal_Char*>(nonconstHTMLFormatRef.getArray());
sal_Char* dataEnd = dataStart + nonconstHTMLFormatRef.getLength() - 1;
const sal_Char* htmlStartTag = strcasestr(dataStart, HtmlStartTag);
- BOOST_ASSERT(htmlStartTag && "Seems to be no HTML at all");
+ assert(htmlStartTag && "Seems to be no HTML at all");
// It doesn't seem to be HTML? Well then simply return what has been
// provided in non-debug builds
diff --git a/vcl/osx/PictToBmpFlt.cxx b/vcl/osx/PictToBmpFlt.cxx
index 91ed2bc5f177..77c67a654107 100644
--- a/vcl/osx/PictToBmpFlt.cxx
+++ b/vcl/osx/PictToBmpFlt.cxx
@@ -59,8 +59,8 @@ bool PNGToImage( com::sun::star::uno::Sequence<sal_Int8>& rPngData,
if( !pData)
return false;
- NSBitmapImageRep* pRep = [NSBitmapImageRep imageRepWithData: pData];
- if( !pRep)
+ NSBitmapImageRep* pRep = [NSBitmapImageRep imageRepWithData: pData];
+ if( !pRep)
return false;
NSData* pOut = [pRep representationUsingType: eOutFormat properties: nil];
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 6231886dc145..3ce28c9a2588 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -722,7 +722,7 @@ void AquaSalFrame::SetApplicationID( const OUString &/*rApplicationID*/ )
// -----------------------------------------------------------------------
-void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay )
+void AquaSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay )
{
if ( !mpNSWindow )
return;
@@ -730,7 +730,7 @@ void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay )
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
- SAL_INFO("vcl.macosx", OSL_THIS_FUNC << ": mbFullScreen=" << mbFullScreen << ", bFullScreen=" << bFullScreen);
+ SAL_INFO("vcl.osx", OSL_THIS_FUNC << ": mbFullScreen=" << mbFullScreen << ", bFullScreen=" << bFullScreen);
if( mbFullScreen == bFullScreen )
return;
@@ -1297,8 +1297,8 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
// images in menus false for MacOSX
aStyleSettings.SetPreferredUseImagesInMenus( false );
- aStyleSettings.SetHideDisabledMenuItems( sal_True );
- aStyleSettings.SetAcceleratorsInContextMenus( sal_False );
+ aStyleSettings.SetHideDisabledMenuItems( true );
+ aStyleSettings.SetAcceleratorsInContextMenus( false );
rSettings.SetStyleSettings( aStyleSettings );
@@ -1535,7 +1535,7 @@ bool AquaSalFrame::SetPluginParent( SystemParentData* )
// plugging process;
//TODO: implement
- return sal_False;
+ return false;
}
bool AquaSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& )
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 3d169989d791..e960e8db82bd 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -808,7 +808,7 @@ bool AquaSalInstance::AnyInput( sal_uInt16 nType )
if( !nType)
return false;
- NSEvent* pEvent = [NSApp nextEventMatchingMask: nEventMask untilDate: nil
+ NSEvent* pEvent = [NSApp nextEventMatchingMask: nEventMask untilDate: nil
inMode: NSDefaultRunLoopMode dequeue: NO];
return (pEvent != NULL);
}
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index 57bc23f7add2..8c6006f549ba 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -526,11 +526,11 @@ bool AquaSalMenu::VisibleMenuBar()
static const char *pExperimental = getenv ("AQUA_NATIVE_MENUS");
if ( pExperimental && !strcasecmp(pExperimental, "FALSE") )
- return sal_False;
+ return false;
// End of experimental code enable/disable part
- return sal_True;
+ return true;
}
void AquaSalMenu::SetFrame( const SalFrame *pFrame )
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index cb0cfb059062..422cab788cdc 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -270,7 +270,7 @@ static bool AquaGetScrollRect( /* TODO: int nScreen, */ ControlPart nPart,
*/
bool AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
{
- bool bOk = sal_False;
+ bool bOk = false;
// Native controls are now defaults
// If you want to disable experimental native controls code,
@@ -421,20 +421,20 @@ bool AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart
{
// the left 4 pixels are not hit sensitive
if( rPos.X() - aRect.Left() < 4 )
- rIsInside = sal_False;
+ rIsInside = false;
}
else if( nPart == PART_TRACK_VERT_AREA )
{
// the top 4 pixels are not hit sensitive
if( rPos.Y() - aRect.Top() < 4 )
- rIsInside = sal_False;
+ rIsInside = false;
}
}
}
return bValid;
} // CTRL_SCROLLBAR
- return sal_False;
+ return false;
}
/*
@@ -1353,8 +1353,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
else if( nPart == PART_BUTTON_DOWN )
{
w = aCtrlBoundRect.GetWidth();
- if( w < 3+2*FOCUS_RING_WIDTH )
- w = 3+2*FOCUS_RING_WIDTH;
+ if( w < 3+2*FOCUS_RING_WIDTH )
+ w = 3+2*FOCUS_RING_WIDTH;
h = COMBOBOX_HEIGHT_NORMAL;//listboxes and comboxes have the same height
x += w-DROPDOWN_BUTTON_WIDTH - FOCUS_RING_WIDTH;
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index d57f7e6f1551..c0e13b2dd4ef 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -166,7 +166,7 @@ void AquaSalInfoPrinter::ReleaseGraphics( SalGraphics* )
bool AquaSalInfoPrinter::Setup( SalFrame*, ImplJobSetup* )
{
- return sal_False;
+ return false;
}
// -----------------------------------------------------------------------
@@ -244,7 +244,7 @@ void AquaSalInfoPrinter::setPaperSize( long i_nWidth, long i_nHeight, Orientatio
bool AquaSalInfoPrinter::SetData( sal_uLong i_nFlags, ImplJobSetup* io_pSetupData )
{
if( ! io_pSetupData || io_pSetupData->mnSystem != JOBSETUP_SYSTEM_MAC )
- return sal_False;
+ return false;
if( mpPrintInfo )
@@ -395,7 +395,7 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName,
sal_Int32 nAllPages = 0;
// reset IsLastPage
- i_rController.setLastPage( sal_False );
+ i_rController.setLastPage( false );
// update job data
if( i_pSetupData )
@@ -545,7 +545,7 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName,
// inform application that it can release its data
// this is awkward, but the XRenderable interface has no method for this,
// so we need to call XRenderadble::render one last time with IsLastPage = sal_True
- i_rController.setLastPage( sal_True );
+ i_rController.setLastPage( true );
GDIMetaFile aPageFile;
if( mrContext )
SetupPrinterGraphics( mrContext );
@@ -643,7 +643,7 @@ bool AquaSalPrinter::StartJob( const OUString* /*i_pFileName*/,
ImplJobSetup* )
{
OSL_FAIL( "should never be called" );
- return sal_False;
+ return false;
}
// -----------------------------------------------------------------------