summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/attarray.cxx4
-rw-r--r--sc/source/core/data/column2.cxx10
-rw-r--r--sc/source/core/data/patattr.cxx2
-rw-r--r--sc/source/core/data/table1.cxx2
-rw-r--r--sc/source/core/tool/editutil.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx2
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx2
-rw-r--r--sc/source/ui/sidebar/AlignmentPropertyPanel.cxx4
-rw-r--r--sc/source/ui/view/formatsh.cxx8
-rw-r--r--sc/source/ui/view/gridwin.cxx4
-rw-r--r--sc/source/ui/view/output.cxx6
-rw-r--r--sc/source/ui/view/output2.cxx10
-rw-r--r--sc/source/ui/view/viewdata.cxx4
15 files changed, 32 insertions, 32 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index c3023fed67a2..802c5ee9fa06 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1358,7 +1358,7 @@ bool ScAttrArray::HasAttrib_Impl(const ScPatternAttr* pPattern, HasAttrFlags nMa
bFound = true;
else if (static_cast<const SfxBoolItem&>(pPattern->GetItem( ATTR_LINEBREAK )).GetValue())
bFound = true;
- else if ((SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(pPattern->
+ else if (static_cast<const SvxHorJustifyItem&>(pPattern->
GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SvxCellHorJustify::Block)
bFound = true;
@@ -1382,7 +1382,7 @@ bool ScAttrArray::HasAttrib_Impl(const ScPatternAttr* pPattern, HasAttrFlags nMa
if ( nMask & HasAttrFlags::RightOrCenter )
{
// called only if the sheet is LTR, so physical=logical alignment can be assumed
- SvxCellHorJustify eHorJust = (SvxCellHorJustify)
+ SvxCellHorJustify eHorJust =
static_cast<const SvxHorJustifyItem&>( pPattern->GetItem( ATTR_HOR_JUSTIFY )).GetValue();
if ( eHorJust == SvxCellHorJustify::Right || eHorJust == SvxCellHorJustify::Center )
bFound = true;
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 4f8183938a3c..7e072524c22e 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -144,9 +144,9 @@ long ScColumn::GetNeededSize(
SvxCellHorJustify eHorJust;
if (pCondSet &&
pCondSet->GetItemState(ATTR_HOR_JUSTIFY, true, &pCondItem) == SfxItemState::SET)
- eHorJust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem*>(pCondItem)->GetValue();
+ eHorJust = static_cast<const SvxHorJustifyItem*>(pCondItem)->GetValue();
else
- eHorJust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(
+ eHorJust = static_cast<const SvxHorJustifyItem&>(
pPattern->GetItem( ATTR_HOR_JUSTIFY )).GetValue();
bool bBreak;
if ( eHorJust == SvxCellHorJustify::Block )
@@ -212,9 +212,9 @@ long ScColumn::GetNeededSize(
{
if (pCondSet &&
pCondSet->GetItemState(ATTR_ROTATE_MODE, true, &pCondItem) == SfxItemState::SET)
- eRotMode = (SvxRotateMode)static_cast<const SvxRotateModeItem*>(pCondItem)->GetValue();
+ eRotMode = static_cast<const SvxRotateModeItem*>(pCondItem)->GetValue();
else
- eRotMode = (SvxRotateMode)static_cast<const SvxRotateModeItem&>(
+ eRotMode = static_cast<const SvxRotateModeItem&>(
pPattern->GetItem(ATTR_ROTATE_MODE)).GetValue();
if ( nRotate == 18000 )
@@ -814,7 +814,7 @@ void ScColumn::GetOptimalHeight(
if (bStdAllowed)
{
bool bBreak = static_cast<const SfxBoolItem&>(pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
- ((SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(pPattern->
+ (static_cast<const SvxHorJustifyItem&>(pPattern->
GetItem( ATTR_HOR_JUSTIFY )).GetValue() ==
SvxCellHorJustify::Block);
bStdOnly = !bBreak;
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index e61a217a353a..6b4d207cdf53 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -909,7 +909,7 @@ void ScPatternAttr::FillEditParaItems( SfxItemSet* pEditSet ) const
const SfxItemSet& rMySet = GetItemSet();
- SvxCellHorJustify eHorJust = (SvxCellHorJustify)
+ SvxCellHorJustify eHorJust =
static_cast<const SvxHorJustifyItem&>(rMySet.Get(ATTR_HOR_JUSTIFY)).GetValue();
SvxAdjust eSvxAdjust;
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index ced6c3474f95..876289faa95b 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1922,7 +1922,7 @@ void ScTable::MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, d
const ScPatternAttr* pPattern = GetPattern( rCol, nRow );
const SfxItemSet* pCondSet = pDocument->GetCondResult( rCol, nRow, nTab );
- SvxCellHorJustify eHorJust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(
+ SvxCellHorJustify eHorJust = static_cast<const SvxHorJustifyItem&>(
pPattern->GetItem( ATTR_HOR_JUSTIFY, pCondSet )).GetValue();
if ( eHorJust == SvxCellHorJustify::Center )
nMissing /= 2; // distributed into both directions
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 383d8227468a..5198a270509e 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -317,7 +317,7 @@ tools::Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bF
long nPixDifY;
long nTopMargin = (long) ( pMargin->GetTopMargin() * nPPTY );
- SvxCellVerJustify eJust = (SvxCellVerJustify) static_cast<const SvxVerJustifyItem&>(pPattern->
+ SvxCellVerJustify eJust = static_cast<const SvxVerJustifyItem&>(pPattern->
GetItem(ATTR_VER_JUSTIFY)).GetValue();
// asian vertical is always edited top-aligned
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 52793a927060..017456c90123 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2122,7 +2122,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
mpEditEngine->SetBackgroundColor( aBackCol );
// Adjustment
- eAttrAdjust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(pPattern->
+ eAttrAdjust = static_cast<const SvxHorJustifyItem&>(pPattern->
GetItem(ATTR_HOR_JUSTIFY)).GetValue();
if ( eAttrAdjust == SvxCellHorJustify::Repeat &&
static_cast<const SfxBoolItem&>(pPattern->GetItem(ATTR_LINEBREAK)).GetValue() )
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 19116b128b5e..febaf62ecfa2 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2069,7 +2069,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
if ( bFixedWidth )
{
- SvxCellHorJustify eHorJust = (SvxCellHorJustify)
+ SvxCellHorJustify eHorJust =
static_cast<const SvxHorJustifyItem*>( aDocument.GetAttr( nCol, nRow,
nTab, ATTR_HOR_JUSTIFY ))->GetValue();
lcl_ScDocShell_GetFixedWidthString( aString, aDocument, nTab, nCol,
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 41821ece63ef..1f0253266364 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -1237,7 +1237,7 @@ void ScDrawTextObjectBar::GetStatePropPanelAttr(SfxItemSet &rSet)
//if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState)
if(SfxItemState::DONTCARE != eVState)
{
- SdrTextVertAdjust eTVA = (SdrTextVertAdjust)static_cast<const SdrTextVertAdjustItem&>(aEditAttr.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+ SdrTextVertAdjust eTVA = static_cast<const SdrTextVertAdjustItem&>(aEditAttr.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) ||
(nSlotId == SID_TABLE_VERT_CENTER && eTVA == SDRTEXTVERTADJUST_CENTER) ||
(nSlotId == SID_TABLE_VERT_BOTTOM && eTVA == SDRTEXTVERTADJUST_BOTTOM);
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 70bbc0b33b6e..01d71d232062 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -261,7 +261,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo
// Justification:
eJustification = mbRTL ? SvxCellHorJustify::Right : bJustify ?
- (SvxCellHorJustify) (static_cast<const SvxHorJustifyItem*>(pCurData->GetItem(nFmtIndex, ATTR_HOR_JUSTIFY))->GetValue()) :
+ static_cast<const SvxHorJustifyItem*>(pCurData->GetItem(nFmtIndex, ATTR_HOR_JUSTIFY))->GetValue() :
SvxCellHorJustify::Standard;
if (pCurData->GetIncludeFont())
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 98069a6a7080..da854a62ac10 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -270,7 +270,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
if(eState >= SfxItemState::DEFAULT && pState && dynamic_cast<const SvxHorJustifyItem*>( pState) != nullptr )
{
const SvxHorJustifyItem* pItem = static_cast<const SvxHorJustifyItem*>(pState);
- meHorAlignState = (SvxCellHorJustify)pItem->GetValue();
+ meHorAlignState = pItem->GetValue();
}
if( meHorAlignState == SvxCellHorJustify::Repeat )
@@ -359,7 +359,7 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
if( eState >= SfxItemState::DEFAULT)
{
const SvxRotateModeItem* pItem = static_cast<const SvxRotateModeItem*>(pState);
- SvxRotateMode eMode = (SvxRotateMode)pItem->GetValue();
+ SvxRotateMode eMode = pItem->GetValue();
if(eMode == SVX_ROTATE_MODE_BOTTOM)
{
mpRefEdgeBottom->SetState(true);
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index e845a5798b44..885f0ed1f50a 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1347,14 +1347,14 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq )
case SID_H_ALIGNCELL:
{
- SvxCellHorJustify eJust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem*>(pItem)->GetValue();
+ SvxCellHorJustify eJust = static_cast<const SvxHorJustifyItem*>(pItem)->GetValue();
// #i78476# update alignment of text in cell edit mode
pTabViewShell->UpdateInputHandlerCellAdjust( eJust );
pTabViewShell->ApplyAttr( SvxHorJustifyItem( eJust, ATTR_HOR_JUSTIFY ) );
}
break;
case SID_V_ALIGNCELL:
- pTabViewShell->ApplyAttr( SvxVerJustifyItem( (SvxCellVerJustify)static_cast<const SvxVerJustifyItem*>(pItem)->GetValue(), ATTR_VER_JUSTIFY ) );
+ pTabViewShell->ApplyAttr( SvxVerJustifyItem( static_cast<const SvxVerJustifyItem*>(pItem)->GetValue(), ATTR_VER_JUSTIFY ) );
break;
default:
OSL_FAIL( "ExecuteAlignment: invalid slot" );
@@ -2443,12 +2443,12 @@ void ScFormatShell::GetAlignState( SfxItemSet& rSet )
SvxCellHorJustify eHAlign = SvxCellHorJustify::Standard;
bool bHasHAlign = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY ) != SfxItemState::DONTCARE;
if( bHasHAlign )
- eHAlign = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(rAttrSet.Get( ATTR_HOR_JUSTIFY )).GetValue();
+ eHAlign = static_cast<const SvxHorJustifyItem&>(rAttrSet.Get( ATTR_HOR_JUSTIFY )).GetValue();
SvxCellVerJustify eVAlign = SVX_VER_JUSTIFY_STANDARD;
bool bHasVAlign = rAttrSet.GetItemState( ATTR_VER_JUSTIFY ) != SfxItemState::DONTCARE;
if( bHasVAlign )
- eVAlign = (SvxCellVerJustify)static_cast<const SvxVerJustifyItem&>(rAttrSet.Get( ATTR_VER_JUSTIFY )).GetValue();
+ eVAlign = static_cast<const SvxVerJustifyItem&>(rAttrSet.Get( ATTR_VER_JUSTIFY )).GetValue();
while ( nWhich )
{
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index be4d38060249..b8ce47a144b2 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5078,9 +5078,9 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
return false;
bool bBreak = static_cast<const SfxBoolItem&>(pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
- ((SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(pPattern->
+ (static_cast<const SvxHorJustifyItem&>(pPattern->
GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SvxCellHorJustify::Block);
- SvxCellHorJustify eHorJust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(pPattern->
+ SvxCellHorJustify eHorJust = static_cast<const SvxHorJustifyItem&>(pPattern->
GetItem(ATTR_HOR_JUSTIFY)).GetValue();
// EditEngine
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 94e3f55d7b5c..98f8822a338b 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -656,7 +656,7 @@ void ScOutputData::SetCellRotations()
// add rotation info to Array information
const long nAttrRotate(pPattern->GetRotateVal(pCondSet));
- const SvxRotateMode eRotMode((SvxRotateMode)static_cast<const SvxRotateModeItem&>(pPattern->GetItem(ATTR_ROTATE_MODE, pCondSet)).GetValue());
+ const SvxRotateMode eRotMode(static_cast<const SvxRotateModeItem&>(pPattern->GetItem(ATTR_ROTATE_MODE, pCondSet)).GetValue());
const double fOrient((bLayoutRTL ? -1.0 : 1.0) * nAttrRotate * F_PI18000); // 1/100th degrees -> [0..2PI]
svx::frame::Array& rArray = mrTabInfo.maArray;
@@ -678,7 +678,7 @@ static ScRotateDir lcl_GetRotateDir( const ScDocument* pDoc, SCCOL nCol, SCROW n
long nAttrRotate = pPattern->GetRotateVal( pCondSet );
if ( nAttrRotate )
{
- SvxRotateMode eRotMode = (SvxRotateMode)static_cast<const SvxRotateModeItem&>(
+ SvxRotateMode eRotMode = static_cast<const SvxRotateModeItem&>(
pPattern->GetItem(ATTR_ROTATE_MODE, pCondSet)).GetValue();
if ( eRotMode == SVX_ROTATE_MODE_STANDARD )
@@ -1548,7 +1548,7 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext)
//! LastPattern etc.
long nAttrRotate = pPattern->GetRotateVal( pCondSet );
- SvxRotateMode eRotMode = (SvxRotateMode)static_cast<const SvxRotateModeItem&>(
+ SvxRotateMode eRotMode = static_cast<const SvxRotateModeItem&>(
pPattern->GetItem(ATTR_ROTATE_MODE, pCondSet)).GetValue();
if (nAttrRotate)
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index a4aab11ba9bf..b324d40f872f 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -323,9 +323,9 @@ void ScDrawStringsVars::SetPattern(
// alignment
- eAttrHorJust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(pPattern->GetItem( ATTR_HOR_JUSTIFY, pCondSet )).GetValue();
+ eAttrHorJust = static_cast<const SvxHorJustifyItem&>(pPattern->GetItem( ATTR_HOR_JUSTIFY, pCondSet )).GetValue();
- eAttrVerJust = (SvxCellVerJustify)static_cast<const SvxVerJustifyItem&>(pPattern->GetItem( ATTR_VER_JUSTIFY, pCondSet )).GetValue();
+ eAttrVerJust = static_cast<const SvxVerJustifyItem&>(pPattern->GetItem( ATTR_VER_JUSTIFY, pCondSet )).GetValue();
if ( eAttrVerJust == SVX_VER_JUSTIFY_STANDARD )
eAttrVerJust = SVX_VER_JUSTIFY_BOTTOM;
@@ -4721,7 +4721,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
long nCellWidth = (long) pRowInfo[0].pCellInfo[nX+1].nWidth;
- SvxCellHorJustify eHorJust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(
+ SvxCellHorJustify eHorJust = static_cast<const SvxHorJustifyItem&>(
pPattern->GetItem(ATTR_HOR_JUSTIFY, pCondSet)).GetValue();
bool bBreak = ( eHorJust == SvxCellHorJustify::Block ) ||
static_cast<const SfxBoolItem&>(pPattern->GetItem(ATTR_LINEBREAK, pCondSet)).GetValue();
@@ -4769,7 +4769,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
nOutHeight += (long) mpDoc->GetScaledRowHeight( nY+1, nY+nCountY-1, nTab, mnPPTY);
}
- SvxCellVerJustify eVerJust = (SvxCellVerJustify)static_cast<const SvxVerJustifyItem&>(
+ SvxCellVerJustify eVerJust = static_cast<const SvxVerJustifyItem&>(
pPattern->GetItem(ATTR_VER_JUSTIFY, pCondSet)).GetValue();
// syntax mode is ignored here...
@@ -4848,7 +4848,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
GetItem(ATTR_ROTATE_VALUE, pCondSet)).GetValue();
if ( nAttrRotate )
{
- eRotMode = (SvxRotateMode)static_cast<const SvxRotateModeItem&>(
+ eRotMode = static_cast<const SvxRotateModeItem&>(
pPattern->GetItem(ATTR_ROTATE_MODE, pCondSet)).GetValue();
if ( nAttrRotate == 18000 )
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 2f3a8f19e052..d978ef826292 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1050,7 +1050,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
bEditActive[eWhich] = true;
const ScPatternAttr* pPattern = pDoc->GetPattern( nNewX, nNewY, nTabNo );
- SvxCellHorJustify eJust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(
+ SvxCellHorJustify eJust = static_cast<const SvxHorJustifyItem&>(
pPattern->GetItem( ATTR_HOR_JUSTIFY )).GetValue();
bool bBreak = ( eJust == SvxCellHorJustify::Block ) ||
@@ -1256,7 +1256,7 @@ void ScViewData::EditGrowX()
// get bGrow... variables the same way as in SetEditEngine
const ScPatternAttr* pPattern = pLocalDoc->GetPattern( nEditCol, nEditRow, nTabNo );
- SvxCellHorJustify eJust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(
+ SvxCellHorJustify eJust = static_cast<const SvxHorJustifyItem&>(
pPattern->GetItem( ATTR_HOR_JUSTIFY )).GetValue();
bool bGrowCentered = ( eJust == SvxCellHorJustify::Center );
bool bGrowToLeft = ( eJust == SvxCellHorJustify::Right ); // visual left