diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-11 19:19:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-12 15:33:25 +0200 |
commit | fdcce774409e47b452910d44fcb8a00b1131985c (patch) | |
tree | dd7a74be13468a551d05e3da473b1f626d46fb98 /sw/source/core/unocore/unoredline.cxx | |
parent | 8be73da2284ffe963a464b4c65db4f2ff5d7f09f (diff) |
use more concrete UNO types in sw/
as preparation for getting rid of some dynamic_casts
Change-Id: I78728325b916af3ec6303f7c8eaf3b8b94cfd74c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151691
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/unocore/unoredline.cxx')
-rw-r--r-- | sw/source/core/unocore/unoredline.cxx | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index c32180a9bf71..3fdf15a0c9a0 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -90,12 +90,7 @@ uno::Sequence<sal_Int8> SwXRedlineText::getImplementationId() return css::uno::Sequence<sal_Int8>(); } -uno::Reference<text::XTextCursor> SwXRedlineText::CreateCursor() -{ - return createTextCursor(); -} - -uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor() +rtl::Reference< SwXTextCursor > SwXRedlineText::createXTextCursor() { SolarMutexGuard aGuard; @@ -131,13 +126,13 @@ uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursor() throw aExcept; } - return static_cast<text::XWordCursor*>(pXCursor.get()); + return pXCursor; } -uno::Reference<text::XTextCursor> SwXRedlineText::createTextCursorByRange( +rtl::Reference< SwXTextCursor > SwXRedlineText::createXTextCursorByRange( const uno::Reference<text::XTextRange> & aTextRange) { - uno::Reference<text::XTextCursor> xCursor = createTextCursor(); + rtl::Reference< SwXTextCursor > xCursor = createXTextCursor(); xCursor->gotoRange(aTextRange->getStart(), false); xCursor->gotoRange(aTextRange->getEnd(), true); return xCursor; @@ -525,9 +520,8 @@ sal_Bool SwXRedline::hasElements( ) return nullptr != m_pRedline->GetContentIdx(); } -uno::Reference< text::XTextCursor > SwXRedline::createTextCursor() +rtl::Reference< SwXTextCursor > SwXRedline::createXTextCursor() { - SolarMutexGuard aGuard; if(!m_pDoc) throw uno::RuntimeException(); @@ -552,10 +546,10 @@ uno::Reference< text::XTextCursor > SwXRedline::createTextCursor() pTableNode = pCont->FindTableNode(); } - return static_cast<text::XWordCursor*>(pXCursor.get()); + return pXCursor; } -uno::Reference< text::XTextCursor > SwXRedline::createTextCursorByRange( +rtl::Reference< SwXTextCursor > SwXRedline::createXTextCursorByRange( const uno::Reference< text::XTextRange > & /*aTextPosition*/) { throw uno::RuntimeException(); |