diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2021-01-13 13:50:39 +0100 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-01-18 03:53:50 +0100 |
commit | 0da5e6f38aedb1fb873d1a90c506f6ab03ab1656 (patch) | |
tree | 7e217c423e6f60beafe822a9dc0bbe82f793e620 | |
parent | 6c76f1a90f926bf056d41e60a3375611baf72e2a (diff) |
Bring uno:RefreshView to Calc
Allow refreshing the document layout via UNO slot
Change-Id: I956bb884b1fb4231b1f617c4aa5a80ff9a45ec92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109230
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-rw-r--r-- | include/svx/svxids.hrc | 1 | ||||
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 5 | ||||
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu | 5 | ||||
-rw-r--r-- | sc/sdi/docsh.sdi | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh3.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/inc/docsh.hxx | 1 | ||||
-rw-r--r-- | svx/sdi/svx.sdi | 16 | ||||
-rw-r--r-- | sw/inc/cmdid.h | 4 | ||||
-rw-r--r-- | sw/sdi/_viewsh.sdi | 2 | ||||
-rw-r--r-- | sw/sdi/swriter.sdi | 17 | ||||
-rw-r--r-- | sw/sdi/viewsh.sdi | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 2 |
14 files changed, 40 insertions, 29 deletions
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 82c6364d9a7e..844b23db5cf3 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -688,6 +688,7 @@ class SdrAngleItem; #define SID_FM_SHOW_DATANAVIGATOR ( SID_SVX_START + 773 ) #define SID_FM_DATANAVIGATOR_CONTROL ( SID_SVX_START + 774 ) #define SID_FM_REFRESH_FORM_CONTROL ( SID_SVX_START + 775 ) +#define SID_REFRESH_VIEW ( SID_SVX_START + 776 ) // CAUTION! Range <855 .. 855> used by EditEngine (!) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index fadfcb966638..1db21b1af629 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -5963,6 +5963,11 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8 <value>1</value> </prop> </node> + <node oor:name=".uno:RefreshView" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Refresh document layout</value> + </prop> + </node> <node oor:name=".uno:RecSearch" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Find Record...</value> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index 76f453d7d816..31286da7a6fb 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -2595,11 +2595,6 @@ <value>1</value> </prop> </node> - <node oor:name=".uno:RefreshView" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Refresh document layout</value> - </prop> - </node> <node oor:name=".uno:JumpToEndOfDoc" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Directly to Document End</value> diff --git a/sc/sdi/docsh.sdi b/sc/sdi/docsh.sdi index 99019d55ff6f..e1dd9a1aee0a 100644 --- a/sc/sdi/docsh.sdi +++ b/sc/sdi/docsh.sdi @@ -77,6 +77,8 @@ interface TableDocument SID_LANGUAGE_STATUS [ ExecMethod = Execute; StateMethod = GetState; ] SID_SPELLCHECK_IGNORE_ALL [ ExecMethod = Execute; StateMethod = GetState; ] SID_SPELLCHECK_APPLY_SUGGESTION [ ExecMethod = Execute; StateMethod = GetState; ] + + SID_REFRESH_VIEW [ ExecMethod = Execute; StateMethod = GetState; ] } diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index a31d73e5802c..9891d7ecf242 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -177,6 +177,11 @@ void ScDocShell::PostPaint( const ScRangeList& rRanges, PaintPartFlags nPart, sa } } +void ScDocShell::PostPaintAll() +{ + PostPaint(0, 0, 0, m_aDocument.MaxCol(), m_aDocument.MaxRow(), MAXTAB, PaintPartFlags::All); +} + void ScDocShell::PostPaintGridAll() { PostPaint( 0,0,0, m_aDocument.MaxCol(),m_aDocument.MaxRow(),MAXTAB, PaintPartFlags::Grid ); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 055db3ac7a11..19ba7680a1fe 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1329,6 +1329,11 @@ void ScDocShell::Execute( SfxRequest& rReq ) } } break; + case SID_REFRESH_VIEW: + { + PostPaintGridAll(); + } + break; default: { // small (?) hack -> forwarding of the slots to TabViewShell diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 6682979adc7d..529117f4e048 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -316,6 +316,7 @@ public: void PostPaintCell( SCCOL nCol, SCROW nRow, SCTAB nTab ); void PostPaintCell( const ScAddress& rPos ); + void PostPaintAll(); void PostPaintGridAll(); void PostPaintExtras(); diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index dcf2a2c89126..f66c0a193c13 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -7163,6 +7163,22 @@ SfxVoidItem RefreshFormControl SID_FM_REFRESH_FORM_CONTROL GroupId = SfxGroupId::Table; ] +SfxVoidItem RefreshView SID_REFRESH_VIEW +() +[ + AutoUpdate = FALSE, + FastCall = TRUE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::View; +] SfxVoidItem RemoveFilterSort SID_FM_REMOVE_FILTER_SORT () diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 49d6e607f943..56407a1adb50 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -145,9 +145,7 @@ #define FN_REDLINE_ACCEPT_TONEXT (FN_EDIT2 + 45) /* Redlining Accept and jump to next*/ #define FN_REDLINE_REJECT_TONEXT (FN_EDIT2 + 46) /* Redlining Reject and jump to next*/ -// Region: Edit -#define FN_REFRESH_VIEW (FN_VIEW + 1) /* Refresh/Redraw */ - +// Region: View #define FN_DRAW_WRAP_DLG (FN_VIEW + 3) /* Draw wrapping dlg */ #define FN_RULER (FN_VIEW + 11) /* Horizontal ruler */ diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi index 06a5a5f6893c..7b11d4064d1f 100644 --- a/sw/sdi/_viewsh.sdi +++ b/sw/sdi/_viewsh.sdi @@ -33,7 +33,7 @@ interface BaseTextEditView ExecMethod = Execute ; StateMethod = GetState ; ] - FN_REFRESH_VIEW // status(final|play) + SID_REFRESH_VIEW // status(final|play) [ ExecMethod = Execute ; ] diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 7d24e76b9ed2..9a12496e45ad 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -4885,23 +4885,6 @@ SfxBoolItem ProtectTraceChangeMode FN_REDLINE_PROTECT GroupId = SfxGroupId::Edit; ] -SfxVoidItem RefreshView FN_REFRESH_VIEW -() -[ - AutoUpdate = FALSE, - FastCall = TRUE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - - AccelConfig = TRUE, - MenuConfig = TRUE, - ToolBoxConfig = TRUE, - GroupId = SfxGroupId::View; -] - SfxVoidItem RemoveBullets FN_NUM_BULLET_OFF () [ diff --git a/sw/sdi/viewsh.sdi b/sw/sdi/viewsh.sdi index 549648eee7fd..cb02b883ba65 100644 --- a/sw/sdi/viewsh.sdi +++ b/sw/sdi/viewsh.sdi @@ -305,7 +305,7 @@ interface TextPrintPreview ExecMethod = Execute; StateMethod = GetState; ] - FN_REFRESH_VIEW // status(final|play) + SID_REFRESH_VIEW // status(final|play) [ StateMethod = GetState ; ] diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 52c8cca1050a..0f5318a84e8d 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -659,7 +659,7 @@ void SwPagePreview::Execute( SfxRequest &rReq ) switch(rReq.GetSlot()) { - case FN_REFRESH_VIEW: + case SID_REFRESH_VIEW: case FN_STAT_PAGE: case FN_STAT_ZOOM: break; diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 248a75a3416b..e388a08b8517 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -561,7 +561,7 @@ void SwView::Execute(SfxRequest &rReq) case FN_EDIT_LINK_DLG: EditLinkDlg(); break; - case FN_REFRESH_VIEW: + case SID_REFRESH_VIEW: GetEditWin().Invalidate(); m_pWrtShell->Reformat(); break; |