13#include <com/sun/star/awt/Point.hpp>
14#include <com/sun/star/awt/Size.hpp>
15#include <com/sun/star/drawing/XShape.hpp>
17#include <com/sun/star/uno/Reference.hxx>
19#include <cppunit/TestAssert.h>
27 uno::Reference<drawing::XShape> xShape(
init(), uno::UNO_QUERY_THROW);
30 awt::Point aOldPoint = xShape->getPosition();
31 CPPUNIT_ASSERT_NO_THROW(
32 xShape->setPosition(awt::Point(aOldPoint.X + 100, aOldPoint.Y + 100)));
34 awt::Point aNewPoint = xShape->getPosition();
35 CPPUNIT_ASSERT_EQUAL(awt::Point(aOldPoint.X + 100, aOldPoint.Y + 100), aNewPoint);
42 uno::Reference<drawing::XShape> xShape(
init(), uno::UNO_QUERY_THROW);
44 awt::Size aOldSize = xShape->getSize();
46 CPPUNIT_ASSERT_NO_THROW(xShape->setSize(awt::Size(aOldSize.Width + 10, aOldSize.Height + 10)));
48 awt::Size aNewSize = xShape->getSize();
49 const sal_Int16 aAcceptableLimit = 2;
50 CPPUNIT_ASSERT(aOldSize.Height - aNewSize.Height <= aAcceptableLimit);
51 CPPUNIT_ASSERT(aOldSize.Height - aNewSize.Height <= aAcceptableLimit);
bool const m_bObjSupportsPosition
void testGetSetPosition()
virtual css::uno::Reference< css::uno::XInterface > init()=0