summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-03-18 18:24:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-24 06:14:17 +0000
commit7916487cf4d9603cdbe4c7ffbe9bb3f28b51ce4e (patch)
treee3bafe408d8efd97d156521c1ea93d741a5215a8 /sd/qa
parent9ee2d69c610d94280103e089671e9ba78b070e23 (diff)
convert ViewShellId to o3tl::strong_int
Change-Id: I45553d11d56aa8c4432aec126ca51f24bd3ead09 Reviewed-on: https://gerrit.libreoffice.org/35421 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 58e146acdf60..4e99d3498006 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -52,6 +52,11 @@ using namespace css;
static const char* const DATA_DIRECTORY = "/sd/qa/unit/tiledrendering/data/";
+static std::ostream& operator<<(std::ostream& os, ViewShellId id)
+{
+ os << (int)id; return os;
+}
+
class SdTiledRenderingTest : public SdModelTestBase, public XmlTestTools
{
public:
@@ -460,7 +465,7 @@ void SdTiledRenderingTest::testSetGraphicSelection()
CPPUNIT_ASSERT(pListAction);
for (size_t i = 0; i < pListAction->aUndoActions.size(); ++i)
// The second item was -1 here, view shell ID wasn't known.
- CPPUNIT_ASSERT_EQUAL(nView1, pListAction->aUndoActions.GetUndoAction(i)->GetViewShellId());
+ CPPUNIT_ASSERT_EQUAL(ViewShellId(nView1), pListAction->aUndoActions.GetUndoAction(i)->GetViewShellId());
Rectangle aShapeAfter = pObject->GetSnapRect();
// Check that a resize happened, but aspect ratio is not kept.
@@ -486,7 +491,7 @@ void SdTiledRenderingTest::testUndoShells()
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pUndoManager->GetUndoActionCount());
sal_Int32 nView1 = SfxLokHelper::getView();
// This was -1, SdUndoGroup did not track what view shell created it.
- CPPUNIT_ASSERT_EQUAL(nView1, pUndoManager->GetUndoAction()->GetViewShellId());
+ CPPUNIT_ASSERT_EQUAL(ViewShellId(nView1), pUndoManager->GetUndoAction()->GetViewShellId());
}
void SdTiledRenderingTest::testResetSelection()