[Libreoffice-commits] core.git: sw/qa sw/source
Henry Castro
hcastro at collabora.com
Wed Jun 28 17:20:25 UTC 2017
sw/qa/extras/tiledrendering/tiledrendering.cxx | 14 ++++++--------
sw/source/uibase/shells/annotsh.cxx | 8 ++++----
sw/source/uibase/shells/basesh.cxx | 6 +++---
3 files changed, 13 insertions(+), 15 deletions(-)
New commits:
commit 6c6c3e9ea7255d411fbf950d6c5712b094f69436
Author: Henry Castro <hcastro at collabora.com>
Date: Wed Jun 28 11:40:06 2017 -0400
sw lok: rename return values UNDO_CONFLICT to SID_REPAIRPACKAGE
To be consistent with sc, sd and sw
Change-Id: I273101de6e59be08eb61b1a77647bc1dd26ff387
Reviewed-on: https://gerrit.libreoffice.org/39369
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index e719a368558e..8bf0f359c288 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -1684,7 +1684,7 @@ void SwTiledRenderingTest::testUndoRepairResult()
SfxLokHelper::setView(nView2);
comphelper::dispatchCommand(".uno:Undo", {}, xListener);
Scheduler::ProcessEventsToIdle();
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SwUndoId::CONFLICT), pResult2->m_nDocRepair);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SID_REPAIRPACKAGE), pResult2->m_nDocRepair);
mxComponent->dispose();
mxComponent.clear();
@@ -1719,7 +1719,7 @@ void SwTiledRenderingTest::testRedoRepairResult()
SfxLokHelper::setView(nView2);
comphelper::dispatchCommand(".uno:Redo", {}, xListener);
Scheduler::ProcessEventsToIdle();
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SwUndoId::CONFLICT), pResult2->m_nDocRepair);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SID_REPAIRPACKAGE), pResult2->m_nDocRepair);
mxComponent->dispose();
mxComponent.clear();
@@ -1740,9 +1740,8 @@ void checkUndoRepairStates(SwXTextDocument* pXTextDocument, SwView* pView1, SwVi
// second view, undo conflict
pView2->GetState(aItemSet2);
CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, aItemSet2.GetItemState(SID_UNDO));
- const SfxUInt32Item *pSetItem = dynamic_cast<const SfxUInt32Item*>(aItemSet2.GetItem(SID_UNDO));
- CPPUNIT_ASSERT(pSetItem);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SwUndoId::CONFLICT), pSetItem->GetValue());
+ CPPUNIT_ASSERT(dynamic_cast< const SfxUInt32Item * >(aItemSet2.GetItem(SID_UNDO)));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SID_REPAIRPACKAGE), dynamic_cast< const SfxUInt32Item * >(aItemSet2.GetItem(SID_UNDO))->GetValue());
};
}
@@ -1795,9 +1794,8 @@ void SwTiledRenderingTest::testDisableUndoRepair()
// first view, undo conflict
pView1->GetState(aItemSet1);
CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, aItemSet1.GetItemState(SID_UNDO));
- const SfxUInt32Item *pSetItem = dynamic_cast<const SfxUInt32Item*>(aItemSet1.GetItem(SID_UNDO));
- CPPUNIT_ASSERT(pSetItem);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SwUndoId::CONFLICT), pSetItem->GetValue());
+ CPPUNIT_ASSERT(dynamic_cast< const SfxUInt32Item * >(aItemSet1.GetItem(SID_UNDO)));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SID_REPAIRPACKAGE), dynamic_cast< const SfxUInt32Item * >(aItemSet1.GetItem(SID_UNDO))->GetValue());
}
// Insert a character in the first view.
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 99d421fe64fd..2b432510ae08 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -1512,7 +1512,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
rSh.GetLastUndoInfo(nullptr, &nUndoId);
if (nUndoId == SwUndoId::CONFLICT)
{
- rReq.SetReturnValue( SfxUInt32Item(nId, static_cast<sal_uInt32>(nUndoId)) );
+ rReq.SetReturnValue( SfxUInt32Item(nId, static_cast<sal_uInt32>(SID_REPAIRPACKAGE)) );
break;
}
@@ -1543,7 +1543,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
(void)rSh.GetFirstRedoInfo(nullptr, &nUndoId);
if (nUndoId == SwUndoId::CONFLICT)
{
- rReq.SetReturnValue( SfxUInt32Item(nId, static_cast<sal_uInt32>(nUndoId)) );
+ rReq.SetReturnValue( SfxUInt32Item(nId, static_cast<sal_uInt32>(SID_REPAIRPACKAGE)) );
break;
}
@@ -1604,7 +1604,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
}
else if (nUndoId == SwUndoId::CONFLICT)
{
- rSet.Put( SfxUInt32Item(nWhich, static_cast<sal_uInt32>(nUndoId)) );
+ rSet.Put( SfxUInt32Item(nWhich, static_cast<sal_uInt32>(SID_REPAIRPACKAGE)) );
}
else
rSet.DisableItem(nWhich);
@@ -1621,7 +1621,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
}
else if (nUndoId == SwUndoId::CONFLICT)
{
- rSet.Put( SfxUInt32Item(nWhich, static_cast<sal_uInt32>(nUndoId)) );
+ rSet.Put( SfxUInt32Item(nWhich, static_cast<sal_uInt32>(SID_REPAIRPACKAGE)) );
}
else
rSet.DisableItem(nWhich);
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 9c43baea5d24..ba6113e5f8d2 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -534,7 +534,7 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
if (nUndoId == SwUndoId::CONFLICT)
{
- rReq.SetReturnValue( SfxUInt32Item(nId, static_cast<sal_uInt32>(nUndoId)) );
+ rReq.SetReturnValue( SfxUInt32Item(nId, static_cast<sal_uInt32>(SID_REPAIRPACKAGE)) );
}
if (pViewFrame) { pViewFrame->GetBindings().InvalidateAll(false); }
@@ -561,7 +561,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
}
else if (nUndoId == SwUndoId::CONFLICT)
{
- rSet.Put( SfxUInt32Item(nWhich, static_cast<sal_uInt32>(nUndoId)) );
+ rSet.Put( SfxUInt32Item(nWhich, static_cast<sal_uInt32>(SID_REPAIRPACKAGE)) );
}
else
rSet.DisableItem(nWhich);
@@ -577,7 +577,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
}
else if (nUndoId == SwUndoId::CONFLICT)
{
- rSet.Put( SfxInt32Item(nWhich, static_cast<sal_uInt32>(nUndoId)) );
+ rSet.Put( SfxInt32Item(nWhich, static_cast<sal_uInt32>(SID_REPAIRPACKAGE)) );
}
else
rSet.DisableItem(nWhich);
More information about the Libreoffice-commits
mailing list