/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace css; namespace sc_apitest { class ScAnnontationObj : public CalcUnoApiTest, public apitest::XChild, public apitest::XServiceInfo, public apitest::XSheetAnnotation, public apitest::XSheetAnnotationShapeSupplier, public apitest::XSimpleText, public apitest::XTextRange { public: ScAnnontationObj(); virtual void setUp() override; virtual void tearDown() override; virtual uno::Reference init() override; virtual uno::Reference getAnnotation(table::CellAddress&) override; CPPUNIT_TEST_SUITE(ScAnnontationObj); // XChild CPPUNIT_TEST(testGetSetParent); // XServiceInfo CPPUNIT_TEST(testGetImplementationName); CPPUNIT_TEST(testGetSupportedServiceNames); CPPUNIT_TEST(testSupportsService); // XSheetAnnotation CPPUNIT_TEST(testGetPosition); CPPUNIT_TEST(testGetAuthor); CPPUNIT_TEST(testGetDate); CPPUNIT_TEST(testGetIsVisible); CPPUNIT_TEST(testSetIsVisible); // XSheetAnnotationShapeSupplier CPPUNIT_TEST(testGetAnnotationShape); // XSimpleText CPPUNIT_TEST(testCreateTextCursor); CPPUNIT_TEST(testCreateTextCursorByRange); CPPUNIT_TEST(testInsertString); CPPUNIT_TEST(testInsertControlCharacter); // XTextRange CPPUNIT_TEST(testGetEnd); CPPUNIT_TEST(testGetSetString); CPPUNIT_TEST(testGetStart); CPPUNIT_TEST(testGetText); CPPUNIT_TEST_SUITE_END(); private: uno::Reference mxComponent; }; ScAnnontationObj::ScAnnontationObj() : CalcUnoApiTest("/sc/qa/extras/testdocuments") , XServiceInfo("ScAnnotationObj", "com.sun.star.sheet.CellAnnotation") { } uno::Reference ScAnnontationObj::getAnnotation(table::CellAddress& xCellAddress) { // get the sheet uno::Reference xDoc(mxComponent, uno::UNO_QUERY_THROW); uno::Reference xIndex(xDoc->getSheets(), uno::UNO_QUERY_THROW); uno::Reference xSheet(xIndex->getByIndex(xCellAddress.Sheet), uno::UNO_QUERY_THROW); // get the cell uno::Reference xCell( xSheet->getCellByPosition(xCellAddress.Column, xCellAddress.Row), uno::UNO_SET_THROW); // get the annotation from cell uno::Reference xAnnotationAnchor(xCell, uno::UNO_QUERY_THROW); uno::Reference xSheetAnnotation(xAnnotationAnchor->getAnnotation(), uno::UNO_SET_THROW); return xSheetAnnotation; } uno::Reference ScAnnontationObj::init() { // tested annotation is in sheet 0 cell C2 table::CellAddress aCellAddress; aCellAddress.Sheet = 0; aCellAddress.Row = 1; aCellAddress.Column = 2; return getAnnotation(aCellAddress); } void ScAnnontationObj::setUp() { CalcUnoApiTest::setUp(); // get the test file OUString aFileURL; createFileURL("ScAnnotationObj.ods", aFileURL); mxComponent = loadFromDesktop(aFileURL); } void ScAnnontationObj::tearDown() { closeDocument(mxComponent); CalcUnoApiTest::tearDown(); } CPPUNIT_TEST_SUITE_REGISTRATION(ScAnnontationObj); } // namespace sc_apitest CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2023-12-21tdf#158114 SwNavigator: Make images with broken links easier to findJim Raykowski
2023-04-23tdf#154825 All icon themes: add/update section editorRizal Muttaqin
2023-03-05Resolves tdf#153344 - Resize View Mode icon in statusbar to 16pxHeiko Tietze
2023-02-23Revert "Resolves tdf#146579 - Accessibility for statusbar icons"Heiko Tietze
2023-01-25Resolves tdf#146579 - Accessibility for statusbar iconsHeiko Tietze
2020-08-13tdf#135265 Add icon variants in Manage Changes dialogRizal Muttaqin
2020-02-23Breeze: FIx for tdf#130879 (missing spacing char icons)rizmut
2020-02-23Breeze & Sifr: Fix for tdf#130875: add Envelope Orientation iconsrizmut
2020-01-28Breeze*, colibre, elementary, KJ, Sifr*: Fix for tdf#130204rizmut
2019-09-20Icons: Fix for frame icon in sidebar navigator and search toolbarrizmut
2019-06-30Breeze: Fix for tdf#126155, tdf#124127, tdf#89884,Rizal Muttaqin
2019-06-27Breeze: fix for tdf#125879rizmut
2019-01-06tdf#120108 Wrong wrap optimal iconandreas kainz
2017-12-21Elementary Breeze-icon theme fixesandreas kainz
2016-12-22drop imglstCaolán McNamara
2016-12-20unroll IL_VALUES ImageListCaolán McNamara
2016-12-05unroll IMG_NAVI_ENTRYBMP ImageListCaolán McNamara
2016-09-29Page margin popup converted to use outside sidebarSzymon Kłos
2016-09-12Page size popup converted to use outside sidebarSzymon Kłos
2016-09-07Page column popup converted to use outside the sidebarSzymon Kłos
2016-09-05Page orientation popup converted to use outside sidebarSzymon Kłos
2015-12-028 bit palettes are on the slow path for quartz/svp/gtk3Caolán McNamara
2015-10-28Breeze Icons: optimize png files reduce file sizeandreas kainz
2015-10-13Breeze Icons: remove double icons and move them into links.txtYousuf Philips
2015-10-07Breeze Icons: link icons bath 02 folder swandreas kainz
2015-10-05optipng icon themesChristian Lohmaier
2015-10-01tdf#87234 BREEZE: Fixing icons in the navigator sidebarYousuf Philips
2015-05-16Breeze: diagramm icon designandreas_ka
2015-05-09Breeze: update icon theme, and fix tdf#90387andreas_ka
2015-04-20Optimize Breeze icon theme - Pt.3Andrew
2015-04-16Breeze: modifications and missing iconsandreas_k
2015-04-16Breeze: point fixesandreas_k
2015-04-06Optimize Breeze icon theme Pt2.Andrew
2015-04-05Breeze: update recomandations from Philipsandreas_k
2015-04-04Breeze: Page property iconsandreas_k
2015-03-29Breeze: Style and Formatting sidebarandreas_k
2015-03-29Breeze: CellBorder iconsandreas_k
2015-03-25tdf#87234 Another round of breeze icon updatesAndreas Kainz
2015-03-19Optimize 'Breeze' icon themeAndrew
2015-03-18tdf#87234 - Addition of many large and small breeze iconsYousuf Philips