summaryrefslogtreecommitdiff
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
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>
-rw-r--r--compilerplugins/clang/toolslong.cxx556
-rw-r--r--drawinglayer/source/primitive2d/textprimitive2d.cxx3
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx8
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx26
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx9
-rw-r--r--drawinglayer/source/tools/wmfemfhelper.cxx2
-rw-r--r--include/cui/cuicharmap.hxx2
-rw-r--r--include/drawinglayer/primitive2d/textprimitive2d.hxx7
-rw-r--r--include/sfx2/templatelocalview.hxx4
-rw-r--r--include/svx/ChildrenManager.hxx7
-rw-r--r--include/svx/CommonStyleManager.hxx2
-rw-r--r--include/svx/IAccessibleParent.hxx3
-rw-r--r--include/svx/PaletteManager.hxx6
-rw-r--r--include/svx/ShapeTypeHandler.hxx5
-rw-r--r--include/svx/charmap.hxx8
-rw-r--r--include/svx/dialcontrol.hxx8
-rw-r--r--include/svx/dlgctrl.hxx14
-rw-r--r--include/svx/fmgridcl.hxx2
-rw-r--r--include/svx/fontwork.hxx8
-rw-r--r--include/svx/framelinkarray.hxx32
-rw-r--r--include/svx/frmsel.hxx4
-rw-r--r--include/svx/gridctrl.hxx34
-rw-r--r--include/svx/nbdtmg.hxx6
-rw-r--r--include/svx/obj3d.hxx2
-rw-r--r--include/svx/pagectrl.hxx82
-rw-r--r--include/svx/paraprev.hxx8
-rw-r--r--include/svx/pszctrl.hxx2
-rw-r--r--include/svx/rubydialog.hxx8
-rw-r--r--include/svx/ruler.hxx86
-rw-r--r--include/svx/rulritem.hxx98
-rw-r--r--include/svx/scene3d.hxx2
-rw-r--r--include/svx/sderitm.hxx2
-rw-r--r--include/svx/sdmetitm.hxx2
-rw-r--r--include/svx/sdsxyitm.hxx4
-rw-r--r--include/svx/sdtaaitm.hxx2
-rw-r--r--include/svx/sdtditm.hxx8
-rw-r--r--include/svx/sdtmfitm.hxx8
-rw-r--r--include/svx/sidebar/LinePropertyPanelBase.hxx2
-rw-r--r--include/svx/sidebar/LineWidthPopup.hxx4
-rw-r--r--include/svx/svddrag.hxx4
-rw-r--r--include/svx/svddrgmt.hxx4
-rw-r--r--include/svx/svdedtv.hxx10
-rw-r--r--include/svx/svdglev.hxx2
-rw-r--r--include/svx/svdglue.hxx16
-rw-r--r--include/svx/svdhdl.hxx4
-rw-r--r--include/svx/svdmodel.hxx12
-rw-r--r--include/svx/svdoashp.hxx6
-rw-r--r--include/svx/svdobj.hxx16
-rw-r--r--include/svx/svdocirc.hxx20
-rw-r--r--include/svx/svdoedge.hxx18
-rw-r--r--include/svx/svdogrp.hxx12
-rw-r--r--include/svx/svdomeas.hxx6
-rw-r--r--include/svx/svdopath.hxx4
-rw-r--r--include/svx/svdorect.hxx6
-rw-r--r--include/svx/svdotext.hxx28
-rw-r--r--include/svx/svdovirt.hxx12
-rw-r--r--include/svx/svdpoev.hxx2
-rw-r--r--include/svx/svdsnpv.hxx14
-rw-r--r--include/svx/svdtrans.hxx34
-rw-r--r--include/svx/svxdlg.hxx8
-rw-r--r--include/svx/sxcecitm.hxx4
-rw-r--r--include/svx/sxcgitm.hxx2
-rw-r--r--include/svx/sxciaitm.hxx4
-rw-r--r--include/svx/sxcllitm.hxx2
-rw-r--r--include/svx/sxelditm.hxx6
-rw-r--r--include/svx/sxenditm.hxx12
-rw-r--r--include/svx/sxmlhitm.hxx10
-rw-r--r--include/svx/sxmtfitm.hxx2
-rw-r--r--include/svx/xflbmsxy.hxx4
-rw-r--r--include/svx/xflhtit.hxx2
-rw-r--r--include/svx/xftdiit.hxx2
-rw-r--r--include/svx/xftshxy.hxx4
-rw-r--r--include/svx/xftstit.hxx2
-rw-r--r--include/svx/xhatch.hxx9
-rw-r--r--include/svx/xlndsit.hxx2
-rw-r--r--include/svx/xlnedwit.hxx2
-rw-r--r--include/svx/xlnstwit.hxx2
-rw-r--r--include/svx/xlnwtit.hxx2
-rw-r--r--include/svx/xpoly.hxx10
-rw-r--r--include/svx/xtable.hxx72
-rw-r--r--include/svx/zoomsliderctrl.hxx4
-rw-r--r--include/test/sheet/xsheetannotations.hxx3
-rw-r--r--include/toolkit/controls/unocontrol.hxx3
-rw-r--r--sfx2/source/control/templatelocalview.cxx2
-rw-r--r--sfx2/source/control/thumbnailview.cxx18
-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
-rw-r--r--toolkit/inc/helper/btndlg.hxx6
-rw-r--r--toolkit/inc/helper/scrollabledialog.hxx12
-rw-r--r--toolkit/source/awt/animatedimagespeer.cxx2
-rw-r--r--toolkit/source/awt/scrollabledialog.cxx14
-rw-r--r--toolkit/source/awt/vclxgraphics.cxx4
-rw-r--r--toolkit/source/awt/vclxspinbutton.cxx2
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx12
-rw-r--r--toolkit/source/awt/vclxwindows.cxx14
-rw-r--r--toolkit/source/controls/filectrl.cxx6
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx19
-rw-r--r--toolkit/source/helper/btndlg.cxx18
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx5
-rw-r--r--ucb/source/sorter/sortdynres.cxx5
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx5
-rw-r--r--ucb/source/ucp/webdav-neon/NeonSession.cxx5
-rw-r--r--uui/source/nameclashdlg.cxx6
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx8
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx4
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx2
-rw-r--r--writerfilter/source/dmapper/WrapPolygonHandler.cxx6
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx6
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.hxx3
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx2
-rw-r--r--writerperfect/inc/DirectoryStream.hxx5
-rw-r--r--writerperfect/inc/WPXSvInputStream.hxx5
-rw-r--r--writerperfect/qa/unit/WPXSvStreamTest.cxx6
-rw-r--r--writerperfect/source/calc/MSWorksCalcImportFilter.cxx4
-rw-r--r--writerperfect/source/common/DirectoryStream.cxx4
-rw-r--r--writerperfect/source/common/WPXSvInputStream.cxx25
-rw-r--r--xmloff/inc/RDFaExportHelper.hxx3
-rw-r--r--xmloff/source/core/xmlexp.cxx2
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx168
-rw-r--r--xmloff/source/text/txtlists.cxx3
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx2
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx2
284 files changed, 2859 insertions, 2279 deletions
diff --git a/compilerplugins/clang/toolslong.cxx b/compilerplugins/clang/toolslong.cxx
new file mode 100644
index 000000000000..591ce6a5cc7c
--- /dev/null
+++ b/compilerplugins/clang/toolslong.cxx
@@ -0,0 +1,556 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <algorithm>
+#include <cassert>
+#include <limits>
+#include <map>
+#include <string>
+#include <iostream>
+
+#include "clang/AST/Attr.h"
+#include "clang/Basic/Builtins.h"
+
+#include "check.hxx"
+#include "compat.hxx"
+#include "plugin.hxx"
+
+namespace
+{
+bool isLong(QualType type)
+{
+ type = type.getNonReferenceType();
+ // ignore sal_Int64
+ if (type->getAs<TypedefType>())
+ return false;
+ // some parts of the STL have ::difference_type => long
+ if (type->getAs<AutoType>() || type->getAs<DecltypeType>())
+ return false;
+ if (type->isSpecificBuiltinType(BuiltinType::Kind::Long))
+ return true;
+ auto arrayType = type->getAsArrayTypeUnsafe();
+ if (arrayType)
+ return isLong(arrayType->getElementType());
+ if (type->isPointerType())
+ return isLong(type->getPointeeType());
+ return false;
+}
+
+enum class OverrideKind
+{
+ NO,
+ YES,
+ MAYBE
+};
+
+OverrideKind getOverrideKind(FunctionDecl const* decl)
+{
+ CXXMethodDecl const* m = dyn_cast<CXXMethodDecl>(decl);
+ if (m == nullptr)
+ return OverrideKind::NO;
+ if (m->size_overridden_methods() != 0 || m->hasAttr<OverrideAttr>())
+ return OverrideKind::YES;
+ if (!dyn_cast<CXXRecordDecl>(m->getDeclContext())->hasAnyDependentBases())
+ return OverrideKind::NO;
+ return OverrideKind::MAYBE;
+}
+
+class ToolsLong : public loplugin::FilteringRewritePlugin<ToolsLong>
+{
+public:
+ explicit ToolsLong(loplugin::InstantiationData const& data)
+ : loplugin::FilteringRewritePlugin<ToolsLong>(data)
+ {
+ }
+
+ virtual void run() override;
+
+ bool VisitCStyleCastExpr(CStyleCastExpr* expr);
+
+ bool VisitCXXStaticCastExpr(CXXStaticCastExpr* expr);
+
+ bool VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr* expr);
+
+ bool WalkUpFromParmVarDecl(ParmVarDecl const* decl);
+ bool VisitParmVarDecl(ParmVarDecl const* decl);
+
+ bool WalkUpFromVarDecl(VarDecl const* decl);
+ bool VisitVarDecl(VarDecl const* decl);
+
+ bool WalkUpFromFieldDecl(FieldDecl const* decl);
+ bool VisitFieldDecl(FieldDecl const* decl);
+
+ bool WalkUpFromFunctionDecl(FunctionDecl const* decl);
+ bool VisitFunctionDecl(FunctionDecl const* decl);
+
+private:
+ bool rewrite(SourceLocation location);
+ bool isExcludedFile(SourceLocation spellingLocation) const;
+ /** sort by the reverse of source order, so we can do replacing from the end of the file backwards,
+ which means we reduce the chances of having overlapping changes. */
+ template <class T>
+ std::vector<std::pair<T, bool>> reverseSourceOrder(std::map<T, bool> const& map) const
+ {
+ std::vector<std::pair<T, bool>> vec(map.begin(), map.end());
+ std::sort(vec.begin(), vec.end(),
+ [&](std::pair<T, bool> const& lhs, std::pair<T, bool> const& rhs) {
+ return compiler.getSourceManager().getCharacterData(
+ compat::getBeginLoc(lhs.first))
+ > compiler.getSourceManager().getCharacterData(
+ compat::getBeginLoc(rhs.first));
+ });
+ return vec;
+ }
+
+ std::map<VarDecl const*, bool> varDecls_;
+ std::map<FieldDecl const*, bool> fieldDecls_;
+ std::map<ParmVarDecl const*, bool> parmVarDecls_;
+ std::map<FunctionDecl const*, bool> functionDecls_;
+ std::map<CXXStaticCastExpr const*, bool> staticCasts_;
+ std::map<CXXFunctionalCastExpr const*, bool> functionalCasts_;
+};
+
+void ToolsLong::run()
+{
+ if (!compiler.getLangOpts().CPlusPlus)
+ return;
+
+ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+
+ for (auto const& dcl : reverseSourceOrder(varDecls_))
+ {
+ auto const decl = dcl.first;
+ SourceLocation loc{ compat::getBeginLoc(decl) };
+ TypeSourceInfo* tsi = decl->getTypeSourceInfo();
+ if (tsi != nullptr)
+ {
+ SourceLocation l{ compiler.getSourceManager().getExpansionLoc(
+ tsi->getTypeLoc().getBeginLoc()) };
+ SourceLocation end{ compiler.getSourceManager().getExpansionLoc(
+ tsi->getTypeLoc().getEndLoc()) };
+ assert(l.isFileID() && end.isFileID());
+ if (l == end || compiler.getSourceManager().isBeforeInTranslationUnit(l, end))
+ {
+ for (;;)
+ {
+ unsigned n = Lexer::MeasureTokenLength(l, compiler.getSourceManager(),
+ compiler.getLangOpts());
+ std::string s{ compiler.getSourceManager().getCharacterData(l), n };
+ if (s == "long")
+ {
+ loc = l;
+ break;
+ }
+ if (l == end)
+ {
+ break;
+ }
+ l = l.getLocWithOffset(std::max<unsigned>(n, 1));
+ }
+ }
+ }
+ if (!rewrite(loc))
+ {
+ report(DiagnosticsEngine::Warning, "VarDecl, use \"tools::Long\" instead of %0", loc)
+ << decl->getType().getLocalUnqualifiedType() << decl->getSourceRange();
+ }
+ }
+ for (auto const& dcl : reverseSourceOrder(fieldDecls_))
+ {
+ auto const decl = dcl.first;
+ SourceLocation loc{ compat::getBeginLoc(decl) };
+ TypeSourceInfo* tsi = decl->getTypeSourceInfo();
+ if (tsi != nullptr)
+ {
+ SourceLocation l{ compiler.getSourceManager().getExpansionLoc(
+ tsi->getTypeLoc().getBeginLoc()) };
+ SourceLocation end{ compiler.getSourceManager().getExpansionLoc(
+ tsi->getTypeLoc().getEndLoc()) };
+ assert(l.isFileID() && end.isFileID());
+ if (l == end || compiler.getSourceManager().isBeforeInTranslationUnit(l, end))
+ {
+ for (;;)
+ {
+ unsigned n = Lexer::MeasureTokenLength(l, compiler.getSourceManager(),
+ compiler.getLangOpts());
+ std::string s{ compiler.getSourceManager().getCharacterData(l), n };
+ if (s == "long")
+ {
+ loc = l;
+ break;
+ }
+ if (l == end)
+ {
+ break;
+ }
+ l = l.getLocWithOffset(std::max<unsigned>(n, 1));
+ }
+ }
+ }
+ if (!rewrite(loc))
+ {
+ report(DiagnosticsEngine::Warning, "FieldDecl, use \"tools::Long\" instead of %0", loc)
+ << decl->getType().getLocalUnqualifiedType() << decl->getSourceRange();
+ }
+ }
+ for (auto const& dcl : reverseSourceOrder(parmVarDecls_))
+ {
+ auto const decl = dcl.first;
+ SourceLocation loc{ compat::getBeginLoc(decl) };
+ TypeSourceInfo* tsi = decl->getTypeSourceInfo();
+ if (tsi != nullptr)
+ {
+ SourceLocation l{ compiler.getSourceManager().getExpansionLoc(
+ tsi->getTypeLoc().getBeginLoc()) };
+ SourceLocation end{ compiler.getSourceManager().getExpansionLoc(
+ tsi->getTypeLoc().getEndLoc()) };
+ assert(l.isFileID() && end.isFileID());
+ if (l == end || (compiler.getSourceManager().isBeforeInTranslationUnit(l, end)))
+ {
+ for (;;)
+ {
+ unsigned n = Lexer::MeasureTokenLength(l, compiler.getSourceManager(),
+ compiler.getLangOpts());
+ std::string s{ compiler.getSourceManager().getCharacterData(l), n };
+ if (s == "long")
+ {
+ loc = l;
+ break;
+ }
+ if (l == end)
+ {
+ break;
+ }
+ l = l.getLocWithOffset(std::max<unsigned>(n, 1));
+ }
+ }
+ }
+ FunctionDecl const* f = dyn_cast_or_null<FunctionDecl>(decl->getDeclContext());
+ if (f)
+ f = f->getCanonicalDecl();
+ OverrideKind k = f ? getOverrideKind(f) : OverrideKind::NO;
+ if (k == OverrideKind::MAYBE || !rewrite(loc))
+ {
+ report(DiagnosticsEngine::Warning,
+ ("ParmVarDecl, use \"tools::Long\" instead of"
+ " %0%1"),
+ loc)
+ << decl->getType().getNonReferenceType().getLocalUnqualifiedType()
+ << (k == OverrideKind::MAYBE ? (" (unless this member function overrides a"
+ " dependent base member function, even"
+ " though it is not marked 'override')")
+ : "")
+ << decl->getSourceRange();
+ }
+ }
+ for (auto const& dcl : functionDecls_)
+ {
+ auto const decl = dcl.first;
+ SourceLocation loc{ compat::getBeginLoc(decl) };
+ SourceLocation l{ compiler.getSourceManager().getExpansionLoc(loc) };
+ SourceLocation end{ compiler.getSourceManager().getExpansionLoc(
+ decl->getNameInfo().getLoc()) };
+ assert(l.isFileID() && end.isFileID());
+ if (compiler.getSourceManager().isBeforeInTranslationUnit(l, end))
+ {
+ while (l != end)
+ {
+ unsigned n = Lexer::MeasureTokenLength(l, compiler.getSourceManager(),
+ compiler.getLangOpts());
+ std::string s{ compiler.getSourceManager().getCharacterData(l), n };
+ if (s == "long")
+ {
+ loc = l;
+ break;
+ }
+ l = l.getLocWithOffset(std::max<unsigned>(n, 1));
+ }
+ }
+ if (rewrite(loc))
+ continue;
+ report(DiagnosticsEngine::Warning, "use \"tools::Long\" instead of %0 as return type%1",
+ loc)
+ << decl->getReturnType().getNonReferenceType().getLocalUnqualifiedType()
+ << (getOverrideKind(decl) == OverrideKind::MAYBE
+ ? (" (unless this member function overrides a dependent"
+ " base member function, even though it is not marked"
+ " 'override')")
+ : "")
+ << decl->getSourceRange();
+ }
+
+ for (auto const& dcl : staticCasts_)
+ {
+ auto const expr = dcl.first;
+ SourceLocation loc{ compat::getBeginLoc(expr) };
+ TypeSourceInfo* tsi = expr->getTypeInfoAsWritten();
+ if (tsi != nullptr)
+ {
+ SourceLocation l{ compiler.getSourceManager().getExpansionLoc(
+ tsi->getTypeLoc().getBeginLoc()) };
+ SourceLocation end{ compiler.getSourceManager().getExpansionLoc(
+ tsi->getTypeLoc().getEndLoc()) };
+ assert(l.isFileID() && end.isFileID());
+ if (l == end || compiler.getSourceManager().isBeforeInTranslationUnit(l, end))
+ {
+ for (;;)
+ {
+ unsigned n = Lexer::MeasureTokenLength(l, compiler.getSourceManager(),
+ compiler.getLangOpts());
+ std::string s{ compiler.getSourceManager().getCharacterData(l), n };
+ if (s == "long")
+ {
+ loc = l;
+ break;
+ }
+ if (l == end)
+ {
+ break;
+ }
+ l = l.getLocWithOffset(std::max<unsigned>(n, 1));
+ }
+ }
+ }
+ if (!rewrite(loc))
+ {
+ report(DiagnosticsEngine::Warning, "CXXStaticCastExpr, suspicious cast from %0 to %1",
+ compat::getBeginLoc(expr))
+ << expr->getSubExpr()->IgnoreParenImpCasts()->getType() << expr->getType()
+ << expr->getSourceRange();
+ }
+ }
+
+ for (auto const& dcl : functionalCasts_)
+ {
+ auto const expr = dcl.first;
+ SourceLocation loc{ compat::getBeginLoc(expr) };
+ TypeSourceInfo* tsi = expr->getTypeInfoAsWritten();
+ if (tsi != nullptr)
+ {
+ SourceLocation l{ compiler.getSourceManager().getExpansionLoc(
+ tsi->getTypeLoc().getBeginLoc()) };
+ SourceLocation end{ compiler.getSourceManager().getExpansionLoc(
+ tsi->getTypeLoc().getEndLoc()) };
+ assert(l.isFileID() && end.isFileID());
+ if (l == end || compiler.getSourceManager().isBeforeInTranslationUnit(l, end))
+ {
+ for (;;)
+ {
+ unsigned n = Lexer::MeasureTokenLength(l, compiler.getSourceManager(),
+ compiler.getLangOpts());
+ std::string s{ compiler.getSourceManager().getCharacterData(l), n };
+ if (s == "long")
+ {
+ loc = l;
+ break;
+ }
+ if (l == end)
+ {
+ break;
+ }
+ l = l.getLocWithOffset(std::max<unsigned>(n, 1));
+ }
+ }
+ }
+ if (!rewrite(loc))
+ {
+ report(DiagnosticsEngine::Warning,
+ "CXXFunctionalCastExpr, suspicious cast from %0 to %1",
+ compat::getBeginLoc(expr))
+ << expr->getSubExpr()->IgnoreParenImpCasts()->getType() << expr->getType()
+ << expr->getSourceRange();
+ }
+ }
+}
+
+bool ToolsLong::VisitCStyleCastExpr(CStyleCastExpr* expr)
+{
+ if (ignoreLocation(expr))
+ return true;
+ if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr))))
+ return true;
+ auto const k = isLong(expr->getType());
+ if (!k)
+ return true;
+ SourceLocation loc{ compat::getBeginLoc(expr) };
+ while (compiler.getSourceManager().isMacroArgExpansion(loc))
+ loc = compiler.getSourceManager().getImmediateMacroCallerLoc(loc);
+ report(DiagnosticsEngine::Warning, "CStyleCastExpr, suspicious cast from %0 to %1",
+ compat::getBeginLoc(expr))
+ << expr->getSubExpr()->IgnoreParenImpCasts()->getType() << expr->getType()
+ << expr->getSourceRange();
+ return true;
+}
+
+bool ToolsLong::VisitCXXStaticCastExpr(CXXStaticCastExpr* expr)
+{
+ if (ignoreLocation(expr))
+ return true;
+ if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr))))
+ return true;
+ auto const k = isLong(expr->getType());
+ if (!k)
+ return true;
+ staticCasts_.insert({ expr, k });
+ return true;
+}
+
+bool ToolsLong::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr* expr)
+{
+ if (ignoreLocation(expr))
+ return true;
+ if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr))))
+ return true;
+ auto const k = isLong(expr->getType());
+ if (!k)
+ return true;
+ functionalCasts_.insert({ expr, k });
+ return true;
+}
+
+bool ToolsLong::WalkUpFromParmVarDecl(ParmVarDecl const* decl) { return VisitParmVarDecl(decl); }
+
+bool ToolsLong::VisitParmVarDecl(ParmVarDecl const* decl)
+{
+ if (ignoreLocation(decl))
+ return true;
+ if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(decl->getLocation())))
+ return true;
+ auto const fbk = isLong(decl->getType());
+ if (!fbk)
+ return true;
+ FunctionDecl const* f = dyn_cast<FunctionDecl>(decl->getDeclContext());
+ if (f) // e.g.: typedef sal_Bool (* FuncPtr )( sal_Bool );
+ {
+ auto canonicalF = f->getCanonicalDecl();
+ if (canonicalF->isDeletedAsWritten() && isa<CXXConversionDecl>(canonicalF))
+ return true;
+ // Only rewrite declarations in include files if a definition is
+ // also seen, to avoid compilation of a definition (in a main file
+ // only processed later) to fail with a "mismatch" error before the
+ // rewriter had a chance to act upon the definition (but use the
+ // heuristic of assuming pure virtual functions do not have
+ // definitions):
+ bool ok = canonicalF->isDefined() || canonicalF->isPure()
+ || compiler.getSourceManager().isInMainFile(
+ compiler.getSourceManager().getSpellingLoc(f->getNameInfo().getLoc()));
+ if (!ok)
+ return true;
+ }
+ parmVarDecls_.insert({ decl, fbk });
+ return true;
+}
+
+bool ToolsLong::WalkUpFromVarDecl(VarDecl const* decl) { return VisitVarDecl(decl); }
+
+bool ToolsLong::VisitVarDecl(VarDecl const* decl)
+{
+ if (ignoreLocation(decl))
+ return true;
+ if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(decl->getLocation())))
+ return true;
+ auto k = isLong(decl->getType());
+ if (!k)
+ return true;
+ varDecls_.insert({ decl, k });
+ return true;
+}
+
+bool ToolsLong::WalkUpFromFieldDecl(FieldDecl const* decl) { return VisitFieldDecl(decl); }
+
+bool ToolsLong::VisitFieldDecl(FieldDecl const* decl)
+{
+ if (ignoreLocation(decl))
+ return true;
+ if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(decl->getLocation())))
+ return true;
+ auto k = isLong(decl->getType());
+ if (!k)
+ return true;
+ TagDecl const* td = dyn_cast<TagDecl>(decl->getDeclContext());
+ if (td == nullptr)
+ {
+ //TODO: ObjCInterface
+ return true;
+ }
+ fieldDecls_.insert({ decl, k });
+ return true;
+}
+
+bool ToolsLong::WalkUpFromFunctionDecl(FunctionDecl const* decl) { return VisitFunctionDecl(decl); }
+
+bool ToolsLong::VisitFunctionDecl(FunctionDecl const* decl)
+{
+ if (ignoreLocation(decl))
+ return true;
+ if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(decl->getLocation())))
+ return true;
+ auto const fbk = isLong(decl->getReturnType());
+ if (!fbk)
+ return true;
+ if (decl->isDeletedAsWritten() && isa<CXXConversionDecl>(decl))
+ return true;
+ if (decl->isPure() || decl->isDefined()
+ || compiler.getSourceManager().isInMainFile(
+ compiler.getSourceManager().getSpellingLoc(decl->getNameInfo().getLoc())))
+ {
+ functionDecls_.insert({ decl, fbk });
+ }
+ return true;
+}
+
+bool ToolsLong::rewrite(SourceLocation location)
+{
+ if (rewriter != nullptr)
+ {
+ SourceLocation loc{ compiler.getSourceManager().getExpansionLoc(location) };
+ unsigned n
+ = Lexer::MeasureTokenLength(loc, compiler.getSourceManager(), compiler.getLangOpts());
+ if (std::string(compiler.getSourceManager().getCharacterData(loc), n) == "long")
+ {
+ return replaceText(loc, n, "tools::Long");
+ }
+ }
+ return false;
+}
+
+bool ToolsLong::isExcludedFile(SourceLocation spellingLocation) const
+{
+ if (isInUnoIncludeFile(spellingLocation))
+ return true;
+ auto f = getFilenameOfLocation(spellingLocation);
+ return loplugin::hasPathnamePrefix(f, SRCDIR "/include/cppu/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/include/cppuhelper/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/include/registry/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/include/osl/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/include/rtl/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/include/sal/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/include/salhelper/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/include/typelib/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/include/LibreOfficeKit/") // TODO
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/bridges/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/codemaker/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/configmgr/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/cppu/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/cppuhelper/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/external/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/libreofficekit/") // TODO
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/registry/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/rtl/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/sal/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/salhelper/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/soltools/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/unoidl/")
+ || loplugin::hasPathnamePrefix(f, SRCDIR "/workdir/");
+}
+
+loplugin::Plugin::Registration<ToolsLong> X("toolslong", true);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index a756fc22899c..1cd145c33839 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -202,7 +202,8 @@ TextSimplePortionPrimitive2D::TextSimplePortionPrimitive2D(
const basegfx::B2DHomMatrix& rNewTransform, const OUString& rText, sal_Int32 nTextPosition,
sal_Int32 nTextLength, const std::vector<double>& rDXArray,
const attribute::FontAttribute& rFontAttribute, const css::lang::Locale& rLocale,
- const basegfx::BColor& rFontColor, bool bFilled, long nWidthToFill, const Color& rTextFillColor)
+ const basegfx::BColor& rFontColor, bool bFilled, tools::Long nWidthToFill,
+ const Color& rTextFillColor)
: BufferedDecompositionPrimitive2D()
, maTextTransform(rNewTransform)
, maText(rText)
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 13883b50412f..04603bc03f77 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -2331,10 +2331,10 @@ VclMetafileProcessor2D::CreateBufferDevice(const basegfx::B2DRange& rCandidateRa
constexpr double fMaxQuadratPixels = 500000;
basegfx::B2DRange aViewRange(rCandidateRange);
aViewRange.transform(maCurrentTransformation);
- rRectLogic = tools::Rectangle(static_cast<long>(std::floor(aViewRange.getMinX())),
- static_cast<long>(std::floor(aViewRange.getMinY())),
- static_cast<long>(std::ceil(aViewRange.getMaxX())),
- static_cast<long>(std::ceil(aViewRange.getMaxY())));
+ rRectLogic = tools::Rectangle(static_cast<tools::Long>(std::floor(aViewRange.getMinX())),
+ static_cast<tools::Long>(std::floor(aViewRange.getMinY())),
+ static_cast<tools::Long>(std::ceil(aViewRange.getMaxX())),
+ static_cast<tools::Long>(std::ceil(aViewRange.getMaxY())));
const tools::Rectangle aRectPixel(mpOutputDevice->LogicToPixel(rRectLogic));
rSizePixel = aRectPixel.GetSize();
const double fViewVisibleArea(rSizePixel.getWidth() * rSizePixel.getHeight());
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 1e5a04baf30d..266e118f19ef 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -1045,10 +1045,11 @@ void VclPixelProcessor2D::processGlowPrimitive2D(const primitive2d::GlowPrimitiv
bitmapRange.intersect(viewRange);
if (!bitmapRange.isEmpty())
{
- const tools::Rectangle aRect(static_cast<long>(std::floor(bitmapRange.getMinX())),
- static_cast<long>(std::floor(bitmapRange.getMinY())),
- static_cast<long>(std::ceil(bitmapRange.getMaxX())),
- static_cast<long>(std::ceil(bitmapRange.getMaxY())));
+ const tools::Rectangle aRect(
+ static_cast<tools::Long>(std::floor(bitmapRange.getMinX())),
+ static_cast<tools::Long>(std::floor(bitmapRange.getMinY())),
+ static_cast<tools::Long>(std::ceil(bitmapRange.getMaxX())),
+ static_cast<tools::Long>(std::ceil(bitmapRange.getMaxY())));
BitmapEx bmpEx = mpOutputDevice->GetBitmapEx(aRect.TopLeft(), aRect.GetSize());
mpOutputDevice->SetAntialiasing(aPrevAA);
@@ -1106,10 +1107,11 @@ void VclPixelProcessor2D::processSoftEdgePrimitive2D(
bitmapRange.intersect(viewRange);
if (!bitmapRange.isEmpty())
{
- const tools::Rectangle aRect(static_cast<long>(std::floor(bitmapRange.getMinX())),
- static_cast<long>(std::floor(bitmapRange.getMinY())),
- static_cast<long>(std::ceil(bitmapRange.getMaxX())),
- static_cast<long>(std::ceil(bitmapRange.getMaxY())));
+ const tools::Rectangle aRect(
+ static_cast<tools::Long>(std::floor(bitmapRange.getMinX())),
+ static_cast<tools::Long>(std::floor(bitmapRange.getMinY())),
+ static_cast<tools::Long>(std::ceil(bitmapRange.getMaxX())),
+ static_cast<tools::Long>(std::ceil(bitmapRange.getMaxY())));
BitmapEx bitmap = mpOutputDevice->GetBitmapEx(aRect.TopLeft(), aRect.GetSize());
AlphaMask aMask = bitmap.GetAlpha();
@@ -1155,10 +1157,10 @@ void VclPixelProcessor2D::processShadowPrimitive2D(const primitive2d::ShadowPrim
process(rCandidate);
- const tools::Rectangle aRect(static_cast<long>(std::floor(aRange.getMinX())),
- static_cast<long>(std::floor(aRange.getMinY())),
- static_cast<long>(std::ceil(aRange.getMaxX())),
- static_cast<long>(std::ceil(aRange.getMaxY())));
+ const tools::Rectangle aRect(static_cast<tools::Long>(std::floor(aRange.getMinX())),
+ static_cast<tools::Long>(std::floor(aRange.getMinY())),
+ static_cast<tools::Long>(std::ceil(aRange.getMaxX())),
+ static_cast<tools::Long>(std::ceil(aRange.getMaxY())));
BitmapEx bitmapEx = mpOutputDevice->GetBitmapEx(aRect.TopLeft(), aRect.GetSize());
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 042ca9d765cd..9f5f5d77c0d5 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -290,7 +290,8 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
sal_Int32 nPos = rTextCandidate.getTextPosition();
sal_Int32 nLen = rTextCandidate.getTextLength();
- long* pDXArray = !aTransformedDXArray.empty() ? aTransformedDXArray.data() : nullptr;
+ tools::Long* pDXArray
+ = !aTransformedDXArray.empty() ? aTransformedDXArray.data() : nullptr;
if (rTextCandidate.isFilled())
{
@@ -299,12 +300,12 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
rTextCandidate.getTextTransform().decompose(aOldFontScaling, aOldTranslate,
fOldRotate, fOldShearX);
- long nWidthToFill = static_cast<long>(
+ tools::Long nWidthToFill = static_cast<tools::Long>(
rTextCandidate.getWidthToFill() * aFontScaling.getX() / aOldFontScaling.getX());
- long nWidth
+ tools::Long nWidth
= mpOutputDevice->GetTextArray(rTextCandidate.getText(), pDXArray, 0, 1);
- long nChars = 2;
+ tools::Long nChars = 2;
if (nWidth)
nChars = nWidthToFill / nWidth;
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx
index 60bf9ea6ae9f..8439b10957de 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -1844,7 +1844,7 @@ namespace wmfemfhelper
{
// prepare DXArray (if used)
std::vector< double > aDXArray;
- long* pDXArray = pA->GetDXArray();
+ tools::Long* pDXArray = pA->GetDXArray();
if(pDXArray)
{
diff --git a/include/cui/cuicharmap.hxx b/include/cui/cuicharmap.hxx
index 76dd6c637f62..4548f7013e87 100644
--- a/include/cui/cuicharmap.hxx
+++ b/include/cui/cuicharmap.hxx
@@ -47,7 +47,7 @@ class CUI_DLLPUBLIC SvxShowText final : public weld::CustomWidgetController
private:
ScopedVclPtr<VirtualDevice> m_xVirDev;
OUString m_sText;
- long mnY;
+ tools::Long mnY;
bool mbCenter;
vcl::Font m_aFont;
diff --git a/include/drawinglayer/primitive2d/textprimitive2d.hxx b/include/drawinglayer/primitive2d/textprimitive2d.hxx
index 6bbc14aa498a..516d715c93d6 100644
--- a/include/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -27,6 +27,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <rtl/ustring.hxx>
#include <tools/color.hxx>
+#include <tools/long.hxx>
#include <basegfx/color/bcolor.hxx>
#include <com/sun/star/lang/Locale.hpp>
#include <vector>
@@ -119,7 +120,7 @@ private:
bool mbFilled;
// the width to fill
- long mnWidthToFill;
+ tools::Long mnWidthToFill;
/// The fill color of the text
Color maTextFillColor;
@@ -141,7 +142,7 @@ public:
const attribute::FontAttribute& rFontAttribute,
const css::lang::Locale& rLocale,
const basegfx::BColor& rFontColor, bool bFilled = false,
- long nWidthToFill = 0,
+ tools::Long nWidthToFill = 0,
const Color& rTextFillColor = COL_TRANSPARENT);
/** get text outlines as polygons and their according ObjectTransformation. Handles all
@@ -161,7 +162,7 @@ public:
const basegfx::BColor& getFontColor() const { return maFontColor; }
const Color& getTextFillColor() const { return maTextFillColor; }
bool isFilled() const { return mbFilled; }
- long getWidthToFill() const { return mnWidthToFill; }
+ tools::Long getWidthToFill() const { return mnWidthToFill; }
/// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index d77a7c781eb4..69019ab2451c 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -165,8 +165,8 @@ protected:
TemplateViewItem *maSelectedItem;
- long mnThumbnailWidth;
- long mnThumbnailHeight;
+ tools::Long mnThumbnailWidth;
+ tools::Long mnThumbnailHeight;
Point maPosition; //store the point of click event
diff --git a/include/svx/ChildrenManager.hxx b/include/svx/ChildrenManager.hxx
index 14a90c7549bf..f7cdd01c0cfc 100644
--- a/include/svx/ChildrenManager.hxx
+++ b/include/svx/ChildrenManager.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ref.hxx>
#include <svx/svxdllapi.h>
+#include <tools/long.hxx>
namespace com::sun::star {
namespace accessibility { class XAccessible; }
@@ -110,7 +111,7 @@ public:
@return
If there are no children a 0 is returned.
*/
- long GetChildCount() const throw ();
+ tools::Long GetChildCount() const throw ();
/** Return the requested accessible child or throw and
IndexOutOfBoundsException if the given index is invalid.
@@ -127,10 +128,10 @@ public:
*/
css::uno::Reference<
css::accessibility::XAccessible>
- GetChild (long nIndex);
+ GetChild (tools::Long nIndex);
/// @throws css::lang::IndexOutOfBoundsException
/// @throws css::uno::RuntimeException
- css::uno::Reference< css::drawing::XShape> GetChildShape (long nIndex);
+ css::uno::Reference< css::drawing::XShape> GetChildShape (tools::Long nIndex);
/** Update the child manager. Take care of a modified set of children
and modified visible area. This method can optimize the update
diff --git a/include/svx/CommonStyleManager.hxx b/include/svx/CommonStyleManager.hxx
index b7820beb5e07..a7f2a7ae3ce2 100644
--- a/include/svx/CommonStyleManager.hxx
+++ b/include/svx/CommonStyleManager.hxx
@@ -31,7 +31,7 @@ public:
virtual std::unique_ptr<sfx2::StylePreviewRenderer> CreateStylePreviewRenderer(
OutputDevice& rOutputDev, SfxStyleSheetBase* pStyle,
- long nMaxHeight) override;
+ tools::Long nMaxHeight) override;
};
} // end namespace svx
diff --git a/include/svx/IAccessibleParent.hxx b/include/svx/IAccessibleParent.hxx
index 19284a7d0ce7..50530c0a0f85 100644
--- a/include/svx/IAccessibleParent.hxx
+++ b/include/svx/IAccessibleParent.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SVX_IACCESSIBLEPARENT_HXX
#include <com/sun/star/uno/Reference.hxx>
+#include <tools/long.hxx>
namespace accessibility { class AccessibleControlShape; }
namespace com::sun::star::accessibility { class XAccessible; }
@@ -80,7 +81,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
) = 0;
//Add this method to support Form Controls
diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index 637f7d0e1a40..dbcf789f5cfd 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -38,7 +38,7 @@ class SVXCORE_DLLPUBLIC PaletteManager
sal_uInt16 mnNumOfPalettes;
sal_uInt16 mnCurrentPalette;
- long mnColorCount;
+ tools::Long mnColorCount;
svx::ToolboxButtonColorUpdaterBase* mpBtnUpdater;
XColorListRef pColorList;
@@ -62,8 +62,8 @@ public:
OUString GetPaletteName();
OUString GetSelectedPalettePath();
- long GetColorCount() const;
- long GetRecentColorCount() const;
+ tools::Long GetColorCount() const;
+ tools::Long GetRecentColorCount() const;
void AddRecentColor(const Color& rRecentColor, const OUString& rColorName, bool bFront = true);
void SetBtnUpdater(svx::ToolboxButtonColorUpdaterBase* pBtnUpdater);
diff --git a/include/svx/ShapeTypeHandler.hxx b/include/svx/ShapeTypeHandler.hxx
index b58463879f55..ccf61121876f 100644
--- a/include/svx/ShapeTypeHandler.hxx
+++ b/include/svx/ShapeTypeHandler.hxx
@@ -24,6 +24,7 @@
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
+#include <tools/long.hxx>
#include <unordered_map>
#include <vector>
@@ -178,7 +179,7 @@ private:
Returns the slot id of the shape with the given service name or
0 when the service name is not known.
*/
- SVX_DLLPRIVATE long GetSlotId (const OUString& aServiceName) const;
+ SVX_DLLPRIVATE tools::Long GetSlotId (const OUString& aServiceName) const;
/** Determine the slot id of the specified shape type. With this id
internal methods can access the associated type descriptor.
@@ -188,7 +189,7 @@ private:
Returns the slot id of the shape with the given service name or
0 when the service name is not known.
*/
- SVX_DLLPRIVATE long GetSlotId (const css::uno::Reference<
+ SVX_DLLPRIVATE tools::Long GetSlotId (const css::uno::Reference<
css::drawing::XShape>& rxShape) const;
};
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index 4b47a785b860..25341d5f8e8c 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -129,10 +129,10 @@ protected:
rtl::Reference<svx::SvxShowCharSetAcc> m_xAccessible;
uno::Reference< uno::XComponentContext > mxContext;
- long nX;
- long nY;
- long m_nXGap;
- long m_nYGap;
+ tools::Long nX;
+ tools::Long nY;
+ tools::Long m_nXGap;
+ tools::Long m_nYGap;
bool bDrag;
sal_Int32 nSelectedIndex;
diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx
index 29c255506c89..3c5435bb9787 100644
--- a/include/svx/dialcontrol.hxx
+++ b/include/svx/dialcontrol.hxx
@@ -54,8 +54,8 @@ private:
tools::Rectangle maRect;
bool mbEnabled;
OutputDevice& mrParent;
- long mnCenterX;
- long mnCenterY;
+ tools::Long mnCenterX;
+ tools::Long mnCenterY;
};
/** This control allows to input a rotation angle, visualized by a dial.
@@ -141,8 +141,8 @@ private:
sal_Int32 mnAngle;
sal_Int32 mnInitialAngle;
sal_Int32 mnOldAngle;
- long mnCenterX;
- long mnCenterY;
+ tools::Long mnCenterX;
+ tools::Long mnCenterY;
bool mbNoRot;
explicit DialControl_Impl(OutputDevice& rReference);
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 3fd0dc2f8b9e..1aefcd2fff32 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -194,16 +194,16 @@ public:
virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;
a11yrelationset get_accessible_relation_set() const { return GetDrawingArea()->get_accessible_relation_set(); }
- static long GetSquares() { return nSquares ; }
- long GetWidth() const { return aRectSize.getWidth() ; }
- long GetHeight() const { return aRectSize.getHeight() ; }
+ static tools::Long GetSquares() { return nSquares ; }
+ tools::Long GetWidth() const { return aRectSize.getWidth() ; }
+ tools::Long GetHeight() const { return aRectSize.getHeight() ; }
//Device Pixel .
- long ShowPosition( const Point &pt);
+ tools::Long ShowPosition( const Point &pt);
- long PointToIndex(const Point &pt) const;
- Point IndexToPoint(long nIndex) const ;
- long GetFocusPosIndex() const ;
+ tools::Long PointToIndex(const Point &pt) const;
+ Point IndexToPoint(tools::Long nIndex) const ;
+ tools::Long GetFocusPosIndex() const ;
//Keyboard function for key input and focus handling function
virtual bool KeyInput( const KeyEvent& rKEvt ) override;
virtual void GetFocus() override;
diff --git a/include/svx/fmgridcl.hxx b/include/svx/fmgridcl.hxx
index 2483a4a5f652..c9007b397ccb 100644
--- a/include/svx/fmgridcl.hxx
+++ b/include/svx/fmgridcl.hxx
@@ -149,7 +149,7 @@ protected:
virtual void Command(const CommandEvent& rEvt) override;
virtual VclPtr<BrowserHeader> imp_CreateHeaderBar(BrowseBox* pParent) override;
- virtual long QueryMinimumRowHeight() override;
+ virtual tools::Long QueryMinimumRowHeight() override;
virtual void RowHeightChanged() override;
virtual void ColumnResized(sal_uInt16 nId) override;
virtual void ColumnMoved(sal_uInt16 nId) override;
diff --git a/include/svx/fontwork.hxx b/include/svx/fontwork.hxx
index cca06cc6959b..31d350fa13cc 100644
--- a/include/svx/fontwork.hxx
+++ b/include/svx/fontwork.hxx
@@ -80,10 +80,10 @@ class SAL_WARN_UNUSED SvxFontWorkDialog final : public SfxDockingWindow
OString m_sLastAdjustTbxId;
OString m_sLastShadowTbxId;
- long nSaveShadowX;
- long nSaveShadowY;
- long nSaveShadowAngle;
- long nSaveShadowSize;
+ tools::Long nSaveShadowX;
+ tools::Long nSaveShadowY;
+ tools::Long nSaveShadowAngle;
+ tools::Long nSaveShadowSize;
SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT];
diff --git a/include/svx/framelinkarray.hxx b/include/svx/framelinkarray.hxx
index 7c40b336108b..7cdfd90d794b 100644
--- a/include/svx/framelinkarray.hxx
+++ b/include/svx/framelinkarray.hxx
@@ -207,22 +207,22 @@ public:
/** Sets an additional left width for the merged range that contains (nCol,nRow).
@descr Useful to handle merged ranges that are not completely part of the array.
@precond The merged range must be at the left border of the array. */
- void SetAddMergedLeftSize( size_t nCol, size_t nRow, long nAddSize );
+ void SetAddMergedLeftSize( size_t nCol, size_t nRow, tools::Long nAddSize );
/** Sets an additional right width for the merged range that contains (nCol,nRow).
@descr Useful to handle merged ranges that are not completely part of the array.
@precond The merged range must be at the right border of the array. */
- void SetAddMergedRightSize( size_t nCol, size_t nRow, long nAddSize );
+ void SetAddMergedRightSize( size_t nCol, size_t nRow, tools::Long nAddSize );
/** Sets an additional top height for the merged range that contains (nCol,nRow).
@descr Useful to handle merged ranges that are not completely part of the array.
@precond The merged range must be at the top border of the array. */
- void SetAddMergedTopSize( size_t nCol, size_t nRow, long nAddSize );
+ void SetAddMergedTopSize( size_t nCol, size_t nRow, tools::Long nAddSize );
/** Sets an additional bottom height for the merged range that contains (nCol,nRow).
@descr Useful to handle merged ranges that are not completely part of the array.
@precond The merged range must be at the bottom border of the array. */
- void SetAddMergedBottomSize( size_t nCol, size_t nRow, long nAddSize );
+ void SetAddMergedBottomSize( size_t nCol, size_t nRow, tools::Long nAddSize );
/** Returns true, if the cell (nCol,nRow) is part of a merged range. */
bool IsMerged( size_t nCol, size_t nRow ) const;
@@ -250,44 +250,44 @@ public:
// cell coordinates
/** Sets the X output coordinate of the left column. */
- void SetXOffset( long nXOffset );
+ void SetXOffset( tools::Long nXOffset );
/** Sets the Y output coordinate of the top row. */
- void SetYOffset( long nYOffset );
+ void SetYOffset( tools::Long nYOffset );
/** Sets the output width of the specified column. */
- void SetColWidth( size_t nCol, long nWidth );
+ void SetColWidth( size_t nCol, tools::Long nWidth );
/** Sets the output height of the specified row. */
- void SetRowHeight( size_t nRow, long nHeight );
+ void SetRowHeight( size_t nRow, tools::Long nHeight );
/** Sets the same output width for all columns. */
- void SetAllColWidths( long nWidth );
+ void SetAllColWidths( tools::Long nWidth );
/** Sets the same output height for all rows. */
- void SetAllRowHeights( long nHeight );
+ void SetAllRowHeights( tools::Long nHeight );
/** Returns the X output coordinate of the left border of the specified column.
@descr The column index <array-width> returns the X output coordinate
of the right array border. */
- long GetColPosition( size_t nCol ) const;
+ tools::Long GetColPosition( size_t nCol ) const;
/** Returns the Y output coordinate of the top border of the specified row.
@descr The row index <array-height> returns the Y output coordinate
of the bottom array border. */
- long GetRowPosition( size_t nRow ) const;
+ tools::Long GetRowPosition( size_t nRow ) const;
/** Returns the output width of the specified range of columns. */
- long GetColWidth( size_t nFirstCol, size_t nLastCol ) const;
+ tools::Long GetColWidth( size_t nFirstCol, size_t nLastCol ) const;
/** Returns the output height of the specified range of rows. */
- long GetRowHeight( size_t nFirstRow, size_t nLastRow ) const;
+ tools::Long GetRowHeight( size_t nFirstRow, size_t nLastRow ) const;
/** Returns the output width of the entire array. */
- long GetWidth() const;
+ tools::Long GetWidth() const;
/** Returns the output height of the entire array. */
- long GetHeight() const;
+ tools::Long GetHeight() const;
/** Returns the output range of the cell (nCol,nRow).
Returns total output range of merged ranges, if bExpandMerged is true. */
diff --git a/include/svx/frmsel.hxx b/include/svx/frmsel.hxx
index f9a6195258eb..5c07aa370d8c 100644
--- a/include/svx/frmsel.hxx
+++ b/include/svx/frmsel.hxx
@@ -121,7 +121,7 @@ public:
/** Returns true, if all visible frame borders have equal widths.
@descr Ignores hidden and "don't care" frame borders. On success,
returns the width in the passed parameter. */
- bool GetVisibleWidth( long& rnWidth, SvxBorderLineStyle& rnStyle ) const;
+ bool GetVisibleWidth( tools::Long& rnWidth, SvxBorderLineStyle& rnStyle ) const;
/** Returns true, if all visible frame borders have equal color.
@descr Ignores hidden and "don't care" frame borders. On success,
returns the color in the passed parameter. */
@@ -149,7 +149,7 @@ public:
void SelectAllVisibleBorders();
/** Sets the passed line widths to all selected frame borders (in twips). */
- void SetStyleToSelection( long nWidth, SvxBorderLineStyle nStyle );
+ void SetStyleToSelection( tools::Long nWidth, SvxBorderLineStyle nStyle );
/** Sets the passed color to all selected frame borders. */
void SetColorToSelection( const Color& rColor );
diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index dfcf5cb151af..f2fa49b7759c 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -295,7 +295,7 @@ private:
// (with respect to the data source capabilities)
// defaults to (insert | update | delete)
sal_uInt16 m_nLastColId;
- long m_nLastRowId;
+ tools::Long m_nLastRowId;
bool m_bDesignMode : 1; // default = sal_False
bool m_bRecordCountFinal : 1;
@@ -312,14 +312,14 @@ protected:
bool m_bUpdating : 1; // are any updates being executed right now?
protected:
- virtual bool SeekRow(long nRow) override;
- virtual void VisibleRowsChanged( long nNewTopRow, sal_uInt16 nNumRows) override;
+ virtual bool SeekRow(tools::Long nRow) override;
+ virtual void VisibleRowsChanged( tools::Long nNewTopRow, sal_uInt16 nNumRows) override;
virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId) const override;
- virtual RowStatus GetRowStatus(long nRow) const override;
- virtual bool CursorMoving(long nNewRow, sal_uInt16 nNewCol) override;
+ virtual RowStatus GetRowStatus(tools::Long nRow) const override;
+ virtual bool CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol) override;
virtual void CursorMoved() override;
virtual void ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) override;
- virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId) override;
+ virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
virtual void Command(const CommandEvent& rEvt) override;
virtual bool PreNotify(NotifyEvent& rEvt) override;
virtual void KeyInput(const KeyEvent& rEvt) override;
@@ -327,7 +327,7 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
virtual void Select() override;
- virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol) override;
+ virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override;
virtual void CellModified() override;
virtual bool SaveModified() override;
@@ -374,7 +374,7 @@ protected:
// DragSourceHelper overridables
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
- void executeRowContextMenu( long _nRow, const Point& _rPreferredPos );
+ void executeRowContextMenu( tools::Long _nRow, const Point& _rPreferredPos );
public:
DbGridControl(
@@ -397,7 +397,7 @@ public:
@return
the text out of the cell
*/
- virtual OUString GetCellText(long _nRow, sal_uInt16 _nColId) const override;
+ virtual OUString GetCellText(tools::Long _nRow, sal_uInt16 _nColId) const override;
void RemoveRows(bool bNewCursor);
@@ -437,7 +437,7 @@ public:
void SetFilterMode(bool bMode);
bool IsFilterMode() const {return m_bFilterMode;}
- bool IsFilterRow(long nRow) const {return m_bFilterMode && nRow == 0;}
+ bool IsFilterRow(tools::Long nRow) const {return m_bFilterMode && nRow == 0;}
void EnableNavigationBar(bool bEnable);
bool HasNavigationBar() const {return m_bNavigationBar;}
@@ -472,9 +472,9 @@ public:
// is the current line being updated
bool IsUpdating() const {return m_bUpdating;}
- void RowRemoved( long nRow, long nNumRows = 1, bool bDoPaint = true );
- void RowInserted( long nRow, long nNumRows = 1, bool bDoPaint = true );
- void RowModified( long nRow );
+ void RowRemoved( tools::Long nRow, tools::Long nNumRows = 1, bool bDoPaint = true );
+ void RowInserted( tools::Long nRow, tools::Long nNumRows = 1, bool bDoPaint = true );
+ void RowModified( tools::Long nRow );
void resetCurrentRow();
@@ -560,12 +560,12 @@ public:
CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ) override;
protected:
- void RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor);
- bool SeekCursor(long nRow, bool bAbsolute = false);
+ void RecalcRows(tools::Long nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor);
+ bool SeekCursor(tools::Long nRow, bool bAbsolute = false);
void RemoveColumns(); // cleaning of own structures
void AdjustRows();
sal_Int32 AlignSeekCursor();
- bool SetCurrent(long nNewRow);
+ bool SetCurrent(tools::Long nNewRow);
OUString GetCurrentRowCellText(DbGridColumn const * pCol,const DbGridRowRef& _rRow) const;
virtual void DeleteSelectedRows();
@@ -575,7 +575,7 @@ protected:
bool IsCurrentAppending() const;
// empty row for insertion
- bool IsInsertionRow(long nRow) const;
+ bool IsInsertionRow(tools::Long nRow) const;
void SetSeekPos(sal_Int32 nPos) {m_nSeekPos = nPos;}
sal_Int32 GetCurrentPos() const {return m_nCurrentPos;}
diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index eceb96b8337e..8b89c82549b4 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -41,10 +41,10 @@ class SVX_DLLPUBLIC NumSettings_Impl
SvxNumType nNumberType;
short nParentNumbering;
SvxNumberFormat::LabelFollowedBy eLabelFollowedBy;
- long nTabValue;
+ tools::Long nTabValue;
SvxAdjust eNumAlign;
- long nNumAlignAt;
- long nNumIndentAt;
+ tools::Long nNumAlignAt;
+ tools::Long nNumIndentAt;
OUString sPrefix;
OUString sSuffix;
OUString sBulletChar;
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index c986cd68d0ab..5a51cc34c603 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -116,7 +116,7 @@ public:
// which is vertical to the screen, plus a shift of the scene.
// This means that also the scene (E3dScene) must define this
// routine as virtual in its class.
- virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
+ virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
// get wireframe polygon for local object. No transform is applied.
basegfx::B3DPolyPolygon CreateWireframe() const;
diff --git a/include/svx/pagectrl.hxx b/include/svx/pagectrl.hxx
index b5abe5c6aec6..07186afdd838 100644
--- a/include/svx/pagectrl.hxx
+++ b/include/svx/pagectrl.hxx
@@ -32,24 +32,24 @@ private:
Size aWinSize;
Size aSize;
- long nTop;
- long nBottom;
- long nLeft;
- long nRight;
+ tools::Long nTop;
+ tools::Long nBottom;
+ tools::Long nLeft;
+ tools::Long nRight;
bool bResetBackground;
bool bFrameDirection;
SvxFrameDirection nFrameDirection;
- long nHdLeft;
- long nHdRight;
- long nHdDist;
- long nHdHeight;
+ tools::Long nHdLeft;
+ tools::Long nHdRight;
+ tools::Long nHdDist;
+ tools::Long nHdHeight;
- long nFtLeft;
- long nFtRight;
- long nFtDist;
- long nFtHeight;
+ tools::Long nFtLeft;
+ tools::Long nFtRight;
+ tools::Long nFtDist;
+ tools::Long nFtHeight;
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maHeaderFillAttributes;
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFooterFillAttributes;
@@ -103,35 +103,35 @@ public:
return aSize;
}
- void SetTop(long nNew) { nTop = nNew; }
- void SetBottom(long nNew) { nBottom = nNew; }
- void SetLeft(long nNew) { nLeft = nNew; }
- void SetRight(long nNew) { nRight = nNew; }
-
- long GetTop() const { return nTop; }
- long GetBottom() const { return nBottom; }
- long GetLeft() const { return nLeft; }
- long GetRight() const { return nRight; }
-
- void SetHdLeft(long nNew) { nHdLeft = nNew; }
- void SetHdRight(long nNew) { nHdRight = nNew; }
- void SetHdDist(long nNew) { nHdDist = nNew; }
- void SetHdHeight(long nNew) { nHdHeight = nNew; }
-
- long GetHdLeft() const { return nHdLeft; }
- long GetHdRight() const { return nHdRight; }
- long GetHdDist() const { return nHdDist; }
- long GetHdHeight() const { return nHdHeight; }
-
- void SetFtLeft(long nNew) { nFtLeft = nNew; }
- void SetFtRight(long nNew) { nFtRight = nNew; }
- void SetFtDist(long nNew) { nFtDist = nNew; }
- void SetFtHeight(long nNew) { nFtHeight = nNew; }
-
- long GetFtLeft() const { return nFtLeft; }
- long GetFtRight() const { return nFtRight; }
- long GetFtDist() const { return nFtDist; }
- long GetFtHeight() const { return nFtHeight; }
+ void SetTop(tools::Long nNew) { nTop = nNew; }
+ void SetBottom(tools::Long nNew) { nBottom = nNew; }
+ void SetLeft(tools::Long nNew) { nLeft = nNew; }
+ void SetRight(tools::Long nNew) { nRight = nNew; }
+
+ tools::Long GetTop() const { return nTop; }
+ tools::Long GetBottom() const { return nBottom; }
+ tools::Long GetLeft() const { return nLeft; }
+ tools::Long GetRight() const { return nRight; }
+
+ void SetHdLeft(tools::Long nNew) { nHdLeft = nNew; }
+ void SetHdRight(tools::Long nNew) { nHdRight = nNew; }
+ void SetHdDist(tools::Long nNew) { nHdDist = nNew; }
+ void SetHdHeight(tools::Long nNew) { nHdHeight = nNew; }
+
+ tools::Long GetHdLeft() const { return nHdLeft; }
+ tools::Long GetHdRight() const { return nHdRight; }
+ tools::Long GetHdDist() const { return nHdDist; }
+ tools::Long GetHdHeight() const { return nHdHeight; }
+
+ void SetFtLeft(tools::Long nNew) { nFtLeft = nNew; }
+ void SetFtRight(tools::Long nNew) { nFtRight = nNew; }
+ void SetFtDist(tools::Long nNew) { nFtDist = nNew; }
+ void SetFtHeight(tools::Long nNew) { nFtHeight = nNew; }
+
+ tools::Long GetFtLeft() const { return nFtLeft; }
+ tools::Long GetFtRight() const { return nFtRight; }
+ tools::Long GetFtDist() const { return nFtDist; }
+ tools::Long GetFtHeight() const { return nFtHeight; }
void SetUsage(SvxPageUsage eU) { eUsage = eU; }
SvxPageUsage GetUsage() const { return eUsage; }
diff --git a/include/svx/paraprev.hxx b/include/svx/paraprev.hxx
index 8eb4001a75d7..bb6607318dc6 100644
--- a/include/svx/paraprev.hxx
+++ b/include/svx/paraprev.hxx
@@ -39,8 +39,8 @@ class SVX_DLLPUBLIC SvxParaPrevWindow final : public weld::CustomWidgetControlle
Size aSize;
// indentation
- long nLeftMargin;
- long nRightMargin;
+ tools::Long nLeftMargin;
+ tools::Long nRightMargin;
short nFirstLineOffset;
// distances
sal_uInt16 nUpper;
@@ -63,11 +63,11 @@ public:
{
nFirstLineOffset = nNew;
}
- void SetLeftMargin( long nNew )
+ void SetLeftMargin( tools::Long nNew )
{
nLeftMargin = nNew;
}
- void SetRightMargin( long nNew )
+ void SetRightMargin( tools::Long nNew )
{
nRightMargin = nNew;
}
diff --git a/include/svx/pszctrl.hxx b/include/svx/pszctrl.hxx
index b63950292daf..0961f3b5b867 100644
--- a/include/svx/pszctrl.hxx
+++ b/include/svx/pszctrl.hxx
@@ -29,7 +29,7 @@ class SVX_DLLPUBLIC SvxPosSizeStatusBarControl final : public SfxStatusBarContro
{
private:
std::unique_ptr<SvxPosSizeStatusBarControl_Impl> pImpl;
- SVX_DLLPRIVATE OUString GetMetricStr_Impl( long nVal );
+ SVX_DLLPRIVATE OUString GetMetricStr_Impl( tools::Long nVal );
public:
SFX_DECL_STATUSBAR_CONTROL();
diff --git a/include/svx/rubydialog.hxx b/include/svx/rubydialog.hxx
index 1df1f51ae5ff..5bdd4c9e66d7 100644
--- a/include/svx/rubydialog.hxx
+++ b/include/svx/rubydialog.hxx
@@ -57,8 +57,8 @@ class SvxRubyDialog : public SfxModelessDialogController
friend class RubyPreview;
- long nLastPos;
- long nCurrentEdit;
+ tools::Long nLastPos;
+ tools::Long nCurrentEdit;
bool bModified;
SfxBindings* pBindings;
rtl::Reference<SvxRubyData_Impl> m_pImpl;
@@ -117,8 +117,8 @@ class SvxRubyDialog : public SfxModelessDialogController
void Update();
virtual void Close() override;
- long GetLastPos() const {return nLastPos;}
- void SetLastPos(long nSet) {nLastPos = nSet;}
+ tools::Long GetLastPos() const {return nLastPos;}
+ void SetLastPos(tools::Long nSet) {nLastPos = nSet;}
bool IsModified() const {return bModified;}
void SetModified(bool bSet) {bModified = bSet;}
diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx
index d0dd4e68228e..c0b587cdc583 100644
--- a/include/svx/ruler.hxx
+++ b/include/svx/ruler.hxx
@@ -101,16 +101,16 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
bool bAppSetNullOffset :1;
bool bHorz :1;
- long lLogicNullOffset; // in logic coordinates
- long lAppNullOffset; // in logic coordinates
- long lInitialDragPos;
+ tools::Long lLogicNullOffset; // in logic coordinates
+ tools::Long lAppNullOffset; // in logic coordinates
+ tools::Long lInitialDragPos;
SvxRulerSupportFlags nFlags;
SvxRulerDragFlags nDragType;
sal_uInt16 nDefTabType;
sal_uInt16 nTabCount;
sal_uInt16 nTabBufSize;
- long lDefTabDist;
- long lTabPos;
+ tools::Long lDefTabDist;
+ tools::Long lTabPos;
std::vector<RulerTab> mpTabs; // tab positions in pixel
std::vector<RulerIndent> mpIndents; // paragraph margins in pixel
@@ -118,9 +118,9 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
std::vector<RulerBorder> mpObjectBorders;
SfxBindings* pBindings;
- long nDragOffset;
- long nMaxLeft;
- long nMaxRight;
+ tools::Long nDragOffset;
+ tools::Long nMaxLeft;
+ tools::Long nMaxRight;
bool bValid;
bool bListening;
bool bActive;
@@ -129,8 +129,8 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
bool mbSnapping;
void StartListening_Impl();
- long GetCorrectedDragPos(bool bLeft = true, bool bRight = true );
- void DrawLine_Impl(long &lTabPos, int, bool Horizontal);
+ tools::Long GetCorrectedDragPos(bool bLeft = true, bool bRight = true );
+ void DrawLine_Impl(tools::Long &lTabPos, int, bool Horizontal);
sal_uInt16 GetObjectBordersOff(sal_uInt16 nIdx) const;
// page borders or surrounding frame
@@ -162,44 +162,44 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
void UpdateObject();
// Convert position to stick to ruler ticks
- long MakePositionSticky(long rValue, long aPointOfReference, bool aSnapToFrameMargin = true) const;
+ tools::Long MakePositionSticky(tools::Long rValue, tools::Long aPointOfReference, bool aSnapToFrameMargin = true) const;
- long PixelHAdjust(long lPos, long lPos2) const;
- long PixelVAdjust(long lPos, long lPos2) const;
- long PixelAdjust(long lPos, long lPos2) const;
+ tools::Long PixelHAdjust(tools::Long lPos, tools::Long lPos2) const;
+ tools::Long PixelVAdjust(tools::Long lPos, tools::Long lPos2) const;
+ tools::Long PixelAdjust(tools::Long lPos, tools::Long lPos2) const;
- long ConvertHPosPixel(long lPos) const;
- long ConvertVPosPixel(long lPos) const;
- long ConvertHSizePixel(long lSize) const;
- long ConvertVSizePixel(long lSize) const;
+ tools::Long ConvertHPosPixel(tools::Long lPos) const;
+ tools::Long ConvertVPosPixel(tools::Long lPos) const;
+ tools::Long ConvertHSizePixel(tools::Long lSize) const;
+ tools::Long ConvertVSizePixel(tools::Long lSize) const;
- long ConvertPosPixel(long lPos) const;
- long ConvertSizePixel(long lSize) const;
+ tools::Long ConvertPosPixel(tools::Long lPos) const;
+ tools::Long ConvertSizePixel(tools::Long lSize) const;
- long ConvertHPosLogic(long lPos) const;
- long ConvertVPosLogic(long lPos) const;
- long ConvertHSizeLogic(long lSize) const;
- long ConvertVSizeLogic(long lSize) const;
+ tools::Long ConvertHPosLogic(tools::Long lPos) const;
+ tools::Long ConvertVPosLogic(tools::Long lPos) const;
+ tools::Long ConvertHSizeLogic(tools::Long lSize) const;
+ tools::Long ConvertVSizeLogic(tools::Long lSize) const;
- long ConvertPosLogic(long lPos) const;
- long ConvertSizeLogic(long lSize) const;
+ tools::Long ConvertPosLogic(tools::Long lPos) const;
+ tools::Long ConvertSizeLogic(tools::Long lSize) const;
- long RoundToCurrentMapMode(long lValue) const;
+ tools::Long RoundToCurrentMapMode(tools::Long lValue) const;
- long GetFirstLineIndent() const;
- long GetLeftIndent() const;
- long GetRightIndent() const;
- long GetLogicRightIndent() const;
+ tools::Long GetFirstLineIndent() const;
+ tools::Long GetLeftIndent() const;
+ tools::Long GetRightIndent() const;
+ tools::Long GetLogicRightIndent() const;
- long GetLeftFrameMargin() const;
- long GetRightFrameMargin() const;
+ tools::Long GetLeftFrameMargin() const;
+ tools::Long GetRightFrameMargin() const;
void CalcMinMax();
void EvalModifier();
void DragMargin1();
//adjust the left margin either after DragMargin1() or after DragBorders()
- void AdjustMargin1(long lDiff);
+ void AdjustMargin1(tools::Long lDiff);
void DragMargin2();
void DragIndents();
void DragTabs();
@@ -212,10 +212,10 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
void ApplyBorders();
void ApplyObject();
- long GetFrameLeft() const;
+ tools::Long GetFrameLeft() const;
- long GetLeftMin() const;
- long GetRightMax() const;
+ tools::Long GetLeftMin() const;
+ tools::Long GetRightMax() const;
DECL_LINK( TabMenuSelect, Menu *, bool );
DECL_LINK( MenuSelect, Menu *, bool );
@@ -226,7 +226,7 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
MoveLeft,
MoveRight
};
- void UpdateParaContents_Impl(long lDiff, UpdateType);
+ void UpdateParaContents_Impl(tools::Long lDiff, UpdateType);
protected:
virtual void Command( const CommandEvent& rCEvt ) override;
@@ -253,7 +253,7 @@ protected:
sal_uInt16 GetActRightColumn (
bool bForceDontConsiderHidden = false,
sal_uInt16 nAct=USHRT_MAX ) const;
- long CalcPropMaxRight(sal_uInt16 nCol = USHRT_MAX) const;
+ tools::Long CalcPropMaxRight(sal_uInt16 nCol = USHRT_MAX) const;
public:
@@ -262,10 +262,10 @@ public:
virtual ~SvxRuler() override;
virtual void dispose() override;
- void SetDefTabDist(long);
+ void SetDefTabDist(tools::Long);
// set/get NullOffset in logic units
- void SetNullOffsetLogic(long lOff);
+ void SetNullOffsetLogic(tools::Long lOff);
void SetActive(bool bOn = true);
@@ -276,8 +276,8 @@ public:
//#i24363# tab stops relative to indent
void SetTabsRelativeToIndent( bool bRel );
- void SetValues(RulerChangeType type, long value);
- long GetPageWidth() const;
+ void SetValues(RulerChangeType type, tools::Long value);
+ tools::Long GetPageWidth() const;
};
#endif
diff --git a/include/svx/rulritem.hxx b/include/svx/rulritem.hxx
index 2f0df198f099..4f5d78083809 100644
--- a/include/svx/rulritem.hxx
+++ b/include/svx/rulritem.hxx
@@ -26,8 +26,8 @@
class SVX_DLLPUBLIC SvxLongLRSpaceItem final : public SfxPoolItem
{
- long mlLeft; // nLeft or the negative first-line indentation
- long mlRight; // the unproblematic right edge
+ tools::Long mlLeft; // nLeft or the negative first-line indentation
+ tools::Long mlRight; // the unproblematic right edge
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
@@ -44,19 +44,19 @@ class SVX_DLLPUBLIC SvxLongLRSpaceItem final : public SfxPoolItem
public:
static SfxPoolItem* CreateDefault();
- SvxLongLRSpaceItem(long lLeft, long lRight, sal_uInt16 nId);
+ SvxLongLRSpaceItem(tools::Long lLeft, tools::Long lRight, sal_uInt16 nId);
SvxLongLRSpaceItem();
- long GetLeft() const { return mlLeft;}
- long GetRight() const { return mlRight;}
- void SetLeft(long lArgLeft);
- void SetRight(long lArgRight);
+ tools::Long GetLeft() const { return mlLeft;}
+ tools::Long GetRight() const { return mlRight;}
+ void SetLeft(tools::Long lArgLeft);
+ void SetRight(tools::Long lArgRight);
};
class SVX_DLLPUBLIC SvxLongULSpaceItem final : public SfxPoolItem
{
- long mlLeft; // nLeft or the negative first-line indentation
- long mlRight; // the unproblematic right edge
+ tools::Long mlLeft; // nLeft or the negative first-line indentation
+ tools::Long mlRight; // the unproblematic right edge
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
@@ -73,20 +73,20 @@ class SVX_DLLPUBLIC SvxLongULSpaceItem final : public SfxPoolItem
public:
static SfxPoolItem* CreateDefault();
- SvxLongULSpaceItem(long lUpper, long lLower, sal_uInt16 nId);
+ SvxLongULSpaceItem(tools::Long lUpper, tools::Long lLower, sal_uInt16 nId);
SvxLongULSpaceItem();
- long GetUpper() const { return mlLeft;}
- long GetLower() const { return mlRight;}
- void SetUpper(long lArgLeft);
- void SetLower(long lArgRight);
+ tools::Long GetUpper() const { return mlLeft;}
+ tools::Long GetLower() const { return mlRight;}
+ void SetUpper(tools::Long lArgLeft);
+ void SetLower(tools::Long lArgRight);
};
class SVX_DLLPUBLIC SvxPagePosSizeItem final : public SfxPoolItem
{
Point aPos;
- long lWidth;
- long lHeight;
+ tools::Long lWidth;
+ tools::Long lHeight;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
@@ -103,31 +103,31 @@ private:
const SvxPagePosSizeItem& operator=(const SvxPagePosSizeItem &) = delete;
public:
static SfxPoolItem* CreateDefault();
- SvxPagePosSizeItem(const Point &rPos, long lWidth, long lHeight);
+ SvxPagePosSizeItem(const Point &rPos, tools::Long lWidth, tools::Long lHeight);
SvxPagePosSizeItem();
const Point &GetPos() const { return aPos; }
- long GetWidth() const { return lWidth; }
- long GetHeight() const { return lHeight; }
+ tools::Long GetWidth() const { return lWidth; }
+ tools::Long GetHeight() const { return lHeight; }
};
struct SVX_DLLPUBLIC SvxColumnDescription
{
- long nStart; /* Start of the column */
- long nEnd; /* End of the column */
+ tools::Long nStart; /* Start of the column */
+ tools::Long nEnd; /* End of the column */
bool bVisible; /* Visibility */
- long nEndMin; //min. possible position of end
- long nEndMax; //max. possible position of end
+ tools::Long nEndMin; //min. possible position of end
+ tools::Long nEndMax; //max. possible position of end
- SvxColumnDescription(long start, long end, bool bVis);
+ SvxColumnDescription(tools::Long start, tools::Long end, bool bVis);
- SvxColumnDescription(long start, long end,
- long endMin, long endMax, bool bVis);
+ SvxColumnDescription(tools::Long start, tools::Long end,
+ tools::Long endMin, tools::Long endMax, bool bVis);
bool operator==(const SvxColumnDescription &rCmp) const;
bool operator!=(const SvxColumnDescription &rCmp) const;
- long GetWidth() const;
+ tools::Long GetWidth() const;
};
template<typename charT, typename traits>
@@ -144,8 +144,8 @@ class SVX_DLLPUBLIC SvxColumnItem final : public SfxPoolItem
{
std::vector<SvxColumnDescription> aColumns; // Column array
- long nLeft; // Left edge for the table
- long nRight; // Right edge for the table; for columns always
+ tools::Long nLeft; // Left edge for the table
+ tools::Long nRight; // Right edge for the table; for columns always
// equal to the surrounding frame
sal_uInt16 nActColumn; // the current column
bool bTable; // table?
@@ -177,13 +177,13 @@ public:
sal_uInt16 Count() const;
void Append(const SvxColumnDescription& rDesc);
- void SetLeft(long aLeft);
- void SetRight(long aRight);
+ void SetLeft(tools::Long aLeft);
+ void SetRight(tools::Long aRight);
sal_uInt16 GetActColumn() const { return nActColumn;}
bool IsFirstAct() const;
bool IsLastAct() const;
- long GetLeft() const { return nLeft;}
- long GetRight() const { return nRight;}
+ tools::Long GetLeft() const { return nLeft;}
+ tools::Long GetRight() const { return nRight;}
bool IsTable() const { return bTable;}
bool CalcOrtho() const;
void SetOrtho(bool bVal);
@@ -192,10 +192,10 @@ public:
class SVX_DLLPUBLIC SvxObjectItem final : public SfxPoolItem
{
- long nStartX; /* Start in x direction */
- long nEndX; /* End in x direction */
- long nStartY; /* Start in y direction */
- long nEndY; /* End in y direction */
+ tools::Long nStartX; /* Start in x direction */
+ tools::Long nEndX; /* End in x direction */
+ tools::Long nStartY; /* Start in y direction */
+ tools::Long nEndY; /* End in y direction */
bool bLimits; /* boundary limit control by the application */
virtual bool operator==( const SfxPoolItem& ) const override;
@@ -213,18 +213,18 @@ class SVX_DLLPUBLIC SvxObjectItem final : public SfxPoolItem
public:
static SfxPoolItem* CreateDefault();
- SvxObjectItem(long nStartX, long nEndX,
- long nStartY, long nEndY);
-
- long GetStartX() const { return nStartX;}
- long GetEndX() const { return nEndX;}
- long GetStartY() const { return nStartY;}
- long GetEndY() const { return nEndY;}
-
- void SetStartX(long lValue);
- void SetEndX(long lValue);
- void SetStartY(long lValue);
- void SetEndY(long lValue);
+ SvxObjectItem(tools::Long nStartX, tools::Long nEndX,
+ tools::Long nStartY, tools::Long nEndY);
+
+ tools::Long GetStartX() const { return nStartX;}
+ tools::Long GetEndX() const { return nEndX;}
+ tools::Long GetStartY() const { return nStartY;}
+ tools::Long GetEndY() const { return nEndY;}
+
+ void SetStartX(tools::Long lValue);
+ void SetEndX(tools::Long lValue);
+ void SetStartY(tools::Long lValue);
+ void SetEndY(tools::Long lValue);
};
#endif
diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx
index 837c2da43a39..e3fb1b5c779c 100644
--- a/include/svx/scene3d.hxx
+++ b/include/svx/scene3d.hxx
@@ -137,7 +137,7 @@ public:
virtual void NbcSetTransform(const basegfx::B3DHomMatrix& rMatrix) override;
virtual void SetTransform(const basegfx::B3DHomMatrix& rMatrix) override;
- virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
+ virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
void RotateScene(const Point& rRef, double sn, double cs);
// TakeObjName...() is for the display in the UI, for example "3 frames selected".
diff --git a/include/svx/sderitm.hxx b/include/svx/sderitm.hxx
index ad03621c50fb..9a41860f5c83 100644
--- a/include/svx/sderitm.hxx
+++ b/include/svx/sderitm.hxx
@@ -22,7 +22,7 @@
#include <svx/sdmetitm.hxx>
#include <svx/svddef.hxx>
-inline SdrMetricItem makeSdrEckenradiusItem(long nRadius) {
+inline SdrMetricItem makeSdrEckenradiusItem(tools::Long nRadius) {
return SdrMetricItem(SDRATTR_ECKENRADIUS, nRadius);
}
diff --git a/include/svx/sdmetitm.hxx b/include/svx/sdmetitm.hxx
index 8abecbad394c..0e7e3a7897b4 100644
--- a/include/svx/sdmetitm.hxx
+++ b/include/svx/sdmetitm.hxx
@@ -32,7 +32,7 @@ public:
SdrMetricItem(sal_uInt16 nId, sal_Int32 nVal): SfxInt32Item(nId,nVal) {}
virtual SdrMetricItem* Clone(SfxItemPool* pPool=nullptr) const override;
virtual bool HasMetrics() const override;
- virtual void ScaleMetrics(long nMul, long nDiv) override;
+ virtual void ScaleMetrics(tools::Long nMul, tools::Long nDiv) override;
virtual bool GetPresentation(SfxItemPresentation ePres,
MapUnit eCoreMetric,
diff --git a/include/svx/sdsxyitm.hxx b/include/svx/sdsxyitm.hxx
index e2686a5689a9..ac270699d22d 100644
--- a/include/svx/sdsxyitm.hxx
+++ b/include/svx/sdsxyitm.hxx
@@ -22,11 +22,11 @@
#include <svx/sdmetitm.hxx>
#include <svx/svddef.hxx>
-inline SdrMetricItem makeSdrShadowXDistItem(long nDist) {
+inline SdrMetricItem makeSdrShadowXDistItem(tools::Long nDist) {
return SdrMetricItem(SDRATTR_SHADOWXDIST, nDist);
}
-inline SdrMetricItem makeSdrShadowYDistItem(long nDist) {
+inline SdrMetricItem makeSdrShadowYDistItem(tools::Long nDist) {
return SdrMetricItem(SDRATTR_SHADOWYDIST, nDist);
}
diff --git a/include/svx/sdtaaitm.hxx b/include/svx/sdtaaitm.hxx
index 71764b2962a3..1a4a51c0e07f 100644
--- a/include/svx/sdtaaitm.hxx
+++ b/include/svx/sdtaaitm.hxx
@@ -28,7 +28,7 @@ public:
SdrTextAniAmountItem(sal_Int16 nVal=0): SfxInt16Item(SDRATTR_TEXT_ANIAMOUNT,nVal) {}
virtual SdrTextAniAmountItem* Clone(SfxItemPool* pPool=nullptr) const override;
virtual bool HasMetrics() const override;
- virtual void ScaleMetrics(long nMul, long nDiv) override;
+ virtual void ScaleMetrics(tools::Long nMul, tools::Long nDiv) override;
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
};
diff --git a/include/svx/sdtditm.hxx b/include/svx/sdtditm.hxx
index 9e363c7627e6..d9b1d3ab3e9b 100644
--- a/include/svx/sdtditm.hxx
+++ b/include/svx/sdtditm.hxx
@@ -22,19 +22,19 @@
#include <svx/sdmetitm.hxx>
#include <svx/svddef.hxx>
-inline SdrMetricItem makeSdrTextLeftDistItem(long mnHeight) {
+inline SdrMetricItem makeSdrTextLeftDistItem(tools::Long mnHeight) {
return SdrMetricItem(SDRATTR_TEXT_LEFTDIST, mnHeight);
}
-inline SdrMetricItem makeSdrTextRightDistItem(long mnHeight) {
+inline SdrMetricItem makeSdrTextRightDistItem(tools::Long mnHeight) {
return SdrMetricItem(SDRATTR_TEXT_RIGHTDIST, mnHeight);
}
-inline SdrMetricItem makeSdrTextUpperDistItem(long mnHeight) {
+inline SdrMetricItem makeSdrTextUpperDistItem(tools::Long mnHeight) {
return SdrMetricItem(SDRATTR_TEXT_UPPERDIST, mnHeight);
}
-inline SdrMetricItem makeSdrTextLowerDistItem(long mnHeight) {
+inline SdrMetricItem makeSdrTextLowerDistItem(tools::Long mnHeight) {
return SdrMetricItem(SDRATTR_TEXT_LOWERDIST, mnHeight);
}
diff --git a/include/svx/sdtmfitm.hxx b/include/svx/sdtmfitm.hxx
index 838d938c3336..25890361accf 100644
--- a/include/svx/sdtmfitm.hxx
+++ b/include/svx/sdtmfitm.hxx
@@ -22,19 +22,19 @@
#include <svx/sdmetitm.hxx>
#include <svx/svddef.hxx>
-inline SdrMetricItem makeSdrTextMinFrameHeightItem(long mnHeight) {
+inline SdrMetricItem makeSdrTextMinFrameHeightItem(tools::Long mnHeight) {
return SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, mnHeight);
}
-inline SdrMetricItem makeSdrTextMaxFrameHeightItem(long mnHeight) {
+inline SdrMetricItem makeSdrTextMaxFrameHeightItem(tools::Long mnHeight) {
return SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT, mnHeight);
}
-inline SdrMetricItem makeSdrTextMinFrameWidthItem(long mnWidth) {
+inline SdrMetricItem makeSdrTextMinFrameWidthItem(tools::Long mnWidth) {
return SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH, mnWidth);
};
-inline SdrMetricItem makeSdrTextMaxFrameWidthItem(long mnWidth) {
+inline SdrMetricItem makeSdrTextMaxFrameWidthItem(tools::Long mnWidth) {
return SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH, mnWidth);
}
diff --git a/include/svx/sidebar/LinePropertyPanelBase.hxx b/include/svx/sidebar/LinePropertyPanelBase.hxx
index 359b822e16b1..0442510d7537 100644
--- a/include/svx/sidebar/LinePropertyPanelBase.hxx
+++ b/include/svx/sidebar/LinePropertyPanelBase.hxx
@@ -49,7 +49,7 @@ public:
virtual ~LinePropertyPanelBase() override;
virtual void dispose() override;
- void SetWidth(long nWidth);
+ void SetWidth(tools::Long nWidth);
void SetWidthIcon(int n);
void SetWidthIcon();
diff --git a/include/svx/sidebar/LineWidthPopup.hxx b/include/svx/sidebar/LineWidthPopup.hxx
index c16924d0cec8..718ff68ce24a 100644
--- a/include/svx/sidebar/LineWidthPopup.hxx
+++ b/include/svx/sidebar/LineWidthPopup.hxx
@@ -38,7 +38,7 @@ public:
LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rParent);
~LineWidthPopup();
- void SetWidthSelect (long lValue, bool bValuable, MapUnit eMapUnit);
+ void SetWidthSelect (tools::Long lValue, bool bValuable, MapUnit eMapUnit);
weld::Container* getTopLevel() const { return m_xTopLevel.get(); }
@@ -49,7 +49,7 @@ private:
MapUnit m_eMapUnit;
bool m_bVSFocus;
bool m_bCustom;
- long m_nCustomWidth;
+ tools::Long m_nCustomWidth;
Image m_aIMGCus;
Image m_aIMGCusGray;
diff --git a/include/svx/svddrag.hxx b/include/svx/svddrag.hxx
index 0deef29e4f10..80c2406b9046 100644
--- a/include/svx/svddrag.hxx
+++ b/include/svx/svddrag.hxx
@@ -145,8 +145,8 @@ public:
void NextPoint();
void PrevPoint();
bool CheckMinMoved(const Point& rPnt);
- long GetDX() const { return GetNow().X()-GetPrev().X(); }
- long GetDY() const { return GetNow().Y()-GetPrev().Y(); }
+ tools::Long GetDX() const { return GetNow().X()-GetPrev().X(); }
+ tools::Long GetDY() const { return GetNow().Y()-GetPrev().Y(); }
Fraction GetXFact() const;
Fraction GetYFact() const;
diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx
index 26e88a7dbcd1..72d8ad3ff154 100644
--- a/include/svx/svddrgmt.hxx
+++ b/include/svx/svddrgmt.hxx
@@ -229,8 +229,8 @@ inline const tools::Rectangle& SdrDragMethod::GetMarkedRect() const
class SVXCORE_DLLPUBLIC SdrDragMove : public SdrDragMethod
{
private:
- long nBestXSnap;
- long nBestYSnap;
+ tools::Long nBestXSnap;
+ tools::Long nBestYSnap;
bool bXSnapped;
bool bYSnapped;
diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 03ca5fc3a022..b215108c24c8 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -212,13 +212,13 @@ public:
void MoveMarkedObj(const Size& rSiz, bool bCopy=false);
void ResizeMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false);
void ResizeMultMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, const bool bWdh, const bool bHgt);
- long GetMarkedObjRotate() const;
- void RotateMarkedObj(const Point& rRef, long nAngle, bool bCopy=false);
+ tools::Long GetMarkedObjRotate() const;
+ void RotateMarkedObj(const Point& rRef, tools::Long nAngle, bool bCopy=false);
void MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool bCopy=false);
void MirrorMarkedObjHorizontal();
void MirrorMarkedObjVertical();
- long GetMarkedObjShear() const;
- void ShearMarkedObj(const Point& rRef, long nAngle, bool bVShear=false, bool bCopy=false);
+ tools::Long GetMarkedObjShear() const;
+ void ShearMarkedObj(const Point& rRef, tools::Long nAngle, bool bVShear=false, bool bCopy=false);
void CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bCopy=false);
void DistortMarkedObj(const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy=false);
@@ -227,7 +227,7 @@ public:
void SetAllMarkedRect(const tools::Rectangle& rRect) { SetMarkedObjRect(rRect); }
void MoveAllMarked(const Size& rSiz, bool bCopy=false) { MoveMarkedObj(rSiz,bCopy); }
void ResizeAllMarked(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { ResizeMarkedObj(rRef,xFact,yFact); }
- void RotateAllMarked(const Point& rRef, long nAngle) { RotateMarkedObj(rRef,nAngle); }
+ void RotateAllMarked(const Point& rRef, tools::Long nAngle) { RotateMarkedObj(rRef,nAngle); }
void MirrorAllMarkedHorizontal() { MirrorMarkedObjHorizontal(); }
void MirrorAllMarkedVertical() { MirrorMarkedObjVertical(); }
void CopyMarked() { CopyMarkedObj(); }
diff --git a/include/svx/svdglev.hxx b/include/svx/svdglev.hxx
index 53dbef281786..7469444a743b 100644
--- a/include/svx/svdglev.hxx
+++ b/include/svx/svdglev.hxx
@@ -77,7 +77,7 @@ public:
void MoveMarkedGluePoints (const Size& rSiz, bool bCopy);
void ResizeMarkedGluePoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy);
- void RotateMarkedGluePoints(const Point& rRef, long nAngle, bool bCopy);
+ void RotateMarkedGluePoints(const Point& rRef, tools::Long nAngle, bool bCopy);
};
#endif // INCLUDED_SVX_SVDGLEV_HXX
diff --git a/include/svx/svdglue.hxx b/include/svx/svdglue.hxx
index ab6d6760c085..a7eb9b9d76b2 100644
--- a/include/svx/svdglue.hxx
+++ b/include/svx/svdglue.hxx
@@ -104,12 +104,12 @@ public:
void Invalidate(vcl::Window& rWin, const SdrObject* pObj) const;
Point GetAbsolutePos(const SdrObject& rObj) const;
void SetAbsolutePos(const Point& rNewPos, const SdrObject& rObj);
- long GetAlignAngle() const;
- void SetAlignAngle(long nAngle);
- static long EscDirToAngle(SdrEscapeDirection nEsc);
- static SdrEscapeDirection EscAngleToDir(long nAngle);
- void Rotate(const Point& rRef, long nAngle, double sn, double cs, const SdrObject* pObj);
- void Mirror(const Point& rRef1, const Point& rRef2, long nAngle, const SdrObject* pObj);
+ tools::Long GetAlignAngle() const;
+ void SetAlignAngle(tools::Long nAngle);
+ static tools::Long EscDirToAngle(SdrEscapeDirection nEsc);
+ static SdrEscapeDirection EscAngleToDir(tools::Long nAngle);
+ void Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs, const SdrObject* pObj);
+ void Mirror(const Point& rRef1, const Point& rRef2, tools::Long nAngle, const SdrObject* pObj);
void Shear (const Point& rRef, double tn, bool bVShear, const SdrObject* pObj);
};
@@ -137,9 +137,9 @@ public:
void Invalidate(vcl::Window& rWin, const SdrObject* pObj) const;
// temp for transformations on the reference object
void SetReallyAbsolute(bool bOn, const SdrObject& rObj);
- void Rotate(const Point& rRef, long nAngle, double sn, double cs, const SdrObject* pObj);
+ void Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs, const SdrObject* pObj);
void Mirror(const Point& rRef1, const Point& rRef2, const SdrObject* pObj);
- void Mirror(const Point& rRef1, const Point& rRef2, long nAngle, const SdrObject* pObj);
+ void Mirror(const Point& rRef1, const Point& rRef2, tools::Long nAngle, const SdrObject* pObj);
void Shear (const Point& rRef, double tn, bool bVShear, const SdrObject* pObj);
};
diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
index 29bb9336838a..e5cc1379ab94 100644
--- a/include/svx/svdhdl.hxx
+++ b/include/svx/svdhdl.hxx
@@ -143,7 +143,7 @@ protected:
SdrHdlKind eKind;
- long nRotationAngle; // turn handle or mousepointer
+ tools::Long nRotationAngle; // turn handle or mousepointer
sal_uInt32 nObjHdlNum; // required by MarkView
sal_uInt32 nPolyNum; // Polygonpoint
sal_uInt32 nPPntNum; // Point number of the polygon
@@ -207,7 +207,7 @@ public:
void SetSelected(bool bJa=true);
void Set1PixMore(bool bJa=true);
- void SetRotationAngle(long n);
+ void SetRotationAngle(tools::Long n);
bool IsCornerHdl() const { return eKind==SdrHdlKind::UpperLeft || eKind==SdrHdlKind::UpperRight || eKind==SdrHdlKind::LowerLeft || eKind==SdrHdlKind::LowerRight; }
bool IsVertexHdl() const { return eKind==SdrHdlKind::Upper || eKind==SdrHdlKind::Lower || eKind==SdrHdlKind::Left || eKind==SdrHdlKind::Right; }
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index c35b259a51dc..6f4581d1618a 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -232,10 +232,10 @@ public:
// including PresObj's in higher derivations
virtual void adaptSizeAndBorderForAllPages(
const Size& rNewSize,
- long nLeft = 0,
- long nRight = 0,
- long nUpper = 0,
- long nLower = 0);
+ tools::Long nLeft = 0,
+ tools::Long nRight = 0,
+ tools::Long nUpper = 0,
+ tools::Long nLower = 0);
protected:
virtual css::uno::Reference< css::uno::XInterface > createUnoModel();
@@ -384,8 +384,8 @@ public:
void SetUIUnit(FieldUnit eUnit, const Fraction& rScale);
static OUString GetUnitString(FieldUnit eUnit);
- OUString GetMetricString(long nVal, bool bNoUnitChars = false, sal_Int32 nNumDigits = -1) const;
- static OUString GetAngleString(long nAngle);
+ OUString GetMetricString(tools::Long nVal, bool bNoUnitChars = false, sal_Int32 nNumDigits = -1) const;
+ static OUString GetAngleString(tools::Long nAngle);
static OUString GetPercentString(const Fraction& rVal);
// RecalcPageNums is ordinarily only called by the Page.
diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
index dd1a86d24bca..040302faa4c0 100644
--- a/include/svx/svdoashp.hxx
+++ b/include/svx/svdoashp.hxx
@@ -168,16 +168,16 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual void Move(const Size& rSiz) override;
- virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
+ virtual void Shear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual void SetSnapRect(const tools::Rectangle& rRect) override;
virtual void SetLogicRect(const tools::Rectangle& rRect) override;
virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override;
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
- virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
+ virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
- virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
+ virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index cb98d67a2891..bb09c6856d3e 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -589,16 +589,16 @@ public:
virtual void NbcMove (const Size& rSiz);
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
virtual void NbcCrop (const basegfx::B2DPoint& rRef, double fxFact, double fyFact);
- virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs);
+ virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs);
virtual void NbcMirror(const Point& rRef1, const Point& rRef2);
- virtual void NbcShear (const Point& rRef, long nAngle, double tn, bool bVShear);
+ virtual void NbcShear (const Point& rRef, tools::Long nAngle, double tn, bool bVShear);
virtual void Move (const Size& rSiz);
virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true);
virtual void Crop (const basegfx::B2DPoint& rRef, double fxFact, double fyFact);
- virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs);
+ virtual void Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs);
virtual void Mirror(const Point& rRef1, const Point& rRef2);
- virtual void Shear (const Point& rRef, long nAngle, double tn, bool bVShear);
+ virtual void Shear (const Point& rRef, tools::Long nAngle, double tn, bool bVShear);
/// The relative position of a SdrObject is the distance of the upper
/// left corner of the logic bounding rectangle (SnapRect) to the anchor.
@@ -631,8 +631,8 @@ public:
virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false );
// rotation and shear angle
- virtual long GetRotateAngle() const;
- virtual long GetShearAngle(bool bVertical = false) const;
+ virtual tools::Long GetRotateAngle() const;
+ virtual tools::Long GetShearAngle(bool bVertical = false) const;
/// snap to special points of an Object (polygon points, center of circle)
virtual sal_uInt32 GetSnapPointCount() const;
@@ -729,7 +729,7 @@ public:
// to be set temporarily when transforming related object(?)
void SetGlueReallyAbsolute(bool bOn);
- void NbcRotateGluePoints(const Point& rRef, long nAngle, double sn, double cs);
+ void NbcRotateGluePoints(const Point& rRef, tools::Long nAngle, double sn, double cs);
void NbcMirrorGluePoints(const Point& rRef1, const Point& rRef2);
void NbcShearGluePoints (const Point& rRef, double tn, bool bVShear);
@@ -964,7 +964,7 @@ protected:
void ImpForcePlusData();
- OUString GetMetrStr(long nVal) const;
+ OUString GetMetrStr(tools::Long nVal) const;
/// A derived class must override these 3 methods if it has own geometric
/// data that must be saved for Undo.
diff --git a/include/svx/svdocirc.hxx b/include/svx/svdocirc.hxx
index 105850fa3f84..dc0956388ed1 100644
--- a/include/svx/svdocirc.hxx
+++ b/include/svx/svdocirc.hxx
@@ -32,8 +32,8 @@ namespace sdr::properties {
class SdrCircObjGeoData final : public SdrTextObjGeoData
{
public:
- long nStartAngle;
- long nEndAngle;
+ tools::Long nStartAngle;
+ tools::Long nEndAngle;
};
enum class SdrCircKind { Full, Section, Cut, Arc };
@@ -51,10 +51,10 @@ private:
virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
SdrCircKind meCircleKind;
- long nStartAngle;
- long nEndAngle;
+ tools::Long nStartAngle;
+ tools::Long nEndAngle;
- SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrCircKind eKind, const tools::Rectangle& rRect1, long nStart, long nEnd) const;
+ SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrCircKind eKind, const tools::Rectangle& rRect1, tools::Long nStart, tools::Long nEnd) const;
SVX_DLLPRIVATE static void ImpSetCreateParams(SdrDragStat& rStat);
SVX_DLLPRIVATE void ImpSetAttrToCircInfo(); // copy values from pool
SVX_DLLPRIVATE void ImpSetCircInfoToAttr(); // copy values into pool
@@ -86,8 +86,8 @@ public:
SdrModel& rSdrModel,
SdrCircKind eNewKind,
const tools::Rectangle& rRect,
- long nNewStartAngle,
- long nNewEndWink);
+ tools::Long nNewStartAngle,
+ tools::Long nNewEndWink);
SdrCircKind GetCircleKind() const { return meCircleKind; }
@@ -129,7 +129,7 @@ public:
virtual void NbcMove(const Size& aSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
- virtual void NbcShear (const Point& rRef, long nAngle, double tn, bool bVShear) override;
+ virtual void NbcShear (const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
private:
@@ -137,8 +137,8 @@ private:
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
public:
- long GetStartAngle() const { return nStartAngle; }
- long GetEndAngle() const { return nEndAngle; }
+ tools::Long GetStartAngle() const { return nStartAngle; }
+ tools::Long GetEndAngle() const { return nEndAngle; }
};
diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx
index 2320091ab1a1..d1f9558a0648 100644
--- a/include/svx/svdoedge.hxx
+++ b/include/svx/svdoedge.hxx
@@ -84,8 +84,8 @@ public:
Point aMiddleLine;
// Following values are set by ImpCalcEdgeTrack
- long nAngle1; // exit angle at Obj1
- long nAngle2; // exit angle at Obj2
+ tools::Long nAngle1; // exit angle at Obj1
+ tools::Long nAngle2; // exit angle at Obj2
sal_uInt16 nObj1Lines; // 1..3
sal_uInt16 nObj2Lines; // 1..3
sal_uInt16 nMiddleLine; // 0xFFFF=none, otherwise point number of the beginning of the line
@@ -102,8 +102,8 @@ public:
Point& ImpGetLineOffsetPoint(SdrEdgeLineCode eLineCode);
sal_uInt16 ImpGetPolyIdx(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const;
bool ImpIsHorzLine(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const;
- void ImpSetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP, long nVal);
- long ImpGetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const;
+ void ImpSetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP, tools::Long nVal);
+ tools::Long ImpGetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const;
};
@@ -171,11 +171,11 @@ public:
protected:
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
- static XPolygon ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const tools::Rectangle& rRect, const Point& rCenter);
+ static XPolygon ImpCalcObjToCenter(const Point& rStPt, tools::Long nEscAngle, const tools::Rectangle& rRect, const Point& rCenter);
void ImpRecalcEdgeTrack(); // recalculation of the connection track
XPolygon ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& rCon1, SdrObjConnection& rCon2, SdrEdgeInfoRec* pInfo) const;
- XPolygon 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 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;
static bool ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut=nullptr);
static SdrEscapeDirection ImpCalcEscAngle(SdrObject const * pObj, const Point& aPt2);
@@ -242,9 +242,9 @@ public:
virtual void NbcResize(const Point& rRefPnt, const Fraction& aXFact, const Fraction& aYFact) override;
// #i54102# added rotate, mirror and shear support
- virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
+ virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
- virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
+ virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
// #102344# Added missing implementation
virtual void NbcSetAnchorPos(const Point& rPnt) override;
diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx
index 2f71c59361b3..7c44fa6afb4f 100644
--- a/include/svx/svdogrp.hxx
+++ b/include/svx/svdogrp.hxx
@@ -79,14 +79,14 @@ public:
virtual bool BegCreate(SdrDragStat& rStat) override;
- virtual long GetRotateAngle() const override;
- virtual long GetShearAngle(bool bVertical = false) const override;
+ virtual tools::Long GetRotateAngle() const override;
+ virtual tools::Long GetShearAngle(bool bVertical = false) const override;
virtual void Move(const Size& rSiz) override;
virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true) override;
- virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs) override;
+ virtual void Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void Mirror(const Point& rRef1, const Point& rRef2) override;
- virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
+ virtual void Shear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual void SetAnchorPos(const Point& rPnt) override;
virtual void SetRelativePos(const Point& rPnt) override;
virtual void SetSnapRect(const tools::Rectangle& rRect) override;
@@ -94,9 +94,9 @@ public:
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
- virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
+ virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
- virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
+ virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual void NbcSetAnchorPos(const Point& rPnt) override;
virtual void NbcSetRelativePos(const Point& rPnt) override;
virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx
index 6384d74882fb..3591a27c0d69 100644
--- a/include/svx/svdomeas.hxx
+++ b/include/svx/svdomeas.hxx
@@ -113,10 +113,10 @@ public:
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
- virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
+ virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
- virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
- virtual long GetRotateAngle() const override;
+ virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
+ virtual tools::Long GetRotateAngle() const override;
virtual void RecalcSnapRect() override;
virtual sal_uInt32 GetSnapPointCount() const override;
diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx
index 1436eca520ed..6c8de0e5ae0b 100644
--- a/include/svx/svdopath.hxx
+++ b/include/svx/svdopath.hxx
@@ -108,9 +108,9 @@ public:
virtual void NbcMove(const Size& aSize) override;
virtual void NbcResize(const Point& rRefPnt, const Fraction& aXFact, const Fraction& aYFact) override;
- virtual void NbcRotate(const Point& rRefPnt, long nAngle, double fSin, double fCos) override;
+ virtual void NbcRotate(const Point& rRefPnt, tools::Long nAngle, double fSin, double fCos) override;
virtual void NbcMirror(const Point& rRefPnt1, const Point& rRefPnt2) override;
- virtual void NbcShear(const Point& rRefPnt, long nAngle, double fTan, bool bVShear) override;
+ virtual void NbcShear(const Point& rRefPnt, tools::Long nAngle, double fTan, bool bVShear) override;
virtual sal_uInt32 GetSnapPointCount() const override;
virtual Point GetSnapPoint(sal_uInt32 i) const override;
diff --git a/include/svx/svdorect.hxx b/include/svx/svdorect.hxx
index 98929002b6d2..92c4e1d665cb 100644
--- a/include/svx/svdorect.hxx
+++ b/include/svx/svdorect.hxx
@@ -50,7 +50,7 @@ protected:
std::unique_ptr<XPolygon> mpXPoly;
protected:
- XPolygon ImpCalcXPoly(const tools::Rectangle& rRect1, long nRad1) const;
+ XPolygon ImpCalcXPoly(const tools::Rectangle& rRect1, tools::Long nRad1) const;
void SetXPolyDirty();
/// Subclasses should override RecalcXPoly() by creating an XPolygon
@@ -112,9 +112,9 @@ public:
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
- virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
+ virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
- virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
+ virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const override;
virtual SdrGluePoint GetCornerGluePoint(sal_uInt16 nNum) const override;
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index fd69b4a681b7..21a25330e913 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -293,7 +293,7 @@ protected:
virtual SdrObjGeoData* NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
- void NbcSetEckenradius(long nRad);
+ void NbcSetEckenradius(tools::Long nRad);
// #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set
// SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities
@@ -399,13 +399,13 @@ public:
const GeoStat& GetGeoStat() const { return aGeo; }
// get corner radius
- long GetEckenradius() const;
+ tools::Long GetEckenradius() const;
virtual bool IsAutoGrowHeight() const;
- long GetMinTextFrameHeight() const;
- long GetMaxTextFrameHeight() const;
+ tools::Long GetMinTextFrameHeight() const;
+ tools::Long GetMaxTextFrameHeight() const;
virtual bool IsAutoGrowWidth() const;
- long GetMinTextFrameWidth() const;
- long GetMaxTextFrameWidth() const;
+ tools::Long GetMinTextFrameWidth() const;
+ tools::Long GetMaxTextFrameWidth() const;
css::drawing::TextFitToSizeType GetFitToSize() const;
const tools::Rectangle &GetGeoRect() const;
@@ -426,13 +426,13 @@ public:
SdrTextVertAdjust GetTextVerticalAdjust() const;
/** Left inner spacing to borders */
- long GetTextLeftDistance() const;
+ tools::Long GetTextLeftDistance() const;
/** Right inner spacing to borders */
- long GetTextRightDistance() const;
+ tools::Long GetTextRightDistance() const;
/** Top inner spacing to borders */
- long GetTextUpperDistance() const;
+ tools::Long GetTextUpperDistance() const;
/** Bottom inner spacing to borders */
- long GetTextLowerDistance() const;
+ tools::Long GetTextLowerDistance() const;
SdrTextAniKind GetTextAniKind() const;
SdrTextAniDirection GetTextAniDirection() const;
@@ -454,8 +454,8 @@ public:
virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
virtual const tools::Rectangle& GetLogicRect() const override;
- virtual long GetRotateAngle() const override;
- virtual long GetShearAngle(bool bVertical = false) const override;
+ virtual tools::Long GetRotateAngle() const override;
+ virtual tools::Long GetShearAngle(bool bVertical = false) const override;
virtual sal_uInt32 GetSnapPointCount() const override;
virtual Point GetSnapPoint(sal_uInt32 i) const override;
@@ -478,9 +478,9 @@ public:
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
- virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
+ virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
- virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
+ virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual bool HasTextEdit() const override;
// returns true if TextEditMode started
diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx
index 5c6c68d87601..bede9e4356eb 100644
--- a/include/svx/svdovirt.hxx
+++ b/include/svx/svdovirt.hxx
@@ -100,15 +100,15 @@ public:
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
- virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
+ virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
- virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
+ virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual void Move(const Size& rSiz) override;
virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true) override;
- virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs) override;
+ virtual void Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void Mirror(const Point& rRef1, const Point& rRef2) override;
- virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
+ virtual void Shear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual void RecalcSnapRect() override;
virtual const tools::Rectangle& GetSnapRect() const override;
@@ -119,8 +119,8 @@ public:
virtual void SetLogicRect(const tools::Rectangle& rRect) override;
virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
- virtual long GetRotateAngle() const override;
- virtual long GetShearAngle(bool bVertical = false) const override;
+ virtual tools::Long GetRotateAngle() const override;
+ virtual tools::Long GetShearAngle(bool bVertical = false) const override;
virtual sal_uInt32 GetSnapPointCount() const override;
virtual Point GetSnapPoint(sal_uInt32 i) const override;
diff --git a/include/svx/svdpoev.hxx b/include/svx/svdpoev.hxx
index 171baf536a8f..538e1012bf49 100644
--- a/include/svx/svdpoev.hxx
+++ b/include/svx/svdpoev.hxx
@@ -66,7 +66,7 @@ public:
void MoveMarkedPoints(const Size& rSiz);
void ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
- void RotateMarkedPoints(const Point& rRef, long nAngle);
+ void RotateMarkedPoints(const Point& rRef, tools::Long nAngle);
// This probably creates an arbitrary amount of new objects
void RipUpAtMarkedPoints() override;
diff --git a/include/svx/svdsnpv.hxx b/include/svx/svdsnpv.hxx
index 89dc40d6a8cc..19305837bcc4 100644
--- a/include/svx/svdsnpv.hxx
+++ b/include/svx/svdsnpv.hxx
@@ -104,8 +104,8 @@ protected:
Fraction aSnapWdtY;
sal_uInt16 nMagnSizPix;
- long nSnapAngle;
- long nEliminatePolyPointLimitAngle;
+ tools::Long nSnapAngle;
+ tools::Long nEliminatePolyPointLimitAngle;
SdrCrookMode eCrookMode;
@@ -158,7 +158,7 @@ public:
// SdrSnap::YSNAPPED or SdrSnap::XYSNAPPED
SdrSnap SnapPos(Point& rPnt, const SdrPageView* pPV) const;
Point GetSnapPos(const Point& rPnt, const SdrPageView* pPV) const;
- void CheckSnap(const Point& rPt, long& nBestXSnap, long& nBestYSnap, bool& bXSnapped, bool& bYSnapped) const;
+ void CheckSnap(const Point& rPt, tools::Long& nBestXSnap, tools::Long& nBestYSnap, bool& bXSnapped, bool& bYSnapped) const;
// All attitudes to snap are persistent.
bool IsSnapEnabled() const { return bSnapEnab; }
@@ -220,8 +220,8 @@ public:
// persistent.
void SetAngleSnapEnabled(bool bOn) { bAngleSnapEnab=bOn; }
bool IsAngleSnapEnabled() const { return bAngleSnapEnab; }
- void SetSnapAngle(long nAngle) { nSnapAngle=nAngle; }
- long GetSnapAngle() const { return nSnapAngle; }
+ void SetSnapAngle(tools::Long nAngle) { nSnapAngle=nAngle; }
+ tools::Long GetSnapAngle() const { return nSnapAngle; }
// different effects from Ortho (depending on the context):
// - Create
@@ -280,8 +280,8 @@ public:
// if its adjacent lines are almost a solid line.
void SetEliminatePolyPoints(bool bOn) { bEliminatePolyPoints=bOn; }
bool IsEliminatePolyPoints() const { return bEliminatePolyPoints; }
- void SetEliminatePolyPointLimitAngle(long nAngle) { nEliminatePolyPointLimitAngle=nAngle; }
- long GetEliminatePolyPointLimitAngle() const { return nEliminatePolyPointLimitAngle; }
+ void SetEliminatePolyPointLimitAngle(tools::Long nAngle) { nEliminatePolyPointLimitAngle=nAngle; }
+ tools::Long GetEliminatePolyPointLimitAngle() const { return nEliminatePolyPointLimitAngle; }
};
#endif // INCLUDED_SVX_SVDSNPV_HXX
diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx
index 9e5bca9fdf0e..e510f6bc4140 100644
--- a/include/svx/svdtrans.hxx
+++ b/include/svx/svdtrans.hxx
@@ -113,8 +113,8 @@ inline void ResizePoint(Point& rPnt, const Point& rRef, const Fraction& xFract,
inline void RotatePoint(Point& rPnt, const Point& rRef, double sn, double cs)
{
- long dx=rPnt.X()-rRef.X();
- long dy=rPnt.Y()-rRef.Y();
+ tools::Long dx=rPnt.X()-rRef.X();
+ tools::Long dy=rPnt.Y()-rRef.Y();
rPnt.setX(FRound(rRef.X()+dx*cs+dy*sn));
rPnt.setY(FRound(rRef.Y()+dy*cs-dx*sn));
}
@@ -136,11 +136,11 @@ inline double GetCrookAngle(Point& rPnt, const Point& rCenter, const Point& rRad
{
double nAngle;
if (bVertical) {
- long dy=rPnt.Y()-rCenter.Y();
+ tools::Long dy=rPnt.Y()-rCenter.Y();
nAngle=static_cast<double>(dy)/static_cast<double>(rRad.Y());
rPnt.setY(rCenter.Y());
} else {
- long dx=rCenter.X()-rPnt.X();
+ tools::Long dx=rCenter.X()-rPnt.X();
nAngle=static_cast<double>(dx)/static_cast<double>(rRad.X());
rPnt.setX(rCenter.X());
}
@@ -159,19 +159,19 @@ inline double GetCrookAngle(Point& rPnt, const Point& rCenter, const Point& rRad
* @return the returned value is in the range of -180.00..179.99 deg
* and is in 1/100 deg units
*/
-SVXCORE_DLLPUBLIC long GetAngle(const Point& rPnt);
+SVXCORE_DLLPUBLIC tools::Long GetAngle(const Point& rPnt);
-long NormAngle18000(long a); /// Normalize angle to -180.00..179.99
+tools::Long NormAngle18000(tools::Long a); /// Normalize angle to -180.00..179.99
-SVXCORE_DLLPUBLIC long NormAngle36000(long a); /// Normalize angle to 0.00..359.99
+SVXCORE_DLLPUBLIC tools::Long NormAngle36000(tools::Long a); /// Normalize angle to 0.00..359.99
-sal_uInt16 GetAngleSector(long nAngle); /// Determine sector within the cartesian coordinate system
+sal_uInt16 GetAngleSector(tools::Long nAngle); /// Determine sector within the cartesian coordinate system
/**
* Calculates the length of (0,0) via a^2 + b^2 = c^2
* In order to avoid overflows, we ignore some decimal places.
*/
-long GetLen(const Point& rPnt);
+tools::Long GetLen(const Point& rPnt);
/**
* The transformation of a rectangle into a polygon, by
@@ -213,8 +213,8 @@ long GetLen(const Point& rPnt);
class GeoStat { // Geometric state for a rect
public:
- long nRotationAngle;
- long nShearAngle;
+ tools::Long nRotationAngle;
+ tools::Long nShearAngle;
double nTan; // tan(nShearAngle)
double nSin; // sin(nRotationAngle)
double nCos; // cos(nRotationAngle)
@@ -232,7 +232,7 @@ void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho);
// Multiplication and subsequent division
// Calculation and intermediate values are in BigInt
-SVXCORE_DLLPUBLIC long BigMulDiv(long nVal, long nMul, long nDiv);
+SVXCORE_DLLPUBLIC tools::Long BigMulDiv(tools::Long nVal, tools::Long nMul, tools::Long nDiv);
class FrPair {
Fraction aX;
@@ -240,8 +240,8 @@ class FrPair {
public:
FrPair(const Fraction& rBoth) : aX(rBoth),aY(rBoth) {}
FrPair(const Fraction& rX, const Fraction& rY) : aX(rX),aY(rY) {}
- FrPair(long nMul, long nDiv) : aX(nMul,nDiv),aY(nMul,nDiv) {}
- FrPair(long xMul, long xDiv, long yMul, long yDiv): aX(xMul,xDiv),aY(yMul,yDiv) {}
+ FrPair(tools::Long nMul, tools::Long nDiv) : aX(nMul,nDiv),aY(nMul,nDiv) {}
+ FrPair(tools::Long xMul, tools::Long xDiv, tools::Long yMul, tools::Long yDiv): aX(xMul,xDiv),aY(yMul,yDiv) {}
const Fraction& X() const { return aX; }
const Fraction& Y() const { return aY; }
Fraction& X() { return aX; }
@@ -273,8 +273,8 @@ inline bool IsInch(FieldUnit eU) {
}
class SVXCORE_DLLPUBLIC SdrFormatter {
- long nMul_;
- long nDiv_;
+ tools::Long nMul_;
+ tools::Long nDiv_;
short nComma_;
bool bDirty;
MapUnit eSrcMU;
@@ -291,7 +291,7 @@ public:
, eDstMU(eDst)
{
}
- OUString GetStr(long nVal) const;
+ OUString GetStr(tools::Long nVal) const;
static OUString GetUnitStr(MapUnit eUnit);
static OUString GetUnitStr(FieldUnit eUnit);
};
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index df6f6f106c47..9d0b322a4374 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -146,8 +146,8 @@ class AbstractFmInputRecordNoDialog :public VclAbstractDialog
protected:
virtual ~AbstractFmInputRecordNoDialog() override = default;
public:
- virtual void SetValue(long dNew) = 0;
- virtual long GetValue() const = 0;
+ virtual void SetValue(tools::Long dNew) = 0;
+ virtual tools::Long GetValue() const = 0;
};
class AbstractSvxNewDictionaryDialog :public VclAbstractDialog
@@ -287,7 +287,7 @@ protected:
public:
virtual bool IsHorizontal() const = 0;
virtual bool IsProportional() const = 0;
- virtual long GetCount() const = 0;
+ virtual tools::Long GetCount() const = 0;
virtual void SetSplitVerticalByDefault() = 0;
};
@@ -440,7 +440,7 @@ public:
virtual VclPtr<SfxAbstractTabDialog> CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel )=0;
- virtual VclPtr<SvxAbstractSplitTableDialog> CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long nMaxVertical) = 0;
+ virtual VclPtr<SvxAbstractSplitTableDialog> CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, tools::Long nMaxVertical) = 0;
virtual std::shared_ptr<SvxAbstractNewTableDialog> CreateSvxNewTableDialog(weld::Window* pParent) = 0;
diff --git a/include/svx/sxcecitm.hxx b/include/svx/sxcecitm.hxx
index 5f946d2aa14f..cb36eb75d1da 100644
--- a/include/svx/sxcecitm.hxx
+++ b/include/svx/sxcecitm.hxx
@@ -67,7 +67,7 @@ public:
class SVXCORE_DLLPUBLIC SdrCaptionEscRelItem: public SfxInt32Item {
public:
- SdrCaptionEscRelItem(long nEscRel=5000): SfxInt32Item(SDRATTR_CAPTIONESCREL,nEscRel) {}
+ SdrCaptionEscRelItem(tools::Long nEscRel=5000): SfxInt32Item(SDRATTR_CAPTIONESCREL,nEscRel) {}
virtual ~SdrCaptionEscRelItem() override;
virtual SdrCaptionEscRelItem* Clone(SfxItemPool* pPool=nullptr) const override;
@@ -86,7 +86,7 @@ public:
class SdrCaptionEscAbsItem: public SdrMetricItem {
public:
- SdrCaptionEscAbsItem(long nEscAbs=0): SdrMetricItem(SDRATTR_CAPTIONESCABS,nEscAbs) {}
+ SdrCaptionEscAbsItem(tools::Long nEscAbs=0): SdrMetricItem(SDRATTR_CAPTIONESCABS,nEscAbs) {}
virtual SdrCaptionEscAbsItem* Clone(SfxItemPool*) const override
{
return new SdrCaptionEscAbsItem(*this);
diff --git a/include/svx/sxcgitm.hxx b/include/svx/sxcgitm.hxx
index e39fff4446aa..64e7337b36ef 100644
--- a/include/svx/sxcgitm.hxx
+++ b/include/svx/sxcgitm.hxx
@@ -28,7 +28,7 @@
*/
class SdrCaptionGapItem final : public SdrMetricItem {
public:
- SdrCaptionGapItem(long nGap=0) : SdrMetricItem(SDRATTR_CAPTIONGAP,nGap) {}
+ SdrCaptionGapItem(tools::Long nGap=0) : SdrMetricItem(SDRATTR_CAPTIONGAP,nGap) {}
virtual SdrCaptionGapItem* Clone(SfxItemPool*) const override
{
return new SdrCaptionGapItem(*this);
diff --git a/include/svx/sxciaitm.hxx b/include/svx/sxciaitm.hxx
index 27bc07a1853f..cde519accd36 100644
--- a/include/svx/sxciaitm.hxx
+++ b/include/svx/sxciaitm.hxx
@@ -22,11 +22,11 @@
#include <svx/svddef.hxx>
#include <svx/sdangitm.hxx>
-inline SdrAngleItem makeSdrCircStartAngleItem(long nAngle) {
+inline SdrAngleItem makeSdrCircStartAngleItem(tools::Long nAngle) {
return SdrAngleItem(SDRATTR_CIRCSTARTANGLE, nAngle);
}
-inline SdrAngleItem makeSdrCircEndAngleItem(long nAngle) {
+inline SdrAngleItem makeSdrCircEndAngleItem(tools::Long nAngle) {
return SdrAngleItem(SDRATTR_CIRCENDANGLE, nAngle);
}
diff --git a/include/svx/sxcllitm.hxx b/include/svx/sxcllitm.hxx
index 00b4903bef25..f73838f4eba0 100644
--- a/include/svx/sxcllitm.hxx
+++ b/include/svx/sxcllitm.hxx
@@ -30,7 +30,7 @@
*/
class SVXCORE_DLLPUBLIC SdrCaptionLineLenItem: public SdrMetricItem {
public:
- SdrCaptionLineLenItem(long nLineLen=0): SdrMetricItem(SDRATTR_CAPTIONLINELEN,nLineLen) {}
+ SdrCaptionLineLenItem(tools::Long nLineLen=0): SdrMetricItem(SDRATTR_CAPTIONLINELEN,nLineLen) {}
virtual ~SdrCaptionLineLenItem() override;
virtual SdrCaptionLineLenItem* Clone(SfxItemPool* pPool=nullptr) const override;
diff --git a/include/svx/sxelditm.hxx b/include/svx/sxelditm.hxx
index a1efd2c9185f..34557d42d850 100644
--- a/include/svx/sxelditm.hxx
+++ b/include/svx/sxelditm.hxx
@@ -31,15 +31,15 @@ public:
}
};
-inline SdrMetricItem makeSdrEdgeLine1DeltaItem(long nVal) {
+inline SdrMetricItem makeSdrEdgeLine1DeltaItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_EDGELINE1DELTA, nVal);
}
-inline SdrMetricItem makeSdrEdgeLine2DeltaItem(long nVal) {
+inline SdrMetricItem makeSdrEdgeLine2DeltaItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_EDGELINE2DELTA, nVal);
}
-inline SdrMetricItem makeSdrEdgeLine3DeltaItem(long nVal) {
+inline SdrMetricItem makeSdrEdgeLine3DeltaItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_EDGELINE3DELTA, nVal);
}
diff --git a/include/svx/sxenditm.hxx b/include/svx/sxenditm.hxx
index c34dfed30887..82ff4b7c348e 100644
--- a/include/svx/sxenditm.hxx
+++ b/include/svx/sxenditm.hxx
@@ -25,7 +25,7 @@
class SVXCORE_DLLPUBLIC SdrEdgeNode1HorzDistItem: public SdrMetricItem {
public:
- SdrEdgeNode1HorzDistItem(long nVal): SdrMetricItem(SDRATTR_EDGENODE1HORZDIST,nVal) {}
+ SdrEdgeNode1HorzDistItem(tools::Long nVal): SdrMetricItem(SDRATTR_EDGENODE1HORZDIST,nVal) {}
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
virtual SdrEdgeNode1HorzDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
@@ -33,7 +33,7 @@ public:
class SVXCORE_DLLPUBLIC SdrEdgeNode1VertDistItem: public SdrMetricItem {
public:
- SdrEdgeNode1VertDistItem(long nVal): SdrMetricItem(SDRATTR_EDGENODE1VERTDIST,nVal) {}
+ SdrEdgeNode1VertDistItem(tools::Long nVal): SdrMetricItem(SDRATTR_EDGENODE1VERTDIST,nVal) {}
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
virtual SdrEdgeNode1VertDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
@@ -41,7 +41,7 @@ public:
class SVXCORE_DLLPUBLIC SdrEdgeNode2HorzDistItem: public SdrMetricItem {
public:
- SdrEdgeNode2HorzDistItem(long nVal): SdrMetricItem(SDRATTR_EDGENODE2HORZDIST,nVal) {}
+ SdrEdgeNode2HorzDistItem(tools::Long nVal): SdrMetricItem(SDRATTR_EDGENODE2HORZDIST,nVal) {}
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
virtual SdrEdgeNode2HorzDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
@@ -49,7 +49,7 @@ public:
class SVXCORE_DLLPUBLIC SdrEdgeNode2VertDistItem: public SdrMetricItem {
public:
- SdrEdgeNode2VertDistItem(long nVal): SdrMetricItem(SDRATTR_EDGENODE2VERTDIST,nVal) {}
+ SdrEdgeNode2VertDistItem(tools::Long nVal): SdrMetricItem(SDRATTR_EDGENODE2VERTDIST,nVal) {}
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
virtual SdrEdgeNode2VertDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
@@ -57,13 +57,13 @@ public:
class SdrEdgeNode1GlueDistItem: public SdrMetricItem {
public:
- SdrEdgeNode1GlueDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE1GLUEDIST,nVal) {}
+ SdrEdgeNode1GlueDistItem(tools::Long nVal=0): SdrMetricItem(SDRATTR_EDGENODE1GLUEDIST,nVal) {}
virtual SdrEdgeNode1GlueDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
class SdrEdgeNode2GlueDistItem: public SdrMetricItem {
public:
- SdrEdgeNode2GlueDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE2GLUEDIST,nVal) {}
+ SdrEdgeNode2GlueDistItem(tools::Long nVal=0): SdrMetricItem(SDRATTR_EDGENODE2GLUEDIST,nVal) {}
virtual SdrEdgeNode2GlueDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
diff --git a/include/svx/sxmlhitm.hxx b/include/svx/sxmlhitm.hxx
index b2d45fa50a26..fc18d53e4683 100644
--- a/include/svx/sxmlhitm.hxx
+++ b/include/svx/sxmlhitm.hxx
@@ -36,27 +36,27 @@
// gab between dimension line and document reference edge (norm=8mm)
// can be dragged on the handles of the arrowheads
-inline SdrMetricItem makeSdrMeasureLineDistItem(long nVal) {
+inline SdrMetricItem makeSdrMeasureLineDistItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_MEASURELINEDIST, nVal);
}
// overhang of dimension help line to dimension line (norm=2mm)
-inline SdrMetricItem makeSdrMeasureHelplineOverhangItem(long nVal) {
+inline SdrMetricItem makeSdrMeasureHelplineOverhangItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG, nVal);
}
// gab between dimension line and document reference edge
// dimension help lines shell not touch the object
-inline SdrMetricItem makeSdrMeasureHelplineDistItem(long nVal) {
+inline SdrMetricItem makeSdrMeasureHelplineDistItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST, nVal);
}
// overlength of the help lines can be dragged at the round handles,
// which are under the reference points by default
-inline SdrMetricItem makeSdrMeasureHelpline1LenItem(long nVal) {
+inline SdrMetricItem makeSdrMeasureHelpline1LenItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN, nVal);
}
-inline SdrMetricItem makeSdrMeasureHelpline2LenItem(long nVal) {
+inline SdrMetricItem makeSdrMeasureHelpline2LenItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN, nVal);
}
diff --git a/include/svx/sxmtfitm.hxx b/include/svx/sxmtfitm.hxx
index 4701c037f518..6591ff2eb40a 100644
--- a/include/svx/sxmtfitm.hxx
+++ b/include/svx/sxmtfitm.hxx
@@ -42,7 +42,7 @@ public:
//Angle of the text in 1/100deg. 0=horizontal; read from left to right. (n.i.)
class SdrMeasureTextFixedAngleItem: public SdrAngleItem {
public:
- SdrMeasureTextFixedAngleItem(long nVal=0): SdrAngleItem(SDRATTR_MEASURETEXTFIXEDANGLE,nVal) {}
+ SdrMeasureTextFixedAngleItem(tools::Long nVal=0): SdrAngleItem(SDRATTR_MEASURETEXTFIXEDANGLE,nVal) {}
virtual ~SdrMeasureTextFixedAngleItem() override;
virtual SdrMeasureTextFixedAngleItem* Clone(SfxItemPool* pPool=nullptr) const override;
diff --git a/include/svx/xflbmsxy.hxx b/include/svx/xflbmsxy.hxx
index d5c9769a3901..76611d3bd56a 100644
--- a/include/svx/xflbmsxy.hxx
+++ b/include/svx/xflbmsxy.hxx
@@ -26,7 +26,7 @@
class SVXCORE_DLLPUBLIC XFillBmpSizeXItem final : public SfxMetricItem
{
public:
- XFillBmpSizeXItem( long nSizeX = 0 );
+ XFillBmpSizeXItem( tools::Long nSizeX = 0 );
SVX_DLLPRIVATE virtual XFillBmpSizeXItem* Clone( SfxItemPool* pPool = nullptr ) const override;
@@ -42,7 +42,7 @@ public:
class SVXCORE_DLLPUBLIC XFillBmpSizeYItem final : public SfxMetricItem
{
public:
- XFillBmpSizeYItem( long nSizeY = 0 );
+ XFillBmpSizeYItem( tools::Long nSizeY = 0 );
SVX_DLLPRIVATE virtual XFillBmpSizeYItem* Clone( SfxItemPool* pPool = nullptr ) const override;
diff --git a/include/svx/xflhtit.hxx b/include/svx/xflhtit.hxx
index b3dcb2b04df3..1ef7d4e11d55 100644
--- a/include/svx/xflhtit.hxx
+++ b/include/svx/xflhtit.hxx
@@ -50,7 +50,7 @@ public:
MapUnit ePresMetric,
OUString &rText, const IntlWrapper& ) const override;
virtual bool HasMetrics() const override;
- virtual void ScaleMetrics(long nMul, long nDiv) override;
+ virtual void ScaleMetrics(tools::Long nMul, tools::Long nDiv) override;
const XHatch& GetHatchValue() const { return aHatch;} // GetValue -> GetHatchValue
diff --git a/include/svx/xftdiit.hxx b/include/svx/xftdiit.hxx
index 516d219a009a..d77323e78951 100644
--- a/include/svx/xftdiit.hxx
+++ b/include/svx/xftdiit.hxx
@@ -33,7 +33,7 @@ class SVXCORE_DLLPUBLIC XFormTextDistanceItem final : public SfxMetricItem
{
public:
static SfxPoolItem* CreateDefault();
- XFormTextDistanceItem(long nDist = 0);
+ XFormTextDistanceItem(tools::Long nDist = 0);
virtual XFormTextDistanceItem* Clone(SfxItemPool* pPool = nullptr) const override;
};
diff --git a/include/svx/xftshxy.hxx b/include/svx/xftshxy.hxx
index 1a3d7c19b7d6..2e7cbe66350e 100644
--- a/include/svx/xftshxy.hxx
+++ b/include/svx/xftshxy.hxx
@@ -34,7 +34,7 @@ class SVXCORE_DLLPUBLIC XFormTextShadowXValItem final : public SfxMetricItem
public:
static SfxPoolItem* CreateDefault();
- XFormTextShadowXValItem(long nVal = 0);
+ XFormTextShadowXValItem(tools::Long nVal = 0);
virtual XFormTextShadowXValItem* Clone(SfxItemPool* pPool = nullptr) const override;
};
@@ -48,7 +48,7 @@ class SVXCORE_DLLPUBLIC XFormTextShadowYValItem final : public SfxMetricItem
{
public:
static SfxPoolItem* CreateDefault();
- XFormTextShadowYValItem(long nVal = 0);
+ XFormTextShadowYValItem(tools::Long nVal = 0);
virtual XFormTextShadowYValItem* Clone(SfxItemPool* pPool = nullptr) const override;
};
diff --git a/include/svx/xftstit.hxx b/include/svx/xftstit.hxx
index 51e03e7905f6..bc9243968295 100644
--- a/include/svx/xftstit.hxx
+++ b/include/svx/xftstit.hxx
@@ -34,7 +34,7 @@ class SVXCORE_DLLPUBLIC XFormTextStartItem final : public SfxMetricItem
public:
static SfxPoolItem* CreateDefault();
- XFormTextStartItem(long nStart = 0);
+ XFormTextStartItem(tools::Long nStart = 0);
virtual XFormTextStartItem* Clone(SfxItemPool* pPool = nullptr) const override;
};
diff --git a/include/svx/xhatch.hxx b/include/svx/xhatch.hxx
index 0ef791c64caf..91dea6e6c1e2 100644
--- a/include/svx/xhatch.hxx
+++ b/include/svx/xhatch.hxx
@@ -22,6 +22,7 @@
#include <tools/color.hxx>
#include <tools/degree.hxx>
+#include <tools/long.hxx>
#include <svx/svxdllapi.h>
#include <com/sun/star/drawing/HatchStyle.hpp>
@@ -32,24 +33,24 @@ class SVXCORE_DLLPUBLIC XHatch final
{
css::drawing::HatchStyle eStyle;
Color aColor;
- long nDistance;
+ tools::Long nDistance;
Degree10 nAngle;
public:
XHatch() : eStyle(css::drawing::HatchStyle_SINGLE), nDistance(0), nAngle(0) {}
XHatch(const Color& rCol, css::drawing::HatchStyle eStyle = css::drawing::HatchStyle_SINGLE,
- long nDistance = 20, Degree10 nAngle = Degree10(0));
+ tools::Long nDistance = 20, Degree10 nAngle = Degree10(0));
bool operator==(const XHatch& rHatch) const;
void SetHatchStyle(css::drawing::HatchStyle eNewStyle) { eStyle = eNewStyle; }
void SetColor(const Color& rColor) { aColor = rColor; }
- void SetDistance(long nNewDistance) { nDistance = nNewDistance; }
+ void SetDistance(tools::Long nNewDistance) { nDistance = nNewDistance; }
void SetAngle(Degree10 nNewAngle) { nAngle = nNewAngle; }
css::drawing::HatchStyle GetHatchStyle() const { return eStyle; }
const Color& GetColor() const { return aColor; }
- long GetDistance() const { return nDistance; }
+ tools::Long GetDistance() const { return nDistance; }
Degree10 GetAngle() const { return nAngle; }
};
diff --git a/include/svx/xlndsit.hxx b/include/svx/xlndsit.hxx
index 4998b1f03fc1..c9ec5d711de5 100644
--- a/include/svx/xlndsit.hxx
+++ b/include/svx/xlndsit.hxx
@@ -52,7 +52,7 @@ public:
MapUnit ePresMetric,
OUString &rText, const IntlWrapper& ) const override;
virtual bool HasMetrics() const override;
- virtual void ScaleMetrics(long nMul, long nDiv) override;
+ virtual void ScaleMetrics(tools::Long nMul, tools::Long nDiv) override;
const XDash& GetDashValue() const { return aDash;}
void SetDashValue(const XDash& rNew) { aDash = rNew; Detach(); } // SetValue -> SetDashValue
diff --git a/include/svx/xlnedwit.hxx b/include/svx/xlnedwit.hxx
index 1e9ef4a2e333..a049794f3ba0 100644
--- a/include/svx/xlnedwit.hxx
+++ b/include/svx/xlnedwit.hxx
@@ -31,7 +31,7 @@
class SVXCORE_DLLPUBLIC XLineEndWidthItem final : public SfxMetricItem
{
public:
- XLineEndWidthItem(long nWidth = LINE_END_WIDTH_DEFAULT);
+ XLineEndWidthItem(tools::Long nWidth = LINE_END_WIDTH_DEFAULT);
virtual XLineEndWidthItem* Clone(SfxItemPool* pPool = nullptr) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
diff --git a/include/svx/xlnstwit.hxx b/include/svx/xlnstwit.hxx
index 3094c3297695..c6803e3719a7 100644
--- a/include/svx/xlnstwit.hxx
+++ b/include/svx/xlnstwit.hxx
@@ -30,7 +30,7 @@
class SVXCORE_DLLPUBLIC XLineStartWidthItem final : public SfxMetricItem
{
public:
- XLineStartWidthItem(long nWidth = LINE_START_WIDTH_DEFAULT);
+ XLineStartWidthItem(tools::Long nWidth = LINE_START_WIDTH_DEFAULT);
virtual XLineStartWidthItem* Clone(SfxItemPool* pPool = nullptr) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
diff --git a/include/svx/xlnwtit.hxx b/include/svx/xlnwtit.hxx
index 65cd9ee8ead3..21df71b8a713 100644
--- a/include/svx/xlnwtit.hxx
+++ b/include/svx/xlnwtit.hxx
@@ -29,7 +29,7 @@ class SVXCORE_DLLPUBLIC XLineWidthItem final : public SfxMetricItem
{
public:
static SfxPoolItem* CreateDefault();
- XLineWidthItem(long nWidth = 0);
+ XLineWidthItem(tools::Long nWidth = 0);
virtual XLineWidthItem* Clone(SfxItemPool* pPool = nullptr) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
diff --git a/include/svx/xpoly.hxx b/include/svx/xpoly.hxx
index e872b205da85..7f50a4c76281 100644
--- a/include/svx/xpoly.hxx
+++ b/include/svx/xpoly.hxx
@@ -47,8 +47,8 @@ class SVXCORE_DLLPUBLIC XPolygon final
// auxiliary functions for Bezier conversion
void SubdivideBezier(sal_uInt16 nPos, bool bCalcFirst, double fT);
- void GenBezArc(const Point& rCenter, long nRx, long nRy,
- long nXHdl, long nYHdl, sal_uInt16 nStart, sal_uInt16 nEnd,
+ void 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);
static bool CheckAngles(sal_uInt16& nStart, sal_uInt16 nEnd, sal_uInt16& nA1, sal_uInt16& nA2);
@@ -57,8 +57,8 @@ public:
XPolygon( const XPolygon& );
XPolygon( XPolygon&& );
XPolygon( const tools::Polygon& rPoly );
- XPolygon( const tools::Rectangle& rRect, long nRx = 0, long nRy = 0 );
- XPolygon( const Point& rCenter, long nRx, long nRy,
+ XPolygon( const tools::Rectangle& rRect, tools::Long nRx = 0, tools::Long nRy = 0 );
+ XPolygon( const Point& rCenter, tools::Long nRx, tools::Long nRy,
sal_uInt16 nStartAngle = 0, sal_uInt16 nEndAngle = 3600,
bool bClose = true );
@@ -72,7 +72,7 @@ public:
void Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags );
void Insert( sal_uInt16 nPos, const XPolygon& rXPoly );
void Remove( sal_uInt16 nPos, sal_uInt16 nCount );
- void Move( long nHorzMove, long nVertMove );
+ void Move( tools::Long nHorzMove, tools::Long nVertMove );
tools::Rectangle GetBoundRect() const;
const Point& operator[]( sal_uInt16 nPos ) const;
diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
index db1f1a7e658c..d7a16f4f01ff 100644
--- a/include/svx/xtable.hxx
+++ b/include/svx/xtable.hxx
@@ -164,8 +164,8 @@ protected:
bool mbEmbedInDocument;
XPropertyList(XPropertyListType t, const OUString& rPath, const OUString& rReferer);
- bool isValidIdx(long nIndex) const;
- virtual BitmapEx CreateBitmapForUI(long nIndex) = 0;
+ bool isValidIdx(tools::Long nIndex) const;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) = 0;
public:
XPropertyList(const XPropertyList&) = delete;
@@ -173,15 +173,15 @@ public:
virtual ~XPropertyList() override;
XPropertyListType Type() const { return meType; }
- long Count() const;
+ tools::Long Count() const;
- void Insert(std::unique_ptr<XPropertyEntry> pEntry, long nIndex = std::numeric_limits<long>::max());
- void Replace(std::unique_ptr<XPropertyEntry> pEntry, long nIndex);
- void Remove(long nIndex);
+ void Insert(std::unique_ptr<XPropertyEntry> pEntry, tools::Long nIndex = std::numeric_limits<long>::max());
+ void Replace(std::unique_ptr<XPropertyEntry> pEntry, tools::Long nIndex);
+ void Remove(tools::Long nIndex);
- XPropertyEntry* Get(long nIndex) const;
- long GetIndex(const OUString& rName) const;
- BitmapEx GetUiBitmap(long nIndex) const;
+ XPropertyEntry* Get(tools::Long nIndex) const;
+ tools::Long GetIndex(const OUString& rName) const;
+ BitmapEx GetUiBitmap(tools::Long nIndex) const;
const OUString& GetName() const { return maName; }
void SetName(const OUString& rString);
@@ -237,15 +237,15 @@ public:
class SVXCORE_DLLPUBLIC XColorList : public XPropertyList
{
protected:
- virtual BitmapEx CreateBitmapForUI(long nIndex) override;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XColorList(const OUString& rPath, const OUString& rReferer)
: XPropertyList(XPropertyListType::Color, rPath, rReferer) {}
- void Replace(long nIndex, std::unique_ptr<XColorEntry> pEntry);
- XColorEntry* GetColor(long nIndex) const;
- long GetIndexOfColor( const Color& rColor) const;
+ void Replace(tools::Long nIndex, std::unique_ptr<XColorEntry> pEntry);
+ XColorEntry* GetColor(tools::Long nIndex) const;
+ tools::Long GetIndexOfColor( const Color& rColor) const;
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
@@ -256,13 +256,13 @@ public:
class SVXCORE_DLLPUBLIC XLineEndList : public XPropertyList
{
protected:
- virtual BitmapEx CreateBitmapForUI(long nIndex) override;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XLineEndList(const OUString& rPath, const OUString& rReferer);
virtual ~XLineEndList() override;
- XLineEndEntry* GetLineEnd(long nIndex) const;
+ XLineEndEntry* GetLineEnd(tools::Long nIndex) const;
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
@@ -277,14 +277,14 @@ private:
protected:
static BitmapEx ImpCreateBitmapForXDash(const XDash* pDash);
- virtual BitmapEx CreateBitmapForUI(long nIndex) override;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XDashList(const OUString& rPath, const OUString& rReferer);
virtual ~XDashList() override;
- void Replace(std::unique_ptr<XDashEntry> pEntry, long nIndex);
- XDashEntry* GetDash(long nIndex) const;
+ void Replace(std::unique_ptr<XDashEntry> pEntry, tools::Long nIndex);
+ XDashEntry* GetDash(tools::Long nIndex) const;
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
@@ -303,16 +303,16 @@ public:
class SVXCORE_DLLPUBLIC XHatchList : public XPropertyList
{
private:
- BitmapEx CreateBitmap(long nIndex, const Size& rSize) const;
+ BitmapEx CreateBitmap(tools::Long nIndex, const Size& rSize) const;
protected:
- virtual BitmapEx CreateBitmapForUI(long nIndex) override;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XHatchList(const OUString& rPath, const OUString& rReferer);
virtual ~XHatchList() override;
- void Replace(std::unique_ptr<XHatchEntry> pEntry, long nIndex);
- XHatchEntry* GetHatch(long nIndex) const;
- BitmapEx GetBitmapForPreview(long nIndex, const Size& rSize);
+ void Replace(std::unique_ptr<XHatchEntry> pEntry, tools::Long nIndex);
+ XHatchEntry* GetHatch(tools::Long nIndex) const;
+ BitmapEx GetBitmapForPreview(tools::Long nIndex, const Size& rSize);
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
@@ -321,18 +321,18 @@ public:
class SVXCORE_DLLPUBLIC XGradientList : public XPropertyList
{
private:
- BitmapEx CreateBitmap(long nIndex, const Size& rSize) const;
+ BitmapEx CreateBitmap(tools::Long nIndex, const Size& rSize) const;
protected:
- virtual BitmapEx CreateBitmapForUI(long nIndex) override;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XGradientList(const OUString& rPath, const OUString& rReferer);
virtual ~XGradientList() override;
- void Replace(std::unique_ptr<XGradientEntry> pEntry, long nIndex);
- XGradientEntry* GetGradient(long nIndex) const;
- BitmapEx GetBitmapForPreview(long nIndex, const Size& rSize);
+ void Replace(std::unique_ptr<XGradientEntry> pEntry, tools::Long nIndex);
+ XGradientEntry* GetGradient(tools::Long nIndex) const;
+ BitmapEx GetBitmapForPreview(tools::Long nIndex, const Size& rSize);
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
@@ -341,17 +341,17 @@ public:
class SVXCORE_DLLPUBLIC XBitmapList : public XPropertyList
{
private:
- BitmapEx CreateBitmap( long nIndex, const Size& rSize ) const;
+ BitmapEx CreateBitmap( tools::Long nIndex, const Size& rSize ) const;
protected:
- virtual BitmapEx CreateBitmapForUI(long nIndex) override;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XBitmapList(const OUString& rPath, const OUString& rReferer)
: XPropertyList(XPropertyListType::Bitmap, rPath, rReferer) {}
- XBitmapEntry* GetBitmap(long nIndex) const;
- BitmapEx GetBitmapForPreview(long nIndex, const Size& rSize);
+ XBitmapEntry* GetBitmap(tools::Long nIndex) const;
+ BitmapEx GetBitmapForPreview(tools::Long nIndex, const Size& rSize);
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
@@ -360,17 +360,17 @@ public:
class SVXCORE_DLLPUBLIC XPatternList : public XPropertyList
{
private:
- BitmapEx CreateBitmap( long nIndex, const Size& rSize ) const;
+ BitmapEx CreateBitmap( tools::Long nIndex, const Size& rSize ) const;
protected:
- virtual BitmapEx CreateBitmapForUI(long nIndex) override;
+ virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XPatternList(const OUString& rPath, const OUString& rReferer)
: XPropertyList(XPropertyListType::Pattern, rPath, rReferer) {}
- XBitmapEntry* GetBitmap(long nIndex) const;
- BitmapEx GetBitmapForPreview(long nIndex, const Size& rSize);
+ XBitmapEntry* GetBitmap(tools::Long nIndex) const;
+ BitmapEx GetBitmapForPreview(tools::Long nIndex, const Size& rSize);
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
diff --git a/include/svx/zoomsliderctrl.hxx b/include/svx/zoomsliderctrl.hxx
index 41e9e5abdc5f..dd13029a548a 100644
--- a/include/svx/zoomsliderctrl.hxx
+++ b/include/svx/zoomsliderctrl.hxx
@@ -31,8 +31,8 @@ private:
struct SvxZoomSliderControl_Impl;
std::unique_ptr<SvxZoomSliderControl_Impl> mxImpl;
- sal_uInt16 Offset2Zoom( long nOffset ) const;
- long Zoom2Offset( sal_uInt16 nZoom ) const;
+ sal_uInt16 Offset2Zoom( tools::Long nOffset ) const;
+ tools::Long Zoom2Offset( sal_uInt16 nZoom ) const;
void repaintAndExecute();
void forceRepaint() const;
diff --git a/include/test/sheet/xsheetannotations.hxx b/include/test/sheet/xsheetannotations.hxx
index d1cd65ea4b09..f9b92968ffae 100644
--- a/include/test/sheet/xsheetannotations.hxx
+++ b/include/test/sheet/xsheetannotations.hxx
@@ -16,6 +16,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
+#include <tools/long.hxx>
namespace apitest {
@@ -23,7 +24,7 @@ class OOO_DLLPUBLIC_TEST XSheetAnnotations
{
public:
virtual css::uno::Reference< css::uno::XInterface > init() = 0;
- virtual css::uno::Reference< css::sheet::XSheetAnnotations> getAnnotations(long nIndex) = 0;
+ virtual css::uno::Reference< css::sheet::XSheetAnnotations> getAnnotations(tools::Long nIndex) = 0;
// XSheetAnnotations
void testIndex();
diff --git a/include/toolkit/controls/unocontrol.hxx b/include/toolkit/controls/unocontrol.hxx
index a406a22bc5e8..ff6c74608614 100644
--- a/include/toolkit/controls/unocontrol.hxx
+++ b/include/toolkit/controls/unocontrol.hxx
@@ -31,6 +31,7 @@
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <osl/mutex.hxx>
#include <toolkit/helper/listenermultiplexer.hxx>
+#include <tools/long.hxx>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/implbase9.hxx>
#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
@@ -42,7 +43,7 @@ struct UnoControlComponentInfos
{
bool bVisible;
bool bEnable;
- long nX, nY, nWidth, nHeight;
+ tools::Long nX, nY, nWidth, nHeight;
sal_uInt16 nFlags;
float nZoomX, nZoomY;
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 1acd11556f43..76f6f331d266 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -71,7 +71,7 @@ bool ViewFilter_Application::operator () (const ThumbnailViewItem *pItem)
return true;
}
-void TemplateLocalView::updateThumbnailDimensions(long itemMaxSize)
+void TemplateLocalView::updateThumbnailDimensions(tools::Long itemMaxSize)
{
mnThumbnailWidth = itemMaxSize;
mnThumbnailHeight = itemMaxSize;
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 4ac54a950afb..82a6670e3e4a 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -394,18 +394,18 @@ void ThumbnailView::CalculateItemPositions(bool bScrollBarUsed)
mbHasVisibleItems = true;
- long nFullSteps = (mnLines > mnVisLines) ? mnLines - mnVisLines + 1 : 1;
+ tools::Long nFullSteps = (mnLines > mnVisLines) ? mnLines - mnVisLines + 1 : 1;
- long nItemHeightOffset = mnItemHeight + nVItemSpace;
- long nHiddenLines = static_cast<long>((nFullSteps - 1) * nScrollRatio);
+ tools::Long nItemHeightOffset = mnItemHeight + nVItemSpace;
+ tools::Long nHiddenLines = static_cast<tools::Long>((nFullSteps - 1) * nScrollRatio);
// calculate offsets
- long nStartX = nHItemSpace;
- long nStartY = nVItemSpace;
+ tools::Long nStartX = nHItemSpace;
+ tools::Long nStartY = nVItemSpace;
// calculate and draw items
- long x = nStartX;
- long y = nStartY - ((nFullSteps - 1) * nScrollRatio - nHiddenLines) * nItemHeightOffset;
+ tools::Long x = nStartX;
+ tools::Long y = nStartY - ((nFullSteps - 1) * nScrollRatio - nHiddenLines) * nItemHeightOffset;
// draw items
// Unless we are scrolling (via scrollbar) we just use the precalculated
@@ -483,8 +483,8 @@ void ThumbnailView::CalculateItemPositions(bool bScrollBarUsed)
mxScrolledWindow->vadjustment_set_upper(mnLines * gnFineness);
mxScrolledWindow->vadjustment_set_page_size(mnVisLines * gnFineness);
if (!bScrollBarUsed)
- mxScrolledWindow->vadjustment_set_value(static_cast<long>(mnFirstLine)*gnFineness);
- long nPageSize = mnVisLines;
+ mxScrolledWindow->vadjustment_set_value(static_cast<tools::Long>(mnFirstLine)*gnFineness);
+ tools::Long nPageSize = mnVisLines;
if ( nPageSize < 1 )
nPageSize = 1;
mxScrolledWindow->vadjustment_set_page_increment(nPageSize*gnFineness);
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);
}
diff --git a/toolkit/inc/helper/btndlg.hxx b/toolkit/inc/helper/btndlg.hxx
index 5f3d994d4f81..8894b8dec619 100644
--- a/toolkit/inc/helper/btndlg.hxx
+++ b/toolkit/inc/helper/btndlg.hxx
@@ -57,12 +57,12 @@ public:
void SetPageSizePixel( const Size& rSize ) { maPageSize = rSize; }
- void AddButton( StandardButtonType eType, sal_uInt16 nId, ButtonDialogFlags nBtnFlags, long nSepPixel = 0 );
+ void AddButton( StandardButtonType eType, sal_uInt16 nId, ButtonDialogFlags nBtnFlags, tools::Long nSepPixel = 0 );
void RemoveButton( sal_uInt16 nId );
protected:
ButtonDialog( WindowType nType );
- long ImplGetButtonSize();
+ tools::Long ImplGetButtonSize();
private:
ButtonDialog( const ButtonDialog & ) = delete;
@@ -72,7 +72,7 @@ private:
std::vector<std::unique_ptr<ImplBtnDlgItem>> m_ItemList;
Size maPageSize;
Size maCtrlSize;
- long mnButtonSize;
+ tools::Long mnButtonSize;
sal_uInt16 mnCurButtonId;
sal_uInt16 mnFocusButtonId;
bool mbFormat;
diff --git a/toolkit/inc/helper/scrollabledialog.hxx b/toolkit/inc/helper/scrollabledialog.hxx
index 099bbbd6045e..26068b4f5c98 100644
--- a/toolkit/inc/helper/scrollabledialog.hxx
+++ b/toolkit/inc/helper/scrollabledialog.hxx
@@ -37,10 +37,10 @@ namespace toolkit
bool mbHasHoriBar;
bool mbHasVertBar;
Point mnScrollPos;
- long mnScrWidth;
+ tools::Long mnScrWidth;
ScrollBarVisibility maScrollVis;
- void lcl_Scroll( long nX, long nY );
+ void lcl_Scroll( tools::Long nX, tools::Long nY );
DECL_LINK( ScrollBarHdl, ScrollBar*, void );
public:
@@ -50,10 +50,10 @@ namespace toolkit
// Window
virtual void Resize() override;
- void SetScrollWidth( long nWidth );
- void SetScrollHeight( long nHeight );
- void SetScrollLeft( long nLeft );
- void SetScrollTop( long Top );
+ void SetScrollWidth( tools::Long nWidth );
+ void SetScrollHeight( tools::Long nHeight );
+ void SetScrollLeft( tools::Long nLeft );
+ void SetScrollTop( tools::Long Top );
void setScrollVisibility( ScrollBarVisibility rState );
void ResetScrollBars();
};
diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx
index 087ddb4d381e..ecee7b365194 100644
--- a/toolkit/source/awt/animatedimagespeer.cxx
+++ b/toolkit/source/awt/animatedimagespeer.cxx
@@ -219,7 +219,7 @@ namespace toolkit
// find the set with the smallest difference between window size and image size
const ::Size aWindowSizePixel = pThrobber->GetSizePixel();
- long nMinimalDistance = ::std::numeric_limits< long >::max();
+ tools::Long nMinimalDistance = ::std::numeric_limits< long >::max();
for ( ::std::vector< Size >::const_iterator check = aImageSizes.begin();
check != aImageSizes.end();
++check
diff --git a/toolkit/source/awt/scrollabledialog.cxx b/toolkit/source/awt/scrollabledialog.cxx
index ff9abf48b58d..bcc8d18e0717 100644
--- a/toolkit/source/awt/scrollabledialog.cxx
+++ b/toolkit/source/awt/scrollabledialog.cxx
@@ -88,10 +88,10 @@ void ScrollableDialog::dispose()
Dialog::dispose();
}
-void ScrollableDialog::lcl_Scroll( long nX, long nY )
+void ScrollableDialog::lcl_Scroll( tools::Long nX, tools::Long nY )
{
- long nXScroll = mnScrollPos.X() - nX;
- long nYScroll = mnScrollPos.Y() - nY;
+ tools::Long nXScroll = mnScrollPos.X() - nX;
+ tools::Long nYScroll = mnScrollPos.Y() - nY;
mnScrollPos = Point( nX, nY );
tools::Rectangle aScrollableArea( 0, 0, maScrollArea.Width(), maScrollArea.Height() );
@@ -118,7 +118,7 @@ IMPL_LINK( ScrollableDialog, ScrollBarHdl, ScrollBar*, pSB, void )
lcl_Scroll(nPos, mnScrollPos.Y() );
}
-void ScrollableDialog::SetScrollTop( long nTop )
+void ScrollableDialog::SetScrollTop( tools::Long nTop )
{
Point aOld = mnScrollPos;
lcl_Scroll( mnScrollPos.X() , mnScrollPos.Y() - nTop );
@@ -126,7 +126,7 @@ void ScrollableDialog::SetScrollTop( long nTop )
// new pos is 0,0
mnScrollPos = aOld;
}
-void ScrollableDialog::SetScrollLeft( long nLeft )
+void ScrollableDialog::SetScrollLeft( tools::Long nLeft )
{
Point aOld = mnScrollPos;
lcl_Scroll( mnScrollPos.X() - nLeft , mnScrollPos.Y() );
@@ -135,13 +135,13 @@ void ScrollableDialog::SetScrollLeft( long nLeft )
mnScrollPos = aOld;
}
-void ScrollableDialog::SetScrollWidth( long nWidth )
+void ScrollableDialog::SetScrollWidth( tools::Long nWidth )
{
maScrollArea.setWidth( nWidth );
ResetScrollBars();
}
-void ScrollableDialog::SetScrollHeight( long nHeight )
+void ScrollableDialog::SetScrollHeight( tools::Long nHeight )
{
maScrollArea.setHeight( nHeight );
ResetScrollBars();
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index 72ce78fb4fd1..5b6cf29334c5 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -287,13 +287,13 @@ void VCLXGraphics::draw( const uno::Reference< awt::XDisplayBitmap >& rxBitmapHa
if(nDestWidth != nSourceWidth)
{
float zoomX = static_cast<float>(nDestWidth) / static_cast<float>(nSourceWidth);
- aSz.setWidth( static_cast<long>(static_cast<float>(aSz.Width()) * zoomX) );
+ aSz.setWidth( static_cast<tools::Long>(static_cast<float>(aSz.Width()) * zoomX) );
}
if(nDestHeight != nSourceHeight)
{
float zoomY = static_cast<float>(nDestHeight) / static_cast<float>(nSourceHeight);
- aSz.setHeight( static_cast<long>(static_cast<float>(aSz.Height()) * zoomY) );
+ aSz.setHeight( static_cast<tools::Long>(static_cast<float>(aSz.Height()) * zoomY) );
}
if(nSourceX || nSourceY || aSz.Width() != nSourceWidth || aSz.Height() != nSourceHeight)
diff --git a/toolkit/source/awt/vclxspinbutton.cxx b/toolkit/source/awt/vclxspinbutton.cxx
index 7941f3760c9a..20a06c010618 100644
--- a/toolkit/source/awt/vclxspinbutton.cxx
+++ b/toolkit/source/awt/vclxspinbutton.cxx
@@ -94,7 +94,7 @@ namespace toolkit
namespace
{
- typedef void (SpinButton::*SetSpinButtonValue) (long);
+ typedef void (SpinButton::*SetSpinButtonValue) (tools::Long);
typedef long (SpinButton::*GetSpinButtonValue) () const;
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 7bf211d7150f..12fb64bee90b 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -274,10 +274,10 @@ void MessBox::ImplPosControls()
Size aImageSize;
Size aPageSize;
Size aMEditSize;
- long nTitleWidth;
- long nButtonSize = ImplGetButtonSize();
- long nMaxLineWidth;
- long nWidth;
+ tools::Long nTitleWidth;
+ tools::Long nButtonSize = ImplGetButtonSize();
+ tools::Long nMaxLineWidth;
+ tools::Long nWidth;
WinBits nWinStyle = WB_LEFT | WB_NOLABEL;
DrawTextFlags nTextStyle = DrawTextFlags::MultiLine | DrawTextFlags::Top | DrawTextFlags::Left;
@@ -288,7 +288,7 @@ void MessBox::ImplPosControls()
OUString aMessText(maMessText.replaceAll("\t", " "));
//If window too small, we make dialog box be wider
- long nMaxWidth = 630 * GetDPIScaleFactor();
+ tools::Long nMaxWidth = 630 * GetDPIScaleFactor();
// MessagBox should be at least as wide as to see the title
// Extra-Width for Close button, because Close button is set after this call
@@ -2209,7 +2209,7 @@ css::uno::Sequence< OUString > VCLXToolkit::getSupportedServiceNames()
css::uno::Reference< css::awt::XTopWindow > SAL_CALL
VCLXToolkit::getTopWindow(::sal_Int32 nIndex)
{
- vcl::Window * p = ::Application::GetTopWindow(static_cast< long >(nIndex));
+ vcl::Window * p = ::Application::GetTopWindow(static_cast< tools::Long >(nIndex));
// XXX numeric overflow
return css::uno::Reference< css::awt::XTopWindow >(
p == nullptr ? nullptr : static_cast< css::awt::XWindow * >(p->GetWindowPeer()),
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 7909612e562e..554b5fc7f212 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -3741,7 +3741,7 @@ void VCLXScrollBar::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
css::awt::Size VCLXScrollBar::implGetMinimumSize( vcl::Window const * p )
{
- long n = p->GetSettings().GetStyleSettings().GetScrollBarSize();
+ tools::Long n = p->GetSettings().GetStyleSettings().GetScrollBarSize();
return css::awt::Size( n, n );
}
@@ -5482,7 +5482,7 @@ void VCLXNumericField::setValue( double Value )
// (e.g., input 105 using 2 digits returns 1,05)
// Thus, to set a value of 1,05, insert 105 and 2 digits
pNumericFormatter->SetValue(
- static_cast<long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
+ static_cast<tools::Long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
// #107218# Call same listeners like VCL would do after user interaction
VclPtr< Edit > pEdit = GetAs< Edit >();
@@ -5512,7 +5512,7 @@ void VCLXNumericField::setMin( double Value )
NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
if ( pNumericFormatter )
pNumericFormatter->SetMin(
- static_cast<long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
+ static_cast<tools::Long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
}
double VCLXNumericField::getMin()
@@ -5532,7 +5532,7 @@ void VCLXNumericField::setMax( double Value )
NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
if ( pNumericFormatter )
pNumericFormatter->SetMax(
- static_cast<long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
+ static_cast<tools::Long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
}
double VCLXNumericField::getMax()
@@ -5552,7 +5552,7 @@ void VCLXNumericField::setFirst( double Value )
NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
if ( pNumericFormatter )
pNumericFormatter->SetFirst(
- static_cast<long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
+ static_cast<tools::Long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
}
double VCLXNumericField::getFirst()
@@ -5572,7 +5572,7 @@ void VCLXNumericField::setLast( double Value )
NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
if ( pNumericFormatter )
pNumericFormatter->SetLast(
- static_cast<long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
+ static_cast<tools::Long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
}
double VCLXNumericField::getLast()
@@ -5602,7 +5602,7 @@ void VCLXNumericField::setSpinSize( double Value )
NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
if ( pNumericFormatter )
pNumericFormatter->SetSpinSize(
- static_cast<long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
+ static_cast<tools::Long>(ImplCalcLongValue( Value, pNumericFormatter->GetDecimalDigits() )) );
}
double VCLXNumericField::getSpinSize()
diff --git a/toolkit/source/controls/filectrl.cxx b/toolkit/source/controls/filectrl.cxx
index cebbd9371818..bea09aeb7e12 100644
--- a/toolkit/source/controls/filectrl.cxx
+++ b/toolkit/source/controls/filectrl.cxx
@@ -145,14 +145,14 @@ void FileControl::StateChanged( StateChangedType nType )
void FileControl::Resize()
{
- static const long ButtonBorder = 10;
+ static const tools::Long ButtonBorder = 10;
if( mnInternalFlags & FileControlMode_Internal::INRESIZE )
return;
mnInternalFlags |= FileControlMode_Internal::INRESIZE;//InResize = sal_True
Size aOutSz = GetOutputSizePixel();
- long nButtonTextWidth = maButton->GetTextWidth( maButtonText );
+ tools::Long nButtonTextWidth = maButton->GetTextWidth( maButtonText );
if ( !(mnInternalFlags & FileControlMode_Internal::ORIGINALBUTTONTEXT) ||
( nButtonTextWidth < aOutSz.Width()/3 ) )
{
@@ -165,7 +165,7 @@ void FileControl::Resize()
nButtonTextWidth = maButton->GetTextWidth( aSmallText );
}
- long nButtonWidth = nButtonTextWidth+ButtonBorder;
+ tools::Long nButtonWidth = nButtonTextWidth+ButtonBorder;
maEdit->setPosSizePixel( 0, 0, aOutSz.Width()-nButtonWidth, aOutSz.Height() );
maButton->setPosSizePixel( aOutSz.Width()-nButtonWidth, 0, nButtonWidth, aOutSz.Height() );
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 695b6fcb00e5..5725cd16501a 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -35,6 +35,7 @@
#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
#include <tools/debug.hxx>
+#include <tools/long.hxx>
#include <toolkit/helper/property.hxx>
#include <toolkit/helper/emptyfontdescriptor.hxx>
#include <unotools/localedatawrapper.hxx>
@@ -661,7 +662,7 @@ void UnoControlModel::write( const css::uno::Reference< css::io::XObjectOutputSt
{
css::uno::Sequence< OUString> aSeq;
rValue >>= aSeq;
- long nEntries = aSeq.getLength();
+ tools::Long nEntries = aSeq.getLength();
OutStream->writeLong( nEntries );
for ( const auto& rVal : std::as_const(aSeq) )
OutStream->writeUTF( rVal );
@@ -670,7 +671,7 @@ void UnoControlModel::write( const css::uno::Reference< css::io::XObjectOutputSt
{
css::uno::Sequence<sal_uInt16> aSeq;
rValue >>= aSeq;
- long nEntries = aSeq.getLength();
+ tools::Long nEntries = aSeq.getLength();
OutStream->writeLong( nEntries );
for ( const auto nVal : aSeq )
OutStream->writeShort( nVal );
@@ -679,7 +680,7 @@ void UnoControlModel::write( const css::uno::Reference< css::io::XObjectOutputSt
{
css::uno::Sequence<sal_Int16> aSeq;
rValue >>= aSeq;
- long nEntries = aSeq.getLength();
+ tools::Long nEntries = aSeq.getLength();
OutStream->writeLong( nEntries );
for ( const auto nVal : aSeq )
OutStream->writeShort( nVal );
@@ -870,9 +871,9 @@ void UnoControlModel::read( const css::uno::Reference< css::io::XObjectInputStre
}
else if ( *pType == cppu::UnoType< css::uno::Sequence< OUString> >::get() )
{
- long nEntries = InStream->readLong();
+ tools::Long nEntries = InStream->readLong();
css::uno::Sequence< OUString> aSeq( nEntries );
- for ( long n = 0; n < nEntries; n++ )
+ for ( tools::Long n = 0; n < nEntries; n++ )
aSeq.getArray()[n] = InStream->readUTF();
aValue <<= aSeq;
@@ -880,17 +881,17 @@ void UnoControlModel::read( const css::uno::Reference< css::io::XObjectInputStre
else if ( *pType == cppu::UnoType< cppu::UnoSequenceType<cppu::UnoUnsignedShortType> >::get() )
{
- long nEntries = InStream->readLong();
+ tools::Long nEntries = InStream->readLong();
css::uno::Sequence<sal_uInt16> aSeq( nEntries );
- for ( long n = 0; n < nEntries; n++ )
+ for ( tools::Long n = 0; n < nEntries; n++ )
aSeq.getArray()[n] = static_cast<sal_uInt16>(InStream->readShort());
aValue <<= aSeq;
}
else if ( *pType == cppu::UnoType< css::uno::Sequence<sal_Int16> >::get() )
{
- long nEntries = InStream->readLong();
+ tools::Long nEntries = InStream->readLong();
css::uno::Sequence<sal_Int16> aSeq( nEntries );
- for ( long n = 0; n < nEntries; n++ )
+ for ( tools::Long n = 0; n < nEntries; n++ )
aSeq.getArray()[n] = InStream->readShort();
aValue <<= aSeq;
}
diff --git a/toolkit/source/helper/btndlg.cxx b/toolkit/source/helper/btndlg.cxx
index 9885f9468b85..5aec00335260 100644
--- a/toolkit/source/helper/btndlg.cxx
+++ b/toolkit/source/helper/btndlg.cxx
@@ -29,7 +29,7 @@ struct ImplBtnDlgItem
{
sal_uInt16 mnId;
bool mbOwnButton;
- long mnSepSize;
+ tools::Long mnSepSize;
VclPtr<PushButton> mpPushButton;
ImplBtnDlgItem() : mnId(0), mbOwnButton(false), mnSepSize(0) {}
@@ -87,27 +87,27 @@ VclPtr<PushButton> ButtonDialog::ImplCreatePushButton( ButtonDialogFlags nBtnFla
return pBtn;
}
-long ButtonDialog::ImplGetButtonSize()
+tools::Long ButtonDialog::ImplGetButtonSize()
{
if ( !mbFormat )
return mnButtonSize;
// Calculate ButtonSize
- long nLastSepSize = 0;
- long nSepSize = 0;
+ tools::Long nLastSepSize = 0;
+ tools::Long nSepSize = 0;
maCtrlSize = Size( IMPL_MINSIZE_BUTTON_WIDTH, IMPL_MINSIZE_BUTTON_HEIGHT );
for (const auto & it : m_ItemList)
{
nSepSize += nLastSepSize;
- long nTxtWidth = it->mpPushButton->GetCtrlTextWidth(it->mpPushButton->GetText());
+ tools::Long nTxtWidth = it->mpPushButton->GetCtrlTextWidth(it->mpPushButton->GetText());
nTxtWidth += IMPL_EXTRA_BUTTON_WIDTH;
if ( nTxtWidth > maCtrlSize.Width() )
maCtrlSize.setWidth( nTxtWidth );
- long nTxtHeight = it->mpPushButton->GetTextHeight();
+ tools::Long nTxtHeight = it->mpPushButton->GetTextHeight();
nTxtHeight += IMPL_EXTRA_BUTTON_HEIGHT;
if ( nTxtHeight > maCtrlSize.Height() )
@@ -141,8 +141,8 @@ void ButtonDialog::ImplPosControls()
// determine dialog size
Size aDlgSize = maPageSize;
- long nX;
- long nY;
+ tools::Long nX;
+ tools::Long nY;
if ( GetStyle() & WB_HORZ )
{
if ( mnButtonSize+(IMPL_DIALOG_OFFSET*2) > aDlgSize.Width() )
@@ -244,7 +244,7 @@ void ButtonDialog::StateChanged( StateChangedType nType )
}
void ButtonDialog::AddButton( StandardButtonType eType, sal_uInt16 nId,
- ButtonDialogFlags nBtnFlags, long nSepPixel )
+ ButtonDialogFlags nBtnFlags, tools::Long nSepPixel )
{
// PageItem anlegen
std::unique_ptr<ImplBtnDlgItem> pItem(new ImplBtnDlgItem);
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 90448ff45bd5..ae000b2e79fc 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -32,6 +32,7 @@
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <ucbhelper/macros.hxx>
+#include <tools/long.hxx>
#include <memory>
using namespace com::sun::star::beans;
@@ -365,8 +366,8 @@ class CCRS_PropertySetInfo :
std::unique_ptr<Sequence< css::beans::Property >>
m_pProperties;
- long m_nFetchSizePropertyHandle;
- long m_nFetchDirectionPropertyHandle;
+ tools::Long m_nFetchSizePropertyHandle;
+ tools::Long m_nFetchDirectionPropertyHandle;
private:
sal_Int32
diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx
index 401a3ef0afe7..671c61cc9501 100644
--- a/ucb/source/sorter/sortdynres.cxx
+++ b/ucb/source/sorter/sortdynres.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/ucb/WelcomeDynamicResultSetStruct.hpp>
#include <com/sun/star/ucb/CachedDynamicResultSetStubFactory.hpp>
#include <com/sun/star/ucb/XSourceInitialization.hpp>
+#include <tools/long.hxx>
using namespace com::sun::star::beans;
using namespace com::sun::star::lang;
@@ -281,7 +282,7 @@ void SortedDynamicResultSet::impl_notify( const ListEvent& Changes )
catch (const UnknownPropertyException&) {}
catch (const WrappedTargetException&) {}
- long nOldCount = pCurSet->GetCount();
+ tools::Long nOldCount = pCurSet->GetCount();
bool bWasFinal = false;
aRet >>= bWasFinal;
@@ -335,7 +336,7 @@ void SortedDynamicResultSet::impl_notify( const ListEvent& Changes )
}
case ListActionType::MOVED:
{
- long nOffset = 0;
+ tools::Long nOffset = 0;
if ( aAction.ActionInfo >>= nOffset )
{
pCurSet->Move( aAction.Position,
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 7fc77e44e64c..cf12bdd8409f 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -47,6 +47,7 @@
#include <o3tl/runtimetooustring.hxx>
#include <sal/log.hxx>
#include <tools/urlobj.hxx>
+#include <tools/long.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
#include <ucbhelper/content.hxx>
#include <ucbhelper/contentidentifier.hxx>
@@ -85,8 +86,8 @@ namespace
// TODO FIXME maybe we should compile with BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG
// to actually get nanosecond precision in boostTime?
// use this way rather than total_nanos to avoid overflows with 32-bit long
- const long ticks = boostTime.time_of_day().fractional_seconds();
- long nanoSeconds = ticks * ( 1000000000 / boost::posix_time::time_duration::ticks_per_second());
+ const tools::Long ticks = boostTime.time_of_day().fractional_seconds();
+ tools::Long nanoSeconds = ticks * ( 1000000000 / boost::posix_time::time_duration::ticks_per_second());
unoTime.NanoSeconds = nanoSeconds;
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index b914f41cd903..4e9012a990dc 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -34,6 +34,7 @@
#include <osl/diagnose.h>
#include <osl/thread.h>
#include <osl/time.h>
+#include <tools/long.hxx>
#include <ne_socket.h>
#include <ne_auth.h>
#include <ne_redirect.h>
@@ -1568,7 +1569,7 @@ void NeonSession::LOCK( const OUString & inPath,
}
// Set the lock timeout
- theLock->timeout = static_cast<long>(rLock.Timeout);
+ theLock->timeout = static_cast<tools::Long>(rLock.Timeout);
// Set the lock owner
OUString aValue;
@@ -1628,7 +1629,7 @@ bool NeonSession::LOCK( NeonLock * pLock,
// save the current requested timeout, because ne_lock_refresh uses
// pLock->timeout as an out parameter. This prevents a feedback-loop,
// where we would request a shorter timeout on each refresh.
- long timeout = pLock->timeout;
+ tools::Long timeout = pLock->timeout;
const int theRetVal = ne_lock_refresh(m_pHttpSession, pLock);
if (theRetVal == NE_OK)
{
diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx
index 5c64583da46d..e49174bd688e 100644
--- a/uui/source/nameclashdlg.cxx
+++ b/uui/source/nameclashdlg.cxx
@@ -29,10 +29,10 @@
IMPL_LINK(NameClashDialog, ButtonHdl_Impl, weld::Button&, rBtn, void)
{
- long nRet = long(ABORT);
+ tools::Long nRet = tools::Long(ABORT);
if (m_xBtnRename.get() == &rBtn)
{
- nRet = long(RENAME);
+ nRet = tools::Long(RENAME);
OUString aNewName = m_xEDNewName->get_text();
if ( ( aNewName == m_aNewName ) || aNewName.isEmpty() )
{
@@ -45,7 +45,7 @@ IMPL_LINK(NameClashDialog, ButtonHdl_Impl, weld::Button&, rBtn, void)
m_aNewName = aNewName;
}
else if (m_xBtnOverwrite.get() == &rBtn)
- nRet = long(OVERWRITE);
+ nRet = tools::Long(OVERWRITE);
m_xDialog->response(nRet);
}
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index af21ad4bfa01..66165d9c7ba7 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -436,7 +436,7 @@ namespace {
struct PointerStyles
{
- long msoPointerStyle;
+ tools::Long msoPointerStyle;
PointerStyle loPointStyle;
};
@@ -463,9 +463,9 @@ PointerStyles const styles[] = {
};
-static long lcl_loPointerToMsoPointer( PointerStyle eType )
+static tools::Long lcl_loPointerToMsoPointer( PointerStyle eType )
{
- long nRet = msforms::fmMousePointer::fmMousePointerDefault;
+ tools::Long nRet = msforms::fmMousePointer::fmMousePointerDefault;
for ( int i = 0; i < int(SAL_N_ELEMENTS( styles )); ++i )
{
if ( styles[ i ].loPointStyle == eType )
@@ -477,7 +477,7 @@ static long lcl_loPointerToMsoPointer( PointerStyle eType )
return nRet;
}
-static PointerStyle lcl_msoPointerToLOPointer( long msoPointerStyle )
+static PointerStyle lcl_msoPointerToLOPointer( tools::Long msoPointerStyle )
{
PointerStyle aPointer( PointerStyle::Arrow );
for ( int i = 0; i < int(SAL_N_ELEMENTS( styles )); ++i )
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 924396a962da..7edfd56a2732 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -75,10 +75,10 @@ public:
{
DateTime aNow( DateTime::SYSTEM );
Date aRefDate( 1,1,1900 );
- long nDiffDays = aNow - aRefDate;
+ tools::Long nDiffDays = aNow - aRefDate;
nDiffDays += 2; // Change VisualBasic: 1.Jan.1900 == 2
- long nDiffSeconds = aNow.GetHour() * 3600 + aNow.GetMin() * 60 + aNow.GetSec();
+ tools::Long nDiffSeconds = aNow.GetHour() * 3600 + aNow.GetMin() * 60 + aNow.GetSec();
return static_cast<double>(nDiffDays) + static_cast<double>(nDiffSeconds)/double(24*3600);
}
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 21a8593178a1..5877e676917b 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1725,7 +1725,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
{
double fHeight = 0;
if ( pPropHeight->second >>= fHeight )
- nCharWidth = ConversionHelper::convertTwipToMM100( static_cast<long>(fHeight * 20.0 + 0.5) );
+ nCharWidth = ConversionHelper::convertTwipToMM100( static_cast<tools::Long>(fHeight * 20.0 + 0.5) );
}
}
diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.cxx b/writerfilter/source/dmapper/WrapPolygonHandler.cxx
index c67ed2ab7020..3f693b45f389 100644
--- a/writerfilter/source/dmapper/WrapPolygonHandler.cxx
+++ b/writerfilter/source/dmapper/WrapPolygonHandler.cxx
@@ -84,7 +84,7 @@ WrapPolygon::Pointer_t WrapPolygon::scale(const Fraction & rFractionX, const Fra
while (aIt != aItEnd)
{
- awt::Point aPoint((Fraction(long(aIt->X)) * rFractionX).operator long(), (Fraction(long(aIt->Y)) * rFractionY).operator long());
+ awt::Point aPoint((Fraction(tools::Long(aIt->X)) * rFractionX).operator long(), (Fraction(tools::Long(aIt->Y)) * rFractionY).operator long());
pResult->addPoint(aPoint);
++aIt;
}
@@ -96,7 +96,7 @@ WrapPolygon::Pointer_t WrapPolygon::correctWordWrapPolygon(const awt::Size & rSr
{
WrapPolygon::Pointer_t pResult;
- const long nWrap100Percent = 21600;
+ const tools::Long nWrap100Percent = 21600;
Fraction aMove(nWrap100Percent, rSrcSize.Width);
aMove = aMove * Fraction(convertTwipToMm100(15), 1);
@@ -128,7 +128,7 @@ WrapPolygon::Pointer_t WrapPolygon::correctWordWrapPolygonPixel(const awt::Size
* polygon units to fit the size of the image. The 21600 value is a legacy
* artifact from the drawing layer of early versions of Microsoft Office.
*/
- const long nWrap100Percent = 21600;
+ const tools::Long nWrap100Percent = 21600;
Fraction aScaleX(rSrcSize.Width, nWrap100Percent);
Fraction aScaleY(rSrcSize.Height, nWrap100Percent);
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 02aa834c38ef..9977306b90f0 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -187,7 +187,7 @@ void putBorderProperty(RTFStack& aStates, Id nId, const RTFValue::Pointer_t& pVa
pAttributes->set(nId, pValue);
}
-OString DTTM22OString(long nDTTM)
+OString DTTM22OString(tools::Long nDTTM)
{
return DateTimeToOString(msfilter::util::DTTM2DateTime(nDTTM));
}
@@ -1019,12 +1019,12 @@ void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XS
int nYExt = (m_aStates.top().getPicture().nGoalHeight ? m_aStates.top().getPicture().nGoalHeight
: m_aStates.top().getPicture().nHeight);
if (m_aStates.top().getPicture().nScaleX != 100)
- nXExt = (static_cast<long>(m_aStates.top().getPicture().nScaleX)
+ nXExt = (static_cast<tools::Long>(m_aStates.top().getPicture().nScaleX)
* (nXExt
- (m_aStates.top().getPicture().nCropL + m_aStates.top().getPicture().nCropR)))
/ 100L;
if (m_aStates.top().getPicture().nScaleY != 100)
- nYExt = (static_cast<long>(m_aStates.top().getPicture().nScaleY)
+ nYExt = (static_cast<tools::Long>(m_aStates.top().getPicture().nScaleY)
* (nYExt
- (m_aStates.top().getPicture().nCropT + m_aStates.top().getPicture().nCropB)))
/ 100L;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 6d4a608e5eee..693cdb80d6a9 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -21,6 +21,7 @@
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
#include <tools/color.hxx>
+#include <tools/long.hxx>
#include <rtftok/RTFDocument.hxx>
#include "rtfreferencetable.hxx"
@@ -664,7 +665,7 @@ RTFValue::Pointer_t getNestedSprm(RTFSprms& rSprms, Id nParent, Id nId);
bool findPropertyName(const std::vector<css::beans::PropertyValue>& rProperties,
const OUString& rName);
RTFSprms& getLastAttributes(RTFSprms& rSprms, Id nId);
-OString DTTM22OString(long nDTTM);
+OString DTTM22OString(tools::Long nDTTM);
/// Implementation of the RTFDocument interface.
class RTFDocumentImpl : public RTFDocument, public RTFListener
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 64177ee88f91..b98723e5aee3 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -251,7 +251,7 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> const& xShape,
if (!xServiceInfo->supportsService("com.sun.star.text.TextFrame"))
xPropertySet->setPropertyValue(
"RotateAngle",
- uno::makeAny(sal_Int32(NormAngle36000(static_cast<long>(nRotation) * -1))));
+ uno::makeAny(sal_Int32(NormAngle36000(static_cast<tools::Long>(nRotation) * -1))));
}
if (nHoriOrient != 0 && xPropertySet.is())
diff --git a/writerperfect/inc/DirectoryStream.hxx b/writerperfect/inc/DirectoryStream.hxx
index 34075fe9fcdf..109d6cef65af 100644
--- a/writerperfect/inc/DirectoryStream.hxx
+++ b/writerperfect/inc/DirectoryStream.hxx
@@ -13,6 +13,7 @@
#include <librevenge-stream/librevenge-stream.h>
#include <com/sun/star/uno/Reference.h>
#include "writerperfectdllapi.h"
+#include <tools/long.hxx>
#include <memory>
namespace com::sun::star::ucb
@@ -44,8 +45,8 @@ public:
virtual librevenge::RVNGInputStream* getSubStreamById(unsigned id) override;
virtual const unsigned char* read(unsigned long numBytes, unsigned long& numBytesRead) override;
- virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
- virtual long tell() override;
+ virtual int seek(tools::Long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
+ virtual tools::Long tell() override;
virtual bool isEnd() override;
private:
diff --git a/writerperfect/inc/WPXSvInputStream.hxx b/writerperfect/inc/WPXSvInputStream.hxx
index 0ac33a60ec01..becfefd1d6f5 100644
--- a/writerperfect/inc/WPXSvInputStream.hxx
+++ b/writerperfect/inc/WPXSvInputStream.hxx
@@ -12,6 +12,7 @@
#include <librevenge-stream/librevenge-stream.h>
#include <com/sun/star/uno/Reference.h>
+#include <tools/long.hxx>
#include "writerperfectdllapi.h"
#include <memory>
@@ -39,8 +40,8 @@ public:
virtual librevenge::RVNGInputStream* getSubStreamById(unsigned id) override;
virtual const unsigned char* read(unsigned long numBytes, unsigned long& numBytesRead) override;
- virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
- virtual long tell() override;
+ virtual int seek(tools::Long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
+ virtual tools::Long tell() override;
virtual bool isEnd() override;
private:
diff --git a/writerperfect/qa/unit/WPXSvStreamTest.cxx b/writerperfect/qa/unit/WPXSvStreamTest.cxx
index 21715229e299..75bcd1e60de7 100644
--- a/writerperfect/qa/unit/WPXSvStreamTest.cxx
+++ b/writerperfect/qa/unit/WPXSvStreamTest.cxx
@@ -182,7 +182,7 @@ void WPXSvStreamTest::testRead()
void WPXSvStreamTest::testSeekSet()
{
const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
- const long nLen = sizeof aText;
+ const tools::Long nLen = sizeof aText;
// check initial state
CPPUNIT_ASSERT_EQUAL(0L, pInput->tell());
@@ -220,7 +220,7 @@ void WPXSvStreamTest::testSeekSet()
void WPXSvStreamTest::testSeekCur()
{
const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
- const long nLen = sizeof aText;
+ const tools::Long nLen = sizeof aText;
// check initial state
CPPUNIT_ASSERT(!pInput->isEnd());
@@ -257,7 +257,7 @@ void WPXSvStreamTest::testSeekCur()
void WPXSvStreamTest::testSeekEnd()
{
const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
- const long nLen = sizeof aText;
+ const tools::Long nLen = sizeof aText;
// check initial state
CPPUNIT_ASSERT(!pInput->isEnd());
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
index 83035d8b9926..6cf948e371ce 100644
--- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
@@ -89,11 +89,11 @@ public:
*/
const unsigned char* read(unsigned long, unsigned long&) override { return nullptr; }
//! returns actual offset position
- long tell() override { return 0; }
+ tools::Long tell() override { return 0; }
/*! \brief seeks to an offset position, from actual, beginning or ending position
* \return 0 if ok
*/
- int seek(long, librevenge::RVNG_SEEK_TYPE) override { return 1; }
+ int seek(tools::Long, librevenge::RVNG_SEEK_TYPE) override { return 1; }
//! returns true if we are at the end of the section/file
bool isEnd() override { return true; }
diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx
index 19ec454b293e..eb275abec5e5 100644
--- a/writerperfect/source/common/DirectoryStream.cxx
+++ b/writerperfect/source/common/DirectoryStream.cxx
@@ -211,9 +211,9 @@ const unsigned char* DirectoryStream::read(unsigned long, unsigned long& nNumByt
return nullptr;
}
-int DirectoryStream::seek(long, librevenge::RVNG_SEEK_TYPE) { return -1; }
+int DirectoryStream::seek(tools::Long, librevenge::RVNG_SEEK_TYPE) { return -1; }
-long DirectoryStream::tell() { return 0; }
+tools::Long DirectoryStream::tell() { return 0; }
bool DirectoryStream::isEnd() { return true; }
}
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index 8a6a52f17f8f..40c50df8de5c 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -414,8 +414,8 @@ public:
librevenge::RVNGInputStream* getSubStreamById(unsigned id);
const unsigned char* read(unsigned long numBytes, unsigned long& numBytesRead);
- int seek(long offset);
- long tell();
+ int seek(tools::Long offset);
+ tools::Long tell();
bool isEnd();
void invalidateReadBuffer();
@@ -495,7 +495,7 @@ const unsigned char* WPXSvInputStreamImpl::read(unsigned long numBytes, unsigned
return reinterpret_cast<const unsigned char*>(maData.getConstArray());
}
-long WPXSvInputStreamImpl::tell()
+tools::Long WPXSvInputStreamImpl::tell()
{
if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
return -1;
@@ -504,11 +504,11 @@ long WPXSvInputStreamImpl::tell()
const sal_Int64 tmpPosition = mxSeekable->getPosition();
if ((tmpPosition < 0) || (tmpPosition > LONG_MAX))
return -1;
- return static_cast<long>(tmpPosition);
+ return static_cast<tools::Long>(tmpPosition);
}
}
-int WPXSvInputStreamImpl::seek(long offset)
+int WPXSvInputStreamImpl::seek(tools::Long offset)
{
if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
return -1;
@@ -723,7 +723,8 @@ void WPXSvInputStreamImpl::invalidateReadBuffer()
{
if (mpReadBuffer)
{
- seek(tell() + static_cast<long>(mnReadBufferPos) - static_cast<long>(mnReadBufferLength));
+ seek(tell() + static_cast<tools::Long>(mnReadBufferPos)
+ - static_cast<tools::Long>(mnReadBufferLength));
mpReadBuffer = nullptr;
mnReadBufferPos = 0;
mnReadBufferLength = 0;
@@ -881,14 +882,14 @@ const unsigned char* WPXSvInputStream::read(unsigned long numBytes, unsigned lon
return mpImpl->mpReadBuffer;
}
-long WPXSvInputStream::tell()
+tools::Long WPXSvInputStream::tell()
{
- long retVal = mpImpl->tell();
- return retVal - static_cast<long>(mpImpl->mnReadBufferLength)
- + static_cast<long>(mpImpl->mnReadBufferPos);
+ tools::Long retVal = mpImpl->tell();
+ return retVal - static_cast<tools::Long>(mpImpl->mnReadBufferLength)
+ + static_cast<tools::Long>(mpImpl->mnReadBufferPos);
}
-int WPXSvInputStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
+int WPXSvInputStream::seek(tools::Long offset, librevenge::RVNG_SEEK_TYPE seekType)
{
sal_Int64 tmpOffset = offset;
if (seekType == librevenge::RVNG_SEEK_CUR)
@@ -913,7 +914,7 @@ int WPXSvInputStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
>= static_cast<unsigned long>(mpImpl->tell()) - mpImpl->mnReadBufferLength)
{
mpImpl->mnReadBufferPos = static_cast<unsigned long>(
- tmpOffset + static_cast<long>(mpImpl->mnReadBufferLength) - mpImpl->tell());
+ tmpOffset + static_cast<tools::Long>(mpImpl->mnReadBufferLength) - mpImpl->tell());
return retVal;
}
diff --git a/xmloff/inc/RDFaExportHelper.hxx b/xmloff/inc/RDFaExportHelper.hxx
index a5d49c513347..73472016b311 100644
--- a/xmloff/inc/RDFaExportHelper.hxx
+++ b/xmloff/inc/RDFaExportHelper.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/uno/Reference.h>
#include <rtl/ustring.hxx>
+#include <tools/long.hxx>
#include <map>
@@ -49,7 +50,7 @@ private:
BlankNodeMap_t m_BlankNodeMap;
- long m_Counter;
+ tools::Long m_Counter;
OUString
LookupBlankNode( css::uno::Reference<css::rdf::XBlankNode> const & i_xBlankNode);
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 08de548855a3..5868ef2f288e 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -271,7 +271,7 @@ public:
/// long: depth at which namespace map has been backed up into the stack
::std::stack< ::std::pair< std::unique_ptr<SvXMLNamespaceMap>, long > > mNamespaceMaps;
/// counts depth (number of open elements/start tags)
- long mDepth;
+ tools::Long mDepth;
::std::unique_ptr< ::xmloff::RDFaExportHelper> mpRDFaHelper;
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 7af35e0d4107..f7c4410659ed 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -245,9 +245,9 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
if(mnType == 21 /* AUTOLAYOUT_NOTES */)
{
- aTitleSize.setHeight(static_cast<long>(aTitleSize.Height() / 2.5));
+ aTitleSize.setHeight(static_cast<tools::Long>(aTitleSize.Height() / 2.5));
Point aPos = aTitlePos;
- aPos.AdjustY( long( aTitleSize.Height() * 0.083 ) );
+ aPos.AdjustY( tools::Long( aTitleSize.Height() * 0.083 ) );
Size aPartArea = aTitleSize;
Size aSize;
@@ -257,8 +257,8 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
if ( fH > fV )
fH = fV;
- aSize.setWidth( static_cast<long>(fH * aPageSize.Width()) );
- aSize.setHeight( static_cast<long>(fH * aPageSize.Height()) );
+ aSize.setWidth( static_cast<tools::Long>(fH * aPageSize.Width()) );
+ aSize.setHeight( static_cast<tools::Long>(fH * aPageSize.Height()) );
aPos.AdjustX((aPartArea.Width() - aSize.Width()) / 2);
aPos.AdjustY((aPartArea.Height()- aSize.Height())/ 2);
@@ -269,19 +269,19 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
else if(mnType == AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT || mnType == AUTOLAYOUT_VTITLE_VCONTENT)
{
Point aClassicTPos(
- aTitlePos.X() + long( aTitleSize.Width() * 0.0735 ),
- aTitlePos.Y() + long( aTitleSize.Height() * 0.083 ));
+ aTitlePos.X() + tools::Long( aTitleSize.Width() * 0.0735 ),
+ aTitlePos.Y() + tools::Long( aTitleSize.Height() * 0.083 ));
Size aClassicTSize(
- long( aTitleSize.Width() * 0.854 ),
- long( aTitleSize.Height() * 0.167 ));
+ tools::Long( aTitleSize.Width() * 0.854 ),
+ tools::Long( aTitleSize.Height() * 0.167 ));
Point aLPos(aPagePos);
Size aLSize(aPageInnerSize);
Point aClassicLPos(
- aLPos.X() + long( aLSize.Width() * 0.0735 ),
- aLPos.Y() + long( aLSize.Height() * 0.472 ));
+ aLPos.X() + tools::Long( aLSize.Width() * 0.0735 ),
+ aLPos.Y() + tools::Long( aLSize.Height() * 0.472 ));
Size aClassicLSize(
- long( aLSize.Width() * 0.854 ),
- long( aLSize.Height() * 0.444 ));
+ tools::Long( aLSize.Width() * 0.854 ),
+ tools::Long( aLSize.Height() * 0.444 ));
aTitlePos.setX( (aClassicTPos.X() + aClassicTSize.Width()) - aClassicTSize.Height() );
aTitlePos.setY( aClassicTPos.Y() );
@@ -290,10 +290,10 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
}
else
{
- aTitlePos.AdjustX( long( aTitleSize.Width() * 0.0735 ) );
- aTitlePos.AdjustY( long( aTitleSize.Height() * 0.083 ) );
- aTitleSize.setWidth( long( aTitleSize.Width() * 0.854 ) );
- aTitleSize.setHeight( long( aTitleSize.Height() * 0.167 ) );
+ aTitlePos.AdjustX( tools::Long( aTitleSize.Width() * 0.0735 ) );
+ aTitlePos.AdjustY( tools::Long( aTitleSize.Height() * 0.083 ) );
+ aTitleSize.setWidth( tools::Long( aTitleSize.Width() * 0.854 ) );
+ aTitleSize.setHeight( tools::Long( aTitleSize.Height() * 0.167 ) );
}
maTitleRect.SetPos(aTitlePos);
@@ -305,10 +305,10 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
if(mnType == 21 /* AUTOLAYOUT_NOTES */)
{
- aLayoutPos.AdjustX( long( aLayoutSize.Width() * 0.0735 ) );
- aLayoutPos.AdjustY( long( aLayoutSize.Height() * 0.472 ) );
- aLayoutSize.setWidth( long( aLayoutSize.Width() * 0.854 ) );
- aLayoutSize.setHeight( long( aLayoutSize.Height() * 0.444 ) );
+ aLayoutPos.AdjustX( tools::Long( aLayoutSize.Width() * 0.0735 ) );
+ aLayoutPos.AdjustY( tools::Long( aLayoutSize.Height() * 0.472 ) );
+ aLayoutSize.setWidth( tools::Long( aLayoutSize.Width() * 0.854 ) );
+ aLayoutSize.setHeight( tools::Long( aLayoutSize.Height() * 0.444 ) );
}
else if((mnType >= 22 && mnType <= 26) || (mnType == 31)) // AUTOLAYOUT_HANDOUT*
{
@@ -332,17 +332,17 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
else if(mnType == AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT || mnType == AUTOLAYOUT_VTITLE_VCONTENT)
{
Point aClassicTPos(
- aTitlePos.X() + long( aTitleSize.Width() * 0.0735 ),
- aTitlePos.Y() + long( aTitleSize.Height() * 0.083 ));
+ aTitlePos.X() + tools::Long( aTitleSize.Width() * 0.0735 ),
+ aTitlePos.Y() + tools::Long( aTitleSize.Height() * 0.083 ));
Size aClassicTSize(
- long( aTitleSize.Width() * 0.854 ),
- long( aTitleSize.Height() * 0.167 ));
+ tools::Long( aTitleSize.Width() * 0.854 ),
+ tools::Long( aTitleSize.Height() * 0.167 ));
Point aClassicLPos(
- aLayoutPos.X() + long( aLayoutSize.Width() * 0.0735 ),
- aLayoutPos.Y() + long( aLayoutSize.Height() * 0.472 ));
+ aLayoutPos.X() + tools::Long( aLayoutSize.Width() * 0.0735 ),
+ aLayoutPos.Y() + tools::Long( aLayoutSize.Height() * 0.472 ));
Size aClassicLSize(
- long( aLayoutSize.Width() * 0.854 ),
- long( aLayoutSize.Height() * 0.444 ));
+ tools::Long( aLayoutSize.Width() * 0.854 ),
+ tools::Long( aLayoutSize.Height() * 0.444 ));
aLayoutPos.setX( aClassicLPos.X() );
aLayoutPos.setY( aClassicTPos.Y() );
@@ -354,14 +354,14 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
{
aLayoutPos = aTitlePos;
aLayoutSize.setWidth( aTitleSize.Width() );
- aLayoutSize.setHeight( long( aLayoutSize.Height() * 0.825 ) );
+ aLayoutSize.setHeight( tools::Long( aLayoutSize.Height() * 0.825 ) );
}
else
{
- aLayoutPos.AdjustX( long( aLayoutSize.Width() * 0.0735 ) );
- aLayoutPos.AdjustY( long( aLayoutSize.Height() * 0.278 ) );
- aLayoutSize.setWidth( long( aLayoutSize.Width() * 0.854 ) );
- aLayoutSize.setHeight( long( aLayoutSize.Height() * 0.630 ) );
+ aLayoutPos.AdjustX( tools::Long( aLayoutSize.Width() * 0.0735 ) );
+ aLayoutPos.AdjustY( tools::Long( aLayoutSize.Height() * 0.278 ) );
+ aLayoutSize.setWidth( tools::Long( aLayoutSize.Width() * 0.854 ) );
+ aLayoutSize.setHeight( tools::Long( aLayoutSize.Height() * 0.630 ) );
}
maPresRect.SetPos(aLayoutPos);
@@ -738,9 +738,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_TITLE_2CONTENT :
{
tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ aLeft.setWidth(tools::Long(aLeft.GetWidth() * 0.488));
tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+ aRight.SetLeft(tools::Long(aRight.Left() + aRight.GetWidth() * 1.05));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
@@ -750,9 +750,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_TEXTCHART :
{
tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ aLeft.setWidth(tools::Long(aLeft.GetWidth() * 0.488));
tools::Rectangle aRight(aLeft);
- aRight.SetLeft( long(aRight.Left() + aRight.GetWidth() * 1.05) );
+ aRight.SetLeft( tools::Long(aRight.Left() + aRight.GetWidth() * 1.05) );
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
@@ -762,9 +762,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_TEXTCLIP :
{
tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ aLeft.setWidth(tools::Long(aLeft.GetWidth() * 0.488));
tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+ aRight.SetLeft(tools::Long(aRight.Left() + aRight.GetWidth() * 1.05));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
@@ -774,9 +774,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_CHARTTEXT :
{
tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ aLeft.setWidth(tools::Long(aLeft.GetWidth() * 0.488));
tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+ aRight.SetLeft(tools::Long(aRight.Left() + aRight.GetWidth() * 1.05));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aLeft);
@@ -792,9 +792,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_CLIPTEXT :
{
tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ aLeft.setWidth(tools::Long(aLeft.GetWidth() * 0.488));
tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+ aRight.SetLeft(tools::Long(aRight.Left() + aRight.GetWidth() * 1.05));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aLeft);
@@ -804,9 +804,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_TEXTOBJ :
{
tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ aLeft.setWidth(tools::Long(aLeft.GetWidth() * 0.488));
tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+ aRight.SetLeft(tools::Long(aRight.Left() + aRight.GetWidth() * 1.05));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
@@ -822,12 +822,12 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_TITLE_CONTENT_2CONTENT :
{
tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ aLeft.setWidth(tools::Long(aLeft.GetWidth() * 0.488));
tools::Rectangle aRightTop(aLeft);
- aRightTop.SetLeft(long(aRightTop.Left() + aRightTop.GetWidth() * 1.05));
- aRightTop.setHeight(long(aRightTop.GetHeight() * 0.477));
+ aRightTop.SetLeft(tools::Long(aRightTop.Left() + aRightTop.GetWidth() * 1.05));
+ aRightTop.setHeight(tools::Long(aRightTop.GetHeight() * 0.477));
tools::Rectangle aRightBottom(aRightTop);
- aRightBottom.SetTop(long(aRightBottom.Top() + aRightBottom.GetHeight() * 1.095));
+ aRightBottom.SetTop(tools::Long(aRightBottom.Top() + aRightBottom.GetHeight() * 1.095));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
@@ -838,9 +838,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_OBJTEXT :
{
tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ aLeft.setWidth(tools::Long(aLeft.GetWidth() * 0.488));
tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+ aRight.SetLeft(tools::Long(aRight.Left() + aRight.GetWidth() * 1.05));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeft);
@@ -850,9 +850,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT :
{
tools::Rectangle aTop(pInfo->GetPresRectangle());
- aTop.setHeight(long(aTop.GetHeight() * 0.477));
+ aTop.setHeight(tools::Long(aTop.GetHeight() * 0.477));
tools::Rectangle aBottom(aTop);
- aBottom.SetTop(long(aBottom.Top() + aBottom.GetHeight() * 1.095));
+ aBottom.SetTop(tools::Long(aBottom.Top() + aBottom.GetHeight() * 1.095));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTop);
@@ -862,12 +862,12 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_TITLE_2CONTENT_CONTENT :
{
tools::Rectangle aLeftTop(pInfo->GetPresRectangle());
- aLeftTop.setWidth(long(aLeftTop.GetWidth() * 0.488));
+ aLeftTop.setWidth(tools::Long(aLeftTop.GetWidth() * 0.488));
tools::Rectangle aRight(aLeftTop);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
- aLeftTop.setHeight(long(aLeftTop.GetHeight() * 0.477));
+ aRight.SetLeft(tools::Long(aRight.Left() + aRight.GetWidth() * 1.05));
+ aLeftTop.setHeight(tools::Long(aLeftTop.GetHeight() * 0.477));
tools::Rectangle aLeftBottom(aLeftTop);
- aLeftBottom.SetTop(long(aLeftBottom.Top() + aLeftBottom.GetHeight() * 1.095));
+ aLeftBottom.SetTop(tools::Long(aLeftBottom.Top() + aLeftBottom.GetHeight() * 1.095));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeftTop);
@@ -878,12 +878,12 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT :
{
tools::Rectangle aTopLeft(pInfo->GetPresRectangle());
- aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
+ aTopLeft.setHeight(tools::Long(aTopLeft.GetHeight() * 0.477));
tools::Rectangle aBottom(aTopLeft);
- aBottom.SetTop(long(aBottom.Top() + aBottom.GetHeight() * 1.095));
- aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
+ aBottom.SetTop(tools::Long(aBottom.Top() + aBottom.GetHeight() * 1.095));
+ aTopLeft.setWidth(tools::Long(aTopLeft.GetWidth() * 0.488));
tools::Rectangle aTopRight(aTopLeft);
- aTopRight.SetLeft(long(aTopRight.Left() + aTopRight.GetWidth() * 1.05));
+ aTopRight.SetLeft(tools::Long(aTopRight.Left() + aTopRight.GetWidth() * 1.05));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopLeft);
@@ -894,9 +894,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_TEXTOVEROBJ :
{
tools::Rectangle aTop(pInfo->GetPresRectangle());
- aTop.setHeight(long(aTop.GetHeight() * 0.477));
+ aTop.setHeight(tools::Long(aTop.GetHeight() * 0.477));
tools::Rectangle aBottom(aTop);
- aBottom.SetTop(long(aBottom.Top() + aBottom.GetHeight() * 1.095));
+ aBottom.SetTop(tools::Long(aBottom.Top() + aBottom.GetHeight() * 1.095));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aTop);
@@ -906,14 +906,14 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_TITLE_4CONTENT :
{
tools::Rectangle aTopLeft(pInfo->GetPresRectangle());
- aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
- aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
+ aTopLeft.setHeight(tools::Long(aTopLeft.GetHeight() * 0.477));
+ aTopLeft.setWidth(tools::Long(aTopLeft.GetWidth() * 0.488));
tools::Rectangle aBottomLeft(aTopLeft);
- aBottomLeft.SetTop(long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095));
+ aBottomLeft.SetTop(tools::Long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095));
tools::Rectangle aTopRight(aTopLeft);
- aTopRight.SetLeft(long(aTopRight.Left() + aTopRight.GetWidth() * 1.05));
+ aTopRight.SetLeft(tools::Long(aTopRight.Left() + aTopRight.GetWidth() * 1.05));
tools::Rectangle aBottomRight(aTopRight);
- aBottomRight.SetTop(long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095));
+ aBottomRight.SetTop(tools::Long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopLeft);
@@ -992,9 +992,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT :
{
tools::Rectangle aTop(pInfo->GetPresRectangle());
- aTop.setHeight(long(aTop.GetHeight() * 0.488));
+ aTop.setHeight(tools::Long(aTop.GetHeight() * 0.488));
tools::Rectangle aBottom(aTop);
- aBottom.SetTop(long(aBottom.Top() + aBottom.GetHeight() * 1.05));
+ aBottom.SetTop(tools::Long(aBottom.Top() + aBottom.GetHeight() * 1.05));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, aTop);
@@ -1016,9 +1016,9 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_TITLE_2VTEXT :
{
tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ aLeft.setWidth(tools::Long(aLeft.GetWidth() * 0.488));
tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+ aRight.SetLeft(tools::Long(aRight.Left() + aRight.GetWidth() * 1.05));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aLeft);
@@ -1034,14 +1034,14 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_4CLIPART :
{
tools::Rectangle aTopLeft(pInfo->GetPresRectangle());
- aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
- aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
+ aTopLeft.setHeight(tools::Long(aTopLeft.GetHeight() * 0.477));
+ aTopLeft.setWidth(tools::Long(aTopLeft.GetWidth() * 0.488));
tools::Rectangle aBottomLeft(aTopLeft);
- aBottomLeft.SetTop(long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095));
+ aBottomLeft.SetTop(tools::Long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095));
tools::Rectangle aTopRight(aTopLeft);
- aTopRight.SetLeft(long(aTopRight.Left() + aTopRight.GetWidth() * 1.05));
+ aTopRight.SetLeft(tools::Long(aTopRight.Left() + aTopRight.GetWidth() * 1.05));
tools::Rectangle aBottomRight(aTopRight);
- aBottomRight.SetTop(long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095));
+ aBottomRight.SetTop(tools::Long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aTopLeft);
@@ -1054,19 +1054,19 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
case AUTOLAYOUT_TITLE_6CONTENT :
{
tools::Rectangle aTopLeft(pInfo->GetPresRectangle());
- aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
- aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.322));
+ aTopLeft.setHeight(tools::Long(aTopLeft.GetHeight() * 0.477));
+ aTopLeft.setWidth(tools::Long(aTopLeft.GetWidth() * 0.322));
tools::Rectangle aTopCenter(aTopLeft);
- aTopCenter.SetLeft(long(aTopCenter.Left() + aTopCenter.GetWidth() * 1.05));
+ aTopCenter.SetLeft(tools::Long(aTopCenter.Left() + aTopCenter.GetWidth() * 1.05));
tools::Rectangle aTopRight(aTopLeft);
- aTopRight.SetLeft(long(aTopRight.Left() + aTopRight.GetWidth() * 2 * 1.05));
+ aTopRight.SetLeft(tools::Long(aTopRight.Left() + aTopRight.GetWidth() * 2 * 1.05));
tools::Rectangle aBottomLeft(aTopLeft);
- aBottomLeft.SetTop(long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095));
+ aBottomLeft.SetTop(tools::Long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095));
tools::Rectangle aBottomCenter(aTopCenter);
- aBottomCenter.SetTop(long(aBottomCenter.Top() + aBottomCenter.GetHeight() * 1.095));
+ aBottomCenter.SetTop(tools::Long(aBottomCenter.Top() + aBottomCenter.GetHeight() * 1.095));
tools::Rectangle aBottomRight(aTopRight);
- aBottomRight.SetTop(long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095));
+ aBottomRight.SetTop(tools::Long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095));
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aTopLeft);
diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx
index 3a600427122c..af53ad308d2f 100644
--- a/xmloff/source/text/txtlists.cxx
+++ b/xmloff/source/text/txtlists.cxx
@@ -23,6 +23,7 @@
#include <o3tl/safeint.hxx>
#include <tools/datetime.hxx>
+#include <tools/long.hxx>
#include <sal/log.hxx>
#include <xmloff/txtimp.hxx>
@@ -209,7 +210,7 @@ OUString XMLTextListsHelper::GenerateNewListId() const
OUString sNewListId( sTmpStr );
if ( mpProcessedLists )
{
- long nHitCount = 0;
+ tools::Long nHitCount = 0;
while ( mpProcessedLists->find( sNewListId ) != mpProcessedLists->end() )
{
++nHitCount;
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index f0ba29b080a4..1483b9bda0f8 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -186,7 +186,7 @@ void CertificateChooser::ImplInitialize()
{
uno::Reference< security::XCertificate > xCert = xCerts[ --nCert ];
// Check if we have a private key for this...
- long nCertificateCharacters = secEnvironment->getCertificateCharacters(xCert);
+ tools::Long nCertificateCharacters = secEnvironment->getCertificateCharacters(xCert);
if (!(nCertificateCharacters & security::CertificateCharacters::HAS_PRIVATE_KEY))
{
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 2f55dbde95f5..fbbdcf53514d 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -137,7 +137,7 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP(weld::Container* pParent,
// #i41270# Check only if we have that certificate in our security environment
if (pDlg->mbCheckForPrivateKey)
{
- long nCertificateCharacters = pDlg->mxSecurityEnvironment->getCertificateCharacters(xCert);
+ tools::Long nCertificateCharacters = pDlg->mxSecurityEnvironment->getCertificateCharacters(xCert);
bHasPrivateKey = (nCertificateCharacters & security::CertificateCharacters::HAS_PRIVATE_KEY);
}
if (!bHasPrivateKey)