summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-03-08 16:21:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-09 07:28:44 +0100
commitbd4d702054d65b8e907c54835c579f14278e5899 (patch)
tree48d7ff752b4b3174d7205df049e1960695f9c8e6 /writerfilter
parent32c288d862d98aac2f726360be9f2ca53db06ccf (diff)
loplugin:singlevalfields
Change-Id: I7f9ff0fc58adf51eae7fef5ce925b91b8d1f4922 Reviewed-on: https://gerrit.libreoffice.org/68940 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.hxx14
-rw-r--r--writerfilter/source/dmapper/TablePropertiesHandler.cxx20
3 files changed, 2 insertions, 36 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 74ca53ab814f..94cf9ca8f9f7 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -55,8 +55,6 @@ DomainMapperTableManager::DomainMapperTableManager() :
m_aTmpPosition(),
m_aTmpTableProperties(),
m_bPushCurrentWidth(false),
- m_bRowSizeTypeInserted(false),
- m_bHasBtlrCell(false),
m_bTableSizeTypeInserted(false),
m_nLayoutType(0),
m_pTablePropsHandler(new TablePropertiesHandler())
@@ -745,8 +743,6 @@ void DomainMapperTableManager::endOfRowAction()
pCellWidths->clear();
m_nGridBefore = m_nGridAfter = 0;
- m_bRowSizeTypeInserted = false;
- m_bHasBtlrCell = false;
m_bTableSizeTypeInserted = false;
#ifdef DEBUG_WRITERFILTER
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.hxx b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
index cf130a021462..c835277919c9 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
@@ -61,10 +61,6 @@ class DomainMapperTableManager : public TableManager
bool m_bPushCurrentWidth;
/// Individual table cell width values, used only in case the number of cells doesn't match the table grid.
::std::vector< IntVectorPtr > m_aCellWidths;
- /// Remember if a cell already set this, then it should not be set at a row level.
- bool m_bRowSizeTypeInserted;
- /// At least one cell in the current row has the btLr text direction.
- bool m_bHasBtlrCell;
/// Remember if table width was already set, when we lack a w:tblW, it should be set manually at the end.
bool m_bTableSizeTypeInserted;
/// Table layout algorithm, IOW if we should consider fixed column width or not.
@@ -127,16 +123,6 @@ public:
m_aTmpTableProperties.back()->InsertProps(pProps.get());
};
- bool IsRowSizeTypeInserted() const
- {
- return m_bRowSizeTypeInserted;
- }
-
- bool HasBtlrCell() const
- {
- return m_bHasBtlrCell;
- }
-
void SetLayoutType(sal_uInt32 nLayoutType)
{
m_nLayoutType = nLayoutType;
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
index 3ace6e58a8b2..cd29d01c0598 100644
--- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx
+++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
@@ -78,25 +78,9 @@ namespace dmapper {
pProperties->resolve(*pMeasureHandler);
TablePropertyMapPtr pPropMap( new TablePropertyMap );
- DomainMapperTableManager* pManager = dynamic_cast<DomainMapperTableManager*>(m_pTableManager);
- // In case any of the cells has the btLr cell direction, then an explicit minimal size will just hide the whole row, don't do that.
- const int MINLAY = 23; // sw/inc/swtypes.hxx, minimal possible size of frames.
- if (!pManager || !pManager->HasBtlrCell() || pMeasureHandler->getMeasureValue() > ConversionHelper::convertTwipToMM100(MINLAY))
- {
- bool bCantSplit = false;
- if (pManager && pManager->getRowProps())
- {
- boost::optional<PropertyMap::Property> oIsSplitAllowed = pManager->getRowProps()->getProperty(PROP_IS_SPLIT_ALLOWED);
- bCantSplit = oIsSplitAllowed && !oIsSplitAllowed->second.get<bool>();
- }
- // In case a cell already wanted fixed size and the row has <w:cantSplit/>, we should not overwrite it here.
- if (!pManager || !pManager->IsRowSizeTypeInserted() || !bCantSplit)
- pPropMap->Insert( PROP_SIZE_TYPE, uno::makeAny( pMeasureHandler->GetRowHeightSizeType() ), false);
- else
- pPropMap->Insert( PROP_SIZE_TYPE, uno::makeAny(text::SizeType::FIX), false);
+ pPropMap->Insert( PROP_SIZE_TYPE, uno::makeAny( pMeasureHandler->GetRowHeightSizeType() ), false);
+ pPropMap->Insert( PROP_HEIGHT, uno::makeAny(pMeasureHandler->getMeasureValue() ));
- pPropMap->Insert( PROP_HEIGHT, uno::makeAny(pMeasureHandler->getMeasureValue() ));
- }
insertRowProps(pPropMap);
}
}