12#include <com/sun/star/sheet/DDELinkMode.hpp>
13#include <com/sun/star/sheet/XDDELink.hpp>
14#include <com/sun/star/sheet/XDDELinks.hpp>
16#include <com/sun/star/uno/Reference.hxx>
18#include <cppunit/TestAssert.h>
21using namespace css::uno;
27 uno::Reference<sheet::XDDELinks> xLinks(
init(), UNO_QUERY_THROW);
29 uno::Reference<sheet::XDDELink> xLink
30 = xLinks->addDDELink(
"soffice",
m_aTopic,
"Sheet1.A1", sheet::DDELinkMode_DEFAULT);
32 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Unable to execute getApplication()", OUString(
"soffice"),
33 xLink->getApplication());
34 CPPUNIT_ASSERT_MESSAGE(
"Unable to execute getTopic()",
35 xLink->getTopic().endsWith(
"ScDDELinksObj.ods"));
36 CPPUNIT_ASSERT_EQUAL_MESSAGE(
"Unable to execute getItem()", OUString(
"Sheet1.A1"),
virtual css::uno::Reference< css::uno::XInterface > init()=0