diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/grfpage.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/labdlg.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 12 | ||||
-rw-r--r-- | cui/source/tabpages/page.cxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/paragrph.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tabstpge.cxx | 8 | ||||
-rw-r--r-- | cui/source/tabpages/tpline.cxx | 10 | ||||
-rw-r--r-- | cui/source/tabpages/transfrm.cxx | 2 |
9 files changed, 25 insertions, 25 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index cc5f57191b4e..f4edebab4286 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -2879,13 +2879,13 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) { const SvxKerningItem& rItem = static_cast<const SvxKerningItem&>(rSet->Get( nWhich )); MapUnit eUnit = rSet->GetPool()->GetMetric( nWhich ); - MapUnit eOrgUnit = (MapUnit)eUnit; + MapUnit eOrgUnit = eUnit; MapUnit ePntUnit( MapUnit::MapPoint ); long nBig = static_cast<long>(m_pKerningMF->Normalize( static_cast<long>(rItem.GetValue()) )); long nKerning = LogicToLogic( nBig, eOrgUnit, ePntUnit ); // set Kerning at the Font, convert into Twips before - long nKern = LogicToLogic( rItem.GetValue(), (MapUnit)eUnit, MapUnit::MapTwip ); + long nKern = LogicToLogic( rItem.GetValue(), eUnit, MapUnit::MapTwip ); rFont.SetFixKerning( (short)nKern ); rCJKFont.SetFixKerning( (short)nKern ); rCTLFont.SetFixKerning( (short)nKern ); @@ -3054,7 +3054,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) MapUnit eUnit = rSet->GetPool()->GetMetric( nWhich ); long nTmp = static_cast<long>(m_pKerningMF->GetValue()); - long nVal = LogicToLogic( nTmp, MapUnit::MapPoint, (MapUnit)eUnit ); + long nVal = LogicToLogic( nTmp, MapUnit::MapPoint, eUnit ); nKerning = (short)m_pKerningMF->Denormalize( nVal ); SfxItemState eOldKernState = rOldSet.GetItemState( nWhich, false ); diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index beef6ec36b7e..003649c09684 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -218,7 +218,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet *rSet ) aPageSize = OutputDevice::LogicToLogic( Size( CM_1_TO_TWIP, CM_1_TO_TWIP ), MapMode( MapUnit::MapTwip ), - MapMode( (MapUnit)rSet->GetPool()->GetMetric( nW ) ) ); + MapMode( rSet->GetPool()->GetMetric( nW ) ) ); } bool bFound = false; diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index e255e9cec723..40aa0bbb3cc9 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -174,7 +174,7 @@ bool SvxCaptionTabPage::FillItemSet( SfxItemSet* _rOutAttrs) nCaptionType = (SdrCaptionType) (m_pCT_CAPTTYPE->GetSelectItemId()-1); - _rOutAttrs->Put( SdrCaptionTypeItem( (SdrCaptionType) nCaptionType ) ); + _rOutAttrs->Put( SdrCaptionTypeItem( nCaptionType ) ); if( m_pMF_ABSTAND->IsValueModified() ) { diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index edd9a15056b4..063e265ca04f 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -965,7 +965,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, NumSelectHdl_Impl, ValueSet*, void) { Size aSize = SvxNumberFormat::GetGraphicSizeMM100(&aGraphic); sal_Int16 eOrient = text::VertOrientation::LINE_CENTER; - aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, (MapUnit)eCoreUnit); + aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, eCoreUnit); SvxBrushItem aBrush(aGraphic, GPOS_AREA, SID_ATTR_BRUSH ); aFmt.SetGraphicBrush( &aBrush, &aSize, &eOrient ); } @@ -1984,7 +1984,7 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton, void ) } if(bSucc) { - aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, (MapUnit)eCoreUnit); + aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, eCoreUnit); sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) @@ -2142,9 +2142,9 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, Edit&, rField, void) long nWidthVal = static_cast<long>(m_pWidthMF->Denormalize(m_pWidthMF->GetValue(FUNIT_100TH_MM))); long nHeightVal = static_cast<long>(m_pHeightMF->Denormalize(m_pHeightMF->GetValue(FUNIT_100TH_MM))); nWidthVal = OutputDevice::LogicToLogic( nWidthVal , - MapUnit::Map100thMM, (MapUnit)eCoreUnit ); + MapUnit::Map100thMM, eCoreUnit ); nHeightVal = OutputDevice::LogicToLogic( nHeightVal, - MapUnit::Map100thMM, (MapUnit)eCoreUnit); + MapUnit::Map100thMM, eCoreUnit); double fSizeRatio; bool bRepaint = false; @@ -2172,7 +2172,7 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, Edit&, rField, void) { aSize.Height() = aInitSize[i].Height() + (long)((double)nDelta / fSizeRatio); m_pHeightMF->SetUserValue(m_pHeightMF->Normalize( - OutputDevice::LogicToLogic( aSize.Height(), (MapUnit)eCoreUnit, MapUnit::Map100thMM )), + OutputDevice::LogicToLogic( aSize.Height(), eCoreUnit, MapUnit::Map100thMM )), FUNIT_100TH_MM); } } @@ -2184,7 +2184,7 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, Edit&, rField, void) { aSize.Width() = aInitSize[i].Width() + (long)((double)nDelta * fSizeRatio); m_pWidthMF->SetUserValue(m_pWidthMF->Normalize( - OutputDevice::LogicToLogic( aSize.Width(), (MapUnit)eCoreUnit, MapUnit::Map100thMM )), + OutputDevice::LogicToLogic( aSize.Width(), eCoreUnit, MapUnit::Map100thMM )), FUNIT_100TH_MM); } } diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index dab4e0a9064f..97534fc5ab6a 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -510,7 +510,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet ) m_pBspWin->SetSize( Size( ConvertLong_Impl( aPaperSize.Width(), eUnit ), ConvertLong_Impl( aPaperSize.Height(), eUnit ) ) ); - aPaperSize = OutputDevice::LogicToLogic(aPaperSize, (MapUnit)eUnit, MapUnit::Map100thMM); + aPaperSize = OutputDevice::LogicToLogic(aPaperSize, eUnit, MapUnit::Map100thMM); if ( bLandscape ) Swap( aPaperSize ); @@ -749,7 +749,7 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet ) { if ( nOld != nPos || m_pLandscapeBtn->IsValueChangedFromSaved() ) { - Size aSize( SvxPaperInfo::GetPaperSize( ePaper, (MapUnit)eUnit ) ); + Size aSize( SvxPaperInfo::GetPaperSize( ePaper, eUnit ) ); if ( bChecked ) Swap( aSize ); @@ -997,7 +997,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperSizeModify_Impl, Edit&, void) MapUnit eUnit = GetItemSet().GetPool()->GetMetric( nWhich ); Size aSize( GetCoreValue( *m_pPaperWidthEdit, eUnit ), GetCoreValue( *m_pPaperHeightEdit, eUnit ) ); - Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, (MapUnit)eUnit, true ); + Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, eUnit, true ); m_pPaperSizeBox->SetSelection( ePaper ); UpdateExample_Impl( true ); diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index c2622a09783d..812b5851982b 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -362,7 +362,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) if ( bNullTab ) { - MapUnit eUnit = (MapUnit)pPool->GetMetric( GetWhich( SID_ATTR_TABSTOP ) ); + MapUnit eUnit = pPool->GetMetric( GetWhich( SID_ATTR_TABSTOP ) ); if ( MapUnit::Map100thMM != eUnit ) { diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index 239406398e9f..6b7842618acf 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -221,7 +221,7 @@ bool SvxTabulatorTabPage::FillItemSet(SfxItemSet* rSet) FillUpWithDefTabs_Impl(nDefDist, aNewTabs); SfxItemPool* pPool = rSet->GetPool(); - MapUnit eUnit = (MapUnit)pPool->GetMetric(GetWhich(SID_ATTR_TABSTOP)); + MapUnit eUnit = pPool->GetMetric(GetWhich(SID_ATTR_TABSTOP)); const SfxPoolItem* pOld = GetOldItem(*rSet, SID_ATTR_TABSTOP); if (MapUnit::Map100thMM != eUnit) @@ -271,7 +271,7 @@ VclPtr<SfxTabPage> SvxTabulatorTabPage::Create(vcl::Window* pParent, const SfxIt void SvxTabulatorTabPage::Reset(const SfxItemSet* rSet) { SfxItemPool* pPool = rSet->GetPool(); - MapUnit eUnit = (MapUnit)pPool->GetMetric(GetWhich(SID_ATTR_TABSTOP)); + MapUnit eUnit = pPool->GetMetric(GetWhich(SID_ATTR_TABSTOP)); // Current tabs const SfxPoolItem* pItem = GetItem(*rSet, SID_ATTR_TABSTOP); @@ -372,7 +372,7 @@ void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos ) if (GetItemSet().GetItemState(SID_ATTR_TABSTOP_OFFSET, true, &pItem) == SfxItemState::SET) { nOffset = static_cast<const SfxInt32Item*>(pItem)->GetValue(); - MapUnit eUnit = (MapUnit)GetItemSet().GetPool()->GetMetric(GetWhich(SID_ATTR_TABSTOP)); + MapUnit eUnit = GetItemSet().GetPool()->GetMetric(GetWhich(SID_ATTR_TABSTOP)); nOffset = OutputDevice::LogicToLogic(nOffset, eUnit, MapUnit::Map100thMM); } @@ -478,7 +478,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn, void ) SfxItemState::SET ) { nOffset = static_cast<const SfxInt32Item*>(pItem)->GetValue(); - MapUnit eUnit = (MapUnit)GetItemSet().GetPool()->GetMetric( GetWhich( SID_ATTR_TABSTOP ) ); + MapUnit eUnit = GetItemSet().GetPool()->GetMetric( GetWhich( SID_ATTR_TABSTOP ) ); nOffset = OutputDevice::LogicToLogic( nOffset, eUnit, MapUnit::Map100thMM ); } const long nReal = nVal - nOffset; diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index c42b9f3302a1..d01c4aa03f36 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -484,7 +484,7 @@ void SvxLineTabPage::SymbolSelected(MenuButton* pButton) if(pGraphic) { Size aSize = SvxNumberFormat::GetGraphicSizeMM100(pGraphic); - aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, (MapUnit)m_ePoolUnit); + aSize = OutputDevice::LogicToLogic(aSize, MapUnit::Map100thMM, m_ePoolUnit); m_aSymbolGraphic=*pGraphic; if( bResetSize ) { @@ -1704,8 +1704,8 @@ IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, Edit&, rField, void) bool bRatio = m_pSymbolRatioCB->IsChecked(); long nWidthVal = static_cast<long>(m_pSymbolWidthMF->Denormalize(m_pSymbolWidthMF->GetValue(FUNIT_100TH_MM))); long nHeightVal= static_cast<long>(m_pSymbolHeightMF->Denormalize(m_pSymbolHeightMF->GetValue(FUNIT_100TH_MM))); - nWidthVal = OutputDevice::LogicToLogic(nWidthVal,MapUnit::Map100thMM,(MapUnit)m_ePoolUnit ); - nHeightVal = OutputDevice::LogicToLogic(nHeightVal,MapUnit::Map100thMM,(MapUnit)m_ePoolUnit); + nWidthVal = OutputDevice::LogicToLogic(nWidthVal,MapUnit::Map100thMM, m_ePoolUnit ); + nHeightVal = OutputDevice::LogicToLogic(nHeightVal,MapUnit::Map100thMM, m_ePoolUnit); m_aSymbolSize = Size(nWidthVal,nHeightVal); double fSizeRatio = (double)1; @@ -1724,7 +1724,7 @@ IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, Edit&, rField, void) if (bRatio) { m_aSymbolSize.Height() = m_aSymbolLastSize.Height() + (long)((double)nDelta / fSizeRatio); - m_aSymbolSize.Height() = OutputDevice::LogicToLogic( m_aSymbolSize.Height(),(MapUnit)m_ePoolUnit, MapUnit::Map100thMM ); + m_aSymbolSize.Height() = OutputDevice::LogicToLogic( m_aSymbolSize.Height(), m_ePoolUnit, MapUnit::Map100thMM ); m_pSymbolHeightMF->SetUserValue(m_pSymbolHeightMF->Normalize(m_aSymbolSize.Height()), FUNIT_100TH_MM); } } @@ -1735,7 +1735,7 @@ IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, Edit&, rField, void) if (bRatio) { m_aSymbolSize.Width() = m_aSymbolLastSize.Width() + (long)((double)nDelta * fSizeRatio); - m_aSymbolSize.Width() = OutputDevice::LogicToLogic( m_aSymbolSize.Width(), (MapUnit)m_ePoolUnit, MapUnit::Map100thMM ); + m_aSymbolSize.Width() = OutputDevice::LogicToLogic( m_aSymbolSize.Width(), m_ePoolUnit, MapUnit::Map100thMM ); m_pSymbolWidthMF->SetUserValue(m_pSymbolWidthMF->Normalize(m_aSymbolSize.Width()), FUNIT_100TH_MM); } } diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 3e791e23b18c..d8916301c142 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -253,7 +253,7 @@ void SvxAngleTabPage::Construct() // take UI units into account sal_uInt16 nDigits(m_pMtrPosX->GetDecimalDigits()); - TransfrmHelper::ConvertRect(maRange, nDigits, (MapUnit)ePoolUnit, eDlgUnit); + TransfrmHelper::ConvertRect(maRange, nDigits, ePoolUnit, eDlgUnit); if(!pView->IsRotateAllowed()) { |