sw/source/core/doc/DocumentContentOperationsManager.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
New commits: commit b5349435d6d149106a573bf891cf99743392f114 Author: Bjoern Michaelsen <bjoern.michael...@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.michael...@canonical.com> Tested-by: Björn Michaelsen <bjoern.michael...@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() )
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits