summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-01-12 16:02:34 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-01-18 03:54:19 +0100
commitb5dff6131058d3e98307c24bb5796d7dd2b589f8 (patch)
tree9f0bdb644abebca24ae045dfc74cac887944d531 /sw
parent0fa9ca39a75daa3db73fa37d583d6f483ca4f444 (diff)
Make uno:RefreshView redo the whole document layout
This is useful when encountering layout problems, to refresh the doc layout from an extension. Change-Id: Ie2472f061ebea203a9d876782b3bb953477de7c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109218 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/viewsh.hxx4
-rw-r--r--sw/source/uibase/uiview/view2.cxx1
2 files changed, 3 insertions, 2 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 0bc777f2dce8..06d45add7cbb 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -152,8 +152,6 @@ class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell>
inline void ResetInvalidRect();
- void Reformat(); // Invalidates complete Layout (ApplyViewOption).
-
SAL_DLLPRIVATE void PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect&); // Collect values for painting of desktop
// and calling.
// PaintDesktop split. This pars is also used by PreviewPage.
@@ -216,6 +214,8 @@ public:
void InvalidateWindows( const SwRect &rRect );
+ void Reformat(); // Invalidates complete Layout (ApplyViewOption).
+
// #i72754# set of Pre/PostPaints with lock counter and initial target OutDev
protected:
std::stack<vcl::Region> mPrePostPaintRegions; // acts also as a lock counter (empty == not locked)
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 4a76ca612eef..8ab119113225 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -532,6 +532,7 @@ void SwView::Execute(SfxRequest &rReq)
break;
case FN_REFRESH_VIEW:
GetEditWin().Invalidate();
+ m_pWrtShell->Reformat();
break;
case FN_PAGEUP:
case FN_PAGEUP_SEL: