summaryrefslogtreecommitdiff
path: root/sd/source/ui/func
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-21 15:31:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-23 08:48:52 +0200
commit0d79d216886a71436e705c93829ed66a33270a9c (patch)
treeef29702266bca9df9f39b442505479b013891517 /sd/source/ui/func
parente8205f38c611cfc97ca0e32c911b3d373a94d230 (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/func')
-rw-r--r--sd/source/ui/func/fucon3d.cxx2
-rw-r--r--sd/source/ui/func/fuconarc.cxx4
-rw-r--r--sd/source/ui/func/fuconrec.cxx8
-rw-r--r--sd/source/ui/func/fucopy.cxx14
-rw-r--r--sd/source/ui/func/fudraw.cxx2
-rw-r--r--sd/source/ui/func/fuediglu.cxx4
-rw-r--r--sd/source/ui/func/fulinend.cxx8
-rw-r--r--sd/source/ui/func/fumorph.cxx6
-rw-r--r--sd/source/ui/func/fuparagr.cxx2
-rw-r--r--sd/source/ui/func/fupoor.cxx4
-rw-r--r--sd/source/ui/func/fusel.cxx10
-rw-r--r--sd/source/ui/func/fusldlg.cxx4
-rw-r--r--sd/source/ui/func/fuzoom.cxx2
-rw-r--r--sd/source/ui/func/sdundogr.cxx6
14 files changed, 38 insertions, 38 deletions
diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx
index f8cfa6a1ffe2..81d4919928b0 100644
--- a/sd/source/ui/func/fucon3d.cxx
+++ b/sd/source/ui/func/fucon3d.cxx
@@ -389,7 +389,7 @@ SdrObjectUniquePtr FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID
basegfx::B3DRange aVolume(aObjVol);
double fW(aVolume.getWidth());
double fH(aVolume.getHeight());
- ::tools::Rectangle a3DRect(0, 0, static_cast<long>(fW), static_cast<long>(fH));
+ ::tools::Rectangle a3DRect(0, 0, static_cast<::tools::Long>(fW), static_cast<::tools::Long>(fH));
std::unique_ptr< E3dScene, SdrObjectFreeOp > pScene(new E3dScene(*mpDoc));
// copied code from E3dView::InitScene
diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx
index 8a968d351051..e42db7025863 100644
--- a/sd/source/ui/func/fuconarc.cxx
+++ b/sd/source/ui/func/fuconarc.cxx
@@ -94,8 +94,8 @@ void FuConstructArc::DoExecute( SfxRequest& rReq )
mpView->getSdrModelFromSdrView(),
ToSdrCircKind(static_cast<SdrObjKind>(mpView->GetCurrentObjIdentifier())),
aNewRectangle,
- static_cast<long>(pPhiStart->GetValue () * 10.0),
- static_cast<long>(pPhiEnd->GetValue () * 10.0));
+ static_cast<::tools::Long>(pPhiStart->GetValue () * 10.0),
+ static_cast<::tools::Long>(pPhiEnd->GetValue () * 10.0));
SdrPageView *pPV = mpView->GetSdrPageView();
mpView->InsertObjectAtView(pNewCircle, *pPV, SdrInsertFlags::SETDEFLAYER);
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index c0adb2266891..b74547587fc3 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -655,8 +655,8 @@ static ::basegfx::B2DPolyPolygon getPolygon(const char* pResId, const SdrModel&
if( pLineEndList.is() )
{
OUString aArrowName(SvxResId(pResId));
- long nCount = pLineEndList->Count();
- long nIndex;
+ ::tools::Long nCount = pLineEndList->Count();
+ ::tools::Long nIndex;
for( nIndex = 0; nIndex < nCount; nIndex++ )
{
const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nIndex);
@@ -730,12 +730,12 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject const & rObj
// #i3908# Here, the default Line Start/End width for arrow construction is
// set. To have the same value in all situations (construction) in i3908
// it was decided to change the default to 0.03 cm for all situations.
- long nWidth = 300; // (1/100th mm)
+ ::tools::Long nWidth = 300; // (1/100th mm)
// determine line width and calculate with it the line end width
if( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE )
{
- long nValue = aSet.Get( XATTR_LINEWIDTH ).GetValue();
+ ::tools::Long nValue = aSet.Get( XATTR_LINEWIDTH ).GetValue();
if( nValue > 0 )
nWidth = nValue * 3;
}
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index d0461367ca56..8a10daaec5d6 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -183,14 +183,14 @@ void FuCopy::DoExecute( SfxRequest& rReq )
if( lWidth < 0 )
{
- long nTmp = ( aRect.Right() - aRect.Left() ) / -lWidth;
- nNumber = static_cast<sal_uInt16>(std::min( nTmp, static_cast<long>(nNumber) ));
+ ::tools::Long nTmp = ( aRect.Right() - aRect.Left() ) / -lWidth;
+ nNumber = static_cast<sal_uInt16>(std::min( nTmp, static_cast<::tools::Long>(nNumber) ));
}
if( lHeight < 0 )
{
- long nTmp = ( aRect.Bottom() - aRect.Top() ) / -lHeight;
- nNumber = static_cast<sal_uInt16>(std::min( nTmp, static_cast<long>(nNumber) ));
+ ::tools::Long nTmp = ( aRect.Bottom() - aRect.Top() ) / -lHeight;
+ nNumber = static_cast<sal_uInt16>(std::min( nTmp, static_cast<::tools::Long>(nNumber) ));
}
for( sal_uInt16 i = 1; i <= nNumber; i++ )
@@ -260,9 +260,9 @@ void FuCopy::DoExecute( SfxRequest& rReq )
if( bColor )
{
// probably room for optimizations, but may can lead to rounding errors
- sal_uInt8 nRed = aStartColor.GetRed() + static_cast<sal_uInt8>( ( static_cast<long>(aEndColor.GetRed()) - static_cast<long>(aStartColor.GetRed()) ) * static_cast<long>(i) / static_cast<long>(nNumber) );
- sal_uInt8 nGreen = aStartColor.GetGreen() + static_cast<sal_uInt8>( ( static_cast<long>(aEndColor.GetGreen()) - static_cast<long>(aStartColor.GetGreen()) ) * static_cast<long>(i) / static_cast<long>(nNumber) );
- sal_uInt8 nBlue = aStartColor.GetBlue() + static_cast<sal_uInt8>( ( static_cast<long>(aEndColor.GetBlue()) - static_cast<long>(aStartColor.GetBlue()) ) * static_cast<long>(i) / static_cast<long>(nNumber) );
+ sal_uInt8 nRed = aStartColor.GetRed() + static_cast<sal_uInt8>( ( static_cast<::tools::Long>(aEndColor.GetRed()) - static_cast<::tools::Long>(aStartColor.GetRed()) ) * static_cast<::tools::Long>(i) / static_cast<::tools::Long>(nNumber) );
+ sal_uInt8 nGreen = aStartColor.GetGreen() + static_cast<sal_uInt8>( ( static_cast<::tools::Long>(aEndColor.GetGreen()) - static_cast<::tools::Long>(aStartColor.GetGreen()) ) * static_cast<::tools::Long>(i) / static_cast<::tools::Long>(nNumber) );
+ sal_uInt8 nBlue = aStartColor.GetBlue() + static_cast<sal_uInt8>( ( static_cast<::tools::Long>(aEndColor.GetBlue()) - static_cast<::tools::Long>(aStartColor.GetBlue()) ) * static_cast<::tools::Long>(i) / static_cast<::tools::Long>(nNumber) );
Color aNewColor( nRed, nGreen, nBlue );
SfxItemSet aNewSet( mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR>{} );
aNewSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 46988c5f435f..0babe0a565c0 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -590,7 +590,7 @@ bool FuDraw::SetPointer(const SdrObject* pObj, const Point& rPos)
const SdrLayerIDSet* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers();
sal_uInt16 nHitLog(sal_uInt16(mpWindow->PixelToLogic(Size(HITPIX, 0)).Width()));
- long n2HitLog(nHitLog * 2);
+ ::tools::Long n2HitLog(nHitLog * 2);
Point aHitPosR(rPos);
Point aHitPosL(rPos);
Point aHitPosT(rPos);
diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx
index 678582736ceb..efbf255f3ef2 100644
--- a/sd/source/ui/func/fuediglu.cxx
+++ b/sd/source/ui/func/fuediglu.cxx
@@ -270,8 +270,8 @@ bool FuEditGluePoints::KeyInput(const KeyEvent& rKEvt)
case KEY_RIGHT:
{
if(rKEvt.GetKeyCode().IsShift()&& mpView->IsInsGluePointMode() ){
- long nX = 0;
- long nY = 0;
+ ::tools::Long nX = 0;
+ ::tools::Long nY = 0;
sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
if (nCode == KEY_UP)
{
diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index 8d3886a6be4d..20280ec205f2 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -96,15 +96,15 @@ void FuLineEnd::DoExecute( SfxRequest& )
OUString aDesc( SdResId( STR_DESC_LINEEND ) );
OUString aName;
- long nCount = pLineEndList->Count();
- long j = 1;
+ ::tools::Long nCount = pLineEndList->Count();
+ ::tools::Long j = 1;
bool bDifferent = false;
while( !bDifferent )
{
aName = aNewName + " " + OUString::number(j++);
bDifferent = true;
- for( long i = 0; i < nCount && bDifferent; i++ )
+ for( ::tools::Long i = 0; i < nCount && bDifferent; i++ )
{
if( aName == pLineEndList->GetLineEnd( i )->GetName() )
bDifferent = false;
@@ -122,7 +122,7 @@ void FuLineEnd::DoExecute( SfxRequest& )
pDlg->GetName( aName );
bDifferent = true;
- for( long i = 0; i < nCount && bDifferent; i++ )
+ for( ::tools::Long i = 0; i < nCount && bDifferent; i++ )
{
if( aName == pLineEndList->GetLineEnd( i )->GetName() )
bDifferent = false;
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index 812d2d68b484..9755b7ae3a20 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -328,8 +328,8 @@ void FuMorph::ImpInsertPolygons(
Color aEndFillCol;
Color aStartLineCol;
Color aEndLineCol;
- long nStartLineWidth = 0;
- long nEndLineWidth = 0;
+ ::tools::Long nStartLineWidth = 0;
+ ::tools::Long nEndLineWidth = 0;
SdrPageView* pPageView = mpView->GetSdrPageView();
SfxItemPool & rPool = pObj1->GetObjectItemPool();
SfxItemSet aSet1( rPool,svl::Items<SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,EE_ITEMS_START,EE_ITEMS_END>{} );
@@ -415,7 +415,7 @@ void FuMorph::ImpInsertPolygons(
// line width
if ( bLineWidth )
- aSet.Put( XLineWidthItem( nStartLineWidth + static_cast<long>( fFactor * fDelta + 0.5 ) ) );
+ aSet.Put( XLineWidthItem( nStartLineWidth + static_cast<::tools::Long>( fFactor * fDelta + 0.5 ) ) );
pNewObj->SetMergedItemSetAndBroadcast(aSet);
diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx
index 6a455f5d1e87..19560db03da1 100644
--- a/sd/source/ui/func/fuparagr.cxx
+++ b/sd/source/ui/func/fuparagr.cxx
@@ -75,7 +75,7 @@ void FuParagraph::DoExecute( SfxRequest& rReq )
aNewAttr.Put( aEditAttr );
// left border is offset
- const long nOff = aNewAttr.Get( EE_PARA_LRSPACE ).GetTextLeft();
+ const ::tools::Long nOff = aNewAttr.Get( EE_PARA_LRSPACE ).GetTextLeft();
// conversion since TabulatorTabPage always uses Twips!
SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff );
aNewAttr.Put( aOff );
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index 47225d7bb2c5..3b0a81870672 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -561,8 +561,8 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
{
if (!mpView->IsTextEdit() && !bSlideShow)
{
- long nX = 0;
- long nY = 0;
+ ::tools::Long nX = 0;
+ ::tools::Long nY = 0;
if (nCode == KEY_UP)
{
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index baa6c6b9e3ad..904696bb063a 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -169,7 +169,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
mpWindow->CaptureMouse();
pHdl = mpView->PickHandle(aMDPos);
- long nAngle0 = GetAngle(aMDPos - mpView->GetRef1());
+ ::tools::Long nAngle0 = GetAngle(aMDPos - mpView->GetRef1());
nAngle0 -= 27000;
nAngle0 = NormAngle36000(nAngle0);
bMirrorSide0 = nAngle0 < 18000;
@@ -742,7 +742,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
* If 3D-rotation bodies are about to be created,
* end creation now
**********************************************************/
- long nAngle1 = GetAngle(aPnt - mpView->GetRef1());
+ ::tools::Long nAngle1 = GetAngle(aPnt - mpView->GetRef1());
nAngle1 -= 27000;
nAngle1 = NormAngle36000(nAngle1);
bool bMirrorSide1 = nAngle1 < 18000;
@@ -940,8 +940,8 @@ bool FuSelection::KeyInput(const KeyEvent& rKEvt)
case KEY_RIGHT:
{
if(rKEvt.GetKeyCode().IsShift()&&(nEditMode == SID_BEZIER_INSERT)){
- long nX = 0;
- long nY = 0;
+ ::tools::Long nX = 0;
+ ::tools::Long nY = 0;
sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
if (nCode == KEY_UP)
{
@@ -1217,7 +1217,7 @@ bool FuSelection::HandleImageMapClick(const SdrObject* pObj, const Point& rPos)
const SdrLayerIDSet* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers();
sal_uInt16 nHitLog = sal_uInt16(mpWindow->PixelToLogic(Size(HITPIX, 0)).Width());
- const long n2HitLog = nHitLog * 2;
+ const ::tools::Long n2HitLog = nHitLog * 2;
Point aHitPosR(rPos);
Point aHitPosL(rPos);
Point aHitPosT(rPos);
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index 5722eb3798d9..484aa5f1f9b7 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -64,7 +64,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
const OUString& rPresPage = rPresentationSettings.maPresPage;
OUString aFirstPage;
SdPage* pPage = nullptr;
- long nPage;
+ ::tools::Long nPage;
for( nPage = mpDoc->GetSdPageCount( PageKind::Standard ) - 1; nPage >= 0; nPage-- )
{
@@ -111,7 +111,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
if( pDlg->Execute() != RET_OK )
return;
- long nValue32;
+ ::tools::Long nValue32;
bool bValue;
bool bValuesChanged = false;
diff --git a/sd/source/ui/func/fuzoom.cxx b/sd/source/ui/func/fuzoom.cxx
index dd2901cb7e42..aa5395267183 100644
--- a/sd/source/ui/func/fuzoom.cxx
+++ b/sd/source/ui/func/fuzoom.cxx
@@ -156,7 +156,7 @@ bool FuZoom::MouseButtonUp(const MouseEvent& rMEvt)
Size aZoomSizePixel = mpWindow->LogicToPixel(aZoomRect).GetSize();
sal_uLong nTol = DRGPIX + DRGPIX;
- if ( ( aZoomSizePixel.Width() < static_cast<long>(nTol) && aZoomSizePixel.Height() < static_cast<long>(nTol) ) || rMEvt.IsMod1() )
+ if ( ( aZoomSizePixel.Width() < static_cast<::tools::Long>(nTol) && aZoomSizePixel.Height() < static_cast<::tools::Long>(nTol) ) || rMEvt.IsMod1() )
{
// click at place: double zoom factor
Point aPos = mpWindow->PixelToLogic(aPosPix);
diff --git a/sd/source/ui/func/sdundogr.cxx b/sd/source/ui/func/sdundogr.cxx
index 37b243f2b208..497c27c8d6c7 100644
--- a/sd/source/ui/func/sdundogr.cxx
+++ b/sd/source/ui/func/sdundogr.cxx
@@ -18,7 +18,7 @@
*/
#include <sdundogr.hxx>
-
+#include <tools/long.hxx>
SdUndoGroup::~SdUndoGroup() = default;
@@ -45,8 +45,8 @@ bool SdUndoGroup::Merge( SfxUndoAction* pNextAction )
*/
void SdUndoGroup::Undo()
{
- long nLast = aCtn.size();
- for (long nAction = nLast - 1; nAction >= 0; nAction--)
+ ::tools::Long nLast = aCtn.size();
+ for (::tools::Long nAction = nLast - 1; nAction >= 0; nAction--)
{
aCtn[nAction]->Undo();
}