diff options
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 19 | ||||
-rw-r--r-- | sw/source/uibase/shells/textidx.cxx | 2 |
2 files changed, 20 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 1ceb7d70f827..d7fed1052210 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -3514,6 +3514,25 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } } + // tdf#143158 - handle alphabetical index entries + SwContentAtPos aToxContentAtPos(IsAttrAtPos::ToxMark); + if (rSh.GetContentAtPos(aDocPos, aToxContentAtPos)) + { + const OUString sToxText = aToxContentAtPos.sStr; + if (!sToxText.isEmpty() && aToxContentAtPos.pFndTextAttr) + { + const SwTOXType* pTType + = aToxContentAtPos.pFndTextAttr->GetTOXMark().GetTOXType(); + if (pTType && pTType->GetType() == TOXTypes::TOX_INDEX) + { + RstMBDownFlags(); + GetView().GetViewFrame()->GetBindings().Execute( + FN_EDIT_IDX_ENTRY_DLG); + return; + } + } + } + g_bHoldSelection = true; return; } diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx index 590b9fa82f0b..299de33d1490 100644 --- a/sw/source/uibase/shells/textidx.cxx +++ b/sw/source/uibase/shells/textidx.cxx @@ -196,7 +196,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet) bool bEnableEdit = true; bool bInReadonly = rSh.HasReadonlySel(); - if( rSh.HasSelection() || bInReadonly) + if(bInReadonly) bEnableEdit = false; else { |