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

operator == return type wants to be bool

Change-Id: I7ef0a09b718ca701ed2b6f4a50593f8ef1421dd3
üst 99d4b08d
...@@ -740,13 +740,13 @@ SvxNumRule& SvxNumRule::operator=( const SvxNumRule& rCopy ) ...@@ -740,13 +740,13 @@ SvxNumRule& SvxNumRule::operator=( const SvxNumRule& rCopy )
return *this; return *this;
} }
int SvxNumRule::operator==( const SvxNumRule& rCopy) const bool SvxNumRule::operator==( const SvxNumRule& rCopy) const
{ {
if(nLevelCount != rCopy.nLevelCount || if(nLevelCount != rCopy.nLevelCount ||
nFeatureFlags != rCopy.nFeatureFlags || nFeatureFlags != rCopy.nFeatureFlags ||
bContinuousNumbering != rCopy.bContinuousNumbering || bContinuousNumbering != rCopy.bContinuousNumbering ||
eNumberingType != rCopy.eNumberingType) eNumberingType != rCopy.eNumberingType)
return sal_False; return false;
for(sal_uInt16 i = 0; i < nLevelCount; i++) for(sal_uInt16 i = 0; i < nLevelCount; i++)
{ {
if ( if (
...@@ -756,10 +756,10 @@ int SvxNumRule::operator==( const SvxNumRule& rCopy) const ...@@ -756,10 +756,10 @@ int SvxNumRule::operator==( const SvxNumRule& rCopy) const
(aFmts[i] && *aFmts[i] != *rCopy.aFmts[i]) (aFmts[i] && *aFmts[i] != *rCopy.aFmts[i])
) )
{ {
return sal_False; return false;
} }
} }
return sal_True; return true;
} }
const SvxNumberFormat* SvxNumRule::Get(sal_uInt16 nLevel)const const SvxNumberFormat* SvxNumRule::Get(sal_uInt16 nLevel)const
......
...@@ -262,7 +262,7 @@ public: ...@@ -262,7 +262,7 @@ public:
SvxNumRule(SvStream &rStream); SvxNumRule(SvStream &rStream);
virtual ~SvxNumRule(); virtual ~SvxNumRule();
int operator==( const SvxNumRule& ) const; bool operator==( const SvxNumRule& ) const;
bool operator!=( const SvxNumRule& rRule ) const {return !(*this == rRule);} bool operator!=( const SvxNumRule& rRule ) const {return !(*this == rRule);}
SvxNumRule& operator=( const SvxNumRule& ); SvxNumRule& operator=( const SvxNumRule& );
......
...@@ -86,7 +86,7 @@ public: ...@@ -86,7 +86,7 @@ public:
inline SvxMacroTableDtor( const SvxMacroTableDtor &rCpy ) : aSvxMacroTable(rCpy.aSvxMacroTable) { } inline SvxMacroTableDtor( const SvxMacroTableDtor &rCpy ) : aSvxMacroTable(rCpy.aSvxMacroTable) { }
SvxMacroTableDtor& operator=( const SvxMacroTableDtor &rCpy ); SvxMacroTableDtor& operator=( const SvxMacroTableDtor &rCpy );
int operator==( const SvxMacroTableDtor& rOther ) const; bool operator==( const SvxMacroTableDtor& rOther ) const;
// deletes all entries // deletes all entries
void clear() { aSvxMacroTable.clear(); } void clear() { aSvxMacroTable.clear(); }
......
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
~XOBitmap(); ~XOBitmap();
XOBitmap& operator=( const XOBitmap& rXOBitmap ); XOBitmap& operator=( const XOBitmap& rXOBitmap );
int operator==( const XOBitmap& rXOBitmap ) const; bool operator==( const XOBitmap& rXOBitmap ) const;
void Bitmap2Array(); void Bitmap2Array();
void Array2Bitmap(); void Array2Bitmap();
......
...@@ -77,11 +77,11 @@ SvxMacroTableDtor& SvxMacroTableDtor::operator=( const SvxMacroTableDtor& rTbl ) ...@@ -77,11 +77,11 @@ SvxMacroTableDtor& SvxMacroTableDtor::operator=( const SvxMacroTableDtor& rTbl )
return *this; return *this;
} }
int SvxMacroTableDtor::operator==( const SvxMacroTableDtor& rOther ) const bool SvxMacroTableDtor::operator==( const SvxMacroTableDtor& rOther ) const
{ {
// Count different => odd in any case // Count different => odd in any case
if ( aSvxMacroTable.size() != rOther.aSvxMacroTable.size() ) if ( aSvxMacroTable.size() != rOther.aSvxMacroTable.size() )
return sal_False; return false;
// Compare single ones; the sequence matters due to performance reasons // Compare single ones; the sequence matters due to performance reasons
SvxMacroTable::const_iterator it1 = aSvxMacroTable.begin(); SvxMacroTable::const_iterator it1 = aSvxMacroTable.begin();
...@@ -93,10 +93,10 @@ int SvxMacroTableDtor::operator==( const SvxMacroTableDtor& rOther ) const ...@@ -93,10 +93,10 @@ int SvxMacroTableDtor::operator==( const SvxMacroTableDtor& rOther ) const
if ( it1->first != it2->first || if ( it1->first != it2->first ||
rOwnMac.GetLibName() != rOtherMac.GetLibName() || rOwnMac.GetLibName() != rOtherMac.GetLibName() ||
rOwnMac.GetMacName() != rOtherMac.GetMacName() ) rOwnMac.GetMacName() != rOtherMac.GetMacName() )
return sal_False; return false;
} }
return sal_True; return true;
} }
SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion ) SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion )
......
...@@ -101,7 +101,7 @@ XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp ) ...@@ -101,7 +101,7 @@ XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp )
return *this; return *this;
} }
int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const bool XOBitmap::operator==( const XOBitmap& rXOBitmap ) const
{ {
if( eType != rXOBitmap.eType || if( eType != rXOBitmap.eType ||
aGraphicObject != rXOBitmap.aGraphicObject || aGraphicObject != rXOBitmap.aGraphicObject ||
...@@ -110,7 +110,7 @@ int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const ...@@ -110,7 +110,7 @@ int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const
aBckgrColor != rXOBitmap.aBckgrColor || aBckgrColor != rXOBitmap.aBckgrColor ||
bGraphicDirty != rXOBitmap.bGraphicDirty ) bGraphicDirty != rXOBitmap.bGraphicDirty )
{ {
return sal_False; return false;
} }
if( pPixelArray && rXOBitmap.pPixelArray ) if( pPixelArray && rXOBitmap.pPixelArray )
...@@ -119,10 +119,10 @@ int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const ...@@ -119,10 +119,10 @@ int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const
for( sal_uInt16 i = 0; i < nCount; i++ ) for( sal_uInt16 i = 0; i < nCount; i++ )
{ {
if( *( pPixelArray + i ) != *( rXOBitmap.pPixelArray + i ) ) if( *( pPixelArray + i ) != *( rXOBitmap.pPixelArray + i ) )
return sal_False; return false;
} }
} }
return sal_True; return true;
} }
Bitmap XOBitmap::GetBitmap() const Bitmap XOBitmap::GetBitmap() const
......
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