summaryrefslogtreecommitdiff
path: root/sw
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 /sw
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 'sw')
-rw-r--r--sw/source/core/inc/UndoTable.hxx1
-rw-r--r--sw/source/core/undo/untbl.cxx71
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx3
4 files changed, 4 insertions, 75 deletions
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index 5b6c07bccc70..193638b2c518 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -180,7 +180,6 @@ class SwUndoTableNdsChg : public SwUndo
long m_nMin, m_nMax; // for redo of delete column
sal_uLong m_nSttNode;
sal_uInt16 m_nCount;
- TableChgWidthHeightType m_nSetColType;
bool const m_bFlag;
bool const m_bSameHeight; // only used for SplitRow
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 2335150d7eac..5876797dc740 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1473,7 +1473,6 @@ SwUndoTableNdsChg::SwUndoTableNdsChg( SwUndoId nAction,
m_nMin( nMn ), m_nMax( nMx ),
m_nSttNode( rTableNd.GetIndex() ),
m_nCount( nCnt ),
- m_nSetColType( TableChgWidthHeightType::InvalidPos ),
m_bFlag( bFlg ),
m_bSameHeight( bSmHght )
{
@@ -1804,27 +1803,11 @@ void SwUndoTableNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
switch( GetId() )
{
case SwUndoId::TABLE_INSCOL:
- if( TableChgWidthHeightType::InvalidPos == extractPosition(m_nSetColType) )
- rDoc.InsertCol( aSelBoxes, m_nCount, m_bFlag );
- else
- {
- SwTableBox* pBox = pTableNd->GetTable().GetTableBox( 0 );
- rDoc.SetColRowWidthHeight( *pBox, m_nSetColType, 0, 0 );
- }
+ rDoc.InsertCol( aSelBoxes, m_nCount, m_bFlag );
break;
case SwUndoId::TABLE_INSROW:
- if( TableChgWidthHeightType::InvalidPos == extractPosition(m_nSetColType) )
- rDoc.InsertRow( aSelBoxes, m_nCount, m_bFlag );
- else
- {
- SwTable& rTable = pTableNd->GetTable();
- SwTableBox* pBox = rTable.GetTableBox( 0 );
- TableChgMode eOldMode = rTable.GetTableChgMode();
- rTable.SetTableChgMode( static_cast<TableChgMode>(m_nCount) );
- rDoc.SetColRowWidthHeight( *pBox, m_nSetColType, 0, 0 );
- rTable.SetTableChgMode( eOldMode );
- }
+ rDoc.InsertRow( aSelBoxes, m_nCount, m_bFlag );
break;
case SwUndoId::TABLE_SPLIT:
@@ -1833,7 +1816,6 @@ void SwUndoTableNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
case SwUndoId::TABLE_DELBOX:
case SwUndoId::ROW_DELETE:
case SwUndoId::COL_DELETE:
- if( TableChgWidthHeightType::InvalidPos == extractPosition(m_nSetColType) )
{
SwTableFormulaUpdate aMsgHint( &pTableNd->GetTable() );
aMsgHint.m_eFlags = TBL_BOXPTR;
@@ -1842,55 +1824,8 @@ void SwUndoTableNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
if( m_nMax > m_nMin && rTable.IsNewModel() )
rTable.PrepareDeleteCol( m_nMin, m_nMax );
rTable.DeleteSel( &rDoc, aSelBoxes, nullptr, this, true, true );
+ m_nSttNode = pTableNd->GetIndex();
}
- else
- {
- SwTable& rTable = pTableNd->GetTable();
-
- SwTableFormulaUpdate aMsgHint( &rTable );
- aMsgHint.m_eFlags = TBL_BOXPTR;
- rDoc.getIDocumentFieldsAccess().UpdateTableFields( &aMsgHint );
-
- SwTableBox* pBox = rTable.GetTableBox( 0 );
- TableChgMode eOldMode = rTable.GetTableChgMode();
- rTable.SetTableChgMode( static_cast<TableChgMode>(m_nCount) );
-
- // need the SaveSections!
- rDoc.GetIDocumentUndoRedo().DoUndo( true );
- std::unique_ptr<SwUndo> pUndo;
-
- switch( extractPosition(m_nSetColType) )
- {
- case TableChgWidthHeightType::ColLeft:
- case TableChgWidthHeightType::ColRight:
- case TableChgWidthHeightType::CellLeft:
- case TableChgWidthHeightType::CellRight:
- rTable.SetColWidth( *pBox, m_nSetColType, 0, 0, &pUndo );
- break;
- case TableChgWidthHeightType::RowBottom:
- case TableChgWidthHeightType::CellTop:
- case TableChgWidthHeightType::CellBottom:
- rTable.SetRowHeight( *pBox, m_nSetColType, 0, 0, &pUndo );
- break;
- default: break;
- }
-
- if( pUndo )
- {
- auto pSwUndoTableNdsChg = static_cast<SwUndoTableNdsChg *>(pUndo.get());
- m_pDelSects->insert(m_pDelSects->begin(),
- std::make_move_iterator(
- pSwUndoTableNdsChg->m_pDelSects->begin()),
- std::make_move_iterator(
- pSwUndoTableNdsChg->m_pDelSects->end()));
- pSwUndoTableNdsChg->m_pDelSects->clear();
- pUndo.reset();
- }
- rDoc.GetIDocumentUndoRedo().DoUndo( false );
-
- rTable.SetTableChgMode( eOldMode );
- }
- m_nSttNode = pTableNd->GetIndex();
break;
default:
;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index a7c69319243f..0753ae83abf1 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3584,7 +3584,6 @@ void DocxAttributeOutput::EndTableCell(sal_uInt32 nCell)
m_pSerializer->endElementNS( XML_w, XML_tc );
- m_bBtLr = false;
m_tableReference->m_bTableCellOpen = false;
m_tableReference->m_bTableCellParaSdtOpen = false;
}
@@ -7171,7 +7170,7 @@ void DocxAttributeOutput::CharIdctHint( const SfxPoolItem& )
void DocxAttributeOutput::CharRotate( const SvxCharRotateItem& rRotate)
{
// Not rotated or we the rotation already handled?
- if ( !rRotate.GetValue() || m_bBtLr || m_rExport.SdrExporter().getFrameBtLr())
+ if ( !rRotate.GetValue() || m_rExport.SdrExporter().getFrameBtLr())
return;
AddToAttrList( m_pEastAsianLayoutAttrList, FSNS( XML_w, XML_vert ), "true" );
@@ -9305,7 +9304,6 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, const FSHelperPtr
m_nextFontId( 1 ),
m_tableReference(new TableReference()),
m_bIgnoreNextFill(false),
- m_bBtLr(false),
m_pTableStyleExport(new DocxTableStyleExport(rExport.m_pDoc, pSerializer)),
m_bParaBeforeAutoSpacing(false),
m_bParaAfterAutoSpacing(false),
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 052dff8fb01c..4ed30cccf7cf 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -911,9 +911,6 @@ private:
/// If FormatBox() already handled fill style / gradient.
bool m_bIgnoreNextFill;
- /// Is fake rotation detected, so rotation with 90 degrees should be ignored in this cell?
- bool m_bBtLr;
-
editeng::WordPageMargins m_pageMargins;
std::shared_ptr<DocxTableStyleExport> m_pTableStyleExport;