oox/source/drawingml/table/tablecell.cxx | 4 ++-- sd/qa/unit/data/pptx/tdf149865.pptx |binary sd/qa/unit/import-tests.cxx | 22 ++++++++++++++++++++++ svx/source/fmcomp/gridctrl.cxx | 3 --- 4 files changed, 24 insertions(+), 5 deletions(-)
New commits: commit 70b8d8d980ffc48674b0bcaa3c5c36fe8b99d1b4 Author: Balazs Varga <[email protected]> AuthorDate: Mon Sep 9 16:19:14 2024 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Wed Sep 11 20:50:01 2024 +0200 tdf#149865 - FILEOPEN PPTX: fix table lacks border Fix wrong border line styles if we have merged cells. Change-Id: I238aa08c65b9aefd7b77b0f4ae3c3df979a7171d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173109 Reviewed-by: Balazs Varga <[email protected]> Tested-by: Jenkins (cherry picked from commit 070682854800cb983b452a5b5bd16943433c4b2b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173168 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx index c04960240ec7..d38d6197ba0e 100644 --- a/oox/source/drawingml/table/tablecell.cxx +++ b/oox/source/drawingml/table/tablecell.cxx @@ -202,11 +202,11 @@ static void applyTableStylePart( const ::oox::core::XmlFilterBase& rFilterBase, { if (nCol == 0) applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder ); - if (nCol == nMaxCol) + if (nCol >= nMaxCol) applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder ); if (nRow == 0) applyBorder( rFilterBase, rTableStylePart, XML_top, rTopBorder ); - if (nRow == nMaxRow) + if (nRow >= nMaxRow) applyBorder( rFilterBase, rTableStylePart, XML_bottom, rBottomBorder ); applyBorder( rFilterBase, rTableStylePart, XML_insideH, rInsideHBorder ); diff --git a/sd/qa/unit/data/pptx/tdf149865.pptx b/sd/qa/unit/data/pptx/tdf149865.pptx new file mode 100644 index 000000000000..3b5a0cbb8f7a Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf149865.pptx differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index a2fee7de457d..f0da89531882 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -1654,6 +1654,28 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testTableBorderLineStyle) } } +CPPUNIT_TEST_FIXTURE(SdImportTest, testTableMergedCellsBorderLineStyle) +{ + createSdImpressDoc("pptx/tdf149865.pptx"); + + const SdrPage* pPage = GetPage(1); + + sdr::table::SdrTableObj* pTableObj; + uno::Reference<table::XCellRange> xTable; + uno::Reference<beans::XPropertySet> xCell; + table::BorderLine2 aBorderLine; + + pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0)); + CPPUNIT_ASSERT(pTableObj); + xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW); + xCell.set(xTable->getCellByPosition(4, 1), uno::UNO_QUERY_THROW); + xCell->getPropertyValue(u"RightBorder"_ustr) >>= aBorderLine; + table::BorderLine2 expectedRight(0x30ba78, 0, 17, 0, 0, 17); + CPPUNIT_ASSERT_EQUAL(expectedRight.LineStyle, aBorderLine.LineStyle); + CPPUNIT_ASSERT_EQUAL(expectedRight.Color, aBorderLine.Color); + CPPUNIT_ASSERT_EQUAL(expectedRight.LineWidth, aBorderLine.LineWidth); +} + CPPUNIT_TEST_FIXTURE(SdImportTest, testBnc862510_6) { // Black text was imported instead of gray commit 85145e56b21a10460fdc6ff2bd31c3fbf9cf3eed Author: Stephan Bergmann <[email protected]> AuthorDate: Tue Sep 10 13:04:00 2024 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Wed Sep 11 20:49:52 2024 +0200 -Werror,-Wunused-private-field ...since f9ff22db058180d161b32f5dcd87e72cfa3b6889 "tsan:lock-order-inversion in forms" Change-Id: I6a31c661a6604e7c701e49b147d5372bef50dc3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173133 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit b472e1cedddf083d6b04d233cdefe686c8aa07ae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173174 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index b891f2081a04..e716d9eeb0ab 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -123,7 +123,6 @@ private: class GridFieldValueListener : protected ::comphelper::OPropertyChangeListener { - osl::Mutex m_aMutex; DbGridControl& m_rParent; rtl::Reference<::comphelper::OPropertyChangeMultiplexer> m_pRealListener; sal_uInt16 m_nId; @@ -240,8 +239,6 @@ class FmXGridSourcePropListener : public ::comphelper::OPropertyChangeListener { VclPtr<DbGridControl> m_pParent; - // a DbGridControl has no mutex, so we use our own as the base class expects one - osl::Mutex m_aMutex; sal_Int16 m_nSuspended; public:
