diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-20 12:48:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-20 15:39:38 +0200 |
commit | 283a9790bffa6536f4c26bd31d85f815bc64dd08 (patch) | |
tree | c65ac7fe50fbea809dd765c24edbb47b57adea2b /sd | |
parent | 18bdf78e156f3cd1e6ccbb3ae28e919583bac70c (diff) |
loplugin:indentation check for indent inside block
look for places where the statements inside a block are
not indented
Change-Id: I0cbfa7e0b6fb194b2aff6fa7e070fb907d70ca2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123885
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/eppt/pptexanimations.cxx | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index 1b455036b766..74ef8cd96619 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -887,13 +887,13 @@ sal_uInt32 AnimationExporter::GetPresetID( const OUString& rPreset, sal_uInt32 n if ( rPreset.match("ppt_", 0) ) { - sal_Int32 nLast = rPreset.lastIndexOf( '_' ); - if ( ( nLast != -1 ) && ( ( nLast + 1 ) < rPreset.getLength() ) ) - { - OUString aNumber( rPreset.copy( nLast + 1 ) ); - nPresetId = aNumber.toUInt32(); - bPresetId = true; - } + sal_Int32 nLast = rPreset.lastIndexOf( '_' ); + if ( ( nLast != -1 ) && ( ( nLast + 1 ) < rPreset.getLength() ) ) + { + OUString aNumber( rPreset.copy( nLast + 1 ) ); + nPresetId = aNumber.toUInt32(); + bPresetId = true; + } } else { @@ -1690,46 +1690,46 @@ Reference< XShape > AnimationExporter::getTargetElementShape( const Any& rAny, s rParagraphTarget = false; - if( !xShape.is() ) - { + if( xShape.is() ) + return xShape; + ParagraphTarget aParaTarget; if( rAny >>= aParaTarget ) xShape = aParaTarget.Shape; - if ( xShape.is() ) - { - // now calculating the character range for the paragraph - sal_Int16 nParagraph = aParaTarget.Paragraph; - Reference< XSimpleText > xText( xShape, UNO_QUERY ); - if ( xText.is() ) - { - rParagraphTarget = true; - Reference< XEnumerationAccess > xTextParagraphEnumerationAccess( xText, UNO_QUERY ); - if ( xTextParagraphEnumerationAccess.is() ) + if ( !xShape.is() ) + return xShape; + + // now calculating the character range for the paragraph + sal_Int16 nParagraph = aParaTarget.Paragraph; + Reference< XSimpleText > xText( xShape, UNO_QUERY ); + if ( !xText.is() ) + return xShape; + + rParagraphTarget = true; + Reference< XEnumerationAccess > xTextParagraphEnumerationAccess( xText, UNO_QUERY ); + if ( !xTextParagraphEnumerationAccess.is() ) + return xShape; + + Reference< XEnumeration > xTextParagraphEnumeration( xTextParagraphEnumerationAccess->createEnumeration() ); + if ( !xTextParagraphEnumeration.is() ) + return xShape; + + sal_Int16 nCurrentParagraph; + rBegin = rEnd = nCurrentParagraph = 0; + while ( xTextParagraphEnumeration->hasMoreElements() ) + { + Reference< XTextRange > xTextRange( xTextParagraphEnumeration->nextElement(), UNO_QUERY ); + if ( xTextRange.is() ) { - Reference< XEnumeration > xTextParagraphEnumeration( xTextParagraphEnumerationAccess->createEnumeration() ); - if ( xTextParagraphEnumeration.is() ) - { - sal_Int16 nCurrentParagraph; - rBegin = rEnd = nCurrentParagraph = 0; - while ( xTextParagraphEnumeration->hasMoreElements() ) - { - Reference< XTextRange > xTextRange( xTextParagraphEnumeration->nextElement(), UNO_QUERY ); - if ( xTextRange.is() ) - { - OUString aParaText( xTextRange->getString() ); - sal_Int32 nLength = aParaText.getLength() + 1; - rEnd += nLength; - if ( nCurrentParagraph == nParagraph ) - break; - nCurrentParagraph++; - rBegin += nLength; - } - } - } - } + OUString aParaText( xTextRange->getString() ); + sal_Int32 nLength = aParaText.getLength() + 1; + rEnd += nLength; + if ( nCurrentParagraph == nParagraph ) + break; + nCurrentParagraph++; + rBegin += nLength; } } - } return xShape; } |