diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 287028c..813f154 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -966,8 +966,8 @@ css::uno::Sequence<css::beans::PropertyValues> DomainMapperTableHandler::endTabl
 }
 
 // Apply paragraph property to each paragraph within a cell.
-static void lcl_ApplyCellParaProps(uno::Reference<table::XCell> const& xCell,
-        const uno::Any& rBottomMargin)
+static void lcl_ApplyCellParaProps(uno::Reference<table::XCell> const& xCell, const OUString sPropertyName,
+        const uno::Any& rValue, DomainMapper_Impl& rDMapper_Impl)
 {
     uno::Reference<container::XEnumerationAccess> xEnumerationAccess(xCell, uno::UNO_QUERY);
     uno::Reference<container::XEnumeration> xEnumeration = xEnumerationAccess->createEnumeration();
@@ -975,10 +975,33 @@ static void lcl_ApplyCellParaProps(uno::Reference<table::XCell> const& xCell,
     {
         uno::Reference<beans::XPropertySet> xParagraph(xEnumeration->nextElement(), uno::UNO_QUERY);
         uno::Reference<beans::XPropertyState> xPropertyState(xParagraph, uno::UNO_QUERY);
+
+        if ( xPropertyState.is() && xPropertyState->getPropertyState("ParaStyleName") == beans::PropertyState_DIRECT_VALUE )
+        {
+            OUString sStyleName;
+            xParagraph->getPropertyValue("ParaStyleName") >>= sStyleName;
+            const StyleSheetEntryPtr pStyleSheet = rDMapper_Impl.GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( sStyleName );
+            if ( pStyleSheet && sStyleName != rDMapper_Impl.GetDefaultParaStyleName() )
+            {
+                PropertyIds eId = PROP_PARA_BOTTOM_MARGIN;
+                uno::Any  aStyleValue = rDMapper_Impl.GetAnyProperty(eId, pStyleSheet->pProperties);
+                if ( aStyleValue != uno::Any() )
+                {
+SAL_WARN("DEBUG","::ApplyCellParaProps["<<sPropertyName<<"]["<<aStyleValue<<"] using style["<<aStyleValue<<"] instead of table["<<rValue<<"] set["<<(int)xPropertyState->getPropertyState(sPropertyName)<<"]");
+//assert(aStyleValue == rValue);
+                    if ( xPropertyState->getPropertyState(sPropertyName) == beans::PropertyState_DIRECT_VALUE )
+                        xParagraph->setPropertyValue(sPropertyName, aStyleValue);
+                    return;
+                }
+            }
+        }
+
         // 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);
+        if (xPropertyState.is() && xPropertyState->getPropertyState(sPropertyName) == beans::PropertyState_DEFAULT_VALUE)
+        {
+            SAL_WARN("DEBUG","Setting ParaBottomMargin to["<<rValue<<"] from table style.");
+            xParagraph->setPropertyValue(sPropertyName, rValue);
+        }
     }
 }
 
@@ -1083,14 +1106,14 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel, bool bTab
                     if (aTableInfo.aTableProperties[i].Name == "ParaBottomMargin")
                     {
                         uno::Reference<table::XCellRange> xCellRange(xTable, uno::UNO_QUERY);
-                        uno::Any aBottomMargin = aTableInfo.aTableProperties[i].Value;
+                        uno::Any aValue = aTableInfo.aTableProperties[i].Value;
                         sal_Int32 nRows = aCellProperties.getLength();
                         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);
+                                lcl_ApplyCellParaProps(xCellRange->getCellByPosition(nCell, nRow), aTableInfo.aTableProperties[i].Name, aValue, m_rDMapper_Impl);
                         }
                         break;
                     }
