summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-11-15 11:58:01 +0100
committerLászló Németh <nemeth@numbertext.org>2019-11-19 07:52:10 +0100
commit966188a11f2bb9545ed2ec8ae27f06bf1388617d (patch)
tree5c30365ee28296506077225b9e9c8d46dfbe2561 /writerfilter
parentc506720874cedc4999d0c0e4d680914a3100b832 (diff)
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@numbertext.org> (cherry picked from commit 00eeb7b3f765a51f51f7911a116982fbfb83efb7) Reviewed-on: https://gerrit.libreoffice.org/83098
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx30
1 files changed, 0 insertions, 30 deletions
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);
- }
}
}
}