Author: hdu
Date: Tue Jan 21 14:09:37 2014
New Revision: 1560020
URL: http://svn.apache.org/r1560020
Log:
#i123817# boost::shared_ptr doesn't have an implicit conversion to bool
Constructs that expect it fail at least in XCode4's clang in C++11 mode.
An implicit conversion from pointer to bool is already suspicious enough
and a shared_ptr->pointer->bool conversion is even worse. Cleaning up
the code fixes the build breaker seen in boost/libc++/clang environments.
Modified:
openoffice/trunk/main/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
openoffice/trunk/main/slideshow/source/engine/animatedsprite.cxx
openoffice/trunk/main/slideshow/source/engine/shapes/viewshape.cxx
openoffice/trunk/main/slideshow/source/engine/shapesubset.cxx
openoffice/trunk/main/slideshow/source/engine/slide/slideanimations.cxx
openoffice/trunk/main/slideshow/source/inc/shapeattributelayer.hxx
openoffice/trunk/main/slideshow/source/inc/shapeattributelayerholder.hxx
openoffice/trunk/main/sw/source/core/inc/bookmrk.hxx
openoffice/trunk/main/writerfilter/source/dmapper/StyleSheetTable.cxx
Modified: openoffice/trunk/main/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/slidesorter/view/SlsButtonBar.cxx?rev=1560020&r1=1560019&r2=1560020&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
(original)
+++ openoffice/trunk/main/sd/source/ui/slidesorter/view/SlsButtonBar.cxx Tue
Jan 21 14:09:37 2014
@@ -469,7 +469,7 @@ void ButtonBar::Paint (
bool ButtonBar::IsMouseOverButton (void) const
{
- return mpButtonUnderMouse;
+ return (mpButtonUnderMouse.get() != NULL);
}
Modified: openoffice/trunk/main/slideshow/source/engine/animatedsprite.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/slideshow/source/engine/animatedsprite.cxx?rev=1560020&r1=1560019&r2=1560020&view=diff
==============================================================================
--- openoffice/trunk/main/slideshow/source/engine/animatedsprite.cxx (original)
+++ openoffice/trunk/main/slideshow/source/engine/animatedsprite.cxx Tue Jan 21
14:09:37 2014
@@ -157,7 +157,7 @@ namespace slideshow
}
}
- return mpSprite;
+ return (mpSprite.get() != NULL);
}
void AnimatedSprite::setPixelOffset( const ::basegfx::B2DSize&
rPixelOffset )
Modified: openoffice/trunk/main/slideshow/source/engine/shapes/viewshape.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/slideshow/source/engine/shapes/viewshape.cxx?rev=1560020&r1=1560019&r2=1560020&view=diff
==============================================================================
--- openoffice/trunk/main/slideshow/source/engine/shapes/viewshape.cxx
(original)
+++ openoffice/trunk/main/slideshow/source/engine/shapes/viewshape.cxx Tue Jan
21 14:09:37 2014
@@ -184,7 +184,7 @@ namespace slideshow
}
}
- return io_rCacheEntry.mpRenderer;
+ return (io_rCacheEntry.mpRenderer.get() != NULL);
}
bool ViewShape::draw( const ::cppcanvas::CanvasSharedPtr&
rDestinationCanvas,
Modified: openoffice/trunk/main/slideshow/source/engine/shapesubset.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/slideshow/source/engine/shapesubset.cxx?rev=1560020&r1=1560019&r2=1560020&view=diff
==============================================================================
--- openoffice/trunk/main/slideshow/source/engine/shapesubset.cxx (original)
+++ openoffice/trunk/main/slideshow/source/engine/shapesubset.cxx Tue Jan 21
14:09:37 2014
@@ -110,7 +110,7 @@ namespace slideshow
maTreeNode );
}
- return mpSubsetShape;
+ return (mpSubsetShape.get() != NULL);
}
void ShapeSubset::disableSubsetShape()
Modified:
openoffice/trunk/main/slideshow/source/engine/slide/slideanimations.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/slideshow/source/engine/slide/slideanimations.cxx?rev=1560020&r1=1560019&r2=1560020&view=diff
==============================================================================
--- openoffice/trunk/main/slideshow/source/engine/slide/slideanimations.cxx
(original)
+++ openoffice/trunk/main/slideshow/source/engine/slide/slideanimations.cxx Tue
Jan 21 14:09:37 2014
@@ -80,7 +80,7 @@ namespace slideshow
SHOW_NODE_TREE( mpRootNode );
- return mpRootNode;
+ return (mpRootNode.get() != NULL);
}
bool SlideAnimations::isAnimated() const
Modified: openoffice/trunk/main/slideshow/source/inc/shapeattributelayer.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/slideshow/source/inc/shapeattributelayer.hxx?rev=1560020&r1=1560019&r2=1560020&view=diff
==============================================================================
--- openoffice/trunk/main/slideshow/source/inc/shapeattributelayer.hxx
(original)
+++ openoffice/trunk/main/slideshow/source/inc/shapeattributelayer.hxx Tue Jan
21 14:09:37 2014
@@ -471,7 +471,7 @@ namespace slideshow
// ShapeAttributeLayer(const ShapeAttributeLayer&);
// ShapeAttributeLayer& operator=( const ShapeAttributeLayer& );
- bool haveChild() const { return mpChild; }
+ bool haveChild() const { return (mpChild.get() != NULL); }
void updateStateIds();
template< typename T > T calcValue( const T&
rCurrValue,
Modified:
openoffice/trunk/main/slideshow/source/inc/shapeattributelayerholder.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/slideshow/source/inc/shapeattributelayerholder.hxx?rev=1560020&r1=1560019&r2=1560020&view=diff
==============================================================================
--- openoffice/trunk/main/slideshow/source/inc/shapeattributelayerholder.hxx
(original)
+++ openoffice/trunk/main/slideshow/source/inc/shapeattributelayerholder.hxx
Tue Jan 21 14:09:37 2014
@@ -87,7 +87,7 @@ namespace slideshow
if( mpShape )
mpAttributeLayer = mpShape->createAttributeLayer();
- return mpAttributeLayer;
+ return (mpAttributeLayer.get() != NULL);
}
ShapeAttributeLayerSharedPtr get() const
Modified: openoffice/trunk/main/sw/source/core/inc/bookmrk.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/inc/bookmrk.hxx?rev=1560020&r1=1560019&r2=1560020&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/inc/bookmrk.hxx (original)
+++ openoffice/trunk/main/sw/source/core/inc/bookmrk.hxx Tue Jan 21 14:09:37
2014
@@ -76,7 +76,7 @@ namespace sw { namespace mark
return GetOtherMarkPos( );
}
virtual bool IsExpanded() const
- { return m_pPos2; }
+ { return (m_pPos2.get() != NULL); }
//setters
virtual void SetName(const ::rtl::OUString& rName)
Modified: openoffice/trunk/main/writerfilter/source/dmapper/StyleSheetTable.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/writerfilter/source/dmapper/StyleSheetTable.cxx?rev=1560020&r1=1560019&r2=1560020&view=diff
==============================================================================
--- openoffice/trunk/main/writerfilter/source/dmapper/StyleSheetTable.cxx
(original)
+++ openoffice/trunk/main/writerfilter/source/dmapper/StyleSheetTable.cxx Tue
Jan 21 14:09:37 2014
@@ -167,7 +167,7 @@ PropertyMapPtr TableStyleSheetEntry::Get
pStack->push_back(pEntry);
TableStyleSheetEntry* pParent = static_cast<TableStyleSheetEntry *>(
pEntry.get( ) );
- pProps->insert( pParent->GetProperties( nMask ), pStack );
+ pProps->insert( pParent->GetProperties( nMask ), (pStack.get() !=
NULL) );
pStack->pop_back();
}