diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-05 05:58:45 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-05 16:10:36 +0100 |
commit | 41104b6ea86aacd5bc5dc68b1b6daac8f31e4982 (patch) | |
tree | e4fdb53bb82060f4ce1d267f5ec95f7fadc0011b /sw/source/core/edit | |
parent | cb11bca59019682c0d7eae837e2022bfe02ddc9d (diff) |
use unique() for checks for multiselection
Change-Id: I595dea68b67d1a40df7955bee7e6a935b4efdc1c
Diffstat (limited to 'sw/source/core/edit')
-rw-r--r-- | sw/source/core/edit/eddel.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/editsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/ednumber.cxx | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 4a2a63452171..7cc097316fff 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -326,7 +326,7 @@ bool SwEditShell::DelFullPara() { SwPaM* pCrsr = GetCrsr(); // no multi selection - if( pCrsr->GetNext() == pCrsr && !HasReadonlySel() ) + if( !pCrsr->IsMultiSelection() && !HasReadonlySel() ) { SET_CURR_SHELL( this ); StartAllAction(); diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 617a4e3c7fc5..a646d20a7681 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -621,7 +621,7 @@ bool SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const OUString& rStr, boo { // Selection existent, multi selection? bool bDelTxt = true; - if( pCrsr->GetNext() == pCrsr ) + if( !pCrsr->IsMultiSelection() ) { // einfach Selection -> Text ueberpruefen const OUString sTxt(comphelper::string::stripEnd(GetSelTxt(), ' ')); diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index 92f24287db2b..fc86a601940c 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -276,7 +276,7 @@ void SwEditShell::DelNumRules() StartAllAction(); SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() != pCrsr ) // multi-selection? + if( pCrsr->IsMultiSelection() ) { GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); SwPamRanges aRangeArr( *pCrsr ); @@ -307,7 +307,7 @@ bool SwEditShell::NumUpDown( bool bDown ) bool bRet = true; SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() == pCrsr ) // no multiple selection ? + if( !pCrsr->IsMultiSelection() ) bRet = GetDoc()->NumUpDown( *pCrsr, bDown ); else { @@ -528,7 +528,7 @@ bool SwEditShell::OutlineUpDown( short nOffset ) bool bRet = true; SwPaM* pCrsr = GetCrsr(); - if( pCrsr->GetNext() == pCrsr ) // no multi selection? + if( !pCrsr->IsMultiSelection() ) bRet = GetDoc()->OutlineUpDown( *pCrsr, nOffset ); else { @@ -789,7 +789,7 @@ void SwEditShell::SetNumRuleStart( bool bFlag, SwPaM* pPaM ) { StartAllAction(); SwPaM* pCrsr = pPaM ? pPaM : GetCrsr(); - if( pCrsr->GetNext() != pCrsr ) // multiple selection ? + if( pCrsr->IsMultiSelection() ) // multiple selection ? { GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); SwPamRanges aRangeArr( *pCrsr ); @@ -816,7 +816,7 @@ void SwEditShell::SetNodeNumStart( sal_uInt16 nStt, SwPaM* pPaM ) StartAllAction(); SwPaM* pCrsr = pPaM ? pPaM : GetCrsr(); - if( pCrsr->GetNext() != pCrsr ) // multiple selection ? + if( pCrsr->IsMultiSelection() ) // multiple selection ? { GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); SwPamRanges aRangeArr( *pCrsr ); |