[Libreoffice-commits] core.git: 2 commits - desktop/source filter/source

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Fri Mar 6 06:09:20 PST 2015


 desktop/source/deployment/manager/dp_manager.cxx |    3 +--
 filter/source/msfilter/svdfppt.cxx               |   13 ++++---------
 2 files changed, 5 insertions(+), 11 deletions(-)

New commits:
commit ca3700c42238e71684ec1d5f5eacaea4b1ca3b30
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Fri Mar 6 14:48:24 2015 +0100

    v612: obfuscated if/goto
    
    Change-Id: Ia12b325e41238b9e12e2f388273bd01b96d61c08

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index d7d9cf1..6f0fb86 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3178,11 +3178,10 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const
     DffRecordHeader aContentDataHd;
 
     const DffRecordHeader* pListHd = rMan.aDocRecManager.GetRecordHeader( PPT_PST_List, SEEK_FROM_BEGINNING );
-    while( pListHd )
-    {
+    if( pListHd )
         pListHd->SeekToContent( rSt );
-        if ( !rMan.SeekToContentOfProgTag( 9, rSt, *pListHd, aContentDataHd ) )
-            break;
+    if ( pListHd && rMan.SeekToContentOfProgTag( 9, rSt, *pListHd, aContentDataHd ) )
+    {
         while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < aContentDataHd.GetRecEndFilePos() ) )
         {
             ReadDffRecordHeader( rSt, aHd );
@@ -3257,13 +3256,10 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const
             }
             aHd.SeekToEndOfRecord( rSt );
         }
-        break;
     }
 
-    while( pHd )
+    if ( pHd && rMan.SeekToContentOfProgTag( 9, rSt, *pHd, aContentDataHd ) )
     {   // get the extended paragraph styles on mainmaster ( graphical bullets, num ruling ... )
-        if ( !rMan.SeekToContentOfProgTag( 9, rSt, *pHd, aContentDataHd ) )
-            break;
         while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < aContentDataHd.GetRecEndFilePos() ) )
         {
             ReadDffRecordHeader( rSt, aHd );
@@ -3308,7 +3304,6 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const
             }
             aHd.SeekToEndOfRecord( rSt );
         }
-        break;
     }
     rSt.Seek( nOldPos );
 }
commit 8da61f23384c7f3f2850a6362765506e4e078862
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Fri Mar 6 14:35:24 2015 +0100

    v612: obfuscated if
    
    Change-Id: Idbcb1f7461ac5a1d5e07d7d65f6a7d86f2e3cc57

diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 8d90501..92f32c5 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -93,11 +93,10 @@ OUString getExtensionFolder(OUString const &  parentFolder,
                 StrTitle::createCursor (tempFolder, ::ucbhelper::INCLUDE_FOLDERS_ONLY ) );
 
     OUString title;
-    while (xResultSet->next())
+    if (xResultSet->next())
     {
         title = Reference<sdbc::XRow>(
             xResultSet, UNO_QUERY_THROW )->getString(1 /* Title */ ) ;
-        break;
     }
     return title;
 }


More information about the Libreoffice-commits mailing list