From d5ffc4d5feba3c72f5af688b65edbb0e280581b4 Mon Sep 17 00:00:00 2001 From: Vasily Melenchuk Date: Thu, 5 Jan 2023 18:32:39 +0300 Subject: writerfilter: removed remains of GAP_HALF define and its usage Change-Id: I8dee16f923686f557c8213d9a7870392bd5fe9bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145090 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk (cherry picked from commit f011a13b3e9d3edf85fa8cb17d612934e589e672) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145943 Reviewed-by: Thorsten Behrens --- writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 9 ++------- writerfilter/source/dmapper/PropertyMap.hxx | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'writerfilter') diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 97fea78eba2a..58d96a9cd8f5 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -354,9 +354,6 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo if( m_aTableProperties ) { //create properties from the table attributes - //...pPropMap->Insert( PROP_LEFT_MARGIN, uno::makeAny( m_nLeftMargin - m_nGapHalf )); - //pPropMap->Insert( PROP_HORI_ORIENT, uno::makeAny( text::HoriOrientation::RIGHT )); - sal_Int32 nGapHalf = 0; sal_Int32 nLeftMargin = 0; comphelper::SequenceAsHashMap aGrabBag; @@ -509,8 +506,6 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo m_aTableProperties->Insert( PROP_TABLE_INTEROP_GRAB_BAG, uno::Any( aGrabBag.getAsConstPropertyValueList() ) ); } - m_aTableProperties->getValue( TablePropertyMap::GAP_HALF, nGapHalf ); - std::optional oLeftMarginFromStyle = m_aTableProperties->getProperty(PROP_LEFT_MARGIN); if (oLeftMarginFromStyle) { @@ -622,7 +617,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo if (0 < nMode && nMode <= 14 && rInfo.nNestLevel == 1) { - const sal_Int32 nAdjustedMargin = nLeftMargin - nGapHalf - rInfo.nLeftBorderDistance; + const sal_Int32 nAdjustedMargin = nLeftMargin - rInfo.nLeftBorderDistance; m_aTableProperties->Insert( PROP_LEFT_MARGIN, uno::Any( nAdjustedMargin ) ); } else @@ -632,7 +627,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo // so emulate that by adding the half the width. (also see docxattributeoutput) if ( rInfo.nNestLevel > 1 && nLeftMargin < 0 ) nLeftMargin = 0; - const sal_Int32 nAdjustedMargin = nLeftMargin - nGapHalf + (aLeftBorder.LineWidth / 2); + const sal_Int32 nAdjustedMargin = nLeftMargin + (aLeftBorder.LineWidth / 2); m_aTableProperties->Insert( PROP_LEFT_MARGIN, uno::Any( nAdjustedMargin ) ); } diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index f9f66e3dcc0b..719233d1ee73 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -575,7 +575,6 @@ public: CELL_MAR_BOTTOM, TABLE_WIDTH, TABLE_WIDTH_TYPE, - GAP_HALF, LEFT_MARGIN, HORI_ORIENT, TablePropertyMapTarget_MAX -- cgit