12#include <com/sun/star/sheet/XDataPilotFieldGrouping.hpp>
13#include <com/sun/star/sheet/DataPilotFieldGroupBy.hpp>
15#include <cppunit/TestAssert.h>
18using namespace css::uno;
24 uno::Reference< sheet::XDataPilotFieldGrouping > xDataPilotFieldGrouping(
init(),UNO_QUERY_THROW);
25 uno::Reference< sheet::XDataPilotField > xDataPilotField( xDataPilotFieldGrouping, UNO_QUERY_THROW );
26 uno::Reference< container::XNameAccess > xNameAccess( xDataPilotField->getItems(), UNO_QUERY_THROW );
27 CPPUNIT_ASSERT(xNameAccess->hasElements());
29 uno::Sequence< OUString > aElements = xNameAccess->getElementNames();
30 xDataPilotFieldGrouping->createNameGroup( aElements );
35 uno::Reference< sheet::XDataPilotFieldGrouping > xDataPilotFieldGrouping(
init(),UNO_QUERY_THROW);
36 sheet::DataPilotFieldGroupInfo aGroupInfo;
37 aGroupInfo.GroupBy = sheet::DataPilotFieldGroupBy::MONTHS;
38 aGroupInfo.HasDateValues =
true;
39 xDataPilotFieldGrouping->createDateGroup(aGroupInfo);
void testCreateNameGroup()
void testCreateDateGroup()
virtual css::uno::Reference< css::uno::XInterface > init()=0