12#include <com/sun/star/sheet/XLabelRanges.hpp>
13#include <com/sun/star/table/CellRangeAddress.hpp>
14#include <com/sun/star/uno/Reference.hxx>
16#include <cppunit/TestAssert.h>
19using namespace css::uno;
25 uno::Reference<sheet::XLabelRanges> xLabelRanges(
init(), UNO_QUERY_THROW);
27 const sal_Int32
nCount = xLabelRanges->getCount();
28 xLabelRanges->addNew(table::CellRangeAddress(0, 1, 0, 1, 0),
29 table::CellRangeAddress(0, 1, 1, 1, 6));
31 CPPUNIT_ASSERT_MESSAGE(
"Unable to add new range", nCount < xLabelRanges->getCount());
36 uno::Reference<sheet::XLabelRanges> xLabelRanges(
init(), UNO_QUERY_THROW);
38 const sal_Int32
nCount = xLabelRanges->getCount();
39 xLabelRanges->removeByIndex(
nCount - 1);
40 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Unable to remove range", (
nCount - 1), xLabelRanges->getCount());
virtual css::uno::Reference< css::uno::XInterface > init()=0