Kaydet (Commit) 20223e23 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

bool improvements

Change-Id: I9f5564100aa64ff4940dd93a81ff5a8d8edc7a07
üst 5169abba
......@@ -171,7 +171,7 @@ public:
void SetActiveFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & rFrame );
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > GetActiveFrame() const;
// Reconfig
int IsInRegistrations() const;
bool IsInRegistrations() const;
sal_uInt16 EnterRegistrations(const char *pFile = 0, int nLine = 0);
void LeaveRegistrations( sal_uInt16 nLevel = USHRT_MAX, const char *pFile = 0, int nLine = 0 );
void Register( SfxControllerItem& rBinding );
......@@ -218,7 +218,7 @@ public:
//--------------------------------------------------------------------
inline int SfxBindings::IsInRegistrations() const
inline bool SfxBindings::IsInRegistrations() const
/* [Description]
......
......@@ -215,7 +215,7 @@ public:
~SfxFrameProperties() { delete pFrame; }
int operator ==( const SfxFrameProperties& ) const;
bool operator ==( const SfxFrameProperties& ) const;
SfxFrameProperties& operator =( const SfxFrameProperties &rProp );
};
......
......@@ -92,7 +92,7 @@ public:
void Register( SfxModule* );
SAL_DLLPRIVATE int ContainsSlot_Impl( const SfxSlot *pSlot ) const
SAL_DLLPRIVATE bool ContainsSlot_Impl( const SfxSlot *pSlot ) const
{ return pSlot >= pSlots && pSlot < pSlots + Count(); }
SAL_DLLPRIVATE ResMgr* GetResManager_Impl() const
{ return aNameResId.GetResMgr(); }
......
......@@ -188,10 +188,10 @@ struct SfxFoundCache_Impl
pCache(pC)
{}
int operator<( const SfxFoundCache_Impl &r ) const
bool operator<( const SfxFoundCache_Impl &r ) const
{ return nWhichId < r.nWhichId; }
int operator==( const SfxFoundCache_Impl &r ) const
bool operator==( const SfxFoundCache_Impl &r ) const
{ return nWhichId== r.nWhichId; }
};
......
......@@ -281,7 +281,7 @@ sal_uInt16 TemplateLocalView::createRegion(const OUString &rName)
sal_uInt16 nItemId = getNextItemId();
if (!mpDocTemplates->InsertDir(rName,nRegionId))
return false;
return 0;
OUString aRegionName = rName;
......
......@@ -93,7 +93,7 @@ namespace
}
static short lcl_GetPassword(
static bool lcl_GetPassword(
Window *pParent,
bool bProtect,
/*out*/OUString &rPassword )
......
......@@ -172,7 +172,7 @@ SfxFrameProperties& SfxFrameProperties::operator =(
return *this;
}
int SfxFrameProperties::operator ==( const SfxFrameProperties& rProp ) const
bool SfxFrameProperties::operator ==( const SfxFrameProperties& rProp ) const
{
return aURL == rProp.aURL && aName == rProp.aName && lMarginWidth == rProp.lMarginWidth && lMarginHeight == rProp.lMarginHeight &&
lSize == rProp.lSize && eScroll == rProp.eScroll && eSizeSelector == rProp.eSizeSelector &&
......
......@@ -85,7 +85,7 @@ void SAL_CALL SfxEvents_Impl::replaceByName( const OUString & aName, const uno::
OUString sType;
if ( ( aNormalizedDescriptor.size() == 1 )
&& ( aNormalizedDescriptor.has( PROP_EVENT_TYPE) == 0 )
&& !aNormalizedDescriptor.has( PROP_EVENT_TYPE ) //TODO
&& ( aNormalizedDescriptor.get( PROP_EVENT_TYPE ) >>= sType )
&& ( sType.isEmpty() )
)
......
......@@ -206,7 +206,7 @@ bool SfxFrame::PrepareClose_Impl( sal_Bool bUI )
{
// SFX components have a known behaviour
// First check if this frame is the only view to its current document
int bOther = sal_False;
bool bOther = false;
for ( const SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pCur );
!bOther && pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pCur ) )
{
......
......@@ -243,7 +243,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
{
// More Views on the same Document?
SfxObjectShell *pDocSh = GetObjectShell();
int bOther = sal_False;
bool bOther = false;
for ( const SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocSh );
!bOther && pFrame;
pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh ) )
......
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