summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2014-03-26 17:39:25 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-03-27 20:45:45 +0000
commitcc6f1c8e972687bd43f0fab083a4aae6de6b0e0d (patch)
tree9d284133c06a3263aaf794820034a8efdec1843d /writerfilter/source
parent54617821cf0fd2fcb0465bf06c9b333331b49838 (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 2e558f32ef79948858723b9781fbd388850b462b. Change-Id: I56fd5e9d7ce9aa178f7e508f8e7ac3bc0ff2b971 Reviewed-on: https://gerrit.libreoffice.org/8763 Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerfilter/source')
-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 64289c417483..0827cc919968 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 0595a853ffa2..b54b2628407e 100644
--- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx
+++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
@@ -311,8 +311,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);
}
}