summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-12 09:52:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-26 07:35:36 +0100
commit4fbd63860500b2db76df4d5aedbe5e3aa31fac69 (patch)
tree5fa96dc262ba651e82244b0f9e508f79e88ea2df /svx
parent62fa5bb8c1299469eacc21cb35ee670b65120713 (diff)
switching long to a 64-bit type on 64-bit windows
(*) create a rewriting plugin to do most of the work, heavily based on the fakebool plugin (*) but there are still a number of "long"s in the codebase that will need to be done by hand (*) the plugin needs lots of handholding, due to needing to add #include and update macros Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/CommonStylePreviewRenderer.hxx2
-rw-r--r--svx/inc/sxallitm.hxx8
-rw-r--r--svx/inc/sxcaitm.hxx2
-rw-r--r--svx/inc/sxlogitm.hxx4
-rw-r--r--svx/inc/sxmoitm.hxx2
-rw-r--r--svx/inc/sxmtaitm.hxx2
-rw-r--r--svx/inc/sxoneitm.hxx8
-rw-r--r--svx/inc/sxsaitm.hxx2
-rw-r--r--svx/inc/sxtraitm.hxx8
-rw-r--r--svx/qa/unit/customshapes.cxx4
-rw-r--r--svx/source/accessibility/ChildrenManager.cxx6
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.cxx8
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.hxx8
-rw-r--r--svx/source/accessibility/DescriptionGenerator.cxx4
-rw-r--r--svx/source/accessibility/GraphCtlAccessibleContext.cxx2
-rw-r--r--svx/source/accessibility/ShapeTypeHandler.cxx4
-rw-r--r--svx/source/accessibility/lookupcolorname.cxx8
-rw-r--r--svx/source/accessibility/lookupcolorname.hxx2
-rw-r--r--svx/source/accessibility/svxpixelctlaccessiblecontext.cxx12
-rw-r--r--svx/source/accessibility/svxrectctaccessiblecontext.cxx22
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx6
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeEngine.cxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx2
-rw-r--r--svx/source/dialog/_bmpmask.cxx14
-rw-r--r--svx/source/dialog/_contdlg.cxx2
-rw-r--r--svx/source/dialog/charmap.cxx12
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx8
-rw-r--r--svx/source/dialog/connctrl.cxx12
-rw-r--r--svx/source/dialog/dialcontrol.cxx22
-rw-r--r--svx/source/dialog/dlgctrl.cxx32
-rw-r--r--svx/source/dialog/dlgunit.hxx2
-rw-r--r--svx/source/dialog/fntctrl.cxx48
-rw-r--r--svx/source/dialog/fontwork.cxx2
-rw-r--r--svx/source/dialog/framelinkarray.cxx48
-rw-r--r--svx/source/dialog/frmsel.cxx40
-rw-r--r--svx/source/dialog/graphctl.cxx12
-rw-r--r--svx/source/dialog/hdft.cxx56
-rw-r--r--svx/source/dialog/hyperdlg.cxx8
-rw-r--r--svx/source/dialog/imapdlg.cxx4
-rw-r--r--svx/source/dialog/imapwnd.cxx2
-rw-r--r--svx/source/dialog/measctrl.cxx8
-rw-r--r--svx/source/dialog/optgrid.cxx10
-rw-r--r--svx/source/dialog/pagectrl.cxx28
-rw-r--r--svx/source/dialog/paraprev.cxx12
-rw-r--r--svx/source/dialog/rubydialog.cxx32
-rw-r--r--svx/source/dialog/rulritem.cxx38
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx14
-rw-r--r--svx/source/dialog/svxruler.cxx346
-rw-r--r--svx/source/dialog/swframeexample.cxx12
-rw-r--r--svx/source/engine3d/dragmt3d.cxx8
-rw-r--r--svx/source/engine3d/obj3d.cxx2
-rw-r--r--svx/source/engine3d/scene3d.cxx10
-rw-r--r--svx/source/engine3d/view3d.cxx32
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx10
-rw-r--r--svx/source/fmcomp/gridctrl.cxx60
-rw-r--r--svx/source/form/fmvwimp.cxx12
-rw-r--r--svx/source/form/tabwin.cxx4
-rw-r--r--svx/source/gallery2/galctrl.cxx4
-rw-r--r--svx/source/gallery2/gallerybinaryengine.cxx5
-rw-r--r--svx/source/gallery2/galobj.cxx4
-rw-r--r--svx/source/inc/GraphCtlAccessibleContext.hxx2
-rw-r--r--svx/source/inc/cell.hxx8
-rw-r--r--svx/source/inc/frmselimpl.hxx12
-rw-r--r--svx/source/inc/svxpixelctlaccessiblecontext.hxx8
-rw-r--r--svx/source/inc/svxrectctaccessiblecontext.hxx10
-rw-r--r--svx/source/items/algitem.cxx18
-rw-r--r--svx/source/items/numfmtsh.cxx6
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx8
-rw-r--r--svx/source/sdr/overlay/overlaymanager.cxx8
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanelBase.cxx4
-rw-r--r--svx/source/sidebar/inspector/InspectorTextPanel.cxx2
-rw-r--r--svx/source/sidebar/line/LinePropertyPanelBase.cxx4
-rw-r--r--svx/source/sidebar/line/LineWidthPopup.cxx8
-rw-r--r--svx/source/sidebar/line/LineWidthValueSet.cxx4
-rw-r--r--svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx4
-rw-r--r--svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx3
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.cxx16
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.hxx6
-rw-r--r--svx/source/sidebar/paragraph/ParaSpacingWindow.cxx6
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx42
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.hxx4
-rw-r--r--svx/source/sidebar/shadow/ShadowPropertyPanel.cxx2
-rw-r--r--svx/source/sidebar/shadow/ShadowPropertyPanel.hxx4
-rw-r--r--svx/source/sidebar/text/TextCharacterSpacingControl.cxx10
-rw-r--r--svx/source/sidebar/text/TextCharacterSpacingControl.hxx4
-rw-r--r--svx/source/sidebar/tools/ValueSetWithTextControl.cxx4
-rw-r--r--svx/source/stbctrls/modctrl.cxx4
-rw-r--r--svx/source/stbctrls/pszctrl.cxx4
-rw-r--r--svx/source/stbctrls/xmlsecctrl.cxx2
-rw-r--r--svx/source/stbctrls/zoomsliderctrl.cxx72
-rw-r--r--svx/source/styles/CommonStyleManager.cxx2
-rw-r--r--svx/source/styles/CommonStylePreviewRenderer.cxx2
-rw-r--r--svx/source/svdraw/sdrpagewindow.cxx16
-rw-r--r--svx/source/svdraw/svdattr.cxx8
-rw-r--r--svx/source/svdraw/svddrag.cxx14
-rw-r--r--svx/source/svdraw/svddrgm1.hxx14
-rw-r--r--svx/source/svdraw/svddrgmt.cxx54
-rw-r--r--svx/source/svdraw/svdedtv1.cxx134
-rw-r--r--svx/source/svdraw/svdedxv.cxx8
-rw-r--r--svx/source/svdraw/svdfmtf.cxx14
-rw-r--r--svx/source/svdraw/svdglev.cxx2
-rw-r--r--svx/source/svdraw/svdglue.cxx44
-rw-r--r--svx/source/svdraw/svdhdl.cxx6
-rw-r--r--svx/source/svdraw/svdmodel.cxx16
-rw-r--r--svx/source/svdraw/svdmrkv.cxx24
-rw-r--r--svx/source/svdraw/svdoashp.cxx62
-rw-r--r--svx/source/svdraw/svdobj.cxx78
-rw-r--r--svx/source/svdraw/svdocapt.cxx10
-rw-r--r--svx/source/svdraw/svdocirc.cxx74
-rw-r--r--svx/source/svdraw/svdoedge.cxx100
-rw-r--r--svx/source/svdraw/svdograf.cxx16
-rw-r--r--svx/source/svdraw/svdogrp.cxx32
-rw-r--r--svx/source/svdraw/svdomeas.cxx124
-rw-r--r--svx/source/svdraw/svdomedia.cxx4
-rw-r--r--svx/source/svdraw/svdoole2.cxx20
-rw-r--r--svx/source/svdraw/svdopath.cxx124
-rw-r--r--svx/source/svdraw/svdorect.cxx14
-rw-r--r--svx/source/svdraw/svdotext.cxx74
-rw-r--r--svx/source/svdraw/svdotxat.cxx16
-rw-r--r--svx/source/svdraw/svdotxdr.cxx24
-rw-r--r--svx/source/svdraw/svdotxed.cxx12
-rw-r--r--svx/source/svdraw/svdotxtr.cxx24
-rw-r--r--svx/source/svdraw/svdovirt.cxx12
-rw-r--r--svx/source/svdraw/svdpagv.cxx44
-rw-r--r--svx/source/svdraw/svdpntv.cxx10
-rw-r--r--svx/source/svdraw/svdpoev.cxx2
-rw-r--r--svx/source/svdraw/svdsnpv.cxx46
-rw-r--r--svx/source/svdraw/svdtrans.cxx110
-rw-r--r--svx/source/svdraw/svdview.cxx4
-rw-r--r--svx/source/svdraw/svdxcgv.cxx4
-rw-r--r--svx/source/table/cell.cxx8
-rw-r--r--svx/source/table/svdotable.cxx4
-rw-r--r--svx/source/table/tablertfexporter.cxx4
-rw-r--r--svx/source/table/tablertfimporter.cxx4
-rw-r--r--svx/source/tbxctrls/PaletteManager.cxx4
-rw-r--r--svx/source/tbxctrls/SvxPresetListBox.cxx2
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx4
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx4
-rw-r--r--svx/source/tbxctrls/itemwin.cxx20
-rw-r--r--svx/source/tbxctrls/layctrl.cxx68
-rw-r--r--svx/source/tbxctrls/linectrl.cxx8
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx40
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx12
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx2
-rw-r--r--svx/source/tbxctrls/tbxcolorupdate.cxx2
-rw-r--r--svx/source/uitest/sdrobject.cxx12
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx12
-rw-r--r--svx/source/unodraw/XPropertyTable.cxx26
-rw-r--r--svx/source/unodraw/unoctabl.cxx12
-rw-r--r--svx/source/unodraw/unopage.cxx4
-rw-r--r--svx/source/unodraw/unoshap3.cxx2
-rw-r--r--svx/source/unodraw/unoshape.cxx14
-rw-r--r--svx/source/xoutdev/_xpoly.cxx66
-rw-r--r--svx/source/xoutdev/xattr.cxx30
-rw-r--r--svx/source/xoutdev/xattr2.cxx4
-rw-r--r--svx/source/xoutdev/xtabbtmp.cxx12
-rw-r--r--svx/source/xoutdev/xtabcolr.cxx10
-rw-r--r--svx/source/xoutdev/xtabdash.cxx6
-rw-r--r--svx/source/xoutdev/xtabgrdt.cxx10
-rw-r--r--svx/source/xoutdev/xtabhtch.cxx10
-rw-r--r--svx/source/xoutdev/xtable.cxx18
-rw-r--r--svx/source/xoutdev/xtablend.cxx4
-rw-r--r--svx/source/xoutdev/xtabptrn.cxx12
164 files changed, 1623 insertions, 1621 deletions
diff --git a/svx/inc/CommonStylePreviewRenderer.hxx b/svx/inc/CommonStylePreviewRenderer.hxx
index 6d4466b31bf3..1c21db99b378 100644
--- a/svx/inc/CommonStylePreviewRenderer.hxx
+++ b/svx/inc/CommonStylePreviewRenderer.hxx
@@ -36,7 +36,7 @@ class CommonStylePreviewRenderer final : public sfx2::StylePreviewRenderer
public:
CommonStylePreviewRenderer(const SfxObjectShell& rShell, OutputDevice& rOutputDev,
- SfxStyleSheetBase* pStyle, long nMaxHeight);
+ SfxStyleSheetBase* pStyle, tools::Long nMaxHeight);
virtual ~CommonStylePreviewRenderer() override;
virtual bool recalculate() override;
diff --git a/svx/inc/sxallitm.hxx b/svx/inc/sxallitm.hxx
index ac0aedc78e9e..a02f95b06361 100644
--- a/svx/inc/sxallitm.hxx
+++ b/svx/inc/sxallitm.hxx
@@ -24,7 +24,7 @@
class SdrAllPositionXItem: public SdrMetricItem {
public:
- SdrAllPositionXItem(long nPosX=0): SdrMetricItem(SDRATTR_ALLPOSITIONX,nPosX) {}
+ SdrAllPositionXItem(tools::Long nPosX=0): SdrMetricItem(SDRATTR_ALLPOSITIONX,nPosX) {}
virtual SdrAllPositionXItem* Clone(SfxItemPool*) const override
{
return new SdrAllPositionXItem(*this);
@@ -33,7 +33,7 @@ public:
class SdrAllPositionYItem: public SdrMetricItem {
public:
- SdrAllPositionYItem(long nPosY=0): SdrMetricItem(SDRATTR_ALLPOSITIONY,nPosY) {}
+ SdrAllPositionYItem(tools::Long nPosY=0): SdrMetricItem(SDRATTR_ALLPOSITIONY,nPosY) {}
virtual SdrAllPositionYItem* Clone(SfxItemPool*) const override
{
return new SdrAllPositionYItem(*this);
@@ -42,7 +42,7 @@ public:
class SdrAllSizeWidthItem: public SdrMetricItem {
public:
- SdrAllSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_ALLSIZEWIDTH,nWdt) {}
+ SdrAllSizeWidthItem(tools::Long nWdt=0): SdrMetricItem(SDRATTR_ALLSIZEWIDTH,nWdt) {}
virtual SdrAllSizeWidthItem* Clone(SfxItemPool*) const override
{
return new SdrAllSizeWidthItem(*this);
@@ -51,7 +51,7 @@ public:
class SdrAllSizeHeightItem: public SdrMetricItem {
public:
- SdrAllSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_ALLSIZEHEIGHT,nHgt) {}
+ SdrAllSizeHeightItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_ALLSIZEHEIGHT,nHgt) {}
virtual SdrAllSizeHeightItem* Clone(SfxItemPool*) const override
{
return new SdrAllSizeHeightItem(*this);
diff --git a/svx/inc/sxcaitm.hxx b/svx/inc/sxcaitm.hxx
index fc36d007604a..8ffaec240f30 100644
--- a/svx/inc/sxcaitm.hxx
+++ b/svx/inc/sxcaitm.hxx
@@ -34,7 +34,7 @@
class SdrCaptionAngleItem final : public SdrAngleItem {
public:
- SdrCaptionAngleItem(long nAngle=0): SdrAngleItem(SDRATTR_CAPTIONANGLE,nAngle) {}
+ SdrCaptionAngleItem(tools::Long nAngle=0): SdrAngleItem(SDRATTR_CAPTIONANGLE,nAngle) {}
virtual SdrCaptionAngleItem* Clone(SfxItemPool*) const override
{
return new SdrCaptionAngleItem(*this);
diff --git a/svx/inc/sxlogitm.hxx b/svx/inc/sxlogitm.hxx
index 70fe78c00131..46a18b6f8db5 100644
--- a/svx/inc/sxlogitm.hxx
+++ b/svx/inc/sxlogitm.hxx
@@ -24,7 +24,7 @@
class SdrLogicSizeWidthItem: public SdrMetricItem {
public:
- SdrLogicSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_LOGICSIZEWIDTH,nWdt) {}
+ SdrLogicSizeWidthItem(tools::Long nWdt=0): SdrMetricItem(SDRATTR_LOGICSIZEWIDTH,nWdt) {}
virtual SdrLogicSizeWidthItem* Clone(SfxItemPool*) const override
{
return new SdrLogicSizeWidthItem(*this);
@@ -33,7 +33,7 @@ public:
class SdrLogicSizeHeightItem: public SdrMetricItem {
public:
- SdrLogicSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_LOGICSIZEHEIGHT,nHgt) {}
+ SdrLogicSizeHeightItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_LOGICSIZEHEIGHT,nHgt) {}
virtual SdrLogicSizeHeightItem* Clone(SfxItemPool*) const override
{
return new SdrLogicSizeHeightItem(*this);
diff --git a/svx/inc/sxmoitm.hxx b/svx/inc/sxmoitm.hxx
index 0b50536dd747..db4989134990 100644
--- a/svx/inc/sxmoitm.hxx
+++ b/svx/inc/sxmoitm.hxx
@@ -26,7 +26,7 @@
// Only of the measure arrows are on the outside
class SdrMeasureOverhangItem: public SdrMetricItem {
public:
- SdrMeasureOverhangItem(long nVal): SdrMetricItem(SDRATTR_MEASUREOVERHANG,nVal) {}
+ SdrMeasureOverhangItem(tools::Long nVal): SdrMetricItem(SDRATTR_MEASUREOVERHANG,nVal) {}
virtual SdrMeasureOverhangItem* Clone(SfxItemPool*) const override
{
return new SdrMeasureOverhangItem(*this);
diff --git a/svx/inc/sxmtaitm.hxx b/svx/inc/sxmtaitm.hxx
index 5c224d489951..ed2c3f440829 100644
--- a/svx/inc/sxmtaitm.hxx
+++ b/svx/inc/sxmtaitm.hxx
@@ -38,7 +38,7 @@ public:
// Angle in 1/100deg from viewpoint of the user.
class SdrMeasureTextAutoAngleViewItem final : public SdrAngleItem {
public:
- SdrMeasureTextAutoAngleViewItem(long nVal=31500): SdrAngleItem(SDRATTR_MEASURETEXTAUTOANGLEVIEW,nVal) {}
+ SdrMeasureTextAutoAngleViewItem(tools::Long nVal=31500): SdrAngleItem(SDRATTR_MEASURETEXTAUTOANGLEVIEW,nVal) {}
virtual SdrMeasureTextAutoAngleViewItem* Clone(SfxItemPool*) const override
{
return new SdrMeasureTextAutoAngleViewItem(*this);
diff --git a/svx/inc/sxoneitm.hxx b/svx/inc/sxoneitm.hxx
index 516a93b919b2..0799c94b1b71 100644
--- a/svx/inc/sxoneitm.hxx
+++ b/svx/inc/sxoneitm.hxx
@@ -24,7 +24,7 @@
class SdrOnePositionXItem: public SdrMetricItem {
public:
- SdrOnePositionXItem(long nPosX=0): SdrMetricItem(SDRATTR_ONEPOSITIONX,nPosX) {}
+ SdrOnePositionXItem(tools::Long nPosX=0): SdrMetricItem(SDRATTR_ONEPOSITIONX,nPosX) {}
virtual SdrOnePositionXItem* Clone(SfxItemPool*) const override
{
return new SdrOnePositionXItem(*this);
@@ -33,7 +33,7 @@ public:
class SdrOnePositionYItem: public SdrMetricItem {
public:
- SdrOnePositionYItem(long nPosY=0): SdrMetricItem(SDRATTR_ONEPOSITIONY,nPosY) {}
+ SdrOnePositionYItem(tools::Long nPosY=0): SdrMetricItem(SDRATTR_ONEPOSITIONY,nPosY) {}
virtual SdrOnePositionYItem* Clone(SfxItemPool*) const override
{
return new SdrOnePositionYItem(*this);
@@ -42,7 +42,7 @@ public:
class SdrOneSizeWidthItem: public SdrMetricItem {
public:
- SdrOneSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_ONESIZEWIDTH,nWdt) {}
+ SdrOneSizeWidthItem(tools::Long nWdt=0): SdrMetricItem(SDRATTR_ONESIZEWIDTH,nWdt) {}
virtual SdrOneSizeWidthItem* Clone(SfxItemPool*) const override
{
return new SdrOneSizeWidthItem(*this);
@@ -51,7 +51,7 @@ public:
class SdrOneSizeHeightItem: public SdrMetricItem {
public:
- SdrOneSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_ONESIZEHEIGHT,nHgt) {}
+ SdrOneSizeHeightItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_ONESIZEHEIGHT,nHgt) {}
virtual SdrOneSizeHeightItem* Clone(SfxItemPool*) const override
{
return new SdrOneSizeHeightItem(*this);
diff --git a/svx/inc/sxsaitm.hxx b/svx/inc/sxsaitm.hxx
index ccaf50901be8..8d9fbd6a5c7f 100644
--- a/svx/inc/sxsaitm.hxx
+++ b/svx/inc/sxsaitm.hxx
@@ -24,7 +24,7 @@
class SdrShearAngleItem: public SdrAngleItem {
public:
- SdrShearAngleItem(long nAngle=0): SdrAngleItem(SDRATTR_SHEARANGLE,nAngle) {}
+ SdrShearAngleItem(tools::Long nAngle=0): SdrAngleItem(SDRATTR_SHEARANGLE,nAngle) {}
virtual SdrShearAngleItem* Clone(SfxItemPool*) const override
{
return new SdrShearAngleItem(*this);
diff --git a/svx/inc/sxtraitm.hxx b/svx/inc/sxtraitm.hxx
index 1cebff377699..d5035ffbd6b7 100644
--- a/svx/inc/sxtraitm.hxx
+++ b/svx/inc/sxtraitm.hxx
@@ -24,7 +24,7 @@
class SdrTransformRef1XItem: public SdrMetricItem {
public:
- SdrTransformRef1XItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1X,nHgt) {}
+ SdrTransformRef1XItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1X,nHgt) {}
virtual SdrTransformRef1XItem* Clone(SfxItemPool*) const override
{
return new SdrTransformRef1XItem(*this);
@@ -33,7 +33,7 @@ public:
class SdrTransformRef1YItem: public SdrMetricItem {
public:
- SdrTransformRef1YItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1Y,nHgt) {}
+ SdrTransformRef1YItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1Y,nHgt) {}
virtual SdrTransformRef1YItem* Clone(SfxItemPool*) const override
{
return new SdrTransformRef1YItem(*this);
@@ -42,7 +42,7 @@ public:
class SdrTransformRef2XItem: public SdrMetricItem {
public:
- SdrTransformRef2XItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2X,nHgt) {}
+ SdrTransformRef2XItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2X,nHgt) {}
virtual SdrTransformRef2XItem* Clone(SfxItemPool*) const override
{
return new SdrTransformRef2XItem(*this);
@@ -51,7 +51,7 @@ public:
class SdrTransformRef2YItem: public SdrMetricItem {
public:
- SdrTransformRef2YItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2Y,nHgt) {}
+ SdrTransformRef2YItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2Y,nHgt) {}
virtual SdrTransformRef2YItem* Clone(SfxItemPool*) const override
{
return new SdrTransformRef2YItem(*this);
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 763135208c92..57f1b5170b16 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -104,7 +104,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testViewBoxLeftTop)
awt::Rectangle aBoundRectLR;
xShapeLRProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectLR;
// difference should be zero, but allow some rounding errors
- CPPUNIT_ASSERT_LESS(static_cast<long>(3), labs(aFrameRectLR.X - aBoundRectLR.X));
+ CPPUNIT_ASSERT_LESS(static_cast<tools::Long>(3), labs(aFrameRectLR.X - aBoundRectLR.X));
// Get the shape "topbottom". Error was, that the identifier "top" was always set to zero, thus
// the path was outside the frame rectangle for a viewBox having a positive "top" value.
@@ -116,7 +116,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testViewBoxLeftTop)
awt::Rectangle aBoundRectTB;
xShapeTBProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectTB;
// difference should be zero, but allow some rounding errors
- CPPUNIT_ASSERT_LESS(static_cast<long>(3), labs(aFrameRectTB.Y - aBoundRectTB.Y));
+ CPPUNIT_ASSERT_LESS(static_cast<tools::Long>(3), labs(aFrameRectTB.Y - aBoundRectTB.Y));
}
CPPUNIT_TEST_FIXTURE(CustomshapesTest, testAccuracyCommandX)
diff --git a/svx/source/accessibility/ChildrenManager.cxx b/svx/source/accessibility/ChildrenManager.cxx
index 88bf9bd8cecf..c70e7f86f5f6 100644
--- a/svx/source/accessibility/ChildrenManager.cxx
+++ b/svx/source/accessibility/ChildrenManager.cxx
@@ -49,17 +49,17 @@ ChildrenManager::~ChildrenManager()
SAL_INFO("svx", "~ChildrenManager");
}
-long ChildrenManager::GetChildCount() const throw ()
+tools::Long ChildrenManager::GetChildCount() const throw ()
{
return mpImpl->GetChildCount();
}
-css::uno::Reference<XAccessible> ChildrenManager::GetChild (long nIndex)
+css::uno::Reference<XAccessible> ChildrenManager::GetChild (tools::Long nIndex)
{
return mpImpl->GetChild (nIndex);
}
-css::uno::Reference<css::drawing::XShape> ChildrenManager::GetChildShape(long nIndex)
+css::uno::Reference<css::drawing::XShape> ChildrenManager::GetChildShape(tools::Long nIndex)
{
return mpImpl->GetChildShape(nIndex);
}
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 08af808b26bf..893bc350f1f1 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -109,13 +109,13 @@ void ChildrenManagerImpl::Init()
}
-long ChildrenManagerImpl::GetChildCount() const throw ()
+tools::Long ChildrenManagerImpl::GetChildCount() const throw ()
{
return maVisibleChildren.size();
}
-css::uno::Reference<css::drawing::XShape> ChildrenManagerImpl::GetChildShape(long nIndex)
+css::uno::Reference<css::drawing::XShape> ChildrenManagerImpl::GetChildShape(tools::Long nIndex)
{
uno::Reference<XAccessible> xAcc = GetChild(nIndex);
auto I = std::find_if(maVisibleChildren.begin(), maVisibleChildren.end(),
@@ -129,7 +129,7 @@ css::uno::Reference<css::drawing::XShape> ChildrenManagerImpl::GetChildShape(lon
yet in the cache.
*/
uno::Reference<XAccessible>
- ChildrenManagerImpl::GetChild (long nIndex)
+ ChildrenManagerImpl::GetChild (tools::Long nIndex)
{
// Check whether the given index is valid.
if (nIndex < 0 || o3tl::make_unsigned(nIndex) >= maVisibleChildren.size())
@@ -710,7 +710,7 @@ void ChildrenManagerImpl::ViewForwarderChanged()
bool ChildrenManagerImpl::ReplaceChild (
AccessibleShape* pCurrentChild,
const css::uno::Reference< css::drawing::XShape >& _rxShape,
- const long /*_nIndex*/,
+ const tools::Long /*_nIndex*/,
const AccessibleShapeTreeInfo& _rShapeTreeInfo)
{
// Iterate over the visible children. If one of them has an already
diff --git a/svx/source/accessibility/ChildrenManagerImpl.hxx b/svx/source/accessibility/ChildrenManagerImpl.hxx
index e09dec4b7e6d..ecff9d0b6bf8 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.hxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.hxx
@@ -116,11 +116,11 @@ public:
@return
If there are no children a 0 is returned.
*/
- long GetChildCount() const throw ();
+ tools::Long GetChildCount() const throw ();
/// @throws css::uno::RuntimeException
/// @throws css::lang::IndexOutOfBoundsException
- css::uno::Reference<css::drawing::XShape> GetChildShape(long nIndex);
+ css::uno::Reference<css::drawing::XShape> GetChildShape(tools::Long nIndex);
/** Return the requested accessible child or throw and
IndexOutOfBoundsException if the given index is invalid.
@param nIndex
@@ -135,7 +135,7 @@ public:
Throws an IndexOutOfBoundsException if the index is not valid.
*/
css::uno::Reference<css::accessibility::XAccessible>
- GetChild (long nIndex);
+ GetChild (tools::Long nIndex);
/** Return the requested accessible child.
@param aChildDescriptor
@@ -256,7 +256,7 @@ public:
virtual bool ReplaceChild (
AccessibleShape* pCurrentChild,
const css::uno::Reference< css::drawing::XShape >& _rxShape,
- const long _nIndex,
+ const tools::Long _nIndex,
const AccessibleShapeTreeInfo& _rShapeTreeInfo
) override;
diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx
index d76918c218eb..ae2e90240baa 100644
--- a/svx/source/accessibility/DescriptionGenerator.cxx
+++ b/svx/source/accessibility/DescriptionGenerator.cxx
@@ -162,7 +162,7 @@ void DescriptionGenerator::AddColor (const OUString& sPropertyName)
try
{
- long nValue(0);
+ tools::Long nValue(0);
if (mxSet.is())
{
uno::Any aValue = mxSet->getPropertyValue (sPropertyName);
@@ -187,7 +187,7 @@ void DescriptionGenerator::AddInteger (const OUString& sPropertyName)
if (mxSet.is())
{
uno::Any aValue = mxSet->getPropertyValue (sPropertyName);
- long nValue = 0;
+ tools::Long nValue = 0;
aValue >>= nValue;
msDescription.append (nValue);
}
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 5ef5801e90c1..ffe195b4d990 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -621,7 +621,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::deselectAccessibleChild( sal_Int32
}
// internals
-void SvxGraphCtrlAccessibleContext::checkChildIndexOnSelection( long nIndex )
+void SvxGraphCtrlAccessibleContext::checkChildIndexOnSelection( tools::Long nIndex )
{
if( nIndex < 0 || nIndex >= getSelectedAccessibleChildCount() )
throw lang::IndexOutOfBoundsException();
diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx
index 133ce38bea02..79aa5807f3a6 100644
--- a/svx/source/accessibility/ShapeTypeHandler.cxx
+++ b/svx/source/accessibility/ShapeTypeHandler.cxx
@@ -168,7 +168,7 @@ void ShapeTypeHandler::AddShapeTypeList (int nDescriptorCount,
}
-long ShapeTypeHandler::GetSlotId (const OUString& aServiceName) const
+tools::Long ShapeTypeHandler::GetSlotId (const OUString& aServiceName) const
{
tServiceNameToSlotId::const_iterator I (maServiceNameToSlotId.find (aServiceName));
if (I != maServiceNameToSlotId.end())
@@ -180,7 +180,7 @@ long ShapeTypeHandler::GetSlotId (const OUString& aServiceName) const
// Extract the given shape's service name and forward request to appropriate
// method.
-long ShapeTypeHandler::GetSlotId (const uno::Reference<drawing::XShape>& rxShape) const
+tools::Long ShapeTypeHandler::GetSlotId (const uno::Reference<drawing::XShape>& rxShape) const
{
if (rxShape.is())
return GetSlotId (rxShape->getShapeType());
diff --git a/svx/source/accessibility/lookupcolorname.cxx b/svx/source/accessibility/lookupcolorname.cxx
index d8f75f45aae3..bebb52d32945 100644
--- a/svx/source/accessibility/lookupcolorname.cxx
+++ b/svx/source/accessibility/lookupcolorname.cxx
@@ -41,7 +41,7 @@ public:
ColorNameMap(const ColorNameMap&) = delete;
ColorNameMap& operator=(const ColorNameMap&) = delete;
- OUString lookUp(long color) const;
+ OUString lookUp(tools::Long color) const;
private:
typedef std::unordered_map< long, OUString > Map;
@@ -83,7 +83,7 @@ ColorNameMap::ColorNameMap() {
try
{
css::uno::Any aColor = xNA->getByName(rName);
- long nColor = 0;
+ tools::Long nColor = 0;
aColor >>= nColor;
map_[nColor] = rName;
}
@@ -95,7 +95,7 @@ ColorNameMap::ColorNameMap() {
}
}
-OUString ColorNameMap::lookUp(long color) const {
+OUString ColorNameMap::lookUp(tools::Long color) const {
Map::const_iterator i(map_.find(color));
if (i != map_.end()) {
return i->second;
@@ -110,7 +110,7 @@ struct theColorNameMap: public rtl::Static< ColorNameMap, theColorNameMap > {};
namespace accessibility {
-OUString lookUpColorName(long color) {
+OUString lookUpColorName(tools::Long color) {
return theColorNameMap::get().lookUp(color);
}
diff --git a/svx/source/accessibility/lookupcolorname.hxx b/svx/source/accessibility/lookupcolorname.hxx
index 4c4a672b2033..f6e4c9234d38 100644
--- a/svx/source/accessibility/lookupcolorname.hxx
+++ b/svx/source/accessibility/lookupcolorname.hxx
@@ -48,7 +48,7 @@ namespace accessibility {
when no name exists, a string of the form "#RRGGBB" with two hexadecimal
digits for each color component.
*/
-OUString lookUpColorName(long color);
+OUString lookUpColorName(tools::Long color);
}
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
index e966698a2c05..aedb8d297bac 100644
--- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -148,7 +148,7 @@ uno::Reference<XAccessible > SAL_CALL SvxPixelCtlAccessible::getAccessibleAtPoin
if (mpPixelCtl)
{
- long nIndex = mpPixelCtl->PointToIndex(Point(rPoint.X, rPoint.Y));
+ tools::Long nIndex = mpPixelCtl->PointToIndex(Point(rPoint.X, rPoint.Y));
xRet = CreateChild(nIndex, mpPixelCtl->IndexToPoint(nIndex));
}
@@ -210,7 +210,7 @@ void SvxPixelCtlAccessible::implSelect(sal_Int32 nChildIndex, bool bSelect)
if (!mpPixelCtl)
return;
- long nIndex = mpPixelCtl->ShowPosition(mpPixelCtl->IndexToPoint(nChildIndex));
+ tools::Long nIndex = mpPixelCtl->ShowPosition(mpPixelCtl->IndexToPoint(nChildIndex));
NotifyChild(nIndex, bSelect, false);
}
@@ -232,7 +232,7 @@ void SAL_CALL SvxPixelCtlAccessible::disposing()
mpPixelCtl = nullptr;
}
-void SvxPixelCtlAccessible::NotifyChild(long nIndex,bool bSelect ,bool bCheck)
+void SvxPixelCtlAccessible::NotifyChild(tools::Long nIndex,bool bSelect ,bool bCheck)
{
DBG_ASSERT( !(!bSelect && !bCheck),"" );//non is false
@@ -279,7 +279,7 @@ void SvxPixelCtlAccessible::NotifyChild(long nIndex,bool bSelect ,bool bCheck)
m_xCurChild= xNewChild;
}
-uno::Reference<XAccessible> SvxPixelCtlAccessible::CreateChild (long nIndex,Point mPoint)
+uno::Reference<XAccessible> SvxPixelCtlAccessible::CreateChild (tools::Long nIndex,Point mPoint)
{
bool bPixelColorOrBG = mpPixelCtl->GetBitmapPixel(sal_uInt16(nIndex)) != 0;
Size size(mpPixelCtl->GetWidth() / SvxPixelCtl::GetLineCount(), mpPixelCtl->GetHeight() / SvxPixelCtl::GetLineCount());
@@ -324,7 +324,7 @@ void SvxPixelCtlAccessibleChild::SelectChild( bool bSelect)
SvxPixelCtlAccessibleChild::SvxPixelCtlAccessibleChild( SvxPixelCtl& rWindow, bool bPixelColorOrBG,
const tools::Rectangle& rBoundingBox, const rtl::Reference<SvxPixelCtlAccessible>& rxParent,
- long nIndexInParent)
+ tools::Long nIndexInParent)
: mrParentWindow( rWindow )
, mxParent(rxParent)
, m_bPixelColorOrBG(bPixelColorOrBG)
@@ -425,7 +425,7 @@ uno::Reference< XAccessibleStateSet > SAL_CALL SvxPixelCtlAccessibleChild::getAc
pStateSetHelper->AddState( AccessibleStateType::SHOWING );
pStateSetHelper->AddState( AccessibleStateType::VISIBLE );
- long nIndex = mrParentWindow.GetFocusPosIndex();
+ tools::Long nIndex = mrParentWindow.GetFocusPosIndex();
if ( nIndex == mnIndexInParent)
{
pStateSetHelper->AddState( AccessibleStateType::SELECTED );
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index 824a2a51382d..d400ea955b0c 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -59,7 +59,7 @@ namespace
}
-static const ChildIndexToPointData* IndexToPoint( long nIndex )
+static const ChildIndexToPointData* IndexToPoint( tools::Long nIndex )
{
DBG_ASSERT( nIndex < 9 && nIndex >= 0, "-IndexToPoint(): invalid child index! You have been warned..." );
@@ -81,15 +81,15 @@ static const ChildIndexToPointData* IndexToPoint( long nIndex )
}
-static long PointToIndex( RectPoint ePoint )
+static tools::Long PointToIndex( RectPoint ePoint )
{
- long nRet( static_cast<long>(ePoint) );
+ tools::Long nRet( static_cast<tools::Long>(ePoint) );
// corner control
// corners are counted from left to right and top to bottom
DBG_ASSERT( int(RectPoint::LT) == 0 && int(RectPoint::MT) == 1 && int(RectPoint::RT) == 2 && int(RectPoint::LM) == 3 && int(RectPoint::MM) == 4 && int(RectPoint::RM) == 5 &&
int(RectPoint::LB) == 6 && int(RectPoint::MB) == 7 && int(RectPoint::RB) == 8, "*PointToIndex(): unexpected enum value!" );
- nRet = static_cast<long>(ePoint);
+ nRet = static_cast<tools::Long>(ePoint);
return nRet;
}
@@ -121,7 +121,7 @@ Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleAtPo
Reference< XAccessible > xRet;
- long nChild = mpRepr ? PointToIndex(mpRepr->GetApproxRPFromPixPt(rPoint)) : NOCHILDSELECTED;
+ tools::Long nChild = mpRepr ? PointToIndex(mpRepr->GetApproxRPFromPixPt(rPoint)) : NOCHILDSELECTED;
if (nChild != NOCHILDSELECTED)
xRet = getAccessibleChild( nChild );
@@ -298,7 +298,7 @@ bool SvxRectCtlAccessibleContext::implIsSelected( sal_Int32 nIndex )
}
// internals
-void SvxRectCtlAccessibleContext::checkChildIndex( long nIndex )
+void SvxRectCtlAccessibleContext::checkChildIndex( tools::Long nIndex )
{
if( nIndex < 0 || nIndex >= getAccessibleChildCount() )
throw lang::IndexOutOfBoundsException();
@@ -307,8 +307,8 @@ void SvxRectCtlAccessibleContext::checkChildIndex( long nIndex )
void SvxRectCtlAccessibleContext::FireChildFocus( RectPoint eButton )
{
::osl::MutexGuard aGuard( m_aMutex );
- long nNew = PointToIndex( eButton );
- long nNumOfChildren = getAccessibleChildCount();
+ tools::Long nNew = PointToIndex( eButton );
+ tools::Long nNumOfChildren = getAccessibleChildCount();
if( nNew < nNumOfChildren )
{
// select new child
@@ -330,13 +330,13 @@ void SvxRectCtlAccessibleContext::FireChildFocus( RectPoint eButton )
mnSelectedChild = NOCHILDSELECTED;
}
-void SvxRectCtlAccessibleContext::selectChild( long nNew )
+void SvxRectCtlAccessibleContext::selectChild( tools::Long nNew )
{
::osl::MutexGuard aGuard( m_aMutex );
if( nNew == mnSelectedChild )
return;
- long nNumOfChildren = getAccessibleChildCount();
+ tools::Long nNumOfChildren = getAccessibleChildCount();
if( nNew < nNumOfChildren )
{ // valid index
if( mnSelectedChild != NOCHILDSELECTED )
@@ -404,7 +404,7 @@ SvxRectCtlChildAccessibleContext::SvxRectCtlChildAccessibleContext(
const OUString& rName,
const OUString& rDescription,
const tools::Rectangle& rBoundingBox,
- long nIndexInParent )
+ tools::Long nIndexInParent )
: msDescription( rDescription )
, msName( rName )
, mxParent(rxParent)
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 6e463f09dcaf..8ef5a6ebec4f 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -942,7 +942,7 @@ Point EnhancedCustomShape2d::GetPoint( const css::drawing::EnhancedCustomShapePa
const bool bScale, const bool bReplaceGeoSize ) const
{
basegfx::B2DPoint aPoint(GetPointAsB2DPoint(rPair, bScale, bReplaceGeoSize));
- return Point(static_cast<long>(aPoint.getX()), static_cast<long>(aPoint.getY()));
+ return Point(static_cast<tools::Long>(aPoint.getX()), static_cast<tools::Long>(aPoint.getY()));
}
void EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCustomShapeParameter& rParameter,
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index c802d0057464..893984f3d90e 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -272,12 +272,12 @@ SdrObject* EnhancedCustomShape3d::Create3DObject(
bool bIsMirroredX(rSdrObjCustomShape.IsMirroredX());
bool bIsMirroredY(rSdrObjCustomShape.IsMirroredY());
tools::Rectangle aSnapRect(rSdrObjCustomShape.GetLogicRect());
- long nObjectRotation(rSdrObjCustomShape.GetRotateAngle());
+ tools::Long nObjectRotation(rSdrObjCustomShape.GetRotateAngle());
if ( nObjectRotation )
{
double a = (36000 - nObjectRotation) * F_PI18000;
- long dx = aSnapRect.Right() - aSnapRect.Left();
- long dy = aSnapRect.Bottom()- aSnapRect.Top();
+ tools::Long dx = aSnapRect.Right() - aSnapRect.Left();
+ tools::Long dy = aSnapRect.Bottom()- aSnapRect.Top();
Point aP( aSnapRect.TopLeft() );
RotatePoint( aP, rSdrObjCustomShape.GetSnapRect().Center(), sin( a ), cos( a ) );
aSnapRect.SetLeft( aP.X() );
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 1f61c6097a0e..15b7cd41aa44 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -316,7 +316,7 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render()
if ( rGeoStat.nShearAngle )
{
- long nShearAngle = rGeoStat.nShearAngle;
+ tools::Long nShearAngle = rGeoStat.nShearAngle;
double nTan = rGeoStat.nTan;
if (bFlipV != bFlipH)
{
@@ -417,7 +417,7 @@ drawing::PolyPolygonBezierCoords SAL_CALL EnhancedCustomShapeEngine::getLineGeom
if ( rGeoStat.nShearAngle )
{
- long nShearAngle = rGeoStat.nShearAngle;
+ tools::Long nShearAngle = rGeoStat.nShearAngle;
double nTan = rGeoStat.nTan;
if (bFlipV != bFlipH)
{
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index f25fee8d3a4d..e6e1f428bd7c 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -595,7 +595,7 @@ static void InsertMissingOutlinePoints( const std::vector< double >& rDistances,
if (nSize == 0)
return;
- long nTextWidth = rTextAreaBoundRect.GetWidth();
+ tools::Long nTextWidth = rTextAreaBoundRect.GetWidth();
if (nTextWidth == 0)
throw o3tl::divide_by_zero();
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index c31e10543f37..31b8f8c98946 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -659,9 +659,9 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
{
bool pTrans[4];
Color aCol;
- long nR;
- long nG;
- long nB;
+ tools::Long nR;
+ tools::Long nG;
+ tools::Long nB;
std::unique_ptr<long[]> pMinR(new long[nCount]);
std::unique_ptr<long[]> pMaxR(new long[nCount]);
std::unique_ptr<long[]> pMinG(new long[nCount]);
@@ -676,17 +676,17 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
// Prepare Color comparison array
for( i = 0; i < nCount; i++ )
{
- long nTol = ( pTols[i] * 255 ) / 100;
+ tools::Long nTol = ( pTols[i] * 255 ) / 100;
- long nVal = static_cast<long>(pSrcCols[i].GetRed());
+ tools::Long nVal = static_cast<tools::Long>(pSrcCols[i].GetRed());
pMinR[i] = std::max( nVal - nTol, 0L );
pMaxR[i] = std::min( nVal + nTol, 255L );
- nVal = static_cast<long>(pSrcCols[i].GetGreen());
+ nVal = static_cast<tools::Long>(pSrcCols[i].GetGreen());
pMinG[i] = std::max( nVal - nTol, 0L );
pMaxG[i] = std::min( nVal + nTol, 255L );
- nVal = static_cast<long>(pSrcCols[i].GetBlue());
+ nVal = static_cast<tools::Long>(pSrcCols[i].GetBlue());
pMinB[i] = std::max( nVal - nTol, 0L );
pMaxB[i] = std::min( nVal + nTol, 255L );
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index d82004f475bb..82d50178d0fd 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -629,7 +629,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void )
if( aGraphic.GetType() == GraphicType::Bitmap )
{
- const long nTol = static_cast<long>(m_xMtfTolerance->get_value(FieldUnit::PERCENT) * 255 / 100);
+ const tools::Long nTol = static_cast<tools::Long>(m_xMtfTolerance->get_value(FieldUnit::PERCENT) * 255 / 100);
Bitmap aMask = aGraphic.GetBitmapEx().GetBitmap().CreateMask( rColor, nTol );
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 96ac6ad27c5a..0ff9631fcb3e 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -465,28 +465,28 @@ void SvxShowCharSet::DeSelect()
// stretch a grid rectangle if its at the edge to fill unused space
tools::Rectangle SvxShowCharSet::getGridRectangle(const Point &rPointUL, const Size &rOutputSize)
{
- long x = rPointUL.X() - 1;
- long y = rPointUL.Y() - 1;
+ tools::Long x = rPointUL.X() - 1;
+ tools::Long y = rPointUL.Y() - 1;
Point aPointUL(x+1, y+1);
Size aGridSize(nX-1, nY-1);
- long nXDistFromLeft = x - m_nXGap;
+ tools::Long nXDistFromLeft = x - m_nXGap;
if (nXDistFromLeft <= 1)
{
aPointUL.setX( 1 );
aGridSize.AdjustWidth(m_nXGap + nXDistFromLeft );
}
- long nXDistFromRight = rOutputSize.Width() - m_nXGap - nX - x;
+ tools::Long nXDistFromRight = rOutputSize.Width() - m_nXGap - nX - x;
if (nXDistFromRight <= 1)
aGridSize.AdjustWidth(m_nXGap + nXDistFromRight );
- long nXDistFromTop = y - m_nYGap;
+ tools::Long nXDistFromTop = y - m_nYGap;
if (nXDistFromTop <= 1)
{
aPointUL.setY( 1 );
aGridSize.AdjustHeight(m_nYGap + nXDistFromTop );
}
- long nXDistFromBottom = rOutputSize.Height() - m_nYGap - nY - y;
+ tools::Long nXDistFromBottom = rOutputSize.Height() - m_nYGap - nY - y;
if (nXDistFromBottom <= 1)
aGridSize.AdjustHeight(m_nYGap + nXDistFromBottom );
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index d16202cd5c1c..856dd7a08149 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -249,8 +249,8 @@ void CompressGraphicsDialog::Compress(SvStream& aStream)
BitmapEx aBitmap = m_aGraphic.GetBitmapEx();
if ( m_xReduceResolutionCB->get_active() )
{
- long nPixelX = static_cast<long>( GetViewWidthInch() * m_dResolution );
- long nPixelY = static_cast<long>( GetViewHeightInch() * m_dResolution );
+ tools::Long nPixelX = static_cast<tools::Long>( GetViewWidthInch() * m_dResolution );
+ tools::Long nPixelY = static_cast<tools::Long>( GetViewHeightInch() * m_dResolution );
aBitmap.Scale( Size( nPixelX, nPixelY ), GetSelectedInterpolationType() );
}
@@ -373,8 +373,8 @@ tools::Rectangle CompressGraphicsDialog::GetScaledCropRectangle() const
{
if ( m_xReduceResolutionCB->get_active() )
{
- long nPixelX = static_cast<long>( GetViewWidthInch() * m_dResolution );
- long nPixelY = static_cast<long>( GetViewHeightInch() * m_dResolution );
+ tools::Long nPixelX = static_cast<tools::Long>( GetViewWidthInch() * m_dResolution );
+ tools::Long nPixelY = static_cast<tools::Long>( GetViewHeightInch() * m_dResolution );
Size aSize = m_aGraphic.GetBitmapEx().GetSizePixel();
double aScaleX = nPixelX / static_cast<double>(aSize.Width());
double aScaleY = nPixelY / static_cast<double>(aSize.Height());
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
index b3006fe24f25..e3496cafed57 100644
--- a/svx/source/dialog/connctrl.cxx
+++ b/svx/source/dialog/connctrl.cxx
@@ -78,8 +78,8 @@ void SvxXConnectionPreview::AdaptSize()
Point aNewPos;
Size aNewSize;
const Size aWinSize = GetDrawingArea()->get_ref_device().PixelToLogic(GetOutputSizePixel(), aDisplayMap);
- const long nWidth = aWinSize.Width();
- const long nHeight = aWinSize.Height();
+ const tools::Long nWidth = aWinSize.Width();
+ const tools::Long nHeight = aWinSize.Height();
if (aRect.GetHeight() == 0)
return;
double fRectWH = static_cast<double>(aRect.GetWidth()) / aRect.GetHeight();
@@ -90,13 +90,13 @@ void SvxXConnectionPreview::AdaptSize()
// Adapt bitmap to Thumb size (not here!)
if ( fRectWH < fWinWH)
{
- aNewSize.setWidth( static_cast<long>( static_cast<double>(nHeight) * fRectWH ) );
+ aNewSize.setWidth( static_cast<tools::Long>( static_cast<double>(nHeight) * fRectWH ) );
aNewSize.setHeight( nHeight );
}
else
{
aNewSize.setWidth( nWidth );
- aNewSize.setHeight( static_cast<long>( static_cast<double>(nWidth) / fRectWH ) );
+ aNewSize.setHeight( static_cast<tools::Long>( static_cast<double>(nWidth) / fRectWH ) );
}
Fraction aFrac1( aWinSize.Width(), aRect.GetWidth() );
@@ -292,8 +292,8 @@ bool SvxXConnectionPreview::MouseButtonDown( const MouseEvent& rMEvt )
aOutSize = GetDrawingArea()->get_ref_device().PixelToLogic(aOutSize);
Point aPt( aMapMode.GetOrigin() );
- long nX = static_cast<long>( ( static_cast<double>(aOutSize.Width()) - ( static_cast<double>(aOutSize.Width()) * static_cast<double>(*pMultFrac) ) ) / 2.0 + 0.5 );
- long nY = static_cast<long>( ( static_cast<double>(aOutSize.Height()) - ( static_cast<double>(aOutSize.Height()) * static_cast<double>(*pMultFrac) ) ) / 2.0 + 0.5 );
+ tools::Long nX = static_cast<tools::Long>( ( static_cast<double>(aOutSize.Width()) - ( static_cast<double>(aOutSize.Width()) * static_cast<double>(*pMultFrac) ) ) / 2.0 + 0.5 );
+ tools::Long nY = static_cast<tools::Long>( ( static_cast<double>(aOutSize.Height()) - ( static_cast<double>(aOutSize.Height()) * static_cast<double>(*pMultFrac) ) ) / 2.0 + 0.5 );
aPt.AdjustX(nX );
aPt.AdjustY(nY );
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx
index 527bd4f47883..9052d439bd26 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -28,7 +28,7 @@
namespace svx {
-const long DIAL_OUTER_WIDTH = 8;
+const tools::Long DIAL_OUTER_WIDTH = 8;
DialControlBmp::DialControlBmp(OutputDevice& rReference)
: VirtualDevice(rReference, DeviceFormat::DEFAULT, DeviceFormat::DEFAULT)
@@ -80,8 +80,8 @@ void DialControlBmp::DrawElements( const OUString& rText, sal_Int32 nAngle )
aFont.SetWeight( WEIGHT_BOLD );
SetFont( aFont );
- long nX = static_cast< long >( mnCenterX - fWidth * fCos - fHeight * fSin );
- long nY = static_cast< long >( mnCenterY + fWidth * fSin - fHeight * fCos );
+ tools::Long nX = static_cast< tools::Long >( mnCenterX - fWidth * fCos - fHeight * fSin );
+ tools::Long nY = static_cast< tools::Long >( mnCenterY + fWidth * fSin - fHeight * fCos );
tools::Rectangle aRect( nX, nY, 2 * mnCenterX - nX, 2 * mnCenterY - nY );
DrawText( aRect, rText, mbEnabled ? DrawTextFlags::NONE : DrawTextFlags::Disable );
}
@@ -103,9 +103,9 @@ void DialControlBmp::DrawElements( const OUString& rText, sal_Int32 nAngle )
SetLineColor( GetButtonLineColor() );
SetFillColor( GetButtonFillColor( bMain ) );
- long nX = mnCenterX - static_cast< long >( (DIAL_OUTER_WIDTH / 2 - mnCenterX) * fCos );
- long nY = mnCenterY - static_cast< long >( (mnCenterY - DIAL_OUTER_WIDTH / 2) * fSin );
- long nSize = bMain ? (DIAL_OUTER_WIDTH / 4) : (DIAL_OUTER_WIDTH / 2 - 1);
+ tools::Long nX = mnCenterX - static_cast< tools::Long >( (DIAL_OUTER_WIDTH / 2 - mnCenterX) * fCos );
+ tools::Long nY = mnCenterY - static_cast< tools::Long >( (mnCenterY - DIAL_OUTER_WIDTH / 2) * fSin );
+ tools::Long nSize = bMain ? (DIAL_OUTER_WIDTH / 4) : (DIAL_OUTER_WIDTH / 2 - 1);
DrawEllipse( tools::Rectangle( nX - nSize, nY - nSize, nX + nSize, nY + nSize ) );
}
@@ -200,8 +200,8 @@ void DialControlBmp::DrawBackground()
{
SetLineColor( (nAngle % 45) ? aLightColor : aFullColor );
double fAngle = basegfx::deg2rad(nAngle);
- long nX = static_cast< long >( -mnCenterX * cos( fAngle ) );
- long nY = static_cast< long >( mnCenterY * sin( fAngle ) );
+ tools::Long nX = static_cast< tools::Long >( -mnCenterX * cos( fAngle ) );
+ tools::Long nY = static_cast< tools::Long >( mnCenterY * sin( fAngle ) );
DrawLine( aStartPos, Point( mnCenterX - nX, mnCenterY - nY ) );
}
@@ -241,7 +241,7 @@ void DialControl::DialControl_Impl::SetSize( const Size& rWinSize )
{
// make the control squared, and adjusted so that we have a well-defined
// center ["(x - 1) | 1" creates odd value <= x]
- long nMin = (std::min(rWinSize.Width(), rWinSize.Height()) - 1) | 1;
+ tools::Long nMin = (std::min(rWinSize.Width(), rWinSize.Height()) - 1) | 1;
maWinSize = Size( nMin, nMin );
@@ -446,8 +446,8 @@ void DialControl::SetModifyHdl( const Link<DialControl&,void>& rLink )
void DialControl::HandleMouseEvent( const Point& rPos, bool bInitial )
{
- long nX = rPos.X() - mpImpl->mnCenterX;
- long nY = mpImpl->mnCenterY - rPos.Y();
+ tools::Long nX = rPos.X() - mpImpl->mnCenterX;
+ tools::Long nY = mpImpl->mnCenterY - rPos.Y();
double fH = sqrt( static_cast< double >( nX ) * nX + static_cast< double >( nY ) * nY );
if( fH != 0.0 )
{
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 4a353d55033a..c15b3ebc7cb8 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -432,8 +432,8 @@ void SvxRectCtl::LoseFocus()
Point SvxRectCtl::GetApproxLogPtFromPixPt( const Point& rPt ) const
{
Point aPt = rPt;
- long x;
- long y;
+ tools::Long x;
+ tools::Long y;
Size aSize(GetOutputSizePixel());
@@ -579,15 +579,15 @@ css::uno::Reference< css::accessibility::XAccessible > SvxPixelCtl::CreateAccess
return m_xAccess.get();
}
-long SvxPixelCtl::PointToIndex(const Point &aPt) const
+tools::Long SvxPixelCtl::PointToIndex(const Point &aPt) const
{
- long nX = aPt.X() * nLines / aRectSize.Width();
- long nY = aPt.Y() * nLines / aRectSize.Height();
+ tools::Long nX = aPt.X() * nLines / aRectSize.Width();
+ tools::Long nY = aPt.Y() * nLines / aRectSize.Height();
return nX + nY * nLines ;
}
-Point SvxPixelCtl::IndexToPoint(long nIndex) const
+Point SvxPixelCtl::IndexToPoint(tools::Long nIndex) const
{
DBG_ASSERT(nIndex >= 0 && nIndex < nSquares ," Check Index");
@@ -601,12 +601,12 @@ Point SvxPixelCtl::IndexToPoint(long nIndex) const
return aPtTl;
}
-long SvxPixelCtl::GetFocusPosIndex() const
+tools::Long SvxPixelCtl::GetFocusPosIndex() const
{
return aFocusPosition.getX() + aFocusPosition.getY() * nLines ;
}
-long SvxPixelCtl::ShowPosition( const Point &rPt)
+tools::Long SvxPixelCtl::ShowPosition( const Point &rPt)
{
sal_Int32 nX = rPt.X() * nLines / aRectSize.Width();
sal_Int32 nY = rPt.Y() * nLines / aRectSize.Height();
@@ -673,7 +673,7 @@ bool SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt )
GrabFocus();
}
- long nIndex = ShowPosition(rMEvt.GetPosPixel());
+ tools::Long nIndex = ShowPosition(rMEvt.GetPosPixel());
if(m_xAccess.is())
{
@@ -751,8 +751,8 @@ void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectan
//Calculate visual focus rectangle via focus position
tools::Rectangle SvxPixelCtl::implCalFocusRect( const Point& aPosition )
{
- long nLeft,nTop,nRight,nBottom;
- long i,j;
+ tools::Long nLeft,nTop,nRight,nBottom;
+ tools::Long i,j;
i = aPosition.Y();
j = aPosition.X();
nLeft = aRectSize.Width() * j / nLines + 1;
@@ -820,7 +820,7 @@ bool SvxPixelCtl::KeyInput( const KeyEvent& rKEvt )
}
if(m_xAccess.is())
{
- long nIndex = GetFocusPosIndex();
+ tools::Long nIndex = GetFocusPosIndex();
switch(nCode)
{
case KEY_LEFT:
@@ -931,10 +931,10 @@ void SvxLineLB::Fill( const XDashListRef &pList )
// entries for dashed lines
- long nCount = pList->Count();
+ tools::Long nCount = pList->Count();
m_xControl->freeze();
- for( long i = 0; i < nCount; i++ )
+ for( tools::Long i = 0; i < nCount; i++ )
{
const XDashEntry* pEntry = pList->GetDash(i);
const BitmapEx aBitmap = pList->GetUiBitmap( i );
@@ -1000,11 +1000,11 @@ void SvxLineEndLB::Fill( const XLineEndListRef &pList, bool bStart )
if( !pList.is() )
return;
- long nCount = pList->Count();
+ tools::Long nCount = pList->Count();
ScopedVclPtrInstance< VirtualDevice > pVD;
m_xControl->freeze();
- for( long i = 0; i < nCount; i++ )
+ for( tools::Long i = 0; i < nCount; i++ )
{
const XLineEndEntry* pEntry = pList->GetLineEnd(i);
const BitmapEx aBitmap = pList->GetUiBitmap( i );
diff --git a/svx/source/dialog/dlgunit.hxx b/svx/source/dialog/dlgunit.hxx
index 108e2b5e3062..7d9a98ac5a9a 100644
--- a/svx/source/dialog/dlgunit.hxx
+++ b/svx/source/dialog/dlgunit.hxx
@@ -24,7 +24,7 @@
#include <svx/svdtrans.hxx>
#include <vcl/fieldvalues.hxx>
-inline OUString GetUnitString( long nVal_100, FieldUnit eFieldUnit, sal_Unicode cSep )
+inline OUString GetUnitString( tools::Long nVal_100, FieldUnit eFieldUnit, sal_Unicode cSep )
{
OUStringBuffer aVal = OUString::number(
vcl::ConvertValue(nVal_100, 2, MapUnit::Map100thMM, eFieldUnit));
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 6dd3e62c5f21..146d5220e2d9 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -78,7 +78,7 @@ using ::com::sun::star::i18n::BreakIterator;
namespace
{
-void scaleFontWidth(vcl::Font& rFont, vcl::RenderContext const & rRenderContext,long& n100PercentFont)
+void scaleFontWidth(vcl::Font& rFont, vcl::RenderContext const & rRenderContext,tools::Long& n100PercentFont)
{
rFont.SetAverageFontWidth(0);
n100PercentFont = rRenderContext.GetFontMetric(rFont).GetAverageFontWidth();
@@ -98,7 +98,7 @@ void setFontSize(vcl::Font& rFont)
rFont.SetFontSize(aSize);
}
-void calcFontHeightAnyAscent(vcl::RenderContext& rRenderContext, const vcl::Font& rFont, long& nHeight, long& nAscent)
+void calcFontHeightAnyAscent(vcl::RenderContext& rRenderContext, const vcl::Font& rFont, tools::Long& nHeight, tools::Long& nAscent)
{
if (!nHeight)
{
@@ -154,13 +154,13 @@ class FontPrevWin_Impl
std::unique_ptr<Color> mpBackColor;
std::unique_ptr<Color> mpTextLineColor;
std::unique_ptr<Color> mpOverlineColor;
- long mnAscent;
+ tools::Long mnAscent;
sal_Unicode mcStartBracket;
sal_Unicode mcEndBracket;
- long mn100PercentFontWidth; // initial -1 -> not set yet
- long mn100PercentFontWidthCJK;
- long mn100PercentFontWidthCTL;
+ tools::Long mn100PercentFontWidth; // initial -1 -> not set yet
+ tools::Long mn100PercentFontWidthCJK;
+ tools::Long mn100PercentFontWidthCTL;
sal_uInt16 mnFontWidthScale;
bool mbSelection : 1;
@@ -312,13 +312,13 @@ Size FontPrevWin_Impl::CalcTextSize(vcl::RenderContext& rRenderContext, OutputDe
nEnd = maText.getLength();
nScript = css::i18n::ScriptType::LATIN;
}
- long nTxtWidth = 0;
- long nCJKHeight = 0;
- long nCTLHeight = 0;
- long nHeight = 0;
+ tools::Long nTxtWidth = 0;
+ tools::Long nCJKHeight = 0;
+ tools::Long nCTLHeight = 0;
+ tools::Long nHeight = 0;
mnAscent = 0;
- long nCJKAscent = 0;
- long nCTLAscent = 0;
+ tools::Long nCJKAscent = 0;
+ tools::Long nCTLAscent = 0;
do
{
@@ -327,7 +327,7 @@ Size FontPrevWin_Impl::CalcTextSize(vcl::RenderContext& rRenderContext, OutputDe
((nScript == css::i18n::ScriptType::COMPLEX) ?
maCTLFont :
rInFont);
- long nWidth = rFont.GetTextSize(_pPrinter, maText, nStart, nEnd - nStart).Width();
+ tools::Long nWidth = rFont.GetTextSize(_pPrinter, maText, nStart, nEnd - nStart).Width();
if (nIdx >= maTextWidth.size())
break;
@@ -702,8 +702,8 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::R
const Size aLogSize(rRenderContext.GetOutputSize());
- long nX = aLogSize.Width() / 2 - aTxtSize.Width() / 2;
- long nY = aLogSize.Height() / 2 - aTxtSize.Height() / 2;
+ tools::Long nX = aLogSize.Width() / 2 - aTxtSize.Width() / 2;
+ tools::Long nY = aLogSize.Height() / 2 - aTxtSize.Height() / 2;
if (nY + pImpl->mnAscent > aLogSize.Height())
nY = aLogSize.Height() - pImpl->mnAscent;
@@ -741,7 +741,7 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::R
rRenderContext.SetOverlineColor(*pImpl->mpOverlineColor);
}
- long nStdAscent = pImpl->mnAscent;
+ tools::Long nStdAscent = pImpl->mnAscent;
nY += nStdAscent;
if (IsTwoLines())
@@ -751,9 +751,9 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::R
setFontSize(aSmallFont);
setFontSize(pImpl->maCJKFont);
- long nStartBracketWidth = 0;
- long nEndBracketWidth = 0;
- long nTextWidth = 0;
+ tools::Long nStartBracketWidth = 0;
+ tools::Long nEndBracketWidth = 0;
+ tools::Long nTextWidth = 0;
if (pImpl->mcStartBracket)
{
OUString sBracket(pImpl->mcStartBracket);
@@ -765,16 +765,16 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::R
nEndBracketWidth = rFont.GetTextSize(pPrinter, sBracket).Width();
}
nTextWidth = pImpl->CalcTextSize(rRenderContext, pPrinter, aSmallFont).Width();
- long nResultWidth = nStartBracketWidth;
+ tools::Long nResultWidth = nStartBracketWidth;
nResultWidth += nEndBracketWidth;
nResultWidth += nTextWidth;
- long _nX = (aLogSize.Width() - nResultWidth) / 2;
+ tools::Long _nX = (aLogSize.Width() - nResultWidth) / 2;
rRenderContext.DrawLine(Point(0, nY), Point(_nX, nY));
rRenderContext.DrawLine(Point(_nX + nResultWidth, nY), Point(aLogSize.Width(), nY));
- long nSmallAscent = pImpl->mnAscent;
- long nOffset = (nStdAscent - nSmallAscent) / 2;
+ tools::Long nSmallAscent = pImpl->mnAscent;
+ tools::Long nOffset = (nStdAscent - nSmallAscent) / 2;
if (pImpl->mcStartBracket)
{
@@ -854,7 +854,7 @@ void SvxFontPrevWindow::AutoCorrectFontColor()
void SvxFontPrevWindow::SetFontSize( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont )
{
sal_uInt16 nWhich;
- long nH;
+ tools::Long nH;
if (GetWhich(rSet, nSlot, nWhich))
{
nH = OutputDevice::LogicToLogic(static_cast<const SvxFontHeightItem&>(rSet.Get(nWhich)).GetHeight(),
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index 6531ffc1b50e..ef4bfe327364 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -738,7 +738,7 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimeoutHdl_Impl, Timer*, void)
}
}
- long nValue = GetCoreValue(*m_xMtrFldDistance, MapUnit::Map100thMM);
+ tools::Long nValue = GetCoreValue(*m_xMtrFldDistance, MapUnit::Map100thMM);
XFormTextDistanceItem aDistItem( nValue );
nValue = GetCoreValue(*m_xMtrFldTextStart, MapUnit::Map100thMM);
XFormTextStartItem aStartItem( nValue );
diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx
index 714f2b87d41f..bf89b58dfba9 100644
--- a/svx/source/dialog/framelinkarray.cxx
+++ b/svx/source/dialog/framelinkarray.cxx
@@ -44,10 +44,10 @@ private:
Style maBLTR;
public:
- long mnAddLeft;
- long mnAddRight;
- long mnAddTop;
- long mnAddBottom;
+ tools::Long mnAddLeft;
+ tools::Long mnAddRight;
+ tools::Long mnAddTop;
+ tools::Long mnAddBottom;
SvxRotateMode meRotMode;
double mfOrientation;
@@ -227,8 +227,8 @@ struct ArrayImpl
size_t GetMirrorCol( size_t nCol ) const { return mnWidth - nCol - 1; }
- long GetColPosition( size_t nCol ) const;
- long GetRowPosition( size_t nRow ) const;
+ tools::Long GetColPosition( size_t nCol ) const;
+ tools::Long GetRowPosition( size_t nRow ) const;
bool HasCellRotation() const;
};
@@ -333,7 +333,7 @@ bool ArrayImpl::IsInClipRange( size_t nCol, size_t nRow ) const
return IsColInClipRange( nCol ) && IsRowInClipRange( nRow );
}
-long ArrayImpl::GetColPosition( size_t nCol ) const
+tools::Long ArrayImpl::GetColPosition( size_t nCol ) const
{
if( mbXCoordsDirty )
{
@@ -343,7 +343,7 @@ long ArrayImpl::GetColPosition( size_t nCol ) const
return maXCoords[ nCol ];
}
-long ArrayImpl::GetRowPosition( size_t nRow ) const
+tools::Long ArrayImpl::GetRowPosition( size_t nRow ) const
{
if( mbYCoordsDirty )
{
@@ -709,7 +709,7 @@ void Array::SetMergedRange( size_t nFirstCol, size_t nFirstRow, size_t nLastCol,
lclSetMergedRange( mxImpl->maCells, mxImpl->mnWidth, nFirstCol, nFirstRow, nLastCol, nLastRow );
}
-void Array::SetAddMergedLeftSize( size_t nCol, size_t nRow, long nAddSize )
+void Array::SetAddMergedLeftSize( size_t nCol, size_t nRow, tools::Long nAddSize )
{
DBG_FRAME_CHECK_COLROW( nCol, nRow, "SetAddMergedLeftSize" );
DBG_FRAME_CHECK( mxImpl->GetMergedFirstCol( nCol, nRow ) == 0, "SetAddMergedLeftSize", "additional border inside array" );
@@ -717,7 +717,7 @@ void Array::SetAddMergedLeftSize( size_t nCol, size_t nRow, long nAddSize )
CELLACC( aIt.Col(), aIt.Row() ).mnAddLeft = nAddSize;
}
-void Array::SetAddMergedRightSize( size_t nCol, size_t nRow, long nAddSize )
+void Array::SetAddMergedRightSize( size_t nCol, size_t nRow, tools::Long nAddSize )
{
DBG_FRAME_CHECK_COLROW( nCol, nRow, "SetAddMergedRightSize" );
DBG_FRAME_CHECK( mxImpl->GetMergedLastCol( nCol, nRow ) + 1 == mxImpl->mnWidth, "SetAddMergedRightSize", "additional border inside array" );
@@ -725,7 +725,7 @@ void Array::SetAddMergedRightSize( size_t nCol, size_t nRow, long nAddSize )
CELLACC( aIt.Col(), aIt.Row() ).mnAddRight = nAddSize;
}
-void Array::SetAddMergedTopSize( size_t nCol, size_t nRow, long nAddSize )
+void Array::SetAddMergedTopSize( size_t nCol, size_t nRow, tools::Long nAddSize )
{
DBG_FRAME_CHECK_COLROW( nCol, nRow, "SetAddMergedTopSize" );
DBG_FRAME_CHECK( mxImpl->GetMergedFirstRow( nCol, nRow ) == 0, "SetAddMergedTopSize", "additional border inside array" );
@@ -733,7 +733,7 @@ void Array::SetAddMergedTopSize( size_t nCol, size_t nRow, long nAddSize )
CELLACC( aIt.Col(), aIt.Row() ).mnAddTop = nAddSize;
}
-void Array::SetAddMergedBottomSize( size_t nCol, size_t nRow, long nAddSize )
+void Array::SetAddMergedBottomSize( size_t nCol, size_t nRow, tools::Long nAddSize )
{
DBG_FRAME_CHECK_COLROW( nCol, nRow, "SetAddMergedBottomSize" );
DBG_FRAME_CHECK( mxImpl->GetMergedLastRow( nCol, nRow ) + 1 == mxImpl->mnHeight, "SetAddMergedBottomSize", "additional border inside array" );
@@ -774,76 +774,76 @@ void Array::SetClipRange( size_t nFirstCol, size_t nFirstRow, size_t nLastCol, s
}
// cell coordinates
-void Array::SetXOffset( long nXOffset )
+void Array::SetXOffset( tools::Long nXOffset )
{
mxImpl->maXCoords[ 0 ] = nXOffset;
mxImpl->mbXCoordsDirty = true;
}
-void Array::SetYOffset( long nYOffset )
+void Array::SetYOffset( tools::Long nYOffset )
{
mxImpl->maYCoords[ 0 ] = nYOffset;
mxImpl->mbYCoordsDirty = true;
}
-void Array::SetColWidth( size_t nCol, long nWidth )
+void Array::SetColWidth( size_t nCol, tools::Long nWidth )
{
DBG_FRAME_CHECK_COL( nCol, "SetColWidth" );
mxImpl->maWidths[ nCol ] = nWidth;
mxImpl->mbXCoordsDirty = true;
}
-void Array::SetRowHeight( size_t nRow, long nHeight )
+void Array::SetRowHeight( size_t nRow, tools::Long nHeight )
{
DBG_FRAME_CHECK_ROW( nRow, "SetRowHeight" );
mxImpl->maHeights[ nRow ] = nHeight;
mxImpl->mbYCoordsDirty = true;
}
-void Array::SetAllColWidths( long nWidth )
+void Array::SetAllColWidths( tools::Long nWidth )
{
std::fill( mxImpl->maWidths.begin(), mxImpl->maWidths.end(), nWidth );
mxImpl->mbXCoordsDirty = true;
}
-void Array::SetAllRowHeights( long nHeight )
+void Array::SetAllRowHeights( tools::Long nHeight )
{
std::fill( mxImpl->maHeights.begin(), mxImpl->maHeights.end(), nHeight );
mxImpl->mbYCoordsDirty = true;
}
-long Array::GetColPosition( size_t nCol ) const
+tools::Long Array::GetColPosition( size_t nCol ) const
{
DBG_FRAME_CHECK_COL_1( nCol, "GetColPosition" );
return mxImpl->GetColPosition( nCol );
}
-long Array::GetRowPosition( size_t nRow ) const
+tools::Long Array::GetRowPosition( size_t nRow ) const
{
DBG_FRAME_CHECK_ROW_1( nRow, "GetRowPosition" );
return mxImpl->GetRowPosition( nRow );
}
-long Array::GetColWidth( size_t nFirstCol, size_t nLastCol ) const
+tools::Long Array::GetColWidth( size_t nFirstCol, size_t nLastCol ) const
{
DBG_FRAME_CHECK_COL( nFirstCol, "GetColWidth" );
DBG_FRAME_CHECK_COL( nLastCol, "GetColWidth" );
return GetColPosition( nLastCol + 1 ) - GetColPosition( nFirstCol );
}
-long Array::GetRowHeight( size_t nFirstRow, size_t nLastRow ) const
+tools::Long Array::GetRowHeight( size_t nFirstRow, size_t nLastRow ) const
{
DBG_FRAME_CHECK_ROW( nFirstRow, "GetRowHeight" );
DBG_FRAME_CHECK_ROW( nLastRow, "GetRowHeight" );
return GetRowPosition( nLastRow + 1 ) - GetRowPosition( nFirstRow );
}
-long Array::GetWidth() const
+tools::Long Array::GetWidth() const
{
return GetColPosition( mxImpl->mnWidth ) - GetColPosition( 0 );
}
-long Array::GetHeight() const
+tools::Long Array::GetHeight() const
{
return GetRowPosition( mxImpl->mnHeight ) - GetRowPosition( 0 );
}
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 1b23325726da..cbaa7c2ab8dd 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -70,19 +70,19 @@ namespace
{
/** Space between outer control border and any graphical element of the control. */
-const long FRAMESEL_GEOM_OUTER = 2;
+const tools::Long FRAMESEL_GEOM_OUTER = 2;
/** Space between arrows and usable inner area. */
-const long FRAMESEL_GEOM_INNER = 3;
+const tools::Long FRAMESEL_GEOM_INNER = 3;
/** Maximum width to draw a frame border style. */
-const long FRAMESEL_GEOM_WIDTH = 9;
+const tools::Long FRAMESEL_GEOM_WIDTH = 9;
/** Additional margin for click area of outer lines. */
-const long FRAMESEL_GEOM_ADD_CLICK_OUTER = 5;
+const tools::Long FRAMESEL_GEOM_ADD_CLICK_OUTER = 5;
/** Additional margin for click area of inner lines. */
-const long FRAMESEL_GEOM_ADD_CLICK_INNER = 2;
+const tools::Long FRAMESEL_GEOM_ADD_CLICK_INNER = 2;
/** Returns the corresponding flag for a frame border. */
@@ -356,18 +356,18 @@ void FrameSelectorImpl::InitGlobalGeometry()
/* nMinSize is the lower of width and height (control will always be squarish).
FRAMESEL_GEOM_OUTER is the minimal distance between inner control border
and any element. */
- long nMinSize = std::min( aCtrlSize.Width(), aCtrlSize.Height() ) - 2 * FRAMESEL_GEOM_OUTER;
+ tools::Long nMinSize = std::min( aCtrlSize.Width(), aCtrlSize.Height() ) - 2 * FRAMESEL_GEOM_OUTER;
/* nFixedSize is the size all existing elements need in one direction:
the diag. arrow, space betw. arrow and frame border, outer frame border,
inner frame border, other outer frame border, space betw. frame border
and arrow, the other arrow. */
- long nFixedSize = 2 * mnArrowSize + 2 * FRAMESEL_GEOM_INNER + 3 * FRAMESEL_GEOM_WIDTH;
+ tools::Long nFixedSize = 2 * mnArrowSize + 2 * FRAMESEL_GEOM_INNER + 3 * FRAMESEL_GEOM_WIDTH;
/* nBetwBordersSize contains the size between an outer and inner frame border (made odd). */
- long nBetwBordersSize = (((nMinSize - nFixedSize) / 2) - 1) | 1;
+ tools::Long nBetwBordersSize = (((nMinSize - nFixedSize) / 2) - 1) | 1;
/* The final size of the usable area. At least do not get negative */
mnCtrlSize = 2 * nBetwBordersSize + nFixedSize;
- mnCtrlSize = std::max(mnCtrlSize, static_cast<long>(0));
+ mnCtrlSize = std::max(mnCtrlSize, static_cast<tools::Long>(0));
mpVirDev->SetOutputSizePixel( Size( mnCtrlSize, mnCtrlSize ) );
/* Center the virtual device in the control. */
@@ -421,8 +421,8 @@ void FrameSelectorImpl::InitBorderGeometry()
basegfx::fround(aCellRange.getMaxX()), basegfx::fround(aCellRange.getMaxY()));
const double fHorDiagAngle(atan2(fabs(aCellRange.getHeight()), fabs(aCellRange.getWidth())));
const double fVerDiagAngle(fHorDiagAngle > 0.0 ? F_PI2 - fHorDiagAngle : 0.0);
- const long nDiagFocusOffsX(basegfx::fround(-mnFocusOffs / tan(fHorDiagAngle) + mnFocusOffs / sin(fHorDiagAngle)));
- const long nDiagFocusOffsY(basegfx::fround(-mnFocusOffs / tan(fVerDiagAngle) + mnFocusOffs / sin(fVerDiagAngle)));
+ const tools::Long nDiagFocusOffsX(basegfx::fround(-mnFocusOffs / tan(fHorDiagAngle) + mnFocusOffs / sin(fHorDiagAngle)));
+ const tools::Long nDiagFocusOffsY(basegfx::fround(-mnFocusOffs / tan(fVerDiagAngle) + mnFocusOffs / sin(fVerDiagAngle)));
std::vector< Point > aFocusVec;
aFocusVec.emplace_back( aRect.Left() - mnFocusOffs, aRect.Top() + nDiagFocusOffsY );
@@ -454,10 +454,10 @@ void FrameSelectorImpl::InitBorderGeometry()
- To right: Dependent on existence of inner vertical frame border
(if enabled, use less space).
*/
- long nClO = FRAMESEL_GEOM_WIDTH / 2 + FRAMESEL_GEOM_ADD_CLICK_OUTER;
- long nClI = (mbTLBR && mbBLTR) ? (FRAMESEL_GEOM_WIDTH / 2 + FRAMESEL_GEOM_ADD_CLICK_INNER) : nClO;
- long nClH = mbHor ? nClI : nClO; // additional space dependent of horizontal inner border
- long nClV = mbVer ? nClI : nClO; // additional space dependent of vertical inner border
+ tools::Long nClO = FRAMESEL_GEOM_WIDTH / 2 + FRAMESEL_GEOM_ADD_CLICK_OUTER;
+ tools::Long nClI = (mbTLBR && mbBLTR) ? (FRAMESEL_GEOM_WIDTH / 2 + FRAMESEL_GEOM_ADD_CLICK_INNER) : nClO;
+ tools::Long nClH = mbHor ? nClI : nClO; // additional space dependent of horizontal inner border
+ tools::Long nClV = mbVer ? nClI : nClO; // additional space dependent of vertical inner border
maLeft.AddClickRect( tools::Rectangle( mnLine1 - nClO, mnLine1 - nClO, mnLine1 + nClV, mnLine3 + nClO ) );
maVer.AddClickRect( tools::Rectangle( mnLine2 - nClI, mnLine1 - nClO, mnLine2 + nClI, mnLine3 + nClO ) );
@@ -565,7 +565,7 @@ void FrameSelectorImpl::DrawArrows( const FrameBorder& rBorder )
{
DBG_ASSERT( rBorder.IsEnabled(), "svx::FrameSelectorImpl::DrawArrows - access to disabled border" );
- long nLinePos = 0;
+ tools::Long nLinePos = 0;
switch( rBorder.GetType() )
{
case FrameBorderType::Left:
@@ -578,8 +578,8 @@ void FrameSelectorImpl::DrawArrows( const FrameBorder& rBorder )
}
nLinePos -= mnArrowSize / 2;
- long nTLPos = 0;
- long nBRPos = mnCtrlSize - mnArrowSize;
+ tools::Long nTLPos = 0;
+ tools::Long nBRPos = mnCtrlSize - mnArrowSize;
Point aPos1, aPos2;
int nImgIndex1 = -1, nImgIndex2 = -1;
switch( rBorder.GetType() )
@@ -910,7 +910,7 @@ void FrameSelector::HideAllBorders()
mxImpl->SetBorderState( **aIt, FrameBorderState::Hide );
}
-bool FrameSelector::GetVisibleWidth( long& rnWidth, SvxBorderLineStyle& rnStyle ) const
+bool FrameSelector::GetVisibleWidth( tools::Long& rnWidth, SvxBorderLineStyle& rnStyle ) const
{
VisFrameBorderCIter aIt( mxImpl->maEnabBorders );
if( !aIt.Is() )
@@ -1000,7 +1000,7 @@ void FrameSelector::SelectAllVisibleBorders()
mxImpl->SelectBorder( **aIt, true/*bSelect*/ );
}
-void FrameSelector::SetStyleToSelection( long nWidth, SvxBorderLineStyle nStyle )
+void FrameSelector::SetStyleToSelection( tools::Long nWidth, SvxBorderLineStyle nStyle )
{
mxImpl->maCurrStyle.SetBorderLineStyle( nStyle );
mxImpl->maCurrStyle.SetWidth( nWidth );
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index d3e0671e5ab3..87943b34d804 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -190,21 +190,21 @@ void GraphCtrl::Resize()
Size aNewSize;
OutputDevice& rDevice = GetDrawingArea()->get_ref_device();
const Size aWinSize = rDevice.PixelToLogic( GetOutputSizePixel(), aDisplayMap );
- const long nWidth = aWinSize.Width();
- const long nHeight = aWinSize.Height();
+ const tools::Long nWidth = aWinSize.Width();
+ const tools::Long nHeight = aWinSize.Height();
double fGrfWH = static_cast<double>(aGraphSize.Width()) / aGraphSize.Height();
double fWinWH = static_cast<double>(nWidth) / nHeight;
// Adapt Bitmap to Thumb size
if ( fGrfWH < fWinWH)
{
- aNewSize.setWidth( static_cast<long>( static_cast<double>(nHeight) * fGrfWH ) );
+ aNewSize.setWidth( static_cast<tools::Long>( static_cast<double>(nHeight) * fGrfWH ) );
aNewSize.setHeight( nHeight );
}
else
{
aNewSize.setWidth( nWidth );
- aNewSize.setHeight( static_cast<long>( static_cast<double>(nWidth) / fGrfWH ) );
+ aNewSize.setHeight( static_cast<tools::Long>( static_cast<double>(nWidth) / fGrfWH ) );
}
aNewPos.setX( ( nWidth - aNewSize.Width() ) >> 1 );
@@ -376,8 +376,8 @@ bool GraphCtrl::KeyInput( const KeyEvent& rKEvt )
case KEY_LEFT:
case KEY_RIGHT:
{
- long nX = 0;
- long nY = 0;
+ tools::Long nX = 0;
+ tools::Long nY = 0;
if (aCode.GetCode() == KEY_UP)
{
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index cae407291912..06605ce2efcf 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -48,11 +48,11 @@ using namespace com::sun::star;
// Word 97 incompatibility (#i19922#)
// #i19922# - tdf#126051 see cui/source/tabpages/page.cxx and sw/source/uibase/sidebar/PageMarginControl.hxx
-const long MINBODY = 56; // 1mm in twips rounded
+const tools::Long MINBODY = 56; // 1mm in twips rounded
// default distance to Header or footer
-const long DEF_DIST_WRITER = 500; // 5mm (Writer)
-const long DEF_DIST_CALC = 250; // 2.5mm (Calc)
+const tools::Long DEF_DIST_WRITER = 500; // 5mm (Writer)
+const tools::Long DEF_DIST_CALC = 250; // 2.5mm (Calc)
const sal_uInt16 SvxHFPage::pRanges[] =
{
@@ -250,8 +250,8 @@ bool SvxHFPage::FillItemSet( SfxItemSet* rSet )
// Size
SvxSizeItem aSizeItem( static_cast<const SvxSizeItem&>(rOldSet.Get( nWSize )) );
Size aSize( aSizeItem.GetSize() );
- long nDist = GetCoreValue( *m_xDistEdit, eUnit );
- long nH = GetCoreValue( *m_xHeightEdit, eUnit );
+ tools::Long nDist = GetCoreValue( *m_xDistEdit, eUnit );
+ tools::Long nH = GetCoreValue( *m_xHeightEdit, eUnit );
nH += nDist; // add distance
aSize.setHeight( nH );
@@ -401,7 +401,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet )
else
{
// defaults for distance and height
- long nDefaultDist = bIsCalc ? DEF_DIST_CALC : DEF_DIST_WRITER;
+ tools::Long nDefaultDist = bIsCalc ? DEF_DIST_CALC : DEF_DIST_WRITER;
SetMetricValue( *m_xDistEdit, nDefaultDist, MapUnit::Map100thMM );
SetMetricValue( *m_xHeightEdit, 500, MapUnit::Map100thMM );
}
@@ -874,7 +874,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
rHeaderSet.Get( GetWhich(SID_ATTR_ULSPACE ) ));
const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>(
rHeaderSet.Get( GetWhich( SID_ATTR_LRSPACE ) ));
- long nDist = rUL.GetLower();
+ tools::Long nDist = rUL.GetLower();
m_aBspWin.SetHdHeight( rSize.GetSize().Height() - nDist );
m_aBspWin.SetHdDist( nDist );
@@ -914,7 +914,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
rFooterSet.Get( GetWhich( SID_ATTR_ULSPACE ) ));
const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>(
rFooterSet.Get( GetWhich( SID_ATTR_LRSPACE ) ));
- long nDist = rUL.GetUpper();
+ tools::Long nDist = rUL.GetUpper();
m_aBspWin.SetFtHeight( rSize.GetSize().Height() - nDist );
m_aBspWin.SetFtDist( nDist );
@@ -971,19 +971,19 @@ IMPL_LINK_NOARG(SvxHFPage, ValueChangeHdl, weld::MetricSpinButton&, void)
void SvxHFPage::RangeHdl()
{
- long nHHeight = m_aBspWin.GetHdHeight();
- long nHDist = m_aBspWin.GetHdDist();
+ tools::Long nHHeight = m_aBspWin.GetHdHeight();
+ tools::Long nHDist = m_aBspWin.GetHdDist();
- long nFHeight = m_aBspWin.GetFtHeight();
- long nFDist = m_aBspWin.GetFtDist();
+ tools::Long nFHeight = m_aBspWin.GetFtHeight();
+ tools::Long nFDist = m_aBspWin.GetFtDist();
- long nHeight = std::max(long(MINBODY),
- static_cast<long>(m_xHeightEdit->denormalize(m_xHeightEdit->get_value(FieldUnit::TWIP))));
- long nDist = m_xTurnOnBox->get_active() ?
- static_cast<long>(m_xDistEdit->denormalize(m_xDistEdit->get_value(FieldUnit::TWIP))) : 0;
+ tools::Long nHeight = std::max(tools::Long(MINBODY),
+ static_cast<tools::Long>(m_xHeightEdit->denormalize(m_xHeightEdit->get_value(FieldUnit::TWIP))));
+ tools::Long nDist = m_xTurnOnBox->get_active() ?
+ static_cast<tools::Long>(m_xDistEdit->denormalize(m_xDistEdit->get_value(FieldUnit::TWIP))) : 0;
- long nMin;
- long nMax;
+ tools::Long nMin;
+ tools::Long nMax;
if ( nId == SID_ATTR_PAGE_HEADERSET )
{
@@ -997,13 +997,13 @@ void SvxHFPage::RangeHdl()
}
// Current values of the side edges
- long nBT = m_aBspWin.GetTop();
- long nBB = m_aBspWin.GetBottom();
- long nBL = m_aBspWin.GetLeft();
- long nBR = m_aBspWin.GetRight();
+ tools::Long nBT = m_aBspWin.GetTop();
+ tools::Long nBB = m_aBspWin.GetBottom();
+ tools::Long nBL = m_aBspWin.GetLeft();
+ tools::Long nBR = m_aBspWin.GetRight();
- long nH = m_aBspWin.GetSize().Height();
- long nW = m_aBspWin.GetSize().Width();
+ tools::Long nH = m_aBspWin.GetSize().Height();
+ tools::Long nW = m_aBspWin.GetSize().Width();
// Borders
if ( nId == SID_ATTR_PAGE_HEADERSET )
@@ -1015,7 +1015,7 @@ void SvxHFPage::RangeHdl()
m_xHeightEdit->set_max(m_xHeightEdit->normalize(nMax), FieldUnit::TWIP);
nMin = ( nH - nBB - nBT ) / 5; // 20%
nDist = std::max( nH - nMin - nHHeight - nFDist - nFHeight - nBB - nBT,
- long(0) );
+ tools::Long(0) );
m_xDistEdit->set_max(m_xDistEdit->normalize(nDist), FieldUnit::TWIP);
}
else
@@ -1027,17 +1027,17 @@ void SvxHFPage::RangeHdl()
m_xHeightEdit->set_max(m_xHeightEdit->normalize(nMax), FieldUnit::TWIP);
nMin = ( nH - nBT - nBB ) / 5; // 20%
nDist = std::max( nH - nMin - nFHeight - nHDist - nHHeight - nBT - nBB,
- long(0) );
+ tools::Long(0) );
m_xDistEdit->set_max(m_xDistEdit->normalize(nDist), FieldUnit::TWIP);
}
// Limit Indentation
nMax = nW - nBL - nBR -
- static_cast<long>(m_xRMEdit->denormalize(m_xRMEdit->get_value(FieldUnit::TWIP))) - MINBODY;
+ static_cast<tools::Long>(m_xRMEdit->denormalize(m_xRMEdit->get_value(FieldUnit::TWIP))) - MINBODY;
m_xLMEdit->set_max(m_xLMEdit->normalize(nMax), FieldUnit::TWIP);
nMax = nW - nBL - nBR -
- static_cast<long>(m_xLMEdit->denormalize(m_xLMEdit->get_value(FieldUnit::TWIP))) - MINBODY;
+ static_cast<tools::Long>(m_xLMEdit->denormalize(m_xLMEdit->get_value(FieldUnit::TWIP))) - MINBODY;
m_xRMEdit->set_max(m_xLMEdit->normalize(nMax), FieldUnit::TWIP);
}
diff --git a/svx/source/dialog/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx
index c7ae9fc51c4c..153e6d4c4f7d 100644
--- a/svx/source/dialog/hyperdlg.cxx
+++ b/svx/source/dialog/hyperdlg.cxx
@@ -54,11 +54,11 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId,
Size aDlgSize(pDialog->get_size());
if( aParentSize.Width() < pInfo->aPos.X() )
- pInfo->aPos.setX( aParentSize.Width()-aDlgSize.Width() < long(0.1*aParentSize.Width()) ?
- long(0.1*aParentSize.Width()) : aParentSize.Width()-aDlgSize.Width() );
+ pInfo->aPos.setX( aParentSize.Width()-aDlgSize.Width() < tools::Long(0.1*aParentSize.Width()) ?
+ tools::Long(0.1*aParentSize.Width()) : aParentSize.Width()-aDlgSize.Width() );
if( aParentSize.Height() < pInfo->aPos. Y() )
- pInfo->aPos.setY( aParentSize.Height()-aDlgSize.Height() < long(0.1*aParentSize.Height()) ?
- long(0.1*aParentSize.Height()) : aParentSize.Height()-aDlgSize.Height() );
+ pInfo->aPos.setY( aParentSize.Height()-aDlgSize.Height() < tools::Long(0.1*aParentSize.Height()) ?
+ tools::Long(0.1*aParentSize.Height()) : aParentSize.Height()-aDlgSize.Height() );
pDialog->window_move(pInfo->aPos.X(), pInfo->aPos.Y());
}
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 0a16d670002c..d093f44fe515 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -188,7 +188,7 @@ IMPL_LINK_NOARG(SvxIMapDlg, CancelHdl, weld::Button&, void)
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), "svx/ui/querymodifyimagemapchangesdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryModifyImageMapChangesDialog"));
- const long nRet = xQBox->run();
+ const tools::Long nRet = xQBox->run();
if( nRet == RET_YES )
{
@@ -204,7 +204,7 @@ IMPL_LINK_NOARG(SvxIMapDlg, CancelHdl, weld::Button&, void)
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(m_xDialog.get(), "svx/ui/querysaveimagemapchangesdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QuerySaveImageMapChangesDialog"));
- const long nRet = xQBox->run();
+ const tools::Long nRet = xQBox->run();
if( nRet == RET_YES )
bRet = DoSave();
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 0ca5a122677f..14345a5cdaff 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -199,7 +199,7 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj )
{
const IMapCircleObject* pIMapCircleObj = static_cast<const IMapCircleObject*>(pIMapObj);
const Point aCenter( pIMapCircleObj->GetCenter( false ) );
- const long nRadius = pIMapCircleObj->GetRadius( false );
+ const tools::Long nRadius = pIMapCircleObj->GetRadius( false );
const Point aOffset( nRadius, nRadius );
tools::Rectangle aCircle( aCenter - aOffset, aCenter + aOffset );
diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx
index fd237aea31a2..0bad56b64454 100644
--- a/svx/source/dialog/measctrl.cxx
+++ b/svx/source/dialog/measctrl.cxx
@@ -56,9 +56,9 @@ void SvxXMeasurePreview::ResizeImpl(const Size& rSize)
rRefDevice.SetMapMode(m_aMapMode);
Size aSize = rRefDevice.PixelToLogic(rSize);
- Point aPt1(aSize.Width() / 5, static_cast<long>(aSize.Height() / 2));
+ Point aPt1(aSize.Width() / 5, static_cast<tools::Long>(aSize.Height() / 2));
pMeasureObj->SetPoint(aPt1, 0);
- Point aPt2(aSize.Width() * 4 / 5, static_cast<long>(aSize.Height() / 2));
+ Point aPt2(aSize.Width() * 4 / 5, static_cast<tools::Long>(aSize.Height() / 2));
pMeasureObj->SetPoint(aPt2, 1);
rRefDevice.Pop();
@@ -140,8 +140,8 @@ bool SvxXMeasurePreview::MouseButtonDown(const MouseEvent& rMEvt)
rRefDevice.Pop();
Point aPt(m_aMapMode.GetOrigin());
- long nX = long((double(aOutSize.Width()) - (double(aOutSize.Width()) * double(*pMultFrac))) / 2.0 + 0.5);
- long nY = long((double(aOutSize.Height()) - (double(aOutSize.Height()) * double(*pMultFrac))) / 2.0 + 0.5);
+ tools::Long nX = tools::Long((double(aOutSize.Width()) - (double(aOutSize.Width()) * double(*pMultFrac))) / 2.0 + 0.5);
+ tools::Long nY = tools::Long((double(aOutSize.Height()) - (double(aOutSize.Height()) * double(*pMultFrac))) / 2.0 + 0.5);
aPt.AdjustX(nX );
aPt.AdjustY(nY );
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index 104000303210..598aacb420e9 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -161,13 +161,13 @@ bool SvxGridTabPage::FillItemSet( SfxItemSet* rCoreSet )
MapUnit eUnit =
rCoreSet->GetPool()->GetMetric( GetWhich( SID_ATTR_GRID_OPTIONS ) );
- long nX = GetCoreValue( *m_xMtrFldDrawX, eUnit );
- long nY = GetCoreValue( *m_xMtrFldDrawY, eUnit );
+ tools::Long nX = GetCoreValue( *m_xMtrFldDrawX, eUnit );
+ tools::Long nY = GetCoreValue( *m_xMtrFldDrawY, eUnit );
aGridItem.nFldDrawX = static_cast<sal_uInt32>(nX);
aGridItem.nFldDrawY = static_cast<sal_uInt32>(nY);
- aGridItem.nFldDivisionX = static_cast<long>(m_xNumFldDivisionX->get_value() - 1);
- aGridItem.nFldDivisionY = static_cast<long>(m_xNumFldDivisionY->get_value() - 1);
+ aGridItem.nFldDivisionX = static_cast<tools::Long>(m_xNumFldDivisionX->get_value() - 1);
+ aGridItem.nFldDivisionY = static_cast<tools::Long>(m_xNumFldDivisionY->get_value() - 1);
rCoreSet->Put( aGridItem );
}
@@ -219,7 +219,7 @@ void SvxGridTabPage::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_xMtrFldDrawX->get_unit())
return;
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index 6aee246982db..2a9dfb0a30b3 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -75,7 +75,7 @@ void SvxPageWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
rRenderContext.Push(PushFlags::MAPMODE);
rRenderContext.SetMapMode(MapMode(MapUnit::MapTwip));
- Fraction aXScale(aWinSize.Width(), std::max(long(aSize.Width() * 2 + aSize.Width() / 8), 1L));
+ Fraction aXScale(aWinSize.Width(), std::max(tools::Long(aSize.Width() * 2 + aSize.Width() / 8), 1L));
Fraction aYScale(aWinSize.Height(), std::max(aSize.Height(), 1L));
MapMode aMapMode(rRenderContext.GetMapMode());
@@ -91,7 +91,7 @@ void SvxPageWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
}
rRenderContext.SetMapMode(aMapMode);
Size aSz(rRenderContext.PixelToLogic(GetOutputSizePixel()));
- long nYPos = (aSz.Height() - aSize.Height()) / 2;
+ tools::Long nYPos = (aSz.Height() - aSize.Height()) / 2;
if (eUsage == SvxPageUsage::All)
{
@@ -109,7 +109,7 @@ void SvxPageWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
rRenderContext.SetMapMode(aMapMode);
aSz = rRenderContext.PixelToLogic(GetOutputSizePixel());
nYPos = (aSz.Height() - aSize.Height()) / 2;
- long nXPos = (aSz.Width() - aSize.Width()) / 2;
+ tools::Long nXPos = (aSz.Width() - aSize.Width()) / 2;
DrawPage(rRenderContext, Point(nXPos,nYPos),true,true);
}
else
@@ -161,8 +161,8 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO
rRenderContext.SetFillColor(rFieldColor);
rRenderContext.DrawRect(tools::Rectangle(rOrg, aTempSize));
- long nL = nLeft;
- long nR = nRight;
+ tools::Long nL = nLeft;
+ tools::Long nR = nRight;
if (eUsage == SvxPageUsage::Mirror && !bSecond)
{
@@ -235,7 +235,7 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO
OUString sText("ABC");
Point aMove(1, rRenderContext.GetTextHeight());
sal_Unicode cArrow = 0x2193;
- long nAWidth = rRenderContext.GetTextWidth(sText.copy(0,1));
+ tools::Long nAWidth = rRenderContext.GetTextWidth(sText.copy(0,1));
switch (nFrameDirection)
{
case SvxFrameDirection::Horizontal_LR_TB:
@@ -267,8 +267,8 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO
for (sal_Int32 i = 0; i < sText.getLength(); i++)
{
OUString sDraw(sText.copy(i,1));
- long nHDiff = 0;
- long nCharWidth = rRenderContext.GetTextWidth(sDraw);
+ tools::Long nHDiff = 0;
+ tools::Long nCharWidth = rRenderContext.GetTextWidth(sDraw);
bool bHorizontal = 0 == aMove.Y();
if (!bHorizontal)
{
@@ -296,12 +296,12 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO
// Paint Table, if necessary center it
rRenderContext.SetLineColor(COL_LIGHTGRAY);
- long nW = aRect.GetWidth();
- long nH = aRect.GetHeight();
- long const nTW = CELL_WIDTH * 3;
- long const nTH = CELL_HEIGHT * 3;
- long _nLeft = bHorz ? aRect.Left() + ((nW - nTW) / 2) : aRect.Left();
- long _nTop = bVert ? aRect.Top() + ((nH - nTH) / 2) : aRect.Top();
+ tools::Long nW = aRect.GetWidth();
+ tools::Long nH = aRect.GetHeight();
+ tools::Long const nTW = CELL_WIDTH * 3;
+ tools::Long const nTH = CELL_HEIGHT * 3;
+ tools::Long _nLeft = bHorz ? aRect.Left() + ((nW - nTW) / 2) : aRect.Left();
+ tools::Long _nTop = bVert ? aRect.Top() + ((nH - nTH) / 2) : aRect.Top();
tools::Rectangle aCellRect(Point(_nLeft, _nTop),Size(CELL_WIDTH, CELL_HEIGHT));
for (sal_uInt16 i = 0; i < 3; ++i)
diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx
index fb5003559edc..bdb4f7f9da9b 100644
--- a/svx/source/dialog/paraprev.cxx
+++ b/svx/source/dialog/paraprev.cxx
@@ -71,7 +71,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext)
rRenderContext.SetLineColor();
- long nH = aWinSize.Height() / 19;
+ tools::Long nH = aWinSize.Height() / 19;
Size aLineSiz(aWinSize.Width() - DEF_MARGIN, nH);
Size aSiz = aLineSiz;
Point aPnt;
@@ -92,9 +92,9 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext)
if (3 <= i && 6 > i)
{
- long nLeft = nLeftMargin * aLineSiz.Width() / aSize.Width();
- long nFirst = nFirstLineOffset * aLineSiz.Width() / aSize.Width();
- long nTmp = nLeft + nFirst;
+ tools::Long nLeft = nLeftMargin * aLineSiz.Width() / aSize.Width();
+ tools::Long nFirst = nFirstLineOffset * aLineSiz.Width() / aSize.Width();
+ tools::Long nTmp = nLeft + nFirst;
if (i == 3)
{
@@ -106,7 +106,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext)
aPnt.AdjustX(nLeft );
aSiz.AdjustWidth( -nLeft );
}
- long nRight = nRightMargin * aLineSiz.Width() / aSize.Width();
+ tools::Long nRight = nRightMargin * aLineSiz.Width() / aSize.Width();
aSiz.AdjustWidth( -nRight );
}
@@ -136,7 +136,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext)
if (3 <= i && 5 >= i)
{
- long nLW = long();
+ tools::Long nLW = long();
switch (i)
{
case 3:
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 06dd3fdc6751..a2769bb6f09b 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -387,7 +387,7 @@ void SvxRubyDialog::SetRubyText(sal_Int32 nPos, weld::Entry& rLeft, weld::Entry&
void SvxRubyDialog::GetRubyText()
{
- long nTempLastPos = GetLastPos();
+ tools::Long nTempLastPos = GetLastPos();
for (int i = 0; i < 8; i+=2)
{
if (aEditArr[i]->get_sensitive() &&
@@ -731,13 +731,13 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
OUString sBaseText, sRubyText;
m_pParentDlg->GetCurrentText(sBaseText, sRubyText);
- long nTextHeight = rRenderContext.GetTextHeight();
- long nBaseWidth = rRenderContext.GetTextWidth(sBaseText);
+ tools::Long nTextHeight = rRenderContext.GetTextHeight();
+ tools::Long nBaseWidth = rRenderContext.GetTextWidth(sBaseText);
vcl::Font aRubyFont(aFont);
aRubyFont.SetFontHeight(aRubyFont.GetFontHeight() * 70 / 100);
rRenderContext.SetFont(aRubyFont);
- long nRubyWidth = rRenderContext.GetTextWidth(sRubyText);
+ tools::Long nRubyWidth = rRenderContext.GetTextWidth(sRubyText);
rRenderContext.SetFont(aFont);
RubyAdjust nAdjust = static_cast<RubyAdjust>(m_pParentDlg->m_xAdjustLB->get_active());
@@ -748,19 +748,19 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
//which part is stretched ?
bool bRubyStretch = nBaseWidth >= nRubyWidth;
- long nCenter = aWinSize.Width() / 2;
- long nHalfWidth = std::max( nBaseWidth, nRubyWidth ) /2;
- long nLeftStart = nCenter - nHalfWidth;
- long nRightEnd = nCenter + nHalfWidth;
+ tools::Long nCenter = aWinSize.Width() / 2;
+ tools::Long nHalfWidth = std::max( nBaseWidth, nRubyWidth ) /2;
+ tools::Long nLeftStart = nCenter - nHalfWidth;
+ tools::Long nRightEnd = nCenter + nHalfWidth;
// Default values for TOP or no selection
- long nYRuby = aWinSize.Height() / 4 - nTextHeight / 2;
- long nYBase = aWinSize.Height() * 3 / 4 - nTextHeight / 2;
+ tools::Long nYRuby = aWinSize.Height() / 4 - nTextHeight / 2;
+ tools::Long nYBase = aWinSize.Height() * 3 / 4 - nTextHeight / 2;
sal_Int16 nRubyPos = m_pParentDlg->m_xPositionLB->get_active();
if ( nRubyPos == 1 ) // BOTTOM
{
- long nTmp = nYRuby;
+ tools::Long nTmp = nYRuby;
nYRuby = nYBase;
nYBase = nTmp;
}
@@ -782,8 +782,8 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
aRubyFont.SetOrientation(Degree10(2700));
}
- long nYOutput;
- long nOutTextWidth;
+ tools::Long nYOutput;
+ tools::Long nOutTextWidth;
OUString sOutputText;
if (bRubyStretch)
@@ -814,7 +814,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
break;
case RubyAdjust_INDENT_BLOCK:
{
- long nCharWidth = rRenderContext.GetTextWidth("X");
+ tools::Long nCharWidth = rRenderContext.GetTextWidth("X");
if (nOutTextWidth < (nRightEnd - nLeftStart - nCharWidth))
{
nCharWidth /= 2;
@@ -828,12 +828,12 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
if (sOutputText.getLength() > 1)
{
sal_Int32 nCount = sOutputText.getLength();
- long nSpace = ((nRightEnd - nLeftStart) - rRenderContext.GetTextWidth(sOutputText)) / (nCount - 1);
+ tools::Long nSpace = ((nRightEnd - nLeftStart) - rRenderContext.GetTextWidth(sOutputText)) / (nCount - 1);
for (sal_Int32 i = 0; i < nCount; i++)
{
OUString sChar(sOutputText[i]);
rRenderContext.DrawText(Point(nLeftStart , nYOutput), sChar);
- long nCharWidth = rRenderContext.GetTextWidth(sChar);
+ tools::Long nCharWidth = rRenderContext.GetTextWidth(sChar);
nLeftStart += nCharWidth + nSpace;
}
break;
diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx
index bde481f15b4b..7943283364e8 100644
--- a/svx/source/dialog/rulritem.cxx
+++ b/svx/source/dialog/rulritem.cxx
@@ -134,7 +134,7 @@ SvxLongLRSpaceItem* SvxLongLRSpaceItem::Clone(SfxItemPool *) const
return new SvxLongLRSpaceItem(*this);
}
-SvxLongLRSpaceItem::SvxLongLRSpaceItem(long lLeft, long lRight, sal_uInt16 nId) :
+SvxLongLRSpaceItem::SvxLongLRSpaceItem(tools::Long lLeft, tools::Long lRight, sal_uInt16 nId) :
SfxPoolItem (nId),
mlLeft (lLeft),
mlRight (lRight)
@@ -146,12 +146,12 @@ SvxLongLRSpaceItem::SvxLongLRSpaceItem() :
mlRight (0)
{}
-void SvxLongLRSpaceItem::SetLeft(long lArgLeft)
+void SvxLongLRSpaceItem::SetLeft(tools::Long lArgLeft)
{
mlLeft = lArgLeft;
}
-void SvxLongLRSpaceItem::SetRight(long lArgRight)
+void SvxLongLRSpaceItem::SetRight(tools::Long lArgRight)
{
mlRight = lArgRight;
}
@@ -253,7 +253,7 @@ SvxLongULSpaceItem* SvxLongULSpaceItem::Clone(SfxItemPool *) const
return new SvxLongULSpaceItem(*this);
}
-SvxLongULSpaceItem::SvxLongULSpaceItem(long lLeft, long lRight, sal_uInt16 nId) :
+SvxLongULSpaceItem::SvxLongULSpaceItem(tools::Long lLeft, tools::Long lRight, sal_uInt16 nId) :
SfxPoolItem (nId),
mlLeft (lLeft),
mlRight (lRight)
@@ -266,12 +266,12 @@ SvxLongULSpaceItem::SvxLongULSpaceItem() :
{}
-void SvxLongULSpaceItem::SetUpper(long lArgLeft)
+void SvxLongULSpaceItem::SetUpper(tools::Long lArgLeft)
{
mlLeft = lArgLeft;
}
-void SvxLongULSpaceItem::SetLower(long lArgRight)
+void SvxLongULSpaceItem::SetLower(tools::Long lArgRight)
{
mlRight = lArgRight;
}
@@ -368,7 +368,7 @@ SvxPagePosSizeItem* SvxPagePosSizeItem::Clone(SfxItemPool *) const
return new SvxPagePosSizeItem(*this);
}
-SvxPagePosSizeItem::SvxPagePosSizeItem(const Point &rP, long lW, long lH) :
+SvxPagePosSizeItem::SvxPagePosSizeItem(const Point &rP, tools::Long lW, tools::Long lH) :
SfxPoolItem (SID_RULER_PAGE_POS),
aPos (rP),
lWidth (lW),
@@ -444,7 +444,7 @@ bool SvxColumnItem::CalcOrtho() const
if(nCount < 2)
return false;
- long nColWidth = (*this)[0].GetWidth();
+ tools::Long nColWidth = (*this)[0].GetWidth();
for(sal_uInt16 i = 1; i < nCount; ++i) {
if( (*this)[i].GetWidth() != nColWidth)
return false;
@@ -550,12 +550,12 @@ void SvxColumnItem::Append(const SvxColumnDescription &rDesc)
aColumns.push_back(rDesc);
}
-void SvxColumnItem::SetLeft(long left)
+void SvxColumnItem::SetLeft(tools::Long left)
{
nLeft = left;
}
-void SvxColumnItem::SetRight(long right)
+void SvxColumnItem::SetRight(tools::Long right)
{
nRight = right;
}
@@ -571,7 +571,7 @@ bool SvxColumnItem::IsLastAct() const
return nActColumn == Count() - 1;
}
-SvxColumnDescription::SvxColumnDescription(long start, long end, bool bVis) :
+SvxColumnDescription::SvxColumnDescription(tools::Long start, tools::Long end, bool bVis) :
nStart (start),
nEnd (end),
bVisible (bVis),
@@ -579,7 +579,7 @@ SvxColumnDescription::SvxColumnDescription(long start, long end, bool bVis) :
nEndMax (0)
{}
-SvxColumnDescription::SvxColumnDescription(long start, long end, long endMin, long endMax, bool bVis) :
+SvxColumnDescription::SvxColumnDescription(tools::Long start, tools::Long end, tools::Long endMin, tools::Long endMax, bool bVis) :
nStart (start),
nEnd (end),
bVisible (bVis),
@@ -602,7 +602,7 @@ bool SvxColumnDescription::operator!=(const SvxColumnDescription& rCmp) const
return !operator==(rCmp);
}
-long SvxColumnDescription::GetWidth() const
+tools::Long SvxColumnDescription::GetWidth() const
{
return nEnd - nStart;
}
@@ -643,8 +643,8 @@ SvxObjectItem* SvxObjectItem::Clone(SfxItemPool *) const
return new SvxObjectItem(*this);
}
-SvxObjectItem::SvxObjectItem( long nSX, long nEX,
- long nSY, long nEY ) :
+SvxObjectItem::SvxObjectItem( tools::Long nSX, tools::Long nEX,
+ tools::Long nSY, tools::Long nEY ) :
SfxPoolItem (SID_RULER_OBJECT),
nStartX (nSX),
nEndX (nEX),
@@ -709,22 +709,22 @@ bool SvxObjectItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId )
}
-void SvxObjectItem::SetStartX(long lValue)
+void SvxObjectItem::SetStartX(tools::Long lValue)
{
nStartX = lValue;
}
-void SvxObjectItem::SetEndX(long lValue)
+void SvxObjectItem::SetEndX(tools::Long lValue)
{
nEndX = lValue;
}
-void SvxObjectItem::SetStartY(long lValue)
+void SvxObjectItem::SetStartY(tools::Long lValue)
{
nStartY = lValue;
}
-void SvxObjectItem::SetEndY(long lValue)
+void SvxObjectItem::SetEndY(tools::Long lValue)
{
nEndY = lValue;
}
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 1086e45d3894..c86145630402 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -154,8 +154,8 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
tools::Rectangle aRect = rUDEvt.GetRect();
sal_uInt16 nItemId = rUDEvt.GetItemId();
- long nRectWidth = aRect.GetWidth();
- long nRectHeight = aRect.GetHeight();
+ tools::Long nRectWidth = aRect.GetWidth();
+ tools::Long nRectHeight = aRect.GetHeight();
Size aRectSize(nRectWidth, aRect.GetHeight());
Point aBLPos = aRect.TopLeft();
vcl::Font aOldFont = pDev->GetFont();
@@ -261,8 +261,8 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
// has to be made again
pVDev->SetLineColor(aBackColor);
pVDev->DrawRect(aOrgRect);
- long nStartX = aOrgRect.TopLeft().X();
- long nStartY = aOrgRect.TopLeft().Y();
+ tools::Long nStartX = aOrgRect.TopLeft().X();
+ tools::Long nStartY = aOrgRect.TopLeft().Y();
if(xFormatter.is() && aOutlineSettings.getLength() > nItemId - 1)
{
@@ -282,7 +282,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
nLevelCount = 5;
for( sal_Int32 i = 0; i < nLevelCount; i++)
{
- long nTop = nStartY + nRectHeight * (aLinesArr[2 * i + 11])/100 ;
+ tools::Long nTop = nStartY + nRectHeight * (aLinesArr[2 * i + 11])/100 ;
Point aLeft(nStartX + nRectWidth * (aLinesArr[2 * i + 10])/ 100, nTop );
Any aLevelAny = xLevel->getByIndex(i);
@@ -361,7 +361,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
aLeft.AdjustX(pDev->GetTextWidth(sSuffixes[i]) );
}
- long nLineTop = nStartY + nRectHeight * aLinesArr[2 * i + 1]/100 ;
+ tools::Long nLineTop = nStartY + nRectHeight * aLinesArr[2 * i + 1]/100 ;
Point aLineLeft(aLeft.X(), nLineTop );
Point aLineRight(nStartX + nRectWidth * 90 /100, nLineTop );
pVDev->SetLineColor(COL_LIGHTGRAY);
@@ -498,7 +498,7 @@ void SvxBmpNumValueSet::UserDraw(const UserDrawEvent& rUDEvt)
sal_uInt16 nItemId = rUDEvt.GetItemId();
Point aBLPos = aRect.TopLeft();
- long nRectHeight = aRect.GetHeight();
+ tools::Long nRectHeight = aRect.GetHeight();
Size aSize(nRectHeight/8, nRectHeight/8);
Graphic aGraphic;
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 16ee08d4413e..66457d3bca1e 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -60,12 +60,12 @@ struct SvxRuler_Impl {
std::unique_ptr<sal_uInt16[]> pPercBuf;
std::unique_ptr<sal_uInt16[]> pBlockBuf;
sal_uInt16 nPercSize;
- long nTotalDist;
- long lOldWinPos;
- long lMaxLeftLogic;
- long lMaxRightLogic;
- long lLastLMargin;
- long lLastRMargin;
+ tools::Long nTotalDist;
+ tools::Long lOldWinPos;
+ tools::Long lMaxLeftLogic;
+ tools::Long lMaxRightLogic;
+ tools::Long lLastLMargin;
+ tools::Long lLastRMargin;
std::unique_ptr<SvxProtectItem> aProtectItem;
std::unique_ptr<SfxBoolItem> pTextRTLItem;
sal_uInt16 nControllerItems;
@@ -153,7 +153,7 @@ void SvxRuler_Impl::SetPercSize(sal_uInt16 nSize)
// expects: something like SwTabCols
// Ruler: SetBorders
-constexpr long glMinFrame = 5; // minimal frame width in pixels
+constexpr tools::Long glMinFrame = 5; // minimal frame width in pixels
SvxRuler::SvxRuler(
vcl::Window* pParent, // StarView Parent
@@ -297,18 +297,18 @@ void SvxRuler::dispose()
Ruler::dispose();
}
-long SvxRuler::MakePositionSticky(long aPosition, long aPointOfReference, bool aSnapToFrameMargin) const
+tools::Long SvxRuler::MakePositionSticky(tools::Long aPosition, tools::Long aPointOfReference, bool aSnapToFrameMargin) const
{
- long aPointOfReferencePixel = ConvertHPosPixel(aPointOfReference);
- long aLeftFramePosition = ConvertHPosPixel(GetLeftFrameMargin());
- long aRightFramePosition = ConvertHPosPixel(GetRightFrameMargin());
+ tools::Long aPointOfReferencePixel = ConvertHPosPixel(aPointOfReference);
+ tools::Long aLeftFramePosition = ConvertHPosPixel(GetLeftFrameMargin());
+ tools::Long aRightFramePosition = ConvertHPosPixel(GetRightFrameMargin());
double aTick = GetCurrentRulerUnit().nTick1;
if (mbCoarseSnapping)
aTick = GetCurrentRulerUnit().nTick2;
- long aTickPixel = pEditWin->LogicToPixel(Size(aTick, 0), GetCurrentMapMode()).Width();
+ tools::Long aTickPixel = pEditWin->LogicToPixel(Size(aTick, 0), GetCurrentMapMode()).Width();
double aHalfTick = aTick / 2.0;
double aHalfTickPixel = aTickPixel / 2.0;
@@ -326,9 +326,9 @@ long SvxRuler::MakePositionSticky(long aPosition, long aPointOfReference, bool a
return aPosition;
// Move "coordinate system" to frame position so ticks are calculated correctly
- long aTranslatedPosition = aPosition - aPointOfReferencePixel;
+ tools::Long aTranslatedPosition = aPosition - aPointOfReferencePixel;
// Convert position to current selected map mode
- long aPositionLogic = pEditWin->PixelToLogic(Size(aTranslatedPosition, 0), GetCurrentMapMode()).Width();
+ tools::Long aPositionLogic = pEditWin->PixelToLogic(Size(aTranslatedPosition, 0), GetCurrentMapMode()).Width();
// Normalize -- snap to nearest tick
aPositionLogic = rtl::math::round((aPositionLogic + aHalfTick) / aTick) * aTick;
// Convert back to pixels
@@ -337,67 +337,67 @@ long SvxRuler::MakePositionSticky(long aPosition, long aPointOfReference, bool a
return aPosition + aPointOfReferencePixel;
}
-long SvxRuler::ConvertHPosPixel(long nVal) const
+tools::Long SvxRuler::ConvertHPosPixel(tools::Long nVal) const
{
return pEditWin->LogicToPixel(Size(nVal, 0)).Width();
}
-long SvxRuler::ConvertVPosPixel(long nVal) const
+tools::Long SvxRuler::ConvertVPosPixel(tools::Long nVal) const
{
return pEditWin->LogicToPixel(Size(0, nVal)).Height();
}
-long SvxRuler::ConvertHSizePixel(long nVal) const
+tools::Long SvxRuler::ConvertHSizePixel(tools::Long nVal) const
{
return pEditWin->LogicToPixel(Size(nVal, 0)).Width();
}
-long SvxRuler::ConvertVSizePixel(long nVal) const
+tools::Long SvxRuler::ConvertVSizePixel(tools::Long nVal) const
{
return pEditWin->LogicToPixel(Size(0, nVal)).Height();
}
-long SvxRuler::ConvertPosPixel(long nVal) const
+tools::Long SvxRuler::ConvertPosPixel(tools::Long nVal) const
{
return bHorz ? ConvertHPosPixel(nVal): ConvertVPosPixel(nVal);
}
-long SvxRuler::ConvertSizePixel(long nVal) const
+tools::Long SvxRuler::ConvertSizePixel(tools::Long nVal) const
{
return bHorz? ConvertHSizePixel(nVal): ConvertVSizePixel(nVal);
}
-inline long SvxRuler::ConvertHPosLogic(long nVal) const
+inline tools::Long SvxRuler::ConvertHPosLogic(tools::Long nVal) const
{
return pEditWin->PixelToLogic(Size(nVal, 0)).Width();
}
-inline long SvxRuler::ConvertVPosLogic(long nVal) const
+inline tools::Long SvxRuler::ConvertVPosLogic(tools::Long nVal) const
{
return pEditWin->PixelToLogic(Size(0, nVal)).Height();
}
-inline long SvxRuler::ConvertHSizeLogic(long nVal) const
+inline tools::Long SvxRuler::ConvertHSizeLogic(tools::Long nVal) const
{
return pEditWin->PixelToLogic(Size(nVal, 0)).Width();
}
-inline long SvxRuler::ConvertVSizeLogic(long nVal) const
+inline tools::Long SvxRuler::ConvertVSizeLogic(tools::Long nVal) const
{
return pEditWin->PixelToLogic(Size(0, nVal)).Height();
}
-inline long SvxRuler::ConvertPosLogic(long nVal) const
+inline tools::Long SvxRuler::ConvertPosLogic(tools::Long nVal) const
{
return bHorz? ConvertHPosLogic(nVal): ConvertVPosLogic(nVal);
}
-inline long SvxRuler::ConvertSizeLogic(long nVal) const
+inline tools::Long SvxRuler::ConvertSizeLogic(tools::Long nVal) const
{
return bHorz? ConvertHSizeLogic(nVal): ConvertVSizeLogic(nVal);
}
-long SvxRuler::PixelHAdjust(long nVal, long nValOld) const
+tools::Long SvxRuler::PixelHAdjust(tools::Long nVal, tools::Long nValOld) const
{
if(ConvertHSizePixel(nVal) != ConvertHSizePixel(nValOld))
return nVal;
@@ -405,7 +405,7 @@ long SvxRuler::PixelHAdjust(long nVal, long nValOld) const
return nValOld;
}
-long SvxRuler::PixelVAdjust(long nVal, long nValOld) const
+tools::Long SvxRuler::PixelVAdjust(tools::Long nVal, tools::Long nValOld) const
{
if(ConvertVSizePixel(nVal) != ConvertVSizePixel(nValOld))
return nVal;
@@ -413,7 +413,7 @@ long SvxRuler::PixelVAdjust(long nVal, long nValOld) const
return nValOld;
}
-long SvxRuler::PixelAdjust(long nVal, long nValOld) const
+tools::Long SvxRuler::PixelAdjust(tools::Long nVal, tools::Long nValOld) const
{
if(ConvertSizePixel(nVal) != ConvertSizePixel(nValOld))
return nVal;
@@ -440,7 +440,7 @@ void SvxRuler::UpdateFrame()
if(mxLRSpaceItem && mxPagePosItem)
{
// if no initialization by default app behavior
- const long nOld = lLogicNullOffset;
+ const tools::Long nOld = lLogicNullOffset;
lLogicNullOffset = mxColumnItem ? mxColumnItem->GetLeft() : mxLRSpaceItem->GetLeft();
if(bAppSetNullOffset)
@@ -459,7 +459,7 @@ void SvxRuler::UpdateFrame()
SetMargin1(ConvertHPosPixel(lAppNullOffset), nMarginStyle);
}
- long lRight = 0;
+ tools::Long lRight = 0;
// evaluate the table right edge of the table
if(mxColumnItem && mxColumnItem->IsTable())
@@ -467,15 +467,15 @@ void SvxRuler::UpdateFrame()
else
lRight = mxLRSpaceItem->GetRight();
- long aWidth = mxPagePosItem->GetWidth() - lRight - lLogicNullOffset + lAppNullOffset;
- long aWidthPixel = ConvertHPosPixel(aWidth);
+ tools::Long aWidth = mxPagePosItem->GetWidth() - lRight - lLogicNullOffset + lAppNullOffset;
+ tools::Long aWidthPixel = ConvertHPosPixel(aWidth);
SetMargin2(aWidthPixel, nMarginStyle);
}
else if(mxULSpaceItem && mxPagePosItem)
{
// relative the upper edge of the surrounding frame
- const long nOld = lLogicNullOffset;
+ const tools::Long nOld = lLogicNullOffset;
lLogicNullOffset = mxColumnItem ? mxColumnItem->GetLeft() : mxULSpaceItem->GetUpper();
if(bAppSetNullOffset)
@@ -494,9 +494,9 @@ void SvxRuler::UpdateFrame()
SetMargin1(ConvertVPosPixel(lAppNullOffset), nMarginStyle);
}
- long lLower = mxColumnItem ? mxColumnItem->GetRight() : mxULSpaceItem->GetLower();
- long nMargin2 = mxPagePosItem->GetHeight() - lLower - lLogicNullOffset + lAppNullOffset;
- long nMargin2Pixel = ConvertVPosPixel(nMargin2);
+ tools::Long lLower = mxColumnItem ? mxColumnItem->GetRight() : mxULSpaceItem->GetLower();
+ tools::Long nMargin2 = mxPagePosItem->GetHeight() - lLower - lLogicNullOffset + lAppNullOffset;
+ tools::Long nMargin2Pixel = ConvertVPosPixel(nMargin2);
SetMargin2(nMargin2Pixel, nMarginStyle);
}
@@ -552,9 +552,9 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt )
if (!mxParaItem)
break;
- long nIndex = aSelection.nAryPos + INDENT_GAP;
+ tools::Long nIndex = aSelection.nAryPos + INDENT_GAP;
- long nIndentValue = 0.0;
+ tools::Long nIndentValue = 0.0;
if (nIndex == INDENT_LEFT_MARGIN)
nIndentValue = mxParaItem->GetTextLeft();
else if (nIndex == INDENT_FIRST_LINE)
@@ -590,7 +590,7 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt )
}
case RulerType::Margin1:
{
- long nLeft = 0.0;
+ tools::Long nLeft = 0.0;
if (mxLRSpaceItem)
nLeft = mxLRSpaceItem->GetLeft();
else if (mxULSpaceItem)
@@ -606,7 +606,7 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt )
}
case RulerType::Margin2:
{
- long nRight = 0.0;
+ tools::Long nRight = 0.0;
if (mxLRSpaceItem)
nRight = mxLRSpaceItem->GetRight();
else if (mxULSpaceItem)
@@ -786,7 +786,7 @@ void SvxRuler::UpdateObject()
{
DBG_ASSERT(!mpObjectBorders.empty(), "no Buffer");
// !! to the page margin
- long nMargin = mxLRSpaceItem ? mxLRSpaceItem->GetLeft() : 0;
+ tools::Long nMargin = mxLRSpaceItem ? mxLRSpaceItem->GetLeft() : 0;
mpObjectBorders[0].nPos =
ConvertPosPixel(mxObjectItem->GetStartX() -
nMargin + lAppNullOffset);
@@ -825,14 +825,14 @@ void SvxRuler::UpdatePara()
{
bool bRTLText = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue();
// First-line indent is negative to the left paragraph margin
- long nLeftFrameMargin = GetLeftFrameMargin();
- long nRightFrameMargin = GetRightFrameMargin();
+ tools::Long nLeftFrameMargin = GetLeftFrameMargin();
+ tools::Long nRightFrameMargin = GetRightFrameMargin();
SetLeftFrameMargin(ConvertHPosPixel(nLeftFrameMargin));
SetRightFrameMargin(ConvertHPosPixel(nRightFrameMargin));
- long leftMargin;
- long leftFirstLine;
- long rightMargin;
+ tools::Long leftMargin;
+ tools::Long leftFirstLine;
+ tools::Long rightMargin;
if(bRTLText)
{
@@ -917,7 +917,7 @@ void SvxRuler::UpdatePage()
SetPagePos();
}
- long lPos = 0;
+ tools::Long lPos = 0;
Point aOwnPos = GetPosPixel();
Point aEdtWinPos = pEditWin->GetPosPixel();
if( AllSettings::GetLayoutRTL() && bHorz )
@@ -957,7 +957,7 @@ void SvxRuler::Update(const SvxPagePosSizeItem *pItem) // new value of page attr
}
}
-void SvxRuler::SetDefTabDist(long inDefTabDist) // New distance for DefaultTabs in App-Metrics
+void SvxRuler::SetDefTabDist(tools::Long inDefTabDist) // New distance for DefaultTabs in App-Metrics
{
if (lAppNullOffset == LONG_MAX)
UpdateFrame(); // hack: try to get lAppNullOffset initialized
@@ -1003,22 +1003,22 @@ void SvxRuler::UpdateTabs()
// Distance last Tab <-> Right paragraph margin / DefaultTabDist
bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue();
- const long nLeftFrameMargin = GetLeftFrameMargin();
- const long nRightFrameMargin = GetRightFrameMargin();
+ const tools::Long nLeftFrameMargin = GetLeftFrameMargin();
+ const tools::Long nRightFrameMargin = GetRightFrameMargin();
//#i24363# tab stops relative to indent
- const long nParaItemTxtLeft = mxParaItem->GetTextLeft();
+ const tools::Long nParaItemTxtLeft = mxParaItem->GetTextLeft();
- const long lParaIndent = nLeftFrameMargin + nParaItemTxtLeft;
- const long lRightMargin = nRightFrameMargin - nParaItemTxtLeft;
+ const tools::Long lParaIndent = nLeftFrameMargin + nParaItemTxtLeft;
+ const tools::Long lRightMargin = nRightFrameMargin - nParaItemTxtLeft;
- const long lLastTab = mxTabStopItem->Count()
+ const tools::Long lLastTab = mxTabStopItem->Count()
? ConvertHPosPixel(mxTabStopItem->At(mxTabStopItem->Count() - 1).GetTabPos())
: 0;
- const long lPosPixel = ConvertHPosPixel(lParaIndent) + lLastTab;
- const long lRightIndent = ConvertHPosPixel(nRightFrameMargin - mxParaItem->GetRight());
+ const tools::Long lPosPixel = ConvertHPosPixel(lParaIndent) + lLastTab;
+ const tools::Long lRightIndent = ConvertHPosPixel(nRightFrameMargin - mxParaItem->GetRight());
- long nDefTabDist = ConvertHPosPixel(lDefTabDist);
+ tools::Long nDefTabDist = ConvertHPosPixel(lDefTabDist);
if( !nDefTabDist )
nDefTabDist = 1;
@@ -1037,20 +1037,20 @@ void SvxRuler::UpdateTabs()
nTabCount = 0;
sal_uInt16 j;
- const long lParaIndentPix = ConvertSizePixel(lParaIndent);
+ const tools::Long lParaIndentPix = ConvertSizePixel(lParaIndent);
- long lTabStartLogic = (mxRulerImpl->bIsTabsRelativeToIndent ? lParaIndent : nLeftFrameMargin)
+ tools::Long lTabStartLogic = (mxRulerImpl->bIsTabsRelativeToIndent ? lParaIndent : nLeftFrameMargin)
+ lAppNullOffset;
if (bRTL)
{
lTabStartLogic = lParaIndent + lRightMargin - lTabStartLogic;
}
- long lLastTabOffsetLogic = 0;
+ tools::Long lLastTabOffsetLogic = 0;
for(j = 0; j < mxTabStopItem->Count(); ++j)
{
const SvxTabStop* pTab = &mxTabStopItem->At(j);
lLastTabOffsetLogic = pTab->GetTabPos();
- long lPos = lTabStartLogic + (bRTL ? -lLastTabOffsetLogic : lLastTabOffsetLogic);
+ tools::Long lPos = lTabStartLogic + (bRTL ? -lLastTabOffsetLogic : lLastTabOffsetLogic);
mpTabs[nTabCount + TAB_GAP].nPos = ConvertHPosPixel(lPos);
mpTabs[nTabCount + TAB_GAP].nStyle = ToSvTab_Impl(pTab->GetAdjustment());
++nTabCount;
@@ -1123,7 +1123,7 @@ void SvxRuler::Update(const SvxObjectItem *pItem) // new value for objects
}
}
-void SvxRuler::SetNullOffsetLogic(long lVal) // Setting of the logic NullOffsets
+void SvxRuler::SetNullOffsetLogic(tools::Long lVal) // Setting of the logic NullOffsets
{
lAppNullOffset = lLogicNullOffset - lVal;
bAppSetNullOffset = true;
@@ -1151,14 +1151,14 @@ void SvxRuler::Update()
UpdateTabs();
}
-long SvxRuler::GetPageWidth() const
+tools::Long SvxRuler::GetPageWidth() const
{
if (!mxPagePosItem)
return 0;
return bHorz ? mxPagePosItem->GetWidth() : mxPagePosItem->GetHeight();
}
-inline long SvxRuler::GetFrameLeft() const
+inline tools::Long SvxRuler::GetFrameLeft() const
{
/* Get Left margin in Pixels */
return bAppSetNullOffset ?
@@ -1166,25 +1166,25 @@ inline long SvxRuler::GetFrameLeft() const
Ruler::GetNullOffset();
}
-long SvxRuler::GetFirstLineIndent() const
+tools::Long SvxRuler::GetFirstLineIndent() const
{
/* Get First-line indent in pixels */
return mxParaItem ? mpIndents[INDENT_FIRST_LINE].nPos : GetMargin1();
}
-long SvxRuler::GetLeftIndent() const
+tools::Long SvxRuler::GetLeftIndent() const
{
/* Get Left paragraph margin in Pixels */
return mxParaItem ? mpIndents[INDENT_LEFT_MARGIN].nPos : GetMargin1();
}
-long SvxRuler::GetRightIndent() const
+tools::Long SvxRuler::GetRightIndent() const
{
/* Get Right paragraph margin in Pixels */
return mxParaItem ? mpIndents[INDENT_RIGHT_MARGIN].nPos : GetMargin2();
}
-long SvxRuler::GetLogicRightIndent() const
+tools::Long SvxRuler::GetLogicRightIndent() const
{
/* Get Right paragraph margin in Logic */
return mxParaItem ? GetRightFrameMargin() - mxParaItem->GetRight() : GetRightFrameMargin();
@@ -1192,12 +1192,12 @@ long SvxRuler::GetLogicRightIndent() const
// Left margin in App values, is either the margin (= 0) or the left edge of
// the column that is set in the column attribute as current column.
-long SvxRuler::GetLeftFrameMargin() const
+tools::Long SvxRuler::GetLeftFrameMargin() const
{
// #126721# for some unknown reason the current column is set to 0xffff
DBG_ASSERT(!mxColumnItem || mxColumnItem->GetActColumn() < mxColumnItem->Count(),
"issue #126721# - invalid current column!");
- long nLeft = 0;
+ tools::Long nLeft = 0;
if (mxColumnItem &&
mxColumnItem->Count() &&
mxColumnItem->IsConsistent())
@@ -1208,7 +1208,7 @@ long SvxRuler::GetLeftFrameMargin() const
return nLeft;
}
-inline long SvxRuler::GetLeftMin() const
+inline tools::Long SvxRuler::GetLeftMin() const
{
DBG_ASSERT(mxMinMaxItem, "no MinMax value set");
if (mxMinMaxItem)
@@ -1221,7 +1221,7 @@ inline long SvxRuler::GetLeftMin() const
return 0;
}
-inline long SvxRuler::GetRightMax() const
+inline tools::Long SvxRuler::GetRightMax() const
{
DBG_ASSERT(mxMinMaxItem, "no MinMax value set");
if (mxMinMaxItem)
@@ -1235,7 +1235,7 @@ inline long SvxRuler::GetRightMax() const
}
-long SvxRuler::GetRightFrameMargin() const
+tools::Long SvxRuler::GetRightFrameMargin() const
{
/* Get right frame margin (in logical units) */
if (mxColumnItem)
@@ -1246,7 +1246,7 @@ long SvxRuler::GetRightFrameMargin() const
}
}
- long lResult = lLogicNullOffset;
+ tools::Long lResult = lLogicNullOffset;
// If possible deduct right table entry
if(mxColumnItem && mxColumnItem->IsTable())
@@ -1268,15 +1268,15 @@ long SvxRuler::GetRightFrameMargin() const
SvxRulerSupportFlags::NEGATIVE_MARGINS )
#define TAB_FLAG ( mxColumnItem && mxColumnItem->IsTable() )
-long SvxRuler::GetCorrectedDragPos( bool bLeft, bool bRight )
+tools::Long SvxRuler::GetCorrectedDragPos( bool bLeft, bool bRight )
{
/*
Corrects the position within the calculated limits. The limit values are in
pixels relative to the page edge.
*/
- const long lNullPix = Ruler::GetNullOffset();
- long lDragPos = GetDragPos() + lNullPix;
+ const tools::Long lNullPix = Ruler::GetNullOffset();
+ tools::Long lDragPos = GetDragPos() + lNullPix;
bool bHoriRows = bHorz && mxRulerImpl->bIsTableRows;
if((bLeft || bHoriRows) && lDragPos < nMaxLeft)
lDragPos = nMaxLeft;
@@ -1287,7 +1287,7 @@ long SvxRuler::GetCorrectedDragPos( bool bLeft, bool bRight )
static void ModifyTabs_Impl( sal_uInt16 nCount, // Number of Tabs
RulerTab* pTabs, // Tab buffer
- long lDiff) // difference to be added
+ tools::Long lDiff) // difference to be added
{
/* Helper function, move all the tabs by a fixed value */
if( pTabs )
@@ -1302,7 +1302,7 @@ static void ModifyTabs_Impl( sal_uInt16 nCount, // Number of Tabs
void SvxRuler::DragMargin1()
{
/* Dragging the left edge of frame */
- long aDragPosition = GetCorrectedDragPos( !TAB_FLAG || !NEG_FLAG );
+ tools::Long aDragPosition = GetCorrectedDragPos( !TAB_FLAG || !NEG_FLAG );
aDragPosition = MakePositionSticky(aDragPosition, GetRightFrameMargin(), false);
@@ -1316,10 +1316,10 @@ void SvxRuler::DragMargin1()
AdjustMargin1(aDragPosition);
}
-void SvxRuler::AdjustMargin1(long lInputDiff)
+void SvxRuler::AdjustMargin1(tools::Long lInputDiff)
{
- const long nOld = bAppSetNullOffset? GetMargin1(): GetNullOffset();
- const long lDragPos = lInputDiff;
+ const tools::Long nOld = bAppSetNullOffset? GetMargin1(): GetNullOffset();
+ const tools::Long lDragPos = lInputDiff;
bool bProtectColumns =
mxRulerImpl->aProtectItem->IsSizeProtected() ||
@@ -1330,7 +1330,7 @@ void SvxRuler::AdjustMargin1(long lInputDiff)
if(!bAppSetNullOffset)
{
- long lDiff = lDragPos;
+ tools::Long lDiff = lDragPos;
SetNullOffset(nOld + lDiff);
if (!mxColumnItem || !(nDragType & SvxRulerDragFlags::OBJECT_SIZE_LINEAR))
{
@@ -1383,7 +1383,7 @@ void SvxRuler::AdjustMargin1(long lInputDiff)
}
else
{
- long lDiff = lDragPos - nOld;
+ tools::Long lDiff = lDragPos - nOld;
SetMargin1(nOld + lDiff, nMarginStyle);
if (!mxColumnItem
@@ -1437,9 +1437,9 @@ void SvxRuler::AdjustMargin1(long lInputDiff)
void SvxRuler::DragMargin2()
{
/* Dragging the right edge of frame */
- long aDragPosition = GetCorrectedDragPos( true, !TAB_FLAG || !NEG_FLAG);
+ tools::Long aDragPosition = GetCorrectedDragPos( true, !TAB_FLAG || !NEG_FLAG);
aDragPosition = MakePositionSticky(aDragPosition, GetLeftFrameMargin(), false);
- long lDiff = aDragPosition - GetMargin2();
+ tools::Long lDiff = aDragPosition - GetMargin2();
// Check if position changed
if (lDiff == 0)
@@ -1474,7 +1474,7 @@ void SvxRuler::DragMargin2()
void SvxRuler::DragIndents()
{
/* Dragging the paragraph indents */
- long aDragPosition = NEG_FLAG ? GetDragPos() : GetCorrectedDragPos();
+ tools::Long aDragPosition = NEG_FLAG ? GetDragPos() : GetCorrectedDragPos();
const sal_uInt16 nIndex = GetDragAryPos() + INDENT_GAP;
bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue();
@@ -1484,7 +1484,7 @@ void SvxRuler::DragIndents()
else
aDragPosition = MakePositionSticky(aDragPosition, bRTL ? GetRightFrameMargin() : GetLeftFrameMargin());
- const long lDiff = mpIndents[nIndex].nPos - aDragPosition;
+ const tools::Long lDiff = mpIndents[nIndex].nPos - aDragPosition;
// Check if position changed
if (lDiff == 0)
@@ -1502,7 +1502,7 @@ void SvxRuler::DragIndents()
DrawLine_Impl(lTabPos, 1, bHorz);
}
-void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal)
+void SvxRuler::DrawLine_Impl(tools::Long& lTabPosition, int nNew, bool bHorizontal)
{
/*
Output routine for the ledger line when moving tabs, tables and other
@@ -1510,7 +1510,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal)
*/
if(bHorizontal)
{
- const long nHeight = pEditWin->GetOutputSize().Height();
+ const tools::Long nHeight = pEditWin->GetOutputSize().Height();
Point aZero = pEditWin->GetMapMode().GetOrigin();
if(lTabPosition != -1)
{
@@ -1521,7 +1521,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal)
}
if( nNew & 1 )
{
- long nDrapPosition = GetCorrectedDragPos( ( nNew & 4 ) != 0, ( nNew & 2 ) != 0 );
+ tools::Long nDrapPosition = GetCorrectedDragPos( ( nNew & 4 ) != 0, ( nNew & 2 ) != 0 );
nDrapPosition = MakePositionSticky(nDrapPosition, GetLeftFrameMargin());
lTabPosition = ConvertHSizeLogic( nDrapPosition + GetNullOffset() );
if (mxPagePosItem)
@@ -1534,7 +1534,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal)
}
else
{
- const long nWidth = pEditWin->GetOutputSize().Width();
+ const tools::Long nWidth = pEditWin->GetOutputSize().Width();
Point aZero = pEditWin->GetMapMode().GetOrigin();
if(lTabPosition != -1)
{
@@ -1546,7 +1546,7 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal)
if(nNew & 1)
{
- long nDrapPosition = GetCorrectedDragPos();
+ tools::Long nDrapPosition = GetCorrectedDragPos();
nDrapPosition = MakePositionSticky(nDrapPosition, GetLeftFrameMargin());
lTabPosition = ConvertVSizeLogic(nDrapPosition + GetNullOffset());
if (mxPagePosItem)
@@ -1562,11 +1562,11 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal)
void SvxRuler::DragTabs()
{
/* Dragging of Tabs */
- long aDragPosition = GetCorrectedDragPos(true, false);
+ tools::Long aDragPosition = GetCorrectedDragPos(true, false);
aDragPosition = MakePositionSticky(aDragPosition, GetLeftFrameMargin());
sal_uInt16 nIdx = GetDragAryPos() + TAB_GAP;
- long nDiff = aDragPosition - mpTabs[nIdx].nPos;
+ tools::Long nDiff = aDragPosition - mpTabs[nIdx].nPos;
if (nDiff == 0)
return;
@@ -1594,7 +1594,7 @@ void SvxRuler::DragTabs()
if(mpTabs[i].nStyle & RULER_TAB_DEFAULT)
// can be canceled at the DefaultTabs
break;
- long nDelta = mxRulerImpl->nTotalDist * mxRulerImpl->pPercBuf[i];
+ tools::Long nDelta = mxRulerImpl->nTotalDist * mxRulerImpl->pPercBuf[i];
nDelta /= 1000;
mpTabs[i].nPos = mpTabs[nIdx].nPos + nDelta;
if(mpTabs[i].nPos + GetNullOffset() > nMaxRight)
@@ -1638,7 +1638,7 @@ void SvxRuler::SetActive(bool bOn)
}
void SvxRuler::UpdateParaContents_Impl(
- long lDifference,
+ tools::Long lDifference,
UpdateType eType) // Art (all, left or right)
{
/* Helper function; carry Tabs and Paragraph Margins */
@@ -1683,10 +1683,10 @@ void SvxRuler::DragBorders()
}
RulerDragSize nDragSize = GetDragSize();
- long lDiff = 0;
+ tools::Long lDiff = 0;
// the drag position has to be corrected to be able to prevent borders from passing each other
- long lPos = MakePositionSticky(GetCorrectedDragPos(), GetLeftFrameMargin());
+ tools::Long lPos = MakePositionSticky(GetCorrectedDragPos(), GetLeftFrameMargin());
switch(nDragSize)
{
@@ -1699,10 +1699,10 @@ void SvxRuler::DragBorders()
if(nDragType & SvxRulerDragFlags::OBJECT_SIZE_LINEAR)
{
- long nRight = GetMargin2() - glMinFrame; // Right limiters
+ tools::Long nRight = GetMargin2() - glMinFrame; // Right limiters
for(int i = mpBorders.size() - 2; i >= nIndex; --i)
{
- long l = mpBorders[i].nPos;
+ tools::Long l = mpBorders[i].nPos;
mpBorders[i].nPos += lDiff;
mpBorders[i].nPos = std::min(mpBorders[i].nPos, nRight - mpBorders[i].nWidth);
nRight = mpBorders[i].nPos - glMinFrame;
@@ -1723,7 +1723,7 @@ void SvxRuler::DragBorders()
else if(nDragType & SvxRulerDragFlags::OBJECT_SIZE_PROPORTIONAL)
{
int nLimit;
- long lLeft;
+ tools::Long lLeft;
int nStartLimit = mpBorders.size() - 2;
switch(GetDragType())
{
@@ -1772,7 +1772,7 @@ void SvxRuler::DragBorders()
for(int i = nStartLimit; i >= nLimit; --i)
{
- long l = mpBorders[i].nPos;
+ tools::Long l = mpBorders[i].nPos;
mpBorders[i].nPos =
lLeft +
(mxRulerImpl->nTotalDist * mxRulerImpl->pPercBuf[i]) / 1000 +
@@ -1860,7 +1860,7 @@ void SvxRuler::DragBorders()
}
case RulerDragSize::N2:
{
- const long nOld = mpBorders[nIndex].nWidth;
+ const tools::Long nOld = mpBorders[nIndex].nWidth;
mpBorders[nIndex].nWidth = lPos - mpBorders[nIndex].nPos;
lDiff = mpBorders[nIndex].nWidth - nOld;
break;
@@ -1889,7 +1889,7 @@ void SvxRuler::DragObjectBorder()
/* Dragging of object edges */
if(RulerDragSize::Move == GetDragSize())
{
- const long lPosition = MakePositionSticky(GetCorrectedDragPos(), GetLeftFrameMargin());
+ const tools::Long lPosition = MakePositionSticky(GetCorrectedDragPos(), GetLeftFrameMargin());
const sal_uInt16 nIdx = GetDragAryPos();
mpObjectBorders[GetObjectBordersOff(nIdx)].nPos = lPosition;
@@ -1907,7 +1907,7 @@ void SvxRuler::ApplyMargins()
if(bHorz)
{
- const long lOldNull = lLogicNullOffset;
+ const tools::Long lOldNull = lLogicNullOffset;
if(mxRulerImpl->lMaxLeftLogic != -1 && nMaxLeft == GetMargin1() + Ruler::GetNullOffset())
{
lLogicNullOffset = mxRulerImpl->lMaxLeftLogic;
@@ -1924,7 +1924,7 @@ void SvxRuler::ApplyMargins()
lAppNullOffset += lLogicNullOffset - lOldNull;
}
- long nRight;
+ tools::Long nRight;
if(mxRulerImpl->lMaxRightLogic != -1
&& nMaxRight == GetMargin2() + Ruler::GetNullOffset())
{
@@ -1932,7 +1932,7 @@ void SvxRuler::ApplyMargins()
}
else
{
- nRight = std::max(long(0),
+ nRight = std::max(tools::Long(0),
mxPagePosItem->GetWidth() - mxLRSpaceItem->GetLeft() -
(ConvertHPosLogic(GetMargin2()) - lAppNullOffset));
@@ -1949,7 +1949,7 @@ void SvxRuler::ApplyMargins()
}
else
{
- const long lOldNull = lLogicNullOffset;
+ const tools::Long lOldNull = lLogicNullOffset;
lLogicNullOffset =
ConvertVPosLogic(GetFrameLeft()) -
lAppNullOffset;
@@ -1961,7 +1961,7 @@ void SvxRuler::ApplyMargins()
}
mxULSpaceItem->SetLower(
PixelVAdjust(
- std::max(long(0), mxPagePosItem->GetHeight() -
+ std::max(tools::Long(0), mxPagePosItem->GetHeight() -
mxULSpaceItem->GetUpper() -
(ConvertVPosLogic(GetMargin2()) -
lAppNullOffset)), mxULSpaceItem->GetLower()));
@@ -1978,12 +1978,12 @@ void SvxRuler::ApplyMargins()
UpdateTabs();
}
-long SvxRuler::RoundToCurrentMapMode(long lValue) const
+tools::Long SvxRuler::RoundToCurrentMapMode(tools::Long lValue) const
{
RulerUnitData aUnitData = GetCurrentRulerUnit();
double aRoundingFactor = aUnitData.nTickUnit / aUnitData.nTick1;
- long lNewValue = OutputDevice::LogicToLogic(Size(lValue, 0), pEditWin->GetMapMode(), GetCurrentMapMode()).Width();
+ tools::Long lNewValue = OutputDevice::LogicToLogic(Size(lValue, 0), pEditWin->GetMapMode(), GetCurrentMapMode()).Width();
lNewValue = (rtl::math::round(lNewValue / static_cast<double>(aUnitData.nTickUnit) * aRoundingFactor) / aRoundingFactor) * aUnitData.nTickUnit;
return OutputDevice::LogicToLogic(Size(lNewValue, 0), GetCurrentMapMode(), pEditWin->GetMapMode()).Width();
}
@@ -1992,30 +1992,30 @@ void SvxRuler::ApplyIndents()
{
/* Applying paragraph settings; changed by dragging. */
- long nLeftFrameMargin = GetLeftFrameMargin();
+ tools::Long nLeftFrameMargin = GetLeftFrameMargin();
bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue();
- long nNewTxtLeft;
- long nNewFirstLineOffset;
- long nNewRight;
+ tools::Long nNewTxtLeft;
+ tools::Long nNewFirstLineOffset;
+ tools::Long nNewRight;
- long nFirstLine = ConvertPosLogic(mpIndents[INDENT_FIRST_LINE].nPos);
- long nLeftMargin = ConvertPosLogic(mpIndents[INDENT_LEFT_MARGIN].nPos);
- long nRightMargin = ConvertPosLogic(mpIndents[INDENT_RIGHT_MARGIN].nPos);
+ tools::Long nFirstLine = ConvertPosLogic(mpIndents[INDENT_FIRST_LINE].nPos);
+ tools::Long nLeftMargin = ConvertPosLogic(mpIndents[INDENT_LEFT_MARGIN].nPos);
+ tools::Long nRightMargin = ConvertPosLogic(mpIndents[INDENT_RIGHT_MARGIN].nPos);
if(mxColumnItem && ((bRTL && !IsActLastColumn(true)) || (!bRTL && !IsActFirstColumn(true))))
{
if(bRTL)
{
- long nRightColumn = GetActRightColumn(true);
- long nRightBorder = ConvertPosLogic(mpBorders[nRightColumn].nPos);
+ tools::Long nRightColumn = GetActRightColumn(true);
+ tools::Long nRightBorder = ConvertPosLogic(mpBorders[nRightColumn].nPos);
nNewTxtLeft = nRightBorder - nLeftMargin - lAppNullOffset;
}
else
{
- long nLeftColumn = GetActLeftColumn(true);
- long nLeftBorder = ConvertPosLogic(mpBorders[nLeftColumn].nPos + mpBorders[nLeftColumn].nWidth);
+ tools::Long nLeftColumn = GetActLeftColumn(true);
+ tools::Long nLeftBorder = ConvertPosLogic(mpBorders[nLeftColumn].nPos + mpBorders[nLeftColumn].nWidth);
nNewTxtLeft = nLeftMargin - nLeftBorder - lAppNullOffset;
}
}
@@ -2023,12 +2023,12 @@ void SvxRuler::ApplyIndents()
{
if(bRTL)
{
- long nRightBorder = ConvertPosLogic(GetMargin2());
+ tools::Long nRightBorder = ConvertPosLogic(GetMargin2());
nNewTxtLeft = nRightBorder - nLeftMargin - lAppNullOffset;
}
else
{
- long nLeftBorder = ConvertPosLogic(GetMargin1());
+ tools::Long nLeftBorder = ConvertPosLogic(GetMargin1());
nNewTxtLeft = nLeftBorder + nLeftMargin - nLeftFrameMargin - lAppNullOffset;
}
}
@@ -2042,14 +2042,14 @@ void SvxRuler::ApplyIndents()
{
if(bRTL)
{
- long nLeftColumn = GetActLeftColumn(true);
- long nLeftBorder = ConvertPosLogic(mpBorders[nLeftColumn].nPos + mpBorders[nLeftColumn].nWidth);
+ tools::Long nLeftColumn = GetActLeftColumn(true);
+ tools::Long nLeftBorder = ConvertPosLogic(mpBorders[nLeftColumn].nPos + mpBorders[nLeftColumn].nWidth);
nNewRight = nRightMargin - nLeftBorder - lAppNullOffset;
}
else
{
- long nRightColumn = GetActRightColumn(true);
- long nRightBorder = ConvertPosLogic(mpBorders[nRightColumn].nPos);
+ tools::Long nRightColumn = GetActRightColumn(true);
+ tools::Long nRightBorder = ConvertPosLogic(mpBorders[nRightColumn].nPos);
nNewRight = nRightBorder - nRightMargin - lAppNullOffset;
}
}
@@ -2057,12 +2057,12 @@ void SvxRuler::ApplyIndents()
{
if(bRTL)
{
- long nLeftBorder = ConvertPosLogic(GetMargin1());
+ tools::Long nLeftBorder = ConvertPosLogic(GetMargin1());
nNewRight = nLeftBorder + nRightMargin - nLeftFrameMargin - lAppNullOffset;
}
else
{
- long nRightBorder = ConvertPosLogic(GetMargin2());
+ tools::Long nRightBorder = ConvertPosLogic(GetMargin2());
nNewRight = nRightBorder - nRightMargin - lAppNullOffset;
}
}
@@ -2133,7 +2133,7 @@ void SvxRuler::ApplyTabs()
mpTabs[nCoreIdx + TAB_GAP].nPos + Ruler::GetNullOffset() == nMaxRight )
{
// Set tab pos exactly at the right indent
- long nTmpLeftIndentLogic
+ tools::Long nTmpLeftIndentLogic
= lAppNullOffset + (bRTL ? GetRightFrameMargin() : GetLeftFrameMargin());
if (mxRulerImpl->bIsTabsRelativeToIndent && mxParaItem)
{
@@ -2147,21 +2147,21 @@ void SvxRuler::ApplyTabs()
if(bRTL)
{
//#i24363# tab stops relative to indent
- const long nTmpLeftIndent = mxRulerImpl->bIsTabsRelativeToIndent ?
+ const tools::Long nTmpLeftIndent = mxRulerImpl->bIsTabsRelativeToIndent ?
GetLeftIndent() :
ConvertHPosPixel( GetRightFrameMargin() + lAppNullOffset );
- long nNewPosition = ConvertHPosLogic(nTmpLeftIndent - mpTabs[nCoreIdx + TAB_GAP].nPos);
+ tools::Long nNewPosition = ConvertHPosLogic(nTmpLeftIndent - mpTabs[nCoreIdx + TAB_GAP].nPos);
aTabStop.GetTabPos() = PixelHAdjust(nNewPosition - lAppNullOffset, aTabStop.GetTabPos());
}
else
{
//#i24363# tab stops relative to indent
- const long nTmpLeftIndent = mxRulerImpl->bIsTabsRelativeToIndent ?
+ const tools::Long nTmpLeftIndent = mxRulerImpl->bIsTabsRelativeToIndent ?
GetLeftIndent() :
ConvertHPosPixel( GetLeftFrameMargin() + lAppNullOffset );
- long nNewPosition = ConvertHPosLogic(mpTabs[nCoreIdx + TAB_GAP].nPos - nTmpLeftIndent);
+ tools::Long nNewPosition = ConvertHPosLogic(mpTabs[nCoreIdx + TAB_GAP].nPos - nTmpLeftIndent);
aTabStop.GetTabPos() = PixelHAdjust(nNewPosition - lAppNullOffset, aTabStop.GetTabPos());
}
}
@@ -2179,10 +2179,10 @@ void SvxRuler::ApplyBorders()
/* Applying (table) column settings; changed by dragging. */
if(mxColumnItem->IsTable())
{
- long lValue = GetFrameLeft();
+ tools::Long lValue = GetFrameLeft();
if(lValue != mxRulerImpl->nColLeftPix)
{
- long nLeft = PixelHAdjust(
+ tools::Long nLeft = PixelHAdjust(
ConvertHPosLogic(lValue) -
lAppNullOffset,
mxColumnItem->GetLeft());
@@ -2193,8 +2193,8 @@ void SvxRuler::ApplyBorders()
if(lValue != mxRulerImpl->nColRightPix)
{
- long nWidthOrHeight = bHorz ? mxPagePosItem->GetWidth() : mxPagePosItem->GetHeight();
- long nRight = PixelHAdjust(
+ tools::Long nWidthOrHeight = bHorz ? mxPagePosItem->GetWidth() : mxPagePosItem->GetHeight();
+ tools::Long nRight = PixelHAdjust(
nWidthOrHeight -
mxColumnItem->GetLeft() -
ConvertHPosLogic(lValue) -
@@ -2206,11 +2206,11 @@ void SvxRuler::ApplyBorders()
for(sal_uInt16 i = 0; i < mxColumnItem->Count() - 1; ++i)
{
- long& nEnd = mxColumnItem->At(i).nEnd;
+ tools::Long& nEnd = mxColumnItem->At(i).nEnd;
nEnd = PixelHAdjust(
ConvertPosLogic(mpBorders[i].nPos),
mxColumnItem->At(i).nEnd);
- long& nStart = mxColumnItem->At(i + 1).nStart;
+ tools::Long& nStart = mxColumnItem->At(i + 1).nStart;
nStart = PixelHAdjust(
ConvertSizeLogic(mpBorders[i].nPos +
mpBorders[i].nWidth) -
@@ -2241,15 +2241,15 @@ void SvxRuler::ApplyObject()
/* Applying object settings, changed by dragging. */
// to the page margin
- long nMargin = mxLRSpaceItem ? mxLRSpaceItem->GetLeft() : 0;
- long nStartX = PixelAdjust(
+ tools::Long nMargin = mxLRSpaceItem ? mxLRSpaceItem->GetLeft() : 0;
+ tools::Long nStartX = PixelAdjust(
ConvertPosLogic(mpObjectBorders[0].nPos) +
nMargin -
lAppNullOffset,
mxObjectItem->GetStartX());
mxObjectItem->SetStartX(nStartX);
- long nEndX = PixelAdjust(
+ tools::Long nEndX = PixelAdjust(
ConvertPosLogic(mpObjectBorders[1].nPos) +
nMargin -
lAppNullOffset,
@@ -2257,14 +2257,14 @@ void SvxRuler::ApplyObject()
mxObjectItem->SetEndX(nEndX);
nMargin = mxULSpaceItem ? mxULSpaceItem->GetUpper() : 0;
- long nStartY = PixelAdjust(
+ tools::Long nStartY = PixelAdjust(
ConvertPosLogic(mpObjectBorders[2].nPos) +
nMargin -
lAppNullOffset,
mxObjectItem->GetStartY());
mxObjectItem->SetStartY(nStartY);
- long nEndY = PixelAdjust(
+ tools::Long nEndY = PixelAdjust(
ConvertPosLogic(mpObjectBorders[3].nPos) +
nMargin -
lAppNullOffset,
@@ -2292,13 +2292,13 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType)
mxRulerImpl->SetPercSize(mxColumnItem->Count());
- long lPos;
- long lWidth=0;
+ tools::Long lPos;
+ tools::Long lWidth=0;
sal_uInt16 nStart;
sal_uInt16 nIdx=GetDragAryPos();
- long lActWidth=0;
- long lActBorderSum;
- long lOrigLPos;
+ tools::Long lActWidth=0;
+ tools::Long lActBorderSum;
+ tools::Long lOrigLPos;
if(eType != RulerType::Border)
{
@@ -2393,7 +2393,7 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType)
for(sal_uInt16 n=0;n<=nIdx;mxRulerImpl->pPercBuf[n++]=0) ;
for(sal_uInt16 i = nIdx+1; i < nTabCount; ++i)
{
- const long nDelta = mpTabs[i].nPos - mpTabs[nIdx].nPos;
+ const tools::Long nDelta = mpTabs[i].nPos - mpTabs[nIdx].nPos;
mxRulerImpl->pPercBuf[i] = static_cast<sal_uInt16>((nDelta * 1000) / mxRulerImpl->nTotalDist);
}
break;
@@ -2481,13 +2481,13 @@ void SvxRuler::Click()
bool bContentProtected = mxRulerImpl->aProtectItem->IsContentProtected();
if( bContentProtected ) return;
- const long lPos = GetClickPos();
+ const tools::Long lPos = GetClickPos();
if(!((bRTL && lPos < std::min(GetFirstLineIndent(), GetLeftIndent()) && lPos > GetRightIndent()) ||
(!bRTL && lPos > std::min(GetFirstLineIndent(), GetLeftIndent()) && lPos < GetRightIndent())))
return;
//convert position in left-to-right text
- long nTabPos;
+ tools::Long nTabPos;
//#i24363# tab stops relative to indent
if(bRTL)
nTabPos = ( mxRulerImpl->bIsTabsRelativeToIndent ?
@@ -2513,7 +2513,7 @@ void SvxRuler::CalcMinMax()
page edge
*/
bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue();
- const long lNullPix = ConvertPosPixel(lLogicNullOffset);
+ const tools::Long lNullPix = ConvertPosPixel(lLogicNullOffset);
mxRulerImpl->lMaxLeftLogic=mxRulerImpl->lMaxRightLogic=-1;
switch(GetDragType())
{
@@ -2597,7 +2597,7 @@ void SvxRuler::CalcMinMax()
// Do not drag the left table edge over the edge of the page
if(mxLRSpaceItem && mxColumnItem->IsTable())
{
- long nTmp=ConvertSizePixel(mxLRSpaceItem->GetLeft());
+ tools::Long nTmp=ConvertSizePixel(mxLRSpaceItem->GetLeft());
if(nTmp>nMaxLeft)
nMaxLeft=nTmp;
}
@@ -2673,7 +2673,7 @@ void SvxRuler::CalcMinMax()
}
if( mxColumnItem->Count() >= 2 )
{
- long nNewMaxLeft =
+ tools::Long nNewMaxLeft =
glMinFrame + lNullPix +
mpBorders[mxColumnItem->Count() - 2].nPos +
mpBorders[mxColumnItem->Count() - 2].nWidth;
@@ -2856,7 +2856,7 @@ void SvxRuler::CalcMinMax()
if( nActLeftCol == nIdx )
{
- long nBorder = nNotHiddenRightCol ==
+ tools::Long nBorder = nNotHiddenRightCol ==
USHRT_MAX ?
GetMargin2() :
mpBorders[nNotHiddenRightCol].nPos;
@@ -3151,7 +3151,7 @@ void SvxRuler::EndDrag()
data to the application.
*/
const bool bUndo = IsDragCanceled();
- const long lPos = GetDragPos();
+ const tools::Long lPos = GetDragPos();
DrawLine_Impl(lTabPos, 6, bHorz);
lTabPos = -1;
@@ -3421,19 +3421,19 @@ bool SvxRuler::IsActFirstColumn(
return GetActLeftColumn(bForceDontConsiderHidden, nAct) == USHRT_MAX;
}
-long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const
+tools::Long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const
{
if(!(nDragType & SvxRulerDragFlags::OBJECT_SIZE_LINEAR))
{
// Remove the minimum width for all affected columns
// starting from the right edge
- long _nMaxRight = GetMargin2() - GetMargin1();
+ tools::Long _nMaxRight = GetMargin2() - GetMargin1();
- long lFences = 0;
- long lMinSpace = USHRT_MAX;
- long lOldPos;
- long lColumns = 0;
+ tools::Long lFences = 0;
+ tools::Long lMinSpace = USHRT_MAX;
+ tools::Long lOldPos;
+ tools::Long lColumns = 0;
sal_uInt16 nStart;
if(!mxColumnItem->IsTable())
@@ -3452,14 +3452,14 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const
for(size_t i = nStart; i < mpBorders.size() - 1; ++i)
{
- long lWidth = mpBorders[i].nPos - lOldPos;
+ tools::Long lWidth = mpBorders[i].nPos - lOldPos;
lColumns += lWidth;
if(lWidth < lMinSpace)
lMinSpace = lWidth;
lOldPos = mpBorders[i].nPos + mpBorders[i].nWidth;
lFences += mpBorders[i].nWidth;
}
- long lWidth = GetMargin2() - lOldPos;
+ tools::Long lWidth = GetMargin2() - lOldPos;
lColumns += lWidth;
if(lWidth < lMinSpace)
lMinSpace = lWidth;
@@ -3494,7 +3494,7 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const
nRight = GetActRightColumn(false, nActCol);
}
- long lWidth;
+ tools::Long lWidth;
if(nRight != USHRT_MAX)
{
lWidth = mpBorders[nRight].nPos - lOldPos;
@@ -3512,7 +3512,7 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const
}
}
- _nMaxRight -= static_cast<long>(lFences + glMinFrame / static_cast<float>(lMinSpace) * lColumns);
+ _nMaxRight -= static_cast<tools::Long>(lFences + glMinFrame / static_cast<float>(lMinSpace) * lColumns);
return _nMaxRight;
}
else
@@ -3530,7 +3530,7 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const
}
else
{
- long lWidth = 0;
+ tools::Long lWidth = 0;
for(size_t i = nCol; i < mpBorders.size() - 1; i++)
{
lWidth += glMinFrame + mpBorders[i].nWidth;
@@ -3546,7 +3546,7 @@ void SvxRuler::SetTabsRelativeToIndent( bool bRel )
mxRulerImpl->bIsTabsRelativeToIndent = bRel;
}
-void SvxRuler::SetValues(RulerChangeType type, long diffValue)
+void SvxRuler::SetValues(RulerChangeType type, tools::Long diffValue)
{
if (diffValue == 0)
return;
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index ab866786be82..770b58f1eee9 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -219,7 +219,7 @@ void SwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext)
sal_uInt32 nFreeWidth = aPagePrtArea.GetWidth() - rRenderContext.GetTextWidth(DEMOTEXT);
aFrmSize = Size(nFreeWidth / 2, (aTextLine.GetHeight() + 2) * 3);
- aDrawObj.SetSize(Size(std::max(5L, static_cast<long>(nFreeWidth) / 3L), std::max(5L, aFrmSize.Height() * 3L)));
+ aDrawObj.SetSize(Size(std::max(5L, static_cast<tools::Long>(nFreeWidth) / 3L), std::max(5L, aFrmSize.Height() * 3L)));
aDrawObj.SetPos(Point(aParaPrtArea.Right() + 1, aParaPrtArea.Bottom() / 2));
aParaPrtArea.SetRight( aDrawObj.Right() );
}
@@ -480,8 +480,8 @@ void SwFrameExample::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
if (nAnchor == RndStdIds::FLY_AT_FLY)
aRect = DrawInnerFrame_Impl(rRenderContext, aFrameAtFrame, m_aBgCol, m_aBorderCol);
- long lXPos = 0;
- long lYPos = 0;
+ tools::Long lXPos = 0;
+ tools::Long lYPos = 0;
// Horizontal alignment
if (nAnchor != RndStdIds::FLY_AS_CHAR)
@@ -601,7 +601,7 @@ void SwFrameExample::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
aFrmRect.Move(0, pOuterFrame->Bottom() - aFrmRect.Bottom());
// Draw Test paragraph
- const long nTxtLineHeight = aTextLine.GetHeight();
+ const tools::Long nTxtLineHeight = aTextLine.GetHeight();
tools::Rectangle aTxt(aTextLine);
sal_Int32 nStep;
sal_uInt16 nLines;
@@ -626,8 +626,8 @@ void SwFrameExample::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
if (nAnchor != RndStdIds::FLY_AS_CHAR)
{
// Simulate text
- const long nOldR = aTxt.Right();
- const long nOldL = aTxt.Left();
+ const tools::Long nOldR = aTxt.Right();
+ const tools::Long nOldL = aTxt.Left();
// #i22341#
const bool bIgnoreWrap = nAnchor == RndStdIds::FLY_AT_CHAR &&
diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx
index 3020e19a4ab0..bffd2e533684 100644
--- a/svx/source/engine3d/dragmt3d.cxx
+++ b/svx/source/engine3d/dragmt3d.cxx
@@ -357,7 +357,7 @@ void E3dDragRotate::MoveSdrDrag(const Point& rPnt)
{
fWAngle = NormAngle36000(GetAngle(rPnt - DragStat().GetRef1()) -
rCandidate.mnStartAngle) - rCandidate.mnLastAngle;
- rCandidate.mnLastAngle = static_cast<long>(fWAngle) + rCandidate.mnLastAngle;
+ rCandidate.mnLastAngle = static_cast<tools::Long>(fWAngle) + rCandidate.mnLastAngle;
fWAngle /= 100.0;
fHAngle = 0.0;
}
@@ -370,15 +370,15 @@ void E3dDragRotate::MoveSdrDrag(const Point& rPnt)
fHAngle = 90.0 * static_cast<double>(rPnt.Y() - maLastPos.Y())
/ static_cast<double>(maFullBound.GetHeight());
}
- long nSnap = 0;
+ tools::Long nSnap = 0;
if(!getSdrDragView().IsRotateAllowed())
nSnap = 90;
if(nSnap != 0)
{
- fWAngle = static_cast<double>((static_cast<long>(fWAngle) + nSnap/2) / nSnap * nSnap);
- fHAngle = static_cast<double>((static_cast<long>(fHAngle) + nSnap/2) / nSnap * nSnap);
+ fWAngle = static_cast<double>((static_cast<tools::Long>(fWAngle) + nSnap/2) / nSnap * nSnap);
+ fHAngle = static_cast<double>((static_cast<tools::Long>(fHAngle) + nSnap/2) / nSnap * nSnap);
}
// to radians
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index 36b45053f720..91f2bed2ae8e 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -432,7 +432,7 @@ void E3dObject::RestGeoData(const SdrObjGeoData& rGeo)
// This is however a correct implementation, because everything that has
// happened is a rotation around the axis perpendicular to the screen and that
// is regardless of how the scene has been rotated up until now.
-void E3dObject::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
+void E3dObject::NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
// So currently the glue points are defined relative to the scene aOutRect.
// Before turning the glue points are defined relative to the page. They
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index 9cd91246071a..9b52aceb5f2a 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -529,9 +529,9 @@ void E3dScene::RotateScene (const Point& rRef, double sn, double cs)
UpperLeft = aOutRect.TopLeft();
LowerRight = aOutRect.BottomRight();
- long dxOutRectHalf = labs(UpperLeft.X() - LowerRight.X());
+ tools::Long dxOutRectHalf = labs(UpperLeft.X() - LowerRight.X());
dxOutRectHalf /= 2;
- long dyOutRectHalf = labs(UpperLeft.Y() - LowerRight.Y());
+ tools::Long dyOutRectHalf = labs(UpperLeft.Y() - LowerRight.Y());
dyOutRectHalf /= 2;
// Only the center is moved. The corners are moved by NbcMove. For the
@@ -558,8 +558,8 @@ void E3dScene::RotateScene (const Point& rRef, double sn, double cs)
// ynew = x * sin(alpha) + y * cos(alpha)
// Bottom Right is not rotated: the pages of aOutRect must
// remain parallel to the coordinate axes.
- NewCenter.setX( static_cast<long>(Center.X() * cs - Center.Y() * sn) );
- NewCenter.setY( static_cast<long>(Center.X() * sn + Center.Y() * cs) );
+ NewCenter.setX( static_cast<tools::Long>(Center.X() * cs - Center.Y() * sn) );
+ NewCenter.setY( static_cast<tools::Long>(Center.X() * sn + Center.Y() * cs) );
}
Size Differenz;
@@ -611,7 +611,7 @@ void E3dScene::SetTransform(const basegfx::B3DHomMatrix& rMatrix)
}
}
-void E3dScene::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
+void E3dScene::NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
// So currently the glue points are defined relative to the scene aOutRect.
// Before turning the glue points are defined relative to the page. They
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index f572b92d1c0e..3c0fb45a0df0 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -906,28 +906,28 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1
aRot *= aLatheMat;
aRot.setX(-aRot.getX());
aRot *= aInvLatheMat;
- aRotPnt = Point(static_cast<long>(aRot.getX() + 0.5), static_cast<long>(-aRot.getY() - 0.5));
+ aRotPnt = Point(static_cast<tools::Long>(aRot.getX() + 0.5), static_cast<tools::Long>(-aRot.getY() - 0.5));
aRect.Union(tools::Rectangle(aRotPnt, aRotPnt));
aRot = basegfx::B2DPoint(aTurnRect.Left(), -aTurnRect.Bottom());
aRot *= aLatheMat;
aRot.setX(-aRot.getX());
aRot *= aInvLatheMat;
- aRotPnt = Point(static_cast<long>(aRot.getX() + 0.5), static_cast<long>(-aRot.getY() - 0.5));
+ aRotPnt = Point(static_cast<tools::Long>(aRot.getX() + 0.5), static_cast<tools::Long>(-aRot.getY() - 0.5));
aRect.Union(tools::Rectangle(aRotPnt, aRotPnt));
aRot = basegfx::B2DPoint(aTurnRect.Right(), -aTurnRect.Top());
aRot *= aLatheMat;
aRot.setX(-aRot.getX());
aRot *= aInvLatheMat;
- aRotPnt = Point(static_cast<long>(aRot.getX() + 0.5), static_cast<long>(-aRot.getY() - 0.5));
+ aRotPnt = Point(static_cast<tools::Long>(aRot.getX() + 0.5), static_cast<tools::Long>(-aRot.getY() - 0.5));
aRect.Union(tools::Rectangle(aRotPnt, aRotPnt));
aRot = basegfx::B2DPoint(aTurnRect.Right(), -aTurnRect.Bottom());
aRot *= aLatheMat;
aRot.setX(-aRot.getX());
aRot *= aInvLatheMat;
- aRotPnt = Point(static_cast<long>(aRot.getX() + 0.5), static_cast<long>(-aRot.getY() - 0.5));
+ aRotPnt = Point(static_cast<tools::Long>(aRot.getX() + 0.5), static_cast<tools::Long>(-aRot.getY() - 0.5));
aRect.Union(tools::Rectangle(aRotPnt, aRotPnt));
}
}
@@ -1277,7 +1277,7 @@ E3dScene* E3dView::SetCurrent3DObj(E3dObject* p3DObj)
double fW(aVolume.getWidth());
double fH(aVolume.getHeight());
- tools::Rectangle aRect(0,0, static_cast<long>(fW), static_cast<long>(fH));
+ tools::Rectangle aRect(0,0, static_cast<tools::Long>(fW), static_cast<tools::Long>(fH));
E3dScene* pScene = new E3dScene(p3DObj->getSdrModelFromSdrObject());
@@ -1311,11 +1311,11 @@ void E3dView::Start3DCreation()
return;
//positioned
- long nOutMin = 0;
- long nOutMax = 0;
- long nMinLen = 0;
- long nObjDst = 0;
- long nOutHgt = 0;
+ tools::Long nOutMin = 0;
+ tools::Long nOutMax = 0;
+ tools::Long nMinLen = 0;
+ tools::Long nObjDst = 0;
+ tools::Long nOutHgt = 0;
OutputDevice* pOut = GetFirstOutputDevice();
// first determine representation boundaries
@@ -1324,7 +1324,7 @@ void E3dView::Start3DCreation()
nMinLen = pOut->PixelToLogic(Size(0,50)).Height();
nObjDst = pOut->PixelToLogic(Size(0,20)).Height();
- long nDst = pOut->PixelToLogic(Size(0,10)).Height();
+ tools::Long nDst = pOut->PixelToLogic(Size(0,10)).Height();
nOutMin = -pOut->GetMapMode().GetOrigin().Y();
nOutMax = pOut->GetOutputSize().Height() - 1 + nOutMin;
@@ -1341,7 +1341,7 @@ void E3dView::Start3DCreation()
nOutHgt = nOutMax - nOutMin;
- long nTemp = nOutHgt / 4;
+ tools::Long nTemp = nOutHgt / 4;
if (nTemp > nMinLen) nMinLen = nTemp;
}
@@ -1355,13 +1355,13 @@ void E3dView::Start3DCreation()
}
basegfx::B2DPoint aCenter(aR.getCenter());
- long nMarkHgt = basegfx::fround(aR.getHeight()) - 1;
- long nHgt = nMarkHgt + nObjDst * 2;
+ tools::Long nMarkHgt = basegfx::fround(aR.getHeight()) - 1;
+ tools::Long nHgt = nMarkHgt + nObjDst * 2;
if (nHgt < nMinLen) nHgt = nMinLen;
- long nY1 = basegfx::fround(aCenter.getY()) - (nHgt + 1) / 2;
- long nY2 = nY1 + nHgt;
+ tools::Long nY1 = basegfx::fround(aCenter.getY()) - (nHgt + 1) / 2;
+ tools::Long nY2 = nY1 + nHgt;
if (pOut && (nMinLen > nOutHgt)) nMinLen = nOutHgt;
if (pOut)
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 7442e796fc7e..e7c868e3e210 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1211,7 +1211,7 @@ void FmGridControl::DeleteSelectedRows()
else
{
// we look for the first row after the selected block for selection
- long nIdx = LastSelectedRow() + 1;
+ tools::Long nIdx = LastSelectedRow() + 1;
if (nIdx < GetRowCount() - 1)
{
// there is a next row to position on
@@ -1453,10 +1453,10 @@ bool FmGridControl::isColumnMarked(sal_uInt16 nId) const
return m_nMarkedColumnId == nId;
}
-long FmGridControl::QueryMinimumRowHeight()
+tools::Long FmGridControl::QueryMinimumRowHeight()
{
- long const nMinimalLogicHeight = 20; // 0.2 cm
- long nMinimalPixelHeight = LogicToPixel(Point(0, nMinimalLogicHeight), MapMode(MapUnit::Map10thMM)).Y();
+ tools::Long const nMinimalLogicHeight = 20; // 0.2 cm
+ tools::Long nMinimalPixelHeight = LogicToPixel(Point(0, nMinimalLogicHeight), MapMode(MapUnit::Map10thMM)).Y();
return CalcZoom( nMinimalPixelHeight );
}
@@ -1814,7 +1814,7 @@ Sequence< Any> FmGridControl::getSelectionBookmarks()
// The next problem caused by the same behavior (SeekCursor causes a propertyChanged): when adjusting rows we implicitly
// change our selection. So a "FirstSelected(); SeekCursor(); NextSelected();" may produce unpredictable results.
// That's why we _first_ collect the indices of the selected rows and _then_ their bookmarks.
- long nIdx = FirstSelectedRow();
+ tools::Long nIdx = FirstSelectedRow();
while (nIdx != BROWSER_ENDOFSELECTION)
{
// (we misuse the bookmarks array for this ...)
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 18ff809a1bc4..5a71b37afffb 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -507,7 +507,7 @@ bool NavigationBar::GetState(DbGridControlNavigationBarState nWhich) const
// check if we have a master state provider
if (pParent->m_aMasterStateProvider.IsSet())
{
- long nState = pParent->m_aMasterStateProvider.Call( nWhich );
+ tools::Long nState = pParent->m_aMasterStateProvider.Call( nWhich );
if (nState>=0)
return (nState>0);
}
@@ -1590,7 +1590,7 @@ void DbGridControl::ColumnMoved(sal_uInt16 nId)
m_aColumns.insert( m_aColumns.begin() + nNewModelPos, std::move(temp) );
}
-bool DbGridControl::SeekRow(long nRow)
+bool DbGridControl::SeekRow(tools::Long nRow)
{
// in filter mode or in insert only mode we don't have any cursor!
if ( !SeekCursor( nRow ) )
@@ -1623,12 +1623,12 @@ bool DbGridControl::SeekRow(long nRow)
}
// Is called whenever the visible amount of data changes
-void DbGridControl::VisibleRowsChanged( long nNewTopRow, sal_uInt16 nLinesOnScreen )
+void DbGridControl::VisibleRowsChanged( tools::Long nNewTopRow, sal_uInt16 nLinesOnScreen )
{
RecalcRows(nNewTopRow, nLinesOnScreen, false);
}
-void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor)
+void DbGridControl::RecalcRows(tools::Long nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor)
{
// If no cursor -> no rows in the browser.
if (!m_pSeekCursor)
@@ -1649,9 +1649,9 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, bool
bool bCacheAligned = false;
// no further cursor movements after initializing (m_nSeekPos < 0) because it is already
// positioned on the first sentence
- long nDelta = nNewTopRow - GetTopRow();
+ tools::Long nDelta = nNewTopRow - GetTopRow();
// limit for relative positioning
- long nLimit = nCacheSize ? nCacheSize / 2 : 0;
+ tools::Long nLimit = nCacheSize ? nCacheSize / 2 : 0;
// more lines on screen than in cache
if (nLimit < nLinesOnScreen)
@@ -1684,7 +1684,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, bool
EnablePaint(true);
}
-void DbGridControl::RowInserted(long nRow, long nNumRows, bool bDoPaint)
+void DbGridControl::RowInserted(tools::Long nRow, tools::Long nNumRows, bool bDoPaint)
{
if (!nNumRows)
return;
@@ -1704,7 +1704,7 @@ void DbGridControl::RowInserted(long nRow, long nNumRows, bool bDoPaint)
m_aBar->InvalidateState(DbGridControlNavigationBarState::Count);
}
-void DbGridControl::RowRemoved(long nRow, long nNumRows, bool bDoPaint)
+void DbGridControl::RowRemoved(tools::Long nRow, tools::Long nNumRows, bool bDoPaint)
{
if (!nNumRows)
return;
@@ -1753,7 +1753,7 @@ void DbGridControl::AdjustRows()
if (nRecordCount != GetRowCount())
{
- long nDelta = GetRowCount() - static_cast<long>(nRecordCount);
+ tools::Long nDelta = GetRowCount() - static_cast<tools::Long>(nRecordCount);
if (nDelta > 0) // too many
{
RowRemoved(GetRowCount() - nDelta, nDelta, false);
@@ -1786,7 +1786,7 @@ void DbGridControl::AdjustRows()
m_aBar->InvalidateState(DbGridControlNavigationBarState::Count);
}
-svt::EditBrowseBox::RowStatus DbGridControl::GetRowStatus(long nRow) const
+svt::EditBrowseBox::RowStatus DbGridControl::GetRowStatus(tools::Long nRow) const
{
if (IsFilterRow(nRow))
return EditBrowseBox::FILTER;
@@ -1829,7 +1829,7 @@ void DbGridControl::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect,
}
}
-bool DbGridControl::CursorMoving(long nNewRow, sal_uInt16 nNewCol)
+bool DbGridControl::CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol)
{
DeactivateCell( false );
@@ -1846,7 +1846,7 @@ bool DbGridControl::CursorMoving(long nNewRow, sal_uInt16 nNewCol)
return EditBrowseBox::CursorMoving( nNewRow, nNewCol );
}
-bool DbGridControl::SetCurrent(long nNewRow)
+bool DbGridControl::SetCurrent(tools::Long nNewRow)
{
// Each movement of the datacursor must start with BeginCursorAction and end with
// EndCursorAction to block all notifications during the movement
@@ -1899,7 +1899,7 @@ bool DbGridControl::SetCurrent(long nNewRow)
m_xDataRow->SetState(m_pDataCursor.get(), false);
m_xCurrentRow = m_xDataRow;
- long nPaintPos = -1;
+ tools::Long nPaintPos = -1;
// do we have to repaint the last regular row in case of setting defaults or autovalues
if (m_nCurrentPos >= 0 && m_nCurrentPos >= (GetRowCount() - 2))
nPaintPos = m_nCurrentPos;
@@ -2101,7 +2101,7 @@ sal_Int32 DbGridControl::AlignSeekCursor()
return m_nSeekPos;
}
-bool DbGridControl::SeekCursor(long nRow, bool bAbsolute)
+bool DbGridControl::SeekCursor(tools::Long nRow, bool bAbsolute)
{
// position SeekCursor onto the data cursor, no data transmission
@@ -2135,7 +2135,7 @@ bool DbGridControl::SeekCursor(long nRow, bool bAbsolute)
else
{
bool bSuccess = false;
- long nSteps = 0;
+ tools::Long nSteps = 0;
try
{
if ( m_pSeekCursor->rowDeleted() )
@@ -2267,7 +2267,7 @@ void DbGridControl::MoveToLast()
void DbGridControl::MoveToPrev()
{
- long nNewRow = std::max(GetCurRow() - 1, 0L);
+ tools::Long nNewRow = std::max(GetCurRow() - 1, 0L);
if (GetCurRow() != nNewRow)
MoveToPosition(nNewRow);
}
@@ -2280,7 +2280,7 @@ void DbGridControl::MoveToNext()
if (m_nTotalCount > 0)
{
// move the data cursor to the right position
- long nNewRow = std::min(GetRowCount() - 1, GetCurRow() + 1);
+ tools::Long nNewRow = std::min(GetRowCount() - 1, GetCurRow() + 1);
if (GetCurRow() != nNewRow)
MoveToPosition(nNewRow);
}
@@ -2319,7 +2319,7 @@ void DbGridControl::MoveToPosition(sal_uInt32 nPos)
if (!m_pSeekCursor)
return;
- if (m_nTotalCount < 0 && static_cast<long>(nPos) >= GetRowCount())
+ if (m_nTotalCount < 0 && static_cast<tools::Long>(nPos) >= GetRowCount())
{
try
{
@@ -2366,7 +2366,7 @@ void DbGridControl::AppendNew()
}
}
- long nNewRow = m_nTotalCount + 1;
+ tools::Long nNewRow = m_nTotalCount + 1;
if (nNewRow > 0 && GetCurRow() != nNewRow)
MoveToPosition(nNewRow - 1);
}
@@ -2432,7 +2432,7 @@ void DbGridControl::SetFilterMode(bool bMode)
setDataSource(Reference< XRowSet > ());
}
-OUString DbGridControl::GetCellText(long _nRow, sal_uInt16 _nColId) const
+OUString DbGridControl::GetCellText(tools::Long _nRow, sal_uInt16 _nColId) const
{
size_t Location = GetModelColumnPos( _nColId );
DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ].get() : nullptr;
@@ -2451,7 +2451,7 @@ OUString DbGridControl::GetCurrentRowCellText(DbGridColumn const * pColumn,const
return aText;
}
-sal_uInt32 DbGridControl::GetTotalCellWidth(long nRow, sal_uInt16 nColId)
+sal_uInt32 DbGridControl::GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId)
{
if (SeekRow(nRow))
{
@@ -2555,7 +2555,7 @@ void DbGridControl::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
return;
sal_uInt16 nColId = GetColumnId(GetColumnAtXPosPixel(rPosPixel.X()));
- long nRow = GetRowAtYPosPixel(rPosPixel.Y());
+ tools::Long nRow = GetRowAtYPosPixel(rPosPixel.Y());
if (nColId != HandleColumnId && nRow >= 0)
{
if (GetDataWindow().IsMouseCaptured())
@@ -2584,7 +2584,7 @@ void DbGridControl::copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId)
OStringTransfer::CopyString( GetCurrentRowCellText( pColumn,m_xPaintRow ), this );
}
-void DbGridControl::executeRowContextMenu( long _nRow, const Point& _rPreferredPos )
+void DbGridControl::executeRowContextMenu( tools::Long _nRow, const Point& _rPreferredPos )
{
VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/rowsmenu.ui", "");
VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu"));
@@ -2610,7 +2610,7 @@ void DbGridControl::Command(const CommandEvent& rEvt)
{ // context menu requested by keyboard
if ( GetSelectRowCount() )
{
- long nRow = FirstSelectedRow( );
+ tools::Long nRow = FirstSelectedRow( );
::tools::Rectangle aRowRect( GetRowRectPixel( nRow ) );
executeRowContextMenu( nRow, aRowRect.LeftCenter() );
@@ -2621,7 +2621,7 @@ void DbGridControl::Command(const CommandEvent& rEvt)
}
sal_uInt16 nColId = GetColumnId(GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X()));
- long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
+ tools::Long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
if (nColId == HandleColumnId)
{
@@ -2661,7 +2661,7 @@ void DbGridControl::DeleteSelectedRows()
return;
}
-CellController* DbGridControl::GetController(long /*nRow*/, sal_uInt16 nColumnId)
+CellController* DbGridControl::GetController(tools::Long /*nRow*/, sal_uInt16 nColumnId)
{
if (!IsValid(m_xCurrentRow) || !IsEnabled())
return nullptr;
@@ -2854,7 +2854,7 @@ void DbGridControl::resetCurrentRow()
RowModified(GetCurRow()); // will update the current controller if affected
}
-void DbGridControl::RowModified( long nRow )
+void DbGridControl::RowModified( tools::Long nRow )
{
if (nRow == m_nCurrentPos && IsEditing())
{
@@ -2875,7 +2875,7 @@ bool DbGridControl::IsCurrentAppending() const
return m_xCurrentRow.is() && m_xCurrentRow->IsNew();
}
-bool DbGridControl::IsInsertionRow(long nRow) const
+bool DbGridControl::IsInsertionRow(tools::Long nRow) const
{
return (m_nOptions & DbGridControlOptions::Insert) && m_nTotalCount >= 0 && (nRow == GetRowCount() - 1);
}
@@ -3071,7 +3071,7 @@ void DbGridControl::KeyInput( const KeyEvent& rEvt )
{
if (rEvt.GetKeyCode().GetFunction() == KeyFuncType::COPY)
{
- long nRow = GetCurRow();
+ tools::Long nRow = GetCurRow();
sal_uInt16 nColId = GetCurColumnId();
if (nRow >= 0 && nRow < GetRowCount() && nColId < ColCount())
{
@@ -3094,7 +3094,7 @@ void DbGridControl::HideColumn(sal_uInt16 nId)
? GetColumnIdFromViewPos(nPos-1) // last col is to be removed -> take the previous
: GetColumnIdFromViewPos(nPos+1); // take the next
- long lCurrentWidth = GetColumnWidth(nId);
+ tools::Long lCurrentWidth = GetColumnWidth(nId);
EditBrowseBox::RemoveColumn(nId);
// don't use my own RemoveColumn, this would remove it from m_aColumns, too
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 5db66bfe14f6..dee422c834d0 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -1441,8 +1441,8 @@ SdrObjectUniquePtr FmXFormView::implCreateXFormsControl( const svx::OXFormsDescr
getView()->getSdrModelFromSdrView(),
SdrInventor::FmForm,
nObjID));
- controlSize.setWidth( long(controlSize.Width() * eTargetMode.GetScaleX()) );
- controlSize.setHeight( long(controlSize.Height() * eTargetMode.GetScaleY()) );
+ controlSize.setWidth( tools::Long(controlSize.Width() * eTargetMode.GetScaleX()) );
+ controlSize.setHeight( tools::Long(controlSize.Height() * eTargetMode.GetScaleY()) );
::Point controlPos( OutputDevice::LogicToLogic( ::Point( controlSize.Width(), 0 ), eSourceMode, eTargetMode ) );
::tools::Rectangle controlRect( controlPos, OutputDevice::LogicToLogic( controlSize, eSourceMode, eTargetMode ) );
pControl->SetLogicRect(controlRect);
@@ -1549,8 +1549,8 @@ bool FmXFormView::createControlLabelPair( OutputDevice const & _rOutDev, sal_Int
aRealSize.setHeight( aDefSize.Height() );
// adjust to scaling of the target device (#53523#)
- aRealSize.setWidth( long(Fraction(aRealSize.Width(), 1) * eTargetMode.GetScaleX()) );
- aRealSize.setHeight( long(Fraction(aRealSize.Height(), 1) * eTargetMode.GetScaleY()) );
+ aRealSize.setWidth( tools::Long(Fraction(aRealSize.Width(), 1) * eTargetMode.GetScaleX()) );
+ aRealSize.setHeight( tools::Long(Fraction(aRealSize.Height(), 1) * eTargetMode.GetScaleY()) );
// for boolean fields, we do not create a label, but just a checkbox
bool bNeedLabel = ( _nControlObjectID != OBJ_FM_CHECKBOX );
@@ -1627,8 +1627,8 @@ bool FmXFormView::createControlLabelPair( OutputDevice const & _rOutDev, sal_Int
if ( OBJ_FM_IMAGECONTROL == _nControlObjectID )
aControlSize = aDefImageSize;
- aControlSize.setWidth( long(Fraction(aControlSize.Width(), 1) * eTargetMode.GetScaleX()) );
- aControlSize.setHeight( long(Fraction(aControlSize.Height(), 1) * eTargetMode.GetScaleY()) );
+ aControlSize.setWidth( tools::Long(Fraction(aControlSize.Width(), 1) * eTargetMode.GetScaleX()) );
+ aControlSize.setHeight( tools::Long(Fraction(aControlSize.Height(), 1) * eTargetMode.GetScaleY()) );
pControl->SetLogicRect( ::tools::Rectangle(
OutputDevice::LogicToLogic( ::Point( aRealSize.Width() + _nXOffsetMM, _nYOffsetMM ), eSourceMode, eTargetMode ),
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index d0470b471bdd..c237410bdd1f 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -42,8 +42,8 @@
#include <tools/diagnose_ex.h>
#include <tabwin.hrc>
-const long STD_WIN_SIZE_X = 120;
-const long STD_WIN_SIZE_Y = 150;
+const tools::Long STD_WIN_SIZE_X = 120;
+const tools::Long STD_WIN_SIZE_Y = 150;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdb;
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index 1cb99eb5ae37..78da9c640cf1 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -86,13 +86,13 @@ namespace
if ( fGrfWH < fWinWH )
{
- aNewSize.setWidth( static_cast<long>( aWinSize.Height() * fGrfWH ) );
+ aNewSize.setWidth( static_cast<tools::Long>( aWinSize.Height() * fGrfWH ) );
aNewSize.setHeight( aWinSize.Height() );
}
else
{
aNewSize.setWidth( aWinSize.Width() );
- aNewSize.setHeight( static_cast<long>( aWinSize.Width() / fGrfWH) );
+ aNewSize.setHeight( static_cast<tools::Long>( aWinSize.Width() / fGrfWH) );
}
const Point aNewPos( ( aWinSize.Width() - aNewSize.Width() ) >> 1,
diff --git a/svx/source/gallery2/gallerybinaryengine.cxx b/svx/source/gallery2/gallerybinaryengine.cxx
index ec68e830f79b..a4a18f0ebe6d 100644
--- a/svx/source/gallery2/gallerybinaryengine.cxx
+++ b/svx/source/gallery2/gallerybinaryengine.cxx
@@ -772,7 +772,7 @@ SvStream& GalleryBinaryEngine::writeGalleryTheme(SvStream& rOStm, const GalleryT
rOStm.WriteUInt32(COMPAT_FORMAT('G', 'A', 'L', 'R'))
.WriteUInt32(COMPAT_FORMAT('E', 'S', 'R', 'V'));
- const long nReservePos = rOStm.Tell();
+ const tools::Long nReservePos = rOStm.Tell();
std::unique_ptr<VersionCompat> pCompat(new VersionCompat(rOStm, StreamMode::WRITE, 2));
rOStm.WriteUInt32(rId).WriteBool(pThm->IsNameFromResource()); // From version 2 and up
@@ -780,7 +780,8 @@ SvStream& GalleryBinaryEngine::writeGalleryTheme(SvStream& rOStm, const GalleryT
pCompat.reset();
// Fill the rest of the buffer.
- const long nRest = std::max(512L - (static_cast<long>(rOStm.Tell()) - nReservePos), 0L);
+ const tools::Long nRest
+ = std::max(512L - (static_cast<tools::Long>(rOStm.Tell()) - nReservePos), 0L);
if (nRest)
{
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index fea1384300e0..53bacec4709c 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -135,8 +135,8 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic )
else
{
const float fFactor = static_cast<float>(aBmpSize.Width()) / aBmpSize.Height();
- const Size aNewSize( std::max( static_cast<long>(fFactor < 1. ? S_THUMB * fFactor : S_THUMB), 8L ),
- std::max( static_cast<long>(fFactor < 1. ? S_THUMB : S_THUMB / fFactor), 8L ) );
+ const Size aNewSize( std::max( static_cast<tools::Long>(fFactor < 1. ? S_THUMB * fFactor : S_THUMB), 8L ),
+ std::max( static_cast<tools::Long>(fFactor < 1. ? S_THUMB : S_THUMB / fFactor), 8L ) );
if(aThumbBmp.Scale(
static_cast<double>(aNewSize.Width()) / aBmpSize.Width(),
static_cast<double>(aNewSize.Height()) / aBmpSize.Height(),
diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx
index f476f5e1409f..5e77d3a11c99 100644
--- a/svx/source/inc/GraphCtlAccessibleContext.hxx
+++ b/svx/source/inc/GraphCtlAccessibleContext.hxx
@@ -146,7 +146,7 @@ public:
private:
virtual ~SvxGraphCtrlAccessibleContext() override;
/// @throws css::lang::IndexOutOfBoundsException
- void checkChildIndexOnSelection( long nIndexOfChild );
+ void checkChildIndexOnSelection( tools::Long nIndexOfChild );
virtual void SAL_CALL disposing() final override;
diff --git a/svx/source/inc/cell.hxx b/svx/source/inc/cell.hxx
index 0d68864f2339..f1bc145675e4 100644
--- a/svx/source/inc/cell.hxx
+++ b/svx/source/inc/cell.hxx
@@ -81,10 +81,10 @@ public:
SVX_DLLPRIVATE sal_Int32 getMinimumWidth() const;
SVX_DLLPRIVATE sal_Int32 getMinimumHeight();
- SVX_DLLPRIVATE long GetTextLeftDistance() const;
- SVX_DLLPRIVATE long GetTextRightDistance() const;
- SVX_DLLPRIVATE long GetTextUpperDistance() const;
- SVX_DLLPRIVATE long GetTextLowerDistance() const;
+ SVX_DLLPRIVATE tools::Long GetTextLeftDistance() const;
+ SVX_DLLPRIVATE tools::Long GetTextRightDistance() const;
+ SVX_DLLPRIVATE tools::Long GetTextUpperDistance() const;
+ SVX_DLLPRIVATE tools::Long GetTextLowerDistance() const;
SVX_DLLPRIVATE SdrTextVertAdjust GetTextVerticalAdjust() const;
SdrTextHorzAdjust GetTextHorizontalAdjust() const;
diff --git a/svx/source/inc/frmselimpl.hxx b/svx/source/inc/frmselimpl.hxx
index 09cc61882504..79df99cfb150 100644
--- a/svx/source/inc/frmselimpl.hxx
+++ b/svx/source/inc/frmselimpl.hxx
@@ -125,12 +125,12 @@ struct FrameSelectorImpl
FrameBorderPtrVec maEnabBorders; /// Pointers to enables frame borders.
Link<LinkParamNone*,void> maSelectHdl; /// Selection handler.
- long mnCtrlSize; /// Size of the control (always square).
- long mnArrowSize; /// Size of an arrow image.
- long mnLine1; /// Middle of left/top frame borders.
- long mnLine2; /// Middle of inner frame borders.
- long mnLine3; /// Middle of right/bottom frame borders.
- long mnFocusOffs; /// Offset from frame border middle to draw focus.
+ tools::Long mnCtrlSize; /// Size of the control (always square).
+ tools::Long mnArrowSize; /// Size of an arrow image.
+ tools::Long mnLine1; /// Middle of left/top frame borders.
+ tools::Long mnLine2; /// Middle of inner frame borders.
+ tools::Long mnLine3; /// Middle of right/bottom frame borders.
+ tools::Long mnFocusOffs; /// Offset from frame border middle to draw focus.
bool mbHor; /// true = Inner horizontal frame border enabled.
bool mbVer; /// true = Inner vertical frame border enabled.
diff --git a/svx/source/inc/svxpixelctlaccessiblecontext.hxx b/svx/source/inc/svxpixelctlaccessiblecontext.hxx
index cdc767348e9e..2e0f0abcf931 100644
--- a/svx/source/inc/svxpixelctlaccessiblecontext.hxx
+++ b/svx/source/inc/svxpixelctlaccessiblecontext.hxx
@@ -49,7 +49,7 @@ public:
bool bPixelColorOrBG,
const tools::Rectangle& rBounds,
const rtl::Reference<SvxPixelCtlAccessible>& xParent,
- long nIndexInParent );
+ tools::Long nIndexInParent );
DECLARE_XINTERFACE( )
DECLARE_XTYPEPROVIDER( )
@@ -93,7 +93,7 @@ private:
bool m_bPixelColorOrBG;//Pixel Color Or BackGround Color
tools::Rectangle maBoundingBox;
/// index of child in parent
- long mnIndexInParent;
+ tools::Long mnIndexInParent;
};
class SvxPixelCtlAccessible final : public ::comphelper::OAccessibleSelectionHelper,
@@ -125,7 +125,7 @@ public:
virtual sal_Int32 SAL_CALL getBackground( ) override;
css::uno::Reference< css::accessibility::XAccessible >
- CreateChild (long nIndex, Point mPoint);
+ CreateChild (tools::Long nIndex, Point mPoint);
private:
virtual ~SvxPixelCtlAccessible() override;
@@ -146,7 +146,7 @@ private:
css::uno::Reference< css::accessibility::XAccessible> m_xCurChild;
public:
- void NotifyChild(long nIndex, bool bSelect, bool bCheck);
+ void NotifyChild(tools::Long nIndex, bool bSelect, bool bCheck);
};
#endif
diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx
index 291835b5eeec..de479bf87174 100644
--- a/svx/source/inc/svxrectctaccessiblecontext.hxx
+++ b/svx/source/inc/svxrectctaccessiblecontext.hxx
@@ -101,7 +101,7 @@ private:
virtual void SAL_CALL disposing() override;
- void checkChildIndex(long nIndex);
+ void checkChildIndex(tools::Long nIndex);
/** Selects a new child by index.
@@ -111,7 +111,7 @@ private:
@param nIndexOfChild
Index of the new child which should be selected.
*/
- void selectChild( long nIndexOfChild );
+ void selectChild( tools::Long nIndexOfChild );
/** Description of this object. This is not a constant because it can
be set from the outside.
@@ -129,7 +129,7 @@ private:
std::vector<rtl::Reference<SvxRectCtlChildAccessibleContext>> mvChildren;
/// actual selected child
- long mnSelectedChild;
+ tools::Long mnSelectedChild;
};
typedef ::cppu::ImplHelper3 < css::accessibility::XAccessible,
@@ -145,7 +145,7 @@ public:
const css::uno::Reference< css::accessibility::XAccessible>& rxParent,
const OUString& rName, const OUString& rDescription,
const tools::Rectangle& rBoundingBox,
- long nIndexInParent );
+ tools::Long nIndexInParent );
DECLARE_XINTERFACE( )
DECLARE_XTYPEPROVIDER( )
@@ -221,7 +221,7 @@ private:
tools::Rectangle maBoundingBox;
/// index of child in parent
- long mnIndexInParent;
+ tools::Long mnIndexInParent;
/// Indicates, if object is checked
bool mbIsChecked;
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index 588f38e632f3..58a71f11594c 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -181,31 +181,31 @@ bool SvxMarginItem::GetPresentation
{
case SfxItemPresentation::Nameless:
{
- rText = GetMetricText( static_cast<long>(nLeftMargin), eCoreUnit, ePresUnit, &rIntl ) +
+ rText = GetMetricText( static_cast<tools::Long>(nLeftMargin), eCoreUnit, ePresUnit, &rIntl ) +
cpDelimTmp +
- GetMetricText( static_cast<long>(nTopMargin), eCoreUnit, ePresUnit, &rIntl ) +
+ GetMetricText( static_cast<tools::Long>(nTopMargin), eCoreUnit, ePresUnit, &rIntl ) +
cpDelimTmp +
- GetMetricText( static_cast<long>(nRightMargin), eCoreUnit, ePresUnit, &rIntl ) +
+ GetMetricText( static_cast<tools::Long>(nRightMargin), eCoreUnit, ePresUnit, &rIntl ) +
cpDelimTmp +
- GetMetricText( static_cast<long>(nBottomMargin), eCoreUnit, ePresUnit, &rIntl );
+ GetMetricText( static_cast<tools::Long>(nBottomMargin), eCoreUnit, ePresUnit, &rIntl );
return true;
}
case SfxItemPresentation::Complete:
{
rText = SvxResId(RID_SVXITEMS_MARGIN_LEFT) +
- GetMetricText( static_cast<long>(nLeftMargin), eCoreUnit, ePresUnit, &rIntl ) +
+ GetMetricText( static_cast<tools::Long>(nLeftMargin), eCoreUnit, ePresUnit, &rIntl ) +
" " + EditResId(GetMetricId(ePresUnit)) +
cpDelimTmp +
SvxResId(RID_SVXITEMS_MARGIN_TOP) +
- GetMetricText( static_cast<long>(nTopMargin), eCoreUnit, ePresUnit, &rIntl ) +
+ GetMetricText( static_cast<tools::Long>(nTopMargin), eCoreUnit, ePresUnit, &rIntl ) +
" " + EditResId(GetMetricId(ePresUnit)) +
cpDelimTmp +
SvxResId(RID_SVXITEMS_MARGIN_RIGHT) +
- GetMetricText( static_cast<long>(nRightMargin), eCoreUnit, ePresUnit, &rIntl ) +
+ GetMetricText( static_cast<tools::Long>(nRightMargin), eCoreUnit, ePresUnit, &rIntl ) +
" " + EditResId(GetMetricId(ePresUnit)) +
cpDelimTmp +
SvxResId(RID_SVXITEMS_MARGIN_BOTTOM) +
- GetMetricText( static_cast<long>(nBottomMargin), eCoreUnit, ePresUnit, &rIntl ) +
+ GetMetricText( static_cast<tools::Long>(nBottomMargin), eCoreUnit, ePresUnit, &rIntl ) +
" " + EditResId(GetMetricId(ePresUnit));
return true;
}
@@ -260,7 +260,7 @@ bool SvxMarginItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
bool SvxMarginItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
bool bConvert = ( ( nMemberId & CONVERT_TWIPS ) != 0 );
- long nMaxVal = bConvert ? convertTwipToMm100(SHRT_MAX) : SHRT_MAX; // members are sal_Int16
+ tools::Long nMaxVal = bConvert ? convertTwipToMm100(SHRT_MAX) : SHRT_MAX; // members are sal_Int16
sal_Int32 nVal = 0;
if(!(rVal >>= nVal) || (nVal > nMaxVal))
return false;
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index 6a3acbb0e81a..8b8f327c838c 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -622,7 +622,7 @@ short SvxNumberFormatShell::FillEListWithFormats_Impl(std::vector<OUString>& rLi
* the list position of the current format. If the list is empty
* or if there is no current format, SELPOS_NONE is delivered.
*/
- for (long nIndex = eOffsetStart; nIndex <= eOffsetEnd; ++nIndex)
+ for (tools::Long nIndex = eOffsetStart; nIndex <= eOffsetEnd; ++nIndex)
{
FillEListWithOneFormat_Impl( rList, nSelPos, bSuppressDuplicates, static_cast<NfIndexTableOffset>(nIndex), false);
}
@@ -640,7 +640,7 @@ short SvxNumberFormatShell::FillEListWithDateTime_Impl(std::vector<OUString>& rL
// default.
FillEListWithOneFormat_Impl( rList, nSelPos, bSuppressDuplicates, NF_DATETIME_SYS_DDMMYYYY_HHMM, true);
- for (long nIndex = NF_DATETIME_START; nIndex <= NF_DATETIME_END; ++nIndex)
+ for (tools::Long nIndex = NF_DATETIME_START; nIndex <= NF_DATETIME_END; ++nIndex)
{
FillEListWithOneFormat_Impl( rList, nSelPos, bSuppressDuplicates, static_cast<NfIndexTableOffset>(nIndex), true);
}
@@ -757,7 +757,7 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys(std::vector<OUString>& rLi
nCurCurrencyEntryPos = 0;
- for (long nIndex = NF_CURRENCY_START; nIndex <= NF_CURRENCY_END; nIndex++)
+ for (tools::Long nIndex = NF_CURRENCY_START; nIndex <= NF_CURRENCY_END; nIndex++)
{
nNFEntry = pFormatter->GetFormatIndex(static_cast<NfIndexTableOffset>(nIndex), eCurLanguage);
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index d8d4fb83035a..830666da0d0f 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -301,10 +301,10 @@ namespace sdr::contact {
::basegfx::B2DPoint aBottomRight( _rLogicBoundingRect.Right(), _rLogicBoundingRect.Bottom() );
aBottomRight *= _rViewTransformation;
- const tools::Rectangle aPaintRectPixel(static_cast<long>(std::round(aTopLeft.getX())),
- static_cast<long>(std::round(aTopLeft.getY())),
- static_cast<long>(std::round(aBottomRight.getX())),
- static_cast<long>(std::round(aBottomRight.getY())));
+ const tools::Rectangle aPaintRectPixel(static_cast<tools::Long>(std::round(aTopLeft.getX())),
+ static_cast<tools::Long>(std::round(aTopLeft.getY())),
+ static_cast<tools::Long>(std::round(aBottomRight.getX())),
+ static_cast<tools::Long>(std::round(aBottomRight.getY())));
_rControl.setPosSize( aPaintRectPixel );
// determine the scale from the current view transformation, and the normalization matrix
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx
index f99e30ab18a6..980015d7ceb9 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -290,10 +290,10 @@ namespace sdr::overlay
// assume AA needs one pixel more and invalidate one pixel more
const double fDiscreteOne(getDiscreteOne());
const tools::Rectangle aInvalidateRectangle(
- static_cast<long>(floor(rRange.getMinX() - fDiscreteOne)),
- static_cast<long>(floor(rRange.getMinY() - fDiscreteOne)),
- static_cast<long>(ceil(rRange.getMaxX() + fDiscreteOne)),
- static_cast<long>(ceil(rRange.getMaxY() + fDiscreteOne)));
+ static_cast<tools::Long>(floor(rRange.getMinX() - fDiscreteOne)),
+ static_cast<tools::Long>(floor(rRange.getMinY() - fDiscreteOne)),
+ static_cast<tools::Long>(ceil(rRange.getMaxX() + fDiscreteOne)),
+ static_cast<tools::Long>(ceil(rRange.getMaxY() + fDiscreteOne)));
return aInvalidateRectangle;
}
else
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index cb8a6fc1ccda..30c199144e8b 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -227,12 +227,12 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, ClickImportBitmapHdl, weld::Button&, void
INetURLObject aURL( aDlg.GetPath() );
OUString aFileName = aURL.GetLastName().getToken(0, '.');
OUString aName = aFileName;
- long j = 1;
+ tools::Long j = 1;
bool bValidBitmapName = false;
while( !bValidBitmapName )
{
bValidBitmapName = true;
- for( long i = 0; i < pList->Count() && bValidBitmapName; i++ )
+ for( tools::Long i = 0; i < pList->Count() && bValidBitmapName; i++ )
{
if( aName == pList->GetBitmap(i)->GetName() )
{
diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
index d9f397a07470..9ebcf24f9e14 100644
--- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx
+++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
@@ -80,7 +80,7 @@ static bool GetPropertyValues(const OUString& rPropName, const uno::Any& rAny, O
rString = (eValue == awt::FontSlant_ITALIC) ? OUStringLiteral(u"italic")
: OUStringLiteral(u"normal");
}
- else if (long nValueLong; rAny >>= nValueLong)
+ else if (tools::Long nValueLong; rAny >>= nValueLong)
{
if (rPropName.indexOf("Color") != -1)
rString = "0x" + OUString::number(nValueLong, 16);
diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
index 35836d47cf73..ea4110dd7219 100644
--- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
@@ -423,7 +423,7 @@ void LinePropertyPanelBase::SetWidthIcon()
return;
}
- long nVal = LogicToLogic(mnWidthCoreValue * 10, meMapUnit, MapUnit::MapPoint);
+ tools::Long nVal = LogicToLogic(mnWidthCoreValue * 10, meMapUnit, MapUnit::MapPoint);
if(nVal <= 6)
mxTBWidth->set_item_icon_name(SELECTWIDTH, maIMGWidthIcon[0]);
@@ -444,7 +444,7 @@ void LinePropertyPanelBase::SetWidthIcon()
}
-void LinePropertyPanelBase::SetWidth(long nWidth)
+void LinePropertyPanelBase::SetWidth(tools::Long nWidth)
{
mnWidthCoreValue = nWidth;
mbWidthValuable = true;
diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx
index c65afbe639be..13e4f1c2a88d 100644
--- a/svx/source/sidebar/line/LineWidthPopup.cxx
+++ b/svx/source/sidebar/line/LineWidthPopup.cxx
@@ -114,7 +114,7 @@ IMPL_LINK_NOARG(LineWidthPopup, VSSelectHdl, ValueSet*, void)
//modified
if (m_bCustom)
{
- long nVal = OutputDevice::LogicToLogic(m_nCustomWidth , MapUnit::MapPoint, m_eMapUnit);
+ tools::Long nVal = OutputDevice::LogicToLogic(m_nCustomWidth , MapUnit::MapPoint, m_eMapUnit);
nVal = m_xMFWidth->denormalize(nVal);
XLineWidthItem aWidthItem( nVal );
m_rParent.setLineWidth(aWidthItem);
@@ -143,14 +143,14 @@ IMPL_LINK_NOARG(LineWidthPopup, MFModifyHdl, weld::MetricSpinButton&, void)
m_xVSWidth->SetFormat();
m_xVSWidth->Invalidate();
}
- long nTmp = static_cast<long>(m_xMFWidth->get_value(FieldUnit::NONE));
- long nVal = OutputDevice::LogicToLogic( nTmp, MapUnit::MapPoint, m_eMapUnit );
+ tools::Long nTmp = static_cast<tools::Long>(m_xMFWidth->get_value(FieldUnit::NONE));
+ tools::Long nVal = OutputDevice::LogicToLogic( nTmp, MapUnit::MapPoint, m_eMapUnit );
sal_Int32 nNewWidth = static_cast<short>(m_xMFWidth->denormalize( nVal ));
XLineWidthItem aWidthItem(nNewWidth);
m_rParent.setLineWidth(aWidthItem);
}
-void LineWidthPopup::SetWidthSelect(long lValue, bool bValuable, MapUnit eMapUnit)
+void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit eMapUnit)
{
m_bVSFocus = true;
m_xVSWidth->SetSelItem(0);
diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx
index e78fd51ae3f7..f5153a6b4800 100644
--- a/svx/source/sidebar/line/LineWidthValueSet.cxx
+++ b/svx/source/sidebar/line/LineWidthValueSet.cxx
@@ -79,8 +79,8 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt )
vcl::RenderContext* pDev = rUDEvt.GetRenderContext();
sal_uInt16 nItemId = rUDEvt.GetItemId();
- long nRectHeight = aRect.GetHeight();
- long nRectWidth = aRect.GetWidth();
+ tools::Long nRectHeight = aRect.GetHeight();
+ tools::Long nRectWidth = aRect.GetWidth();
Point aBLPos = aRect.TopLeft();
//const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 4e52822f71c4..3066d8f08e32 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -314,7 +314,7 @@ void ParaLineSpacingControl::ExecuteLineSpace()
break;
case LLINESPACE_PROP:
- SetLineSpace(aSpacing, nPos, mxLineDistAtPercentBox->denormalize(static_cast<long>(mxLineDistAtPercentBox->get_value(FieldUnit::PERCENT))));
+ SetLineSpace(aSpacing, nPos, mxLineDistAtPercentBox->denormalize(static_cast<tools::Long>(mxLineDistAtPercentBox->get_value(FieldUnit::PERCENT))));
break;
case LLINESPACE_MIN:
@@ -331,7 +331,7 @@ void ParaLineSpacingControl::ExecuteLineSpace()
SID_ATTR_PARA_LINESPACE, SfxCallMode::RECORD, { &aSpacing });
}
-void ParaLineSpacingControl::SetLineSpace(SvxLineSpacingItem& rLineSpace, sal_Int32 eSpace, long lValue)
+void ParaLineSpacingControl::SetLineSpace(SvxLineSpacingItem& rLineSpace, sal_Int32 eSpace, tools::Long lValue)
{
switch ( eSpace )
{
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
index 14b335a375a6..e49556f16c59 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
@@ -59,7 +59,8 @@ private:
void ExecuteLineSpace();
/// Set one particular value.
- static void SetLineSpace(SvxLineSpacingItem& rLineSpace, sal_Int32 eSpace, long lValue = 0);
+ static void SetLineSpace(SvxLineSpacingItem& rLineSpace, sal_Int32 eSpace,
+ tools::Long lValue = 0);
/// For the buttons - set the values, and close the popup.
void ExecuteLineSpacing(sal_Int32 aEntry);
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 12a9eba7e7dd..b246b7fea273 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -266,16 +266,16 @@ void ParaPropertyPanel::StateChangedIndentImpl( SfxItemState eState, const SfxPo
maTxtLeft = OutputDevice::LogicToLogic( maTxtLeft, m_eLRSpaceUnit, MapUnit::Map100thMM );
maTxtLeft = OutputDevice::LogicToLogic( maTxtLeft, MapUnit::Map100thMM, MapUnit::MapTwip );
- long aTxtRight = pSpace->GetRight();
+ tools::Long aTxtRight = pSpace->GetRight();
aTxtRight = OutputDevice::LogicToLogic( aTxtRight, m_eLRSpaceUnit, MapUnit::Map100thMM );
aTxtRight = OutputDevice::LogicToLogic( aTxtRight, MapUnit::Map100thMM, MapUnit::MapTwip );
- long aTxtFirstLineOfst = pSpace->GetTextFirstLineOffset();
+ tools::Long aTxtFirstLineOfst = pSpace->GetTextFirstLineOffset();
aTxtFirstLineOfst = OutputDevice::LogicToLogic( aTxtFirstLineOfst, m_eLRSpaceUnit, MapUnit::Map100thMM );
aTxtFirstLineOfst = OutputDevice::LogicToLogic( aTxtFirstLineOfst, MapUnit::Map100thMM, MapUnit::MapTwip );
- long nVal = OutputDevice::LogicToLogic( maTxtLeft, MapUnit::MapTwip, MapUnit::Map100thMM );
- nVal = static_cast<long>(mxLeftIndent->normalize( nVal ));
+ tools::Long nVal = OutputDevice::LogicToLogic( maTxtLeft, MapUnit::MapTwip, MapUnit::Map100thMM );
+ nVal = static_cast<tools::Long>(mxLeftIndent->normalize( nVal ));
if ( maContext.GetCombinedContext_DI() != CombinedEnumContext(Application::WriterVariants, Context::Text)
&& maContext.GetCombinedContext_DI() != CombinedEnumContext(Application::WriterVariants, Context::Default)
@@ -284,8 +284,8 @@ void ParaPropertyPanel::StateChangedIndentImpl( SfxItemState eState, const SfxPo
mxFLineIndent->set_min( nVal*-1, FieldUnit::MM_100TH );
}
- long nrVal = OutputDevice::LogicToLogic( aTxtRight, MapUnit::MapTwip, MapUnit::Map100thMM );
- nrVal = static_cast<long>(mxRightIndent->normalize( nrVal ));
+ tools::Long nrVal = OutputDevice::LogicToLogic( aTxtRight, MapUnit::MapTwip, MapUnit::Map100thMM );
+ nrVal = static_cast<tools::Long>(mxRightIndent->normalize( nrVal ));
switch (maContext.GetCombinedContext_DI())
{
@@ -315,8 +315,8 @@ void ParaPropertyPanel::StateChangedIndentImpl( SfxItemState eState, const SfxPo
mxLeftIndent->set_value( nVal, FieldUnit::MM_100TH );
mxRightIndent->set_value( nrVal, FieldUnit::MM_100TH );
- long nfVal = OutputDevice::LogicToLogic( aTxtFirstLineOfst, MapUnit::MapTwip, MapUnit::Map100thMM );
- nfVal = static_cast<long>(mxFLineIndent->normalize( nfVal ));
+ tools::Long nfVal = OutputDevice::LogicToLogic( aTxtFirstLineOfst, MapUnit::MapTwip, MapUnit::Map100thMM );
+ nfVal = static_cast<tools::Long>(mxFLineIndent->normalize( nfVal ));
mxFLineIndent->set_value( nfVal, FieldUnit::MM_100TH );
}
else if (eState != SfxItemState::DISABLED )
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
index d59712360055..da5e1a8f5a6c 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
@@ -102,9 +102,9 @@ private:
std::unique_ptr<SvxRelativeField> mxFLineIndent;
// Data Member
- long maTxtLeft;
- long maUpper;
- long maLower;
+ tools::Long maTxtLeft;
+ tools::Long maUpper;
+ tools::Long maLower;
FieldUnit m_eMetricUnit;
FieldUnit m_last_eMetricUnit;
diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
index f08211984dd0..fdfbf6fd0b1f 100644
--- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
+++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
@@ -210,9 +210,9 @@ void ParaLRSpacingWindow::SetValue(SfxItemState eState, const SfxPoolItem* pStat
m_xFLSpacing->set_sensitive(true);
const SvxLRSpaceItem* pSpace = static_cast<const SvxLRSpaceItem*>(pState);
- long aTxtLeft = pSpace->GetTextLeft();
- long aTxtRight = pSpace->GetRight();
- long aTxtFirstLineOfst = pSpace->GetTextFirstLineOffset();
+ tools::Long aTxtLeft = pSpace->GetTextLeft();
+ tools::Long aTxtRight = pSpace->GetRight();
+ tools::Long aTxtFirstLineOfst = pSpace->GetTextFirstLineOffset();
aTxtLeft = m_xBeforeSpacing->normalize(aTxtLeft);
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index eb5913f5efb0..141c2f4cf22a 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -362,16 +362,16 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, ChangeWidthHdl, weld::MetricSpinButton&,
if( mxCbxScale->get_active() &&
mxCbxScale->get_sensitive() )
{
- long nHeight = static_cast<long>( (static_cast<double>(mlOldHeight) * static_cast<double>(mxMtrWidth->get_value(FieldUnit::NONE))) / static_cast<double>(mlOldWidth) );
+ tools::Long nHeight = static_cast<tools::Long>( (static_cast<double>(mlOldHeight) * static_cast<double>(mxMtrWidth->get_value(FieldUnit::NONE))) / static_cast<double>(mlOldWidth) );
if( nHeight <= mxMtrHeight->get_max( FieldUnit::NONE ) )
{
mxMtrHeight->set_value( nHeight, FieldUnit::NONE );
}
else
{
- nHeight = static_cast<long>(mxMtrHeight->get_max( FieldUnit::NONE ));
+ nHeight = static_cast<tools::Long>(mxMtrHeight->get_max( FieldUnit::NONE ));
mxMtrHeight->set_value(nHeight, FieldUnit::NONE);
- const long nWidth = static_cast<long>( (static_cast<double>(mlOldWidth) * static_cast<double>(nHeight)) / static_cast<double>(mlOldHeight) );
+ const tools::Long nWidth = static_cast<tools::Long>( (static_cast<double>(mlOldWidth) * static_cast<double>(nHeight)) / static_cast<double>(mlOldHeight) );
mxMtrWidth->set_value( nWidth, FieldUnit::NONE );
}
}
@@ -384,16 +384,16 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, ChangeHeightHdl, weld::MetricSpinButton&,
if( mxCbxScale->get_active() &&
mxCbxScale->get_sensitive() )
{
- long nWidth = static_cast<long>( (static_cast<double>(mlOldWidth) * static_cast<double>(mxMtrHeight->get_value(FieldUnit::NONE))) / static_cast<double>(mlOldHeight) );
+ tools::Long nWidth = static_cast<tools::Long>( (static_cast<double>(mlOldWidth) * static_cast<double>(mxMtrHeight->get_value(FieldUnit::NONE))) / static_cast<double>(mlOldHeight) );
if( nWidth <= mxMtrWidth->get_max( FieldUnit::NONE ) )
{
mxMtrWidth->set_value( nWidth, FieldUnit::NONE );
}
else
{
- nWidth = static_cast<long>(mxMtrWidth->get_max( FieldUnit::NONE ));
+ nWidth = static_cast<tools::Long>(mxMtrWidth->get_max( FieldUnit::NONE ));
mxMtrWidth->set_value( nWidth, FieldUnit::NONE );
- const long nHeight = static_cast<long>( (static_cast<double>(mlOldHeight) * static_cast<double>(nWidth)) / static_cast<double>(mlOldWidth) );
+ const tools::Long nHeight = static_cast<tools::Long>( (static_cast<double>(mlOldHeight) * static_cast<double>(nWidth)) / static_cast<double>(mlOldWidth) );
mxMtrHeight->set_value( nHeight, FieldUnit::NONE );
}
}
@@ -405,10 +405,10 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, ChangePosXHdl, weld::MetricSpinButton&, v
{
if ( mxMtrPosX->get_value_changed_from_saved())
{
- long lX = GetCoreValue( *mxMtrPosX, mePoolUnit );
+ tools::Long lX = GetCoreValue( *mxMtrPosX, mePoolUnit );
Fraction aUIScale = mpView->GetModel()->GetUIScale();
- lX = long( lX * aUIScale );
+ lX = tools::Long( lX * aUIScale );
SfxInt32Item aPosXItem( SID_ATTR_TRANSFORM_POS_X,static_cast<sal_uInt32>(lX));
@@ -421,10 +421,10 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, ChangePosYHdl, weld::MetricSpinButton&, v
{
if ( mxMtrPosY->get_value_changed_from_saved() )
{
- long lY = GetCoreValue( *mxMtrPosY, mePoolUnit );
+ tools::Long lY = GetCoreValue( *mxMtrPosY, mePoolUnit );
Fraction aUIScale = mpView->GetModel()->GetUIScale();
- lY = long( lY * aUIScale );
+ lY = tools::Long( lY * aUIScale );
SfxInt32Item aPosYItem( SID_ATTR_TRANSFORM_POS_Y,static_cast<sal_uInt32>(lY));
@@ -519,7 +519,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
if(pWidthItem)
{
- long lOldWidth1 = long( pWidthItem->GetValue() / maUIScale );
+ tools::Long lOldWidth1 = tools::Long( pWidthItem->GetValue() / maUIScale );
SetFieldUnit( *mxMtrWidth, meDlgUnit, true );
SetMetricValue( *mxMtrWidth, lOldWidth1, mePoolUnit );
limitWidth(*mxMtrWidth);
@@ -539,7 +539,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
if(pHeightItem)
{
- long nTmp = long( pHeightItem->GetValue() / maUIScale);
+ tools::Long nTmp = tools::Long( pHeightItem->GetValue() / maUIScale);
SetFieldUnit( *mxMtrHeight, meDlgUnit, true );
SetMetricValue( *mxMtrHeight, nTmp, mePoolUnit );
limitWidth(*mxMtrHeight);
@@ -559,7 +559,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
if(pItem)
{
- long nTmp = long(pItem->GetValue() / maUIScale);
+ tools::Long nTmp = tools::Long(pItem->GetValue() / maUIScale);
SetFieldUnit( *mxMtrPosX, meDlgUnit, true );
SetMetricValue( *mxMtrPosX, nTmp, mePoolUnit );
limitWidth(*mxMtrPosX);
@@ -578,7 +578,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
if(pItem)
{
- long nTmp = long(pItem->GetValue() / maUIScale);
+ tools::Long nTmp = tools::Long(pItem->GetValue() / maUIScale);
SetFieldUnit( *mxMtrPosY, meDlgUnit, true );
SetMetricValue( *mxMtrPosY, nTmp, mePoolUnit );
limitWidth(*mxMtrPosY);
@@ -598,7 +598,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
if(pItem)
{
mlRotX = pItem->GetValue();
- mlRotX = long( mlRotX / maUIScale );
+ mlRotX = tools::Long( mlRotX / maUIScale );
}
}
break;
@@ -611,7 +611,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
if(pItem)
{
mlRotY = pItem->GetValue();
- mlRotY = long( mlRotY / maUIScale );
+ mlRotY = tools::Long( mlRotY / maUIScale );
}
}
break;
@@ -679,7 +679,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
if(pItem)
{
- long nTmp = pItem->GetValue();
+ tools::Long nTmp = pItem->GetValue();
nTmp = nTmp < 0 ? 36000+nTmp : nTmp;
mxMtrAngle->set_value(nTmp, FieldUnit::DEGREE);
@@ -816,15 +816,15 @@ void PosSizePropertyPanel::executeSize()
// get Width
double nWidth = static_cast<double>(mxMtrWidth->get_value(FieldUnit::MM_100TH));
- long lWidth = long(nWidth * static_cast<double>(aUIScale));
+ tools::Long lWidth = tools::Long(nWidth * static_cast<double>(aUIScale));
lWidth = OutputDevice::LogicToLogic( lWidth, MapUnit::Map100thMM, mePoolUnit );
- lWidth = static_cast<long>(mxMtrWidth->denormalize( lWidth ));
+ lWidth = static_cast<tools::Long>(mxMtrWidth->denormalize( lWidth ));
// get Height
double nHeight = static_cast<double>(mxMtrHeight->get_value(FieldUnit::MM_100TH));
- long lHeight = long(nHeight * static_cast<double>(aUIScale));
+ tools::Long lHeight = tools::Long(nHeight * static_cast<double>(aUIScale));
lHeight = OutputDevice::LogicToLogic( lHeight, MapUnit::Map100thMM, mePoolUnit );
- lHeight = static_cast<long>(mxMtrHeight->denormalize( lHeight ));
+ lHeight = static_cast<tools::Long>(mxMtrHeight->denormalize( lHeight ));
// put Width & Height to itemset
SfxUInt32Item aWidthItem( SID_ATTR_TRANSFORM_WIDTH, static_cast<sal_uInt32>(lWidth));
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index a35c8a425878..79f40f02f99c 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -127,8 +127,8 @@ private:
const SdrView* mpView;
sal_uInt32 mlOldWidth;
sal_uInt32 mlOldHeight;
- long mlRotX;
- long mlRotY;
+ tools::Long mlRotX;
+ tools::Long mlRotY;
Fraction maUIScale;
MapUnit mePoolUnit;
FieldUnit meDlgUnit;
diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
index 43bdec9b61f2..0f4446633d3b 100644
--- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
+++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
@@ -244,7 +244,7 @@ void ShadowPropertyPanel::UpdateControls()
mxShadowDistance->set_value(nXY, FieldUnit::MM_100TH);
}
-void ShadowPropertyPanel::SetTransparencyValue(long nVal)
+void ShadowPropertyPanel::SetTransparencyValue(tools::Long nVal)
{
mxShadowTransSlider->set_value(nVal);
mxShadowTransMetric->set_value(nVal, FieldUnit::PERCENT);
diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
index e2540ac5012f..f7ee8bb4188e 100644
--- a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
+++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
@@ -60,7 +60,7 @@ private:
::sfx2::sidebar::ControllerItem maShadowYDistanceController;
SfxBindings* mpBindings;
- long nX,nY,nXY;
+ tools::Long nX,nY,nXY;
std::unique_ptr<weld::CheckButton> mxShowShadow;
std::unique_ptr<weld::MetricSpinButton> mxShadowDistance;
@@ -76,7 +76,7 @@ private:
std::unique_ptr<weld::MetricSpinButton> mxShadowBlurMetric;
void InsertAngleValues();
- void SetTransparencyValue(long);
+ void SetTransparencyValue(tools::Long);
void UpdateControls();
void ModifyShadowDistance();
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
index 72ef14ce8bf7..58c25e76bef0 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
@@ -87,7 +87,7 @@ void TextCharacterSpacingControl::Initialize()
SfxItemState eState = SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_CHAR_KERNING, pItem);
const SvxKerningItem* pKerningItem = static_cast<const SvxKerningItem*>(pItem);
- long nKerning = 0;
+ tools::Long nKerning = 0;
if(pKerningItem)
nKerning = pKerningItem->GetValue();
@@ -113,7 +113,7 @@ void TextCharacterSpacingControl::Initialize()
{
MapUnit eUnit = GetCoreMetric();
MapUnit eOrgUnit = eUnit;
- long nBig = mxEditKerning->normalize(nKerning);
+ tools::Long nBig = mxEditKerning->normalize(nKerning);
nKerning = OutputDevice::LogicToLogic(nBig, eOrgUnit, MapUnit::MapPoint);
mxEditKerning->set_value(nKerning, FieldUnit::NONE);
}
@@ -129,14 +129,14 @@ void TextCharacterSpacingControl::Initialize()
}
}
-void TextCharacterSpacingControl::ExecuteCharacterSpacing(long nValue, bool bClose)
+void TextCharacterSpacingControl::ExecuteCharacterSpacing(tools::Long nValue, bool bClose)
{
MapUnit eUnit = GetCoreMetric();
- long nSign = (nValue < 0) ? -1 : 1;
+ tools::Long nSign = (nValue < 0) ? -1 : 1;
nValue = nValue * nSign;
- long nVal = OutputDevice::LogicToLogic(nValue, MapUnit::MapPoint, eUnit);
+ tools::Long nVal = OutputDevice::LogicToLogic(nValue, MapUnit::MapPoint, eUnit);
short nKern = (nValue == 0) ? 0 : static_cast<short>(mxEditKerning->denormalize(nVal));
SvxKerningItem aKernItem(nSign * nKern, SID_ATTR_CHAR_KERNING);
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
index f5ff964f0c85..9261ce77eb40 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
@@ -40,7 +40,7 @@ public:
virtual ~TextCharacterSpacingControl() override;
private:
- long mnCustomKern;
+ tools::Long mnCustomKern;
short mnLastCus;
std::unique_ptr<weld::MetricSpinButton> mxEditKerning;
@@ -54,7 +54,7 @@ private:
rtl::Reference<TextCharacterSpacingPopup> mxControl;
void Initialize();
- void ExecuteCharacterSpacing(long nValue, bool bClose = true);
+ void ExecuteCharacterSpacing(tools::Long nValue, bool bClose = true);
DECL_LINK(PredefinedValuesHdl, weld::Button&, void);
DECL_LINK(KerningModifyHdl, weld::MetricSpinButton&, void);
diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index 962102ac59d0..2c6de64b458f 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -64,7 +64,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt )
pDev->Push();
const sal_uInt16 nItemId = rUDEvt.GetItemId();
- const long nRectHeight = aRect.GetHeight();
+ const tools::Long nRectHeight = aRect.GetHeight();
vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne));
{
@@ -102,7 +102,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt )
aStrRect.AdjustTop(nRectHeight/4 );
aStrRect.AdjustBottom( -(nRectHeight/4) );
- const long nRectWidth = aRect.GetWidth();
+ const tools::Long nRectWidth = aRect.GetWidth();
aStrRect.AdjustLeft(8 );
aStrRect.AdjustRight( -((nRectWidth*2)/3) );
pDev->SetFont(aFont);
diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx
index ef1f8a68bd49..62e96afa7d12 100644
--- a/svx/source/stbctrls/modctrl.cxx
+++ b/svx/source/stbctrls/modctrl.cxx
@@ -129,8 +129,8 @@ Point centerImage(const tools::Rectangle& rBoundingRect, const Image& rImg)
{
Size aImgSize = rImg.GetSizePixel();
Size aRectSize = rBoundingRect.GetSize();
- long nXOffset = (aRectSize.getWidth() - aImgSize.getWidth())/2;
- long nYOffset = (aRectSize.getHeight() - aImgSize.getHeight())/2;
+ tools::Long nXOffset = (aRectSize.getWidth() - aImgSize.getWidth())/2;
+ tools::Long nYOffset = (aRectSize.getHeight() - aImgSize.getHeight())/2;
Point aPt = rBoundingRect.TopLeft();
aPt += Point(nXOffset, nYOffset);
return aPt;
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 2c9bc03b5bd4..bdd8a36c20d0 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -57,7 +57,7 @@
<SvxPosSizeStatusBarControl::Paint(const UserDrawEvent&)>
*/
-OUString SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal )
+OUString SvxPosSizeStatusBarControl::GetMetricStr_Impl( tools::Long nVal )
{
// deliver and set the Metric of the application
FieldUnit eOutUnit = SfxModule::GetModuleFieldUnit( getFrameInterface() );
@@ -396,7 +396,7 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
if ( pImpl->bPos || pImpl->bSize )
{
// count the position for showing the size
- long nSizePosX =
+ tools::Long nSizePosX =
rRect.Left() + rRect.GetWidth() / 2 + PAINT_OFFSET;
// draw position
Point aPnt = rRect.TopLeft();
diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx
index 9d1b98085883..bd351e4be3c4 100644
--- a/svx/source/stbctrls/xmlsecctrl.cxx
+++ b/svx/source/stbctrls/xmlsecctrl.cxx
@@ -132,7 +132,7 @@ void XmlSecStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
pDev->SetLineColor();
pDev->SetFillColor( pDev->GetBackground().GetColor() );
- long yOffset = (aRect.GetHeight() - mpImpl->maImage.GetSizePixel().Height()) / 2;
+ tools::Long yOffset = (aRect.GetHeight() - mpImpl->maImage.GetSizePixel().Height()) / 2;
if( mpImpl->mnState == SignatureState::OK )
{
diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx
index 7cf9ff0c86dc..e9673a323167 100644
--- a/svx/source/stbctrls/zoomsliderctrl.cxx
+++ b/svx/source/stbctrls/zoomsliderctrl.cxx
@@ -63,15 +63,15 @@ struct SvxZoomSliderControl::SvxZoomSliderControl_Impl
mbDraggingStarted( false ) {}
};
-const long nSliderXOffset = 20;
-const long nSnappingEpsilon = 5; // snapping epsilon in pixels
-const long nSnappingPointsMinDist = nSnappingEpsilon; // minimum distance of two adjacent snapping points
+const tools::Long nSliderXOffset = 20;
+const tools::Long nSnappingEpsilon = 5; // snapping epsilon in pixels
+const tools::Long nSnappingPointsMinDist = nSnappingEpsilon; // minimum distance of two adjacent snapping points
// nOffset refers to the origin of the control:
// + ----------- -
-sal_uInt16 SvxZoomSliderControl::Offset2Zoom( long nOffset ) const
+sal_uInt16 SvxZoomSliderControl::Offset2Zoom( tools::Long nOffset ) const
{
- const long nControlWidth = getControlRect().GetWidth();
+ const tools::Long nControlWidth = getControlRect().GetWidth();
sal_uInt16 nRet = 0;
if ( nOffset < nSliderXOffset )
@@ -82,7 +82,7 @@ sal_uInt16 SvxZoomSliderControl::Offset2Zoom( long nOffset ) const
// check for snapping points:
sal_uInt16 nCount = 0;
- for ( const long nCurrent : mxImpl->maSnappingPointOffsets )
+ for ( const tools::Long nCurrent : mxImpl->maSnappingPointOffsets )
{
if ( std::abs(nCurrent - nOffset) < nSnappingEpsilon )
{
@@ -98,19 +98,19 @@ sal_uInt16 SvxZoomSliderControl::Offset2Zoom( long nOffset ) const
if ( nOffset < nControlWidth / 2 )
{
// first half of slider
- const long nFirstHalfRange = mxImpl->mnSliderCenter - mxImpl->mnMinZoom;
- const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset;
- const long nZoomPerSliderPixel = (1000 * nFirstHalfRange) / nHalfSliderWidth;
- const long nOffsetToSliderLeft = nOffset - nSliderXOffset;
+ const tools::Long nFirstHalfRange = mxImpl->mnSliderCenter - mxImpl->mnMinZoom;
+ const tools::Long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset;
+ const tools::Long nZoomPerSliderPixel = (1000 * nFirstHalfRange) / nHalfSliderWidth;
+ const tools::Long nOffsetToSliderLeft = nOffset - nSliderXOffset;
nRet = mxImpl->mnMinZoom + sal_uInt16( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 );
}
else
{
// second half of slider
- const long nSecondHalfRange = mxImpl->mnMaxZoom - mxImpl->mnSliderCenter;
- const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset;
- const long nZoomPerSliderPixel = 1000 * nSecondHalfRange / nHalfSliderWidth;
- const long nOffsetToSliderCenter = nOffset - nControlWidth/2;
+ const tools::Long nSecondHalfRange = mxImpl->mnMaxZoom - mxImpl->mnSliderCenter;
+ const tools::Long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset;
+ const tools::Long nZoomPerSliderPixel = 1000 * nSecondHalfRange / nHalfSliderWidth;
+ const tools::Long nOffsetToSliderCenter = nOffset - nControlWidth/2;
nRet = mxImpl->mnSliderCenter + sal_uInt16( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 );
}
}
@@ -124,27 +124,27 @@ sal_uInt16 SvxZoomSliderControl::Offset2Zoom( long nOffset ) const
}
// returns the offset to the left control border
-long SvxZoomSliderControl::Zoom2Offset( sal_uInt16 nCurrentZoom ) const
+tools::Long SvxZoomSliderControl::Zoom2Offset( sal_uInt16 nCurrentZoom ) const
{
- const long nControlWidth = getControlRect().GetWidth();
- long nRet = nSliderXOffset;
+ const tools::Long nControlWidth = getControlRect().GetWidth();
+ tools::Long nRet = nSliderXOffset;
- const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset;
+ const tools::Long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset;
if ( nCurrentZoom <= mxImpl->mnSliderCenter )
{
nCurrentZoom = nCurrentZoom - mxImpl->mnMinZoom;
- const long nFirstHalfRange = mxImpl->mnSliderCenter - mxImpl->mnMinZoom;
- const long nSliderPixelPerZoomPercent = 1000 * nHalfSliderWidth / nFirstHalfRange;
- const long nOffset = (nSliderPixelPerZoomPercent * nCurrentZoom) / 1000;
+ const tools::Long nFirstHalfRange = mxImpl->mnSliderCenter - mxImpl->mnMinZoom;
+ const tools::Long nSliderPixelPerZoomPercent = 1000 * nHalfSliderWidth / nFirstHalfRange;
+ const tools::Long nOffset = (nSliderPixelPerZoomPercent * nCurrentZoom) / 1000;
nRet += nOffset;
}
else
{
nCurrentZoom = nCurrentZoom - mxImpl->mnSliderCenter;
- const long nSecondHalfRange = mxImpl->mnMaxZoom - mxImpl->mnSliderCenter;
- const long nSliderPixelPerZoomPercent = 1000 * nHalfSliderWidth / nSecondHalfRange;
- const long nOffset = (nSliderPixelPerZoomPercent * nCurrentZoom) / 1000;
+ const tools::Long nSecondHalfRange = mxImpl->mnMaxZoom - mxImpl->mnSliderCenter;
+ const tools::Long nSliderPixelPerZoomPercent = 1000 * nHalfSliderWidth / nSecondHalfRange;
+ const tools::Long nOffset = (nSliderPixelPerZoomPercent * nCurrentZoom) / 1000;
nRet += nHalfSliderWidth + nOffset;
}
@@ -202,11 +202,11 @@ void SvxZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eStat
}
// remove snapping points that are too close to each other:
- long nLastOffset = 0;
+ tools::Long nLastOffset = 0;
for ( const sal_uInt16 nCurrent : aTmpSnappingPoints )
{
- const long nCurrentOffset = Zoom2Offset( nCurrent );
+ const tools::Long nCurrentOffset = Zoom2Offset( nCurrent );
if ( nCurrentOffset - nLastOffset >= nSnappingPointsMinDist )
{
@@ -230,8 +230,8 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt )
tools::Rectangle aRect = rUsrEvt.GetRect();
tools::Rectangle aSlider = aRect;
- long nSliderHeight = 1 * pDev->GetDPIScaleFactor();
- long nSnappingHeight = 2 * pDev->GetDPIScaleFactor();
+ tools::Long nSliderHeight = 1 * pDev->GetDPIScaleFactor();
+ tools::Long nSnappingHeight = 2 * pDev->GetDPIScaleFactor();
aSlider.AdjustTop((aControlRect.GetHeight() - nSliderHeight)/2 );
aSlider.SetBottom( aSlider.Top() + nSliderHeight - 1 );
@@ -255,7 +255,7 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt )
// draw snapping points:
for ( const auto& rSnappingPoint : mxImpl->maSnappingPointOffsets )
{
- long nSnapPosX = aRect.Left() + rSnappingPoint;
+ tools::Long nSnapPosX = aRect.Left() + rSnappingPoint;
pDev->DrawRect( tools::Rectangle( nSnapPosX - 1, aSlider.Top() - nSnappingHeight,
nSnapPosX, aSlider.Bottom() + nSnappingHeight ) );
@@ -291,12 +291,12 @@ bool SvxZoomSliderControl::MouseButtonDown( const MouseEvent & rEvt )
const Point aPoint = rEvt.GetPosPixel();
const sal_Int32 nXDiff = aPoint.X() - aControlRect.Left();
- long nIncDecWidth = mxImpl->maIncreaseButton.GetSizePixel().Width();
+ tools::Long nIncDecWidth = mxImpl->maIncreaseButton.GetSizePixel().Width();
- const long nButtonLeftOffset = (nSliderXOffset - nIncDecWidth)/2;
- const long nButtonRightOffset = (nSliderXOffset + nIncDecWidth)/2;
+ const tools::Long nButtonLeftOffset = (nSliderXOffset - nIncDecWidth)/2;
+ const tools::Long nButtonRightOffset = (nSliderXOffset + nIncDecWidth)/2;
- const long nOldZoom = mxImpl->mnCurrentZoom;
+ const tools::Long nOldZoom = mxImpl->mnCurrentZoom;
// click to - button
if ( nXDiff >= nButtonLeftOffset && nXDiff <= nButtonRightOffset )
@@ -354,10 +354,10 @@ bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt )
// Tooltips
- long nIncDecWidth = mxImpl->maIncreaseButton.GetSizePixel().Width();
+ tools::Long nIncDecWidth = mxImpl->maIncreaseButton.GetSizePixel().Width();
- const long nButtonLeftOffset = (nSliderXOffset - nIncDecWidth)/2;
- const long nButtonRightOffset = (nSliderXOffset + nIncDecWidth)/2;
+ const tools::Long nButtonLeftOffset = (nSliderXOffset - nIncDecWidth)/2;
+ const tools::Long nButtonRightOffset = (nSliderXOffset + nIncDecWidth)/2;
// click to - button
if ( nXDiff >= nButtonLeftOffset && nXDiff <= nButtonRightOffset )
diff --git a/svx/source/styles/CommonStyleManager.cxx b/svx/source/styles/CommonStyleManager.cxx
index d1fc8dbf6d7c..7a4279716ffb 100644
--- a/svx/source/styles/CommonStyleManager.cxx
+++ b/svx/source/styles/CommonStyleManager.cxx
@@ -16,7 +16,7 @@ namespace svx
std::unique_ptr<sfx2::StylePreviewRenderer> CommonStyleManager::CreateStylePreviewRenderer(
OutputDevice& rOutputDev, SfxStyleSheetBase* pStyle,
- long nMaxHeight)
+ tools::Long nMaxHeight)
{
return std::unique_ptr<sfx2::StylePreviewRenderer>(new CommonStylePreviewRenderer(mrShell, rOutputDev, pStyle, nMaxHeight));
}
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx
index cd3a311dfcb0..5ad1b8769ec7 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -44,7 +44,7 @@ namespace svx
CommonStylePreviewRenderer::CommonStylePreviewRenderer(
const SfxObjectShell& rShell, OutputDevice& rOutputDev,
- SfxStyleSheetBase* pStyle, long nMaxHeight)
+ SfxStyleSheetBase* pStyle, tools::Long nMaxHeight)
: StylePreviewRenderer(rShell, rOutputDev, pStyle, nMaxHeight)
, m_pFont()
, maFontColor(COL_AUTO)
diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx
index 0b0ea0536945..c3230b12285d 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -440,10 +440,10 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
}
const tools::Rectangle aVCLDiscreteRectangle(
- static_cast<long>(floor(aDiscreteRange.getMinX())),
- static_cast<long>(floor(aDiscreteRange.getMinY())),
- static_cast<long>(ceil(aDiscreteRange.getMaxX())),
- static_cast<long>(ceil(aDiscreteRange.getMaxY())));
+ static_cast<tools::Long>(floor(aDiscreteRange.getMinX())),
+ static_cast<tools::Long>(floor(aDiscreteRange.getMinY())),
+ static_cast<tools::Long>(ceil(aDiscreteRange.getMaxX())),
+ static_cast<tools::Long>(ceil(aDiscreteRange.getMaxY())));
const bool bWasMapModeEnabled(rWindow.IsMapModeEnabled());
rWindow.EnableMapMode(false);
@@ -456,10 +456,10 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
// that the drawinglayer units are 100ths of mm, so they are easy to
// convert to twips
const tools::Rectangle aRect100thMM(
- static_cast<long>(floor(rRange.getMinX())),
- static_cast<long>(floor(rRange.getMinY())),
- static_cast<long>(ceil(rRange.getMaxX())),
- static_cast<long>(ceil(rRange.getMaxY())));
+ static_cast<tools::Long>(floor(rRange.getMinX())),
+ static_cast<tools::Long>(floor(rRange.getMinY())),
+ static_cast<tools::Long>(ceil(rRange.getMaxX())),
+ static_cast<tools::Long>(ceil(rRange.getMaxY())));
const tools::Rectangle aRectTwips = OutputDevice::LogicToLogic(aRect100thMM, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 158a1ab762b4..2e007ea7d513 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -848,21 +848,21 @@ bool SdrMetricItem::HasMetrics() const
return true;
}
-void SdrMetricItem::ScaleMetrics(long nMul, long nDiv)
+void SdrMetricItem::ScaleMetrics(tools::Long nMul, tools::Long nDiv)
{
if (GetValue()!=0) {
BigInt aVal(GetValue());
aVal*=nMul;
aVal+=nDiv/2; // to round accurately
aVal/=nDiv;
- SetValue(long(aVal));
+ SetValue(tools::Long(aVal));
}
}
bool SdrMetricItem::GetPresentation(SfxItemPresentation ePres,
MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const
{
- long nValue=GetValue();
+ tools::Long nValue=GetValue();
SdrFormatter aFmt(eCoreMetric,ePresMetric);
rText = aFmt.GetStr(nValue);
rText += " " + SdrFormatter::GetUnitStr(ePresMetric);
@@ -1247,7 +1247,7 @@ bool SdrTextAniAmountItem::HasMetrics() const
return GetValue()>0;
}
-void SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv)
+void SdrTextAniAmountItem::ScaleMetrics(tools::Long nMul, tools::Long nDiv)
{
if (GetValue()>0) {
BigInt aVal(GetValue());
diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx
index 381a8def5f66..0c785dc67426 100644
--- a/svx/source/svdraw/svddrag.cxx
+++ b/svx/source/svdraw/svddrag.cxx
@@ -86,9 +86,9 @@ void SdrDragStat::PrevPoint()
bool SdrDragStat::CheckMinMoved(const Point& rPnt)
{
if (!bMinMoved) {
- long dx=rPnt.X()-GetPrev().X(); if (dx<0) dx=-dx;
- long dy=rPnt.Y()-GetPrev().Y(); if (dy<0) dy=-dy;
- if (dx>=long(nMinMov) || dy>=long(nMinMov))
+ tools::Long dx=rPnt.X()-GetPrev().X(); if (dx<0) dx=-dx;
+ tools::Long dy=rPnt.Y()-GetPrev().Y(); if (dy<0) dy=-dy;
+ if (dx>=tools::Long(nMinMov) || dy>=tools::Long(nMinMov))
bMinMoved=true;
}
return bMinMoved;
@@ -96,8 +96,8 @@ bool SdrDragStat::CheckMinMoved(const Point& rPnt)
Fraction SdrDragStat::GetXFact() const
{
- long nMul=mvPnts.back().X()-aRef1.X();
- long nDiv=GetPrev().X()-aRef1.X();
+ tools::Long nMul=mvPnts.back().X()-aRef1.X();
+ tools::Long nDiv=GetPrev().X()-aRef1.X();
if (nDiv==0) nDiv=1;
if (bHorFixed) { nMul=1; nDiv=1; }
return Fraction(nMul,nDiv);
@@ -105,8 +105,8 @@ Fraction SdrDragStat::GetXFact() const
Fraction SdrDragStat::GetYFact() const
{
- long nMul=mvPnts.back().Y()-aRef1.Y();
- long nDiv=GetPrev().Y()-aRef1.Y();
+ tools::Long nMul=mvPnts.back().Y()-aRef1.Y();
+ tools::Long nDiv=GetPrev().Y()-aRef1.Y();
if (nDiv==0) nDiv=1;
if (bVerFixed) { nMul=1; nDiv=1; }
return Fraction(nMul,nDiv);
diff --git a/svx/source/svdraw/svddrgm1.hxx b/svx/source/svdraw/svddrgm1.hxx
index 8a0fcca1a745..25c1a5af126a 100644
--- a/svx/source/svdraw/svddrgm1.hxx
+++ b/svx/source/svdraw/svddrgm1.hxx
@@ -49,8 +49,8 @@ class SdrDragRotate : public SdrDragMethod
private:
double nSin;
double nCos;
- long nAngle0;
- long nAngle;
+ tools::Long nAngle0;
+ tools::Long nAngle;
bool bRight;
public:
@@ -70,8 +70,8 @@ class SdrDragShear : public SdrDragMethod
{
private:
Fraction aFact;
- long nAngle0;
- long nAngle;
+ tools::Long nAngle0;
+ tools::Long nAngle;
double nTan;
bool bVertical; // contort vertically
bool bResize; // shear and resize
@@ -95,7 +95,7 @@ class SdrDragMirror : public SdrDragMethod
{
private:
Point aDif;
- long nAngle;
+ tools::Long nAngle;
bool bMirrored;
bool bSide0;
@@ -159,8 +159,8 @@ private:
bool bUpr;
bool bLwr;
bool bAtCenter;
- long nAngle;
- long nMarkSize;
+ tools::Long nAngle;
+ tools::Long nMarkSize;
SdrCrookMode eMode;
// helpers for applyCurrentTransformationToPolyPolygon
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 22c70944d2bd..6f6ac53a11fa 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1011,8 +1011,8 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
if (!DragStat().IsNoSnap())
{
- long nBestXSnap=0;
- long nBestYSnap=0;
+ tools::Long nBestXSnap=0;
+ tools::Long nBestYSnap=0;
bool bXSnapped=false;
bool bYSnapped=false;
Point aDif(aPnt-DragStat().GetStart());
@@ -1042,7 +1042,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
else
{
if (!DragStat().IsNoSnap()) SnapPos(aPnt);
- long nSA=0;
+ tools::Long nSA=0;
if (getSdrDragView().IsAngleSnapEnabled())
nSA=getSdrDragView().GetSnapAngle();
@@ -1068,8 +1068,8 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
if (pH!=nullptr)
{
Point aRef(pH->GetPos());
- long nAngle=NormAngle36000(GetAngle(aPnt-aRef));
- long nNewAngle=nAngle;
+ tools::Long nAngle=NormAngle36000(GetAngle(aPnt-aRef));
+ tools::Long nNewAngle=nAngle;
nNewAngle+=nSA/2;
nNewAngle/=nSA;
nNewAngle*=nSA;
@@ -1550,8 +1550,8 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
bYSnapped=false;
Point aNoSnapPnt(rNoSnapPnt_);
const tools::Rectangle& aSR=GetMarkedRect();
- long nMovedx=aNoSnapPnt.X()-DragStat().GetStart().X();
- long nMovedy=aNoSnapPnt.Y()-DragStat().GetStart().Y();
+ tools::Long nMovedx=aNoSnapPnt.X()-DragStat().GetStart().X();
+ tools::Long nMovedy=aNoSnapPnt.Y()-DragStat().GetStart().Y();
Point aLO(aSR.TopLeft()); aLO.AdjustX(nMovedx ); aLO.AdjustY(nMovedy );
Point aRU(aSR.BottomRight()); aRU.AdjustX(nMovedx ); aRU.AdjustY(nMovedy );
Point aLU(aLO.X(),aRU.Y());
@@ -1891,10 +1891,10 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt)
}
}
- long nXDiv=aStart.X()-aRef.X(); if (nXDiv==0) nXDiv=1;
- long nYDiv=aStart.Y()-aRef.Y(); if (nYDiv==0) nYDiv=1;
- long nXMul=aPnt.X()-aRef.X();
- long nYMul=aPnt.Y()-aRef.Y();
+ tools::Long nXDiv=aStart.X()-aRef.X(); if (nXDiv==0) nXDiv=1;
+ tools::Long nYDiv=aStart.Y()-aRef.Y(); if (nYDiv==0) nYDiv=1;
+ tools::Long nXMul=aPnt.X()-aRef.X();
+ tools::Long nYMul=aPnt.Y()-aRef.Y();
if (nXDiv<0)
{
@@ -2117,8 +2117,8 @@ void SdrDragRotate::MoveSdrDrag(const Point& rPnt_)
if (!DragStat().CheckMinMoved(aPnt))
return;
- long nNewAngle=NormAngle36000(GetAngle(aPnt-DragStat().GetRef1())-nAngle0);
- long nSA=0;
+ tools::Long nNewAngle=NormAngle36000(GetAngle(aPnt-DragStat().GetRef1())-nAngle0);
+ tools::Long nSA=0;
if (getSdrDragView().IsAngleSnapEnabled())
nSA=getSdrDragView().GetSnapAngle();
@@ -2280,7 +2280,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
return;
bResize=!getSdrDragView().IsOrtho();
- long nSA=0;
+ tools::Long nSA=0;
if (getSdrDragView().IsAngleSnapEnabled())
nSA=getSdrDragView().GetSnapAngle();
@@ -2304,7 +2304,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
Point aRef(DragStat().GetRef1());
Point aDif(aPnt-aRef);
- long nNewAngle=0;
+ tools::Long nNewAngle=0;
if (bSlant)
{
@@ -2359,7 +2359,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
if (bSlant)
{ // calculate resize for slant
// when angle snapping is activated, disable 89 degree limit
- long nTmpAngle=nNewAngle;
+ tools::Long nTmpAngle=nNewAngle;
if (bUpSideDown) nNewAngle-=18000;
if (bNeg) nTmpAngle=-nTmpAngle;
bResize=true;
@@ -2480,7 +2480,7 @@ SdrDragMirror::SdrDragMirror(SdrDragView& rNewView)
bool SdrDragMirror::ImpCheckSide(const Point& rPnt) const
{
- long nAngle1=GetAngle(rPnt-DragStat().GetRef1());
+ tools::Long nAngle1=GetAngle(rPnt-DragStat().GetRef1());
nAngle1-=nAngle;
nAngle1=NormAngle36000(nAngle1);
@@ -3118,8 +3118,8 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
bAtCenter=true;
Fraction aNewFract(1,1);
- long dx1=aPnt.X()-aNewCenter.X();
- long dy1=aPnt.Y()-aNewCenter.Y();
+ tools::Long dx1=aPnt.X()-aNewCenter.X();
+ tools::Long dy1=aPnt.Y()-aNewCenter.Y();
bValid=bVertical ? dx1!=0 : dy1!=0;
if (bValid)
@@ -3130,25 +3130,25 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
bValid = std::abs(dy1)*100>std::abs(dx1);
}
- long nNewRad=0;
+ tools::Long nNewRad=0;
nAngle=0;
if (bValid)
{
double a=0; // slope of the radius
- long nPntWink=0;
+ tools::Long nPntWink=0;
if (bVertical)
{
a=static_cast<double>(dy1)/static_cast<double>(dx1); // slope of the radius
- nNewRad=(static_cast<long>(dy1*a)+dx1) /2;
+ nNewRad=(static_cast<tools::Long>(dy1*a)+dx1) /2;
aNewCenter.AdjustX(nNewRad );
nPntWink=GetAngle(aPnt-aNewCenter);
}
else
{
a=static_cast<double>(dx1)/static_cast<double>(dy1); // slope of the radius
- nNewRad=(static_cast<long>(dx1*a)+dy1) /2;
+ nNewRad=(static_cast<tools::Long>(dx1*a)+dy1) /2;
aNewCenter.AdjustY(nNewRad );
nPntWink=GetAngle(aPnt-aNewCenter)-9000;
}
@@ -3182,7 +3182,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
if (bResize)
{
- long nMul=static_cast<long>(nUmfang*NormAngle36000(nPntWink)/36000);
+ tools::Long nMul=static_cast<tools::Long>(nUmfang*NormAngle36000(nPntWink)/36000);
if (bAtCenter)
nMul*=2;
@@ -3192,7 +3192,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
}
else
{
- nAngle=static_cast<long>((nMarkSize*360/nUmfang)*100)/2;
+ nAngle=static_cast<tools::Long>((nMarkSize*360/nUmfang)*100)/2;
if (nAngle==0)
bValid=false;
@@ -3207,12 +3207,12 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
if (!bValid && bResize)
{
- long nMul=bVertical ? dy1 : dx1;
+ tools::Long nMul=bVertical ? dy1 : dx1;
if (bLft || bUpr)
nMul=-nMul;
- long nDiv=nMarkSize;
+ tools::Long nDiv=nMarkSize;
if (bAtCenter)
{
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 86a3cdd35725..0beba3a215aa 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -82,14 +82,14 @@ void SdrEditView::SetMarkedObjRect(const tools::Rectangle& rRect)
tools::Rectangle aR0(GetMarkedObjRect());
DBG_ASSERT(!aR0.IsEmpty(),"SetMarkedObjRect(): GetMarkedObjRect() is empty.");
if (aR0.IsEmpty()) return;
- long x0=aR0.Left();
- long y0=aR0.Top();
- long w0=aR0.Right()-x0;
- long h0=aR0.Bottom()-y0;
- long x1=rRect.Left();
- long y1=rRect.Top();
- long w1=rRect.Right()-x1;
- long h1=rRect.Bottom()-y1;
+ tools::Long x0=aR0.Left();
+ tools::Long y0=aR0.Top();
+ tools::Long w0=aR0.Right()-x0;
+ tools::Long h0=aR0.Bottom()-y0;
+ tools::Long x1=rRect.Left();
+ tools::Long y1=rRect.Top();
+ tools::Long w1=rRect.Right()-x1;
+ tools::Long h1=rRect.Bottom()-y1;
const bool bUndo = IsUndoEnabled();
if( bUndo )
@@ -131,10 +131,10 @@ void SdrEditView::SetMarkedObjRect(const tools::Rectangle& rRect)
} else {
t=0; b=h1;
}
- aR1.SetLeft(long(l) );
- aR1.SetRight(long(r) );
- aR1.SetTop(long(t) );
- aR1.SetBottom(long(b) );
+ aR1.SetLeft(tools::Long(l) );
+ aR1.SetRight(tools::Long(r) );
+ aR1.SetTop(tools::Long(t) );
+ aR1.SetBottom(tools::Long(b) );
aR1.Move(x1,y1);
}
pO->SetSnapRect(aR1);
@@ -280,9 +280,9 @@ void SdrEditView::ResizeMultMarkedObj(const Point& rRef,
EndUndo();
}
-long SdrEditView::GetMarkedObjRotate() const
+tools::Long SdrEditView::GetMarkedObjRotate() const
{
- long nRetval(0);
+ tools::Long nRetval(0);
if(GetMarkedObjectCount())
{
@@ -295,7 +295,7 @@ long SdrEditView::GetMarkedObjRotate() const
return nRetval;
}
-void SdrEditView::RotateMarkedObj(const Point& rRef, long nAngle, bool bCopy)
+void SdrEditView::RotateMarkedObj(const Point& rRef, tools::Long nAngle, bool bCopy)
{
const bool bUndo = IsUndoEnabled();
if( bUndo )
@@ -431,16 +431,16 @@ void SdrEditView::MirrorMarkedObjVertical()
MirrorMarkedObj(aCenter,aPt2);
}
-long SdrEditView::GetMarkedObjShear() const
+tools::Long SdrEditView::GetMarkedObjShear() const
{
bool b1st=true;
bool bOk=true;
- long nAngle=0;
+ tools::Long nAngle=0;
const size_t nMarkCount=GetMarkedObjectCount();
for (size_t nm=0; nm<nMarkCount && bOk; ++nm) {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrObject* pO=pM->GetMarkedSdrObj();
- long nAngle2=pO->GetShearAngle();
+ tools::Long nAngle2=pO->GetShearAngle();
if (b1st) nAngle=nAngle2;
else if (nAngle2!=nAngle) bOk=false;
b1st=false;
@@ -451,7 +451,7 @@ long SdrEditView::GetMarkedObjShear() const
return nAngle;
}
-void SdrEditView::ShearMarkedObj(const Point& rRef, long nAngle, bool bVShear, bool bCopy)
+void SdrEditView::ShearMarkedObj(const Point& rRef, tools::Long nAngle, bool bVShear, bool bCopy)
{
const bool bUndo = IsUndoEnabled();
@@ -688,25 +688,25 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr)
tools::Rectangle aAllSnapRect(GetMarkedObjRect());
const SfxPoolItem *pPoolItem=nullptr;
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrTransformRef1XItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrTransformRef1XItem*>(pPoolItem)->GetValue();
SetRef1(Point(n,GetRef1().Y()));
}
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1Y,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrTransformRef1YItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrTransformRef1YItem*>(pPoolItem)->GetValue();
SetRef1(Point(GetRef1().X(),n));
}
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2X,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrTransformRef2XItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrTransformRef2XItem*>(pPoolItem)->GetValue();
SetRef2(Point(n,GetRef2().Y()));
}
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2Y,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrTransformRef2YItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrTransformRef2YItem*>(pPoolItem)->GetValue();
SetRef2(Point(GetRef2().X(),n));
}
- long nAllPosX=0; bool bAllPosX=false;
- long nAllPosY=0; bool bAllPosY=false;
- long nAllWdt=0; bool bAllWdt=false;
- long nAllHgt=0; bool bAllHgt=false;
+ tools::Long nAllPosX=0; bool bAllPosX=false;
+ tools::Long nAllPosY=0; bool bAllPosY=false;
+ tools::Long nAllWdt=0; bool bAllWdt=false;
+ tools::Long nAllHgt=0; bool bAllHgt=false;
bool bDoIt=false;
if (rAttr.GetItemState(SDRATTR_ALLPOSITIONX,true,&pPoolItem)==SfxItemState::SET) {
nAllPosX=static_cast<const SdrAllPositionXItem*>(pPoolItem)->GetValue();
@@ -741,15 +741,15 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr)
ResizeMarkedObj(aAllSnapRect.TopLeft(),Fraction(1,1),aYFact);
}
if (rAttr.GetItemState(SDRATTR_ROTATEALL,true,&pPoolItem)==SfxItemState::SET) {
- long nAngle=static_cast<const SdrRotateAllItem*>(pPoolItem)->GetValue();
+ tools::Long nAngle=static_cast<const SdrRotateAllItem*>(pPoolItem)->GetValue();
RotateMarkedObj(aAllSnapRect.Center(),nAngle);
}
if (rAttr.GetItemState(SDRATTR_HORZSHEARALL,true,&pPoolItem)==SfxItemState::SET) {
- long nAngle=static_cast<const SdrHorzShearAllItem*>(pPoolItem)->GetValue();
+ tools::Long nAngle=static_cast<const SdrHorzShearAllItem*>(pPoolItem)->GetValue();
ShearMarkedObj(aAllSnapRect.Center(),nAngle);
}
if (rAttr.GetItemState(SDRATTR_VERTSHEARALL,true,&pPoolItem)==SfxItemState::SET) {
- long nAngle=static_cast<const SdrVertShearAllItem*>(pPoolItem)->GetValue();
+ tools::Long nAngle=static_cast<const SdrVertShearAllItem*>(pPoolItem)->GetValue();
ShearMarkedObj(aAllSnapRect.Center(),nAngle,true);
}
@@ -772,10 +772,10 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr) const
{
// TODO: Take into account the origin and PvPos.
tools::Rectangle aAllSnapRect(GetMarkedObjRect()); // TODO: change this for PolyPt's and GluePt's!!!
- long nAllSnapPosX=aAllSnapRect.Left();
- long nAllSnapPosY=aAllSnapRect.Top();
- long nAllSnapWdt=aAllSnapRect.GetWidth()-1;
- long nAllSnapHgt=aAllSnapRect.GetHeight()-1;
+ tools::Long nAllSnapPosX=aAllSnapRect.Left();
+ tools::Long nAllSnapPosY=aAllSnapRect.Top();
+ tools::Long nAllSnapWdt=aAllSnapRect.GetWidth()-1;
+ tools::Long nAllSnapHgt=aAllSnapRect.GetHeight()-1;
// TODO: could go into CheckPossibilities
bool bMovProtect = false, bMovProtectDC = false;
bool bSizProtect = false, bSizProtectDC = false;
@@ -783,14 +783,14 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr) const
bool bVisible = true, bVisibleDC = false;
SdrLayerID nLayerId(0);
bool bLayerDC=false;
- long nSnapPosX=0; bool bSnapPosXDC=false;
- long nSnapPosY=0; bool bSnapPosYDC=false;
- long nSnapWdt=0; bool bSnapWdtDC=false;
- long nSnapHgt=0; bool bSnapHgtDC=false;
- long nLogicWdt=0; bool bLogicWdtDC=false,bLogicWdtDiff=false;
- long nLogicHgt=0; bool bLogicHgtDC=false,bLogicHgtDiff=false;
- long nRotAngle=0; bool bRotAngleDC=false;
- long nShrAngle=0; bool bShrAngleDC=false;
+ tools::Long nSnapPosX=0; bool bSnapPosXDC=false;
+ tools::Long nSnapPosY=0; bool bSnapPosYDC=false;
+ tools::Long nSnapWdt=0; bool bSnapWdtDC=false;
+ tools::Long nSnapHgt=0; bool bSnapHgtDC=false;
+ tools::Long nLogicWdt=0; bool bLogicWdtDC=false,bLogicWdtDiff=false;
+ tools::Long nLogicHgt=0; bool bLogicHgtDC=false,bLogicHgtDiff=false;
+ tools::Long nRotAngle=0; bool bRotAngleDC=false;
+ tools::Long nShrAngle=0; bool bShrAngleDC=false;
tools::Rectangle aSnapRect;
tools::Rectangle aLogicRect;
const size_t nMarkCount=GetMarkedObjectCount();
@@ -1360,8 +1360,8 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_POS_Y,aRect.Top()));
// size
- long nResizeRefX=aRect.Left();
- long nResizeRefY=aRect.Top();
+ tools::Long nResizeRefX=aRect.Left();
+ tools::Long nResizeRefY=aRect.Top();
if (meDragMode==SdrDragMode::Rotate) { // use rotation axis as a reference for resizing, too
nResizeRefX=maRef1.X();
nResizeRefY=maRef1.Y();
@@ -1379,8 +1379,8 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
}
// rotation
- long nRotateRefX=aRect.Center().X();
- long nRotateRefY=aRect.Center().Y();
+ tools::Long nRotateRefX=aRect.Center().X();
+ tools::Long nRotateRefY=aRect.Center().Y();
if (meDragMode==SdrDragMode::Rotate) {
nRotateRefX=aRotateAxe.X();
nRotateRefY=aRotateAxe.Y();
@@ -1390,8 +1390,8 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_ROT_Y,nRotateRefY));
// shearing
- long nShearRefX=aRect.Left();
- long nShearRefY=aRect.Bottom();
+ tools::Long nShearRefX=aRect.Left();
+ tools::Long nShearRefY=aRect.Bottom();
if (meDragMode==SdrDragMode::Rotate) { // use rotation axis as a reference for shearing, too
nShearRefX=aRotateAxe.X();
nShearRefY=aRotateAxe.Y();
@@ -1444,7 +1444,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
}
eState=aMarkAttr.GetItemState(SDRATTR_ECKENRADIUS);
- long nRadius=aMarkAttr.Get(SDRATTR_ECKENRADIUS).GetValue();
+ tools::Long nRadius=aMarkAttr.Get(SDRATTR_ECKENRADIUS).GetValue();
if (eState==SfxItemState::DONTCARE) {
aRetSet.InvalidateItem(SDRATTR_ECKENRADIUS);
} else if (eState==SfxItemState::SET) {
@@ -1523,24 +1523,24 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
GetSdrPageView()->LogicToPagePos(aRect);
}
- long nOldRotateAngle=GetMarkedObjRotate();
- long nOldShearAngle=GetMarkedObjShear();
+ tools::Long nOldRotateAngle=GetMarkedObjRotate();
+ tools::Long nOldShearAngle=GetMarkedObjShear();
const SdrMarkList& rMarkList=GetMarkedObjectList();
const size_t nMarkCount=rMarkList.GetMarkCount();
SdrObject* pObj=nullptr;
RectPoint eSizePoint=RectPoint::MM;
- long nPosDX=0;
- long nPosDY=0;
- long nSizX=0;
- long nSizY=0;
- long nRotateAngle=0;
+ tools::Long nPosDX=0;
+ tools::Long nPosDY=0;
+ tools::Long nSizX=0;
+ tools::Long nSizY=0;
+ tools::Long nRotateAngle=0;
bool bModeIsRotate(meDragMode == SdrDragMode::Rotate);
- long nRotateX(0);
- long nRotateY(0);
- long nOldRotateX(0);
- long nOldRotateY(0);
+ tools::Long nRotateX(0);
+ tools::Long nRotateY(0);
+ tools::Long nOldRotateX(0);
+ tools::Long nOldRotateY(0);
if(bModeIsRotate)
{
Point aRotateAxe(maRef1);
@@ -1554,9 +1554,9 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
nRotateY = nOldRotateY = aRotateAxe.Y();
}
- long nShearAngle=0;
- long nShearX=0;
- long nShearY=0;
+ tools::Long nShearAngle=0;
+ tools::Long nShearX=0;
+ tools::Long nShearY=0;
bool bShearVert=false;
bool bChgPos=false;
@@ -1620,7 +1620,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
// shearing
if (SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_SHEAR,true,&pPoolItem)) {
- long nNewShearAngle=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
+ tools::Long nNewShearAngle=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
if (nNewShearAngle>SDRMAXSHEAR) nNewShearAngle=SDRMAXSHEAR;
if (nNewShearAngle<-SDRMAXSHEAR) nNewShearAngle=-SDRMAXSHEAR;
if (nNewShearAngle!=nOldShearAngle) {
@@ -1662,7 +1662,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
// corner radius
if (m_bEdgeRadiusAllowed && SfxItemState::SET==rAttr.GetItemState(SDRATTR_ECKENRADIUS,true,&pPoolItem)) {
- long nRadius=static_cast<const SdrMetricItem*>(pPoolItem)->GetValue();
+ tools::Long nRadius=static_cast<const SdrMetricItem*>(pPoolItem)->GetValue();
aSetAttr.Put(makeSdrEckenradiusItem(nRadius));
bSetAttr=true;
}
@@ -1930,8 +1930,8 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
pObj->TakeObjInfo(aInfo);
if (aInfo.bMoveAllowed && !pObj->IsMoveProtect())
{
- long nXMov=0;
- long nYMov=0;
+ tools::Long nXMov=0;
+ tools::Long nYMov=0;
tools::Rectangle aObjRect(pObj->GetSnapRect());
switch (eVert)
{
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 82c519dcc037..55674f28e8dd 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -807,9 +807,9 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView const& rOutlView) co
{
// limit xPixRect because of driver problems when pixel coordinates are too far out
Size aMaxXY(pWin->GetOutputSizePixel());
- long a(2 * nPixSiz);
- long nMaxX(aMaxXY.Width() + a);
- long nMaxY(aMaxXY.Height() + a);
+ tools::Long a(2 * nPixSiz);
+ tools::Long nMaxX(aMaxXY.Width() + a);
+ tools::Long nMaxY(aMaxXY.Height() + a);
if (aPixRect.Left() < -a)
aPixRect.SetLeft(-a);
@@ -1718,7 +1718,7 @@ bool SdrObjEditView::IsTextEditHit(const Point& rHit) const
{ // check if any characters were actually hit
Point aPnt(rHit);
aPnt -= aEditArea.TopLeft();
- long nHitTol = 2000;
+ tools::Long nHitTol = 2000;
OutputDevice* pRef = pTextEditOutliner->GetRefDevice();
if (pRef)
nHitTol = OutputDevice::LogicToLogic(nHitTol, MapUnit::Map100thMM,
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index b9fdcacbe2ac..278b93c407a1 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -720,7 +720,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaRoundRectAction const & rAct)
*mpModel,
rAct.GetRect());
SetAttributes(pRect);
- long nRad=(rAct.GetHorzRound()+rAct.GetVertRound())/2;
+ tools::Long nRad=(rAct.GetHorzRound()+rAct.GetVertRound())/2;
if (nRad!=0) {
SfxItemSet aSet(*mpLineAttr->GetPool(), svl::Items<SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS>{});
aSet.Put(SdrMetricItem(SDRATTR_ECKENRADIUS, nRad));
@@ -742,8 +742,8 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaEllipseAction const & rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaArcAction const & rAct)
{
Point aCenter(rAct.GetRect().Center());
- long nStart=GetAngle(rAct.GetStartPoint()-aCenter);
- long nEnd=GetAngle(rAct.GetEndPoint()-aCenter);
+ tools::Long nStart=GetAngle(rAct.GetStartPoint()-aCenter);
+ tools::Long nEnd=GetAngle(rAct.GetEndPoint()-aCenter);
SdrCircObj* pCirc = new SdrCircObj(
*mpModel,
SdrCircKind::Arc,
@@ -755,8 +755,8 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaArcAction const & rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaPieAction const & rAct)
{
Point aCenter(rAct.GetRect().Center());
- long nStart=GetAngle(rAct.GetStartPoint()-aCenter);
- long nEnd=GetAngle(rAct.GetEndPoint()-aCenter);
+ tools::Long nStart=GetAngle(rAct.GetStartPoint()-aCenter);
+ tools::Long nEnd=GetAngle(rAct.GetEndPoint()-aCenter);
SdrCircObj* pCirc = new SdrCircObj(
*mpModel,
SdrCircKind::Section,
@@ -770,8 +770,8 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaPieAction const & rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaChordAction const & rAct)
{
Point aCenter(rAct.GetRect().Center());
- long nStart=GetAngle(rAct.GetStartPoint()-aCenter);
- long nEnd=GetAngle(rAct.GetEndPoint()-aCenter);
+ tools::Long nStart=GetAngle(rAct.GetStartPoint()-aCenter);
+ tools::Long nEnd=GetAngle(rAct.GetEndPoint()-aCenter);
SdrCircObj* pCirc = new SdrCircObj(
*mpModel,
SdrCircKind::Cut,
diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx
index 9d1f19c558cf..370563d8be87 100644
--- a/svx/source/svdraw/svdglev.cxx
+++ b/svx/source/svdraw/svdglev.cxx
@@ -383,7 +383,7 @@ static void ImpRotate(Point& rPt, const void* p1, const void* /*p2*/, const void
RotatePoint(rPt,*static_cast<const Point*>(p1),*static_cast<const double*>(p3),*static_cast<const double*>(p4));
}
-void SdrGlueEditView::RotateMarkedGluePoints(const Point& rRef, long nAngle, bool bCopy)
+void SdrGlueEditView::RotateMarkedGluePoints(const Point& rRef, tools::Long nAngle, bool bCopy)
{
ForceUndirtyMrkPnt();
OUString aStr(SvxResId(STR_EditRotate));
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx
index a662b99bfe0b..0d3db7f8d57d 100644
--- a/svx/source/svdraw/svdglue.cxx
+++ b/svx/source/svdraw/svdglue.cxx
@@ -63,10 +63,10 @@ Point SdrGluePoint::GetAbsolutePos(const SdrObject& rObj) const
default: break;
}
if (!bNoPercent) {
- long nXMul=aSnap.Right()-aSnap.Left();
- long nYMul=aSnap.Bottom()-aSnap.Top();
- long nXDiv=10000;
- long nYDiv=10000;
+ tools::Long nXMul=aSnap.Right()-aSnap.Left();
+ tools::Long nYMul=aSnap.Bottom()-aSnap.Top();
+ tools::Long nXDiv=10000;
+ tools::Long nYDiv=10000;
if (nXMul!=nXDiv) {
aPt.setX( aPt.X() * nXMul );
aPt.setX( aPt.X() / nXDiv );
@@ -107,12 +107,12 @@ void SdrGluePoint::SetAbsolutePos(const Point& rNewPos, const SdrObject& rObj)
}
aPt-=aOfs;
if (!bNoPercent) {
- long nXMul=aSnap.Right()-aSnap.Left();
- long nYMul=aSnap.Bottom()-aSnap.Top();
+ tools::Long nXMul=aSnap.Right()-aSnap.Left();
+ tools::Long nYMul=aSnap.Bottom()-aSnap.Top();
if (nXMul==0) nXMul=1;
if (nYMul==0) nYMul=1;
- long nXDiv=10000;
- long nYDiv=10000;
+ tools::Long nXDiv=10000;
+ tools::Long nYDiv=10000;
if (nXMul!=nXDiv) {
aPt.setX( aPt.X() * nXDiv );
aPt.setX( aPt.X() / nXMul );
@@ -125,7 +125,7 @@ void SdrGluePoint::SetAbsolutePos(const Point& rNewPos, const SdrObject& rObj)
aPos=aPt;
}
-long SdrGluePoint::GetAlignAngle() const
+tools::Long SdrGluePoint::GetAlignAngle() const
{
if (nAlign == (SdrAlign::HORZ_CENTER|SdrAlign::VERT_CENTER))
return 0; // Invalid!
@@ -148,7 +148,7 @@ long SdrGluePoint::GetAlignAngle() const
return 0;
}
-void SdrGluePoint::SetAlignAngle(long nAngle)
+void SdrGluePoint::SetAlignAngle(tools::Long nAngle)
{
nAngle=NormAngle36000(nAngle);
if (nAngle>=33750 || nAngle<2250) nAlign=SdrAlign::HORZ_RIGHT |SdrAlign::VERT_CENTER;
@@ -161,7 +161,7 @@ void SdrGluePoint::SetAlignAngle(long nAngle)
else if (nAngle<33750) nAlign=SdrAlign::HORZ_RIGHT |SdrAlign::VERT_BOTTOM;
}
-long SdrGluePoint::EscDirToAngle(SdrEscapeDirection nEsc)
+tools::Long SdrGluePoint::EscDirToAngle(SdrEscapeDirection nEsc)
{
switch (nEsc) {
case SdrEscapeDirection::RIGHT : return 0;
@@ -173,7 +173,7 @@ long SdrGluePoint::EscDirToAngle(SdrEscapeDirection nEsc)
return 0;
}
-SdrEscapeDirection SdrGluePoint::EscAngleToDir(long nAngle)
+SdrEscapeDirection SdrGluePoint::EscAngleToDir(tools::Long nAngle)
{
nAngle=NormAngle36000(nAngle);
if (nAngle>=31500 || nAngle<4500)
@@ -186,7 +186,7 @@ SdrEscapeDirection SdrGluePoint::EscAngleToDir(long nAngle)
return SdrEscapeDirection::BOTTOM;
}
-void SdrGluePoint::Rotate(const Point& rRef, long nAngle, double sn, double cs, const SdrObject* pObj)
+void SdrGluePoint::Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs, const SdrObject* pObj)
{
Point aPt(pObj!=nullptr ? GetAbsolutePos(*pObj) : GetPos());
RotatePoint(aPt,rRef,sn,cs);
@@ -206,14 +206,14 @@ void SdrGluePoint::Rotate(const Point& rRef, long nAngle, double sn, double cs,
if (pObj!=nullptr) SetAbsolutePos(aPt,*pObj); else SetPos(aPt);
}
-void SdrGluePoint::Mirror(const Point& rRef1, const Point& rRef2, long nAngle, const SdrObject* pObj)
+void SdrGluePoint::Mirror(const Point& rRef1, const Point& rRef2, tools::Long nAngle, const SdrObject* pObj)
{
Point aPt(pObj!=nullptr ? GetAbsolutePos(*pObj) : GetPos());
MirrorPoint(aPt,rRef1,rRef2);
// mirror reference edge
if(nAlign != (SdrAlign::HORZ_CENTER|SdrAlign::VERT_CENTER))
{
- long nAW=GetAlignAngle();
+ tools::Long nAW=GetAlignAngle();
nAW+=2*(nAngle-nAW);
SetAlignAngle(nAW);
}
@@ -221,22 +221,22 @@ void SdrGluePoint::Mirror(const Point& rRef1, const Point& rRef2, long nAngle, c
SdrEscapeDirection nEscDir0=nEscDir;
SdrEscapeDirection nEscDir1=SdrEscapeDirection::SMART;
if (nEscDir0&SdrEscapeDirection::LEFT) {
- long nEW=EscDirToAngle(SdrEscapeDirection::LEFT);
+ tools::Long nEW=EscDirToAngle(SdrEscapeDirection::LEFT);
nEW+=2*(nAngle-nEW);
nEscDir1|=EscAngleToDir(nEW);
}
if (nEscDir0&SdrEscapeDirection::TOP) {
- long nEW=EscDirToAngle(SdrEscapeDirection::TOP);
+ tools::Long nEW=EscDirToAngle(SdrEscapeDirection::TOP);
nEW+=2*(nAngle-nEW);
nEscDir1|=EscAngleToDir(nEW);
}
if (nEscDir0&SdrEscapeDirection::RIGHT) {
- long nEW=EscDirToAngle(SdrEscapeDirection::RIGHT);
+ tools::Long nEW=EscDirToAngle(SdrEscapeDirection::RIGHT);
nEW+=2*(nAngle-nEW);
nEscDir1|=EscAngleToDir(nEW);
}
if (nEscDir0&SdrEscapeDirection::BOTTOM) {
- long nEW=EscDirToAngle(SdrEscapeDirection::BOTTOM);
+ tools::Long nEW=EscDirToAngle(SdrEscapeDirection::BOTTOM);
nEW+=2*(nAngle-nEW);
nEscDir1|=EscAngleToDir(nEW);
}
@@ -361,7 +361,7 @@ void SdrGluePointList::SetReallyAbsolute(bool bOn, const SdrObject& rObj)
xGP->SetReallyAbsolute(bOn,rObj);
}
-void SdrGluePointList::Rotate(const Point& rRef, long nAngle, double sn, double cs, const SdrObject* pObj)
+void SdrGluePointList::Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs, const SdrObject* pObj)
{
for (auto& xGP : aList)
xGP->Rotate(rRef,nAngle,sn,cs,pObj);
@@ -370,11 +370,11 @@ void SdrGluePointList::Rotate(const Point& rRef, long nAngle, double sn, double
void SdrGluePointList::Mirror(const Point& rRef1, const Point& rRef2, const SdrObject* pObj)
{
Point aPt(rRef2); aPt-=rRef1;
- long nAngle=GetAngle(aPt);
+ tools::Long nAngle=GetAngle(aPt);
Mirror(rRef1,rRef2,nAngle,pObj);
}
-void SdrGluePointList::Mirror(const Point& rRef1, const Point& rRef2, long nAngle, const SdrObject* pObj)
+void SdrGluePointList::Mirror(const Point& rRef1, const Point& rRef2, tools::Long nAngle, const SdrObject* pObj)
{
for (auto& xGP : aList)
xGP->Mirror(rRef1,rRef2,nAngle,pObj);
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 001fe3580b86..99aae2aeddd9 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -327,7 +327,7 @@ void SdrHdl::SetMoveOutside( bool bMoveOutside )
}
}
-void SdrHdl::SetRotationAngle(long n)
+void SdrHdl::SetRotationAngle(tools::Long n)
{
if(nRotationAngle != n)
{
@@ -966,7 +966,7 @@ PointerStyle SdrHdl::GetPointer() const
} else {
// When resizing rotated rectangles, rotate the mouse cursor slightly, too
if (bSize && nRotationAngle!=0) {
- long nHdlAngle=0;
+ tools::Long nHdlAngle=0;
switch (eKind) {
case SdrHdlKind::LowerRight: nHdlAngle=31500; break;
case SdrHdlKind::Lower: nHdlAngle=27000; break;
@@ -1706,7 +1706,7 @@ bool ImpEdgeHdl::IsHorzDrag() const
}
else if (eEdgeKind==SdrEdgeKind::ThreeLines)
{
- long nAngle=nObjHdlNum==2 ? rInfo.nAngle1 : rInfo.nAngle2;
+ tools::Long nAngle=nObjHdlNum==2 ? rInfo.nAngle1 : rInfo.nAngle2;
return nAngle==0 || nAngle==18000;
}
return false;
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 81b5dbaad0c4..e45aacaca197 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -949,7 +949,7 @@ void SdrModel::ImpSetUIUnit()
// may need to be changed in the future, too
if(1 != nMul || 1 != nDiv)
{
- const Fraction aTemp(static_cast< long >(nMul), static_cast< long >(nDiv));
+ const Fraction aTemp(static_cast< tools::Long >(nMul), static_cast< tools::Long >(nDiv));
nMul = aTemp.GetNumerator();
nDiv = aTemp.GetDenominator();
}
@@ -1080,7 +1080,7 @@ OUString SdrModel::GetUnitString(FieldUnit eUnit)
}
}
-OUString SdrModel::GetMetricString(long nVal, bool bNoUnitChars, sal_Int32 nNumDigits) const
+OUString SdrModel::GetMetricString(tools::Long nVal, bool bNoUnitChars, sal_Int32 nNumDigits) const
{
// #i22167#
// change to double precision usage to not lose decimal places
@@ -1202,7 +1202,7 @@ OUString SdrModel::GetMetricString(long nVal, bool bNoUnitChars, sal_Int32 nNumD
return aBuf.makeStringAndClear();
}
-OUString SdrModel::GetAngleString(long nAngle)
+OUString SdrModel::GetAngleString(tools::Long nAngle)
{
bool bNeg = nAngle < 0;
@@ -1587,7 +1587,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
// get the drawing pages
if (bInsPages) {
sal_uInt16 nSourcePos=nFirstPageNum;
- sal_uInt16 nMergeCount=sal_uInt16(std::abs(static_cast<long>(static_cast<long>(nFirstPageNum)-nLastPageNum))+1);
+ sal_uInt16 nMergeCount=sal_uInt16(std::abs(static_cast<tools::Long>(static_cast<tools::Long>(nFirstPageNum)-nLastPageNum))+1);
if (nDestPos>GetPageCount()) nDestPos=GetPageCount();
while (nMergeCount>0)
{
@@ -1695,10 +1695,10 @@ void SdrModel::setUnoModel( const css::uno::Reference< css::uno::XInterface >& x
void SdrModel::adaptSizeAndBorderForAllPages(
const Size& /*rNewSize*/,
- long /*nLeft*/,
- long /*nRight*/,
- long /*nUpper*/,
- long /*nLower*/)
+ tools::Long /*nLeft*/,
+ tools::Long /*nRight*/,
+ tools::Long /*nUpper*/,
+ tools::Long /*nLower*/)
{
// base implementation does currently nothing. It may be added if needed,
// but we are on SdrModel level here, thus probably have not enough information
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 82c5695fead4..5e528e5947db 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -738,7 +738,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const S
{
SdrMark* pM = GetSdrMarkByIndex(0);
SdrObject* pO = pM->GetMarkedSdrObj();
- long nRotAngle = pO->GetRotateAngle();
+ tools::Long nRotAngle = pO->GetRotateAngle();
// true if we are dealing with a RotGrfFlyFrame
// (SwVirtFlyDrawObj with a SwGrfNode)
bool bWriterGraphic = pO->HasLimitedRotation();
@@ -1497,11 +1497,11 @@ void SdrMarkView::ForceRefToMarked()
case SdrDragMode::Mirror:
{
// first calculate the length of the axis of reflection
- long nOutMin=0;
- long nOutMax=0;
- long nMinLen=0;
- long nObjDst=0;
- long nOutHgt=0;
+ tools::Long nOutMin=0;
+ tools::Long nOutMax=0;
+ tools::Long nMinLen=0;
+ tools::Long nObjDst=0;
+ tools::Long nOutHgt=0;
OutputDevice* pOut=GetFirstOutputDevice();
if (pOut!=nullptr) {
// minimum length: 50 pixels
@@ -1510,7 +1510,7 @@ void SdrMarkView::ForceRefToMarked()
nObjDst=pOut->PixelToLogic(Size(0,20)).Height();
// MinY/MaxY
// margin = minimum length = 10 pixels
- long nDst=pOut->PixelToLogic(Size(0,10)).Height();
+ tools::Long nDst=pOut->PixelToLogic(Size(0,10)).Height();
nOutMin=-pOut->GetMapMode().GetOrigin().Y();
nOutMax=pOut->GetOutputSize().Height()-1+nOutMin;
nOutMin+=nDst;
@@ -1524,18 +1524,18 @@ void SdrMarkView::ForceRefToMarked()
}
nOutHgt=nOutMax-nOutMin;
// otherwise minimum length = 1/4 OutHgt
- long nTemp=nOutHgt/4;
+ tools::Long nTemp=nOutHgt/4;
if (nTemp>nMinLen) nMinLen=nTemp;
}
tools::Rectangle aR(GetMarkedObjBoundRect());
Point aCenter(aR.Center());
- long nMarkHgt=aR.GetHeight()-1;
- long nHgt=nMarkHgt+nObjDst*2; // 20 pixels overlapping above and below
+ tools::Long nMarkHgt=aR.GetHeight()-1;
+ tools::Long nHgt=nMarkHgt+nObjDst*2; // 20 pixels overlapping above and below
if (nHgt<nMinLen) nHgt=nMinLen; // minimum length 50 pixels or 1/4 OutHgt, respectively
- long nY1=aCenter.Y()-(nHgt+1)/2;
- long nY2=nY1+nHgt;
+ tools::Long nY1=aCenter.Y()-(nHgt+1)/2;
+ tools::Long nY2=nY1+nHgt;
if (pOut!=nullptr && nMinLen>nOutHgt) nMinLen=nOutHgt; // TODO: maybe shorten this a little
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 8728c67a9b2c..4413d3d700fb 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1381,10 +1381,10 @@ void SdrObjCustomShape::AdaptTextMinSize()
if(GetTextBounds(aTextBound))
{
- const long nHDist(GetTextLeftDistance() + GetTextRightDistance());
- const long nVDist(GetTextUpperDistance() + GetTextLowerDistance());
- const long nTWdt(std::max(long(0), static_cast<long>(aTextBound.GetWidth() - 1 - nHDist)));
- const long nTHgt(std::max(long(0), static_cast<long>(aTextBound.GetHeight() - 1 - nVDist)));
+ const tools::Long nHDist(GetTextLeftDistance() + GetTextRightDistance());
+ const tools::Long nVDist(GetTextUpperDistance() + GetTextLowerDistance());
+ const tools::Long nTWdt(std::max(tools::Long(0), static_cast<tools::Long>(aTextBound.GetWidth() - 1 - nHDist)));
+ const tools::Long nTHgt(std::max(tools::Long(0), static_cast<tools::Long>(aTextBound.GetHeight() - 1 - nVDist)));
aSet.Put(makeSdrTextMinFrameWidthItem(nTWdt));
aSet.Put(makeSdrTextMinFrameHeightItem(nTHgt));
@@ -1528,7 +1528,7 @@ void SdrObjCustomShape::NbcResize( const Point& rRef, const Fraction& rxFact, co
InvalidateRenderGeometry();
}
-void SdrObjCustomShape::NbcRotate( const Point& rRef, long nAngle, double sn, double cs )
+void SdrObjCustomShape::NbcRotate( const Point& rRef, tools::Long nAngle, double sn, double cs )
{
bool bMirroredX = IsMirroredX();
bool bMirroredY = IsMirroredY();
@@ -1545,7 +1545,7 @@ void SdrObjCustomShape::NbcRotate( const Point& rRef, long nAngle, double sn, do
aGeo.nRotationAngle = 0; // resetting aGeo data
aGeo.RecalcSinCos();
- long nW = static_cast<long>( fObjectRotation * 100 ); // applying our object rotation
+ tools::Long nW = static_cast<tools::Long>( fObjectRotation * 100 ); // applying our object rotation
if ( bMirroredX )
nW = 36000 - nW;
if ( bMirroredY )
@@ -1578,8 +1578,8 @@ void SdrObjCustomShape::NbcMirror( const Point& rRef1, const Point& rRef2 )
// TTTT: Fix for old mirroring, can be removed again in aw080
// storing horizontal and vertical flipping without modifying the rotate angle
// decompose other flipping to rotation and MirrorX.
- long ndx = rRef2.X()-rRef1.X();
- long ndy = rRef2.Y()-rRef1.Y();
+ tools::Long ndx = rRef2.X()-rRef1.X();
+ tools::Long ndy = rRef2.Y()-rRef1.Y();
if(!ndx) // MirroredX
{
@@ -1601,7 +1601,7 @@ void SdrObjCustomShape::NbcMirror( const Point& rRef1, const Point& rRef2 )
SdrTextObj::NbcMirror( rRef1, rRef2 );
// update fObjectRotation
- long nTextObjRotation = aGeo.nRotationAngle;
+ tools::Long nTextObjRotation = aGeo.nRotationAngle;
double fAngle = nTextObjRotation;
fAngle /= 100.0;
@@ -1620,18 +1620,18 @@ void SdrObjCustomShape::NbcMirror( const Point& rRef1, const Point& rRef2 )
InvalidateRenderGeometry();
}
-void SdrObjCustomShape::Shear( const Point& rRef, long nAngle, double tn, bool bVShear )
+void SdrObjCustomShape::Shear( const Point& rRef, tools::Long nAngle, double tn, bool bVShear )
{
SdrTextObj::Shear( rRef, nAngle, tn, bVShear );
InvalidateRenderGeometry();
}
-void SdrObjCustomShape::NbcShear( const Point& rRef, long nAngle, double tn, bool bVShear )
+void SdrObjCustomShape::NbcShear( const Point& rRef, tools::Long nAngle, double tn, bool bVShear )
{
// TTTT: Fix for old mirroring, can be removed again in aw080
SdrTextObj::NbcShear(rRef,nAngle,tn,bVShear);
// updating fObjectRotation
- long nTextObjRotation = aGeo.nRotationAngle;
+ tools::Long nTextObjRotation = aGeo.nRotationAngle;
double fAngle = nTextObjRotation;
fAngle /= 100.0;
if (IsMirroredX())
@@ -1719,7 +1719,7 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded()
bool bMirroredX = IsMirroredX();
bool bMirroredY = IsMirroredY();
- long nShearAngle = aGeo.nShearAngle;
+ tools::Long nShearAngle = aGeo.nShearAngle;
double fTan = aGeo.nTan;
if ( aGeo.nRotationAngle || nShearAngle || bMirroredX || bMirroredY )
@@ -2229,8 +2229,8 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool
if ( bWdtGrow || bHgtGrow )
{
tools::Rectangle aR0(rR);
- long nHgt=0,nMinHgt=0,nMaxHgt=0;
- long nWdt=0,nMinWdt=0,nMaxWdt=0;
+ tools::Long nHgt=0,nMinHgt=0,nMaxHgt=0;
+ tools::Long nWdt=0,nMinWdt=0,nMaxWdt=0;
Size aSiz(rR.GetSize()); aSiz.AdjustWidth( -1 ); aSiz.AdjustHeight( -1 );
Size aMaxSiz(100000,100000);
Size aTmpSiz(getSdrModelFromSdrObject().GetMaxObjSize());
@@ -2252,8 +2252,8 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool
if (nMinHgt<=0) nMinHgt=1;
aSiz.setHeight(nMaxHgt );
}
- long nHDist=GetTextLeftDistance()+GetTextRightDistance();
- long nVDist=GetTextUpperDistance()+GetTextLowerDistance();
+ tools::Long nHDist=GetTextLeftDistance()+GetTextRightDistance();
+ tools::Long nVDist=GetTextUpperDistance()+GetTextLowerDistance();
aSiz.AdjustWidth( -nHDist );
aSiz.AdjustHeight( -nVDist );
if ( aSiz.Width() < 2 )
@@ -2319,8 +2319,8 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool
nHgt+=nVDist;
if ( nHgt < 1 )
nHgt = 1; // nVDist may also be negative
- long nWdtGrow = nWdt-(rR.Right()-rR.Left());
- long nHgtGrow = nHgt-(rR.Bottom()-rR.Top());
+ tools::Long nWdtGrow = nWdt-(rR.Right()-rR.Left());
+ tools::Long nHgtGrow = nHgt-(rR.Bottom()-rR.Top());
if ( nWdtGrow == 0 )
bWdtGrow = false;
if ( nHgtGrow == 0 )
@@ -2336,7 +2336,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool
rR.AdjustLeft( -nWdtGrow );
else
{
- long nWdtGrow2=nWdtGrow/2;
+ tools::Long nWdtGrow2=nWdtGrow/2;
rR.AdjustLeft( -nWdtGrow2 );
rR.SetRight(rR.Left()+nWdt );
}
@@ -2350,7 +2350,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool
rR.AdjustTop( -nHgtGrow );
else
{
- long nHgtGrow2=nHgtGrow/2;
+ tools::Long nHgtGrow2=nHgtGrow/2;
rR.AdjustTop( -nHgtGrow2 );
rR.SetBottom(rR.Top()+nHgt );
}
@@ -2495,10 +2495,10 @@ void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools
SdrTextHorzAdjust eHAdj(GetTextHorizontalAdjust());
SdrTextVertAdjust eVAdj(GetTextVerticalAdjust());
- long nMinWdt = GetMinTextFrameWidth();
- long nMinHgt = GetMinTextFrameHeight();
- long nMaxWdt = GetMaxTextFrameWidth();
- long nMaxHgt = GetMaxTextFrameHeight();
+ tools::Long nMinWdt = GetMinTextFrameWidth();
+ tools::Long nMinHgt = GetMinTextFrameHeight();
+ tools::Long nMaxWdt = GetMaxTextFrameWidth();
+ tools::Long nMaxHgt = GetMaxTextFrameHeight();
if (nMinWdt<1) nMinWdt=1;
if (nMinHgt<1) nMinHgt=1;
if ( nMaxWdt == 0 || nMaxWdt > aMaxSiz.Width() )
@@ -2529,14 +2529,14 @@ void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools
{
*pViewMin = aViewInit;
- long nXFree = aAnkSiz.Width() - aPaperMin.Width();
+ tools::Long nXFree = aAnkSiz.Width() - aPaperMin.Width();
if ( eHAdj == SDRTEXTHORZADJUST_LEFT )
pViewMin->AdjustRight( -nXFree );
else if ( eHAdj == SDRTEXTHORZADJUST_RIGHT )
pViewMin->AdjustLeft(nXFree );
else { pViewMin->AdjustLeft(nXFree / 2 ); pViewMin->SetRight( pViewMin->Left() + aPaperMin.Width() ); }
- long nYFree = aAnkSiz.Height() - aPaperMin.Height();
+ tools::Long nYFree = aAnkSiz.Height() - aPaperMin.Height();
if ( eVAdj == SDRTEXTVERTADJUST_TOP )
pViewMin->AdjustBottom( -nYFree );
else if ( eVAdj == SDRTEXTVERTADJUST_BOTTOM )
@@ -2605,8 +2605,8 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle&
sal_Int32 nMaxAutoPaperWidth = 1000000;
sal_Int32 nMaxAutoPaperHeight= 1000000;
- long nAnkWdt=aAnkRect.GetWidth();
- long nAnkHgt=aAnkRect.GetHeight();
+ tools::Long nAnkWdt=aAnkRect.GetWidth();
+ tools::Long nAnkHgt=aAnkRect.GetHeight();
if (GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue())
{
@@ -2700,7 +2700,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle&
if (eHAdj==SDRTEXTHORZADJUST_CENTER || eHAdj==SDRTEXTHORZADJUST_RIGHT)
{
- long nFreeWdt=aAnkRect.GetWidth()-aTextSiz.Width();
+ tools::Long nFreeWdt=aAnkRect.GetWidth()-aTextSiz.Width();
if (eHAdj==SDRTEXTHORZADJUST_CENTER)
aTextPos.AdjustX(nFreeWdt/2 );
if (eHAdj==SDRTEXTHORZADJUST_RIGHT)
@@ -2708,7 +2708,7 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle&
}
if (eVAdj==SDRTEXTVERTADJUST_CENTER || eVAdj==SDRTEXTVERTADJUST_BOTTOM)
{
- long nFreeHgt=aAnkRect.GetHeight()-aTextSiz.Height();
+ tools::Long nFreeHgt=aAnkRect.GetHeight()-aTextSiz.Height();
if (eVAdj==SDRTEXTVERTADJUST_CENTER)
aTextPos.AdjustY(nFreeHgt/2 );
if (eVAdj==SDRTEXTVERTADJUST_BOTTOM)
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 05cbd9ca3b88..90ae586775ef 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -894,10 +894,10 @@ void SdrObject::RecalcBoundRect()
if(!aRange.isEmpty())
{
aOutRect = tools::Rectangle(
- static_cast<long>(floor(aRange.getMinX())),
- static_cast<long>(floor(aRange.getMinY())),
- static_cast<long>(ceil(aRange.getMaxX())),
- static_cast<long>(ceil(aRange.getMaxY())));
+ static_cast<tools::Long>(floor(aRange.getMinX())),
+ static_cast<tools::Long>(floor(aRange.getMinY())),
+ static_cast<tools::Long>(ceil(aRange.getMaxX())),
+ static_cast<tools::Long>(ceil(aRange.getMaxY())));
return;
}
}
@@ -1059,7 +1059,7 @@ void SdrObject::ImpForcePlusData()
pPlusData.reset( new SdrObjPlusData );
}
-OUString SdrObject::GetMetrStr(long nVal) const
+OUString SdrObject::GetMetrStr(tools::Long nVal) const
{
return getSdrModelFromSdrObject().GetMetricString(nVal);
}
@@ -1215,12 +1215,12 @@ tools::Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const
if (bTop) aTmpRect.SetTop(aPos.Y() );
if (bBtm) aTmpRect.SetBottom(aPos.Y() );
if (bOrtho) { // Ortho
- long nWdt0=aRect.Right() -aRect.Left();
- long nHgt0=aRect.Bottom()-aRect.Top();
- long nXMul=aTmpRect.Right() -aTmpRect.Left();
- long nYMul=aTmpRect.Bottom()-aTmpRect.Top();
- long nXDiv=nWdt0;
- long nYDiv=nHgt0;
+ tools::Long nWdt0=aRect.Right() -aRect.Left();
+ tools::Long nHgt0=aRect.Bottom()-aRect.Top();
+ tools::Long nXMul=aTmpRect.Right() -aTmpRect.Left();
+ tools::Long nYMul=aTmpRect.Bottom()-aTmpRect.Top();
+ tools::Long nXDiv=nWdt0;
+ tools::Long nYDiv=nHgt0;
bool bXNeg=(nXMul<0)!=(nXDiv<0);
bool bYNeg=(nYMul<0)!=(nYDiv<0);
nXMul=std::abs(nXMul);
@@ -1236,26 +1236,26 @@ tools::Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const
if (bEcke) { // corner point handles
bool bUseX=(aXFact<aYFact) != bBigOrtho;
if (bUseX) {
- long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
+ tools::Long nNeed=tools::Long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
if (bYNeg) nNeed=-nNeed;
if (bTop) aTmpRect.SetTop(aTmpRect.Bottom()-nNeed );
if (bBtm) aTmpRect.SetBottom(aTmpRect.Top()+nNeed );
} else {
- long nNeed=long(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
+ tools::Long nNeed=tools::Long(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
if (bXNeg) nNeed=-nNeed;
if (bLft) aTmpRect.SetLeft(aTmpRect.Right()-nNeed );
if (bRgt) aTmpRect.SetRight(aTmpRect.Left()+nNeed );
}
} else { // apex handles
if ((bLft || bRgt) && nXDiv!=0) {
- long nHgt0b=aRect.Bottom()-aRect.Top();
- long nNeed=long(BigInt(nHgt0b)*BigInt(nXMul)/BigInt(nXDiv));
+ tools::Long nHgt0b=aRect.Bottom()-aRect.Top();
+ tools::Long nNeed=tools::Long(BigInt(nHgt0b)*BigInt(nXMul)/BigInt(nXDiv));
aTmpRect.AdjustTop( -((nNeed-nHgt0b)/2) );
aTmpRect.SetBottom(aTmpRect.Top()+nNeed );
}
if ((bTop || bBtm) && nYDiv!=0) {
- long nWdt0b=aRect.Right()-aRect.Left();
- long nNeed=long(BigInt(nWdt0b)*BigInt(nYMul)/BigInt(nYDiv));
+ tools::Long nWdt0b=aRect.Right()-aRect.Left();
+ tools::Long nNeed=tools::Long(BigInt(nWdt0b)*BigInt(nYMul)/BigInt(nYDiv));
aTmpRect.AdjustLeft( -((nNeed-nWdt0b)/2) );
aTmpRect.SetRight(aTmpRect.Left()+nNeed );
}
@@ -1398,7 +1398,7 @@ void SdrObject::NbcResize(const Point& rRef, const Fraction& xFact, const Fracti
SetRectsDirty();
}
-void SdrObject::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
+void SdrObject::NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
SetGlueReallyAbsolute(true);
aOutRect.Move(-rRef.X(),-rRef.Y());
@@ -1431,8 +1431,8 @@ void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2)
SetGlueReallyAbsolute(true);
aOutRect.Move(-rRef1.X(),-rRef1.Y());
tools::Rectangle R(aOutRect);
- long dx=rRef2.X()-rRef1.X();
- long dy=rRef2.Y()-rRef1.Y();
+ tools::Long dx=rRef2.X()-rRef1.X();
+ tools::Long dy=rRef2.Y()-rRef1.Y();
if (dx==0) { // vertical axis
aOutRect.SetLeft(-R.Right() );
aOutRect.SetRight(-R.Left() );
@@ -1457,7 +1457,7 @@ void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2)
SetGlueReallyAbsolute(false);
}
-void SdrObject::NbcShear(const Point& rRef, long /*nAngle*/, double tn, bool bVShear)
+void SdrObject::NbcShear(const Point& rRef, tools::Long /*nAngle*/, double tn, bool bVShear)
{
SetGlueReallyAbsolute(true);
NbcShearGluePoints(rRef,tn,bVShear);
@@ -1509,7 +1509,7 @@ void SdrObject::Crop(const basegfx::B2DPoint& rRef, double fxFact, double fyFact
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
}
-void SdrObject::Rotate(const Point& rRef, long nAngle, double sn, double cs)
+void SdrObject::Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
if (nAngle!=0) {
tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
@@ -1529,7 +1529,7 @@ void SdrObject::Mirror(const Point& rRef1, const Point& rRef2)
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
}
-void SdrObject::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
+void SdrObject::Shear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear)
{
if (nAngle!=0) {
tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
@@ -1638,12 +1638,12 @@ void SdrObject::SetLogicRect(const tools::Rectangle& rRect)
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
}
-long SdrObject::GetRotateAngle() const
+tools::Long SdrObject::GetRotateAngle() const
{
return 0;
}
-long SdrObject::GetShearAngle(bool /*bVertical*/) const
+tools::Long SdrObject::GetShearAngle(bool /*bVertical*/) const
{
return 0;
}
@@ -1956,27 +1956,27 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
tools::Rectangle aNewSnap(rSnap);
if (rAttr.GetItemState(SDRATTR_MOVEX,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrMoveXItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrMoveXItem*>(pPoolItem)->GetValue();
aNewSnap.Move(n,0);
}
if (rAttr.GetItemState(SDRATTR_MOVEY,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrMoveYItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrMoveYItem*>(pPoolItem)->GetValue();
aNewSnap.Move(0,n);
}
if (rAttr.GetItemState(SDRATTR_ONEPOSITIONX,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrOnePositionXItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrOnePositionXItem*>(pPoolItem)->GetValue();
aNewSnap.Move(n-aNewSnap.Left(),0);
}
if (rAttr.GetItemState(SDRATTR_ONEPOSITIONY,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrOnePositionYItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrOnePositionYItem*>(pPoolItem)->GetValue();
aNewSnap.Move(0,n-aNewSnap.Top());
}
if (rAttr.GetItemState(SDRATTR_ONESIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrOneSizeWidthItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrOneSizeWidthItem*>(pPoolItem)->GetValue();
aNewSnap.SetRight(aNewSnap.Left()+n );
}
if (rAttr.GetItemState(SDRATTR_ONESIZEHEIGHT,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrOneSizeHeightItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrOneSizeHeightItem*>(pPoolItem)->GetValue();
aNewSnap.SetBottom(aNewSnap.Top()+n );
}
if (aNewSnap!=rSnap) {
@@ -1988,7 +1988,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
}
if (rAttr.GetItemState(SDRATTR_SHEARANGLE,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrShearAngleItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrShearAngleItem*>(pPoolItem)->GetValue();
n-=GetShearAngle();
if (n!=0) {
double nTan = tan(n * F_PI18000);
@@ -1996,7 +1996,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
}
}
if (rAttr.GetItemState(SDRATTR_ROTATEANGLE,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrAngleItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrAngleItem*>(pPoolItem)->GetValue();
n-=GetRotateAngle();
if (n!=0) {
double nSin = sin(n * F_PI18000);
@@ -2005,18 +2005,18 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
}
}
if (rAttr.GetItemState(SDRATTR_ROTATEONE,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrRotateOneItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrRotateOneItem*>(pPoolItem)->GetValue();
double nSin = sin(n * F_PI18000);
double nCos = cos(n * F_PI18000);
NbcRotate(aRef1,n,nSin,nCos);
}
if (rAttr.GetItemState(SDRATTR_HORZSHEARONE,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrHorzShearOneItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrHorzShearOneItem*>(pPoolItem)->GetValue();
double nTan = tan(n * F_PI18000);
NbcShear(aRef1,n,nTan,false);
}
if (rAttr.GetItemState(SDRATTR_VERTSHEARONE,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrVertShearOneItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrVertShearOneItem*>(pPoolItem)->GetValue();
double nTan = tan(n * F_PI18000);
NbcShear(aRef1,n,nTan,true);
}
@@ -2071,11 +2071,11 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
}
tools::Rectangle aNewLogic(rLogic);
if (rAttr.GetItemState(SDRATTR_LOGICSIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrLogicSizeWidthItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrLogicSizeWidthItem*>(pPoolItem)->GetValue();
aNewLogic.SetRight(aNewLogic.Left()+n );
}
if (rAttr.GetItemState(SDRATTR_LOGICSIZEHEIGHT,true,&pPoolItem)==SfxItemState::SET) {
- long n=static_cast<const SdrLogicSizeHeightItem*>(pPoolItem)->GetValue();
+ tools::Long n=static_cast<const SdrLogicSizeHeightItem*>(pPoolItem)->GetValue();
aNewLogic.SetBottom(aNewLogic.Top()+n );
}
if (aNewLogic!=rLogic) {
@@ -2227,7 +2227,7 @@ void SdrObject::SetGlueReallyAbsolute(bool bOn)
}
}
-void SdrObject::NbcRotateGluePoints(const Point& rRef, long nAngle, double sn, double cs)
+void SdrObject::NbcRotateGluePoints(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
// First a const call to see whether there are any glue points.
// Force const call!
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index b6c3168f6cbb..29819052cdb4 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -63,10 +63,10 @@ class ImpCaptParams
{
public:
SdrCaptionType eType;
- long nGap;
- long nEscRel;
- long nEscAbs;
- long nLineLen;
+ tools::Long nGap;
+ tools::Long nEscRel;
+ tools::Long nEscAbs;
+ tools::Long nLineLen;
SdrCaptionEscDir eEscDir;
bool bFitLineLen;
bool bEscRel;
@@ -86,7 +86,7 @@ public:
void ImpCaptParams::CalcEscPos(const Point& rTailPt, const tools::Rectangle& rRect, Point& rPt, EscDir& rDir) const
{
Point aTl(rTailPt); // copy locally for performance reasons
- long nX,nY;
+ tools::Long nX,nY;
if (bEscRel) {
nX=rRect.Right()-rRect.Left();
nX=BigMulDiv(nX,nEscRel,10000);
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 3b46192aec35..ec8b177550f0 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -50,12 +50,12 @@
using namespace com::sun::star;
-static Point GetAnglePnt(const tools::Rectangle& rR, long nAngle)
+static Point GetAnglePnt(const tools::Rectangle& rR, tools::Long nAngle)
{
Point aCenter(rR.Center());
- long nWdt=rR.Right()-rR.Left();
- long nHgt=rR.Bottom()-rR.Top();
- long nMaxRad=(std::max(nWdt,nHgt)+1) /2;
+ tools::Long nWdt=rR.Right()-rR.Left();
+ tools::Long nHgt=rR.Bottom()-rR.Top();
+ tools::Long nMaxRad=(std::max(nWdt,nHgt)+1) /2;
double a;
a = nAngle * F_PI18000;
Point aRetval(FRound(cos(a)*nMaxRad),-FRound(sin(a)*nMaxRad));
@@ -142,11 +142,11 @@ SdrCircObj::SdrCircObj(
SdrModel& rSdrModel,
SdrCircKind eNewKind,
const tools::Rectangle& rRect,
- long nNewStartWink,
- long nNewEndWink)
+ tools::Long nNewStartWink,
+ tools::Long nNewEndWink)
: SdrRectObj(rSdrModel, rRect)
{
- long nAngleDif=nNewEndWink-nNewStartWink;
+ tools::Long nAngleDif=nNewEndWink-nNewStartWink;
nStartAngle=NormAngle36000(nNewStartWink);
nEndAngle=NormAngle36000(nNewEndWink);
if (nAngleDif==36000) nEndAngle+=nAngleDif; // full circle
@@ -230,7 +230,7 @@ bool SdrCircObj::PaintNeedsXPolyCirc() const
return bNeed;
}
-basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrCircKind eCircleKind, const tools::Rectangle& rRect1, long nStart, long nEnd) const
+basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrCircKind eCircleKind, const tools::Rectangle& rRect1, tools::Long nStart, tools::Long nEnd) const
{
const basegfx::B2DRange aRange = vcl::unotools::b2DRectangleFromRectangle(rRect1);
basegfx::B2DPolygon aCircPolygon;
@@ -398,10 +398,10 @@ struct ImpCircUser : public SdrDragStatUserData
tools::Rectangle aR;
Point aCenter;
Point aP1;
- long nHgt;
- long nWdt;
- long nStart;
- long nEnd;
+ tools::Long nHgt;
+ tools::Long nWdt;
+ tools::Long nStart;
+ tools::Long nEnd;
public:
ImpCircUser()
@@ -538,8 +538,8 @@ bool SdrCircObj::applySpecialDrag(SdrDragStat& rDrag)
aPt -= maRect.Center();
- long nWdt = maRect.Right() - maRect.Left();
- long nHgt = maRect.Bottom() - maRect.Top();
+ tools::Long nWdt = maRect.Right() - maRect.Left();
+ tools::Long nHgt = maRect.Bottom() - maRect.Top();
if(nWdt>=nHgt)
{
@@ -550,11 +550,11 @@ bool SdrCircObj::applySpecialDrag(SdrDragStat& rDrag)
aPt.setX(BigMulDiv(aPt.X(),nHgt,nWdt) );
}
- long nAngle=NormAngle36000(GetAngle(aPt));
+ tools::Long nAngle=NormAngle36000(GetAngle(aPt));
if (rDrag.GetView() && rDrag.GetView()->IsAngleSnapEnabled())
{
- long nSA=rDrag.GetView()->GetSnapAngle();
+ tools::Long nSA=rDrag.GetView()->GetSnapAngle();
if (nSA!=0)
{
@@ -661,7 +661,7 @@ void ImpCircUser::SetCreateParams(SdrDragStat const & rStat)
}
nStart=NormAngle36000(GetAngle(aP));
if (rStat.GetView()!=nullptr && rStat.GetView()->IsAngleSnapEnabled()) {
- long nSA=rStat.GetView()->GetSnapAngle();
+ tools::Long nSA=rStat.GetView()->GetSnapAngle();
if (nSA!=0) { // angle snapping
nStart+=nSA/2;
nStart/=nSA;
@@ -683,7 +683,7 @@ void ImpCircUser::SetCreateParams(SdrDragStat const & rStat)
}
nEnd=NormAngle36000(GetAngle(aP));
if (rStat.GetView()!=nullptr && rStat.GetView()->IsAngleSnapEnabled()) {
- long nSA=rStat.GetView()->GetSnapAngle();
+ tools::Long nSA=rStat.GetView()->GetSnapAngle();
if (nSA!=0) { // angle snapping
nEnd+=nSA/2;
nEnd/=nSA;
@@ -831,7 +831,7 @@ void SdrCircObj::NbcMove(const Size& aSiz)
void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact)
{
- long nAngle0=aGeo.nRotationAngle;
+ tools::Long nAngle0=aGeo.nRotationAngle;
bool bNoShearRota=(aGeo.nRotationAngle==0 && aGeo.nShearAngle==0);
SdrTextObj::NbcResize(rRef,xFact,yFact);
bNoShearRota|=(aGeo.nRotationAngle==0 && aGeo.nShearAngle==0);
@@ -843,12 +843,12 @@ void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
// That, however, is pretty bad (because of forced "hard" formatting).
// Alternatively, we could implement a bMirrored flag (maybe even
// a more general one, e. g. for mirrored text, ...).
- long nS0=nStartAngle;
- long nE0=nEndAngle;
+ tools::Long nS0=nStartAngle;
+ tools::Long nE0=nEndAngle;
if (bNoShearRota) {
// the RectObj already mirrors at VMirror because of a 180deg rotation
if (! (bXMirr && bYMirr)) {
- long nTmp=nS0;
+ tools::Long nTmp=nS0;
nS0=18000-nE0;
nE0=18000-nTmp;
}
@@ -857,12 +857,12 @@ void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
nS0+=nAngle0;
nE0+=nAngle0;
if (bXMirr) {
- long nTmp=nS0;
+ tools::Long nTmp=nS0;
nS0=18000-nE0;
nE0=18000-nTmp;
}
if (bYMirr) {
- long nTmp=nS0;
+ tools::Long nTmp=nS0;
nS0=-nE0;
nE0=-nTmp;
}
@@ -870,7 +870,7 @@ void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
nE0-=aGeo.nRotationAngle;
}
}
- long nAngleDif=nE0-nS0;
+ tools::Long nAngleDif=nE0-nS0;
nStartAngle=NormAngle36000(nS0);
nEndAngle =NormAngle36000(nE0);
if (nAngleDif==36000) nEndAngle+=nAngleDif; // full circle
@@ -880,7 +880,7 @@ void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
ImpSetCircInfoToAttr();
}
-void SdrCircObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear)
+void SdrCircObj::NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear)
{
SdrTextObj::NbcShear(rRef,nAngle,tn,bVShear);
SetXPolyDirty();
@@ -894,9 +894,9 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2)
Point aTmpPt2;
if (bFreeMirr) { // some preparations for using an arbitrary axis of reflection
Point aCenter(maRect.Center());
- long nWdt=maRect.GetWidth()-1;
- long nHgt=maRect.GetHeight()-1;
- long nMaxRad=(std::max(nWdt,nHgt)+1) /2;
+ tools::Long nWdt=maRect.GetWidth()-1;
+ tools::Long nHgt=maRect.GetHeight()-1;
+ tools::Long nMaxRad=(std::max(nWdt,nHgt)+1) /2;
double a;
// starting point
a = nStartAngle * F_PI18000;
@@ -939,7 +939,7 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2)
// because it's mirrored, the angles are swapped, too
nStartAngle=GetAngle(aTmpPt2);
nEndAngle =GetAngle(aTmpPt1);
- long nAngleDif=nEndAngle-nStartAngle;
+ tools::Long nAngleDif=nEndAngle-nStartAngle;
nStartAngle=NormAngle36000(nStartAngle);
nEndAngle =NormAngle36000(nEndAngle);
if (nAngleDif==36000) nEndAngle+=nAngleDif; // full circle
@@ -985,8 +985,8 @@ void SdrCircObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
if (meCircleKind!=SdrCircKind::Full) {
const Point aPntStart(GetAnglePnt(maRect,nStartAngle));
const Point aPntEnd(GetAnglePnt(maRect,nEndAngle));
- long a=nStartAngle;
- long e=nEndAngle;
+ tools::Long a=nStartAngle;
+ tools::Long e=nEndAngle;
rRect.SetLeft(maRect.Right() );
rRect.SetRight(maRect.Left() );
rRect.SetTop(maRect.Bottom() );
@@ -1020,7 +1020,7 @@ void SdrCircObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
if (aGeo.nShearAngle==0)
return;
- long nDst=FRound((rRect.Bottom()-rRect.Top())*aGeo.nTan);
+ tools::Long nDst=FRound((rRect.Bottom()-rRect.Top())*aGeo.nTan);
if (aGeo.nShearAngle>0) {
Point aRef(rRect.TopLeft());
rRect.AdjustLeft( -nDst );
@@ -1046,10 +1046,10 @@ void SdrCircObj::NbcSetSnapRect(const tools::Rectangle& rRect)
{
if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0 || meCircleKind!=SdrCircKind::Full) {
tools::Rectangle aSR0(GetSnapRect());
- long nWdt0=aSR0.Right()-aSR0.Left();
- long nHgt0=aSR0.Bottom()-aSR0.Top();
- long nWdt1=rRect.Right()-rRect.Left();
- long nHgt1=rRect.Bottom()-rRect.Top();
+ tools::Long nWdt0=aSR0.Right()-aSR0.Left();
+ tools::Long nHgt0=aSR0.Bottom()-aSR0.Top();
+ tools::Long nWdt1=rRect.Right()-rRect.Left();
+ tools::Long nHgt1=rRect.Bottom()-rRect.Top();
NbcResize(maSnapRect.TopLeft(),Fraction(nWdt1,nWdt0),Fraction(nHgt1,nHgt0));
NbcMove(Size(rRect.Left()-aSR0.Left(),rRect.Top()-aSR0.Top()));
} else {
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 757760a6fd88..0e16e33b41c2 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -119,14 +119,14 @@ bool SdrEdgeInfoRec::ImpIsHorzLine(SdrEdgeLineCode eLineCode, const XPolygon& rX
return bHorz;
}
-void SdrEdgeInfoRec::ImpSetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP, long nVal)
+void SdrEdgeInfoRec::ImpSetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP, tools::Long nVal)
{
Point& rPt=ImpGetLineOffsetPoint(eLineCode);
if (ImpIsHorzLine(eLineCode,rXP)) rPt.setY(nVal );
else rPt.setX(nVal );
}
-long SdrEdgeInfoRec::ImpGetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const
+tools::Long SdrEdgeInfoRec::ImpGetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const
{
const Point& rPt = const_cast<SdrEdgeInfoRec*>(this)->ImpGetLineOffsetPoint(eLineCode);
if (ImpIsHorzLine(eLineCode,rXP))
@@ -599,14 +599,14 @@ SdrEscapeDirection SdrEdgeObj::ImpCalcEscAngle(SdrObject const * pObj, const Poi
{
if (pObj==nullptr) return SdrEscapeDirection::ALL;
tools::Rectangle aR(pObj->GetSnapRect());
- long dxl=rPt.X()-aR.Left();
- long dyo=rPt.Y()-aR.Top();
- long dxr=aR.Right()-rPt.X();
- long dyu=aR.Bottom()-rPt.Y();
+ tools::Long dxl=rPt.X()-aR.Left();
+ tools::Long dyo=rPt.Y()-aR.Top();
+ tools::Long dxr=aR.Right()-rPt.X();
+ tools::Long dyu=aR.Bottom()-rPt.Y();
bool bxMitt=std::abs(dxl-dxr)<2;
bool byMitt=std::abs(dyo-dyu)<2;
- long dx=std::min(dxl,dxr);
- long dy=std::min(dyo,dyu);
+ tools::Long dx=std::min(dxl,dxr);
+ tools::Long dy=std::min(dyo,dyu);
bool bDiag=std::abs(dx-dy)<2;
if (bxMitt && byMitt) return SdrEscapeDirection::ALL; // in the center
if (bDiag) { // diagonally
@@ -633,7 +633,7 @@ SdrEscapeDirection SdrEdgeObj::ImpCalcEscAngle(SdrObject const * pObj, const Poi
}
}
-XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const tools::Rectangle& rRect, const Point& rMeeting)
+XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, tools::Long nEscAngle, const tools::Rectangle& rRect, const Point& rMeeting)
{
XPolygon aXP;
aXP.Insert(XPOLY_APPEND,rStPt,PolyFlags::Normal);
@@ -804,10 +804,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection&
nEsc2=aGP2.GetEscDir();
if (nEsc2==SdrEscapeDirection::SMART) nEsc2=ImpCalcEscAngle(rCon2.pObj,aPt2-rCon2.aObjOfs);
}
- for (long nA1=0; nA1<36000; nA1+=9000)
+ for (tools::Long nA1=0; nA1<36000; nA1+=9000)
{
SdrEscapeDirection nE1 = nA1==0 ? SdrEscapeDirection::RIGHT : nA1==9000 ? SdrEscapeDirection::TOP : nA1==18000 ? SdrEscapeDirection::LEFT : nA1==27000 ? SdrEscapeDirection::BOTTOM : SdrEscapeDirection::SMART;
- for (long nA2=0; nA2<36000; nA2+=9000)
+ for (tools::Long nA2=0; nA2<36000; nA2+=9000)
{
SdrEscapeDirection nE2 = nA2==0 ? SdrEscapeDirection::RIGHT : nA2==9000 ? SdrEscapeDirection::TOP : nA2==18000 ? SdrEscapeDirection::LEFT : nA2==27000 ? SdrEscapeDirection::BOTTOM : SdrEscapeDirection::SMART;
if ((nEsc1&nE1) && (nEsc2&nE2))
@@ -835,8 +835,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection&
return aBestXP;
}
-XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const tools::Rectangle& rBoundRect1, const tools::Rectangle& rBewareRect1,
- const Point& rPt2, long nAngle2, const tools::Rectangle& rBoundRect2, const tools::Rectangle& rBewareRect2,
+XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, tools::Long nAngle1, const tools::Rectangle& rBoundRect1, const tools::Rectangle& rBewareRect1,
+ const Point& rPt2, tools::Long nAngle2, const tools::Rectangle& rBoundRect2, const tools::Rectangle& rBewareRect2,
sal_uIntPtr* pnQuality, SdrEdgeInfoRec* pInfo) const
{
SdrEdgeKind eKind=GetObjectItem(SDRATTR_EDGEKIND).GetValue();
@@ -890,7 +890,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
if (bLks2) aXP[2].setX(aBewareRect2.Left() ); //-=500;
if (bUnt2) aXP[2].setY(aBewareRect2.Bottom() ); //+=500;
if (pnQuality!=nullptr) {
- long nQ=std::abs(aXP[1].X()-aXP[0].X())+std::abs(aXP[1].Y()-aXP[0].Y());
+ tools::Long nQ=std::abs(aXP[1].X()-aXP[0].X())+std::abs(aXP[1].Y()-aXP[0].Y());
nQ+=std::abs(aXP[2].X()-aXP[1].X())+std::abs(aXP[2].Y()-aXP[1].Y());
nQ+=std::abs(aXP[3].X()-aXP[2].X())+std::abs(aXP[3].Y()-aXP[2].Y());
*pnQuality=nQ;
@@ -917,8 +917,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
Point aC2(aBewareRect2.Center());
if (aBewareRect1.Left()<=aBewareRect2.Right() && aBewareRect1.Right()>=aBewareRect2.Left()) {
// overlapping on the x axis
- long n1=std::max(aBewareRect1.Left(),aBewareRect2.Left());
- long n2=std::min(aBewareRect1.Right(),aBewareRect2.Right());
+ tools::Long n1=std::max(aBewareRect1.Left(),aBewareRect2.Left());
+ tools::Long n2=std::min(aBewareRect1.Right(),aBewareRect2.Right());
aMeeting.setX((n1+n2+1)/2 );
} else {
// otherwise the center point of the empty space
@@ -930,8 +930,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
}
if (aBewareRect1.Top()<=aBewareRect2.Bottom() && aBewareRect1.Bottom()>=aBewareRect2.Top()) {
// overlapping on the x axis
- long n1=std::max(aBewareRect1.Top(),aBewareRect2.Top());
- long n2=std::min(aBewareRect1.Bottom(),aBewareRect2.Bottom());
+ tools::Long n1=std::max(aBewareRect1.Top(),aBewareRect2.Top());
+ tools::Long n2=std::min(aBewareRect1.Bottom(),aBewareRect2.Bottom());
aMeeting.setY((n1+n2+1)/2 );
} else {
// otherwise the center point of the empty space
@@ -945,10 +945,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
// 1. both go into the same direction
// 2. both go into opposite directions
// 3. one is vertical, the other is horizontal
- long nXMin=std::min(aBewareRect1.Left(),aBewareRect2.Left());
- long nXMax=std::max(aBewareRect1.Right(),aBewareRect2.Right());
- long nYMin=std::min(aBewareRect1.Top(),aBewareRect2.Top());
- long nYMax=std::max(aBewareRect1.Bottom(),aBewareRect2.Bottom());
+ tools::Long nXMin=std::min(aBewareRect1.Left(),aBewareRect2.Left());
+ tools::Long nXMax=std::max(aBewareRect1.Right(),aBewareRect2.Right());
+ tools::Long nYMin=std::min(aBewareRect1.Top(),aBewareRect2.Top());
+ tools::Long nYMax=std::max(aBewareRect1.Bottom(),aBewareRect2.Bottom());
bool bBewareOverlap=aBewareRect1.Right()>aBewareRect2.Left() && aBewareRect1.Left()<aBewareRect2.Right() &&
aBewareRect1.Bottom()>aBewareRect2.Top() && aBewareRect1.Top()<aBewareRect2.Bottom();
unsigned nMainCase=3;
@@ -1063,11 +1063,11 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
// We need a direct connection (3-line Z connection),
// because we have to violate the BewareRects.
// Use rule of three to scale down the BewareRects.
- long nWant1=aBewR1.Right()-aBndR1.Right(); // distance at Obj1
- long nWant2=aBndR2.Left()-aBewR2.Left(); // distance at Obj2
- long nSpace=aBndR2.Left()-aBndR1.Right(); // available space
- long nGet1=BigMulDiv(nWant1,nSpace,nWant1+nWant2);
- long nGet2=nSpace-nGet1;
+ tools::Long nWant1=aBewR1.Right()-aBndR1.Right(); // distance at Obj1
+ tools::Long nWant2=aBndR2.Left()-aBewR2.Left(); // distance at Obj2
+ tools::Long nSpace=aBndR2.Left()-aBndR1.Right(); // available space
+ tools::Long nGet1=BigMulDiv(nWant1,nSpace,nWant1+nWant2);
+ tools::Long nGet2=nSpace-nGet1;
if (bRts1) { // revert normalization
aBewareRect1.AdjustRight(nGet1-nWant1 );
aBewareRect2.AdjustLeft( -(nGet2-nWant2) );
@@ -1124,11 +1124,11 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
// We need a direct connection (3-line Z connection),
// because we have to violate the BewareRects.
// Use rule of three to scale down the BewareRects.
- long nWant1=aBewR1.Bottom()-aBndR1.Bottom(); // difference at Obj1
- long nWant2=aBndR2.Top()-aBewR2.Top(); // difference at Obj2
- long nSpace=aBndR2.Top()-aBndR1.Bottom(); // available space
- long nGet1=BigMulDiv(nWant1,nSpace,nWant1+nWant2);
- long nGet2=nSpace-nGet1;
+ tools::Long nWant1=aBewR1.Bottom()-aBndR1.Bottom(); // difference at Obj1
+ tools::Long nWant2=aBndR2.Top()-aBewR2.Top(); // difference at Obj2
+ tools::Long nSpace=aBndR2.Top()-aBndR1.Bottom(); // available space
+ tools::Long nGet1=BigMulDiv(nWant1,nSpace,nWant1+nWant2);
+ tools::Long nGet2=nSpace-nGet1;
if (bUnt1) { // revert normalization
aBewareRect1.AdjustBottom(nGet1-nWant1 );
aBewareRect2.AdjustTop( -(nGet2-nWant2) );
@@ -1359,10 +1359,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
if (nPointCount>=2) { // check exit angle again
Point aP1(aXP1[1]); aP1-=aXP1[0];
Point aP2(aXP1[nPointCount-2]); aP2-=aXP1[nPointCount-1];
- long nAng1=0; if (aP1.X()<0) nAng1=18000; if (aP1.Y()>0) nAng1=27000;
+ tools::Long nAng1=0; if (aP1.X()<0) nAng1=18000; if (aP1.Y()>0) nAng1=27000;
if (aP1.Y()<0) nAng1=9000;
if (aP1.X()!=0 && aP1.Y()!=0) nAng1=1; // slant?!
- long nAng2=0; if (aP2.X()<0) nAng2=18000; if (aP2.Y()>0) nAng2=27000;
+ tools::Long nAng2=0; if (aP2.X()<0) nAng2=18000; if (aP2.Y()>0) nAng2=27000;
if (aP2.Y()<0) nAng2=9000;
if (aP2.X()!=0 && aP2.Y()!=0) nAng2=1; // slant?!
if (nAng1!=nAngle1) nIntersections++;
@@ -1474,10 +1474,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
Point* pPt2=&aXP1[1];
Point* pPt3=&aXP1[nPointCount-2];
Point* pPt4=&aXP1[nPointCount-1];
- long dx1=pPt2->X()-pPt1->X();
- long dy1=pPt2->Y()-pPt1->Y();
- long dx2=pPt3->X()-pPt4->X();
- long dy2=pPt3->Y()-pPt4->Y();
+ tools::Long dx1=pPt2->X()-pPt1->X();
+ tools::Long dy1=pPt2->Y()-pPt1->Y();
+ tools::Long dx2=pPt3->X()-pPt4->X();
+ tools::Long dy2=pPt3->Y()-pPt4->Y();
if (cForm=='L') { // nPointCount==3
aXP1.SetFlags(1,PolyFlags::Control);
Point aPt3(*pPt2);
@@ -1502,10 +1502,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
if (nPointCount==5) {
// add a control point before and after center
Point aCenter(aXP1[2]);
- long dx1b=aCenter.X()-aXP1[1].X();
- long dy1b=aCenter.Y()-aXP1[1].Y();
- long dx2b=aCenter.X()-aXP1[3].X();
- long dy2b=aCenter.Y()-aXP1[3].Y();
+ tools::Long dx1b=aCenter.X()-aXP1[1].X();
+ tools::Long dy1b=aCenter.Y()-aXP1[1].Y();
+ tools::Long dx2b=aCenter.X()-aXP1[3].X();
+ tools::Long dy2b=aCenter.Y()-aXP1[3].Y();
aXP1.Insert(2,aCenter,PolyFlags::Control);
aXP1.SetFlags(3,PolyFlags::Symmetric);
aXP1.Insert(4,aCenter,PolyFlags::Control);
@@ -1521,8 +1521,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
Point aPt2b(aXP1[3]);
aXP1.Insert(2,aPt1b,PolyFlags::Control);
aXP1.Insert(5,aPt2b,PolyFlags::Control);
- long dx=aPt1b.X()-aPt2b.X();
- long dy=aPt1b.Y()-aPt2b.Y();
+ tools::Long dx=aPt1b.X()-aPt2b.X();
+ tools::Long dy=aPt1b.Y()-aPt2b.Y();
aXP1[3].AdjustX( -(dx/2) );
aXP1[3].AdjustY( -(dy/2) );
aXP1.SetFlags(3,PolyFlags::Symmetric);
@@ -2256,10 +2256,10 @@ void SdrEdgeObj::NbcSetSnapRect(const tools::Rectangle& rRect)
}
else
{
- long nMulX = rRect.Right() - rRect.Left();
- long nDivX = aOld.Right() - aOld.Left();
- long nMulY = rRect.Bottom() - rRect.Top();
- long nDivY = aOld.Bottom() - aOld.Top();
+ tools::Long nMulX = rRect.Right() - rRect.Left();
+ tools::Long nDivX = aOld.Right() - aOld.Left();
+ tools::Long nMulY = rRect.Bottom() - rRect.Top();
+ tools::Long nDivY = aOld.Bottom() - aOld.Top();
if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; }
Fraction aX(nMulX, nDivX);
@@ -2292,7 +2292,7 @@ void SdrEdgeObj::NbcResize(const Point& rRefPnt, const Fraction& aXFact, const F
}
// #i54102# added rotation support
-void SdrEdgeObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
+void SdrEdgeObj::NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
if(bEdgeTrackUserDefined)
{
@@ -2354,7 +2354,7 @@ void SdrEdgeObj::NbcMirror(const Point& rRef1, const Point& rRef2)
}
// #i54102# added shear support
-void SdrEdgeObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear)
+void SdrEdgeObj::NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear)
{
if(bEdgeTrackUserDefined)
{
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 9d719839334d..3bea3d14b642 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -431,12 +431,12 @@ Size SdrGrafObj::getOriginalSize() const
if (aGrafInfo.IsCropped())
{
- const long aCroppedTop(OutputDevice::LogicToLogic(aGrafInfo.GetTopCrop(), getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
- const long aCroppedBottom(OutputDevice::LogicToLogic(aGrafInfo.GetBottomCrop(), getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
- const long aCroppedLeft(OutputDevice::LogicToLogic(aGrafInfo.GetLeftCrop(), getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
- const long aCroppedRight(OutputDevice::LogicToLogic(aGrafInfo.GetRightCrop(), getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
- const long aCroppedWidth(aSize.getWidth() - aCroppedLeft + aCroppedRight);
- const long aCroppedHeight(aSize.getHeight() - aCroppedTop + aCroppedBottom);
+ const tools::Long aCroppedTop(OutputDevice::LogicToLogic(aGrafInfo.GetTopCrop(), getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
+ const tools::Long aCroppedBottom(OutputDevice::LogicToLogic(aGrafInfo.GetBottomCrop(), getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
+ const tools::Long aCroppedLeft(OutputDevice::LogicToLogic(aGrafInfo.GetLeftCrop(), getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
+ const tools::Long aCroppedRight(OutputDevice::LogicToLogic(aGrafInfo.GetRightCrop(), getSdrModelFromSdrObject().GetScaleUnit(), GetGrafPrefMapMode().GetMapUnit()));
+ const tools::Long aCroppedWidth(aSize.getWidth() - aCroppedLeft + aCroppedRight);
+ const tools::Long aCroppedHeight(aSize.getHeight() - aCroppedTop + aCroppedBottom);
aSize = Size ( aCroppedWidth, aCroppedHeight);
}
@@ -1078,13 +1078,13 @@ void SdrGrafObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrink
// Scale graphic to page size
if ( fGrfWH < fWinWH )
{
- aSize.setWidth( static_cast<long>(aMaxSize.Height() * fGrfWH) );
+ aSize.setWidth( static_cast<tools::Long>(aMaxSize.Height() * fGrfWH) );
aSize.setHeight( aMaxSize.Height() );
}
else if ( fGrfWH > 0.F )
{
aSize.setWidth( aMaxSize.Width() );
- aSize.setHeight( static_cast<long>(aMaxSize.Width() / fGrfWH) );
+ aSize.setHeight( static_cast<tools::Long>(aMaxSize.Width() / fGrfWH) );
}
aPos = rMaxRect.Center();
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 75b548231df3..7c32abb35cc0 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -301,9 +301,9 @@ bool SdrObjGroup::BegCreate(SdrDragStat& /*rStat*/)
}
-long SdrObjGroup::GetRotateAngle() const
+tools::Long SdrObjGroup::GetRotateAngle() const
{
- long nRetval(0);
+ tools::Long nRetval(0);
if(0 != GetObjCount())
{
@@ -316,9 +316,9 @@ long SdrObjGroup::GetRotateAngle() const
}
-long SdrObjGroup::GetShearAngle(bool /*bVertical*/) const
+tools::Long SdrObjGroup::GetShearAngle(bool /*bVertical*/) const
{
- long nRetval(0);
+ tools::Long nRetval(0);
if(0 != GetObjCount())
{
@@ -334,10 +334,10 @@ long SdrObjGroup::GetShearAngle(bool /*bVertical*/) const
void SdrObjGroup::NbcSetSnapRect(const tools::Rectangle& rRect)
{
tools::Rectangle aOld(GetSnapRect());
- long nMulX=rRect.Right()-rRect.Left();
- long nDivX=aOld.Right()-aOld.Left();
- long nMulY=rRect.Bottom()-rRect.Top();
- long nDivY=aOld.Bottom()-aOld.Top();
+ tools::Long nMulX=rRect.Right()-rRect.Left();
+ tools::Long nDivX=aOld.Right()-aOld.Left();
+ tools::Long nMulY=rRect.Bottom()-rRect.Top();
+ tools::Long nDivY=aOld.Bottom()-aOld.Top();
if (nDivX==0) { nMulX=1; nDivX=1; }
if (nDivY==0) { nMulY=1; nDivY=1; }
if (nMulX!=nDivX || nMulY!=nDivY) {
@@ -415,7 +415,7 @@ void SdrObjGroup::NbcResize(const Point& rRef, const Fraction& xFact, const Frac
}
-void SdrObjGroup::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
+void SdrObjGroup::NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
SetGlueReallyAbsolute(true);
RotatePoint(aRefPoint,rRef,sn,cs);
@@ -449,7 +449,7 @@ void SdrObjGroup::NbcMirror(const Point& rRef1, const Point& rRef2)
}
-void SdrObjGroup::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear)
+void SdrObjGroup::NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear)
{
SetGlueReallyAbsolute(true);
ShearPoint(aRefPoint,rRef,tn);
@@ -493,10 +493,10 @@ void SdrObjGroup::SetSnapRect(const tools::Rectangle& rRect)
}
else
{
- long nMulX=rRect.Right()-rRect.Left();
- long nDivX=aOld.Right()-aOld.Left();
- long nMulY=rRect.Bottom()-rRect.Top();
- long nDivY=aOld.Bottom()-aOld.Top();
+ tools::Long nMulX=rRect.Right()-rRect.Left();
+ tools::Long nDivX=aOld.Right()-aOld.Left();
+ tools::Long nMulY=rRect.Bottom()-rRect.Top();
+ tools::Long nDivY=aOld.Bottom()-aOld.Top();
if (nDivX==0) { nMulX=1; nDivX=1; }
if (nDivY==0) { nMulY=1; nDivY=1; }
if (nMulX!=nDivX || nMulY!=nDivY) {
@@ -612,7 +612,7 @@ void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fractio
}
-void SdrObjGroup::Rotate(const Point& rRef, long nAngle, double sn, double cs)
+void SdrObjGroup::Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
if (nAngle==0)
return;
@@ -675,7 +675,7 @@ void SdrObjGroup::Mirror(const Point& rRef1, const Point& rRef2)
}
-void SdrObjGroup::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
+void SdrObjGroup::Shear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear)
{
if (nAngle==0)
return;
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index 04547ef87c16..30f9e32ee482 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -254,16 +254,16 @@ struct ImpMeasureRec : public SdrDragStatUserData
Point aPt2;
css::drawing::MeasureTextHorzPos eWantTextHPos;
css::drawing::MeasureTextVertPos eWantTextVPos;
- long nLineDist;
- long nHelplineOverhang;
- long nHelplineDist;
- long nHelpline1Len;
- long nHelpline2Len;
+ tools::Long nLineDist;
+ tools::Long nHelplineOverhang;
+ tools::Long nHelplineDist;
+ tools::Long nHelpline1Len;
+ tools::Long nHelpline2Len;
bool bBelowRefEdge;
bool bTextRota90;
bool bTextUpsideDown;
bool bTextAutoAngle;
- long nTextAutoAngleView;
+ tools::Long nTextAutoAngleView;
};
namespace {
@@ -284,21 +284,21 @@ struct ImpMeasurePoly
ImpLineRec aHelpline1;
ImpLineRec aHelpline2;
Size aTextSize;
- long nLineLen;
- long nLineAngle;
- long nTextAngle;
- long nHlpAngle;
+ tools::Long nLineLen;
+ tools::Long nLineAngle;
+ tools::Long nTextAngle;
+ tools::Long nHlpAngle;
double nLineSin;
double nLineCos;
sal_uInt16 nMainlineCnt;
css::drawing::MeasureTextHorzPos eUsedTextHPos;
css::drawing::MeasureTextVertPos eUsedTextVPos;
- long nLineWdt2; // half the line width
- long nArrow1Len; // length of 1st arrowhead; for Center, use only half
- long nArrow2Len; // length of 2nd arrowhead; for Center, use only half
- long nArrow1Wdt; // width of 1st arrow
- long nArrow2Wdt; // width of 2nd arrow
- long nShortLineLen; // line length, if PfeileAussen (arrowheads on the outside)
+ tools::Long nLineWdt2; // half the line width
+ tools::Long nArrow1Len; // length of 1st arrowhead; for Center, use only half
+ tools::Long nArrow2Len; // length of 2nd arrowhead; for Center, use only half
+ tools::Long nArrow1Wdt; // width of 1st arrow
+ tools::Long nArrow2Wdt; // width of 2nd arrow
+ tools::Long nShortLineLen; // line length, if PfeileAussen (arrowheads on the outside)
bool bAutoUpsideDown; // UpsideDown via automation
bool bBreakedLine;
};
@@ -323,12 +323,12 @@ void SdrMeasureObj::ImpTakeAttr(ImpMeasureRec& rRec) const
rRec.nTextAutoAngleView=static_cast<const SdrMeasureTextAutoAngleViewItem&>(rSet.Get(SDRATTR_MEASURETEXTAUTOANGLEVIEW)).GetValue();
}
-static long impGetLineStartEndDistance(const basegfx::B2DPolyPolygon& rPolyPolygon, long nNewWidth, bool bCenter)
+static tools::Long impGetLineStartEndDistance(const basegfx::B2DPolyPolygon& rPolyPolygon, tools::Long nNewWidth, bool bCenter)
{
const basegfx::B2DRange aPolygonRange(rPolyPolygon.getB2DRange());
const double fOldWidth(std::max(aPolygonRange.getWidth(), 1.0));
const double fScale(static_cast<double>(nNewWidth) / fOldWidth);
- long nHeight(basegfx::fround(aPolygonRange.getHeight() * fScale));
+ tools::Long nHeight(basegfx::fround(aPolygonRange.getHeight() * fScale));
if(bCenter)
{
@@ -348,14 +348,14 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly&
rPol.nLineLen=GetLen(aDelt);
rPol.nLineWdt2=0;
- long nArrow1Len=0; bool bArrow1Center=false;
- long nArrow2Len=0; bool bArrow2Center=false;
- long nArrow1Wdt=0;
- long nArrow2Wdt=0;
+ tools::Long nArrow1Len=0; bool bArrow1Center=false;
+ tools::Long nArrow2Len=0; bool bArrow2Center=false;
+ tools::Long nArrow1Wdt=0;
+ tools::Long nArrow2Wdt=0;
rPol.nArrow1Wdt=0;
rPol.nArrow2Wdt=0;
- long nArrowNeed=0;
- long nShortLen=0;
+ tools::Long nArrowNeed=0;
+ tools::Long nShortLen=0;
bool bPfeileAussen = false;
const SfxItemSet& rSet = GetObjectItemSet();
@@ -399,12 +399,12 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly&
rPol.bBreakedLine=bBrkLine;
if (rPol.eUsedTextHPos==css::drawing::MeasureTextHorzPos_AUTO) { // if text is too wide, push it outside
bool bOutside = false;
- long nNeedSiz=!rRec.bTextRota90 ? rPol.aTextSize.Width() : rPol.aTextSize.Height();
+ tools::Long nNeedSiz=!rRec.bTextRota90 ? rPol.aTextSize.Width() : rPol.aTextSize.Height();
if (nNeedSiz>rPol.nLineLen) bOutside = true; // text doesn't fit in between
if (bBrkLine) {
if (nNeedSiz+nArrowNeed>rPol.nLineLen) bPfeileAussen = true; // text fits in between, if arrowheads are on the outside
} else {
- long nSmallNeed=nArrow1Len+nArrow2Len+(nArrow1Wdt+nArrow2Wdt)/2/4;
+ tools::Long nSmallNeed=nArrow1Len+nArrow2Len+(nArrow1Wdt+nArrow2Wdt)/2/4;
if (nNeedSiz+nSmallNeed>rPol.nLineLen) bPfeileAussen = true; // text fits in between, if arrowheads are on the outside
}
rPol.eUsedTextHPos=bOutside ? css::drawing::MeasureTextHorzPos_LEFTOUTSIDE : css::drawing::MeasureTextHorzPos_INSIDE;
@@ -428,7 +428,7 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly&
rPol.bAutoUpsideDown=false;
if (rRec.bTextAutoAngle) {
- long nTmpAngle=NormAngle36000(rPol.nTextAngle-rRec.nTextAutoAngleView);
+ tools::Long nTmpAngle=NormAngle36000(rPol.nTextAngle-rRec.nTextAutoAngleView);
if (nTmpAngle>=18000) {
rPol.nTextAngle+=18000;
rPol.bAutoUpsideDown=true;
@@ -447,18 +447,18 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly&
nHlpCos=-nHlpCos;
}
- long nLineDist=rRec.nLineDist;
- long nOverhang=rRec.nHelplineOverhang;
- long nHelplineDist=rRec.nHelplineDist;
+ tools::Long nLineDist=rRec.nLineDist;
+ tools::Long nOverhang=rRec.nHelplineOverhang;
+ tools::Long nHelplineDist=rRec.nHelplineDist;
- long dx= FRound(nLineDist*nHlpCos);
- long dy=-FRound(nLineDist*nHlpSin);
- long dxh1a= FRound((nHelplineDist-rRec.nHelpline1Len)*nHlpCos);
- long dyh1a=-FRound((nHelplineDist-rRec.nHelpline1Len)*nHlpSin);
- long dxh1b= FRound((nHelplineDist-rRec.nHelpline2Len)*nHlpCos);
- long dyh1b=-FRound((nHelplineDist-rRec.nHelpline2Len)*nHlpSin);
- long dxh2= FRound((nLineDist+nOverhang)*nHlpCos);
- long dyh2=-FRound((nLineDist+nOverhang)*nHlpSin);
+ tools::Long dx= FRound(nLineDist*nHlpCos);
+ tools::Long dy=-FRound(nLineDist*nHlpSin);
+ tools::Long dxh1a= FRound((nHelplineDist-rRec.nHelpline1Len)*nHlpCos);
+ tools::Long dyh1a=-FRound((nHelplineDist-rRec.nHelpline1Len)*nHlpSin);
+ tools::Long dxh1b= FRound((nHelplineDist-rRec.nHelpline2Len)*nHlpCos);
+ tools::Long dyh1b=-FRound((nHelplineDist-rRec.nHelpline2Len)*nHlpSin);
+ tools::Long dxh2= FRound((nLineDist+nOverhang)*nHlpCos);
+ tools::Long dyh2=-FRound((nLineDist+nOverhang)*nHlpSin);
// extension line 1
rPol.aHelpline1.aP1=Point(aP1.X()+dxh1a,aP1.Y()+dyh1a);
@@ -478,8 +478,8 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly&
rPol.aMainline3=rPol.aMainline1;
rPol.nMainlineCnt=1;
if (bBrkLine) {
- long nNeedSiz=!rRec.bTextRota90 ? rPol.aTextSize.Width() : rPol.aTextSize.Height();
- long nHalfLen=(rPol.nLineLen-nNeedSiz-nArrow1Wdt/4-nArrow2Wdt/4) /2;
+ tools::Long nNeedSiz=!rRec.bTextRota90 ? rPol.aTextSize.Width() : rPol.aTextSize.Height();
+ tools::Long nHalfLen=(rPol.nLineLen-nNeedSiz-nArrow1Wdt/4-nArrow2Wdt/4) /2;
rPol.nMainlineCnt=2;
rPol.aMainline1.aP2=aMainlinePt1;
rPol.aMainline1.aP2.AdjustX(nHalfLen );
@@ -489,9 +489,9 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly&
RotatePoint(rPol.aMainline2.aP1,rPol.aMainline2.aP2,nLineSin,nLineCos);
}
} else {
- long nLen1=nShortLen; // arrowhead's width as line length outside of the arrowhead
- long nLen2=nShortLen;
- long nTextWdt=rRec.bTextRota90 ? rPol.aTextSize.Height() : rPol.aTextSize.Width();
+ tools::Long nLen1=nShortLen; // arrowhead's width as line length outside of the arrowhead
+ tools::Long nLen2=nShortLen;
+ tools::Long nTextWdt=rRec.bTextRota90 ? rPol.aTextSize.Height() : rPol.aTextSize.Width();
if (!bBrkLine) {
if (rPol.eUsedTextHPos==css::drawing::MeasureTextHorzPos_LEFTOUTSIDE) nLen1=nArrow1Len+nTextWdt;
if (rPol.eUsedTextHPos==css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE) nLen2=nArrow2Len+nTextWdt;
@@ -616,10 +616,10 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
aTextSize2.AdjustHeight(GetTextUpperDistance()+GetTextLowerDistance() );
Point aPt1b(aMPol.aMainline1.aP1);
- long nLen=aMPol.nLineLen;
- long nLWdt=aMPol.nLineWdt2;
- long nArr1Len=aMPol.nArrow1Len;
- long nArr2Len=aMPol.nArrow2Len;
+ tools::Long nLen=aMPol.nLineLen;
+ tools::Long nLWdt=aMPol.nLineWdt2;
+ tools::Long nArr1Len=aMPol.nArrow1Len;
+ tools::Long nArr2Len=aMPol.nArrow2Len;
if (aMPol.bBreakedLine) {
// In the case of a dashed line and Outside, the text should be
// placed next to the line at the arrowhead instead of directly
@@ -878,7 +878,7 @@ OUString SdrMeasureObj::getSpecialDragComment(const SdrDragStat& /*rDrag*/) cons
void SdrMeasureObj::ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) const
{
- long nLineAngle=GetAngle(rRec.aPt2-rRec.aPt1);
+ tools::Long nLineAngle=GetAngle(rRec.aPt2-rRec.aPt1);
double a = nLineAngle * F_PI18000;
double nSin=sin(a);
double nCos=cos(a);
@@ -909,19 +909,19 @@ void SdrMeasureObj::ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) c
Point aMov(rMov);
Point aFix(bAnf ? rRec.aPt2 : rRec.aPt1);
if (bOrtho) {
- long ndx0=aMov.X()-aFix.X();
- long ndy0=aMov.Y()-aFix.Y();
+ tools::Long ndx0=aMov.X()-aFix.X();
+ tools::Long ndy0=aMov.Y()-aFix.Y();
bool bHLin=ndy0==0;
bool bVLin=ndx0==0;
if (!bHLin || !bVLin) { // else aPt1==aPt2
- long ndx=aPt.X()-aFix.X();
- long ndy=aPt.Y()-aFix.Y();
+ tools::Long ndx=aPt.X()-aFix.X();
+ tools::Long ndy=aPt.Y()-aFix.Y();
double nXFact=0; if (!bVLin) nXFact=static_cast<double>(ndx)/static_cast<double>(ndx0);
double nYFact=0; if (!bHLin) nYFact=static_cast<double>(ndy)/static_cast<double>(ndy0);
bool bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho);
bool bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho);
- if (bHor) ndy=long(ndy0*nXFact);
- if (bVer) ndx=long(ndx0*nYFact);
+ if (bHor) ndy=tools::Long(ndy0*nXFact);
+ if (bVer) ndx=tools::Long(ndx0*nYFact);
aPt=aFix;
aPt.AdjustX(ndx );
aPt.AdjustY(ndy );
@@ -930,7 +930,7 @@ void SdrMeasureObj::ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) c
rMov=aPt;
} break;
case 4: case 5: {
- long nVal0=rRec.nLineDist;
+ tools::Long nVal0=rRec.nLineDist;
RotatePoint(aPt,(nHdlNum==4 ? aPt1 : aPt2),nSin,-nCos);
rRec.nLineDist=aPt.Y()- (nHdlNum==4 ? aPt1.Y() : aPt2.Y());
if (bBelow) rRec.nLineDist=-rRec.nLineDist;
@@ -1016,16 +1016,16 @@ void SdrMeasureObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fr
SetTextDirty();
}
-void SdrMeasureObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
+void SdrMeasureObj::NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
SdrTextObj::NbcRotate(rRef,nAngle,sn,cs);
- long nLen0=GetLen(aPt2-aPt1);
+ tools::Long nLen0=GetLen(aPt2-aPt1);
RotatePoint(aPt1,rRef,sn,cs);
RotatePoint(aPt2,rRef,sn,cs);
- long nLen1=GetLen(aPt2-aPt1);
+ tools::Long nLen1=GetLen(aPt2-aPt1);
if (nLen1!=nLen0) { // rounding error!
- long dx=aPt2.X()-aPt1.X();
- long dy=aPt2.Y()-aPt1.Y();
+ tools::Long dx=aPt2.X()-aPt1.X();
+ tools::Long dy=aPt2.Y()-aPt1.Y();
dx=BigMulDiv(dx,nLen0,nLen1);
dy=BigMulDiv(dy,nLen0,nLen1);
if (rRef==aPt2) {
@@ -1047,7 +1047,7 @@ void SdrMeasureObj::NbcMirror(const Point& rRef1, const Point& rRef2)
SetRectsDirty();
}
-void SdrMeasureObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear)
+void SdrMeasureObj::NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear)
{
SdrTextObj::NbcShear(rRef,nAngle,tn,bVShear);
ShearPoint(aPt1,rRef,tn,bVShear);
@@ -1056,7 +1056,7 @@ void SdrMeasureObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVS
SetTextDirty();
}
-long SdrMeasureObj::GetRotateAngle() const
+tools::Long SdrMeasureObj::GetRotateAngle() const
{
return GetAngle(aPt2-aPt1);
}
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 54ad20798a45..19f04554a246 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -186,13 +186,13 @@ void SdrMediaObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrin
// scale graphic to page size
if ( fGrfWH < fWinWH )
{
- aSize.setWidth( static_cast<long>(aMaxSize.Height() * fGrfWH) );
+ aSize.setWidth( static_cast<tools::Long>(aMaxSize.Height() * fGrfWH) );
aSize.setHeight( aMaxSize.Height() );
}
else if ( fGrfWH > 0.F )
{
aSize.setWidth( aMaxSize.Width() );
- aSize.setHeight( static_cast<long>(aMaxSize.Width() / fGrfWH) );
+ aSize.setHeight( static_cast<tools::Long>(aMaxSize.Width() / fGrfWH) );
}
aPos = rMaxRect.Center();
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 13f905ac2301..83267133ac55 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -180,8 +180,8 @@ tools::Rectangle SdrLightEmbeddedClient_Impl::impl_getScaledRect_nothrow() const
{
tools::Rectangle aLogicRect( mpObj->GetLogicRect() );
// apply scaling to object area and convert to pixels
- aLogicRect.SetSize( Size( long( aLogicRect.GetWidth() * m_aScaleWidth),
- long( aLogicRect.GetHeight() * m_aScaleHeight) ) );
+ aLogicRect.SetSize( Size( tools::Long( aLogicRect.GetWidth() * m_aScaleWidth),
+ tools::Long( aLogicRect.GetHeight() * m_aScaleHeight) ) );
return aLogicRect;
}
@@ -259,8 +259,8 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj
aVisArea.SetSize( Size( aSz.Width, aSz.Height ) );
aVisArea = OutputDevice::LogicToLogic(aVisArea, MapMode(aObjMapUnit), MapMode(aContainerMapUnit));
- Size aScaledSize( static_cast< long >( m_aScaleWidth * Fraction( aVisArea.GetWidth() ) ),
- static_cast< long >( m_aScaleHeight * Fraction( aVisArea.GetHeight() ) ) );
+ Size aScaledSize( static_cast< tools::Long >( m_aScaleWidth * Fraction( aVisArea.GetWidth() ) ),
+ static_cast< tools::Long >( m_aScaleHeight * Fraction( aVisArea.GetHeight() ) ) );
tools::Rectangle aLogicRect( mpObj->GetLogicRect() );
// react to the change if the difference is bigger than one pixel
@@ -500,8 +500,8 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl
//SfxBooleanFlagGuard aGuard( m_bResizeNoScale, true );
// new size of the object area without scaling
- Size aNewObjSize( long( aNewLogicRect.GetWidth() / m_aScaleWidth ),
- long( aNewLogicRect.GetHeight() / m_aScaleHeight ) );
+ Size aNewObjSize( tools::Long( aNewLogicRect.GetWidth() / m_aScaleWidth ),
+ tools::Long( aNewLogicRect.GetHeight() / m_aScaleHeight ) );
// now remove scaling from new placement and keep this at the new object area
aNewLogicRect.SetSize( aNewObjSize );
@@ -1488,8 +1488,8 @@ void SdrOle2Obj::ImpSetVisAreaSize()
// objects' visual area. The scaling will not change, but it might exist already and must
// be used in calculations
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpImpl->mxObjRef->getMapUnit( GetAspect() ) );
- Size aVisSize( static_cast<long>( Fraction( maRect.GetWidth() ) / aScaleWidth ),
- static_cast<long>( Fraction( maRect.GetHeight() ) / aScaleHeight ) );
+ Size aVisSize( static_cast<tools::Long>( Fraction( maRect.GetWidth() ) / aScaleWidth ),
+ static_cast<tools::Long>( Fraction( maRect.GetHeight() ) / aScaleHeight ) );
aVisSize = OutputDevice::LogicToLogic(
aVisSize,
@@ -1508,8 +1508,8 @@ void SdrOle2Obj::ImpSetVisAreaSize()
{}
tools::Rectangle aAcceptedVisArea;
- aAcceptedVisArea.SetSize( Size( static_cast<long>( Fraction( long( aSz.Width ) ) * aScaleWidth ),
- static_cast<long>( Fraction( long( aSz.Height ) ) * aScaleHeight ) ) );
+ aAcceptedVisArea.SetSize( Size( static_cast<tools::Long>( Fraction( tools::Long( aSz.Width ) ) * aScaleWidth ),
+ static_cast<tools::Long>( Fraction( tools::Long( aSz.Height ) ) * aScaleHeight ) ) );
if (aVisSize != aAcceptedVisArea.GetSize())
{
// server changed VisArea to its liking and the VisArea is different than the suggested one
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index f197462c76ab..2ba5f7436781 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -238,9 +238,9 @@ struct ImpPathCreateUser : public SdrDragStatUserData
Point aRectP1;
Point aRectP2;
Point aRectP3;
- long nCircRadius;
- long nCircStAngle;
- long nCircRelAngle;
+ tools::Long nCircRadius;
+ tools::Long nCircStAngle;
+ tools::Long nCircRelAngle;
bool bBezier;
bool bBezHasCtrl0;
bool bCircle;
@@ -266,7 +266,7 @@ public:
void CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView const * pView);
XPolygon GetCirclePoly() const;
void CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView const * pView);
- static Point CalcLine(const Point& rCsr, long nDirX, long nDirY, SdrView const * pView);
+ static Point CalcLine(const Point& rCsr, tools::Long nDirX, tools::Long nDirY, SdrView const * pView);
XPolygon GetLinePoly() const;
void CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView const * pView);
XPolygon GetRectPoly() const;
@@ -308,17 +308,17 @@ XPolygon ImpPathCreateUser::GetBezierPoly() const
void ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView const * pView)
{
- long nTangAngle=GetAngle(rDir);
+ tools::Long nTangAngle=GetAngle(rDir);
aCircStart=rP1;
aCircEnd=rP2;
aCircCenter=rP1;
- long dx=rP2.X()-rP1.X();
- long dy=rP2.Y()-rP1.Y();
- long dAngle=GetAngle(Point(dx,dy))-nTangAngle;
+ tools::Long dx=rP2.X()-rP1.X();
+ tools::Long dy=rP2.Y()-rP1.Y();
+ tools::Long dAngle=GetAngle(Point(dx,dy))-nTangAngle;
dAngle=NormAngle36000(dAngle);
- long nTmpAngle=NormAngle36000(9000-dAngle);
+ tools::Long nTmpAngle=NormAngle36000(9000-dAngle);
bool bRet=nTmpAngle!=9000 && nTmpAngle!=27000;
- long nRad=0;
+ tools::Long nRad=0;
if (bRet) {
double cs = cos(nTmpAngle * F_PI18000);
double nR=static_cast<double>(GetLen(Point(dx,dy)))/cs/2;
@@ -337,7 +337,7 @@ void ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Poi
}
bAngleSnap=pView!=nullptr && pView->IsAngleSnapEnabled();
if (bAngleSnap) {
- long nSA=pView->GetSnapAngle();
+ tools::Long nSA=pView->GetSnapAngle();
if (nSA!=0) { // angle snapping
bool bNeg=nCircRelAngle<0;
if (bNeg) nCircRelAngle=-nCircRelAngle;
@@ -378,21 +378,21 @@ XPolygon ImpPathCreateUser::GetCirclePoly() const
}
}
-Point ImpPathCreateUser::CalcLine(const Point& aCsr, long nDirX, long nDirY, SdrView const * pView)
+Point ImpPathCreateUser::CalcLine(const Point& aCsr, tools::Long nDirX, tools::Long nDirY, SdrView const * pView)
{
- long x=aCsr.X();
- long y=aCsr.Y();
+ tools::Long x=aCsr.X();
+ tools::Long y=aCsr.Y();
bool bHLin=nDirY==0;
bool bVLin=nDirX==0;
if (bHLin) y=0;
else if (bVLin) x=0;
else {
- long x1=BigMulDiv(y,nDirX,nDirY);
- long y1=y;
- long x2=x;
- long y2=BigMulDiv(x,nDirY,nDirX);
- long l1=std::abs(x1)+std::abs(y1);
- long l2=std::abs(x2)+std::abs(y2);
+ tools::Long x1=BigMulDiv(y,nDirX,nDirY);
+ tools::Long y1=y;
+ tools::Long x2=x;
+ tools::Long y2=BigMulDiv(x,nDirY,nDirX);
+ tools::Long l1=std::abs(x1)+std::abs(y1);
+ tools::Long l2=std::abs(x2)+std::abs(y2);
if ((l1<=l2) != (pView!=nullptr && pView->IsBigOrtho())) {
x=x1; y=y1;
} else {
@@ -409,10 +409,10 @@ void ImpPathCreateUser::CalcLine(const Point& rP1, const Point& rP2, const Point
bLine90=false;
if (rP1==rP2 || (rDir.X()==0 && rDir.Y()==0)) { bLine=false; return; }
Point aTmpPt(rP2-rP1);
- long nDirX=rDir.X();
- long nDirY=rDir.Y();
- Point aP1(CalcLine(aTmpPt, nDirX, nDirY,pView)); aP1-=aTmpPt; long nQ1=std::abs(aP1.X())+std::abs(aP1.Y());
- Point aP2(CalcLine(aTmpPt, nDirY,-nDirX,pView)); aP2-=aTmpPt; long nQ2=std::abs(aP2.X())+std::abs(aP2.Y());
+ tools::Long nDirX=rDir.X();
+ tools::Long nDirY=rDir.Y();
+ Point aP1(CalcLine(aTmpPt, nDirX, nDirY,pView)); aP1-=aTmpPt; tools::Long nQ1=std::abs(aP1.X())+std::abs(aP1.Y());
+ Point aP2(CalcLine(aTmpPt, nDirY,-nDirX,pView)); aP2-=aTmpPt; tools::Long nQ2=std::abs(aP2.X())+std::abs(aP2.Y());
if (pView!=nullptr && pView->IsOrtho()) nQ1=0; // Ortho turns off at right angle
bLine90=nQ1>2*nQ2;
if (!bLine90) { // smooth transition
@@ -438,18 +438,18 @@ void ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point
aRectP3=rP2;
if (rP1==rP2 || (rDir.X()==0 && rDir.Y()==0)) { bRect=false; return; }
Point aTmpPt(rP2-rP1);
- long nDirX=rDir.X();
- long nDirY=rDir.Y();
- long x=aTmpPt.X();
- long y=aTmpPt.Y();
+ tools::Long nDirX=rDir.X();
+ tools::Long nDirY=rDir.Y();
+ tools::Long x=aTmpPt.X();
+ tools::Long y=aTmpPt.Y();
bool bHLin=nDirY==0;
bool bVLin=nDirX==0;
if (bHLin) y=0;
else if (bVLin) x=0;
else {
y=BigMulDiv(x,nDirY,nDirX);
- long nHypLen=aTmpPt.Y()-y;
- long nTangAngle=-GetAngle(rDir);
+ tools::Long nHypLen=aTmpPt.Y()-y;
+ tools::Long nTangAngle=-GetAngle(rDir);
// sin=g/h, g=h*sin
double a = nTangAngle * F_PI18000;
double sn=sin(a);
@@ -461,21 +461,21 @@ void ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point
aRectP2.AdjustX(x );
aRectP2.AdjustY(y );
if (pView!=nullptr && pView->IsOrtho()) {
- long dx1=aRectP2.X()-aRectP1.X(); long dx1a=std::abs(dx1);
- long dy1=aRectP2.Y()-aRectP1.Y(); long dy1a=std::abs(dy1);
- long dx2=aRectP3.X()-aRectP2.X(); long dx2a=std::abs(dx2);
- long dy2=aRectP3.Y()-aRectP2.Y(); long dy2a=std::abs(dy2);
+ tools::Long dx1=aRectP2.X()-aRectP1.X(); tools::Long dx1a=std::abs(dx1);
+ tools::Long dy1=aRectP2.Y()-aRectP1.Y(); tools::Long dy1a=std::abs(dy1);
+ tools::Long dx2=aRectP3.X()-aRectP2.X(); tools::Long dx2a=std::abs(dx2);
+ tools::Long dy2=aRectP3.Y()-aRectP2.Y(); tools::Long dy2a=std::abs(dy2);
bool b1MoreThan2=dx1a+dy1a>dx2a+dy2a;
if (b1MoreThan2 != pView->IsBigOrtho()) {
- long xtemp=dy2a-dx1a; if (dx1<0) xtemp=-xtemp;
- long ytemp=dx2a-dy1a; if (dy1<0) ytemp=-ytemp;
+ tools::Long xtemp=dy2a-dx1a; if (dx1<0) xtemp=-xtemp;
+ tools::Long ytemp=dx2a-dy1a; if (dy1<0) ytemp=-ytemp;
aRectP2.AdjustX(xtemp );
aRectP2.AdjustY(ytemp );
aRectP3.AdjustX(xtemp );
aRectP3.AdjustY(ytemp );
} else {
- long xtemp=dy1a-dx2a; if (dx2<0) xtemp=-xtemp;
- long ytemp=dx1a-dy2a; if (dy2<0) ytemp=-ytemp;
+ tools::Long xtemp=dy1a-dx2a; if (dx2<0) xtemp=-xtemp;
+ tools::Long ytemp=dx1a-dy2a; if (dy2<0) ytemp=-ytemp;
aRectP3.AdjustX(xtemp );
aRectP3.AdjustY(ytemp );
}
@@ -675,20 +675,20 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
}
if (nPnt1!=0xFFFF && !bPrevIsControl) {
Point aPnt1=mpSdrPathDragData->aXP[nPnt1];
- long ndx0=aPnt.X()-aPnt1.X();
- long ndy0=aPnt.Y()-aPnt1.Y();
+ tools::Long ndx0=aPnt.X()-aPnt1.X();
+ tools::Long ndy0=aPnt.Y()-aPnt1.Y();
bool bHLin=ndy0==0;
bool bVLin=ndx0==0;
if (!bHLin || !bVLin) {
- long ndx=aPos.X()-aPnt1.X();
- long ndy=aPos.Y()-aPnt1.Y();
+ tools::Long ndx=aPos.X()-aPnt1.X();
+ tools::Long ndy=aPos.Y()-aPnt1.Y();
bPnt1=true;
double nXFact=0; if (!bVLin) nXFact=static_cast<double>(ndx)/static_cast<double>(ndx0);
double nYFact=0; if (!bHLin) nYFact=static_cast<double>(ndy)/static_cast<double>(ndy0);
bool bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho);
bool bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho);
- if (bHor) ndy=long(ndy0*nXFact);
- if (bVer) ndx=long(ndx0*nYFact);
+ if (bHor) ndy=tools::Long(ndy0*nXFact);
+ if (bVer) ndx=tools::Long(ndx0*nYFact);
aNewPos1=aPnt1;
aNewPos1.AdjustX(ndx );
aNewPos1.AdjustY(ndy );
@@ -696,20 +696,20 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
}
if (nPnt2!=0xFFFF && !bNextIsControl) {
Point aPnt2=mpSdrPathDragData->aXP[nPnt2];
- long ndx0=aPnt.X()-aPnt2.X();
- long ndy0=aPnt.Y()-aPnt2.Y();
+ tools::Long ndx0=aPnt.X()-aPnt2.X();
+ tools::Long ndy0=aPnt.Y()-aPnt2.Y();
bool bHLin=ndy0==0;
bool bVLin=ndx0==0;
if (!bHLin || !bVLin) {
- long ndx=aPos.X()-aPnt2.X();
- long ndy=aPos.Y()-aPnt2.Y();
+ tools::Long ndx=aPos.X()-aPnt2.X();
+ tools::Long ndy=aPos.Y()-aPnt2.Y();
bPnt2=true;
double nXFact=0; if (!bVLin) nXFact=static_cast<double>(ndx)/static_cast<double>(ndx0);
double nYFact=0; if (!bHLin) nYFact=static_cast<double>(ndy)/static_cast<double>(ndy0);
bool bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho);
bool bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho);
- if (bHor) ndy=long(ndy0*nXFact);
- if (bVer) ndx=long(ndx0*nYFact);
+ if (bHor) ndy=tools::Long(ndy0*nXFact);
+ if (bVer) ndx=tools::Long(ndx0*nYFact);
aNewPos2=aPnt2;
aNewPos2.AdjustX(ndx );
aNewPos2.AdjustY(ndy );
@@ -736,11 +736,11 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
{
Point aPt(mpSdrPathDragData->aXP[nNextPnt]);
aPt-=rDrag.GetNow();
- long nAngle1=GetAngle(aPt);
+ tools::Long nAngle1=GetAngle(aPt);
aPt=rDrag.GetNow();
aPt-=mpSdrPathDragData->aXP[nPrevPnt];
- long nAngle2=GetAngle(aPt);
- long nDiff=nAngle1-nAngle2;
+ tools::Long nAngle2=GetAngle(aPt);
+ tools::Long nDiff=nAngle1-nAngle2;
nDiff=std::abs(nDiff);
mpSdrPathDragData->bEliminate=nDiff<=rDrag.GetView()->GetEliminatePolyPointLimitAngle();
if (mpSdrPathDragData->bEliminate) { // adapt position, Smooth is true for the ends
@@ -1305,15 +1305,15 @@ bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat)
if (pU->nBezierStartPoint>nCurrentPoint) pU->nBezierStartPoint=nCurrentPoint;
if (rStat.IsMouseDown() && nCurrentPoint>0) {
// don't allow two consecutive points to occupy too similar positions
- long nMinDist=1;
+ tools::Long nMinDist=1;
if (pView!=nullptr) nMinDist=pView->GetFreeHandMinDistPix();
if (pOut!=nullptr) nMinDist=pOut->PixelToLogic(Size(nMinDist,0)).Width();
if (nMinDist<1) nMinDist=1;
Point aPt0(rXPoly[nCurrentPoint-1]);
Point aPt1(rStat.GetNow());
- long dx=aPt0.X()-aPt1.X(); if (dx<0) dx=-dx;
- long dy=aPt0.Y()-aPt1.Y(); if (dy<0) dy=-dy;
+ tools::Long dx=aPt0.X()-aPt1.X(); if (dx<0) dx=-dx;
+ tools::Long dy=aPt0.Y()-aPt1.Y(); if (dy<0) dy=-dy;
if (dx<nMinDist && dy<nMinDist) return false;
// TODO: the following is copied from EndCreate (with a few smaller modifications)
@@ -2293,7 +2293,7 @@ void SdrPathObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
SdrTextObj::NbcResize(rRef,xFact,yFact);
}
-void SdrPathObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
+void SdrPathObj::NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
// Thank JOE, the angles are defined mirrored to the mathematical meanings
const basegfx::B2DHomMatrix aTrans(
@@ -2304,7 +2304,7 @@ void SdrPathObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
SdrTextObj::NbcRotate(rRef,nAngle,sn,cs);
}
-void SdrPathObj::NbcShear(const Point& rRefPnt, long nAngle, double fTan, bool bVShear)
+void SdrPathObj::NbcShear(const Point& rRefPnt, tools::Long nAngle, double fTan, bool bVShear)
{
basegfx::B2DHomMatrix aTrans(basegfx::utils::createTranslateB2DHomMatrix(-rRefPnt.X(), -rRefPnt.Y()));
@@ -2383,14 +2383,14 @@ void SdrPathObj::NbcSetSnapRect(const tools::Rectangle& rRect)
}
// Take empty into account when calculating scale factors
- long nMulX = rRect.IsWidthEmpty() ? 0 : rRect.Right() - rRect.Left();
+ tools::Long nMulX = rRect.IsWidthEmpty() ? 0 : rRect.Right() - rRect.Left();
- long nDivX = aOld.Right() - aOld.Left();
+ tools::Long nDivX = aOld.Right() - aOld.Left();
// Take empty into account when calculating scale factors
- long nMulY = rRect.IsHeightEmpty() ? 0 : rRect.Bottom() - rRect.Top();
+ tools::Long nMulY = rRect.IsHeightEmpty() ? 0 : rRect.Bottom() - rRect.Top();
- long nDivY = aOld.Bottom() - aOld.Top();
+ tools::Long nDivY = aOld.Bottom() - aOld.Top();
if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; }
if ( nDivX == nMulX ) { nMulX = 1; nDivX = 1; }
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index 9093a4670ff3..e2a78f35aaa1 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -96,7 +96,7 @@ void SdrRectObj::SetXPolyDirty()
mpXPoly.reset();
}
-XPolygon SdrRectObj::ImpCalcXPoly(const tools::Rectangle& rRect1, long nRad1) const
+XPolygon SdrRectObj::ImpCalcXPoly(const tools::Rectangle& rRect1, tools::Long nRad1) const
{
XPolygon aXPoly(rRect1,nRad1,nRad1);
const sal_uInt16 nPointCnt(aXPoly.GetPointCount());
@@ -173,7 +173,7 @@ void SdrRectObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
if (aGeo.nShearAngle==0)
return;
- long nDst=FRound((maRect.Bottom()-maRect.Top())*aGeo.nTan);
+ tools::Long nDst=FRound((maRect.Bottom()-maRect.Top())*aGeo.nTan);
if (aGeo.nShearAngle>0)
{
Point aRef(rRect.TopLeft());
@@ -272,7 +272,7 @@ basegfx::B2DPolyPolygon SdrRectObj::TakeXorPoly() const
void SdrRectObj::RecalcSnapRect()
{
- long nEckRad=GetEckenradius();
+ tools::Long nEckRad=GetEckenradius();
if ((aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0) && nEckRad!=0) {
maSnapRect=GetXPoly().GetBoundRect();
} else {
@@ -318,8 +318,8 @@ void SdrRectObj::AddToHdlList(SdrHdlList& rHdlList) const
{
case 1: // Handle for changing the corner radius
{
- long a = GetEckenradius();
- long b = std::max(maRect.GetWidth(),maRect.GetHeight())/2; // rounded up, because GetWidth() adds 1
+ tools::Long a = GetEckenradius();
+ tools::Long b = std::max(maRect.GetWidth(),maRect.GetHeight())/2; // rounded up, because GetWidth() adds 1
if (a>b) a=b;
if (a<0) a=0;
aPnt=maRect.TopLeft();
@@ -470,13 +470,13 @@ void SdrRectObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
SetXPolyDirty();
}
-void SdrRectObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
+void SdrRectObj::NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
SdrTextObj::NbcRotate(rRef,nAngle,sn,cs);
SetXPolyDirty();
}
-void SdrRectObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear)
+void SdrRectObj::NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear)
{
SdrTextObj::NbcShear(rRef,nAngle,tn,bVShear);
SetXPolyDirty();
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index dfba1f6cf464..8919c5d1c7dd 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -459,7 +459,7 @@ void SdrTextObj::handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage)
}
}
-void SdrTextObj::NbcSetEckenradius(long nRad)
+void SdrTextObj::NbcSetEckenradius(tools::Long nRad)
{
SetObjectItem(makeSdrEckenradiusItem(nRad));
}
@@ -491,8 +491,8 @@ void SdrTextObj::AdaptTextMinSize()
if(bW)
{
// Set minimum width.
- const long nDist = GetTextLeftDistance() + GetTextRightDistance();
- const long nW = std::max<long>(0, maRect.GetWidth() - 1 - nDist); // text width without margins
+ const tools::Long nDist = GetTextLeftDistance() + GetTextRightDistance();
+ const tools::Long nW = std::max<long>(0, maRect.GetWidth() - 1 - nDist); // text width without margins
aSet.Put(makeSdrTextMinFrameWidthItem(nW));
@@ -506,8 +506,8 @@ void SdrTextObj::AdaptTextMinSize()
if(bH)
{
// Set Minimum height.
- const long nDist = GetTextUpperDistance() + GetTextLowerDistance();
- const long nH = std::max<long>(0, maRect.GetHeight() - 1 - nDist); // text height without margins
+ const tools::Long nDist = GetTextUpperDistance() + GetTextLowerDistance();
+ const tools::Long nH = std::max<long>(0, maRect.GetHeight() - 1 - nDist); // text height without margins
aSet.Put(makeSdrTextMinFrameHeightItem(nH));
@@ -585,10 +585,10 @@ void SdrTextObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
void SdrTextObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const
{
- long nLeftDist=GetTextLeftDistance();
- long nRightDist=GetTextRightDistance();
- long nUpperDist=GetTextUpperDistance();
- long nLowerDist=GetTextLowerDistance();
+ tools::Long nLeftDist=GetTextLeftDistance();
+ tools::Long nRightDist=GetTextRightDistance();
+ tools::Long nUpperDist=GetTextUpperDistance();
+ tools::Long nLowerDist=GetTextLowerDistance();
tools::Rectangle aAnkRect(maRect); // the rectangle in which we anchor
bool bFrame=IsTextFrame();
if (!bFrame) {
@@ -643,12 +643,12 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRe
if (!bFitToSize && !bContourFrame)
{
- long nAnkWdt=aAnkRect.GetWidth();
- long nAnkHgt=aAnkRect.GetHeight();
+ tools::Long nAnkWdt=aAnkRect.GetWidth();
+ tools::Long nAnkHgt=aAnkRect.GetHeight();
if (bFrame)
{
- long nWdt=nAnkWdt;
- long nHgt=nAnkHgt;
+ tools::Long nWdt=nAnkWdt;
+ tools::Long nHgt=nAnkHgt;
bool bInEditMode = IsInEditMode();
@@ -762,7 +762,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRe
if (eHAdj==SDRTEXTHORZADJUST_CENTER || eHAdj==SDRTEXTHORZADJUST_RIGHT)
{
- long nFreeWdt=aAnkRect.GetWidth()-aTextSiz.Width();
+ tools::Long nFreeWdt=aAnkRect.GetWidth()-aTextSiz.Width();
if (eHAdj==SDRTEXTHORZADJUST_CENTER)
aTextPos.AdjustX(nFreeWdt/2 );
if (eHAdj==SDRTEXTHORZADJUST_RIGHT)
@@ -770,7 +770,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRe
}
if (eVAdj==SDRTEXTVERTADJUST_CENTER || eVAdj==SDRTEXTVERTADJUST_BOTTOM)
{
- long nFreeHgt=aAnkRect.GetHeight()-aTextSiz.Height();
+ tools::Long nFreeHgt=aAnkRect.GetHeight()-aTextSiz.Height();
if (eVAdj==SDRTEXTVERTADJUST_CENTER)
aTextPos.AdjustY(nFreeHgt/2 );
if (eVAdj==SDRTEXTVERTADJUST_BOTTOM)
@@ -852,21 +852,21 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS
}
unsigned nLoopCount=0;
bool bNoMoreLoop = false;
- long nXDiff0=0x7FFFFFFF;
- long nWantWdt=rShapeSize.Width();
- long nIsWdt=rTextSize.Width();
+ tools::Long nXDiff0=0x7FFFFFFF;
+ tools::Long nWantWdt=rShapeSize.Width();
+ tools::Long nIsWdt=rTextSize.Width();
if (nIsWdt==0) nIsWdt=1;
- long nWantHgt=rShapeSize.Height();
- long nIsHgt=rTextSize.Height();
+ tools::Long nWantHgt=rShapeSize.Height();
+ tools::Long nIsHgt=rTextSize.Height();
if (nIsHgt==0) nIsHgt=1;
- long nXTolPl=nWantWdt/100; // tolerance: +1%
- long nXTolMi=nWantWdt/25; // tolerance: -4%
- long nXCorr =nWantWdt/20; // correction scale: 5%
+ tools::Long nXTolPl=nWantWdt/100; // tolerance: +1%
+ tools::Long nXTolMi=nWantWdt/25; // tolerance: -4%
+ tools::Long nXCorr =nWantWdt/20; // correction scale: 5%
- long nX=(nWantWdt*100) /nIsWdt; // calculate X stretching
- long nY=(nWantHgt*100) /nIsHgt; // calculate Y stretching
+ tools::Long nX=(nWantWdt*100) /nIsWdt; // calculate X stretching
+ tools::Long nY=(nWantHgt*100) /nIsHgt; // calculate Y stretching
bool bChkX = true;
if (bNoStretching) { // might only be possible proportionally
if (nX>nY) { nX=nY; bChkX=false; }
@@ -899,14 +899,14 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS
rOutliner.SetGlobalCharStretching(static_cast<sal_uInt16>(nX),static_cast<sal_uInt16>(nY));
nLoopCount++;
Size aSiz(rOutliner.CalcTextSize());
- long nXDiff=aSiz.Width()-nWantWdt;
+ tools::Long nXDiff=aSiz.Width()-nWantWdt;
rFitXCorrection=Fraction(nWantWdt,aSiz.Width());
if (((nXDiff>=nXTolMi || !bChkX) && nXDiff<=nXTolPl) || nXDiff==nXDiff0) {
bNoMoreLoop = true;
} else {
// correct stretching factors
- long nMul=nWantWdt;
- long nDiv=aSiz.Width();
+ tools::Long nMul=nWantWdt;
+ tools::Long nDiv=aSiz.Width();
if (std::abs(nXDiff)<=2*nXCorr) {
if (nMul>nDiv) nDiv+=(nMul-nDiv)/2; // but only add half of what we calculated,
else nMul+=(nDiv-nMul)/2; // because the EditEngine calculates wrongly later on
@@ -1704,27 +1704,27 @@ bool SdrTextObj::IsReallyEdited() const
// moved inlines here form hxx
-long SdrTextObj::GetEckenradius() const
+tools::Long SdrTextObj::GetEckenradius() const
{
return GetObjectItemSet().Get(SDRATTR_ECKENRADIUS).GetValue();
}
-long SdrTextObj::GetMinTextFrameHeight() const
+tools::Long SdrTextObj::GetMinTextFrameHeight() const
{
return GetObjectItemSet().Get(SDRATTR_TEXT_MINFRAMEHEIGHT).GetValue();
}
-long SdrTextObj::GetMaxTextFrameHeight() const
+tools::Long SdrTextObj::GetMaxTextFrameHeight() const
{
return GetObjectItemSet().Get(SDRATTR_TEXT_MAXFRAMEHEIGHT).GetValue();
}
-long SdrTextObj::GetMinTextFrameWidth() const
+tools::Long SdrTextObj::GetMinTextFrameWidth() const
{
return GetObjectItemSet().Get(SDRATTR_TEXT_MINFRAMEWIDTH).GetValue();
}
-long SdrTextObj::GetMaxTextFrameWidth() const
+tools::Long SdrTextObj::GetMaxTextFrameWidth() const
{
return GetObjectItemSet().Get(SDRATTR_TEXT_MAXFRAMEWIDTH).GetValue();
}
@@ -1747,22 +1747,22 @@ bool SdrTextObj::IsContourTextFrame() const
&& GetObjectItemSet().Get(SDRATTR_TEXT_CONTOURFRAME).GetValue();
}
-long SdrTextObj::GetTextLeftDistance() const
+tools::Long SdrTextObj::GetTextLeftDistance() const
{
return GetObjectItemSet().Get(SDRATTR_TEXT_LEFTDIST).GetValue();
}
-long SdrTextObj::GetTextRightDistance() const
+tools::Long SdrTextObj::GetTextRightDistance() const
{
return GetObjectItemSet().Get(SDRATTR_TEXT_RIGHTDIST).GetValue();
}
-long SdrTextObj::GetTextUpperDistance() const
+tools::Long SdrTextObj::GetTextUpperDistance() const
{
return GetObjectItemSet().Get(SDRATTR_TEXT_UPPERDIST).GetValue();
}
-long SdrTextObj::GetTextLowerDistance() const
+tools::Long SdrTextObj::GetTextLowerDistance() const
{
return GetObjectItemSet().Get(SDRATTR_TEXT_LOWERDIST).GetValue();
}
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 4d7b5ee8434c..7c4548a2ef8d 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -67,8 +67,8 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
bool bVScroll = bScroll && (eAniDir == SdrTextAniDirection::Up || eAniDir == SdrTextAniDirection::Down);
tools::Rectangle aOldRect = rR;
- long nHgt = 0, nMinHgt = 0, nMaxHgt = 0;
- long nWdt = 0, nMinWdt = 0, nMaxWdt = 0;
+ tools::Long nHgt = 0, nMinHgt = 0, nMaxHgt = 0;
+ tools::Long nWdt = 0, nMinWdt = 0, nMaxWdt = 0;
Size aNewSize = rR.GetSize();
aNewSize.AdjustWidth( -1 ); aNewSize.AdjustHeight( -1 );
@@ -105,8 +105,8 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
aNewSize.setHeight( nMaxHgt );
}
- long nHDist = GetTextLeftDistance() + GetTextRightDistance();
- long nVDist = GetTextUpperDistance() + GetTextLowerDistance();
+ tools::Long nHDist = GetTextLeftDistance() + GetTextRightDistance();
+ tools::Long nVDist = GetTextUpperDistance() + GetTextLowerDistance();
aNewSize.AdjustWidth( -nHDist );
aNewSize.AdjustHeight( -nVDist );
@@ -179,8 +179,8 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
nHgt += nVDist;
if (nHgt < 1)
nHgt = 1; // nVDist may be negative
- long nWdtGrow = nWdt - (rR.Right() - rR.Left());
- long nHgtGrow = nHgt - (rR.Bottom() - rR.Top());
+ tools::Long nWdtGrow = nWdt - (rR.Right() - rR.Left());
+ tools::Long nHgtGrow = nHgt - (rR.Bottom() - rR.Top());
if (nWdtGrow == 0)
bWdtGrow = false;
@@ -200,7 +200,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
rR.AdjustLeft( -nWdtGrow );
else
{
- long nWdtGrow2 = nWdtGrow / 2;
+ tools::Long nWdtGrow2 = nWdtGrow / 2;
rR.AdjustLeft( -nWdtGrow2 );
rR.SetRight( rR.Left() + nWdt );
}
@@ -216,7 +216,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
rR.AdjustTop( -nHgtGrow );
else
{
- long nHgtGrow2 = nHgtGrow / 2;
+ tools::Long nHgtGrow2 = nHgtGrow / 2;
rR.AdjustTop( -nHgtGrow2 );
rR.SetBottom( rR.Top() + nHgt );
}
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
index f33f7cfe668a..86adbdac2daa 100644
--- a/svx/source/svdraw/svdotxdr.cxx
+++ b/svx/source/svdraw/svdotxdr.cxx
@@ -92,12 +92,12 @@ tools::Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
if (bTop) aTmpRect.SetTop(aPos.Y() );
if (bBtm) aTmpRect.SetBottom(aPos.Y() );
if (bOrtho) { // Ortho
- long nWdt0=maRect.Right() -maRect.Left();
- long nHgt0=maRect.Bottom()-maRect.Top();
- long nXMul=aTmpRect.Right() -aTmpRect.Left();
- long nYMul=aTmpRect.Bottom()-aTmpRect.Top();
- long nXDiv=nWdt0;
- long nYDiv=nHgt0;
+ tools::Long nWdt0=maRect.Right() -maRect.Left();
+ tools::Long nHgt0=maRect.Bottom()-maRect.Top();
+ tools::Long nXMul=aTmpRect.Right() -aTmpRect.Left();
+ tools::Long nYMul=aTmpRect.Bottom()-aTmpRect.Top();
+ tools::Long nXDiv=nWdt0;
+ tools::Long nYDiv=nHgt0;
bool bXNeg=(nXMul<0)!=(nXDiv<0);
bool bYNeg=(nYMul<0)!=(nYDiv<0);
nXMul=std::abs(nXMul);
@@ -113,26 +113,26 @@ tools::Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
if (bEcke) { // corner point handles
bool bUseX=(aXFact<aYFact) != bBigOrtho;
if (bUseX) {
- long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
+ tools::Long nNeed=tools::Long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
if (bYNeg) nNeed=-nNeed;
if (bTop) aTmpRect.SetTop(aTmpRect.Bottom()-nNeed );
if (bBtm) aTmpRect.SetBottom(aTmpRect.Top()+nNeed );
} else {
- long nNeed=long(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
+ tools::Long nNeed=tools::Long(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
if (bXNeg) nNeed=-nNeed;
if (bLft) aTmpRect.SetLeft(aTmpRect.Right()-nNeed );
if (bRgt) aTmpRect.SetRight(aTmpRect.Left()+nNeed );
}
} else { // apex handles
if ((bLft || bRgt) && nXDiv!=0) {
- long nHgt0b=maRect.Bottom()-maRect.Top();
- long nNeed=long(BigInt(nHgt0b)*BigInt(nXMul)/BigInt(nXDiv));
+ tools::Long nHgt0b=maRect.Bottom()-maRect.Top();
+ tools::Long nNeed=tools::Long(BigInt(nHgt0b)*BigInt(nXMul)/BigInt(nXDiv));
aTmpRect.AdjustTop( -((nNeed-nHgt0b)/2) );
aTmpRect.SetBottom(aTmpRect.Top()+nNeed );
}
if ((bTop || bBtm) && nYDiv!=0) {
- long nWdt0b=maRect.Right()-maRect.Left();
- long nNeed=long(BigInt(nWdt0b)*BigInt(nYMul)/BigInt(nYDiv));
+ tools::Long nWdt0b=maRect.Right()-maRect.Left();
+ tools::Long nNeed=tools::Long(BigInt(nWdt0b)*BigInt(nYMul)/BigInt(nYDiv));
aTmpRect.AdjustLeft( -((nNeed-nWdt0b)/2) );
aTmpRect.SetRight(aTmpRect.Left()+nNeed );
}
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index d108d17743b5..6e423029f582 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -155,10 +155,10 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Recta
if(IsTextFrame())
{
- long nMinWdt=GetMinTextFrameWidth();
- long nMinHgt=GetMinTextFrameHeight();
- long nMaxWdt=GetMaxTextFrameWidth();
- long nMaxHgt=GetMaxTextFrameHeight();
+ tools::Long nMinWdt=GetMinTextFrameWidth();
+ tools::Long nMinHgt=GetMinTextFrameHeight();
+ tools::Long nMaxWdt=GetMaxTextFrameWidth();
+ tools::Long nMaxHgt=GetMaxTextFrameHeight();
if (nMinWdt<1) nMinWdt=1;
if (nMinHgt<1) nMinHgt=1;
if (!bFitToSize) {
@@ -229,12 +229,12 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Recta
if (pViewMin!=nullptr) {
*pViewMin=aViewInit;
- long nXFree=aAnkSiz.Width()-aPaperMin.Width();
+ tools::Long nXFree=aAnkSiz.Width()-aPaperMin.Width();
if (eHAdj==SDRTEXTHORZADJUST_LEFT) pViewMin->AdjustRight( -nXFree );
else if (eHAdj==SDRTEXTHORZADJUST_RIGHT) pViewMin->AdjustLeft(nXFree );
else { pViewMin->AdjustLeft(nXFree/2 ); pViewMin->SetRight(pViewMin->Left()+aPaperMin.Width() ); }
- long nYFree=aAnkSiz.Height()-aPaperMin.Height();
+ tools::Long nYFree=aAnkSiz.Height()-aPaperMin.Height();
if (eVAdj==SDRTEXTVERTADJUST_TOP) pViewMin->AdjustBottom( -nYFree );
else if (eVAdj==SDRTEXTVERTADJUST_BOTTOM) pViewMin->AdjustTop(nYFree );
else { pViewMin->AdjustTop(nYFree/2 ); pViewMin->SetBottom(pViewMin->Top()+aPaperMin.Height() ); }
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index 4478324b4d5c..14cfe824f67c 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -45,10 +45,10 @@ void SdrTextObj::NbcSetSnapRect(const tools::Rectangle& rRect)
{
// Either the rotation or shear angle exists.
tools::Rectangle aSR0(GetSnapRect());
- long nWdt0=aSR0.Right()-aSR0.Left();
- long nHgt0=aSR0.Bottom()-aSR0.Top();
- long nWdt1=rRect.Right()-rRect.Left();
- long nHgt1=rRect.Bottom()-rRect.Top();
+ tools::Long nWdt0=aSR0.Right()-aSR0.Left();
+ tools::Long nHgt0=aSR0.Bottom()-aSR0.Top();
+ tools::Long nWdt1=rRect.Right()-rRect.Left();
+ tools::Long nHgt1=rRect.Bottom()-rRect.Top();
SdrTextObj::NbcResize(maSnapRect.TopLeft(),Fraction(nWdt1,nWdt0),Fraction(nHgt1,nHgt0));
SdrTextObj::NbcMove(Size(rRect.Left()-aSR0.Left(),rRect.Top()-aSR0.Top()));
}
@@ -81,12 +81,12 @@ void SdrTextObj::NbcSetLogicRect(const tools::Rectangle& rRect)
SetRectsDirty();
}
-long SdrTextObj::GetRotateAngle() const
+tools::Long SdrTextObj::GetRotateAngle() const
{
return aGeo.nRotationAngle;
}
-long SdrTextObj::GetShearAngle(bool /*bVertical*/) const
+tools::Long SdrTextObj::GetShearAngle(bool /*bVertical*/) const
{
return aGeo.nShearAngle;
}
@@ -155,7 +155,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
if (bRotate90) {
bool bRota90=aGeo.nRotationAngle % 9000 ==0;
if (!bRota90) { // there's seems to be a rounding error occurring: correct it
- long a=NormAngle36000(aGeo.nRotationAngle);
+ tools::Long a=NormAngle36000(aGeo.nRotationAngle);
if (a<4500) a=0;
else if (a<13500) a=9000;
else if (a<22500) a=18000;
@@ -183,11 +183,11 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
SetRectsDirty();
}
-void SdrTextObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
+void SdrTextObj::NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
SetGlueReallyAbsolute(true);
- long dx=maRect.Right()-maRect.Left();
- long dy=maRect.Bottom()-maRect.Top();
+ tools::Long dx=maRect.Right()-maRect.Left();
+ tools::Long dy=maRect.Bottom()-maRect.Top();
Point aP(maRect.TopLeft());
RotatePoint(aP,rRef,sn,cs);
maRect.SetLeft(aP.X() );
@@ -207,7 +207,7 @@ void SdrTextObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
SetGlueReallyAbsolute(false);
}
-void SdrTextObj::NbcShear(const Point& rRef, long /*nAngle*/, double tn, bool bVShear)
+void SdrTextObj::NbcShear(const Point& rRef, tools::Long /*nAngle*/, double tn, bool bVShear)
{
SetGlueReallyAbsolute(true);
@@ -257,7 +257,7 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2)
if (bRotate90) {
bool bRota90=aGeo.nRotationAngle % 9000 ==0;
if (bRotate90 && !bRota90) { // there's seems to be a rounding error occurring: correct it
- long a=NormAngle36000(aGeo.nRotationAngle);
+ tools::Long a=NormAngle36000(aGeo.nRotationAngle);
if (a<4500) a=0;
else if (a<13500) a=9000;
else if (a<22500) a=18000;
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index 1fc49087a839..eba2814f6c28 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -305,7 +305,7 @@ void SdrVirtObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
SetRectsDirty();
}
-void SdrVirtObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
+void SdrVirtObj::NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
rRefObj.NbcRotate(rRef-aAnchor,nAngle,sn,cs);
SetRectsDirty();
@@ -317,7 +317,7 @@ void SdrVirtObj::NbcMirror(const Point& rRef1, const Point& rRef2)
SetRectsDirty();
}
-void SdrVirtObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear)
+void SdrVirtObj::NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear)
{
rRefObj.NbcShear(rRef-aAnchor,nAngle,tn,bVShear);
SetRectsDirty();
@@ -345,7 +345,7 @@ void SdrVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction
}
}
-void SdrVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs)
+void SdrVirtObj::Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs)
{
if (nAngle!=0) {
tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
@@ -363,7 +363,7 @@ void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
}
-void SdrVirtObj::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
+void SdrVirtObj::Shear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear)
{
if (nAngle!=0) {
tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect();
@@ -432,12 +432,12 @@ void SdrVirtObj::NbcSetLogicRect(const tools::Rectangle& rRect)
}
-long SdrVirtObj::GetRotateAngle() const
+tools::Long SdrVirtObj::GetRotateAngle() const
{
return rRefObj.GetRotateAngle();
}
-long SdrVirtObj::GetShearAngle(bool bVertical) const
+tools::Long SdrVirtObj::GetShearAngle(bool bVertical) const
{
return rRefObj.GetShearAngle(bVertical);
}
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index ad38d0ad3395..0db7711890e0 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -351,10 +351,10 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& r
if (GetPage()==nullptr)
return;
- long nx1=GetView().maGridBig.Width();
- long nx2=GetView().maGridFin.Width();
- long ny1=GetView().maGridBig.Height();
- long ny2=GetView().maGridFin.Height();
+ tools::Long nx1=GetView().maGridBig.Width();
+ tools::Long nx2=GetView().maGridFin.Width();
+ tools::Long ny1=GetView().maGridBig.Height();
+ tools::Long ny2=GetView().maGridFin.Height();
if (nx1==0) nx1=nx2;
if (nx2==0) nx2=nx1;
@@ -371,10 +371,10 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& r
return;
// no more global output size, use window size instead to decide grid sizes
- long nScreenWdt = rOut.GetOutputSizePixel().Width();
+ tools::Long nScreenWdt = rOut.GetOutputSizePixel().Width();
- long nMinDotPix=2;
- long nMinLinPix=4;
+ tools::Long nMinDotPix=2;
+ tools::Long nMinLinPix=4;
if (nScreenWdt>=1600)
{
@@ -398,10 +398,10 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& r
// enlarge line offset (minimum 4 pixels)
// enlarge by: *2 *5 *10 *20 *50 *100 ...
int nTgl=0;
- long nVal0=nx1;
+ tools::Long nVal0=nx1;
while (nx1<aMinLinDist.Width())
{
- long a=nx1;
+ tools::Long a=nx1;
if (nTgl==0) nx1*=2;
if (nTgl==1) nx1=nVal0*5; // => nx1*=2.5
@@ -414,7 +414,7 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& r
nVal0=ny1;
while (ny1<aMinLinDist.Height())
{
- long a=ny1;
+ tools::Long a=ny1;
if (nTgl==0) ny1*=2;
if (nTgl==1) ny1=nVal0*5; // => ny1*=2.5
@@ -436,13 +436,13 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& r
bool bMap0=rOut.IsMapModeEnabled();
- long nWrX=0;
- long nWrY=0;
+ tools::Long nWrX=0;
+ tools::Long nWrY=0;
Point aOrg(aPgOrg);
- long x1=GetPage()->GetLeftBorder()+1+nWrX;
- long x2=GetPage()->GetWidth()-GetPage()->GetRightBorder()-1+nWrY;
- long y1=GetPage()->GetUpperBorder()+1+nWrX;
- long y2=GetPage()->GetHeight()-GetPage()->GetLowerBorder()-1+nWrY;
+ tools::Long x1=GetPage()->GetLeftBorder()+1+nWrX;
+ tools::Long x2=GetPage()->GetWidth()-GetPage()->GetRightBorder()-1+nWrY;
+ tools::Long y1=GetPage()->GetUpperBorder()+1+nWrX;
+ tools::Long y2=GetPage()->GetHeight()-GetPage()->GetLowerBorder()-1+nWrY;
const SdrPageGridFrameList* pFrames=GetPage()->GetGridFrameList(this,nullptr);
sal_uInt16 nGridPaintCnt=1;
@@ -461,25 +461,25 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& r
}
if (!rRect.IsEmpty()) {
Size a1PixSiz(rOut.PixelToLogic(Size(1,1)));
- long nX1Pix=a1PixSiz.Width(); // add 1 pixel of tolerance
- long nY1Pix=a1PixSiz.Height();
+ tools::Long nX1Pix=a1PixSiz.Width(); // add 1 pixel of tolerance
+ tools::Long nY1Pix=a1PixSiz.Height();
if (x1<rRect.Left() -nX1Pix) x1=rRect.Left() -nX1Pix;
if (x2>rRect.Right() +nX1Pix) x2=rRect.Right() +nX1Pix;
if (y1<rRect.Top() -nY1Pix) y1=rRect.Top() -nY1Pix;
if (y2>rRect.Bottom()+nY1Pix) y2=rRect.Bottom()+nY1Pix;
}
- long xBigOrg=aOrg.X()+nWrX;
+ tools::Long xBigOrg=aOrg.X()+nWrX;
while (xBigOrg>=x1) xBigOrg-=nx1;
while (xBigOrg<x1) xBigOrg+=nx1;
- long xFinOrg=xBigOrg;
+ tools::Long xFinOrg=xBigOrg;
while (xFinOrg>=x1) xFinOrg-=nx2;
while (xFinOrg<x1) xFinOrg+=nx2;
- long yBigOrg=aOrg.Y()+nWrY;
+ tools::Long yBigOrg=aOrg.Y()+nWrY;
while (yBigOrg>=y1) yBigOrg-=ny1;
while (yBigOrg<y1) yBigOrg+=ny1;
- long yFinOrg=yBigOrg;
+ tools::Long yFinOrg=yBigOrg;
while (yFinOrg>=y1) yFinOrg-=ny2;
while (yFinOrg<y1) yFinOrg+=ny2;
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 2e4f10f26696..4d2b7b636a37 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -1030,11 +1030,11 @@ void SdrPaintView::MakeVisible(const tools::Rectangle& rRect, vcl::Window& rWin)
aActualSize=rWin.GetOutputSize();
}
Point aOrg(aMap.GetOrigin());
- long dx=0,dy=0;
- long l=-aOrg.X();
- long r=-aOrg.X()+aActualSize.Width()-1;
- long o=-aOrg.Y();
- long u=-aOrg.Y()+aActualSize.Height()-1;
+ tools::Long dx=0,dy=0;
+ tools::Long l=-aOrg.X();
+ tools::Long r=-aOrg.X()+aActualSize.Width()-1;
+ tools::Long o=-aOrg.Y();
+ tools::Long u=-aOrg.Y()+aActualSize.Height()-1;
if (l>rRect.Left()) dx=rRect.Left()-l;
else if (r<rRect.Right()) dx=rRect.Right()-r;
if (o>rRect.Top()) dy=rRect.Top()-o;
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index 79d70de48187..b5329fbd17fc 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -637,7 +637,7 @@ static void ImpRotate(Point& rPt, Point* pC1, Point* pC2, const void* p1, const
if (pC2!=nullptr) RotatePoint(*pC2,*static_cast<const Point*>(p1),*static_cast<const double*>(p3),*static_cast<const double*>(p4));
}
-void SdrPolyEditView::RotateMarkedPoints(const Point& rRef, long nAngle)
+void SdrPolyEditView::RotateMarkedPoints(const Point& rRef, tools::Long nAngle)
{
ForceUndirtyMrkPnt();
OUString aStr(SvxResId(STR_EditResize));
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
index 2bb9527b63b4..b827ab6ae439 100644
--- a/svx/source/svdraw/svdsnpv.cxx
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -262,18 +262,18 @@ Point SdrSnapView::GetSnapPos(const Point& rPnt, const SdrPageView* pPV) const
SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
{
if (!bSnapEnab) return SdrSnap::NOTSNAPPED;
- long x=rPnt.X();
- long y=rPnt.Y();
+ tools::Long x=rPnt.X();
+ tools::Long y=rPnt.Y();
if (pPV==nullptr) {
pPV=GetSdrPageView();
if (pPV==nullptr) return SdrSnap::NOTSNAPPED;
}
- long dx=NOT_SNAPPED;
- long dy=NOT_SNAPPED;
- long dx1,dy1;
- long mx=aMagnSiz.Width();
- long my=aMagnSiz.Height();
+ tools::Long dx=NOT_SNAPPED;
+ tools::Long dy=NOT_SNAPPED;
+ tools::Long dx1,dy1;
+ tools::Long mx=aMagnSiz.Width();
+ tools::Long my=aMagnSiz.Height();
if (mbHlplVisible && bHlplSnap && !IsDragHelpLine())
{
const SdrHelpLineList& rHLL=pPV->GetHelpLines();
@@ -284,16 +284,16 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
const Point& rPos=rHL.GetPos();
switch (rHL.GetKind()) {
case SdrHelpLineKind::Vertical: {
- long a=x-rPos.X();
+ tools::Long a=x-rPos.X();
if (std::abs(a)<=mx) { dx1=-a; if (std::abs(dx1)<std::abs(dx)) dx=dx1; }
} break;
case SdrHelpLineKind::Horizontal: {
- long b=y-rPos.Y();
+ tools::Long b=y-rPos.Y();
if (std::abs(b)<=my) { dy1=-b; if (std::abs(dy1)<std::abs(dy)) dy=dy1; }
} break;
case SdrHelpLineKind::Point: {
- long a=x-rPos.X();
- long b=y-rPos.Y();
+ tools::Long a=x-rPos.X();
+ tools::Long b=y-rPos.Y();
if (std::abs(a)<=mx && std::abs(b)<=my) {
dx1=-a; dy1=-b;
if (std::abs(dx1)<std::abs(dx) && std::abs(dy1)<std::abs(dy)) { dx=dx1; dy=dy1; }
@@ -304,13 +304,13 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
}
if (mbBordVisible && bBordSnap) {
SdrPage* pPage=pPV->GetPage();
- long xs=pPage->GetWidth();
- long ys=pPage->GetHeight();
- long lft=pPage->GetLeftBorder();
- long rgt=pPage->GetRightBorder();
- long upp=pPage->GetUpperBorder();
- long lwr=pPage->GetLowerBorder();
- long a;
+ tools::Long xs=pPage->GetWidth();
+ tools::Long ys=pPage->GetHeight();
+ tools::Long lft=pPage->GetLeftBorder();
+ tools::Long rgt=pPage->GetRightBorder();
+ tools::Long upp=pPage->GetUpperBorder();
+ tools::Long lwr=pPage->GetLowerBorder();
+ tools::Long a;
a=x- lft ; if (std::abs(a)<=mx) { dx1=-a; if (std::abs(dx1)<std::abs(dx)) dx=dx1; } // left margin
a=x-(xs-rgt); if (std::abs(a)<=mx) { dx1=-a; if (std::abs(dx1)<std::abs(dx)) dx=dx1; } // right margin
a=x ; if (std::abs(a)<=mx) { dx1=-a; if (std::abs(dx1)<std::abs(dx)) dx=dx1; } // left edge of paper
@@ -381,8 +381,8 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
else
fx -= fSnapWidth / 2.0;
- x = static_cast<long>((fx - static_cast<double>(pPV->GetPageOrigin().X())) / fSnapWidth);
- x = static_cast<long>(static_cast<double>(x) * fSnapWidth + static_cast<double>(pPV->GetPageOrigin().X()));
+ x = static_cast<tools::Long>((fx - static_cast<double>(pPV->GetPageOrigin().X())) / fSnapWidth);
+ x = static_cast<tools::Long>(static_cast<double>(x) * fSnapWidth + static_cast<double>(pPV->GetPageOrigin().X()));
dx = 0;
}
fSnapWidth = double(aSnapWdtY);
@@ -396,8 +396,8 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
else
fy -= fSnapWidth / 2.0;
- y = static_cast<long>((fy - static_cast<double>(pPV->GetPageOrigin().Y())) / fSnapWidth);
- y = static_cast<long>(static_cast<double>(y) * fSnapWidth + static_cast<double>(pPV->GetPageOrigin().Y()));
+ y = static_cast<tools::Long>((fy - static_cast<double>(pPV->GetPageOrigin().Y())) / fSnapWidth);
+ y = static_cast<tools::Long>(static_cast<double>(y) * fSnapWidth + static_cast<double>(pPV->GetPageOrigin().Y()));
dy = 0;
}
}
@@ -409,7 +409,7 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
return bRet;
}
-void SdrSnapView::CheckSnap(const Point& rPt, long& nBestXSnap, long& nBestYSnap, bool& bXSnapped, bool& bYSnapped) const
+void SdrSnapView::CheckSnap(const Point& rPt, tools::Long& nBestXSnap, tools::Long& nBestYSnap, bool& bXSnapped, bool& bYSnapped) const
{
Point aPt(rPt);
SdrSnap nRet=SnapPos(aPt,nullptr);
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index b47fda17bf4f..f225e3d5d6b6 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -42,7 +42,7 @@ void ResizeRect(tools::Rectangle& rRect, const Point& rRef, const Fraction& rxFa
if (!aXFact.IsValid()) {
SAL_WARN( "svx.svdraw", "invalid fraction xFract, using Fraction(1,1)" );
aXFact = Fraction(1,1);
- long nWdt = rRect.Right() - rRect.Left();
+ tools::Long nWdt = rRect.Right() - rRect.Left();
if (nWdt == 0) rRect.AdjustRight( 1 );
}
rRect.SetLeft( rRef.X() + FRound( (rRect.Left() - rRef.X()) * double(aXFact) ) );
@@ -51,7 +51,7 @@ void ResizeRect(tools::Rectangle& rRect, const Point& rRef, const Fraction& rxFa
if (!aYFact.IsValid()) {
SAL_WARN( "svx.svdraw", "invalid fraction yFract, using Fraction(1,1)" );
aYFact = Fraction(1,1);
- long nHgt = rRect.Bottom() - rRect.Top();
+ tools::Long nHgt = rRect.Bottom() - rRect.Top();
if (nHgt == 0) rRect.AdjustBottom( 1 );
}
rRect.SetTop( rRef.Y() + FRound( (rRect.Top() - rRef.Y()) * double(aYFact) ) );
@@ -103,30 +103,30 @@ void RotateXPoly(XPolyPolygon& rPoly, const Point& rRef, double sn, double cs)
void MirrorPoint(Point& rPnt, const Point& rRef1, const Point& rRef2)
{
- long mx=rRef2.X()-rRef1.X();
- long my=rRef2.Y()-rRef1.Y();
+ tools::Long mx=rRef2.X()-rRef1.X();
+ tools::Long my=rRef2.Y()-rRef1.Y();
if (mx==0) { // vertical axis
- long dx=rRef1.X()-rPnt.X();
+ tools::Long dx=rRef1.X()-rPnt.X();
rPnt.AdjustX(2*dx );
} else if (my==0) { // horizontal axis
- long dy=rRef1.Y()-rPnt.Y();
+ tools::Long dy=rRef1.Y()-rPnt.Y();
rPnt.AdjustY(2*dy );
} else if (mx==my) { // diagonal axis '\'
- long dx1=rPnt.X()-rRef1.X();
- long dy1=rPnt.Y()-rRef1.Y();
+ tools::Long dx1=rPnt.X()-rRef1.X();
+ tools::Long dy1=rPnt.Y()-rRef1.Y();
rPnt.setX(rRef1.X()+dy1 );
rPnt.setY(rRef1.Y()+dx1 );
} else if (mx==-my) { // diagonal axis '/'
- long dx1=rPnt.X()-rRef1.X();
- long dy1=rPnt.Y()-rRef1.Y();
+ tools::Long dx1=rPnt.X()-rRef1.X();
+ tools::Long dy1=rPnt.Y()-rRef1.Y();
rPnt.setX(rRef1.X()-dy1 );
rPnt.setY(rRef1.Y()-dx1 );
} else { // arbitrary axis
// TODO: Optimize this! Raise perpendicular on the mirroring axis..?
- long nRefWink=GetAngle(rRef2-rRef1);
+ tools::Long nRefWink=GetAngle(rRef2-rRef1);
rPnt-=rRef1;
- long nPntWink=GetAngle(rPnt);
- long nAngle=2*(nRefWink-nPntWink);
+ tools::Long nPntWink=GetAngle(rPnt);
+ tools::Long nAngle=2*(nRefWink-nPntWink);
double a = nAngle * F_PI18000;
double nSin=sin(a);
double nCos=cos(a);
@@ -164,10 +164,10 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent
{
bool bC1=pC1!=nullptr;
bool bC2=pC2!=nullptr;
- long x0=rPnt.X();
- long y0=rPnt.Y();
- long cx=rCenter.X();
- long cy=rCenter.Y();
+ tools::Long x0=rPnt.X();
+ tools::Long y0=rPnt.Y();
+ tools::Long cx=rCenter.X();
+ tools::Long cy=rCenter.Y();
double nAngle=GetCrookAngle(rPnt,rCenter,rRad,bVert);
double sn=sin(nAngle);
double cs=cos(nAngle);
@@ -183,7 +183,7 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent
// move into the direction of the center, as a basic position for the rotation
pC1->AdjustX( -x0 );
// resize, account for the distance from the center
- long nPntRad=cy-pC1->Y();
+ tools::Long nPntRad=cy-pC1->Y();
double nFact=static_cast<double>(nPntRad)/static_cast<double>(rRad.Y());
pC1->setX(FRound(static_cast<double>(pC1->X())*nFact) );
pC1->AdjustX(cx );
@@ -201,7 +201,7 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent
// move into the direction of the center, as a basic position for the rotation
pC2->AdjustX( -x0 );
// resize, account for the distance from the center
- long nPntRad=rCenter.Y()-pC2->Y();
+ tools::Long nPntRad=rCenter.Y()-pC2->Y();
double nFact=static_cast<double>(nPntRad)/static_cast<double>(rRad.Y());
pC2->setX(FRound(static_cast<double>(pC2->X())*nFact) );
pC2->AdjustX(cx );
@@ -218,13 +218,13 @@ double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCente
{
bool bC1=pC1!=nullptr;
bool bC2=pC2!=nullptr;
- long x0=rPnt.X();
- long y0=rPnt.Y();
- long dx1=0,dy1=0;
- long dxC1=0,dyC1=0;
- long dxC2=0,dyC2=0;
+ tools::Long x0=rPnt.X();
+ tools::Long y0=rPnt.Y();
+ tools::Long dx1=0,dy1=0;
+ tools::Long dxC1=0,dyC1=0;
+ tools::Long dxC2=0,dyC2=0;
if (bVert) {
- long nStart=rCenter.X()-rRad.X();
+ tools::Long nStart=rCenter.X()-rRad.X();
dx1=rPnt.X()-nStart;
rPnt.setX(nStart );
if (bC1) {
@@ -236,7 +236,7 @@ double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCente
pC2->setX(nStart );
}
} else {
- long nStart=rCenter.Y()-rRad.Y();
+ tools::Long nStart=rCenter.Y()-rRad.Y();
dy1=rPnt.Y()-nStart;
rPnt.setY(nStart );
if (bC1) {
@@ -272,14 +272,14 @@ double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCen
const Point& rRad, double& rSin, double& rCos, bool bVert,
const tools::Rectangle& rRefRect)
{
- long y0=rPnt.Y();
+ tools::Long y0=rPnt.Y();
CrookSlantXPoint(rPnt,pC1,pC2,rCenter,rRad,rSin,rCos,bVert);
if (bVert) {
} else {
- long nTop=rRefRect.Top();
- long nBtm=rRefRect.Bottom();
- long nHgt=nBtm-nTop;
- long dy=rPnt.Y()-y0;
+ tools::Long nTop=rRefRect.Top();
+ tools::Long nBtm=rRefRect.Bottom();
+ tools::Long nHgt=nBtm-nTop;
+ tools::Long dy=rPnt.Y()-y0;
double a=static_cast<double>(y0-nTop)/nHgt;
a*=dy;
rPnt.setY(y0+FRound(a) );
@@ -383,9 +383,9 @@ void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rR
}
-long GetAngle(const Point& rPnt)
+tools::Long GetAngle(const Point& rPnt)
{
- long a=0;
+ tools::Long a=0;
if (rPnt.Y()==0) {
if (rPnt.X()<0) a=-18000;
} else if (rPnt.X()==0) {
@@ -398,21 +398,21 @@ long GetAngle(const Point& rPnt)
return a;
}
-long NormAngle18000(long a)
+tools::Long NormAngle18000(tools::Long a)
{
while (a<-18000) a+=36000;
while (a>=18000) a-=36000;
return a;
}
-long NormAngle36000(long a)
+tools::Long NormAngle36000(tools::Long a)
{
while (a<0) a+=36000;
while (a>=36000) a-=36000;
return a;
}
-sal_uInt16 GetAngleSector(long nAngle)
+sal_uInt16 GetAngleSector(tools::Long nAngle)
{
while (nAngle<0) nAngle+=36000;
while (nAngle>=36000) nAngle-=36000;
@@ -422,10 +422,10 @@ sal_uInt16 GetAngleSector(long nAngle)
return 3;
}
-long GetLen(const Point& rPnt)
+tools::Long GetLen(const Point& rPnt)
{
- long x=std::abs(rPnt.X());
- long y=std::abs(rPnt.Y());
+ tools::Long x=std::abs(rPnt.X());
+ tools::Long y=std::abs(rPnt.Y());
if (x+y<0x8000) { // because 7FFF * 7FFF * 2 = 7FFE0002
x*=x;
y*=y;
@@ -493,15 +493,15 @@ void Poly2Rect(const tools::Polygon& rPol, tools::Rectangle& rRect, GeoStat& rGe
Point aPt1(rPol[1]-rPol[0]);
if (rGeo.nRotationAngle!=0) RotatePoint(aPt1,Point(0,0),-rGeo.nSin,rGeo.nCos); // -Sin to reverse rotation
- long nWdt=aPt1.X();
+ tools::Long nWdt=aPt1.X();
Point aPt0(rPol[0]);
Point aPt3(rPol[3]-rPol[0]);
if (rGeo.nRotationAngle!=0) RotatePoint(aPt3,Point(0,0),-rGeo.nSin,rGeo.nCos); // -Sin to reverse rotation
- long nHgt=aPt3.Y();
+ tools::Long nHgt=aPt3.Y();
- long nShW=GetAngle(aPt3);
+ tools::Long nShW=GetAngle(aPt3);
nShW-=27000; // ShearWink is measured against a vertical line
nShW=-nShW; // negating, because '+' is shearing clock-wise
@@ -528,10 +528,10 @@ void Poly2Rect(const tools::Polygon& rPol, tools::Rectangle& rRect, GeoStat& rGe
void OrthoDistance8(const Point& rPt0, Point& rPt, bool bBigOrtho)
{
- long dx=rPt.X()-rPt0.X();
- long dy=rPt.Y()-rPt0.Y();
- long dxa=std::abs(dx);
- long dya=std::abs(dy);
+ tools::Long dx=rPt.X()-rPt0.X();
+ tools::Long dy=rPt.Y()-rPt0.Y();
+ tools::Long dxa=std::abs(dx);
+ tools::Long dya=std::abs(dy);
if (dx==0 || dy==0 || dxa==dya) return;
if (dxa>=dya*2) { rPt.setY(rPt0.Y() ); return; }
if (dya>=dxa*2) { rPt.setX(rPt0.X() ); return; }
@@ -544,10 +544,10 @@ void OrthoDistance8(const Point& rPt0, Point& rPt, bool bBigOrtho)
void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho)
{
- long dx=rPt.X()-rPt0.X();
- long dy=rPt.Y()-rPt0.Y();
- long dxa=std::abs(dx);
- long dya=std::abs(dy);
+ tools::Long dx=rPt.X()-rPt0.X();
+ tools::Long dy=rPt.Y()-rPt0.Y();
+ tools::Long dxa=std::abs(dx);
+ tools::Long dya=std::abs(dy);
if ((dxa<dya) != bBigOrtho) {
rPt.setY(rPt0.Y()+(dxa* (dy>=0 ? 1 : -1) ) );
} else {
@@ -556,7 +556,7 @@ void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho)
}
-long BigMulDiv(long nVal, long nMul, long nDiv)
+tools::Long BigMulDiv(tools::Long nVal, tools::Long nMul, tools::Long nDiv)
{
BigInt aVal(nVal);
aVal*=nMul;
@@ -568,7 +568,7 @@ long BigMulDiv(long nVal, long nMul, long nDiv)
if(nDiv)
{
aVal/=nDiv;
- return long(aVal);
+ return tools::Long(aVal);
}
return 0x7fffffff;
}
@@ -664,7 +664,7 @@ FrPair GetMapFactor(FieldUnit eS, FieldUnit eD)
// 1 yd = 3 ft = 36" = 914,4mm
// 1 ft = 12 " = 1" = 304,8mm
-static void GetMeterOrInch(MapUnit eMU, short& rnComma, long& rnMul, long& rnDiv, bool& rbMetr, bool& rbInch)
+static void GetMeterOrInch(MapUnit eMU, short& rnComma, tools::Long& rnMul, tools::Long& rnDiv, bool& rbMetr, bool& rbInch)
{
rnMul=1; rnDiv=1;
short nComma=0;
@@ -698,7 +698,7 @@ static void GetMeterOrInch(MapUnit eMU, short& rnComma, long& rnMul, long& rnDiv
void SdrFormatter::Undirty()
{
bool bSrcMetr,bSrcInch,bDstMetr,bDstInch;
- long nMul1,nDiv1,nMul2,nDiv2;
+ tools::Long nMul1,nDiv1,nMul2,nDiv2;
short nComma1,nComma2;
// first: normalize to m or in
GetMeterOrInch(eSrcMU,nComma1,nMul1,nDiv1,bSrcMetr,bSrcInch);
@@ -728,7 +728,7 @@ void SdrFormatter::Undirty()
}
-OUString SdrFormatter::GetStr(long nVal) const
+OUString SdrFormatter::GetStr(tools::Long nVal) const
{
const OUString aNullCode("0");
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 2cf43d6669e8..f266478927b8 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -888,7 +888,7 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
case SdrEventKind::BeginDragObj: bRet=BegDragObj(aLogicPos,nullptr,rVEvt.pHdl,mnMinMovLog); break;
case SdrEventKind::BeginCreateObj: {
if (nCurrentInvent==SdrInventor::Default && nCurrentIdent==OBJ_CAPTION) {
- long nHgt=SdrEngineDefaults::GetFontHeight();
+ tools::Long nHgt=SdrEngineDefaults::GetFontHeight();
bRet=BegCreateCaptionObj(aLogicPos,Size(5*nHgt,2*nHgt));
} else bRet=BegCreateObj(aLogicPos);
} break;
@@ -1214,7 +1214,7 @@ OUString SdrView::GetStatusText()
else if (IsTextEdit() && pTextEditOutlinerView!=nullptr) {
aStr=SvxResId(STR_ViewTextEdit); // "TextEdit - Row y, Column x";
ESelection aSel(pTextEditOutlinerView->GetSelection());
- long nPar=aSel.nEndPara,nLin=0,nCol=aSel.nEndPos;
+ tools::Long nPar=aSel.nEndPara,nLin=0,nCol=aSel.nEndPos;
if (aSel.nEndPara>0) {
for (sal_Int32 nParaNum=0; nParaNum<aSel.nEndPara; nParaNum++) {
nLin+=pTextEditOutliner->GetLineCount(nParaNum);
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index e8c8a3218a89..21d0451e7f3c 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -402,8 +402,8 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po
nSizX *= aDstFr.GetDenominator();
nSizY *= double(aMapFact.Y() * rMap.GetScaleY());
nSizY /= aDstFr.GetNumerator();
- long xs=nSizX;
- long ys=nSizY;
+ tools::Long xs=nSizX;
+ tools::Long ys=nSizY;
Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2);
tools::Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys);
pObj->SetLogicRect(aR);
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 0a7844817c61..20b725491cf8 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -774,25 +774,25 @@ sal_Int32 Cell::getMinimumHeight()
}
-long Cell::GetTextLeftDistance() const
+tools::Long Cell::GetTextLeftDistance() const
{
return GetItemSet().Get(SDRATTR_TEXT_LEFTDIST).GetValue();
}
-long Cell::GetTextRightDistance() const
+tools::Long Cell::GetTextRightDistance() const
{
return GetItemSet().Get(SDRATTR_TEXT_RIGHTDIST).GetValue();
}
-long Cell::GetTextUpperDistance() const
+tools::Long Cell::GetTextUpperDistance() const
{
return GetItemSet().Get(SDRATTR_TEXT_UPPERDIST).GetValue();
}
-long Cell::GetTextLowerDistance() const
+tools::Long Cell::GetTextLowerDistance() const
{
return GetItemSet().Get(SDRATTR_TEXT_LOWERDIST).GetValue();
}
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 946f3b441748..8eec244b8fcc 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1530,7 +1530,7 @@ void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, too
Size aTextSiz(rOutliner.GetPaperSize());
if (eVAdj==SDRTEXTVERTADJUST_CENTER || eVAdj==SDRTEXTVERTADJUST_BOTTOM)
{
- long nFreeHgt=aAnkRect.GetHeight()-aTextSiz.Height();
+ tools::Long nFreeHgt=aAnkRect.GetHeight()-aTextSiz.Height();
if (eVAdj==SDRTEXTVERTADJUST_CENTER)
aTextPos.AdjustY(nFreeHgt/2 );
if (eVAdj==SDRTEXTVERTADJUST_BOTTOM)
@@ -1677,7 +1677,7 @@ void SdrTableObj::TakeTextEditArea( const CellPos& rPos, Size* pPaperMin, Size*
if (pViewMin!=nullptr)
{
*pViewMin=aViewInit;
- long nYFree=aAnkSiz.Height()-aPaperMin.Height();
+ tools::Long nYFree=aAnkSiz.Height()-aPaperMin.Height();
if (eVAdj==SDRTEXTVERTADJUST_TOP)
{
diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx
index 2073c1d39aac..10707cbc1c21 100644
--- a/svx/source/table/tablertfexporter.cxx
+++ b/svx/source/table/tablertfexporter.cxx
@@ -77,9 +77,9 @@ SdrTableRtfExporter::SdrTableRtfExporter( SvStream& rStrm, SdrTableObj& rObj )
{
}
-static long HundMMToTwips( long nIn )
+static tools::Long HundMMToTwips( tools::Long nIn )
{
- long nRet = OutputDevice::LogicToLogic( nIn, MapUnit::Map100thMM, MapUnit::MapTwip );
+ tools::Long nRet = OutputDevice::LogicToLogic( nIn, MapUnit::Map100thMM, MapUnit::MapTwip );
return nRet;
}
diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx
index d4bc377df1d3..c2f510444f8a 100644
--- a/svx/source/table/tablertfimporter.cxx
+++ b/svx/source/table/tablertfimporter.cxx
@@ -381,9 +381,9 @@ void SdrTableRTFParser::NextColumn()
mpActDefault = nullptr;
}
-static long TwipsToHundMM( long nIn )
+static tools::Long TwipsToHundMM( tools::Long nIn )
{
- long nRet = OutputDevice::LogicToLogic( nIn, MapUnit::MapTwip, MapUnit::Map100thMM );
+ tools::Long nRet = OutputDevice::LogicToLogic( nIn, MapUnit::MapTwip, MapUnit::Map100thMM );
return nRet;
}
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index 13fb1799f36e..1e19ecd10b56 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -249,12 +249,12 @@ OUString PaletteManager::GetSelectedPalettePath()
return OUString();
}
-long PaletteManager::GetColorCount() const
+tools::Long PaletteManager::GetColorCount() const
{
return mnColorCount;
}
-long PaletteManager::GetRecentColorCount() const
+tools::Long PaletteManager::GetRecentColorCount() const
{
return maRecentColors.size();
}
diff --git a/svx/source/tbxctrls/SvxPresetListBox.cxx b/svx/source/tbxctrls/SvxPresetListBox.cxx
index eb31bec38b9b..bc8b93ec3464 100644
--- a/svx/source/tbxctrls/SvxPresetListBox.cxx
+++ b/svx/source/tbxctrls/SvxPresetListBox.cxx
@@ -71,7 +71,7 @@ void SvxPresetListBox::FillPresetListBoxImpl(ListType & pList, sal_uInt32 nStart
{
const Size aSize( GetIconSize() );
BitmapEx aBitmap;
- for(long nIndex = 0; nIndex < pList.Count(); nIndex++, nStartIndex++)
+ for(tools::Long nIndex = 0; nIndex < pList.Count(); nIndex++, nStartIndex++)
{
aBitmap = pList.GetBitmapForPreview(nIndex, aSize);
EntryType* pItem = static_cast<EntryType*>( pList.Get(nIndex) );
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index e749994b73df..44b139334ace 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -270,8 +270,8 @@ void SvxColorDockingWindow::FillValueSet()
// create the last entry for 'invisible/none'
const Size aColorSize(SvxColorValueSet::getEntryEdgeLength(), SvxColorValueSet::getEntryEdgeLength());
- long nPtX = aColorSize.Width() - 1;
- long nPtY = aColorSize.Height() - 1;
+ tools::Long nPtX = aColorSize.Width() - 1;
+ tools::Long nPtY = aColorSize.Height() - 1;
ScopedVclPtrInstance< VirtualDevice > pVD;
pVD->SetOutputSizePixel( aColorSize );
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 72f3c99f5c4d..10fc939395c3 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -135,7 +135,7 @@ void ImplGrafControl::Update( const SfxPoolItem* pItem )
{
if( pItem )
{
- long nValue;
+ tools::Long nValue;
if ( maCommand == ".uno:GrafTransparence" )
nValue = static_cast<const SfxUInt16Item*>( pItem )->GetValue();
@@ -221,7 +221,7 @@ ImplGrafControl::ImplGrafControl(
}
else
{
- const long nMinVal = maCommand == ".uno:GrafTransparence" ? 0 : -100;
+ const tools::Long nMinVal = maCommand == ".uno:GrafTransparence" ? 0 : -100;
mxField->set_unit(FieldUnit::PERCENT);
mxField->set_digits(0);
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index c5a7a479671a..89a428986efd 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -226,9 +226,9 @@ namespace
{
const Size aBitmapSize(rBitmapEx.GetSizePixel());
- for(long y(0); y < rSize.Height(); y += aBitmapSize.Height())
+ for(tools::Long y(0); y < rSize.Height(); y += aBitmapSize.Height())
{
- for(long x(0); x < rSize.Width(); x += aBitmapSize.Width())
+ for(tools::Long x(0); x < rSize.Width(); x += aBitmapSize.Width())
{
pVirtualDevice->DrawBitmapEx(
Point(x, y),
@@ -246,11 +246,11 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XHatchListRef &pList)
if( !pList.is() )
return;
- long nCount = pList->Count();
+ tools::Long nCount = pList->Count();
ScopedVclPtrInstance< VirtualDevice > pVD;
rBox.freeze();
- for( long i = 0; i < nCount; i++ )
+ for( tools::Long i = 0; i < nCount; i++ )
{
const XHatchEntry* pEntry = pList->GetHatch(i);
const BitmapEx aBitmapEx = pList->GetUiBitmap( i );
@@ -273,11 +273,11 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XGradientListRef &pList)
if( !pList.is() )
return;
- long nCount = pList->Count();
+ tools::Long nCount = pList->Count();
ScopedVclPtrInstance< VirtualDevice > pVD;
rBox.freeze();
- for( long i = 0; i < nCount; i++ )
+ for( tools::Long i = 0; i < nCount; i++ )
{
const XGradientEntry* pEntry = pList->GetGradient(i);
const BitmapEx aBitmapEx = pList->GetUiBitmap( i );
@@ -300,14 +300,14 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XBitmapListRef &pList)
if( !pList.is() )
return;
- long nCount = pList->Count();
+ tools::Long nCount = pList->Count();
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
const Size aSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
ScopedVclPtrInstance< VirtualDevice > pVD;
pVD->SetOutputSizePixel(aSize, false);
rBox.freeze();
- for( long i = 0; i < nCount; i++ )
+ for( tools::Long i = 0; i < nCount; i++ )
{
const XBitmapEntry* pEntry = pList->GetBitmap( i );
BitmapEx aBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
@@ -324,14 +324,14 @@ void SvxFillAttrBox::Fill(weld::ComboBox& rBox, const XPatternListRef &pList)
if( !pList.is() )
return;
- long nCount = pList->Count();
+ tools::Long nCount = pList->Count();
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
const Size aSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
ScopedVclPtrInstance< VirtualDevice > pVD;
pVD->SetOutputSizePixel(aSize, false);
rBox.freeze();
- for( long i = 0; i < nCount; i++ )
+ for( tools::Long i = 0; i < nCount; i++ )
{
const XBitmapEntry* pEntry = pList->GetBitmap( i );
BitmapEx aBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 6439ea573995..ac2f554447e9 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -46,17 +46,17 @@ private:
rtl::Reference<SvxTableToolBoxControl> mxControl;
OUString maCommand;
- long nCol;
- long nLine;
+ tools::Long nCol;
+ tools::Long nLine;
- static const long TABLE_CELLS_HORIZ;
- static const long TABLE_CELLS_VERT;
+ static const tools::Long TABLE_CELLS_HORIZ;
+ static const tools::Long TABLE_CELLS_VERT;
- long mnTableCellWidth;
- long mnTableCellHeight;
+ tools::Long mnTableCellWidth;
+ tools::Long mnTableCellHeight;
- long mnTableWidth;
- long mnTableHeight;
+ tools::Long mnTableWidth;
+ tools::Long mnTableHeight;
::Color aFontColor;
::Color aLineColor;
@@ -64,7 +64,7 @@ private:
::Color aHighlightFillColor;
::Color aBackgroundColor;
- void Update(long nNewCol, long nNewLine);
+ void Update(tools::Long nNewCol, tools::Long nNewLine);
void InsertTable();
public:
@@ -100,8 +100,8 @@ public:
}
-const long TableWidget::TABLE_CELLS_HORIZ = 10;
-const long TableWidget::TABLE_CELLS_VERT = 15;
+const tools::Long TableWidget::TABLE_CELLS_HORIZ = 10;
+const tools::Long TableWidget::TABLE_CELLS_VERT = 15;
IMPL_LINK_NOARG(TableWindow, SelectHdl, weld::Button&, void)
{
@@ -161,8 +161,8 @@ bool TableWidget::MouseMove(const MouseEvent& rMEvt)
Point aPos = rMEvt.GetPosPixel();
Point aMousePos( aPos );
- long nNewCol = ( aMousePos.X() + mnTableCellWidth ) / mnTableCellWidth;
- long nNewLine = ( aMousePos.Y() + mnTableCellHeight ) / mnTableCellHeight;
+ tools::Long nNewCol = ( aMousePos.X() + mnTableCellWidth ) / mnTableCellWidth;
+ tools::Long nNewLine = ( aMousePos.Y() + mnTableCellHeight ) / mnTableCellHeight;
Update( nNewCol, nNewLine );
@@ -177,8 +177,8 @@ bool TableWidget::KeyInput(const KeyEvent& rKEvt)
if ( !nModifier )
{
bHandled = true;
- long nNewCol = nCol;
- long nNewLine = nLine;
+ tools::Long nNewCol = nCol;
+ tools::Long nNewLine = nLine;
switch(nKey)
{
case KEY_UP:
@@ -261,8 +261,8 @@ void TableWidget::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
aFont.SetTransparent( false );
rRenderContext.SetFont( aFont );
- const long nSelectionWidth = nCol * mnTableCellWidth;
- const long nSelectionHeight = nLine * mnTableCellHeight;
+ const tools::Long nSelectionWidth = nCol * mnTableCellWidth;
+ const tools::Long nSelectionHeight = nLine * mnTableCellHeight;
// the non-selected parts of the table
rRenderContext.SetLineColor(aLineColor);
@@ -280,13 +280,13 @@ void TableWidget::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
// lines inside of the table
rRenderContext.SetLineColor(aLineColor);
- for (long i = 1; i < TABLE_CELLS_VERT; ++i)
+ for (tools::Long i = 1; i < TABLE_CELLS_VERT; ++i)
{
rRenderContext.DrawLine(Point(0, i*mnTableCellHeight),
Point(mnTableWidth, i*mnTableCellHeight));
}
- for (long i = 1; i < TABLE_CELLS_HORIZ; ++i)
+ for (tools::Long i = 1; i < TABLE_CELLS_HORIZ; ++i)
{
rRenderContext.DrawLine(Point( i*mnTableCellWidth, 0),
Point( i*mnTableCellWidth, mnTableHeight));
@@ -307,9 +307,9 @@ void TableWidget::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
Size aTextSize(rRenderContext.GetTextWidth(aText), rRenderContext.GetTextHeight());
- long nTextX = nSelectionWidth + mnTableCellWidth;
- long nTextY = nSelectionHeight + mnTableCellHeight;
- const long nTipBorder = 2;
+ tools::Long nTextX = nSelectionWidth + mnTableCellWidth;
+ tools::Long nTextY = nSelectionHeight + mnTableCellHeight;
+ const tools::Long nTipBorder = 2;
if (aTextSize.Width() + mnTableCellWidth + 2 * nTipBorder < nSelectionWidth)
nTextX = nSelectionWidth - mnTableCellWidth - aTextSize.Width();
@@ -347,7 +347,7 @@ void TableWidget::InsertTable()
}
}
-void TableWidget::Update( long nNewCol, long nNewLine )
+void TableWidget::Update( tools::Long nNewCol, tools::Long nNewLine )
{
if ( nNewCol < 0 || nNewCol > TABLE_CELLS_HORIZ )
nNewCol = 0;
@@ -393,7 +393,7 @@ namespace {
class ColumnsWidget final : public weld::CustomWidgetController
{
private:
- static constexpr long WIDTH = 5;
+ static constexpr tools::Long WIDTH = 5;
rtl::Reference<SvxColumnsToolBoxControl> mxControl;
weld::SpinButton& mrSpinButton;
@@ -403,15 +403,15 @@ private:
::Color aFillColor;
::Color aHighlightFillColor;
::Color aFaceColor;
- long nCol;
- long nMX;
+ tools::Long nCol;
+ tools::Long nMX;
bool m_bMod1;
DECL_LINK(ValueChangedHdl, weld::SpinButton&, void);
DECL_LINK(ActivateHdl, weld::Entry&, bool);
void InsertColumns();
- void UpdateSize_Impl( long nNewCol );
+ void UpdateSize_Impl( tools::Long nNewCol );
public:
ColumnsWidget(SvxColumnsToolBoxControl* pControl, weld::SpinButton& rSpinButton);
@@ -499,7 +499,7 @@ bool ColumnsWidget::MouseMove(const MouseEvent& rMEvt)
{
Point aPos = rMEvt.GetPosPixel();
- long nNewCol = 1;
+ tools::Long nNewCol = 1;
if ( aPos.X() > 0 )
nNewCol = aPos.X() / nMX + 1;
if ( nNewCol > 20 )
@@ -509,7 +509,7 @@ bool ColumnsWidget::MouseMove(const MouseEvent& rMEvt)
return true;
}
-void ColumnsWidget::UpdateSize_Impl( long nNewCol )
+void ColumnsWidget::UpdateSize_Impl( tools::Long nNewCol )
{
if ( nNewCol == nCol )
return;
@@ -519,7 +519,7 @@ void ColumnsWidget::UpdateSize_Impl( long nNewCol )
Invalidate( tools::Rectangle( 0, aWinSize.Height() - 2,
aWinSize.Width(), aWinSize.Height() ) );
- long nMinCol = 0, nMaxCol = 0;
+ tools::Long nMinCol = 0, nMaxCol = 0;
if ( nNewCol < nCol )
{
@@ -555,7 +555,7 @@ bool ColumnsWidget::KeyInput(const KeyEvent& rKEvt)
KEY_UP == nKey)
{
bHandled = true;
- long nNewCol = nCol;
+ tools::Long nNewCol = nCol;
switch(nKey)
{
case KEY_LEFT :
@@ -604,8 +604,8 @@ void ColumnsWidget::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
aFont.SetTransparent( false );
rRenderContext.SetFont( aFont );
- long i;
- long nLineWidth;
+ tools::Long i;
+ tools::Long nLineWidth;
Size aSize(GetOutputSizePixel());
for (i = 0; i < WIDTH; i++)
@@ -623,7 +623,7 @@ void ColumnsWidget::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
rRenderContext.DrawRect(tools::Rectangle(i * nMX - 1, -1, i * nMX + nMX, aSize.Height() - 1));
- long j = 4;
+ tools::Long j = 4;
while (j < aSize.Height() - 4)
{
if (!(j % 16))
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index 1bd1ff0221fd..5123db3f4bf7 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -350,7 +350,7 @@ void SvxLineEndWindow::FillValueSet()
ScopedVclPtrInstance< VirtualDevice > pVD;
- long nCount = mpLineEndList->Count();
+ tools::Long nCount = mpLineEndList->Count();
// First entry: no line end.
// An entry is temporarily added to get the UI bitmap
@@ -374,7 +374,7 @@ void SvxLineEndWindow::FillValueSet()
mpLineEndList->Remove(nCount);
- for( long i = 0; i < nCount; i++ )
+ for( tools::Long i = 0; i < nCount; i++ )
{
pEntry = mpLineEndList->GetLineEnd( i );
DBG_ASSERT( pEntry, "Could not access LineEndEntry" );
@@ -543,8 +543,8 @@ void SvxLineBox::Fill( const XDashListRef &pList )
mxLineStyleSet->InsertItem(2, Image(aBmp), pList->GetStringForUiSolidLine());
// entries for dashed lines
- long nCount = pList->Count();
- for( long i = 0; i < nCount; i++ )
+ tools::Long nCount = pList->Count();
+ for( tools::Long i = 0; i < nCount; i++ )
{
const XDashEntry* pEntry = pList->GetDash(i);
const BitmapEx aBitmap = pList->GetUiBitmap(i);
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 464aa72e46b0..af2eea072998 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -221,7 +221,7 @@ protected:
static Color TestColorsVisible(const Color &FontCol, const Color &BackCol);
static void UserDrawEntry(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, const OUString &rStyleName);
void SetupEntry(vcl::RenderContext& rRenderContext, sal_Int32 nItem, const tools::Rectangle& rRect, const OUString& rStyleName, bool bIsNotSelected);
- static bool AdjustFontForItemHeight(OutputDevice& rDevice, tools::Rectangle const & rTextRect, long nHeight);
+ static bool AdjustFontForItemHeight(OutputDevice& rDevice, tools::Rectangle const & rTextRect, tools::Long nHeight);
DECL_LINK(MenuSelectHdl, const OString&, void);
DECL_STATIC_LINK(SvxStyleBox_Base, ShowMoreHdl, void*, void);
};
@@ -498,9 +498,9 @@ private:
LineListBox();
/** Set the width in Twips */
- Size SetWidth( long nWidth )
+ Size SetWidth( tools::Long nWidth )
{
- long nOldWidth = m_nWidth;
+ tools::Long nOldWidth = m_nWidth;
m_nWidth = nWidth;
return UpdateEntries( nOldWidth );
}
@@ -512,7 +512,7 @@ private:
/** Insert a listbox entry with all widths in Twips. */
void InsertEntry(const BorderWidthImpl& rWidthImpl,
- SvxBorderLineStyle nStyle, long nMinWidth = 0,
+ SvxBorderLineStyle nStyle, tools::Long nMinWidth = 0,
ColorFunc pColor1Fn = &sameColor,
ColorFunc pColor2Fn = &sameColor,
ColorDistFunc pColorDistFn = &sameDistColor);
@@ -528,14 +528,14 @@ private:
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
private:
- void ImpGetLine(long nLine1, long nLine2, long nDistance,
+ void ImpGetLine(tools::Long nLine1, tools::Long nLine2, tools::Long nDistance,
Color nColor1, Color nColor2, Color nColorDist,
SvxBorderLineStyle nStyle, BitmapEx& rBmp);
void UpdatePaintLineColor(); // returns sal_True if maPaintCol has changed
- Size UpdateEntries( long nOldWidth );
- sal_Int32 GetStylePos( sal_Int32 nListPos, long nWidth );
+ Size UpdateEntries( tools::Long nOldWidth );
+ sal_Int32 GetStylePos( sal_Int32 nListPos, tools::Long nWidth );
const Color& GetPaintColor() const
{
@@ -550,7 +550,7 @@ private:
LineListBox& operator =( const LineListBox& ) = delete;
std::vector<std::unique_ptr<ImpLineListData>> m_vLineList;
- long m_nWidth;
+ tools::Long m_nWidth;
OUString m_sNone;
ScopedVclPtr<VirtualDevice> aVirDev;
Size aTxtSize;
@@ -573,7 +573,7 @@ private:
return nStyle;
}
- void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance,
+ void LineListBox::ImpGetLine( tools::Long nLine1, tools::Long nLine2, tools::Long nDistance,
Color aColor1, Color aColor2, Color aColorDist,
SvxBorderLineStyle nStyle, BitmapEx& rBmp )
{
@@ -592,10 +592,10 @@ private:
// Paint the lines
aSize = aVirDev->PixelToLogic( aSize );
- long nPix = aVirDev->PixelToLogic( Size( 0, 1 ) ).Height();
+ tools::Long nPix = aVirDev->PixelToLogic( Size( 0, 1 ) ).Height();
sal_uInt32 n1 = nLine1;
sal_uInt32 n2 = nLine2;
- long nDist = nDistance;
+ tools::Long nDist = nDistance;
n1 += nPix-1;
n1 -= n1%nPix;
if ( n2 )
@@ -605,7 +605,7 @@ private:
n2 += nPix-1;
n2 -= n2%nPix;
}
- long nVirHeight = n1+nDist+n2;
+ tools::Long nVirHeight = n1+nDist+n2;
if ( nVirHeight > aSize.Height() )
aSize.setHeight( nVirHeight );
// negative width should not be drawn
@@ -657,7 +657,7 @@ private:
UpdatePaintLineColor();
}
- sal_Int32 LineListBox::GetStylePos( sal_Int32 nListPos, long nWidth )
+ sal_Int32 LineListBox::GetStylePos( sal_Int32 nListPos, tools::Long nWidth )
{
sal_Int32 nPos = -1;
if (!m_sNone.isEmpty())
@@ -682,7 +682,7 @@ private:
}
void LineListBox::InsertEntry(
- const BorderWidthImpl& rWidthImpl, SvxBorderLineStyle nStyle, long nMinWidth,
+ const BorderWidthImpl& rWidthImpl, SvxBorderLineStyle nStyle, tools::Long nMinWidth,
ColorFunc pColor1Fn, ColorFunc pColor2Fn, ColorDistFunc pColorDistFn )
{
m_vLineList.emplace_back(new ImpLineListData(
@@ -706,7 +706,7 @@ private:
maPaintCol = aNewCol;
}
- Size LineListBox::UpdateEntries( long nOldWidth )
+ Size LineListBox::UpdateEntries( tools::Long nOldWidth )
{
Size aSize;
@@ -1081,7 +1081,7 @@ void SvxStyleBox_Impl::DataChanged( const DataChangedEvent& rDCEvt )
InterimItemWindow::DataChanged( rDCEvt );
}
-bool SvxStyleBox_Base::AdjustFontForItemHeight(OutputDevice& rDevice, tools::Rectangle const & rTextRect, long nHeight)
+bool SvxStyleBox_Base::AdjustFontForItemHeight(OutputDevice& rDevice, tools::Rectangle const & rTextRect, tools::Long nHeight)
{
if (rTextRect.Bottom() > nHeight)
{
@@ -1294,7 +1294,7 @@ void SvxStyleBox_Base::CalcOptimalExtraUserWidth(vcl::RenderContext& rRenderCont
if (m_nMaxUserDrawFontWidth)
return;
- long nMaxNormalFontWidth = 0;
+ tools::Long nMaxNormalFontWidth = 0;
sal_Int32 nEntryCount = m_xWidget->get_count();
for (sal_Int32 i = 0; i < nEntryCount; ++i)
{
@@ -1302,7 +1302,7 @@ void SvxStyleBox_Base::CalcOptimalExtraUserWidth(vcl::RenderContext& rRenderCont
tools::Rectangle aTextRectForDefaultFont;
rRenderContext.GetTextBoundRect(aTextRectForDefaultFont, sStyleName);
- const long nWidth = aTextRectForDefaultFont.GetWidth();
+ const tools::Long nWidth = aTextRectForDefaultFont.GetWidth();
nMaxNormalFontWidth = std::max(nWidth, nMaxNormalFontWidth);
}
@@ -3902,9 +3902,9 @@ void ColorListBox::Selected(const NamedColor& rColor)
void ColorListBox::LockWidthRequest()
{
NamedColor aLongestColor;
- long nMaxStandardColorTextWidth = 0;
+ tools::Long nMaxStandardColorTextWidth = 0;
XColorListRef const xColorTable = XColorList::CreateStdColorList();
- for (long i = 0; i != xColorTable->Count(); ++i)
+ for (tools::Long i = 0; i != xColorTable->Count(); ++i)
{
XColorEntry& rEntry = *xColorTable->GetColor(i);
auto nColorTextWidth = m_xButton->get_pixel_size(rEntry.GetName()).Width();
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index ab419bbc7076..57a58a583b70 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -106,7 +106,7 @@ public:
m_xWidget->set_sensitive(bSensitive);
}
- void statusChanged_Impl(long nHeight, bool bErase);
+ void statusChanged_Impl(tools::Long nHeight, bool bErase);
void UpdateFont(const css::awt::FontDescriptor& rCurrentFont);
protected:
@@ -231,12 +231,12 @@ void SvxFontSizeBox_Base::Select()
m_rCtrl.dispatchCommand( aArgs );
}
-void SvxFontSizeBox_Base::statusChanged_Impl( long nPoint, bool bErase )
+void SvxFontSizeBox_Base::statusChanged_Impl( tools::Long nPoint, bool bErase )
{
if ( !bErase )
{
// convert the metric
- long nVal = nPoint;
+ tools::Long nVal = nPoint;
// changed => set new value
if (m_xWidget->get_value() != nVal)
@@ -433,14 +433,14 @@ void SAL_CALL FontHeightToolBoxControl::statusChanged(
m_pBox->set_sensitive(true);
frame::status::FontHeight aFontHeight;
if ( rEvent.State >>= aFontHeight )
- m_pBox->statusChanged_Impl( long( 10. * aFontHeight.Height ), false );
+ m_pBox->statusChanged_Impl( tools::Long( 10. * aFontHeight.Height ), false );
else
- m_pBox->statusChanged_Impl( long( -1 ), true );
+ m_pBox->statusChanged_Impl( tools::Long( -1 ), true );
}
else
{
m_pBox->set_sensitive(false);
- m_pBox->statusChanged_Impl( long( -1 ), true );
+ m_pBox->statusChanged_Impl( tools::Long( -1 ), true );
}
if (m_pToolbar)
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 931f5d72d51a..812d0bef4361 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -1377,7 +1377,7 @@ void SAL_CALL SearchLabelToolboxController::statusChanged( const css::frame::Fea
m_xSL->set_label(aStr);
m_xSL->SetOptimalSize();
Size aSize(m_xSL->GetSizePixel());
- long nWidth = !aStr.isEmpty() ? aSize.getWidth() : 16;
+ tools::Long nWidth = !aStr.isEmpty() ? aSize.getWidth() : 16;
m_xSL->SetSizePixel(Size(nWidth, aSize.Height()));
}
}
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 6bf96c7da461..cfacba152071 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -296,7 +296,7 @@ namespace svx
const XDash& rDash = aDashItem.GetDashValue();
XDashListRef xLineStyleList = pItem->GetDashList();
- for (long i = 0; i < xLineStyleList->Count(); ++i)
+ for (tools::Long i = 0; i < xLineStyleList->Count(); ++i)
{
const XDashEntry* pEntry = xLineStyleList->GetDash(i);
const XDash& rEntry = pEntry->GetDash();
diff --git a/svx/source/uitest/sdrobject.cxx b/svx/source/uitest/sdrobject.cxx
index d88ce6494c19..d58ecc36e76c 100644
--- a/svx/source/uitest/sdrobject.cxx
+++ b/svx/source/uitest/sdrobject.cxx
@@ -68,8 +68,8 @@ void SdrUIObject::execute(const OUString& rAction,
if (itrNY == rParameters.end())
throw css::uno::RuntimeException("missing parameter Y");
- long nX = itrNX->second.toInt32();
- long nY = itrNY->second.toInt32();
+ tools::Long nX = itrNX->second.toInt32();
+ tools::Long nY = itrNY->second.toInt32();
Size aMoveRange(nX, nY);
pObj->Move(aMoveRange);
}
@@ -83,8 +83,8 @@ void SdrUIObject::execute(const OUString& rAction,
if (itrNY == rParameters.end())
throw css::uno::RuntimeException("missing parameter Y");
- long nX = itrNX->second.toInt32();
- long nY = itrNY->second.toInt32();
+ tools::Long nX = itrNX->second.toInt32();
+ tools::Long nY = itrNY->second.toInt32();
Point aPos(nX, nY);
auto itrFracX = rParameters.find("FRAC_X");
@@ -138,8 +138,8 @@ void SdrUIObject::execute(const OUString& rAction,
if (itrNY == rParameters.end())
throw css::uno::RuntimeException("missing parameter Y");
- long nX = itrNX->second.toInt32();
- long nY = itrNY->second.toInt32();
+ tools::Long nX = itrNX->second.toInt32();
+ tools::Long nY = itrNY->second.toInt32();
Point aPos(nX, nY);
auto itrAngle = rParameters.find("ANGLE");
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 847ecbbd27bf..4180b33b0713 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -154,7 +154,7 @@ namespace {
virtual sal_Bool SAL_CALL supportsMimeType( const OUString& MimeTypeName ) override;
virtual Sequence< OUString > SAL_CALL getSupportedMimeTypeNames( ) override;
- VclPtr<VirtualDevice> CreatePageVDev( SdrPage* pPage, long nWidthPixel, long nHeightPixel ) const;
+ VclPtr<VirtualDevice> CreatePageVDev( SdrPage* pPage, tools::Long nWidthPixel, tools::Long nHeightPixel ) const;
DECL_LINK( CalcFieldValueHdl, EditFieldInfo*, void );
@@ -376,7 +376,7 @@ IMPL_LINK(GraphicExporter, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
@return the returned VirtualDevice is owned by the caller
*/
-VclPtr<VirtualDevice> GraphicExporter::CreatePageVDev( SdrPage* pPage, long nWidthPixel, long nHeightPixel ) const
+VclPtr<VirtualDevice> GraphicExporter::CreatePageVDev( SdrPage* pPage, tools::Long nWidthPixel, tools::Long nHeightPixel ) const
{
VclPtr<VirtualDevice> pVDev = VclPtr<VirtualDevice>::Create();
MapMode aMM( MapUnit::Map100thMM );
@@ -647,8 +647,8 @@ bool GraphicExporter::GetGraphic( ExportSettings const & rSettings, Graphic& aGr
// For gif pictures there can also be a vector format used (bTranslucent)
if ( !bVectorType && !rSettings.mbTranslucent )
{
- long nWidthPix = 0;
- long nHeightPix = 0;
+ tools::Long nWidthPix = 0;
+ tools::Long nHeightPix = 0;
if ( rSettings.mnWidth > 0 && rSettings.mnHeight > 0 )
{
nWidthPix = rSettings.mnWidth;
@@ -672,9 +672,9 @@ bool GraphicExporter::GetGraphic( ExportSettings const & rSettings, Graphic& aGr
double fHeightDif = static_cast<double>(aSizePix.Height()) / nHeightPix;
if (fWidthDif > fHeightDif)
- nHeightPix = static_cast<long>(aSizePix.Height() / fWidthDif);
+ nHeightPix = static_cast<tools::Long>(aSizePix.Height() / fWidthDif);
else
- nWidthPix = static_cast<long>(aSizePix.Width() / fHeightDif);
+ nWidthPix = static_cast<tools::Long>(aSizePix.Width() / fHeightDif);
}
else
{
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index 8068feee8ce9..acd7d6aac958 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -49,8 +49,8 @@ private:
XPropertyList* mpList;
sal_Int16 mnWhich;
- long getCount() const { return mpList ? mpList->Count() : 0; }
- const XPropertyEntry* get(long index) const;
+ tools::Long getCount() const { return mpList ? mpList->Count() : 0; }
+ const XPropertyEntry* get(tools::Long index) const;
public:
SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyList* pList ) throw();
@@ -86,7 +86,7 @@ SvxUnoXPropertyTable::SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyList* pLi
{
}
-const XPropertyEntry* SvxUnoXPropertyTable::get(long index) const
+const XPropertyEntry* SvxUnoXPropertyTable::get(tools::Long index) const
{
if( mpList )
return mpList->Get(index);
@@ -126,8 +126,8 @@ void SAL_CALL SvxUnoXPropertyTable::removeByName( const OUString& Name )
OUString aInternalName = SvxUnogetInternalNameForItem(mnWhich, Name);
- const long nCount = getCount();
- long i;
+ const tools::Long nCount = getCount();
+ tools::Long i;
for( i = 0; i < nCount; i++ )
{
const XPropertyEntry* pEntry = get(i);
@@ -148,8 +148,8 @@ void SAL_CALL SvxUnoXPropertyTable::replaceByName( const OUString& aName, const
OUString aInternalName = SvxUnogetInternalNameForItem(mnWhich, aName);
- const long nCount = getCount();
- long i;
+ const tools::Long nCount = getCount();
+ tools::Long i;
for( i = 0; i < nCount; i++ )
{
const XPropertyEntry* pEntry = get(i);
@@ -174,8 +174,8 @@ uno::Any SAL_CALL SvxUnoXPropertyTable::getByName( const OUString& aName )
OUString aInternalName = SvxUnogetInternalNameForItem(mnWhich, aName);
- const long nCount = getCount();
- long i;
+ const tools::Long nCount = getCount();
+ tools::Long i;
for( i = 0; i < nCount; i++ )
{
const XPropertyEntry* pEntry = get(i);
@@ -191,10 +191,10 @@ uno::Sequence< OUString > SAL_CALL SvxUnoXPropertyTable::getElementNames()
{
SolarMutexGuard aGuard;
- const long nCount = getCount();
+ const tools::Long nCount = getCount();
uno::Sequence< OUString > aNames( nCount );
OUString* pNames = aNames.getArray();
- long i;
+ tools::Long i;
for( i = 0; i < nCount; i++ )
{
const XPropertyEntry* pEntry = get(i);
@@ -212,8 +212,8 @@ sal_Bool SAL_CALL SvxUnoXPropertyTable::hasByName( const OUString& aName )
OUString aInternalName = SvxUnogetInternalNameForItem(mnWhich, aName);
- const long nCount = mpList?mpList->Count():0;
- long i;
+ const tools::Long nCount = mpList?mpList->Count():0;
+ tools::Long i;
for( i = 0; i < nCount; i++ )
{
const XPropertyEntry* pEntry = get(i);
diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx
index ec338a7d033b..1d50a7c3297f 100644
--- a/svx/source/unodraw/unoctabl.cxx
+++ b/svx/source/unodraw/unoctabl.cxx
@@ -103,7 +103,7 @@ void SAL_CALL SvxUnoColorTable::insertByName( const OUString& aName, const uno::
void SAL_CALL SvxUnoColorTable::removeByName( const OUString& Name )
{
- long nIndex = pList.is() ? pList->GetIndex( Name ) : -1;
+ tools::Long nIndex = pList.is() ? pList->GetIndex( Name ) : -1;
if( nIndex == -1 )
throw container::NoSuchElementException();
@@ -117,7 +117,7 @@ void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno:
if( !(aElement >>= nColor) )
throw lang::IllegalArgumentException();
- long nIndex = pList.is() ? pList->GetIndex( aName ) : -1;
+ tools::Long nIndex = pList.is() ? pList->GetIndex( aName ) : -1;
if( nIndex == -1 )
throw container::NoSuchElementException();
@@ -127,7 +127,7 @@ void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno:
// XNameAccess
uno::Any SAL_CALL SvxUnoColorTable::getByName( const OUString& aName )
{
- long nIndex = pList.is() ? pList->GetIndex( aName ) : -1;
+ tools::Long nIndex = pList.is() ? pList->GetIndex( aName ) : -1;
if( nIndex == -1 )
throw container::NoSuchElementException();
@@ -137,12 +137,12 @@ uno::Any SAL_CALL SvxUnoColorTable::getByName( const OUString& aName )
uno::Sequence< OUString > SAL_CALL SvxUnoColorTable::getElementNames()
{
- const long nCount = pList.is() ? pList->Count() : 0;
+ const tools::Long nCount = pList.is() ? pList->Count() : 0;
uno::Sequence< OUString > aSeq( nCount );
OUString* pStrings = aSeq.getArray();
- for( long nIndex = 0; nIndex < nCount; nIndex++ )
+ for( tools::Long nIndex = 0; nIndex < nCount; nIndex++ )
{
const XColorEntry* pEntry = pList->GetColor(nIndex);
pStrings[nIndex] = pEntry->GetName();
@@ -153,7 +153,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoColorTable::getElementNames()
sal_Bool SAL_CALL SvxUnoColorTable::hasByName( const OUString& aName )
{
- long nIndex = pList.is() ? pList->GetIndex( aName ) : -1;
+ tools::Long nIndex = pList.is() ? pList->GetIndex( aName ) : -1;
return nIndex != -1;
}
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index efaf53aa915c..0e3ce64a4166 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -411,8 +411,8 @@ void SvxDrawPage::SelectObjectsInView( const Reference< drawing::XShapes > & aSh
mpView->UnmarkAllObj( pPageView );
- long nCount = aShapes->getCount();
- for( long i = 0; i < nCount; i++ )
+ tools::Long nCount = aShapes->getCount();
+ for( tools::Long i = 0; i < nCount; i++ )
{
uno::Any aAny( aShapes->getByIndex(i) );
Reference< drawing::XShape > xShape;
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
index e93da8576007..c7d415e38975 100644
--- a/svx/source/unodraw/unoshap3.cxx
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -314,7 +314,7 @@ bool Svx3DSceneObject::setPropertyValueImpl( const OUString& rName, const SfxIte
basegfx::B3DPoint aCamPos(0.0, 0.0, fCamPosZ);
aCam.SetPosAndLookAt(aCamPos, aLookAt);
aCam.SetFocalLength(fCamFocal / 100.0);
- aCam.SetDeviceWindow(tools::Rectangle(0, 0, static_cast<long>(fW), static_cast<long>(fH)));
+ aCam.SetDeviceWindow(tools::Rectangle(0, 0, static_cast<tools::Long>(fW), static_cast<tools::Long>(fH)));
// set at scene
pScene->SetCamera(aCam);
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 860e6a24895b..9fbb60dbc55e 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1193,8 +1193,8 @@ void SAL_CALL SvxShape::setPosition( const awt::Point& Position )
if( GetSdrObject()->getSdrModelFromSdrObject().IsWriter() )
aLocalPos += GetSdrObject()->GetAnchorPos();
- long nDX = aLocalPos.X() - aRect.Left();
- long nDY = aLocalPos.Y() - aRect.Top();
+ tools::Long nDX = aLocalPos.X() - aRect.Left();
+ tools::Long nDY = aLocalPos.Y() - aRect.Top();
GetSdrObject()->Move( Size( nDX, nDY ) );
GetSdrObject()->getSdrModelFromSdrObject().SetChanged();
@@ -1466,7 +1466,7 @@ bool SvxShape::SetFillAttribute( sal_uInt16 nWID, const OUString& rName, SfxItem
if( !pBitmapList.is() )
return false;
- long nPos = pBitmapList->GetIndex(aStrName);
+ tools::Long nPos = pBitmapList->GetIndex(aStrName);
if( nPos == -1 )
return false;
@@ -1482,7 +1482,7 @@ bool SvxShape::SetFillAttribute( sal_uInt16 nWID, const OUString& rName, SfxItem
if( !pGradientList.is() )
return false;
- long nPos = pGradientList->GetIndex(aStrName);
+ tools::Long nPos = pGradientList->GetIndex(aStrName);
if( nPos == -1 )
return false;
@@ -1498,7 +1498,7 @@ bool SvxShape::SetFillAttribute( sal_uInt16 nWID, const OUString& rName, SfxItem
if( !pHatchList.is() )
return false;
- long nPos = pHatchList->GetIndex(aStrName);
+ tools::Long nPos = pHatchList->GetIndex(aStrName);
if( nPos == -1 )
return false;
@@ -1515,7 +1515,7 @@ bool SvxShape::SetFillAttribute( sal_uInt16 nWID, const OUString& rName, SfxItem
if( !pLineEndList.is() )
return false;
- long nPos = pLineEndList->GetIndex(aStrName);
+ tools::Long nPos = pLineEndList->GetIndex(aStrName);
if( nPos == -1 )
return false;
@@ -1540,7 +1540,7 @@ bool SvxShape::SetFillAttribute( sal_uInt16 nWID, const OUString& rName, SfxItem
if( !pDashList.is() )
return false;
- long nPos = pDashList->GetIndex(aStrName);
+ tools::Long nPos = pDashList->GetIndex(aStrName);
if( nPos == -1 )
return false;
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index 2b90d960e532..ffee17f79755 100644
--- a/svx/source/xoutdev/_xpoly.cxx
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -219,11 +219,11 @@ XPolygon::XPolygon( const tools::Polygon& rPoly )
}
/// create a rectangle (also with rounded corners) as a Bézier polygon
-XPolygon::XPolygon(const tools::Rectangle& rRect, long nRx, long nRy)
+XPolygon::XPolygon(const tools::Rectangle& rRect, tools::Long nRx, tools::Long nRy)
: pImpXPolygon( 17 )
{
- long nWh = (rRect.GetWidth() - 1) / 2;
- long nHh = (rRect.GetHeight() - 1) / 2;
+ tools::Long nWh = (rRect.GetWidth() - 1) / 2;
+ tools::Long nHh = (rRect.GetHeight() - 1) / 2;
if ( nRx > nWh ) nRx = nWh;
if ( nRy > nHh ) nRy = nHh;
@@ -232,8 +232,8 @@ XPolygon::XPolygon(const tools::Rectangle& rRect, long nRx, long nRy)
nRx = -nRx;
// factor for control points of the Bézier curve: 8/3 * (sin(45g) - 0.5)
- long nXHdl = static_cast<long>(0.552284749 * nRx);
- long nYHdl = static_cast<long>(0.552284749 * nRy);
+ tools::Long nXHdl = static_cast<tools::Long>(0.552284749 * nRx);
+ tools::Long nYHdl = static_cast<tools::Long>(0.552284749 * nRy);
sal_uInt16 nPos = 0;
if ( nRx && nRy )
@@ -279,7 +279,7 @@ XPolygon::XPolygon(const tools::Rectangle& rRect, long nRx, long nRy)
}
/// create an ellipse (curve) as Bézier polygon
-XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy,
+XPolygon::XPolygon(const Point& rCenter, tools::Long nRx, tools::Long nRy,
sal_uInt16 nStartAngle, sal_uInt16 nEndAngle, bool bClose)
: pImpXPolygon( 17 )
{
@@ -288,8 +288,8 @@ XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy,
bool bFull = (nStartAngle == 0 && nEndAngle == 3600);
// factor for control points of the Bézier curve: 8/3 * (sin(45g) - 0.5)
- long nXHdl = static_cast<long>(0.552284749 * nRx);
- long nYHdl = static_cast<long>(0.552284749 * nRy);
+ tools::Long nXHdl = static_cast<tools::Long>(0.552284749 * nRx);
+ tools::Long nYHdl = static_cast<tools::Long>(0.552284749 * nRy);
sal_uInt16 nPos = 0;
bool bLoopEnd = false;
@@ -378,7 +378,7 @@ void XPolygon::Remove( sal_uInt16 nPos, sal_uInt16 nCount )
pImpXPolygon->Remove( nPos, nCount );
}
-void XPolygon::Move( long nHorzMove, long nVertMove )
+void XPolygon::Move( tools::Long nHorzMove, tools::Long nVertMove )
{
if ( !nHorzMove && !nVertMove )
return;
@@ -511,33 +511,33 @@ void XPolygon::SubdivideBezier(sal_uInt16 nPos, bool bCalcFirst, double fT)
nPosInc = 1;
nIdxInc = 1;
}
- pPoints[nPos].setX( static_cast<long>(fU3 * pPoints[nIdx ].X() +
+ pPoints[nPos].setX( static_cast<tools::Long>(fU3 * pPoints[nIdx ].X() +
fT * fU2 * pPoints[nIdx+1].X() * 3 +
fT2 * fU * pPoints[nIdx+2].X() * 3 +
fT3 * pPoints[nIdx+3].X()) );
- pPoints[nPos].setY( static_cast<long>(fU3 * pPoints[nIdx ].Y() +
+ pPoints[nPos].setY( static_cast<tools::Long>(fU3 * pPoints[nIdx ].Y() +
fT * fU2 * pPoints[nIdx+1].Y() * 3 +
fT2 * fU * pPoints[nIdx+2].Y() * 3 +
fT3 * pPoints[nIdx+3].Y()) );
nPos = nPos + nPosInc;
nIdx = nIdx + nIdxInc;
- pPoints[nPos].setX( static_cast<long>(fU2 * pPoints[nIdx ].X() +
+ pPoints[nPos].setX( static_cast<tools::Long>(fU2 * pPoints[nIdx ].X() +
fT * fU * pPoints[nIdx+1].X() * 2 +
fT2 * pPoints[nIdx+2].X()) );
- pPoints[nPos].setY( static_cast<long>(fU2 * pPoints[nIdx ].Y() +
+ pPoints[nPos].setY( static_cast<tools::Long>(fU2 * pPoints[nIdx ].Y() +
fT * fU * pPoints[nIdx+1].Y() * 2 +
fT2 * pPoints[nIdx+2].Y()) );
nPos = nPos + nPosInc;
nIdx = nIdx + nIdxInc;
- pPoints[nPos].setX( static_cast<long>(fU * pPoints[nIdx ].X() +
+ pPoints[nPos].setX( static_cast<tools::Long>(fU * pPoints[nIdx ].X() +
fT * pPoints[nIdx+1].X()) );
- pPoints[nPos].setY( static_cast<long>(fU * pPoints[nIdx ].Y() +
+ pPoints[nPos].setY( static_cast<tools::Long>(fU * pPoints[nIdx ].Y() +
fT * pPoints[nIdx+1].Y()) );
}
/// Generate a Bézier arc
-void XPolygon::GenBezArc(const Point& rCenter, long nRx, long nRy,
- long nXHdl, long nYHdl, sal_uInt16 nStart, sal_uInt16 nEnd,
+void XPolygon::GenBezArc(const Point& rCenter, tools::Long nRx, tools::Long nRy,
+ tools::Long nXHdl, tools::Long nYHdl, sal_uInt16 nStart, sal_uInt16 nEnd,
sal_uInt16 nQuad, sal_uInt16 nFirst)
{
Point* pPoints = pImpXPolygon->pPointAry.get();
@@ -632,8 +632,8 @@ void XPolygon::CalcSmoothJoin(sal_uInt16 nCenter, sal_uInt16 nDrag, sal_uInt16 n
// keep the length if SMOOTH
if ( GetFlags(nCenter) == PolyFlags::Smooth || !IsControl(nDrag) )
{
- aDiff.setX( static_cast<long>(fRatio * aDiff.X()) );
- aDiff.setY( static_cast<long>(fRatio * aDiff.Y()) );
+ aDiff.setX( static_cast<tools::Long>(fRatio * aDiff.X()) );
+ aDiff.setY( static_cast<tools::Long>(fRatio * aDiff.Y()) );
}
pPoints[nPnt] = pPoints[nCenter] - aDiff;
}
@@ -665,10 +665,10 @@ void XPolygon::CalcTangent(sal_uInt16 nCenter, sal_uInt16 nPrev, sal_uInt16 nNex
fPrevLen = (fNextLen + fPrevLen) / 2;
fNextLen = fPrevLen;
}
- rNext.setX( rCenter.X() + static_cast<long>(fNextLen * aDiff.X()) );
- rNext.setY( rCenter.Y() + static_cast<long>(fNextLen * aDiff.Y()) );
- rPrev.setX( rCenter.X() - static_cast<long>(fPrevLen * aDiff.X()) );
- rPrev.setY( rCenter.Y() - static_cast<long>(fPrevLen * aDiff.Y()) );
+ rNext.setX( rCenter.X() + static_cast<tools::Long>(fNextLen * aDiff.X()) );
+ rNext.setY( rCenter.Y() + static_cast<tools::Long>(fNextLen * aDiff.Y()) );
+ rPrev.setX( rCenter.X() - static_cast<tools::Long>(fPrevLen * aDiff.X()) );
+ rPrev.setY( rCenter.Y() - static_cast<tools::Long>(fPrevLen * aDiff.Y()) );
}
/// convert four polygon points into a Bézier curve
@@ -732,8 +732,8 @@ void XPolygon::PointsToBezier(sal_uInt16 nFirst)
fY2 -= fY1 * fU2 / fT2;
fY2 -= fY3 * fT2 / (fU2 * 3);
- pPoints[nFirst+1] = Point(static_cast<long>(fX1), static_cast<long>(fY1));
- pPoints[nFirst+2] = Point(static_cast<long>(fX2), static_cast<long>(fY2));
+ pPoints[nFirst+1] = Point(static_cast<tools::Long>(fX1), static_cast<tools::Long>(fY1));
+ pPoints[nFirst+2] = Point(static_cast<tools::Long>(fX2), static_cast<tools::Long>(fY2));
SetFlags(nFirst+1, PolyFlags::Control);
SetFlags(nFirst+2, PolyFlags::Control);
}
@@ -748,8 +748,8 @@ void XPolygon::Scale(double fSx, double fSy)
for (sal_uInt16 i = 0; i < nPntCnt; i++)
{
Point& rPnt = pImpXPolygon->pPointAry[i];
- rPnt.setX( static_cast<long>(fSx * rPnt.X()) );
- rPnt.setY( static_cast<long>(fSy * rPnt.Y()) );
+ rPnt.setX( static_cast<tools::Long>(fSx * rPnt.X()) );
+ rPnt.setY( static_cast<tools::Long>(fSy * rPnt.Y()) );
}
}
@@ -768,8 +768,8 @@ void XPolygon::Distort(const tools::Rectangle& rRefRect,
{
pImpXPolygon->CheckPointDelete();
- long Xr, Wr;
- long Yr, Hr;
+ tools::Long Xr, Wr;
+ tools::Long Yr, Hr;
Xr = rRefRect.Left();
Yr = rRefRect.Top();
@@ -779,8 +779,8 @@ void XPolygon::Distort(const tools::Rectangle& rRefRect,
if ( !Wr || !Hr )
return;
- long X1, X2, X3, X4;
- long Y1, Y2, Y3, Y4;
+ tools::Long X1, X2, X3, X4;
+ tools::Long Y1, Y2, Y3, Y4;
DBG_ASSERT(rDistortedRect.pImpXPolygon->nPoints >= 4,
"Distort: rectangle too small");
@@ -805,9 +805,9 @@ void XPolygon::Distort(const tools::Rectangle& rRefRect,
fUx = 1.0 - fTx;
fUy = 1.0 - fTy;
- rPnt.setX( static_cast<long>( fUy * (fUx * X1 + fTx * X2) +
+ rPnt.setX( static_cast<tools::Long>( fUy * (fUx * X1 + fTx * X2) +
fTy * (fUx * X3 + fTx * X4) ) );
- rPnt.setY( static_cast<long>( fUx * (fUy * Y1 + fTy * Y3) +
+ rPnt.setY( static_cast<tools::Long>( fUx * (fUy * Y1 + fTy * Y3) +
fTx * (fUy * Y2 + fTy * Y4) ) );
}
}
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index f391a3fc9a34..9d70537d188c 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -90,7 +90,7 @@ using namespace ::com::sun::star;
typedef std::map<OUString, OUString> StringMap;
-static long ScaleMetricValue( long nVal, long nMul, long nDiv )
+static tools::Long ScaleMetricValue( tools::Long nVal, tools::Long nMul, tools::Long nDiv )
{
BigInt aVal( nVal );
@@ -103,7 +103,7 @@ static long ScaleMetricValue( long nVal, long nMul, long nDiv )
aVal/=nDiv;
- return long( aVal );
+ return tools::Long( aVal );
}
NameOrIndex::NameOrIndex(sal_uInt16 _nWhich, sal_Int32 nIndex) :
@@ -617,7 +617,7 @@ bool XLineDashItem::HasMetrics() const
return true;
}
-void XLineDashItem::ScaleMetrics(long nMul, long nDiv)
+void XLineDashItem::ScaleMetrics(tools::Long nMul, tools::Long nDiv)
{
aDash.SetDotLen( ScaleMetricValue( aDash.GetDotLen(), nMul, nDiv ) );
aDash.SetDashLen( ScaleMetricValue( aDash.GetDashLen(), nMul, nDiv ) );
@@ -892,7 +892,7 @@ std::unique_ptr<XLineDashItem> XLineDashItem::checkForUniqueItem( SdrModel* pMod
SfxPoolItem* XLineWidthItem::CreateDefault() {return new XLineWidthItem;}
-XLineWidthItem::XLineWidthItem(long nWidth) :
+XLineWidthItem::XLineWidthItem(tools::Long nWidth) :
SfxMetricItem(XATTR_LINEWIDTH, nWidth)
{
}
@@ -910,7 +910,7 @@ bool XLineWidthItem::GetPresentation
OUString& rText, const IntlWrapper& rIntl
) const
{
- rText = GetMetricText( static_cast<long>(GetValue()),
+ rText = GetMetricText( static_cast<tools::Long>(GetValue()),
eCoreUnit, ePresUnit, &rIntl) +
" " + EditResId( GetMetricId( ePresUnit) );
return true;
@@ -1577,7 +1577,7 @@ bool XLineEndItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId )
return true;
}
-XLineStartWidthItem::XLineStartWidthItem(long nWidth) :
+XLineStartWidthItem::XLineStartWidthItem(tools::Long nWidth) :
SfxMetricItem(XATTR_LINESTARTWIDTH, nWidth)
{
}
@@ -1595,7 +1595,7 @@ bool XLineStartWidthItem::GetPresentation
OUString& rText, const IntlWrapper& rIntl
) const
{
- rText = GetMetricText( static_cast<long>(GetValue()),
+ rText = GetMetricText( static_cast<tools::Long>(GetValue()),
eCoreUnit, ePresUnit, &rIntl) +
" " + EditResId( GetMetricId( ePresUnit) );
return true;
@@ -1615,7 +1615,7 @@ bool XLineStartWidthItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMemb
return true;
}
-XLineEndWidthItem::XLineEndWidthItem(long nWidth) :
+XLineEndWidthItem::XLineEndWidthItem(tools::Long nWidth) :
SfxMetricItem(XATTR_LINEENDWIDTH, nWidth)
{
}
@@ -1633,7 +1633,7 @@ bool XLineEndWidthItem::GetPresentation
OUString& rText, const IntlWrapper& rIntl
) const
{
- rText = GetMetricText( static_cast<long>(GetValue()),
+ rText = GetMetricText( static_cast<tools::Long>(GetValue()),
eCoreUnit, ePresUnit, &rIntl) +
" " + EditResId( GetMetricId( ePresUnit) );
return true;
@@ -2531,7 +2531,7 @@ boost::property_tree::ptree XFillFloatTransparenceItem::dumpAsJSON() const
return aTree;
}
-XHatch::XHatch(const Color& rCol, css::drawing::HatchStyle eTheStyle, long nTheDistance,
+XHatch::XHatch(const Color& rCol, css::drawing::HatchStyle eTheStyle, tools::Long nTheDistance,
Degree10 nTheAngle) :
eStyle(eTheStyle),
aColor(rCol),
@@ -2598,7 +2598,7 @@ bool XFillHatchItem::HasMetrics() const
return true;
}
-void XFillHatchItem::ScaleMetrics(long nMul, long nDiv)
+void XFillHatchItem::ScaleMetrics(tools::Long nMul, tools::Long nDiv)
{
aHatch.SetDistance( ScaleMetricValue( aHatch.GetDistance(), nMul, nDiv ) );
}
@@ -2848,7 +2848,7 @@ bool XFormTextAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*
SfxPoolItem* XFormTextDistanceItem::CreateDefault() { return new XFormTextDistanceItem; }
-XFormTextDistanceItem::XFormTextDistanceItem(long nDist) :
+XFormTextDistanceItem::XFormTextDistanceItem(tools::Long nDist) :
SfxMetricItem(XATTR_FORMTXTDISTANCE, nDist)
{
}
@@ -2860,7 +2860,7 @@ XFormTextDistanceItem* XFormTextDistanceItem::Clone(SfxItemPool* /*pPool*/) cons
SfxPoolItem* XFormTextStartItem::CreateDefault() { return new XFormTextStartItem; }
-XFormTextStartItem::XFormTextStartItem(long nStart) :
+XFormTextStartItem::XFormTextStartItem(tools::Long nStart) :
SfxMetricItem(XATTR_FORMTXTSTART, nStart)
{
}
@@ -2942,7 +2942,7 @@ XFormTextShadowColorItem* XFormTextShadowColorItem::Clone(SfxItemPool* /*pPool*/
SfxPoolItem* XFormTextShadowXValItem::CreateDefault() { return new XFormTextShadowXValItem; }
-XFormTextShadowXValItem::XFormTextShadowXValItem(long nVal) :
+XFormTextShadowXValItem::XFormTextShadowXValItem(tools::Long nVal) :
SfxMetricItem(XATTR_FORMTXTSHDWXVAL, nVal)
{
}
@@ -2954,7 +2954,7 @@ XFormTextShadowXValItem* XFormTextShadowXValItem::Clone(SfxItemPool* /*pPool*/)
SfxPoolItem* XFormTextShadowYValItem::CreateDefault() { return new XFormTextShadowYValItem; }
-XFormTextShadowYValItem::XFormTextShadowYValItem(long nVal) :
+XFormTextShadowYValItem::XFormTextShadowYValItem(tools::Long nVal) :
SfxMetricItem(XATTR_FORMTXTSHDWYVAL, nVal)
{
}
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index f3d57a06d407..d4c0b5022ff9 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -474,7 +474,7 @@ void XFillBmpPosItem::dumpAsXml(xmlTextWriterPtr pWriter) const
}
-XFillBmpSizeXItem::XFillBmpSizeXItem( long nSizeX ) :
+XFillBmpSizeXItem::XFillBmpSizeXItem( tools::Long nSizeX ) :
SfxMetricItem( XATTR_FILLBMP_SIZEX, nSizeX )
{
}
@@ -503,7 +503,7 @@ bool XFillBmpSizeXItem::HasMetrics() const
-XFillBmpSizeYItem::XFillBmpSizeYItem( long nSizeY ) :
+XFillBmpSizeYItem::XFillBmpSizeYItem( tools::Long nSizeY ) :
SfxMetricItem( XATTR_FILLBMP_SIZEY, nSizeY )
{
}
diff --git a/svx/source/xoutdev/xtabbtmp.cxx b/svx/source/xoutdev/xtabbtmp.cxx
index ec12ab073351..2d3adb4c067e 100644
--- a/svx/source/xoutdev/xtabbtmp.cxx
+++ b/svx/source/xoutdev/xtabbtmp.cxx
@@ -28,7 +28,7 @@
using namespace com::sun::star;
-XBitmapEntry* XBitmapList::GetBitmap(long nIndex) const
+XBitmapEntry* XBitmapList::GetBitmap(tools::Long nIndex) const
{
return static_cast<XBitmapEntry*>( XPropertyList::Get(nIndex) );
}
@@ -44,7 +44,7 @@ bool XBitmapList::Create()
return true;
}
-BitmapEx XBitmapList::CreateBitmap( long nIndex, const Size& rSize ) const
+BitmapEx XBitmapList::CreateBitmap( tools::Long nIndex, const Size& rSize ) const
{
OSL_ENSURE( nIndex < Count(), "Access out of range" );
@@ -83,9 +83,9 @@ BitmapEx XBitmapList::CreateBitmap( long nIndex, const Size& rSize ) const
{
const Size aBitmapSize(rBitmapEx.GetSizePixel());
- for(long y(0); y < rSize.Height(); y += aBitmapSize.Height())
+ for(tools::Long y(0); y < rSize.Height(); y += aBitmapSize.Height())
{
- for(long x(0); x < rSize.Width(); x += aBitmapSize.Width())
+ for(tools::Long x(0); x < rSize.Width(); x += aBitmapSize.Width())
{
pVirtualDevice->DrawBitmapEx(
Point(x, y),
@@ -100,14 +100,14 @@ BitmapEx XBitmapList::CreateBitmap( long nIndex, const Size& rSize ) const
return BitmapEx();
}
-BitmapEx XBitmapList::CreateBitmapForUI( long nIndex )
+BitmapEx XBitmapList::CreateBitmapForUI( tools::Long nIndex )
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
return CreateBitmap(nIndex, rSize);
}
-BitmapEx XBitmapList::GetBitmapForPreview( long nIndex, const Size& rSize )
+BitmapEx XBitmapList::GetBitmapForPreview( tools::Long nIndex, const Size& rSize )
{
return CreateBitmap(nIndex, rSize);
}
diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx
index 4fbd331e493b..3fe4947f2b03 100644
--- a/svx/source/xoutdev/xtabcolr.cxx
+++ b/svx/source/xoutdev/xtabcolr.cxx
@@ -43,11 +43,11 @@ XColorListRef XColorList::GetStdColorList()
return aTable;
}
-void XColorList::Replace(long nIndex, std::unique_ptr<XColorEntry> pEntry)
+void XColorList::Replace(tools::Long nIndex, std::unique_ptr<XColorEntry> pEntry)
{
XPropertyList::Replace(std::move(pEntry), nIndex);
}
-XColorEntry* XColorList::GetColor(long nIndex) const
+XColorEntry* XColorList::GetColor(tools::Long nIndex) const
{
return static_cast<XColorEntry*>( XPropertyList::Get(nIndex) );
}
@@ -153,14 +153,14 @@ bool XColorList::Create()
return(165 == Count());
}
-BitmapEx XColorList::CreateBitmapForUI( long /*nIndex*/ )
+BitmapEx XColorList::CreateBitmapForUI( tools::Long /*nIndex*/ )
{
return BitmapEx();
}
-long XColorList::GetIndexOfColor( const Color& rColor ) const
+tools::Long XColorList::GetIndexOfColor( const Color& rColor ) const
{
- for( long i = 0, n = maList.size(); i < n; ++i )
+ for( tools::Long i = 0, n = maList.size(); i < n; ++i )
{
const Color aColor = static_cast<XColorEntry*>( maList[i].get() )->GetColor();
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 896b3cbb496e..e70e4911b0c2 100644
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -50,12 +50,12 @@ XDashList::~XDashList()
{
}
-void XDashList::Replace(std::unique_ptr<XDashEntry> pEntry, long nIndex)
+void XDashList::Replace(std::unique_ptr<XDashEntry> pEntry, tools::Long nIndex)
{
XPropertyList::Replace(std::move(pEntry), nIndex);
}
-XDashEntry* XDashList::GetDash(long nIndex) const
+XDashEntry* XDashList::GetDash(tools::Long nIndex) const
{
return static_cast<XDashEntry*>( XPropertyList::Get(nIndex) );
}
@@ -180,7 +180,7 @@ BitmapEx XDashList::ImpCreateBitmapForXDash(const XDash* pDash)
return aRetval;
}
-BitmapEx XDashList::CreateBitmapForUI( long nIndex )
+BitmapEx XDashList::CreateBitmapForUI( tools::Long nIndex )
{
const XDash& rDash = GetDash(nIndex)->GetDash();
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index 990bed31172e..fbb69a0ddd77 100644
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -47,12 +47,12 @@ XGradientList::~XGradientList()
{
}
-void XGradientList::Replace(std::unique_ptr<XGradientEntry> pEntry, long nIndex)
+void XGradientList::Replace(std::unique_ptr<XGradientEntry> pEntry, tools::Long nIndex)
{
XPropertyList::Replace(std::move(pEntry), nIndex);
}
-XGradientEntry* XGradientList::GetGradient(long nIndex) const
+XGradientEntry* XGradientList::GetGradient(tools::Long nIndex) const
{
return static_cast<XGradientEntry*>( XPropertyList::Get( nIndex ) );
}
@@ -84,7 +84,7 @@ bool XGradientList::Create()
return true;
}
-BitmapEx XGradientList::CreateBitmap( long nIndex, const Size& rSize ) const
+BitmapEx XGradientList::CreateBitmap( tools::Long nIndex, const Size& rSize ) const
{
BitmapEx aRetval;
@@ -207,14 +207,14 @@ BitmapEx XGradientList::CreateBitmap( long nIndex, const Size& rSize ) const
return aRetval;
}
-BitmapEx XGradientList::CreateBitmapForUI(long nIndex)
+BitmapEx XGradientList::CreateBitmapForUI(tools::Long nIndex)
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
return CreateBitmap(nIndex, rSize);
}
-BitmapEx XGradientList::GetBitmapForPreview(long nIndex, const Size& rSize)
+BitmapEx XGradientList::GetBitmapForPreview(tools::Long nIndex, const Size& rSize)
{
return CreateBitmap(nIndex, rSize);
}
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index ded1bba8a5d2..1c1e0e42ba2b 100644
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -45,12 +45,12 @@ XHatchList::~XHatchList()
{
}
-void XHatchList::Replace(std::unique_ptr<XHatchEntry> pEntry, long nIndex)
+void XHatchList::Replace(std::unique_ptr<XHatchEntry> pEntry, tools::Long nIndex)
{
XPropertyList::Replace(std::move(pEntry), nIndex);
}
-XHatchEntry* XHatchList::GetHatch(long nIndex) const
+XHatchEntry* XHatchList::GetHatch(tools::Long nIndex) const
{
return static_cast<XHatchEntry*>( XPropertyList::Get(nIndex) );
}
@@ -76,7 +76,7 @@ bool XHatchList::Create()
return true;
}
-BitmapEx XHatchList::CreateBitmap( long nIndex, const Size& rSize) const
+BitmapEx XHatchList::CreateBitmap( tools::Long nIndex, const Size& rSize) const
{
BitmapEx aRetval;
OSL_ENSURE(nIndex < Count(), "OOps, access out of range (!)");
@@ -181,7 +181,7 @@ BitmapEx XHatchList::CreateBitmap( long nIndex, const Size& rSize) const
return aRetval;
}
-BitmapEx XHatchList::CreateBitmapForUI(long nIndex)
+BitmapEx XHatchList::CreateBitmapForUI(tools::Long nIndex)
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
@@ -189,7 +189,7 @@ BitmapEx XHatchList::CreateBitmapForUI(long nIndex)
return aRetVal;
}
-BitmapEx XHatchList::GetBitmapForPreview(long nIndex, const Size& rSize)
+BitmapEx XHatchList::GetBitmapForPreview(tools::Long nIndex, const Size& rSize)
{
return CreateBitmap(nIndex, rSize);
}
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index ad7c19b0f4cc..3bb6ca063765 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -108,7 +108,7 @@ XPropertyList::XPropertyList(
// fprintf (stderr, "Create type %d count %d\n", (int)meType, count++);
}
-bool XPropertyList::isValidIdx(long nIndex) const
+bool XPropertyList::isValidIdx(tools::Long nIndex) const
{
return (nIndex >= 0 && o3tl::make_unsigned(nIndex) < maList.size());
}
@@ -118,7 +118,7 @@ XPropertyList::~XPropertyList()
{
}
-long XPropertyList::Count() const
+tools::Long XPropertyList::Count() const
{
if( mbListDirty )
{
@@ -128,7 +128,7 @@ long XPropertyList::Count() const
return maList.size();
}
-XPropertyEntry* XPropertyList::Get( long nIndex ) const
+XPropertyEntry* XPropertyList::Get( tools::Long nIndex ) const
{
if( mbListDirty )
{
@@ -141,7 +141,7 @@ XPropertyEntry* XPropertyList::Get( long nIndex ) const
return maList[nIndex].get();
}
-long XPropertyList::GetIndex(const OUString& rName) const
+tools::Long XPropertyList::GetIndex(const OUString& rName) const
{
if( mbListDirty )
{
@@ -149,7 +149,7 @@ long XPropertyList::GetIndex(const OUString& rName) const
const_cast<XPropertyList*>(this)->Create();
}
- for( long i = 0, n = maList.size(); i < n; ++i ) {
+ for( tools::Long i = 0, n = maList.size(); i < n; ++i ) {
if (rName == maList[ i ]->GetName()) {
return i;
}
@@ -157,7 +157,7 @@ long XPropertyList::GetIndex(const OUString& rName) const
return -1;
}
-BitmapEx XPropertyList::GetUiBitmap( long nIndex ) const
+BitmapEx XPropertyList::GetUiBitmap( tools::Long nIndex ) const
{
BitmapEx aRetval;
if (!isValidIdx(nIndex))
@@ -174,7 +174,7 @@ BitmapEx XPropertyList::GetUiBitmap( long nIndex ) const
return aRetval;
}
-void XPropertyList::Insert(std::unique_ptr<XPropertyEntry> pEntry, long nIndex)
+void XPropertyList::Insert(std::unique_ptr<XPropertyEntry> pEntry, tools::Long nIndex)
{
if (!pEntry)
{
@@ -189,7 +189,7 @@ void XPropertyList::Insert(std::unique_ptr<XPropertyEntry> pEntry, long nIndex)
}
}
-void XPropertyList::Replace(std::unique_ptr<XPropertyEntry> pEntry, long nIndex)
+void XPropertyList::Replace(std::unique_ptr<XPropertyEntry> pEntry, tools::Long nIndex)
{
if (!pEntry)
{
@@ -205,7 +205,7 @@ void XPropertyList::Replace(std::unique_ptr<XPropertyEntry> pEntry, long nIndex)
maList[nIndex] = std::move(pEntry);
}
-void XPropertyList::Remove(long nIndex)
+void XPropertyList::Remove(tools::Long nIndex)
{
if (!isValidIdx(nIndex))
{
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx
index e8f73a996beb..7c4bca0186c9 100644
--- a/svx/source/xoutdev/xtablend.cxx
+++ b/svx/source/xoutdev/xtablend.cxx
@@ -45,7 +45,7 @@ XLineEndList::~XLineEndList()
{
}
-XLineEndEntry* XLineEndList::GetLineEnd(long nIndex) const
+XLineEndEntry* XLineEndList::GetLineEnd(tools::Long nIndex) const
{
return static_cast<XLineEndEntry*>( XPropertyList::Get(nIndex) );
}
@@ -79,7 +79,7 @@ bool XLineEndList::Create()
return true;
}
-BitmapEx XLineEndList::CreateBitmapForUI( long nIndex )
+BitmapEx XLineEndList::CreateBitmapForUI( tools::Long nIndex )
{
BitmapEx aRetval;
OSL_ENSURE(nIndex < Count(), "OOps, access out of range (!)");
diff --git a/svx/source/xoutdev/xtabptrn.cxx b/svx/source/xoutdev/xtabptrn.cxx
index 8a53168b491b..96e1d4b919c3 100644
--- a/svx/source/xoutdev/xtabptrn.cxx
+++ b/svx/source/xoutdev/xtabptrn.cxx
@@ -30,7 +30,7 @@
using namespace com::sun::star;
-XBitmapEntry* XPatternList::GetBitmap(long nIndex) const
+XBitmapEntry* XPatternList::GetBitmap(tools::Long nIndex) const
{
return static_cast<XBitmapEntry*>( XPropertyList::Get(nIndex) );
}
@@ -79,7 +79,7 @@ bool XPatternList::Create()
return true;
}
-BitmapEx XPatternList::CreateBitmap( long nIndex, const Size& rSize ) const
+BitmapEx XPatternList::CreateBitmap( tools::Long nIndex, const Size& rSize ) const
{
assert( nIndex < Count() );
@@ -118,9 +118,9 @@ BitmapEx XPatternList::CreateBitmap( long nIndex, const Size& rSize ) const
{
const Size aBitmapSize(rBitmapEx.GetSizePixel());
- for(long y(0); y < rSize.Height(); y += aBitmapSize.Height())
+ for(tools::Long y(0); y < rSize.Height(); y += aBitmapSize.Height())
{
- for(long x(0); x < rSize.Width(); x += aBitmapSize.Width())
+ for(tools::Long x(0); x < rSize.Width(); x += aBitmapSize.Width())
{
pVirtualDevice->DrawBitmapEx(
Point(x, y),
@@ -135,14 +135,14 @@ BitmapEx XPatternList::CreateBitmap( long nIndex, const Size& rSize ) const
return BitmapEx();
}
-BitmapEx XPatternList::CreateBitmapForUI( long nIndex )
+BitmapEx XPatternList::CreateBitmapForUI( tools::Long nIndex )
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
return CreateBitmap(nIndex, rSize);
}
-BitmapEx XPatternList::GetBitmapForPreview( long nIndex, const Size& rSize )
+BitmapEx XPatternList::GetBitmapForPreview( tools::Long nIndex, const Size& rSize )
{
return CreateBitmap(nIndex, rSize);
}