summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2014-03-26 17:01:27 +0100
committerLuboš Luňák <l.lunak@collabora.com>2014-03-26 17:36:49 +0100
commit77f4c4b8db2671921dd378ac4e255b700c7cf332 (patch)
treec460290d0d5bfd07c4094f3e35497b48e9b71fae /writerfilter
parenta3b0d947b026731af6d29891876593c82c2bc65b (diff)
Revert "rhbz#1075124: writerfilter: fix tables with negative left margin"
It appears that this was just a workaround that incidentally worked. Making the negative value even larger (in abs value) doesn't seem to make a difference for MSO, but LO fails again. A proper fix (better workaround?) will follow. This reverts commit 76aa23c59b4c81ea7b9d974a1a0a9e39c6bf8741.
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx24
-rw-r--r--writerfilter/source/dmapper/TablePropertiesHandler.cxx4
2 files changed, 14 insertions, 14 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index a6ade15be9b3..a9a4221cf408 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -406,6 +406,18 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
m_aTableProperties->getValue( TablePropertyMap::CELL_MAR_BOTTOM,
rInfo.nBottomBorderDistance );
+ table::TableBorderDistances aDistances;
+ aDistances.IsTopDistanceValid =
+ aDistances.IsBottomDistanceValid =
+ aDistances.IsLeftDistanceValid =
+ aDistances.IsRightDistanceValid = sal_True;
+ aDistances.TopDistance = static_cast<sal_Int16>( rInfo.nTopBorderDistance );
+ aDistances.BottomDistance = static_cast<sal_Int16>( rInfo.nBottomBorderDistance );
+ aDistances.LeftDistance = static_cast<sal_Int16>( rInfo.nLeftBorderDistance );
+ aDistances.RightDistance = static_cast<sal_Int16>( rInfo.nRightBorderDistance );
+
+ m_aTableProperties->Insert( PROP_TABLE_BORDER_DISTANCES, uno::makeAny( aDistances ) );
+
if (rFrameProperties.hasElements())
lcl_DecrementHoriOrientPosition(rFrameProperties, rInfo.nLeftBorderDistance);
@@ -465,18 +477,6 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
lcl_debug_TableBorder(aTableBorder);
#endif
- table::TableBorderDistances aDistances;
- aDistances.IsTopDistanceValid =
- aDistances.IsBottomDistanceValid =
- aDistances.IsLeftDistanceValid =
- aDistances.IsRightDistanceValid = sal_True;
- aDistances.TopDistance = static_cast<sal_Int16>( rInfo.nTopBorderDistance );
- aDistances.BottomDistance = static_cast<sal_Int16>( rInfo.nBottomBorderDistance );
- aDistances.LeftDistance = static_cast<sal_Int16>( rInfo.nLeftBorderDistance );
- aDistances.RightDistance = static_cast<sal_Int16>( rInfo.nRightBorderDistance );
-
- m_aTableProperties->Insert( PROP_TABLE_BORDER_DISTANCES, uno::makeAny( aDistances ) );
-
// Table position in Office is computed in 2 different ways :
// - top level tables: the goal is to have in-cell text starting at table indent pos (tblInd),
// so table's position depends on table's cells margin
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
index d71e9aef2782..7777ed9ea9e1 100644
--- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx
+++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
@@ -370,8 +370,8 @@ namespace dmapper {
if (m_pCurrentInteropGrabBag)
m_pCurrentInteropGrabBag->push_back(pHandler->getInteropGrabBag());
TablePropertyMapPtr pTblIndMap(new TablePropertyMap);
- sal_Int32 nTblInd = pHandler->getMeasureValue();
- pTblIndMap->setValue(TablePropertyMap::LEFT_MARGIN, nTblInd);
+ sal_uInt32 nTblInd = pHandler->getMeasureValue();
+ pTblIndMap->setValue( TablePropertyMap::LEFT_MARGIN, nTblInd);
insertTableProps(pTblIndMap);
}
}