13#include <com/sun/star/sheet/XAreaLink.hpp>
14#include <com/sun/star/table/CellRangeAddress.hpp>
15#include <com/sun/star/uno/Reference.hxx>
17#include <cppunit/TestAssert.h>
26 uno::Reference< sheet::XAreaLink > xAreaLink(
init(), UNO_QUERY_THROW);
28 xAreaLink->setDestArea(table::CellRangeAddress(1,3,4,5,8));
32 table::CellRangeAddress aDestArea = xAreaLink->getDestArea();
33 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Couldn't set new DestArea (Sheet)", sal_Int16(1), aDestArea.Sheet);
34 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Couldn't set new DestArea (StartCol)", sal_Int32(3), aDestArea.StartColumn);
35 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Couldn't set new DestArea (StartRow)", sal_Int32(4), aDestArea.StartRow);
40 uno::Reference< sheet::XAreaLink > xAreaLink(
init(), UNO_QUERY_THROW);
42 xAreaLink->setSourceArea(
"Sheet1.A1:B1");
43 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Couldn't set new source area",
44 OUString(
"Sheet1.A1:B1"), xAreaLink->getSourceArea());
49 uno::Reference< sheet::XAreaLink > xAreaLink(
init(), UNO_QUERY_THROW);
51 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Couldn't get dest area",
52 table::CellRangeAddress(1,2,3,3,6), xAreaLink->getDestArea());
57 uno::Reference< sheet::XAreaLink > xAreaLink(
init(), UNO_QUERY_THROW);
59 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Couldn't get source area",
60 OUString(
"a2:b5"), xAreaLink->getSourceArea());
virtual css::uno::Reference< css::uno::XInterface > init()=0