Kaydet (Commit) bd4d7020 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:singlevalfields

Change-Id: I7f9ff0fc58adf51eae7fef5ce925b91b8d1f4922
Reviewed-on: https://gerrit.libreoffice.org/68940
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 32c288d8
......@@ -4,25 +4,25 @@ chart2/source/view/inc/PlottingPositionHelper.hxx:206
connectivity/source/inc/dbase/dindexnode.hxx:125
connectivity::dbase::ONDXPage bNoDelete
unsigned int
cui/source/inc/cfg.hxx:248
cui/source/inc/cfg.hxx:249
SvxConfigEntry nId
sal_uInt16
desktop/source/app/main.c:29
/media/noel/disk2/libo5/desktop/source/app/main.c g_Exiting
/media/noel/disk2/libo4/desktop/source/app/main.c g_Exiting
int
editeng/source/misc/hangulhanja.cxx:79
editeng/source/misc/hangulhanja.cxx:80
editeng::HangulHanjaConversion_Impl m_eConvType
class HangulHanjaConversion::ConversionType
editeng/source/misc/svxacorr.cxx:229
editeng/source/misc/svxacorr.cxx:231
GetIgnoreTranslWrapper bIsInit
int
filter/source/graphicfilter/eps/eps.cxx:141
filter/source/graphicfilter/eps/eps.cxx:142
PSWriter nNextChrSetId
sal_uInt8
include/opencl/openclwrapper.hxx:46
openclwrapper::GPUEnv mnIsUserCreated
int
include/svtools/ruler.hxx:625
include/svtools/ruler.hxx:621
Ruler mnBorderWidth
long
include/tools/ref.hxx:126
......@@ -55,26 +55,26 @@ sc/source/filter/inc/stylesbuffer.hxx:290
sc/source/filter/inc/stylesbuffer.hxx:292
oox::xls::ApiAlignmentData mnVerJustifyMethod
sal_Int32
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1099
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1080
ScPagePreviewCountData nHeaders
long
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1100
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1081
ScPagePreviewCountData nTables
long
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1102
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1083
ScPagePreviewCountData nFooters
long
sc/source/ui/vba/vbahyperlink.hxx:83
ScVbaHyperlink mnType
long
sd/qa/unit/tiledrendering/tiledrendering.cxx:968
sd/qa/unit/tiledrendering/tiledrendering.cxx:966
ViewCallback m_nPart
int
soltools/cpp/_tokens.c:34
/media/noel/disk2/libo5/soltools/cpp/_tokens.c EBCDIC_ExternTokenDetected
/media/noel/disk2/libo4/soltools/cpp/_tokens.c EBCDIC_ExternTokenDetected
int
soltools/cpp/_tokens.c:35
/media/noel/disk2/libo5/soltools/cpp/_tokens.c EBCDIC_StartTokenDetected
/media/noel/disk2/libo4/soltools/cpp/_tokens.c EBCDIC_StartTokenDetected
int
soltools/cpp/cpp.h:121
includelist always
......@@ -110,16 +110,13 @@ vcl/unx/generic/app/saldata.cxx:519
X11SalData::XError bOnce
int
vcl/unx/generic/app/sm.cxx:186
/media/noel/disk2/libo5/vcl/unx/generic/app/sm.cxx nSmDel
int
vcl/unx/generic/window/FWS.cxx:174
extern badWindowFound
/media/noel/disk2/libo4/vcl/unx/generic/app/sm.cxx nSmDel
int
vcl/workben/icontest.cxx:145
IconTestApp nRet
int
workdir/LexTarget/l10ntools/source/cfglex.cxx:2301
/media/noel/disk2/libo5/workdir/LexTarget/l10ntools/source/cfglex.cxx bText
workdir/LexTarget/l10ntools/source/cfglex.cxx:2302
/media/noel/disk2/libo4/workdir/LexTarget/l10ntools/source/cfglex.cxx bText
int
writerfilter/source/dmapper/PageBordersHandler.hxx:54
writerfilter::dmapper::PageBordersHandler m_eOffsetFrom
......
......@@ -663,9 +663,6 @@ RecoveryDialog::RecoveryDialog(weld::Window* pParent, RecoveryCore* pCore)
, m_eRecoveryState(RecoveryDialog::E_RECOVERY_PREPARED)
, m_bWaitForCore(false)
, m_bWasRecoveryStarted(false)
, m_aGreenCheckImg(RID_SVXBMP_GREENCHECK)
, m_aYellowCheckImg(RID_SVXBMP_YELLOWCHECK)
, m_aRedCrossImg(RID_SVXBMP_REDCROSS)
, m_aSuccessRecovStr(SvxResId(RID_SVXSTR_SUCCESSRECOV))
, m_aOrigDocRecovStr(SvxResId(RID_SVXSTR_ORIGDOCRECOV))
, m_aRecovFailedStr(SvxResId(RID_SVXSTR_RECOVFAILED))
......@@ -992,19 +989,19 @@ OUString RecoveryDialog::impl_getStatusString( const TURLInfo& rInfo ) const
return sStatus;
}
OUString RecoveryDialog::impl_getStatusImage( const TURLInfo& rInfo ) const
OUString RecoveryDialog::impl_getStatusImage( const TURLInfo& rInfo )
{
OUString sStatus;
switch ( rInfo.RecoveryState )
{
case E_SUCCESSFULLY_RECOVERED :
sStatus = m_aGreenCheckImg;
sStatus = RID_SVXBMP_GREENCHECK;
break;
case E_ORIGINAL_DOCUMENT_RECOVERED :
sStatus = m_aYellowCheckImg;
sStatus = RID_SVXBMP_YELLOWCHECK;
break;
case E_RECOVERY_FAILED :
sStatus = m_aRedCrossImg;
sStatus = RID_SVXBMP_REDCROSS;
break;
default:
break;
......
......@@ -409,10 +409,6 @@ class RecoveryDialog : public weld::GenericDialogController
bool m_bWaitForCore;
bool m_bWasRecoveryStarted;
OUString m_aGreenCheckImg;
OUString m_aYellowCheckImg;
OUString m_aRedCrossImg;
OUString m_aSuccessRecovStr;
OUString m_aOrigDocRecovStr;
OUString m_aRecovFailedStr;
......@@ -447,7 +443,7 @@ class RecoveryDialog : public weld::GenericDialogController
DECL_LINK(CancelButtonHdl, weld::Button&, void);
OUString impl_getStatusString( const TURLInfo& rInfo ) const;
OUString impl_getStatusImage( const TURLInfo& rInfo ) const;
static OUString impl_getStatusImage( const TURLInfo& rInfo );
};
......
......@@ -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
......
......@@ -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:
;
......
......@@ -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),
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment