Kaydet (Commit) 621145a7 authored tarafından Takeshi Abe's avatar Takeshi Abe

sal_Bool -> bool

Change-Id: I49749f327d6a9c3661ef9bd684647e0a45b9203a
üst ad99d4ee
......@@ -551,7 +551,7 @@ IMPL_LINK_NOARG(DlgEditor, PaintTimeout)
// set dialog position and size
pDlgEdForm->SetSnapRect( Rectangle( aPos, aSize ) );
pDlgEdForm->EndListening(sal_False);
pDlgEdForm->EndListening(false);
pDlgEdForm->SetPropsFromRect();
pDlgEdForm->GetDlgEditor()->SetDialogModelChanged(sal_True);
pDlgEdForm->StartListening();
......
......@@ -472,7 +472,7 @@ void DlgEdObj::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
{
Any aNewValue;
aNewValue <<= nNewValue;
EndListening( sal_False );
EndListening( false );
xPSet->setPropertyValue( evt.PropertyName, aNewValue );
StartListening();
}
......@@ -523,7 +523,7 @@ void SAL_CALL DlgEdObj::NameChange( const ::com::sun::star::beans::PropertyChan
else
{
// set old name property
EndListening(sal_False);
EndListening(false);
Reference< beans::XPropertySet > xPSet(GetUnoControlModel(), UNO_QUERY);
Any aName;
aName <<= aOldName;
......@@ -588,7 +588,7 @@ void DlgEdObj::TabIndexChange( const beans::PropertyChangeEvent& evt ) throw (Ru
::std::vector<DlgEdObj*>::iterator aIter;
for ( aIter = aChildList.begin() ; aIter != aChildList.end() ; ++aIter )
{
(*aIter)->EndListening( sal_False );
(*aIter)->EndListening( false );
}
Reference< container::XNameAccess > xNameAcc( pForm->GetUnoControlModel() , UNO_QUERY );
......@@ -990,7 +990,7 @@ void DlgEdObj::NbcMove( const Size& rSize )
SdrUnoObj::NbcMove( rSize );
// stop listening
EndListening(sal_False);
EndListening(false);
// set geometry properties
SetPropsFromRect();
......@@ -1009,7 +1009,7 @@ void DlgEdObj::NbcResize(const Point& rRef, const Fraction& xFract, const Fracti
SdrUnoObj::NbcResize( rRef, xFract, yFract );
// stop listening
EndListening(sal_False);
EndListening(false);
// set geometry properties
SetPropsFromRect();
......@@ -1161,7 +1161,7 @@ void DlgEdObj::StartListening()
//----------------------------------------------------------------------------
void DlgEdObj::EndListening(sal_Bool bRemoveListener)
void DlgEdObj::EndListening(bool bRemoveListener)
{
DBG_ASSERT(isListening(), "DlgEdObj::EndListening: not listening currently!");
......@@ -1481,7 +1481,7 @@ void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
{
Any aNewValue;
aNewValue <<= nNewValue;
EndListening( sal_False );
EndListening( false );
xPSetForm->setPropertyValue( evt.PropertyName, aNewValue );
StartListening();
}
......@@ -1523,7 +1523,7 @@ void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
{
Any aValue;
aValue <<= nNewX;
EndListening( sal_False );
EndListening( false );
xPSet->setPropertyValue( DLGED_PROP_POSITIONX, aValue );
StartListening();
}
......@@ -1539,7 +1539,7 @@ void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
{
Any aValue;
aValue <<= nNewY;
EndListening( sal_False );
EndListening( false );
xPSet->setPropertyValue( DLGED_PROP_POSITIONY, aValue );
StartListening();
}
......@@ -1583,7 +1583,7 @@ void DlgEdForm::UpdateTabIndices()
::std::vector<DlgEdObj*>::iterator aIter;
for ( aIter = pChildren.begin() ; aIter != pChildren.end() ; ++aIter )
{
(*aIter)->EndListening( sal_False );
(*aIter)->EndListening( false );
}
Reference< ::com::sun::star::container::XNameAccess > xNameAcc( GetUnoControlModel() , UNO_QUERY );
......@@ -1744,7 +1744,7 @@ void DlgEdForm::NbcMove( const Size& rSize )
SdrUnoObj::NbcMove( rSize );
// set geometry properties of form
EndListening(sal_False);
EndListening(false);
SetPropsFromRect();
StartListening();
......@@ -1752,7 +1752,7 @@ void DlgEdForm::NbcMove( const Size& rSize )
::std::vector<DlgEdObj*>::iterator aIter;
for ( aIter = pChildren.begin() ; aIter != pChildren.end() ; ++aIter )
{
(*aIter)->EndListening(sal_False);
(*aIter)->EndListening(false);
(*aIter)->SetPropsFromRect();
(*aIter)->StartListening();
}
......@@ -1768,7 +1768,7 @@ void DlgEdForm::NbcResize(const Point& rRef, const Fraction& xFract, const Fract
SdrUnoObj::NbcResize( rRef, xFract, yFract );
// set geometry properties of form
EndListening(sal_False);
EndListening(false);
SetPropsFromRect();
StartListening();
......@@ -1776,7 +1776,7 @@ void DlgEdForm::NbcResize(const Point& rRef, const Fraction& xFract, const Fract
::std::vector<DlgEdObj*>::iterator aIter;
for ( aIter = pChildren.begin() ; aIter != pChildren.end() ; ++aIter )
{
(*aIter)->EndListening(sal_False);
(*aIter)->EndListening(false);
(*aIter)->SetPropsFromRect();
(*aIter)->StartListening();
}
......@@ -1792,7 +1792,7 @@ bool DlgEdForm::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
bool bResult = SdrUnoObj::EndCreate(rStat, eCmd);
// stop listening
EndListening(sal_False);
EndListening(false);
// set geometry properties
SetPropsFromRect();
......
......@@ -63,7 +63,7 @@ protected:
using SfxListener::StartListening;
void StartListening();
using SfxListener::EndListening;
void EndListening(sal_Bool bRemoveListener = sal_True);
void EndListening(bool bRemoveListener = true);
bool isListening() const { return bIsListening; }
virtual bool TransformSdrToControlCoordinates(
......
......@@ -58,13 +58,13 @@ char* SbiBuffer::GetBuffer()
// Test, if the buffer can contain n Bytes.
// In case of doubt it will be enlarged
sal_Bool SbiBuffer::Check( sal_uInt16 n )
bool SbiBuffer::Check( sal_uInt16 n )
{
if( !n ) return sal_True;
if( !n ) return true;
if( ( static_cast<sal_uInt32>( nOff )+ n ) > static_cast<sal_uInt32>( nSize ) )
{
if( nInc == 0 )
return sal_False;
return false;
sal_uInt16 nn = 0;
while( nn < n ) nn = nn + nInc;
char* p;
......@@ -75,7 +75,7 @@ sal_Bool SbiBuffer::Check( sal_uInt16 n )
pParser->Error( SbERR_PROG_TOO_LARGE );
nInc = 0;
delete[] pBuf; pBuf = NULL;
return sal_False;
return false;
}
else
{
......@@ -86,7 +86,7 @@ sal_Bool SbiBuffer::Check( sal_uInt16 n )
nSize = nSize + nn;
}
}
return sal_True;
return true;
}
// Patch of a Location
......@@ -136,62 +136,62 @@ void SbiBuffer::Chain( sal_uInt32 off )
}
}
sal_Bool SbiBuffer::operator +=( sal_Int8 n )
bool SbiBuffer::operator +=( sal_Int8 n )
{
if( Check( 1 ) )
{
*pCur++ = (char) n; nOff++; return sal_True;
} else return sal_False;
*pCur++ = (char) n; nOff++; return true;
} else return false;
}
sal_Bool SbiBuffer::operator +=( sal_uInt8 n )
bool SbiBuffer::operator +=( sal_uInt8 n )
{
if( Check( 1 ) )
{
*pCur++ = (char) n; nOff++; return sal_True;
} else return sal_False;
*pCur++ = (char) n; nOff++; return true;
} else return false;
}
sal_Bool SbiBuffer::operator +=( sal_Int16 n )
bool SbiBuffer::operator +=( sal_Int16 n )
{
if( Check( 2 ) )
{
*pCur++ = (char) ( n & 0xFF );
*pCur++ = (char) ( n >> 8 );
nOff += 2; return sal_True;
} else return sal_False;
nOff += 2; return true;
} else return false;
}
sal_Bool SbiBuffer::operator +=( sal_uInt16 n )
bool SbiBuffer::operator +=( sal_uInt16 n )
{
if( Check( 2 ) )
{
*pCur++ = (char) ( n & 0xFF );
*pCur++ = (char) ( n >> 8 );
nOff += 2; return sal_True;
} else return sal_False;
nOff += 2; return true;
} else return false;
}
sal_Bool SbiBuffer::operator +=( sal_uInt32 n )
bool SbiBuffer::operator +=( sal_uInt32 n )
{
if( Check( 4 ) )
{
sal_uInt16 n1 = static_cast<sal_uInt16>( n & 0xFFFF );
sal_uInt16 n2 = static_cast<sal_uInt16>( n >> 16 );
if ( operator +=( n1 ) && operator +=( n2 ) )
return sal_True;
return sal_True;
return true;
return true;
}
return sal_False;
return false;
}
sal_Bool SbiBuffer::operator +=( sal_Int32 n )
bool SbiBuffer::operator +=( sal_Int32 n )
{
return operator +=( (sal_uInt32) n );
}
sal_Bool SbiBuffer::operator +=( const String& n )
bool SbiBuffer::operator +=( const String& n )
{
sal_uInt16 l = n.Len() + 1;
if( Check( l ) )
......@@ -200,9 +200,9 @@ sal_Bool SbiBuffer::operator +=( const String& n )
memcpy( pCur, aByteStr.getStr(), l );
pCur += l;
nOff = nOff + l;
return sal_True;
return true;
}
else return sal_False;
else return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -31,7 +31,7 @@ SbiCodeGen::SbiCodeGen( SbModule& r, SbiParser* p, short nInc )
: rMod( r ), aCode( p, nInc )
{
pParser = p;
bStmnt = sal_False;
bStmnt = false;
nLine = 0;
nCol = 0;
nForLevel = 0;
......@@ -46,7 +46,7 @@ sal_uInt32 SbiCodeGen::GetPC()
void SbiCodeGen::Statement()
{
bStmnt = sal_True;
bStmnt = true;
nLine = pParser->GetLine();
nCol = pParser->GetCol1();
......@@ -62,7 +62,7 @@ void SbiCodeGen::GenStmnt()
{
if( bStmnt )
{
bStmnt = sal_False;
bStmnt = false;
Gen( _STMNT, nLine, nCol );
}
}
......
......@@ -32,19 +32,19 @@ class SbiBuffer {
sal_uInt32 nOff;
sal_uInt32 nSize;
short nInc;
sal_Bool Check( sal_uInt16 );
bool Check( sal_uInt16 );
public:
SbiBuffer( SbiParser*, short ); // increment
~SbiBuffer();
void Patch( sal_uInt32, sal_uInt32 );
void Chain( sal_uInt32 );
sal_Bool operator += (const String&); // save basic-string
sal_Bool operator += (sal_Int8); // save character
sal_Bool operator += (sal_Int16); // save integer
sal_Bool operator += (sal_uInt8); // save character
sal_Bool operator += (sal_uInt16); // save integer
sal_Bool operator += (sal_uInt32); // save integer
sal_Bool operator += (sal_Int32); // save integer
bool operator += (const String&); // save basic-string
bool operator += (sal_Int8); // save character
bool operator += (sal_Int16); // save integer
bool operator += (sal_uInt8); // save character
bool operator += (sal_uInt16); // save integer
bool operator += (sal_uInt32); // save integer
bool operator += (sal_Int32); // save integer
char* GetBuffer(); // give out buffer (delete yourself!)
char* GetBufferPtr(){ return pBuf; }
sal_uInt32 GetSize() { return nOff; }
......
......@@ -31,7 +31,7 @@ class SbiCodeGen {
SbiBuffer aCode;
short nLine, nCol; // for stmnt command
short nForLevel; // #29955
sal_Bool bStmnt; // sal_True: statement-opcode is pending
bool bStmnt; // true: statement-opcode is pending
public:
SbiCodeGen( SbModule&, SbiParser*, short );
SbiParser* GetParser() { return pParser; }
......
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