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/uibase/uiview | |
parent | cb11bca59019682c0d7eae837e2022bfe02ddc9d (diff) |
use unique() for checks for multiselection
Change-Id: I595dea68b67d1a40df7955bee7e6a935b4efdc1c
Diffstat (limited to 'sw/source/uibase/uiview')
-rw-r--r-- | sw/source/uibase/uiview/formatclipboard.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewling.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx index ffaa51547446..229fb83869ea 100644 --- a/sw/source/uibase/uiview/formatclipboard.cxx +++ b/sw/source/uibase/uiview/formatclipboard.cxx @@ -294,7 +294,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP bool bHasSelection = pCrsr->HasMark(); bool bForwardSelection = false; - if(!bHasSelection && pCrsr->GetPrev() != pCrsr && pCrsr->GetPrev() != 0) + if(!bHasSelection && pCrsr->IsMultiSelection()) { // if cursor has multiple selections diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 1abec862378a..17cb15b06cbc 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -487,7 +487,7 @@ bool SwView::IsValidSelectionForThesaurus() const // must not be a multi-selection, and if it is a selection it needs // to be within a single paragraph - const bool bMultiSel = m_pWrtShell->GetCrsr() != m_pWrtShell->GetCrsr()->GetNext(); + const bool bMultiSel = m_pWrtShell->GetCrsr()->IsMultiSelection(); const bool bSelection = static_cast<SwCrsrShell*>(m_pWrtShell)->HasSelection(); return !bMultiSel && (!bSelection || m_pWrtShell->IsSelOnePara() ); } |