diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-17 17:10:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-17 18:45:16 +0100 |
commit | 8711842d1b861544ed4a934f675adbed7cf83f32 (patch) | |
tree | b330404723edaf8750b6333d0e1e321f5c039d2f /sd/source | |
parent | a2b1afaf88c2416f398a57cae1c5b18325993a47 (diff) |
bool improvements
Change-Id: I19b429741a2ba972bef8863008657823b9bb7f91
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/core/drawdoc2.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/html/pubdlg.cxx | 4 | ||||
-rw-r--r-- | sd/source/filter/xml/sdtransform.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/unomodel.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/table/TableDesignPane.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/tools/EventMultiplexer.cxx | 2 |
6 files changed, 11 insertions, 9 deletions
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 408ed374cfdd..5c3c04b3e63d 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -323,7 +323,7 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_ bool bNotesLink = ( aURLCopy.getLength() >= sNotes.getLength() + 3 && aURLCopy.endsWith(sNotes) ); - if (bNotesLink ^ bNotes) + if (bNotesLink != bNotes) continue; // no compatible link and page if (bNotes) diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index fcf96066e6aa..67b5c9e3131b 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -129,7 +129,7 @@ public: SdPublishingDesign(); - int operator ==(const SdPublishingDesign & rDesign) const; + bool operator ==(const SdPublishingDesign & rDesign) const; friend SvStream& operator >> (SvStream& rIn, SdPublishingDesign& rDesign); friend SvStream& WriteSdPublishingDesign(SvStream& rOut, const SdPublishingDesign& rDesign); }; @@ -179,7 +179,7 @@ SdPublishingDesign::SdPublishingDesign() } // Compares the values without paying attention to the name -int SdPublishingDesign::operator ==(const SdPublishingDesign & rDesign) const +bool SdPublishingDesign::operator ==(const SdPublishingDesign & rDesign) const { return ( diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx index 53f785132728..ed5eb5ab2806 100644 --- a/sd/source/filter/xml/sdtransform.cxx +++ b/sd/source/filter/xml/sdtransform.cxx @@ -313,7 +313,9 @@ bool SdTransformOOo2xDocument::transformItemSet( SfxItemSet& rSet, bool bNumberi bool SdTransformOOo2xDocument::removeAlienAttributes( SfxItemSet& rSet ) { - return removeAlienAttributes( rSet, EE_PARA_XMLATTRIBS ) | removeAlienAttributes( rSet, SDRATTR_XMLATTRIBUTES ); + bool b = removeAlienAttributes( rSet, EE_PARA_XMLATTRIBS ); + b |= removeAlienAttributes( rSet, SDRATTR_XMLATTRIBUTES ); + return b; } bool SdTransformOOo2xDocument::removeAlienAttributes( SfxItemSet& rSet, sal_uInt16 nWhich ) diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx index dc5d8332fa26..515500cd8f04 100644 --- a/sd/source/ui/inc/unomodel.hxx +++ b/sd/source/ui/inc/unomodel.hxx @@ -127,8 +127,8 @@ public: static rtl::Reference< SdXImpressDocument > GetModel( SdDrawDocument* pDoc ); // intern - virtual int operator==( const SdXImpressDocument& rModel ) const { return mpDoc == rModel.mpDoc; } - virtual int operator!=( const SdXImpressDocument& rModel ) const { return mpDoc != rModel.mpDoc; } + virtual bool operator==( const SdXImpressDocument& rModel ) const { return mpDoc == rModel.mpDoc; } + virtual bool operator!=( const SdXImpressDocument& rModel ) const { return mpDoc != rModel.mpDoc; } ::sd::DrawDocShell* GetDocShell() const { return mpDocShell; } SdDrawDocument* GetDoc() const { return mpDoc; } diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index eb52e4ff9423..8aa954ac9f60 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -842,9 +842,9 @@ short TableDesignDialog::Execute() if( aImpl.isOptionsChanged() ) aImpl.ApplyOptions(); - return true; + return RET_OK; } - return false; + return RET_CANCEL; } // ==================================================================== diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx index e9550bcfbcf2..5052e60758ad 100644 --- a/sd/source/ui/tools/EventMultiplexer.cxx +++ b/sd/source/ui/tools/EventMultiplexer.cxx @@ -773,7 +773,7 @@ void EventMultiplexer::Implementation::CallListeners (EventMultiplexerEvent& rEv ListenerList::const_iterator iListenerEnd (aCopyListeners.end()); for (; iListener!=iListenerEnd; ++iListener) { - if ((iListener->second && rEvent.meEventId) != 0) + if ((iListener->second && rEvent.meEventId)) iListener->first.Call(&rEvent); } } |