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

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Thu Nov 20 10:24:58 PST 2014


 sw/source/core/doc/DocumentContentOperationsManager.cxx |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 59554f0405c5146b3cf8faad76771c31bd46fbf7
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Thu Nov 20 18:18:37 2014 +0100

    expand complex cascading conditional operator, step 4
    
    Change-Id: Iaef321f8f9afe436a77a15cb48b5b93003374b47
    Reviewed-on: https://gerrit.libreoffice.org/13011
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index b2c9a82..2539bf7 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -3204,10 +3204,15 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
         bool bAtCntnt = (pAnchor->GetAnchorId() == FLY_AT_PARA);
         if ( !pAPos )
             continue;
-        if ( !bAtCntnt
-                && pAnchor->GetAnchorId() != FLY_AT_FLY
-                && pAnchor->GetAnchorId() != FLY_AT_CHAR)
-            continue;
+        switch ( pAnchor->GetAnchorId() )
+        {
+            case FLY_AT_FLY:
+            case FLY_AT_CHAR:
+            case FLY_AT_PARA:
+                break;
+            default:
+                continue;
+        }
         if ( bCopyFlyAtFly && FLY_AT_FLY == pAnchor->GetAnchorId() )
         {
             if( rRg.aStart > pAPos->nNode.GetIndex() + 1 )


More information about the Libreoffice-commits mailing list