From 1c51811a43bfc4993a0aa0f278df248b56d6810c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 25 Feb 2014 08:45:20 +0100 Subject: Mac vcl: sal_Bool -> bool sequel Change-Id: Ie180b99a1a2d71922009c85c16ccb33b7968bd03 --- vcl/inc/osx/saldata.hxx | 2 +- vcl/inc/osx/salprn.h | 10 +++++----- vcl/osx/salinst.cxx | 6 +++--- vcl/osx/salnativewidgets.cxx | 30 +++++++++++++++--------------- vcl/osx/salprn.cxx | 32 ++++++++++++++++---------------- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/vcl/inc/osx/saldata.hxx b/vcl/inc/osx/saldata.hxx index 8ee0b41799b8..fa7280e574e1 100644 --- a/vcl/inc/osx/saldata.hxx +++ b/vcl/inc/osx/saldata.hxx @@ -111,7 +111,7 @@ public: inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = pData; } inline SalData *GetSalData() { return ImplGetSVData()->mpSalData; } -sal_Bool ImplSalYieldMutexTryToAcquire(); +bool ImplSalYieldMutexTryToAcquire(); void ImplSalYieldMutexAcquire(); void ImplSalYieldMutexRelease(); diff --git a/vcl/inc/osx/salprn.h b/vcl/inc/osx/salprn.h index d2ac58875058..cb3db3cef918 100644 --- a/vcl/inc/osx/salprn.h +++ b/vcl/inc/osx/salprn.h @@ -91,15 +91,15 @@ class AquaSalInfoPrinter : public SalInfoPrinter // so let's make AquaSalPrinter just a forwarder to AquaSalInfoPrinter // and concentrate the real work in one class // implement pull model print system - sal_Bool StartJob( const OUString* i_pFileName, + bool StartJob( const OUString* i_pFileName, const OUString& rJobName, const OUString& i_rAppName, ImplJobSetup* i_pSetupData, vcl::PrinterController& i_rController ); - sal_Bool EndJob(); - sal_Bool AbortJob(); - SalGraphics* StartPage( ImplJobSetup* i_pSetupData, sal_Bool i_bNewJobData ); - sal_Bool EndPage(); + bool EndJob(); + bool AbortJob(); + SalGraphics* StartPage( ImplJobSetup* i_pSetupData, bool i_bNewJobData ); + bool EndPage(); sal_uLong GetErrorCode() const; NSPrintInfo* getPrintInfo() const { return mpPrintInfo; } diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index f0e6b3459a52..ecc85eebe259 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -64,7 +64,7 @@ using namespace std; using namespace ::com::sun::star; -extern sal_Bool ImplSVMain(); +extern int ImplSVMain(); static int* gpnInit = 0; static NSMenu* pDockMenu = nil; @@ -184,7 +184,7 @@ static void initNSApp() #endif } -sal_Bool ImplSVMainHook( int * pnInit ) +bool ImplSVMainHook( int * pnInit ) { unlink([[NSString stringWithFormat:@"%@/Library/Saved Application State/%s.savedState/restorecount.plist", NSHomeDirectory(), MACOSX_BUNDLE_IDENTIFIER] UTF8String]); unlink([[NSString stringWithFormat:@"%@/Library/Saved Application State/%s.savedState/restorecount.txt", NSHomeDirectory(), MACOSX_BUNDLE_IDENTIFIER] UTF8String]); @@ -310,7 +310,7 @@ bool SalYieldMutex::tryToAcquire() // some convenience functions regarding the yield mutex, aka solar mutex -sal_Bool ImplSalYieldMutexTryToAcquire() +bool ImplSalYieldMutexTryToAcquire() { AquaSalInstance* pInst = (AquaSalInstance*) GetSalData()->mpFirstInstance; if ( pInst ) diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index 422cab788cdc..2ed64b1d18e8 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -501,7 +501,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, const ImplControlValue& aValue, const OUString& ) { - sal_Bool bOK = sal_False; + bool bOK = false; if( ! CheckContext() ) return false; @@ -1215,7 +1215,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) { - sal_Bool toReturn = sal_False; + bool toReturn = false; Rectangle aCtrlBoundRect( rControlRegion ); short x = aCtrlBoundRect.Left(); @@ -1250,7 +1250,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa Rectangle aRect; if( AquaGetScrollRect( /* m_nScreen */ nPart, aCtrlBoundRect, aRect ) ) { - toReturn = sal_True; + toReturn = true; rNativeBoundingRegion = aRect; rNativeContentRegion = aRect; } @@ -1280,7 +1280,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h + nBorderCleanup) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); - toReturn = sal_True; + toReturn = true; } break; case CTRL_PROGRESS: @@ -1292,7 +1292,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa aRect.Bottom() = aRect.Top() + 15; // values taken from HIG for large progress rNativeBoundingRegion = aRect; rNativeContentRegion = aRect; - toReturn = sal_True; + toReturn = true; } break; @@ -1302,7 +1302,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa aRect.Bottom() = aRect.Top() + INTRO_PROGRESS_HEIGHT; // values taken from HIG for medium progress rNativeBoundingRegion = aRect; rNativeContentRegion = aRect; - toReturn = sal_True; + toReturn = true; } break; @@ -1318,7 +1318,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); - toReturn = sal_True; + toReturn = true; break; @@ -1334,7 +1334,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*(FOCUS_RING_WIDTH+1), h-2*(FOCUS_RING_WIDTH+1) ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); - toReturn = sal_True; + toReturn = true; } break; case CTRL_LISTBOX: @@ -1348,7 +1348,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*FOCUS_RING_WIDTH, h ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) ); - toReturn = sal_True; + toReturn = true; } else if( nPart == PART_BUTTON_DOWN ) { @@ -1397,7 +1397,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y ), Size( w-2*FOCUS_RING_WIDTH, h ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) ); - toReturn = sal_True; + toReturn = true; } else if( nPart == PART_SUB_EDIT ) { w = aCtrlBoundRect.GetWidth() - SPIN_BUTTON_SPACE - SPIN_BUTTON_WIDTH; @@ -1410,7 +1410,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa rNativeContentRegion = Rectangle( Point( x + FOCUS_RING_WIDTH, y + FOCUS_RING_WIDTH ), Size( w - 2* FOCUS_RING_WIDTH, h ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) ); - toReturn = sal_True; + toReturn = true; } else if( nPart == PART_BUTTON_UP ) { //aCtrlBoundRect.GetWidth() contains the width of the full control @@ -1424,7 +1424,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); - toReturn = sal_True; + toReturn = true; } else if( nPart == PART_BUTTON_DOWN ) { x += aCtrlBoundRect.GetWidth() - SPIN_BUTTON_WIDTH - SPIN_BUTTON_SPACE - CLIP_FUZZ; @@ -1435,7 +1435,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); - toReturn = sal_True; + toReturn = true; } break; case CTRL_FRAME: @@ -1463,7 +1463,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa rNativeContentRegion = aRect; rNativeBoundingRegion = aRect; - toReturn = sal_True; + toReturn = true; } } break; @@ -1479,7 +1479,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); - toReturn = sal_True; + toReturn = true; } } break; diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx index b2dafd79552c..8666988e2dd5 100644 --- a/vcl/osx/salprn.cxx +++ b/vcl/osx/salprn.cxx @@ -178,7 +178,7 @@ bool AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData ) return SetData( ~0, io_pSetupData ); - sal_Bool bSuccess = sal_True; + bool bSuccess = true; // set system type io_pSetupData->mnSystem = JOBSETUP_SYSTEM_MAC; @@ -211,7 +211,7 @@ bool AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData ) io_pSetupData->mnDriverDataLen = 4; } else - bSuccess = sal_False; + bSuccess = false; return bSuccess; @@ -378,7 +378,7 @@ static Size getPageSize( vcl::PrinterController& i_rController, sal_Int32 i_nPag return aPageSize; } -sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName, +bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJobName, const OUString& /*i_rAppName*/, ImplJobSetup* i_pSetupData, @@ -386,9 +386,9 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName, ) { if( mbJob ) - return sal_False; + return false; - sal_Bool bSuccess = sal_False; + bool bSuccess = false; bool bWasAborted = false; AquaSalInstance* pInst = GetSalData()->mpFirstInstance; PrintAccessoryViewState aAccViewState; @@ -402,15 +402,15 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName, SetData( ~0, i_pSetupData ); // do we want a progress panel ? - sal_Bool bShowProgressPanel = sal_True; + bool bShowProgressPanel = true; beans::PropertyValue* pMonitor = i_rController.getValue( OUString( "MonitorVisible" ) ); if( pMonitor ) pMonitor->Value >>= bShowProgressPanel; if( ! i_rController.isShowDialogs() ) - bShowProgressPanel = sal_False; + bShowProgressPanel = false; // possibly create one job for collated output - sal_Bool bSinglePrintJobs = sal_False; + bool bSinglePrintJobs = false; beans::PropertyValue* pSingleValue = i_rController.getValue( OUString( "PrintCollateAsSingleJobs" ) ); if( pSingleValue ) { @@ -526,7 +526,7 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName, if( bShowPanel && mnCurPageRangeStart == 0 && nCurJob == 0) // only the first range of pages (in the first job) gets the accesory view pReleaseAfterUse = [AquaPrintAccessoryView setupPrinterPanel: pPrintOperation withController: &i_rController withState: &aAccViewState]; - bSuccess = sal_True; + bSuccess = true; mbJob = true; pInst->startedPrintJob(); [pPrintOperation runOperation]; @@ -562,26 +562,26 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName, -sal_Bool AquaSalInfoPrinter::EndJob() +bool AquaSalInfoPrinter::EndJob() { mnStartPageOffsetX = mnStartPageOffsetY = 0; mbJob = false; - return sal_True; + return true; } -sal_Bool AquaSalInfoPrinter::AbortJob() +bool AquaSalInfoPrinter::AbortJob() { mbJob = false; // FIXME: implementation - return sal_False; + return false; } -SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, sal_Bool i_bNewJobData ) +SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, bool i_bNewJobData ) { if( i_bNewJobData && i_pSetupData ) SetPrinterData( i_pSetupData ); @@ -595,10 +595,10 @@ SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, sal_Bool -sal_Bool AquaSalInfoPrinter::EndPage() +bool AquaSalInfoPrinter::EndPage() { mpGraphics->InvalidateContext(); - return sal_True; + return true; } -- cgit