summaryrefslogtreecommitdiff
path: root/sw/qa/extras/tiledrendering/tiledrendering.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2019-01-25 14:40:40 +0100
committerJan Holesovsky <kendy@collabora.com>2019-01-30 07:29:52 +0100
commitb6b28931435e44aca92b8c0e1659f701e3ed1a87 (patch)
tree722eaccb5cbb0e596f9d75bd6176d47708f61a7f /sw/qa/extras/tiledrendering/tiledrendering.cxx
parentc2c60eb9969716ef91a83952203948b5e334ec85 (diff)
sw: Ctrl + shape insertion was not setting up the layer.
The consequence was that the shapes were inserted into the background layer. The problem was particularly visible with the LOK, but reproducible on the desktop too. Includes unit test. Change-Id: I16137331f944101e25679ec8c4a034bea658bc57 Reviewed-on: https://gerrit.libreoffice.org/66917 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sw/qa/extras/tiledrendering/tiledrendering.cxx')
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 6bd016702026..be14c00a8ba6 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -470,10 +470,14 @@ void SwTiledRenderingTest::testInsertShape()
comphelper::dispatchCommand(".uno:BasicShapes.circle", uno::Sequence<beans::PropertyValue>());
// check that the shape was inserted in the visible area, not outside
- SdrPage* pPage = pWrtShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
+ IDocumentDrawModelAccess &rDrawModelAccess = pWrtShell->GetDoc()->getIDocumentDrawModelAccess();
+ SdrPage* pPage = rDrawModelAccess.GetDrawModel()->GetPage(0);
SdrObject* pObject = pPage->GetObj(0);
CPPUNIT_ASSERT_EQUAL(tools::Rectangle(2736, 868, 7264, 3132), pObject->GetSnapRect());
+ // check that it is in the foreground layer
+ CPPUNIT_ASSERT_EQUAL(rDrawModelAccess.GetHeavenId().get(), pObject->GetLayer().get());
+
comphelper::LibreOfficeKit::setActive(false);
}