diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-21 15:31:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-23 08:48:52 +0200 |
commit | 0d79d216886a71436e705c93829ed66a33270a9c (patch) | |
tree | ef29702266bca9df9f39b442505479b013891517 /sd/source/ui/view | |
parent | e8205f38c611cfc97ca0e32c911b3d373a94d230 (diff) |
long->tools::Long in pyuno..sd
Change-Id: I67c1218d225f49ea9ce789433283ab85275e39a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104627
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/drtxtob.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drtxtob1.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/drviews1.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 18 | ||||
-rw-r--r-- | sd/source/ui/view/drviews4.cxx | 22 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/drviews9.cxx | 40 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsa.cxx | 36 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsh.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsj.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvs2.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvsh.cxx | 30 | ||||
-rw-r--r-- | sd/source/ui/view/outlview.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/sdruler.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview3.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 48 | ||||
-rw-r--r-- | sd/source/ui/view/viewoverlaymanager.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe2.cxx | 44 | ||||
-rw-r--r-- | sd/source/ui/view/viewshel.cxx | 18 |
23 files changed, 187 insertions, 187 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 8d6675e7137e..7d8e8c6fdb25 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1638,7 +1638,7 @@ private: pOutliner->SetPaperSize(aOutRect.GetSize()); pOutliner->SetUpdateMode(true); - long nPageH = aOutRect.GetHeight(); + ::tools::Long nPageH = aOutRect.GetHeight(); std::vector< sal_Int32 > aPages; sal_Int32 nPageCount = mrBase.GetDocument()->GetSdPageCount(PageKind::Standard); @@ -1651,7 +1651,7 @@ private: pOutliner->Clear(); Paragraph* pPara = nullptr; - long nH (0); + ::tools::Long nH (0); while (nH < nPageH && nIndex<nCount) { SdPage* pPage = GetFilteredPage(aPages[nIndex], PageKind::Standard); @@ -1954,8 +1954,8 @@ private: rInfo.msPageString.clear(); rInfo.msPageString += rInfo.msTimeDate; - long aPageWidth = aPageSize.Width() - pPage->GetLeftBorder() - pPage->GetRightBorder(); - long aPageHeight = aPageSize.Height() - pPage->GetUpperBorder() - pPage->GetLowerBorder(); + ::tools::Long aPageWidth = aPageSize.Width() - pPage->GetLeftBorder() - pPage->GetRightBorder(); + ::tools::Long aPageHeight = aPageSize.Height() - pPage->GetUpperBorder() - pPage->GetLowerBorder(); // Bugfix for 44530: // if it was implicitly changed (Landscape/Portrait), // this is considered for tiling, respectively for the splitting up @@ -2006,13 +2006,13 @@ private: if( fPageWH < fPrintWH ) { - aPageSize_2.setWidth( static_cast<long>( aPrintSize_2.Height() * fPageWH ) ); + aPageSize_2.setWidth( static_cast<::tools::Long>( aPrintSize_2.Height() * fPageWH ) ); aPageSize_2.setHeight( aPrintSize_2.Height() ); } else { aPageSize_2.setWidth( aPrintSize_2.Width() ); - aPageSize_2.setHeight( static_cast<long>( aPrintSize_2.Width() / fPageWH ) ); + aPageSize_2.setHeight( static_cast<::tools::Long>( aPrintSize_2.Width() / fPageWH ) ); } MapMode aMap (rInfo.maMap); @@ -2187,9 +2187,9 @@ private: // keep the page content at its position if it fits, otherwise // move it to the printable area - const long nPageWidth ( + const ::tools::Long nPageWidth ( rInfo.maPageSize.Width() - rPage.GetLeftBorder() - rPage.GetRightBorder()); - const long nPageHeight ( + const ::tools::Long nPageHeight ( rInfo.maPageSize.Height() - rPage.GetUpperBorder() - rPage.GetLowerBorder()); Point aOrigin ( 0, 0 ); diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 303ea3355a53..241befe0ba5a 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -473,8 +473,8 @@ void ViewShellBase::InnerResizePixel (const Point& rOrigin, const Size &rSize, b aSize.AdjustHeight( -(aBorder.Top() + aBorder.Bottom()) ); Size aObjSizePixel = mpImpl->mpViewWindow->LogicToPixel(aObjSize, MapMode(MapUnit::Map100thMM)); SfxViewShell::SetZoomFactor( - Fraction( aSize.Width(), std::max( aObjSizePixel.Width(), static_cast<long int>(1) ) ), - Fraction( aSize.Height(), std::max( aObjSizePixel.Height(), static_cast<long int>(1)) ) ); + Fraction( aSize.Width(), std::max( aObjSizePixel.Width(), static_cast<::tools::Long>(1) ) ), + Fraction( aSize.Height(), std::max( aObjSizePixel.Height(), static_cast<::tools::Long>(1)) ) ); } mpImpl->ResizePixel(rOrigin, rSize, false); @@ -506,7 +506,7 @@ void ViewShellBase::Rearrange() GetViewFrame()->Resize(true); } -ErrCode ViewShellBase::DoVerb (long nVerb) +ErrCode ViewShellBase::DoVerb (::tools::Long nVerb) { ErrCode aResult = ERRCODE_NONE; diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 38caef16ae22..02344e1c4564 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -479,13 +479,13 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) nStartPara = 0; nEndPara = pOLV->GetOutliner()->GetParagraphCount() - 1; } - long nUpper = 0; + ::tools::Long nUpper = 0; for( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ ) { const SfxItemSet& rItems = pOLV->GetOutliner()->GetParaAttribs( nPara ); const SvxULSpaceItem& rItem = rItems.Get( EE_PARA_ULSPACE ); - nUpper = std::max( nUpper, static_cast<long>(rItem.GetUpper()) ); + nUpper = std::max( nUpper, static_cast<::tools::Long>(rItem.GetUpper()) ); } if( nUpper == 0 ) rSet.DisableItem( SID_PARASPACE_DECREASE ); diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 7b7b70624583..22f2eaf81d55 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -190,7 +190,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) const SvxLRSpaceItem& rItem = aAttr.Get( EE_PARA_LRSPACE ); std::unique_ptr<SvxLRSpaceItem> pNewItem(rItem.Clone()); - long nLeft = pNewItem->GetLeft(); + ::tools::Long nLeft = pNewItem->GetLeft(); if( nSlot == SID_INC_INDENT ) nLeft += 1000; else @@ -247,7 +247,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) const SvxULSpaceItem& rItem = aAttr.Get( EE_PARA_ULSPACE ); std::unique_ptr<SvxULSpaceItem> pNewItem(rItem.Clone()); - long nUpper = pNewItem->GetUpper(); + ::tools::Long nUpper = pNewItem->GetUpper(); if( nSlot == SID_PARASPACE_INCREASE ) nUpper += 100; else @@ -257,7 +257,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) } pNewItem->SetUpper( static_cast<sal_uInt16>(nUpper) ); - long nLower = pNewItem->GetLower(); + ::tools::Long nLower = pNewItem->GetLower(); if( nSlot == SID_PARASPACE_INCREASE ) nLower += 100; else @@ -289,7 +289,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) SfxItemSet aNewAttrs(*(aEditAttr.GetPool()), aEditAttr.GetRanges()); const SvxULSpaceItem& rItem = aEditAttr.Get( EE_PARA_ULSPACE ); std::unique_ptr<SvxULSpaceItem> pNewItem(rItem.Clone()); - long nUpper = pNewItem->GetUpper(); + ::tools::Long nUpper = pNewItem->GetUpper(); if( nSlot == SID_PARASPACE_INCREASE ) nUpper += 100; @@ -300,7 +300,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) } pNewItem->SetUpper( static_cast<sal_uInt16>(nUpper) ); - long nLower = pNewItem->GetLower(); + ::tools::Long nLower = pNewItem->GetLower(); if( nSlot == SID_PARASPACE_INCREASE ) nLower += 100; else diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 09814bd7b470..18b6ba8a89c9 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -273,7 +273,7 @@ void collectUIInformation(const OUString& aZoom) /** * set zoom factor */ -void DrawViewShell::SetZoom( long nZoom ) +void DrawViewShell::SetZoom( ::tools::Long nZoom ) { // Make sure that the zoom factor will not be recalculated on // following window resizings. @@ -601,11 +601,11 @@ void DrawViewShell::UpdateVRuler() IMPL_LINK( DrawViewShell, TabSplitHdl, TabBar *, pTab, void ) { - const long int nMax = maViewSize.Width() - maScrBarWH.Width() + const ::tools::Long nMax = maViewSize.Width() - maScrBarWH.Width() - maTabControl->GetPosPixel().X() ; Size aTabSize = maTabControl->GetSizePixel(); - aTabSize.setWidth( std::min(pTab->GetSplitSize(), static_cast<long>(nMax-1)) ); + aTabSize.setWidth( std::min(pTab->GetSplitSize(), static_cast<::tools::Long>(nMax-1)) ); maTabControl->SetSizePixel(aTabSize); @@ -711,7 +711,7 @@ void DrawViewShell::ResetActualPage() * Apply "Verb" on OLE-object. */ -ErrCode DrawViewShell::DoVerb(long nVerb) +ErrCode DrawViewShell::DoVerb(::tools::Long nVerb) { if ( mpDrawView->AreObjectsMarked() ) { @@ -739,7 +739,7 @@ ErrCode DrawViewShell::DoVerb(long nVerb) * Activate OLE-object */ -bool DrawViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) +bool DrawViewShell::ActivateObject(SdrOle2Obj* pObj, ::tools::Long nVerb) { bool bActivated = false; diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index a76151901147..411b377b3141 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -991,7 +991,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) switch( eZT ) { case SvxZoomType::PERCENT: - SetZoom( static_cast<long>( pArgs->Get( SID_ATTR_ZOOM ).GetValue()) ); + SetZoom( static_cast<::tools::Long>( pArgs->Get( SID_ATTR_ZOOM ).GetValue()) ); break; case SvxZoomType::OPTIMAL: diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 2883be985b46..53dd0f75c688 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -565,8 +565,8 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq) } else { - long nLeft = std::max(0L, rLRSpace.GetLeft() - aPagePos.X()); - long nRight = std::max(0L, rLRSpace.GetRight() + aPagePos.X() + + ::tools::Long nLeft = std::max(0L, rLRSpace.GetLeft() - aPagePos.X()); + ::tools::Long nRight = std::max(0L, rLRSpace.GetRight() + aPagePos.X() + aPageSize.Width() - aViewSize.Width()); sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind); @@ -631,8 +631,8 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq) } else { - long nUpper = std::max(0L, rULSpace.GetUpper() - aPagePos.Y()); - long nLower = std::max(0L, rULSpace.GetLower() + aPagePos.Y() + + ::tools::Long nUpper = std::max(0L, rULSpace.GetUpper() - aPagePos.Y()); + ::tools::Long nLower = std::max(0L, rULSpace.GetLower() + aPagePos.Y() + aPageSize.Height() - aViewSize.Height()); sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind); @@ -840,8 +840,8 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq) // become negative - EditEngine really does not // like that. const auto nAbsLSpace=aFormat.GetAbsLSpace(); - const long nTxtLeft=rItem.GetTextLeft(); - const long nLeftIndent=std::max(0L,nTxtLeft - nAbsLSpace); + const ::tools::Long nTxtLeft=rItem.GetTextLeft(); + const ::tools::Long nLeftIndent=std::max(0L,nTxtLeft - nAbsLSpace); aLRSpaceItem.SetTextLeft(nLeftIndent); // control for clipped left indent - remainder // reduces number format first line indent @@ -976,7 +976,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET ) { const SdrMetricItem& rTLDItem = aEditAttr.Get( SDRATTR_TEXT_LEFTDIST ); - long nLD = rTLDItem.GetValue(); + ::tools::Long nLD = rTLDItem.GetValue(); aPos.AdjustX(nLD ); } @@ -996,7 +996,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET ) { const SdrMetricItem& rTLDItem = aEditAttr.Get( SDRATTR_TEXT_LEFTDIST ); - long nLD = rTLDItem.GetValue(); + ::tools::Long nLD = rTLDItem.GetValue(); aLRSpace.SetLeft( aLRSpace.GetLeft() + nLD ); } @@ -1005,7 +1005,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) if ( aEditAttr.GetItemState( SDRATTR_TEXT_RIGHTDIST ) == SfxItemState::SET ) { const SdrMetricItem& rTRDItem = aEditAttr.Get( SDRATTR_TEXT_RIGHTDIST ); - long nRD = rTRDItem.GetValue(); + ::tools::Long nRD = rTRDItem.GetValue(); aLRSpace.SetRight( aLRSpace.GetRight() + nRD ); } diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index c6ad21c0d74b..f71ecc6a6014 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -396,18 +396,18 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin) if (!pBmpMask) return; - const long nStartX = maMousePos.X() - PIPETTE_RANGE; - const long nEndX = maMousePos.X() + PIPETTE_RANGE; - const long nStartY = maMousePos.Y() - PIPETTE_RANGE; - const long nEndY = maMousePos.Y() + PIPETTE_RANGE; - long nRed = 0; - long nGreen = 0; - long nBlue = 0; + const ::tools::Long nStartX = maMousePos.X() - PIPETTE_RANGE; + const ::tools::Long nEndX = maMousePos.X() + PIPETTE_RANGE; + const ::tools::Long nStartY = maMousePos.Y() - PIPETTE_RANGE; + const ::tools::Long nEndY = maMousePos.Y() + PIPETTE_RANGE; + ::tools::Long nRed = 0; + ::tools::Long nGreen = 0; + ::tools::Long nBlue = 0; const double fDiv = ( ( PIPETTE_RANGE << 1 ) + 1 ) * ( ( PIPETTE_RANGE << 1 ) + 1 ); - for ( long nY = nStartY; nY <= nEndY; nY++ ) + for ( ::tools::Long nY = nStartY; nY <= nEndY; nY++ ) { - for( long nX = nStartX; nX <= nEndX; nX++ ) + for( ::tools::Long nX = nStartX; nX <= nEndX; nX++ ) { const Color aCol( pWin->GetPixel( pWin->PixelToLogic( Point( nX, nY ) ) ) ); @@ -816,8 +816,8 @@ void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect, { RulerLine pHLines[2]; RulerLine pVLines[2]; - long nHOffs = 0; - long nVOffs = 0; + ::tools::Long nHOffs = 0; + ::tools::Long nVOffs = 0; sal_uInt16 nCnt; if (mpHorizontalRuler) diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index cdb8b78bb8bf..baac52ee46e1 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -259,8 +259,8 @@ void DrawViewShell::GetMarginProperties( SfxItemSet &rSet ) { // const SvxLRSpaceItem aTmpPageLRSpace ( rDesc.GetMaster().GetLRSpace() ); const SvxLongLRSpaceItem aLongLR( - static_cast<long>(pPage->GetLeftBorder()), - static_cast<long>(pPage->GetRightBorder()), + static_cast<::tools::Long>(pPage->GetLeftBorder()), + static_cast<::tools::Long>(pPage->GetRightBorder()), SID_ATTR_PAGE_LRSPACE ); rSet.Put( aLongLR ); } @@ -270,8 +270,8 @@ void DrawViewShell::GetMarginProperties( SfxItemSet &rSet ) { // const SvxULSpaceItem aUL( rDesc.GetMaster().GetULSpace() ); SvxLongULSpaceItem aLongUL( - static_cast<long>(pPage->GetUpperBorder()), - static_cast<long>(pPage->GetLowerBorder()), + static_cast<::tools::Long>(pPage->GetUpperBorder()), + static_cast<::tools::Long>(pPage->GetLowerBorder()), SID_ATTR_PAGE_ULSPACE ); rSet.Put( aLongUL ); } diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index baeda924d957..aa4ef5f36a2f 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -109,13 +109,13 @@ void DrawViewShell::ExecGallery(SfxRequest const & rReq) // constrain size to page size if necessary if ((fGrfWH != 0.F) && (fGrfWH < fWinWH)) { - aSize.setWidth( static_cast<long>(aPageSize.Height() * fGrfWH) ); + aSize.setWidth( static_cast<::tools::Long>(aPageSize.Height() * fGrfWH) ); aSize.setHeight( aPageSize.Height() ); } else { aSize.setWidth( aPageSize.Width() ); - aSize.setHeight( static_cast<long>(aPageSize.Width() / fGrfWH) ); + aSize.setHeight( static_cast<::tools::Long>(aPageSize.Width() / fGrfWH) ); } } @@ -331,11 +331,11 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) const SfxUInt32Item* pBlue = rReq.GetArg<SfxUInt32Item>(ID_VAL_BLUE); XGradientListRef pGradientList = GetDoc()->GetGradientList (); - long nCounts = pGradientList->Count (); + ::tools::Long nCounts = pGradientList->Count (); Color aColor (static_cast<sal_uInt8>(pRed->GetValue ()), static_cast<sal_uInt8>(pGreen->GetValue ()), static_cast<sal_uInt8>(pBlue->GetValue ())); - long i; + ::tools::Long i; pAttr->ClearItem (XATTR_FILLGRADIENT); pAttr->ClearItem (XATTR_FILLSTYLE); @@ -401,11 +401,11 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) const SfxUInt32Item* pBlue = rReq.GetArg<SfxUInt32Item>(ID_VAL_BLUE); XHatchListRef pHatchList = GetDoc()->GetHatchList (); - long nCounts = pHatchList->Count (); + ::tools::Long nCounts = pHatchList->Count (); Color aColor (static_cast<sal_uInt8>(pRed->GetValue ()), static_cast<sal_uInt8>(pGreen->GetValue ()), static_cast<sal_uInt8>(pBlue->GetValue ())); - long i; + ::tools::Long i; pAttr->ClearItem (XATTR_FILLHATCH); pAttr->ClearItem (XATTR_FILLSTYLE); @@ -476,9 +476,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) pAttr->ClearItem (XATTR_LINESTYLE); XDashListRef pDashList = GetDoc()->GetDashList(); - long nCounts = pDashList->Count (); + ::tools::Long nCounts = pDashList->Count (); std::unique_ptr<XDashEntry> pEntry = std::make_unique<XDashEntry>(aNewDash, pName->GetValue()); - long i; + ::tools::Long i; for ( i = 0; i < nCounts; i++ ) if (pDashList->GetDash (i)->GetName () == pName->GetValue ()) @@ -533,8 +533,8 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) pAttr->ClearItem (XATTR_FILLSTYLE); XGradientListRef pGradientList = GetDoc()->GetGradientList (); - long nCounts = pGradientList->Count (); - long i; + ::tools::Long nCounts = pGradientList->Count (); + ::tools::Long i; for ( i = 0; i < nCounts; i++ ) { @@ -610,8 +610,8 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) pAttr->ClearItem (XATTR_FILLSTYLE); XHatchListRef pHatchList = GetDoc()->GetHatchList (); - long nCounts = pHatchList->Count (); - long i; + ::tools::Long nCounts = pHatchList->Count (); + ::tools::Long i; for ( i = 0; i < nCounts; i++ ) { @@ -668,9 +668,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) const SfxStringItem* pName = rReq.GetArg<SfxStringItem>(ID_VAL_INDEX); XGradientListRef pGradientList = GetDoc()->GetGradientList (); - long nCounts = pGradientList->Count (); + ::tools::Long nCounts = pGradientList->Count (); - for (long i = 0; i < nCounts; i ++) + for (::tools::Long i = 0; i < nCounts; i ++) { const XGradientEntry* pEntry = pGradientList->GetGradient(i); @@ -705,9 +705,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) const SfxStringItem* pName = rReq.GetArg<SfxStringItem>(ID_VAL_INDEX); XHatchListRef pHatchList = GetDoc()->GetHatchList (); - long nCounts = pHatchList->Count (); + ::tools::Long nCounts = pHatchList->Count (); - for (long i = 0; i < nCounts; i ++) + for (::tools::Long i = 0; i < nCounts; i ++) { const XHatchEntry* pEntry = pHatchList->GetHatch(i); @@ -796,7 +796,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet) { const XFillStyleItem &rFillStyleItem = aAttr.Get (XATTR_FILLSTYLE); - rSet.Put (SfxUInt32Item (nWhich, static_cast<long>(rFillStyleItem.GetValue ()))); + rSet.Put (SfxUInt32Item (nWhich, static_cast<::tools::Long>(rFillStyleItem.GetValue ()))); break; } @@ -804,7 +804,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet) { const XLineStyleItem &rLineStyleItem = aAttr.Get (XATTR_LINESTYLE); - rSet.Put (SfxUInt32Item (nWhich, static_cast<long>(rLineStyleItem.GetValue ()))); + rSet.Put (SfxUInt32Item (nWhich, static_cast<::tools::Long>(rLineStyleItem.GetValue ()))); break; } @@ -812,7 +812,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet) { const XLineWidthItem &rLineWidthItem = aAttr.Get (XATTR_LINEWIDTH); - rSet.Put (SfxUInt32Item (nWhich, static_cast<long>(rLineWidthItem.GetValue ()))); + rSet.Put (SfxUInt32Item (nWhich, static_cast<::tools::Long>(rLineWidthItem.GetValue ()))); break; } @@ -866,7 +866,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet) ; } - rSet.Put (SfxUInt32Item (nWhich, static_cast<long>((nWhich == SID_GETRED) + rSet.Put (SfxUInt32Item (nWhich, static_cast<::tools::Long>((nWhich == SID_GETRED) ? aColor.GetRed () : (nWhich == SID_GETGREEN) ? aColor.GetGreen () diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 74a68af15e15..c489745af601 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -414,10 +414,10 @@ void DrawViewShell::CheckLineTo(SfxRequest& rReq) * Change page parameter if SID_PAGESIZE or SID_PAGEMARGIN */ void DrawViewShell::SetupPage (Size const &rSize, - long nLeft, - long nRight, - long nUpper, - long nLower, + ::tools::Long nLeft, + ::tools::Long nRight, + ::tools::Long nUpper, + ::tools::Long nLower, bool bSize, bool bMargin, bool bScaleAll) @@ -495,8 +495,8 @@ void DrawViewShell::SetupPage (Size const &rSize, pHandoutPage->CreateTitleAndLayout(true); } - long nWidth = mpActualPage->GetSize().Width(); - long nHeight = mpActualPage->GetSize().Height(); + ::tools::Long nWidth = mpActualPage->GetSize().Width(); + ::tools::Long nHeight = mpActualPage->GetSize().Height(); Point aPageOrg(nWidth, nHeight / 2); Size aSize( nWidth * 3, nHeight * 2); @@ -578,10 +578,10 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) Size aPageSize = pPageView->GetPage()->GetSize(); aPagePos.AdjustX(aPageSize.Width() / 2 ); - aPageSize.setWidth( static_cast<long>(aPageSize.Width() * 1.03) ); + aPageSize.setWidth( static_cast<::tools::Long>(aPageSize.Width() * 1.03) ); aPagePos.AdjustY(aPageSize.Height() / 2 ); - aPageSize.setHeight( static_cast<long>(aPageSize.Height() * 1.03) ); + aPageSize.setHeight( static_cast<::tools::Long>(aPageSize.Height() * 1.03) ); aPagePos.AdjustY( -(aPageSize.Height() / 2) ); aPagePos.AdjustX( -(aPageSize.Width() / 2) ); @@ -600,8 +600,8 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) Point aPos = GetActiveWindow()->PixelToLogic(maMousePos); pPageView->LogicToPagePos(aPos); Fraction aUIScale(GetDoc()->GetUIScale()); - aPos.setX( long(aPos.X() / aUIScale) ); - aPos.setY( long(aPos.Y() / aUIScale) ); + aPos.setX( ::tools::Long(aPos.X() / aUIScale) ); + aPos.setY( ::tools::Long(aPos.Y() / aUIScale) ); // position- and size items if ( mpDrawView->IsAction() ) @@ -615,12 +615,12 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) { pPageView->LogicToPagePos(aRect); aPos = aRect.TopLeft(); - aPos.setX( long(aPos.X() / aUIScale) ); - aPos.setY( long(aPos.Y() / aUIScale) ); + aPos.setX( ::tools::Long(aPos.X() / aUIScale) ); + aPos.setY( ::tools::Long(aPos.Y() / aUIScale) ); rSet.Put( SfxPointItem( SID_ATTR_POSITION, aPos) ); Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() ); - aSize.setHeight( long(aSize.Height() / aUIScale) ); - aSize.setWidth( long(aSize.Width() / aUIScale) ); + aSize.setHeight( ::tools::Long(aSize.Height() / aUIScale) ); + aSize.setWidth( ::tools::Long(aSize.Width() / aUIScale) ); rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize) ); } } @@ -633,13 +633,13 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) // Show the position of the selected shape(s) Point aShapePosition (aRect.TopLeft()); - aShapePosition.setX( long(aShapePosition.X() / aUIScale) ); - aShapePosition.setY( long(aShapePosition.Y() / aUIScale) ); + aShapePosition.setX( ::tools::Long(aShapePosition.X() / aUIScale) ); + aShapePosition.setY( ::tools::Long(aShapePosition.Y() / aUIScale) ); rSet.Put (SfxPointItem(SID_ATTR_POSITION, aShapePosition)); Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() ); - aSize.setHeight( long(aSize.Height() / aUIScale) ); - aSize.setWidth( long(aSize.Width() / aUIScale) ); + aSize.setHeight( ::tools::Long(aSize.Height() / aUIScale) ); + aSize.setWidth( ::tools::Long(aSize.Width() / aUIScale) ); rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize) ); } else diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 80866c2b887f..30b160ea88f7 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1132,12 +1132,12 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) Size aPageSize = pPageView->GetPage()->GetSize(); aPagePos.AdjustX(aPageSize.Width() / 2 ); - aPageSize.setWidth( static_cast<long>(aPageSize.Width() * 1.03) ); + aPageSize.setWidth( static_cast<::tools::Long>(aPageSize.Width() * 1.03) ); if( rReq.GetSlot() == SID_SIZE_PAGE ) { aPagePos.AdjustY(aPageSize.Height() / 2 ); - aPageSize.setHeight( static_cast<long>(aPageSize.Height() * 1.03) ); + aPageSize.setHeight( static_cast<::tools::Long>(aPageSize.Height() * 1.03) ); aPagePos.AdjustY( -(aPageSize.Height() / 2) ); } else @@ -1228,8 +1228,8 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if ( mpDrawView->AreObjectsMarked() ) { maMarkRect = mpDrawView->GetAllMarkedRect(); - long nW = static_cast<long>(maMarkRect.GetWidth() * 1.03); - long nH = static_cast<long>(maMarkRect.GetHeight() * 1.03); + ::tools::Long nW = static_cast<::tools::Long>(maMarkRect.GetWidth() * 1.03); + ::tools::Long nH = static_cast<::tools::Long>(maMarkRect.GetHeight() * 1.03); Point aPos = maMarkRect.Center(); aPos.AdjustX( -(nW / 2) ); aPos.AdjustY( -(nH / 2) ); @@ -1260,8 +1260,8 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) { ::tools::Rectangle aBoundRect( pPageView->GetObjList()->GetAllObjBoundRect() ); - long nW = static_cast<long>(aBoundRect.GetWidth() * 1.03); - long nH = static_cast<long>(aBoundRect.GetHeight() * 1.03); + ::tools::Long nW = static_cast<::tools::Long>(aBoundRect.GetWidth() * 1.03); + ::tools::Long nH = static_cast<::tools::Long>(aBoundRect.GetHeight() * 1.03); Point aPos = aBoundRect.Center(); aPos.AdjustX( -(nW / 2) ); aPos.AdjustY( -(nH / 2) ); diff --git a/sd/source/ui/view/drviewsh.cxx b/sd/source/ui/view/drviewsh.cxx index f6e92706993d..72013d5fd99d 100644 --- a/sd/source/ui/view/drviewsh.cxx +++ b/sd/source/ui/view/drviewsh.cxx @@ -127,19 +127,19 @@ void DrawViewShell::MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rW } else { - const long distRight(rRect.Right() - aNewPos.X() - aVisAreaSize.Width()); + const ::tools::Long distRight(rRect.Right() - aNewPos.X() - aVisAreaSize.Width()); if(distRight > 0) { - long mult = (distRight / nFreeSpaceX) + 1; + ::tools::Long mult = (distRight / nFreeSpaceX) + 1; aNewPos.AdjustX(mult * nFreeSpaceX ); } - const long distLeft(aNewPos.X() - rRect.Left()); + const ::tools::Long distLeft(aNewPos.X() - rRect.Left()); if(distLeft > 0) { - long mult = (distLeft / nFreeSpaceX) + 1; + ::tools::Long mult = (distLeft / nFreeSpaceX) + 1; aNewPos.AdjustX( -(mult * nFreeSpaceX) ); } } @@ -172,19 +172,19 @@ void DrawViewShell::MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rW } else { - const long distBottom(rRect.Bottom() - aNewPos.Y() - aVisAreaSize.Height()); + const ::tools::Long distBottom(rRect.Bottom() - aNewPos.Y() - aVisAreaSize.Height()); if(distBottom > 0) { - long mult = (distBottom / nFreeSpaceY) + 1; + ::tools::Long mult = (distBottom / nFreeSpaceY) + 1; aNewPos.AdjustY(mult * nFreeSpaceY ); } - const long distTop(aNewPos.Y() - rRect.Top()); + const ::tools::Long distTop(aNewPos.Y() - rRect.Top()); if(distTop > 0) { - long mult = (distTop / nFreeSpaceY) + 1; + ::tools::Long mult = (distTop / nFreeSpaceY) + 1; aNewPos.AdjustY( -(mult * nFreeSpaceY) ); } } diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index 829338a67de1..47cbb175ddf4 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -192,9 +192,9 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) aAttrSet.GetItemState( SDRATTR_EDGELINE2DELTA ) >= SfxItemState::DEFAULT && aAttrSet.GetItemState( SDRATTR_EDGELINE3DELTA ) >= SfxItemState::DEFAULT ) { - long nVal1 = aAttrSet.Get( SDRATTR_EDGELINE1DELTA ).GetValue(); - long nVal2 = aAttrSet.Get( SDRATTR_EDGELINE2DELTA ).GetValue(); - long nVal3 = aAttrSet.Get( SDRATTR_EDGELINE3DELTA ).GetValue(); + ::tools::Long nVal1 = aAttrSet.Get( SDRATTR_EDGELINE1DELTA ).GetValue(); + ::tools::Long nVal2 = aAttrSet.Get( SDRATTR_EDGELINE2DELTA ).GetValue(); + ::tools::Long nVal3 = aAttrSet.Get( SDRATTR_EDGELINE3DELTA ).GetValue(); { if( nVal1 != 0 || nVal2 != 0 || nVal3 != 0 ) bDisable = false; diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index a11d9b28282e..72626b9654ed 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -84,7 +84,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) switch( eZT ) { case SvxZoomType::PERCENT: - SetZoom( static_cast<long>( pArgs->Get( SID_ATTR_ZOOM ).GetValue()) ); + SetZoom( static_cast<::tools::Long>( pArgs->Get( SID_ATTR_ZOOM ).GetValue()) ); Invalidate( SID_ATTR_ZOOM ); Invalidate( SID_ATTR_ZOOMSLIDER ); break; diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index c62380fde3de..ce1cb0ceeee3 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1051,19 +1051,19 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) */ void OutlineViewShell::VirtHScrollHdl(ScrollBar* pHScroll) { - long nThumb = pHScroll->GetThumbPos(); - long nRange = pHScroll->GetRange().Len(); + ::tools::Long nThumb = pHScroll->GetThumbPos(); + ::tools::Long nRange = pHScroll->GetRange().Len(); double fX = static_cast<double>(nThumb) / nRange; Window* pWin = mpContentWindow.get(); OutlinerView* pOutlinerView = pOlView->GetViewByWindow(pWin); - long nViewWidth = pWin->PixelToLogic( + ::tools::Long nViewWidth = pWin->PixelToLogic( pWin->GetSizePixel()).Width(); - long nTextWidth = pOlView->GetPaperWidth(); + ::tools::Long nTextWidth = pOlView->GetPaperWidth(); nViewWidth = std::max(nViewWidth, nTextWidth); - long nCurrentPos = pOutlinerView->GetVisArea().Left(); - long nTargetPos = static_cast<long>(fX * nViewWidth); - long nDelta = nTargetPos - nCurrentPos; + ::tools::Long nCurrentPos = pOutlinerView->GetVisArea().Left(); + ::tools::Long nTargetPos = static_cast<::tools::Long>(fX * nViewWidth); + ::tools::Long nDelta = nTargetPos - nCurrentPos; pOutlinerView->HideCursor(); pOutlinerView->Scroll(-nDelta, 0); @@ -1072,19 +1072,19 @@ void OutlineViewShell::VirtHScrollHdl(ScrollBar* pHScroll) void OutlineViewShell::VirtVScrollHdl(ScrollBar* pVScroll) { - long nThumb = pVScroll->GetThumbPos(); - long nRange = pVScroll->GetRange().Len(); + ::tools::Long nThumb = pVScroll->GetThumbPos(); + ::tools::Long nRange = pVScroll->GetRange().Len(); double fY = static_cast<double>(nThumb) / nRange; Window* pWin = mpContentWindow.get(); OutlinerView* pOutlinerView = pOlView->GetViewByWindow(pWin); - long nViewHeight = pWin->PixelToLogic( + ::tools::Long nViewHeight = pWin->PixelToLogic( pWin->GetSizePixel()).Height(); - long nTextHeight = pOlView->GetOutliner().GetTextHeight(); + ::tools::Long nTextHeight = pOlView->GetOutliner().GetTextHeight(); nViewHeight += nTextHeight; - long nCurrentPos = pOutlinerView->GetVisArea().Top(); - long nTargetPos = static_cast<long>(fY * nViewHeight); - long nDelta = nTargetPos - nCurrentPos; + ::tools::Long nCurrentPos = pOutlinerView->GetVisArea().Top(); + ::tools::Long nTargetPos = static_cast<::tools::Long>(fY * nViewHeight); + ::tools::Long nDelta = nTargetPos - nCurrentPos; pOutlinerView->HideCursor(); pOutlinerView->Scroll(0, -nDelta); @@ -1108,7 +1108,7 @@ bool OutlineViewShell::PrepareClose( bool bUI ) /** * Zoom with zoom factor. Inform OutlinerView */ -void OutlineViewShell::SetZoom(long nZoom) +void OutlineViewShell::SetZoom(::tools::Long nZoom) { ViewShell::SetZoom(nZoom); diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 11a7d332da8b..8abad53cccc6 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -1542,7 +1542,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo, void) if( !(pPara && ::Outliner::HasParaFlag(pPara,ParaFlag::ISPAGE)) ) return; - long nPage = 0; // todo, printing?? + ::tools::Long nPage = 0; // todo, printing?? for ( sal_Int32 n = 0; n <= pInfo->mnPara; n++ ) { Paragraph* p = mrOutliner.GetParagraph( n ); @@ -1550,8 +1550,8 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo, void) nPage++; } - long nBulletHeight = static_cast<long>(mrOutliner.GetLineHeight( pInfo->mnPara )); - long nFontHeight = 0; + ::tools::Long nBulletHeight = static_cast<::tools::Long>(mrOutliner.GetLineHeight( pInfo->mnPara )); + ::tools::Long nFontHeight = 0; if ( !rEditEngine.IsFlatMode() ) { nFontHeight = nBulletHeight / 5; @@ -1569,9 +1569,9 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo, void) if (aImageSize.Width() != 0) { const float fImageRatio = static_cast<float>(aImageSize.Height()) / static_cast<float>(aImageSize.Width()); - aImageSize.setWidth( static_cast<long>( fImageRatio * fImageHeight ) ); + aImageSize.setWidth( static_cast<::tools::Long>( fImageRatio * fImageHeight ) ); } - aImageSize.setHeight( static_cast<long>(fImageHeight) ); + aImageSize.setHeight( static_cast<::tools::Long>(fImageHeight) ); Point aImagePos( pInfo->mrStartPos ); aImagePos.AdjustX(aOutSize.Width() - aImageSize.Width() - aOffset.Width() ) ; diff --git a/sd/source/ui/view/sdruler.cxx b/sd/source/ui/view/sdruler.cxx index 60600b301afc..a3892acfd957 100644 --- a/sd/source/ui/view/sdruler.cxx +++ b/sd/source/ui/view/sdruler.cxx @@ -120,7 +120,7 @@ void Ruler::MouseButtonDown(const MouseEvent& rMEvt) void Ruler::SetNullOffset(const Point& rOffset) { - long nOffset; + ::tools::Long nOffset; if ( bHorz ) nOffset = rOffset.X(); else nOffset = rOffset.Y(); diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index eca9b996d9dd..e05e370d3321 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -645,7 +645,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, maDropPos.setY( pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 ) ); // delete pages, that are not of any interest for us - for( long i = pWorkModel->GetPageCount() - 1; i >= 0; i-- ) + for( ::tools::Long i = pWorkModel->GetPageCount() - 1; i >= 0; i-- ) { SdPage* pP = static_cast< SdPage* >( pWorkModel->GetPage( static_cast<sal_uInt16>(i) ) ); @@ -892,7 +892,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } // delete pages, that are not of any interest for us - for( long i = pModel->GetPageCount() - 1; i >= 0; i-- ) + for( ::tools::Long i = pModel->GetPageCount() - 1; i >= 0; i-- ) { SdPage* pP = static_cast< SdPage* >( pModel->GetPage( static_cast<sal_uInt16>(i) ) ); @@ -1345,7 +1345,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, ::sd::Window* pWin = mpViewSh->GetActiveWindow(); sal_uInt16 nHitLog = static_cast<sal_uInt16>(pWin->PixelToLogic( Size(FuPoor::HITPIX, 0 ) ).Width()); - const long n2HitLog = nHitLog << 1; + const ::tools::Long n2HitLog = nHitLog << 1; Point aHitPosR( rPos ); Point aHitPosL( rPos ); Point aHitPosT( rPos ); diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 1c06ad1762f4..bb71ade2f70f 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -142,7 +142,7 @@ void Window::CalcMinZoom() return; // Get current zoom factor. - long nZoom = GetZoom(); + ::tools::Long nZoom = GetZoom(); // Get the rectangle of the output area in logical coordinates // and calculate the scaling factors that would lead to the view @@ -164,25 +164,25 @@ void Window::CalcMinZoom() // If the current zoom factor is smaller than the calculated minimal // zoom factor then set the new minimal factor as the current zoom // factor. - if ( nZoom < static_cast<long>(mnMinZoom) ) + if ( nZoom < static_cast<::tools::Long>(mnMinZoom) ) SetZoomFactor(mnMinZoom); } -void Window::SetMinZoom (long int nMin) +void Window::SetMinZoom (::tools::Long nMin) { mnMinZoom = static_cast<sal_uInt16>(nMin); } -void Window::SetMaxZoom (long int nMax) +void Window::SetMaxZoom (::tools::Long nMax) { mnMaxZoom = static_cast<sal_uInt16>(nMax); } -long Window::GetZoom() const +::tools::Long Window::GetZoom() const { if( GetMapMode().GetScaleX().GetDenominator() ) { - return long(GetMapMode().GetScaleX() * 100); + return ::tools::Long(GetMapMode().GetScaleX() * 100); } else { @@ -324,13 +324,13 @@ void Window::SetCenterAllowed (bool bIsAllowed) mbCenterAllowed = bIsAllowed; } -long Window::SetZoomFactor(long nZoom) +::tools::Long Window::SetZoomFactor(::tools::Long nZoom) { // Clip the zoom factor to the valid range marked by nMinZoom as // calculated by CalcMinZoom() and the constant MAX_ZOOM. if ( nZoom > MAX_ZOOM ) nZoom = MAX_ZOOM; - if ( nZoom < static_cast<long>(mnMinZoom) ) + if ( nZoom < static_cast<::tools::Long>(mnMinZoom) ) nZoom = mnMinZoom; // Set the zoom factor at the window's map mode. @@ -357,20 +357,20 @@ long Window::SetZoomFactor(long nZoom) return nZoom; } -void Window::SetZoomIntegral(long nZoom) +void Window::SetZoomIntegral(::tools::Long nZoom) { // Clip the zoom factor to the valid range marked by nMinZoom as // previously calculated by <member>CalcMinZoom()</member> and the // MAX_ZOOM constant. if ( nZoom > MAX_ZOOM ) nZoom = MAX_ZOOM; - if ( nZoom < static_cast<long>(mnMinZoom) ) + if ( nZoom < static_cast<::tools::Long>(mnMinZoom) ) nZoom = mnMinZoom; // Calculate the window's new origin. Size aSize = PixelToLogic(GetOutputSizePixel()); - long nW = aSize.Width() * GetZoom() / nZoom; - long nH = aSize.Height() * GetZoom() / nZoom; + ::tools::Long nW = aSize.Width() * GetZoom() / nZoom; + ::tools::Long nH = aSize.Height() * GetZoom() / nZoom; maWinPos.AdjustX((aSize.Width() - nW) / 2 ); maWinPos.AdjustY((aSize.Height() - nH) / 2 ); if ( maWinPos.X() < 0 ) maWinPos.setX( 0 ); @@ -381,9 +381,9 @@ void Window::SetZoomIntegral(long nZoom) SetZoomFactor(nZoom); } -long Window::GetZoomForRect( const ::tools::Rectangle& rZoomRect ) +::tools::Long Window::GetZoomForRect( const ::tools::Rectangle& rZoomRect ) { - long nRetZoom = 100; + ::tools::Long nRetZoom = 100; if( (rZoomRect.GetWidth() != 0) && (rZoomRect.GetHeight() != 0)) { @@ -428,7 +428,7 @@ long Window::GetZoomForRect( const ::tools::Rectangle& rZoomRect ) // MAX_ZOOM constant. if ( nRetZoom > MAX_ZOOM ) nRetZoom = MAX_ZOOM; - if ( nRetZoom < static_cast<long>(mnMinZoom) ) + if ( nRetZoom < static_cast<::tools::Long>(mnMinZoom) ) nRetZoom = mnMinZoom; } } @@ -440,9 +440,9 @@ long Window::GetZoomForRect( const ::tools::Rectangle& rZoomRect ) is displayed centered and as large as possible while still being fully visible in the window. */ -long Window::SetZoomRect (const ::tools::Rectangle& rZoomRect) +::tools::Long Window::SetZoomRect (const ::tools::Rectangle& rZoomRect) { - long nNewZoom = 100; + ::tools::Long nNewZoom = 100; if (rZoomRect.GetWidth() == 0 || rZoomRect.GetHeight() == 0) { @@ -486,7 +486,7 @@ long Window::SetZoomRect (const ::tools::Rectangle& rZoomRect) // Transform the current zoom factor so that it leads to the desired // scaling. - long nZoom = nFact * GetZoom() / ZOOM_MULTIPLICATOR; + ::tools::Long nZoom = nFact * GetZoom() / ZOOM_MULTIPLICATOR; // Calculate the new origin. if ( nFact == 0 ) @@ -503,9 +503,9 @@ long Window::SetZoomRect (const ::tools::Rectangle& rZoomRect) maWinPos = maViewOrigin + aPos; - aWinSize.setWidth( static_cast<long>(static_cast<double>(aWinSize.Width()) * double(ZOOM_MULTIPLICATOR) / static_cast<double>(nFact)) ); + aWinSize.setWidth( static_cast<::tools::Long>(static_cast<double>(aWinSize.Width()) * double(ZOOM_MULTIPLICATOR) / static_cast<double>(nFact)) ); maWinPos.AdjustX((rZoomRect.GetWidth() - aWinSize.Width()) / 2 ); - aWinSize.setHeight( static_cast<long>(static_cast<double>(aWinSize.Height()) * double(ZOOM_MULTIPLICATOR) / static_cast<double>(nFact)) ); + aWinSize.setHeight( static_cast<::tools::Long>(static_cast<double>(aWinSize.Height()) * double(ZOOM_MULTIPLICATOR) / static_cast<double>(nFact)) ); maWinPos.AdjustY((rZoomRect.GetHeight() - aWinSize.Height()) / 2 ); if ( maWinPos.X() < 0 ) maWinPos.setX( 0 ); @@ -644,13 +644,13 @@ double Window::GetVisibleY() const */ void Window::SetVisibleXY(double fX, double fY) { - long nOldX = maWinPos.X(); - long nOldY = maWinPos.Y(); + ::tools::Long nOldX = maWinPos.X(); + ::tools::Long nOldY = maWinPos.Y(); if ( fX >= 0 ) - maWinPos.setX( static_cast<long>(fX * maViewSize.Width()) ); + maWinPos.setX( static_cast<::tools::Long>(fX * maViewSize.Width()) ); if ( fY >= 0 ) - maWinPos.setY( static_cast<long>(fY * maViewSize.Height()) ); + maWinPos.setY( static_cast<::tools::Long>(fY * maViewSize.Height()) ); UpdateMapOrigin(false); Scroll(nOldX - maWinPos.X(), nOldY - maWinPos.Y(), ScrollFlags::Children); PaintImmediately(); diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx index 0bcd5fcb3ddd..5c309ba4cf67 100644 --- a/sd/source/ui/view/viewoverlaymanager.cxx +++ b/sd/source/ui/view/viewoverlaymanager.cxx @@ -367,7 +367,7 @@ BitmapEx ChangePlaceholderTag::createOverlayImage( int nHighlight ) pDev = Application::GetDefaultDevice(); Size aShapeSizePix = pDev->LogicToPixel(rSnapRect.GetSize()); - long nShapeSizePix = std::min(aShapeSizePix.Width(),aShapeSizePix.Height()); + ::tools::Long nShapeSizePix = std::min(aShapeSizePix.Width(),aShapeSizePix.Height()); bool bLarge = nShapeSizePix > 250; @@ -403,7 +403,7 @@ void ChangePlaceholderTag::addCustomHandles( SdrHdlList& rHandlerList ) pDev = Application::GetDefaultDevice(); Size aShapeSizePix = pDev->LogicToPixel(rSnapRect.GetSize()); - long nShapeSizePix = std::min(aShapeSizePix.Width(),aShapeSizePix.Height()); + ::tools::Long nShapeSizePix = std::min(aShapeSizePix.Width(),aShapeSizePix.Height()); if( 50 > nShapeSizePix ) return; @@ -414,8 +414,8 @@ void ChangePlaceholderTag::addCustomHandles( SdrHdlList& rHandlerList ) const int nColumns = 2; const int nRows = 2; - long all_width = nColumns * aButtonSize.Width(); - long all_height = nRows * aButtonSize.Height(); + ::tools::Long all_width = nColumns * aButtonSize.Width(); + ::tools::Long all_height = nRows * aButtonSize.Height(); Point aPos( rSnapRect.Center() ); aPos.AdjustX( -(all_width >> 1) ); diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 4e1ebe7321ad..8bfc9739e6e7 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -73,21 +73,21 @@ void ViewShell::UpdateScrollBars() { if (mpHorizontalScrollBar) { - long nW = static_cast<long>(mpContentWindow->GetVisibleWidth() * 32000); - long nX = static_cast<long>(mpContentWindow->GetVisibleX() * 32000); + ::tools::Long nW = static_cast<::tools::Long>(mpContentWindow->GetVisibleWidth() * 32000); + ::tools::Long nX = static_cast<::tools::Long>(mpContentWindow->GetVisibleX() * 32000); mpHorizontalScrollBar->SetVisibleSize(nW); mpHorizontalScrollBar->SetThumbPos(nX); nW = 32000 - nW; - long nLine = static_cast<long>(mpContentWindow->GetScrlLineWidth() * nW); - long nPage = static_cast<long>(mpContentWindow->GetScrlPageWidth() * nW); + ::tools::Long nLine = static_cast<::tools::Long>(mpContentWindow->GetScrlLineWidth() * nW); + ::tools::Long nPage = static_cast<::tools::Long>(mpContentWindow->GetScrlPageWidth() * nW); mpHorizontalScrollBar->SetLineSize(nLine); mpHorizontalScrollBar->SetPageSize(nPage); } if (mpVerticalScrollBar) { - long nH = static_cast<long>(mpContentWindow->GetVisibleHeight() * 32000); - long nY = static_cast<long>(mpContentWindow->GetVisibleY() * 32000); + ::tools::Long nH = static_cast<::tools::Long>(mpContentWindow->GetVisibleHeight() * 32000); + ::tools::Long nY = static_cast<::tools::Long>(mpContentWindow->GetVisibleY() * 32000); if(IsPageFlipMode()) // ie in zoom mode where no panning { @@ -106,8 +106,8 @@ void ViewShell::UpdateScrollBars() mpVerticalScrollBar->SetVisibleSize(nH); mpVerticalScrollBar->SetThumbPos(nY); nH = 32000 - nH; - long nLine = static_cast<long>(mpContentWindow->GetScrlLineHeight() * nH); - long nPage = static_cast<long>(mpContentWindow->GetScrlPageHeight() * nH); + ::tools::Long nLine = static_cast<::tools::Long>(mpContentWindow->GetScrlLineHeight() * nH); + ::tools::Long nPage = static_cast<::tools::Long>(mpContentWindow->GetScrlPageHeight() * nH); mpVerticalScrollBar->SetLineSize(nLine); mpVerticalScrollBar->SetPageSize(nPage); } @@ -133,7 +133,7 @@ IMPL_LINK(ViewShell, HScrollHdl, ScrollBar *, pHScroll, void ) */ void ViewShell::VirtHScrollHdl(ScrollBar* pHScroll) { - long nDelta = pHScroll->GetDelta(); + ::tools::Long nDelta = pHScroll->GetDelta(); if (nDelta == 0) return; @@ -254,7 +254,7 @@ void ViewShell::UpdateVRuler() * Scroll a specific number of lines. Is used in the automatic scrolling * (character/drag). */ -void ViewShell::ScrollLines(long nLinesX, long nLinesY) +void ViewShell::ScrollLines(::tools::Long nLinesX, ::tools::Long nLinesY) { if ( nLinesX ) { @@ -268,16 +268,16 @@ void ViewShell::ScrollLines(long nLinesX, long nLinesY) Scroll(nLinesX, nLinesY); } -void ViewShell::Scroll(long nScrollX, long nScrollY) +void ViewShell::Scroll(::tools::Long nScrollX, ::tools::Long nScrollY) { if (nScrollX) { - long nNewThumb = mpHorizontalScrollBar->GetThumbPos() + nScrollX; + ::tools::Long nNewThumb = mpHorizontalScrollBar->GetThumbPos() + nScrollX; mpHorizontalScrollBar->SetThumbPos(nNewThumb); } if (nScrollY) { - long nNewThumb = mpVerticalScrollBar->GetThumbPos() + nScrollY; + ::tools::Long nNewThumb = mpVerticalScrollBar->GetThumbPos() + nScrollY; mpVerticalScrollBar->SetThumbPos(nNewThumb); } double fX = static_cast<double>(mpHorizontalScrollBar->GetThumbPos()) / @@ -312,7 +312,7 @@ void ViewShell::Scroll(long nScrollX, long nScrollY) /** * Set zoom factor for all split windows. */ -void ViewShell::SetZoom(long nZoom) +void ViewShell::SetZoom(::tools::Long nZoom) { Fraction aUIScale(nZoom, 100); aUIScale *= GetDoc()->GetUIScale(); @@ -347,7 +347,7 @@ void ViewShell::SetZoom(long nZoom) UpdateScrollBars(); } -long ViewShell::GetZoom() const +::tools::Long ViewShell::GetZoom() const { if (mpContentWindow) { @@ -363,7 +363,7 @@ long ViewShell::GetZoom() const */ void ViewShell::SetZoomRect(const ::tools::Rectangle& rZoomRect) { - long nZoom = GetActiveWindow()->SetZoomRect(rZoomRect); + ::tools::Long nZoom = GetActiveWindow()->SetZoomRect(rZoomRect); Fraction aUIScale(nZoom, 100); aUIScale *= GetDoc()->GetUIScale(); @@ -454,8 +454,8 @@ void ViewShell::DrawMarkRect(const ::tools::Rectangle& rRect) const } void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, - long nLeft, long nRight, - long nUpper, long nLower, bool bScaleAll, + ::tools::Long nLeft, ::tools::Long nRight, + ::tools::Long nUpper, ::tools::Long nLower, bool bScaleAll, Orientation eOrientation, sal_uInt16 nPaperBin, bool bBackgroundFullSize) { @@ -506,8 +506,8 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, SdPage* pPage(0 != nPageCnt ? GetDoc()->GetSdPage(0, ePageKind) : GetDoc()->GetMasterSdPage(0, ePageKind)); - const long nWidth(pPage->GetSize().Width()); - const long nHeight(pPage->GetSize().Height()); + const ::tools::Long nWidth(pPage->GetSize().Width()); + const ::tools::Long nHeight(pPage->GetSize().Height()); const Point aPageOrg(nWidth, nHeight / 2); const Size aViewSize(nWidth * 3, nHeight * 2); Point aVisAreaPos; @@ -548,7 +548,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, */ void ViewShell::SetZoomFactor(const Fraction& rZoomX, const Fraction&) { - long nZoom = static_cast<long>(static_cast<double>(rZoomX) * 100); + ::tools::Long nZoom = static_cast<::tools::Long>(static_cast<double>(rZoomX) * 100); SetZoom(nZoom); } @@ -627,7 +627,7 @@ void ViewShell::WriteFrameViewData() { } -bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) +bool ViewShell::ActivateObject(SdrOle2Obj* pObj, ::tools::Long nVerb) { ErrCode aErrCode = ERRCODE_NONE; diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index a5d1cb22f140..691e5f8a0963 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -695,7 +695,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi const CommandWheelData* pData = rCEvt.GetWheelData(); if( pData && !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) && !pData->IsHorz() ) { - long nDelta = pData->GetDelta(); + ::tools::Long nDelta = pData->GetDelta(); if( nDelta > 0 ) xSlideShowController->gotoPreviousSlide(); else if( nDelta < 0 ) @@ -716,8 +716,8 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi { if( !GetDocSh()->IsUIActive() ) { - const long nOldZoom = GetActiveWindow()->GetZoom(); - long nNewZoom; + const ::tools::Long nOldZoom = GetActiveWindow()->GetZoom(); + ::tools::Long nNewZoom; Point aOldMousePos = GetActiveWindow()->PixelToLogic(rCEvt.GetMousePosPixel()); if( pData->GetDelta() < 0 ) @@ -768,7 +768,7 @@ void ViewShell::SetupRulers() if(!mbHasRulers || !mpContentWindow || SlideShow::IsRunning(GetViewShellBase())) return; - long nHRulerOfs = 0; + ::tools::Long nHRulerOfs = 0; if ( !mpVerticalRuler ) { @@ -937,10 +937,10 @@ void ViewShell::ArrangeGUIElements() mpImpl->mbArrangeActive = true; // Calculate border for in-place editing. - long nLeft = maViewPos.X(); - long nTop = maViewPos.Y(); - long nRight = maViewPos.X() + maViewSize.Width(); - long nBottom = maViewPos.Y() + maViewSize.Height(); + ::tools::Long nLeft = maViewPos.X(); + ::tools::Long nTop = maViewPos.Y(); + ::tools::Long nRight = maViewPos.X() + maViewSize.Width(); + ::tools::Long nBottom = maViewPos.Y() + maViewSize.Height(); // Horizontal scrollbar. if (mpHorizontalScrollBar @@ -1397,7 +1397,7 @@ SdDrawDocument* ViewShell::GetDoc() const return GetViewShellBase().GetDocument(); } -ErrCode ViewShell::DoVerb (long ) +ErrCode ViewShell::DoVerb (::tools::Long ) { return ERRCODE_NONE; } |