[Libreoffice-commits] core.git: sfx2/source

Tor Lillqvist tml at iki.fi
Mon Sep 2 11:04:39 PDT 2013


 sfx2/source/dialog/dinfdlg.cxx |   36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

New commits:
commit 071948d452943dce32ff6f7331aed1fd9379fea8
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Sep 2 21:04:10 2013 +0300

    WaE: statement aligned ... [loplugin]
    
    Change-Id: I80256c748fecf1e5d7ffa73fdcde0ed453455b72

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 48aad69..8df6b84 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2564,32 +2564,34 @@ sal_Bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet& rSet )
 
         std::vector< document::CmisProperty > changedProps;
         for ( sal_Int32 i = 0; i< aNewProps.getLength( ); ++i )
-        if ( aOldProps[i].Updatable && !aNewProps[i].Id.isEmpty( ) )
         {
-            if ( aOldProps[i].Type == CMIS_TYPE_DATETIME )
+            if ( aOldProps[i].Updatable && !aNewProps[i].Id.isEmpty( ) )
             {
-                Sequence< util::DateTime > oldValue;
-                aOldProps[i].Value >>= oldValue;
-                // We only edit hours and minutes
-                // don't compare NanoSeconds and Seconds
-                for ( sal_Int32 ii = 0; ii < oldValue.getLength( ); ++ii )
+                if ( aOldProps[i].Type == CMIS_TYPE_DATETIME )
                 {
-                    oldValue[ii].NanoSeconds = 0;
-                    oldValue[ii].Seconds = 0;
+                    Sequence< util::DateTime > oldValue;
+                    aOldProps[i].Value >>= oldValue;
+                    // We only edit hours and minutes
+                    // don't compare NanoSeconds and Seconds
+                    for ( sal_Int32 ii = 0; ii < oldValue.getLength( ); ++ii )
+                    {
+                        oldValue[ii].NanoSeconds = 0;
+                        oldValue[ii].Seconds = 0;
+                    }
+                    Sequence< util::DateTime > newValue;
+                    aNewProps[i].Value >>= newValue;
+                    if ( oldValue != newValue )
+                    {
+                        modifiedNum++;
+                        changedProps.push_back( aNewProps[i] );
+                    }
                 }
-                Sequence< util::DateTime > newValue;
-                aNewProps[i].Value >>= newValue;
-                if ( oldValue != newValue )
+                else if ( aOldProps[i].Value != aNewProps[i].Value )
                 {
                     modifiedNum++;
                     changedProps.push_back( aNewProps[i] );
                 }
             }
-            else if ( aOldProps[i].Value != aNewProps[i].Value )
-            {
-                modifiedNum++;
-                changedProps.push_back( aNewProps[i] );
-            }
         }
         Sequence< document::CmisProperty> aModifiedProps( modifiedNum );
         sal_Int32 nCount = 0;


More information about the Libreoffice-commits mailing list