summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2025-01-10 14:14:51 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2025-01-10 16:38:28 +0100
commit77e536c61a20cbf77207dbf599a88bd21e8ecc27 (patch)
tree5d30f554946268a04c923ea472ade368a92983db /sw/inc
parentd925b64ac552348e3862a6b8b61ecd751a8f3a9e (diff)
sw: clean up Start/EndAction in SwViewShell hierarchy
SwViewShell and SwCursorShell both have non-virtual StartAction()/EndAction()? Also, StartAllAction()/EndAllAction() can just be on the base class. Change-Id: Ieaf88bb746b2479f44a635e4fd917fc91efb51a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180072 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/crsrsh.hxx4
-rw-r--r--sw/inc/editsh.hxx4
-rw-r--r--sw/inc/viewsh.hxx21
3 files changed, 8 insertions, 21 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 2fc9598401cc..08aae0878d93 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -367,9 +367,9 @@ public:
inline SwPaM* GetStackCursor() const;
// start parenthesing, hide SV-Cursor and selected areas
- SW_DLLPUBLIC void StartAction();
+ SW_DLLPUBLIC virtual void StartAction() override;
// end parenthesing, show SV-Cursor and selected areas
- SW_DLLPUBLIC void EndAction( const bool bIdleEnd = false );
+ SW_DLLPUBLIC virtual void EndAction(const bool bIdleEnd = false) override;
// basic cursor travelling
tools::Long GetUpDownX() const { return m_nUpDownX; }
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 5a16812e89da..9d3a54c076b9 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -616,10 +616,6 @@ public:
SW_DLLPUBLIC void Redo(sal_uInt16 const nCount = 1);
void Repeat(sal_uInt16 const nCount);
- /// For all views of this document.
- SW_DLLPUBLIC void StartAllAction();
- SW_DLLPUBLIC void EndAllAction();
-
/// To enable set up of StartActions and EndActions.
SW_DLLPUBLIC virtual void CalcLayout() override;
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index e438a891490f..b75ff5009d83 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -219,14 +219,18 @@ public:
void InitPrt( OutputDevice *pOutDev );
// Bracketing of actions belonging together.
- inline void StartAction();
+ virtual void StartAction();
SW_DLLPUBLIC void ImplStartAction();
- inline void EndAction( const bool bIdleEnd = false );
+ virtual void EndAction(const bool bIdleEnd = false);
SW_DLLPUBLIC void ImplEndAction( const bool bIdleEnd );
sal_uInt16 ActionCount() const { return mnStartAction; }
bool ActionPend() const { return mnStartAction != 0; }
bool IsInEndAction() const { return mbInEndAction; }
+ /// For all views of this document.
+ SW_DLLPUBLIC void StartAllAction();
+ SW_DLLPUBLIC void EndAllAction();
+
// The ActionCount for all Shells is temporarily set to zero and then
// restored at the RootFrame via UNO.
void SetRestoreActions(sal_uInt16 nSet);
@@ -638,19 +642,6 @@ inline void SwViewShell::ResetInvalidRect()
maInvalidRect.Clear();
}
-inline void SwViewShell::StartAction()
-{
- if ( !mnStartAction++ )
- ImplStartAction();
-}
-
-inline void SwViewShell::EndAction( const bool bIdleEnd )
-{
- if( 0 == (mnStartAction - 1) )
- ImplEndAction( bIdleEnd );
- --mnStartAction;
-}
-
inline void SwViewShell::LockPaint(LockPaintReason eReason)
{
maLockPaintReasons.push_back(eReason);