[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 10 10:29:50 UTC 2020
sw/source/uibase/utlui/glbltree.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 20dee53e0c2535d1a75e9a32fec49c0fcb79ac54
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Mar 5 14:21:43 2020 +0000
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue Mar 10 11:29:19 2020 +0100
crash after master document navigator update
master document navigator will otherwise crash on using update
selection/all/etc if there is no tooltip requested (which does a "hard" update)
before user uses the up/down buttons to move the areas around
Change-Id: I913df2d0922fbabdf3409a25c30b4cce6113dc8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90028
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 2b056fca6ffe..d2c5357e6f01 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -793,6 +793,8 @@ IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu, bool)
void SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
+ bool bUpdateHard = false;
+
SvTreeListEntry* pEntry = FirstSelected();
SwGlblDocContent* pCont = pEntry ? static_cast<SwGlblDocContent*>(pEntry->GetUserData()) : nullptr;
// If a RequestHelp is called during the dialogue,
@@ -828,12 +830,13 @@ void SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
m_pActiveShell->UpdateTableOf(*pContent->GetTOX());
pSelEntry = NextSelected(pSelEntry);
}
-
+ bUpdateHard = true;
}
break;
case CTX_UPDATE_INDEX:
{
nSlot = FN_UPDATE_TOX;
+ bUpdateHard = true;
}
break;
case CTX_UPDATE_LINK:
@@ -843,6 +846,7 @@ void SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
if(CTX_UPDATE_ALL == nSelectedPopupEntry)
nSlot = FN_UPDATE_TOX;
pCont = nullptr;
+ bUpdateHard = true;
}
break;
case CTX_EDIT:
@@ -1014,7 +1018,7 @@ void SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
GotoContent(pCont);
if(nSlot)
rDispatch.Execute(nSlot);
- if(Update( false ))
+ if (Update(bUpdateHard))
Display();
}
@@ -1098,7 +1102,7 @@ bool SwGlobalTree::Update(bool bHard)
{
SwView* pActView = GetParentWindow()->GetCreateView();
bool bRet = false;
- if(pActView && pActView->GetWrtShellPtr())
+ if (pActView && pActView->GetWrtShellPtr())
{
const SwWrtShell* pOldShell = m_pActiveShell;
m_pActiveShell = pActView->GetWrtShellPtr();
@@ -1153,7 +1157,6 @@ bool SwGlobalTree::Update(bool bHard)
*m_pSwGlblDocContents = std::move( *pTempContents );
}
}
-
}
else
{
More information about the Libreoffice-commits
mailing list