summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-11-20 17:10:45 +0100
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2014-11-20 18:23:51 +0000
commit6c015afd0c9d1b9c64a127ceab24a37969699239 (patch)
treeed67b996077faed5d54f03d5ac0d4b5df8931787
parente7f58e05ee2726f3b3f7af6ab255c613ccd47200 (diff)
expand complex cascading conditional operator, step 1
Change-Id: I7d33d587b94877dac2ca1e9f4bb90baba3aea6ac Reviewed-on: https://gerrit.libreoffice.org/13008 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 6955cde6edd7..9d93f3654e3f 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -3202,17 +3202,20 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
bool bAtCntnt = (pAnchor->GetAnchorId() == FLY_AT_PARA);
- if ( pAPos &&
- ( bAtCntnt ||
- (pAnchor->GetAnchorId() == FLY_AT_FLY) ||
- (pAnchor->GetAnchorId() == FLY_AT_CHAR)) &&
- (( bCopyFlyAtFly && FLY_AT_FLY == pAnchor->GetAnchorId() )
+ if ( !pAPos )
+ continue;
+ if ( !bAtCntnt
+ && pAnchor->GetAnchorId() != FLY_AT_FLY
+ && pAnchor->GetAnchorId() != FLY_AT_CHAR)
+ continue;
+ if (( bCopyFlyAtFly && FLY_AT_FLY == pAnchor->GetAnchorId() )
? rRg.aStart <= pAPos->nNode.GetIndex() + 1
: ( m_rDoc.getIDocumentRedlineAccess().IsRedlineMove()
? rRg.aStart < pAPos->nNode
- : rRg.aStart <= pAPos->nNode )) &&
- pAPos->nNode <= rRg.aEnd )
+ : rRg.aStart <= pAPos->nNode ))
{
+ if ( pAPos->nNode > rRg.aEnd )
+ continue;
//frames at the last source node are not always copied:
//- if the node is empty and is the last node of the document or a table cell
// or a text frame then tey have to be copied