diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-11-20 21:32:16 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-11-24 08:12:55 +0100 |
commit | f9cac88fc24539eb5f7fa501b2499ddf5a46d7f2 (patch) | |
tree | 4d592009db20b4f5a31a463739a9dcaa656c42cf /sd/source/ui/annotations | |
parent | 7fce875718687e12df4d7a8b997ca7baea548b91 (diff) |
Let ESelection use EPaM for simplification
And drop EPosition, which duplicates EPaM, except for its default
ctor (used in a single place).
Change-Id: I48bb6dafcba84465d61579df0ec71b815945532a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177075
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sd/source/ui/annotations')
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationwindow.cxx | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index d172d5acd0af..e3743c97ca42 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -610,7 +610,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest const & rReq ) aStr += sQuote + "\"\n"; for( sal_Int32 nIdx = 0; nIdx >= 0; ) - aOutliner.Insert( aStr.getToken( 0, '\n', nIdx ), EE_PARA_APPEND, -1 ); + aOutliner.Insert(aStr.getToken(0, '\n', nIdx), EE_PARA_MAX, -1); if( aOutliner.GetParagraphCount() > 1 ) { @@ -618,8 +618,8 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest const & rReq ) aAnswerSet.Put(SvxPostureItem(ITALIC_NORMAL,EE_CHAR_ITALIC)); ESelection aSel; - aSel.nEndPara = aOutliner.GetParagraphCount()-2; - aSel.nEndPos = aOutliner.GetText( aOutliner.GetParagraph( aSel.nEndPara ) ).getLength(); + aSel.end.nPara = aOutliner.GetParagraphCount() - 2; + aSel.end.nIndex = aOutliner.GetText( aOutliner.GetParagraph( aSel.end.nPara ) ).getLength(); aOutliner.QuickSetAttribs( aAnswerSet, aSel ); } diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 1de79f30cb2c..01b9181f020c 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -354,7 +354,7 @@ void AnnotationWindow::FillMenuButton() void AnnotationWindow::StartEdit() { - GetOutlinerView()->SetSelection(ESelection::NoSelection()); + GetOutlinerView()->SetSelection(ESelection::AtEnd()); GetOutlinerView()->ShowCursor(); } @@ -455,8 +455,7 @@ void AnnotationWindow::SetLanguage(const SvxLanguageItem &aNewItem) mpOutliner->SetModifyHdl( Link<LinkParamNone*,void>() ); ESelection aOld = GetOutlinerView()->GetSelection(); - ESelection aNewSelection( 0, 0, mpOutliner->GetParagraphCount()-1, EE_TEXTPOS_ALL ); - GetOutlinerView()->SetSelection( aNewSelection ); + GetOutlinerView()->SetSelection(ESelection::All()); SfxItemSet aEditAttr(GetOutlinerView()->GetAttribs()); aEditAttr.Put(aNewItem); GetOutlinerView()->SetAttribs( aEditAttr ); |