nss: upgrade to release 3.73
[LibreOffice.git] / test / source / sheet / xddelinks.cxx
blobfc18a16a1eb96f66167ca9428e367765c201eb30
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include <test/sheet/xddelinks.hxx>
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>
20 using namespace css;
21 using namespace css::uno;
23 namespace apitest
25 void XDDELinks::testAddDDELink()
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"),
37 xLink->getItem());
39 } // namespace apitest
41 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */