diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-12 09:42:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-13 08:39:15 +0200 |
commit | 2d71dd52b6d91660cda6cb8f9457463439f56e20 (patch) | |
tree | f894d34e604eee2db24978c85ba67b9da0a4d573 /starmath | |
parent | ddef60b9c26b1d2990c6c49dbbda73e7831f21fb (diff) |
merge IUndoManager into SfxUndoManager
SfxUndoManager is the only implementation of the IUnderManager
"interface", and it lives in the same header.
Plus this way we can get rid of some covariant parameters,
which will make using std::unique_ptr easier.
Change-Id: I6661b9876b18da830bead78794d237886cd3c5c9
Reviewed-on: https://gerrit.libreoffice.org/57317
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/document.hxx | 2 | ||||
-rw-r--r-- | starmath/source/document.cxx | 30 |
2 files changed, 16 insertions, 16 deletions
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index 95d6af49b1e7..5f7e91ff83c1 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -193,7 +193,7 @@ public: void Repaint(); - virtual ::svl::IUndoManager *GetUndoManager () override; + virtual SfxUndoManager *GetUndoManager () override; static SfxItemPool& GetPool(); diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 8668fa061e2f..5e8504a52db6 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -898,7 +898,7 @@ void SmDocShell::Execute(SfxRequest& rReq) SmFormat aNewFormat( aOldFormat ); aNewFormat.SetTextmode(!aOldFormat.IsTextmode()); - ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager(); + SfxUndoManager *pTmpUndoMgr = GetUndoManager(); if (pTmpUndoMgr) pTmpUndoMgr->AddUndoAction( new SmFormatAction(this, aOldFormat, aNewFormat)); @@ -941,7 +941,7 @@ void SmDocShell::Execute(SfxRequest& rReq) SmFormat aNewFormat( aOldFormat ); aFontTypeDialog.WriteTo(aNewFormat); - ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager(); + SfxUndoManager *pTmpUndoMgr = GetUndoManager(); if (pTmpUndoMgr) pTmpUndoMgr->AddUndoAction( new SmFormatAction(this, aOldFormat, aNewFormat)); @@ -964,7 +964,7 @@ void SmDocShell::Execute(SfxRequest& rReq) aFontSizeDialog.WriteTo(aNewFormat); - ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager(); + SfxUndoManager *pTmpUndoMgr = GetUndoManager(); if (pTmpUndoMgr) pTmpUndoMgr->AddUndoAction( new SmFormatAction(this, aOldFormat, aNewFormat)); @@ -987,7 +987,7 @@ void SmDocShell::Execute(SfxRequest& rReq) aDistanceDialog.WriteTo(aNewFormat); - ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager(); + SfxUndoManager *pTmpUndoMgr = GetUndoManager(); if (pTmpUndoMgr) pTmpUndoMgr->AddUndoAction( new SmFormatAction(this, aOldFormat, aNewFormat)); @@ -1015,7 +1015,7 @@ void SmDocShell::Execute(SfxRequest& rReq) aAlignDialog.WriteTo( aFmt ); pp->GetConfig()->SetStandardFormat( aFmt ); - ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager(); + SfxUndoManager *pTmpUndoMgr = GetUndoManager(); if (pTmpUndoMgr) pTmpUndoMgr->AddUndoAction( new SmFormatAction(this, aOldFormat, aNewFormat)); @@ -1037,7 +1037,7 @@ void SmDocShell::Execute(SfxRequest& rReq) case SID_UNDO: case SID_REDO: { - ::svl::IUndoManager* pTmpUndoMgr = GetUndoManager(); + SfxUndoManager* pTmpUndoMgr = GetUndoManager(); if( pTmpUndoMgr ) { sal_uInt16 nId = rReq.GetSlot(), nCnt = 1; @@ -1046,18 +1046,18 @@ void SmDocShell::Execute(SfxRequest& rReq) if( pArgs && SfxItemState::SET == pArgs->GetItemState( nId, false, &pItem )) nCnt = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); - bool (::svl::IUndoManager:: *fnDo)(); + bool (SfxUndoManager:: *fnDo)(); size_t nCount; if( SID_UNDO == rReq.GetSlot() ) { nCount = pTmpUndoMgr->GetUndoActionCount(); - fnDo = &::svl::IUndoManager::Undo; + fnDo = &SfxUndoManager::Undo; } else { nCount = pTmpUndoMgr->GetRedoActionCount(); - fnDo = &::svl::IUndoManager::Redo; + fnDo = &SfxUndoManager::Redo; } try @@ -1150,28 +1150,28 @@ void SmDocShell::GetState(SfxItemSet &rSet) case SID_GETUNDOSTRINGS: case SID_GETREDOSTRINGS: { - ::svl::IUndoManager* pTmpUndoMgr = GetUndoManager(); + SfxUndoManager* pTmpUndoMgr = GetUndoManager(); if( pTmpUndoMgr ) { - OUString(::svl::IUndoManager:: *fnGetComment)( size_t, bool const ) const; + OUString(SfxUndoManager:: *fnGetComment)( size_t, bool const ) const; size_t nCount; if( SID_GETUNDOSTRINGS == nWh ) { nCount = pTmpUndoMgr->GetUndoActionCount(); - fnGetComment = &::svl::IUndoManager::GetUndoActionComment; + fnGetComment = &SfxUndoManager::GetUndoActionComment; } else { nCount = pTmpUndoMgr->GetRedoActionCount(); - fnGetComment = &::svl::IUndoManager::GetRedoActionComment; + fnGetComment = &SfxUndoManager::GetRedoActionComment; } if (nCount) { OUStringBuffer aBuf; for (size_t n = 0; n < nCount; ++n) { - aBuf.append((pTmpUndoMgr->*fnGetComment)( n, ::svl::IUndoManager::TopLevel )); + aBuf.append((pTmpUndoMgr->*fnGetComment)( n, SfxUndoManager::TopLevel )); aBuf.append('\n'); } @@ -1189,7 +1189,7 @@ void SmDocShell::GetState(SfxItemSet &rSet) } -::svl::IUndoManager *SmDocShell::GetUndoManager() +SfxUndoManager *SmDocShell::GetUndoManager() { if (!mpEditEngine) GetEditEngine(); |