diff options
Diffstat (limited to 'sd/source/ui/dlg')
-rw-r--r-- | sd/source/ui/dlg/BulletAndPositionDlg.cxx | 36 | ||||
-rw-r--r-- | sd/source/ui/dlg/animobjs.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/dlg/copydlg.cxx | 46 | ||||
-rw-r--r-- | sd/source/ui/dlg/custsdlg.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgsnap.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/headerfooterdlg.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/navigatr.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/present.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/sdpreslt.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/tpoption.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/vectdlg.cxx | 42 |
11 files changed, 79 insertions, 79 deletions
diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx b/sd/source/ui/dlg/BulletAndPositionDlg.cxx index 45e2a1dffc41..b3208cf827f0 100644 --- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx +++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx @@ -566,18 +566,18 @@ void SvxBulletAndPositionDlg::InitControls() if (bSameDistBorderNum) { - long nDistBorderNum; + tools::Long nDistBorderNum; if (bRelative) { - nDistBorderNum = static_cast<long>(aNumFmtArr[nLvl]->GetAbsLSpace()) + nDistBorderNum = static_cast<tools::Long>(aNumFmtArr[nLvl]->GetAbsLSpace()) + aNumFmtArr[nLvl]->GetFirstLineOffset(); if (nLvl) - nDistBorderNum -= static_cast<long>(aNumFmtArr[nLvl - 1]->GetAbsLSpace()) + nDistBorderNum -= static_cast<tools::Long>(aNumFmtArr[nLvl - 1]->GetAbsLSpace()) + aNumFmtArr[nLvl - 1]->GetFirstLineOffset(); } else { - nDistBorderNum = static_cast<long>(aNumFmtArr[nLvl]->GetAbsLSpace()) + nDistBorderNum = static_cast<tools::Long>(aNumFmtArr[nLvl]->GetAbsLSpace()) + aNumFmtArr[nLvl]->GetFirstLineOffset(); } SetMetricValue(*m_xDistBorderMF, nDistBorderNum, eCoreUnit); @@ -976,10 +976,10 @@ IMPL_LINK(SvxBulletAndPositionDlg, SizeHdl_Impl, weld::MetricSpinButton&, rField bool bWidth = &rField == m_xWidthMF.get(); bLastWidthModified = bWidth; bool bRatio = m_xRatioCB->get_active(); - long nWidthVal - = static_cast<long>(m_xWidthMF->denormalize(m_xWidthMF->get_value(FieldUnit::MM_100TH))); - long nHeightVal - = static_cast<long>(m_xHeightMF->denormalize(m_xHeightMF->get_value(FieldUnit::MM_100TH))); + tools::Long nWidthVal = static_cast<tools::Long>( + m_xWidthMF->denormalize(m_xWidthMF->get_value(FieldUnit::MM_100TH))); + tools::Long nHeightVal = static_cast<tools::Long>( + m_xHeightMF->denormalize(m_xHeightMF->get_value(FieldUnit::MM_100TH))); nWidthVal = OutputDevice::LogicToLogic(nWidthVal, MapUnit::Map100thMM, eCoreUnit); nHeightVal = OutputDevice::LogicToLogic(nHeightVal, MapUnit::Map100thMM, eCoreUnit); double fSizeRatio; @@ -1004,13 +1004,13 @@ IMPL_LINK(SvxBulletAndPositionDlg, SizeHdl_Impl, weld::MetricSpinButton&, rField if (bWidth) { - long nDelta = nWidthVal - aInitSize[i].Width(); + tools::Long nDelta = nWidthVal - aInitSize[i].Width(); aSize.setWidth(nWidthVal); if (bRatio) { aSize.setHeight( aInitSize[i].Height() - + static_cast<long>(static_cast<double>(nDelta) / fSizeRatio)); + + static_cast<tools::Long>(static_cast<double>(nDelta) / fSizeRatio)); m_xHeightMF->set_value(m_xHeightMF->normalize(OutputDevice::LogicToLogic( aSize.Height(), eCoreUnit, MapUnit::Map100thMM)), FieldUnit::MM_100TH); @@ -1018,13 +1018,13 @@ IMPL_LINK(SvxBulletAndPositionDlg, SizeHdl_Impl, weld::MetricSpinButton&, rField } else { - long nDelta = nHeightVal - aInitSize[i].Height(); + tools::Long nDelta = nHeightVal - aInitSize[i].Height(); aSize.setHeight(nHeightVal); if (bRatio) { aSize.setWidth( aInitSize[i].Width() - + static_cast<long>(static_cast<double>(nDelta) * fSizeRatio)); + + static_cast<tools::Long>(static_cast<double>(nDelta) * fSizeRatio)); m_xWidthMF->set_value(m_xWidthMF->normalize(OutputDevice::LogicToLogic( aSize.Width(), eCoreUnit, MapUnit::Map100thMM)), FieldUnit::MM_100TH); @@ -1128,7 +1128,7 @@ IMPL_LINK(SvxBulletAndPositionDlg, DistanceHdl_Impl, weld::MetricSpinButton&, rF { if (bInInitControl) return; - long nValue = GetCoreValue(rFld, eCoreUnit); + tools::Long nValue = GetCoreValue(rFld, eCoreUnit); sal_uInt16 nMask = 1; for (sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { @@ -1146,9 +1146,9 @@ IMPL_LINK(SvxBulletAndPositionDlg, DistanceHdl_Impl, weld::MetricSpinButton&, rF } else { - long nTmp = pActNum->GetLevel(i - 1).GetAbsLSpace() - + pActNum->GetLevel(i - 1).GetFirstLineOffset() - - pActNum->GetLevel(i).GetFirstLineOffset(); + tools::Long nTmp = pActNum->GetLevel(i - 1).GetAbsLSpace() + + pActNum->GetLevel(i - 1).GetFirstLineOffset() + - pActNum->GetLevel(i).GetFirstLineOffset(); aNumFmt.SetAbsLSpace(nValue + nTmp); } @@ -1161,7 +1161,7 @@ IMPL_LINK(SvxBulletAndPositionDlg, DistanceHdl_Impl, weld::MetricSpinButton&, rF else if (&rFld == m_xIndentMF.get()) { // together with the FirstLineOffset the AbsLSpace must be changed, too - long nDiff = nValue + aNumFmt.GetFirstLineOffset(); + tools::Long nDiff = nValue + aNumFmt.GetFirstLineOffset(); auto const nAbsLSpace = aNumFmt.GetAbsLSpace(); aNumFmt.SetAbsLSpace(nAbsLSpace + nDiff); aNumFmt.SetFirstLineOffset(-nValue); @@ -1188,7 +1188,7 @@ IMPL_LINK(SvxBulletAndPositionDlg, RelativeHdl_Impl, weld::ToggleButton&, rBox, bool bOn = rBox.get_active(); bool bSingleSelection = m_xLevelLB->count_selected_rows() == 1 && SAL_MAX_UINT16 != nActNumLvl; bool bSetValue = false; - long nValue = 0; + tools::Long nValue = 0; if (bOn || bSingleSelection) { sal_uInt16 nMask = 1; diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 4f2cf6d8dce4..e900ffb45e88 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -90,8 +90,8 @@ void SdDisplay::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectang Size aSize = GetOutputSizePixel(); Size aBmpSize = aBitmapEx.GetBitmap().GetSizePixel(); - aBmpSize.setWidth( static_cast<long>( static_cast<double>(aBmpSize.Width()) * static_cast<double>(aScale) ) ); - aBmpSize.setHeight( static_cast<long>( static_cast<double>(aBmpSize.Height()) * static_cast<double>(aScale) ) ); + aBmpSize.setWidth( static_cast<::tools::Long>( static_cast<double>(aBmpSize.Width()) * static_cast<double>(aScale) ) ); + aBmpSize.setHeight( static_cast<::tools::Long>( static_cast<double>(aBmpSize.Height()) * static_cast<double>(aScale) ) ); if( aBmpSize.Width() < aSize.Width() ) aPt.setX( ( aSize.Width() - aBmpSize.Width() ) / 2 ); @@ -256,7 +256,7 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, weld::Button&, rButton, void ) // calculate overall time ::tools::Time aTime( 0 ); - long nFullTime; + ::tools::Long nFullTime; if( m_xRbtBitmap->get_active() ) { for (size_t i = 0; i < nCount; ++i) @@ -738,7 +738,7 @@ void AnimationWindow::AddObj (::sd::View& rView ) m_xLbLoopCount->set_active_text(OUString::number( nLoopCount ) ); } - long nTime = rAnimationBitmap.mnWait; + ::tools::Long nTime = rAnimationBitmap.mnWait; ::tools::Time aTime( 0, 0, nTime / 100, nTime % 100 ); size_t nIndex = m_nCurrentFrame + 1; m_FrameList.insert( @@ -908,7 +908,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView ) for (size_t i = 0; i < nCount; ++i) { ::tools::Time const & rTime = m_FrameList[i].second; - long nTime = rTime.GetNanoSec(); + ::tools::Long nTime = rTime.GetNanoSec(); nTime += rTime.GetSec() * 100; BitmapEx const & rBitmapEx = m_FrameList[i].first; diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx index 08d6dac24aef..398f9e4ee567 100644 --- a/sd/source/ui/dlg/copydlg.cxx +++ b/sd/source/ui/dlg/copydlg.cxx @@ -94,10 +94,10 @@ void CopyDlg::Reset() // tdf#125011 draw/impress sizes are in mm_100th already, "normalize" to // decimal shift by number of decimal places the widgets are using (2) then // scale by the ui scaling factor - auto nPageWidth = long(m_xMtrFldMoveX->normalize(aPageSize.Width()) / maUIScale); - auto nPageHeight = long(m_xMtrFldMoveX->normalize(aPageSize.Height()) / maUIScale); - auto nRectWidth = long(m_xMtrFldMoveX->normalize(aRect.GetWidth()) / maUIScale); - auto nRectHeight = long(m_xMtrFldMoveX->normalize(aRect.GetHeight()) / maUIScale); + auto nPageWidth = tools::Long(m_xMtrFldMoveX->normalize(aPageSize.Width()) / maUIScale); + auto nPageHeight = tools::Long(m_xMtrFldMoveX->normalize(aPageSize.Height()) / maUIScale); + auto nRectWidth = tools::Long(m_xMtrFldMoveX->normalize(aRect.GetWidth()) / maUIScale); + auto nRectHeight = tools::Long(m_xMtrFldMoveX->normalize(aRect.GetHeight()) / maUIScale); m_xMtrFldMoveX->set_range(-nPageWidth, nPageWidth, FieldUnit::MM_100TH); m_xMtrFldMoveY->set_range(-nPageHeight, nPageHeight, FieldUnit::MM_100TH); @@ -120,30 +120,30 @@ void CopyDlg::Reset() else m_xNumFldCopies->set_value(1); - long nMoveX = 500; + tools::Long nMoveX = 500; if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) nMoveX = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue(); - SetMetricValue( *m_xMtrFldMoveX, long(nMoveX / maUIScale), MapUnit::Map100thMM); + SetMetricValue( *m_xMtrFldMoveX, tools::Long(nMoveX / maUIScale), MapUnit::Map100thMM); - long nMoveY = 500; + tools::Long nMoveY = 500; if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) nMoveY = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue(); - SetMetricValue( *m_xMtrFldMoveY, long(nMoveY / maUIScale), MapUnit::Map100thMM); + SetMetricValue( *m_xMtrFldMoveY, tools::Long(nMoveY / maUIScale), MapUnit::Map100thMM); if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) ) m_xMtrFldAngle->set_value(static_cast<const SfxInt32Item*>( pPoolItem )->GetValue(), FieldUnit::NONE); else m_xMtrFldAngle->set_value(0, FieldUnit::NONE); - long nWidth = 0; + tools::Long nWidth = 0; if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) nWidth = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue(); - SetMetricValue( *m_xMtrFldWidth, long(nWidth / maUIScale), MapUnit::Map100thMM); + SetMetricValue( *m_xMtrFldWidth, tools::Long(nWidth / maUIScale), MapUnit::Map100thMM); - long nHeight = 0; + tools::Long nHeight = 0; if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) nHeight = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue(); - SetMetricValue( *m_xMtrFldHeight, long(nHeight / maUIScale), MapUnit::Map100thMM); + SetMetricValue( *m_xMtrFldHeight, tools::Long(nHeight / maUIScale), MapUnit::Map100thMM); if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) ) { @@ -179,10 +179,10 @@ void CopyDlg::Reset() */ void CopyDlg::GetAttr( SfxItemSet& rOutAttrs ) { - long nMoveX = long( GetCoreValue( *m_xMtrFldMoveX, MapUnit::Map100thMM) * maUIScale); - long nMoveY = long( GetCoreValue( *m_xMtrFldMoveY, MapUnit::Map100thMM) * maUIScale); - long nHeight = long( GetCoreValue( *m_xMtrFldHeight, MapUnit::Map100thMM) * maUIScale); - long nWidth = long( GetCoreValue( *m_xMtrFldWidth, MapUnit::Map100thMM) * maUIScale); + tools::Long nMoveX = tools::Long( GetCoreValue( *m_xMtrFldMoveX, MapUnit::Map100thMM) * maUIScale); + tools::Long nMoveY = tools::Long( GetCoreValue( *m_xMtrFldMoveY, MapUnit::Map100thMM) * maUIScale); + tools::Long nHeight = tools::Long( GetCoreValue( *m_xMtrFldHeight, MapUnit::Map100thMM) * maUIScale); + tools::Long nWidth = tools::Long( GetCoreValue( *m_xMtrFldWidth, MapUnit::Map100thMM) * maUIScale); rOutAttrs.Put( SfxUInt16Item( ATTR_COPY_NUMBER, static_cast<sal_uInt16>(m_xNumFldCopies->get_value()) ) ); rOutAttrs.Put( SfxInt32Item( ATTR_COPY_MOVE_X, nMoveX ) ); @@ -219,9 +219,9 @@ IMPL_LINK_NOARG(CopyDlg, SetViewData, weld::Button&, void) { ::tools::Rectangle aRect = mpView->GetAllMarkedRect(); - SetMetricValue( *m_xMtrFldMoveX, long( aRect.GetWidth() / + SetMetricValue( *m_xMtrFldMoveX, tools::Long( aRect.GetWidth() / maUIScale ), MapUnit::Map100thMM); - SetMetricValue( *m_xMtrFldMoveY, long( aRect.GetHeight() / + SetMetricValue( *m_xMtrFldMoveY, tools::Long( aRect.GetHeight() / maUIScale ), MapUnit::Map100thMM); // sets color attribute @@ -240,14 +240,14 @@ IMPL_LINK_NOARG(CopyDlg, SetDefault, weld::Button&, void) { m_xNumFldCopies->set_value(1); - long nValue = 500; - SetMetricValue( *m_xMtrFldMoveX, long(nValue / maUIScale), MapUnit::Map100thMM); - SetMetricValue( *m_xMtrFldMoveY, long(nValue / maUIScale), MapUnit::Map100thMM); + tools::Long nValue = 500; + SetMetricValue( *m_xMtrFldMoveX, tools::Long(nValue / maUIScale), MapUnit::Map100thMM); + SetMetricValue( *m_xMtrFldMoveY, tools::Long(nValue / maUIScale), MapUnit::Map100thMM); nValue = 0; m_xMtrFldAngle->set_value(nValue, FieldUnit::DEGREE); - SetMetricValue( *m_xMtrFldWidth, long(nValue / maUIScale), MapUnit::Map100thMM); - SetMetricValue( *m_xMtrFldHeight, long(nValue / maUIScale), MapUnit::Map100thMM); + SetMetricValue( *m_xMtrFldWidth, tools::Long(nValue / maUIScale), MapUnit::Map100thMM); + SetMetricValue( *m_xMtrFldHeight, tools::Long(nValue / maUIScale), MapUnit::Map100thMM); // set color attribute const SfxPoolItem* pPoolItem = nullptr; diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index dfb07394b904..c18e8c117e61 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -64,7 +64,7 @@ SdCustomShowDlg::SdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc pCustomShowList = rDoc.GetCustomShowList(); if( pCustomShowList ) { - long nPosToSelect = pCustomShowList->GetCurPos(); + tools::Long nPosToSelect = pCustomShowList->GetCurPos(); // fill ListBox with CustomShows for( SdCustomShow* pCustomShow = pCustomShowList->First(); pCustomShow != nullptr; @@ -287,7 +287,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg(weld::Window* pWindow, SdDrawDocume m_xLbCustomPages->set_size_request(m_xLbPages->get_approximate_digit_width() * 24, m_xLbCustomPages->get_height_rows(10)); // fill Listbox with page names of Docs - for( long nPage = 0; + for( tools::Long nPage = 0; nPage < rDoc.GetSdPageCount( PageKind::Standard ); nPage++ ) { @@ -464,7 +464,7 @@ IMPL_LINK_NOARG(SdDefineCustomShowDlg, OKHdl, weld::Button&, void) OUString aName( m_xEdtName->get_text() ); SdCustomShow* pCustomShow; - long nPosToSelect = pCustomShowList->GetCurPos(); + tools::Long nPosToSelect = pCustomShowList->GetCurPos(); for( pCustomShow = pCustomShowList->First(); pCustomShow != nullptr; pCustomShow = pCustomShowList->Next() ) diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx index e2db2e8cbc59..f7d8e2ef79c3 100644 --- a/sd/source/ui/dlg/dlgsnap.cxx +++ b/sd/source/ui/dlg/dlgsnap.cxx @@ -74,7 +74,7 @@ SdSnapLineDlg::SdSnapLineDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, // determine max and min values depending on // WorkArea, PoolUnit and FieldUnit: - auto const map = [ePoolUnit](std::unique_ptr<weld::MetricSpinButton> const & msb, long value) { + auto const map = [ePoolUnit](std::unique_ptr<weld::MetricSpinButton> const & msb, tools::Long value) { auto const n1 = OutputDevice::LogicToLogic(value, ePoolUnit, MapUnit::Map100thMM); auto const n2 = msb->normalize(n1); auto const n3 = msb->convert_value_from(n2, FieldUnit::MM_100TH); diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index 5b674925163a..ecd69fc1ca35 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -706,12 +706,12 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools: if( maPageSize.Width() > maPageSize.Height() ) { nWidth = maOutRect.GetWidth(); - nHeight = maPageSize.Width() == 0 ? 0 : long( static_cast<double>(nWidth * maPageSize.Height()) / static_cast<double>(maPageSize.Width()) ); + nHeight = maPageSize.Width() == 0 ? 0 : tools::Long( static_cast<double>(nWidth * maPageSize.Height()) / static_cast<double>(maPageSize.Width()) ); } else { nHeight = maOutRect.GetHeight(); - nWidth = maPageSize.Height() == 0 ? 0 : long( static_cast<double>(nHeight * maPageSize.Width()) / static_cast<double>(maPageSize.Height()) ); + nWidth = maPageSize.Height() == 0 ? 0 : tools::Long( static_cast<double>(nHeight * maPageSize.Width()) / static_cast<double>(maPageSize.Height()) ); } maOutRect.AdjustLeft((maOutRect.GetWidth() - nWidth) >> 1 ); diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index d3d2e95ca4e0..6f431d713307 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -311,7 +311,7 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, weld::TreeView&, bool) IMPL_LINK_NOARG(SdNavigatorWin, SelectDocumentHdl, weld::ComboBox&, void) { OUString aStrLb = mxLbDocs->get_active_text(); - long nPos = mxLbDocs->get_active(); + tools::Long nPos = mxLbDocs->get_active(); bool bFound = false; ::sd::DrawDocShell* pDocShell = nullptr; NavDocInfo* pInfo = GetDocInfo(); diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx index bd06661554cb..bf4fb696e12a 100644 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -115,7 +115,7 @@ SdStartPresentationDlg::SdStartPresentationDlg(weld::Window* pWindow, const SfxI const bool bEndless = static_cast<const SfxBoolItem&>( rOutAttrs.Get( ATTR_PRESENT_ENDLESS ) ).GetValue(); const bool bWindow = !static_cast<const SfxBoolItem&>( rOutAttrs.Get( ATTR_PRESENT_FULLSCREEN ) ).GetValue(); - const long nPause = static_cast<const SfxUInt32Item&>( rOutAttrs.Get( ATTR_PRESENT_PAUSE_TIMEOUT ) ).GetValue(); + const tools::Long nPause = static_cast<const SfxUInt32Item&>( rOutAttrs.Get( ATTR_PRESENT_PAUSE_TIMEOUT ) ).GetValue(); m_xFormatter->SetTime( tools::Time( 0, 0, nPause ) ); // set cursor in timefield to end diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx index 6cc2ec279f28..bfd0c9ea5513 100644 --- a/sd/source/ui/dlg/sdpreslt.cxx +++ b/sd/source/ui/dlg/sdpreslt.cxx @@ -67,7 +67,7 @@ SdPresLayoutDlg::~SdPresLayoutDlg() void SdPresLayoutDlg::Reset() { const SfxPoolItem *pPoolItem = nullptr; - long nName; + tools::Long nName; // replace master page if( mrOutAttrs.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE, false, &pPoolItem ) == SfxItemState::SET ) diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index 2331510efb5c..d011508a8866 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -277,7 +277,7 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet ) const SfxUInt16Item* pItem = static_cast<const SfxUInt16Item*>(pAttr); - FieldUnit eFUnit = static_cast<FieldUnit>(static_cast<long>(pItem->GetValue())); + FieldUnit eFUnit = static_cast<FieldUnit>(static_cast<tools::Long>(pItem->GetValue())); if( eFUnit == m_xMtrFldOriginalWidth->get_unit() ) return; @@ -546,7 +546,7 @@ bool SdTpOptionsMisc::SetScale( const OUString& aScale, sal_Int32& rX, sal_Int32 if (!comphelper::string::isdigitAsciiString(aTmp)) return false; - rX = static_cast<long>(aTmp.toInt32()); + rX = static_cast<tools::Long>(aTmp.toInt32()); if( rX == 0 ) return false; @@ -557,7 +557,7 @@ bool SdTpOptionsMisc::SetScale( const OUString& aScale, sal_Int32& rX, sal_Int32 if (!comphelper::string::isdigitAsciiString(aTmp)) return false; - rY = static_cast<long>(aTmp.toInt32()); + rY = static_cast<tools::Long>(aTmp.toInt32()); return rY != 0; } diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx index dce0e837ac38..e84b4cce95f4 100644 --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -79,13 +79,13 @@ SdVectorizeDlg::~SdVectorizeDlg() if( fGrfWH < fWinWH ) { - aBmpSize.setWidth( static_cast<long>( rDispSize.Height() * fGrfWH ) ); + aBmpSize.setWidth( static_cast<tools::Long>( rDispSize.Height() * fGrfWH ) ); aBmpSize.setHeight( rDispSize.Height() ); } else { aBmpSize.setWidth( rDispSize.Width() ); - aBmpSize.setHeight( static_cast<long>( rDispSize.Width() / fGrfWH) ); + aBmpSize.setHeight( static_cast<tools::Long>( rDispSize.Width() / fGrfWH) ); } const Point aBmpPos( ( rDispSize.Width() - aBmpSize.Width() ) >> 1, @@ -147,26 +147,26 @@ void SdVectorizeDlg::Calculate( Bitmap const & rBmp, GDIMetaFile& rMtf ) if( pRAcc ) { - const long nWidth = pRAcc->Width(); - const long nHeight = pRAcc->Height(); - const long nTileX = m_xMtFillHoles->get_value(FieldUnit::NONE); - const long nTileY = m_xMtFillHoles->get_value(FieldUnit::NONE); + const tools::Long nWidth = pRAcc->Width(); + const tools::Long nHeight = pRAcc->Height(); + const tools::Long nTileX = m_xMtFillHoles->get_value(FieldUnit::NONE); + const tools::Long nTileY = m_xMtFillHoles->get_value(FieldUnit::NONE); assert(nTileX && "div-by-zero"); - const long nCountX = nWidth / nTileX; + const tools::Long nCountX = nWidth / nTileX; assert(nTileY && "div-by-zero"); - const long nCountY = nHeight / nTileY; - const long nRestX = nWidth % nTileX; - const long nRestY = nHeight % nTileY; + const tools::Long nCountY = nHeight / nTileY; + const tools::Long nRestX = nWidth % nTileX; + const tools::Long nRestY = nHeight % nTileY; MapMode aMap( rMtf.GetPrefMapMode() ); aNewMtf.SetPrefSize( rMtf.GetPrefSize() ); aNewMtf.SetPrefMapMode( aMap ); - for( long nTY = 0; nTY < nCountY; nTY++ ) + for( tools::Long nTY = 0; nTY < nCountY; nTY++ ) { - const long nY = nTY * nTileY; + const tools::Long nY = nTY * nTileY; - for( long nTX = 0; nTX < nCountX; nTX++ ) + for( tools::Long nTX = 0; nTX < nCountX; nTX++ ) AddTile( pRAcc.get(), aNewMtf, nTX * nTileX, nTY * nTileY, nTileX, nTileY ); if( nRestX ) @@ -175,9 +175,9 @@ void SdVectorizeDlg::Calculate( Bitmap const & rBmp, GDIMetaFile& rMtf ) if( nRestY ) { - const long nY = nCountY * nTileY; + const tools::Long nY = nCountY * nTileY; - for( long nTX = 0; nTX < nCountX; nTX++ ) + for( tools::Long nTX = 0; nTX < nCountX; nTX++ ) AddTile( pRAcc.get(), aNewMtf, nTX * nTileX, nY, nTileX, nRestY ); if( nRestX ) @@ -202,16 +202,16 @@ void SdVectorizeDlg::Calculate( Bitmap const & rBmp, GDIMetaFile& rMtf ) } void SdVectorizeDlg::AddTile( BitmapReadAccess const * pRAcc, GDIMetaFile& rMtf, - long nPosX, long nPosY, long nWidth, long nHeight ) + tools::Long nPosX, tools::Long nPosY, tools::Long nWidth, tools::Long nHeight ) { sal_uLong nSumR = 0, nSumG = 0, nSumB = 0; - const long nRight = nPosX + nWidth - 1; - const long nBottom = nPosY + nHeight - 1; + const tools::Long nRight = nPosX + nWidth - 1; + const tools::Long nBottom = nPosY + nHeight - 1; const double fMult = 1.0 / ( nWidth * nHeight ); - for( long nY = nPosY; nY <= nBottom; nY++ ) + for( tools::Long nY = nPosY; nY <= nBottom; nY++ ) { - for( long nX = nPosX; nX <= nRight; nX++ ) + for( tools::Long nX = nPosX; nX <= nRight; nX++ ) { const BitmapColor aPixel( pRAcc->GetColor( nY, nX ) ); @@ -241,7 +241,7 @@ void SdVectorizeDlg::AddTile( BitmapReadAccess const * pRAcc, GDIMetaFile& rMtf, rMtf.AddAction( new MetaRectAction( aRect ) ); } -IMPL_LINK( SdVectorizeDlg, ProgressHdl, long, nData, void ) +IMPL_LINK( SdVectorizeDlg, ProgressHdl, tools::Long, nData, void ) { m_xPrgs->set_percentage(nData); } |