diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2023-06-16 11:53:37 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2023-06-18 02:02:41 +0200 |
commit | 8a0a4a4e1fa63edaa5ef923e0db56df7d08eb73c (patch) | |
tree | 869322b5df0300280f736f8feac8e05964db67d5 /sc | |
parent | 48af1ee603149f09236f980c7b323997696bd946 (diff) |
sc drawstyles: Restore text selection after applying a style
Change-Id: I0a9bb39d8a7a9e770b3593eaa0a97867cbe86913
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153171
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/tabvwsha.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 231630a4e5d3..c07a070e08ef 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -936,6 +936,8 @@ void ScTabViewShell::ExecStyle( SfxRequest& rReq ) ScMarkData& rMark = GetViewData().GetMarkData(); ScModule* pScMod = SC_MOD(); SdrObject* pEditObject = GetDrawView()->GetTextEditObject(); + OutlinerView* pOLV = GetDrawView()->GetTextEditOutlinerView(); + ESelection aSelection = pOLV ? pOLV->GetSelection() : ESelection(); OUString aRefName; bool bUndo = rDoc.IsUndoEnabled(); @@ -1686,7 +1688,11 @@ void ScTabViewShell::ExecStyle( SfxRequest& rReq ) // reactivate text editing instead: auto pFuText = dynamic_cast<FuText*>(GetDrawFuncPtr()); if (pFuText && pEditObject != GetDrawView()->GetTextEditObject()) + { pFuText->SetInEditMode(pEditObject); + if (GetDrawView()->GetTextEditOutlinerView()) + GetDrawView()->GetTextEditOutlinerView()->SetSelection(aSelection); + } } void ScTabViewShell::GetStyleState( SfxItemSet& rSet ) |