[Libreoffice-commits] core.git: sw/source
Bjoern Michaelsen
bjoern.michaelsen at canonical.com
Thu Nov 20 10:18:07 PST 2014
sw/source/core/doc/DocumentContentOperationsManager.cxx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit b5349435d6d149106a573bf891cf99743392f114
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Wed Nov 19 21:21:23 2014 +0100
refactor assignment out of expression
Change-Id: Ief32b521eece3fde1a1de6782443ca6a098dee3d
Reviewed-on: https://gerrit.libreoffice.org/12992
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 cd25464..6955cde 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -2032,15 +2032,18 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos,
// where the rPaM is located.
// If the Content was moved to the back and the SavePam's SPoint is
// in the next Node, we have to deal with this when saving the Undo object!
- SwTxtNode * pPamTxtNd = 0;
+ SwTxtNode * pPamTxtNd = nullptr;
// Is passed to SwUndoMove, which happens when subsequently calling Undo JoinNext.
// If it's not possible to call Undo JoinNext here.
bool bJoin = bSplit && pTNd;
- bCorrSavePam = bCorrSavePam &&
- 0 != ( pPamTxtNd = rPaM.GetNode().GetTxtNode() )
- && pPamTxtNd->CanJoinNext()
- && (*rPaM.GetPoint() <= *aSavePam.GetPoint());
+ if( bCorrSavePam )
+ {
+ pPamTxtNd = rPaM.GetNode().GetTxtNode();
+ bCorrSavePam = (pPamTxtNd != nullptr)
+ && pPamTxtNd->CanJoinNext()
+ && (*rPaM.GetPoint() <= *aSavePam.GetPoint());
+ }
// Do two Nodes have to be joined at the SavePam?
if( bJoin && pTNd->CanJoinNext() )
More information about the Libreoffice-commits
mailing list