summaryrefslogtreecommitdiff
path: root/starmath/source/document.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-12 09:42:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-13 08:39:15 +0200
commit2d71dd52b6d91660cda6cb8f9457463439f56e20 (patch)
treef894d34e604eee2db24978c85ba67b9da0a4d573 /starmath/source/document.cxx
parentddef60b9c26b1d2990c6c49dbbda73e7831f21fb (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/source/document.cxx')
-rw-r--r--starmath/source/document.cxx30
1 files changed, 15 insertions, 15 deletions
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();