diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-09-24 13:21:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-24 21:02:02 +0200 |
commit | 7cd5b35caa8d4fa9d0ba2b2c6ce4b88726ed2be6 (patch) | |
tree | 014d9f0fde1b5383eb0bd82327d3bb4aa8268027 /sw/source/uibase | |
parent | a93c3f2eb07fc15d1ebb0fd70ab58ecea27bd4f1 (diff) |
return SwCursor from IShellCursorSupplier
rather than casting it
Change-Id: Ia950f521c8f73d8a0da59344db9b5aacb727aca8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122576
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxvw.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/delete.cxx | 8 |
5 files changed, 13 insertions, 13 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index f5ed67967644..13c0584fb562 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -4101,7 +4101,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, { rSrcSh.CalcLayout(); rSrcSh.SwCursorShell::SetCursor(rDragPt); - rSrcSh.GetSwCursor()->SetMark(); + rSrcSh.GetCursor()->SetMark(); } } diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index ba86732a82a3..c6d42d7830dd 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -653,8 +653,8 @@ void SwView::Replace() { /* check that the selection match the search string*/ //save state - SwPosition aStartPos = * m_pWrtShell->GetSwCursor()->Start(); - SwPosition aEndPos = * m_pWrtShell->GetSwCursor()->End(); + SwPosition aStartPos = * m_pWrtShell->GetCursor()->Start(); + SwPosition aEndPos = * m_pWrtShell->GetCursor()->End(); bool bHasSelection = s_pSrchItem->GetSelection(); SvxSearchCmd nOldCmd = s_pSrchItem->GetCommand(); @@ -672,13 +672,13 @@ void SwView::Replace() if(! s_pSrchItem->GetBackward() ) { - (* m_pWrtShell->GetSwCursor()->Start()) = aStartPos; - (* m_pWrtShell->GetSwCursor()->End()) = aEndPos; + (* m_pWrtShell->GetCursor()->Start()) = aStartPos; + (* m_pWrtShell->GetCursor()->End()) = aEndPos; } else { - (* m_pWrtShell->GetSwCursor()->Start()) = aEndPos; - (* m_pWrtShell->GetSwCursor()->End()) = aStartPos; + (* m_pWrtShell->GetCursor()->Start()) = aEndPos; + (* m_pWrtShell->GetCursor()->End()) = aStartPos; } bReqReplace = false; } diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index fc6891adc277..7e133b9e78c2 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -1448,7 +1448,7 @@ void SwXTextViewCursor::setString(const OUString& aString) case ShellMode::Text : { SwWrtShell& rSh = m_pView->GetWrtShell(); - SwCursor* pShellCursor = rSh.GetSwCursor(); + SwCursor* pShellCursor = rSh.GetCursor(); SwUnoCursorHelper::SetString(*pShellCursor, aString); break; } diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 9fb2367e0d39..2acbcc679ef8 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3651,7 +3651,7 @@ void SwContentTree::UpdateTracking() void SwContentTree::SelectOutlinesWithSelection() { - SwCursor* pFirstCursor = m_pActiveShell->GetSwCursor(); + SwCursor* pFirstCursor = m_pActiveShell->GetCursor(); SwCursor* pCursor = pFirstCursor; std::vector<SwOutlineNodes::size_type> aOutlinePositions; do diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx index dae15a96364e..0c1cd4f23d6f 100644 --- a/sw/source/uibase/wrtsh/delete.cxx +++ b/sw/source/uibase/wrtsh/delete.cxx @@ -200,7 +200,7 @@ bool SwWrtShell::DelLeft() // #i4032# Don't actually call a 'delete' if we // changed the table cell, compare DelRight(). const SwStartNode * pSNdOld = pWasInTableNd ? - GetSwCursor()->GetNode().FindTableBoxStartNode() : + GetCursor()->GetNode().FindTableBoxStartNode() : nullptr; // If the cursor is at the beginning of a paragraph, try to step @@ -216,7 +216,7 @@ bool SwWrtShell::DelLeft() if (bDoSomething) { const SwStartNode* pSNdNew = pIsInTableNd ? - GetSwCursor()->GetNode().FindTableBoxStartNode() : + GetCursor()->GetNode().FindTableBoxStartNode() : nullptr; // #i4032# Don't actually call a 'delete' if we @@ -345,7 +345,7 @@ bool SwWrtShell::DelRight() const SwTableNode* pWasInTableNd = IsCursorInTable(); // #108049# Save the startnode of the current cell const SwStartNode* pSNdOld = pWasInTableNd ? - GetSwCursor()->GetNode().FindTableBoxStartNode() : nullptr; + GetCursor()->GetNode().FindTableBoxStartNode() : nullptr; bool bCheckDelFull = SelectionType::Text & nSelection && SwCursorShell::IsSttPara(); bool bDelFull = false; bool bDoNothing = false; @@ -366,7 +366,7 @@ bool SwWrtShell::DelRight() // #108049# Save the startnode of the current cell. // May be different to pSNdOld as we have moved. const SwStartNode* pSNdNew = pCurrTableNd ? - GetSwCursor()->GetNode().FindTableBoxStartNode() : nullptr; + GetCursor()->GetNode().FindTableBoxStartNode() : nullptr; // tdf#115132 Only keep cursor position instead of deleting // if we have moved to a different cell |