diff options
author | Jim Raykowski <raykowj@gmail.com> | 2020-12-01 00:25:52 -0900 |
---|---|---|
committer | Jim Raykowski <raykowj@gmail.com> | 2020-12-03 21:38:48 +0100 |
commit | f0878173e1963cf8db5f60ced6d19da24e18bc41 (patch) | |
tree | 192ebdbc2789de49ca860a72676f0dc70a575890 /sd | |
parent | cbc43bef143f3109bdf3bf981317ae74b73cde5a (diff) |
tdf#34828 sd navigator: make unnamed shape select select shape object
Change-Id: I4685d7db802767553018d08d23d8b33bca7efff2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106958
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/sdtreelb.cxx | 15 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsd.cxx | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index bd9215fcb5b1..12ba6be2cf45 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -701,7 +701,20 @@ void SdPageObjsTLV::Select() m_aChangeHdl.Call(*m_xTreeView); if (m_bSelectionHandlerNavigates) - m_aRowActivatedHdl.Call(*m_xTreeView); + { + SdrObject* pObject = reinterpret_cast<SdrObject*>(m_xTreeView->get_selected_id().toInt64()); + if (pObject && pObject->GetName().isEmpty()) + { + const bool bUndo = pObject->getSdrModelFromSdrObject().IsUndoEnabled(); + pObject->getSdrModelFromSdrObject().EnableUndo(false); + pObject->SetName(m_xTreeView->get_selected_text(), false); + m_aRowActivatedHdl.Call(*m_xTreeView); + pObject->SetName(OUString(), false); + pObject->getSdrModelFromSdrObject().EnableUndo(bUndo); + } + else + m_aRowActivatedHdl.Call(*m_xTreeView); + } if (!m_xNavigator) { diff --git a/sd/source/ui/view/drviewsd.cxx b/sd/source/ui/view/drviewsd.cxx index 8f6e627029d4..6dc4448d32f1 100644 --- a/sd/source/ui/view/drviewsd.cxx +++ b/sd/source/ui/view/drviewsd.cxx @@ -137,7 +137,7 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq ) SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame); SfxBoolItem aBrowseItem(SID_BROWSE, true); pFrame->GetDispatcher()-> - ExecuteList(SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, + ExecuteList(SID_OPENDOC, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, { &aStrItem, &aFrameItem, &aBrowseItem, &aReferer }); } |