Kaydet (Commit) 1c51811a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Mac vcl: sal_Bool -> bool sequel

Change-Id: Ie180b99a1a2d71922009c85c16ccb33b7968bd03
üst ded6334f
...@@ -111,7 +111,7 @@ public: ...@@ -111,7 +111,7 @@ public:
inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = pData; } inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = pData; }
inline SalData *GetSalData() { return ImplGetSVData()->mpSalData; } inline SalData *GetSalData() { return ImplGetSVData()->mpSalData; }
sal_Bool ImplSalYieldMutexTryToAcquire(); bool ImplSalYieldMutexTryToAcquire();
void ImplSalYieldMutexAcquire(); void ImplSalYieldMutexAcquire();
void ImplSalYieldMutexRelease(); void ImplSalYieldMutexRelease();
......
...@@ -91,15 +91,15 @@ class AquaSalInfoPrinter : public SalInfoPrinter ...@@ -91,15 +91,15 @@ class AquaSalInfoPrinter : public SalInfoPrinter
// so let's make AquaSalPrinter just a forwarder to AquaSalInfoPrinter // so let's make AquaSalPrinter just a forwarder to AquaSalInfoPrinter
// and concentrate the real work in one class // and concentrate the real work in one class
// implement pull model print system // implement pull model print system
sal_Bool StartJob( const OUString* i_pFileName, bool StartJob( const OUString* i_pFileName,
const OUString& rJobName, const OUString& rJobName,
const OUString& i_rAppName, const OUString& i_rAppName,
ImplJobSetup* i_pSetupData, ImplJobSetup* i_pSetupData,
vcl::PrinterController& i_rController ); vcl::PrinterController& i_rController );
sal_Bool EndJob(); bool EndJob();
sal_Bool AbortJob(); bool AbortJob();
SalGraphics* StartPage( ImplJobSetup* i_pSetupData, sal_Bool i_bNewJobData ); SalGraphics* StartPage( ImplJobSetup* i_pSetupData, bool i_bNewJobData );
sal_Bool EndPage(); bool EndPage();
sal_uLong GetErrorCode() const; sal_uLong GetErrorCode() const;
NSPrintInfo* getPrintInfo() const { return mpPrintInfo; } NSPrintInfo* getPrintInfo() const { return mpPrintInfo; }
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
using namespace std; using namespace std;
using namespace ::com::sun::star; using namespace ::com::sun::star;
extern sal_Bool ImplSVMain(); extern int ImplSVMain();
static int* gpnInit = 0; static int* gpnInit = 0;
static NSMenu* pDockMenu = nil; static NSMenu* pDockMenu = nil;
...@@ -184,7 +184,7 @@ static void initNSApp() ...@@ -184,7 +184,7 @@ static void initNSApp()
#endif #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.plist", NSHomeDirectory(), MACOSX_BUNDLE_IDENTIFIER] UTF8String]);
unlink([[NSString stringWithFormat:@"%@/Library/Saved Application State/%s.savedState/restorecount.txt", 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() ...@@ -310,7 +310,7 @@ bool SalYieldMutex::tryToAcquire()
// some convenience functions regarding the yield mutex, aka solar mutex // some convenience functions regarding the yield mutex, aka solar mutex
sal_Bool ImplSalYieldMutexTryToAcquire() bool ImplSalYieldMutexTryToAcquire()
{ {
AquaSalInstance* pInst = (AquaSalInstance*) GetSalData()->mpFirstInstance; AquaSalInstance* pInst = (AquaSalInstance*) GetSalData()->mpFirstInstance;
if ( pInst ) if ( pInst )
......
...@@ -501,7 +501,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, ...@@ -501,7 +501,7 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType,
const ImplControlValue& aValue, const ImplControlValue& aValue,
const OUString& ) const OUString& )
{ {
sal_Bool bOK = sal_False; bool bOK = false;
if( ! CheckContext() ) if( ! CheckContext() )
return false; return false;
...@@ -1215,7 +1215,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -1215,7 +1215,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion )
{ {
sal_Bool toReturn = sal_False; bool toReturn = false;
Rectangle aCtrlBoundRect( rControlRegion ); Rectangle aCtrlBoundRect( rControlRegion );
short x = aCtrlBoundRect.Left(); short x = aCtrlBoundRect.Left();
...@@ -1250,7 +1250,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -1250,7 +1250,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
Rectangle aRect; Rectangle aRect;
if( AquaGetScrollRect( /* m_nScreen */ nPart, aCtrlBoundRect, aRect ) ) if( AquaGetScrollRect( /* m_nScreen */ nPart, aCtrlBoundRect, aRect ) )
{ {
toReturn = sal_True; toReturn = true;
rNativeBoundingRegion = aRect; rNativeBoundingRegion = aRect;
rNativeContentRegion = aRect; rNativeContentRegion = aRect;
} }
...@@ -1280,7 +1280,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -1280,7 +1280,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h + nBorderCleanup) ); rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h + nBorderCleanup) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
toReturn = sal_True; toReturn = true;
} }
break; break;
case CTRL_PROGRESS: case CTRL_PROGRESS:
...@@ -1292,7 +1292,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -1292,7 +1292,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
aRect.Bottom() = aRect.Top() + 15; // values taken from HIG for large progress aRect.Bottom() = aRect.Top() + 15; // values taken from HIG for large progress
rNativeBoundingRegion = aRect; rNativeBoundingRegion = aRect;
rNativeContentRegion = aRect; rNativeContentRegion = aRect;
toReturn = sal_True; toReturn = true;
} }
break; break;
...@@ -1302,7 +1302,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -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 aRect.Bottom() = aRect.Top() + INTRO_PROGRESS_HEIGHT; // values taken from HIG for medium progress
rNativeBoundingRegion = aRect; rNativeBoundingRegion = aRect;
rNativeContentRegion = aRect; rNativeContentRegion = aRect;
toReturn = sal_True; toReturn = true;
} }
break; break;
...@@ -1318,7 +1318,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -1318,7 +1318,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
toReturn = sal_True; toReturn = true;
break; break;
...@@ -1334,7 +1334,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -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) ) ); 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 ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
toReturn = sal_True; toReturn = true;
} }
break; break;
case CTRL_LISTBOX: case CTRL_LISTBOX:
...@@ -1348,7 +1348,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -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 ) ); 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 ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
toReturn = sal_True; toReturn = true;
} }
else if( nPart == PART_BUTTON_DOWN ) else if( nPart == PART_BUTTON_DOWN )
{ {
...@@ -1397,7 +1397,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -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 ) ); 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 ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
toReturn = sal_True; toReturn = true;
} }
else if( nPart == PART_SUB_EDIT ) { else if( nPart == PART_SUB_EDIT ) {
w = aCtrlBoundRect.GetWidth() - SPIN_BUTTON_SPACE - SPIN_BUTTON_WIDTH; w = aCtrlBoundRect.GetWidth() - SPIN_BUTTON_SPACE - SPIN_BUTTON_WIDTH;
...@@ -1410,7 +1410,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -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 ) ); 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 ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
toReturn = sal_True; toReturn = true;
} }
else if( nPart == PART_BUTTON_UP ) { else if( nPart == PART_BUTTON_UP ) {
//aCtrlBoundRect.GetWidth() contains the width of the full control //aCtrlBoundRect.GetWidth() contains the width of the full control
...@@ -1424,7 +1424,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -1424,7 +1424,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = 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 ) { else if( nPart == PART_BUTTON_DOWN ) {
x += aCtrlBoundRect.GetWidth() - SPIN_BUTTON_WIDTH - SPIN_BUTTON_SPACE - CLIP_FUZZ; x += aCtrlBoundRect.GetWidth() - SPIN_BUTTON_WIDTH - SPIN_BUTTON_SPACE - CLIP_FUZZ;
...@@ -1435,7 +1435,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -1435,7 +1435,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
toReturn = sal_True; toReturn = true;
} }
break; break;
case CTRL_FRAME: case CTRL_FRAME:
...@@ -1463,7 +1463,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -1463,7 +1463,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = aRect; rNativeContentRegion = aRect;
rNativeBoundingRegion = aRect; rNativeBoundingRegion = aRect;
toReturn = sal_True; toReturn = true;
} }
} }
break; break;
...@@ -1479,7 +1479,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa ...@@ -1479,7 +1479,7 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) ); rNativeContentRegion = Rectangle( Point( x, y ), Size( w, h ) );
rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) ); rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
toReturn = sal_True; toReturn = true;
} }
} }
break; break;
......
...@@ -178,7 +178,7 @@ bool AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData ) ...@@ -178,7 +178,7 @@ bool AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData )
return SetData( ~0, io_pSetupData ); return SetData( ~0, io_pSetupData );
sal_Bool bSuccess = sal_True; bool bSuccess = true;
// set system type // set system type
io_pSetupData->mnSystem = JOBSETUP_SYSTEM_MAC; io_pSetupData->mnSystem = JOBSETUP_SYSTEM_MAC;
...@@ -211,7 +211,7 @@ bool AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData ) ...@@ -211,7 +211,7 @@ bool AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData )
io_pSetupData->mnDriverDataLen = 4; io_pSetupData->mnDriverDataLen = 4;
} }
else else
bSuccess = sal_False; bSuccess = false;
return bSuccess; return bSuccess;
...@@ -378,7 +378,7 @@ static Size getPageSize( vcl::PrinterController& i_rController, sal_Int32 i_nPag ...@@ -378,7 +378,7 @@ static Size getPageSize( vcl::PrinterController& i_rController, sal_Int32 i_nPag
return aPageSize; return aPageSize;
} }
sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName, bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName,
const OUString& i_rJobName, const OUString& i_rJobName,
const OUString& /*i_rAppName*/, const OUString& /*i_rAppName*/,
ImplJobSetup* i_pSetupData, ImplJobSetup* i_pSetupData,
...@@ -386,9 +386,9 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName, ...@@ -386,9 +386,9 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName,
) )
{ {
if( mbJob ) if( mbJob )
return sal_False; return false;
sal_Bool bSuccess = sal_False; bool bSuccess = false;
bool bWasAborted = false; bool bWasAborted = false;
AquaSalInstance* pInst = GetSalData()->mpFirstInstance; AquaSalInstance* pInst = GetSalData()->mpFirstInstance;
PrintAccessoryViewState aAccViewState; PrintAccessoryViewState aAccViewState;
...@@ -402,15 +402,15 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName, ...@@ -402,15 +402,15 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName,
SetData( ~0, i_pSetupData ); SetData( ~0, i_pSetupData );
// do we want a progress panel ? // do we want a progress panel ?
sal_Bool bShowProgressPanel = sal_True; bool bShowProgressPanel = true;
beans::PropertyValue* pMonitor = i_rController.getValue( OUString( "MonitorVisible" ) ); beans::PropertyValue* pMonitor = i_rController.getValue( OUString( "MonitorVisible" ) );
if( pMonitor ) if( pMonitor )
pMonitor->Value >>= bShowProgressPanel; pMonitor->Value >>= bShowProgressPanel;
if( ! i_rController.isShowDialogs() ) if( ! i_rController.isShowDialogs() )
bShowProgressPanel = sal_False; bShowProgressPanel = false;
// possibly create one job for collated output // possibly create one job for collated output
sal_Bool bSinglePrintJobs = sal_False; bool bSinglePrintJobs = false;
beans::PropertyValue* pSingleValue = i_rController.getValue( OUString( "PrintCollateAsSingleJobs" ) ); beans::PropertyValue* pSingleValue = i_rController.getValue( OUString( "PrintCollateAsSingleJobs" ) );
if( pSingleValue ) if( pSingleValue )
{ {
...@@ -526,7 +526,7 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName, ...@@ -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 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]; pReleaseAfterUse = [AquaPrintAccessoryView setupPrinterPanel: pPrintOperation withController: &i_rController withState: &aAccViewState];
bSuccess = sal_True; bSuccess = true;
mbJob = true; mbJob = true;
pInst->startedPrintJob(); pInst->startedPrintJob();
[pPrintOperation runOperation]; [pPrintOperation runOperation];
...@@ -562,26 +562,26 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName, ...@@ -562,26 +562,26 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName,
sal_Bool AquaSalInfoPrinter::EndJob() bool AquaSalInfoPrinter::EndJob()
{ {
mnStartPageOffsetX = mnStartPageOffsetY = 0; mnStartPageOffsetX = mnStartPageOffsetY = 0;
mbJob = false; mbJob = false;
return sal_True; return true;
} }
sal_Bool AquaSalInfoPrinter::AbortJob() bool AquaSalInfoPrinter::AbortJob()
{ {
mbJob = false; mbJob = false;
// FIXME: implementation // 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 ) if( i_bNewJobData && i_pSetupData )
SetPrinterData( i_pSetupData ); SetPrinterData( i_pSetupData );
...@@ -595,10 +595,10 @@ SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, sal_Bool ...@@ -595,10 +595,10 @@ SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, sal_Bool
sal_Bool AquaSalInfoPrinter::EndPage() bool AquaSalInfoPrinter::EndPage()
{ {
mpGraphics->InvalidateContext(); mpGraphics->InvalidateContext();
return sal_True; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment