summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-11-08 18:24:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-11-11 11:03:58 +0100
commit9bba3a604d12566bfb5e8ab8d2788fe8d3690a96 (patch)
tree99575c120c49c4c0541113ce3163dd0ec51064df /editeng
parentf5926c8cfbd5af1fb7214428b4b03453b826f9a5 (diff)
use more concrete type in ImpEditEngine::SetUndoManager
instead of dynamic_cast'ing to the type we want, and __ignoring__ the parameter if it is not, just adjust the type that we want, which luckily everything is already sending Change-Id: If083e11c9818cdcae199afc1261efbdb652e1c76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159295 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editeng.cxx4
-rw-r--r--editeng/source/editeng/impedit.hxx8
-rw-r--r--editeng/source/outliner/outliner.cxx4
3 files changed, 8 insertions, 8 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 728609cd94e2..d27a38665950 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -112,12 +112,12 @@ bool EditEngine::IsInUndo() const
return pImpEditEngine->IsInUndo();
}
-SfxUndoManager& EditEngine::GetUndoManager()
+EditUndoManager& EditEngine::GetUndoManager()
{
return pImpEditEngine->GetUndoManager();
}
-SfxUndoManager* EditEngine::SetUndoManager(SfxUndoManager* pNew)
+EditUndoManager* EditEngine::SetUndoManager(EditUndoManager* pNew)
{
return pImpEditEngine->SetUndoManager(pNew);
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 6fcccccb58dc..d20ed8a1caae 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -838,7 +838,7 @@ public:
ImpEditEngine& operator=(const ImpEditEngine&) = delete;
inline EditUndoManager& GetUndoManager();
- inline SfxUndoManager* SetUndoManager(SfxUndoManager* pNew);
+ inline EditUndoManager* SetUndoManager(EditUndoManager* pNew);
// @return the previous bUpdateLayout state
bool SetUpdateLayout( bool bUpdate, EditView* pCurView = nullptr, bool bForceUpdate = false );
@@ -1295,16 +1295,16 @@ inline EditUndoManager& ImpEditEngine::GetUndoManager()
return *pUndoManager;
}
-inline SfxUndoManager* ImpEditEngine::SetUndoManager(SfxUndoManager* pNew)
+inline EditUndoManager* ImpEditEngine::SetUndoManager(EditUndoManager* pNew)
{
- SfxUndoManager* pRetval = pUndoManager;
+ EditUndoManager* pRetval = pUndoManager;
if(pUndoManager)
{
pUndoManager->SetEditEngine(nullptr);
}
- pUndoManager = dynamic_cast< EditUndoManager* >(pNew);
+ pUndoManager = pNew;
if(pUndoManager)
{
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 1ff61216e0b6..bb8a8ac419ec 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1142,12 +1142,12 @@ void Outliner::ImpFilterIndents( sal_Int32 nFirstPara, sal_Int32 nLastPara )
pEditEngine->SetUpdateLayout( bUpdate );
}
-SfxUndoManager& Outliner::GetUndoManager()
+EditUndoManager& Outliner::GetUndoManager()
{
return pEditEngine->GetUndoManager();
}
-SfxUndoManager* Outliner::SetUndoManager(SfxUndoManager* pNew)
+EditUndoManager* Outliner::SetUndoManager(EditUndoManager* pNew)
{
return pEditEngine->SetUndoManager(pNew);
}