summaryrefslogtreecommitdiff
path: root/vbahelper/source
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2011-10-07 15:52:44 +0300
committerTor Lillqvist <tlillqvist@suse.com>2011-10-07 15:56:12 +0300
commitfd5a9a65f0cadd046d2f67924ba9e3d0a380208f (patch)
tree00f3c6abd8148749e35b710c9846dfb6a1475dd9 /vbahelper/source
parentb693eba2739361f343dd373b80945542cc6703c1 (diff)
WaE: unreachable code
Interesting use of for loops with the body of the loop returning unconditionally.
Diffstat (limited to 'vbahelper/source')
-rw-r--r--vbahelper/source/vbahelper/vbashaperange.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/vbahelper/source/vbahelper/vbashaperange.cxx b/vbahelper/source/vbahelper/vbashaperange.cxx
index 44f2845d36d4..417cb1f94751 100644
--- a/vbahelper/source/vbahelper/vbashaperange.cxx
+++ b/vbahelper/source/vbahelper/vbashaperange.cxx
@@ -129,7 +129,7 @@ ScVbaShapeRange::IncrementTop( double Increment ) throw (uno::RuntimeException)
rtl::OUString SAL_CALL ScVbaShapeRange::getName() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getName( );
@@ -150,7 +150,7 @@ void SAL_CALL ScVbaShapeRange::setName( const rtl::OUString& _name ) throw (uno:
double SAL_CALL ScVbaShapeRange::getHeight() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getHeight( );
@@ -171,7 +171,7 @@ void SAL_CALL ScVbaShapeRange::setHeight( double _height ) throw (uno::RuntimeEx
double SAL_CALL ScVbaShapeRange::getWidth() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getWidth( );
@@ -192,7 +192,7 @@ void SAL_CALL ScVbaShapeRange::setWidth( double _width ) throw (uno::RuntimeExce
double SAL_CALL ScVbaShapeRange::getLeft() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getLeft();
@@ -213,7 +213,7 @@ void SAL_CALL ScVbaShapeRange::setLeft( double _left ) throw (uno::RuntimeExcept
double SAL_CALL ScVbaShapeRange::getTop() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getTop();
@@ -234,7 +234,7 @@ void SAL_CALL ScVbaShapeRange::setTop( double _top ) throw (uno::RuntimeExceptio
uno::Reference< ov::msforms::XLineFormat > SAL_CALL ScVbaShapeRange::getLine() throw (css::uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getLine();
@@ -245,7 +245,7 @@ uno::Reference< ov::msforms::XLineFormat > SAL_CALL ScVbaShapeRange::getLine() t
uno::Reference< ov::msforms::XFillFormat > SAL_CALL ScVbaShapeRange::getFill() throw (css::uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getFill();
@@ -256,7 +256,7 @@ uno::Reference< ov::msforms::XFillFormat > SAL_CALL ScVbaShapeRange::getFill() t
::sal_Bool SAL_CALL ScVbaShapeRange::getLockAspectRatio() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getLockAspectRatio();
@@ -277,7 +277,7 @@ void SAL_CALL ScVbaShapeRange::setLockAspectRatio( ::sal_Bool _lockaspectratio )
::sal_Bool SAL_CALL ScVbaShapeRange::getLockAnchor() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getLockAnchor();
@@ -298,7 +298,7 @@ void SAL_CALL ScVbaShapeRange::setLockAnchor( ::sal_Bool _lockanchor ) throw (un
::sal_Int32 SAL_CALL ScVbaShapeRange::getRelativeHorizontalPosition() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getRelativeHorizontalPosition();
@@ -319,7 +319,7 @@ void SAL_CALL ScVbaShapeRange::setRelativeHorizontalPosition( ::sal_Int32 _relat
::sal_Int32 SAL_CALL ScVbaShapeRange::getRelativeVerticalPosition() throw (uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->getRelativeVerticalPosition();
@@ -340,7 +340,7 @@ void SAL_CALL ScVbaShapeRange::setRelativeVerticalPosition( ::sal_Int32 _relativ
uno::Any SAL_CALL ScVbaShapeRange::TextFrame( ) throw (css::uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->TextFrame();
@@ -351,7 +351,7 @@ uno::Any SAL_CALL ScVbaShapeRange::TextFrame( ) throw (css::uno::RuntimeExcepti
uno::Any SAL_CALL ScVbaShapeRange::WrapFormat( ) throw (css::uno::RuntimeException)
{
sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
+ for ( sal_Int32 index = 1; index <= nLen; /* ++index unreachable */ )
{
uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
return xShape->WrapFormat();