[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - writerfilter/source
László Németh (via logerrit)
logerrit at kemper.freedesktop.org
Tue Nov 19 06:52:53 UTC 2019
writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 30 ---------------
1 file changed, 30 deletions(-)
New commits:
commit 966188a11f2bb9545ed2ec8ae27f06bf1388617d
Author: László Németh <nemeth at numbertext.org>
AuthorDate: Fri Nov 15 11:58:01 2019 +0100
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Tue Nov 19 07:52:10 2019 +0100
DOCX: clean-up paragraph bottom handling of table style
Revert of commit 17e904ed66c3caf87e658b9d3a18d7b13f4a0b52
("bnc#816593 DOCX filter: import paragraph spacing from table style),
keeping only the working unit test.
Change-Id: I735744aadb071ef2f0d939cb637d83cfc5716fe4
Reviewed-on: https://gerrit.libreoffice.org/82776
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit 00eeb7b3f765a51f51f7911a116982fbfb83efb7)
Reviewed-on: https://gerrit.libreoffice.org/83098
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index efbaf3a0ffc3..d80f4b36518d 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -19,8 +19,6 @@
#include "DomainMapperTableHandler.hxx"
#include "DomainMapper_Impl.hxx"
#include "StyleSheetTable.hxx"
-#include <com/sun/star/beans/XPropertyState.hpp>
-#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/table/TableBorderDistances.hpp>
#include <com/sun/star/table/TableBorder.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
@@ -976,23 +974,6 @@ css::uno::Sequence<css::beans::PropertyValues> DomainMapperTableHandler::endTabl
return aRowProperties;
}
-// Apply paragraph property to each paragraph within a cell.
-static void lcl_ApplyCellParaProps(uno::Reference<table::XCell> const& xCell,
- const uno::Any& rBottomMargin)
-{
- uno::Reference<container::XEnumerationAccess> xEnumerationAccess(xCell, uno::UNO_QUERY);
- uno::Reference<container::XEnumeration> xEnumeration = xEnumerationAccess->createEnumeration();
- while (xEnumeration->hasMoreElements())
- {
- uno::Reference<beans::XPropertySet> xParagraph(xEnumeration->nextElement(), uno::UNO_QUERY);
- uno::Reference<beans::XPropertyState> xPropertyState(xParagraph, uno::UNO_QUERY);
- // Don't apply in case direct formatting is already present.
- // TODO: probably paragraph style has priority over table style here.
- if (xPropertyState.is() && xPropertyState->getPropertyState("ParaBottomMargin") == beans::PropertyState_DEFAULT_VALUE)
- xParagraph->setPropertyValue("ParaBottomMargin", rBottomMargin);
- }
-}
-
void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel, bool bTableStartsAtCellStart)
{
#ifdef DBG_UTIL
@@ -1096,20 +1077,9 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel, bool bTab
[](const beans::PropertyValue& rProp) { return rProp.Name == "ParaBottomMargin"; });
if (pTableProp != aTableInfo.aTableProperties.end())
{
- uno::Reference<table::XCellRange> xCellRange(xTable, uno::UNO_QUERY);
uno::Any aBottomMargin = pTableProp->Value;
- sal_Int32 nRows = aCellProperties.getLength();
-
for (const auto& rParaProp : m_rDMapper_Impl.m_aPendingParaProp )
rParaProp->setPropertyValue("ParaBottomMargin", aBottomMargin );
-
- for (sal_Int32 nRow = 0; nRow < nRows; ++nRow)
- {
- const uno::Sequence< beans::PropertyValues > aCurrentRow = aCellProperties[nRow];
- sal_Int32 nCells = aCurrentRow.getLength();
- for (sal_Int32 nCell = 0; nCell < nCells; ++nCell)
- lcl_ApplyCellParaProps(xCellRange->getCellByPosition(nCell, nRow), aBottomMargin);
- }
}
}
}
More information about the Libreoffice-commits
mailing list