1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #include <test/unoapi_test.hxx>
12 #include <com/sun/star/text/XTextFramesSupplier.hpp>
14 using namespace com::sun::star
;
18 /// Tests for writerfilter/source/dmapper/TableManager.cxx.
19 class Test
: public UnoApiTest
23 : UnoApiTest("/writerfilter/qa/cppunittests/dmapper/data/")
28 CPPUNIT_TEST_FIXTURE(Test
, testFloattableNestedCellStartDOCXImport
)
30 // Given a document with a nested floating table at cell start and an other inner floating table:
31 // When importing that document:
32 loadFromFile(u
"floattable-nested-cellstart.docx");
34 // Then make sure that both inner tables are floating:
35 uno::Reference
<text::XTextFramesSupplier
> xFramesSupplier(mxComponent
, uno::UNO_QUERY
);
36 uno::Reference
<container::XIndexAccess
> xFrames(xFramesSupplier
->getTextFrames(),
38 // Without the accompanying fix in place, this test would have failed with:
41 // i.e. the first inner table was not floating.
42 CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32
>(2), xFrames
->getCount());
46 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */