summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/document.cxx2
-rw-r--r--sc/source/core/data/global.cxx4
-rw-r--r--sc/source/core/tool/chgtrack.cxx4
-rw-r--r--sc/source/core/tool/interpr1.cxx4
-rw-r--r--sc/source/core/tool/reffind.cxx2
-rw-r--r--sc/source/filter/excel/excrecds.cxx2
-rw-r--r--sc/source/filter/lotus/lotform.cxx4
-rw-r--r--sc/source/filter/starcalc/scflt.cxx6
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/undo/undoblk.cxx4
-rw-r--r--sc/source/ui/undo/undoblk3.cxx4
-rw-r--r--sc/source/ui/undo/undodat.cxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx6
-rw-r--r--sc/source/ui/view/tabview.cxx4
-rw-r--r--sc/source/ui/view/tabview5.cxx4
-rw-r--r--sc/source/ui/view/viewdata.cxx2
16 files changed, 28 insertions, 28 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 93e75ed8e4c1..b8c5db350e15 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2521,7 +2521,7 @@ void ScDocument::MergeNumberFormatter(ScDocument* pSrcDoc)
if (pOtherFormatter && pOtherFormatter != pThisFormatter)
{
SvNumberFormatterIndexTable* pExchangeList =
- pThisFormatter->MergeFormatter(*(pOtherFormatter));
+ pThisFormatter->MergeFormatter(*pOtherFormatter);
if (!pExchangeList->empty())
pFormatExchangeList = pExchangeList;
}
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index c8821157da4e..0bbe0c7fd0cf 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -859,13 +859,13 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget)
SvtSecurityOptions aSecOpt;
bool bCtrlClickHappened = (nScClickMouseModifier & KEY_MOD1);
bool bCtrlClickSecOption = aSecOpt.IsOptionSet( SvtSecurityOptions::EOption::CtrlClickHyperlink );
- if( bCtrlClickHappened && !( bCtrlClickSecOption ) )
+ if( bCtrlClickHappened && ! bCtrlClickSecOption )
{
// return since ctrl+click happened when the
// ctrl+click security option was disabled, link should not open
return;
}
- else if( !( bCtrlClickHappened ) && bCtrlClickSecOption )
+ else if( ! bCtrlClickHappened && bCtrlClickSecOption )
{
// ctrl+click did not happen; only click happened maybe with some
// other key combo. and security option is set, so return
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index cb9421ea5996..5d567b5bd464 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2058,12 +2058,12 @@ IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeTrackMsgInfo )
const SCROW ScChangeTrack::nContentRowsPerSlot = InitContentRowsPerSlot();
const SCSIZE ScChangeTrack::nContentSlots =
- (MAXROWCOUNT) / InitContentRowsPerSlot() + 2;
+ MAXROWCOUNT / InitContentRowsPerSlot() + 2;
SCROW ScChangeTrack::InitContentRowsPerSlot()
{
const SCSIZE nMaxSlots = 0xffe0 / sizeof( ScChangeActionContent* ) - 2;
- SCROW nRowsPerSlot = (MAXROWCOUNT) / nMaxSlots;
+ SCROW nRowsPerSlot = MAXROWCOUNT / nMaxSlots;
if ( nRowsPerSlot * nMaxSlots < sal::static_int_cast<SCSIZE>(MAXROWCOUNT) )
++nRowsPerSlot;
return nRowsPerSlot;
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 59730d7d7185..35665811c462 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2210,7 +2210,7 @@ void ScInterpreter::ScCell()
}
else if( aInfoType == "ADDRESS" )
{ // address formatted as [['FILENAME'#]$TABLE.]$COL$ROW
- ScRefFlags nFlags = (aCellPos.Tab() == aPos.Tab()) ? (ScRefFlags::ADDR_ABS) : (ScRefFlags::ADDR_ABS_3D);
+ ScRefFlags nFlags = (aCellPos.Tab() == aPos.Tab()) ? ScRefFlags::ADDR_ABS : ScRefFlags::ADDR_ABS_3D;
OUString aStr(aCellPos.Format(nFlags, pDok, pDok->GetAddressConvention()));
PushString(aStr);
}
@@ -8795,7 +8795,7 @@ void ScInterpreter::ScSearch()
if (!bBool)
PushNoValue();
else
- PushDouble((double)(nPos) + 1);
+ PushDouble((double)nPos + 1);
}
}
}
diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx
index 463100359dfc..48e9c18dc358 100644
--- a/sc/source/core/tool/reffind.cxx
+++ b/sc/source/core/tool/reffind.cxx
@@ -219,7 +219,7 @@ static ScRefFlags lcl_NextFlags( ScRefFlags nOld )
{
const ScRefFlags Mask_ABS = (ScRefFlags::COL_ABS | ScRefFlags::ROW_ABS | ScRefFlags::TAB_ABS);
ScRefFlags nNew = nOld & Mask_ABS;
- nNew = ScRefFlags( (std::underlying_type<ScRefFlags>::type)(nNew) - 1 ) & Mask_ABS; // weiterzaehlen
+ nNew = ScRefFlags( (std::underlying_type<ScRefFlags>::type)nNew - 1 ) & Mask_ABS; // weiterzaehlen
if (!(nOld & ScRefFlags::TAB_3D))
nNew &= ~ScRefFlags::TAB_ABS; // not 3D -> never absolute!
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 9b2371200b27..fd0ce5977ddb 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -766,7 +766,7 @@ bool XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
{
if( fVal < 0 ) fVal = 0;
if( fVal >= 501 ) fVal = 500;
- nFlags |= (nNewFlags | (sal_uInt16)(fVal) << 7);
+ nFlags |= (nNewFlags | (sal_uInt16)fVal << 7);
}
// normal condition
else
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index 790fc829ebcc..106c19e3218b 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -426,8 +426,8 @@ void LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest )
return;
}
- eType = ( pIndexToType )( nOc );
- eOc = ( pIndexToToken)( nOc );
+ eType = pIndexToType( nOc );
+ eOc = pIndexToToken( nOc );
if( eOc == ocNoName )
pExtName = GetAddInName( nOc );
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 1a6ad39e0ff5..66b8876897c9 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -1776,7 +1776,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
{
SCROW nEnd = static_cast<SCROW>(pColData->Row);
nValue1 = pColData->Value;
- if ((nStart <= nEnd) && (nValue1))
+ if ((nStart <= nEnd) && nValue1)
{
ScPatternAttr aScPattern(pDoc->GetPool());
if ((nValue1 & atBold) == atBold)
@@ -1800,7 +1800,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
{
SCROW nEnd = static_cast<SCROW>(pColData->Row);
nValue1 = pColData->Value;
- if ((nStart <= nEnd) && (nValue1))
+ if ((nStart <= nEnd) && nValue1)
{
ScPatternAttr aScPattern(pDoc->GetPool());
sal_uInt16 HorJustify = (nValue1 & 0x000F);
@@ -2072,7 +2072,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
{
SCROW nEnd = static_cast<SCROW>(pColData->Row);
nValue1 = pColData->Value;
- if ((nStart <= nEnd) && (nValue1))
+ if ((nStart <= nEnd) && nValue1)
{
sal_uLong nKey = 0;
sal_uInt16 nFormat = (nValue1 & 0x00FF);
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index dd0576f281c3..2872bedc1ac2 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2875,7 +2875,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
positions (e.g. if source and destination range overlaps).*/
rDoc.CopyFromClip(
- aPasteDest, aDestMark, InsertDeleteFlags::ALL & ~(InsertDeleteFlags::OBJECTS),
+ aPasteDest, aDestMark, InsertDeleteFlags::ALL & ~InsertDeleteFlags::OBJECTS,
pUndoDoc, pClipDoc.get(), true, false, bIncludeFiltered);
// skipped rows and merged cells don't mix
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index c62b497c9748..5d4444dd06b3 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -800,7 +800,7 @@ void ScUndoCut::DoChange( const bool bUndo )
}
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
+ if ( !( pViewShell && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aExtendedRange, PaintPartFlags::Grid, nExtFlags );
if ( !bUndo ) // draw redo after updating row heights
@@ -1787,7 +1787,7 @@ void ScUndoSelectionStyle::DoChange( const bool bUndo )
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
+ if ( !( pViewShell && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aWorkRange, PaintPartFlags::Grid | PaintPartFlags::Extras, nExtFlags );
ShowTable( aWorkRange.aStart.Tab() );
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 3aa7e90eb509..95f466ad6dd4 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -168,7 +168,7 @@ void ScUndoDeleteContents::DoChange( const bool bUndo )
}
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if ( !( (pViewShell) && pViewShell->AdjustRowHeight(
+ if ( !( pViewShell && pViewShell->AdjustRowHeight(
aRange.aStart.Row(), aRange.aEnd.Row() ) ) )
/*A*/ pDocShell->PostPaint( aRange, PaintPartFlags::Grid | PaintPartFlags::Extras, nExtFlags );
@@ -418,7 +418,7 @@ void ScUndoSelectionAttr::DoChange( const bool bUndo )
}
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
+ if ( !( pViewShell && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aEffRange, PaintPartFlags::Grid | PaintPartFlags::Extras, nExtFlags );
ShowTable( aRange );
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 372033807d84..c1a19e9ec490 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1883,7 +1883,7 @@ void ScUndoDataForm::DoChange( const bool bUndo )
nPaint |= PaintPartFlags::Left;
aDrawRange.aEnd.SetRow(MAXROW);
}
-/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(false))
+/*A*/ if (pViewShell && pViewShell->AdjustBlockHeight(false))
{
aDrawRange.aStart.SetCol(0);
aDrawRange.aStart.SetRow(0);
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 730142d36ae8..e08dda7d405c 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2492,7 +2492,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
pDataSet->Get( ATTR_LANGUAGE_FORMAT )).GetLanguage();
nOldFormat = rDoc.GetFormatTable()->
GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang );
- rAny <<= (sal_Int32)( nOldFormat );
+ rAny <<= (sal_Int32)nOldFormat;
}
break;
case ATTR_INDENT:
@@ -8647,7 +8647,7 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
sal_uInt16 nWidth = rDoc.GetOriginalWidth( nCol, nTab );
// property is 1/100mm, column width is twips
nWidth = (sal_uInt16) TwipsToHMM(nWidth);
- rAny <<= (sal_Int32)( nWidth );
+ rAny <<= (sal_Int32)nWidth;
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
@@ -8793,7 +8793,7 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr
sal_uInt16 nHeight = rDoc.GetOriginalHeight( nRow, nTab );
// property is 1/100mm, row height is twips
nHeight = (sal_uInt16) TwipsToHMM(nHeight);
- rAny <<= (sal_Int32)( nHeight );
+ rAny <<= (sal_Int32)nHeight;
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index b5d889b306b2..ec7c3bb0973a 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2370,7 +2370,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
if (pModelObj)
aOldSize = pModelObj->getDocumentSize();
- aViewData.SetMaxTiledRow(std::min(std::max(nEndRow, aViewData.GetMaxTiledRow()) + nVisibleRows, (long)(MAXTILEDROW)));
+ aViewData.SetMaxTiledRow(std::min(std::max(nEndRow, aViewData.GetMaxTiledRow()) + nVisibleRows, (long)MAXTILEDROW));
Size aNewSize(0, 0);
if (pModelObj)
@@ -2497,7 +2497,7 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
if (pModelObj)
aOldSize = pModelObj->getDocumentSize();
- aViewData.SetMaxTiledCol(std::min(std::max(nEndCol, aViewData.GetMaxTiledCol()) + nVisibleCols, (long)(MAXCOL)));
+ aViewData.SetMaxTiledCol(std::min(std::max(nEndCol, aViewData.GetMaxTiledCol()) + nVisibleCols, (long)MAXCOL));
Size aNewSize(0, 0);
if (pModelObj)
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index ff7ec2978608..88cba7440784 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -171,8 +171,8 @@ ScTabView::~ScTabView()
ScViewData& rOtherViewData = pOtherViewShell->GetViewData();
for (int k = 0; k < 4; ++k)
{
- if (rOtherViewData.HasEditView((ScSplitPos)(k)))
- pThisViewShell->RemoveWindowFromForeignEditView(pOtherViewShell, (ScSplitPos)(k));
+ if (rOtherViewData.HasEditView((ScSplitPos)k))
+ pThisViewShell->RemoveWindowFromForeignEditView(pOtherViewShell, (ScSplitPos)k);
}
};
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index ae0247b2cf24..66af78052f74 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1505,7 +1505,7 @@ void ScViewData::ResetEditView()
{
if (bEditActive[i])
{
- lcl_LOKRemoveWindow(GetViewShell(), (ScSplitPos)(i));
+ lcl_LOKRemoveWindow(GetViewShell(), (ScSplitPos)i);
pEngine = pEditView[i]->GetEditEngine();
pEngine->RemoveView(pEditView[i]);
pEditView[i]->SetOutputArea( tools::Rectangle() );