sw/inc/viewsh.hxx                 |    4 ++--
 sw/source/uibase/uiview/view2.cxx |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b5dff6131058d3e98307c24bb5796d7dd2b589f8
Author:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
AuthorDate: Tue Jan 12 16:02:34 2021 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Mon Jan 18 03:54:19 2021 +0100

    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.behr...@allotropia.de>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

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:
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to