From fd92740a86ab8e71e77d947d1d7dabc51a8d0794 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 19 Dec 2019 17:54:08 +0100 Subject: [PATCH] DOCX table import: fix interaction of 1-cell rows and "inside" vertical borders The interesting part of the bugdoc was: - table style wants visible borders - table direct formatting clears left and right borders - 1st row of the table has 1 cell (2 cells in fact, but they are merged) Fix the "inside" vertical border handling, so that the first cell gets these vertical borders as a right border only in case there are multiple cells. Change-Id: Id847109ecfa95d1745abe62ddf36c4936b730855 Reviewed-on: https://gerrit.libreoffice.org/85536 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- .../CppunitTest_writerfilter_dmapper.mk | 48 +++++++++++ writerfilter/Module_writerfilter.mk | 1 + .../dmapper/DomainMapperTableHandler.cxx | 76 ++++++++++++++++++ .../data/1cell-insidev-rightborder.docx | Bin 0 -> 13204 bytes .../dmapper/DomainMapperTableHandler.cxx | 3 +- 5 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 writerfilter/CppunitTest_writerfilter_dmapper.mk create mode 100644 writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx create mode 100644 writerfilter/qa/cppunittests/dmapper/data/1cell-insidev-rightborder.docx diff --git a/writerfilter/CppunitTest_writerfilter_dmapper.mk b/writerfilter/CppunitTest_writerfilter_dmapper.mk new file mode 100644 index 000000000000..fbb302297c94 --- /dev/null +++ b/writerfilter/CppunitTest_writerfilter_dmapper.mk @@ -0,0 +1,48 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#************************************************************************* +# +# 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/. +# +#************************************************************************* + +$(eval $(call gb_CppunitTest_CppunitTest,writerfilter_dmapper)) + +$(eval $(call gb_CppunitTest_use_externals,writerfilter_dmapper,\ + boost_headers \ +)) + +$(eval $(call gb_CppunitTest_add_exception_objects,writerfilter_dmapper, \ + writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,writerfilter_dmapper, \ + comphelper \ + cppu \ + oox \ + sal \ + test \ + unotest \ +)) + +$(eval $(call gb_CppunitTest_use_sdk_api,writerfilter_dmapper)) + +$(eval $(call gb_CppunitTest_use_ure,writerfilter_dmapper)) +$(eval $(call gb_CppunitTest_use_vcl,writerfilter_dmapper)) + +$(eval $(call gb_CppunitTest_use_rdb,writerfilter_dmapper,services)) + +$(eval $(call gb_CppunitTest_use_custom_headers,writerfilter_dmapper,\ + officecfg/registry \ +)) + +$(eval $(call gb_CppunitTest_use_configuration,writerfilter_dmapper)) + +# we need to explicitly depend on library writerfilter because it is not implied +# by a link relation +$(call gb_CppunitTest_get_target,writerfilter_dmapper) : $(call gb_Library_get_target,writerfilter) + +# vim: set noet sw=4 ts=4: diff --git a/writerfilter/Module_writerfilter.mk b/writerfilter/Module_writerfilter.mk index 516a4832f340..34b75ee9d54d 100644 --- a/writerfilter/Module_writerfilter.mk +++ b/writerfilter/Module_writerfilter.mk @@ -17,6 +17,7 @@ $(eval $(call gb_Module_add_targets,writerfilter,\ $(eval $(call gb_Module_add_slowcheck_targets,writerfilter,\ CppunitTest_writerfilter_filters_test \ CppunitTest_writerfilter_misc \ + CppunitTest_writerfilter_dmapper \ )) # vim: set noet sw=4 ts=4: diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx new file mode 100644 index 000000000000..c3b52060646b --- /dev/null +++ b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 + +using namespace ::com::sun::star; + +namespace +{ +/// Tests for writerfilter/source/dmapper/DomainMapperTableHandler.cxx. +class Test : public test::BootstrapFixture, public unotest::MacrosTest +{ +private: + uno::Reference mxComponentContext; + uno::Reference mxComponent; + +public: + void setUp() override; + void tearDown() override; + uno::Reference& getComponent() { return mxComponent; } +}; + +void Test::setUp() +{ + test::BootstrapFixture::setUp(); + + mxComponentContext.set(comphelper::getComponentContext(getMultiServiceFactory())); + mxDesktop.set(frame::Desktop::create(mxComponentContext)); +} + +void Test::tearDown() +{ + if (mxComponent.is()) + mxComponent->dispose(); + + test::BootstrapFixture::tearDown(); +} + +char const DATA_DIRECTORY[] = "/writerfilter/qa/cppunittests/dmapper/data/"; + +CPPUNIT_TEST_FIXTURE(Test, test1cellInsidevRightborder) +{ + OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "1cell-insidev-rightborder.docx"; + getComponent() = loadFromDesktop(aURL); + uno::Reference xTextDocument(getComponent(), uno::UNO_QUERY); + uno::Reference xTables(xTextDocument->getTextTables(), uno::UNO_QUERY); + uno::Reference xTable(xTables->getByIndex(0), uno::UNO_QUERY); + uno::Reference xCell(xTable->getCellByName("A1"), uno::UNO_QUERY); + table::BorderLine2 aBorder; + xCell->getPropertyValue("RightBorder") >>= aBorder; + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 0 + // - Actual : 18 + // i.e. the request to have no table-level right border was lost on import. + CPPUNIT_ASSERT_EQUAL(static_cast(0), aBorder.LineWidth); +} +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/qa/cppunittests/dmapper/data/1cell-insidev-rightborder.docx b/writerfilter/qa/cppunittests/dmapper/data/1cell-insidev-rightborder.docx new file mode 100644 index 0000000000000000000000000000000000000000..d0bc40e23ba1dd863cb026faaba5019691ca1bd0 GIT binary patch literal 13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&x@cZA=QHGd)`faLT`H2;{o z`5ou)yDfjB006k80Kk9jz5Gu8`x^L9fFAO{vGH?i{GIrBH~J@WJN>_j|K?PGr~ms@ j{3kU4(8Bl^-v2!@E6YKF)DHka1ieT>8m!Oq^V9zW<~Bdd literal 0 HcmV?d00001 diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index db063663c326..5ab5a76825f5 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -133,7 +133,8 @@ static void lcl_computeCellBorders( const PropertyMapPtr& pTableBorders, const P if ( nCell == 0 ) { lcl_mergeBorder( PROP_LEFT_BORDER, pTableBorders, pCellProps ); - if ( pVerticalVal ) + // counts if there are multiple cells in this row. + if (pVerticalVal && !bIsEndCol) pCellProps->Insert( PROP_RIGHT_BORDER, aVertProp, false ); }