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:
inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = pData; }
inline SalData *GetSalData() { return ImplGetSVData()->mpSalData; }
sal_Bool ImplSalYieldMutexTryToAcquire();
bool ImplSalYieldMutexTryToAcquire();
void ImplSalYieldMutexAcquire();
void ImplSalYieldMutexRelease();
......
......@@ -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; }
......
......@@ -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 )
......
......@@ -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;
......
......@@ -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;
}
......
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