diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-04 09:37:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-04-04 12:52:15 +0100 |
commit | 0f89d964b272c2087dbc865bc0a60edfdde8551f (patch) | |
tree | 3e3d074d02e93ade639ae0beb143294fe433dc2c /sw/source | |
parent | c4dba436df42cef4f0048994c38dc137266ebaf9 (diff) |
coverity#1403732 Mixing enum types
and
coverity#1403735 Mixing enum types
coverity#1403737 Mixing enum types
Change-Id: I278b7d5116d4157e6aa4483d8eef42325e4bc03b
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/wrap.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/frmdlg/frmmgr.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwbassh.cxx | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index f79265c3f34b..b220f872144b 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -1814,7 +1814,7 @@ void SwFramePage::RangeModifyHdl() SwFlyFrameAttrMgr aMgr( m_bNew, pSh, static_cast<const SwAttrSet&>(GetItemSet()) ); SvxSwFrameValidation aVal; - aVal.nAnchorType = (css::text::TextContentAnchorType)GetAnchor(); + aVal.nAnchorType = GetAnchor(); aVal.bAutoHeight = m_pAutoHeightCB->IsChecked(); aVal.bAutoWidth = m_pAutoWidthCB->IsChecked(); aVal.bMirror = m_pMirrorPagesCB->IsChecked(); @@ -1911,9 +1911,9 @@ void SwFramePage::RangeModifyHdl() if ( aVal.nHPos != nAtHorzPosVal ) m_pAtHorzPosED->SetValue(m_pAtHorzPosED->Normalize(aVal.nHPos), FUNIT_TWIP); - const SwTwips nUpperOffset = (aVal.nAnchorType == css::text::TextContentAnchorType_AS_CHARACTER) + const SwTwips nUpperOffset = (aVal.nAnchorType == RndStdIds::FLY_AS_CHAR) ? m_nUpperBorder : 0; - const SwTwips nLowerOffset = (aVal.nAnchorType == css::text::TextContentAnchorType_AS_CHARACTER) + const SwTwips nLowerOffset = (aVal.nAnchorType == RndStdIds::FLY_AS_CHAR) ? m_nLowerBorder : 0; m_pAtVertPosED->SetMin(m_pAtVertPosED->Normalize(aVal.nMinVPos + nLowerOffset + nUpperOffset), FUNIT_TWIP); @@ -2144,7 +2144,7 @@ void SwFramePage::UpdateExample() long nYPos = static_cast< long >(m_pAtVertPosED->Denormalize(m_pAtVertPosED->GetValue(FUNIT_TWIP))); m_pExampleWN->SetRelPos(Point(nXPos, nYPos)); - m_pExampleWN->SetAnchor( (css::text::TextContentAnchorType)GetAnchor() ); + m_pExampleWN->SetAnchor(GetAnchor()); m_pExampleWN->Invalidate(); } diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index 2f10d4a566e9..5d2cf4a3bdfc 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -422,7 +422,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) const SwFormatHoriOrient& rHori = static_cast<const SwFormatHoriOrient&>(rSet.Get(RES_HORI_ORIENT)); const SwFormatVertOrient& rVert = static_cast<const SwFormatVertOrient&>(rSet.Get(RES_VERT_ORIENT)); - aVal.nAnchorType = static_cast< css::text::TextContentAnchorType >(m_nAnchorId); + aVal.nAnchorType = m_nAnchorId; aVal.bAutoHeight = rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE; aVal.bAutoWidth = rFrameSize.GetWidthSizeType() == ATT_MIN_SIZE; aVal.bMirror = rHori.IsPosToggle(); @@ -461,7 +461,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) nBottom = aVal.nMaxHeight - aVal.nHeight; { - if (aVal.nAnchorType == css::text::TextContentAnchorType_AS_CHARACTER) + if (aVal.nAnchorType == RndStdIds::FLY_AS_CHAR) { nLeft = nRight; diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx index 7d32a309cf82..a710350cae40 100644 --- a/sw/source/uibase/frmdlg/frmmgr.cxx +++ b/sw/source/uibase/frmdlg/frmmgr.cxx @@ -247,7 +247,7 @@ void SwFlyFrameAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal, // OD 18.09.2003 #i18732# - adjustment for allowing vertical position // aligned to page for fly frame anchored to paragraph or to character. - const RndStdIds eAnchorType = static_cast<RndStdIds >(rVal.nAnchorType); + const RndStdIds eAnchorType = rVal.nAnchorType; const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(m_aSet.Get(RES_FRM_SIZE)); m_pOwnSh->CalcBoundRect( aBoundRect, eAnchorType, rVal.nHRelOrient, diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 361d69bf81fa..ee7412daf952 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -772,7 +772,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation&, rValidation, // OD 18.09.2003 #i18732# - adjustment for allowing vertical position // aligned to page for fly frame anchored to paragraph or to character. - const RndStdIds eAnchorType = static_cast<RndStdIds >(rValidation.nAnchorType); + const RndStdIds eAnchorType = rValidation.nAnchorType; const SwPosition* pContentPos = nullptr; SdrView* pSdrView = pSh->GetDrawView(); const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); |