[Libreoffice-commits] core.git: sw/source
Jim Raykowski (via logerrit)
logerrit at kemper.freedesktop.org
Sat Sep 5 05:39:52 UTC 2020
sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx | 4 +++-
sw/source/uibase/wrtsh/wrtsh1.cxx | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 6935dcd80f1677a293a412da3d94afd1217c0bd1
Author: Jim Raykowski <raykowj at gmail.com>
AuthorDate: Mon Aug 31 13:08:06 2020 -0800
Commit: Jim Raykowski <raykowj at gmail.com>
CommitDate: Sat Sep 5 07:39:17 2020 +0200
Improve outline position tracking and content visibility
state update in Writer Navigator when outline content visibility is
toggled.
Change-Id: I28ff127bc2f7776b72a2dc32ae2f6147169c8bac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101771
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj at gmail.com>
diff --git a/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx b/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx
index 7ab66b9c3291..e554534a34bc 100644
--- a/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx
+++ b/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx
@@ -158,6 +158,9 @@ void SwOutlineContentVisibilityWin::ToggleOutlineContentVisibility(const bool bS
if (GetEditWin()->GetView().IsDrawMode())
GetEditWin()->GetView().LeaveDrawCreate();
rSh.EnterStdMode();
+ // set cursor position here so Navigator tracks outline
+ // when doc changed broadcast message is sent in toggle function
+ rSh.GotoOutline(m_nOutlinePos);
if (bSubs)
{
// toggle including sub levels
@@ -177,7 +180,6 @@ void SwOutlineContentVisibilityWin::ToggleOutlineContentVisibility(const bool bS
rSh.ToggleOutlineContentVisibility(m_nOutlinePos);
SetSymbol(rSh.IsOutlineContentFolded(m_nOutlinePos) ? SymbolType::ARROW_RIGHT
: SymbolType::ARROW_DOWN);
- rSh.GotoOutline(m_nOutlinePos); // sets cursor position
rSh.LockView(false);
}
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 96cc83e62167..60ac6cca4cc6 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -2107,7 +2107,8 @@ void SwWrtShell::ToggleOutlineContentVisibility(size_t nPos, bool bForceFold)
}
pSttNd->GetTextNode()->SetAttrOutlineContentVisible(false);
}
- GetView().GetEditWin().Invalidate();
+ GetView().GetEditWin().Invalidate(InvalidateFlags::Update);
+ GetDoc()->GetDocShell()->Broadcast(SfxHint(SfxHintId::DocChanged));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list