13#include <com/sun/star/drawing/XShape.hpp>
14#include <com/sun/star/drawing/XShapeGroup.hpp>
15#include <com/sun/star/drawing/XShapeGrouper.hpp>
16#include <com/sun/star/drawing/XShapes.hpp>
18#include <com/sun/star/uno/Reference.hxx>
20#include <cppunit/TestAssert.h>
28 uno::Reference<drawing::XShapeGrouper> xSG(
init(), uno::UNO_QUERY_THROW);
30 uno::Reference<drawing::XShapes> xShapes(
m_xDrawPage, uno::UNO_QUERY_THROW);
31 const sal_Int32 nCountBeforeGroup = xShapes->getCount();
33 uno::Reference<drawing::XShape> xShape(xSG->group(xShapes), uno::UNO_QUERY_THROW);
34 const sal_Int32 nCountAfterGroup = xShapes->getCount();
36 CPPUNIT_ASSERT(xShape.is());
37 CPPUNIT_ASSERT(nCountAfterGroup < nCountBeforeGroup);
42 uno::Reference<drawing::XShapeGrouper> xSG(
init(), uno::UNO_QUERY_THROW);
44 uno::Reference<drawing::XShapes> xShapes(
m_xDrawPage, uno::UNO_QUERY_THROW);
45 uno::Reference<drawing::XShape> xShape(xSG->group(xShapes), uno::UNO_QUERY_THROW);
46 uno::Reference<drawing::XShapeGroup> xShapeGroup(xShape, uno::UNO_QUERY_THROW);
48 const sal_Int32 nCountAfterGroup = xShapes->getCount();
50 xSG->ungroup(xShapeGroup);
51 const sal_Int32 nCountAfterUngroup = xShapes->getCount();
53 CPPUNIT_ASSERT(nCountAfterUngroup != nCountAfterGroup);
virtual css::uno::Reference< css::uno::XInterface > init()=0
css::uno::Reference< css::uno::XInterface > m_xDrawPage