12#include <com/sun/star/beans/XPropertySet.hpp>
13#include <com/sun/star/uno/Any.hxx>
14#include <com/sun/star/uno/Reference.hxx>
16#include <cppunit/TestAssert.h>
25 uno::Reference<beans::XPropertySet> xSheetLink(
init(), UNO_QUERY_THROW);
32 CPPUNIT_ASSERT_MESSAGE(
"Unable to get PropertyValue Url",
33 xSheetLink->getPropertyValue(propName) >>= aUrlGet);
35 aNewValue <<= OUString(
"file:///tmp/ScSheetLinkObj.ods");
36 xSheetLink->setPropertyValue(propName, aNewValue);
37 CPPUNIT_ASSERT(xSheetLink->getPropertyValue(propName) >>= aUrlSet);
38 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Unable to set PropertyValue Url",
39 OUString(
"file:///tmp/ScSheetLinkObj.ods"), aUrlSet);
44 CPPUNIT_ASSERT_MESSAGE(
"Unable to get PropertyValue Filter",
45 xSheetLink->getPropertyValue(propName) >>= aFilterGet);
47 aNewValue <<= OUString(
"Text - txt - csv (StarCalc)");
48 xSheetLink->setPropertyValue(propName, aNewValue);
49 CPPUNIT_ASSERT(xSheetLink->getPropertyValue(propName) >>= aFilterSet);
50 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Unable to set PropertyValue Filter",
51 OUString(
"Text - txt - csv (StarCalc)"), aFilterSet);
53 propName =
"FilterOptions";
54 OUString aFilterOptionsGet;
55 OUString aFilterOptionsSet;
56 CPPUNIT_ASSERT_MESSAGE(
"Unable to get PropertyValue FilterOptions",
57 xSheetLink->getPropertyValue(propName) >>= aFilterOptionsGet);
59 aNewValue <<= OUString(
"NewValue");
60 xSheetLink->setPropertyValue(propName, aNewValue);
61 CPPUNIT_ASSERT(xSheetLink->getPropertyValue(propName) >>= aFilterOptionsSet);
62 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Unable to set PropertyValue FilterOptions", OUString(
"NewValue"),
void testSheetLinkProperties()
virtual css::uno::Reference< css::uno::XInterface > init()=0