summaryrefslogtreecommitdiff
path: root/sw/source/core/access/accpara.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/access/accpara.cxx')
-rw-r--r--sw/source/core/access/accpara.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index ced1e6261c7b..9fd8059894f4 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -30,10 +30,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <txtfrm.hxx>
#include <ndtxt.hxx>
#include <pam.hxx>
-#include <unoobj.hxx>
+#include <unotextrange.hxx>
+#include <unocrsrhelper.hxx>
#include <crstate.hxx>
#include <accmap.hxx>
#include "fesh.hxx"
@@ -63,7 +65,6 @@
#include <unotools/charclass.hxx> // for GetWordBoundary
// for get/setCharacterAttribute(...)
#include "unocrsr.hxx"
-#include "unoobj.hxx"
#include "unoport.hxx"
#include "doc.hxx"
#include "crsskip.hxx"
@@ -1532,7 +1533,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
SfxItemSet aCharAttrsAtPaM( pPaM->GetDoc()->GetAttrPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END -1,
0 );
- SwXTextCursor::GetCrsrAttr( *pPaM, aCharAttrsAtPaM, TRUE, TRUE );
+ SwUnoCursorHelper::GetCrsrAttr(*pPaM, aCharAttrsAtPaM, TRUE, TRUE);
aSet.Put( aCharAttrsAtPaM );
}
// <--
@@ -2104,8 +2105,10 @@ sal_Bool SwAccessibleParagraph::replaceText(
aEndPos.nContent = nEnd;
// now create XTextRange as helper and set string
- SwXTextRange::CreateTextRangeFromPosition(
- pNode->GetDoc(), aStartPos, &aEndPos)->setString(sReplacement);
+ const uno::Reference<text::XTextRange> xRange(
+ SwXTextRange::CreateXTextRange(
+ *pNode->GetDoc(), aStartPos, &aEndPos));
+ xRange->setString(sReplacement);
// delete portion data
ClearPortionData();